@holoviz/panel 1.3.2 → 1.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/fastbasetemplate/fast.css +1 -4
- package/dist/bundled/fastgridtemplate/fast_grid_template.css +0 -214
- package/dist/bundled/notificationarea/panel/1.3.3/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.3.3/dist/bundled/bootstrap5/css/bootstrap.min.css +2 -0
- package/dist/bundled/panel/1.3.3/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +2 -0
- package/dist/bundled/panel/1.3.3/dist/bundled/font-awesome/css/all.min.css +2 -0
- package/dist/bundled/panel/1.3.3/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/bundled/plotlyplot/panel/1.3.3/dist/bundled/jquery/jquery.slim.min.js +2 -0
- package/dist/lib/models/audio.js +2 -1
- package/dist/lib/models/audio.js.map +1 -1
- package/dist/lib/models/echarts.js +4 -1
- package/dist/lib/models/echarts.js.map +1 -1
- package/dist/lib/models/tabulator.d.ts +2 -1
- package/dist/lib/models/tabulator.js +27 -4
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/panel.js +39 -12
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +5 -5
- package/dist/wheels/{panel-1.3.2-py3-none-any.whl → panel-1.3.3-py3-none-any.whl} +0 -0
- package/package.json +1 -1
- package/dist/bundled/notificationarea/panel/1.3.2/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.3.2/dist/bundled/bootstrap5/css/bootstrap.min.css +0 -2
- package/dist/bundled/panel/1.3.2/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +0 -2
- package/dist/bundled/panel/1.3.2/dist/bundled/font-awesome/css/all.min.css +0 -2
- package/dist/bundled/panel/1.3.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
- package/dist/bundled/plotlyplot/panel/1.3.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
package/dist/panel.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["@@/panel/dist/lib/index.js","@@/panel/dist/lib/models/index.js","@@/panel/dist/lib/models/ace.js","@@/panel/dist/lib/models/layout.js","@@/panel/dist/lib/models/audio.js","@@/panel/dist/lib/models/browser.js","@@/panel/dist/lib/models/button.js","@@/panel/dist/lib/models/card.js","@@/panel/dist/lib/models/column.js","@@/panel/dist/lib/models/checkbox_button_group.js","@@/panel/dist/lib/models/comm_manager.js","@@/panel/dist/lib/models/customselect.js","@@/panel/dist/lib/models/tabulator.js","@@/panel/node_modules/debounce/index.js","@@/panel/dist/lib/models/data.js","@@/panel/dist/lib/models/datetime_picker.js","@@/panel/node_modules/flatpickr/dist/esm/index.js","@@/panel/node_modules/flatpickr/dist/esm/types/options.js","@@/panel/node_modules/flatpickr/dist/esm/l10n/default.js","@@/panel/node_modules/flatpickr/dist/esm/utils/index.js","@@/panel/node_modules/flatpickr/dist/esm/utils/dom.js","@@/panel/node_modules/flatpickr/dist/esm/utils/dates.js","@@/panel/node_modules/flatpickr/dist/esm/utils/formatting.js","@@/panel/node_modules/flatpickr/dist/esm/utils/polyfills.js","@@/panel/dist/lib/models/deckgl.js","@@/panel/dist/lib/models/tooltips.js","@@/panel/node_modules/@luma.gl/constants/src/index.js","@@/panel/dist/lib/models/echarts.js","@@/panel/dist/lib/models/event-to-object.js","@@/panel/dist/lib/models/file_download.js","@@/panel/dist/lib/models/html.js","@@/panel/dist/lib/models/ipywidget.js","@@/panel/dist/lib/models/json.js","@@/panel/node_modules/json-formatter-js/dist/json-formatter.esm.js","@@/panel/dist/lib/models/jsoneditor.js","@@/panel/dist/lib/models/katex.js","@@/panel/dist/lib/models/location.js","@@/panel/dist/lib/models/mathjax.js","@@/panel/dist/lib/models/pdf.js","@@/panel/dist/lib/models/perspective.js","@@/panel/dist/lib/models/player.js","@@/panel/dist/lib/models/plotly.js","@@/panel/dist/lib/models/util.js","@@/panel/dist/lib/models/progress.js","@@/panel/dist/lib/models/quill.js","@@/panel/dist/lib/models/radio_button_group.js","@@/panel/dist/lib/models/reactive_html.js","@@/panel/node_modules/preact/dist/preact.module.js","@@/panel/node_modules/preact/hooks/dist/hooks.module.js","@@/panel/node_modules/htm/preact/index.module.js","@@/panel/node_modules/htm/dist/htm.module.js","@@/panel/dist/lib/models/singleselect.js","@@/panel/dist/lib/models/speech_to_text.js","@@/panel/dist/lib/models/state.js","@@/panel/dist/lib/models/tabs.js","@@/panel/dist/lib/models/terminal.js","@@/panel/dist/lib/models/textarea_input.js","@@/panel/dist/lib/models/text_to_speech.js","@@/panel/dist/lib/models/tooltip_icon.js","@@/panel/dist/lib/models/trend.js","@@/panel/dist/lib/models/vega.js","@@/panel/dist/lib/models/video.js","@@/panel/dist/lib/models/videostream.js","@@/panel/dist/lib/models/vizzu.js","@@/panel/dist/lib/models/vtk/index.js","@@/panel/dist/lib/models/vtk/vtkjs.js","@@/panel/dist/lib/models/vtk/vtklayout.js","@@/panel/dist/lib/models/vtk/util.js","@@/panel/dist/lib/models/vtk/vtkcolorbar.js","@@/panel/dist/lib/models/vtk/vtkaxes.js","@@/panel/node_modules/gl-matrix/esm/index.js","@@/panel/node_modules/gl-matrix/esm/common.js","@@/panel/node_modules/gl-matrix/esm/mat2.js","@@/panel/node_modules/gl-matrix/esm/mat2d.js","@@/panel/node_modules/gl-matrix/esm/mat3.js","@@/panel/node_modules/gl-matrix/esm/mat4.js","@@/panel/node_modules/gl-matrix/esm/quat.js","@@/panel/node_modules/gl-matrix/esm/vec3.js","@@/panel/node_modules/gl-matrix/esm/vec4.js","@@/panel/node_modules/gl-matrix/esm/quat2.js","@@/panel/node_modules/gl-matrix/esm/vec2.js","@@/panel/dist/lib/models/vtk/vtkvolume.js","@@/panel/dist/lib/models/vtk/vtksynchronized.js","@@/panel/dist/lib/models/vtk/panel_fullscreen_renwin_sync.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7lCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5hEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1IA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9nDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/sBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const Panel = tslib_1.__importStar(require(\"25913cabc4\") /* ./models */);\n exports.Panel = Panel;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(Panel);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var ace_1 = require(\"464e3dc85c\") /* ./ace */;\n __esExport(\"AcePlot\", ace_1.AcePlot);\n var audio_1 = require(\"d8d3afec63\") /* ./audio */;\n __esExport(\"Audio\", audio_1.Audio);\n var browser_1 = require(\"af84f1061d\") /* ./browser */;\n __esExport(\"BrowserInfo\", browser_1.BrowserInfo);\n var button_1 = require(\"0e384ee9c4\") /* ./button */;\n __esExport(\"Button\", button_1.Button);\n var card_1 = require(\"eec4af24bc\") /* ./card */;\n __esExport(\"Card\", card_1.Card);\n var checkbox_button_group_1 = require(\"820473477c\") /* ./checkbox_button_group */;\n __esExport(\"CheckboxButtonGroup\", checkbox_button_group_1.CheckboxButtonGroup);\n var column_1 = require(\"991bd33955\") /* ./column */;\n __esExport(\"Column\", column_1.Column);\n var comm_manager_1 = require(\"eca6f2cacb\") /* ./comm_manager */;\n __esExport(\"CommManager\", comm_manager_1.CommManager);\n var customselect_1 = require(\"e258e515be\") /* ./customselect */;\n __esExport(\"CustomSelect\", customselect_1.CustomSelect);\n var tabulator_1 = require(\"1629ba0343\") /* ./tabulator */;\n __esExport(\"DataTabulator\", tabulator_1.DataTabulator);\n var datetime_picker_1 = require(\"5fd6501095\") /* ./datetime_picker */;\n __esExport(\"DatetimePicker\", datetime_picker_1.DatetimePicker);\n var deckgl_1 = require(\"19b5a68a40\") /* ./deckgl */;\n __esExport(\"DeckGLPlot\", deckgl_1.DeckGLPlot);\n var echarts_1 = require(\"44fa3f3649\") /* ./echarts */;\n __esExport(\"ECharts\", echarts_1.ECharts);\n var file_download_1 = require(\"e6943b23b3\") /* ./file_download */;\n __esExport(\"FileDownload\", file_download_1.FileDownload);\n var html_1 = require(\"3db2e41978\") /* ./html */;\n __esExport(\"HTML\", html_1.HTML);\n var ipywidget_1 = require(\"4dfd782539\") /* ./ipywidget */;\n __esExport(\"IPyWidget\", ipywidget_1.IPyWidget);\n var json_1 = require(\"e954d48822\") /* ./json */;\n __esExport(\"JSON\", json_1.JSON);\n var jsoneditor_1 = require(\"3c56a75fcf\") /* ./jsoneditor */;\n __esExport(\"JSONEditor\", jsoneditor_1.JSONEditor);\n var katex_1 = require(\"001dfd2dde\") /* ./katex */;\n __esExport(\"KaTeX\", katex_1.KaTeX);\n var location_1 = require(\"a85ed38ee9\") /* ./location */;\n __esExport(\"Location\", location_1.Location);\n var mathjax_1 = require(\"ca760ebc92\") /* ./mathjax */;\n __esExport(\"MathJax\", mathjax_1.MathJax);\n var pdf_1 = require(\"46cccf2270\") /* ./pdf */;\n __esExport(\"PDF\", pdf_1.PDF);\n var perspective_1 = require(\"5f38562b04\") /* ./perspective */;\n __esExport(\"Perspective\", perspective_1.Perspective);\n var player_1 = require(\"bd5015f776\") /* ./player */;\n __esExport(\"Player\", player_1.Player);\n var plotly_1 = require(\"b6febc7d6f\") /* ./plotly */;\n __esExport(\"PlotlyPlot\", plotly_1.PlotlyPlot);\n var progress_1 = require(\"e6caa5bc95\") /* ./progress */;\n __esExport(\"Progress\", progress_1.Progress);\n var quill_1 = require(\"283ee868b0\") /* ./quill */;\n __esExport(\"QuillInput\", quill_1.QuillInput);\n var radio_button_group_1 = require(\"81e6ca704a\") /* ./radio_button_group */;\n __esExport(\"RadioButtonGroup\", radio_button_group_1.RadioButtonGroup);\n var reactive_html_1 = require(\"0590cf2a27\") /* ./reactive_html */;\n __esExport(\"ReactiveHTML\", reactive_html_1.ReactiveHTML);\n var singleselect_1 = require(\"665213fba5\") /* ./singleselect */;\n __esExport(\"SingleSelect\", singleselect_1.SingleSelect);\n var speech_to_text_1 = require(\"7651136c44\") /* ./speech_to_text */;\n __esExport(\"SpeechToText\", speech_to_text_1.SpeechToText);\n var state_1 = require(\"1bb5a1aca6\") /* ./state */;\n __esExport(\"State\", state_1.State);\n var tabs_1 = require(\"8013e805da\") /* ./tabs */;\n __esExport(\"Tabs\", tabs_1.Tabs);\n var terminal_1 = require(\"4a0674b147\") /* ./terminal */;\n __esExport(\"Terminal\", terminal_1.Terminal);\n var textarea_input_1 = require(\"59f46adc8c\") /* ./textarea_input */;\n __esExport(\"TextAreaInput\", textarea_input_1.TextAreaInput);\n var text_to_speech_1 = require(\"a44f0bd49f\") /* ./text_to_speech */;\n __esExport(\"TextToSpeech\", text_to_speech_1.TextToSpeech);\n var tooltip_icon_1 = require(\"4c6dd3d1dc\") /* ./tooltip_icon */;\n __esExport(\"TooltipIcon\", tooltip_icon_1.TooltipIcon);\n var trend_1 = require(\"c2c4524e04\") /* ./trend */;\n __esExport(\"TrendIndicator\", trend_1.TrendIndicator);\n var vega_1 = require(\"b396729d22\") /* ./vega */;\n __esExport(\"VegaPlot\", vega_1.VegaPlot);\n var video_1 = require(\"e6e8c94f32\") /* ./video */;\n __esExport(\"Video\", video_1.Video);\n var videostream_1 = require(\"2dfabe6882\") /* ./videostream */;\n __esExport(\"VideoStream\", videostream_1.VideoStream);\n var vizzu_1 = require(\"dfe3c4a2a9\") /* ./vizzu */;\n __esExport(\"VizzuChart\", vizzu_1.VizzuChart);\n tslib_1.__exportStar(require(\"c51f25e2a7\") /* ./vtk */, exports);\n}\n","/* models/ace.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function ID() {\n // Math.random should be unique because of its seeding algorithm.\n // Convert it to base 36 (numbers + letters), and grab the first 9 characters\n // after the decimal.\n return '_' + Math.random().toString(36).substr(2, 9);\n }\n class AcePlotView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._container = (0, dom_1.div)({\n id: ID(),\n style: {\n width: \"100%\",\n height: \"100%\",\n zIndex: 0,\n }\n });\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.code.change, () => this._update_code_from_model());\n this.connect(this.model.properties.theme.change, () => this._update_theme());\n this.connect(this.model.properties.language.change, () => this._update_language());\n this.connect(this.model.properties.filename.change, () => this._update_filename());\n this.connect(this.model.properties.print_margin.change, () => this._update_print_margin());\n this.connect(this.model.properties.annotations.change, () => this._add_annotations());\n this.connect(this.model.properties.readonly.change, () => {\n this._editor.setReadOnly(this.model.readonly);\n });\n }\n render() {\n super.render();\n if (!(this._container === this.shadow_el.childNodes[0]))\n this.shadow_el.append(this._container);\n this._container.textContent = this.model.code;\n this._editor = ace.edit(this._container);\n this._editor.renderer.attachToShadowRoot();\n this._langTools = ace.require('ace/ext/language_tools');\n this._modelist = ace.require(\"ace/ext/modelist\");\n this._editor.setOptions({\n enableBasicAutocompletion: true,\n enableSnippets: true,\n fontFamily: \"monospace\", //hack for cursor position\n });\n this._update_theme();\n this._update_filename();\n this._update_language();\n this._editor.setReadOnly(this.model.readonly);\n this._editor.setShowPrintMargin(this.model.print_margin);\n this._editor.on('change', () => this._update_code_from_editor());\n }\n _update_code_from_model() {\n if (this._editor && this._editor.getValue() != this.model.code)\n this._editor.setValue(this.model.code);\n }\n _update_print_margin() {\n this._editor.setShowPrintMargin(this.model.print_margin);\n }\n _update_code_from_editor() {\n if (this._editor.getValue() != this.model.code) {\n this.model.code = this._editor.getValue();\n }\n }\n _update_theme() {\n this._editor.setTheme(`ace/theme/${this.model.theme}`);\n }\n _update_filename() {\n if (this.model.filename) {\n const mode = this._modelist.getModeForPath(this.model.filename).mode;\n this.model.language = mode.slice(9);\n }\n }\n _update_language() {\n if (this.model.language != null) {\n this._editor.session.setMode(`ace/mode/${this.model.language}`);\n }\n }\n _add_annotations() {\n this._editor.session.setAnnotations(this.model.annotations);\n }\n after_layout() {\n super.after_layout();\n this._editor.resize();\n }\n }\n exports.AcePlotView = AcePlotView;\n AcePlotView.__name__ = \"AcePlotView\";\n class AcePlot extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.AcePlot = AcePlot;\n _a = AcePlot;\n AcePlot.__name__ = \"AcePlot\";\n AcePlot.__module__ = \"panel.models.ace\";\n (() => {\n _a.prototype.default_view = AcePlotView;\n _a.define(({ Any, Array, Boolean, String, Nullable }) => ({\n code: [String, ''],\n filename: [Nullable(String), null],\n language: [String, ''],\n theme: [String, 'chrome'],\n annotations: [Array(Any), []],\n readonly: [Boolean, false],\n print_margin: [Boolean, false]\n }));\n _a.override({\n height: 300,\n width: 300\n });\n })();\n}\n","/* models/layout.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const widget_1 = require(\"@bokehjs/models/widgets/widget\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n class PanelMarkupView extends widget_1.WidgetView {\n async lazy_initialize() {\n await super.lazy_initialize();\n if (this.provider.status == \"not_started\" || this.provider.status == \"loading\")\n this.provider.ready.connect(() => {\n if (this.contains_tex_string(this.model.text))\n this.render();\n });\n }\n watch_stylesheets() {\n this._initialized_stylesheets = {};\n for (const sts of this._applied_stylesheets) {\n const style_el = sts.el;\n if (style_el instanceof HTMLLinkElement) {\n this._initialized_stylesheets[style_el.href] = false;\n style_el.addEventListener(\"load\", () => {\n this._initialized_stylesheets[style_el.href] = true;\n if (Object.values(this._initialized_stylesheets).every(Boolean))\n this.style_redraw();\n });\n }\n }\n }\n style_redraw() {\n }\n has_math_disabled() {\n return this.model.disable_math || !this.contains_tex_string(this.model.text);\n }\n render() {\n super.render();\n set_size(this.el, this.model);\n this.container = (0, dom_1.div)();\n set_size(this.container, this.model, false);\n this.shadow_el.appendChild(this.container);\n if (this.provider.status == \"failed\" || this.provider.status == \"loaded\")\n this._has_finished = true;\n }\n }\n exports.PanelMarkupView = PanelMarkupView;\n PanelMarkupView.__name__ = \"PanelMarkupView\";\n function set_size(el, model, adjustMargin = true) {\n let width_policy = model.width != null ? \"fixed\" : \"fit\";\n let height_policy = model.height != null ? \"fixed\" : \"fit\";\n const { sizing_mode, margin } = model;\n if (sizing_mode != null) {\n if (sizing_mode == \"fixed\")\n width_policy = height_policy = \"fixed\";\n else if (sizing_mode == \"stretch_both\")\n width_policy = height_policy = \"max\";\n else if (sizing_mode == \"stretch_width\")\n width_policy = \"max\";\n else if (sizing_mode == \"stretch_height\")\n height_policy = \"max\";\n else {\n switch (sizing_mode) {\n case \"scale_width\":\n width_policy = \"max\";\n height_policy = \"min\";\n break;\n case \"scale_height\":\n width_policy = \"min\";\n height_policy = \"max\";\n break;\n case \"scale_both\":\n width_policy = \"max\";\n height_policy = \"max\";\n break;\n default:\n throw new Error(\"unreachable\");\n }\n }\n }\n let wm, hm;\n if (!adjustMargin) {\n hm = wm = 0;\n }\n else if ((0, types_1.isArray)(margin)) {\n if (margin.length === 4) {\n hm = margin[0] + margin[2];\n wm = margin[1] + margin[3];\n }\n else {\n hm = margin[0] * 2;\n wm = margin[1] * 2;\n }\n }\n else if (margin == null) {\n hm = wm = 0;\n }\n else {\n wm = hm = margin * 2;\n }\n if (width_policy == \"fixed\" && model.width)\n el.style.width = model.width + \"px\";\n else if (width_policy == \"max\")\n el.style.width = wm ? `calc(100% - ${wm}px)` : \"100%\";\n if (model.min_width != null)\n el.style.minWidth = model.min_width + \"px\";\n if (model.max_width != null)\n el.style.maxWidth = model.max_width + \"px\";\n if (height_policy == \"fixed\" && model.height)\n el.style.height = model.height + \"px\";\n else if (height_policy == \"max\")\n el.style.height = hm ? `calc(100% - ${hm}px)` : \"100%\";\n if (model.min_height != null)\n el.style.minHeight = model.min_height + \"px\";\n if (model.max_width != null)\n el.style.maxHeight = model.max_height + \"px\";\n }\n exports.set_size = set_size;\n class HTMLBoxView extends layout_dom_1.LayoutDOMView {\n render() {\n super.render();\n set_size(this.el, this.model);\n }\n watch_stylesheets() {\n this._initialized_stylesheets = {};\n for (const sts of this._applied_stylesheets) {\n const style_el = sts.el;\n if (style_el instanceof HTMLLinkElement) {\n this._initialized_stylesheets[style_el.href] = false;\n style_el.addEventListener(\"load\", () => {\n this._initialized_stylesheets[style_el.href] = true;\n if (Object.values(this._initialized_stylesheets).every(Boolean))\n this.style_redraw();\n });\n }\n }\n }\n style_redraw() {\n }\n get child_models() {\n return [];\n }\n }\n exports.HTMLBoxView = HTMLBoxView;\n HTMLBoxView.__name__ = \"HTMLBoxView\";\n class HTMLBox extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.HTMLBox = HTMLBox;\n HTMLBox.__name__ = \"HTMLBox\";\n}\n","/* models/audio.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class AudioView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._blocked = false;\n this._setting = false;\n this._time = Date.now();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.loop.change, () => this.set_loop());\n this.connect(this.model.properties.paused.change, () => this.set_paused());\n this.connect(this.model.properties.time.change, () => this.set_time());\n this.connect(this.model.properties.value.change, () => this.set_value());\n this.connect(this.model.properties.volume.change, () => this.set_volume());\n this.connect(this.model.properties.muted.change, () => this.set_muted());\n this.connect(this.model.properties.autoplay.change, () => this.set_autoplay());\n }\n render() {\n super.render();\n this.audioEl = document.createElement('audio');\n this.audioEl.controls = true;\n this.audioEl.src = this.model.value;\n this.audioEl.currentTime = this.model.time;\n this.audioEl.loop = this.model.loop;\n this.audioEl.muted = this.model.muted;\n this.audioEl.autoplay = this.model.autoplay;\n if (this.model.volume != null)\n this.audioEl.volume = this.model.volume / 100;\n else\n this.model.volume = this.audioEl.volume * 100;\n this.audioEl.onpause = () => this.model.paused = true;\n this.audioEl.onplay = () => this.model.paused = false;\n this.audioEl.ontimeupdate = () => this.update_time(this);\n this.audioEl.onvolumechange = () => this.update_volume(this);\n this.shadow_el.appendChild(this.audioEl);\n if (!this.model.paused)\n this.audioEl.play();\n }\n update_time(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n if ((Date.now() - view._time) < view.model.throttle)\n return;\n view._blocked = true;\n view.model.time = view.audioEl.currentTime;\n view._time = Date.now();\n }\n update_volume(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n view._blocked = true;\n view.model.volume = view.audioEl.volume * 100;\n }\n set_loop() {\n this.audioEl.loop = this.model.loop;\n }\n set_muted() {\n this.audioEl.muted = this.model.muted;\n }\n set_autoplay() {\n this.audioEl.autoplay = this.model.autoplay;\n }\n set_paused() {\n if (!this.audioEl.paused && this.model.paused)\n this.audioEl.pause();\n if (this.audioEl.paused && !this.model.paused)\n this.audioEl.play();\n }\n set_volume() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n if (this.model.volume != null) {\n this.audioEl.volume = this.model.volume / 100;\n }\n }\n set_time() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n this.audioEl.currentTime = this.model.time;\n }\n set_value() {\n this.audioEl.src = this.model.value;\n }\n }\n exports.AudioView = AudioView;\n AudioView.__name__ = \"AudioView\";\n class Audio extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Audio = Audio;\n _a = Audio;\n Audio.__name__ = \"Audio\";\n Audio.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = AudioView;\n _a.define(({ Any, Boolean, Number, Nullable }) => ({\n loop: [Boolean, false],\n paused: [Boolean, true],\n muted: [Boolean, false],\n autoplay: [Boolean, false],\n time: [Number, 0],\n throttle: [Number, 250],\n value: [Any, ''],\n volume: [Nullable(Number), null],\n }));\n })();\n}\n","/* models/browser.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n class BrowserInfoView extends view_1.View {\n initialize() {\n super.initialize();\n if (window.matchMedia != null) {\n this.model.dark_mode = window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n this.model.device_pixel_ratio = window.devicePixelRatio;\n if (navigator != null) {\n this.model.language = navigator.language;\n this.model.webdriver = navigator.webdriver;\n }\n const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n if (timezone != null)\n this.model.timezone = timezone;\n const timezone_offset = new Date().getTimezoneOffset();\n if (timezone_offset != null)\n this.model.timezone_offset = timezone_offset;\n this._has_finished = true;\n this.notify_finished();\n }\n }\n exports.BrowserInfoView = BrowserInfoView;\n BrowserInfoView.__name__ = \"BrowserInfoView\";\n class BrowserInfo extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.BrowserInfo = BrowserInfo;\n _a = BrowserInfo;\n BrowserInfo.__name__ = \"BrowserInfo\";\n BrowserInfo.__module__ = \"panel.models.browser\";\n (() => {\n _a.prototype.default_view = BrowserInfoView;\n _a.define(({ Boolean, Nullable, Number, String }) => ({\n dark_mode: [Nullable(Boolean), null],\n device_pixel_ratio: [Nullable(Number), null],\n language: [Nullable(String), null],\n timezone: [Nullable(String), null],\n timezone_offset: [Nullable(Number), null],\n webdriver: [Nullable(Boolean), null]\n }));\n })();\n}\n","/* models/button.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const button_1 = require(\"@bokehjs/models/widgets/button\");\n class ButtonView extends button_1.ButtonView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.ButtonView = ButtonView;\n ButtonView.__name__ = \"ButtonView\";\n class Button extends button_1.Button {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Button = Button;\n _a = Button;\n Button.__name__ = \"Button\";\n Button.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = ButtonView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/card.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const column_1 = require(\"991bd33955\") /* ./column */;\n const DOM = tslib_1.__importStar(require(\"@bokehjs/core/dom\"));\n class CardView extends column_1.ColumnView {\n constructor() {\n super(...arguments);\n this.collapsed_style = new DOM.InlineStyleSheet();\n }\n connect_signals() {\n super.connect_signals();\n const { active_header_background, children, collapsed, header_background, header_color, hide_header } = this.model.properties;\n this.on_change(children, () => this.render());\n this.on_change(collapsed, () => this._collapse());\n this.on_change([header_color, hide_header], () => this.render());\n this.on_change([active_header_background, collapsed, header_background], () => {\n const header_background = this.header_background;\n if (header_background == null)\n return;\n this.child_views[0].el.style.backgroundColor = header_background;\n this.header_el.style.backgroundColor = header_background;\n });\n }\n *_stylesheets() {\n yield* super._stylesheets();\n yield this.collapsed_style;\n }\n get header_background() {\n let header_background = this.model.header_background;\n if (!this.model.collapsed && this.model.active_header_background)\n header_background = this.model.active_header_background;\n return header_background;\n }\n render() {\n this.empty();\n if (this.model.collapsed)\n this.collapsed_style.replace(\":host\", {\n \"height\": \"fit-content\",\n \"flex\": \"none\"\n });\n this._update_stylesheets();\n this._update_css_classes();\n this._apply_styles();\n this._apply_visible();\n this.class_list.add(...this.css_classes());\n const { button_css_classes, header_color, header_tag, header_css_classes } = this.model;\n const header_background = this.header_background;\n const header = this.child_views[0];\n let header_el;\n if (this.model.collapsible) {\n this.button_el = DOM.createElement(\"button\", { type: \"button\", class: header_css_classes });\n const icon = DOM.createElement(\"div\", { class: button_css_classes });\n icon.innerHTML = this.model.collapsed ? \"\\u25ba\" : \"\\u25bc\";\n this.button_el.appendChild(icon);\n this.button_el.style.backgroundColor = header_background != null ? header_background : \"\";\n header.el.style.backgroundColor = header_background != null ? header_background : \"\";\n this.button_el.appendChild(header.el);\n this.button_el.onclick = () => this._toggle_button();\n header_el = this.button_el;\n }\n else {\n header_el = DOM.createElement(header_tag, { class: header_css_classes });\n header_el.style.backgroundColor = header_background != null ? header_background : \"\";\n header_el.appendChild(header.el);\n }\n this.header_el = header_el;\n if (!this.model.hide_header) {\n header_el.style.color = header_color != null ? header_color : \"\";\n this.shadow_el.appendChild(header_el);\n header.render();\n header.after_render();\n }\n if (this.model.collapsed)\n return;\n for (const child_view of this.child_views.slice(1)) {\n this.shadow_el.appendChild(child_view.el);\n child_view.render();\n child_view.after_render();\n }\n }\n async update_children() {\n await this.build_child_views();\n this.render();\n this.invalidate_layout();\n }\n _toggle_button() {\n this.model.collapsed = !this.model.collapsed;\n }\n _collapse() {\n for (const child_view of this.child_views.slice(1)) {\n if (this.model.collapsed) {\n this.shadow_el.removeChild(child_view.el);\n child_view.model.visible = false;\n }\n else {\n child_view.render();\n child_view.after_render();\n this.shadow_el.appendChild(child_view.el);\n child_view.model.visible = true;\n }\n }\n if (this.model.collapsed) {\n this.collapsed_style.replace(\":host\", {\n \"height\": \"fit-content\",\n 'flex': \"none\"\n });\n }\n else\n this.collapsed_style.clear();\n this.button_el.children[0].innerHTML = this.model.collapsed ? \"\\u25ba\" : \"\\u25bc\";\n this.invalidate_layout();\n }\n _createElement() {\n return DOM.createElement(this.model.tag, { class: this.css_classes() });\n }\n }\n exports.CardView = CardView;\n CardView.__name__ = \"CardView\";\n class Card extends column_1.Column {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Card = Card;\n _a = Card;\n Card.__name__ = \"Card\";\n Card.__module__ = \"panel.models.layout\";\n (() => {\n _a.prototype.default_view = CardView;\n _a.define(({ Array, Boolean, Nullable, String }) => ({\n active_header_background: [Nullable(String), null],\n button_css_classes: [Array(String), []],\n collapsed: [Boolean, true],\n collapsible: [Boolean, true],\n header_background: [Nullable(String), null],\n header_color: [Nullable(String), null],\n header_css_classes: [Array(String), []],\n header_tag: [String, \"div\"],\n hide_header: [Boolean, false],\n tag: [String, \"div\"],\n }));\n })();\n}\n","/* models/column.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const column_1 = require(\"@bokehjs/models/layouts/column\");\n const DOM = tslib_1.__importStar(require(\"@bokehjs/core/dom\"));\n class ColumnView extends column_1.ColumnView {\n connect_signals() {\n super.connect_signals();\n const { children, scroll_position, scroll_button_threshold } = this.model.properties;\n this.on_change(children, () => this.trigger_auto_scroll());\n this.on_change(scroll_position, () => this.scroll_to_position());\n this.on_change(scroll_button_threshold, () => this.toggle_scroll_button());\n }\n get distance_from_latest() {\n return this.el.scrollHeight - this.el.scrollTop - this.el.clientHeight;\n }\n scroll_to_position() {\n requestAnimationFrame(() => {\n this.el.scrollTo({ top: this.model.scroll_position });\n });\n }\n scroll_to_latest() {\n // Waits for the child to be rendered before scrolling\n requestAnimationFrame(() => {\n this.el.scrollTo({ top: this.el.scrollHeight });\n });\n }\n trigger_auto_scroll() {\n const limit = this.model.auto_scroll_limit;\n const within_limit = this.distance_from_latest <= limit;\n if (limit == 0 || !within_limit)\n return;\n this.scroll_to_latest();\n }\n record_scroll_position() {\n this.model.scroll_position = Math.round(this.el.scrollTop);\n }\n toggle_scroll_button() {\n const threshold = this.model.scroll_button_threshold;\n const exceeds_threshold = this.distance_from_latest >= threshold;\n if (this.scroll_down_button_el) {\n this.scroll_down_button_el.classList.toggle(\"visible\", threshold !== 0 && exceeds_threshold);\n }\n }\n render() {\n super.render();\n this.scroll_down_button_el = DOM.createElement('div', { class: 'scroll-button' });\n this.shadow_el.appendChild(this.scroll_down_button_el);\n this.el.addEventListener(\"scroll\", () => {\n this.record_scroll_position();\n this.toggle_scroll_button();\n });\n this.scroll_down_button_el.addEventListener(\"click\", () => {\n this.scroll_to_latest();\n });\n }\n after_render() {\n super.after_render();\n requestAnimationFrame(() => {\n if (this.model.scroll_position) {\n this.scroll_to_position();\n }\n if (this.model.view_latest) {\n this.scroll_to_latest();\n }\n this.toggle_scroll_button();\n });\n }\n }\n exports.ColumnView = ColumnView;\n ColumnView.__name__ = \"ColumnView\";\n class Column extends column_1.Column {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Column = Column;\n _a = Column;\n Column.__name__ = \"Column\";\n Column.__module__ = \"panel.models.layout\";\n (() => {\n _a.prototype.default_view = ColumnView;\n _a.define(({ Int, Boolean }) => ({\n scroll_position: [Int, 0],\n auto_scroll_limit: [Int, 0],\n scroll_button_threshold: [Int, 0],\n view_latest: [Boolean, false],\n }));\n })();\n}\n","/* models/checkbox_button_group.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const checkbox_button_group_1 = require(\"@bokehjs/models/widgets/checkbox_button_group\");\n class CheckboxButtonGroupView extends checkbox_button_group_1.CheckboxButtonGroupView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.CheckboxButtonGroupView = CheckboxButtonGroupView;\n CheckboxButtonGroupView.__name__ = \"CheckboxButtonGroupView\";\n class CheckboxButtonGroup extends checkbox_button_group_1.CheckboxButtonGroup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.CheckboxButtonGroup = CheckboxButtonGroup;\n _a = CheckboxButtonGroup;\n CheckboxButtonGroup.__name__ = \"CheckboxButtonGroup\";\n CheckboxButtonGroup.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = CheckboxButtonGroupView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/comm_manager.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const document_1 = require(\"@bokehjs/document\");\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n const message_1 = require(\"@bokehjs/protocol/message\");\n const receiver_1 = require(\"@bokehjs/protocol/receiver\");\n exports.comm_settings = {\n debounce: true\n };\n class CommManagerView extends view_1.View {\n }\n exports.CommManagerView = CommManagerView;\n CommManagerView.__name__ = \"CommManagerView\";\n class CommManager extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n this._document_listener = (event) => this._document_changed(event);\n }\n initialize() {\n super.initialize();\n this._receiver = new receiver_1.Receiver();\n this._event_buffer = [];\n this._blocked = false;\n this._timeout = Date.now();\n if ((window.PyViz == undefined) || (!window.PyViz.comm_manager))\n console.log(\"Could not find comm manager on window.PyViz, ensure the extension is loaded.\");\n else {\n this.ns = window.PyViz;\n this.ns.comm_manager.register_target(this.plot_id, this.comm_id, (msg) => {\n for (const view of this.ns.shared_views.get(this.plot_id)) {\n if (view !== this)\n view.msg_handler(msg);\n }\n try {\n this.msg_handler(msg);\n }\n catch (e) {\n console.error(e);\n }\n });\n this._client_comm = this.ns.comm_manager.get_client_comm(this.plot_id, this.client_comm_id, (msg) => this.on_ack(msg));\n if (this.ns.shared_views == null)\n this.ns.shared_views = new Map();\n if (this.ns.shared_views.has(this.plot_id))\n this.ns.shared_views.get(this.plot_id).push(this);\n else\n this.ns.shared_views.set(this.plot_id, [this]);\n }\n }\n _doc_attached() {\n super._doc_attached();\n if (this.document != null)\n this.document.on_change(this._document_listener);\n }\n _document_changed(event) {\n // Filter out changes to attributes that aren't server-visible\n if (event instanceof document_1.ModelChangedEvent && !event.model.properties[event.attr].syncable)\n return;\n this._event_buffer.push(event);\n if (!exports.comm_settings.debounce) {\n this.process_events();\n }\n else if ((!this._blocked || (Date.now() > this._timeout))) {\n setTimeout(() => this.process_events(), this.debounce);\n this._blocked = true;\n this._timeout = Date.now() + this.timeout;\n }\n }\n _extract_buffers(value, buffers) {\n let extracted;\n if (value instanceof Array) {\n extracted = [];\n for (const val of value)\n extracted.push(this._extract_buffers(val, buffers));\n }\n else if (value instanceof Object) {\n extracted = {};\n for (const key in value) {\n if (key === 'buffer' && value[key] instanceof ArrayBuffer) {\n const id = Object.keys(buffers).length;\n extracted = { id };\n buffers.push(value[key]);\n break;\n }\n extracted[key] = this._extract_buffers(value[key], buffers);\n }\n }\n else {\n extracted = value;\n }\n return extracted;\n }\n process_events() {\n if ((this.document == null) || (this._client_comm == null))\n return;\n const patch = this.document.create_json_patch(this._event_buffer);\n this._event_buffer = [];\n const message = Object.assign({}, message_1.Message.create('PATCH-DOC', {}, patch));\n const buffers = [];\n message.content = this._extract_buffers(message.content, buffers);\n this._client_comm.send(message, {}, buffers);\n for (const view of this.ns.shared_views.get(this.plot_id)) {\n if (view !== this && view.document != null)\n view.document.apply_json_patch(patch, [], this.id);\n }\n }\n disconnect_signals() {\n super.disconnect_signals();\n this.ns.shared_views.shared_views.delete(this.plot_id);\n }\n on_ack(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n const metadata = msg.metadata;\n if (this._event_buffer.length) {\n this._blocked = true;\n this._timeout = Date.now() + this.timeout;\n this.process_events();\n }\n else\n this._blocked = false;\n if ((metadata.msg_type == \"Ready\") && metadata.content)\n console.log(\"Python callback returned following output:\", metadata.content);\n else if (metadata.msg_type == \"Error\")\n console.log(\"Python failed with the following traceback:\", metadata.traceback);\n }\n msg_handler(msg) {\n const metadata = msg.metadata;\n const buffers = msg.buffers;\n const content = msg.content.data;\n const plot_id = this.plot_id;\n if ((metadata.msg_type == \"Ready\")) {\n if (metadata.content)\n console.log(\"Python callback returned following output:\", metadata.content);\n else if (metadata.msg_type == \"Error\")\n console.log(\"Python failed with the following traceback:\", metadata.traceback);\n }\n else if (plot_id != null) {\n let plot = null;\n if ((plot_id in this.ns.plot_index) && (this.ns.plot_index[plot_id] != null))\n plot = this.ns.plot_index[plot_id];\n else if ((window.Bokeh !== undefined) && (plot_id in window.Bokeh.index))\n plot = window.Bokeh.index[plot_id];\n if (plot == null)\n return;\n if (content.length)\n this._receiver.consume(content);\n else if ((buffers != undefined) && (buffers.length > 0))\n this._receiver.consume(buffers[0].buffer);\n else\n return;\n const comm_msg = this._receiver.message;\n if ((comm_msg != null) && (Object.keys(comm_msg.content).length > 0) && this.document != null) {\n const patch = comm_msg.content;\n this.document.apply_json_patch(patch, comm_msg.buffers);\n }\n }\n }\n }\n exports.CommManager = CommManager;\n _a = CommManager;\n CommManager.__name__ = \"CommManager\";\n CommManager.__module__ = \"panel.models.comm_manager\";\n (() => {\n _a.prototype.default_view = CommManagerView;\n _a.define(({ Int, String, Nullable }) => ({\n plot_id: [Nullable(String), null],\n comm_id: [Nullable(String), null],\n client_comm_id: [Nullable(String), null],\n timeout: [Int, 5000],\n debounce: [Int, 50],\n }));\n })();\n}\n","/* models/customselect.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const selectbox_1 = require(\"@bokehjs/models/widgets/selectbox\");\n class CustomSelectView extends selectbox_1.SelectView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.disabled_options.change, () => this._update_disabled_options());\n }\n options_el() {\n let opts = super.options_el();\n opts.forEach((element) => {\n if (this.model.disabled_options.includes(element.value)) {\n element.setAttribute('disabled', 'true');\n }\n });\n return opts;\n }\n _update_disabled_options() {\n for (const element of this.input_el.options) {\n if (this.model.disabled_options.includes(element.value)) {\n element.setAttribute('disabled', 'true');\n }\n else {\n element.removeAttribute('disabled');\n }\n }\n }\n }\n exports.CustomSelectView = CustomSelectView;\n CustomSelectView.__name__ = \"CustomSelectView\";\n class CustomSelect extends selectbox_1.Select {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.CustomSelect = CustomSelect;\n _a = CustomSelect;\n CustomSelect.__name__ = \"CustomSelect\";\n CustomSelect.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = CustomSelectView;\n _a.define(({ Array, String }) => {\n return {\n disabled_options: [Array(String), []],\n };\n });\n })();\n}\n","/* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b, _c, _d;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_2 = require(\"@bokehjs/core/dom\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const tables_1 = require(\"@bokehjs/models/widgets/tables\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const comm_manager_1 = require(\"eca6f2cacb\") /* ./comm_manager */;\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class TableEditEvent extends bokeh_events_1.ModelEvent {\n constructor(column, row, pre) {\n super();\n this.column = column;\n this.row = row;\n this.pre = pre;\n }\n get event_values() {\n return { model: this.origin, column: this.column, row: this.row, pre: this.pre };\n }\n }\n exports.TableEditEvent = TableEditEvent;\n _a = TableEditEvent;\n TableEditEvent.__name__ = \"TableEditEvent\";\n (() => {\n _a.prototype.event_name = \"table-edit\";\n })();\n class CellClickEvent extends bokeh_events_1.ModelEvent {\n constructor(column, row) {\n super();\n this.column = column;\n this.row = row;\n }\n get event_values() {\n return { model: this.origin, column: this.column, row: this.row };\n }\n }\n exports.CellClickEvent = CellClickEvent;\n _b = CellClickEvent;\n CellClickEvent.__name__ = \"CellClickEvent\";\n (() => {\n _b.prototype.event_name = \"cell-click\";\n })();\n class SelectionEvent extends bokeh_events_1.ModelEvent {\n constructor(indices, selected) {\n super();\n this.indices = indices;\n this.selected = selected;\n }\n get event_values() {\n return { model: this.origin, indices: this.indices, selected: this.selected };\n }\n }\n exports.SelectionEvent = SelectionEvent;\n _c = SelectionEvent;\n SelectionEvent.__name__ = \"SelectionEvent\";\n (() => {\n _c.prototype.event_name = \"selection-change\";\n })();\n function find_group(key, value, records) {\n for (const record of records) {\n if (record[key] == value)\n return record;\n }\n return null;\n }\n function summarize(grouped, columns, aggregators, depth = 0) {\n const summary = {};\n if (grouped.length == 0)\n return summary;\n const agg = aggregators[depth];\n for (const group of grouped) {\n const subsummary = summarize(group._children, columns, aggregators, depth + 1);\n for (const col in subsummary) {\n if ((0, types_1.isArray)(subsummary[col]))\n group[col] = subsummary[col].reduce((a, b) => a + b, 0) / subsummary[col].length;\n else\n group[col] = subsummary[col];\n }\n for (const column of columns.slice(1)) {\n const val = group[column.field];\n if (column.field in summary) {\n const old_val = summary[column.field];\n if (agg === 'min')\n summary[column.field] = Math.min(val, old_val);\n else if (agg === 'max')\n summary[column.field] = Math.max(val, old_val);\n else if (agg === 'sum')\n summary[column.field] = val + old_val;\n else if (agg === 'mean') {\n if ((0, types_1.isArray)(summary[column.field]))\n summary[column.field].push(val);\n else\n summary[column.field] = [old_val, val];\n }\n }\n else\n summary[column.field] = val;\n }\n }\n return summary;\n }\n function group_data(records, columns, indexes, aggregators) {\n const grouped = [];\n const index_field = columns[0].field;\n for (const record of records) {\n const value = record[indexes[0]];\n let group = find_group(index_field, value, grouped);\n if (group == null) {\n group = { _children: [] };\n group[index_field] = value;\n grouped.push(group);\n }\n let subgroup = group;\n const groups = {};\n for (const index of indexes.slice(1)) {\n subgroup = find_group(index_field, record[index], subgroup._children);\n if (subgroup == null) {\n subgroup = { _children: [] };\n subgroup[index_field] = record[index];\n group._children.push(subgroup);\n }\n groups[index] = group;\n for (const column of columns.slice(1))\n subgroup[column.field] = record[column];\n group = subgroup;\n }\n for (const column of columns.slice(1))\n subgroup[column.field] = record[column.field];\n }\n const aggs = [];\n for (const index of indexes)\n aggs.push((index in aggregators) ? aggregators[index] : 'sum');\n summarize(grouped, columns, aggs);\n return grouped;\n }\n const timestampSorter = function (a, b, _aRow, _bRow, _column, _dir, _params) {\n // Bokeh serializes datetime objects as UNIX timestamps.\n //a, b - the two values being compared\n //aRow, bRow - the row components for the values being compared (useful if you need to access additional fields in the row data for the sort)\n //column - the column component for the column being sorted\n //dir - the direction of the sort (\"asc\" or \"desc\")\n //sorterParams - sorterParams object from column definition array\n // Added an _ in front of some parameters as they're unused and the Typescript compiler was complaining about it.\n // const alignEmptyValues = params.alignEmptyValues\n let emptyAlign;\n emptyAlign = 0;\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n // NaN values are serialized to -9223372036854776 by Bokeh\n if (String(a) == '-9223372036854776') {\n a = window.luxon.DateTime.fromISO('invalid');\n }\n else {\n a = window.luxon.DateTime.fromMillis(a, opts);\n }\n if (String(b) == '-9223372036854776') {\n b = window.luxon.DateTime.fromISO('invalid');\n }\n else {\n b = window.luxon.DateTime.fromMillis(b, opts);\n }\n if (!a.isValid) {\n emptyAlign = !b.isValid ? 0 : -1;\n }\n else if (!b.isValid) {\n emptyAlign = 1;\n }\n else {\n //compare valid values\n return a - b;\n }\n // Invalid (e.g. NaN) always at the bottom\n emptyAlign *= -1;\n return emptyAlign;\n };\n const dateEditor = function (cell, onRendered, success, cancel) {\n //cell - the cell component for the editable cell\n //onRendered - function to call when the editor has been rendered\n //success - function to call to pass the successfully updated value to Tabulator\n //cancel - function to call to abort the edit and return to a normal cell\n //create and style input\n const rawValue = cell.getValue();\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n let cellValue;\n if (rawValue === 'NaN' || rawValue === null)\n cellValue = null;\n else\n cellValue = window.luxon.DateTime.fromMillis(rawValue, opts).toFormat(\"yyyy-MM-dd\");\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"date\");\n input.style.padding = \"4px\";\n input.style.width = \"100%\";\n input.style.boxSizing = \"border-box\";\n input.value = cellValue;\n onRendered(() => {\n input.focus();\n input.style.height = \"100%\";\n });\n function onChange() {\n const new_val = window.luxon.DateTime.fromFormat(input.value, \"yyyy-MM-dd\", opts).toMillis();\n if (new_val != cellValue)\n success(new_val);\n else\n cancel();\n }\n //submit new value on blur or change\n input.addEventListener(\"blur\", onChange);\n //submit new value on enter\n input.addEventListener(\"keydown\", (e) => {\n if (e.key == \"Enter\")\n setTimeout(onChange, 100);\n if (e.key == \"Escape\")\n setTimeout(cancel, 100);\n });\n return input;\n };\n const datetimeEditor = function (cell, onRendered, success, cancel) {\n //cell - the cell component for the editable cell\n //onRendered - function to call when the editor has been rendered\n //success - function to call to pass the successfully updated value to Tabulator\n //cancel - function to call to abort the edit and return to a normal cell\n //create and style input\n const rawValue = cell.getValue();\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n let cellValue;\n if (rawValue === 'NaN' || rawValue === null)\n cellValue = null;\n else\n cellValue = window.luxon.DateTime.fromMillis(rawValue, opts).toFormat(\"yyyy-MM-dd'T'T\");\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"datetime-local\");\n input.style.padding = \"4px\";\n input.style.width = \"100%\";\n input.style.boxSizing = \"border-box\";\n input.value = cellValue;\n onRendered(() => {\n input.focus();\n input.style.height = \"100%\";\n });\n function onChange() {\n const new_val = window.luxon.DateTime.fromFormat(input.value, \"yyyy-MM-dd'T'T\", opts).toMillis();\n if (new_val != cellValue)\n success(new_val);\n else\n cancel();\n }\n //submit new value on blur or change\n input.addEventListener(\"blur\", onChange);\n //submit new value on enter\n input.addEventListener(\"keydown\", (e) => {\n if (e.key == \"Enter\")\n setTimeout(onChange, 100);\n if (e.key == \"Escape\")\n setTimeout(cancel, 100);\n });\n return input;\n };\n class DataTabulatorView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.columns = new Map();\n this._tabulator_cell_updating = false;\n this._updating_page = false;\n this._updating_sort = false;\n this._selection_updating = false;\n this._lastVerticalScrollbarTopPosition = 0;\n this._applied_styles = false;\n this._building = false;\n }\n connect_signals() {\n super.connect_signals();\n const p = this.model.properties;\n const { configuration, layout, columns, groupby } = p;\n this.on_change([configuration, layout, groupby], (0, debounce_1.debounce)(() => {\n this.invalidate_render();\n }, 20, false));\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.tabulator.element.style.visibility = 'visible';\n });\n this.on_change([columns], () => {\n this.tabulator.setColumns(this.getColumns());\n this.setHidden();\n });\n this.connect(p.download.change, () => {\n const ftype = this.model.filename.endsWith('.json') ? \"json\" : \"csv\";\n this.tabulator.download(ftype, this.model.filename);\n });\n this.connect(p.children.change, () => this.renderChildren());\n this.connect(p.expanded.change, () => {\n // The first cell is the cell of the frozen _index column.\n for (const row of this.tabulator.rowManager.getRows()) {\n if (row.cells.length > 0)\n row.cells[0].layoutElement();\n }\n // Make sure the expand icon is changed when expanded is\n // changed from Python.\n for (const row of this.tabulator.rowManager.getRows()) {\n if (row.cells.length > 0) {\n const index = row.data._index;\n const icon = this.model.expanded.indexOf(index) < 0 ? \"►\" : \"▼\";\n row.cells[1].element.innerText = icon;\n }\n }\n });\n this.connect(p.cell_styles.change, () => {\n if (this._applied_styles)\n this.tabulator.redraw(true);\n this.setStyles();\n });\n this.connect(p.hidden_columns.change, () => {\n this.setHidden();\n this.tabulator.redraw(true);\n });\n this.connect(p.page_size.change, () => this.setPageSize());\n this.connect(p.page.change, () => {\n if (!this._updating_page)\n this.setPage();\n });\n this.connect(p.visible.change, () => this.setVisibility());\n this.connect(p.max_page.change, () => this.setMaxPage());\n this.connect(p.frozen_rows.change, () => this.setFrozen());\n this.connect(p.sorters.change, () => this.setSorters());\n this.connect(p.theme_classes.change, () => this.setCSSClasses(this.tabulator.element));\n this.connect(this.model.source.properties.data.change, () => {\n this._selection_updating = true;\n this.setData();\n this._selection_updating = false;\n this.postUpdate();\n });\n this.connect(this.model.source.streaming, () => this.addData());\n this.connect(this.model.source.patching, () => {\n const inds = this.model.source.selected.indices;\n this.updateOrAddData();\n this.tabulator.rowManager.element.scrollTop = this._lastVerticalScrollbarTopPosition;\n // Restore indices since updating data may have reset checkbox column\n this.model.source.selected.indices = inds;\n });\n this.connect(this.model.source.selected.change, () => this.setSelection());\n this.connect(this.model.source.selected.properties.indices.change, () => this.setSelection());\n }\n get groupBy() {\n const groupby = (data) => {\n const groups = [];\n for (const g of this.model.groupby) {\n const group = g + ': ' + data[g];\n groups.push(group);\n }\n return groups.join(', ');\n };\n return this.model.groupby.length ? groupby : false;\n }\n get sorters() {\n const sorters = [];\n if (this.model.sorters.length)\n sorters.push({ column: '_index', dir: 'asc' });\n for (const sort of this.model.sorters.reverse()) {\n if (sort.column === undefined)\n sort.column = sort.field;\n sorters.push(sort);\n }\n return sorters;\n }\n invalidate_render() {\n this.tabulator.destroy();\n this.tabulator = null;\n this.render();\n }\n redraw() {\n if (this._building)\n return;\n if (this.tabulator.columnManager.element != null) {\n this.tabulator.columnManager.redraw(true);\n }\n if (this.tabulator.rowManager.renderer != null) {\n this.tabulator.rowManager.redraw(true);\n this.renderChildren();\n this.setStyles();\n }\n }\n after_layout() {\n super.after_layout();\n if (this.tabulator != null && this._initializing)\n this.redraw();\n this._initializing = false;\n }\n setCSSClasses(el) {\n el.className = \"pnx-tabulator tabulator\";\n for (const cls of this.model.theme_classes)\n el.classList.add(cls);\n }\n render() {\n if (this.tabulator != null)\n this.tabulator.destroy();\n super.render();\n this._initializing = true;\n const container = (0, dom_2.div)({ style: \"display: contents;\" });\n const el = (0, dom_2.div)({ style: \"width: 100%; height: 100%; visibility: hidden;\" });\n this.setCSSClasses(el);\n container.appendChild(el);\n this.shadow_el.appendChild(container);\n let configuration = this.getConfiguration();\n this.tabulator = new Tabulator(el, configuration);\n this.watch_stylesheets();\n this.init_callbacks();\n }\n style_redraw() {\n if (this.model.visible)\n this.tabulator.element.style.visibility = 'visible';\n if (!this._initializing && !this._building)\n this.redraw();\n }\n tableInit() {\n this._building = true;\n // Patch the ajax request and page data parsing methods\n const ajax = this.tabulator.modules.ajax;\n ajax.sendRequest = (_url, params, _config) => {\n return this.requestPage(params.page, params.sort);\n };\n this.tabulator.modules.page._parseRemoteData = () => {\n return false;\n };\n }\n init_callbacks() {\n // Initialization\n this.tabulator.on(\"tableBuilding\", () => this.tableInit());\n this.tabulator.on(\"tableBuilt\", () => this.tableBuilt());\n // Rendering callbacks\n this.tabulator.on(\"selectableCheck\", (row) => {\n const selectable = this.model.selectable_rows;\n return (selectable == null) || selectable.includes(row._row.data._index);\n });\n this.tabulator.on(\"tooltips\", (cell) => {\n return cell.getColumn().getField() + \": \" + cell.getValue();\n });\n this.tabulator.on(\"scrollVertical\", (0, debounce_1.debounce)(() => {\n this.setStyles();\n }, 50, false));\n // Sync state with model\n this.tabulator.on(\"rowSelectionChanged\", (data, rows, selected, deselected) => this.rowSelectionChanged(data, rows, selected, deselected));\n this.tabulator.on(\"rowClick\", (e, row) => this.rowClicked(e, row));\n this.tabulator.on(\"cellEdited\", (cell) => this.cellEdited(cell));\n this.tabulator.on(\"dataFiltering\", (filters) => {\n this.model.filters = filters;\n });\n this.tabulator.on(\"dataFiltered\", (_, rows) => {\n if (this._building)\n return;\n // Ensure that after filtering empty scroll renders\n if (rows.length === 0)\n this.tabulator.rowManager.renderEmptyScroll();\n // Ensure that after filtering the page is updated\n this.updatePage(this.tabulator.getPage());\n });\n this.tabulator.on(\"pageLoaded\", (pageno) => {\n this.updatePage(pageno);\n });\n this.tabulator.on(\"renderComplete\", () => {\n if (this._building)\n return;\n this.postUpdate();\n });\n this.tabulator.on(\"dataSorting\", (sorters) => {\n const sorts = [];\n for (const s of sorters) {\n if (s.field !== '_index')\n sorts.push({ field: s.field, dir: s.dir });\n }\n if (this.model.pagination !== 'remote') {\n this._updating_sort = true;\n this.model.sorters = sorts;\n this._updating_sort = false;\n }\n });\n }\n tableBuilt() {\n this._building = false;\n this.setSelection();\n this.renderChildren();\n this.setStyles();\n if (this.model.pagination) {\n this.setMaxPage();\n this.tabulator.setPage(this.model.page);\n }\n }\n requestPage(page, sorters) {\n return new Promise((resolve, reject) => {\n try {\n if (page != null && sorters != null) {\n this._updating_sort = true;\n const sorts = [];\n for (const s of sorters) {\n if (s.field !== '_index')\n sorts.push({ field: s.field, dir: s.dir });\n }\n this.model.sorters = sorts;\n this._updating_sort = false;\n this._updating_page = true;\n try {\n this.model.page = page || 1;\n }\n finally {\n this._updating_page = false;\n }\n }\n resolve([]);\n }\n catch (err) {\n reject(err);\n }\n });\n }\n getLayout() {\n let layout = this.model.layout;\n switch (layout) {\n case \"fit_data\":\n return \"fitData\";\n case \"fit_data_fill\":\n return \"fitDataFill\";\n case \"fit_data_stretch\":\n return \"fitDataStretch\";\n case \"fit_data_table\":\n return \"fitDataTable\";\n case \"fit_columns\":\n return \"fitColumns\";\n }\n }\n getConfiguration() {\n // Only use selectable mode if explicitly requested otherwise manually handle selections\n let selectable = this.model.select_mode === 'toggle' ? true : NaN;\n let configuration = Object.assign(Object.assign({}, this.model.configuration), { index: \"_index\", nestedFieldSeparator: false, movableColumns: false, selectable: selectable, columns: this.getColumns(), initialSort: this.sorters, layout: this.getLayout(), pagination: this.model.pagination != null, paginationMode: this.model.pagination, paginationSize: this.model.page_size, paginationInitialPage: 1, groupBy: this.groupBy, rowFormatter: (row) => this._render_row(row), frozenRows: (row) => {\n return this.model.frozen_rows.length ? this.model.frozen_rows.includes(row._row.data._index) : false;\n } });\n if (this.model.pagination === \"remote\") {\n configuration['ajaxURL'] = \"http://panel.pyviz.org\";\n configuration['sortMode'] = \"remote\";\n }\n const cds = this.model.source;\n let data;\n if (cds === null || (cds.columns().length === 0))\n data = [];\n else\n data = (0, data_1.transform_cds_to_records)(cds, true);\n if (configuration.dataTree)\n data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);\n return Object.assign(Object.assign({}, configuration), { \"data\": data });\n }\n get child_models() {\n var _e, _f;\n const children = [];\n for (const idx of this.model.expanded) {\n const child = (_f = (_e = this.model.children).get) === null || _f === void 0 ? void 0 : _f.call(_e, idx);\n if (child != null)\n children.push(child);\n }\n return children;\n }\n renderChildren() {\n new Promise(async (resolve) => {\n await this.build_child_views();\n resolve(null);\n }).then(() => {\n for (const r of this.model.expanded) {\n const row = this.tabulator.getRow(r);\n this._render_row(row, false);\n }\n this._update_children();\n if (this.tabulator.rowManager.renderer != null)\n this.tabulator.rowManager.adjustTableSize();\n this.invalidate_layout();\n });\n }\n _render_row(row, resize = true) {\n var _e;\n const index = (_e = row._row) === null || _e === void 0 ? void 0 : _e.data._index;\n if (!this.model.expanded.includes(index) || this.model.children.get(index) == null)\n return;\n const model = this.model.children.get(index);\n const view = model == null ? null : this._child_views.get(model);\n if (view == null)\n return;\n const rowEl = row.getElement();\n const style = getComputedStyle(this.tabulator.element.children[1].children[0]);\n const bg = style.backgroundColor;\n const neg_margin = rowEl.style.paddingLeft ? \"-\" + rowEl.style.paddingLeft : '0';\n const viewEl = (0, dom_2.div)({ style: \"background-color: \" + bg + \"; margin-left:\" + neg_margin + \"; max-width: 100%; overflow-x: hidden;\" });\n viewEl.appendChild(view.el);\n rowEl.appendChild(viewEl);\n if (!view.has_finished()) {\n view.render();\n view.after_render();\n }\n if (resize) {\n this._update_children();\n this.tabulator.rowManager.adjustTableSize();\n this.invalidate_layout();\n }\n }\n _expand_render(cell) {\n const index = cell._cell.row.data._index;\n const icon = this.model.expanded.indexOf(index) < 0 ? \"►\" : \"▼\";\n return \"<i>\" + icon + \"</i>\";\n }\n _update_expand(cell) {\n var _e, _f, _g, _h;\n const index = cell._cell.row.data._index;\n const expanded = [...this.model.expanded];\n const exp_index = expanded.indexOf(index);\n if (exp_index < 0)\n expanded.push(index);\n else {\n const removed = expanded.splice(exp_index, 1)[0];\n const model = (_f = (_e = this.model.children).get) === null || _f === void 0 ? void 0 : _f.call(_e, removed);\n if (model != null) {\n const view = this._child_views.get(model);\n if (view !== undefined && view.el != null)\n (0, dom_1.undisplay)(view.el);\n }\n }\n this.model.expanded = expanded;\n if (expanded.indexOf(index) < 0)\n return;\n let ready = true;\n for (const idx of this.model.expanded) {\n if (((_h = (_g = this.model.children).get) === null || _h === void 0 ? void 0 : _h.call(_g, idx)) == null) {\n ready = false;\n break;\n }\n }\n if (ready)\n this.renderChildren();\n }\n getData() {\n let data = (0, data_1.transform_cds_to_records)(this.model.source, true);\n if (this.model.configuration.dataTree)\n data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);\n return data;\n }\n getColumns() {\n var _e;\n this.columns = new Map();\n const config_columns = (_e = this.model.configuration) === null || _e === void 0 ? void 0 : _e.columns;\n let columns = [];\n columns.push({ field: '_index', frozen: true, visible: false });\n if (config_columns != null) {\n for (const column of config_columns)\n if (column.columns != null) {\n const group_columns = [];\n for (const col of column.columns)\n group_columns.push(Object.assign({}, col));\n columns.push(Object.assign(Object.assign({}, column), { columns: group_columns }));\n }\n else if (column.formatter === \"expand\") {\n const expand = {\n hozAlign: \"center\",\n cellClick: (_, cell) => { this._update_expand(cell); },\n formatter: (cell) => { return this._expand_render(cell); },\n width: 40,\n frozen: true\n };\n columns.push(expand);\n }\n else {\n const new_column = Object.assign({}, column);\n if (new_column.formatter === \"rowSelection\") {\n new_column.cellClick = (_, cell) => {\n cell.getRow().toggleSelect();\n };\n }\n columns.push(new_column);\n }\n }\n for (const column of this.model.columns) {\n let tab_column = null;\n if (config_columns != null) {\n for (const col of columns) {\n if (col.columns != null) {\n for (const c of col.columns) {\n if (column.field === c.field) {\n tab_column = c;\n break;\n }\n }\n if (tab_column != null)\n break;\n }\n else if (column.field === col.field) {\n tab_column = col;\n break;\n }\n }\n }\n if (tab_column == null)\n tab_column = { field: column.field };\n this.columns.set(column.field, tab_column);\n if (tab_column.title == null)\n tab_column.title = column.title;\n if (tab_column.width == null && column.width != null && column.width != 0)\n tab_column.width = column.width;\n if (tab_column.formatter == null && column.formatter != null) {\n const formatter = column.formatter;\n const ftype = formatter.type;\n if (ftype === \"BooleanFormatter\")\n tab_column.formatter = \"tickCross\";\n else {\n tab_column.formatter = (cell) => {\n const formatted = column.formatter.doFormat(cell.getRow(), cell, cell.getValue(), null, null);\n if (column.formatter.type === 'HTMLTemplateFormatter')\n return formatted;\n const node = (0, dom_2.div)();\n node.innerHTML = formatted;\n const child = node.children[0];\n if (child.innerHTML === \"function(){return c.convert(arguments)}\") // If the formatter fails\n return '';\n return child;\n };\n }\n }\n if (tab_column.sorter == 'timestamp') {\n tab_column.sorter = timestampSorter;\n }\n if (tab_column.sorter === undefined) {\n tab_column.sorter = \"string\";\n }\n const editor = column.editor;\n const ctype = editor.type;\n if (tab_column.editor != null) {\n if (tab_column.editor === 'date') {\n tab_column.editor = dateEditor;\n }\n else if (tab_column.editor === 'datetime') {\n tab_column.editor = datetimeEditor;\n }\n }\n else if (ctype === \"StringEditor\") {\n if (editor.completions.length > 0) {\n tab_column.editor = \"list\";\n tab_column.editorParams = { values: editor.completions, autocomplete: true, listOnEmpty: true };\n }\n else\n tab_column.editor = \"input\";\n }\n else if (ctype === \"TextEditor\")\n tab_column.editor = \"textarea\";\n else if (ctype === \"IntEditor\" || ctype === \"NumberEditor\") {\n tab_column.editor = \"number\";\n tab_column.editorParams = { step: editor.step };\n if (ctype === \"IntEditor\")\n tab_column.validator = \"integer\";\n else\n tab_column.validator = \"numeric\";\n }\n else if (ctype === \"CheckboxEditor\") {\n tab_column.editor = \"tickCross\";\n }\n else if (ctype === \"DateEditor\") {\n tab_column.editor = dateEditor;\n }\n else if (ctype === \"SelectEditor\") {\n tab_column.editor = \"list\";\n tab_column.editorParams = { values: editor.options };\n }\n else if (editor != null && editor.default_view != null) {\n tab_column.editor = (cell, onRendered, success, cancel) => {\n this.renderEditor(column, cell, onRendered, success, cancel);\n };\n }\n tab_column.visible = (tab_column.visible != false && !this.model.hidden_columns.includes(column.field));\n tab_column.editable = () => (this.model.editable && (editor.default_view != null));\n if (tab_column.headerFilter) {\n if ((typeof tab_column.headerFilter) === 'boolean' &&\n (typeof tab_column.editor) === 'string') {\n tab_column.headerFilter = tab_column.editor;\n tab_column.headerFilterParams = tab_column.editorParams;\n }\n }\n for (const sort of this.model.sorters) {\n if (tab_column.field === sort.field)\n tab_column.headerSortStartingDir = sort.dir;\n }\n tab_column.cellClick = (_, cell) => {\n const index = cell.getData()._index;\n const event = new CellClickEvent(column.field, index);\n this.model.trigger_event(event);\n };\n if (config_columns == null)\n columns.push(tab_column);\n }\n for (const col in this.model.buttons) {\n const button_formatter = () => {\n return this.model.buttons[col];\n };\n const button_column = {\n formatter: button_formatter,\n hozAlign: \"center\",\n cellClick: (_, cell) => {\n const index = cell.getData()._index;\n const event = new CellClickEvent(col, index);\n this.model.trigger_event(event);\n }\n };\n columns.push(button_column);\n }\n return columns;\n }\n renderEditor(column, cell, onRendered, success, cancel) {\n const editor = column.editor;\n const view = new editor.default_view({ column: column, model: editor, parent: this, container: cell._cell.element });\n view.initialize();\n view.connect_signals();\n onRendered(() => {\n view.setValue(cell.getValue());\n });\n view.inputEl.addEventListener('input', () => {\n const value = view.serializeValue();\n const old_value = cell.getValue();\n const validation = view.validate();\n if (!validation.valid)\n cancel(validation.msg);\n if (old_value != null && typeof value != typeof old_value)\n cancel(\"Mismatching type\");\n else\n success(view.serializeValue());\n });\n return view.inputEl;\n }\n // Update table\n setData() {\n if (this._initializing || this._building || !this.tabulator.initialized)\n return;\n const data = this.getData();\n if (this.model.pagination != null)\n this.tabulator.rowManager.setData(data, true, false);\n else\n this.tabulator.setData(data);\n }\n addData() {\n const rows = this.tabulator.rowManager.getRows();\n const last_row = rows[rows.length - 1];\n const start = ((last_row === null || last_row === void 0 ? void 0 : last_row.data._index) || 0);\n this.setData();\n if (this.model.follow && last_row)\n this.tabulator.scrollToRow(start, \"top\", false);\n }\n postUpdate() {\n this.setSelection();\n this.setStyles();\n }\n updateOrAddData() {\n // To avoid double updating the tabulator data\n if (this._tabulator_cell_updating)\n return;\n // Temporarily set minHeight to avoid \"scroll-to-top\" issues caused\n // by Tabulator JS entirely destroying the table when .setData is called.\n // Inspired by https://github.com/olifolkerd/tabulator/issues/4155\n const prev_minheight = this.tabulator.element.style.minHeight;\n this.tabulator.element.style.minHeight = this.tabulator.element.offsetHeight + \"px\";\n let data = (0, data_1.transform_cds_to_records)(this.model.source, true);\n this.tabulator.setData(data).then(() => {\n this.tabulator.element.style.minHeight = prev_minheight;\n });\n }\n setFrozen() {\n for (const row of this.model.frozen_rows) {\n this.tabulator.getRow(row).freeze();\n }\n }\n setVisibility() {\n if (this.tabulator == null)\n return;\n this.tabulator.element.style.visibility = this.model.visible ? 'visible' : 'hidden';\n }\n updatePage(pageno) {\n if (this.model.pagination === 'local' && this.model.page !== pageno) {\n this._updating_page = true;\n this.model.page = pageno;\n this._updating_page = false;\n this.setStyles();\n }\n }\n setGroupBy() {\n this.tabulator.setGroupBy(this.groupBy);\n }\n setSorters() {\n if (this._updating_sort)\n return;\n this.tabulator.setSort(this.sorters);\n }\n setStyles() {\n const style_data = this.model.cell_styles.data;\n if (this.tabulator == null || this.tabulator.getDataCount() == 0 || style_data == null || !style_data.size)\n return;\n this._applied_styles = false;\n for (const r of style_data.keys()) {\n const row_style = style_data.get(r);\n const row = this.tabulator.getRow(r);\n if (!row)\n continue;\n const cells = row._row.cells;\n for (const c of row_style.keys()) {\n const style = row_style.get(c);\n const cell = cells[c];\n if (cell == null || !style.length)\n continue;\n const element = cell.element;\n for (const s of style) {\n let prop, value;\n if ((0, types_1.isArray)(s))\n [prop, value] = s;\n else if (!s.includes(':'))\n continue;\n else\n [prop, value] = s.split(':');\n element.style.setProperty(prop, value.trimLeft());\n this._applied_styles = true;\n }\n }\n }\n }\n setHidden() {\n for (const column of this.tabulator.getColumns()) {\n const col = column._column;\n if ((col.field == '_index') || this.model.hidden_columns.includes(col.field))\n column.hide();\n else\n column.show();\n }\n }\n setMaxPage() {\n this.tabulator.setMaxPage(this.model.max_page);\n if (this.tabulator.modules.page.pagesElement)\n this.tabulator.modules.page._setPageButtons();\n }\n setPage() {\n this.tabulator.setPage(Math.min(this.model.max_page, this.model.page));\n if (this.model.pagination === \"local\") {\n this.renderChildren();\n this.setStyles();\n }\n }\n setPageSize() {\n this.tabulator.setPageSize(this.model.page_size);\n if (this.model.pagination === \"local\") {\n this.renderChildren();\n this.setStyles();\n }\n }\n setSelection() {\n if (this.tabulator == null || this._initializing || this._selection_updating || !this.tabulator.initialized)\n return;\n const indices = this.model.source.selected.indices;\n const current_indices = this.tabulator.getSelectedData().map((row) => row._index);\n if (JSON.stringify(indices) == JSON.stringify(current_indices))\n return;\n this._selection_updating = true;\n this.tabulator.deselectRow();\n this.tabulator.selectRow(indices);\n for (const index of indices) {\n const row = this.tabulator.rowManager.findRow(index);\n if (row)\n this.tabulator.scrollToRow(index, \"center\", false).catch(() => { });\n }\n this._selection_updating = false;\n }\n // Update model\n rowClicked(e, row) {\n var _e;\n if (this._selection_updating ||\n this._initializing ||\n (typeof this.model.select_mode) === 'string' ||\n this.model.select_mode === false || // selection disabled\n this.model.configuration.dataTree || // dataTree does not support selection\n ((_e = e.srcElement) === null || _e === void 0 ? void 0 : _e.innerText) === \"►\" // expand button\n )\n return;\n let indices = [];\n const selected = this.model.source.selected;\n const index = row._row.data._index;\n if (e.ctrlKey || e.metaKey) {\n indices = [...this.model.source.selected.indices];\n }\n else if (e.shiftKey && selected.indices.length) {\n const start = selected.indices[selected.indices.length - 1];\n if (index > start) {\n for (let i = start; i < index; i++)\n indices.push(i);\n }\n else {\n for (let i = start; i > index; i--)\n indices.push(i);\n }\n }\n if (indices.indexOf(index) < 0)\n indices.push(index);\n else\n indices.splice(indices.indexOf(index), 1);\n // Remove the first selected indices when selectable is an int.\n if (typeof this.model.select_mode === 'number') {\n while (indices.length > this.model.select_mode) {\n indices.shift();\n }\n }\n const filtered = this._filter_selected(indices);\n this.tabulator.deselectRow();\n this.tabulator.selectRow(filtered);\n this._selection_updating = true;\n selected.indices = filtered;\n this._selection_updating = false;\n }\n _filter_selected(indices) {\n const filtered = [];\n for (const ind of indices) {\n if (this.model.selectable_rows == null ||\n this.model.selectable_rows.indexOf(ind) >= 0)\n filtered.push(ind);\n }\n return filtered;\n }\n rowSelectionChanged(data, _row, selected, deselected) {\n if (this._selection_updating ||\n this._initializing ||\n (typeof this.model.select_mode) === 'boolean' ||\n (typeof this.model.select_mode) === 'number' ||\n this.model.configuration.dataTree)\n return;\n if (this.model.pagination === 'remote') {\n let selected_indices = selected.map((x) => x._row.data._index);\n let deselected_indices = deselected.map((x) => x._row.data._index);\n if (selected_indices.length > 0) {\n this._selection_updating = true;\n this.model.trigger_event(new SelectionEvent(selected_indices, selected = true));\n }\n if (deselected_indices.length > 0) {\n this._selection_updating = true;\n this.model.trigger_event(new SelectionEvent(deselected_indices, selected = false));\n }\n }\n else {\n const indices = data.map((row) => row._index);\n const filtered = this._filter_selected(indices);\n this._selection_updating = indices.length === filtered.length;\n this.model.source.selected.indices = filtered;\n }\n this._selection_updating = false;\n }\n cellEdited(cell) {\n const field = cell._cell.column.field;\n const column_def = this.columns.get(field);\n const index = cell.getData()._index;\n const value = cell._cell.value;\n if (column_def.validator === 'numeric' && value === '') {\n cell.setValue(NaN, true);\n return;\n }\n this._tabulator_cell_updating = true;\n comm_manager_1.comm_settings.debounce = false;\n this.model.trigger_event(new TableEditEvent(field, index, true));\n try {\n this.model.source.patch({ [field]: [[index, value]] });\n }\n finally {\n comm_manager_1.comm_settings.debounce = true;\n this._tabulator_cell_updating = false;\n }\n this.model.trigger_event(new TableEditEvent(field, index, false));\n this.tabulator.scrollToRow(index, \"top\", false);\n }\n }\n exports.DataTabulatorView = DataTabulatorView;\n DataTabulatorView.__name__ = \"DataTabulatorView\";\n exports.TableLayout = (0, kinds_1.Enum)(\"fit_data\", \"fit_data_fill\", \"fit_data_stretch\", \"fit_data_table\", \"fit_columns\");\n // The Bokeh .ts model corresponding to the Bokeh .py model\n class DataTabulator extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DataTabulator = DataTabulator;\n _d = DataTabulator;\n DataTabulator.__name__ = \"DataTabulator\";\n DataTabulator.__module__ = \"panel.models.tabulator\";\n (() => {\n _d.prototype.default_view = DataTabulatorView;\n _d.define(({ Any, Array, Boolean, Nullable, Number, Ref, String }) => ({\n aggregators: [Any, {}],\n buttons: [Any, {}],\n children: [Any, new Map()],\n configuration: [Any, {}],\n columns: [Array(Ref(tables_1.TableColumn)), []],\n download: [Boolean, false],\n editable: [Boolean, true],\n expanded: [Array(Number), []],\n filename: [String, \"table.csv\"],\n filters: [Array(Any), []],\n follow: [Boolean, true],\n frozen_rows: [Array(Number), []],\n groupby: [Array(String), []],\n hidden_columns: [Array(String), []],\n indexes: [Array(String), []],\n layout: [exports.TableLayout, \"fit_data\"],\n max_page: [Number, 0],\n pagination: [Nullable(String), null],\n page: [Number, 0],\n page_size: [Number, 0],\n select_mode: [Any, true],\n selectable_rows: [Nullable(Array(Number)), null],\n source: [Ref(column_data_source_1.ColumnDataSource)],\n sorters: [Array(Any), []],\n cell_styles: [Any, {}],\n theme_classes: [Array(String), []],\n }));\n })();\n}\n","/* debounce/index.js */ function _(require, module, exports, __esModule, __esExport) {\n /**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear'\n * that is a function which will clear the timer to prevent previously scheduled executions.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n function debounce(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n if (null == wait)\n wait = 100;\n function later() {\n var last = Date.now() - timestamp;\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n }\n else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n }\n ;\n var debounced = function () {\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout)\n timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n return result;\n };\n debounced.clear = function () {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n debounced.flush = function () {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n clearTimeout(timeout);\n timeout = null;\n }\n };\n return debounced;\n }\n ;\n // Adds compatibility for ES modules\n debounce.debounce = debounce;\n module.exports = debounce;\n}\n","/* models/data.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function transform_cds_to_records(cds, addId = false, start = 0) {\n const data = [];\n const columns = cds.columns();\n const cdsLength = cds.get_length();\n if (columns.length === 0 || cdsLength === null)\n return [];\n for (let i = start; i < cdsLength; i++) {\n const item = {};\n for (const column of columns) {\n let array = cds.get_array(column);\n const shape = (array[0] == null || array[0].shape == null) ? null : array[0].shape;\n if ((shape != null) && (shape.length > 1) && (typeof shape[0] == \"number\"))\n item[column] = array.slice(i * shape[1], i * shape[1] + shape[1]);\n else if (array.length != cdsLength && (array.length % cdsLength === 0)) {\n const offset = array.length / cdsLength;\n item[column] = array.slice(i * offset, i * offset + offset);\n }\n else\n item[column] = array[i];\n }\n if (addId)\n item['_index'] = i;\n data.push(item);\n }\n return data;\n }\n exports.transform_cds_to_records = transform_cds_to_records;\n function dict_to_records(data, index = true) {\n const records = [];\n for (let i = 0; i < data.index.length; i++) {\n const record = {};\n for (const col of data) {\n if (index || col !== \"index\")\n record[col] = data[col][i];\n }\n }\n return records;\n }\n exports.dict_to_records = dict_to_records;\n}\n","/* models/datetime_picker.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const flatpickr_1 = tslib_1.__importDefault(require(\"1156ddcec2\") /* flatpickr */);\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const inputs = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\"));\n const flatpickr_css_1 = tslib_1.__importDefault(require(\"@bokehjs/styles/widgets/flatpickr.css\"));\n function _convert_date_list(value) {\n const result = [];\n for (const item of value) {\n if ((0, types_1.isString)(item))\n result.push(item);\n else {\n const [from, to] = item;\n result.push({ from, to });\n }\n }\n return result;\n }\n class DatetimePickerView extends input_widget_1.InputWidgetView {\n connect_signals() {\n super.connect_signals();\n const { value, min_date, max_date, disabled_dates, enabled_dates, inline, enable_time, enable_seconds, military_time, date_format, mode } = this.model.properties;\n this.connect(value.change, () => { var _b; return this.model.value ? (_b = this._picker) === null || _b === void 0 ? void 0 : _b.setDate(this.model.value) : this._clear(); });\n this.connect(min_date.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"minDate\", this.model.min_date); });\n this.connect(max_date.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"maxDate\", this.model.max_date); });\n this.connect(disabled_dates.change, () => {\n var _b;\n const { disabled_dates } = this.model;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"disable\", disabled_dates != null ? _convert_date_list(disabled_dates) : []);\n });\n this.connect(enabled_dates.change, () => {\n var _b;\n const { enabled_dates } = this.model;\n if (enabled_dates != null) {\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enable\", _convert_date_list(enabled_dates));\n }\n else {\n // this reimplements `set()` for the `undefined` case\n if (this._picker) {\n this._picker.config._enable = undefined;\n this._picker.redraw();\n this._picker.updateValue(true);\n }\n }\n });\n this.connect(inline.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"inline\", this.model.inline); });\n this.connect(enable_time.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enableTime\", this.model.enable_time); });\n this.connect(enable_seconds.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enableSeconds\", this.model.enable_seconds); });\n this.connect(military_time.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"time_24hr\", this.model.military_time); });\n this.connect(mode.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"mode\", this.model.mode); });\n this.connect(date_format.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"dateFormat\", this.model.date_format); });\n }\n remove() {\n var _b;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.destroy();\n super.remove();\n }\n stylesheets() {\n return [...super.stylesheets(), flatpickr_css_1.default];\n }\n render() {\n if (this._picker != null)\n return;\n super.render();\n this.input_el = (0, dom_1.input)({ type: \"text\", class: inputs.input, disabled: this.model.disabled });\n this.group_el.appendChild(this.input_el);\n const options = {\n appendTo: this.group_el,\n positionElement: this.input_el,\n defaultDate: this.model.value,\n inline: this.model.inline,\n position: this._position.bind(this),\n enableTime: this.model.enable_time,\n enableSeconds: this.model.enable_seconds,\n time_24hr: this.model.military_time,\n dateFormat: this.model.date_format,\n mode: this.model.mode,\n onClose: (selected_dates, date_string, instance) => this._on_close(selected_dates, date_string, instance),\n };\n const { min_date, max_date, disabled_dates, enabled_dates } = this.model;\n if (min_date != null)\n options.minDate = min_date;\n if (max_date != null)\n options.maxDate = max_date;\n if (disabled_dates != null)\n options.disable = _convert_date_list(disabled_dates);\n if (enabled_dates != null)\n options.enable = _convert_date_list(enabled_dates);\n this._picker = (0, flatpickr_1.default)(this.input_el, options);\n this._picker.maxDateHasTime = true;\n this._picker.minDateHasTime = true;\n }\n _clear() {\n var _b;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.clear();\n this.model.value = null;\n }\n _on_close(_selected_dates, date_string, _instance) {\n if (this.model.mode == \"range\" && !date_string.includes(\"to\"))\n return;\n this.model.value = date_string;\n this.change_input();\n }\n _position(self, custom_el) {\n // This function is copied directly from bokehs date_picker\n const positionElement = custom_el !== null && custom_el !== void 0 ? custom_el : self._positionElement;\n const calendarHeight = [...self.calendarContainer.children].reduce((acc, child) => acc + (0, dom_1.bounding_box)(child).height, 0);\n const calendarWidth = self.calendarContainer.offsetWidth;\n const configPos = this.model.position.split(\" \");\n const configPosVertical = configPos[0];\n const configPosHorizontal = configPos.length > 1 ? configPos[1] : null;\n // const inputBounds = positionElement.getBoundingClientRect()\n const inputBounds = {\n top: positionElement.offsetTop,\n bottom: positionElement.offsetTop + positionElement.offsetHeight,\n left: positionElement.offsetLeft,\n right: positionElement.offsetLeft + positionElement.offsetWidth,\n width: positionElement.offsetWidth,\n };\n const distanceFromBottom = window.innerHeight - inputBounds.bottom;\n const showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n // const top =\n // window.scrollY +\n // inputBounds.top +\n // (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2)\n const top = self.config.appendTo\n ? inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2)\n : window.scrollY +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n self.calendarContainer.classList.toggle(\"arrowTop\", !showOnTop);\n self.calendarContainer.classList.toggle(\"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n let left = window.scrollX + inputBounds.left;\n let isCenter = false;\n let isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n self.calendarContainer.classList.toggle(\"arrowLeft\", !isCenter && !isRight);\n self.calendarContainer.classList.toggle(\"arrowCenter\", isCenter);\n self.calendarContainer.classList.toggle(\"arrowRight\", isRight);\n const right = window.document.body.offsetWidth -\n (window.scrollX + inputBounds.right);\n const rightMost = left + calendarWidth > window.document.body.offsetWidth;\n const centerMost = right + calendarWidth > window.document.body.offsetWidth;\n self.calendarContainer.classList.toggle(\"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = `${top}px`;\n if (!rightMost) {\n self.calendarContainer.style.left = `${left}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = `${right}px`;\n }\n else {\n const css = this.shadow_el.styleSheets[0];\n const bodyWidth = window.document.body.offsetWidth;\n const centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n const centerBefore = \".flatpickr-calendar.centerMost:before\";\n const centerAfter = \".flatpickr-calendar.centerMost:after\";\n const centerIndex = css.cssRules.length;\n const centerStyle = `{left:${inputBounds.left}px;right:auto;}`;\n self.calendarContainer.classList.toggle(\"rightMost\", false);\n self.calendarContainer.classList.toggle(\"centerMost\", true);\n css.insertRule(`${centerBefore},${centerAfter}${centerStyle}`, centerIndex);\n self.calendarContainer.style.left = `${centerLeft}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n }\n }\n exports.DatetimePickerView = DatetimePickerView;\n DatetimePickerView.__name__ = \"DatetimePickerView\";\n class DatetimePicker extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DatetimePicker = DatetimePicker;\n _a = DatetimePicker;\n DatetimePicker.__name__ = \"DatetimePicker\";\n DatetimePicker.__module__ = \"panel.models.datetime_picker\";\n (() => {\n _a.prototype.default_view = DatetimePickerView;\n _a.define(({ Boolean, String, Array, Tuple, Or, Nullable }) => {\n const DateStr = String;\n const DatesList = Array(Or(DateStr, Tuple(DateStr, DateStr)));\n return {\n value: [Nullable(String), null],\n min_date: [Nullable(String), null],\n max_date: [Nullable(String), null],\n disabled_dates: [Nullable(DatesList), null],\n enabled_dates: [Nullable(DatesList), null],\n position: [enums_1.CalendarPosition, \"auto\"],\n inline: [Boolean, false],\n enable_time: [Boolean, true],\n enable_seconds: [Boolean, true],\n military_time: [Boolean, true],\n date_format: [String, \"Y-m-d H:i:S\"],\n mode: [String, \"single\"],\n };\n });\n })();\n}\n","/* flatpickr/dist/esm/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };\n const options_1 = require(\"651d495396\") /* ./types/options */;\n const default_1 = tslib_1.__importDefault(require(\"3bfa124fda\") /* ./l10n/default */);\n const utils_1 = require(\"15458073ce\") /* ./utils */;\n const dom_1 = require(\"6b6749c6cf\") /* ./utils/dom */;\n const dates_1 = require(\"1bb8c967d1\") /* ./utils/dates */;\n const formatting_1 = require(\"3d14787c35\") /* ./utils/formatting */;\n require(\"6f45019dc1\") /* ./utils/polyfills */;\n var DEBOUNCED_CHANGE_MS = 300;\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, options_1.defaults), flatpickr.defaultConfig),\n l10n: default_1.default,\n };\n self.parseDate = (0, dates_1.createDateParser)({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = dom_1.createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) {\n month = self.currentMonth;\n }\n if (yr === void 0) {\n yr = self.currentYear;\n }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n (0, dates_1.compareDates)(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = (0, dates_1.getDefaultHours)(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * (0, utils_1.int)(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n (0, dates_1.compareDates)(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n (0, dates_1.compareDates)(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = (0, dates_1.calculateSecondsSinceMidnight)(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = (0, dates_1.calculateSecondsSinceMidnight)(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = (0, dates_1.calculateSecondsSinceMidnight)(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = (0, dates_1.parseSeconds)(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = (0, utils_1.pad)(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * (0, utils_1.int)(hours % 12 === 0)\n : hours);\n self.minuteElement.value = (0, utils_1.pad)(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[(0, utils_1.int)(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = (0, utils_1.pad)(seconds);\n }\n function onYearInput(event) {\n var eventTarget = (0, dom_1.getEventTarget)(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = (0, utils_1.debounce)(onResize, 50);\n self._debouncedChange = (0, utils_1.debounce)(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver((0, dom_1.getEventTarget)(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return (0, dom_1.getEventTarget)(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && (0, dom_1.getEventTarget)(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n (0, dom_1.toggleClass)(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n (0, dom_1.toggleClass)(self.calendarContainer, \"animate\", self.config.animate === true);\n (0, dom_1.toggleClass)(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = (0, dom_1.createElement)(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = (0, dom_1.createElement)(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n (0, dates_1.compareDates)(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n (0, dom_1.toggleClass)(dayElement, \"startRange\", self.selectedDates[0] &&\n (0, dates_1.compareDates)(date, self.selectedDates[0], true) === 0);\n (0, dom_1.toggleClass)(dayElement, \"endRange\", self.selectedDates[1] &&\n (0, dates_1.compareDates)(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"<span class='flatpickr-day'>\" + self.config.getWeek(date) + \"</span>\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = (0, dom_1.createElement)(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n (0, dom_1.clearNode)(self.daysContainer);\n if (self.weekNumbers)\n (0, dom_1.clearNode)(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = (0, dom_1.createElement)(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = (0, formatting_1.monthToStr)(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = (0, dom_1.createElement)(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = (0, dom_1.createElement)(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = (0, dom_1.createElement)(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = (0, dom_1.getEventTarget)(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = (0, dom_1.createNumberInput)(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = (0, dom_1.createElement)(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n (0, dom_1.clearNode)(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = (0, dom_1.createElement)(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = (0, dom_1.createElement)(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = (0, dom_1.createElement)(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n (0, dom_1.toggleClass)(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n (0, dom_1.toggleClass)(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = (0, dates_1.getDefaultHours)(self.config);\n self.timeContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = (0, dom_1.createElement)(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = (0, dom_1.createNumberInput)(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = (0, dom_1.createNumberInput)(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = (0, dom_1.createNumberInput)(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild((0, dom_1.createElement)(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = (0, dom_1.createElement)(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[(0, utils_1.int)((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-weekdays\");\n else\n (0, dom_1.clearNode)(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = (0, dom_1.createElement)(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n <span class='flatpickr-weekday'>\\n \" + weekdays.join(\"</span><span class='flatpickr-weekday'>\") + \"\\n </span>\\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = (0, dom_1.createElement)(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild((0, dom_1.createElement)(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = (0, dom_1.createElement)(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) {\n isOffset = true;\n }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) {\n triggerChangeEvent = true;\n }\n if (toInitial === void 0) {\n toInitial = true;\n }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = (0, dates_1.getDefaultHours)(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = (0, dom_1.getEventTarget)(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) {\n timeless = true;\n }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n (0, dates_1.compareDates)(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n (0, dates_1.compareDates)(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) {\n cellClass = \"flatpickr-day\";\n }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += dates_1.duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n (0, dates_1.isBetween)(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) {\n positionElement = self._positionElement;\n }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = (0, dom_1.getEventTarget)(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || options_1.defaults.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || options_1.defaults.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) {\n return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n options_1.HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = (0, utils_1.arrayify)(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (options_1.HOOKS.indexOf(key) > -1) {\n self.config[key] = (0, utils_1.arrayify)(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n formatting_1.tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n formatting_1.tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n formatting_1.tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n formatting_1.tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n formatting_1.tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = (0, dates_1.createDateFormatter)(self);\n self.parseDate = (0, dates_1.createDateParser)({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowTop\", !showOnTop);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowCenter\", isCenter);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n (0, dom_1.toggleClass)(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n (0, dom_1.toggleClass)(self.calendarContainer, \"rightMost\", false);\n (0, dom_1.toggleClass)(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = (0, dom_1.findParent)((0, dom_1.getEventTarget)(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if ((0, dates_1.compareDates)(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (options_1.HOOKS.indexOf(option) > -1)\n self.config[option] = (0, utils_1.arrayify)(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) {\n triggerChange = false;\n }\n if (format === void 0) {\n format = self.config.dateFormat;\n }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = (0, dom_1.createElement)(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = (0, dom_1.createElement)(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate((0, dom_1.getEventTarget)(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n (0, dates_1.compareDates)(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return ((0, dates_1.compareDates)(date, self.selectedDates[0]) >= 0 &&\n (0, dates_1.compareDates)(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n (0, formatting_1.monthToStr)(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) {\n triggerChange = true;\n }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = (0, dom_1.getEventTarget)(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[(0, utils_1.int)(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n (0, utils_1.int)(!isHourElem) +\n ((0, utils_1.int)(isHourElem) && (0, utils_1.int)(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - (0, utils_1.int)(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[(0, utils_1.int)(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = (0, utils_1.pad)(newValue);\n }\n }\n init();\n return self;\n }\n function _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n }\n if (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n var flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n };\n flatpickr.defaultConfig = {};\n flatpickr.l10ns = {\n en: __assign({}, default_1.default),\n default: __assign({}, default_1.default),\n };\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n };\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n };\n flatpickr.parseDate = (0, dates_1.createDateParser)({});\n flatpickr.formatDate = (0, dates_1.createDateFormatter)({});\n flatpickr.compareDates = dates_1.compareDates;\n if (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n }\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n exports.default = flatpickr;\n}\n","/* flatpickr/dist/esm/types/options.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n exports.HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n ];\n exports.defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n };\n}\n","/* flatpickr/dist/esm/l10n/default.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n exports.english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n };\n exports.default = exports.english;\n}\n","/* flatpickr/dist/esm/utils/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var pad = function (number, length) {\n if (length === void 0) {\n length = 2;\n }\n return (\"000\" + number).slice(length * -1);\n };\n exports.pad = pad;\n var int = function (bool) { return (bool === true ? 1 : 0); };\n exports.int = int;\n function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n }\n exports.debounce = debounce;\n var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n };\n exports.arrayify = arrayify;\n}\n","/* flatpickr/dist/esm/utils/dom.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n }\n exports.toggleClass = toggleClass;\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n }\n exports.createElement = createElement;\n function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n }\n exports.clearNode = clearNode;\n function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n }\n exports.findParent = findParent;\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n exports.createNumberInput = createNumberInput;\n function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n }\n exports.getEventTarget = getEventTarget;\n}\n","/* flatpickr/dist/esm/utils/dates.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const formatting_1 = require(\"3d14787c35\") /* ./formatting */;\n const options_1 = require(\"651d495396\") /* ../types/options */;\n const default_1 = require(\"3bfa124fda\") /* ../l10n/default */;\n var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? options_1.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? default_1.english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formatting_1.formats[c] && arr[i - 1] !== \"\\\\\"\n ? formatting_1.formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n };\n exports.createDateFormatter = createDateFormatter;\n var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? options_1.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? default_1.english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || options_1.defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (formatting_1.tokenRegex[token] && !escaped) {\n regexStr += formatting_1.tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: formatting_1.revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n exports.createDateParser = createDateParser;\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n }\n exports.compareDates = compareDates;\n function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n }\n exports.compareTimes = compareTimes;\n var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n exports.isBetween = isBetween;\n var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n };\n exports.calculateSecondsSinceMidnight = calculateSecondsSinceMidnight;\n var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n };\n exports.parseSeconds = parseSeconds;\n exports.duration = {\n DAY: 86400000,\n };\n function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n }\n exports.getDefaultHours = getDefaultHours;\n}\n","/* flatpickr/dist/esm/utils/formatting.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const utils_1 = require(\"15458073ce\") /* ../utils */;\n var doNothing = function () { return undefined; };\n var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\n exports.monthToStr = monthToStr;\n exports.revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * (0, utils_1.int)(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n };\n exports.tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n };\n exports.formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[exports.formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return (0, exports.monthToStr)(exports.formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return (0, utils_1.pad)(exports.formats.h(date, locale, options));\n },\n H: function (date) { return (0, utils_1.pad)(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[(0, utils_1.int)(date.getHours() > 11)]; },\n M: function (date, locale) {\n return (0, exports.monthToStr)(date.getMonth(), true, locale);\n },\n S: function (date) { return (0, utils_1.pad)(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return (0, utils_1.pad)(date.getFullYear(), 4); },\n d: function (date) { return (0, utils_1.pad)(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return (0, utils_1.pad)(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return (0, utils_1.pad)(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n };\n}\n","/* flatpickr/dist/esm/utils/polyfills.js */ function _(require, module, exports, __esModule, __esExport) {\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n }\n}\n","/* models/deckgl.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n const tooltips_1 = require(\"9588ab7c9e\") /* ./tooltips */;\n const constants_1 = tslib_1.__importDefault(require(\"093eb75864\") /* @luma.gl/constants */);\n function extractClasses() {\n // Get classes for registration from standalone deck.gl\n const classesDict = {};\n const deck = window.deck;\n const classes = Object.keys(deck).filter(x => x.charAt(0) === x.charAt(0).toUpperCase());\n for (const cls of classes) {\n classesDict[cls] = deck[cls];\n }\n return classesDict;\n }\n class DeckGLPlotView extends layout_dom_1.LayoutDOMView {\n connect_signals() {\n super.connect_signals();\n const { data, mapbox_api_key, tooltip, layers, initialViewState, data_sources } = this.model.properties;\n this.on_change([mapbox_api_key, tooltip], () => this.render());\n this.on_change([data, initialViewState], () => this.updateDeck());\n this.on_change([layers], () => this._update_layers());\n this.on_change([data_sources], () => this._connect_sources(true));\n this._layer_map = {};\n this._connected = [];\n this._connect_sources();\n }\n remove() {\n this.deckGL.finalize();\n super.remove();\n }\n _update_layers() {\n this._layer_map = {};\n this._update_data(true);\n }\n _connect_sources(render = false) {\n for (const cds of this.model.data_sources) {\n if (this._connected.indexOf(cds) < 0) {\n this.connect(cds.properties.data.change, () => this._update_data(true));\n this._connected.push(cds);\n }\n }\n this._update_data(render);\n }\n initialize() {\n super.initialize();\n if (window.deck.JSONConverter) {\n const { CSVLoader, Tiles3DLoader } = window.loaders;\n window.loaders.registerLoaders([Tiles3DLoader, CSVLoader]);\n const jsonConverterConfiguration = {\n classes: extractClasses(),\n // Will be resolved as `<enum-name>.<enum-value>`\n enumerations: {\n COORDINATE_SYSTEM: window.deck.COORDINATE_SYSTEM,\n GL: constants_1.default\n },\n // Constants that should be resolved with the provided values by JSON converter\n constants: {\n Tiles3DLoader\n }\n };\n this.jsonConverter = new window.deck.JSONConverter({\n configuration: jsonConverterConfiguration\n });\n }\n }\n _update_data(render = true) {\n let n = 0;\n for (const layer of this.model.layers) {\n let cds;\n n += 1;\n if ((n - 1) in this._layer_map) {\n cds = this.model.data_sources[this._layer_map[n - 1]];\n }\n else if (typeof layer.data != \"number\")\n continue;\n else {\n this._layer_map[n - 1] = layer.data;\n cds = this.model.data_sources[layer.data];\n }\n layer.data = (0, data_1.transform_cds_to_records)(cds);\n }\n if (render)\n this.updateDeck();\n }\n _on_click_event(event) {\n const click_state = {\n coordinate: event.coordinate,\n lngLat: event.coordinate,\n index: event.index\n };\n if (event.layer)\n click_state.layer = event.layer.id;\n this.model.clickState = click_state;\n }\n _on_hover_event(event) {\n if (event.coordinate == null)\n return;\n const hover_state = {\n coordinate: event.coordinate,\n lngLat: event.coordinate,\n index: event.index\n };\n if (event.layer)\n hover_state.layer = event.layer.id;\n this.model.hoverState = hover_state;\n }\n _on_viewState_event(event) {\n const view_state = Object.assign({}, event.viewState);\n delete view_state.normalize;\n for (const p in view_state) {\n if (p.startsWith('transition'))\n delete view_state[p];\n }\n const viewport = new window.deck.WebMercatorViewport(view_state);\n view_state.nw = viewport.unproject([0, 0]);\n view_state.se = viewport.unproject([viewport.width, viewport.height]);\n this.model.viewState = view_state;\n }\n get child_models() {\n return [];\n }\n getData() {\n const view_timeout = this.model.throttle['view'] || 200;\n const hover_timeout = this.model.throttle['hover'] || 100;\n const view_cb = (0, debounce_1.debounce)((event) => this._on_viewState_event(event), view_timeout, false);\n const hover_cb = (0, debounce_1.debounce)((event) => this._on_hover_event(event), hover_timeout, false);\n const data = Object.assign(Object.assign({}, this.model.data), { layers: this.model.layers, initialViewState: this.model.initialViewState, onViewStateChange: view_cb, onClick: (event) => this._on_click_event(event), onHover: hover_cb });\n return data;\n }\n updateDeck() {\n if (!this.deckGL) {\n this.render();\n return;\n }\n const data = this.getData();\n if (window.deck.updateDeck) {\n window.deck.updateDeck(data, this.deckGL);\n }\n else {\n const results = this.jsonConverter.convert(data);\n this.deckGL.setProps(results);\n }\n }\n createDeck({ mapboxApiKey, container, jsonInput, tooltip }) {\n let deckgl;\n try {\n const props = this.jsonConverter.convert(jsonInput);\n const getTooltip = (0, tooltips_1.makeTooltip)(tooltip, props.layers);\n deckgl = new window.deck.DeckGL(Object.assign(Object.assign({}, props), { map: window.mapboxgl, mapboxApiAccessToken: mapboxApiKey, container,\n getTooltip, width: '100%', height: '100%' }));\n }\n catch (err) {\n console.error(err);\n }\n return deckgl;\n }\n render() {\n super.render();\n const container = (0, dom_1.div)({ class: \"deckgl\" });\n const MAPBOX_API_KEY = this.model.mapbox_api_key;\n const tooltip = this.model.tooltip;\n const data = this.getData();\n if (window.deck.createDeck) {\n this.deckGL = window.deck.createDeck({\n mapboxApiKey: MAPBOX_API_KEY,\n container: container,\n jsonInput: data,\n tooltip\n });\n }\n else {\n this.deckGL = this.createDeck({\n mapboxApiKey: MAPBOX_API_KEY,\n container: container,\n jsonInput: data,\n tooltip\n });\n }\n this.shadow_el.appendChild(container);\n }\n after_layout() {\n super.after_layout();\n this.deckGL.redraw(true);\n }\n }\n exports.DeckGLPlotView = DeckGLPlotView;\n DeckGLPlotView.__name__ = \"DeckGLPlotView\";\n class DeckGLPlot extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DeckGLPlot = DeckGLPlot;\n _a = DeckGLPlot;\n DeckGLPlot.__name__ = \"DeckGLPlot\";\n DeckGLPlot.__module__ = \"panel.models.deckgl\";\n (() => {\n _a.prototype.default_view = DeckGLPlotView;\n _a.define(({ Any, Array, String, Ref }) => ({\n data: [Any],\n data_sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n clickState: [Any, {}],\n hoverState: [Any, {}],\n initialViewState: [Any, {}],\n layers: [Array(Any), []],\n mapbox_api_key: [String, ''],\n throttle: [Any, {}],\n tooltip: [Any, true],\n viewState: [Any, {}],\n }));\n _a.override({\n height: 400,\n width: 600\n });\n })();\n}\n","/* models/tooltips.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /*\n This file was adapted from https://github.com/uber/deck.gl/ the LICENSE\n below is preserved to comply with the original license.\n \n Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n */\n /* global document */\n let lastPickedObject;\n let lastTooltip;\n const DEFAULT_STYLE = {\n fontFamily: '\"Helvetica Neue\", Helvetica, Arial, sans-serif',\n display: 'flex',\n flex: 'wrap',\n maxWidth: '500px',\n flexDirection: 'column',\n zIndex: 2\n };\n function getDiv() {\n return document.createElement('div');\n }\n function getTooltipDefault(pickedInfo) {\n if (!pickedInfo.picked) {\n return null;\n }\n if (pickedInfo.object === lastPickedObject) {\n return lastTooltip;\n }\n const tooltip = {\n html: tabularize(pickedInfo.object),\n style: DEFAULT_STYLE\n };\n lastTooltip = tooltip;\n lastPickedObject = pickedInfo.object;\n return tooltip;\n }\n exports.getTooltipDefault = getTooltipDefault;\n const EXCLUDES = new Set(['position', 'index']);\n function tabularize(json) {\n // Turns a JSON object of picked info into HTML for a tooltip\n const dataTable = getDiv();\n // Creates rows of two columns for the tooltip\n for (const key in json) {\n if (EXCLUDES.has(key)) {\n continue; // eslint-disable-line\n }\n const header = getDiv();\n header.className = 'header';\n header.textContent = key;\n const valueElement = getDiv();\n valueElement.className = 'value';\n valueElement.textContent = toText(json[key]);\n const row = getDiv();\n setStyles(row, header, valueElement);\n row.appendChild(header);\n row.appendChild(valueElement);\n dataTable.appendChild(row);\n }\n return dataTable.innerHTML;\n }\n exports.tabularize = tabularize;\n function setStyles(row, header, value) {\n // Set default tooltip style\n Object.assign(header.style, {\n fontWeight: 700,\n marginRight: '10px',\n flex: '1 1 0%'\n });\n Object.assign(value.style, {\n flex: 'none',\n maxWidth: '250px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n });\n Object.assign(row.style, {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'stretch'\n });\n }\n function toText(jsonValue) {\n // Set contents of table value, trimming for certain types of data\n let text;\n if (Array.isArray(jsonValue) && jsonValue.length > 4) {\n text = `Array<${jsonValue.length}>`;\n }\n else if (typeof jsonValue === 'string') {\n text = jsonValue;\n }\n else if (typeof jsonValue === 'number') {\n text = String(jsonValue);\n }\n else {\n try {\n text = JSON.stringify(jsonValue);\n }\n catch (err) {\n text = '<Non-Serializable Object>';\n }\n }\n const MAX_LENGTH = 50;\n if (text.length > MAX_LENGTH) {\n text = text.slice(0, MAX_LENGTH);\n }\n return text;\n }\n exports.toText = toText;\n function substituteIn(template, json) {\n let output = template;\n for (const key in json) {\n if (typeof json[key] === 'object') {\n for (const subkey in json[key])\n output = output.replace(`{${key}.${subkey}}`, json[key][subkey]);\n }\n output = output.replace(`{${key}}`, json[key]);\n }\n return output;\n }\n exports.substituteIn = substituteIn;\n function makeTooltip(tooltips, layers) {\n /*\n * If explicitly no tooltip passed by user, return null\n * If a JSON object passed, return a tooltip based on that object\n * We expect the user has passed a string template that will take pickedInfo keywords\n * If a boolean passed, return the default tooltip\n */\n if (!tooltips) {\n return null;\n }\n let per_layer = false;\n const layer_tooltips = {};\n for (let i = 0; i < layers.length; i++) {\n const layer = layers[i];\n const layer_id = layer.id;\n if (typeof tooltips !== \"boolean\" && (i.toString() in tooltips || layer_id in tooltips)) {\n layer_tooltips[layer_id] = layer_id in tooltips ? tooltips[layer_id] : tooltips[i.toString()];\n per_layer = true;\n }\n }\n if (tooltips.html || tooltips.text || per_layer) {\n return (pickedInfo) => {\n if (!pickedInfo.picked) {\n return null;\n }\n const tooltip = (per_layer) ? layer_tooltips[pickedInfo.layer.id] : tooltips;\n if (tooltip == null)\n return;\n else if (typeof tooltip === \"boolean\")\n return tooltip ? getTooltipDefault(pickedInfo) : null;\n const formattedTooltip = {\n style: tooltip.style || DEFAULT_STYLE\n };\n if (tooltip.html) {\n formattedTooltip.html = substituteIn(tooltip.html, pickedInfo.object);\n }\n else {\n formattedTooltip.text = substituteIn(tooltip.text, pickedInfo.object);\n }\n return formattedTooltip;\n };\n }\n return getTooltipDefault;\n }\n exports.makeTooltip = makeTooltip;\n}\n","/* @luma.gl/constants/src/index.js */ function _(require, module, exports, __esModule, __esExport) {\n // GL constants, copied from Mozilla documentation\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants\n // Standard WebGL 1 constants\n // These constants are defined on the WebGLRenderingContext interface.\n /* eslint-disable key-spacing, max-len, no-inline-comments, camelcase */\n // eslint-disable-next-line\n module.exports = {\n // Clearing buffers\n // Constants passed to clear() to clear buffer masks.\n DEPTH_BUFFER_BIT: 0x00000100,\n STENCIL_BUFFER_BIT: 0x00000400,\n COLOR_BUFFER_BIT: 0x00004000,\n // Rendering primitives\n // Constants passed to drawElements() or drawArrays() to specify what kind of primitive to render.\n POINTS: 0x0000,\n LINES: 0x0001,\n LINE_LOOP: 0x0002,\n LINE_STRIP: 0x0003,\n TRIANGLES: 0x0004,\n TRIANGLE_STRIP: 0x0005,\n TRIANGLE_FAN: 0x0006,\n // Blending modes\n // Constants passed to blendFunc() or blendFuncSeparate() to specify the blending mode (for both, RBG and alpha, or separately).\n ZERO: 0,\n ONE: 1,\n SRC_COLOR: 0x0300,\n ONE_MINUS_SRC_COLOR: 0x0301,\n SRC_ALPHA: 0x0302,\n ONE_MINUS_SRC_ALPHA: 0x0303,\n DST_ALPHA: 0x0304,\n ONE_MINUS_DST_ALPHA: 0x0305,\n DST_COLOR: 0x0306,\n ONE_MINUS_DST_COLOR: 0x0307,\n SRC_ALPHA_SATURATE: 0x0308,\n CONSTANT_COLOR: 0x8001,\n ONE_MINUS_CONSTANT_COLOR: 0x8002,\n CONSTANT_ALPHA: 0x8003,\n ONE_MINUS_CONSTANT_ALPHA: 0x8004,\n // Blending equations\n // Constants passed to blendEquation() or blendEquationSeparate() to control\n // how the blending is calculated (for both, RBG and alpha, or separately).\n FUNC_ADD: 0x8006,\n FUNC_SUBTRACT: 0x800a,\n FUNC_REVERSE_SUBTRACT: 0x800b,\n // Getting GL parameter information\n // Constants passed to getParameter() to specify what information to return.\n BLEND_EQUATION: 0x8009,\n BLEND_EQUATION_RGB: 0x8009,\n BLEND_EQUATION_ALPHA: 0x883d,\n BLEND_DST_RGB: 0x80c8,\n BLEND_SRC_RGB: 0x80c9,\n BLEND_DST_ALPHA: 0x80ca,\n BLEND_SRC_ALPHA: 0x80cb,\n BLEND_COLOR: 0x8005,\n ARRAY_BUFFER_BINDING: 0x8894,\n ELEMENT_ARRAY_BUFFER_BINDING: 0x8895,\n LINE_WIDTH: 0x0b21,\n ALIASED_POINT_SIZE_RANGE: 0x846d,\n ALIASED_LINE_WIDTH_RANGE: 0x846e,\n CULL_FACE_MODE: 0x0b45,\n FRONT_FACE: 0x0b46,\n DEPTH_RANGE: 0x0b70,\n DEPTH_WRITEMASK: 0x0b72,\n DEPTH_CLEAR_VALUE: 0x0b73,\n DEPTH_FUNC: 0x0b74,\n STENCIL_CLEAR_VALUE: 0x0b91,\n STENCIL_FUNC: 0x0b92,\n STENCIL_FAIL: 0x0b94,\n STENCIL_PASS_DEPTH_FAIL: 0x0b95,\n STENCIL_PASS_DEPTH_PASS: 0x0b96,\n STENCIL_REF: 0x0b97,\n STENCIL_VALUE_MASK: 0x0b93,\n STENCIL_WRITEMASK: 0x0b98,\n STENCIL_BACK_FUNC: 0x8800,\n STENCIL_BACK_FAIL: 0x8801,\n STENCIL_BACK_PASS_DEPTH_FAIL: 0x8802,\n STENCIL_BACK_PASS_DEPTH_PASS: 0x8803,\n STENCIL_BACK_REF: 0x8ca3,\n STENCIL_BACK_VALUE_MASK: 0x8ca4,\n STENCIL_BACK_WRITEMASK: 0x8ca5,\n VIEWPORT: 0x0ba2,\n SCISSOR_BOX: 0x0c10,\n COLOR_CLEAR_VALUE: 0x0c22,\n COLOR_WRITEMASK: 0x0c23,\n UNPACK_ALIGNMENT: 0x0cf5,\n PACK_ALIGNMENT: 0x0d05,\n MAX_TEXTURE_SIZE: 0x0d33,\n MAX_VIEWPORT_DIMS: 0x0d3a,\n SUBPIXEL_BITS: 0x0d50,\n RED_BITS: 0x0d52,\n GREEN_BITS: 0x0d53,\n BLUE_BITS: 0x0d54,\n ALPHA_BITS: 0x0d55,\n DEPTH_BITS: 0x0d56,\n STENCIL_BITS: 0x0d57,\n POLYGON_OFFSET_UNITS: 0x2a00,\n POLYGON_OFFSET_FACTOR: 0x8038,\n TEXTURE_BINDING_2D: 0x8069,\n SAMPLE_BUFFERS: 0x80a8,\n SAMPLES: 0x80a9,\n SAMPLE_COVERAGE_VALUE: 0x80aa,\n SAMPLE_COVERAGE_INVERT: 0x80ab,\n COMPRESSED_TEXTURE_FORMATS: 0x86a3,\n VENDOR: 0x1f00,\n RENDERER: 0x1f01,\n VERSION: 0x1f02,\n IMPLEMENTATION_COLOR_READ_TYPE: 0x8b9a,\n IMPLEMENTATION_COLOR_READ_FORMAT: 0x8b9b,\n BROWSER_DEFAULT_WEBGL: 0x9244,\n // Buffers\n // Constants passed to bufferData(), bufferSubData(), bindBuffer(), or\n // getBufferParameter().\n STATIC_DRAW: 0x88e4,\n STREAM_DRAW: 0x88e0,\n DYNAMIC_DRAW: 0x88e8,\n ARRAY_BUFFER: 0x8892,\n ELEMENT_ARRAY_BUFFER: 0x8893,\n BUFFER_SIZE: 0x8764,\n BUFFER_USAGE: 0x8765,\n // Vertex attributes\n // Constants passed to getVertexAttrib().\n CURRENT_VERTEX_ATTRIB: 0x8626,\n VERTEX_ATTRIB_ARRAY_ENABLED: 0x8622,\n VERTEX_ATTRIB_ARRAY_SIZE: 0x8623,\n VERTEX_ATTRIB_ARRAY_STRIDE: 0x8624,\n VERTEX_ATTRIB_ARRAY_TYPE: 0x8625,\n VERTEX_ATTRIB_ARRAY_NORMALIZED: 0x886a,\n VERTEX_ATTRIB_ARRAY_POINTER: 0x8645,\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 0x889f,\n // Culling\n // Constants passed to cullFace().\n CULL_FACE: 0x0b44,\n FRONT: 0x0404,\n BACK: 0x0405,\n FRONT_AND_BACK: 0x0408,\n // Enabling and disabling\n // Constants passed to enable() or disable().\n BLEND: 0x0be2,\n DEPTH_TEST: 0x0b71,\n DITHER: 0x0bd0,\n POLYGON_OFFSET_FILL: 0x8037,\n SAMPLE_ALPHA_TO_COVERAGE: 0x809e,\n SAMPLE_COVERAGE: 0x80a0,\n SCISSOR_TEST: 0x0c11,\n STENCIL_TEST: 0x0b90,\n // Errors\n // Constants returned from getError().\n NO_ERROR: 0,\n INVALID_ENUM: 0x0500,\n INVALID_VALUE: 0x0501,\n INVALID_OPERATION: 0x0502,\n OUT_OF_MEMORY: 0x0505,\n CONTEXT_LOST_WEBGL: 0x9242,\n // Front face directions\n // Constants passed to frontFace().\n CW: 0x0900,\n CCW: 0x0901,\n // Hints\n // Constants passed to hint()\n DONT_CARE: 0x1100,\n FASTEST: 0x1101,\n NICEST: 0x1102,\n GENERATE_MIPMAP_HINT: 0x8192,\n // Data types\n BYTE: 0x1400,\n UNSIGNED_BYTE: 0x1401,\n SHORT: 0x1402,\n UNSIGNED_SHORT: 0x1403,\n INT: 0x1404,\n UNSIGNED_INT: 0x1405,\n FLOAT: 0x1406,\n DOUBLE: 0x140a,\n // Pixel formats\n DEPTH_COMPONENT: 0x1902,\n ALPHA: 0x1906,\n RGB: 0x1907,\n RGBA: 0x1908,\n LUMINANCE: 0x1909,\n LUMINANCE_ALPHA: 0x190a,\n // Pixel types\n // UNSIGNED_BYTE: 0x1401,\n UNSIGNED_SHORT_4_4_4_4: 0x8033,\n UNSIGNED_SHORT_5_5_5_1: 0x8034,\n UNSIGNED_SHORT_5_6_5: 0x8363,\n // Shaders\n // Constants passed to createShader() or getShaderParameter()\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n COMPILE_STATUS: 0x8b81,\n DELETE_STATUS: 0x8b80,\n LINK_STATUS: 0x8b82,\n VALIDATE_STATUS: 0x8b83,\n ATTACHED_SHADERS: 0x8b85,\n ACTIVE_ATTRIBUTES: 0x8b89,\n ACTIVE_UNIFORMS: 0x8b86,\n MAX_VERTEX_ATTRIBS: 0x8869,\n MAX_VERTEX_UNIFORM_VECTORS: 0x8dfb,\n MAX_VARYING_VECTORS: 0x8dfc,\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: 0x8b4d,\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0x8b4c,\n MAX_TEXTURE_IMAGE_UNITS: 0x8872,\n MAX_FRAGMENT_UNIFORM_VECTORS: 0x8dfd,\n SHADER_TYPE: 0x8b4f,\n SHADING_LANGUAGE_VERSION: 0x8b8c,\n CURRENT_PROGRAM: 0x8b8d,\n // Depth or stencil tests\n // Constants passed to depthFunc() or stencilFunc().\n NEVER: 0x0200,\n ALWAYS: 0x0207,\n LESS: 0x0201,\n EQUAL: 0x0202,\n LEQUAL: 0x0203,\n GREATER: 0x0204,\n GEQUAL: 0x0206,\n NOTEQUAL: 0x0205,\n // Stencil actions\n // Constants passed to stencilOp().\n KEEP: 0x1e00,\n REPLACE: 0x1e01,\n INCR: 0x1e02,\n DECR: 0x1e03,\n INVERT: 0x150a,\n INCR_WRAP: 0x8507,\n DECR_WRAP: 0x8508,\n // Textures\n // Constants passed to texParameteri(),\n // texParameterf(), bindTexture(), texImage2D(), and others.\n NEAREST: 0x2600,\n LINEAR: 0x2601,\n NEAREST_MIPMAP_NEAREST: 0x2700,\n LINEAR_MIPMAP_NEAREST: 0x2701,\n NEAREST_MIPMAP_LINEAR: 0x2702,\n LINEAR_MIPMAP_LINEAR: 0x2703,\n TEXTURE_MAG_FILTER: 0x2800,\n TEXTURE_MIN_FILTER: 0x2801,\n TEXTURE_WRAP_S: 0x2802,\n TEXTURE_WRAP_T: 0x2803,\n TEXTURE_2D: 0x0de1,\n TEXTURE: 0x1702,\n TEXTURE_CUBE_MAP: 0x8513,\n TEXTURE_BINDING_CUBE_MAP: 0x8514,\n TEXTURE_CUBE_MAP_POSITIVE_X: 0x8515,\n TEXTURE_CUBE_MAP_NEGATIVE_X: 0x8516,\n TEXTURE_CUBE_MAP_POSITIVE_Y: 0x8517,\n TEXTURE_CUBE_MAP_NEGATIVE_Y: 0x8518,\n TEXTURE_CUBE_MAP_POSITIVE_Z: 0x8519,\n TEXTURE_CUBE_MAP_NEGATIVE_Z: 0x851a,\n MAX_CUBE_MAP_TEXTURE_SIZE: 0x851c,\n // TEXTURE0 - 31 0x84C0 - 0x84DF A texture unit.\n TEXTURE0: 0x84c0,\n ACTIVE_TEXTURE: 0x84e0,\n REPEAT: 0x2901,\n CLAMP_TO_EDGE: 0x812f,\n MIRRORED_REPEAT: 0x8370,\n // Emulation\n TEXTURE_WIDTH: 0x1000,\n TEXTURE_HEIGHT: 0x1001,\n // Uniform types\n FLOAT_VEC2: 0x8b50,\n FLOAT_VEC3: 0x8b51,\n FLOAT_VEC4: 0x8b52,\n INT_VEC2: 0x8b53,\n INT_VEC3: 0x8b54,\n INT_VEC4: 0x8b55,\n BOOL: 0x8b56,\n BOOL_VEC2: 0x8b57,\n BOOL_VEC3: 0x8b58,\n BOOL_VEC4: 0x8b59,\n FLOAT_MAT2: 0x8b5a,\n FLOAT_MAT3: 0x8b5b,\n FLOAT_MAT4: 0x8b5c,\n SAMPLER_2D: 0x8b5e,\n SAMPLER_CUBE: 0x8b60,\n // Shader precision-specified types\n LOW_FLOAT: 0x8df0,\n MEDIUM_FLOAT: 0x8df1,\n HIGH_FLOAT: 0x8df2,\n LOW_INT: 0x8df3,\n MEDIUM_INT: 0x8df4,\n HIGH_INT: 0x8df5,\n // Framebuffers and renderbuffers\n FRAMEBUFFER: 0x8d40,\n RENDERBUFFER: 0x8d41,\n RGBA4: 0x8056,\n RGB5_A1: 0x8057,\n RGB565: 0x8d62,\n DEPTH_COMPONENT16: 0x81a5,\n STENCIL_INDEX: 0x1901,\n STENCIL_INDEX8: 0x8d48,\n DEPTH_STENCIL: 0x84f9,\n RENDERBUFFER_WIDTH: 0x8d42,\n RENDERBUFFER_HEIGHT: 0x8d43,\n RENDERBUFFER_INTERNAL_FORMAT: 0x8d44,\n RENDERBUFFER_RED_SIZE: 0x8d50,\n RENDERBUFFER_GREEN_SIZE: 0x8d51,\n RENDERBUFFER_BLUE_SIZE: 0x8d52,\n RENDERBUFFER_ALPHA_SIZE: 0x8d53,\n RENDERBUFFER_DEPTH_SIZE: 0x8d54,\n RENDERBUFFER_STENCIL_SIZE: 0x8d55,\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 0x8cd0,\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 0x8cd1,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 0x8cd2,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 0x8cd3,\n COLOR_ATTACHMENT0: 0x8ce0,\n DEPTH_ATTACHMENT: 0x8d00,\n STENCIL_ATTACHMENT: 0x8d20,\n DEPTH_STENCIL_ATTACHMENT: 0x821a,\n NONE: 0,\n FRAMEBUFFER_COMPLETE: 0x8cd5,\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 0x8cd6,\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 0x8cd7,\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 0x8cd9,\n FRAMEBUFFER_UNSUPPORTED: 0x8cdd,\n FRAMEBUFFER_BINDING: 0x8ca6,\n RENDERBUFFER_BINDING: 0x8ca7,\n READ_FRAMEBUFFER: 0x8ca8,\n DRAW_FRAMEBUFFER: 0x8ca9,\n MAX_RENDERBUFFER_SIZE: 0x84e8,\n INVALID_FRAMEBUFFER_OPERATION: 0x0506,\n // Pixel storage modes\n // Constants passed to pixelStorei().\n UNPACK_FLIP_Y_WEBGL: 0x9240,\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: 0x9241,\n UNPACK_COLORSPACE_CONVERSION_WEBGL: 0x9243,\n // /////////////////////////////////////////////////////\n // Additional constants defined WebGL 2\n // These constants are defined on the WebGL2RenderingContext interface.\n // All WebGL 1 constants are also available in a WebGL 2 context.\n // /////////////////////////////////////////////////////\n // Getting GL parameter information\n // Constants passed to getParameter()\n // to specify what information to return.\n READ_BUFFER: 0x0c02,\n UNPACK_ROW_LENGTH: 0x0cf2,\n UNPACK_SKIP_ROWS: 0x0cf3,\n UNPACK_SKIP_PIXELS: 0x0cf4,\n PACK_ROW_LENGTH: 0x0d02,\n PACK_SKIP_ROWS: 0x0d03,\n PACK_SKIP_PIXELS: 0x0d04,\n TEXTURE_BINDING_3D: 0x806a,\n UNPACK_SKIP_IMAGES: 0x806d,\n UNPACK_IMAGE_HEIGHT: 0x806e,\n MAX_3D_TEXTURE_SIZE: 0x8073,\n MAX_ELEMENTS_VERTICES: 0x80e8,\n MAX_ELEMENTS_INDICES: 0x80e9,\n MAX_TEXTURE_LOD_BIAS: 0x84fd,\n MAX_FRAGMENT_UNIFORM_COMPONENTS: 0x8b49,\n MAX_VERTEX_UNIFORM_COMPONENTS: 0x8b4a,\n MAX_ARRAY_TEXTURE_LAYERS: 0x88ff,\n MIN_PROGRAM_TEXEL_OFFSET: 0x8904,\n MAX_PROGRAM_TEXEL_OFFSET: 0x8905,\n MAX_VARYING_COMPONENTS: 0x8b4b,\n FRAGMENT_SHADER_DERIVATIVE_HINT: 0x8b8b,\n RASTERIZER_DISCARD: 0x8c89,\n VERTEX_ARRAY_BINDING: 0x85b5,\n MAX_VERTEX_OUTPUT_COMPONENTS: 0x9122,\n MAX_FRAGMENT_INPUT_COMPONENTS: 0x9125,\n MAX_SERVER_WAIT_TIMEOUT: 0x9111,\n MAX_ELEMENT_INDEX: 0x8d6b,\n // Textures\n // Constants passed to texParameteri(),\n // texParameterf(), bindTexture(), texImage2D(), and others.\n RED: 0x1903,\n RGB8: 0x8051,\n RGBA8: 0x8058,\n RGB10_A2: 0x8059,\n TEXTURE_3D: 0x806f,\n TEXTURE_WRAP_R: 0x8072,\n TEXTURE_MIN_LOD: 0x813a,\n TEXTURE_MAX_LOD: 0x813b,\n TEXTURE_BASE_LEVEL: 0x813c,\n TEXTURE_MAX_LEVEL: 0x813d,\n TEXTURE_COMPARE_MODE: 0x884c,\n TEXTURE_COMPARE_FUNC: 0x884d,\n SRGB: 0x8c40,\n SRGB8: 0x8c41,\n SRGB8_ALPHA8: 0x8c43,\n COMPARE_REF_TO_TEXTURE: 0x884e,\n RGBA32F: 0x8814,\n RGB32F: 0x8815,\n RGBA16F: 0x881a,\n RGB16F: 0x881b,\n TEXTURE_2D_ARRAY: 0x8c1a,\n TEXTURE_BINDING_2D_ARRAY: 0x8c1d,\n R11F_G11F_B10F: 0x8c3a,\n RGB9_E5: 0x8c3d,\n RGBA32UI: 0x8d70,\n RGB32UI: 0x8d71,\n RGBA16UI: 0x8d76,\n RGB16UI: 0x8d77,\n RGBA8UI: 0x8d7c,\n RGB8UI: 0x8d7d,\n RGBA32I: 0x8d82,\n RGB32I: 0x8d83,\n RGBA16I: 0x8d88,\n RGB16I: 0x8d89,\n RGBA8I: 0x8d8e,\n RGB8I: 0x8d8f,\n RED_INTEGER: 0x8d94,\n RGB_INTEGER: 0x8d98,\n RGBA_INTEGER: 0x8d99,\n R8: 0x8229,\n RG8: 0x822b,\n R16F: 0x822d,\n R32F: 0x822e,\n RG16F: 0x822f,\n RG32F: 0x8230,\n R8I: 0x8231,\n R8UI: 0x8232,\n R16I: 0x8233,\n R16UI: 0x8234,\n R32I: 0x8235,\n R32UI: 0x8236,\n RG8I: 0x8237,\n RG8UI: 0x8238,\n RG16I: 0x8239,\n RG16UI: 0x823a,\n RG32I: 0x823b,\n RG32UI: 0x823c,\n R8_SNORM: 0x8f94,\n RG8_SNORM: 0x8f95,\n RGB8_SNORM: 0x8f96,\n RGBA8_SNORM: 0x8f97,\n RGB10_A2UI: 0x906f,\n /* covered by extension\n COMPRESSED_R11_EAC : 0x9270,\n COMPRESSED_SIGNED_R11_EAC: 0x9271,\n COMPRESSED_RG11_EAC: 0x9272,\n COMPRESSED_SIGNED_RG11_EAC : 0x9273,\n COMPRESSED_RGB8_ETC2 : 0x9274,\n COMPRESSED_SRGB8_ETC2: 0x9275,\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276,\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC : 0x9277,\n COMPRESSED_RGBA8_ETC2_EAC: 0x9278,\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279,\n */\n TEXTURE_IMMUTABLE_FORMAT: 0x912f,\n TEXTURE_IMMUTABLE_LEVELS: 0x82df,\n // Pixel types\n UNSIGNED_INT_2_10_10_10_REV: 0x8368,\n UNSIGNED_INT_10F_11F_11F_REV: 0x8c3b,\n UNSIGNED_INT_5_9_9_9_REV: 0x8c3e,\n FLOAT_32_UNSIGNED_INT_24_8_REV: 0x8dad,\n UNSIGNED_INT_24_8: 0x84fa,\n HALF_FLOAT: 0x140b,\n RG: 0x8227,\n RG_INTEGER: 0x8228,\n INT_2_10_10_10_REV: 0x8d9f,\n // Queries\n CURRENT_QUERY: 0x8865,\n QUERY_RESULT: 0x8866,\n QUERY_RESULT_AVAILABLE: 0x8867,\n ANY_SAMPLES_PASSED: 0x8c2f,\n ANY_SAMPLES_PASSED_CONSERVATIVE: 0x8d6a,\n // Draw buffers\n MAX_DRAW_BUFFERS: 0x8824,\n DRAW_BUFFER0: 0x8825,\n DRAW_BUFFER1: 0x8826,\n DRAW_BUFFER2: 0x8827,\n DRAW_BUFFER3: 0x8828,\n DRAW_BUFFER4: 0x8829,\n DRAW_BUFFER5: 0x882a,\n DRAW_BUFFER6: 0x882b,\n DRAW_BUFFER7: 0x882c,\n DRAW_BUFFER8: 0x882d,\n DRAW_BUFFER9: 0x882e,\n DRAW_BUFFER10: 0x882f,\n DRAW_BUFFER11: 0x8830,\n DRAW_BUFFER12: 0x8831,\n DRAW_BUFFER13: 0x8832,\n DRAW_BUFFER14: 0x8833,\n DRAW_BUFFER15: 0x8834,\n MAX_COLOR_ATTACHMENTS: 0x8cdf,\n COLOR_ATTACHMENT1: 0x8ce1,\n COLOR_ATTACHMENT2: 0x8ce2,\n COLOR_ATTACHMENT3: 0x8ce3,\n COLOR_ATTACHMENT4: 0x8ce4,\n COLOR_ATTACHMENT5: 0x8ce5,\n COLOR_ATTACHMENT6: 0x8ce6,\n COLOR_ATTACHMENT7: 0x8ce7,\n COLOR_ATTACHMENT8: 0x8ce8,\n COLOR_ATTACHMENT9: 0x8ce9,\n COLOR_ATTACHMENT10: 0x8cea,\n COLOR_ATTACHMENT11: 0x8ceb,\n COLOR_ATTACHMENT12: 0x8cec,\n COLOR_ATTACHMENT13: 0x8ced,\n COLOR_ATTACHMENT14: 0x8cee,\n COLOR_ATTACHMENT15: 0x8cef,\n // Samplers\n SAMPLER_3D: 0x8b5f,\n SAMPLER_2D_SHADOW: 0x8b62,\n SAMPLER_2D_ARRAY: 0x8dc1,\n SAMPLER_2D_ARRAY_SHADOW: 0x8dc4,\n SAMPLER_CUBE_SHADOW: 0x8dc5,\n INT_SAMPLER_2D: 0x8dca,\n INT_SAMPLER_3D: 0x8dcb,\n INT_SAMPLER_CUBE: 0x8dcc,\n INT_SAMPLER_2D_ARRAY: 0x8dcf,\n UNSIGNED_INT_SAMPLER_2D: 0x8dd2,\n UNSIGNED_INT_SAMPLER_3D: 0x8dd3,\n UNSIGNED_INT_SAMPLER_CUBE: 0x8dd4,\n UNSIGNED_INT_SAMPLER_2D_ARRAY: 0x8dd7,\n MAX_SAMPLES: 0x8d57,\n SAMPLER_BINDING: 0x8919,\n // Buffers\n PIXEL_PACK_BUFFER: 0x88eb,\n PIXEL_UNPACK_BUFFER: 0x88ec,\n PIXEL_PACK_BUFFER_BINDING: 0x88ed,\n PIXEL_UNPACK_BUFFER_BINDING: 0x88ef,\n COPY_READ_BUFFER: 0x8f36,\n COPY_WRITE_BUFFER: 0x8f37,\n COPY_READ_BUFFER_BINDING: 0x8f36,\n COPY_WRITE_BUFFER_BINDING: 0x8f37,\n // Data types\n FLOAT_MAT2x3: 0x8b65,\n FLOAT_MAT2x4: 0x8b66,\n FLOAT_MAT3x2: 0x8b67,\n FLOAT_MAT3x4: 0x8b68,\n FLOAT_MAT4x2: 0x8b69,\n FLOAT_MAT4x3: 0x8b6a,\n UNSIGNED_INT_VEC2: 0x8dc6,\n UNSIGNED_INT_VEC3: 0x8dc7,\n UNSIGNED_INT_VEC4: 0x8dc8,\n UNSIGNED_NORMALIZED: 0x8c17,\n SIGNED_NORMALIZED: 0x8f9c,\n // Vertex attributes\n VERTEX_ATTRIB_ARRAY_INTEGER: 0x88fd,\n VERTEX_ATTRIB_ARRAY_DIVISOR: 0x88fe,\n // Transform feedback\n TRANSFORM_FEEDBACK_BUFFER_MODE: 0x8c7f,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0x8c80,\n TRANSFORM_FEEDBACK_VARYINGS: 0x8c83,\n TRANSFORM_FEEDBACK_BUFFER_START: 0x8c84,\n TRANSFORM_FEEDBACK_BUFFER_SIZE: 0x8c85,\n TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8c88,\n MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8c8a,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8c8b,\n INTERLEAVED_ATTRIBS: 0x8c8c,\n SEPARATE_ATTRIBS: 0x8c8d,\n TRANSFORM_FEEDBACK_BUFFER: 0x8c8e,\n TRANSFORM_FEEDBACK_BUFFER_BINDING: 0x8c8f,\n TRANSFORM_FEEDBACK: 0x8e22,\n TRANSFORM_FEEDBACK_PAUSED: 0x8e23,\n TRANSFORM_FEEDBACK_ACTIVE: 0x8e24,\n TRANSFORM_FEEDBACK_BINDING: 0x8e25,\n // Framebuffers and renderbuffers\n FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 0x8210,\n FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 0x8211,\n FRAMEBUFFER_ATTACHMENT_RED_SIZE: 0x8212,\n FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 0x8213,\n FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 0x8214,\n FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 0x8215,\n FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 0x8216,\n FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 0x8217,\n FRAMEBUFFER_DEFAULT: 0x8218,\n // DEPTH_STENCIL_ATTACHMENT : 0x821A,\n // DEPTH_STENCIL: 0x84F9,\n DEPTH24_STENCIL8: 0x88f0,\n DRAW_FRAMEBUFFER_BINDING: 0x8ca6,\n READ_FRAMEBUFFER_BINDING: 0x8caa,\n RENDERBUFFER_SAMPLES: 0x8cab,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 0x8cd4,\n FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 0x8d56,\n // Uniforms\n UNIFORM_BUFFER: 0x8a11,\n UNIFORM_BUFFER_BINDING: 0x8a28,\n UNIFORM_BUFFER_START: 0x8a29,\n UNIFORM_BUFFER_SIZE: 0x8a2a,\n MAX_VERTEX_UNIFORM_BLOCKS: 0x8a2b,\n MAX_FRAGMENT_UNIFORM_BLOCKS: 0x8a2d,\n MAX_COMBINED_UNIFORM_BLOCKS: 0x8a2e,\n MAX_UNIFORM_BUFFER_BINDINGS: 0x8a2f,\n MAX_UNIFORM_BLOCK_SIZE: 0x8a30,\n MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0x8a31,\n MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0x8a33,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0x8a34,\n ACTIVE_UNIFORM_BLOCKS: 0x8a36,\n UNIFORM_TYPE: 0x8a37,\n UNIFORM_SIZE: 0x8a38,\n UNIFORM_BLOCK_INDEX: 0x8a3a,\n UNIFORM_OFFSET: 0x8a3b,\n UNIFORM_ARRAY_STRIDE: 0x8a3c,\n UNIFORM_MATRIX_STRIDE: 0x8a3d,\n UNIFORM_IS_ROW_MAJOR: 0x8a3e,\n UNIFORM_BLOCK_BINDING: 0x8a3f,\n UNIFORM_BLOCK_DATA_SIZE: 0x8a40,\n UNIFORM_BLOCK_ACTIVE_UNIFORMS: 0x8a42,\n UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 0x8a43,\n UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 0x8a44,\n UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 0x8a46,\n // Sync objects\n OBJECT_TYPE: 0x9112,\n SYNC_CONDITION: 0x9113,\n SYNC_STATUS: 0x9114,\n SYNC_FLAGS: 0x9115,\n SYNC_FENCE: 0x9116,\n SYNC_GPU_COMMANDS_COMPLETE: 0x9117,\n UNSIGNALED: 0x9118,\n SIGNALED: 0x9119,\n ALREADY_SIGNALED: 0x911a,\n TIMEOUT_EXPIRED: 0x911b,\n CONDITION_SATISFIED: 0x911c,\n WAIT_FAILED: 0x911d,\n SYNC_FLUSH_COMMANDS_BIT: 0x00000001,\n // Miscellaneous constants\n COLOR: 0x1800,\n DEPTH: 0x1801,\n STENCIL: 0x1802,\n MIN: 0x8007,\n MAX: 0x8008,\n DEPTH_COMPONENT24: 0x81a6,\n STREAM_READ: 0x88e1,\n STREAM_COPY: 0x88e2,\n STATIC_READ: 0x88e5,\n STATIC_COPY: 0x88e6,\n DYNAMIC_READ: 0x88e9,\n DYNAMIC_COPY: 0x88ea,\n DEPTH_COMPONENT32F: 0x8cac,\n DEPTH32F_STENCIL8: 0x8cad,\n INVALID_INDEX: 0xffffffff,\n TIMEOUT_IGNORED: -1,\n MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0x9247,\n // Constants defined in WebGL extensions\n // ANGLE_instanced_arrays\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: 0x88fe,\n // WEBGL_debug_renderer_info\n UNMASKED_VENDOR_WEBGL: 0x9245,\n UNMASKED_RENDERER_WEBGL: 0x9246,\n // EXT_texture_filter_anisotropic\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0x84ff,\n TEXTURE_MAX_ANISOTROPY_EXT: 0x84fe,\n // WEBGL_compressed_texture_s3tc\n COMPRESSED_RGB_S3TC_DXT1_EXT: 0x83f0,\n COMPRESSED_RGBA_S3TC_DXT1_EXT: 0x83f1,\n COMPRESSED_RGBA_S3TC_DXT3_EXT: 0x83f2,\n COMPRESSED_RGBA_S3TC_DXT5_EXT: 0x83f3,\n // WEBGL_compressed_texture_es3\n COMPRESSED_R11_EAC: 0x9270,\n COMPRESSED_SIGNED_R11_EAC: 0x9271,\n COMPRESSED_RG11_EAC: 0x9272,\n COMPRESSED_SIGNED_RG11_EAC: 0x9273,\n COMPRESSED_RGB8_ETC2: 0x9274,\n COMPRESSED_RGBA8_ETC2_EAC: 0x9275,\n COMPRESSED_SRGB8_ETC2: 0x9276,\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: 0x9277,\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9278,\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9279,\n // WEBGL_compressed_texture_pvrtc\n COMPRESSED_RGB_PVRTC_4BPPV1_IMG: 0x8c00,\n COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: 0x8c02,\n COMPRESSED_RGB_PVRTC_2BPPV1_IMG: 0x8c01,\n COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: 0x8c03,\n // WEBGL_compressed_texture_etc1\n COMPRESSED_RGB_ETC1_WEBGL: 0x8d64,\n // WEBGL_compressed_texture_atc\n COMPRESSED_RGB_ATC_WEBGL: 0x8c92,\n COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: 0x8c92,\n COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: 0x87ee,\n // WEBGL_depth_texture\n UNSIGNED_INT_24_8_WEBGL: 0x84fa,\n // OES_texture_half_float\n HALF_FLOAT_OES: 0x8d61,\n // WEBGL_color_buffer_float\n RGBA32F_EXT: 0x8814,\n RGB32F_EXT: 0x8815,\n FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: 0x8211,\n UNSIGNED_NORMALIZED_EXT: 0x8c17,\n // EXT_blend_minmax\n MIN_EXT: 0x8007,\n MAX_EXT: 0x8008,\n // EXT_sRGB\n SRGB_EXT: 0x8c40,\n SRGB_ALPHA_EXT: 0x8c42,\n SRGB8_ALPHA8_EXT: 0x8c43,\n FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: 0x8210,\n // OES_standard_derivatives\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: 0x8b8b,\n // WEBGL_draw_buffers\n COLOR_ATTACHMENT0_WEBGL: 0x8ce0,\n COLOR_ATTACHMENT1_WEBGL: 0x8ce1,\n COLOR_ATTACHMENT2_WEBGL: 0x8ce2,\n COLOR_ATTACHMENT3_WEBGL: 0x8ce3,\n COLOR_ATTACHMENT4_WEBGL: 0x8ce4,\n COLOR_ATTACHMENT5_WEBGL: 0x8ce5,\n COLOR_ATTACHMENT6_WEBGL: 0x8ce6,\n COLOR_ATTACHMENT7_WEBGL: 0x8ce7,\n COLOR_ATTACHMENT8_WEBGL: 0x8ce8,\n COLOR_ATTACHMENT9_WEBGL: 0x8ce9,\n COLOR_ATTACHMENT10_WEBGL: 0x8cea,\n COLOR_ATTACHMENT11_WEBGL: 0x8ceb,\n COLOR_ATTACHMENT12_WEBGL: 0x8cec,\n COLOR_ATTACHMENT13_WEBGL: 0x8ced,\n COLOR_ATTACHMENT14_WEBGL: 0x8cee,\n COLOR_ATTACHMENT15_WEBGL: 0x8cef,\n DRAW_BUFFER0_WEBGL: 0x8825,\n DRAW_BUFFER1_WEBGL: 0x8826,\n DRAW_BUFFER2_WEBGL: 0x8827,\n DRAW_BUFFER3_WEBGL: 0x8828,\n DRAW_BUFFER4_WEBGL: 0x8829,\n DRAW_BUFFER5_WEBGL: 0x882a,\n DRAW_BUFFER6_WEBGL: 0x882b,\n DRAW_BUFFER7_WEBGL: 0x882c,\n DRAW_BUFFER8_WEBGL: 0x882d,\n DRAW_BUFFER9_WEBGL: 0x882e,\n DRAW_BUFFER10_WEBGL: 0x882f,\n DRAW_BUFFER11_WEBGL: 0x8830,\n DRAW_BUFFER12_WEBGL: 0x8831,\n DRAW_BUFFER13_WEBGL: 0x8832,\n DRAW_BUFFER14_WEBGL: 0x8833,\n DRAW_BUFFER15_WEBGL: 0x8834,\n MAX_COLOR_ATTACHMENTS_WEBGL: 0x8cdf,\n MAX_DRAW_BUFFERS_WEBGL: 0x8824,\n // OES_vertex_array_object\n VERTEX_ARRAY_BINDING_OES: 0x85b5,\n // EXT_disjoint_timer_query\n QUERY_COUNTER_BITS_EXT: 0x8864,\n CURRENT_QUERY_EXT: 0x8865,\n QUERY_RESULT_EXT: 0x8866,\n QUERY_RESULT_AVAILABLE_EXT: 0x8867,\n TIME_ELAPSED_EXT: 0x88bf,\n TIMESTAMP_EXT: 0x8e28,\n GPU_DISJOINT_EXT: 0x8fbb // A Boolean indicating whether or not the GPU performed any disjoint operation.\n };\n}\n","/* models/echarts.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const mouse_events = [\n 'click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout',\n 'globalout', 'contextmenu'\n ];\n const events = [\n 'highlight', 'downplay', 'selectchanged', 'legendselectchangedEvent', 'legendselected',\n 'legendunselected', 'legendselectall', 'legendinverseselect', 'legendscroll', 'datazoom',\n 'datarangeselected', 'timelineplaychanged', 'restore', 'dataviewchanged', 'magictypechanged',\n 'geoselectchanged', 'geoselected', 'geounselected', 'axisareaselected', 'brush', 'brushEnd',\n 'rushselected', 'globalcursortaken', 'rendered', 'finished'\n ];\n const all_events = mouse_events.concat(events);\n class EChartsEvent extends bokeh_events_1.ModelEvent {\n constructor(type, data, query) {\n super();\n this.type = type;\n this.data = data;\n this.query = query;\n }\n get event_values() {\n return { model: this.origin, type: this.type, data: this.data, query: this.query };\n }\n }\n exports.EChartsEvent = EChartsEvent;\n _a = EChartsEvent;\n EChartsEvent.__name__ = \"EChartsEvent\";\n (() => {\n _a.prototype.event_name = \"echarts_event\";\n })();\n class EChartsView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._callbacks = [];\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => this._plot());\n const { width, height, renderer, theme, event_config, js_events } = this.model.properties;\n this.on_change([width, height], () => this._resize());\n this.on_change([theme, renderer], () => this.render());\n this.on_change([event_config, js_events], () => this._subscribe());\n }\n render() {\n if (this._chart != null)\n window.echarts.dispose(this._chart);\n super.render();\n this.container = (0, dom_1.div)({ style: \"height: 100%; width: 100%;\" });\n const config = { width: this.model.width, height: this.model.height, renderer: this.model.renderer };\n this._chart = window.echarts.init(this.container, this.model.theme, config);\n this._plot();\n this._subscribe();\n this.shadow_el.append(this.container);\n }\n remove() {\n super.remove();\n if (this._chart != null)\n window.echarts.dispose(this._chart);\n }\n after_layout() {\n super.after_layout();\n this._chart.resize();\n }\n _plot() {\n if (window.echarts == null)\n return;\n this._chart.setOption(this.model.data, this.model.options);\n }\n _resize() {\n this._chart.resize({ width: this.model.width, height: this.model.height });\n }\n _subscribe() {\n if (window.echarts == null)\n return;\n for (const [event_type, callback] of this._callbacks)\n this._chart.off(event_type, callback);\n this._callbacks = [];\n for (const event_type in this.model.event_config) {\n if (!all_events.includes(event_type)) {\n console.warn(`Could not subscribe to unknown Echarts event: ${event_type}.`);\n continue;\n }\n const queries = this.model.event_config[event_type];\n for (const query of queries) {\n const callback = (event) => {\n var _c;\n const processed = Object.assign({}, event);\n processed.event = (0, event_to_object_1.serializeEvent)((_c = event.event) === null || _c === void 0 ? void 0 : _c.event);\n const serialized = JSON.parse(JSON.stringify(processed));\n this.model.trigger_event(new EChartsEvent(event_type, serialized, query));\n };\n if (query == null)\n this._chart.on(event_type, query, callback);\n else\n this._chart.on(event_type, callback);\n this._callbacks.push([event_type, callback]);\n }\n }\n for (const event_type in this.model.js_events) {\n if (!all_events.includes(event_type)) {\n console.warn(`Could not subscribe to unknown Echarts event: ${event_type}.`);\n continue;\n }\n const handlers = this.model.js_events[event_type];\n for (const handler of handlers) {\n const callback = (event) => {\n handler.callback.execute(this._chart, event);\n };\n if ('query' in handler)\n this._chart.on(event_type, handler.query, callback);\n else\n this._chart.on(event_type, callback);\n this._callbacks.push([event_type, callback]);\n }\n }\n }\n }\n exports.EChartsView = EChartsView;\n EChartsView.__name__ = \"EChartsView\";\n class ECharts extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.ECharts = ECharts;\n _b = ECharts;\n ECharts.__name__ = \"ECharts\";\n ECharts.__module__ = \"panel.models.echarts\";\n (() => {\n _b.prototype.default_view = EChartsView;\n _b.define(({ Any, String }) => ({\n data: [Any, {}],\n options: [Any, {}],\n event_config: [Any, {}],\n js_events: [Any, {}],\n theme: [String, \"default\"],\n renderer: [String, \"canvas\"]\n }));\n })();\n}\n","/* models/event-to-object.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /*\n The MIT License (MIT)\n \n Copyright (c) 2019 Ryan S. Morshead\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n function serializeEvent(event) {\n const data = {};\n // support for CustomEvents: the whole `detail` object is serialized\n if (event.detail !== undefined) {\n Object.assign(data, { detail: JSON.parse(JSON.stringify(event.detail)) });\n }\n if (event.type in eventTransforms) {\n Object.assign(data, eventTransforms[event.type](event));\n }\n data.target = serializeDomElement(event.target);\n data.currentTarget =\n event.target === event.currentTarget\n ? data.target\n : serializeDomElement(event.currentTarget);\n data.relatedTarget = serializeDomElement(event.relatedTarget);\n return data;\n }\n exports.serializeEvent = serializeEvent;\n function serializeDomElement(element) {\n let elementData = null;\n if (element) {\n elementData = defaultElementTransform(element);\n if (element.tagName in elementTransforms) {\n elementTransforms[element.tagName].forEach((trans) => Object.assign(elementData, trans(element)));\n }\n }\n return elementData;\n }\n const elementTransformCategories = {\n hasValue: (element) => ({\n value: element.value,\n }),\n hasCurrentTime: (element) => ({\n currentTime: element.currentTime,\n }),\n hasFiles: (element) => {\n if ((element === null || element === void 0 ? void 0 : element.type) === \"file\") {\n return {\n files: Array.from(element.files).map((file) => ({\n lastModified: file.lastModified,\n name: file.name,\n size: file.size,\n type: file.type,\n })),\n };\n }\n else {\n return {};\n }\n },\n };\n function defaultElementTransform(element) {\n try {\n return { boundingClientRect: Object.assign({}, element.getBoundingClientRect()) };\n }\n catch (_a) {\n return {};\n }\n }\n const elementTagCategories = {\n hasValue: [\n \"BUTTON\",\n \"INPUT\",\n \"OPTION\",\n \"LI\",\n \"METER\",\n \"PROGRESS\",\n \"PARAM\",\n \"SELECT\",\n \"TEXTAREA\",\n ],\n hasCurrentTime: [\"AUDIO\", \"VIDEO\"],\n hasFiles: [\"INPUT\"],\n };\n const elementTransforms = {};\n Object.keys(elementTagCategories).forEach((category) => {\n elementTagCategories[category].forEach((type) => {\n const transforms = elementTransforms[type] || (elementTransforms[type] = []);\n transforms.push(elementTransformCategories[category]);\n });\n });\n class EventTransformCategories {\n clipboard(event) {\n return {\n clipboardData: event.clipboardData,\n };\n }\n composition(event) {\n return {\n data: event.data,\n };\n }\n keyboard(event) {\n return {\n altKey: event.altKey,\n charCode: event.charCode,\n ctrlKey: event.ctrlKey,\n key: event.key,\n keyCode: event.keyCode,\n locale: event.locale,\n location: event.location,\n metaKey: event.metaKey,\n repeat: event.repeat,\n shiftKey: event.shiftKey,\n which: event.which,\n };\n }\n mouse(event) {\n return {\n altKey: event.altKey,\n button: event.button,\n buttons: event.buttons,\n clientX: event.clientX,\n clientY: event.clientY,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n pageX: event.pageX,\n pageY: event.pageY,\n screenX: event.screenX,\n screenY: event.screenY,\n shiftKey: event.shiftKey,\n };\n }\n pointer(event) {\n return Object.assign(Object.assign({}, this.mouse(event)), { pointerId: event.pointerId, width: event.width, height: event.height, pressure: event.pressure, tiltX: event.tiltX, tiltY: event.tiltY, pointerType: event.pointerType, isPrimary: event.isPrimary });\n }\n selection() {\n return {\n selectedText: window.getSelection().toString()\n };\n }\n ;\n touch(event) {\n return {\n altKey: event.altKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n shiftKey: event.shiftKey,\n };\n }\n ui(event) {\n return {\n detail: event.detail,\n };\n }\n wheel(event) {\n return {\n deltaMode: event.deltaMode,\n deltaX: event.deltaX,\n deltaY: event.deltaY,\n deltaZ: event.deltaZ,\n };\n }\n animation(event) {\n return {\n animationName: event.animationName,\n pseudoElement: event.pseudoElement,\n elapsedTime: event.elapsedTime,\n };\n }\n transition(event) {\n return {\n propertyName: event.propertyName,\n pseudoElement: event.pseudoElement,\n elapsedTime: event.elapsedTime,\n };\n }\n }\n EventTransformCategories.__name__ = \"EventTransformCategories\";\n const eventTypeCategories = {\n clipboard: [\"copy\", \"cut\", \"paste\"],\n composition: [\"compositionend\", \"compositionstart\", \"compositionupdate\"],\n keyboard: [\"keydown\", \"keypress\", \"keyup\"],\n mouse: [\n \"click\",\n \"contextmenu\",\n \"doubleclick\",\n \"drag\",\n \"dragend\",\n \"dragenter\",\n \"dragexit\",\n \"dragleave\",\n \"dragover\",\n \"dragstart\",\n \"drop\",\n \"mousedown\",\n \"mouseenter\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseout\",\n \"mouseover\",\n \"mouseup\",\n ],\n pointer: [\n \"pointerdown\",\n \"pointermove\",\n \"pointerup\",\n \"pointercancel\",\n \"gotpointercapture\",\n \"lostpointercapture\",\n \"pointerenter\",\n \"pointerleave\",\n \"pointerover\",\n \"pointerout\",\n ],\n selection: [\"select\"],\n touch: [\"touchcancel\", \"touchend\", \"touchmove\", \"touchstart\"],\n ui: [\"scroll\"],\n wheel: [\"wheel\"],\n animation: [\"animationstart\", \"animationend\", \"animationiteration\"],\n transition: [\"transitionend\"],\n };\n const eventTransforms = {};\n const eventTransformCategories = new EventTransformCategories();\n Object.keys(eventTypeCategories).forEach((category) => {\n eventTypeCategories[category].forEach((type) => {\n eventTransforms[type] = eventTransformCategories[category];\n });\n });\n}\n","/* models/file_download.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const icon_1 = require(\"@bokehjs/models/ui/icons/icon\");\n const buttons_css_1 = tslib_1.__importStar(require(\"@bokehjs/styles/buttons.css\")), buttons = buttons_css_1;\n const dom_1 = require(\"@bokehjs/core/dom\");\n function dataURItoBlob(dataURI) {\n // convert base64 to raw binary data held in a string\n const byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to an ArrayBuffer\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n // write the ArrayBuffer to a blob, and you're done\n var bb = new Blob([ab], { type: mimeString });\n return bb;\n }\n class FileDownloadView extends input_widget_1.InputWidgetView {\n constructor() {\n super(...arguments);\n this._downloadable = false;\n this._prev_href = \"\";\n this._prev_download = \"\";\n }\n *children() {\n yield* super.children();\n if (this.icon_view != null)\n yield this.icon_view;\n }\n *controls() {\n yield this.anchor_el;\n yield this.button_el;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.button_type.change, () => this._update_button_style());\n this.connect(this.model.properties.filename.change, () => this._update_download());\n this.connect(this.model.properties._transfers.change, () => this._handle_click());\n this.connect(this.model.properties.label.change, () => this._update_label());\n }\n remove() {\n if (this.icon_view != null)\n this.icon_view.remove();\n super.remove();\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { icon } = this.model;\n if (icon != null) {\n this.icon_view = await (0, build_views_1.build_view)(icon, { parent: this });\n }\n }\n render() {\n super.render();\n this.group_el.style.display = \"flex\";\n this.group_el.style.alignItems = \"stretch\";\n // Create an anchor HTML element that is styled as a bokeh button.\n // When its 'href' and 'download' attributes are set, it's a downloadable link:\n // * A click triggers a download\n // * A right click allows to \"Save as\" the file\n // There are three main cases:\n // 1. embed=True: The widget is a download link\n // 2. auto=False: The widget is first a button and becomes a download link after the first click\n // 3. auto=True: The widget is a button, i.e right click to \"Save as...\" won't work\n this.anchor_el = document.createElement('a');\n this.button_el = (0, dom_1.button)({\n disabled: this.model.disabled,\n type: \"bk_btn, bk_btn_type\",\n });\n if (this.icon_view != null) {\n const separator = this.model.label != \"\" ? (0, dom_1.nbsp)() : (0, dom_1.text)(\"\");\n (0, dom_1.prepend)(this.button_el, this.icon_view.el, separator);\n this.icon_view.render();\n }\n this._update_button_style();\n this._update_label();\n // Changing the disabled property calls render() so it needs to be handled here.\n // This callback is inherited from ControlView in bokehjs.\n if (this.model.disabled) {\n this.anchor_el.setAttribute(\"disabled\", \"\");\n this._downloadable = false;\n }\n else {\n this.anchor_el.removeAttribute(\"disabled\");\n // auto=False + toggle Disabled ==> Needs to reset the link as it was.\n if (this._prev_download)\n this.anchor_el.download = this._prev_download;\n if (this._prev_href)\n this.anchor_el.href = this._prev_href;\n if (this.anchor_el.download && this.anchor_el.download)\n this._downloadable = true;\n }\n // If embedded the button is just a download link.\n // Otherwise clicks will be handled by the code itself, allowing for more interactivity.\n if (this.model.embed)\n this._make_link_downloadable();\n else {\n // Add a \"click\" listener, note that it's not going to\n // handle right clicks (they won't increment 'clicks')\n this._click_listener = this._increment_clicks.bind(this);\n this.anchor_el.addEventListener(\"click\", this._click_listener);\n }\n this.button_el.appendChild(this.anchor_el);\n this.group_el.appendChild(this.button_el);\n }\n stylesheets() {\n return [...super.stylesheets(), buttons_css_1.default];\n }\n _increment_clicks() {\n this.model.clicks = this.model.clicks + 1;\n }\n _handle_click() {\n // When auto=False the button becomes a link which no longer\n // requires being updated.\n if ((!this.model.auto && this._downloadable) || this.anchor_el.hasAttribute(\"disabled\"))\n return;\n this._make_link_downloadable();\n if (!this.model.embed && this.model.auto) {\n // Temporarily removing the event listener to emulate a click\n // event on the anchor link which will trigger a download.\n this.anchor_el.removeEventListener(\"click\", this._click_listener);\n this.anchor_el.click();\n // In this case #3 the widget is not a link so these attributes are removed.\n this.anchor_el.removeAttribute(\"href\");\n this.anchor_el.removeAttribute(\"download\");\n this.anchor_el.addEventListener(\"click\", this._click_listener);\n }\n // Store the current state for handling changes of the disabled property.\n this._prev_href = this.anchor_el.getAttribute(\"href\");\n this._prev_download = this.anchor_el.getAttribute(\"download\");\n }\n _make_link_downloadable() {\n this._update_href();\n this._update_download();\n if (this.anchor_el.download && this.anchor_el.href) {\n this._downloadable = true;\n }\n }\n _update_href() {\n if (this.model.data) {\n const blob = dataURItoBlob(this.model.data);\n this.anchor_el.href = URL.createObjectURL(blob);\n }\n }\n _update_download() {\n if (this.model.filename) {\n this.anchor_el.download = this.model.filename;\n }\n }\n _update_label() {\n this.anchor_el.textContent = this.model.label;\n }\n _update_button_style() {\n const btn_type = buttons[`btn_${this.model.button_type}`];\n if (!this.button_el.hasAttribute(\"class\")) { // When the widget is rendered.\n this.button_el.classList.add(buttons.btn);\n this.button_el.classList.add(btn_type);\n }\n else { // When the button type is changed.\n const prev_button_type = this.anchor_el.classList.item(1);\n if (prev_button_type)\n this.button_el.classList.replace(prev_button_type, btn_type);\n }\n }\n }\n exports.FileDownloadView = FileDownloadView;\n FileDownloadView.__name__ = \"FileDownloadView\";\n class FileDownload extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.FileDownload = FileDownload;\n _a = FileDownload;\n FileDownload.__name__ = \"FileDownload\";\n FileDownload.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = FileDownloadView;\n _a.define(({ Boolean, Int, Nullable, Ref, String }) => ({\n auto: [Boolean, false],\n clicks: [Int, 0],\n data: [Nullable(String), null],\n embed: [Boolean, false],\n icon: [Nullable(Ref(icon_1.Icon)), null],\n label: [String, \"Download\"],\n filename: [Nullable(String), null],\n button_type: [enums_1.ButtonType, \"default\"],\n _transfers: [Int, 0],\n }));\n _a.override({\n title: \"\",\n });\n })();\n}\n","/* models/html.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n class DOMEvent extends bokeh_events_1.ModelEvent {\n constructor(node, data) {\n super();\n this.node = node;\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, node: this.node, data: this.data };\n }\n }\n exports.DOMEvent = DOMEvent;\n _a = DOMEvent;\n DOMEvent.__name__ = \"DOMEvent\";\n (() => {\n _a.prototype.event_name = \"dom_event\";\n })();\n function htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n exports.htmlDecode = htmlDecode;\n function runScripts(node) {\n Array.from(node.querySelectorAll(\"script\")).forEach((oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes)\n .forEach((attr) => newScript.setAttribute(attr.name, attr.value));\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n if (oldScript.parentNode)\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n }\n exports.runScripts = runScripts;\n class HTMLView extends layout_1.PanelMarkupView {\n constructor() {\n super(...arguments);\n this._event_listeners = {};\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => {\n const html = this.process_tex();\n this.set_html(html);\n });\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n });\n this.connect(this.model.properties.events.change, () => {\n this._remove_event_listeners();\n this._setup_event_listeners();\n });\n }\n rerender() {\n this.render();\n this.invalidate_layout();\n }\n set_html(html) {\n if (html) {\n this.container.innerHTML = html;\n if (this.model.run_scripts)\n runScripts(this.container);\n this._setup_event_listeners();\n }\n }\n render() {\n super.render();\n this.container.style.visibility = 'hidden';\n this.shadow_el.appendChild(this.container);\n if (this.provider.status == \"failed\" || this.provider.status == \"loaded\")\n this._has_finished = true;\n const html = this.process_tex();\n this.watch_stylesheets();\n this.set_html(html);\n }\n style_redraw() {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n }\n process_tex() {\n const decoded = htmlDecode(this.model.text);\n const text = decoded || this.model.text;\n if (this.model.disable_math || !this.contains_tex(text))\n return text;\n const tex_parts = this.provider.MathJax.find_tex(text);\n const processed_text = [];\n let last_index = 0;\n for (const part of tex_parts) {\n processed_text.push(text.slice(last_index, part.start.n));\n processed_text.push(this.provider.MathJax.tex2svg(part.math, { display: part.display }).outerHTML);\n last_index = part.end.n;\n }\n if (last_index < text.length)\n processed_text.push(text.slice(last_index));\n return processed_text.join(\"\");\n }\n contains_tex(html) {\n if (!this.provider.MathJax)\n return false;\n return this.provider.MathJax.find_tex(html).length > 0;\n }\n _remove_event_listeners() {\n for (const node in this._event_listeners) {\n const el = document.getElementById(node);\n if (el == null) {\n console.warn(`DOM node '${node}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n for (const event_name in this._event_listeners[node]) {\n const event_callback = this._event_listeners[node][event_name];\n el.removeEventListener(event_name, event_callback);\n }\n }\n this._event_listeners = {};\n }\n _setup_event_listeners() {\n for (const node in this.model.events) {\n const el = document.getElementById(node);\n if (el == null) {\n console.warn(`DOM node '${node}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n for (const event_name of this.model.events[node]) {\n const callback = (event) => {\n this.model.trigger_event(new DOMEvent(node, (0, event_to_object_1.serializeEvent)(event)));\n };\n el.addEventListener(event_name, callback);\n if (!(node in this._event_listeners))\n this._event_listeners[node] = {};\n this._event_listeners[node][event_name] = callback;\n }\n }\n }\n }\n exports.HTMLView = HTMLView;\n HTMLView.__name__ = \"HTMLView\";\n class HTML extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.HTML = HTML;\n _b = HTML;\n HTML.__name__ = \"HTML\";\n HTML.__module__ = \"panel.models.markup\";\n (() => {\n _b.prototype.default_view = HTMLView;\n _b.define(({ Any, Boolean }) => ({\n events: [Any, {}],\n run_scripts: [Boolean, true]\n }));\n })();\n}\n","/* models/ipywidget.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const Jupyter = window.Jupyter;\n class IPyWidgetView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n let manager;\n if ((Jupyter != null) && (Jupyter.notebook != null))\n manager = Jupyter.notebook.kernel.widget_manager;\n else if (window.PyViz.widget_manager != null)\n manager = window.PyViz.widget_manager;\n else {\n console.warn(\"Panel IPyWidget model could not find a WidgetManager\");\n return;\n }\n this.manager = manager;\n this.ipychildren = [];\n }\n remove() {\n this.ipyview.remove();\n super.remove();\n }\n _ipy_stylesheets() {\n const stylesheets = [];\n for (const child of document.head.children) {\n if (child instanceof HTMLStyleElement) {\n const raw_css = child.textContent;\n if (raw_css != null) {\n const css = raw_css.replace(/:root/g, \":host\");\n stylesheets.push(new dom_1.InlineStyleSheet(css));\n }\n }\n }\n return stylesheets;\n }\n stylesheets() {\n return [...super.stylesheets(), ...this._ipy_stylesheets()];\n }\n render() {\n super.render();\n const { spec, state } = this.model.bundle;\n this.manager.set_state(state).then(async (models) => {\n const model = models.find((item) => item.model_id == spec.model_id);\n if (model == null)\n return;\n const view = await this.manager.create_view(model, { el: this.el });\n this.ipyview = view;\n this.ipychildren = [];\n if (view.children_views) {\n for (const child of view.children_views.views)\n this.ipychildren.push(await child);\n }\n this.shadow_el.appendChild(this.ipyview.el);\n this.ipyview.trigger('displayed', this.ipyview);\n for (const child of this.ipychildren)\n child.trigger('displayed', child);\n this.invalidate_layout();\n });\n }\n }\n exports.IPyWidgetView = IPyWidgetView;\n IPyWidgetView.__name__ = \"IPyWidgetView\";\n class IPyWidget extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.IPyWidget = IPyWidget;\n _a = IPyWidget;\n IPyWidget.__name__ = \"IPyWidget\";\n IPyWidget.__module__ = \"panel.models.ipywidget\";\n (() => {\n _a.prototype.default_view = IPyWidgetView;\n _a.define(({ Any }) => ({\n bundle: [Any, {}],\n }));\n })();\n}\n","/* models/json.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const json_formatter_js_1 = tslib_1.__importDefault(require(\"18bba7b7e1\") /* json-formatter-js */);\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class JSONView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n const { depth, hover_preview, text, theme } = this.model.properties;\n this.on_change([depth, hover_preview, text, theme], () => this.render());\n }\n render() {\n super.render();\n const text = this.model.text.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n let json;\n try {\n json = window.JSON.parse(text);\n }\n catch (err) {\n this.container.innerHTML = \"<b>Invalid JSON:</b> \" + err.toString();\n return;\n }\n const config = { hoverPreviewEnabled: this.model.hover_preview, theme: this.model.theme };\n const depth = this.model.depth == null ? Infinity : this.model.depth;\n const formatter = new json_formatter_js_1.default(json, depth, config);\n const rendered = formatter.render();\n let style = \"border-radius: 5px; padding: 10px; width: 100%; height: 100%;\";\n if (this.model.theme == \"dark\")\n rendered.style.cssText = \"background-color: rgb(30, 30, 30);\" + style;\n else\n rendered.style.cssText = style;\n this.container.append(rendered);\n }\n }\n exports.JSONView = JSONView;\n JSONView.__name__ = \"JSONView\";\n exports.JSONTheme = (0, kinds_1.Enum)(\"dark\", \"light\");\n class JSON extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.JSON = JSON;\n _a = JSON;\n JSON.__name__ = \"JSON\";\n JSON.__module__ = \"panel.models.markup\";\n (() => {\n _a.prototype.default_view = JSONView;\n _a.define(({ Array, Boolean, Int, Nullable, String }) => ({\n css: [Array(String), []],\n depth: [Nullable(Int), 1],\n hover_preview: [Boolean, false],\n theme: [exports.JSONTheme, \"dark\"],\n }));\n })();\n}\n","/* json-formatter-js/dist/json-formatter.esm.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function t(t) { return null === t ? \"null\" : typeof t; }\n function e(t) { return !!t && \"object\" == typeof t; }\n function r(t) {\n if (void 0 === t)\n return \"\";\n if (null === t)\n return \"Object\";\n if (\"object\" == typeof t && !t.constructor)\n return \"Object\";\n var e = /function ([^(]*)/.exec(t.constructor.toString());\n return e && e.length > 1 ? e[1] : \"\";\n }\n function n(t, e, r) { return \"null\" === t || \"undefined\" === t ? t : (\"string\" !== t && \"stringifiable\" !== t || (r = '\"' + r.replace(/\"/g, '\\\\\"') + '\"'), \"function\" === t ? e.toString().replace(/[\\r\\n]/g, \"\").replace(/\\{.*\\}/, \"\") + \"{…}\" : r); }\n function o(o) { var i = \"\"; return e(o) ? (i = r(o), Array.isArray(o) && (i += \"[\" + o.length + \"]\")) : i = n(t(o), o, o), i; }\n function i(t) { return \"json-formatter-\" + t; }\n function s(t, e, r) { var n = document.createElement(t); return e && n.classList.add(i(e)), void 0 !== r && (r instanceof Node ? n.appendChild(r) : n.appendChild(document.createTextNode(String(r)))), n; }\n !function (t) {\n if (t && \"undefined\" != typeof window) {\n var e = document.createElement(\"style\");\n e.setAttribute(\"media\", \"screen\"), e.innerHTML = t, document.head.appendChild(e);\n }\n }('.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n');\n var a = /(^\\d{1,4}[\\.|\\\\/|-]\\d{1,2}[\\.|\\\\/|-]\\d{1,4})(\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\d:[0-5])\\d\\s*[ap]m)?$/, f = /\\d{2}:\\d{2}:\\d{2} GMT-\\d{4}/, m = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/, l = window.requestAnimationFrame || function (t) { return t(), 0; }, d = { hoverPreviewEnabled: !1, hoverPreviewArrayCount: 100, hoverPreviewFieldCount: 5, animateOpen: !0, animateClose: !0, theme: null, useToJSON: !0, sortPropertiesBy: null }, c = function () {\n function c(t, e, r, n) { void 0 === e && (e = 1), void 0 === r && (r = d), this.json = t, this.open = e, this.config = r, this.key = n, this._isOpen = null, void 0 === this.config.hoverPreviewEnabled && (this.config.hoverPreviewEnabled = d.hoverPreviewEnabled), void 0 === this.config.hoverPreviewArrayCount && (this.config.hoverPreviewArrayCount = d.hoverPreviewArrayCount), void 0 === this.config.hoverPreviewFieldCount && (this.config.hoverPreviewFieldCount = d.hoverPreviewFieldCount), void 0 === this.config.useToJSON && (this.config.useToJSON = d.useToJSON), \"\" === this.key && (this.key = '\"\"'); }\n return Object.defineProperty(c.prototype, \"isOpen\", { get: function () { return null !== this._isOpen ? this._isOpen : this.open > 0; }, set: function (t) { this._isOpen = t; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isDate\", { get: function () { return this.json instanceof Date || \"string\" === this.type && (a.test(this.json) || m.test(this.json) || f.test(this.json)); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isUrl\", { get: function () { return \"string\" === this.type && 0 === this.json.indexOf(\"http\"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isArray\", { get: function () { return Array.isArray(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isObject\", { get: function () { return e(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isEmptyObject\", { get: function () { return !this.keys.length && !this.isArray; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isEmpty\", { get: function () { return this.isEmptyObject || this.keys && !this.keys.length && this.isArray; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"useToJSON\", { get: function () { return this.config.useToJSON && \"stringifiable\" === this.type; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"hasKey\", { get: function () { return void 0 !== this.key; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"constructorName\", { get: function () { return r(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"type\", { get: function () { return this.config.useToJSON && this.json && this.json.toJSON ? \"stringifiable\" : t(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"keys\", { get: function () {\n if (this.isObject) {\n var t = Object.keys(this.json);\n return !this.isArray && this.config.sortPropertiesBy ? t.sort(this.config.sortPropertiesBy) : t;\n }\n return [];\n }, enumerable: !0, configurable: !0 }), c.prototype.toggleOpen = function () { this.isOpen = !this.isOpen, this.element && (this.isOpen ? this.appendChildren(this.config.animateOpen) : this.removeChildren(this.config.animateClose), this.element.classList.toggle(i(\"open\"))); }, c.prototype.openAtDepth = function (t) { void 0 === t && (t = 1), t < 0 || (this.open = t, this.isOpen = 0 !== t, this.element && (this.removeChildren(!1), 0 === t ? this.element.classList.remove(i(\"open\")) : (this.appendChildren(this.config.animateOpen), this.element.classList.add(i(\"open\"))))); }, c.prototype.getInlinepreview = function () {\n var t = this;\n if (this.isArray)\n return this.json.length > this.config.hoverPreviewArrayCount ? \"Array[\" + this.json.length + \"]\" : \"[\" + this.json.map(o).join(\", \") + \"]\";\n var e = this.keys, r = e.slice(0, this.config.hoverPreviewFieldCount).map((function (e) { return e + \":\" + o(t.json[e]); })), n = e.length >= this.config.hoverPreviewFieldCount ? \"…\" : \"\";\n return \"{\" + r.join(\", \") + n + \"}\";\n }, c.prototype.render = function () {\n this.element = s(\"div\", \"row\");\n var t = this.isObject ? s(\"a\", \"toggler-link\") : s(\"span\");\n if (this.isObject && !this.useToJSON && t.appendChild(s(\"span\", \"toggler\")), this.hasKey && t.appendChild(s(\"span\", \"key\", this.key + \":\")), this.isObject && !this.useToJSON) {\n var e = s(\"span\", \"value\"), r = s(\"span\"), o = s(\"span\", \"constructor-name\", this.constructorName);\n if (r.appendChild(o), this.isArray) {\n var a = s(\"span\");\n a.appendChild(s(\"span\", \"bracket\", \"[\")), a.appendChild(s(\"span\", \"number\", this.json.length)), a.appendChild(s(\"span\", \"bracket\", \"]\")), r.appendChild(a);\n }\n e.appendChild(r), t.appendChild(e);\n }\n else {\n (e = this.isUrl ? s(\"a\") : s(\"span\")).classList.add(i(this.type)), this.isDate && e.classList.add(i(\"date\")), this.isUrl && (e.classList.add(i(\"url\")), e.setAttribute(\"href\", this.json));\n var f = n(this.type, this.json, this.useToJSON ? this.json.toJSON() : this.json);\n e.appendChild(document.createTextNode(f)), t.appendChild(e);\n }\n if (this.isObject && this.config.hoverPreviewEnabled) {\n var m = s(\"span\", \"preview-text\");\n m.appendChild(document.createTextNode(this.getInlinepreview())), t.appendChild(m);\n }\n var l = s(\"div\", \"children\");\n return this.isObject && l.classList.add(i(\"object\")), this.isArray && l.classList.add(i(\"array\")), this.isEmpty && l.classList.add(i(\"empty\")), this.config && this.config.theme && this.element.classList.add(i(this.config.theme)), this.isOpen && this.element.classList.add(i(\"open\")), this.element.appendChild(t), this.element.appendChild(l), this.isObject && this.isOpen && this.appendChildren(), this.isObject && !this.useToJSON && t.addEventListener(\"click\", this.toggleOpen.bind(this)), this.element;\n }, c.prototype.appendChildren = function (t) {\n var e = this;\n void 0 === t && (t = !1);\n var r = this.element.querySelector(\"div.\" + i(\"children\"));\n if (r && !this.isEmpty)\n if (t) {\n var n = 0, o = function () { var t = e.keys[n], i = new c(e.json[t], e.open - 1, e.config, t); r.appendChild(i.render()), (n += 1) < e.keys.length && (n > 10 ? o() : l(o)); };\n l(o);\n }\n else\n this.keys.forEach((function (t) { var n = new c(e.json[t], e.open - 1, e.config, t); r.appendChild(n.render()); }));\n }, c.prototype.removeChildren = function (t) {\n void 0 === t && (t = !1);\n var e = this.element.querySelector(\"div.\" + i(\"children\"));\n if (t) {\n var r = 0, n = function () { e && e.children.length && (e.removeChild(e.children[0]), (r += 1) > 10 ? n() : l(n)); };\n l(n);\n }\n else\n e && (e.innerHTML = \"\");\n }, c;\n }();\n exports.default = c;\n}\n","/* models/jsoneditor.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class JSONEditEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.JSONEditEvent = JSONEditEvent;\n _a = JSONEditEvent;\n JSONEditEvent.__name__ = \"JSONEditEvent\";\n (() => {\n _a.prototype.event_name = \"json_edit\";\n })();\n class JSONEditorView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n const { data, disabled, templates, menu, mode, search, schema } = this.model.properties;\n this.on_change([data], () => this.editor.update(this.model.data));\n this.on_change([templates], () => {\n this.editor.options.templates = this.model.templates;\n });\n this.on_change([menu], () => {\n this.editor.options.menu = this.model.menu;\n });\n this.on_change([search], () => {\n this.editor.options.search = this.model.search;\n });\n this.on_change([schema], () => {\n this.editor.options.schema = this.model.schema;\n });\n this.on_change([disabled, mode], () => {\n const mode = this.model.disabled ? 'view' : this.model.mode;\n this.editor.setMode(mode);\n });\n }\n stylesheets() {\n const styles = super.stylesheets();\n for (const css of this.model.css)\n styles.push(new dom_1.ImportedStyleSheet(css));\n return styles;\n }\n remove() {\n super.remove();\n this.editor.destroy();\n }\n render() {\n super.render();\n const mode = this.model.disabled ? 'view' : this.model.mode;\n this.editor = new window.JSONEditor(this.shadow_el, {\n menu: this.model.menu,\n mode: mode,\n onChangeJSON: (json) => {\n this.model.data = json;\n },\n onSelectionChange: (start, end) => {\n this.model.selection = [start, end];\n },\n search: this.model.search,\n schema: this.model.schema,\n templates: this.model.templates,\n });\n this.editor.set(this.model.data);\n }\n }\n exports.JSONEditorView = JSONEditorView;\n JSONEditorView.__name__ = \"JSONEditorView\";\n class JSONEditor extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.JSONEditor = JSONEditor;\n _b = JSONEditor;\n JSONEditor.__name__ = \"JSONEditor\";\n JSONEditor.__module__ = \"panel.models.jsoneditor\";\n (() => {\n _b.prototype.default_view = JSONEditorView;\n _b.define(({ Any, Array, Boolean, String }) => ({\n css: [Array(String), []],\n data: [Any, {}],\n mode: [String, 'tree'],\n menu: [Boolean, true],\n search: [Boolean, true],\n selection: [Array(Any), []],\n schema: [Any, null],\n templates: [Array(Any), []],\n }));\n })();\n}\n","/* models/katex.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class KaTeXView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => this.render());\n }\n render() {\n super.render();\n this.container.innerHTML = this.model.text;\n if (!window.renderMathInElement) {\n return;\n }\n window.renderMathInElement(this.shadow_el, {\n delimiters: [\n { left: \"$$\", right: \"$$\", display: true },\n { left: \"\\\\[\", right: \"\\\\]\", display: true },\n { left: \"$\", right: \"$\", display: false },\n { left: \"\\\\(\", right: \"\\\\)\", display: false }\n ]\n });\n }\n }\n exports.KaTeXView = KaTeXView;\n KaTeXView.__name__ = \"KaTeXView\";\n class KaTeX extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.KaTeX = KaTeX;\n _a = KaTeX;\n KaTeX.__name__ = \"KaTeX\";\n KaTeX.__module__ = \"panel.models.katex\";\n (() => {\n _a.prototype.default_view = KaTeXView;\n })();\n}\n","/* models/location.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n class LocationView extends view_1.View {\n initialize() {\n super.initialize();\n this.model.pathname = window.location.pathname;\n this.model.search = window.location.search;\n this.model.hash = window.location.hash;\n // Readonly parameters on python side\n this.model.href = window.location.href;\n this.model.hostname = window.location.hostname;\n this.model.protocol = window.location.protocol;\n this.model.port = window.location.port;\n this._hash_listener = () => {\n this.model.hash = window.location.hash;\n };\n window.addEventListener('hashchange', this._hash_listener);\n this._has_finished = true;\n this.notify_finished();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.pathname.change, () => this.update('pathname'));\n this.connect(this.model.properties.search.change, () => this.update('search'));\n this.connect(this.model.properties.hash.change, () => this.update('hash'));\n this.connect(this.model.properties.reload.change, () => this.update('reload'));\n }\n remove() {\n super.remove();\n window.removeEventListener('hashchange', this._hash_listener);\n }\n update(change) {\n if (!this.model.reload || (change === 'reload')) {\n window.history.pushState({}, '', `${this.model.pathname}${this.model.search}${this.model.hash}`);\n this.model.href = window.location.href;\n if (change === 'reload')\n window.location.reload();\n }\n else {\n if (change == 'pathname')\n window.location.pathname = this.model.pathname;\n if (change == 'search')\n window.location.search = this.model.search;\n if (change == 'hash')\n window.location.hash = this.model.hash;\n }\n }\n }\n exports.LocationView = LocationView;\n LocationView.__name__ = \"LocationView\";\n class Location extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Location = Location;\n _a = Location;\n Location.__name__ = \"Location\";\n Location.__module__ = \"panel.models.location\";\n (() => {\n _a.prototype.default_view = LocationView;\n _a.define(({ Boolean, String }) => ({\n href: [String, \"\"],\n hostname: [String, \"\"],\n pathname: [String, \"\"],\n protocol: [String, \"\"],\n port: [String, \"\"],\n search: [String, \"\"],\n hash: [String, \"\"],\n reload: [Boolean, false],\n }));\n })();\n}\n","/* models/mathjax.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class MathJaxView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => this.render());\n }\n render() {\n super.render();\n this.container.innerHTML = this.has_math_disabled() ? this.model.text : this.process_tex(this.model.text);\n }\n }\n exports.MathJaxView = MathJaxView;\n MathJaxView.__name__ = \"MathJaxView\";\n class MathJax extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.MathJax = MathJax;\n _a = MathJax;\n MathJax.__name__ = \"MathJax\";\n MathJax.__module__ = \"panel.models.mathjax\";\n (() => {\n _a.prototype.default_view = MathJaxView;\n })();\n}\n","/* models/pdf.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const html_1 = require(\"3db2e41978\") /* ./html */;\n class PDFView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n const p = this.model.properties;\n const { text, width, height, embed, start_page } = p;\n this.on_change([text, width, height, embed, start_page], () => {\n this.update();\n });\n }\n render() {\n super.render();\n this.update();\n }\n update() {\n if (this.model.embed) {\n const blob = this.convert_base64_to_blob();\n const url = URL.createObjectURL(blob);\n const w = this.model.width || \"100%\";\n const h = this.model.height || \"100%\";\n this.container.innerHTML = `<embed src=\"${url}#page=${this.model.start_page}\" type=\"application/pdf\" width=\"${w}\" height=\"${h}\"></embed>`;\n }\n else {\n const html = (0, html_1.htmlDecode)(this.model.text);\n this.container.innerHTML = html || \"\";\n }\n }\n convert_base64_to_blob() {\n const byteCharacters = atob(this.model.text);\n const sliceSize = 512;\n var byteArrays = [];\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n const slice = byteCharacters.slice(offset, offset + sliceSize);\n const byteNumbers = new Uint8Array(slice.length);\n for (let i = 0; i < slice.length; i++) {\n byteNumbers[i] = slice.charCodeAt(i);\n }\n byteArrays.push(byteNumbers);\n }\n return new Blob(byteArrays, { type: \"application/pdf\" });\n }\n }\n exports.PDFView = PDFView;\n PDFView.__name__ = \"PDFView\";\n class PDF extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PDF = PDF;\n _a = PDF;\n PDF.__name__ = \"PDF\";\n PDF.__module__ = \"panel.models.markup\";\n (() => {\n _a.prototype.default_view = PDFView;\n _a.define(({ Number, Boolean }) => ({\n embed: [Boolean, true],\n start_page: [Number, 1],\n }));\n })();\n}\n","/* models/perspective.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const THEMES = {\n 'material-dark': 'Material Dark',\n 'material': 'Material Light',\n 'vaporwave': 'Vaporwave',\n 'solarized': 'Solarized',\n 'solarized-dark': 'Solarized Dark',\n 'monokai': 'Monokai'\n };\n const PLUGINS = {\n 'datagrid': 'Datagrid',\n 'd3_x_bar': 'X Bar',\n 'd3_y_bar': 'Y Bar',\n 'd3_xy_line': 'X/Y Line',\n 'd3_y_line': 'Y Line',\n 'd3_y_area': 'Y Area',\n 'd3_y_scatter': 'Y Scatter',\n 'd3_xy_scatter': 'X/Y Scatter',\n 'd3_treemap': 'Treemap',\n 'd3_candlestick': 'Candlestick',\n 'd3_sunburst': 'Sunburst',\n 'd3_heatmap': 'Heatmap',\n 'd3_ohlc': 'OHLC'\n };\n function objectFlip(obj) {\n const ret = {};\n Object.keys(obj).forEach(key => {\n ret[obj[key]] = key;\n });\n return ret;\n }\n const PLUGINS_REVERSE = objectFlip(PLUGINS);\n const THEMES_REVERSE = objectFlip(THEMES);\n class PerspectiveClickEvent extends bokeh_events_1.ModelEvent {\n constructor(config, column_names, row) {\n super();\n this.config = config;\n this.column_names = column_names;\n this.row = row;\n }\n get event_values() {\n return { model: this.origin, config: this.config, column_names: this.column_names, row: this.row };\n }\n }\n exports.PerspectiveClickEvent = PerspectiveClickEvent;\n _a = PerspectiveClickEvent;\n PerspectiveClickEvent.__name__ = \"PerspectiveClickEvent\";\n (() => {\n _a.prototype.event_name = \"perspective-click\";\n })();\n class PerspectiveView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._updating = false;\n this._config_listener = null;\n this._current_config = null;\n this._loaded = false;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.source.properties.data.change, () => this.setData());\n this.connect(this.model.source.streaming, () => this.stream());\n this.connect(this.model.source.patching, () => this.patch());\n this.connect(this.model.properties.schema.change, () => {\n this.worker.table(this.model.schema).then((table) => {\n this.table = table;\n this.table.update(this.data);\n this.perspective_element.load(this.table);\n });\n });\n this.connect(this.model.properties.toggle_config.change, () => {\n this.perspective_element.toggleConfig();\n });\n this.connect(this.model.properties.columns.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"columns\": this.model.columns });\n });\n this.connect(this.model.properties.expressions.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"expressions\": this.model.expressions });\n });\n this.connect(this.model.properties.split_by.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"split_by\": this.model.split_by });\n });\n this.connect(this.model.properties.group_by.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"group_by\": this.model.group_by });\n });\n this.connect(this.model.properties.aggregates.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"aggregates\": this.model.aggregates });\n });\n this.connect(this.model.properties.filters.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"filter\": this.model.filters });\n });\n this.connect(this.model.properties.sort.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"sort\": this.model.sort });\n });\n this.connect(this.model.properties.plugin.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin\": PLUGINS[this.model.plugin] });\n });\n this.connect(this.model.properties.selectable.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin_config\": Object.assign(Object.assign({}, this._current_config), { selectable: this.model.selectable }) });\n });\n this.connect(this.model.properties.editable.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin_config\": Object.assign(Object.assign({}, this._current_config), { editable: this.model.editable }) });\n });\n this.connect(this.model.properties.theme.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"theme\": THEMES[this.model.theme] }).catch(() => { });\n });\n }\n disconnect_signals() {\n if (this._config_listener != null)\n this.perspective_element.removeEventListener(\"perspective-config-update\", this._config_listener);\n this._config_listener = null;\n super.disconnect_signals();\n }\n remove() {\n this.perspective_element.delete(() => this.worker.terminate());\n super.remove();\n }\n render() {\n super.render();\n this.worker = window.perspective.worker();\n const container = (0, dom_1.div)({\n class: \"pnx-perspective-viewer\",\n style: {\n zIndex: 0,\n }\n });\n container.innerHTML = \"<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>\";\n this.perspective_element = container.children[0];\n this.perspective_element.resetThemes([...Object.values(THEMES)]).catch(() => { });\n if (this.model.toggle_config)\n this.perspective_element.toggleConfig();\n (0, layout_1.set_size)(container, this.model);\n this.shadow_el.appendChild(container);\n this.worker.table(this.model.schema).then((table) => {\n this.table = table;\n this.table.update(this.data);\n this.perspective_element.load(this.table);\n const plugin_config = Object.assign(Object.assign({}, this.model.plugin_config), { editable: this.model.editable, selectable: this.model.selectable });\n this.perspective_element.restore({\n aggregates: this.model.aggregates,\n columns: this.model.columns,\n expressions: this.model.expressions,\n filter: this.model.filters,\n split_by: this.model.split_by,\n group_by: this.model.group_by,\n plugin: PLUGINS[this.model.plugin],\n plugin_config: plugin_config,\n sort: this.model.sort,\n theme: THEMES[this.model.theme]\n }).catch(() => { });\n this.perspective_element.save().then((config) => {\n this._current_config = config;\n });\n this._config_listener = () => this.sync_config();\n this.perspective_element.addEventListener(\"perspective-config-update\", this._config_listener);\n this.perspective_element.addEventListener(\"perspective-click\", (event) => {\n this.model.trigger_event(new PerspectiveClickEvent(event.detail.config, event.detail.column_names, event.detail.row));\n });\n this._loaded = true;\n });\n }\n sync_config() {\n if (this._updating)\n return true;\n this.perspective_element.save().then((config) => {\n this._current_config = config;\n const props = {};\n for (let option in config) {\n let value = config[option];\n if (value === undefined || (option == 'plugin' && value === \"debug\") || option === 'settings')\n continue;\n if (option === 'filter')\n option = 'filters';\n else if (option === 'plugin')\n value = PLUGINS_REVERSE[value];\n else if (option === 'theme')\n value = THEMES_REVERSE[value];\n props[option] = value;\n }\n this._updating = true;\n this.model.setv(props);\n this._updating = false;\n });\n return true;\n }\n get data() {\n const data = {};\n for (const column of this.model.source.columns())\n data[column] = this.model.source.get_array(column);\n return data;\n }\n setData() {\n if (!this._loaded)\n return;\n for (const col of this.model.source.columns()) {\n if (!(col in this.model.schema))\n return;\n }\n this.table.replace(this.data);\n }\n stream() {\n if (this._loaded)\n this.table.replace(this.data);\n }\n patch() {\n if (this._loaded)\n this.table.replace(this.data);\n }\n }\n exports.PerspectiveView = PerspectiveView;\n PerspectiveView.__name__ = \"PerspectiveView\";\n class Perspective extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Perspective = Perspective;\n _b = Perspective;\n Perspective.__name__ = \"Perspective\";\n Perspective.__module__ = \"panel.models.perspective\";\n (() => {\n _b.prototype.default_view = PerspectiveView;\n _b.define(({ Any, Array, Boolean, Ref, Nullable, String }) => ({\n aggregates: [Any, {}],\n columns: [Array(Nullable(String)), []],\n expressions: [Nullable(Array(String)), null],\n split_by: [Nullable(Array(String)), null],\n editable: [Boolean, true],\n filters: [Nullable(Array(Any)), null],\n group_by: [Nullable(Array(String)), null],\n plugin: [String,],\n plugin_config: [Any, {}],\n selectable: [Boolean, true],\n schema: [Any, {}],\n toggle_config: [Boolean, true],\n sort: [Nullable(Array(Array(String))), null],\n source: [Ref(column_data_source_1.ColumnDataSource),],\n theme: [String, 'material']\n }));\n })();\n}\n","/* models/player.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const widget_1 = require(\"@bokehjs/models/widgets/widget\");\n function press(btn_list) {\n btn_list.forEach((btn) => btn.style.borderStyle = 'inset');\n }\n function unpress(btn_list) {\n btn_list.forEach((btn) => btn.style.borderStyle = 'outset');\n }\n class PlayerView extends widget_1.WidgetView {\n constructor() {\n super(...arguments);\n this._changing = false;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.direction.change, () => this.set_direction());\n this.connect(this.model.properties.value.change, () => this.render());\n this.connect(this.model.properties.loop_policy.change, () => this.set_loop_state(this.model.loop_policy));\n this.connect(this.model.properties.disabled.change, () => this.toggle_disable());\n this.connect(this.model.properties.show_loop_controls.change, () => {\n if (this.model.show_loop_controls && this.loop_state.parentNode != this.groupEl)\n this.groupEl.appendChild(this.loop_state);\n else if (!this.model.show_loop_controls && this.loop_state.parentNode == this.groupEl)\n this.groupEl.removeChild(this.loop_state);\n });\n }\n toggle_disable() {\n this.sliderEl.disabled = this.model.disabled;\n for (const el of this.buttonEl.children) {\n const anyEl = el;\n anyEl.disabled = this.model.disabled;\n }\n for (const el of this.loop_state.children) {\n if (el.tagName == \"input\") {\n const anyEl = el;\n anyEl.disabled = this.model.disabled;\n }\n }\n }\n get_height() {\n return 250;\n }\n render() {\n if (this.sliderEl == null) {\n super.render();\n }\n else {\n this.sliderEl.min = String(this.model.start);\n this.sliderEl.max = String(this.model.end);\n this.sliderEl.value = String(this.model.value);\n return;\n }\n // Layout to group the elements\n this.groupEl = (0, dom_1.div)();\n this.groupEl.style.display = \"flex\";\n this.groupEl.style.flexDirection = \"column\";\n this.groupEl.style.alignItems = \"center\";\n // Slider\n this.sliderEl = document.createElement('input');\n this.sliderEl.style.width = \"100%\";\n this.sliderEl.setAttribute(\"type\", \"range\");\n this.sliderEl.value = String(this.model.value);\n this.sliderEl.min = String(this.model.start);\n this.sliderEl.max = String(this.model.end);\n this.sliderEl.addEventListener('input', (ev) => {\n this.set_frame(parseInt(ev.target.value), false);\n });\n this.sliderEl.addEventListener('change', (ev) => {\n this.set_frame(parseInt(ev.target.value));\n });\n // Buttons\n const button_div = (0, dom_1.div)();\n this.buttonEl = button_div;\n button_div.style.cssText = \"margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;\";\n const button_style_small = \"text-align: center; min-width: 20px; flex-grow: 1; margin: 2px\";\n const button_style = \"text-align: center; min-width: 40px; flex-grow: 2; margin: 2px\";\n const slower = document.createElement('button');\n slower.style.cssText = button_style_small;\n slower.appendChild(document.createTextNode('–'));\n slower.onclick = () => this.slower();\n button_div.appendChild(slower);\n const first = document.createElement('button');\n first.style.cssText = button_style;\n first.appendChild(document.createTextNode('\\u275a\\u25c0\\u25c0'));\n first.onclick = () => this.first_frame();\n button_div.appendChild(first);\n const previous = document.createElement('button');\n previous.style.cssText = button_style;\n previous.appendChild(document.createTextNode('\\u275a\\u25c0'));\n previous.onclick = () => this.previous_frame();\n button_div.appendChild(previous);\n const reverse = document.createElement('button');\n reverse.style.cssText = button_style;\n reverse.appendChild(document.createTextNode('\\u25c0'));\n reverse.onclick = () => this.reverse_animation();\n button_div.appendChild(reverse);\n const pause = document.createElement('button');\n pause.style.cssText = button_style;\n pause.appendChild(document.createTextNode('\\u275a\\u275a'));\n pause.onclick = () => this.pause_animation();\n button_div.appendChild(pause);\n const play = document.createElement('button');\n play.style.cssText = button_style;\n play.appendChild(document.createTextNode('\\u25b6'));\n play.onclick = () => this.play_animation();\n button_div.appendChild(play);\n const next = document.createElement('button');\n next.style.cssText = button_style;\n next.appendChild(document.createTextNode('\\u25b6\\u275a'));\n next.onclick = () => this.next_frame();\n button_div.appendChild(next);\n const last = document.createElement('button');\n last.style.cssText = button_style;\n last.appendChild(document.createTextNode('\\u25b6\\u25b6\\u275a'));\n last.onclick = () => this.last_frame();\n button_div.appendChild(last);\n const faster = document.createElement('button');\n faster.style.cssText = button_style_small;\n faster.appendChild(document.createTextNode('+'));\n faster.onclick = () => this.faster();\n button_div.appendChild(faster);\n // toggle\n this._toggle_reverse = () => {\n unpress([pause, play]);\n press([reverse]);\n };\n this._toogle_pause = () => {\n unpress([reverse, play]);\n press([pause]);\n };\n this._toggle_play = () => {\n unpress([reverse, pause]);\n press([play]);\n };\n // Loop control\n this.loop_state = document.createElement('form');\n this.loop_state.style.cssText = \"margin: 0 auto; display: table\";\n const once = document.createElement('input');\n once.type = \"radio\";\n once.value = \"once\";\n once.name = \"state\";\n const once_label = document.createElement('label');\n once_label.innerHTML = \"Once\";\n once_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n const loop = document.createElement('input');\n loop.setAttribute(\"type\", \"radio\");\n loop.setAttribute(\"value\", \"loop\");\n loop.setAttribute(\"name\", \"state\");\n const loop_label = document.createElement('label');\n loop_label.innerHTML = \"Loop\";\n loop_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n const reflect = document.createElement('input');\n reflect.setAttribute(\"type\", \"radio\");\n reflect.setAttribute(\"value\", \"reflect\");\n reflect.setAttribute(\"name\", \"state\");\n const reflect_label = document.createElement('label');\n reflect_label.innerHTML = \"Reflect\";\n reflect_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n if (this.model.loop_policy == \"once\")\n once.checked = true;\n else if (this.model.loop_policy == \"loop\")\n loop.checked = true;\n else\n reflect.checked = true;\n // Compose everything\n this.loop_state.appendChild(once);\n this.loop_state.appendChild(once_label);\n this.loop_state.appendChild(loop);\n this.loop_state.appendChild(loop_label);\n this.loop_state.appendChild(reflect);\n this.loop_state.appendChild(reflect_label);\n this.groupEl.appendChild(this.sliderEl);\n this.groupEl.appendChild(button_div);\n if (this.model.show_loop_controls)\n this.groupEl.appendChild(this.loop_state);\n this.toggle_disable();\n this.shadow_el.appendChild(this.groupEl);\n }\n set_frame(frame, throttled = true) {\n this.model.value = frame;\n if (throttled)\n this.model.value_throttled = frame;\n if (this.sliderEl.value != String(frame))\n this.sliderEl.value = String(frame);\n }\n get_loop_state() {\n var button_group = this.loop_state.state;\n for (var i = 0; i < button_group.length; i++) {\n var button = button_group[i];\n if (button.checked)\n return button.value;\n }\n return \"once\";\n }\n set_loop_state(state) {\n var button_group = this.loop_state.state;\n for (var i = 0; i < button_group.length; i++) {\n var button = button_group[i];\n if (button.value == state)\n button.checked = true;\n }\n }\n next_frame() {\n this.set_frame(Math.min(this.model.end, this.model.value + this.model.step));\n }\n previous_frame() {\n this.set_frame(Math.max(this.model.start, this.model.value - this.model.step));\n }\n first_frame() {\n this.set_frame(this.model.start);\n }\n last_frame() {\n this.set_frame(this.model.end);\n }\n slower() {\n this.model.interval = Math.round(this.model.interval / 0.7);\n if (this.model.direction > 0)\n this.play_animation();\n else if (this.model.direction < 0)\n this.reverse_animation();\n }\n faster() {\n this.model.interval = Math.round(this.model.interval * 0.7);\n if (this.model.direction > 0)\n this.play_animation();\n else if (this.model.direction < 0)\n this.reverse_animation();\n }\n anim_step_forward() {\n if (this.model.value < this.model.end) {\n this.next_frame();\n }\n else {\n var loop_state = this.get_loop_state();\n if (loop_state == \"loop\") {\n this.first_frame();\n }\n else if (loop_state == \"reflect\") {\n this.last_frame();\n this.reverse_animation();\n }\n else {\n this.pause_animation();\n this.last_frame();\n }\n }\n }\n anim_step_reverse() {\n if (this.model.value > this.model.start) {\n this.previous_frame();\n }\n else {\n var loop_state = this.get_loop_state();\n if (loop_state == \"loop\") {\n this.last_frame();\n }\n else if (loop_state == \"reflect\") {\n this.first_frame();\n this.play_animation();\n }\n else {\n this.pause_animation();\n this.first_frame();\n }\n }\n }\n set_direction() {\n if (this._changing)\n return;\n else if (this.model.direction === 0)\n this.pause_animation();\n else if (this.model.direction === 1)\n this.play_animation();\n else if (this.model.direction === -1)\n this.reverse_animation();\n }\n pause_animation() {\n this._toogle_pause();\n this._changing = true;\n this.model.direction = 0;\n this._changing = false;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n play_animation() {\n this.pause_animation();\n this._toggle_play();\n this._changing = true;\n this.model.direction = 1;\n this._changing = false;\n if (!this.timer)\n this.timer = setInterval(() => this.anim_step_forward(), this.model.interval);\n }\n reverse_animation() {\n this.pause_animation();\n this._toggle_reverse();\n this._changing = true;\n this.model.direction = -1;\n this._changing = false;\n if (!this.timer)\n this.timer = setInterval(() => this.anim_step_reverse(), this.model.interval);\n }\n }\n exports.PlayerView = PlayerView;\n PlayerView.__name__ = \"PlayerView\";\n exports.LoopPolicy = (0, kinds_1.Enum)(\"once\", \"loop\", \"reflect\");\n class Player extends widget_1.Widget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Player = Player;\n _a = Player;\n Player.__name__ = \"Player\";\n Player.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = PlayerView;\n _a.define(({ Boolean, Int }) => ({\n direction: [Int, 0],\n interval: [Int, 500],\n start: [Int, 0],\n end: [Int, 10],\n step: [Int, 1],\n loop_policy: [exports.LoopPolicy, \"once\"],\n value: [Int, 0],\n value_throttled: [Int, 0],\n show_loop_controls: [Boolean, true],\n }));\n _a.override({ width: 400 });\n })();\n}\n","/* models/plotly.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const eq_1 = require(\"@bokehjs/core/util/eq\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const util_1 = require(\"990b5dd5c7\") /* ./util */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function convertUndefined(obj) {\n Object\n .entries(obj)\n .forEach(([key, value]) => {\n if (!!value && (typeof value === 'object')) {\n convertUndefined(value);\n }\n else if (value === undefined) {\n obj[key] = null;\n }\n });\n return obj;\n }\n const filterEventData = (gd, eventData, event) => {\n // Ported from dash-core-components/src/components/Graph.react.js\n let filteredEventData = Array.isArray(eventData) ? [] : {};\n if (event === \"click\" || event === \"hover\" || event === \"selected\") {\n const points = [];\n if (eventData === undefined || eventData === null) {\n return null;\n }\n /*\n * remove `data`, `layout`, `xaxis`, etc\n * objects from the event data since they're so big\n * and cause JSON stringify circular structure errors.\n *\n * also, pull down the `customdata` point from the data array\n * into the event object\n */\n const data = gd.data;\n for (let i = 0; i < eventData.points.length; i++) {\n const fullPoint = eventData.points[i];\n let pointData = {};\n for (let property in fullPoint) {\n const val = fullPoint[property];\n if (fullPoint.hasOwnProperty(property) &&\n !Array.isArray(val) && !(0, util_1.isPlainObject)(val) &&\n val !== undefined) {\n pointData[property] = val;\n }\n }\n if (fullPoint !== undefined && fullPoint !== null) {\n if (fullPoint.hasOwnProperty(\"curveNumber\") &&\n fullPoint.hasOwnProperty(\"pointNumber\") &&\n data[fullPoint[\"curveNumber\"]].hasOwnProperty(\"customdata\")) {\n pointData[\"customdata\"] =\n data[fullPoint[\"curveNumber\"]].customdata[fullPoint[\"pointNumber\"]];\n }\n // specific to histogram. see https://github.com/plotly/plotly.js/pull/2113/\n if (fullPoint.hasOwnProperty('pointNumbers')) {\n pointData[\"pointNumbers\"] = fullPoint.pointNumbers;\n }\n }\n points[i] = pointData;\n }\n filteredEventData[\"points\"] = points;\n }\n else if (event === 'relayout' || event === 'restyle') {\n /*\n * relayout shouldn't include any big objects\n * it will usually just contain the ranges of the axes like\n * \"xaxis.range[0]\": 0.7715822247381828,\n * \"xaxis.range[1]\": 3.0095292008680063`\n */\n for (let property in eventData) {\n if (eventData.hasOwnProperty(property)) {\n filteredEventData[property] = eventData[property];\n }\n }\n }\n if (eventData.hasOwnProperty('range')) {\n filteredEventData[\"range\"] = eventData[\"range\"];\n }\n if (eventData.hasOwnProperty('lassoPoints')) {\n filteredEventData[\"lassoPoints\"] = eventData[\"lassoPoints\"];\n }\n return convertUndefined(filteredEventData);\n };\n const _isHidden = (gd) => {\n var display = window.getComputedStyle(gd).display;\n return !display || display === 'none';\n };\n class PlotlyPlotView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._settingViewport = false;\n this._plotInitialized = false;\n this._rendered = false;\n this._reacting = false;\n this._relayouting = false;\n this._end_relayouting = (0, debounce_1.debounce)(() => {\n this._relayouting = false;\n }, 2000, false);\n }\n connect_signals() {\n super.connect_signals();\n const { data, data_sources, layout, relayout, restyle } = this.model.properties;\n this.on_change([data, data_sources, layout], () => {\n const render_count = this.model._render_count;\n setTimeout(() => {\n if (this.model._render_count === render_count)\n this.model._render_count += 1;\n }, 250);\n });\n this.on_change([relayout], () => {\n if (this.model.relayout == null)\n return;\n window.Plotly.relayout(this.container, this.model.relayout);\n this.model.relayout = null;\n });\n this.on_change([restyle], () => {\n if (this.model.restyle == null)\n return;\n window.Plotly.restyle(this.container, this.model.restyle.data, this.model.restyle.traces);\n this.model.restyle = null;\n });\n this.connect(this.model.properties.viewport_update_policy.change, () => {\n this._updateSetViewportFunction();\n });\n this.connect(this.model.properties.viewport_update_throttle.change, () => {\n this._updateSetViewportFunction();\n });\n this.connect(this.model.properties._render_count.change, () => {\n this.plot();\n });\n this.connect(this.model.properties.frames.change, () => {\n this.plot(true);\n });\n this.connect(this.model.properties.viewport.change, () => this._updateViewportFromProperty());\n }\n remove() {\n window.Plotly.purge(this.container);\n super.remove();\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)();\n (0, layout_1.set_size)(this.container, this.model);\n this._rendered = false;\n this.shadow_el.appendChild(this.container);\n this.watch_stylesheets();\n this.plot().then(() => {\n this._rendered = true;\n if (this.model.relayout != null)\n window.Plotly.relayout(this.container, this.model.relayout);\n window.Plotly.Plots.resize(this.container);\n });\n }\n style_redraw() {\n if (this._rendered)\n window.Plotly.Plots.resize(this.container);\n }\n after_layout() {\n super.after_layout();\n if (this._rendered)\n window.Plotly.Plots.resize(this.container);\n }\n _trace_data() {\n const data = [];\n for (let i = 0; i < this.model.data.length; i++)\n data.push(this._get_trace(i, false));\n return data;\n }\n _layout_data() {\n const newLayout = (0, util_1.deepCopy)(this.model.layout);\n if (this._relayouting) {\n const { layout } = this.container;\n // For each xaxis* and yaxis* property of layout, if the value has a 'range'\n // property then use this in newLayout\n Object.keys(layout).reduce((value, key) => {\n if (key.slice(1, 5) === \"axis\" && 'range' in value) {\n newLayout[key].range = value.range;\n }\n }, {});\n }\n return newLayout;\n }\n _install_callbacks() {\n // - plotly_relayout\n this.container.on('plotly_relayout', (eventData) => {\n if (eventData['_update_from_property'] !== true) {\n this.model.relayout_data = filterEventData(this.container, eventData, 'relayout');\n this._updateViewportProperty();\n this._end_relayouting();\n }\n });\n // - plotly_relayouting\n this.container.on('plotly_relayouting', () => {\n if (this.model.viewport_update_policy !== 'mouseup') {\n this._relayouting = true;\n this._updateViewportProperty();\n }\n });\n // - plotly_restyle\n this.container.on('plotly_restyle', (eventData) => {\n this.model.restyle_data = filterEventData(this.container, eventData, 'restyle');\n this._updateViewportProperty();\n });\n // - plotly_click\n this.container.on('plotly_click', (eventData) => {\n this.model.click_data = filterEventData(this.container, eventData, 'click');\n });\n // - plotly_hover\n this.container.on('plotly_hover', (eventData) => {\n this.model.hover_data = filterEventData(this.container, eventData, 'hover');\n });\n // - plotly_selected\n this.container.on('plotly_selected', (eventData) => {\n this.model.selected_data = filterEventData(this.container, eventData, 'selected');\n });\n // - plotly_clickannotation\n this.container.on('plotly_clickannotation', (eventData) => {\n delete eventData[\"event\"];\n delete eventData[\"fullAnnotation\"];\n this.model.clickannotation_data = eventData;\n });\n // - plotly_deselect\n this.container.on('plotly_deselect', () => {\n this.model.selected_data = null;\n });\n // - plotly_unhover\n this.container.on('plotly_unhover', () => {\n this.model.hover_data = null;\n });\n }\n async plot(new_plot = false) {\n if (!window.Plotly)\n return;\n const data = this._trace_data();\n const newLayout = this._layout_data();\n this._reacting = true;\n if (new_plot) {\n const obj = { data: data, layout: newLayout, config: this.model.config, frames: this.model.frames };\n await window.Plotly.newPlot(this.container, obj);\n }\n else {\n await window.Plotly.react(this.container, data, newLayout, this.model.config);\n if (this.model.frames != null)\n await window.Plotly.addFrames(this.container, this.model.frames);\n }\n this._updateSetViewportFunction();\n this._updateViewportProperty();\n if (!this._plotInitialized)\n this._install_callbacks();\n else if (!_isHidden(this.container))\n window.Plotly.Plots.resize(this.container);\n this._reacting = false;\n this._plotInitialized = true;\n }\n _get_trace(index, update) {\n const trace = (0, object_1.clone)(this.model.data[index]);\n const cds = this.model.data_sources[index];\n for (const column of cds.columns()) {\n let array = cds.get_array(column)[0];\n if (array.shape != null && array.shape.length > 1) {\n const arrays = [];\n const shape = array.shape;\n for (let s = 0; s < shape[0]; s++) {\n arrays.push(array.slice(s * shape[1], (s + 1) * shape[1]));\n }\n array = arrays;\n }\n let prop_path = column.split(\".\");\n let prop = prop_path[prop_path.length - 1];\n let prop_parent = trace;\n for (let k of prop_path.slice(0, -1)) {\n prop_parent = prop_parent[k];\n }\n if (update && prop_path.length == 1) {\n prop_parent[prop] = [array];\n }\n else {\n prop_parent[prop] = array;\n }\n }\n return trace;\n }\n _updateViewportFromProperty() {\n if (!window.Plotly || this._settingViewport || this._reacting || !this.model.viewport) {\n return;\n }\n const fullLayout = this.container._fullLayout;\n // Call relayout if viewport differs from fullLayout\n Object.keys(this.model.viewport).reduce((value, key) => {\n if (!(0, eq_1.is_equal)((0, util_1.get)(fullLayout, key), value)) {\n let clonedViewport = (0, util_1.deepCopy)(this.model.viewport);\n clonedViewport['_update_from_property'] = true;\n this._settingViewport = true;\n window.Plotly.relayout(this.el, clonedViewport).then(() => {\n this._settingViewport = false;\n });\n return false;\n }\n else {\n return true;\n }\n }, {});\n }\n _updateViewportProperty() {\n const fullLayout = this.container._fullLayout;\n let viewport = {};\n // Get range for all xaxis and yaxis properties\n for (let prop in fullLayout) {\n if (!fullLayout.hasOwnProperty(prop))\n continue;\n let maybe_axis = prop.slice(0, 5);\n if (maybe_axis === 'xaxis' || maybe_axis === 'yaxis')\n viewport[prop + '.range'] = (0, util_1.deepCopy)(fullLayout[prop].range);\n }\n if (!(0, eq_1.is_equal)(viewport, this.model.viewport))\n this._setViewport(viewport);\n }\n _updateSetViewportFunction() {\n if (this.model.viewport_update_policy === \"continuous\" ||\n this.model.viewport_update_policy === \"mouseup\") {\n this._setViewport = (viewport) => {\n if (!this._settingViewport) {\n this._settingViewport = true;\n this.model.viewport = viewport;\n this._settingViewport = false;\n }\n };\n }\n else {\n this._setViewport = (0, util_1.throttle)((viewport) => {\n if (!this._settingViewport) {\n this._settingViewport = true;\n this.model.viewport = viewport;\n this._settingViewport = false;\n }\n }, this.model.viewport_update_throttle);\n }\n }\n }\n exports.PlotlyPlotView = PlotlyPlotView;\n PlotlyPlotView.__name__ = \"PlotlyPlotView\";\n class PlotlyPlot extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PlotlyPlot = PlotlyPlot;\n _a = PlotlyPlot;\n PlotlyPlot.__name__ = \"PlotlyPlot\";\n PlotlyPlot.__module__ = \"panel.models.plotly\";\n (() => {\n _a.prototype.default_view = PlotlyPlotView;\n _a.define(({ Array, Any, Nullable, Number, Ref, String }) => ({\n data: [Array(Any), []],\n layout: [Any, {}],\n config: [Any, {}],\n frames: [Nullable(Array(Any)), null],\n data_sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n relayout: [Nullable(Any), {}],\n restyle: [Nullable(Any), {}],\n relayout_data: [Any, {}],\n restyle_data: [Array(Any), []],\n click_data: [Any, {}],\n hover_data: [Any, {}],\n clickannotation_data: [Any, {}],\n selected_data: [Any, {}],\n viewport: [Any, {}],\n viewport_update_policy: [String, \"mouseup\"],\n viewport_update_throttle: [Number, 200],\n _render_count: [Number, 0],\n }));\n })();\n}\n","/* models/util.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const get = (obj, path, defaultValue = undefined) => {\n const travel = (regexp) => String.prototype.split\n .call(path, regexp)\n .filter(Boolean)\n .reduce((res, key) => (res !== null && res !== undefined ? res[key] : res), obj);\n const result = travel(/[,[\\]]+?/) || travel(/[,[\\].]+?/);\n return result === undefined || result === obj ? defaultValue : result;\n };\n exports.get = get;\n function throttle(func, timeFrame) {\n var lastTime = 0;\n return function () {\n var now = Number(new Date());\n if (now - lastTime >= timeFrame) {\n func();\n lastTime = now;\n }\n };\n }\n exports.throttle = throttle;\n function deepCopy(obj) {\n var copy;\n // Handle the 3 simple types, and null or undefined\n if (null == obj || \"object\" != typeof obj)\n return obj;\n // Handle Array\n if (obj instanceof Array) {\n copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = deepCopy(obj[i]);\n }\n return copy;\n }\n // Handle Object\n if (obj instanceof Object) {\n const copy = {};\n for (const attr in obj) {\n const key = attr;\n if (obj.hasOwnProperty(key))\n copy[key] = deepCopy(obj[key]);\n }\n return copy;\n }\n throw new Error(\"Unable to copy obj! Its type isn't supported.\");\n }\n exports.deepCopy = deepCopy;\n function isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n }\n exports.isPlainObject = isPlainObject;\n}\n","/* models/progress.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class ProgressView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n const render = () => this.render();\n this.connect(this.model.properties.height.change, render);\n this.connect(this.model.properties.width.change, render);\n this.connect(this.model.properties.height_policy.change, render);\n this.connect(this.model.properties.width_policy.change, render);\n this.connect(this.model.properties.sizing_mode.change, render);\n this.connect(this.model.properties.active.change, () => this.setCSS());\n this.connect(this.model.properties.bar_color.change, () => this.setCSS());\n this.connect(this.model.properties.css_classes.change, () => this.setCSS());\n this.connect(this.model.properties.value.change, () => this.setValue());\n this.connect(this.model.properties.max.change, () => this.setMax());\n }\n render() {\n super.render();\n const style = Object.assign(Object.assign({}, this.model.styles), { display: \"inline-block\" });\n this.progressEl = document.createElement('progress');\n this.setValue();\n this.setMax();\n // Set styling\n this.setCSS();\n for (const prop in style)\n this.progressEl.style.setProperty(prop, style[prop]);\n this.shadow_el.appendChild(this.progressEl);\n }\n stylesheets() {\n const styles = super.stylesheets();\n for (const css of this.model.css)\n styles.push(new dom_1.ImportedStyleSheet(css));\n return styles;\n }\n setCSS() {\n let css = this.model.css_classes.join(\" \") + \" \" + this.model.bar_color;\n if (this.model.active)\n css = css + \" active\";\n this.progressEl.className = css;\n }\n setValue() {\n if (this.model.value == null)\n this.progressEl.value = 0;\n else if (this.model.value >= 0)\n this.progressEl.value = this.model.value;\n else if (this.model.value < 0)\n this.progressEl.removeAttribute(\"value\");\n }\n setMax() {\n if (this.model.max != null)\n this.progressEl.max = this.model.max;\n }\n }\n exports.ProgressView = ProgressView;\n ProgressView.__name__ = \"ProgressView\";\n class Progress extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Progress = Progress;\n _a = Progress;\n Progress.__name__ = \"Progress\";\n Progress.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = ProgressView;\n _a.define(({ Any, Array, Boolean, Number, String }) => ({\n active: [Boolean, true],\n bar_color: [String, 'primary'],\n css: [Array(String), []],\n max: [Number, 100],\n value: [Any, null],\n }));\n })();\n}\n","/* models/quill.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const normalizeNative = (nativeRange) => {\n var _b, _c;\n // document.getSelection model has properties startContainer and endContainer\n // shadow.getSelection model has baseNode and focusNode\n // Unify formats to always look like document.getSelection\n if (nativeRange) {\n const range = nativeRange;\n // // HACK: To allow pasting\n if (((_c = (_b = range.baseNode) === null || _b === void 0 ? void 0 : _b.classList) === null || _c === void 0 ? void 0 : _c.value) === 'ql-clipboard') {\n return null;\n }\n if (range.baseNode) {\n range.startContainer = nativeRange.baseNode;\n range.endContainer = nativeRange.focusNode;\n range.startOffset = nativeRange.baseOffset;\n range.endOffset = nativeRange.focusOffset;\n if (range.endOffset < range.startOffset) {\n range.startContainer = nativeRange.focusNode;\n range.endContainer = nativeRange.baseNode;\n range.startOffset = nativeRange.focusOffset;\n range.endOffset = nativeRange.baseOffset;\n }\n }\n if (range.startContainer) {\n return {\n start: { node: range.startContainer, offset: range.startOffset },\n end: { node: range.endContainer, offset: range.endOffset },\n native: range\n };\n }\n }\n return null;\n };\n class QuillInputView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.disabled.change, () => this.quill.enable(!this.model.disabled));\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n });\n this.connect(this.model.properties.text.change, () => {\n if (this._editing)\n return;\n this._editing = true;\n this.quill.enable(false);\n this.quill.setContents([]);\n this.quill.clipboard.dangerouslyPasteHTML(this.model.text);\n this.quill.enable(!this.model.disabled);\n this._editing = false;\n });\n const { mode, toolbar, placeholder } = this.model.properties;\n this.on_change([placeholder], () => {\n this.quill.root.setAttribute('data-placeholder', this.model.placeholder);\n });\n this.on_change([mode, toolbar], () => {\n this.render();\n this._layout_toolbar();\n });\n }\n _layout_toolbar() {\n if (this._toolbar == null) {\n this.el.style.removeProperty('padding-top');\n }\n else {\n const height = this._toolbar.getBoundingClientRect().height + 1;\n this.el.style.paddingTop = height + \"px\";\n this._toolbar.style.marginTop = -height + \"px\";\n }\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ style: \"visibility: hidden;\" });\n this.shadow_el.appendChild(this.container);\n const theme = (this.model.mode === 'bubble') ? 'bubble' : 'snow';\n this.watch_stylesheets();\n this.quill = new window.Quill(this.container, {\n modules: {\n toolbar: this.model.toolbar\n },\n readOnly: true,\n placeholder: this.model.placeholder,\n theme: theme\n });\n // Apply only with getSelection() is defined (e.g. undefined on Firefox)\n if (typeof this.quill.root.getRootNode().getSelection !== 'undefined') {\n // Hack Quill and replace document.getSelection with shadow.getSelection\n // see https://stackoverflow.com/questions/67914657/quill-editor-inside-shadow-dom/67944380#67944380\n this.quill.selection.getNativeRange = () => {\n const selection = this.shadow_el.getSelection();\n const range = normalizeNative(selection);\n return range;\n };\n }\n this._editor = this.shadow_el.querySelector('.ql-editor');\n this._toolbar = this.shadow_el.querySelector('.ql-toolbar');\n const delta = this.quill.clipboard.convert(this.model.text);\n this.quill.setContents(delta);\n this.quill.on('text-change', () => {\n if (this._editing)\n return;\n this._editing = true;\n this.model.text = this._editor.innerHTML;\n this._editing = false;\n });\n if (!this.model.disabled)\n this.quill.enable(!this.model.disabled);\n document.addEventListener(\"selectionchange\", (..._args) => {\n // Update selection and some other properties\n this.quill.selection.update();\n });\n }\n style_redraw() {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n const delta = this.quill.clipboard.convert(this.model.text);\n this.quill.setContents(delta);\n this.invalidate_layout();\n }\n after_layout() {\n super.after_layout();\n this._layout_toolbar();\n }\n }\n exports.QuillInputView = QuillInputView;\n QuillInputView.__name__ = \"QuillInputView\";\n class QuillInput extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.QuillInput = QuillInput;\n _a = QuillInput;\n QuillInput.__name__ = \"QuillInput\";\n QuillInput.__module__ = \"panel.models.quill\";\n (() => {\n _a.prototype.default_view = QuillInputView;\n _a.define(({ Any, String }) => ({\n mode: [String, 'toolbar'],\n placeholder: [String, ''],\n text: [String, ''],\n toolbar: [Any, null],\n }));\n _a.override({\n height: 300\n });\n })();\n}\n","/* models/radio_button_group.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const radio_button_group_1 = require(\"@bokehjs/models/widgets/radio_button_group\");\n class RadioButtonGroupView extends radio_button_group_1.RadioButtonGroupView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.RadioButtonGroupView = RadioButtonGroupView;\n RadioButtonGroupView.__name__ = \"RadioButtonGroupView\";\n class RadioButtonGroup extends radio_button_group_1.RadioButtonGroup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.RadioButtonGroup = RadioButtonGroup;\n _a = RadioButtonGroup;\n RadioButtonGroup.__name__ = \"RadioButtonGroup\";\n RadioButtonGroup.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = RadioButtonGroupView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/reactive_html.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n const hooks_1 = require(\"283ce7811c\") /* preact/hooks */;\n const preact_2 = require(\"b3f51db71c\") /* htm/preact */;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n const html_1 = require(\"3db2e41978\") /* ./html */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function serialize_attrs(attrs) {\n const serialized = {};\n for (const attr in attrs) {\n let value = attrs[attr];\n if (typeof value !== \"string\")\n value = value;\n else if (value !== \"\" && (value === \"NaN\" || !isNaN(Number(value))))\n value = Number(value);\n else if (value === 'false' || value === 'true')\n value = value === 'true' ? true : false;\n serialized[attr] = value;\n }\n return serialized;\n }\n function escapeRegex(string) {\n return string.replace(/[-\\/\\\\^$*+?.()|[\\]]/g, '\\\\$&');\n }\n function extractToken(template, str, tokens) {\n const tokenMapping = {};\n for (const match of tokens)\n tokenMapping[`{${match}}`] = \"(.*)\";\n const tokenList = [];\n let regexpTemplate = \"^\" + escapeRegex(template) + \"$\";\n // Find the order of the tokens\n let i, tokenIndex, tokenEntry;\n for (const m in tokenMapping) {\n tokenIndex = template.indexOf(m);\n // Token found\n if (tokenIndex > -1) {\n regexpTemplate = regexpTemplate.replace(m, tokenMapping[m]);\n tokenEntry = {\n index: tokenIndex,\n token: m\n };\n for (i = 0; i < tokenList.length && tokenList[i].index < tokenIndex; i++)\n ;\n // Insert it at index i\n if (i < tokenList.length)\n tokenList.splice(i, 0, tokenEntry);\n else\n tokenList.push(tokenEntry);\n }\n }\n regexpTemplate = regexpTemplate.replace(/\\{[^{}]+\\}/g, '.*');\n var match = new RegExp(regexpTemplate).exec(str);\n let result = null;\n if (match) {\n result = {};\n // Find your token entry\n for (i = 0; i < tokenList.length; i++)\n result[tokenList[i].token.slice(1, -1)] = match[i + 1];\n }\n return result;\n }\n function element_lookup(root, el_id) {\n let el = root.getElementById(el_id);\n if (el == null) {\n el = document.getElementById(el_id);\n }\n return el;\n }\n class ReactiveHTMLView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._parent = null;\n this._changing = false;\n this._event_listeners = {};\n this._mutation_observers = [];\n this._script_fns = {};\n this._state = {};\n }\n initialize() {\n super.initialize();\n this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;\n }\n _recursive_connect(model, update_children, path) {\n for (const prop in model.properties) {\n let subpath;\n if (path.length)\n subpath = `${path}.${prop}`;\n else\n subpath = prop;\n const obj = model[prop];\n if (obj == null)\n continue;\n if (obj.properties != null)\n this._recursive_connect(obj, true, subpath);\n this.connect(model.properties[prop].change, () => {\n if (update_children) {\n for (const node in this.model.children) {\n if (this.model.children[node] == prop) {\n let children = model[prop];\n if (!(0, types_1.isArray)(children))\n children = [children];\n this._render_node(node, children);\n return;\n }\n }\n }\n if (!this._changing) {\n this._update(subpath);\n }\n });\n }\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.children.change, async () => {\n this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;\n await this.rebuild();\n });\n this._recursive_connect(this.model.data, true, '');\n this.connect(this.model.properties.events.change, () => {\n this._remove_event_listeners();\n this._setup_event_listeners();\n });\n this.connect_scripts();\n }\n connect_scripts() {\n const id = this.model.data.id;\n for (let prop in this.model.scripts) {\n const scripts = this.model.scripts[prop];\n let data_model = this.model.data;\n let attr;\n if (prop.indexOf('.') >= 0) {\n const path = prop.split('.');\n attr = path[path.length - 1];\n for (const p of path.slice(0, -1))\n data_model = data_model[p];\n }\n else {\n attr = prop;\n }\n for (const script of scripts) {\n const decoded_script = (0, html_1.htmlDecode)(script) || script;\n const script_fn = this._render_script(decoded_script, id);\n this._script_fns[prop] = script_fn;\n const property = data_model.properties[attr];\n if (property == null)\n continue;\n this.connect(property.change, () => {\n if (!this._changing)\n this.run_script(prop);\n });\n }\n }\n }\n run_script(property, silent = false) {\n const script_fn = this._script_fns[property];\n if (script_fn === undefined) {\n if (!silent)\n console.log(`Script '${property}' could not be found.`);\n return;\n }\n const this_obj = {\n get_records: (property, index) => this.get_records(property, index)\n };\n for (const name in this._script_fns)\n this_obj[name] = () => this.run_script(name);\n return script_fn(this.model, this.model.data, this._state, this, (s) => this.run_script(s), this_obj);\n }\n get_records(property, index = true) {\n return (0, data_1.dict_to_records)(this.model.data[property], index);\n }\n disconnect_signals() {\n super.disconnect_signals();\n this._remove_event_listeners();\n this._remove_mutation_observers();\n }\n remove() {\n this.run_script('remove', true);\n super.remove();\n }\n get child_models() {\n const models = [];\n for (const parent in this.model.children) {\n for (const model of this.model.children[parent])\n if (typeof model !== 'string')\n models.push(model);\n }\n return models;\n }\n _after_layout() {\n this.run_script('after_layout', true);\n }\n render() {\n this.empty();\n this._update_stylesheets();\n this._update_css_classes();\n this._apply_styles();\n this._apply_visible();\n this.container = (0, dom_1.div)({ style: \"display: contents;\" });\n this.shadow_el.append(this.container);\n this._update();\n this._render_children();\n this._setup_mutation_observers();\n this._setup_event_listeners();\n this.run_script('render', true);\n }\n _send_event(elname, attr, event) {\n let serialized = (0, event_to_object_1.serializeEvent)(event);\n serialized.type = attr;\n for (const key in serialized) {\n if (serialized[key] === undefined)\n delete serialized[key];\n }\n this.model.trigger_event(new html_1.DOMEvent(elname, serialized));\n }\n _render_child(model, el) {\n const view = this._child_views.get(model);\n if (view == null)\n el.innerHTML = (0, html_1.htmlDecode)(model) || model;\n else {\n el.appendChild(view.el);\n view.render();\n view.after_render();\n }\n }\n _render_node(node, children) {\n const id = this.model.data.id;\n if (this.model.looped.indexOf(node) > -1) {\n for (let i = 0; i < children.length; i++) {\n const el = element_lookup(this.shadow_el, `${node}-${i}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${i}-${id}' could not be found. Cannot render children.`);\n continue;\n }\n this._render_child(children[i], el);\n }\n }\n else {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${id}' could not be found. Cannot render children.`);\n return;\n }\n for (const child of children)\n this._render_child(child, el);\n }\n }\n _render_children() {\n for (const node in this.model.children) {\n let children = this.model.children[node];\n if (typeof children == \"string\") {\n children = this.model.data[children];\n if (!(0, types_1.isArray)(children))\n children = [children];\n }\n this._render_node(node, children);\n }\n }\n _render_html(literal, state = {}) {\n let htm = literal.replace(/[`]/g, '\\\\$&');\n let callbacks = '';\n const methods = [];\n for (const elname in this.model.callbacks) {\n for (const callback of this.model.callbacks[elname]) {\n const [cb, method] = callback;\n let definition;\n htm = htm.replaceAll('${' + method + '}', '$--{' + method + '}');\n if (method.startsWith('script(')) {\n const meth = (method\n .replace(\"('\", \"_\").replace(\"')\", \"\")\n .replace('(\"', \"_\").replace('\")', \"\")\n .replace('-', '_'));\n const script_name = meth.replaceAll(\"script_\", \"\");\n htm = htm.replaceAll(method, meth);\n definition = `\n const ${meth} = (event) => {\n view._state.event = event\n view.run_script(\"${script_name}\")\n delete view._state.event\n }\n `;\n }\n else {\n definition = `\n const ${method} = (event) => {\n let elname = \"${elname}\"\n if (RegExp(\"\\{\\{.*loop\\.index.*\\}\\}\").test(elname)) {\n const pattern = RegExp(elname.replace(/\\{\\{(.+?)\\}\\}/g, String.fromCharCode(92) + \"d+\"))\n for (const p of event.path) {\n if (pattern.exec(p.id) != null) {\n elname = p.id.split(\"-\").slice(null, -1).join(\"-\")\n break\n }\n }\n }\n view._send_event(elname, \"${cb}\", event)\n }\n `;\n }\n if (methods.indexOf(method) > -1)\n continue;\n methods.push(method);\n callbacks = callbacks + definition;\n }\n }\n htm = (htm\n .replaceAll('${model.', '$-{model.')\n .replaceAll('${', '${data.')\n .replaceAll('$-{model.', '${model.')\n .replaceAll('$--{', '${'));\n return new Function(\"view, model, data, state, html, useCallback\", callbacks + \"return html`\" + htm + \"`;\")(this, this.model, this.model.data, state, preact_2.html, hooks_1.useCallback);\n }\n _render_script(literal, id) {\n const scripts = [];\n for (const elname of this.model.nodes) {\n const elvar = elname.replace('-', '_');\n if (literal.indexOf(elvar) === -1)\n continue;\n const script = `\n let ${elvar} = view.shadow_el.getElementById('${elname}-${id}')\n if (${elvar} == null)\n ${elvar} = document.getElementById('${elname}-${id}')\n if (${elvar} == null) {\n console.warn(\"DOM node '${elname}' could not be found. Cannot execute callback.\")\n return\n }\n `;\n scripts.push(script);\n }\n const event = `\n let event = null\n if (state.event !== undefined) {\n event = state.event\n }\n `;\n scripts.push(event);\n scripts.push(literal);\n return new Function(\"model, data, state, view, script, self\", scripts.join('\\n'));\n }\n _remove_mutation_observers() {\n for (const observer of this._mutation_observers)\n observer.disconnect();\n this._mutation_observers = [];\n }\n _setup_mutation_observers() {\n const id = this.model.data.id;\n for (const name in this.model.attrs) {\n const el = element_lookup(this.shadow_el, `${name}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${name}-${id}' could not be found. Cannot set up MutationObserver.`);\n continue;\n }\n const observer = new MutationObserver(() => {\n this._update_model(el, name);\n });\n observer.observe(el, { attributes: true });\n this._mutation_observers.push(observer);\n }\n }\n _remove_event_listeners() {\n const id = this.model.data.id;\n for (const node in this._event_listeners) {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null)\n continue;\n for (const event_name in this._event_listeners[node]) {\n const event_callback = this._event_listeners[node][event_name];\n el.removeEventListener(event_name, event_callback);\n }\n }\n this._event_listeners = {};\n }\n _setup_event_listeners() {\n const id = this.model.data.id;\n for (const node in this.model.events) {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${id}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n const node_events = this.model.events[node];\n for (const event_name in node_events) {\n const event_callback = (event) => {\n this._send_event(node, event_name, event);\n if (node in this.model.attrs && node_events[event_name])\n this._update_model(el, node);\n };\n el.addEventListener(event_name, event_callback);\n if (!(node in this._event_listeners))\n this._event_listeners[node] = {};\n this._event_listeners[node][event_name] = event_callback;\n }\n }\n }\n _update(property = null) {\n if (property == null || (this.html.indexOf(`\\${${property}}`) > -1)) {\n const rendered = this._render_html(this.html);\n if (rendered == null)\n return;\n try {\n this._changing = true;\n (0, preact_1.render)(rendered, this.container);\n }\n finally {\n this._changing = false;\n }\n }\n }\n _update_model(el, name) {\n if (this._changing)\n return;\n const attrs = {};\n for (const attr_info of this.model.attrs[name]) {\n const [attr, tokens, template] = attr_info;\n let value = attr === 'children' ? el.innerHTML : el[attr];\n if (tokens.length === 1 && (`{${tokens[0]}}` === template))\n attrs[tokens[0]] = value;\n else if (typeof value === 'string') {\n value = extractToken(template, value, tokens);\n if (value == null)\n console.warn(`Could not resolve parameters in ${name} element ${attr} attribute value ${value}.`);\n else {\n for (const param in value) {\n if (value[param] === undefined)\n console.warn(`Could not resolve ${param} in ${name} element ${attr} attribute value ${value}.`);\n else\n attrs[param] = value[param];\n }\n }\n }\n }\n try {\n this._changing = true;\n this.model.data.setv(serialize_attrs(attrs));\n }\n catch (_b) {\n console.log('Could not serialize', attrs);\n }\n finally {\n this._changing = false;\n }\n }\n }\n exports.ReactiveHTMLView = ReactiveHTMLView;\n ReactiveHTMLView.__name__ = \"ReactiveHTMLView\";\n class ReactiveHTML extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.ReactiveHTML = ReactiveHTML;\n _a = ReactiveHTML;\n ReactiveHTML.__name__ = \"ReactiveHTML\";\n ReactiveHTML.__module__ = \"panel.models.reactive_html\";\n (() => {\n _a.prototype.default_view = ReactiveHTMLView;\n _a.define(({ Array, Any, String }) => ({\n attrs: [Any, {}],\n callbacks: [Any, {}],\n children: [Any, {}],\n data: [Any,],\n events: [Any, {}],\n html: [String, \"\"],\n looped: [Array(String), []],\n nodes: [Array(String), []],\n scripts: [Any, {}],\n }));\n })();\n}\n","/* preact/dist/preact.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var n, l, u, i, t, r, o, f, e = {}, c = [], s = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n function a(n, l) {\n for (var u in l)\n n[u] = l[u];\n return n;\n }\n function h(n) { var l = n.parentNode; l && l.removeChild(n); }\n function v(l, u, i) {\n var t, r, o, f = {};\n for (o in u)\n \"key\" == o ? t = u[o] : \"ref\" == o ? r = u[o] : f[o] = u[o];\n if (arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : i), \"function\" == typeof l && null != l.defaultProps)\n for (o in l.defaultProps)\n void 0 === f[o] && (f[o] = l.defaultProps[o]);\n return y(l, f, t, r, null);\n }\n exports.createElement = v;\n exports.h = v;\n function y(n, i, t, r, o) { var f = { type: n, props: i, key: t, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == o ? ++u : o }; return null == o && null != l.vnode && l.vnode(f), f; }\n function p() { return { current: null }; }\n exports.createRef = p;\n function d(n) { return n.children; }\n exports.Fragment = d;\n function _(n, l) { this.props = n, this.context = l; }\n exports.Component = _;\n function k(n, l) {\n if (null == l)\n return n.__ ? k(n.__, n.__.__k.indexOf(n) + 1) : null;\n for (var u; l < n.__k.length; l++)\n if (null != (u = n.__k[l]) && null != u.__e)\n return u.__e;\n return \"function\" == typeof n.type ? k(n) : null;\n }\n function b(n) {\n var l, u;\n if (null != (n = n.__) && null != n.__c) {\n for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++)\n if (null != (u = n.__k[l]) && null != u.__e) {\n n.__e = n.__c.base = u.__e;\n break;\n }\n return b(n);\n }\n }\n function g(n) { (!n.__d && (n.__d = !0) && t.push(n) && !m.__r++ || r !== l.debounceRendering) && ((r = l.debounceRendering) || o)(m); }\n function m() {\n var n, l, u, i, r, o, f, e;\n for (t.sort(function (n, l) { return n.__v.__b - l.__v.__b; }); n = t.shift();)\n n.__d && (l = t.length, i = void 0, r = void 0, f = (o = (u = n).__v).__e, (e = u.__P) && (i = [], (r = a({}, o)).__v = o.__v + 1, z(e, o, r, u.__n, void 0 !== e.ownerSVGElement, null != o.__h ? [f] : null, i, null == f ? k(o) : f, o.__h), L(i, o), o.__e != f && b(o)), t.length > l && t.sort(function (n, l) { return n.__v.__b - l.__v.__b; }));\n m.__r = 0;\n }\n function w(n, l, u, i, t, r, o, f, s, a) {\n var h, v, p, _, b, g, m, w = i && i.__k || c, A = w.length;\n for (u.__k = [], h = 0; h < l.length; h++)\n if (null != (_ = u.__k[h] = null == (_ = l[h]) || \"boolean\" == typeof _ ? null : \"string\" == typeof _ || \"number\" == typeof _ || \"bigint\" == typeof _ ? y(null, _, null, null, _) : Array.isArray(_) ? y(d, { children: _ }, null, null, null) : _.__b > 0 ? y(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _)) {\n if (_.__ = u, _.__b = u.__b + 1, null === (p = w[h]) || p && _.key == p.key && _.type === p.type)\n w[h] = void 0;\n else\n for (v = 0; v < A; v++) {\n if ((p = w[v]) && _.key == p.key && _.type === p.type) {\n w[v] = void 0;\n break;\n }\n p = null;\n }\n z(n, _, p = p || e, t, r, o, f, s, a), b = _.__e, (v = _.ref) && p.ref != v && (m || (m = []), p.ref && m.push(p.ref, null, _), m.push(v, _.__c || b, _)), null != b ? (null == g && (g = b), \"function\" == typeof _.type && _.__k === p.__k ? _.__d = s = x(_, s, n) : s = P(n, _, p, w, b, s), \"function\" == typeof u.type && (u.__d = s)) : s && p.__e == s && s.parentNode != n && (s = k(p));\n }\n for (u.__e = g, h = A; h--;)\n null != w[h] && (\"function\" == typeof u.type && null != w[h].__e && w[h].__e == u.__d && (u.__d = C(i).nextSibling), O(w[h], w[h]));\n if (m)\n for (h = 0; h < m.length; h++)\n N(m[h], m[++h], m[++h]);\n }\n function x(n, l, u) {\n for (var i, t = n.__k, r = 0; t && r < t.length; r++)\n (i = t[r]) && (i.__ = n, l = \"function\" == typeof i.type ? x(i, l, u) : P(u, i, i, t, i.__e, l));\n return l;\n }\n function A(n, l) { return l = l || [], null == n || \"boolean\" == typeof n || (Array.isArray(n) ? n.some(function (n) { A(n, l); }) : l.push(n)), l; }\n exports.toChildArray = A;\n function P(n, l, u, i, t, r) {\n var o, f, e;\n if (void 0 !== l.__d)\n o = l.__d, l.__d = void 0;\n else if (null == u || t != r || null == t.parentNode)\n n: if (null == r || r.parentNode !== n)\n n.appendChild(t), o = null;\n else {\n for (f = r, e = 0; (f = f.nextSibling) && e < i.length; e += 1)\n if (f == t)\n break n;\n n.insertBefore(t, r), o = r;\n }\n return void 0 !== o ? o : t.nextSibling;\n }\n function C(n) {\n var l, u, i;\n if (null == n.type || \"string\" == typeof n.type)\n return n.__e;\n if (n.__k)\n for (l = n.__k.length - 1; l >= 0; l--)\n if ((u = n.__k[l]) && (i = C(u)))\n return i;\n return null;\n }\n function $(n, l, u, i, t) {\n var r;\n for (r in u)\n \"children\" === r || \"key\" === r || r in l || I(n, r, null, u[r], i);\n for (r in l)\n t && \"function\" != typeof l[r] || \"children\" === r || \"key\" === r || \"value\" === r || \"checked\" === r || u[r] === l[r] || I(n, r, l[r], u[r], i);\n }\n function H(n, l, u) { \"-\" === l[0] ? n.setProperty(l, null == u ? \"\" : u) : n[l] = null == u ? \"\" : \"number\" != typeof u || s.test(l) ? u : u + \"px\"; }\n function I(n, l, u, i, t) {\n var r;\n n: if (\"style\" === l)\n if (\"string\" == typeof u)\n n.style.cssText = u;\n else {\n if (\"string\" == typeof i && (n.style.cssText = i = \"\"), i)\n for (l in i)\n u && l in u || H(n.style, l, \"\");\n if (u)\n for (l in u)\n i && u[l] === i[l] || H(n.style, l, u[l]);\n }\n else if (\"o\" === l[0] && \"n\" === l[1])\n r = l !== (l = l.replace(/Capture$/, \"\")), l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + r] = u, u ? i || n.addEventListener(l, r ? j : T, r) : n.removeEventListener(l, r ? j : T, r);\n else if (\"dangerouslySetInnerHTML\" !== l) {\n if (t)\n l = l.replace(/xlink(H|:h)/, \"h\").replace(/sName$/, \"s\");\n else if (\"width\" !== l && \"height\" !== l && \"href\" !== l && \"list\" !== l && \"form\" !== l && \"tabIndex\" !== l && \"download\" !== l && l in n)\n try {\n n[l] = null == u ? \"\" : u;\n break n;\n }\n catch (n) { }\n \"function\" == typeof u || (null == u || !1 === u && -1 == l.indexOf(\"-\") ? n.removeAttribute(l) : n.setAttribute(l, u));\n }\n }\n function T(n) { return this.l[n.type + !1](l.event ? l.event(n) : n); }\n function j(n) { return this.l[n.type + !0](l.event ? l.event(n) : n); }\n function z(n, u, i, t, r, o, f, e, c) {\n var s, h, v, y, p, k, b, g, m, x, A, P, C, $, H, I = u.type;\n if (void 0 !== u.constructor)\n return null;\n null != i.__h && (c = i.__h, e = u.__e = i.__e, u.__h = null, o = [e]), (s = l.__b) && s(u);\n try {\n n: if (\"function\" == typeof I) {\n if (g = u.props, m = (s = I.contextType) && t[s.__c], x = s ? m ? m.props.value : s.__ : t, i.__c ? b = (h = u.__c = i.__c).__ = h.__E : (\"prototype\" in I && I.prototype.render ? u.__c = h = new I(g, x) : (u.__c = h = new _(g, x), h.constructor = I, h.render = S), m && m.sub(h), h.props = g, h.state || (h.state = {}), h.context = x, h.__n = t, v = h.__d = !0, h.__h = [], h._sb = []), null == h.__s && (h.__s = h.state), null != I.getDerivedStateFromProps && (h.__s == h.state && (h.__s = a({}, h.__s)), a(h.__s, I.getDerivedStateFromProps(g, h.__s))), y = h.props, p = h.state, h.__v = u, v)\n null == I.getDerivedStateFromProps && null != h.componentWillMount && h.componentWillMount(), null != h.componentDidMount && h.__h.push(h.componentDidMount);\n else {\n if (null == I.getDerivedStateFromProps && g !== y && null != h.componentWillReceiveProps && h.componentWillReceiveProps(g, x), !h.__e && null != h.shouldComponentUpdate && !1 === h.shouldComponentUpdate(g, h.__s, x) || u.__v === i.__v) {\n for (u.__v !== i.__v && (h.props = g, h.state = h.__s, h.__d = !1), h.__e = !1, u.__e = i.__e, u.__k = i.__k, u.__k.forEach(function (n) { n && (n.__ = u); }), A = 0; A < h._sb.length; A++)\n h.__h.push(h._sb[A]);\n h._sb = [], h.__h.length && f.push(h);\n break n;\n }\n null != h.componentWillUpdate && h.componentWillUpdate(g, h.__s, x), null != h.componentDidUpdate && h.__h.push(function () { h.componentDidUpdate(y, p, k); });\n }\n if (h.context = x, h.props = g, h.__P = n, P = l.__r, C = 0, \"prototype\" in I && I.prototype.render) {\n for (h.state = h.__s, h.__d = !1, P && P(u), s = h.render(h.props, h.state, h.context), $ = 0; $ < h._sb.length; $++)\n h.__h.push(h._sb[$]);\n h._sb = [];\n }\n else\n do {\n h.__d = !1, P && P(u), s = h.render(h.props, h.state, h.context), h.state = h.__s;\n } while (h.__d && ++C < 25);\n h.state = h.__s, null != h.getChildContext && (t = a(a({}, t), h.getChildContext())), v || null == h.getSnapshotBeforeUpdate || (k = h.getSnapshotBeforeUpdate(y, p)), H = null != s && s.type === d && null == s.key ? s.props.children : s, w(n, Array.isArray(H) ? H : [H], u, i, t, r, o, f, e, c), h.base = u.__e, u.__h = null, h.__h.length && f.push(h), b && (h.__E = h.__ = null), h.__e = !1;\n }\n else\n null == o && u.__v === i.__v ? (u.__k = i.__k, u.__e = i.__e) : u.__e = M(i.__e, u, i, t, r, o, f, c);\n (s = l.diffed) && s(u);\n }\n catch (n) {\n u.__v = null, (c || null != o) && (u.__e = e, u.__h = !!c, o[o.indexOf(e)] = null), l.__e(n, u, i);\n }\n }\n function L(n, u) {\n l.__c && l.__c(u, n), n.some(function (u) {\n try {\n n = u.__h, u.__h = [], n.some(function (n) { n.call(u); });\n }\n catch (n) {\n l.__e(n, u.__v);\n }\n });\n }\n function M(l, u, i, t, r, o, f, c) {\n var s, a, v, y = i.props, p = u.props, d = u.type, _ = 0;\n if (\"svg\" === d && (r = !0), null != o)\n for (; _ < o.length; _++)\n if ((s = o[_]) && \"setAttribute\" in s == !!d && (d ? s.localName === d : 3 === s.nodeType)) {\n l = s, o[_] = null;\n break;\n }\n if (null == l) {\n if (null === d)\n return document.createTextNode(p);\n l = r ? document.createElementNS(\"http://www.w3.org/2000/svg\", d) : document.createElement(d, p.is && p), o = null, c = !1;\n }\n if (null === d)\n y === p || c && l.data === p || (l.data = p);\n else {\n if (o = o && n.call(l.childNodes), a = (y = i.props || e).dangerouslySetInnerHTML, v = p.dangerouslySetInnerHTML, !c) {\n if (null != o)\n for (y = {}, _ = 0; _ < l.attributes.length; _++)\n y[l.attributes[_].name] = l.attributes[_].value;\n (v || a) && (v && (a && v.__html == a.__html || v.__html === l.innerHTML) || (l.innerHTML = v && v.__html || \"\"));\n }\n if ($(l, p, y, r, c), v)\n u.__k = [];\n else if (_ = u.props.children, w(l, Array.isArray(_) ? _ : [_], u, i, t, r && \"foreignObject\" !== d, o, f, o ? o[0] : i.__k && k(i, 0), c), null != o)\n for (_ = o.length; _--;)\n null != o[_] && h(o[_]);\n c || (\"value\" in p && void 0 !== (_ = p.value) && (_ !== l.value || \"progress\" === d && !_ || \"option\" === d && _ !== y.value) && I(l, \"value\", _, y.value, !1), \"checked\" in p && void 0 !== (_ = p.checked) && _ !== l.checked && I(l, \"checked\", _, y.checked, !1));\n }\n return l;\n }\n function N(n, u, i) {\n try {\n \"function\" == typeof n ? n(u) : n.current = u;\n }\n catch (n) {\n l.__e(n, i);\n }\n }\n function O(n, u, i) {\n var t, r;\n if (l.unmount && l.unmount(n), (t = n.ref) && (t.current && t.current !== n.__e || N(t, null, u)), null != (t = n.__c)) {\n if (t.componentWillUnmount)\n try {\n t.componentWillUnmount();\n }\n catch (n) {\n l.__e(n, u);\n }\n t.base = t.__P = null, n.__c = void 0;\n }\n if (t = n.__k)\n for (r = 0; r < t.length; r++)\n t[r] && O(t[r], u, i || \"function\" != typeof n.type);\n i || null == n.__e || h(n.__e), n.__ = n.__e = n.__d = void 0;\n }\n function S(n, l, u) { return this.constructor(n, u); }\n function q(u, i, t) { var r, o, f; l.__ && l.__(u, i), o = (r = \"function\" == typeof t) ? null : t && t.__k || i.__k, f = [], z(i, u = (!r && t || i).__k = v(d, null, [u]), o || e, e, void 0 !== i.ownerSVGElement, !r && t ? [t] : o ? null : i.firstChild ? n.call(i.childNodes) : null, f, !r && t ? t : o ? o.__e : i.firstChild, r), L(f, u); }\n exports.render = q;\n function B(n, l) { q(n, l, B); }\n exports.hydrate = B;\n function D(l, u, i) {\n var t, r, o, f = a({}, l.props);\n for (o in u)\n \"key\" == o ? t = u[o] : \"ref\" == o ? r = u[o] : f[o] = u[o];\n return arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : i), y(l.type, f, t || l.key, r || l.ref, null);\n }\n exports.cloneElement = D;\n function E(n, l) { var u = { __c: l = \"__cC\" + f++, __: n, Consumer: function (n, l) { return n.children(l); }, Provider: function (n) { var u, i; return this.getChildContext || (u = [], (i = {})[l] = this, this.getChildContext = function () { return i; }, this.shouldComponentUpdate = function (n) { this.props.value !== n.value && u.some(function (n) { n.__e = !0, g(n); }); }, this.sub = function (n) { u.push(n); var l = n.componentWillUnmount; n.componentWillUnmount = function () { u.splice(u.indexOf(n), 1), l && l.call(n); }; }), n.children; } }; return u.Provider.__ = u.Consumer.contextType = u; }\n exports.createContext = E;\n n = c.slice, exports.options = l = { __e: function (n, l, u, i) {\n for (var t, r, o; l = l.__;)\n if ((t = l.__c) && !t.__)\n try {\n if ((r = t.constructor) && null != r.getDerivedStateFromError && (t.setState(r.getDerivedStateFromError(n)), o = t.__d), null != t.componentDidCatch && (t.componentDidCatch(n, i || {}), o = t.__d), o)\n return t.__E = t;\n }\n catch (l) {\n n = l;\n }\n throw n;\n } }, u = 0, exports.isValidElement = i = function (n) { return null != n && void 0 === n.constructor; }, _.prototype.setState = function (n, l) { var u; u = null != this.__s && this.__s !== this.state ? this.__s : this.__s = a({}, this.state), \"function\" == typeof n && (n = n(a({}, u), this.props)), n && a(u, n), null != n && this.__v && (l && this._sb.push(l), g(this)); }, _.prototype.forceUpdate = function (n) { this.__v && (this.__e = !0, n && this.__h.push(n), g(this)); }, _.prototype.render = d, t = [], o = \"function\" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, m.__r = 0, f = 0;\n}\n","/* preact/hooks/dist/hooks.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n var t, r, u, i, o = 0, f = [], c = [], e = preact_1.options.__b, a = preact_1.options.__r, v = preact_1.options.diffed, l = preact_1.options.__c, m = preact_1.options.unmount;\n function d(t, u) { preact_1.options.__h && preact_1.options.__h(r, t, o || u), o = 0; var i = r.__H || (r.__H = { __: [], __h: [] }); return t >= i.__.length && i.__.push({ __V: c }), i.__[t]; }\n function p(n) { return o = 1, y(B, n); }\n exports.useState = p;\n function y(n, u, i) {\n var o = d(t++, 2);\n if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B(void 0, u), function (n) { var t = o.__N ? o.__N[0] : o.__[0], r = o.t(t, n); t !== r && (o.__N = [r, o.__[1]], o.__c.setState({})); }], o.__c = r, !r.u)) {\n r.u = !0;\n var f = r.shouldComponentUpdate;\n r.shouldComponentUpdate = function (n, t, r) {\n if (!o.__c.__H)\n return !0;\n var u = o.__c.__H.__.filter(function (n) { return n.__c; });\n if (u.every(function (n) { return !n.__N; }))\n return !f || f.call(this, n, t, r);\n var i = !1;\n return u.forEach(function (n) {\n if (n.__N) {\n var t = n.__[0];\n n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);\n }\n }), !(!i && o.__c.props === n) && (!f || f.call(this, n, t, r));\n };\n }\n return o.__N || o.__;\n }\n exports.useReducer = y;\n function h(u, i) { var o = d(t++, 3); !preact_1.options.__s && z(o.__H, i) && (o.__ = u, o.i = i, r.__H.__h.push(o)); }\n exports.useEffect = h;\n function s(u, i) { var o = d(t++, 4); !preact_1.options.__s && z(o.__H, i) && (o.__ = u, o.i = i, r.__h.push(o)); }\n exports.useLayoutEffect = s;\n function _(n) { return o = 5, F(function () { return { current: n }; }, []); }\n exports.useRef = _;\n function A(n, t, r) { o = 6, s(function () { return \"function\" == typeof n ? (n(t()), function () { return n(null); }) : n ? (n.current = t(), function () { return n.current = null; }) : void 0; }, null == r ? r : r.concat(n)); }\n exports.useImperativeHandle = A;\n function F(n, r) { var u = d(t++, 7); return z(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__; }\n exports.useMemo = F;\n function T(n, t) { return o = 8, F(function () { return n; }, t); }\n exports.useCallback = T;\n function q(n) { var u = r.context[n.__c], i = d(t++, 9); return i.c = n, u ? (null == i.__ && (i.__ = !0, u.sub(r)), u.props.value) : n.__; }\n exports.useContext = q;\n function x(t, r) { preact_1.options.useDebugValue && preact_1.options.useDebugValue(r ? r(t) : t); }\n exports.useDebugValue = x;\n function P(n) { var u = d(t++, 10), i = p(); return u.__ = n, r.componentDidCatch || (r.componentDidCatch = function (n, t) { u.__ && u.__(n, t), i[1](n); }), [i[0], function () { i[1](void 0); }]; }\n exports.useErrorBoundary = P;\n function V() {\n var n = d(t++, 11);\n if (!n.__) {\n for (var u = r.__v; null !== u && !u.__m && null !== u.__;)\n u = u.__;\n var i = u.__m || (u.__m = [0, 0]);\n n.__ = \"P\" + i[0] + \"-\" + i[1]++;\n }\n return n.__;\n }\n exports.useId = V;\n function b() {\n for (var t; t = f.shift();)\n if (t.__P && t.__H)\n try {\n t.__H.__h.forEach(k), t.__H.__h.forEach(w), t.__H.__h = [];\n }\n catch (r) {\n t.__H.__h = [], preact_1.options.__e(r, t.__v);\n }\n }\n preact_1.options.__b = function (n) { r = null, e && e(n); }, preact_1.options.__r = function (n) { a && a(n), t = 0; var i = (r = n.__c).__H; i && (u === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) { n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0; })) : (i.__h.forEach(k), i.__h.forEach(w), i.__h = [])), u = r; }, preact_1.options.diffed = function (t) { v && v(t); var o = t.__c; o && o.__H && (o.__H.__h.length && (1 !== f.push(o) && i === preact_1.options.requestAnimationFrame || ((i = preact_1.options.requestAnimationFrame) || j)(b)), o.__H.__.forEach(function (n) { n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c; })), u = r = null; }, preact_1.options.__c = function (t, r) {\n r.some(function (t) {\n try {\n t.__h.forEach(k), t.__h = t.__h.filter(function (n) { return !n.__ || w(n); });\n }\n catch (u) {\n r.some(function (n) { n.__h && (n.__h = []); }), r = [], preact_1.options.__e(u, t.__v);\n }\n }), l && l(t, r);\n }, preact_1.options.unmount = function (t) {\n m && m(t);\n var r, u = t.__c;\n u && u.__H && (u.__H.__.forEach(function (n) {\n try {\n k(n);\n }\n catch (n) {\n r = n;\n }\n }), u.__H = void 0, r && preact_1.options.__e(r, u.__v));\n };\n var g = \"function\" == typeof requestAnimationFrame;\n function j(n) { var t, r = function () { clearTimeout(u), g && cancelAnimationFrame(t), setTimeout(n); }, u = setTimeout(r, 100); g && (t = requestAnimationFrame(r)); }\n function k(n) { var t = r, u = n.__c; \"function\" == typeof u && (n.__c = void 0, u()), r = t; }\n function w(n) { var t = r; n.__c = n.__(), r = t; }\n function z(n, t) { return !n || n.length !== t.length || t.some(function (t, r) { return t !== n[r]; }); }\n function B(n, t) { return \"function\" == typeof t ? t(n) : t; }\n}\n","/* htm/preact/index.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n var preact_2 = require(\"1b70f5b1d3\") /* preact */;\n __esExport(\"h\", preact_2.h);\n __esExport(\"render\", preact_2.render);\n __esExport(\"Component\", preact_2.Component);\n const htm_1 = tslib_1.__importDefault(require(\"ab33dd3f38\") /* htm */);\n var m = htm_1.default.bind(preact_1.h);\n exports.html = m;\n}\n","/* htm/dist/htm.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var n = function (t, s, r, e) {\n var u;\n s[0] = 0;\n for (var h = 1; h < s.length; h++) {\n var p = s[h++], a = s[h] ? (s[0] |= p ? 1 : 2, r[s[h++]]) : s[++h];\n 3 === p ? e[0] = a : 4 === p ? e[1] = Object.assign(e[1] || {}, a) : 5 === p ? (e[1] = e[1] || {})[s[++h]] = a : 6 === p ? e[1][s[++h]] += a + \"\" : p ? (u = t.apply(a, n(t, a, r, [\"\", null])), e.push(u), a[0] ? s[0] |= 2 : (s[h - 2] = 0, s[h] = u)) : e.push(a);\n }\n return e;\n }, t = new Map;\n function default_1(s) {\n var r = t.get(this);\n return r || (r = new Map, t.set(this, r)), (r = n(this, r.get(s) || (r.set(s, r = function (n) {\n for (var t, s, r = 1, e = \"\", u = \"\", h = [0], p = function (n) { 1 === r && (n || (e = e.replace(/^\\s*\\n\\s*|\\s*\\n\\s*$/g, \"\"))) ? h.push(0, n, e) : 3 === r && (n || e) ? (h.push(3, n, e), r = 2) : 2 === r && \"...\" === e && n ? h.push(4, n, 0) : 2 === r && e && !n ? h.push(5, 0, !0, e) : r >= 5 && ((e || !n && 5 === r) && (h.push(r, 0, e, s), r = 6), n && (h.push(r, n, 0, s), r = 6)), e = \"\"; }, a = 0; a < n.length; a++) {\n a && (1 === r && p(), p(a));\n for (var l = 0; l < n[a].length; l++)\n t = n[a][l], 1 === r ? \"<\" === t ? (p(), h = [h], r = 3) : e += t : 4 === r ? \"--\" === e && \">\" === t ? (r = 1, e = \"\") : e = t + e[0] : u ? t === u ? u = \"\" : e += t : '\"' === t || \"'\" === t ? u = t : \">\" === t ? (p(), r = 1) : r && (\"=\" === t ? (r = 5, s = e, e = \"\") : \"/\" === t && (r < 5 || \">\" === n[a][l + 1]) ? (p(), 3 === r && (h = h[0]), r = h, (h = h[0]).push(2, 0, r), r = 0) : \" \" === t || \"\\t\" === t || \"\\n\" === t || \"\\r\" === t ? (p(), r = 2) : e += t), 3 === r && \"!--\" === e && (r = 4, h = h[0]);\n }\n return p(), h;\n }(s)), r), arguments, [])).length > 1 ? r : r[0];\n }\n exports.default = default_1;\n}\n","/* models/singleselect.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const inputs = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\"));\n class SingleSelectView extends input_widget_1.InputWidgetView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.value.change, () => this.render_selection());\n this.connect(this.model.properties.options.change, () => this.render());\n this.connect(this.model.properties.disabled_options.change, () => this.render());\n this.connect(this.model.properties.size.change, () => this.render());\n this.connect(this.model.properties.disabled.change, () => this.render());\n }\n render() {\n super.render();\n const options = this.model.options.map((opt) => {\n let value, _label;\n if ((0, types_1.isString)(opt))\n value = _label = opt;\n else\n [value, _label] = opt;\n let disabled = this.model.disabled_options.includes(value);\n return (0, dom_1.option)({ value: value, disabled: disabled }, _label);\n });\n this.input_el = (0, dom_1.select)({\n multiple: false,\n class: inputs.input,\n name: this.model.name,\n disabled: this.model.disabled,\n }, options);\n this.input_el.style.backgroundImage = 'none';\n this.input_el.addEventListener(\"change\", () => this.change_input());\n this.group_el.appendChild(this.input_el);\n this.render_selection();\n }\n render_selection() {\n const selected = this.model.value;\n for (const el of this.input_el.querySelectorAll('option'))\n if (el.value === selected)\n el.selected = true;\n // Note that some browser implementations might not reduce\n // the number of visible options for size <= 3.\n this.input_el.size = this.model.size;\n }\n change_input() {\n const is_focused = this.el.querySelector('select:focus') != null;\n let value = null;\n for (const el of this.shadow_el.querySelectorAll('option')) {\n if (el.selected) {\n value = el.value;\n break;\n }\n }\n this.model.value = value;\n super.change_input();\n // Restore focus back to the <select> afterwards,\n // so that even if python on_change callback is invoked,\n // focus remains on <select> and one can seamlessly scroll\n // up/down.\n if (is_focused)\n this.input_el.focus();\n }\n }\n exports.SingleSelectView = SingleSelectView;\n SingleSelectView.__name__ = \"SingleSelectView\";\n class SingleSelect extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.SingleSelect = SingleSelect;\n _a = SingleSelect;\n SingleSelect.__name__ = \"SingleSelect\";\n SingleSelect.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = SingleSelectView;\n _a.define(({ Any, Array, Int, Nullable, String }) => ({\n disabled_options: [Array(String), []],\n options: [Array(Any), []],\n size: [Int, 4],\n value: [Nullable(String), null],\n }));\n })();\n}\n","/* models/speech_to_text.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const iconStarted = `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"22px\" style=\"vertical-align: middle;\" fill=\"currentColor\" class=\"bi bi-mic\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z\"/>\n <path fill-rule=\"evenodd\" d=\"M10 8V3a2 2 0 1 0-4 0v5a2 2 0 1 0 4 0zM8 0a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V3a3 3 0 0 0-3-3z\"/>\n</svg>`;\n const iconNotStarted = `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"22px\" style=\"vertical-align: middle;\" fill=\"currentColor\" class=\"bi bi-mic-mute\" viewBox=\"0 0 16 16\">\n<path fill-rule=\"evenodd\" d=\"M12.734 9.613A4.995 4.995 0 0 0 13 8V7a.5.5 0 0 0-1 0v1c0 .274-.027.54-.08.799l.814.814zm-2.522 1.72A4 4 0 0 1 4 8V7a.5.5 0 0 0-1 0v1a5 5 0 0 0 4.5 4.975V15h-3a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-3v-2.025a4.973 4.973 0 0 0 2.43-.923l-.718-.719zM11 7.88V3a3 3 0 0 0-5.842-.963l.845.845A2 2 0 0 1 10 3v3.879l1 1zM8.738 9.86l.748.748A3 3 0 0 1 5 8V6.121l1 1V8a2 2 0 0 0 2.738 1.86zm4.908 3.494l-12-12 .708-.708 12 12-.708.707z\"/>\n</svg>`;\n const titleStarted = \"Click to STOP the speech recognition.\";\n const titleNotStarted = \"Click to START the speech recognition.\";\n const { webkitSpeechRecognition } = window;\n const { webkitSpeechGrammarList } = window;\n function htmlToElement(html) {\n var template = document.createElement('template');\n html = html.trim(); // Never return a text node of whitespace as the result\n template.innerHTML = html;\n return template.content.firstChild;\n }\n function deserializeGrammars(grammars) {\n if (grammars) {\n var speechRecognitionList = new webkitSpeechGrammarList();\n for (let grammar of grammars) {\n if (grammar.src)\n speechRecognitionList.addFromString(grammar.src, grammar.weight);\n else if (grammar.uri)\n speechRecognitionList.addFromURI(grammar.uri, grammar.weight);\n }\n return speechRecognitionList;\n }\n else\n return null;\n }\n function round(value) {\n return Math.round((value + Number.EPSILON) * 100) / 100;\n }\n function serializeResults(results_) {\n const results = [];\n for (let result of results_) {\n let alternatives = [];\n let item = { is_final: result.isFinal, alternatives: alternatives };\n for (let i = 0; i < result.length; i++) {\n let alternative = {\n confidence: round(result[i].confidence),\n transcript: result[i].transcript\n };\n alternatives.push(alternative);\n }\n item.alternatives = alternatives;\n results.push(item);\n }\n return results;\n }\n class SpeechToTextView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.recognition = new webkitSpeechRecognition();\n this.recognition.lang = this.model.lang;\n this.recognition.continuous = this.model.continuous;\n this.recognition.interimResults = this.model.interim_results;\n this.recognition.maxAlternatives = this.model.max_alternatives;\n this.recognition.serviceURI = this.model.service_uri;\n this.setGrammars();\n this.recognition.onresult = (event) => {\n this.model.results = serializeResults(event.results);\n };\n this.recognition.onerror = (event) => {\n console.log(\"SpeechToText Error\");\n console.log(event);\n };\n this.recognition.onnomatch = (event) => {\n console.log(\"SpeechToText No Match\");\n console.log(event);\n };\n this.recognition.onaudiostart = () => this.model.audio_started = true;\n this.recognition.onaudioend = () => this.model.audio_started = false;\n this.recognition.onsoundstart = () => this.model.sound_started = true;\n this.recognition.onsoundend = () => this.model.sound_started = false;\n this.recognition.onspeechstart = () => this.model.speech_started = true;\n this.recognition.onspeechend = () => this.model.speech_started = false;\n this.recognition.onstart = () => {\n this.buttonEl.onclick = () => { this.recognition.stop(); };\n this.buttonEl.innerHTML = this.iconStarted();\n this.buttonEl.setAttribute(\"title\", titleStarted);\n this.model.started = true;\n };\n this.recognition.onend = () => {\n this.buttonEl.onclick = () => { this.recognition.start(); };\n this.buttonEl.innerHTML = this.iconNotStarted();\n this.buttonEl.setAttribute(\"title\", titleNotStarted);\n this.model.started = false;\n };\n this.buttonEl = htmlToElement(`<button class=\"bk bk-btn bk-btn-${this.model.button_type}\" type=\"button\" title=\"${titleNotStarted}\"></button>`);\n this.buttonEl.innerHTML = this.iconNotStarted();\n this.buttonEl.onclick = () => this.recognition.start();\n }\n iconStarted() {\n if (this.model.button_started !== '')\n return this.model.button_started;\n else\n return iconStarted;\n }\n iconNotStarted() {\n if (this.model.button_not_started !== '')\n return this.model.button_not_started;\n else\n return iconNotStarted;\n }\n setIcon() {\n if (this.model.started)\n this.buttonEl.innerHTML = this.iconStarted();\n else\n this.buttonEl.innerHTML = this.iconNotStarted();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.start.change, () => {\n this.model.start = false;\n this.recognition.start();\n });\n this.connect(this.model.properties.stop.change, () => {\n this.model.stop = false;\n this.recognition.stop();\n });\n this.connect(this.model.properties.abort.change, () => {\n this.model.abort = false;\n this.recognition.abort();\n });\n this.connect(this.model.properties.grammars.change, () => this.setGrammars());\n this.connect(this.model.properties.lang.change, () => this.recognition.lang = this.model.lang);\n this.connect(this.model.properties.continuous.change, () => this.recognition.continuous = this.model.continuous);\n this.connect(this.model.properties.interim_results.change, () => this.recognition.interimResults = this.model.interim_results);\n this.connect(this.model.properties.max_alternatives.change, () => this.recognition.maxAlternatives = this.model.max_alternatives);\n this.connect(this.model.properties.service_uri.change, () => this.recognition.serviceURI = this.model.service_uri);\n this.connect(this.model.properties.button_type.change, () => this.buttonEl.className = `bk bk-btn bk-btn-${this.model.button_type}`);\n this.connect(this.model.properties.button_hide.change, () => this.render());\n const { button_not_started, button_started } = this.model.properties;\n this.on_change([button_not_started, button_started], () => this.setIcon());\n }\n setGrammars() {\n this.recognition.grammars = deserializeGrammars(this.model.grammars);\n }\n render() {\n super.render();\n if (!this.model.button_hide)\n this.shadow_el.appendChild(this.buttonEl);\n }\n }\n exports.SpeechToTextView = SpeechToTextView;\n SpeechToTextView.__name__ = \"SpeechToTextView\";\n class SpeechToText extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.SpeechToText = SpeechToText;\n _a = SpeechToText;\n SpeechToText.__name__ = \"SpeechToText\";\n SpeechToText.__module__ = \"panel.models.speech_to_text\";\n (() => {\n _a.prototype.default_view = SpeechToTextView;\n _a.define(({ Any, Array, Boolean, Number, String }) => ({\n start: [Boolean, false],\n stop: [Boolean, false],\n abort: [Boolean, false],\n grammars: [Array(Any), []],\n lang: [String, ''],\n continuous: [Boolean, false],\n interim_results: [Boolean, false],\n max_alternatives: [Number, 1],\n service_uri: [String, ''],\n started: [Boolean, false],\n audio_started: [Boolean, false],\n sound_started: [Boolean, false],\n speech_started: [Boolean, false],\n button_type: [String, 'light'],\n button_hide: [Boolean, false],\n button_not_started: [String, ''],\n button_started: [String, ''],\n results: [Array(Any), []],\n }));\n })();\n}\n","/* models/state.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const model_1 = require(\"@bokehjs/model\");\n const receiver_1 = require(\"@bokehjs/protocol/receiver\");\n function get_json(file, callback) {\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', file, true);\n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == 200) {\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n }\n class StateView extends view_1.View {\n }\n exports.StateView = StateView;\n StateView.__name__ = \"StateView\";\n class State extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n this._receiver = new receiver_1.Receiver();\n this._cache = {};\n }\n apply_state(state) {\n this._receiver.consume(state.header);\n this._receiver.consume(state.metadata);\n this._receiver.consume(state.content);\n if (this._receiver.message && this.document)\n this.document.apply_json_patch(this._receiver.message.content);\n }\n _receive_json(result, path) {\n const state = JSON.parse(result);\n this._cache[path] = state;\n let current = this.state;\n for (const i of this.values) {\n if (current instanceof Map)\n current = current.get(i);\n else\n current = current[i];\n }\n if (current === path)\n this.apply_state(state);\n else if (this._cache[current])\n this.apply_state(this._cache[current]);\n }\n set_state(widget, value) {\n let values = (0, array_1.copy)(this.values);\n const index = this.widgets[widget.id];\n values[index] = value;\n let state = this.state;\n for (const i of values) {\n if (state instanceof Map)\n state = state.get(i);\n else\n state = state[i];\n }\n this.values = values;\n if (this.json) {\n if (this._cache[state]) {\n this.apply_state(this._cache[state]);\n }\n else {\n get_json(state, (result) => this._receive_json(result, state));\n }\n }\n else {\n this.apply_state(state);\n }\n }\n }\n exports.State = State;\n _a = State;\n State.__name__ = \"State\";\n State.__module__ = \"panel.models.state\";\n (() => {\n _a.prototype.default_view = StateView;\n _a.define(({ Any, Boolean }) => ({\n json: [Boolean, false],\n state: [Any, {}],\n widgets: [Any, {}],\n values: [Any, []],\n }));\n })();\n}\n","/* models/tabs.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const tabs = tslib_1.__importStar(require(\"@bokehjs/styles/tabs.css\"));\n const grid_1 = require(\"@bokehjs/core/layout/grid\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const alignments_1 = require(\"@bokehjs/models/layouts/alignments\");\n const tabs_1 = require(\"@bokehjs/models/layouts/tabs\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n function show(element) {\n element.style.visibility = \"\";\n element.style.opacity = \"\";\n }\n function hide(element) {\n element.style.visibility = \"hidden\";\n element.style.opacity = \"0\";\n }\n class TabsView extends tabs_1.TabsView {\n connect_signals() {\n super.connect_signals();\n let view = this;\n while (view != null) {\n if (view.model.type.endsWith('Tabs')) {\n view.connect(view.model.properties.active.change, () => this.update_zindex());\n }\n view = view.parent || view._parent; // Handle ReactiveHTML\n }\n }\n get is_visible() {\n let parent = this.parent;\n let current_view = this;\n while (parent != null) {\n if (parent.model.type.endsWith('Tabs')) {\n if (parent.child_views.indexOf(current_view) !== parent.model.active) {\n return false;\n }\n }\n current_view = parent;\n parent = parent.parent || parent._parent; // Handle ReactiveHTML\n }\n return true;\n }\n render() {\n super.render();\n this.update_zindex();\n }\n update_zindex() {\n const { child_views } = this;\n for (const child_view of child_views) {\n if (child_view != null && child_view.el != null) {\n child_view.el.style.zIndex = \"\";\n }\n }\n if (this.is_visible) {\n const active = child_views[this.model.active];\n if (active != null && active.el != null)\n active.el.style.zIndex = \"1\";\n }\n }\n _after_layout() {\n layout_dom_1.LayoutDOMView.prototype._after_layout.call(this);\n const { child_views } = this;\n for (const child_view of child_views) {\n if (child_view !== undefined)\n hide(child_view.el);\n }\n const { active } = this.model;\n if (active in child_views) {\n const tab = child_views[active];\n if (tab !== undefined)\n show(tab.el);\n }\n }\n _update_layout() {\n layout_dom_1.LayoutDOMView.prototype._update_layout.call(this);\n const loc = this.model.tabs_location;\n this.class_list.remove([...enums_1.Location].map((loc) => tabs[loc]));\n this.class_list.add(tabs[loc]);\n const layoutable = new grid_1.Container();\n for (const view of this.child_views) {\n if (view == undefined)\n continue;\n view.style.append(\":host\", { grid_area: \"stack\" });\n if (view instanceof layout_dom_1.LayoutDOMView && view.layout != null) {\n layoutable.add({ r0: 0, c0: 0, r1: 1, c1: 1 }, view);\n }\n }\n if (layoutable.size != 0) {\n this.layout = new alignments_1.GridAlignmentLayout(layoutable);\n this.layout.set_sizing();\n }\n else {\n delete this.layout;\n }\n }\n update_active() {\n const i = this.model.active;\n const { header_els } = this;\n for (const el of header_els) {\n el.classList.remove(tabs.active);\n }\n if (i in header_els) {\n header_els[i].classList.add(tabs.active);\n }\n const { child_views } = this;\n for (const child_view of child_views) {\n hide(child_view.el);\n }\n if (i in child_views) {\n const view = child_views[i];\n show(view.el);\n if (view.invalidate_render == null)\n view.invalidate_render();\n }\n }\n }\n exports.TabsView = TabsView;\n TabsView.__name__ = \"TabsView\";\n class Tabs extends tabs_1.Tabs {\n }\n exports.Tabs = Tabs;\n _a = Tabs;\n Tabs.__name__ = \"Tabs\";\n Tabs.__module__ = \"panel.models.tabs\";\n (() => {\n _a.prototype.default_view = TabsView;\n })();\n}\n","/* models/terminal.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class KeystrokeEvent extends bokeh_events_1.ModelEvent {\n constructor(key) {\n super();\n this.key = key;\n }\n get event_values() {\n return { model: this.origin, key: this.key };\n }\n }\n exports.KeystrokeEvent = KeystrokeEvent;\n _a = KeystrokeEvent;\n KeystrokeEvent.__name__ = \"KeystrokeEvent\";\n (() => {\n _a.prototype.event_name = \"keystroke\";\n })();\n class TerminalView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.output.change, this.write);\n this.connect(this.model.properties._clears.change, this.clear);\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ class: \"terminal-container\" });\n (0, layout_1.set_size)(this.container, this.model);\n this.term = this.getNewTerminal();\n this.term.onData((value) => {\n this.handleOnData(value);\n });\n this.webLinksAddon = this.getNewWebLinksAddon();\n this.term.loadAddon(this.webLinksAddon);\n this.term.open(this.container);\n this.term.onRender(() => {\n if (!this._rendered)\n this.fit();\n });\n this.write();\n this.shadow_el.appendChild(this.container);\n }\n getNewTerminal() {\n const wn = window;\n if (wn.Terminal)\n return new wn.Terminal(this.model.options);\n else\n return new wn.xtermjs.Terminal(this.model.options);\n }\n getNewWebLinksAddon() {\n const wn = window;\n return new wn.WebLinksAddon.WebLinksAddon();\n }\n handleOnData(value) {\n this.model.trigger_event(new KeystrokeEvent(value));\n }\n write() {\n const text = this.model.output;\n if (text == null || !text.length)\n return;\n // https://stackoverflow.com/questions/65367607/how-to-handle-new-line-in-xterm-js-while-writing-data-into-the-terminal\n const cleaned = text.replace(/\\r?\\n/g, \"\\r\\n\");\n // var text = Array.from(cleaned, (x) => x.charCodeAt(0))\n this.term.write(cleaned);\n }\n clear() {\n this.term.clear();\n }\n fit() {\n const width = this.container.offsetWidth;\n const height = this.container.offsetHeight;\n const renderer = this.term._core._renderService;\n const cell_width = renderer.dimensions.actualCellWidth || 9;\n const cell_height = renderer.dimensions.actualCellHeight || 18;\n if (width == null || height == null || width <= 0 || height <= 0)\n return;\n const cols = Math.max(2, Math.floor(width / cell_width));\n const rows = Math.max(1, Math.floor(height / cell_height));\n if (this.term.rows !== rows || this.term.cols !== cols)\n this.term.resize(cols, rows);\n this.model.ncols = cols;\n this.model.nrows = rows;\n this._rendered = true;\n }\n after_layout() {\n super.after_layout();\n this.fit();\n }\n }\n exports.TerminalView = TerminalView;\n TerminalView.__name__ = \"TerminalView\";\n // The Bokeh .ts model corresponding to the Bokeh .py model\n class Terminal extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Terminal = Terminal;\n _b = Terminal;\n Terminal.__name__ = \"Terminal\";\n Terminal.__module__ = \"panel.models.terminal\";\n (() => {\n _b.prototype.default_view = TerminalView;\n _b.define(({ Any, Int, String }) => ({\n _clears: [Int, 0],\n options: [Any, {}],\n output: [String, ''],\n ncols: [Int, 0],\n nrows: [Int, 0],\n }));\n })();\n}\n","/* models/textarea_input.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const textarea_input_1 = require(\"@bokehjs/models/widgets/textarea_input\");\n class TextAreaInputView extends textarea_input_1.TextAreaInputView {\n connect_signals() {\n super.connect_signals();\n const { value, max_rows } = this.model.properties;\n this.on_change([max_rows, value], () => this.update_rows());\n }\n update_rows() {\n if (!this.model.auto_grow) {\n return;\n }\n // Use this.el directly to access the textarea element\n const textarea = this.input_el;\n const textLines = textarea.value.split(\"\\n\");\n const numRows = Math.max(textLines.length, this.model.rows, 1);\n textarea.rows = Math.min(numRows, this.model.max_rows || Infinity);\n }\n render() {\n super.render();\n this.update_rows();\n this.el.addEventListener(\"input\", () => {\n this.update_rows();\n });\n }\n }\n exports.TextAreaInputView = TextAreaInputView;\n TextAreaInputView.__name__ = \"TextAreaInputView\";\n class TextAreaInput extends textarea_input_1.TextAreaInput {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TextAreaInput = TextAreaInput;\n _a = TextAreaInput;\n TextAreaInput.__name__ = \"TextAreaInput\";\n TextAreaInput.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = TextAreaInputView;\n _a.define(({ Boolean, Int, Nullable }) => ({\n auto_grow: [Boolean, false],\n max_rows: [Nullable(Int), null]\n }));\n })();\n}\n","/* models/text_to_speech.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function toVoicesList(voices) {\n var voicesList = [];\n for (let voice of voices) {\n var item = {\n default: voice.default,\n lang: voice.lang,\n local_service: voice.localService,\n name: voice.name,\n voice_uri: voice.voiceURI,\n };\n voicesList.push(item);\n }\n return voicesList;\n }\n class TextToSpeechView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.model.paused = speechSynthesis.paused;\n this.model.pending = speechSynthesis.pending;\n this.model.speaking = speechSynthesis.speaking;\n // Hack: Keeps speeking for longer texts\n // https://stackoverflow.com/questions/21947730/chrome-speech-synthesis-with-longer-texts\n this._callback = window.setInterval(function () {\n if (!speechSynthesis.paused && speechSynthesis.speaking) {\n window.speechSynthesis.resume();\n }\n }, 10000);\n const populateVoiceList = () => {\n if (typeof speechSynthesis === 'undefined')\n return;\n // According to https://talkrapp.com/speechSynthesis.html not all voices are available\n // The article includes code for ios to handle this. Might be useful.\n this.voices = speechSynthesis.getVoices();\n if (!this.voices)\n return;\n this.model.voices = toVoicesList(this.voices);\n };\n populateVoiceList();\n if (typeof speechSynthesis !== 'undefined' && speechSynthesis.onvoiceschanged !== undefined)\n speechSynthesis.onvoiceschanged = populateVoiceList;\n }\n remove() {\n if (this._callback != null)\n clearInterval(this._callback);\n speechSynthesis.cancel();\n super.remove();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.speak.change, () => {\n this.speak();\n });\n this.connect(this.model.properties.pause.change, () => {\n this.model.pause = false;\n speechSynthesis.pause();\n });\n this.connect(this.model.properties.resume.change, () => {\n this.model.resume = false;\n speechSynthesis.resume();\n });\n this.connect(this.model.properties.cancel.change, () => {\n this.model.cancel = false;\n speechSynthesis.cancel();\n });\n }\n speak() {\n let utterance = new SpeechSynthesisUtterance(this.model.speak.text);\n utterance.pitch = this.model.speak.pitch;\n utterance.volume = this.model.speak.volume;\n utterance.rate = this.model.speak.rate;\n if (this.model.voices) {\n for (let voice of this.voices) {\n if (voice.name === this.model.speak.voice)\n utterance.voice = voice;\n }\n }\n utterance.onpause = () => this.model.paused = true;\n utterance.onstart = () => {\n this.model.speaking = true;\n this.model.paused = false;\n this.model.pending = speechSynthesis.pending;\n };\n utterance.onresume = () => this.model.paused = false;\n utterance.onend = () => {\n this.model.speaking = false;\n this.model.paused = false;\n this.model.pending = speechSynthesis.pending;\n };\n speechSynthesis.speak(utterance);\n this.model.paused = speechSynthesis.paused;\n this.model.pending = speechSynthesis.pending;\n }\n render() {\n super.render();\n // Hack: This will make sure voices are assigned when\n // Bokeh/ Panel is served first time with --show option.\n if (!this.model.voices)\n this.model.voices = toVoicesList(this.voices);\n if (this.model.speak != null && this.model.speak.text)\n this.speak();\n }\n }\n exports.TextToSpeechView = TextToSpeechView;\n TextToSpeechView.__name__ = \"TextToSpeechView\";\n class TextToSpeech extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TextToSpeech = TextToSpeech;\n _a = TextToSpeech;\n TextToSpeech.__name__ = \"TextToSpeech\";\n TextToSpeech.__module__ = \"panel.models.text_to_speech\";\n (() => {\n _a.prototype.default_view = TextToSpeechView;\n _a.define(({ Any, Array, Boolean }) => ({\n paused: [Boolean, false],\n pending: [Boolean, false],\n speaking: [Boolean, false],\n voices: [Array(Any), []],\n cancel: [Boolean, false],\n pause: [Boolean, false],\n resume: [Boolean, false],\n speak: [Any, {}],\n }));\n })();\n}\n","/* models/tooltip_icon.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const control_1 = require(\"@bokehjs/models/widgets/control\");\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const inputs_css_1 = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\")), inputs = inputs_css_1;\n const icons_css_1 = tslib_1.__importDefault(require(\"@bokehjs/styles/icons.css\"));\n class TooltipIconView extends control_1.ControlView {\n *controls() { }\n *children() {\n yield* super.children();\n yield this.description;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { description } = this.model;\n this.description = await (0, build_views_1.build_view)(description, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.description) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n stylesheets() {\n return [...super.stylesheets(), inputs_css_1.default, icons_css_1.default];\n }\n render() {\n super.render();\n const icon_el = (0, dom_1.div)({ class: inputs.icon });\n this.desc_el = (0, dom_1.div)({ class: inputs.description }, icon_el);\n const { desc_el, description } = this;\n description.model.target = desc_el;\n let persistent = false;\n const toggle = (visible) => {\n description.model.setv({\n visible,\n closable: persistent,\n });\n icon_el.classList.toggle(inputs.opaque, visible && persistent);\n };\n this.on_change(description.model.properties.visible, () => {\n const { visible } = description.model;\n if (!visible) {\n persistent = false;\n }\n toggle(visible);\n });\n desc_el.addEventListener('mouseenter', () => {\n toggle(true);\n });\n desc_el.addEventListener('mouseleave', () => {\n if (!persistent)\n toggle(false);\n });\n document.addEventListener('mousedown', (event) => {\n const path = event.composedPath();\n if (path.includes(description.el)) {\n return;\n }\n else if (path.includes(desc_el)) {\n persistent = !persistent;\n toggle(persistent);\n }\n else {\n persistent = false;\n toggle(false);\n }\n });\n window.addEventListener('blur', () => {\n persistent = false;\n toggle(false);\n });\n // Label to get highlight when icon is hovered\n this.shadow_el.appendChild((0, dom_1.label)(this.desc_el));\n }\n change_input() { }\n }\n exports.TooltipIconView = TooltipIconView;\n TooltipIconView.__name__ = \"TooltipIconView\";\n class TooltipIcon extends control_1.Control {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TooltipIcon = TooltipIcon;\n _a = TooltipIcon;\n TooltipIcon.__name__ = \"TooltipIcon\";\n TooltipIcon.__module__ = 'panel.models.widgets';\n (() => {\n _a.prototype.default_view = TooltipIconView;\n _a.define(({ Ref }) => ({\n description: [Ref(tooltip_1.Tooltip), new tooltip_1.Tooltip()],\n }));\n })();\n}\n","/* models/trend.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const plots_1 = require(\"@bokehjs/models/plots\");\n const glyphs_1 = require(\"@bokehjs/models/glyphs\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const formatters_1 = require(\"@bokehjs/models/formatters\");\n const red = \"#d9534f\";\n const green = \"#5cb85c\";\n const blue = \"#428bca\";\n class TrendIndicatorView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.containerDiv = (0, dom_1.div)({ style: \"height:100%; width:100%;\" });\n this.titleDiv = (0, dom_1.div)({ style: \"font-size: 1em; word-wrap: break-word;\" });\n this.valueDiv = (0, dom_1.div)({ style: \"font-size: 2em\" });\n this.value2Div = (0, dom_1.div)({ style: \"font-size: 1em; opacity: 0.5; display: inline\" });\n this.changeDiv = (0, dom_1.div)({ style: \"font-size: 1em; opacity: 0.5; display: inline\" });\n this.textDiv = (0, dom_1.div)({}, this.titleDiv, this.valueDiv, (0, dom_1.div)({}, this.changeDiv, this.value2Div));\n this.updateTitle();\n this.updateValue();\n this.updateValue2();\n this.updateValueChange();\n this.updateTextFontSize();\n this.plotDiv = (0, dom_1.div)({});\n this.containerDiv = (0, dom_1.div)({ style: \"height:100%; width:100%\" }, this.textDiv, this.plotDiv);\n this.updateLayout();\n }\n connect_signals() {\n super.connect_signals();\n const { pos_color, neg_color } = this.model.properties;\n this.on_change([pos_color, neg_color], () => this.updateValueChange());\n const { plot_color, plot_type, width, height, sizing_mode } = this.model.properties;\n this.on_change([plot_color, plot_type, width, height, sizing_mode], () => this.render());\n this.connect(this.model.properties.title.change, () => this.updateTitle(true));\n this.connect(this.model.properties.value.change, () => this.updateValue(true));\n this.connect(this.model.properties.value_change.change, () => this.updateValue2(true));\n this.connect(this.model.properties.layout.change, () => this.updateLayout());\n }\n async render() {\n super.render();\n this.shadow_el.appendChild(this.containerDiv);\n await this.setPlot();\n }\n async setPlot() {\n this.plot = new plots_1.Plot({\n background_fill_color: null,\n border_fill_color: null,\n outline_line_color: null,\n min_border: 0,\n sizing_mode: \"stretch_both\",\n toolbar_location: null,\n });\n var source = this.model.source;\n if (this.model.plot_type === \"line\") {\n var line = new glyphs_1.Line({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 4,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(line, source);\n }\n else if (this.model.plot_type === \"step\") {\n var step = new glyphs_1.Step({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 3,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(step, source);\n }\n else if (this.model.plot_type === \"area\") {\n var varea = new glyphs_1.VArea({\n x: { field: this.model.plot_x },\n y1: { field: this.model.plot_y },\n y2: 0,\n fill_color: this.model.plot_color,\n fill_alpha: 0.5,\n });\n this.plot.add_glyph(varea, source);\n var line = new glyphs_1.Line({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 3,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(line, source);\n }\n else {\n var vbar = new glyphs_1.VBar({\n x: { field: this.model.plot_x },\n top: { field: this.model.plot_y },\n width: 0.9,\n line_color: null,\n fill_color: this.model.plot_color\n });\n this.plot.add_glyph(vbar, source);\n }\n const view = await (0, build_views_1.build_view)(this.plot);\n this.plotDiv.innerHTML = \"\";\n view.render_to(this.plotDiv);\n }\n after_layout() {\n super.after_layout();\n this.updateTextFontSize();\n }\n updateTextFontSize() {\n this.updateTextFontSizeColumn();\n }\n updateTextFontSizeColumn() {\n let elWidth = this.containerDiv.clientWidth;\n let elHeight = this.containerDiv.clientHeight;\n if (this.model.layout === \"column\")\n elHeight = Math.round(elHeight / 2);\n else\n elWidth = Math.round(elWidth / 2);\n const widthTitle = this.model.title.length;\n const widthValue = 2 * this._value_format.length;\n const widthValue2 = this._value_change_format.length + 1;\n const widthConstraint1 = elWidth / widthTitle * 2.0;\n const widthConstraint2 = elWidth / widthValue * 1.8;\n const widthConstraint3 = elWidth / widthValue2 * 2.0;\n const heightConstraint = elHeight / 6;\n const fontSize = Math.min(widthConstraint1, widthConstraint2, widthConstraint3, heightConstraint);\n this.textDiv.style.fontSize = Math.trunc(fontSize) + \"px\";\n this.textDiv.style.lineHeight = \"1.3\";\n }\n updateTitle(update_fontsize = false) {\n this.titleDiv.innerText = this.model.title;\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValue(update_fontsize = false) {\n this._value_format = this.model.formatter.doFormat([this.model.value], { loc: 0 })[0];\n this.valueDiv.innerText = this._value_format;\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValue2(update_fontsize = false) {\n this._value_change_format = this.model.change_formatter.doFormat([this.model.value_change], { loc: 0 })[0];\n this.value2Div.innerText = this._value_change_format;\n this.updateValueChange();\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValueChange() {\n if (this.model.value_change > 0) {\n this.changeDiv.innerHTML = \"▲\";\n this.changeDiv.style.color = this.model.pos_color;\n }\n else if (this.model.value_change < 0) {\n this.changeDiv.innerHTML = \"▼\";\n this.changeDiv.style.color = this.model.neg_color;\n }\n else {\n this.changeDiv.innerHTML = \" \";\n this.changeDiv.style.color = \"inherit\";\n }\n }\n updateLayout() {\n if (this.model.layout === \"column\") {\n this.containerDiv.style.display = \"block\";\n this.textDiv.style.height = \"50%\";\n this.textDiv.style.width = \"100%\";\n this.plotDiv.style.height = \"50%\";\n this.plotDiv.style.width = \"100%\";\n }\n else {\n this.containerDiv.style.display = \"flex\";\n this.textDiv.style.height = \"100%\";\n this.textDiv.style.width = \"\";\n this.plotDiv.style.height = \"100%\";\n this.plotDiv.style.width = \"\";\n this.textDiv.style.flex = \"1\";\n this.plotDiv.style.flex = \"1\";\n }\n if (this._has_finished)\n this.invalidate_layout();\n }\n }\n exports.TrendIndicatorView = TrendIndicatorView;\n TrendIndicatorView.__name__ = \"TrendIndicatorView\";\n class TrendIndicator extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TrendIndicator = TrendIndicator;\n _a = TrendIndicator;\n TrendIndicator.__name__ = \"TrendIndicator\";\n TrendIndicator.__module__ = \"panel.models.trend\";\n (() => {\n _a.prototype.default_view = TrendIndicatorView;\n _a.define(({ Number, String, Ref }) => ({\n description: [String, \"\"],\n formatter: [Ref(formatters_1.TickFormatter), () => new formatters_1.BasicTickFormatter()],\n change_formatter: [Ref(formatters_1.TickFormatter), () => new formatters_1.NumeralTickFormatter()],\n layout: [String, \"column\"],\n source: [Ref(column_data_source_1.ColumnDataSource)],\n plot_x: [String, \"x\"],\n plot_y: [String, \"y\"],\n plot_color: [String, blue],\n plot_type: [String, \"bar\"],\n pos_color: [String, green],\n neg_color: [String, red],\n title: [String, \"\"],\n value: [Number, 0],\n value_change: [Number, 0],\n }));\n })();\n}\n","/* models/vega.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n class VegaEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.VegaEvent = VegaEvent;\n _a = VegaEvent;\n VegaEvent.__name__ = \"VegaEvent\";\n (() => {\n _a.prototype.event_name = \"vega_event\";\n })();\n class VegaPlotView extends layout_dom_1.LayoutDOMView {\n constructor() {\n super(...arguments);\n this._rendered = false;\n }\n connect_signals() {\n super.connect_signals();\n const { data, show_actions, theme } = this.model.properties;\n this._replot = (0, debounce_1.debounce)(() => this._plot(), 20);\n this.on_change([data, show_actions, theme], () => {\n this._replot();\n });\n this.connect(this.model.properties.data_sources.change, () => this._connect_sources());\n this.connect(this.model.properties.events.change, () => {\n for (const event of this.model.events) {\n if (this._callbacks.indexOf(event) > -1)\n continue;\n this._callbacks.push(event);\n const callback = (name, value) => this._dispatch_event(name, value);\n const timeout = this.model.throttle[event] || 20;\n this.vega_view.addSignalListener(event, (0, debounce_1.debounce)(callback, timeout, false));\n }\n });\n this._connected = [];\n this._connect_sources();\n }\n _connect_sources() {\n for (const ds in this.model.data_sources) {\n const cds = this.model.data_sources[ds];\n if (this._connected.indexOf(ds) < 0) {\n this.connect(cds.properties.data.change, () => this._replot());\n this._connected.push(ds);\n }\n }\n }\n remove() {\n if (this.vega_view) {\n this.vega_view.finalize();\n }\n super.remove();\n }\n _dispatch_event(name, value) {\n if ('vlPoint' in value && value.vlPoint.or != null) {\n const indexes = [];\n for (const index of value.vlPoint.or) {\n if (index._vgsid_ !== undefined) { // If \"_vgsid_\" property exists\n indexes.push(index._vgsid_);\n }\n else { // If \"_vgsid_\" property doesn't exist\n // Iterate through all properties in the \"index\" object\n for (const key in index) {\n if (index.hasOwnProperty(key)) { // To ensure key comes from \"index\" object itself, not its prototype\n indexes.push({ [key]: index[key] }); // Push a new object with this key-value pair into the array\n }\n }\n }\n }\n value = indexes;\n }\n this.model.trigger_event(new VegaEvent({ type: name, value: value }));\n }\n _fetch_datasets() {\n const datasets = {};\n for (const ds in this.model.data_sources) {\n const cds = this.model.data_sources[ds];\n const data = [];\n const columns = cds.columns();\n for (let i = 0; i < cds.get_length(); i++) {\n const item = {};\n for (const column of columns) {\n item[column] = cds.data[column][i];\n }\n data.push(item);\n }\n datasets[ds] = data;\n }\n return datasets;\n }\n get child_models() {\n return [];\n }\n render() {\n super.render();\n this._rendered = false;\n this.container = (0, dom_1.div)();\n (0, layout_1.set_size)(this.container, this.model);\n this._callbacks = [];\n this._plot();\n this.shadow_el.append(this.container);\n }\n _plot() {\n const data = this.model.data;\n if ((data == null) || !window.vegaEmbed)\n return;\n if (this.model.data_sources && (Object.keys(this.model.data_sources).length > 0)) {\n const datasets = this._fetch_datasets();\n if ('data' in datasets) {\n data.data['values'] = datasets['data'];\n delete datasets['data'];\n }\n if (data.data != null) {\n const data_objs = (0, types_1.isArray)(data.data) ? data.data : [data.data];\n for (const d of data_objs) {\n if (d.name in datasets) {\n d['values'] = datasets[d.name];\n delete datasets[d.name];\n }\n }\n }\n this.model.data['datasets'] = datasets;\n }\n const config = { actions: this.model.show_actions, theme: this.model.theme };\n window.vegaEmbed(this.container, this.model.data, config).then((result) => {\n this.vega_view = result.view;\n this._resize = (0, debounce_1.debounce)(() => this.resize_view(result.view), 50);\n const callback = (name, value) => this._dispatch_event(name, value);\n for (const event of this.model.events) {\n this._callbacks.push(event);\n const timeout = this.model.throttle[event] || 20;\n this.vega_view.addSignalListener(event, (0, debounce_1.debounce)(callback, timeout, false));\n }\n });\n }\n after_layout() {\n super.after_layout();\n if (this.vega_view != null) {\n this._resize();\n }\n }\n resize_view(view) {\n const canvas = view._renderer.canvas();\n if (!this._rendered && canvas !== null) {\n for (const listener of view._eventListeners) {\n if (listener.type === 'resize')\n listener.handler(new Event('resize'));\n }\n this._rendered = true;\n }\n }\n }\n exports.VegaPlotView = VegaPlotView;\n VegaPlotView.__name__ = \"VegaPlotView\";\n class VegaPlot extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VegaPlot = VegaPlot;\n _b = VegaPlot;\n VegaPlot.__name__ = \"VegaPlot\";\n VegaPlot.__module__ = \"panel.models.vega\";\n (() => {\n _b.prototype.default_view = VegaPlotView;\n _b.define(({ Any, Array, Boolean, Nullable, String }) => ({\n data: [Any, {}],\n data_sources: [Any, {}],\n events: [Array(String), []],\n show_actions: [Boolean, false],\n theme: [Nullable(String), null],\n throttle: [Any, {}]\n }));\n })();\n}\n","/* models/video.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VideoView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._blocked = false;\n this._setting = false;\n this._time = Date.now();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.loop.change, () => this.set_loop());\n this.connect(this.model.properties.paused.change, () => this.set_paused());\n this.connect(this.model.properties.muted.change, () => this.set_muted());\n this.connect(this.model.properties.autoplay.change, () => this.set_autoplay());\n this.connect(this.model.properties.time.change, () => this.set_time());\n this.connect(this.model.properties.value.change, () => this.set_value());\n this.connect(this.model.properties.volume.change, () => this.set_volume());\n }\n render() {\n super.render();\n this.videoEl = document.createElement('video');\n this.containerEl = document.createElement('div');\n this.containerEl.className = \"pn-video-container\";\n this.containerEl.style.height = '100%';\n this.containerEl.style.width = '100%';\n this.videoEl.style.objectFit = 'fill';\n this.videoEl.style.width = '100%';\n this.videoEl.style.height = '100%';\n if (!this.model.sizing_mode || this.model.sizing_mode === 'fixed') {\n if (this.model.height)\n this.videoEl.height = this.model.height;\n if (this.model.width)\n this.videoEl.width = this.model.width;\n }\n if (this.model.max_height)\n this.videoEl.style.maxHeight = `${this.model.max_height}px`;\n if (this.model.max_width)\n this.videoEl.style.maxWidth = `${this.model.max_width}px`;\n this.videoEl.controls = true;\n this.videoEl.src = this.model.value;\n this.videoEl.currentTime = this.model.time;\n this.videoEl.loop = this.model.loop;\n this.videoEl.muted = this.model.muted;\n this.videoEl.autoplay = this.model.autoplay;\n if (this.model.volume != null)\n this.videoEl.volume = this.model.volume / 100;\n else\n this.model.volume = this.videoEl.volume * 100;\n this.videoEl.onpause = () => this.model.paused = true;\n this.videoEl.onplay = () => this.model.paused = false;\n this.videoEl.ontimeupdate = () => this.update_time(this);\n this.videoEl.onvolumechange = () => this.update_volume(this);\n this.containerEl.appendChild(this.videoEl);\n this.shadow_el.appendChild(this.containerEl);\n if (!this.model.paused)\n this.videoEl.play();\n }\n update_time(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n if ((Date.now() - view._time) < view.model.throttle)\n return;\n view._blocked = true;\n view.model.time = view.videoEl.currentTime;\n view._time = Date.now();\n }\n update_volume(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n view._blocked = true;\n view.model.volume = view.videoEl.volume * 100;\n }\n set_loop() {\n this.videoEl.loop = this.model.loop;\n }\n set_muted() {\n this.videoEl.muted = this.model.muted;\n }\n set_autoplay() {\n this.videoEl.autoplay = this.model.autoplay;\n }\n set_paused() {\n if (!this.videoEl.paused && this.model.paused)\n this.videoEl.pause();\n if (this.videoEl.paused && !this.model.paused)\n this.videoEl.play();\n }\n set_volume() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n if (this.model.volume != null)\n this.videoEl.volume = this.model.volume / 100;\n }\n set_time() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n this.videoEl.currentTime = this.model.time;\n }\n set_value() {\n this.videoEl.src = this.model.value;\n }\n }\n exports.VideoView = VideoView;\n VideoView.__name__ = \"VideoView\";\n class Video extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Video = Video;\n _a = Video;\n Video.__name__ = \"Video\";\n Video.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = VideoView;\n _a.define(({ Any, Boolean, Int, Number, Nullable }) => ({\n loop: [Boolean, false],\n paused: [Boolean, true],\n muted: [Boolean, false],\n autoplay: [Boolean, false],\n time: [Number, 0],\n throttle: [Int, 250],\n value: [Any, ''],\n volume: [Nullable(Int), null],\n }));\n })();\n}\n","/* models/videostream.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VideoStreamView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.constraints = {\n 'audio': false,\n 'video': true\n };\n }\n initialize() {\n super.initialize();\n if (this.model.timeout !== null)\n this.set_timeout();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.timeout.change, () => this.set_timeout());\n this.connect(this.model.properties.snapshot.change, () => this.snapshot());\n this.connect(this.model.properties.paused.change, () => this.pause());\n }\n pause() {\n if (this.model.paused) {\n if (this.timer != null) {\n clearInterval(this.timer);\n this.timer = null;\n }\n this.videoEl.pause();\n }\n else\n this.videoEl.play();\n this.set_timeout();\n }\n set_timeout() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n if (this.model.timeout != null && this.model.timeout > 0)\n this.timer = setInterval(() => this.snapshot(), this.model.timeout);\n }\n snapshot() {\n this.canvasEl.width = this.videoEl.videoWidth;\n this.canvasEl.height = this.videoEl.videoHeight;\n const context = this.canvasEl.getContext('2d');\n if (context)\n context.drawImage(this.videoEl, 0, 0, this.canvasEl.width, this.canvasEl.height);\n this.model.value = this.canvasEl.toDataURL(\"image/\" + this.model.format, 0.95);\n }\n remove() {\n super.remove();\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n render() {\n super.render();\n if (this.videoEl)\n return;\n this.videoEl = document.createElement('video');\n if (!this.model.sizing_mode || this.model.sizing_mode === 'fixed') {\n if (this.model.height)\n this.videoEl.height = this.model.height;\n if (this.model.width)\n this.videoEl.width = this.model.width;\n }\n this.videoEl.style.objectFit = 'fill';\n this.videoEl.style.minWidth = '100%';\n this.videoEl.style.minHeight = '100%';\n this.canvasEl = document.createElement('canvas');\n this.shadow_el.appendChild(this.videoEl);\n if (navigator.mediaDevices.getUserMedia) {\n navigator.mediaDevices.getUserMedia(this.constraints)\n .then(stream => {\n this.videoEl.srcObject = stream;\n if (!this.model.paused) {\n this.videoEl.play();\n }\n })\n .catch(console.error);\n }\n }\n }\n exports.VideoStreamView = VideoStreamView;\n VideoStreamView.__name__ = \"VideoStreamView\";\n class VideoStream extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VideoStream = VideoStream;\n _a = VideoStream;\n VideoStream.__name__ = \"VideoStream\";\n VideoStream.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = VideoStreamView;\n _a.define(({ Any, Boolean, Int, Nullable, String }) => ({\n format: [String, 'png'],\n paused: [Boolean, false],\n snapshot: [Boolean, false],\n timeout: [Nullable(Int), null],\n value: [Any]\n }));\n _a.override({\n height: 240,\n width: 320\n });\n })();\n}\n","/* models/vizzu.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VizzuEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n this.event_name = \"vizzu_event\";\n this.publish = true;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.VizzuEvent = VizzuEvent;\n VizzuEvent.__name__ = \"VizzuEvent\";\n const VECTORIZED_PROPERTIES = ['x', 'y', 'color', 'label', 'lightness', 'size', 'splittedBy', 'dividedBy'];\n class VizzuChartView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.update = [];\n this._animating = false;\n }\n connect_signals() {\n super.connect_signals();\n const update = (0, debounce_1.debounce)(() => {\n if (!this.valid_config) {\n console.warn('Vizzu config not valid given current data.');\n return;\n }\n else if (!this.update.length || this._animating)\n return;\n else {\n let change = {};\n for (const prop of this.update) {\n if (prop === 'config')\n change = Object.assign(Object.assign({}, change), { config: this.config() });\n else if (prop === 'data')\n change = Object.assign(Object.assign({}, change), { data: this.data() });\n else\n change = Object.assign(Object.assign({}, change), { style: this.model.style });\n }\n this._animating = true;\n this.vizzu_view.animate(change, this.model.duration + 'ms').then(() => {\n this._animating = false;\n if (this.update.length)\n update();\n });\n this.update = [];\n }\n }, 20);\n const update_prop = (prop) => {\n if (!this.update.includes(prop))\n this.update.push(prop);\n update();\n };\n this.connect(this.model.properties.config.change, () => update_prop('config'));\n this.connect(this.model.source.properties.data.change, () => update_prop('data'));\n this.connect(this.model.source.streaming, () => update_prop('data'));\n this.connect(this.model.source.patching, () => update_prop('data'));\n this.connect(this.model.properties.tooltip.change, () => {\n this.vizzu_view.feature('tooltip', this.model.tooltip);\n });\n this.connect(this.model.properties.style.change, () => update_prop('style'));\n }\n get valid_config() {\n const columns = this.model.source.columns();\n if ('channels' in this.model.config) {\n for (const col of Object.values(this.model.config.channels)) {\n if ((0, types_1.isArray)(col)) {\n for (const c of col) {\n if (col != null && !columns.includes(c))\n return false;\n }\n }\n else if ((0, types_1.isObject)(col)) {\n for (const prop of Object.keys(col)) {\n for (const c of col[prop]) {\n if (col != null && !columns.includes(c))\n return false;\n }\n }\n }\n else if (col != null && !columns.includes(col))\n return false;\n }\n }\n else {\n for (const prop of VECTORIZED_PROPERTIES) {\n if (prop in this.model.config && !columns.includes(this.model.config[prop]))\n return false;\n }\n }\n return true;\n }\n config() {\n let config = Object.assign({}, this.model.config);\n if ('channels' in config)\n config['channels'] = Object.assign({}, config.channels);\n if (config.preset != undefined)\n config = window.Vizzu.presets[config.preset](config);\n return config;\n }\n data() {\n const series = [];\n for (const column of this.model.columns) {\n let array = [...this.model.source.get_array(column.name)];\n if (column.type === 'datetime' || column.type == 'date')\n column.type = 'dimension';\n if (column.type === 'dimension')\n array = array.map(String);\n series.push(Object.assign(Object.assign({}, column), { values: array }));\n }\n return { series };\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ 'style': 'display: contents;' });\n this.shadow_el.append(this.container);\n const state = { config: this.config(), data: this.data(), style: this.model.style };\n this.vizzu_view = new window.Vizzu(this.container, state);\n this._animating = true;\n this.vizzu_view.initializing.then((chart) => {\n chart.on('click', (event) => {\n this.model.trigger_event(new VizzuEvent(event.data));\n });\n chart.feature('tooltip', this.model.tooltip);\n this._animating = false;\n });\n }\n remove() {\n if (this.vizzu_view) {\n this.vizzu_view.detach();\n }\n super.remove();\n }\n }\n exports.VizzuChartView = VizzuChartView;\n VizzuChartView.__name__ = \"VizzuChartView\";\n class VizzuChart extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VizzuChart = VizzuChart;\n _a = VizzuChart;\n VizzuChart.__name__ = \"VizzuChart\";\n VizzuChart.__module__ = \"panel.models.vizzu\";\n (() => {\n _a.prototype.default_view = VizzuChartView;\n _a.define(({ Any, Array, Boolean, Number, Ref }) => ({\n animation: [Any, {}],\n config: [Any, {}],\n columns: [Array(Any), []],\n source: [Ref(column_data_source_1.ColumnDataSource),],\n duration: [Number, 500],\n style: [Any, {}],\n tooltip: [Boolean, false],\n }));\n })();\n}\n","/* models/vtk/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var vtkjs_1 = require(\"173e6cb054\") /* ./vtkjs */;\n __esExport(\"VTKJSPlot\", vtkjs_1.VTKJSPlot);\n var vtkvolume_1 = require(\"9cb70c6ab6\") /* ./vtkvolume */;\n __esExport(\"VTKVolumePlot\", vtkvolume_1.VTKVolumePlot);\n var vtkaxes_1 = require(\"5a606f3f35\") /* ./vtkaxes */;\n __esExport(\"VTKAxes\", vtkaxes_1.VTKAxes);\n var vtksynchronized_1 = require(\"66775d6392\") /* ./vtksynchronized */;\n __esExport(\"VTKSynchronizedPlot\", vtksynchronized_1.VTKSynchronizedPlot);\n}\n","/* models/vtk/vtkjs.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKJSPlotView extends vtklayout_1.AbstractVTKView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => {\n this.invalidate_render();\n });\n }\n render() {\n super.render();\n this._create_orientation_widget();\n this._set_axes();\n }\n invalidate_render() {\n this._vtk_renwin = null;\n super.invalidate_render();\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindow.newInstance({\n rootContainer: this._vtk_container,\n container: this._vtk_container,\n });\n }\n plot() {\n if (this.model.data == null) {\n this._vtk_renwin.getRenderWindow().render();\n return;\n }\n const dataAccessHelper = util_1.vtkns.DataAccessHelper.get(\"zip\", {\n zipContent: atob(this.model.data),\n callback: (_zip) => {\n const sceneImporter = util_1.vtkns.HttpSceneLoader.newInstance({\n renderer: this._vtk_renwin.getRenderer(),\n dataAccessHelper,\n });\n const fn = window.vtk.macro.debounce(() => {\n setTimeout(() => {\n if (this._axes == null && this.model.axes)\n this._set_axes();\n this._set_camera_state();\n this._get_camera_state();\n this._vtk_renwin.getRenderWindow().render();\n }, 100);\n }, 100);\n sceneImporter.setUrl(\"index.json\");\n sceneImporter.onReady(fn);\n },\n });\n }\n }\n exports.VTKJSPlotView = VTKJSPlotView;\n VTKJSPlotView.__name__ = \"VTKJSPlotView\";\n class VTKJSPlot extends vtklayout_1.AbstractVTKPlot {\n }\n exports.VTKJSPlot = VTKJSPlot;\n _a = VTKJSPlot;\n VTKJSPlot.__name__ = \"VTKJSPlot\";\n (() => {\n _a.prototype.default_view = VTKJSPlotView;\n _a.define(({ Boolean, Nullable, String }) => ({\n data: [Nullable(String)],\n enable_keybindings: [Boolean, false],\n }));\n })();\n}\n","/* models/vtk/vtklayout.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const color_mapper_1 = require(\"@bokehjs/models/mappers/color_mapper\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const layout_1 = require(\"c64c1219c8\") /* ../layout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n const vtkcolorbar_1 = require(\"c010237f8b\") /* ./vtkcolorbar */;\n const vtkaxes_1 = require(\"5a606f3f35\") /* ./vtkaxes */;\n const INFO_DIV_STYLE = {\n padding: \"0px 2px 0px 2px\",\n maxHeight: \"150px\",\n height: \"auto\",\n backgroundColor: \"rgba(255, 255, 255, 0.4)\",\n borderRadius: \"10px\",\n margin: \"2px\",\n boxSizing: \"border-box\",\n overflow: \"hidden\",\n overflowY: \"auto\",\n transition: \"width 0.1s linear\",\n bottom: \"0px\",\n position: \"absolute\",\n };\n const textPositions = (0, kinds_1.Enum)(\"LowerLeft\", \"LowerRight\", \"UpperLeft\", \"UpperRight\", \"LowerEdge\", \"RightEdge\", \"LeftEdge\", \"UpperEdge\");\n class AbstractVTKView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._camera_callbacks = [];\n this._renderable = true;\n this._setting_camera = false;\n this._rendered = false;\n }\n _add_colorbars() {\n //construct colorbars\n const old_info_div = this.shadow_el.querySelector(\".vtk_info\");\n if (old_info_div)\n this.shadow_el.removeChild(old_info_div);\n if (this.model.color_mappers.length < 1)\n return;\n const info_div = document.createElement(\"div\");\n const expand_width = \"350px\";\n const collapsed_width = \"30px\";\n info_div.classList.add('vtk_info');\n (0, util_1.applyStyle)(info_div, INFO_DIV_STYLE);\n (0, util_1.applyStyle)(info_div, { width: expand_width });\n this.shadow_el.appendChild(info_div);\n //construct colorbars\n const colorbars = [];\n this.model.color_mappers.forEach((mapper) => {\n const cb = new vtkcolorbar_1.VTKColorBar(info_div, mapper);\n colorbars.push(cb);\n });\n //content when collapsed\n const dots = document.createElement('div');\n (0, util_1.applyStyle)(dots, { textAlign: \"center\", fontSize: \"20px\" });\n dots.innerText = \"...\";\n info_div.addEventListener('click', () => {\n if (info_div.style.width === collapsed_width) {\n info_div.removeChild(dots);\n (0, util_1.applyStyle)(info_div, { height: \"auto\", width: expand_width });\n colorbars.forEach((cb) => info_div.appendChild(cb.canvas));\n }\n else {\n colorbars.forEach((cb) => info_div.removeChild(cb.canvas));\n (0, util_1.applyStyle)(info_div, { height: collapsed_width, width: collapsed_width });\n info_div.appendChild(dots);\n }\n });\n info_div.click();\n }\n _init_annotations_container() {\n if (!this._annotations_container) {\n this._annotations_container = document.createElement(\"div\");\n this._annotations_container.style.position = \"absolute\";\n this._annotations_container.style.width = \"100%\";\n this._annotations_container.style.height = \"100%\";\n this._annotations_container.style.top = \"0\";\n this._annotations_container.style.left = \"0\";\n this._annotations_container.style.pointerEvents = \"none\";\n }\n }\n _clean_annotations() {\n if (this._annotations_container) {\n while (this._annotations_container.firstElementChild) {\n this._annotations_container.firstElementChild.remove();\n }\n }\n }\n _add_annotations() {\n this._clean_annotations();\n const { annotations } = this.model;\n if (annotations != null) {\n for (let annotation of annotations) {\n const { viewport, color, fontSize, fontFamily } = annotation;\n textPositions.values.forEach((pos) => {\n const text = annotation[pos];\n if (text) {\n const div = document.createElement(\"div\");\n div.textContent = text;\n const { style } = div;\n style.position = \"absolute\";\n style.color = `rgb(${color.map((val) => 255 * val).join(\",\")})`;\n style.fontSize = `${fontSize}px`;\n style.padding = \"5px\";\n style.fontFamily = fontFamily;\n style.width = \"fit-content\";\n if (pos == \"UpperLeft\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.left = `${viewport[0] * 100}%`;\n }\n if (pos == \"UpperRight\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.right = `${(1 - viewport[2]) * 100}%`;\n }\n if (pos == \"LowerLeft\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.left = `${viewport[0] * 100}%`;\n }\n if (pos == \"LowerRight\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.right = `${(1 - viewport[2]) * 100}%`;\n }\n if (pos == \"UpperEdge\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.left = `${(viewport[0] + (viewport[2] - viewport[0]) / 2) * 100}%`;\n style.transform = \"translateX(-50%)\";\n }\n if (pos == \"LowerEdge\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.left = `${(viewport[0] + (viewport[2] - viewport[0]) / 2) * 100}%`;\n style.transform = \"translateX(-50%)\";\n }\n if (pos == \"LeftEdge\") {\n style.left = `${viewport[0] * 100}%`;\n style.top = `${(1 - viewport[3] + (viewport[3] - viewport[1]) / 2) * 100}%`;\n style.transform = \"translateY(-50%)\";\n }\n if (pos == \"RightEdge\") {\n style.right = `${(1 - viewport[2]) * 100}%`;\n style.top = `${(1 - viewport[3] + (viewport[3] - viewport[1]) / 2) * 100}%`;\n style.transform = \"translateY(-50%)\";\n }\n this._annotations_container.appendChild(div);\n }\n });\n }\n }\n }\n connect_signals() {\n super.connect_signals();\n this.on_change(this.model.properties.orientation_widget, () => {\n this._orientation_widget_visibility(this.model.orientation_widget);\n });\n this.on_change(this.model.properties.camera, () => this._set_camera_state());\n this.on_change(this.model.properties.axes, () => {\n this._delete_axes();\n if (this.model.axes)\n this._set_axes();\n this._vtk_render();\n });\n this.on_change(this.model.properties.color_mappers, () => this._add_colorbars());\n this.on_change(this.model.properties.annotations, () => this._add_annotations());\n }\n render() {\n super.render();\n this._rendered = false;\n if (this._vtk_renwin && this._vtk_container) {\n // warning if _vtk_renwin contain controllers or other elements\n // we must attach them to the new el\n this.shadow_el.appendChild(this._vtk_container);\n this.shadow_el.appendChild(this._annotations_container);\n return;\n }\n this._orientationWidget = null;\n this._axes = null;\n this._vtk_container = (0, dom_1.div)();\n this.init_vtk_renwin();\n this._init_annotations_container();\n (0, layout_1.set_size)(this._vtk_container, this.model);\n this.shadow_el.appendChild(this._vtk_container);\n // update camera model state only at the end of the interaction\n // with the scene (avoid bouncing events and large amount of events)\n this._vtk_renwin.getInteractor().onEndAnimation(() => this._get_camera_state());\n this._remove_default_key_binding();\n this._bind_key_events();\n this.plot();\n this.model.renderer_el = this._vtk_renwin;\n this.shadow_el.appendChild(this._annotations_container);\n }\n after_layout() {\n super.after_layout();\n if (this._renderable)\n this._vtk_renwin.resize(); // resize call render method\n this._vtk_render();\n if (!this._rendered) {\n this._add_colorbars();\n this._add_annotations();\n this._rendered = true;\n }\n }\n invalidate_render() {\n this._unsubscribe_camera_cb();\n super.invalidate_render();\n }\n remove() {\n this._unsubscribe_camera_cb();\n window.removeEventListener(\"resize\", this._vtk_renwin.resize);\n if (this._orientationWidget != null)\n this._orientationWidget.delete();\n this._vtk_renwin.getRenderWindow().getInteractor().delete();\n this._vtk_renwin.delete();\n super.remove();\n }\n get _vtk_camera_state() {\n const vtk_camera = this._vtk_renwin.getRenderer().getActiveCamera();\n let state;\n if (vtk_camera) {\n state = (0, object_1.clone)(vtk_camera.get());\n delete state.cameraLightTransform;\n delete state.classHierarchy;\n delete state.vtkObject;\n delete state.vtkCamera;\n delete state.viewPlaneNormal;\n delete state.flattenedDepIds;\n delete state.managedInstanceId;\n delete state.directionOfProjection;\n }\n return state;\n }\n get _axes_canvas() {\n let axes_canvas = this._vtk_container.querySelector(\".axes-canvas\");\n if (!axes_canvas) {\n axes_canvas = (0, dom_1.canvas)({\n style: {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n width: \"100%\",\n height: \"100%\",\n },\n });\n axes_canvas.classList.add(\"axes-canvas\");\n this._vtk_container.appendChild(axes_canvas);\n this._vtk_renwin.setResizeCallback(() => {\n if (this._axes_canvas) {\n const dims = this._vtk_container.getBoundingClientRect();\n const width = Math.floor(dims.width * window.devicePixelRatio);\n const height = Math.floor(dims.height * window.devicePixelRatio);\n this._axes_canvas.setAttribute(\"width\", width.toFixed());\n this._axes_canvas.setAttribute(\"height\", height.toFixed());\n }\n });\n }\n return axes_canvas;\n }\n _bind_key_events() {\n this.el.addEventListener(\"mouseenter\", () => {\n const interactor = this._vtk_renwin.getInteractor();\n if (this.model.enable_keybindings) {\n document\n .querySelector(\"body\")\n .addEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .addEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .addEventListener(\"keyup\", interactor.handleKeyUp);\n }\n });\n this.el.addEventListener(\"mouseleave\", () => {\n const interactor = this._vtk_renwin.getInteractor();\n document\n .querySelector(\"body\")\n .removeEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keyup\", interactor.handleKeyUp);\n });\n }\n _create_orientation_widget() {\n const axes = util_1.vtkns.AxesActor.newInstance();\n // add orientation widget\n this._orientationWidget = util_1.vtkns.OrientationMarkerWidget.newInstance({\n actor: axes,\n interactor: this._vtk_renwin.getInteractor(),\n });\n this._orientationWidget.setEnabled(true);\n this._orientationWidget.setViewportCorner(util_1.vtkns.OrientationMarkerWidget.Corners.BOTTOM_RIGHT);\n this._orientationWidget.setViewportSize(0.15);\n this._orientationWidget.setMinPixelSize(75);\n this._orientationWidget.setMaxPixelSize(300);\n if (this.model.interactive_orientation_widget)\n this._make_orientation_widget_interactive();\n this._orientation_widget_visibility(this.model.orientation_widget);\n }\n _make_orientation_widget_interactive() {\n this._widgetManager = util_1.vtkns.WidgetManager.newInstance();\n this._widgetManager.setRenderer(this._orientationWidget.getRenderer());\n const axes = this._orientationWidget.getActor();\n const widget = util_1.vtkns.InteractiveOrientationWidget.newInstance();\n widget.placeWidget(axes.getBounds());\n widget.setBounds(axes.getBounds());\n widget.setPlaceFactor(1);\n const vw = this._widgetManager.addWidget(widget);\n // Manage user interaction\n vw.onOrientationChange(({ direction }) => {\n const camera = this._vtk_renwin.getRenderer().getActiveCamera();\n const focalPoint = camera.getFocalPoint();\n const position = camera.getPosition();\n const viewUp = camera.getViewUp();\n const distance = Math.sqrt(Math.pow(position[0] - focalPoint[0], 2) +\n Math.pow(position[1] - focalPoint[1], 2) +\n Math.pow(position[2] - focalPoint[2], 2));\n camera.setPosition(focalPoint[0] + direction[0] * distance, focalPoint[1] + direction[1] * distance, focalPoint[2] + direction[2] * distance);\n if (direction[0])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 1, 2));\n if (direction[1])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 2));\n if (direction[2])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 1));\n this._vtk_renwin.getRenderer().resetCameraClippingRange();\n this._vtk_render();\n this._get_camera_state();\n });\n }\n _delete_axes() {\n if (this._axes) {\n Object.keys(this._axes).forEach((key) => this._vtk_renwin.getRenderer().removeActor(this._axes[key]));\n this._axes = null;\n const textCtx = this._axes_canvas.getContext(\"2d\");\n if (textCtx)\n textCtx.clearRect(0, 0, this._axes_canvas.clientWidth * window.devicePixelRatio, this._axes_canvas.clientHeight * window.devicePixelRatio);\n }\n }\n _get_camera_state() {\n if (!this._setting_camera) {\n this._setting_camera = true;\n this.model.camera = this._vtk_camera_state;\n this._setting_camera = false;\n }\n }\n _orientation_widget_visibility(visibility) {\n this._orientationWidget.setEnabled(visibility);\n if (this._widgetManager != null) {\n if (visibility)\n this._widgetManager.enablePicking();\n else\n this._widgetManager.disablePicking();\n }\n this._vtk_render();\n }\n _remove_default_key_binding() {\n const interactor = this._vtk_renwin.getInteractor();\n document\n .querySelector(\"body\")\n .removeEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keyup\", interactor.handleKeyUp);\n }\n _set_axes() {\n if (this.model.axes && this._vtk_renwin.getRenderer()) {\n const { psActor, axesActor, gridActor } = this.model.axes.create_axes(this._axes_canvas);\n this._axes = { psActor, axesActor, gridActor };\n if (psActor)\n this._vtk_renwin.getRenderer().addActor(psActor);\n if (axesActor)\n this._vtk_renwin.getRenderer().addActor(axesActor);\n if (gridActor)\n this._vtk_renwin.getRenderer().addActor(gridActor);\n }\n }\n _set_camera_state() {\n if (!this._setting_camera && this._vtk_renwin.getRenderer() !== undefined) {\n this._setting_camera = true;\n if (this.model.camera &&\n JSON.stringify(this.model.camera) != JSON.stringify(this._vtk_camera_state))\n this._vtk_renwin\n .getRenderer()\n .getActiveCamera()\n .set(this.model.camera);\n this._vtk_renwin.getRenderer().resetCameraClippingRange();\n this._setting_camera = false;\n }\n }\n _unsubscribe_camera_cb() {\n this._camera_callbacks\n .splice(0, this._camera_callbacks.length)\n .map((cb) => cb.unsubscribe());\n }\n _vtk_render() {\n if (this._renderable) {\n if (this._orientationWidget)\n this._orientationWidget.updateMarkerOrientation();\n this._vtk_renwin.getRenderWindow().render();\n }\n }\n }\n exports.AbstractVTKView = AbstractVTKView;\n AbstractVTKView.__name__ = \"AbstractVTKView\";\n class AbstractVTKPlot extends layout_1.HTMLBox {\n constructor(attrs) {\n (0, util_1.setup_vtkns)();\n super(attrs);\n }\n getActors() {\n return this.renderer_el.getRenderer().getActors();\n }\n }\n exports.AbstractVTKPlot = AbstractVTKPlot;\n _a = AbstractVTKPlot;\n AbstractVTKPlot.__name__ = \"AbstractVTKPlot\";\n AbstractVTKPlot.__module__ = \"panel.models.vtk\";\n (() => {\n _a.define(({ Any, Ref, Array, Boolean, Nullable }) => ({\n axes: [Nullable(Ref(vtkaxes_1.VTKAxes)), null],\n camera: [Any, {}],\n color_mappers: [Array(Ref(color_mapper_1.ColorMapper)), []],\n orientation_widget: [Boolean, false],\n interactive_orientation_widget: [Boolean, false],\n annotations: [Nullable(Array(Any)), null],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/util.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const array_1 = require(\"@bokehjs/core/util/array\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n exports.ARRAY_TYPES = {\n uint8: Uint8Array,\n int8: Int8Array,\n uint16: Uint16Array,\n int16: Int16Array,\n uint32: Uint32Array,\n int32: Int32Array,\n float32: Float32Array,\n float64: Float64Array,\n };\n exports.vtkns = {};\n function setup_vtkns() {\n if (exports.vtkns.Actor != null)\n return;\n const vtk = window.vtk;\n exports.vtkns[\"Actor\"] = vtk.Rendering.Core.vtkActor;\n exports.vtkns[\"AxesActor\"] = vtk.Rendering.Core.vtkAxesActor;\n exports.vtkns[\"Base64\"] = vtk.Common.Core.vtkBase64;\n exports.vtkns[\"BoundingBox\"] = vtk.Common.DataModel.vtkBoundingBox;\n exports.vtkns[\"Camera\"] = vtk.Rendering.Core.vtkCamera;\n exports.vtkns[\"ColorTransferFunction\"] = vtk.Rendering.Core.vtkColorTransferFunction;\n exports.vtkns[\"CubeSource\"] = vtk.Filters.Sources.vtkCubeSource;\n exports.vtkns[\"DataAccessHelper\"] = vtk.IO.Core.DataAccessHelper;\n exports.vtkns[\"DataArray\"] = vtk.Common.Core.vtkDataArray;\n exports.vtkns[\"Follower\"] = vtk.Rendering.Core.vtkFollower;\n exports.vtkns[\"FullScreenRenderWindow\"] = vtk.Rendering.Misc.vtkFullScreenRenderWindow;\n exports.vtkns[\"Glyph3DMapper\"] = vtk.Rendering.Core.vtkGlyph3DMapper;\n exports.vtkns[\"HttpSceneLoader\"] = vtk.IO.Core.vtkHttpSceneLoader;\n exports.vtkns[\"ImageData\"] = vtk.Common.DataModel.vtkImageData;\n exports.vtkns[\"ImageMapper\"] = vtk.Rendering.Core.vtkImageMapper;\n exports.vtkns[\"ImageProperty\"] = vtk.Rendering.Core.vtkImageProperty;\n exports.vtkns[\"ImageSlice\"] = vtk.Rendering.Core.vtkImageSlice;\n exports.vtkns[\"InteractiveOrientationWidget\"] =\n vtk.Widgets.Widgets3D.vtkInteractiveOrientationWidget;\n exports.vtkns[\"InteractorStyleTrackballCamera\"] =\n vtk.Interaction.Style.vtkInteractorStyleTrackballCamera;\n exports.vtkns[\"Light\"] = vtk.Rendering.Core.vtkLight;\n exports.vtkns[\"LineSource\"] = vtk.Filters.Sources.vtkLineSource;\n exports.vtkns[\"LookupTable\"] = vtk.Common.Core.vtkLookupTable;\n exports.vtkns[\"macro\"] = vtk.macro;\n exports.vtkns[\"Mapper\"] = vtk.Rendering.Core.vtkMapper;\n exports.vtkns[\"OpenGLRenderWindow\"] = vtk.Rendering.OpenGL.vtkRenderWindow;\n exports.vtkns[\"OrientationMarkerWidget\"] =\n vtk.Interaction.Widgets.vtkOrientationMarkerWidget;\n exports.vtkns[\"OutlineFilter\"] = vtk.Filters.General.vtkOutlineFilter;\n exports.vtkns[\"PiecewiseFunction\"] = vtk.Common.DataModel.vtkPiecewiseFunction;\n exports.vtkns[\"PixelSpaceCallbackMapper\"] =\n vtk.Rendering.Core.vtkPixelSpaceCallbackMapper;\n exports.vtkns[\"PlaneSource\"] = vtk.Filters.Sources.vtkPlaneSource;\n exports.vtkns[\"PointSource\"] = vtk.Filters.Sources.vtkPointSource;\n exports.vtkns[\"PolyData\"] = vtk.Common.DataModel.vtkPolyData;\n exports.vtkns[\"Property\"] = vtk.Rendering.Core.vtkProperty;\n exports.vtkns[\"Renderer\"] = vtk.Rendering.Core.vtkRenderer;\n exports.vtkns[\"RenderWindow\"] = vtk.Rendering.Core.vtkRenderWindow;\n exports.vtkns[\"RenderWindowInteractor\"] = vtk.Rendering.Core.vtkRenderWindowInteractor;\n exports.vtkns[\"SphereMapper\"] = vtk.Rendering.Core.vtkSphereMapper;\n exports.vtkns[\"SynchronizableRenderWindow\"] =\n vtk.Rendering.Misc.vtkSynchronizableRenderWindow;\n exports.vtkns[\"Texture\"] = vtk.Rendering.Core.vtkTexture;\n exports.vtkns[\"Volume\"] = vtk.Rendering.Core.vtkVolume;\n exports.vtkns[\"VolumeController\"] = vtk.Interaction.UI.vtkVolumeController;\n exports.vtkns[\"VolumeMapper\"] = vtk.Rendering.Core.vtkVolumeMapper;\n exports.vtkns[\"VolumeProperty\"] = vtk.Rendering.Core.vtkVolumeProperty;\n exports.vtkns[\"WidgetManager\"] = vtk.Widgets.Core.vtkWidgetManager;\n const { vtkObjectManager } = exports.vtkns.SynchronizableRenderWindow;\n vtkObjectManager.setTypeMapping(\"vtkVolumeMapper\", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkSmartVolumeMapper\", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkFollower\", exports.vtkns.Follower.newInstance, vtkObjectManager.genericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkOpenGLGlyph3DMapper\", exports.vtkns.Glyph3DMapper.newInstance, vtkObjectManager.genericUpdater);\n }\n exports.setup_vtkns = setup_vtkns;\n if (window.vtk)\n setup_vtkns();\n exports.Interpolation = (0, kinds_1.Enum)(\"fast_linear\", \"linear\", \"nearest\");\n function applyStyle(el, style) {\n Object.keys(style).forEach((key) => {\n el.style[key] = style[key];\n });\n }\n exports.applyStyle = applyStyle;\n function hexToRGB(color) {\n return [\n parseInt(color.slice(1, 3), 16) / 255,\n parseInt(color.slice(3, 5), 16) / 255,\n parseInt(color.slice(5, 7), 16) / 255,\n ];\n }\n exports.hexToRGB = hexToRGB;\n function valToHex(val) {\n const hex = Math.min(Math.max(Math.round(val), 0), 255).toString(16);\n return hex.length == 2 ? hex : \"0\" + hex;\n }\n function rgbToHex(r, g, b) {\n return \"#\" + valToHex(r) + valToHex(g) + valToHex(b);\n }\n exports.rgbToHex = rgbToHex;\n function vtkLutToMapper(vtk_lut) {\n //For the moment only linear colormapper are handle\n const { scale, nodes } = vtk_lut.get(\"scale\", \"nodes\");\n if (scale !== exports.vtkns.ColorTransferFunction.Scale.LINEAR)\n throw \"Error transfer function scale not handle\";\n const x = nodes.map((a) => a.x);\n const low = Math.min(...x);\n const high = Math.max(...x);\n const vals = (0, array_1.linspace)(low, high, 255);\n const rgb = [0, 0, 0];\n const palette = vals.map((val) => {\n vtk_lut.getColor(val, rgb);\n return rgbToHex(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255);\n });\n return { low, high, palette };\n }\n exports.vtkLutToMapper = vtkLutToMapper;\n function utf8ToAB(utf8_str) {\n var buf = new ArrayBuffer(utf8_str.length); // 2 bytes for each char\n var bufView = new Uint8Array(buf);\n for (var i = 0, strLen = utf8_str.length; i < strLen; i++) {\n bufView[i] = utf8_str.charCodeAt(i);\n }\n return buf;\n }\n function data2VTKImageData(data) {\n const source = exports.vtkns.ImageData.newInstance({\n spacing: data.spacing,\n });\n source.setDimensions(data.dims);\n source.setOrigin(data.origin != null ? data.origin : data.dims.map((v) => v / 2));\n const dataArray = exports.vtkns.DataArray.newInstance({\n name: \"scalars\",\n numberOfComponents: 1,\n values: new exports.ARRAY_TYPES[data.dtype](utf8ToAB(atob(data.buffer))),\n });\n source.getPointData().setScalars(dataArray);\n return source;\n }\n exports.data2VTKImageData = data2VTKImageData;\n function majorAxis(vec3, idxA, idxB) {\n const axis = [0, 0, 0];\n const idx = Math.abs(vec3[idxA]) > Math.abs(vec3[idxB]) ? idxA : idxB;\n const value = vec3[idx] > 0 ? 1 : -1;\n axis[idx] = value;\n return axis;\n }\n exports.majorAxis = majorAxis;\n function cartesian_product(...arrays) {\n return arrays.reduce((acc, curr) => [...acc].flatMap((c) => curr.map((n) => [].concat(c, n))));\n }\n exports.cartesian_product = cartesian_product;\n}\n","/* models/vtk/vtkcolorbar.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const mappers_1 = require(\"@bokehjs/models/mappers\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n class VTKColorBar {\n constructor(parent, mapper, options = {}) {\n this.parent = parent;\n this.mapper = mapper;\n this.options = options;\n if (!options.ticksNum)\n options.ticksNum = 5;\n if (!options.fontFamily)\n options.fontFamily = \"Arial\";\n if (!options.fontSize)\n options.fontSize = \"12px\";\n if (!options.ticksSize)\n options.ticksSize = 2;\n this.canvas = document.createElement(\"canvas\");\n this.canvas.style.width = \"100%\";\n this.parent.appendChild(this.canvas);\n this.ctx = this.canvas.getContext(\"2d\");\n this.ctx.font = `${this.options.fontSize} ${this.options.fontFamily}`;\n this.ctx.lineWidth = options.ticksSize;\n if (!options.height)\n options.height = `${(this.font_height + 1) * 4}px`; //title/ticks/colorbar\n this.canvas.style.height = options.height;\n this.draw_colorbar();\n }\n get values() {\n const { min, max } = this.mapper.metrics;\n return (0, array_1.linspace)(min, max, this.options.ticksNum);\n }\n get ticks() {\n return this.values.map((v) => v.toExponential(3));\n }\n get title() {\n return this.mapper.name ? this.mapper.name : \"scalars\";\n }\n get font_height() {\n let font_height = 0;\n this.values.forEach((val) => {\n const { actualBoundingBoxAscent, actualBoundingBoxDescent, } = this.ctx.measureText(`${val}`);\n const height = actualBoundingBoxAscent + actualBoundingBoxDescent;\n if (font_height < height)\n font_height = height;\n });\n return font_height;\n }\n draw_colorbar() {\n this.canvas.width = this.canvas.clientWidth;\n this.canvas.height = this.canvas.clientHeight;\n const { palette } = this.mapper;\n this.ctx.font = `${this.options.fontSize} ${this.options.fontFamily}`;\n const font_height = this.font_height;\n this.ctx.save();\n //colorbar\n const image = document.createElement(\"canvas\");\n const h = 1;\n const w = palette.length;\n image.width = w;\n image.height = h;\n const image_ctx = image.getContext(\"2d\");\n const image_data = image_ctx.getImageData(0, 0, w, h);\n const cmap = new mappers_1.LinearColorMapper({ palette }).rgba_mapper;\n const buf8 = cmap.v_compute((0, array_1.range)(0, palette.length));\n image_data.data.set(buf8);\n image_ctx.putImageData(image_data, 0, 0);\n this.ctx.drawImage(image, 0, 2 * (this.font_height + 1) + 1, this.canvas.width, this.canvas.height);\n this.ctx.restore();\n this.ctx.save();\n //title\n this.ctx.textAlign = 'center';\n this.ctx.fillText(this.title, this.canvas.width / 2, font_height + 1);\n this.ctx.restore();\n this.ctx.save();\n //ticks\n const tick_x_positions = (0, array_1.linspace)(0, this.canvas.width, 5);\n tick_x_positions.forEach((xpos, idx) => {\n let xpos_tick = xpos;\n if (idx == 0) {\n xpos_tick = xpos + Math.ceil(this.ctx.lineWidth / 2);\n this.ctx.textAlign = \"left\";\n }\n else if (idx == tick_x_positions.length - 1) {\n xpos_tick = xpos - Math.ceil(this.ctx.lineWidth / 2);\n this.ctx.textAlign = \"right\";\n }\n else {\n this.ctx.textAlign = \"center\";\n }\n this.ctx.moveTo(xpos_tick, 2 * (font_height + 1));\n this.ctx.lineTo(xpos_tick, 2 * (font_height + 1) + 5);\n this.ctx.stroke();\n this.ctx.fillText(`${this.ticks[idx]}`, xpos, 2 * (font_height + 1));\n });\n this.ctx.restore();\n }\n }\n exports.VTKColorBar = VTKColorBar;\n VTKColorBar.__name__ = \"VTKColorBar\";\n}\n","/* models/vtk/vtkaxes.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const model_1 = require(\"@bokehjs/model\");\n const gl_matrix_1 = require(\"2f3fd5db07\") /* gl-matrix */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKAxes extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n get xticks() {\n if (this.xticker)\n return this.xticker.ticks;\n else\n return [];\n }\n get yticks() {\n if (this.yticker)\n return this.yticker.ticks;\n else\n return [];\n }\n get zticks() {\n if (this.zticker)\n return this.zticker.ticks;\n else\n return [];\n }\n get xlabels() {\n var _b;\n return ((_b = this.xticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.xticker.labels\n : this.xticks.map((elem) => elem.toFixed(this.digits));\n }\n get ylabels() {\n var _b;\n return ((_b = this.yticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.yticker.labels\n : this.yticks.map((elem) => elem.toFixed(this.digits));\n }\n get zlabels() {\n var _b;\n return ((_b = this.zticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.zticker.labels\n : this.zticks.map((elem) => elem.toFixed(this.digits));\n }\n _make_grid_lines(n, m, offset) {\n const out = [];\n for (let i = 0; i < n - 1; i++) {\n for (let j = 0; j < m - 1; j++) {\n const v0 = i * m + j + offset;\n const v1 = i * m + j + 1 + offset;\n const v2 = (i + 1) * m + j + 1 + offset;\n const v3 = (i + 1) * m + j + offset;\n const line = [5, v0, v1, v2, v3, v0];\n out.push(line);\n }\n }\n return out;\n }\n _create_grid_axes() {\n const pts = [];\n pts.push((0, util_1.cartesian_product)(this.xticks, this.yticks, [this.origin[2]])); //xy\n pts.push((0, util_1.cartesian_product)([this.origin[0]], this.yticks, this.zticks)); //yz\n pts.push((0, util_1.cartesian_product)(this.xticks, [this.origin[1]], this.zticks)); //xz\n const polys = [];\n let offset = 0;\n polys.push(this._make_grid_lines(this.xticks.length, this.yticks.length, offset)); //xy\n offset += this.xticks.length * this.yticks.length;\n polys.push(this._make_grid_lines(this.yticks.length, this.zticks.length, offset)); //yz\n offset += this.yticks.length * this.zticks.length;\n polys.push(this._make_grid_lines(this.xticks.length, this.zticks.length, offset)); //xz\n const gridPolyData = window.vtk({\n vtkClass: \"vtkPolyData\",\n points: {\n vtkClass: \"vtkPoints\",\n dataType: \"Float32Array\",\n numberOfComponents: 3,\n values: pts.flat(2),\n },\n lines: {\n vtkClass: \"vtkCellArray\",\n dataType: \"Uint32Array\",\n values: polys.flat(2),\n },\n });\n const gridMapper = util_1.vtkns.Mapper.newInstance();\n const gridActor = util_1.vtkns.Actor.newInstance();\n gridMapper.setInputData(gridPolyData);\n gridActor.setMapper(gridMapper);\n gridActor.getProperty().setOpacity(this.grid_opacity);\n gridActor.setVisibility(this.show_grid);\n return gridActor;\n }\n create_axes(canvas) {\n if (this.origin == null)\n return { psActor: null, axesActor: null, gridActor: null };\n const points = [this.xticks, this.yticks, this.zticks].map((arr, axis) => {\n let coords = null;\n switch (axis) {\n case 0:\n coords = (0, util_1.cartesian_product)(arr, [this.origin[1]], [this.origin[2]]);\n break;\n case 1:\n coords = (0, util_1.cartesian_product)([this.origin[0]], arr, [this.origin[2]]);\n break;\n case 2:\n coords = (0, util_1.cartesian_product)([this.origin[0]], [this.origin[1]], arr);\n break;\n }\n return coords;\n }).flat(2);\n const axesPolyData = window.vtk({\n vtkClass: \"vtkPolyData\",\n points: {\n vtkClass: \"vtkPoints\",\n dataType: \"Float32Array\",\n numberOfComponents: 3,\n values: points,\n },\n lines: {\n vtkClass: \"vtkCellArray\",\n dataType: \"Uint32Array\",\n values: [\n 2,\n 0,\n this.xticks.length - 1,\n 2,\n this.xticks.length,\n this.xticks.length + this.yticks.length - 1,\n 2,\n this.xticks.length + this.yticks.length,\n this.xticks.length + this.yticks.length + this.zticks.length - 1,\n ],\n },\n });\n const psMapper = util_1.vtkns.PixelSpaceCallbackMapper.newInstance();\n psMapper.setInputData(axesPolyData);\n psMapper.setUseZValues(true);\n psMapper.setCallback((coordsList, camera, aspect) => {\n const textCtx = canvas.getContext(\"2d\");\n if (textCtx) {\n const dims = {\n height: canvas.clientHeight * window.devicePixelRatio,\n width: canvas.clientWidth * window.devicePixelRatio,\n };\n const dataPoints = psMapper.getInputData().getPoints();\n const viewMatrix = camera.getViewMatrix();\n gl_matrix_1.mat4.transpose(viewMatrix, viewMatrix);\n const projMatrix = camera.getProjectionMatrix(aspect, -1, 1);\n gl_matrix_1.mat4.transpose(projMatrix, projMatrix);\n textCtx.clearRect(0, 0, dims.width, dims.height);\n coordsList.forEach((xy, idx) => {\n const pdPoint = dataPoints.getPoint(idx);\n const vc = gl_matrix_1.vec3.fromValues(pdPoint[0], pdPoint[1], pdPoint[2]);\n gl_matrix_1.vec3.transformMat4(vc, vc, viewMatrix);\n vc[2] += 0.05; // sensibility\n gl_matrix_1.vec3.transformMat4(vc, vc, projMatrix);\n if (vc[2] - 0.001 < xy[3]) {\n textCtx.font = \"30px serif\";\n textCtx.textAlign = \"center\";\n textCtx.textBaseline = \"alphabetic\";\n textCtx.fillText(`.`, xy[0], dims.height - xy[1] + 2);\n textCtx.font = `${this.fontsize * window.devicePixelRatio}px serif`;\n textCtx.textAlign = \"right\";\n textCtx.textBaseline = \"top\";\n let label;\n if (idx < this.xticks.length)\n label = this.xlabels[idx];\n else if (idx >= this.xticks.length &&\n idx < this.xticks.length + this.yticks.length)\n label = this.ylabels[idx - this.xticks.length];\n else\n label = this.zlabels[idx - (this.xticks.length + this.yticks.length)];\n textCtx.fillText(`${label}`, xy[0], dims.height - xy[1]);\n }\n });\n }\n });\n const psActor = util_1.vtkns.Actor.newInstance(); //PixelSpace\n psActor.setMapper(psMapper);\n const axesMapper = util_1.vtkns.Mapper.newInstance();\n axesMapper.setInputData(axesPolyData);\n const axesActor = util_1.vtkns.Actor.newInstance();\n axesActor.setMapper(axesMapper);\n axesActor.getProperty().setOpacity(this.axes_opacity);\n const gridActor = this._create_grid_axes();\n return { psActor, axesActor, gridActor };\n }\n }\n exports.VTKAxes = VTKAxes;\n _a = VTKAxes;\n VTKAxes.__name__ = \"VTKAxes\";\n VTKAxes.__module__ = \"panel.models.vtk\";\n (() => {\n _a.define(({ Any, Array, Boolean, Number }) => ({\n origin: [Array(Number), [0, 0, 0]],\n xticker: [Any, null],\n yticker: [Any, null],\n zticker: [Any, null],\n digits: [Number, 1],\n show_grid: [Boolean, true],\n grid_opacity: [Number, 0.1],\n axes_opacity: [Number, 1],\n fontsize: [Number, 12]\n }));\n })();\n}\n","/* gl-matrix/esm/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n exports.glMatrix = glMatrix;\n const mat2 = tslib_1.__importStar(require(\"7c0b8e6048\") /* ./mat2.js */);\n exports.mat2 = mat2;\n const mat2d = tslib_1.__importStar(require(\"dc03f0a621\") /* ./mat2d.js */);\n exports.mat2d = mat2d;\n const mat3 = tslib_1.__importStar(require(\"0285c50a7e\") /* ./mat3.js */);\n exports.mat3 = mat3;\n const mat4 = tslib_1.__importStar(require(\"a427635f32\") /* ./mat4.js */);\n exports.mat4 = mat4;\n const quat = tslib_1.__importStar(require(\"eb06fc032a\") /* ./quat.js */);\n exports.quat = quat;\n const quat2 = tslib_1.__importStar(require(\"277615c682\") /* ./quat2.js */);\n exports.quat2 = quat2;\n const vec2 = tslib_1.__importStar(require(\"c56d9ff837\") /* ./vec2.js */);\n exports.vec2 = vec2;\n const vec3 = tslib_1.__importStar(require(\"2c5eb22089\") /* ./vec3.js */);\n exports.vec3 = vec3;\n const vec4 = tslib_1.__importStar(require(\"c1aa33d719\") /* ./vec4.js */);\n exports.vec4 = vec4;\n}\n","/* gl-matrix/esm/common.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /**\n * Common utilities\n * @module glMatrix\n */\n // Configuration Constants\n exports.EPSILON = 0.000001;\n exports.ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\n exports.RANDOM = Math.random;\n /**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\n function setMatrixArrayType(type) {\n exports.ARRAY_TYPE = type;\n }\n exports.setMatrixArrayType = setMatrixArrayType;\n var degree = Math.PI / 180;\n /**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n function toRadian(a) {\n return a * degree;\n }\n exports.toRadian = toRadian;\n /**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n function equals(a, b) {\n return Math.abs(a - b) <= exports.EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n }\n exports.equals = equals;\n if (!Math.hypot)\n Math.hypot = function () {\n var y = 0, i = arguments.length;\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n return Math.sqrt(y);\n };\n}\n","/* gl-matrix/esm/mat2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2x2 Matrix\n * @module mat2\n */\n /**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\n function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\n function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n }\n exports.set = set;\n /**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n }\n else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function invert(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; // Calculate the determinant\n var det = a0 * a3 - a2 * a1;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function multiply(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n function rotate(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\n function scale(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n }\n exports.scale = scale;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat2} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Returns a string representation of a mat2\n *\n * @param {mat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n }\n exports.frob = frob;\n /**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix\n * @param {mat2} D the diagonal matrix\n * @param {mat2} U the upper triangular matrix\n * @param {mat2} a the input matrix to factorize\n */\n function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n }\n exports.LDU = LDU;\n /**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat2} a The first matrix.\n * @param {mat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat2} a The first matrix.\n * @param {mat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n }\n exports.equals = equals;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Alias for {@link mat2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat2.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat2d.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2x3 Matrix\n * @module mat2d\n * @description\n * A mat2d contains six elements defined as:\n * <pre>\n * [a, b,\n * c, d,\n * tx, ty]\n * </pre>\n * This is a short form for the 3x3 matrix:\n * <pre>\n * [a, b, 0,\n * c, d, 0,\n * tx, ty, 1]\n * </pre>\n * The last column is ignored so the array is shorter and operations are faster.\n */\n /**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.identity = identity;\n /**\n * Create a new mat2d with the given values\n *\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} A new mat2d\n */\n function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat2d to the given values\n *\n * @param {mat2d} out the receiving matrix\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} out\n */\n function set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n }\n exports.set = set;\n /**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\n function invert(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3];\n var atx = a[4], aty = a[5];\n var det = aa * ad - ab * ac;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function multiply(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n function rotate(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\n function scale(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n }\n exports.scale = scale;\n /**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\n function translate(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n }\n exports.translate = translate;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.rotate(dest, dest, rad);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.scale(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat2d} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.translate(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {vec2} v Translation vector\n * @returns {mat2d} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n }\n exports.frob = frob;\n /**\n * Adds two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2d} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2d} out the receiving vector\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2d} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat2d} a The first matrix.\n * @param {mat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat2d} a The first matrix.\n * @param {mat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat2d.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat2d.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat3.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 3x3 Matrix\n * @module mat3\n */\n /**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\n function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n }\n exports.fromMat4 = fromMat4;\n /**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.copy = copy;\n /**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\n function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\n function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n }\n exports.set = set;\n /**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n }\n else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function invert(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function adjoint(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function multiply(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b00 = b[0], b01 = b[1], b02 = b[2];\n var b10 = b[3], b11 = b[4], b12 = b[5];\n var b20 = b[6], b21 = b[7], b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\n function translate(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], x = v[0], y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n }\n exports.translate = translate;\n /**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n function rotate(out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\n function scale(out, a, v) {\n var x = v[0], y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.scale = scale;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {vec2} v Translation vector\n * @returns {mat3} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat3} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\n function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n }\n exports.fromMat2d = fromMat2d;\n /**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {quat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\n function fromQuat(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n }\n exports.fromQuat = fromQuat;\n /**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {mat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\n function normalFromMat4(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n }\n exports.normalFromMat4 = normalFromMat4;\n /**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\n function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n }\n exports.projection = projection;\n /**\n * Returns a string representation of a mat3\n *\n * @param {mat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n }\n exports.frob = frob;\n /**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat3} a The first matrix.\n * @param {mat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat3} a The first matrix.\n * @param {mat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7], a8 = a[8];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat3.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat3.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat4.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\n * @module mat4\n */\n /**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.copy = copy;\n /**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\n function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\n function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n }\n exports.set = set;\n /**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3];\n var a12 = a[6], a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n }\n else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function invert(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function adjoint(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function multiply(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\n function translate(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n }\n else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n }\n exports.translate = translate;\n /**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\n function scale(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.scale = scale;\n /**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n function rotate(out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n }\n exports.rotate = rotate;\n /**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {vec3} v Scaling vector\n * @returns {mat4} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n function fromRotation(out, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromXRotation = fromXRotation;\n /**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromYRotation = fromYRotation;\n /**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromZRotation = fromZRotation;\n /**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\n function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslation = fromRotationTranslation;\n /**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {quat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\n function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n }\n else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n fromRotationTranslation(out, a, translation);\n return out;\n }\n exports.fromQuat2 = fromQuat2;\n /**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n }\n exports.getTranslation = getTranslation;\n /**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n }\n exports.getScaling = getScaling;\n /**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\n function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n }\n else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n }\n else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n }\n else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n return out;\n }\n exports.getRotation = getRotation;\n /**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @param {vec3} s Scaling vector\n * @returns {mat4} out\n */\n function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslationScale = fromRotationTranslationScale;\n /**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @param {vec3} s Scaling vector\n * @param {vec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\n function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslationScaleOrigin = fromRotationTranslationScaleOrigin;\n /**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\n function fromQuat(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromQuat = fromQuat;\n /**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n }\n exports.frustum = frustum;\n /**\n * Generates a perspective projection matrix with the given bounds.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2), nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n }\n else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n return out;\n }\n exports.perspective = perspective;\n /**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n }\n exports.perspectiveFromFieldOfView = perspectiveFromFieldOfView;\n /**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n }\n exports.ortho = ortho;\n /**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\n function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n }\n exports.lookAt = lookAt;\n /**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\n function targetTo(out, eye, target, up) {\n var eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2];\n var z0 = eyex - target[0], z1 = eyey - target[1], z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n var x0 = upy * z2 - upz * z1, x1 = upz * z0 - upx * z2, x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n }\n exports.targetTo = targetTo;\n /**\n * Returns a string representation of a mat4\n *\n * @param {mat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n }\n exports.frob = frob;\n /**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat4} a The first matrix.\n * @param {mat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat4} a The first matrix.\n * @param {mat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var a8 = a[8], a9 = a[9], a10 = a[10], a11 = a[11];\n var a12 = a[12], a13 = a[13], a14 = a[14], a15 = a[15];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n var b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n var b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11];\n var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat4.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat4.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/quat.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n const mat3 = tslib_1.__importStar(require(\"0285c50a7e\") /* ./mat3.js */);\n const vec3 = tslib_1.__importStar(require(\"2c5eb22089\") /* ./vec3.js */);\n const vec4 = tslib_1.__importStar(require(\"c1aa33d719\") /* ./vec4.js */);\n /**\n * Quaternion\n * @module quat\n */\n /**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\n function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n }\n exports.setAxisAngle = setAxisAngle;\n /**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {quat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\n function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n }\n else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n return rad;\n }\n exports.getAxisAngle = getAxisAngle;\n /**\n * Gets the angular distance between two unit quaternions\n *\n * @param {quat} a Origin unit quaternion\n * @param {quat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\n function getAngle(a, b) {\n var dotproduct = (0, exports.dot)(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n }\n exports.getAngle = getAngle;\n /**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\n function multiply(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var by = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bz = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\n function calculateW(out, a) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n }\n exports.calculateW = calculateW;\n /**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n function exp(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n }\n exports.exp = exp;\n /**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n function ln(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n }\n exports.ln = ln;\n /**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\n function pow(out, a, b) {\n ln(out, a);\n (0, exports.scale)(out, out, b);\n exp(out, out);\n return out;\n }\n exports.pow = pow;\n /**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n }\n exports.slerp = slerp;\n /**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n }\n exports.random = random;\n /**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\n function invert(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\n function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n }\n exports.conjugate = conjugate;\n /**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\n function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n }\n else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0])\n i = 1;\n if (m[8] > m[i * 3 + i])\n i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n return out;\n }\n exports.fromMat3 = fromMat3;\n /**\n * Creates a quaternion from the given euler angle x, y, z.\n *\n * @param {quat} out the receiving quaternion\n * @param {x} Angle to rotate around X axis in degrees.\n * @param {y} Angle to rotate around Y axis in degrees.\n * @param {z} Angle to rotate around Z axis in degrees.\n * @returns {quat} out\n * @function\n */\n function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n }\n exports.fromEuler = fromEuler;\n /**\n * Returns a string representation of a quatenion\n *\n * @param {quat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\n exports.clone = vec4.clone;\n /**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\n exports.fromValues = vec4.fromValues;\n /**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\n exports.copy = vec4.copy;\n /**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\n exports.set = vec4.set;\n /**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\n exports.add = vec4.add;\n /**\n * Alias for {@link quat.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\n exports.scale = vec4.scale;\n /**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n exports.dot = vec4.dot;\n /**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\n exports.lerp = vec4.lerp;\n /**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n */\n exports.length = vec4.length;\n /**\n * Alias for {@link quat.length}\n * @function\n */\n exports.len = exports.length;\n /**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n exports.squaredLength = vec4.squaredLength;\n /**\n * Alias for {@link quat.squaredLength}\n * @function\n */\n exports.sqrLen = exports.squaredLength;\n /**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\n exports.normalize = vec4.normalize;\n /**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {quat} a The first quaternion.\n * @param {quat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n exports.exactEquals = vec4.exactEquals;\n /**\n * Returns whether or not the quaternions have approximately the same elements in the same position.\n *\n * @param {quat} a The first vector.\n * @param {quat} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n exports.equals = vec4.equals;\n /**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\n exports.rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001)\n vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n }\n else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return (0, exports.normalize)(out, out);\n }\n };\n }();\n /**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {quat} c the third operand\n * @param {quat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n exports.sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n }();\n /**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\n exports.setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return (0, exports.normalize)(out, fromMat3(out, matr));\n };\n }();\n}\n","/* gl-matrix/esm/vec3.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 3 Dimensional Vector\n * @module vec3\n */\n /**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n }\n exports.clone = clone;\n /**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n }\n exports.length = length;\n /**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\n function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\n function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to ceil\n * @returns {vec3} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to floor\n * @returns {vec3} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to round\n * @returns {vec3} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\n function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n }\n exports.dot = dot;\n /**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function cross(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2];\n var bx = b[0], by = b[1], bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {vec3} c the third operand\n * @param {vec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n }\n exports.hermite = hermite;\n /**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {vec3} c the third operand\n * @param {vec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n }\n exports.bezier = bezier;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\n function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\n function transformMat4(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\n function transformMat3(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n }\n exports.transformMat3 = transformMat3;\n /**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\n function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3];\n var x = a[0], y = a[1], z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n var uvx = qy * z - qz * y, uvy = qz * x - qx * z, uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n }\n exports.transformQuat = transformQuat;\n /**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateX(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateY(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateZ(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\n function angle(a, b) {\n var ax = a[0], ay = a[1], az = a[2], bx = b[0], by = b[1], bz = b[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n }\n exports.angle = angle;\n /**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2];\n var b0 = b[0], b1 = b[1], b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec3.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec3.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec3.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec3.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec3.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 3;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n return a;\n };\n }();\n}\n","/* gl-matrix/esm/vec4.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 4 Dimensional Vector\n * @module vec4\n */\n /**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.clone = clone;\n /**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\n function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\n function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to ceil\n * @returns {vec4} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to floor\n * @returns {vec4} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to round\n * @returns {vec4} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n }\n exports.length = length;\n /**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\n function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n }\n exports.dot = dot;\n /**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {vec4} result the receiving vector\n * @param {vec4} U the first vector\n * @param {vec4} V the second vector\n * @param {vec4} W the third vector\n * @returns {vec4} result\n */\n function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0], B = v[0] * w[2] - v[2] * w[0], C = v[0] * w[3] - v[3] * w[0], D = v[1] * w[2] - v[2] * w[1], E = v[1] * w[3] - v[3] * w[1], F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\n function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n var v1, v2, v3, v4;\n var s1, s2;\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\n function transformMat4(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\n function transformQuat(out, a, q) {\n var x = a[0], y = a[1], z = a[2];\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n }\n exports.transformQuat = transformQuat;\n /**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {vec4} a The first vector.\n * @param {vec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec4} a The first vector.\n * @param {vec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec4.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec4.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec4.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec4.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec4.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 4;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n return a;\n };\n }();\n}\n","/* gl-matrix/esm/quat2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n const quat = tslib_1.__importStar(require(\"eb06fc032a\") /* ./quat.js */);\n const mat4 = tslib_1.__importStar(require(\"a427635f32\") /* ./mat4.js */);\n /**\n * Dual Quaternion<br>\n * Format: [real, dual]<br>\n * Quaternion format: XYZW<br>\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.<br>\n * @module quat2\n */\n /**\n * Creates a new identity dual quat\n *\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\n */\n function create() {\n var dq = new glMatrix.ARRAY_TYPE(8);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n dq[3] = 1;\n return dq;\n }\n exports.create = create;\n /**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat2} a dual quaternion to clone\n * @returns {quat2} new dual quaternion\n * @function\n */\n function clone(a) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n }\n exports.clone = clone;\n /**\n * Creates a new dual quat initialized with the given values\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} new dual quaternion\n * @function\n */\n function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n }\n exports.fromValues = fromValues;\n /**\n * Creates a new dual quat from the given values (quat and translation)\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component (translation)\n * @param {Number} y2 Y component (translation)\n * @param {Number} z2 Z component (translation)\n * @returns {quat2} new dual quaternion\n * @function\n */\n function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5, ay = y2 * 0.5, az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n }\n exports.fromRotationTranslationValues = fromRotationTranslationValues;\n /**\n * Creates a dual quat from a quaternion and a translation\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {quat} q a normalized quaternion\n * @param {vec3} t tranlation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5, ay = t[1] * 0.5, az = t[2] * 0.5, bx = q[0], by = q[1], bz = q[2], bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n }\n exports.fromRotationTranslation = fromRotationTranslation;\n /**\n * Creates a dual quat from a translation\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {vec3} t translation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a dual quat from a quaternion\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {quat} q the quaternion\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a new dual quat from a matrix (4x4)\n *\n * @param {quat2} out the dual quaternion\n * @param {mat4} a the matrix\n * @returns {quat2} dual quat receiving operation result\n * @function\n */\n function fromMat4(out, a) {\n //TODO Optimize this\n var outer = quat.create();\n mat4.getRotation(outer, a);\n var t = new glMatrix.ARRAY_TYPE(3);\n mat4.getTranslation(t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n }\n exports.fromMat4 = fromMat4;\n /**\n * Copy the values from one dual quat to another\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the source dual quaternion\n * @returns {quat2} out\n * @function\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a dual quat to the identity dual quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @returns {quat2} out\n */\n function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n }\n exports.identity = identity;\n /**\n * Set the components of a dual quat to the given values\n *\n * @param {quat2} out the receiving quaternion\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} out\n * @function\n */\n function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n }\n exports.set = set;\n /**\n * Gets the real part of a dual quat\n * @param {quat} out real part\n * @param {quat2} a Dual Quaternion\n * @return {quat} real part\n */\n exports.getReal = quat.copy;\n /**\n * Gets the dual part of a dual quat\n * @param {quat} out dual part\n * @param {quat2} a Dual Quaternion\n * @return {quat} dual part\n */\n function getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n }\n exports.getDual = getDual;\n /**\n * Set the real component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat} q a quaternion representing the real part\n * @returns {quat2} out\n * @function\n */\n exports.setReal = quat.copy;\n /**\n * Set the dual component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat} q a quaternion representing the dual part\n * @returns {quat2} out\n * @function\n */\n function setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n }\n exports.setDual = setDual;\n /**\n * Gets the translation of a normalized dual quat\n * @param {vec3} out translation\n * @param {quat2} a Dual Quaternion to be decomposed\n * @return {vec3} translation\n */\n function getTranslation(out, a) {\n var ax = a[4], ay = a[5], az = a[6], aw = a[7], bx = -a[0], by = -a[1], bz = -a[2], bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n }\n exports.getTranslation = getTranslation;\n /**\n * Translates a dual quat by the given vector\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to translate\n * @param {vec3} v vector to translate by\n * @returns {quat2} out\n */\n function translate(out, a, v) {\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3], bx1 = v[0] * 0.5, by1 = v[1] * 0.5, bz1 = v[2] * 0.5, ax2 = a[4], ay2 = a[5], az2 = a[6], aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n }\n exports.translate = translate;\n /**\n * Rotates a dual quat around the X axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateX(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a dual quat around the Y axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateY(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a dual quat around the Z axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateZ(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Rotates a dual quat by a given quaternion (a * q)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {quat} q quaternion to rotate by\n * @returns {quat2} out\n */\n function rotateByQuatAppend(out, a, q) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], ax = a[0], ay = a[1], az = a[2], aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n }\n exports.rotateByQuatAppend = rotateByQuatAppend;\n /**\n * Rotates a dual quat by a given quaternion (q * a)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat} q quaternion to rotate by\n * @param {quat2} a the dual quaternion to rotate\n * @returns {quat2} out\n */\n function rotateByQuatPrepend(out, q, a) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], bx = a[0], by = a[1], bz = a[2], bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n }\n exports.rotateByQuatPrepend = rotateByQuatPrepend;\n /**\n * Rotates a dual quat around a given axis. Does the normalisation automatically\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {vec3} axis the axis to rotate around\n * @param {Number} rad how far the rotation should be\n * @returns {quat2} out\n */\n function rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < glMatrix.EPSILON) {\n return copy(out, a);\n }\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4], ay = a[5], az = a[6], aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n }\n exports.rotateAroundAxis = rotateAroundAxis;\n /**\n * Adds two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {quat2} out\n * @function\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n }\n exports.add = add;\n /**\n * Multiplies two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {quat2} out\n */\n function multiply(out, a, b) {\n var ax0 = a[0], ay0 = a[1], az0 = a[2], aw0 = a[3], bx1 = b[4], by1 = b[5], bz1 = b[6], bw1 = b[7], ax1 = a[4], ay1 = a[5], az1 = a[6], aw1 = a[7], bx0 = b[0], by0 = b[1], bz0 = b[2], bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Alias for {@link quat2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Scales a dual quat by a scalar number\n *\n * @param {quat2} out the receiving dual quat\n * @param {quat2} a the dual quat to scale\n * @param {Number} b amount to scale the dual quat by\n * @returns {quat2} out\n * @function\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\n *\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n exports.dot = quat.dot;\n /**\n * Performs a linear interpolation between two dual quats's\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\n *\n * @param {quat2} out the receiving dual quat\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat2} out\n */\n function lerp(out, a, b, t) {\n var mt = 1 - t;\n if ((0, exports.dot)(a, b) < 0)\n t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n }\n exports.lerp = lerp;\n /**\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a dual quat to calculate inverse of\n * @returns {quat2} out\n */\n function invert(out, a) {\n var sqlen = (0, exports.squaredLength)(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the conjugate of a dual quat\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat2} a quat to calculate conjugate of\n * @returns {quat2} out\n */\n function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n }\n exports.conjugate = conjugate;\n /**\n * Calculates the length of a dual quat\n *\n * @param {quat2} a dual quat to calculate length of\n * @returns {Number} length of a\n * @function\n */\n exports.length = quat.length;\n /**\n * Alias for {@link quat2.length}\n * @function\n */\n exports.len = exports.length;\n /**\n * Calculates the squared length of a dual quat\n *\n * @param {quat2} a dual quat to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n exports.squaredLength = quat.squaredLength;\n /**\n * Alias for {@link quat2.squaredLength}\n * @function\n */\n exports.sqrLen = exports.squaredLength;\n /**\n * Normalize a dual quat\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a dual quaternion to normalize\n * @returns {quat2} out\n * @function\n */\n function normalize(out, a) {\n var magnitude = (0, exports.squaredLength)(a);\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n return out;\n }\n exports.normalize = normalize;\n /**\n * Returns a string representation of a dual quatenion\n *\n * @param {quat2} a dual quaternion to represent as a string\n * @returns {String} string representation of the dual quat\n */\n function str(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {quat2} a the first dual quaternion.\n * @param {quat2} b the second dual quaternion.\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\n *\n * @param {quat2} a the first dual quat.\n * @param {quat2} b the second dual quat.\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n }\n exports.equals = equals;\n}\n","/* gl-matrix/esm/vec2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2 Dimensional Vector\n * @module vec2\n */\n /**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n }\n exports.clone = clone;\n /**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\n function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\n function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to ceil\n * @returns {vec2} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to floor\n * @returns {vec2} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to round\n * @returns {vec2} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return Math.hypot(x, y);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return x * x + y * y;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0], y = a[1];\n return Math.hypot(x, y);\n }\n exports.length = length;\n /**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0], y = a[1];\n return x * x + y * y;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to invert\n * @returns {vec2} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\n function normalize(out, a) {\n var x = a[0], y = a[1];\n var len = x * x + y * y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n }\n exports.dot = dot;\n /**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\n function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0], ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\n function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat2(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n }\n exports.transformMat2 = transformMat2;\n /**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat2d(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n }\n exports.transformMat2d = transformMat2d;\n /**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat3(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n }\n exports.transformMat3 = transformMat3;\n /**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {vec2} a The vec2 point to rotate\n * @param {vec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\n function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0], p1 = a[1] - b[1], sinC = Math.sin(rad), cosC = Math.cos(rad); //perform rotation and translate to correct position\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n }\n exports.rotate = rotate;\n /**\n * Get the angle between two 2D vectors\n * @param {vec2} a The first operand\n * @param {vec2} b The second operand\n * @returns {Number} The angle in radians\n */\n function angle(a, b) {\n var x1 = a[0], y1 = a[1], x2 = b[0], y2 = b[1], \n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), \n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n }\n exports.angle = angle;\n /**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {vec2} a The first vector.\n * @param {vec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec2} a The first vector.\n * @param {vec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1];\n var b0 = b[0], b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec2.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec2.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec2.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec2.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 2;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n return a;\n };\n }();\n}\n","/* models/vtk/vtkvolume.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKVolumePlotView extends vtklayout_1.AbstractVTKView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => {\n this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);\n this.invalidate_render();\n });\n this.connect(this.model.properties.colormap.change, () => {\n this.colormap_selector.value = this.model.colormap;\n const event = new Event(\"change\");\n this.colormap_selector.dispatchEvent(event);\n });\n this.connect(this.model.properties.shadow.change, () => {\n this.shadow_selector.value = this.model.shadow ? \"1\" : \"0\";\n const event = new Event(\"change\");\n this.shadow_selector.dispatchEvent(event);\n });\n this.connect(this.model.properties.sampling.change, () => {\n this.sampling_slider.value = this.model.sampling.toFixed(2);\n const event = new Event(\"input\");\n this.sampling_slider.dispatchEvent(event);\n });\n this.connect(this.model.properties.edge_gradient.change, () => {\n this.edge_gradient_slider.value = this.model.edge_gradient.toFixed(2);\n const event = new Event(\"input\");\n this.edge_gradient_slider.dispatchEvent(event);\n });\n this.connect(this.model.properties.rescale.change, () => {\n this._controllerWidget.setRescaleColorMap(this.model.rescale);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.ambient.change, () => {\n this.volume.getProperty().setAmbient(this.model.ambient);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.diffuse.change, () => {\n this.volume.getProperty().setDiffuse(this.model.diffuse);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.camera.change, () => {\n if (!this._setting_camera) {\n this._set_camera_state();\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.specular.change, () => {\n this.volume.getProperty().setSpecular(this.model.specular);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.specular_power.change, () => {\n this.volume.getProperty().setSpecularPower(this.model.specular_power);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.display_volume.change, () => {\n this._set_volume_visibility(this.model.display_volume);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.display_slices.change, () => {\n this._set_slices_visibility(this.model.display_slices);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.slice_i.change, () => {\n if (this.image_actor_i !== undefined) {\n this.image_actor_i.getMapper().setISlice(this.model.slice_i);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.slice_j.change, () => {\n if (this.image_actor_j !== undefined) {\n this.image_actor_j.getMapper().setJSlice(this.model.slice_j);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.slice_k.change, () => {\n if (this.image_actor_k !== undefined) {\n this.image_actor_k.getMapper().setKSlice(this.model.slice_k);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.render_background.change, () => {\n this._vtk_renwin\n .getRenderer()\n .setBackground(...(0, util_1.hexToRGB)(this.model.render_background));\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.interpolation.change, () => {\n this._set_interpolation(this.model.interpolation);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.controller_expanded.change, () => {\n if (this._controllerWidget != null)\n this._controllerWidget.setExpanded(this.model.controller_expanded);\n });\n this.connect(this.model.properties.nan_opacity.change, () => {\n const scalar_opacity = this.image_actor_i.getProperty().getScalarOpacity();\n scalar_opacity.get([\"nodes\"]).nodes[0].y = this.model.nan_opacity;\n scalar_opacity.modified();\n this._vtk_renwin.getRenderWindow().render();\n });\n }\n render() {\n this._vtk_renwin = null;\n this._orientationWidget = null;\n this._axes = null;\n super.render();\n this._create_orientation_widget();\n this._set_axes();\n this._vtk_renwin.getRenderer().resetCamera();\n if (Object.keys(this.model.camera).length)\n this._set_camera_state();\n this._get_camera_state();\n }\n invalidate_render() {\n this._vtk_renwin = null;\n super.invalidate_render();\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindow.newInstance({\n rootContainer: this.shadow_el,\n container: this._vtk_container,\n });\n }\n plot() {\n this._controllerWidget = util_1.vtkns.VolumeController.newInstance({\n size: [400, 150],\n rescaleColorMap: this.model.rescale,\n });\n this._plot_volume();\n this._plot_slices();\n this._controllerWidget.setupContent(this._vtk_renwin.getRenderWindow(), this.volume, true);\n this._controllerWidget.setContainer(this.el);\n this._controllerWidget.setExpanded(this.model.controller_expanded);\n this._connect_js_controls();\n this._vtk_renwin.getRenderWindow().getInteractor();\n this._vtk_renwin.getRenderWindow().getInteractor().setDesiredUpdateRate(45);\n this._set_volume_visibility(this.model.display_volume);\n this._set_slices_visibility(this.model.display_slices);\n this._vtk_renwin\n .getRenderer()\n .setBackground(...(0, util_1.hexToRGB)(this.model.render_background));\n this._set_interpolation(this.model.interpolation);\n this._set_camera_state();\n }\n get vtk_image_data() {\n if (!this._vtk_image_data)\n this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);\n return this._vtk_image_data;\n }\n get volume() {\n return this._vtk_renwin.getRenderer().getVolumes()[0];\n }\n get image_actor_i() {\n return this._vtk_renwin.getRenderer().getActors()[0];\n }\n get image_actor_j() {\n return this._vtk_renwin.getRenderer().getActors()[1];\n }\n get image_actor_k() {\n return this._vtk_renwin.getRenderer().getActors()[2];\n }\n get shadow_selector() {\n return this.el.querySelector(\".js-shadow\");\n }\n get edge_gradient_slider() {\n return this.el.querySelector(\".js-edge\");\n }\n get sampling_slider() {\n return this.el.querySelector(\".js-spacing\");\n }\n get colormap_selector() {\n return this.el.querySelector(\".js-color-preset\");\n }\n _connect_js_controls() {\n const { el: controller_el } = this._controllerWidget.get('el');\n if (controller_el !== undefined) {\n const controller_button = controller_el.querySelector('.js-button');\n controller_button.addEventListener('click', () => this.model.controller_expanded = this._controllerWidget.getExpanded());\n }\n // Colormap selector\n this.colormap_selector.addEventListener(\"change\", () => {\n this.model.colormap = this.colormap_selector.value;\n });\n if (!this.model.colormap)\n this.model.colormap = this.colormap_selector.value;\n else\n this.model.properties.colormap.change.emit();\n // Shadow selector\n this.shadow_selector.addEventListener(\"change\", () => {\n this.model.shadow = !!Number(this.shadow_selector.value);\n });\n if ((this.model.shadow = !!Number(this.shadow_selector.value)))\n this.model.properties.shadow.change.emit();\n // Sampling slider\n this.sampling_slider.addEventListener(\"input\", () => {\n const js_sampling_value = Number(this.sampling_slider.value);\n if (Math.abs(this.model.sampling - js_sampling_value) >= 5e-3)\n this.model.sampling = js_sampling_value;\n });\n if (Math.abs(this.model.sampling - Number(this.shadow_selector.value)) >= 5e-3)\n this.model.properties.sampling.change.emit();\n // Edge Gradient slider\n this.edge_gradient_slider.addEventListener(\"input\", () => {\n const js_edge_gradient_value = Number(this.edge_gradient_slider.value);\n if (Math.abs(this.model.edge_gradient - js_edge_gradient_value) >= 5e-3)\n this.model.edge_gradient = js_edge_gradient_value;\n });\n if (Math.abs(this.model.edge_gradient - Number(this.edge_gradient_slider.value)) >= 5e-3)\n this.model.properties.edge_gradient.change.emit();\n }\n _plot_slices() {\n const source = this._vtk_image_data;\n const image_actor_i = util_1.vtkns.ImageSlice.newInstance();\n const image_actor_j = util_1.vtkns.ImageSlice.newInstance();\n const image_actor_k = util_1.vtkns.ImageSlice.newInstance();\n const image_mapper_i = util_1.vtkns.ImageMapper.newInstance();\n const image_mapper_j = util_1.vtkns.ImageMapper.newInstance();\n const image_mapper_k = util_1.vtkns.ImageMapper.newInstance();\n image_mapper_i.setInputData(source);\n image_mapper_i.setISlice(this.model.slice_i);\n image_actor_i.setMapper(image_mapper_i);\n image_mapper_j.setInputData(source);\n image_mapper_j.setJSlice(this.model.slice_j);\n image_actor_j.setMapper(image_mapper_j);\n image_mapper_k.setInputData(source);\n image_mapper_k.setKSlice(this.model.slice_k);\n image_actor_k.setMapper(image_mapper_k);\n // set_color and opacity\n const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();\n const lookupTable = this.volume.getProperty().getRGBTransferFunction(0);\n const range = this.volume.getMapper().getInputData().getPointData().getScalars().getRange();\n piecewiseFunction.removeAllPoints();\n piecewiseFunction.addPoint(range[0] - 1, this.model.nan_opacity);\n piecewiseFunction.addPoint(range[0], 1);\n piecewiseFunction.addPoint(range[1], 1);\n const property = image_actor_i.getProperty();\n image_actor_j.setProperty(property);\n image_actor_k.setProperty(property);\n property.setRGBTransferFunction(lookupTable);\n property.setScalarOpacity(piecewiseFunction);\n const renderer = this._vtk_renwin.getRenderer();\n renderer.addActor(image_actor_i);\n renderer.addActor(image_actor_j);\n renderer.addActor(image_actor_k);\n }\n _plot_volume() {\n //Create vtk volume and add it to the scene\n const source = this.vtk_image_data;\n const actor = util_1.vtkns.Volume.newInstance();\n const mapper = util_1.vtkns.VolumeMapper.newInstance();\n actor.setMapper(mapper);\n mapper.setInputData(source);\n const dataArray = source.getPointData().getScalars() || source.getPointData().getArrays()[0];\n const dataRange = dataArray.getRange();\n const lookupTable = util_1.vtkns.ColorTransferFunction.newInstance();\n if (this.model.colormap != null) {\n const preset = util_1.vtkns.ColorTransferFunction.vtkColorMaps.getPresetByName(this.model.colormap);\n lookupTable.applyColorMap(preset);\n }\n lookupTable.onModified(() => (this.model.mapper = (0, util_1.vtkLutToMapper)(lookupTable)));\n const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();\n const sampleDistance = 0.7 *\n Math.sqrt(source\n .getSpacing()\n .map((v) => v * v)\n .reduce((a, b) => a + b, 0));\n mapper.setSampleDistance(sampleDistance);\n actor.getProperty().setRGBTransferFunction(0, lookupTable);\n actor.getProperty().setScalarOpacity(0, piecewiseFunction);\n actor.getProperty().setInterpolationTypeToFastLinear();\n // actor.getProperty().setInterpolationTypeToLinear();\n // For better looking volume rendering\n // - distance in world coordinates a scalar opacity of 1.0\n actor\n .getProperty()\n .setScalarOpacityUnitDistance(0, util_1.vtkns.BoundingBox.getDiagonalLength(source.getBounds()) /\n Math.max(...source.getDimensions()));\n // - control how we emphasize surface boundaries\n // => max should be around the average gradient magnitude for the\n // volume or maybe average plus one std dev of the gradient magnitude\n // (adjusted for spacing, this is a world coordinate gradient, not a\n // pixel gradient)\n // => max hack: (dataRange[1] - dataRange[0]) * 0.05\n actor.getProperty().setGradientOpacityMinimumValue(0, 0);\n actor\n .getProperty()\n .setGradientOpacityMaximumValue(0, (dataRange[1] - dataRange[0]) * 0.05);\n // - Use shading based on gradient\n actor.getProperty().setShade(this.model.shadow);\n actor.getProperty().setUseGradientOpacity(0, true);\n // - generic good default\n actor.getProperty().setGradientOpacityMinimumOpacity(0, 0.0);\n actor.getProperty().setGradientOpacityMaximumOpacity(0, 1.0);\n actor.getProperty().setAmbient(this.model.ambient);\n actor.getProperty().setDiffuse(this.model.diffuse);\n actor.getProperty().setSpecular(this.model.specular);\n actor.getProperty().setSpecularPower(this.model.specular_power);\n this._vtk_renwin.getRenderer().addVolume(actor);\n }\n _set_interpolation(interpolation) {\n if (interpolation == \"fast_linear\") {\n this.volume.getProperty().setInterpolationTypeToFastLinear();\n this.image_actor_i.getProperty().setInterpolationTypeToLinear();\n }\n else if (interpolation == \"linear\") {\n this.volume.getProperty().setInterpolationTypeToLinear();\n this.image_actor_i.getProperty().setInterpolationTypeToLinear();\n }\n else {\n //nearest\n this.volume.getProperty().setInterpolationTypeToNearest();\n this.image_actor_i.getProperty().setInterpolationTypeToNearest();\n }\n }\n _set_slices_visibility(visibility) {\n this.image_actor_i.setVisibility(visibility);\n this.image_actor_j.setVisibility(visibility);\n this.image_actor_k.setVisibility(visibility);\n }\n _set_volume_visibility(visibility) {\n this.volume.setVisibility(visibility);\n }\n }\n exports.VTKVolumePlotView = VTKVolumePlotView;\n VTKVolumePlotView.__name__ = \"VTKVolumePlotView\";\n class VTKVolumePlot extends vtklayout_1.AbstractVTKPlot {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VTKVolumePlot = VTKVolumePlot;\n _a = VTKVolumePlot;\n VTKVolumePlot.__name__ = \"VTKVolumePlot\";\n (() => {\n _a.prototype.default_view = VTKVolumePlotView;\n _a.define(({ Any, Array, Boolean, Int, Number, String, Struct }) => ({\n ambient: [Number, 0.2],\n colormap: [String],\n data: [Any],\n diffuse: [Number, 0.7],\n display_slices: [Boolean, false],\n display_volume: [Boolean, true],\n edge_gradient: [Number, 0.2],\n interpolation: [util_1.Interpolation, 'fast_linear'],\n mapper: [Struct({ palette: Array(String), low: Number, high: Number }), { palette: [], low: 0, high: 0 }],\n nan_opacity: [Number, 1],\n render_background: [String, '#52576e'],\n rescale: [Boolean, false],\n sampling: [Number, 0.4],\n shadow: [Boolean, true],\n slice_i: [Int, 0],\n slice_j: [Int, 0],\n slice_k: [Int, 0],\n specular: [Number, 0.3],\n specular_power: [Number, 8.0],\n controller_expanded: [Boolean, true],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/vtksynchronized.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const panel_fullscreen_renwin_sync_1 = require(\"877619fe71\") /* ./panel_fullscreen_renwin_sync */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n const CONTEXT_NAME = \"panel\";\n class VTKSynchronizedPlotView extends vtklayout_1.AbstractVTKView {\n initialize() {\n super.initialize();\n this._renderable = false;\n // Context initialisation\n this._synchronizer_context = util_1.vtkns.SynchronizableRenderWindow.getSynchronizerContext(`${CONTEXT_NAME}-{this.model.id}`);\n }\n connect_signals() {\n super.connect_signals();\n const update = (0, debounce_1.debounce)(() => {\n this._vtk_renwin.delete();\n this._vtk_renwin = null;\n this.invalidate_render();\n }, 20);\n this.connect(this.model.properties.arrays.change, update);\n this.connect(this.model.properties.scene.change, update);\n this.connect(this.model.properties.one_time_reset.change, () => {\n this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();\n });\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindowSynchronized.newInstance({\n rootContainer: this.el,\n container: this._vtk_container,\n synchronizerContext: this._synchronizer_context,\n });\n }\n remove() {\n if (this._vtk_renwin) {\n this._vtk_renwin.delete();\n }\n super.remove();\n }\n plot() {\n this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();\n const state = (0, object_1.clone)(this.model.scene);\n this._sync_plot(state, () => this._on_scene_ready()).then(() => {\n this._set_camera_state();\n this._get_camera_state();\n });\n }\n _on_scene_ready() {\n this._renderable = true;\n this._camera_callbacks.push(this._vtk_renwin\n .getRenderer()\n .getActiveCamera()\n .onModified(() => this._vtk_render()));\n if (!this._orientationWidget)\n this._create_orientation_widget();\n if (!this._axes)\n this._set_axes();\n this._vtk_renwin.resize();\n this._vtk_render();\n }\n _sync_plot(state, onSceneReady) {\n // Need to ensure all promises are resolved before calling this function\n this._renderable = false;\n this._unsubscribe_camera_cb();\n this._synchronizer_context.setFetchArrayFunction((hash) => {\n return Promise.resolve(this.model.arrays[hash]);\n });\n const renderer = this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);\n if (renderer && !this._vtk_renwin.getRenderer())\n this._vtk_renwin.getRenderWindow().addRenderer(renderer);\n return this._vtk_renwin\n .getRenderWindow()\n .synchronize(state).then(onSceneReady);\n }\n }\n exports.VTKSynchronizedPlotView = VTKSynchronizedPlotView;\n VTKSynchronizedPlotView.__name__ = \"VTKSynchronizedPlotView\";\n class VTKSynchronizedPlot extends vtklayout_1.AbstractVTKPlot {\n constructor(attrs) {\n super(attrs);\n (0, panel_fullscreen_renwin_sync_1.initialize_fullscreen_render)();\n this.outline = util_1.vtkns.OutlineFilter.newInstance(); //use to display bounding box of a selected actor\n const mapper = util_1.vtkns.Mapper.newInstance();\n mapper.setInputConnection(this.outline.getOutputPort());\n this.outline_actor = util_1.vtkns.Actor.newInstance();\n this.outline_actor.setMapper(mapper);\n }\n getActors(ptr_ref) {\n let actors = this.renderer_el.getRenderer().getActors();\n if (ptr_ref) {\n const context = this.renderer_el.getSynchronizerContext(CONTEXT_NAME);\n actors = actors.filter((actor) => {\n const id_actor = context.getInstanceId(actor);\n return id_actor ? id_actor.slice(-16) == ptr_ref.slice(1, 17) : false;\n });\n }\n return actors;\n }\n }\n exports.VTKSynchronizedPlot = VTKSynchronizedPlot;\n _a = VTKSynchronizedPlot;\n VTKSynchronizedPlot.__name__ = \"VTKSynchronizedPlot\";\n VTKSynchronizedPlot.__module__ = \"panel.models.vtk\";\n (() => {\n _a.prototype.default_view = VTKSynchronizedPlotView;\n _a.define(({ Any, Array, Boolean, Bytes, Dict, String }) => ({\n arrays: [Dict(Bytes), {}],\n arrays_processed: [Array(String), []],\n enable_keybindings: [Boolean, false],\n one_time_reset: [Boolean, false],\n rebuild: [Boolean, false],\n scene: [Any, {}],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/panel_fullscreen_renwin_sync.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n //------------------------//\n //Custom Extended Classes\n //------------------------//\n const DEFAULT_VALUES = {\n containerStyle: null,\n controlPanelStyle: null,\n listenWindowResize: true,\n resizeCallback: null,\n controllerVisibility: true,\n synchronizerContextName: \"default\",\n };\n const STYLE_CONTROL_PANEL = {\n position: \"absolute\",\n left: \"25px\",\n top: \"25px\",\n backgroundColor: \"white\",\n borderRadius: \"5px\",\n listStyle: \"none\",\n padding: \"5px 10px\",\n margin: \"0\",\n display: \"block\",\n border: \"solid 1px black\",\n maxWidth: \"calc(100vw - 70px)\",\n maxHeight: \"calc(100vh - 60px)\",\n overflow: \"auto\",\n };\n function panelFullScreenRenderWindowSynchronized(publicAPI, model) {\n // Panel (modification) synchronizable renderWindow\n model.renderWindow = util_1.vtkns.SynchronizableRenderWindow.newInstance({\n synchronizerContext: model.synchronizerContext,\n });\n // OpenGlRenderWindow\n model.openGLRenderWindow = util_1.vtkns.OpenGLRenderWindow.newInstance();\n model.openGLRenderWindow.setContainer(model.container);\n model.renderWindow.addView(model.openGLRenderWindow);\n // Interactor\n model.interactor = util_1.vtkns.RenderWindowInteractor.newInstance();\n model.interactor.setInteractorStyle(util_1.vtkns.InteractorStyleTrackballCamera.newInstance());\n model.interactor.setView(model.openGLRenderWindow);\n model.interactor.initialize();\n model.interactor.bindEvents(model.container);\n publicAPI.getRenderer = () => model.renderWindow.getRenderers()[0];\n publicAPI.removeController = () => {\n const el = model.controlContainer;\n if (el) {\n el.parentNode.removeChild(el);\n }\n };\n publicAPI.setControllerVisibility = (visible) => {\n model.controllerVisibility = visible;\n if (model.controlContainer) {\n if (visible) {\n model.controlContainer.style.display = \"block\";\n }\n else {\n model.controlContainer.style.display = \"none\";\n }\n }\n };\n publicAPI.toggleControllerVisibility = () => {\n publicAPI.setControllerVisibility(!model.controllerVisibility);\n };\n publicAPI.addController = (html) => {\n model.controlContainer = document.createElement(\"div\");\n (0, util_1.applyStyle)(model.controlContainer, model.controlPanelStyle || STYLE_CONTROL_PANEL);\n model.rootContainer.appendChild(model.controlContainer);\n model.controlContainer.innerHTML = html;\n publicAPI.setControllerVisibility(model.controllerVisibility);\n model.rootContainer.addEventListener(\"keypress\", (e) => {\n if (String.fromCharCode(e.charCode) === \"c\") {\n publicAPI.toggleControllerVisibility();\n }\n });\n };\n // Properly release GL context\n publicAPI.delete = window.vtk.macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete);\n // Handle window resize\n publicAPI.resize = () => {\n const dims = model.container.getBoundingClientRect();\n const devicePixelRatio = window.devicePixelRatio || 1;\n model.openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));\n if (model.resizeCallback) {\n model.resizeCallback(dims);\n }\n model.renderWindow.render();\n };\n publicAPI.setResizeCallback = (cb) => {\n model.resizeCallback = cb;\n publicAPI.resize();\n };\n if (model.listenWindowResize) {\n window.addEventListener(\"resize\", publicAPI.resize);\n }\n publicAPI.resize();\n }\n function initialize_fullscreen_render() {\n let FullScreenRenderWindowSynchronized = {\n newInstance: window.vtk.macro.newInstance((publicAPI, model, initialValues = {}) => {\n Object.assign(model, DEFAULT_VALUES, initialValues);\n // Object methods\n window.vtk.macro.obj(publicAPI, model);\n window.vtk.macro.get(publicAPI, model, [\n \"renderWindow\",\n \"openGLRenderWindow\",\n \"interactor\",\n \"rootContainer\",\n \"container\",\n \"controlContainer\",\n \"synchronizerContext\",\n ]);\n // Object specific methods\n panelFullScreenRenderWindowSynchronized(publicAPI, model);\n }),\n };\n util_1.vtkns.FullScreenRenderWindowSynchronized = FullScreenRenderWindowSynchronized;\n }\n exports.initialize_fullscreen_render = initialize_fullscreen_render;\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["@@/panel/dist/lib/index.js","@@/panel/dist/lib/models/index.js","@@/panel/dist/lib/models/ace.js","@@/panel/dist/lib/models/layout.js","@@/panel/dist/lib/models/audio.js","@@/panel/dist/lib/models/browser.js","@@/panel/dist/lib/models/button.js","@@/panel/dist/lib/models/card.js","@@/panel/dist/lib/models/column.js","@@/panel/dist/lib/models/checkbox_button_group.js","@@/panel/dist/lib/models/comm_manager.js","@@/panel/dist/lib/models/customselect.js","@@/panel/dist/lib/models/tabulator.js","@@/panel/node_modules/debounce/index.js","@@/panel/dist/lib/models/data.js","@@/panel/dist/lib/models/datetime_picker.js","@@/panel/node_modules/flatpickr/dist/esm/index.js","@@/panel/node_modules/flatpickr/dist/esm/types/options.js","@@/panel/node_modules/flatpickr/dist/esm/l10n/default.js","@@/panel/node_modules/flatpickr/dist/esm/utils/index.js","@@/panel/node_modules/flatpickr/dist/esm/utils/dom.js","@@/panel/node_modules/flatpickr/dist/esm/utils/dates.js","@@/panel/node_modules/flatpickr/dist/esm/utils/formatting.js","@@/panel/node_modules/flatpickr/dist/esm/utils/polyfills.js","@@/panel/dist/lib/models/deckgl.js","@@/panel/dist/lib/models/tooltips.js","@@/panel/node_modules/@luma.gl/constants/src/index.js","@@/panel/dist/lib/models/echarts.js","@@/panel/dist/lib/models/event-to-object.js","@@/panel/dist/lib/models/file_download.js","@@/panel/dist/lib/models/html.js","@@/panel/dist/lib/models/ipywidget.js","@@/panel/dist/lib/models/json.js","@@/panel/node_modules/json-formatter-js/dist/json-formatter.esm.js","@@/panel/dist/lib/models/jsoneditor.js","@@/panel/dist/lib/models/katex.js","@@/panel/dist/lib/models/location.js","@@/panel/dist/lib/models/mathjax.js","@@/panel/dist/lib/models/pdf.js","@@/panel/dist/lib/models/perspective.js","@@/panel/dist/lib/models/player.js","@@/panel/dist/lib/models/plotly.js","@@/panel/dist/lib/models/util.js","@@/panel/dist/lib/models/progress.js","@@/panel/dist/lib/models/quill.js","@@/panel/dist/lib/models/radio_button_group.js","@@/panel/dist/lib/models/reactive_html.js","@@/panel/node_modules/preact/dist/preact.module.js","@@/panel/node_modules/preact/hooks/dist/hooks.module.js","@@/panel/node_modules/htm/preact/index.module.js","@@/panel/node_modules/htm/dist/htm.module.js","@@/panel/dist/lib/models/singleselect.js","@@/panel/dist/lib/models/speech_to_text.js","@@/panel/dist/lib/models/state.js","@@/panel/dist/lib/models/tabs.js","@@/panel/dist/lib/models/terminal.js","@@/panel/dist/lib/models/textarea_input.js","@@/panel/dist/lib/models/text_to_speech.js","@@/panel/dist/lib/models/tooltip_icon.js","@@/panel/dist/lib/models/trend.js","@@/panel/dist/lib/models/vega.js","@@/panel/dist/lib/models/video.js","@@/panel/dist/lib/models/videostream.js","@@/panel/dist/lib/models/vizzu.js","@@/panel/dist/lib/models/vtk/index.js","@@/panel/dist/lib/models/vtk/vtkjs.js","@@/panel/dist/lib/models/vtk/vtklayout.js","@@/panel/dist/lib/models/vtk/util.js","@@/panel/dist/lib/models/vtk/vtkcolorbar.js","@@/panel/dist/lib/models/vtk/vtkaxes.js","@@/panel/node_modules/gl-matrix/esm/index.js","@@/panel/node_modules/gl-matrix/esm/common.js","@@/panel/node_modules/gl-matrix/esm/mat2.js","@@/panel/node_modules/gl-matrix/esm/mat2d.js","@@/panel/node_modules/gl-matrix/esm/mat3.js","@@/panel/node_modules/gl-matrix/esm/mat4.js","@@/panel/node_modules/gl-matrix/esm/quat.js","@@/panel/node_modules/gl-matrix/esm/vec3.js","@@/panel/node_modules/gl-matrix/esm/vec4.js","@@/panel/node_modules/gl-matrix/esm/quat2.js","@@/panel/node_modules/gl-matrix/esm/vec2.js","@@/panel/dist/lib/models/vtk/vtkvolume.js","@@/panel/dist/lib/models/vtk/vtksynchronized.js","@@/panel/dist/lib/models/vtk/panel_fullscreen_renwin_sync.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC3FA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACpnCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5hEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC3EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1IA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/NA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrPA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1MA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/JA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzCA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC7QA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjVA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1XA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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,AC/EA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5DA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClRA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzFA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACnIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AClGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3LA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC5IA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChHA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvKA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACXA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzJA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACrGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChNA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACxBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACtZA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACzbA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9qBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC9nDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC3oBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACvtBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,ACjnBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/sBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AChlBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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/WA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,AC1HA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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":"generated.js","sourceRoot":"","sourcesContent":["/* index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const Panel = tslib_1.__importStar(require(\"25913cabc4\") /* ./models */);\n exports.Panel = Panel;\n const base_1 = require(\"@bokehjs/base\");\n (0, base_1.register_models)(Panel);\n}\n","/* models/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var ace_1 = require(\"464e3dc85c\") /* ./ace */;\n __esExport(\"AcePlot\", ace_1.AcePlot);\n var audio_1 = require(\"cfb5b1a85b\") /* ./audio */;\n __esExport(\"Audio\", audio_1.Audio);\n var browser_1 = require(\"af84f1061d\") /* ./browser */;\n __esExport(\"BrowserInfo\", browser_1.BrowserInfo);\n var button_1 = require(\"0e384ee9c4\") /* ./button */;\n __esExport(\"Button\", button_1.Button);\n var card_1 = require(\"eec4af24bc\") /* ./card */;\n __esExport(\"Card\", card_1.Card);\n var checkbox_button_group_1 = require(\"820473477c\") /* ./checkbox_button_group */;\n __esExport(\"CheckboxButtonGroup\", checkbox_button_group_1.CheckboxButtonGroup);\n var column_1 = require(\"991bd33955\") /* ./column */;\n __esExport(\"Column\", column_1.Column);\n var comm_manager_1 = require(\"eca6f2cacb\") /* ./comm_manager */;\n __esExport(\"CommManager\", comm_manager_1.CommManager);\n var customselect_1 = require(\"e258e515be\") /* ./customselect */;\n __esExport(\"CustomSelect\", customselect_1.CustomSelect);\n var tabulator_1 = require(\"02603bce3a\") /* ./tabulator */;\n __esExport(\"DataTabulator\", tabulator_1.DataTabulator);\n var datetime_picker_1 = require(\"5fd6501095\") /* ./datetime_picker */;\n __esExport(\"DatetimePicker\", datetime_picker_1.DatetimePicker);\n var deckgl_1 = require(\"19b5a68a40\") /* ./deckgl */;\n __esExport(\"DeckGLPlot\", deckgl_1.DeckGLPlot);\n var echarts_1 = require(\"7bc4e47bd5\") /* ./echarts */;\n __esExport(\"ECharts\", echarts_1.ECharts);\n var file_download_1 = require(\"e6943b23b3\") /* ./file_download */;\n __esExport(\"FileDownload\", file_download_1.FileDownload);\n var html_1 = require(\"3db2e41978\") /* ./html */;\n __esExport(\"HTML\", html_1.HTML);\n var ipywidget_1 = require(\"4dfd782539\") /* ./ipywidget */;\n __esExport(\"IPyWidget\", ipywidget_1.IPyWidget);\n var json_1 = require(\"e954d48822\") /* ./json */;\n __esExport(\"JSON\", json_1.JSON);\n var jsoneditor_1 = require(\"3c56a75fcf\") /* ./jsoneditor */;\n __esExport(\"JSONEditor\", jsoneditor_1.JSONEditor);\n var katex_1 = require(\"001dfd2dde\") /* ./katex */;\n __esExport(\"KaTeX\", katex_1.KaTeX);\n var location_1 = require(\"a85ed38ee9\") /* ./location */;\n __esExport(\"Location\", location_1.Location);\n var mathjax_1 = require(\"ca760ebc92\") /* ./mathjax */;\n __esExport(\"MathJax\", mathjax_1.MathJax);\n var pdf_1 = require(\"46cccf2270\") /* ./pdf */;\n __esExport(\"PDF\", pdf_1.PDF);\n var perspective_1 = require(\"5f38562b04\") /* ./perspective */;\n __esExport(\"Perspective\", perspective_1.Perspective);\n var player_1 = require(\"bd5015f776\") /* ./player */;\n __esExport(\"Player\", player_1.Player);\n var plotly_1 = require(\"b6febc7d6f\") /* ./plotly */;\n __esExport(\"PlotlyPlot\", plotly_1.PlotlyPlot);\n var progress_1 = require(\"e6caa5bc95\") /* ./progress */;\n __esExport(\"Progress\", progress_1.Progress);\n var quill_1 = require(\"283ee868b0\") /* ./quill */;\n __esExport(\"QuillInput\", quill_1.QuillInput);\n var radio_button_group_1 = require(\"81e6ca704a\") /* ./radio_button_group */;\n __esExport(\"RadioButtonGroup\", radio_button_group_1.RadioButtonGroup);\n var reactive_html_1 = require(\"0590cf2a27\") /* ./reactive_html */;\n __esExport(\"ReactiveHTML\", reactive_html_1.ReactiveHTML);\n var singleselect_1 = require(\"665213fba5\") /* ./singleselect */;\n __esExport(\"SingleSelect\", singleselect_1.SingleSelect);\n var speech_to_text_1 = require(\"7651136c44\") /* ./speech_to_text */;\n __esExport(\"SpeechToText\", speech_to_text_1.SpeechToText);\n var state_1 = require(\"1bb5a1aca6\") /* ./state */;\n __esExport(\"State\", state_1.State);\n var tabs_1 = require(\"8013e805da\") /* ./tabs */;\n __esExport(\"Tabs\", tabs_1.Tabs);\n var terminal_1 = require(\"4a0674b147\") /* ./terminal */;\n __esExport(\"Terminal\", terminal_1.Terminal);\n var textarea_input_1 = require(\"59f46adc8c\") /* ./textarea_input */;\n __esExport(\"TextAreaInput\", textarea_input_1.TextAreaInput);\n var text_to_speech_1 = require(\"a44f0bd49f\") /* ./text_to_speech */;\n __esExport(\"TextToSpeech\", text_to_speech_1.TextToSpeech);\n var tooltip_icon_1 = require(\"4c6dd3d1dc\") /* ./tooltip_icon */;\n __esExport(\"TooltipIcon\", tooltip_icon_1.TooltipIcon);\n var trend_1 = require(\"c2c4524e04\") /* ./trend */;\n __esExport(\"TrendIndicator\", trend_1.TrendIndicator);\n var vega_1 = require(\"b396729d22\") /* ./vega */;\n __esExport(\"VegaPlot\", vega_1.VegaPlot);\n var video_1 = require(\"e6e8c94f32\") /* ./video */;\n __esExport(\"Video\", video_1.Video);\n var videostream_1 = require(\"2dfabe6882\") /* ./videostream */;\n __esExport(\"VideoStream\", videostream_1.VideoStream);\n var vizzu_1 = require(\"dfe3c4a2a9\") /* ./vizzu */;\n __esExport(\"VizzuChart\", vizzu_1.VizzuChart);\n tslib_1.__exportStar(require(\"c51f25e2a7\") /* ./vtk */, exports);\n}\n","/* models/ace.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function ID() {\n // Math.random should be unique because of its seeding algorithm.\n // Convert it to base 36 (numbers + letters), and grab the first 9 characters\n // after the decimal.\n return '_' + Math.random().toString(36).substr(2, 9);\n }\n class AcePlotView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._container = (0, dom_1.div)({\n id: ID(),\n style: {\n width: \"100%\",\n height: \"100%\",\n zIndex: 0,\n }\n });\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.code.change, () => this._update_code_from_model());\n this.connect(this.model.properties.theme.change, () => this._update_theme());\n this.connect(this.model.properties.language.change, () => this._update_language());\n this.connect(this.model.properties.filename.change, () => this._update_filename());\n this.connect(this.model.properties.print_margin.change, () => this._update_print_margin());\n this.connect(this.model.properties.annotations.change, () => this._add_annotations());\n this.connect(this.model.properties.readonly.change, () => {\n this._editor.setReadOnly(this.model.readonly);\n });\n }\n render() {\n super.render();\n if (!(this._container === this.shadow_el.childNodes[0]))\n this.shadow_el.append(this._container);\n this._container.textContent = this.model.code;\n this._editor = ace.edit(this._container);\n this._editor.renderer.attachToShadowRoot();\n this._langTools = ace.require('ace/ext/language_tools');\n this._modelist = ace.require(\"ace/ext/modelist\");\n this._editor.setOptions({\n enableBasicAutocompletion: true,\n enableSnippets: true,\n fontFamily: \"monospace\", //hack for cursor position\n });\n this._update_theme();\n this._update_filename();\n this._update_language();\n this._editor.setReadOnly(this.model.readonly);\n this._editor.setShowPrintMargin(this.model.print_margin);\n this._editor.on('change', () => this._update_code_from_editor());\n }\n _update_code_from_model() {\n if (this._editor && this._editor.getValue() != this.model.code)\n this._editor.setValue(this.model.code);\n }\n _update_print_margin() {\n this._editor.setShowPrintMargin(this.model.print_margin);\n }\n _update_code_from_editor() {\n if (this._editor.getValue() != this.model.code) {\n this.model.code = this._editor.getValue();\n }\n }\n _update_theme() {\n this._editor.setTheme(`ace/theme/${this.model.theme}`);\n }\n _update_filename() {\n if (this.model.filename) {\n const mode = this._modelist.getModeForPath(this.model.filename).mode;\n this.model.language = mode.slice(9);\n }\n }\n _update_language() {\n if (this.model.language != null) {\n this._editor.session.setMode(`ace/mode/${this.model.language}`);\n }\n }\n _add_annotations() {\n this._editor.session.setAnnotations(this.model.annotations);\n }\n after_layout() {\n super.after_layout();\n this._editor.resize();\n }\n }\n exports.AcePlotView = AcePlotView;\n AcePlotView.__name__ = \"AcePlotView\";\n class AcePlot extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.AcePlot = AcePlot;\n _a = AcePlot;\n AcePlot.__name__ = \"AcePlot\";\n AcePlot.__module__ = \"panel.models.ace\";\n (() => {\n _a.prototype.default_view = AcePlotView;\n _a.define(({ Any, Array, Boolean, String, Nullable }) => ({\n code: [String, ''],\n filename: [Nullable(String), null],\n language: [String, ''],\n theme: [String, 'chrome'],\n annotations: [Array(Any), []],\n readonly: [Boolean, false],\n print_margin: [Boolean, false]\n }));\n _a.override({\n height: 300,\n width: 300\n });\n })();\n}\n","/* models/layout.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const widget_1 = require(\"@bokehjs/models/widgets/widget\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n class PanelMarkupView extends widget_1.WidgetView {\n async lazy_initialize() {\n await super.lazy_initialize();\n if (this.provider.status == \"not_started\" || this.provider.status == \"loading\")\n this.provider.ready.connect(() => {\n if (this.contains_tex_string(this.model.text))\n this.render();\n });\n }\n watch_stylesheets() {\n this._initialized_stylesheets = {};\n for (const sts of this._applied_stylesheets) {\n const style_el = sts.el;\n if (style_el instanceof HTMLLinkElement) {\n this._initialized_stylesheets[style_el.href] = false;\n style_el.addEventListener(\"load\", () => {\n this._initialized_stylesheets[style_el.href] = true;\n if (Object.values(this._initialized_stylesheets).every(Boolean))\n this.style_redraw();\n });\n }\n }\n }\n style_redraw() {\n }\n has_math_disabled() {\n return this.model.disable_math || !this.contains_tex_string(this.model.text);\n }\n render() {\n super.render();\n set_size(this.el, this.model);\n this.container = (0, dom_1.div)();\n set_size(this.container, this.model, false);\n this.shadow_el.appendChild(this.container);\n if (this.provider.status == \"failed\" || this.provider.status == \"loaded\")\n this._has_finished = true;\n }\n }\n exports.PanelMarkupView = PanelMarkupView;\n PanelMarkupView.__name__ = \"PanelMarkupView\";\n function set_size(el, model, adjustMargin = true) {\n let width_policy = model.width != null ? \"fixed\" : \"fit\";\n let height_policy = model.height != null ? \"fixed\" : \"fit\";\n const { sizing_mode, margin } = model;\n if (sizing_mode != null) {\n if (sizing_mode == \"fixed\")\n width_policy = height_policy = \"fixed\";\n else if (sizing_mode == \"stretch_both\")\n width_policy = height_policy = \"max\";\n else if (sizing_mode == \"stretch_width\")\n width_policy = \"max\";\n else if (sizing_mode == \"stretch_height\")\n height_policy = \"max\";\n else {\n switch (sizing_mode) {\n case \"scale_width\":\n width_policy = \"max\";\n height_policy = \"min\";\n break;\n case \"scale_height\":\n width_policy = \"min\";\n height_policy = \"max\";\n break;\n case \"scale_both\":\n width_policy = \"max\";\n height_policy = \"max\";\n break;\n default:\n throw new Error(\"unreachable\");\n }\n }\n }\n let wm, hm;\n if (!adjustMargin) {\n hm = wm = 0;\n }\n else if ((0, types_1.isArray)(margin)) {\n if (margin.length === 4) {\n hm = margin[0] + margin[2];\n wm = margin[1] + margin[3];\n }\n else {\n hm = margin[0] * 2;\n wm = margin[1] * 2;\n }\n }\n else if (margin == null) {\n hm = wm = 0;\n }\n else {\n wm = hm = margin * 2;\n }\n if (width_policy == \"fixed\" && model.width)\n el.style.width = model.width + \"px\";\n else if (width_policy == \"max\")\n el.style.width = wm ? `calc(100% - ${wm}px)` : \"100%\";\n if (model.min_width != null)\n el.style.minWidth = model.min_width + \"px\";\n if (model.max_width != null)\n el.style.maxWidth = model.max_width + \"px\";\n if (height_policy == \"fixed\" && model.height)\n el.style.height = model.height + \"px\";\n else if (height_policy == \"max\")\n el.style.height = hm ? `calc(100% - ${hm}px)` : \"100%\";\n if (model.min_height != null)\n el.style.minHeight = model.min_height + \"px\";\n if (model.max_width != null)\n el.style.maxHeight = model.max_height + \"px\";\n }\n exports.set_size = set_size;\n class HTMLBoxView extends layout_dom_1.LayoutDOMView {\n render() {\n super.render();\n set_size(this.el, this.model);\n }\n watch_stylesheets() {\n this._initialized_stylesheets = {};\n for (const sts of this._applied_stylesheets) {\n const style_el = sts.el;\n if (style_el instanceof HTMLLinkElement) {\n this._initialized_stylesheets[style_el.href] = false;\n style_el.addEventListener(\"load\", () => {\n this._initialized_stylesheets[style_el.href] = true;\n if (Object.values(this._initialized_stylesheets).every(Boolean))\n this.style_redraw();\n });\n }\n }\n }\n style_redraw() {\n }\n get child_models() {\n return [];\n }\n }\n exports.HTMLBoxView = HTMLBoxView;\n HTMLBoxView.__name__ = \"HTMLBoxView\";\n class HTMLBox extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.HTMLBox = HTMLBox;\n HTMLBox.__name__ = \"HTMLBox\";\n}\n","/* models/audio.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class AudioView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._blocked = false;\n this._setting = false;\n this._time = Date.now();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.loop.change, () => this.set_loop());\n this.connect(this.model.properties.paused.change, () => this.set_paused());\n this.connect(this.model.properties.time.change, () => this.set_time());\n this.connect(this.model.properties.value.change, () => this.set_value());\n this.connect(this.model.properties.volume.change, () => this.set_volume());\n this.connect(this.model.properties.muted.change, () => this.set_muted());\n this.connect(this.model.properties.autoplay.change, () => this.set_autoplay());\n }\n render() {\n super.render();\n this.audioEl = document.createElement('audio');\n this.audioEl.controls = true;\n this.audioEl.src = this.model.value;\n this.audioEl.currentTime = this.model.time;\n this.audioEl.loop = this.model.loop;\n this.audioEl.muted = this.model.muted;\n this.audioEl.autoplay = this.model.autoplay;\n if (this.model.volume != null)\n this.audioEl.volume = this.model.volume / 100;\n else\n this.model.volume = this.audioEl.volume * 100;\n this.audioEl.onpause = () => this.model.paused = true;\n this.audioEl.onplay = () => this.model.paused = false;\n this.audioEl.ontimeupdate = () => this.update_time(this);\n this.audioEl.onvolumechange = () => this.update_volume(this);\n (0, layout_1.set_size)(this.audioEl, this.model, false);\n this.shadow_el.appendChild(this.audioEl);\n if (!this.model.paused)\n this.audioEl.play();\n }\n update_time(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n if ((Date.now() - view._time) < view.model.throttle)\n return;\n view._blocked = true;\n view.model.time = view.audioEl.currentTime;\n view._time = Date.now();\n }\n update_volume(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n view._blocked = true;\n view.model.volume = view.audioEl.volume * 100;\n }\n set_loop() {\n this.audioEl.loop = this.model.loop;\n }\n set_muted() {\n this.audioEl.muted = this.model.muted;\n }\n set_autoplay() {\n this.audioEl.autoplay = this.model.autoplay;\n }\n set_paused() {\n if (!this.audioEl.paused && this.model.paused)\n this.audioEl.pause();\n if (this.audioEl.paused && !this.model.paused)\n this.audioEl.play();\n }\n set_volume() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n if (this.model.volume != null) {\n this.audioEl.volume = this.model.volume / 100;\n }\n }\n set_time() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n this.audioEl.currentTime = this.model.time;\n }\n set_value() {\n this.audioEl.src = this.model.value;\n }\n }\n exports.AudioView = AudioView;\n AudioView.__name__ = \"AudioView\";\n class Audio extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Audio = Audio;\n _a = Audio;\n Audio.__name__ = \"Audio\";\n Audio.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = AudioView;\n _a.define(({ Any, Boolean, Number, Nullable }) => ({\n loop: [Boolean, false],\n paused: [Boolean, true],\n muted: [Boolean, false],\n autoplay: [Boolean, false],\n time: [Number, 0],\n throttle: [Number, 250],\n value: [Any, ''],\n volume: [Nullable(Number), null],\n }));\n })();\n}\n","/* models/browser.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n class BrowserInfoView extends view_1.View {\n initialize() {\n super.initialize();\n if (window.matchMedia != null) {\n this.model.dark_mode = window.matchMedia('(prefers-color-scheme: dark)').matches;\n }\n this.model.device_pixel_ratio = window.devicePixelRatio;\n if (navigator != null) {\n this.model.language = navigator.language;\n this.model.webdriver = navigator.webdriver;\n }\n const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;\n if (timezone != null)\n this.model.timezone = timezone;\n const timezone_offset = new Date().getTimezoneOffset();\n if (timezone_offset != null)\n this.model.timezone_offset = timezone_offset;\n this._has_finished = true;\n this.notify_finished();\n }\n }\n exports.BrowserInfoView = BrowserInfoView;\n BrowserInfoView.__name__ = \"BrowserInfoView\";\n class BrowserInfo extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.BrowserInfo = BrowserInfo;\n _a = BrowserInfo;\n BrowserInfo.__name__ = \"BrowserInfo\";\n BrowserInfo.__module__ = \"panel.models.browser\";\n (() => {\n _a.prototype.default_view = BrowserInfoView;\n _a.define(({ Boolean, Nullable, Number, String }) => ({\n dark_mode: [Nullable(Boolean), null],\n device_pixel_ratio: [Nullable(Number), null],\n language: [Nullable(String), null],\n timezone: [Nullable(String), null],\n timezone_offset: [Nullable(Number), null],\n webdriver: [Nullable(Boolean), null]\n }));\n })();\n}\n","/* models/button.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const button_1 = require(\"@bokehjs/models/widgets/button\");\n class ButtonView extends button_1.ButtonView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.ButtonView = ButtonView;\n ButtonView.__name__ = \"ButtonView\";\n class Button extends button_1.Button {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Button = Button;\n _a = Button;\n Button.__name__ = \"Button\";\n Button.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = ButtonView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/card.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const column_1 = require(\"991bd33955\") /* ./column */;\n const DOM = tslib_1.__importStar(require(\"@bokehjs/core/dom\"));\n class CardView extends column_1.ColumnView {\n constructor() {\n super(...arguments);\n this.collapsed_style = new DOM.InlineStyleSheet();\n }\n connect_signals() {\n super.connect_signals();\n const { active_header_background, children, collapsed, header_background, header_color, hide_header } = this.model.properties;\n this.on_change(children, () => this.render());\n this.on_change(collapsed, () => this._collapse());\n this.on_change([header_color, hide_header], () => this.render());\n this.on_change([active_header_background, collapsed, header_background], () => {\n const header_background = this.header_background;\n if (header_background == null)\n return;\n this.child_views[0].el.style.backgroundColor = header_background;\n this.header_el.style.backgroundColor = header_background;\n });\n }\n *_stylesheets() {\n yield* super._stylesheets();\n yield this.collapsed_style;\n }\n get header_background() {\n let header_background = this.model.header_background;\n if (!this.model.collapsed && this.model.active_header_background)\n header_background = this.model.active_header_background;\n return header_background;\n }\n render() {\n this.empty();\n if (this.model.collapsed)\n this.collapsed_style.replace(\":host\", {\n \"height\": \"fit-content\",\n \"flex\": \"none\"\n });\n this._update_stylesheets();\n this._update_css_classes();\n this._apply_styles();\n this._apply_visible();\n this.class_list.add(...this.css_classes());\n const { button_css_classes, header_color, header_tag, header_css_classes } = this.model;\n const header_background = this.header_background;\n const header = this.child_views[0];\n let header_el;\n if (this.model.collapsible) {\n this.button_el = DOM.createElement(\"button\", { type: \"button\", class: header_css_classes });\n const icon = DOM.createElement(\"div\", { class: button_css_classes });\n icon.innerHTML = this.model.collapsed ? \"\\u25ba\" : \"\\u25bc\";\n this.button_el.appendChild(icon);\n this.button_el.style.backgroundColor = header_background != null ? header_background : \"\";\n header.el.style.backgroundColor = header_background != null ? header_background : \"\";\n this.button_el.appendChild(header.el);\n this.button_el.onclick = () => this._toggle_button();\n header_el = this.button_el;\n }\n else {\n header_el = DOM.createElement(header_tag, { class: header_css_classes });\n header_el.style.backgroundColor = header_background != null ? header_background : \"\";\n header_el.appendChild(header.el);\n }\n this.header_el = header_el;\n if (!this.model.hide_header) {\n header_el.style.color = header_color != null ? header_color : \"\";\n this.shadow_el.appendChild(header_el);\n header.render();\n header.after_render();\n }\n if (this.model.collapsed)\n return;\n for (const child_view of this.child_views.slice(1)) {\n this.shadow_el.appendChild(child_view.el);\n child_view.render();\n child_view.after_render();\n }\n }\n async update_children() {\n await this.build_child_views();\n this.render();\n this.invalidate_layout();\n }\n _toggle_button() {\n this.model.collapsed = !this.model.collapsed;\n }\n _collapse() {\n for (const child_view of this.child_views.slice(1)) {\n if (this.model.collapsed) {\n this.shadow_el.removeChild(child_view.el);\n child_view.model.visible = false;\n }\n else {\n child_view.render();\n child_view.after_render();\n this.shadow_el.appendChild(child_view.el);\n child_view.model.visible = true;\n }\n }\n if (this.model.collapsed) {\n this.collapsed_style.replace(\":host\", {\n \"height\": \"fit-content\",\n 'flex': \"none\"\n });\n }\n else\n this.collapsed_style.clear();\n this.button_el.children[0].innerHTML = this.model.collapsed ? \"\\u25ba\" : \"\\u25bc\";\n this.invalidate_layout();\n }\n _createElement() {\n return DOM.createElement(this.model.tag, { class: this.css_classes() });\n }\n }\n exports.CardView = CardView;\n CardView.__name__ = \"CardView\";\n class Card extends column_1.Column {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Card = Card;\n _a = Card;\n Card.__name__ = \"Card\";\n Card.__module__ = \"panel.models.layout\";\n (() => {\n _a.prototype.default_view = CardView;\n _a.define(({ Array, Boolean, Nullable, String }) => ({\n active_header_background: [Nullable(String), null],\n button_css_classes: [Array(String), []],\n collapsed: [Boolean, true],\n collapsible: [Boolean, true],\n header_background: [Nullable(String), null],\n header_color: [Nullable(String), null],\n header_css_classes: [Array(String), []],\n header_tag: [String, \"div\"],\n hide_header: [Boolean, false],\n tag: [String, \"div\"],\n }));\n })();\n}\n","/* models/column.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const column_1 = require(\"@bokehjs/models/layouts/column\");\n const DOM = tslib_1.__importStar(require(\"@bokehjs/core/dom\"));\n class ColumnView extends column_1.ColumnView {\n connect_signals() {\n super.connect_signals();\n const { children, scroll_position, scroll_button_threshold } = this.model.properties;\n this.on_change(children, () => this.trigger_auto_scroll());\n this.on_change(scroll_position, () => this.scroll_to_position());\n this.on_change(scroll_button_threshold, () => this.toggle_scroll_button());\n }\n get distance_from_latest() {\n return this.el.scrollHeight - this.el.scrollTop - this.el.clientHeight;\n }\n scroll_to_position() {\n requestAnimationFrame(() => {\n this.el.scrollTo({ top: this.model.scroll_position });\n });\n }\n scroll_to_latest() {\n // Waits for the child to be rendered before scrolling\n requestAnimationFrame(() => {\n this.el.scrollTo({ top: this.el.scrollHeight });\n });\n }\n trigger_auto_scroll() {\n const limit = this.model.auto_scroll_limit;\n const within_limit = this.distance_from_latest <= limit;\n if (limit == 0 || !within_limit)\n return;\n this.scroll_to_latest();\n }\n record_scroll_position() {\n this.model.scroll_position = Math.round(this.el.scrollTop);\n }\n toggle_scroll_button() {\n const threshold = this.model.scroll_button_threshold;\n const exceeds_threshold = this.distance_from_latest >= threshold;\n if (this.scroll_down_button_el) {\n this.scroll_down_button_el.classList.toggle(\"visible\", threshold !== 0 && exceeds_threshold);\n }\n }\n render() {\n super.render();\n this.scroll_down_button_el = DOM.createElement('div', { class: 'scroll-button' });\n this.shadow_el.appendChild(this.scroll_down_button_el);\n this.el.addEventListener(\"scroll\", () => {\n this.record_scroll_position();\n this.toggle_scroll_button();\n });\n this.scroll_down_button_el.addEventListener(\"click\", () => {\n this.scroll_to_latest();\n });\n }\n after_render() {\n super.after_render();\n requestAnimationFrame(() => {\n if (this.model.scroll_position) {\n this.scroll_to_position();\n }\n if (this.model.view_latest) {\n this.scroll_to_latest();\n }\n this.toggle_scroll_button();\n });\n }\n }\n exports.ColumnView = ColumnView;\n ColumnView.__name__ = \"ColumnView\";\n class Column extends column_1.Column {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Column = Column;\n _a = Column;\n Column.__name__ = \"Column\";\n Column.__module__ = \"panel.models.layout\";\n (() => {\n _a.prototype.default_view = ColumnView;\n _a.define(({ Int, Boolean }) => ({\n scroll_position: [Int, 0],\n auto_scroll_limit: [Int, 0],\n scroll_button_threshold: [Int, 0],\n view_latest: [Boolean, false],\n }));\n })();\n}\n","/* models/checkbox_button_group.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const checkbox_button_group_1 = require(\"@bokehjs/models/widgets/checkbox_button_group\");\n class CheckboxButtonGroupView extends checkbox_button_group_1.CheckboxButtonGroupView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.CheckboxButtonGroupView = CheckboxButtonGroupView;\n CheckboxButtonGroupView.__name__ = \"CheckboxButtonGroupView\";\n class CheckboxButtonGroup extends checkbox_button_group_1.CheckboxButtonGroup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.CheckboxButtonGroup = CheckboxButtonGroup;\n _a = CheckboxButtonGroup;\n CheckboxButtonGroup.__name__ = \"CheckboxButtonGroup\";\n CheckboxButtonGroup.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = CheckboxButtonGroupView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/comm_manager.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const document_1 = require(\"@bokehjs/document\");\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n const message_1 = require(\"@bokehjs/protocol/message\");\n const receiver_1 = require(\"@bokehjs/protocol/receiver\");\n exports.comm_settings = {\n debounce: true\n };\n class CommManagerView extends view_1.View {\n }\n exports.CommManagerView = CommManagerView;\n CommManagerView.__name__ = \"CommManagerView\";\n class CommManager extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n this._document_listener = (event) => this._document_changed(event);\n }\n initialize() {\n super.initialize();\n this._receiver = new receiver_1.Receiver();\n this._event_buffer = [];\n this._blocked = false;\n this._timeout = Date.now();\n if ((window.PyViz == undefined) || (!window.PyViz.comm_manager))\n console.log(\"Could not find comm manager on window.PyViz, ensure the extension is loaded.\");\n else {\n this.ns = window.PyViz;\n this.ns.comm_manager.register_target(this.plot_id, this.comm_id, (msg) => {\n for (const view of this.ns.shared_views.get(this.plot_id)) {\n if (view !== this)\n view.msg_handler(msg);\n }\n try {\n this.msg_handler(msg);\n }\n catch (e) {\n console.error(e);\n }\n });\n this._client_comm = this.ns.comm_manager.get_client_comm(this.plot_id, this.client_comm_id, (msg) => this.on_ack(msg));\n if (this.ns.shared_views == null)\n this.ns.shared_views = new Map();\n if (this.ns.shared_views.has(this.plot_id))\n this.ns.shared_views.get(this.plot_id).push(this);\n else\n this.ns.shared_views.set(this.plot_id, [this]);\n }\n }\n _doc_attached() {\n super._doc_attached();\n if (this.document != null)\n this.document.on_change(this._document_listener);\n }\n _document_changed(event) {\n // Filter out changes to attributes that aren't server-visible\n if (event instanceof document_1.ModelChangedEvent && !event.model.properties[event.attr].syncable)\n return;\n this._event_buffer.push(event);\n if (!exports.comm_settings.debounce) {\n this.process_events();\n }\n else if ((!this._blocked || (Date.now() > this._timeout))) {\n setTimeout(() => this.process_events(), this.debounce);\n this._blocked = true;\n this._timeout = Date.now() + this.timeout;\n }\n }\n _extract_buffers(value, buffers) {\n let extracted;\n if (value instanceof Array) {\n extracted = [];\n for (const val of value)\n extracted.push(this._extract_buffers(val, buffers));\n }\n else if (value instanceof Object) {\n extracted = {};\n for (const key in value) {\n if (key === 'buffer' && value[key] instanceof ArrayBuffer) {\n const id = Object.keys(buffers).length;\n extracted = { id };\n buffers.push(value[key]);\n break;\n }\n extracted[key] = this._extract_buffers(value[key], buffers);\n }\n }\n else {\n extracted = value;\n }\n return extracted;\n }\n process_events() {\n if ((this.document == null) || (this._client_comm == null))\n return;\n const patch = this.document.create_json_patch(this._event_buffer);\n this._event_buffer = [];\n const message = Object.assign({}, message_1.Message.create('PATCH-DOC', {}, patch));\n const buffers = [];\n message.content = this._extract_buffers(message.content, buffers);\n this._client_comm.send(message, {}, buffers);\n for (const view of this.ns.shared_views.get(this.plot_id)) {\n if (view !== this && view.document != null)\n view.document.apply_json_patch(patch, [], this.id);\n }\n }\n disconnect_signals() {\n super.disconnect_signals();\n this.ns.shared_views.shared_views.delete(this.plot_id);\n }\n on_ack(msg) {\n // Receives acknowledgement from Python, processing event\n // and unblocking Comm if event queue empty\n const metadata = msg.metadata;\n if (this._event_buffer.length) {\n this._blocked = true;\n this._timeout = Date.now() + this.timeout;\n this.process_events();\n }\n else\n this._blocked = false;\n if ((metadata.msg_type == \"Ready\") && metadata.content)\n console.log(\"Python callback returned following output:\", metadata.content);\n else if (metadata.msg_type == \"Error\")\n console.log(\"Python failed with the following traceback:\", metadata.traceback);\n }\n msg_handler(msg) {\n const metadata = msg.metadata;\n const buffers = msg.buffers;\n const content = msg.content.data;\n const plot_id = this.plot_id;\n if ((metadata.msg_type == \"Ready\")) {\n if (metadata.content)\n console.log(\"Python callback returned following output:\", metadata.content);\n else if (metadata.msg_type == \"Error\")\n console.log(\"Python failed with the following traceback:\", metadata.traceback);\n }\n else if (plot_id != null) {\n let plot = null;\n if ((plot_id in this.ns.plot_index) && (this.ns.plot_index[plot_id] != null))\n plot = this.ns.plot_index[plot_id];\n else if ((window.Bokeh !== undefined) && (plot_id in window.Bokeh.index))\n plot = window.Bokeh.index[plot_id];\n if (plot == null)\n return;\n if (content.length)\n this._receiver.consume(content);\n else if ((buffers != undefined) && (buffers.length > 0))\n this._receiver.consume(buffers[0].buffer);\n else\n return;\n const comm_msg = this._receiver.message;\n if ((comm_msg != null) && (Object.keys(comm_msg.content).length > 0) && this.document != null) {\n const patch = comm_msg.content;\n this.document.apply_json_patch(patch, comm_msg.buffers);\n }\n }\n }\n }\n exports.CommManager = CommManager;\n _a = CommManager;\n CommManager.__name__ = \"CommManager\";\n CommManager.__module__ = \"panel.models.comm_manager\";\n (() => {\n _a.prototype.default_view = CommManagerView;\n _a.define(({ Int, String, Nullable }) => ({\n plot_id: [Nullable(String), null],\n comm_id: [Nullable(String), null],\n client_comm_id: [Nullable(String), null],\n timeout: [Int, 5000],\n debounce: [Int, 50],\n }));\n })();\n}\n","/* models/customselect.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const selectbox_1 = require(\"@bokehjs/models/widgets/selectbox\");\n class CustomSelectView extends selectbox_1.SelectView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.disabled_options.change, () => this._update_disabled_options());\n }\n options_el() {\n let opts = super.options_el();\n opts.forEach((element) => {\n if (this.model.disabled_options.includes(element.value)) {\n element.setAttribute('disabled', 'true');\n }\n });\n return opts;\n }\n _update_disabled_options() {\n for (const element of this.input_el.options) {\n if (this.model.disabled_options.includes(element.value)) {\n element.setAttribute('disabled', 'true');\n }\n else {\n element.removeAttribute('disabled');\n }\n }\n }\n }\n exports.CustomSelectView = CustomSelectView;\n CustomSelectView.__name__ = \"CustomSelectView\";\n class CustomSelect extends selectbox_1.Select {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.CustomSelect = CustomSelect;\n _a = CustomSelect;\n CustomSelect.__name__ = \"CustomSelect\";\n CustomSelect.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = CustomSelectView;\n _a.define(({ Array, String }) => {\n return {\n disabled_options: [Array(String), []],\n };\n });\n })();\n}\n","/* models/tabulator.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b, _c, _d;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_2 = require(\"@bokehjs/core/dom\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const tables_1 = require(\"@bokehjs/models/widgets/tables\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const comm_manager_1 = require(\"eca6f2cacb\") /* ./comm_manager */;\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class TableEditEvent extends bokeh_events_1.ModelEvent {\n constructor(column, row, pre) {\n super();\n this.column = column;\n this.row = row;\n this.pre = pre;\n }\n get event_values() {\n return { model: this.origin, column: this.column, row: this.row, pre: this.pre };\n }\n }\n exports.TableEditEvent = TableEditEvent;\n _a = TableEditEvent;\n TableEditEvent.__name__ = \"TableEditEvent\";\n (() => {\n _a.prototype.event_name = \"table-edit\";\n })();\n class CellClickEvent extends bokeh_events_1.ModelEvent {\n constructor(column, row) {\n super();\n this.column = column;\n this.row = row;\n }\n get event_values() {\n return { model: this.origin, column: this.column, row: this.row };\n }\n }\n exports.CellClickEvent = CellClickEvent;\n _b = CellClickEvent;\n CellClickEvent.__name__ = \"CellClickEvent\";\n (() => {\n _b.prototype.event_name = \"cell-click\";\n })();\n class SelectionEvent extends bokeh_events_1.ModelEvent {\n constructor(indices, selected, flush = false) {\n super();\n this.indices = indices;\n this.selected = selected;\n this.flush = flush;\n }\n get event_values() {\n return { model: this.origin, indices: this.indices, selected: this.selected, flush: this.flush };\n }\n }\n exports.SelectionEvent = SelectionEvent;\n _c = SelectionEvent;\n SelectionEvent.__name__ = \"SelectionEvent\";\n (() => {\n _c.prototype.event_name = \"selection-change\";\n })();\n function find_group(key, value, records) {\n for (const record of records) {\n if (record[key] == value)\n return record;\n }\n return null;\n }\n function summarize(grouped, columns, aggregators, depth = 0) {\n const summary = {};\n if (grouped.length == 0)\n return summary;\n const agg = aggregators[depth];\n for (const group of grouped) {\n const subsummary = summarize(group._children, columns, aggregators, depth + 1);\n for (const col in subsummary) {\n if ((0, types_1.isArray)(subsummary[col]))\n group[col] = subsummary[col].reduce((a, b) => a + b, 0) / subsummary[col].length;\n else\n group[col] = subsummary[col];\n }\n for (const column of columns.slice(1)) {\n const val = group[column.field];\n if (column.field in summary) {\n const old_val = summary[column.field];\n if (agg === 'min')\n summary[column.field] = Math.min(val, old_val);\n else if (agg === 'max')\n summary[column.field] = Math.max(val, old_val);\n else if (agg === 'sum')\n summary[column.field] = val + old_val;\n else if (agg === 'mean') {\n if ((0, types_1.isArray)(summary[column.field]))\n summary[column.field].push(val);\n else\n summary[column.field] = [old_val, val];\n }\n }\n else\n summary[column.field] = val;\n }\n }\n return summary;\n }\n function group_data(records, columns, indexes, aggregators) {\n const grouped = [];\n const index_field = columns[0].field;\n for (const record of records) {\n const value = record[indexes[0]];\n let group = find_group(index_field, value, grouped);\n if (group == null) {\n group = { _children: [] };\n group[index_field] = value;\n grouped.push(group);\n }\n let subgroup = group;\n const groups = {};\n for (const index of indexes.slice(1)) {\n subgroup = find_group(index_field, record[index], subgroup._children);\n if (subgroup == null) {\n subgroup = { _children: [] };\n subgroup[index_field] = record[index];\n group._children.push(subgroup);\n }\n groups[index] = group;\n for (const column of columns.slice(1))\n subgroup[column.field] = record[column];\n group = subgroup;\n }\n for (const column of columns.slice(1))\n subgroup[column.field] = record[column.field];\n }\n const aggs = [];\n for (const index of indexes)\n aggs.push((index in aggregators) ? aggregators[index] : 'sum');\n summarize(grouped, columns, aggs);\n return grouped;\n }\n const timestampSorter = function (a, b, _aRow, _bRow, _column, _dir, _params) {\n // Bokeh serializes datetime objects as UNIX timestamps.\n //a, b - the two values being compared\n //aRow, bRow - the row components for the values being compared (useful if you need to access additional fields in the row data for the sort)\n //column - the column component for the column being sorted\n //dir - the direction of the sort (\"asc\" or \"desc\")\n //sorterParams - sorterParams object from column definition array\n // Added an _ in front of some parameters as they're unused and the Typescript compiler was complaining about it.\n // const alignEmptyValues = params.alignEmptyValues\n let emptyAlign;\n emptyAlign = 0;\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n // NaN values are serialized to -9223372036854776 by Bokeh\n if (String(a) == '-9223372036854776') {\n a = window.luxon.DateTime.fromISO('invalid');\n }\n else {\n a = window.luxon.DateTime.fromMillis(a, opts);\n }\n if (String(b) == '-9223372036854776') {\n b = window.luxon.DateTime.fromISO('invalid');\n }\n else {\n b = window.luxon.DateTime.fromMillis(b, opts);\n }\n if (!a.isValid) {\n emptyAlign = !b.isValid ? 0 : -1;\n }\n else if (!b.isValid) {\n emptyAlign = 1;\n }\n else {\n //compare valid values\n return a - b;\n }\n // Invalid (e.g. NaN) always at the bottom\n emptyAlign *= -1;\n return emptyAlign;\n };\n const dateEditor = function (cell, onRendered, success, cancel) {\n //cell - the cell component for the editable cell\n //onRendered - function to call when the editor has been rendered\n //success - function to call to pass the successfully updated value to Tabulator\n //cancel - function to call to abort the edit and return to a normal cell\n //create and style input\n const rawValue = cell.getValue();\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n let cellValue;\n if (rawValue === 'NaN' || rawValue === null)\n cellValue = null;\n else\n cellValue = window.luxon.DateTime.fromMillis(rawValue, opts).toFormat(\"yyyy-MM-dd\");\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"date\");\n input.style.padding = \"4px\";\n input.style.width = \"100%\";\n input.style.boxSizing = \"border-box\";\n input.value = cellValue;\n onRendered(() => {\n input.focus();\n input.style.height = \"100%\";\n });\n function onChange() {\n const new_val = window.luxon.DateTime.fromFormat(input.value, \"yyyy-MM-dd\", opts).toMillis();\n if (new_val != cellValue)\n success(new_val);\n else\n cancel();\n }\n //submit new value on blur or change\n input.addEventListener(\"blur\", onChange);\n //submit new value on enter\n input.addEventListener(\"keydown\", (e) => {\n if (e.key == \"Enter\")\n setTimeout(onChange, 100);\n if (e.key == \"Escape\")\n setTimeout(cancel, 100);\n });\n return input;\n };\n const datetimeEditor = function (cell, onRendered, success, cancel) {\n //cell - the cell component for the editable cell\n //onRendered - function to call when the editor has been rendered\n //success - function to call to pass the successfully updated value to Tabulator\n //cancel - function to call to abort the edit and return to a normal cell\n //create and style input\n const rawValue = cell.getValue();\n const opts = { zone: new window.luxon.IANAZone('UTC') };\n let cellValue;\n if (rawValue === 'NaN' || rawValue === null)\n cellValue = null;\n else\n cellValue = window.luxon.DateTime.fromMillis(rawValue, opts).toFormat(\"yyyy-MM-dd'T'T\");\n const input = document.createElement(\"input\");\n input.setAttribute(\"type\", \"datetime-local\");\n input.style.padding = \"4px\";\n input.style.width = \"100%\";\n input.style.boxSizing = \"border-box\";\n input.value = cellValue;\n onRendered(() => {\n input.focus();\n input.style.height = \"100%\";\n });\n function onChange() {\n const new_val = window.luxon.DateTime.fromFormat(input.value, \"yyyy-MM-dd'T'T\", opts).toMillis();\n if (new_val != cellValue)\n success(new_val);\n else\n cancel();\n }\n //submit new value on blur or change\n input.addEventListener(\"blur\", onChange);\n //submit new value on enter\n input.addEventListener(\"keydown\", (e) => {\n if (e.key == \"Enter\")\n setTimeout(onChange, 100);\n if (e.key == \"Escape\")\n setTimeout(cancel, 100);\n });\n return input;\n };\n class DataTabulatorView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.columns = new Map();\n this._tabulator_cell_updating = false;\n this._updating_page = false;\n this._updating_sort = false;\n this._selection_updating = false;\n this._lastVerticalScrollbarTopPosition = 0;\n this._applied_styles = false;\n this._building = false;\n }\n connect_signals() {\n super.connect_signals();\n const p = this.model.properties;\n const { configuration, layout, columns, groupby } = p;\n this.on_change([configuration, layout, groupby], (0, debounce_1.debounce)(() => {\n this.invalidate_render();\n }, 20, false));\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.tabulator.element.style.visibility = 'visible';\n });\n this.on_change([columns], () => {\n this.tabulator.setColumns(this.getColumns());\n this.setHidden();\n });\n this.connect(p.download.change, () => {\n const ftype = this.model.filename.endsWith('.json') ? \"json\" : \"csv\";\n this.tabulator.download(ftype, this.model.filename);\n });\n this.connect(p.children.change, () => this.renderChildren());\n this.connect(p.expanded.change, () => {\n // The first cell is the cell of the frozen _index column.\n for (const row of this.tabulator.rowManager.getRows()) {\n if (row.cells.length > 0)\n row.cells[0].layoutElement();\n }\n // Make sure the expand icon is changed when expanded is\n // changed from Python.\n for (const row of this.tabulator.rowManager.getRows()) {\n if (row.cells.length > 0) {\n const index = row.data._index;\n const icon = this.model.expanded.indexOf(index) < 0 ? \"►\" : \"▼\";\n row.cells[1].element.innerText = icon;\n }\n }\n });\n this.connect(p.cell_styles.change, () => {\n if (this._applied_styles)\n this.tabulator.redraw(true);\n this.setStyles();\n });\n this.connect(p.hidden_columns.change, () => {\n this.setHidden();\n this.tabulator.redraw(true);\n });\n this.connect(p.page_size.change, () => this.setPageSize());\n this.connect(p.page.change, () => {\n if (!this._updating_page)\n this.setPage();\n });\n this.connect(p.visible.change, () => this.setVisibility());\n this.connect(p.max_page.change, () => this.setMaxPage());\n this.connect(p.frozen_rows.change, () => this.setFrozen());\n this.connect(p.sorters.change, () => this.setSorters());\n this.connect(p.theme_classes.change, () => this.setCSSClasses(this.tabulator.element));\n this.connect(this.model.source.properties.data.change, () => {\n this._selection_updating = true;\n this.setData();\n this._selection_updating = false;\n this.postUpdate();\n });\n this.connect(this.model.source.streaming, () => this.addData());\n this.connect(this.model.source.patching, () => {\n const inds = this.model.source.selected.indices;\n this.updateOrAddData();\n this.tabulator.rowManager.element.scrollTop = this._lastVerticalScrollbarTopPosition;\n // Restore indices since updating data may have reset checkbox column\n this.model.source.selected.indices = inds;\n });\n this.connect(this.model.source.selected.change, () => this.setSelection());\n this.connect(this.model.source.selected.properties.indices.change, () => this.setSelection());\n }\n get groupBy() {\n const groupby = (data) => {\n const groups = [];\n for (const g of this.model.groupby) {\n const group = g + ': ' + data[g];\n groups.push(group);\n }\n return groups.join(', ');\n };\n return this.model.groupby.length ? groupby : false;\n }\n get sorters() {\n const sorters = [];\n if (this.model.sorters.length)\n sorters.push({ column: '_index', dir: 'asc' });\n for (const sort of this.model.sorters.reverse()) {\n if (sort.column === undefined)\n sort.column = sort.field;\n sorters.push(sort);\n }\n return sorters;\n }\n invalidate_render() {\n this.tabulator.destroy();\n this.tabulator = null;\n this.render();\n }\n redraw() {\n if (this._building)\n return;\n if (this.tabulator.columnManager.element != null) {\n this.tabulator.columnManager.redraw(true);\n }\n if (this.tabulator.rowManager.renderer != null) {\n this.tabulator.rowManager.redraw(true);\n this.renderChildren();\n this.setStyles();\n }\n }\n after_layout() {\n super.after_layout();\n if (this.tabulator != null && this._initializing)\n this.redraw();\n this._initializing = false;\n }\n setCSSClasses(el) {\n el.className = \"pnx-tabulator tabulator\";\n for (const cls of this.model.theme_classes)\n el.classList.add(cls);\n }\n render() {\n if (this.tabulator != null)\n this.tabulator.destroy();\n super.render();\n this._initializing = true;\n const container = (0, dom_2.div)({ style: \"display: contents;\" });\n const el = (0, dom_2.div)({ style: \"width: 100%; height: 100%; visibility: hidden;\" });\n this.setCSSClasses(el);\n container.appendChild(el);\n this.shadow_el.appendChild(container);\n let configuration = this.getConfiguration();\n this.tabulator = new Tabulator(el, configuration);\n this.watch_stylesheets();\n this.init_callbacks();\n }\n style_redraw() {\n if (this.model.visible)\n this.tabulator.element.style.visibility = 'visible';\n if (!this._initializing && !this._building)\n this.redraw();\n }\n tableInit() {\n this._building = true;\n // Patch the ajax request and page data parsing methods\n const ajax = this.tabulator.modules.ajax;\n ajax.sendRequest = (_url, params, _config) => {\n return this.requestPage(params.page, params.sort);\n };\n this.tabulator.modules.page._parseRemoteData = () => {\n return false;\n };\n }\n init_callbacks() {\n // Initialization\n this.tabulator.on(\"tableBuilding\", () => this.tableInit());\n this.tabulator.on(\"tableBuilt\", () => this.tableBuilt());\n // Rendering callbacks\n this.tabulator.on(\"selectableCheck\", (row) => {\n const selectable = this.model.selectable_rows;\n return (selectable == null) || selectable.includes(row._row.data._index);\n });\n this.tabulator.on(\"tooltips\", (cell) => {\n return cell.getColumn().getField() + \": \" + cell.getValue();\n });\n this.tabulator.on(\"scrollVertical\", (0, debounce_1.debounce)(() => {\n this.setStyles();\n }, 50, false));\n // Sync state with model\n this.tabulator.on(\"rowSelectionChanged\", (data, rows, selected, deselected) => this.rowSelectionChanged(data, rows, selected, deselected));\n this.tabulator.on(\"rowClick\", (e, row) => this.rowClicked(e, row));\n this.tabulator.on(\"cellEdited\", (cell) => this.cellEdited(cell));\n this.tabulator.on(\"dataFiltering\", (filters) => {\n this.model.filters = filters;\n });\n this.tabulator.on(\"dataFiltered\", (_, rows) => {\n if (this._building)\n return;\n // Ensure that after filtering empty scroll renders\n if (rows.length === 0)\n this.tabulator.rowManager.renderEmptyScroll();\n // Ensure that after filtering the page is updated\n this.updatePage(this.tabulator.getPage());\n });\n this.tabulator.on(\"pageLoaded\", (pageno) => {\n this.updatePage(pageno);\n });\n this.tabulator.on(\"renderComplete\", () => {\n if (this._building)\n return;\n this.postUpdate();\n });\n this.tabulator.on(\"dataSorting\", (sorters) => {\n const sorts = [];\n for (const s of sorters) {\n if (s.field !== '_index')\n sorts.push({ field: s.field, dir: s.dir });\n }\n if (this.model.pagination !== 'remote') {\n this._updating_sort = true;\n this.model.sorters = sorts;\n this._updating_sort = false;\n }\n });\n }\n tableBuilt() {\n this._building = false;\n this.setSelection();\n this.renderChildren();\n this.setStyles();\n if (this.model.pagination) {\n this.setMaxPage();\n this.tabulator.setPage(this.model.page);\n }\n }\n requestPage(page, sorters) {\n return new Promise((resolve, reject) => {\n try {\n if (page != null && sorters != null) {\n this._updating_sort = true;\n const sorts = [];\n for (const s of sorters) {\n if (s.field !== '_index')\n sorts.push({ field: s.field, dir: s.dir });\n }\n this.model.sorters = sorts;\n this._updating_sort = false;\n this._updating_page = true;\n try {\n this.model.page = page || 1;\n }\n finally {\n this._updating_page = false;\n }\n }\n resolve([]);\n }\n catch (err) {\n reject(err);\n }\n });\n }\n getLayout() {\n let layout = this.model.layout;\n switch (layout) {\n case \"fit_data\":\n return \"fitData\";\n case \"fit_data_fill\":\n return \"fitDataFill\";\n case \"fit_data_stretch\":\n return \"fitDataStretch\";\n case \"fit_data_table\":\n return \"fitDataTable\";\n case \"fit_columns\":\n return \"fitColumns\";\n }\n }\n getConfiguration() {\n // Only use selectable mode if explicitly requested otherwise manually handle selections\n let selectable = this.model.select_mode === 'toggle' ? true : NaN;\n let configuration = Object.assign(Object.assign({}, this.model.configuration), { index: \"_index\", nestedFieldSeparator: false, movableColumns: false, selectable: selectable, columns: this.getColumns(), initialSort: this.sorters, layout: this.getLayout(), pagination: this.model.pagination != null, paginationMode: this.model.pagination, paginationSize: this.model.page_size, paginationInitialPage: 1, groupBy: this.groupBy, rowFormatter: (row) => this._render_row(row), frozenRows: (row) => {\n return this.model.frozen_rows.length ? this.model.frozen_rows.includes(row._row.data._index) : false;\n } });\n if (this.model.pagination === \"remote\") {\n configuration['ajaxURL'] = \"http://panel.pyviz.org\";\n configuration['sortMode'] = \"remote\";\n }\n const cds = this.model.source;\n let data;\n if (cds === null || (cds.columns().length === 0))\n data = [];\n else\n data = (0, data_1.transform_cds_to_records)(cds, true);\n if (configuration.dataTree)\n data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);\n return Object.assign(Object.assign({}, configuration), { \"data\": data });\n }\n get child_models() {\n var _e, _f;\n const children = [];\n for (const idx of this.model.expanded) {\n const child = (_f = (_e = this.model.children).get) === null || _f === void 0 ? void 0 : _f.call(_e, idx);\n if (child != null)\n children.push(child);\n }\n return children;\n }\n renderChildren() {\n new Promise(async (resolve) => {\n await this.build_child_views();\n resolve(null);\n }).then(() => {\n for (const r of this.model.expanded) {\n const row = this.tabulator.getRow(r);\n this._render_row(row, false);\n }\n this._update_children();\n if (this.tabulator.rowManager.renderer != null)\n this.tabulator.rowManager.adjustTableSize();\n this.invalidate_layout();\n });\n }\n _render_row(row, resize = true) {\n var _e;\n const index = (_e = row._row) === null || _e === void 0 ? void 0 : _e.data._index;\n if (!this.model.expanded.includes(index) || this.model.children.get(index) == null)\n return;\n const model = this.model.children.get(index);\n const view = model == null ? null : this._child_views.get(model);\n if (view == null)\n return;\n const rowEl = row.getElement();\n const style = getComputedStyle(this.tabulator.element.children[1].children[0]);\n const bg = style.backgroundColor;\n const neg_margin = rowEl.style.paddingLeft ? \"-\" + rowEl.style.paddingLeft : '0';\n const viewEl = (0, dom_2.div)({ style: \"background-color: \" + bg + \"; margin-left:\" + neg_margin + \"; max-width: 100%; overflow-x: hidden;\" });\n viewEl.appendChild(view.el);\n rowEl.appendChild(viewEl);\n if (!view.has_finished()) {\n view.render();\n view.after_render();\n }\n if (resize) {\n this._update_children();\n this.tabulator.rowManager.adjustTableSize();\n this.invalidate_layout();\n }\n }\n _expand_render(cell) {\n const index = cell._cell.row.data._index;\n const icon = this.model.expanded.indexOf(index) < 0 ? \"►\" : \"▼\";\n return \"<i>\" + icon + \"</i>\";\n }\n _update_expand(cell) {\n var _e, _f, _g, _h;\n const index = cell._cell.row.data._index;\n const expanded = [...this.model.expanded];\n const exp_index = expanded.indexOf(index);\n if (exp_index < 0)\n expanded.push(index);\n else {\n const removed = expanded.splice(exp_index, 1)[0];\n const model = (_f = (_e = this.model.children).get) === null || _f === void 0 ? void 0 : _f.call(_e, removed);\n if (model != null) {\n const view = this._child_views.get(model);\n if (view !== undefined && view.el != null)\n (0, dom_1.undisplay)(view.el);\n }\n }\n this.model.expanded = expanded;\n if (expanded.indexOf(index) < 0)\n return;\n let ready = true;\n for (const idx of this.model.expanded) {\n if (((_h = (_g = this.model.children).get) === null || _h === void 0 ? void 0 : _h.call(_g, idx)) == null) {\n ready = false;\n break;\n }\n }\n if (ready)\n this.renderChildren();\n }\n getData() {\n let data = (0, data_1.transform_cds_to_records)(this.model.source, true);\n if (this.model.configuration.dataTree)\n data = group_data(data, this.model.columns, this.model.indexes, this.model.aggregators);\n return data;\n }\n getColumns() {\n var _e;\n this.columns = new Map();\n const config_columns = (_e = this.model.configuration) === null || _e === void 0 ? void 0 : _e.columns;\n let columns = [];\n columns.push({ field: '_index', frozen: true, visible: false });\n if (config_columns != null) {\n for (const column of config_columns)\n if (column.columns != null) {\n const group_columns = [];\n for (const col of column.columns)\n group_columns.push(Object.assign({}, col));\n columns.push(Object.assign(Object.assign({}, column), { columns: group_columns }));\n }\n else if (column.formatter === \"expand\") {\n const expand = {\n hozAlign: \"center\",\n cellClick: (_, cell) => { this._update_expand(cell); },\n formatter: (cell) => { return this._expand_render(cell); },\n width: 40,\n frozen: true\n };\n columns.push(expand);\n }\n else {\n const new_column = Object.assign({}, column);\n if (new_column.formatter === \"rowSelection\") {\n new_column.cellClick = (_, cell) => {\n cell.getRow().toggleSelect();\n };\n }\n columns.push(new_column);\n }\n }\n for (const column of this.model.columns) {\n let tab_column = null;\n if (config_columns != null) {\n for (const col of columns) {\n if (col.columns != null) {\n for (const c of col.columns) {\n if (column.field === c.field) {\n tab_column = c;\n break;\n }\n }\n if (tab_column != null)\n break;\n }\n else if (column.field === col.field) {\n tab_column = col;\n break;\n }\n }\n }\n if (tab_column == null)\n tab_column = { field: column.field };\n this.columns.set(column.field, tab_column);\n if (tab_column.title == null)\n tab_column.title = column.title;\n if (tab_column.width == null && column.width != null && column.width != 0)\n tab_column.width = column.width;\n if (tab_column.formatter == null && column.formatter != null) {\n const formatter = column.formatter;\n const ftype = formatter.type;\n if (ftype === \"BooleanFormatter\")\n tab_column.formatter = \"tickCross\";\n else {\n tab_column.formatter = (cell) => {\n const formatted = column.formatter.doFormat(cell.getRow(), cell, cell.getValue(), null, null);\n if (column.formatter.type === 'HTMLTemplateFormatter')\n return formatted;\n const node = (0, dom_2.div)();\n node.innerHTML = formatted;\n const child = node.children[0];\n if (child.innerHTML === \"function(){return c.convert(arguments)}\") // If the formatter fails\n return '';\n return child;\n };\n }\n }\n if (tab_column.sorter == 'timestamp') {\n tab_column.sorter = timestampSorter;\n }\n if (tab_column.sorter === undefined) {\n tab_column.sorter = \"string\";\n }\n const editor = column.editor;\n const ctype = editor.type;\n if (tab_column.editor != null) {\n if (tab_column.editor === 'date') {\n tab_column.editor = dateEditor;\n }\n else if (tab_column.editor === 'datetime') {\n tab_column.editor = datetimeEditor;\n }\n }\n else if (ctype === \"StringEditor\") {\n if (editor.completions.length > 0) {\n tab_column.editor = \"list\";\n tab_column.editorParams = { values: editor.completions, autocomplete: true, listOnEmpty: true };\n }\n else\n tab_column.editor = \"input\";\n }\n else if (ctype === \"TextEditor\")\n tab_column.editor = \"textarea\";\n else if (ctype === \"IntEditor\" || ctype === \"NumberEditor\") {\n tab_column.editor = \"number\";\n tab_column.editorParams = { step: editor.step };\n if (ctype === \"IntEditor\")\n tab_column.validator = \"integer\";\n else\n tab_column.validator = \"numeric\";\n }\n else if (ctype === \"CheckboxEditor\") {\n tab_column.editor = \"tickCross\";\n }\n else if (ctype === \"DateEditor\") {\n tab_column.editor = dateEditor;\n }\n else if (ctype === \"SelectEditor\") {\n tab_column.editor = \"list\";\n tab_column.editorParams = { values: editor.options };\n }\n else if (editor != null && editor.default_view != null) {\n tab_column.editor = (cell, onRendered, success, cancel) => {\n this.renderEditor(column, cell, onRendered, success, cancel);\n };\n }\n tab_column.visible = (tab_column.visible != false && !this.model.hidden_columns.includes(column.field));\n tab_column.editable = () => (this.model.editable && (editor.default_view != null));\n if (tab_column.headerFilter) {\n if ((typeof tab_column.headerFilter) === 'boolean' &&\n (typeof tab_column.editor) === 'string') {\n tab_column.headerFilter = tab_column.editor;\n tab_column.headerFilterParams = tab_column.editorParams;\n }\n }\n for (const sort of this.model.sorters) {\n if (tab_column.field === sort.field)\n tab_column.headerSortStartingDir = sort.dir;\n }\n tab_column.cellClick = (_, cell) => {\n const index = cell.getData()._index;\n const event = new CellClickEvent(column.field, index);\n this.model.trigger_event(event);\n };\n if (config_columns == null)\n columns.push(tab_column);\n }\n for (const col in this.model.buttons) {\n const button_formatter = () => {\n return this.model.buttons[col];\n };\n const button_column = {\n formatter: button_formatter,\n hozAlign: \"center\",\n cellClick: (_, cell) => {\n const index = cell.getData()._index;\n const event = new CellClickEvent(col, index);\n this.model.trigger_event(event);\n }\n };\n columns.push(button_column);\n }\n return columns;\n }\n renderEditor(column, cell, onRendered, success, cancel) {\n const editor = column.editor;\n const view = new editor.default_view({ column: column, model: editor, parent: this, container: cell._cell.element });\n view.initialize();\n view.connect_signals();\n onRendered(() => {\n view.setValue(cell.getValue());\n });\n view.inputEl.addEventListener('input', () => {\n const value = view.serializeValue();\n const old_value = cell.getValue();\n const validation = view.validate();\n if (!validation.valid)\n cancel(validation.msg);\n if (old_value != null && typeof value != typeof old_value)\n cancel(\"Mismatching type\");\n else\n success(view.serializeValue());\n });\n return view.inputEl;\n }\n // Update table\n setData() {\n if (this._initializing || this._building || !this.tabulator.initialized)\n return;\n const data = this.getData();\n if (this.model.pagination != null)\n this.tabulator.rowManager.setData(data, true, false);\n else\n this.tabulator.setData(data);\n }\n addData() {\n const rows = this.tabulator.rowManager.getRows();\n const last_row = rows[rows.length - 1];\n const start = ((last_row === null || last_row === void 0 ? void 0 : last_row.data._index) || 0);\n this.setData();\n if (this.model.follow && last_row)\n this.tabulator.scrollToRow(start, \"top\", false);\n }\n postUpdate() {\n this.setSelection();\n this.setStyles();\n }\n updateOrAddData() {\n // To avoid double updating the tabulator data\n if (this._tabulator_cell_updating)\n return;\n // Temporarily set minHeight to avoid \"scroll-to-top\" issues caused\n // by Tabulator JS entirely destroying the table when .setData is called.\n // Inspired by https://github.com/olifolkerd/tabulator/issues/4155\n const prev_minheight = this.tabulator.element.style.minHeight;\n this.tabulator.element.style.minHeight = this.tabulator.element.offsetHeight + \"px\";\n let data = (0, data_1.transform_cds_to_records)(this.model.source, true);\n this.tabulator.setData(data).then(() => {\n this.tabulator.element.style.minHeight = prev_minheight;\n });\n }\n setFrozen() {\n for (const row of this.model.frozen_rows) {\n this.tabulator.getRow(row).freeze();\n }\n }\n setVisibility() {\n if (this.tabulator == null)\n return;\n this.tabulator.element.style.visibility = this.model.visible ? 'visible' : 'hidden';\n }\n updatePage(pageno) {\n if (this.model.pagination === 'local' && this.model.page !== pageno) {\n this._updating_page = true;\n this.model.page = pageno;\n this._updating_page = false;\n this.setStyles();\n }\n }\n setGroupBy() {\n this.tabulator.setGroupBy(this.groupBy);\n }\n setSorters() {\n if (this._updating_sort)\n return;\n this.tabulator.setSort(this.sorters);\n }\n setStyles() {\n const style_data = this.model.cell_styles.data;\n if (this.tabulator == null || this.tabulator.getDataCount() == 0 || style_data == null || !style_data.size)\n return;\n this._applied_styles = false;\n for (const r of style_data.keys()) {\n const row_style = style_data.get(r);\n const row = this.tabulator.getRow(r);\n if (!row)\n continue;\n const cells = row._row.cells;\n for (const c of row_style.keys()) {\n const style = row_style.get(c);\n const cell = cells[c];\n if (cell == null || !style.length)\n continue;\n const element = cell.element;\n for (const s of style) {\n let prop, value;\n if ((0, types_1.isArray)(s))\n [prop, value] = s;\n else if (!s.includes(':'))\n continue;\n else\n [prop, value] = s.split(':');\n element.style.setProperty(prop, value.trimLeft());\n this._applied_styles = true;\n }\n }\n }\n }\n setHidden() {\n for (const column of this.tabulator.getColumns()) {\n const col = column._column;\n if ((col.field == '_index') || this.model.hidden_columns.includes(col.field))\n column.hide();\n else\n column.show();\n }\n }\n setMaxPage() {\n this.tabulator.setMaxPage(this.model.max_page);\n if (this.tabulator.modules.page.pagesElement)\n this.tabulator.modules.page._setPageButtons();\n }\n setPage() {\n this.tabulator.setPage(Math.min(this.model.max_page, this.model.page));\n if (this.model.pagination === \"local\") {\n this.renderChildren();\n this.setStyles();\n }\n }\n setPageSize() {\n this.tabulator.setPageSize(this.model.page_size);\n if (this.model.pagination === \"local\") {\n this.renderChildren();\n this.setStyles();\n }\n }\n setSelection() {\n if (this.tabulator == null || this._initializing || this._selection_updating || !this.tabulator.initialized)\n return;\n const indices = this.model.source.selected.indices;\n const current_indices = this.tabulator.getSelectedData().map((row) => row._index);\n if (JSON.stringify(indices) == JSON.stringify(current_indices))\n return;\n this._selection_updating = true;\n this.tabulator.deselectRow();\n this.tabulator.selectRow(indices);\n for (const index of indices) {\n const row = this.tabulator.rowManager.findRow(index);\n if (row)\n this.tabulator.scrollToRow(index, \"center\", false).catch(() => { });\n }\n this._selection_updating = false;\n }\n // Update model\n rowClicked(e, row) {\n var _e;\n if (this._selection_updating ||\n this._initializing ||\n (typeof this.model.select_mode) === 'string' ||\n this.model.select_mode === false || // selection disabled\n this.model.configuration.dataTree || // dataTree does not support selection\n ((_e = e.srcElement) === null || _e === void 0 ? void 0 : _e.innerText) === \"►\" // expand button\n )\n return;\n let indices = [];\n const selected = this.model.source.selected;\n const index = row._row.data._index;\n if (this.model.pagination === 'remote') {\n const includes = this.model.source.selected.indices.indexOf(index) == -1;\n const flush = !(e.ctrlKey || e.metaKey || e.shiftKey);\n if (e.shiftKey && selected.indices.length) {\n const start = selected.indices[selected.indices.length - 1];\n if (index > start) {\n for (let i = start; i <= index; i++)\n indices.push(i);\n }\n else {\n for (let i = start; i >= index; i--)\n indices.push(i);\n }\n }\n else {\n indices.push(index);\n }\n this._selection_updating = true;\n this.model.trigger_event(new SelectionEvent(indices, includes, flush));\n this._selection_updating = false;\n return;\n }\n if (e.ctrlKey || e.metaKey) {\n indices = [...this.model.source.selected.indices];\n }\n else if (e.shiftKey && selected.indices.length) {\n const start = selected.indices[selected.indices.length - 1];\n if (index > start) {\n for (let i = start; i < index; i++)\n indices.push(i);\n }\n else {\n for (let i = start; i > index; i--)\n indices.push(i);\n }\n }\n if (indices.indexOf(index) < 0)\n indices.push(index);\n else\n indices.splice(indices.indexOf(index), 1);\n // Remove the first selected indices when selectable is an int.\n if (typeof this.model.select_mode === 'number') {\n while (indices.length > this.model.select_mode) {\n indices.shift();\n }\n }\n const filtered = this._filter_selected(indices);\n this.tabulator.deselectRow();\n this.tabulator.selectRow(filtered);\n this._selection_updating = true;\n selected.indices = filtered;\n this._selection_updating = false;\n }\n _filter_selected(indices) {\n const filtered = [];\n for (const ind of indices) {\n if (this.model.selectable_rows == null ||\n this.model.selectable_rows.indexOf(ind) >= 0)\n filtered.push(ind);\n }\n return filtered;\n }\n rowSelectionChanged(data, _row, selected, deselected) {\n if (this._selection_updating ||\n this._initializing ||\n (typeof this.model.select_mode) === 'boolean' ||\n (typeof this.model.select_mode) === 'number' ||\n this.model.configuration.dataTree)\n return;\n if (this.model.pagination === 'remote') {\n let selected_indices = selected.map((x) => x._row.data._index);\n let deselected_indices = deselected.map((x) => x._row.data._index);\n if (selected_indices.length > 0) {\n this._selection_updating = true;\n this.model.trigger_event(new SelectionEvent(selected_indices, true, false));\n }\n if (deselected_indices.length > 0) {\n this._selection_updating = true;\n this.model.trigger_event(new SelectionEvent(deselected_indices, false, false));\n }\n }\n else {\n const indices = data.map((row) => row._index);\n const filtered = this._filter_selected(indices);\n this._selection_updating = indices.length === filtered.length;\n this.model.source.selected.indices = filtered;\n }\n this._selection_updating = false;\n }\n cellEdited(cell) {\n const field = cell._cell.column.field;\n const column_def = this.columns.get(field);\n const index = cell.getData()._index;\n const value = cell._cell.value;\n if (column_def.validator === 'numeric' && value === '') {\n cell.setValue(NaN, true);\n return;\n }\n this._tabulator_cell_updating = true;\n comm_manager_1.comm_settings.debounce = false;\n this.model.trigger_event(new TableEditEvent(field, index, true));\n try {\n this.model.source.patch({ [field]: [[index, value]] });\n }\n finally {\n comm_manager_1.comm_settings.debounce = true;\n this._tabulator_cell_updating = false;\n }\n this.model.trigger_event(new TableEditEvent(field, index, false));\n this.tabulator.scrollToRow(index, \"top\", false);\n }\n }\n exports.DataTabulatorView = DataTabulatorView;\n DataTabulatorView.__name__ = \"DataTabulatorView\";\n exports.TableLayout = (0, kinds_1.Enum)(\"fit_data\", \"fit_data_fill\", \"fit_data_stretch\", \"fit_data_table\", \"fit_columns\");\n // The Bokeh .ts model corresponding to the Bokeh .py model\n class DataTabulator extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DataTabulator = DataTabulator;\n _d = DataTabulator;\n DataTabulator.__name__ = \"DataTabulator\";\n DataTabulator.__module__ = \"panel.models.tabulator\";\n (() => {\n _d.prototype.default_view = DataTabulatorView;\n _d.define(({ Any, Array, Boolean, Nullable, Number, Ref, String }) => ({\n aggregators: [Any, {}],\n buttons: [Any, {}],\n children: [Any, new Map()],\n configuration: [Any, {}],\n columns: [Array(Ref(tables_1.TableColumn)), []],\n download: [Boolean, false],\n editable: [Boolean, true],\n expanded: [Array(Number), []],\n filename: [String, \"table.csv\"],\n filters: [Array(Any), []],\n follow: [Boolean, true],\n frozen_rows: [Array(Number), []],\n groupby: [Array(String), []],\n hidden_columns: [Array(String), []],\n indexes: [Array(String), []],\n layout: [exports.TableLayout, \"fit_data\"],\n max_page: [Number, 0],\n pagination: [Nullable(String), null],\n page: [Number, 0],\n page_size: [Number, 0],\n select_mode: [Any, true],\n selectable_rows: [Nullable(Array(Number)), null],\n source: [Ref(column_data_source_1.ColumnDataSource)],\n sorters: [Array(Any), []],\n cell_styles: [Any, {}],\n theme_classes: [Array(String), []],\n }));\n })();\n}\n","/* debounce/index.js */ function _(require, module, exports, __esModule, __esExport) {\n /**\n * Returns a function, that, as long as it continues to be invoked, will not\n * be triggered. The function will be called after it stops being called for\n * N milliseconds. If `immediate` is passed, trigger the function on the\n * leading edge, instead of the trailing. The function also has a property 'clear'\n * that is a function which will clear the timer to prevent previously scheduled executions.\n *\n * @source underscore.js\n * @see http://unscriptable.com/2009/03/20/debouncing-javascript-methods/\n * @param {Function} function to wrap\n * @param {Number} timeout in ms (`100`)\n * @param {Boolean} whether to execute at the beginning (`false`)\n * @api public\n */\n function debounce(func, wait, immediate) {\n var timeout, args, context, timestamp, result;\n if (null == wait)\n wait = 100;\n function later() {\n var last = Date.now() - timestamp;\n if (last < wait && last >= 0) {\n timeout = setTimeout(later, wait - last);\n }\n else {\n timeout = null;\n if (!immediate) {\n result = func.apply(context, args);\n context = args = null;\n }\n }\n }\n ;\n var debounced = function () {\n context = this;\n args = arguments;\n timestamp = Date.now();\n var callNow = immediate && !timeout;\n if (!timeout)\n timeout = setTimeout(later, wait);\n if (callNow) {\n result = func.apply(context, args);\n context = args = null;\n }\n return result;\n };\n debounced.clear = function () {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n debounced.flush = function () {\n if (timeout) {\n result = func.apply(context, args);\n context = args = null;\n clearTimeout(timeout);\n timeout = null;\n }\n };\n return debounced;\n }\n ;\n // Adds compatibility for ES modules\n debounce.debounce = debounce;\n module.exports = debounce;\n}\n","/* models/data.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function transform_cds_to_records(cds, addId = false, start = 0) {\n const data = [];\n const columns = cds.columns();\n const cdsLength = cds.get_length();\n if (columns.length === 0 || cdsLength === null)\n return [];\n for (let i = start; i < cdsLength; i++) {\n const item = {};\n for (const column of columns) {\n let array = cds.get_array(column);\n const shape = (array[0] == null || array[0].shape == null) ? null : array[0].shape;\n if ((shape != null) && (shape.length > 1) && (typeof shape[0] == \"number\"))\n item[column] = array.slice(i * shape[1], i * shape[1] + shape[1]);\n else if (array.length != cdsLength && (array.length % cdsLength === 0)) {\n const offset = array.length / cdsLength;\n item[column] = array.slice(i * offset, i * offset + offset);\n }\n else\n item[column] = array[i];\n }\n if (addId)\n item['_index'] = i;\n data.push(item);\n }\n return data;\n }\n exports.transform_cds_to_records = transform_cds_to_records;\n function dict_to_records(data, index = true) {\n const records = [];\n for (let i = 0; i < data.index.length; i++) {\n const record = {};\n for (const col of data) {\n if (index || col !== \"index\")\n record[col] = data[col][i];\n }\n }\n return records;\n }\n exports.dict_to_records = dict_to_records;\n}\n","/* models/datetime_picker.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const flatpickr_1 = tslib_1.__importDefault(require(\"1156ddcec2\") /* flatpickr */);\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const inputs = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\"));\n const flatpickr_css_1 = tslib_1.__importDefault(require(\"@bokehjs/styles/widgets/flatpickr.css\"));\n function _convert_date_list(value) {\n const result = [];\n for (const item of value) {\n if ((0, types_1.isString)(item))\n result.push(item);\n else {\n const [from, to] = item;\n result.push({ from, to });\n }\n }\n return result;\n }\n class DatetimePickerView extends input_widget_1.InputWidgetView {\n connect_signals() {\n super.connect_signals();\n const { value, min_date, max_date, disabled_dates, enabled_dates, inline, enable_time, enable_seconds, military_time, date_format, mode } = this.model.properties;\n this.connect(value.change, () => { var _b; return this.model.value ? (_b = this._picker) === null || _b === void 0 ? void 0 : _b.setDate(this.model.value) : this._clear(); });\n this.connect(min_date.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"minDate\", this.model.min_date); });\n this.connect(max_date.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"maxDate\", this.model.max_date); });\n this.connect(disabled_dates.change, () => {\n var _b;\n const { disabled_dates } = this.model;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"disable\", disabled_dates != null ? _convert_date_list(disabled_dates) : []);\n });\n this.connect(enabled_dates.change, () => {\n var _b;\n const { enabled_dates } = this.model;\n if (enabled_dates != null) {\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enable\", _convert_date_list(enabled_dates));\n }\n else {\n // this reimplements `set()` for the `undefined` case\n if (this._picker) {\n this._picker.config._enable = undefined;\n this._picker.redraw();\n this._picker.updateValue(true);\n }\n }\n });\n this.connect(inline.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"inline\", this.model.inline); });\n this.connect(enable_time.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enableTime\", this.model.enable_time); });\n this.connect(enable_seconds.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"enableSeconds\", this.model.enable_seconds); });\n this.connect(military_time.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"time_24hr\", this.model.military_time); });\n this.connect(mode.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"mode\", this.model.mode); });\n this.connect(date_format.change, () => { var _b; return (_b = this._picker) === null || _b === void 0 ? void 0 : _b.set(\"dateFormat\", this.model.date_format); });\n }\n remove() {\n var _b;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.destroy();\n super.remove();\n }\n stylesheets() {\n return [...super.stylesheets(), flatpickr_css_1.default];\n }\n render() {\n if (this._picker != null)\n return;\n super.render();\n this.input_el = (0, dom_1.input)({ type: \"text\", class: inputs.input, disabled: this.model.disabled });\n this.group_el.appendChild(this.input_el);\n const options = {\n appendTo: this.group_el,\n positionElement: this.input_el,\n defaultDate: this.model.value,\n inline: this.model.inline,\n position: this._position.bind(this),\n enableTime: this.model.enable_time,\n enableSeconds: this.model.enable_seconds,\n time_24hr: this.model.military_time,\n dateFormat: this.model.date_format,\n mode: this.model.mode,\n onClose: (selected_dates, date_string, instance) => this._on_close(selected_dates, date_string, instance),\n };\n const { min_date, max_date, disabled_dates, enabled_dates } = this.model;\n if (min_date != null)\n options.minDate = min_date;\n if (max_date != null)\n options.maxDate = max_date;\n if (disabled_dates != null)\n options.disable = _convert_date_list(disabled_dates);\n if (enabled_dates != null)\n options.enable = _convert_date_list(enabled_dates);\n this._picker = (0, flatpickr_1.default)(this.input_el, options);\n this._picker.maxDateHasTime = true;\n this._picker.minDateHasTime = true;\n }\n _clear() {\n var _b;\n (_b = this._picker) === null || _b === void 0 ? void 0 : _b.clear();\n this.model.value = null;\n }\n _on_close(_selected_dates, date_string, _instance) {\n if (this.model.mode == \"range\" && !date_string.includes(\"to\"))\n return;\n this.model.value = date_string;\n this.change_input();\n }\n _position(self, custom_el) {\n // This function is copied directly from bokehs date_picker\n const positionElement = custom_el !== null && custom_el !== void 0 ? custom_el : self._positionElement;\n const calendarHeight = [...self.calendarContainer.children].reduce((acc, child) => acc + (0, dom_1.bounding_box)(child).height, 0);\n const calendarWidth = self.calendarContainer.offsetWidth;\n const configPos = this.model.position.split(\" \");\n const configPosVertical = configPos[0];\n const configPosHorizontal = configPos.length > 1 ? configPos[1] : null;\n // const inputBounds = positionElement.getBoundingClientRect()\n const inputBounds = {\n top: positionElement.offsetTop,\n bottom: positionElement.offsetTop + positionElement.offsetHeight,\n left: positionElement.offsetLeft,\n right: positionElement.offsetLeft + positionElement.offsetWidth,\n width: positionElement.offsetWidth,\n };\n const distanceFromBottom = window.innerHeight - inputBounds.bottom;\n const showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n // const top =\n // window.scrollY +\n // inputBounds.top +\n // (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2)\n const top = self.config.appendTo\n ? inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2)\n : window.scrollY +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n self.calendarContainer.classList.toggle(\"arrowTop\", !showOnTop);\n self.calendarContainer.classList.toggle(\"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n let left = window.scrollX + inputBounds.left;\n let isCenter = false;\n let isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n self.calendarContainer.classList.toggle(\"arrowLeft\", !isCenter && !isRight);\n self.calendarContainer.classList.toggle(\"arrowCenter\", isCenter);\n self.calendarContainer.classList.toggle(\"arrowRight\", isRight);\n const right = window.document.body.offsetWidth -\n (window.scrollX + inputBounds.right);\n const rightMost = left + calendarWidth > window.document.body.offsetWidth;\n const centerMost = right + calendarWidth > window.document.body.offsetWidth;\n self.calendarContainer.classList.toggle(\"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = `${top}px`;\n if (!rightMost) {\n self.calendarContainer.style.left = `${left}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = `${right}px`;\n }\n else {\n const css = this.shadow_el.styleSheets[0];\n const bodyWidth = window.document.body.offsetWidth;\n const centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n const centerBefore = \".flatpickr-calendar.centerMost:before\";\n const centerAfter = \".flatpickr-calendar.centerMost:after\";\n const centerIndex = css.cssRules.length;\n const centerStyle = `{left:${inputBounds.left}px;right:auto;}`;\n self.calendarContainer.classList.toggle(\"rightMost\", false);\n self.calendarContainer.classList.toggle(\"centerMost\", true);\n css.insertRule(`${centerBefore},${centerAfter}${centerStyle}`, centerIndex);\n self.calendarContainer.style.left = `${centerLeft}px`;\n self.calendarContainer.style.right = \"auto\";\n }\n }\n }\n exports.DatetimePickerView = DatetimePickerView;\n DatetimePickerView.__name__ = \"DatetimePickerView\";\n class DatetimePicker extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DatetimePicker = DatetimePicker;\n _a = DatetimePicker;\n DatetimePicker.__name__ = \"DatetimePicker\";\n DatetimePicker.__module__ = \"panel.models.datetime_picker\";\n (() => {\n _a.prototype.default_view = DatetimePickerView;\n _a.define(({ Boolean, String, Array, Tuple, Or, Nullable }) => {\n const DateStr = String;\n const DatesList = Array(Or(DateStr, Tuple(DateStr, DateStr)));\n return {\n value: [Nullable(String), null],\n min_date: [Nullable(String), null],\n max_date: [Nullable(String), null],\n disabled_dates: [Nullable(DatesList), null],\n enabled_dates: [Nullable(DatesList), null],\n position: [enums_1.CalendarPosition, \"auto\"],\n inline: [Boolean, false],\n enable_time: [Boolean, true],\n enable_seconds: [Boolean, true],\n military_time: [Boolean, true],\n date_format: [String, \"Y-m-d H:i:S\"],\n mode: [String, \"single\"],\n };\n });\n })();\n}\n","/* flatpickr/dist/esm/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function (t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s)\n if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n };\n var __spreadArrays = (this && this.__spreadArrays) || function () {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++)\n s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n };\n const options_1 = require(\"651d495396\") /* ./types/options */;\n const default_1 = tslib_1.__importDefault(require(\"3bfa124fda\") /* ./l10n/default */);\n const utils_1 = require(\"15458073ce\") /* ./utils */;\n const dom_1 = require(\"6b6749c6cf\") /* ./utils/dom */;\n const dates_1 = require(\"1bb8c967d1\") /* ./utils/dates */;\n const formatting_1 = require(\"3d14787c35\") /* ./utils/formatting */;\n require(\"6f45019dc1\") /* ./utils/polyfills */;\n var DEBOUNCED_CHANGE_MS = 300;\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign(__assign({}, options_1.defaults), flatpickr.defaultConfig),\n l10n: default_1.default,\n };\n self.parseDate = (0, dates_1.createDateParser)({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self.onMouseOver = onMouseOver;\n self._createElement = dom_1.createElement;\n self.createDay = createDay;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.updateValue = updateValue;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) {\n month = self.currentMonth;\n }\n if (yr === void 0) {\n yr = self.currentYear;\n }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n },\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar ? self.latestSelectedDateObj : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function getClosestActiveElement() {\n var _a;\n return (((_a = self.calendarContainer) === null || _a === void 0 ? void 0 : _a.getRootNode())\n .activeElement || document.activeElement);\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1) {\n return;\n }\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n var defaultDate = self.config.minDate === undefined ||\n (0, dates_1.compareDates)(new Date(), self.config.minDate) >= 0\n ? new Date()\n : new Date(self.config.minDate.getTime());\n var defaults = (0, dates_1.getDefaultHours)(self.config);\n defaultDate.setHours(defaults.hours, defaults.minutes, defaults.seconds, defaultDate.getMilliseconds());\n self.selectedDates = [defaultDate];\n self.latestSelectedDateObj = defaultDate;\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * (0, utils_1.int)(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n (0, dates_1.compareDates)(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n (0, dates_1.compareDates)(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (self.config.maxTime !== undefined &&\n self.config.minTime !== undefined &&\n self.config.minTime > self.config.maxTime) {\n var minBound = (0, dates_1.calculateSecondsSinceMidnight)(self.config.minTime.getHours(), self.config.minTime.getMinutes(), self.config.minTime.getSeconds());\n var maxBound = (0, dates_1.calculateSecondsSinceMidnight)(self.config.maxTime.getHours(), self.config.maxTime.getMinutes(), self.config.maxTime.getSeconds());\n var currentTime = (0, dates_1.calculateSecondsSinceMidnight)(hours, minutes, seconds);\n if (currentTime > maxBound && currentTime < minBound) {\n var result = (0, dates_1.parseSeconds)(minBound);\n hours = result[0];\n minutes = result[1];\n seconds = result[2];\n }\n }\n else {\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours() && minutes < minTime.getMinutes())\n minutes = minTime.getMinutes();\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n }\n setHours(hours, minutes, seconds);\n }\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date && date instanceof Date) {\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n }\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = (0, utils_1.pad)(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * (0, utils_1.int)(hours % 12 === 0)\n : hours);\n self.minuteElement.value = (0, utils_1.pad)(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[(0, utils_1.int)(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = (0, utils_1.pad)(seconds);\n }\n function onYearInput(event) {\n var eventTarget = (0, dom_1.getEventTarget)(event);\n var year = parseInt(eventTarget.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n remove: function () { return element.removeEventListener(event, handler, options); },\n });\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = (0, utils_1.debounce)(onResize, 50);\n self._debouncedChange = (0, utils_1.debounce)(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver((0, dom_1.getEventTarget)(e));\n });\n bind(self._input, \"keydown\", onKeyDown);\n if (self.calendarContainer !== undefined) {\n bind(self.calendarContainer, \"keydown\", onKeyDown);\n }\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", documentClick);\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"click\", onMonthNavClick);\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"click\", selectDate);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return (0, dom_1.getEventTarget)(e).select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"click\", timeIncrement);\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"click\", function (e) {\n updateTime(e);\n });\n }\n }\n if (self.config.allowInput) {\n bind(self._input, \"blur\", onBlur);\n }\n }\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n function timeIncrement(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n if (~eventTarget.className.indexOf(\"arrow\"))\n incrementNumInput(e, eventTarget.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n function incrementNumInput(e, delta, inputElem) {\n var target = e && (0, dom_1.getEventTarget)(e);\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n (0, dom_1.toggleClass)(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n (0, dom_1.toggleClass)(self.calendarContainer, \"animate\", self.config.animate === true);\n (0, dom_1.toggleClass)(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = (0, dom_1.createElement)(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, _dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = (0, dom_1.createElement)(\"span\", className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n (0, dates_1.compareDates)(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n (0, dom_1.toggleClass)(dayElement, \"startRange\", self.selectedDates[0] &&\n (0, dates_1.compareDates)(date, self.selectedDates[0], true) === 0);\n (0, dom_1.toggleClass)(dayElement, \"endRange\", self.selectedDates[1] &&\n (0, dates_1.compareDates)(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n i % 7 === 6) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"<span class='flatpickr-day'>\" + self.config.getWeek(date) + \"</span>\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var activeElement = getClosestActiveElement();\n var dayFocused = isInView(activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined) {\n self._input.focus();\n }\n else if (!dayFocused) {\n focusOnDayElem(startElem);\n }\n else {\n getNextAvailableDay(startElem, offset);\n }\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12, year);\n var daysInMonth = self.utils.getDaysInMonth(month, year), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(\"flatpickr-day \" + nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n var dayContainer = (0, dom_1.createElement)(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n (0, dom_1.clearNode)(self.daysContainer);\n if (self.weekNumbers)\n (0, dom_1.clearNode)(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = (0, dom_1.createElement)(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = (0, formatting_1.monthToStr)(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = (0, dom_1.createElement)(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = (0, dom_1.createElement)(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = (0, dom_1.createElement)(\"select\", \"flatpickr-monthDropdown-months\");\n self.monthsDropdownContainer.setAttribute(\"aria-label\", self.l10n.monthAriaLabel);\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = (0, dom_1.getEventTarget)(e);\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = (0, dom_1.createNumberInput)(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = (0, dom_1.createElement)(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement,\n };\n }\n function buildMonths() {\n (0, dom_1.clearNode)(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = (0, dom_1.createElement)(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = (0, dom_1.createElement)(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = (0, dom_1.createElement)(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n (0, dom_1.toggleClass)(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n },\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n (0, dom_1.toggleClass)(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n },\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n var defaults = (0, dates_1.getDefaultHours)(self.config);\n self.timeContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = (0, dom_1.createElement)(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = (0, dom_1.createNumberInput)(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel,\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = (0, dom_1.createNumberInput)(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel,\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? defaults.hours\n : military2ampm(defaults.hours));\n self.minuteElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : defaults.minutes);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.hourElement.setAttribute(\"maxlength\", \"2\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.minuteElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = (0, dom_1.createNumberInput)(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = (0, utils_1.pad)(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : defaults.seconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.secondElement.setAttribute(\"maxlength\", \"2\");\n self.timeContainer.appendChild((0, dom_1.createElement)(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n self.amPM = (0, dom_1.createElement)(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[(0, utils_1.int)((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = (0, dom_1.createElement)(\"div\", \"flatpickr-weekdays\");\n else\n (0, dom_1.clearNode)(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = (0, dom_1.createElement)(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = __spreadArrays(self.l10n.weekdays.shorthand);\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = __spreadArrays(weekdays.splice(firstDayOfWeek, weekdays.length), weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n <span class='flatpickr-weekday'>\\n \" + weekdays.join(\"</span><span class='flatpickr-weekday'>\") + \"\\n </span>\\n \";\n }\n }\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = (0, dom_1.createElement)(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild((0, dom_1.createElement)(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = (0, dom_1.createElement)(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers,\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) {\n isOffset = true;\n }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) {\n triggerChangeEvent = true;\n }\n if (toInitial === void 0) {\n toInitial = true;\n }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n if (self.config.enableTime === true) {\n var _a = (0, dates_1.getDefaultHours)(self.config), hours = _a.hours, minutes = _a.minutes, seconds = _a.seconds;\n setHours(hours, minutes, seconds);\n }\n self.redraw();\n if (triggerChangeEvent)\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n self._handlers[i].remove();\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = (0, dom_1.getEventTarget)(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.config.allowInput) {\n self.setDate(self._input.value, false, self.config.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined &&\n self.input.value !== \"\" &&\n self.input.value !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config &&\n self.config.mode === \"range\" &&\n self.selectedDates.length === 1)\n self.clear(false);\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n var _a;\n if (timeless === void 0) {\n timeless = true;\n }\n var dateToCheck = self.parseDate(date, undefined, timeless);\n if ((self.config.minDate &&\n dateToCheck &&\n (0, dates_1.compareDates)(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n (0, dates_1.compareDates)(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (!self.config.enable && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = !!self.config.enable, array = (_a = self.config.enable) !== null && _a !== void 0 ? _a : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck))\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n return bool;\n else if (typeof d === \"string\") {\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n elem.className.indexOf(\"flatpickr-disabled\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onBlur(e) {\n var isInput = e.target === self._input;\n var valueChanged = self._input.value.trimEnd() !== getDateStr();\n if (isInput &&\n valueChanged &&\n !(e.relatedTarget && isCalendarElem(e.relatedTarget))) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n }\n }\n function onKeyDown(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n var isInput = self.config.wrap\n ? element.contains(eventTarget)\n : eventTarget === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, eventTarget === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n self.close();\n return eventTarget.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(eventTarget) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(eventTarget);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27:\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n var activeElement = getClosestActiveElement();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (activeElement && isInView(activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer &&\n eventTarget.$i !== undefined) ||\n eventTarget === self.input ||\n eventTarget === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (eventTarget === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(eventTarget);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(eventTarget) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(eventTarget)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem, cellClass) {\n if (cellClass === void 0) {\n cellClass = \"flatpickr-day\";\n }\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(cellClass) ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += dates_1.duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n var hoverableCells = Array.from(self.rContainer.querySelectorAll(\"*:nth-child(-n+\" + self.config.showMonths + \") > .\" + cellClass));\n hoverableCells.forEach(function (dayElem) {\n var date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return;\n }\n else if (containsDisabled && !outOfRange)\n return;\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n (0, dates_1.isBetween)(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n });\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) {\n positionElement = self._positionElement;\n }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n var eventTarget = (0, dom_1.getEventTarget)(e);\n if (eventTarget) {\n eventTarget.blur();\n }\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n else if (self._input.disabled || self.config.inline) {\n return;\n }\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"allowInvalidPreload\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign(__assign({}, JSON.parse(JSON.stringify(element.dataset || {}))), instanceConfig);\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n },\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n },\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || options_1.defaults.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || options_1.defaults.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\"),\n });\n var minMaxTimeSetter = function (type) {\n return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n };\n };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\"),\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\"),\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n options_1.HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = (0, utils_1.arrayify)(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (options_1.HOOKS.indexOf(key) > -1) {\n self.config[key] = (0, utils_1.arrayify)(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n getInputElem().className + \" \" + self.config.altInputClass;\n }\n triggerEvent(\"onParseConfig\");\n }\n function getInputElem() {\n return self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign(__assign({}, flatpickr.l10ns.default), (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n formatting_1.tokenRegex.D = \"(\" + self.l10n.weekdays.shorthand.join(\"|\") + \")\";\n formatting_1.tokenRegex.l = \"(\" + self.l10n.weekdays.longhand.join(\"|\") + \")\";\n formatting_1.tokenRegex.M = \"(\" + self.l10n.months.shorthand.join(\"|\") + \")\";\n formatting_1.tokenRegex.F = \"(\" + self.l10n.months.longhand.join(\"|\") + \")\";\n formatting_1.tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign(__assign({}, instanceConfig), JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = (0, dates_1.createDateFormatter)(self);\n self.parseDate = (0, dates_1.createDateParser)({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (typeof self.config.position === \"function\") {\n return void self.config.position(self, customPositionElement);\n }\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowTop\", !showOnTop);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset + inputBounds.left;\n var isCenter = false;\n var isRight = false;\n if (configPosHorizontal === \"center\") {\n left -= (calendarWidth - inputBounds.width) / 2;\n isCenter = true;\n }\n else if (configPosHorizontal === \"right\") {\n left -= calendarWidth - inputBounds.width;\n isRight = true;\n }\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowLeft\", !isCenter && !isRight);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowCenter\", isCenter);\n (0, dom_1.toggleClass)(self.calendarContainer, \"arrowRight\", isRight);\n var right = window.document.body.offsetWidth -\n (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n (0, dom_1.toggleClass)(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = getDocumentStyleSheet();\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n (0, dom_1.toggleClass)(self.calendarContainer, \"rightMost\", false);\n (0, dom_1.toggleClass)(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function getDocumentStyleSheet() {\n var editableSheet = null;\n for (var i = 0; i < document.styleSheets.length; i++) {\n var sheet = document.styleSheets[i];\n if (!sheet.cssRules)\n continue;\n try {\n sheet.cssRules;\n }\n catch (err) {\n continue;\n }\n editableSheet = sheet;\n break;\n }\n return editableSheet != null ? editableSheet : createStyleSheet();\n }\n function createStyleSheet() {\n var style = document.createElement(\"style\");\n document.head.appendChild(style);\n return style.sheet;\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n buildMonthSwitch();\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = (0, dom_1.findParent)((0, dom_1.getEventTarget)(e), isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n if ((0, dates_1.compareDates)(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate],\n positionElement: [updatePositionElement],\n clickOpens: [\n function () {\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"click\", self.open);\n }\n else {\n self._input.removeEventListener(\"focus\", self.open);\n self._input.removeEventListener(\"click\", self.open);\n }\n },\n ],\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (options_1.HOOKS.indexOf(option) > -1)\n self.config[option] = (0, utils_1.arrayify)(value);\n }\n self.redraw();\n updateValue(true);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = (self.config.allowInvalidPreload\n ? dates\n : dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); }));\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) {\n triggerChange = false;\n }\n if (format === void 0) {\n format = self.config.dateFormat;\n }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate(undefined, triggerChange);\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined),\n };\n return rule;\n })\n .filter(function (x) { return x; });\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n }\n function setupInputs() {\n self.input = getInputElem();\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n self.altInput = (0, dom_1.createElement)(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n updatePositionElement();\n }\n function updatePositionElement() {\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = (0, dom_1.createElement)(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n if (self.input.getAttribute(\"step\"))\n self.mobileInput.step = String(self.input.getAttribute(\"step\"));\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate((0, dom_1.getEventTarget)(e).value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n var selectedDate = self.selectedDates[i];\n if (selectedDate instanceof Date &&\n (0, dates_1.compareDates)(selectedDate, date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return ((0, dates_1.compareDates)(date, self.selectedDates[0]) >= 0 &&\n (0, dates_1.compareDates)(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n (0, formatting_1.monthToStr)(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(specificFormat) {\n var format = specificFormat ||\n (self.config.altInput ? self.config.altFormat : self.config.dateFormat);\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n function updateValue(triggerChange) {\n if (triggerChange === void 0) {\n triggerChange = true;\n }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var eventTarget = (0, dom_1.getEventTarget)(e);\n var isPrevMonth = self.prevMonthNav.contains(eventTarget);\n var isNextMonth = self.nextMonthNav.contains(eventTarget);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(eventTarget) >= 0) {\n eventTarget.select();\n }\n else if (eventTarget.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (eventTarget.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", eventTarget = (0, dom_1.getEventTarget)(e), input = eventTarget;\n if (self.amPM !== undefined && eventTarget === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[(0, utils_1.int)(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n (0, utils_1.int)(!isHourElem) +\n ((0, utils_1.int)(isHourElem) && (0, utils_1.int)(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - (0, utils_1.int)(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[(0, utils_1.int)(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = (0, utils_1.pad)(newValue);\n }\n }\n init();\n return self;\n }\n function _flatpickr(nodeList, config) {\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n }\n if (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n var flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n };\n flatpickr.defaultConfig = {};\n flatpickr.l10ns = {\n en: __assign({}, default_1.default),\n default: __assign({}, default_1.default),\n };\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns.default = __assign(__assign({}, flatpickr.l10ns.default), l10n);\n };\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign(__assign({}, flatpickr.defaultConfig), config);\n };\n flatpickr.parseDate = (0, dates_1.createDateParser)({});\n flatpickr.formatDate = (0, dates_1.createDateFormatter)({});\n flatpickr.compareDates = dates_1.compareDates;\n if (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n }\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n exports.default = flatpickr;\n}\n","/* flatpickr/dist/esm/types/options.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n exports.HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n ];\n exports.defaults = {\n _disable: [],\n allowInput: false,\n allowInvalidPreload: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n autoFillDefaultTime: true,\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n var week1 = new Date(date.getFullYear(), 0, 4);\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M13.207 8.472l-7.854 7.854-0.707-0.707 7.146-7.146-7.146-7.148 0.707-0.707 7.854 7.854z' /></svg>\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"<svg version='1.1' xmlns='http://www.w3.org/2000/svg' xmlns:xlink='http://www.w3.org/1999/xlink' viewBox='0 0 17 17'><g></g><path d='M5.207 8.471l7.146 7.147-0.707 0.707-7.853-7.854 7.854-7.853 0.707 0.707-7.147 7.146z' /></svg>\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false,\n };\n}\n","/* flatpickr/dist/esm/l10n/default.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n exports.english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n monthAriaLabel: \"Month\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false,\n };\n exports.default = exports.english;\n}\n","/* flatpickr/dist/esm/utils/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var pad = function (number, length) {\n if (length === void 0) {\n length = 2;\n }\n return (\"000\" + number).slice(length * -1);\n };\n exports.pad = pad;\n var int = function (bool) { return (bool === true ? 1 : 0); };\n exports.int = int;\n function debounce(fn, wait) {\n var t;\n return function () {\n var _this = this;\n var args = arguments;\n clearTimeout(t);\n t = setTimeout(function () { return fn.apply(_this, args); }, wait);\n };\n }\n exports.debounce = debounce;\n var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n };\n exports.arrayify = arrayify;\n}\n","/* flatpickr/dist/esm/utils/dom.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n }\n exports.toggleClass = toggleClass;\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n }\n exports.createElement = createElement;\n function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n }\n exports.clearNode = clearNode;\n function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined;\n }\n exports.findParent = findParent;\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n exports.createNumberInput = createNumberInput;\n function getEventTarget(event) {\n try {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n catch (error) {\n return event.target;\n }\n }\n exports.getEventTarget = getEventTarget;\n}\n","/* flatpickr/dist/esm/utils/dates.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const formatting_1 = require(\"3d14787c35\") /* ./formatting */;\n const options_1 = require(\"651d495396\") /* ../types/options */;\n const default_1 = require(\"3bfa124fda\") /* ../l10n/default */;\n var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? options_1.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? default_1.english : _c, _d = _a.isMobile, isMobile = _d === void 0 ? false : _d;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined && !isMobile) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formatting_1.formats[c] && arr[i - 1] !== \"\\\\\"\n ? formatting_1.formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n };\n exports.createDateFormatter = createDateFormatter;\n var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? options_1.defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? default_1.english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined)\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n var format = givenFormat || (config || options_1.defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (config && config.parseDate) {\n parsedDate = config.parseDate(date, format);\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr)) {\n parsedDate = new Date(date);\n }\n else {\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token = format[i];\n var isBackSlash = token === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (formatting_1.tokenRegex[token] && !escaped) {\n regexStr += formatting_1.tokenRegex[token];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: formatting_1.revFormat[token],\n val: match[++matchIndex],\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\";\n }\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n exports.createDateParser = createDateParser;\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) {\n timeless = true;\n }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n }\n exports.compareDates = compareDates;\n function compareTimes(date1, date2) {\n return (3600 * (date1.getHours() - date2.getHours()) +\n 60 * (date1.getMinutes() - date2.getMinutes()) +\n date1.getSeconds() -\n date2.getSeconds());\n }\n exports.compareTimes = compareTimes;\n var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n exports.isBetween = isBetween;\n var calculateSecondsSinceMidnight = function (hours, minutes, seconds) {\n return hours * 3600 + minutes * 60 + seconds;\n };\n exports.calculateSecondsSinceMidnight = calculateSecondsSinceMidnight;\n var parseSeconds = function (secondsSinceMidnight) {\n var hours = Math.floor(secondsSinceMidnight / 3600), minutes = (secondsSinceMidnight - hours * 3600) / 60;\n return [hours, minutes, secondsSinceMidnight - hours * 3600 - minutes * 60];\n };\n exports.parseSeconds = parseSeconds;\n exports.duration = {\n DAY: 86400000,\n };\n function getDefaultHours(config) {\n var hours = config.defaultHour;\n var minutes = config.defaultMinute;\n var seconds = config.defaultSeconds;\n if (config.minDate !== undefined) {\n var minHour = config.minDate.getHours();\n var minMinutes = config.minDate.getMinutes();\n var minSeconds = config.minDate.getSeconds();\n if (hours < minHour) {\n hours = minHour;\n }\n if (hours === minHour && minutes < minMinutes) {\n minutes = minMinutes;\n }\n if (hours === minHour && minutes === minMinutes && seconds < minSeconds)\n seconds = config.minDate.getSeconds();\n }\n if (config.maxDate !== undefined) {\n var maxHr = config.maxDate.getHours();\n var maxMinutes = config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = config.maxDate.getSeconds();\n }\n return { hours: hours, minutes: minutes, seconds: seconds };\n }\n exports.getDefaultHours = getDefaultHours;\n}\n","/* flatpickr/dist/esm/utils/formatting.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const utils_1 = require(\"15458073ce\") /* ../utils */;\n var doNothing = function () { return undefined; };\n var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\n exports.monthToStr = monthToStr;\n exports.revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * (0, utils_1.int)(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours((dateObj.getHours() >= 12 ? 12 : 0) + parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n },\n };\n exports.tokenRegex = {\n D: \"\",\n F: \"\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\",\n };\n exports.formats = {\n Z: function (date) { return date.toISOString(); },\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[exports.formats.w(date, locale, options)];\n },\n F: function (date, locale, options) {\n return (0, exports.monthToStr)(exports.formats.n(date, locale, options) - 1, false, locale);\n },\n G: function (date, locale, options) {\n return (0, utils_1.pad)(exports.formats.h(date, locale, options));\n },\n H: function (date) { return (0, utils_1.pad)(date.getHours()); },\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n K: function (date, locale) { return locale.amPM[(0, utils_1.int)(date.getHours() > 11)]; },\n M: function (date, locale) {\n return (0, exports.monthToStr)(date.getMonth(), true, locale);\n },\n S: function (date) { return (0, utils_1.pad)(date.getSeconds()); },\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n Y: function (date) { return (0, utils_1.pad)(date.getFullYear(), 4); },\n d: function (date) { return (0, utils_1.pad)(date.getDate()); },\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n i: function (date) { return (0, utils_1.pad)(date.getMinutes()); },\n j: function (date) { return date.getDate(); },\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n m: function (date) { return (0, utils_1.pad)(date.getMonth() + 1); },\n n: function (date) { return date.getMonth() + 1; },\n s: function (date) { return date.getSeconds(); },\n u: function (date) { return date.getTime(); },\n w: function (date) { return date.getDay(); },\n y: function (date) { return String(date.getFullYear()).substring(2); },\n };\n}\n","/* flatpickr/dist/esm/utils/polyfills.js */ function _(require, module, exports, __esModule, __esExport) {\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n }\n}\n","/* models/deckgl.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n const tooltips_1 = require(\"9588ab7c9e\") /* ./tooltips */;\n const constants_1 = tslib_1.__importDefault(require(\"093eb75864\") /* @luma.gl/constants */);\n function extractClasses() {\n // Get classes for registration from standalone deck.gl\n const classesDict = {};\n const deck = window.deck;\n const classes = Object.keys(deck).filter(x => x.charAt(0) === x.charAt(0).toUpperCase());\n for (const cls of classes) {\n classesDict[cls] = deck[cls];\n }\n return classesDict;\n }\n class DeckGLPlotView extends layout_dom_1.LayoutDOMView {\n connect_signals() {\n super.connect_signals();\n const { data, mapbox_api_key, tooltip, layers, initialViewState, data_sources } = this.model.properties;\n this.on_change([mapbox_api_key, tooltip], () => this.render());\n this.on_change([data, initialViewState], () => this.updateDeck());\n this.on_change([layers], () => this._update_layers());\n this.on_change([data_sources], () => this._connect_sources(true));\n this._layer_map = {};\n this._connected = [];\n this._connect_sources();\n }\n remove() {\n this.deckGL.finalize();\n super.remove();\n }\n _update_layers() {\n this._layer_map = {};\n this._update_data(true);\n }\n _connect_sources(render = false) {\n for (const cds of this.model.data_sources) {\n if (this._connected.indexOf(cds) < 0) {\n this.connect(cds.properties.data.change, () => this._update_data(true));\n this._connected.push(cds);\n }\n }\n this._update_data(render);\n }\n initialize() {\n super.initialize();\n if (window.deck.JSONConverter) {\n const { CSVLoader, Tiles3DLoader } = window.loaders;\n window.loaders.registerLoaders([Tiles3DLoader, CSVLoader]);\n const jsonConverterConfiguration = {\n classes: extractClasses(),\n // Will be resolved as `<enum-name>.<enum-value>`\n enumerations: {\n COORDINATE_SYSTEM: window.deck.COORDINATE_SYSTEM,\n GL: constants_1.default\n },\n // Constants that should be resolved with the provided values by JSON converter\n constants: {\n Tiles3DLoader\n }\n };\n this.jsonConverter = new window.deck.JSONConverter({\n configuration: jsonConverterConfiguration\n });\n }\n }\n _update_data(render = true) {\n let n = 0;\n for (const layer of this.model.layers) {\n let cds;\n n += 1;\n if ((n - 1) in this._layer_map) {\n cds = this.model.data_sources[this._layer_map[n - 1]];\n }\n else if (typeof layer.data != \"number\")\n continue;\n else {\n this._layer_map[n - 1] = layer.data;\n cds = this.model.data_sources[layer.data];\n }\n layer.data = (0, data_1.transform_cds_to_records)(cds);\n }\n if (render)\n this.updateDeck();\n }\n _on_click_event(event) {\n const click_state = {\n coordinate: event.coordinate,\n lngLat: event.coordinate,\n index: event.index\n };\n if (event.layer)\n click_state.layer = event.layer.id;\n this.model.clickState = click_state;\n }\n _on_hover_event(event) {\n if (event.coordinate == null)\n return;\n const hover_state = {\n coordinate: event.coordinate,\n lngLat: event.coordinate,\n index: event.index\n };\n if (event.layer)\n hover_state.layer = event.layer.id;\n this.model.hoverState = hover_state;\n }\n _on_viewState_event(event) {\n const view_state = Object.assign({}, event.viewState);\n delete view_state.normalize;\n for (const p in view_state) {\n if (p.startsWith('transition'))\n delete view_state[p];\n }\n const viewport = new window.deck.WebMercatorViewport(view_state);\n view_state.nw = viewport.unproject([0, 0]);\n view_state.se = viewport.unproject([viewport.width, viewport.height]);\n this.model.viewState = view_state;\n }\n get child_models() {\n return [];\n }\n getData() {\n const view_timeout = this.model.throttle['view'] || 200;\n const hover_timeout = this.model.throttle['hover'] || 100;\n const view_cb = (0, debounce_1.debounce)((event) => this._on_viewState_event(event), view_timeout, false);\n const hover_cb = (0, debounce_1.debounce)((event) => this._on_hover_event(event), hover_timeout, false);\n const data = Object.assign(Object.assign({}, this.model.data), { layers: this.model.layers, initialViewState: this.model.initialViewState, onViewStateChange: view_cb, onClick: (event) => this._on_click_event(event), onHover: hover_cb });\n return data;\n }\n updateDeck() {\n if (!this.deckGL) {\n this.render();\n return;\n }\n const data = this.getData();\n if (window.deck.updateDeck) {\n window.deck.updateDeck(data, this.deckGL);\n }\n else {\n const results = this.jsonConverter.convert(data);\n this.deckGL.setProps(results);\n }\n }\n createDeck({ mapboxApiKey, container, jsonInput, tooltip }) {\n let deckgl;\n try {\n const props = this.jsonConverter.convert(jsonInput);\n const getTooltip = (0, tooltips_1.makeTooltip)(tooltip, props.layers);\n deckgl = new window.deck.DeckGL(Object.assign(Object.assign({}, props), { map: window.mapboxgl, mapboxApiAccessToken: mapboxApiKey, container,\n getTooltip, width: '100%', height: '100%' }));\n }\n catch (err) {\n console.error(err);\n }\n return deckgl;\n }\n render() {\n super.render();\n const container = (0, dom_1.div)({ class: \"deckgl\" });\n const MAPBOX_API_KEY = this.model.mapbox_api_key;\n const tooltip = this.model.tooltip;\n const data = this.getData();\n if (window.deck.createDeck) {\n this.deckGL = window.deck.createDeck({\n mapboxApiKey: MAPBOX_API_KEY,\n container: container,\n jsonInput: data,\n tooltip\n });\n }\n else {\n this.deckGL = this.createDeck({\n mapboxApiKey: MAPBOX_API_KEY,\n container: container,\n jsonInput: data,\n tooltip\n });\n }\n this.shadow_el.appendChild(container);\n }\n after_layout() {\n super.after_layout();\n this.deckGL.redraw(true);\n }\n }\n exports.DeckGLPlotView = DeckGLPlotView;\n DeckGLPlotView.__name__ = \"DeckGLPlotView\";\n class DeckGLPlot extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.DeckGLPlot = DeckGLPlot;\n _a = DeckGLPlot;\n DeckGLPlot.__name__ = \"DeckGLPlot\";\n DeckGLPlot.__module__ = \"panel.models.deckgl\";\n (() => {\n _a.prototype.default_view = DeckGLPlotView;\n _a.define(({ Any, Array, String, Ref }) => ({\n data: [Any],\n data_sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n clickState: [Any, {}],\n hoverState: [Any, {}],\n initialViewState: [Any, {}],\n layers: [Array(Any), []],\n mapbox_api_key: [String, ''],\n throttle: [Any, {}],\n tooltip: [Any, true],\n viewState: [Any, {}],\n }));\n _a.override({\n height: 400,\n width: 600\n });\n })();\n}\n","/* models/tooltips.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /*\n This file was adapted from https://github.com/uber/deck.gl/ the LICENSE\n below is preserved to comply with the original license.\n \n Copyright (c) 2015 - 2017 Uber Technologies, Inc.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in\n all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n THE SOFTWARE.\n */\n /* global document */\n let lastPickedObject;\n let lastTooltip;\n const DEFAULT_STYLE = {\n fontFamily: '\"Helvetica Neue\", Helvetica, Arial, sans-serif',\n display: 'flex',\n flex: 'wrap',\n maxWidth: '500px',\n flexDirection: 'column',\n zIndex: 2\n };\n function getDiv() {\n return document.createElement('div');\n }\n function getTooltipDefault(pickedInfo) {\n if (!pickedInfo.picked) {\n return null;\n }\n if (pickedInfo.object === lastPickedObject) {\n return lastTooltip;\n }\n const tooltip = {\n html: tabularize(pickedInfo.object),\n style: DEFAULT_STYLE\n };\n lastTooltip = tooltip;\n lastPickedObject = pickedInfo.object;\n return tooltip;\n }\n exports.getTooltipDefault = getTooltipDefault;\n const EXCLUDES = new Set(['position', 'index']);\n function tabularize(json) {\n // Turns a JSON object of picked info into HTML for a tooltip\n const dataTable = getDiv();\n // Creates rows of two columns for the tooltip\n for (const key in json) {\n if (EXCLUDES.has(key)) {\n continue; // eslint-disable-line\n }\n const header = getDiv();\n header.className = 'header';\n header.textContent = key;\n const valueElement = getDiv();\n valueElement.className = 'value';\n valueElement.textContent = toText(json[key]);\n const row = getDiv();\n setStyles(row, header, valueElement);\n row.appendChild(header);\n row.appendChild(valueElement);\n dataTable.appendChild(row);\n }\n return dataTable.innerHTML;\n }\n exports.tabularize = tabularize;\n function setStyles(row, header, value) {\n // Set default tooltip style\n Object.assign(header.style, {\n fontWeight: 700,\n marginRight: '10px',\n flex: '1 1 0%'\n });\n Object.assign(value.style, {\n flex: 'none',\n maxWidth: '250px',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n textOverflow: 'ellipsis'\n });\n Object.assign(row.style, {\n display: 'flex',\n flexDirection: 'row',\n justifyContent: 'space-between',\n alignItems: 'stretch'\n });\n }\n function toText(jsonValue) {\n // Set contents of table value, trimming for certain types of data\n let text;\n if (Array.isArray(jsonValue) && jsonValue.length > 4) {\n text = `Array<${jsonValue.length}>`;\n }\n else if (typeof jsonValue === 'string') {\n text = jsonValue;\n }\n else if (typeof jsonValue === 'number') {\n text = String(jsonValue);\n }\n else {\n try {\n text = JSON.stringify(jsonValue);\n }\n catch (err) {\n text = '<Non-Serializable Object>';\n }\n }\n const MAX_LENGTH = 50;\n if (text.length > MAX_LENGTH) {\n text = text.slice(0, MAX_LENGTH);\n }\n return text;\n }\n exports.toText = toText;\n function substituteIn(template, json) {\n let output = template;\n for (const key in json) {\n if (typeof json[key] === 'object') {\n for (const subkey in json[key])\n output = output.replace(`{${key}.${subkey}}`, json[key][subkey]);\n }\n output = output.replace(`{${key}}`, json[key]);\n }\n return output;\n }\n exports.substituteIn = substituteIn;\n function makeTooltip(tooltips, layers) {\n /*\n * If explicitly no tooltip passed by user, return null\n * If a JSON object passed, return a tooltip based on that object\n * We expect the user has passed a string template that will take pickedInfo keywords\n * If a boolean passed, return the default tooltip\n */\n if (!tooltips) {\n return null;\n }\n let per_layer = false;\n const layer_tooltips = {};\n for (let i = 0; i < layers.length; i++) {\n const layer = layers[i];\n const layer_id = layer.id;\n if (typeof tooltips !== \"boolean\" && (i.toString() in tooltips || layer_id in tooltips)) {\n layer_tooltips[layer_id] = layer_id in tooltips ? tooltips[layer_id] : tooltips[i.toString()];\n per_layer = true;\n }\n }\n if (tooltips.html || tooltips.text || per_layer) {\n return (pickedInfo) => {\n if (!pickedInfo.picked) {\n return null;\n }\n const tooltip = (per_layer) ? layer_tooltips[pickedInfo.layer.id] : tooltips;\n if (tooltip == null)\n return;\n else if (typeof tooltip === \"boolean\")\n return tooltip ? getTooltipDefault(pickedInfo) : null;\n const formattedTooltip = {\n style: tooltip.style || DEFAULT_STYLE\n };\n if (tooltip.html) {\n formattedTooltip.html = substituteIn(tooltip.html, pickedInfo.object);\n }\n else {\n formattedTooltip.text = substituteIn(tooltip.text, pickedInfo.object);\n }\n return formattedTooltip;\n };\n }\n return getTooltipDefault;\n }\n exports.makeTooltip = makeTooltip;\n}\n","/* @luma.gl/constants/src/index.js */ function _(require, module, exports, __esModule, __esExport) {\n // GL constants, copied from Mozilla documentation\n // https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants\n // Standard WebGL 1 constants\n // These constants are defined on the WebGLRenderingContext interface.\n /* eslint-disable key-spacing, max-len, no-inline-comments, camelcase */\n // eslint-disable-next-line\n module.exports = {\n // Clearing buffers\n // Constants passed to clear() to clear buffer masks.\n DEPTH_BUFFER_BIT: 0x00000100,\n STENCIL_BUFFER_BIT: 0x00000400,\n COLOR_BUFFER_BIT: 0x00004000,\n // Rendering primitives\n // Constants passed to drawElements() or drawArrays() to specify what kind of primitive to render.\n POINTS: 0x0000,\n LINES: 0x0001,\n LINE_LOOP: 0x0002,\n LINE_STRIP: 0x0003,\n TRIANGLES: 0x0004,\n TRIANGLE_STRIP: 0x0005,\n TRIANGLE_FAN: 0x0006,\n // Blending modes\n // Constants passed to blendFunc() or blendFuncSeparate() to specify the blending mode (for both, RBG and alpha, or separately).\n ZERO: 0,\n ONE: 1,\n SRC_COLOR: 0x0300,\n ONE_MINUS_SRC_COLOR: 0x0301,\n SRC_ALPHA: 0x0302,\n ONE_MINUS_SRC_ALPHA: 0x0303,\n DST_ALPHA: 0x0304,\n ONE_MINUS_DST_ALPHA: 0x0305,\n DST_COLOR: 0x0306,\n ONE_MINUS_DST_COLOR: 0x0307,\n SRC_ALPHA_SATURATE: 0x0308,\n CONSTANT_COLOR: 0x8001,\n ONE_MINUS_CONSTANT_COLOR: 0x8002,\n CONSTANT_ALPHA: 0x8003,\n ONE_MINUS_CONSTANT_ALPHA: 0x8004,\n // Blending equations\n // Constants passed to blendEquation() or blendEquationSeparate() to control\n // how the blending is calculated (for both, RBG and alpha, or separately).\n FUNC_ADD: 0x8006,\n FUNC_SUBTRACT: 0x800a,\n FUNC_REVERSE_SUBTRACT: 0x800b,\n // Getting GL parameter information\n // Constants passed to getParameter() to specify what information to return.\n BLEND_EQUATION: 0x8009,\n BLEND_EQUATION_RGB: 0x8009,\n BLEND_EQUATION_ALPHA: 0x883d,\n BLEND_DST_RGB: 0x80c8,\n BLEND_SRC_RGB: 0x80c9,\n BLEND_DST_ALPHA: 0x80ca,\n BLEND_SRC_ALPHA: 0x80cb,\n BLEND_COLOR: 0x8005,\n ARRAY_BUFFER_BINDING: 0x8894,\n ELEMENT_ARRAY_BUFFER_BINDING: 0x8895,\n LINE_WIDTH: 0x0b21,\n ALIASED_POINT_SIZE_RANGE: 0x846d,\n ALIASED_LINE_WIDTH_RANGE: 0x846e,\n CULL_FACE_MODE: 0x0b45,\n FRONT_FACE: 0x0b46,\n DEPTH_RANGE: 0x0b70,\n DEPTH_WRITEMASK: 0x0b72,\n DEPTH_CLEAR_VALUE: 0x0b73,\n DEPTH_FUNC: 0x0b74,\n STENCIL_CLEAR_VALUE: 0x0b91,\n STENCIL_FUNC: 0x0b92,\n STENCIL_FAIL: 0x0b94,\n STENCIL_PASS_DEPTH_FAIL: 0x0b95,\n STENCIL_PASS_DEPTH_PASS: 0x0b96,\n STENCIL_REF: 0x0b97,\n STENCIL_VALUE_MASK: 0x0b93,\n STENCIL_WRITEMASK: 0x0b98,\n STENCIL_BACK_FUNC: 0x8800,\n STENCIL_BACK_FAIL: 0x8801,\n STENCIL_BACK_PASS_DEPTH_FAIL: 0x8802,\n STENCIL_BACK_PASS_DEPTH_PASS: 0x8803,\n STENCIL_BACK_REF: 0x8ca3,\n STENCIL_BACK_VALUE_MASK: 0x8ca4,\n STENCIL_BACK_WRITEMASK: 0x8ca5,\n VIEWPORT: 0x0ba2,\n SCISSOR_BOX: 0x0c10,\n COLOR_CLEAR_VALUE: 0x0c22,\n COLOR_WRITEMASK: 0x0c23,\n UNPACK_ALIGNMENT: 0x0cf5,\n PACK_ALIGNMENT: 0x0d05,\n MAX_TEXTURE_SIZE: 0x0d33,\n MAX_VIEWPORT_DIMS: 0x0d3a,\n SUBPIXEL_BITS: 0x0d50,\n RED_BITS: 0x0d52,\n GREEN_BITS: 0x0d53,\n BLUE_BITS: 0x0d54,\n ALPHA_BITS: 0x0d55,\n DEPTH_BITS: 0x0d56,\n STENCIL_BITS: 0x0d57,\n POLYGON_OFFSET_UNITS: 0x2a00,\n POLYGON_OFFSET_FACTOR: 0x8038,\n TEXTURE_BINDING_2D: 0x8069,\n SAMPLE_BUFFERS: 0x80a8,\n SAMPLES: 0x80a9,\n SAMPLE_COVERAGE_VALUE: 0x80aa,\n SAMPLE_COVERAGE_INVERT: 0x80ab,\n COMPRESSED_TEXTURE_FORMATS: 0x86a3,\n VENDOR: 0x1f00,\n RENDERER: 0x1f01,\n VERSION: 0x1f02,\n IMPLEMENTATION_COLOR_READ_TYPE: 0x8b9a,\n IMPLEMENTATION_COLOR_READ_FORMAT: 0x8b9b,\n BROWSER_DEFAULT_WEBGL: 0x9244,\n // Buffers\n // Constants passed to bufferData(), bufferSubData(), bindBuffer(), or\n // getBufferParameter().\n STATIC_DRAW: 0x88e4,\n STREAM_DRAW: 0x88e0,\n DYNAMIC_DRAW: 0x88e8,\n ARRAY_BUFFER: 0x8892,\n ELEMENT_ARRAY_BUFFER: 0x8893,\n BUFFER_SIZE: 0x8764,\n BUFFER_USAGE: 0x8765,\n // Vertex attributes\n // Constants passed to getVertexAttrib().\n CURRENT_VERTEX_ATTRIB: 0x8626,\n VERTEX_ATTRIB_ARRAY_ENABLED: 0x8622,\n VERTEX_ATTRIB_ARRAY_SIZE: 0x8623,\n VERTEX_ATTRIB_ARRAY_STRIDE: 0x8624,\n VERTEX_ATTRIB_ARRAY_TYPE: 0x8625,\n VERTEX_ATTRIB_ARRAY_NORMALIZED: 0x886a,\n VERTEX_ATTRIB_ARRAY_POINTER: 0x8645,\n VERTEX_ATTRIB_ARRAY_BUFFER_BINDING: 0x889f,\n // Culling\n // Constants passed to cullFace().\n CULL_FACE: 0x0b44,\n FRONT: 0x0404,\n BACK: 0x0405,\n FRONT_AND_BACK: 0x0408,\n // Enabling and disabling\n // Constants passed to enable() or disable().\n BLEND: 0x0be2,\n DEPTH_TEST: 0x0b71,\n DITHER: 0x0bd0,\n POLYGON_OFFSET_FILL: 0x8037,\n SAMPLE_ALPHA_TO_COVERAGE: 0x809e,\n SAMPLE_COVERAGE: 0x80a0,\n SCISSOR_TEST: 0x0c11,\n STENCIL_TEST: 0x0b90,\n // Errors\n // Constants returned from getError().\n NO_ERROR: 0,\n INVALID_ENUM: 0x0500,\n INVALID_VALUE: 0x0501,\n INVALID_OPERATION: 0x0502,\n OUT_OF_MEMORY: 0x0505,\n CONTEXT_LOST_WEBGL: 0x9242,\n // Front face directions\n // Constants passed to frontFace().\n CW: 0x0900,\n CCW: 0x0901,\n // Hints\n // Constants passed to hint()\n DONT_CARE: 0x1100,\n FASTEST: 0x1101,\n NICEST: 0x1102,\n GENERATE_MIPMAP_HINT: 0x8192,\n // Data types\n BYTE: 0x1400,\n UNSIGNED_BYTE: 0x1401,\n SHORT: 0x1402,\n UNSIGNED_SHORT: 0x1403,\n INT: 0x1404,\n UNSIGNED_INT: 0x1405,\n FLOAT: 0x1406,\n DOUBLE: 0x140a,\n // Pixel formats\n DEPTH_COMPONENT: 0x1902,\n ALPHA: 0x1906,\n RGB: 0x1907,\n RGBA: 0x1908,\n LUMINANCE: 0x1909,\n LUMINANCE_ALPHA: 0x190a,\n // Pixel types\n // UNSIGNED_BYTE: 0x1401,\n UNSIGNED_SHORT_4_4_4_4: 0x8033,\n UNSIGNED_SHORT_5_5_5_1: 0x8034,\n UNSIGNED_SHORT_5_6_5: 0x8363,\n // Shaders\n // Constants passed to createShader() or getShaderParameter()\n FRAGMENT_SHADER: 0x8b30,\n VERTEX_SHADER: 0x8b31,\n COMPILE_STATUS: 0x8b81,\n DELETE_STATUS: 0x8b80,\n LINK_STATUS: 0x8b82,\n VALIDATE_STATUS: 0x8b83,\n ATTACHED_SHADERS: 0x8b85,\n ACTIVE_ATTRIBUTES: 0x8b89,\n ACTIVE_UNIFORMS: 0x8b86,\n MAX_VERTEX_ATTRIBS: 0x8869,\n MAX_VERTEX_UNIFORM_VECTORS: 0x8dfb,\n MAX_VARYING_VECTORS: 0x8dfc,\n MAX_COMBINED_TEXTURE_IMAGE_UNITS: 0x8b4d,\n MAX_VERTEX_TEXTURE_IMAGE_UNITS: 0x8b4c,\n MAX_TEXTURE_IMAGE_UNITS: 0x8872,\n MAX_FRAGMENT_UNIFORM_VECTORS: 0x8dfd,\n SHADER_TYPE: 0x8b4f,\n SHADING_LANGUAGE_VERSION: 0x8b8c,\n CURRENT_PROGRAM: 0x8b8d,\n // Depth or stencil tests\n // Constants passed to depthFunc() or stencilFunc().\n NEVER: 0x0200,\n ALWAYS: 0x0207,\n LESS: 0x0201,\n EQUAL: 0x0202,\n LEQUAL: 0x0203,\n GREATER: 0x0204,\n GEQUAL: 0x0206,\n NOTEQUAL: 0x0205,\n // Stencil actions\n // Constants passed to stencilOp().\n KEEP: 0x1e00,\n REPLACE: 0x1e01,\n INCR: 0x1e02,\n DECR: 0x1e03,\n INVERT: 0x150a,\n INCR_WRAP: 0x8507,\n DECR_WRAP: 0x8508,\n // Textures\n // Constants passed to texParameteri(),\n // texParameterf(), bindTexture(), texImage2D(), and others.\n NEAREST: 0x2600,\n LINEAR: 0x2601,\n NEAREST_MIPMAP_NEAREST: 0x2700,\n LINEAR_MIPMAP_NEAREST: 0x2701,\n NEAREST_MIPMAP_LINEAR: 0x2702,\n LINEAR_MIPMAP_LINEAR: 0x2703,\n TEXTURE_MAG_FILTER: 0x2800,\n TEXTURE_MIN_FILTER: 0x2801,\n TEXTURE_WRAP_S: 0x2802,\n TEXTURE_WRAP_T: 0x2803,\n TEXTURE_2D: 0x0de1,\n TEXTURE: 0x1702,\n TEXTURE_CUBE_MAP: 0x8513,\n TEXTURE_BINDING_CUBE_MAP: 0x8514,\n TEXTURE_CUBE_MAP_POSITIVE_X: 0x8515,\n TEXTURE_CUBE_MAP_NEGATIVE_X: 0x8516,\n TEXTURE_CUBE_MAP_POSITIVE_Y: 0x8517,\n TEXTURE_CUBE_MAP_NEGATIVE_Y: 0x8518,\n TEXTURE_CUBE_MAP_POSITIVE_Z: 0x8519,\n TEXTURE_CUBE_MAP_NEGATIVE_Z: 0x851a,\n MAX_CUBE_MAP_TEXTURE_SIZE: 0x851c,\n // TEXTURE0 - 31 0x84C0 - 0x84DF A texture unit.\n TEXTURE0: 0x84c0,\n ACTIVE_TEXTURE: 0x84e0,\n REPEAT: 0x2901,\n CLAMP_TO_EDGE: 0x812f,\n MIRRORED_REPEAT: 0x8370,\n // Emulation\n TEXTURE_WIDTH: 0x1000,\n TEXTURE_HEIGHT: 0x1001,\n // Uniform types\n FLOAT_VEC2: 0x8b50,\n FLOAT_VEC3: 0x8b51,\n FLOAT_VEC4: 0x8b52,\n INT_VEC2: 0x8b53,\n INT_VEC3: 0x8b54,\n INT_VEC4: 0x8b55,\n BOOL: 0x8b56,\n BOOL_VEC2: 0x8b57,\n BOOL_VEC3: 0x8b58,\n BOOL_VEC4: 0x8b59,\n FLOAT_MAT2: 0x8b5a,\n FLOAT_MAT3: 0x8b5b,\n FLOAT_MAT4: 0x8b5c,\n SAMPLER_2D: 0x8b5e,\n SAMPLER_CUBE: 0x8b60,\n // Shader precision-specified types\n LOW_FLOAT: 0x8df0,\n MEDIUM_FLOAT: 0x8df1,\n HIGH_FLOAT: 0x8df2,\n LOW_INT: 0x8df3,\n MEDIUM_INT: 0x8df4,\n HIGH_INT: 0x8df5,\n // Framebuffers and renderbuffers\n FRAMEBUFFER: 0x8d40,\n RENDERBUFFER: 0x8d41,\n RGBA4: 0x8056,\n RGB5_A1: 0x8057,\n RGB565: 0x8d62,\n DEPTH_COMPONENT16: 0x81a5,\n STENCIL_INDEX: 0x1901,\n STENCIL_INDEX8: 0x8d48,\n DEPTH_STENCIL: 0x84f9,\n RENDERBUFFER_WIDTH: 0x8d42,\n RENDERBUFFER_HEIGHT: 0x8d43,\n RENDERBUFFER_INTERNAL_FORMAT: 0x8d44,\n RENDERBUFFER_RED_SIZE: 0x8d50,\n RENDERBUFFER_GREEN_SIZE: 0x8d51,\n RENDERBUFFER_BLUE_SIZE: 0x8d52,\n RENDERBUFFER_ALPHA_SIZE: 0x8d53,\n RENDERBUFFER_DEPTH_SIZE: 0x8d54,\n RENDERBUFFER_STENCIL_SIZE: 0x8d55,\n FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE: 0x8cd0,\n FRAMEBUFFER_ATTACHMENT_OBJECT_NAME: 0x8cd1,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL: 0x8cd2,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE: 0x8cd3,\n COLOR_ATTACHMENT0: 0x8ce0,\n DEPTH_ATTACHMENT: 0x8d00,\n STENCIL_ATTACHMENT: 0x8d20,\n DEPTH_STENCIL_ATTACHMENT: 0x821a,\n NONE: 0,\n FRAMEBUFFER_COMPLETE: 0x8cd5,\n FRAMEBUFFER_INCOMPLETE_ATTACHMENT: 0x8cd6,\n FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: 0x8cd7,\n FRAMEBUFFER_INCOMPLETE_DIMENSIONS: 0x8cd9,\n FRAMEBUFFER_UNSUPPORTED: 0x8cdd,\n FRAMEBUFFER_BINDING: 0x8ca6,\n RENDERBUFFER_BINDING: 0x8ca7,\n READ_FRAMEBUFFER: 0x8ca8,\n DRAW_FRAMEBUFFER: 0x8ca9,\n MAX_RENDERBUFFER_SIZE: 0x84e8,\n INVALID_FRAMEBUFFER_OPERATION: 0x0506,\n // Pixel storage modes\n // Constants passed to pixelStorei().\n UNPACK_FLIP_Y_WEBGL: 0x9240,\n UNPACK_PREMULTIPLY_ALPHA_WEBGL: 0x9241,\n UNPACK_COLORSPACE_CONVERSION_WEBGL: 0x9243,\n // /////////////////////////////////////////////////////\n // Additional constants defined WebGL 2\n // These constants are defined on the WebGL2RenderingContext interface.\n // All WebGL 1 constants are also available in a WebGL 2 context.\n // /////////////////////////////////////////////////////\n // Getting GL parameter information\n // Constants passed to getParameter()\n // to specify what information to return.\n READ_BUFFER: 0x0c02,\n UNPACK_ROW_LENGTH: 0x0cf2,\n UNPACK_SKIP_ROWS: 0x0cf3,\n UNPACK_SKIP_PIXELS: 0x0cf4,\n PACK_ROW_LENGTH: 0x0d02,\n PACK_SKIP_ROWS: 0x0d03,\n PACK_SKIP_PIXELS: 0x0d04,\n TEXTURE_BINDING_3D: 0x806a,\n UNPACK_SKIP_IMAGES: 0x806d,\n UNPACK_IMAGE_HEIGHT: 0x806e,\n MAX_3D_TEXTURE_SIZE: 0x8073,\n MAX_ELEMENTS_VERTICES: 0x80e8,\n MAX_ELEMENTS_INDICES: 0x80e9,\n MAX_TEXTURE_LOD_BIAS: 0x84fd,\n MAX_FRAGMENT_UNIFORM_COMPONENTS: 0x8b49,\n MAX_VERTEX_UNIFORM_COMPONENTS: 0x8b4a,\n MAX_ARRAY_TEXTURE_LAYERS: 0x88ff,\n MIN_PROGRAM_TEXEL_OFFSET: 0x8904,\n MAX_PROGRAM_TEXEL_OFFSET: 0x8905,\n MAX_VARYING_COMPONENTS: 0x8b4b,\n FRAGMENT_SHADER_DERIVATIVE_HINT: 0x8b8b,\n RASTERIZER_DISCARD: 0x8c89,\n VERTEX_ARRAY_BINDING: 0x85b5,\n MAX_VERTEX_OUTPUT_COMPONENTS: 0x9122,\n MAX_FRAGMENT_INPUT_COMPONENTS: 0x9125,\n MAX_SERVER_WAIT_TIMEOUT: 0x9111,\n MAX_ELEMENT_INDEX: 0x8d6b,\n // Textures\n // Constants passed to texParameteri(),\n // texParameterf(), bindTexture(), texImage2D(), and others.\n RED: 0x1903,\n RGB8: 0x8051,\n RGBA8: 0x8058,\n RGB10_A2: 0x8059,\n TEXTURE_3D: 0x806f,\n TEXTURE_WRAP_R: 0x8072,\n TEXTURE_MIN_LOD: 0x813a,\n TEXTURE_MAX_LOD: 0x813b,\n TEXTURE_BASE_LEVEL: 0x813c,\n TEXTURE_MAX_LEVEL: 0x813d,\n TEXTURE_COMPARE_MODE: 0x884c,\n TEXTURE_COMPARE_FUNC: 0x884d,\n SRGB: 0x8c40,\n SRGB8: 0x8c41,\n SRGB8_ALPHA8: 0x8c43,\n COMPARE_REF_TO_TEXTURE: 0x884e,\n RGBA32F: 0x8814,\n RGB32F: 0x8815,\n RGBA16F: 0x881a,\n RGB16F: 0x881b,\n TEXTURE_2D_ARRAY: 0x8c1a,\n TEXTURE_BINDING_2D_ARRAY: 0x8c1d,\n R11F_G11F_B10F: 0x8c3a,\n RGB9_E5: 0x8c3d,\n RGBA32UI: 0x8d70,\n RGB32UI: 0x8d71,\n RGBA16UI: 0x8d76,\n RGB16UI: 0x8d77,\n RGBA8UI: 0x8d7c,\n RGB8UI: 0x8d7d,\n RGBA32I: 0x8d82,\n RGB32I: 0x8d83,\n RGBA16I: 0x8d88,\n RGB16I: 0x8d89,\n RGBA8I: 0x8d8e,\n RGB8I: 0x8d8f,\n RED_INTEGER: 0x8d94,\n RGB_INTEGER: 0x8d98,\n RGBA_INTEGER: 0x8d99,\n R8: 0x8229,\n RG8: 0x822b,\n R16F: 0x822d,\n R32F: 0x822e,\n RG16F: 0x822f,\n RG32F: 0x8230,\n R8I: 0x8231,\n R8UI: 0x8232,\n R16I: 0x8233,\n R16UI: 0x8234,\n R32I: 0x8235,\n R32UI: 0x8236,\n RG8I: 0x8237,\n RG8UI: 0x8238,\n RG16I: 0x8239,\n RG16UI: 0x823a,\n RG32I: 0x823b,\n RG32UI: 0x823c,\n R8_SNORM: 0x8f94,\n RG8_SNORM: 0x8f95,\n RGB8_SNORM: 0x8f96,\n RGBA8_SNORM: 0x8f97,\n RGB10_A2UI: 0x906f,\n /* covered by extension\n COMPRESSED_R11_EAC : 0x9270,\n COMPRESSED_SIGNED_R11_EAC: 0x9271,\n COMPRESSED_RG11_EAC: 0x9272,\n COMPRESSED_SIGNED_RG11_EAC : 0x9273,\n COMPRESSED_RGB8_ETC2 : 0x9274,\n COMPRESSED_SRGB8_ETC2: 0x9275,\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 : 0x9276,\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC : 0x9277,\n COMPRESSED_RGBA8_ETC2_EAC: 0x9278,\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC : 0x9279,\n */\n TEXTURE_IMMUTABLE_FORMAT: 0x912f,\n TEXTURE_IMMUTABLE_LEVELS: 0x82df,\n // Pixel types\n UNSIGNED_INT_2_10_10_10_REV: 0x8368,\n UNSIGNED_INT_10F_11F_11F_REV: 0x8c3b,\n UNSIGNED_INT_5_9_9_9_REV: 0x8c3e,\n FLOAT_32_UNSIGNED_INT_24_8_REV: 0x8dad,\n UNSIGNED_INT_24_8: 0x84fa,\n HALF_FLOAT: 0x140b,\n RG: 0x8227,\n RG_INTEGER: 0x8228,\n INT_2_10_10_10_REV: 0x8d9f,\n // Queries\n CURRENT_QUERY: 0x8865,\n QUERY_RESULT: 0x8866,\n QUERY_RESULT_AVAILABLE: 0x8867,\n ANY_SAMPLES_PASSED: 0x8c2f,\n ANY_SAMPLES_PASSED_CONSERVATIVE: 0x8d6a,\n // Draw buffers\n MAX_DRAW_BUFFERS: 0x8824,\n DRAW_BUFFER0: 0x8825,\n DRAW_BUFFER1: 0x8826,\n DRAW_BUFFER2: 0x8827,\n DRAW_BUFFER3: 0x8828,\n DRAW_BUFFER4: 0x8829,\n DRAW_BUFFER5: 0x882a,\n DRAW_BUFFER6: 0x882b,\n DRAW_BUFFER7: 0x882c,\n DRAW_BUFFER8: 0x882d,\n DRAW_BUFFER9: 0x882e,\n DRAW_BUFFER10: 0x882f,\n DRAW_BUFFER11: 0x8830,\n DRAW_BUFFER12: 0x8831,\n DRAW_BUFFER13: 0x8832,\n DRAW_BUFFER14: 0x8833,\n DRAW_BUFFER15: 0x8834,\n MAX_COLOR_ATTACHMENTS: 0x8cdf,\n COLOR_ATTACHMENT1: 0x8ce1,\n COLOR_ATTACHMENT2: 0x8ce2,\n COLOR_ATTACHMENT3: 0x8ce3,\n COLOR_ATTACHMENT4: 0x8ce4,\n COLOR_ATTACHMENT5: 0x8ce5,\n COLOR_ATTACHMENT6: 0x8ce6,\n COLOR_ATTACHMENT7: 0x8ce7,\n COLOR_ATTACHMENT8: 0x8ce8,\n COLOR_ATTACHMENT9: 0x8ce9,\n COLOR_ATTACHMENT10: 0x8cea,\n COLOR_ATTACHMENT11: 0x8ceb,\n COLOR_ATTACHMENT12: 0x8cec,\n COLOR_ATTACHMENT13: 0x8ced,\n COLOR_ATTACHMENT14: 0x8cee,\n COLOR_ATTACHMENT15: 0x8cef,\n // Samplers\n SAMPLER_3D: 0x8b5f,\n SAMPLER_2D_SHADOW: 0x8b62,\n SAMPLER_2D_ARRAY: 0x8dc1,\n SAMPLER_2D_ARRAY_SHADOW: 0x8dc4,\n SAMPLER_CUBE_SHADOW: 0x8dc5,\n INT_SAMPLER_2D: 0x8dca,\n INT_SAMPLER_3D: 0x8dcb,\n INT_SAMPLER_CUBE: 0x8dcc,\n INT_SAMPLER_2D_ARRAY: 0x8dcf,\n UNSIGNED_INT_SAMPLER_2D: 0x8dd2,\n UNSIGNED_INT_SAMPLER_3D: 0x8dd3,\n UNSIGNED_INT_SAMPLER_CUBE: 0x8dd4,\n UNSIGNED_INT_SAMPLER_2D_ARRAY: 0x8dd7,\n MAX_SAMPLES: 0x8d57,\n SAMPLER_BINDING: 0x8919,\n // Buffers\n PIXEL_PACK_BUFFER: 0x88eb,\n PIXEL_UNPACK_BUFFER: 0x88ec,\n PIXEL_PACK_BUFFER_BINDING: 0x88ed,\n PIXEL_UNPACK_BUFFER_BINDING: 0x88ef,\n COPY_READ_BUFFER: 0x8f36,\n COPY_WRITE_BUFFER: 0x8f37,\n COPY_READ_BUFFER_BINDING: 0x8f36,\n COPY_WRITE_BUFFER_BINDING: 0x8f37,\n // Data types\n FLOAT_MAT2x3: 0x8b65,\n FLOAT_MAT2x4: 0x8b66,\n FLOAT_MAT3x2: 0x8b67,\n FLOAT_MAT3x4: 0x8b68,\n FLOAT_MAT4x2: 0x8b69,\n FLOAT_MAT4x3: 0x8b6a,\n UNSIGNED_INT_VEC2: 0x8dc6,\n UNSIGNED_INT_VEC3: 0x8dc7,\n UNSIGNED_INT_VEC4: 0x8dc8,\n UNSIGNED_NORMALIZED: 0x8c17,\n SIGNED_NORMALIZED: 0x8f9c,\n // Vertex attributes\n VERTEX_ATTRIB_ARRAY_INTEGER: 0x88fd,\n VERTEX_ATTRIB_ARRAY_DIVISOR: 0x88fe,\n // Transform feedback\n TRANSFORM_FEEDBACK_BUFFER_MODE: 0x8c7f,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS: 0x8c80,\n TRANSFORM_FEEDBACK_VARYINGS: 0x8c83,\n TRANSFORM_FEEDBACK_BUFFER_START: 0x8c84,\n TRANSFORM_FEEDBACK_BUFFER_SIZE: 0x8c85,\n TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN: 0x8c88,\n MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS: 0x8c8a,\n MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS: 0x8c8b,\n INTERLEAVED_ATTRIBS: 0x8c8c,\n SEPARATE_ATTRIBS: 0x8c8d,\n TRANSFORM_FEEDBACK_BUFFER: 0x8c8e,\n TRANSFORM_FEEDBACK_BUFFER_BINDING: 0x8c8f,\n TRANSFORM_FEEDBACK: 0x8e22,\n TRANSFORM_FEEDBACK_PAUSED: 0x8e23,\n TRANSFORM_FEEDBACK_ACTIVE: 0x8e24,\n TRANSFORM_FEEDBACK_BINDING: 0x8e25,\n // Framebuffers and renderbuffers\n FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING: 0x8210,\n FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE: 0x8211,\n FRAMEBUFFER_ATTACHMENT_RED_SIZE: 0x8212,\n FRAMEBUFFER_ATTACHMENT_GREEN_SIZE: 0x8213,\n FRAMEBUFFER_ATTACHMENT_BLUE_SIZE: 0x8214,\n FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE: 0x8215,\n FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE: 0x8216,\n FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE: 0x8217,\n FRAMEBUFFER_DEFAULT: 0x8218,\n // DEPTH_STENCIL_ATTACHMENT : 0x821A,\n // DEPTH_STENCIL: 0x84F9,\n DEPTH24_STENCIL8: 0x88f0,\n DRAW_FRAMEBUFFER_BINDING: 0x8ca6,\n READ_FRAMEBUFFER_BINDING: 0x8caa,\n RENDERBUFFER_SAMPLES: 0x8cab,\n FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER: 0x8cd4,\n FRAMEBUFFER_INCOMPLETE_MULTISAMPLE: 0x8d56,\n // Uniforms\n UNIFORM_BUFFER: 0x8a11,\n UNIFORM_BUFFER_BINDING: 0x8a28,\n UNIFORM_BUFFER_START: 0x8a29,\n UNIFORM_BUFFER_SIZE: 0x8a2a,\n MAX_VERTEX_UNIFORM_BLOCKS: 0x8a2b,\n MAX_FRAGMENT_UNIFORM_BLOCKS: 0x8a2d,\n MAX_COMBINED_UNIFORM_BLOCKS: 0x8a2e,\n MAX_UNIFORM_BUFFER_BINDINGS: 0x8a2f,\n MAX_UNIFORM_BLOCK_SIZE: 0x8a30,\n MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS: 0x8a31,\n MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS: 0x8a33,\n UNIFORM_BUFFER_OFFSET_ALIGNMENT: 0x8a34,\n ACTIVE_UNIFORM_BLOCKS: 0x8a36,\n UNIFORM_TYPE: 0x8a37,\n UNIFORM_SIZE: 0x8a38,\n UNIFORM_BLOCK_INDEX: 0x8a3a,\n UNIFORM_OFFSET: 0x8a3b,\n UNIFORM_ARRAY_STRIDE: 0x8a3c,\n UNIFORM_MATRIX_STRIDE: 0x8a3d,\n UNIFORM_IS_ROW_MAJOR: 0x8a3e,\n UNIFORM_BLOCK_BINDING: 0x8a3f,\n UNIFORM_BLOCK_DATA_SIZE: 0x8a40,\n UNIFORM_BLOCK_ACTIVE_UNIFORMS: 0x8a42,\n UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES: 0x8a43,\n UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER: 0x8a44,\n UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER: 0x8a46,\n // Sync objects\n OBJECT_TYPE: 0x9112,\n SYNC_CONDITION: 0x9113,\n SYNC_STATUS: 0x9114,\n SYNC_FLAGS: 0x9115,\n SYNC_FENCE: 0x9116,\n SYNC_GPU_COMMANDS_COMPLETE: 0x9117,\n UNSIGNALED: 0x9118,\n SIGNALED: 0x9119,\n ALREADY_SIGNALED: 0x911a,\n TIMEOUT_EXPIRED: 0x911b,\n CONDITION_SATISFIED: 0x911c,\n WAIT_FAILED: 0x911d,\n SYNC_FLUSH_COMMANDS_BIT: 0x00000001,\n // Miscellaneous constants\n COLOR: 0x1800,\n DEPTH: 0x1801,\n STENCIL: 0x1802,\n MIN: 0x8007,\n MAX: 0x8008,\n DEPTH_COMPONENT24: 0x81a6,\n STREAM_READ: 0x88e1,\n STREAM_COPY: 0x88e2,\n STATIC_READ: 0x88e5,\n STATIC_COPY: 0x88e6,\n DYNAMIC_READ: 0x88e9,\n DYNAMIC_COPY: 0x88ea,\n DEPTH_COMPONENT32F: 0x8cac,\n DEPTH32F_STENCIL8: 0x8cad,\n INVALID_INDEX: 0xffffffff,\n TIMEOUT_IGNORED: -1,\n MAX_CLIENT_WAIT_TIMEOUT_WEBGL: 0x9247,\n // Constants defined in WebGL extensions\n // ANGLE_instanced_arrays\n VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE: 0x88fe,\n // WEBGL_debug_renderer_info\n UNMASKED_VENDOR_WEBGL: 0x9245,\n UNMASKED_RENDERER_WEBGL: 0x9246,\n // EXT_texture_filter_anisotropic\n MAX_TEXTURE_MAX_ANISOTROPY_EXT: 0x84ff,\n TEXTURE_MAX_ANISOTROPY_EXT: 0x84fe,\n // WEBGL_compressed_texture_s3tc\n COMPRESSED_RGB_S3TC_DXT1_EXT: 0x83f0,\n COMPRESSED_RGBA_S3TC_DXT1_EXT: 0x83f1,\n COMPRESSED_RGBA_S3TC_DXT3_EXT: 0x83f2,\n COMPRESSED_RGBA_S3TC_DXT5_EXT: 0x83f3,\n // WEBGL_compressed_texture_es3\n COMPRESSED_R11_EAC: 0x9270,\n COMPRESSED_SIGNED_R11_EAC: 0x9271,\n COMPRESSED_RG11_EAC: 0x9272,\n COMPRESSED_SIGNED_RG11_EAC: 0x9273,\n COMPRESSED_RGB8_ETC2: 0x9274,\n COMPRESSED_RGBA8_ETC2_EAC: 0x9275,\n COMPRESSED_SRGB8_ETC2: 0x9276,\n COMPRESSED_SRGB8_ALPHA8_ETC2_EAC: 0x9277,\n COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9278,\n COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2: 0x9279,\n // WEBGL_compressed_texture_pvrtc\n COMPRESSED_RGB_PVRTC_4BPPV1_IMG: 0x8c00,\n COMPRESSED_RGBA_PVRTC_4BPPV1_IMG: 0x8c02,\n COMPRESSED_RGB_PVRTC_2BPPV1_IMG: 0x8c01,\n COMPRESSED_RGBA_PVRTC_2BPPV1_IMG: 0x8c03,\n // WEBGL_compressed_texture_etc1\n COMPRESSED_RGB_ETC1_WEBGL: 0x8d64,\n // WEBGL_compressed_texture_atc\n COMPRESSED_RGB_ATC_WEBGL: 0x8c92,\n COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL: 0x8c92,\n COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL: 0x87ee,\n // WEBGL_depth_texture\n UNSIGNED_INT_24_8_WEBGL: 0x84fa,\n // OES_texture_half_float\n HALF_FLOAT_OES: 0x8d61,\n // WEBGL_color_buffer_float\n RGBA32F_EXT: 0x8814,\n RGB32F_EXT: 0x8815,\n FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT: 0x8211,\n UNSIGNED_NORMALIZED_EXT: 0x8c17,\n // EXT_blend_minmax\n MIN_EXT: 0x8007,\n MAX_EXT: 0x8008,\n // EXT_sRGB\n SRGB_EXT: 0x8c40,\n SRGB_ALPHA_EXT: 0x8c42,\n SRGB8_ALPHA8_EXT: 0x8c43,\n FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT: 0x8210,\n // OES_standard_derivatives\n FRAGMENT_SHADER_DERIVATIVE_HINT_OES: 0x8b8b,\n // WEBGL_draw_buffers\n COLOR_ATTACHMENT0_WEBGL: 0x8ce0,\n COLOR_ATTACHMENT1_WEBGL: 0x8ce1,\n COLOR_ATTACHMENT2_WEBGL: 0x8ce2,\n COLOR_ATTACHMENT3_WEBGL: 0x8ce3,\n COLOR_ATTACHMENT4_WEBGL: 0x8ce4,\n COLOR_ATTACHMENT5_WEBGL: 0x8ce5,\n COLOR_ATTACHMENT6_WEBGL: 0x8ce6,\n COLOR_ATTACHMENT7_WEBGL: 0x8ce7,\n COLOR_ATTACHMENT8_WEBGL: 0x8ce8,\n COLOR_ATTACHMENT9_WEBGL: 0x8ce9,\n COLOR_ATTACHMENT10_WEBGL: 0x8cea,\n COLOR_ATTACHMENT11_WEBGL: 0x8ceb,\n COLOR_ATTACHMENT12_WEBGL: 0x8cec,\n COLOR_ATTACHMENT13_WEBGL: 0x8ced,\n COLOR_ATTACHMENT14_WEBGL: 0x8cee,\n COLOR_ATTACHMENT15_WEBGL: 0x8cef,\n DRAW_BUFFER0_WEBGL: 0x8825,\n DRAW_BUFFER1_WEBGL: 0x8826,\n DRAW_BUFFER2_WEBGL: 0x8827,\n DRAW_BUFFER3_WEBGL: 0x8828,\n DRAW_BUFFER4_WEBGL: 0x8829,\n DRAW_BUFFER5_WEBGL: 0x882a,\n DRAW_BUFFER6_WEBGL: 0x882b,\n DRAW_BUFFER7_WEBGL: 0x882c,\n DRAW_BUFFER8_WEBGL: 0x882d,\n DRAW_BUFFER9_WEBGL: 0x882e,\n DRAW_BUFFER10_WEBGL: 0x882f,\n DRAW_BUFFER11_WEBGL: 0x8830,\n DRAW_BUFFER12_WEBGL: 0x8831,\n DRAW_BUFFER13_WEBGL: 0x8832,\n DRAW_BUFFER14_WEBGL: 0x8833,\n DRAW_BUFFER15_WEBGL: 0x8834,\n MAX_COLOR_ATTACHMENTS_WEBGL: 0x8cdf,\n MAX_DRAW_BUFFERS_WEBGL: 0x8824,\n // OES_vertex_array_object\n VERTEX_ARRAY_BINDING_OES: 0x85b5,\n // EXT_disjoint_timer_query\n QUERY_COUNTER_BITS_EXT: 0x8864,\n CURRENT_QUERY_EXT: 0x8865,\n QUERY_RESULT_EXT: 0x8866,\n QUERY_RESULT_AVAILABLE_EXT: 0x8867,\n TIME_ELAPSED_EXT: 0x88bf,\n TIMESTAMP_EXT: 0x8e28,\n GPU_DISJOINT_EXT: 0x8fbb // A Boolean indicating whether or not the GPU performed any disjoint operation.\n };\n}\n","/* models/echarts.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const mouse_events = [\n 'click', 'dblclick', 'mousedown', 'mousemove', 'mouseup', 'mouseover', 'mouseout',\n 'globalout', 'contextmenu'\n ];\n const events = [\n 'highlight', 'downplay', 'selectchanged', 'legendselectchangedEvent', 'legendselected',\n 'legendunselected', 'legendselectall', 'legendinverseselect', 'legendscroll', 'datazoom',\n 'datarangeselected', 'timelineplaychanged', 'restore', 'dataviewchanged', 'magictypechanged',\n 'geoselectchanged', 'geoselected', 'geounselected', 'axisareaselected', 'brush', 'brushEnd',\n 'rushselected', 'globalcursortaken', 'rendered', 'finished'\n ];\n const all_events = mouse_events.concat(events);\n class EChartsEvent extends bokeh_events_1.ModelEvent {\n constructor(type, data, query) {\n super();\n this.type = type;\n this.data = data;\n this.query = query;\n }\n get event_values() {\n return { model: this.origin, type: this.type, data: this.data, query: this.query };\n }\n }\n exports.EChartsEvent = EChartsEvent;\n _a = EChartsEvent;\n EChartsEvent.__name__ = \"EChartsEvent\";\n (() => {\n _a.prototype.event_name = \"echarts_event\";\n })();\n class EChartsView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._callbacks = [];\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => this._plot());\n const { width, height, renderer, theme, event_config, js_events } = this.model.properties;\n this.on_change([width, height], () => this._resize());\n this.on_change([theme, renderer], () => {\n this.render();\n this._chart.resize();\n });\n this.on_change([event_config, js_events], () => this._subscribe());\n }\n render() {\n if (this._chart != null)\n window.echarts.dispose(this._chart);\n super.render();\n this.container = (0, dom_1.div)({ style: \"height: 100%; width: 100%;\" });\n const config = { width: this.model.width, height: this.model.height, renderer: this.model.renderer };\n this._chart = window.echarts.init(this.container, this.model.theme, config);\n this._plot();\n this._subscribe();\n this.shadow_el.append(this.container);\n }\n remove() {\n super.remove();\n if (this._chart != null)\n window.echarts.dispose(this._chart);\n }\n after_layout() {\n super.after_layout();\n this._chart.resize();\n }\n _plot() {\n if (window.echarts == null)\n return;\n this._chart.setOption(this.model.data, this.model.options);\n }\n _resize() {\n this._chart.resize({ width: this.model.width, height: this.model.height });\n }\n _subscribe() {\n if (window.echarts == null)\n return;\n for (const [event_type, callback] of this._callbacks)\n this._chart.off(event_type, callback);\n this._callbacks = [];\n for (const event_type in this.model.event_config) {\n if (!all_events.includes(event_type)) {\n console.warn(`Could not subscribe to unknown Echarts event: ${event_type}.`);\n continue;\n }\n const queries = this.model.event_config[event_type];\n for (const query of queries) {\n const callback = (event) => {\n var _c;\n const processed = Object.assign({}, event);\n processed.event = (0, event_to_object_1.serializeEvent)((_c = event.event) === null || _c === void 0 ? void 0 : _c.event);\n const serialized = JSON.parse(JSON.stringify(processed));\n this.model.trigger_event(new EChartsEvent(event_type, serialized, query));\n };\n if (query == null)\n this._chart.on(event_type, query, callback);\n else\n this._chart.on(event_type, callback);\n this._callbacks.push([event_type, callback]);\n }\n }\n for (const event_type in this.model.js_events) {\n if (!all_events.includes(event_type)) {\n console.warn(`Could not subscribe to unknown Echarts event: ${event_type}.`);\n continue;\n }\n const handlers = this.model.js_events[event_type];\n for (const handler of handlers) {\n const callback = (event) => {\n handler.callback.execute(this._chart, event);\n };\n if ('query' in handler)\n this._chart.on(event_type, handler.query, callback);\n else\n this._chart.on(event_type, callback);\n this._callbacks.push([event_type, callback]);\n }\n }\n }\n }\n exports.EChartsView = EChartsView;\n EChartsView.__name__ = \"EChartsView\";\n class ECharts extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.ECharts = ECharts;\n _b = ECharts;\n ECharts.__name__ = \"ECharts\";\n ECharts.__module__ = \"panel.models.echarts\";\n (() => {\n _b.prototype.default_view = EChartsView;\n _b.define(({ Any, String }) => ({\n data: [Any, {}],\n options: [Any, {}],\n event_config: [Any, {}],\n js_events: [Any, {}],\n theme: [String, \"default\"],\n renderer: [String, \"canvas\"]\n }));\n })();\n}\n","/* models/event-to-object.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /*\n The MIT License (MIT)\n \n Copyright (c) 2019 Ryan S. Morshead\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n */\n function serializeEvent(event) {\n const data = {};\n // support for CustomEvents: the whole `detail` object is serialized\n if (event.detail !== undefined) {\n Object.assign(data, { detail: JSON.parse(JSON.stringify(event.detail)) });\n }\n if (event.type in eventTransforms) {\n Object.assign(data, eventTransforms[event.type](event));\n }\n data.target = serializeDomElement(event.target);\n data.currentTarget =\n event.target === event.currentTarget\n ? data.target\n : serializeDomElement(event.currentTarget);\n data.relatedTarget = serializeDomElement(event.relatedTarget);\n return data;\n }\n exports.serializeEvent = serializeEvent;\n function serializeDomElement(element) {\n let elementData = null;\n if (element) {\n elementData = defaultElementTransform(element);\n if (element.tagName in elementTransforms) {\n elementTransforms[element.tagName].forEach((trans) => Object.assign(elementData, trans(element)));\n }\n }\n return elementData;\n }\n const elementTransformCategories = {\n hasValue: (element) => ({\n value: element.value,\n }),\n hasCurrentTime: (element) => ({\n currentTime: element.currentTime,\n }),\n hasFiles: (element) => {\n if ((element === null || element === void 0 ? void 0 : element.type) === \"file\") {\n return {\n files: Array.from(element.files).map((file) => ({\n lastModified: file.lastModified,\n name: file.name,\n size: file.size,\n type: file.type,\n })),\n };\n }\n else {\n return {};\n }\n },\n };\n function defaultElementTransform(element) {\n try {\n return { boundingClientRect: Object.assign({}, element.getBoundingClientRect()) };\n }\n catch (_a) {\n return {};\n }\n }\n const elementTagCategories = {\n hasValue: [\n \"BUTTON\",\n \"INPUT\",\n \"OPTION\",\n \"LI\",\n \"METER\",\n \"PROGRESS\",\n \"PARAM\",\n \"SELECT\",\n \"TEXTAREA\",\n ],\n hasCurrentTime: [\"AUDIO\", \"VIDEO\"],\n hasFiles: [\"INPUT\"],\n };\n const elementTransforms = {};\n Object.keys(elementTagCategories).forEach((category) => {\n elementTagCategories[category].forEach((type) => {\n const transforms = elementTransforms[type] || (elementTransforms[type] = []);\n transforms.push(elementTransformCategories[category]);\n });\n });\n class EventTransformCategories {\n clipboard(event) {\n return {\n clipboardData: event.clipboardData,\n };\n }\n composition(event) {\n return {\n data: event.data,\n };\n }\n keyboard(event) {\n return {\n altKey: event.altKey,\n charCode: event.charCode,\n ctrlKey: event.ctrlKey,\n key: event.key,\n keyCode: event.keyCode,\n locale: event.locale,\n location: event.location,\n metaKey: event.metaKey,\n repeat: event.repeat,\n shiftKey: event.shiftKey,\n which: event.which,\n };\n }\n mouse(event) {\n return {\n altKey: event.altKey,\n button: event.button,\n buttons: event.buttons,\n clientX: event.clientX,\n clientY: event.clientY,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n pageX: event.pageX,\n pageY: event.pageY,\n screenX: event.screenX,\n screenY: event.screenY,\n shiftKey: event.shiftKey,\n };\n }\n pointer(event) {\n return Object.assign(Object.assign({}, this.mouse(event)), { pointerId: event.pointerId, width: event.width, height: event.height, pressure: event.pressure, tiltX: event.tiltX, tiltY: event.tiltY, pointerType: event.pointerType, isPrimary: event.isPrimary });\n }\n selection() {\n return {\n selectedText: window.getSelection().toString()\n };\n }\n ;\n touch(event) {\n return {\n altKey: event.altKey,\n ctrlKey: event.ctrlKey,\n metaKey: event.metaKey,\n shiftKey: event.shiftKey,\n };\n }\n ui(event) {\n return {\n detail: event.detail,\n };\n }\n wheel(event) {\n return {\n deltaMode: event.deltaMode,\n deltaX: event.deltaX,\n deltaY: event.deltaY,\n deltaZ: event.deltaZ,\n };\n }\n animation(event) {\n return {\n animationName: event.animationName,\n pseudoElement: event.pseudoElement,\n elapsedTime: event.elapsedTime,\n };\n }\n transition(event) {\n return {\n propertyName: event.propertyName,\n pseudoElement: event.pseudoElement,\n elapsedTime: event.elapsedTime,\n };\n }\n }\n EventTransformCategories.__name__ = \"EventTransformCategories\";\n const eventTypeCategories = {\n clipboard: [\"copy\", \"cut\", \"paste\"],\n composition: [\"compositionend\", \"compositionstart\", \"compositionupdate\"],\n keyboard: [\"keydown\", \"keypress\", \"keyup\"],\n mouse: [\n \"click\",\n \"contextmenu\",\n \"doubleclick\",\n \"drag\",\n \"dragend\",\n \"dragenter\",\n \"dragexit\",\n \"dragleave\",\n \"dragover\",\n \"dragstart\",\n \"drop\",\n \"mousedown\",\n \"mouseenter\",\n \"mouseleave\",\n \"mousemove\",\n \"mouseout\",\n \"mouseover\",\n \"mouseup\",\n ],\n pointer: [\n \"pointerdown\",\n \"pointermove\",\n \"pointerup\",\n \"pointercancel\",\n \"gotpointercapture\",\n \"lostpointercapture\",\n \"pointerenter\",\n \"pointerleave\",\n \"pointerover\",\n \"pointerout\",\n ],\n selection: [\"select\"],\n touch: [\"touchcancel\", \"touchend\", \"touchmove\", \"touchstart\"],\n ui: [\"scroll\"],\n wheel: [\"wheel\"],\n animation: [\"animationstart\", \"animationend\", \"animationiteration\"],\n transition: [\"transitionend\"],\n };\n const eventTransforms = {};\n const eventTransformCategories = new EventTransformCategories();\n Object.keys(eventTypeCategories).forEach((category) => {\n eventTypeCategories[category].forEach((type) => {\n eventTransforms[type] = eventTransformCategories[category];\n });\n });\n}\n","/* models/file_download.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const icon_1 = require(\"@bokehjs/models/ui/icons/icon\");\n const buttons_css_1 = tslib_1.__importStar(require(\"@bokehjs/styles/buttons.css\")), buttons = buttons_css_1;\n const dom_1 = require(\"@bokehjs/core/dom\");\n function dataURItoBlob(dataURI) {\n // convert base64 to raw binary data held in a string\n const byteString = atob(dataURI.split(',')[1]);\n // separate out the mime component\n const mimeString = dataURI.split(',')[0].split(':')[1].split(';')[0];\n // write the bytes of the string to an ArrayBuffer\n const ab = new ArrayBuffer(byteString.length);\n const ia = new Uint8Array(ab);\n for (let i = 0; i < byteString.length; i++) {\n ia[i] = byteString.charCodeAt(i);\n }\n // write the ArrayBuffer to a blob, and you're done\n var bb = new Blob([ab], { type: mimeString });\n return bb;\n }\n class FileDownloadView extends input_widget_1.InputWidgetView {\n constructor() {\n super(...arguments);\n this._downloadable = false;\n this._prev_href = \"\";\n this._prev_download = \"\";\n }\n *children() {\n yield* super.children();\n if (this.icon_view != null)\n yield this.icon_view;\n }\n *controls() {\n yield this.anchor_el;\n yield this.button_el;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.button_type.change, () => this._update_button_style());\n this.connect(this.model.properties.filename.change, () => this._update_download());\n this.connect(this.model.properties._transfers.change, () => this._handle_click());\n this.connect(this.model.properties.label.change, () => this._update_label());\n }\n remove() {\n if (this.icon_view != null)\n this.icon_view.remove();\n super.remove();\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { icon } = this.model;\n if (icon != null) {\n this.icon_view = await (0, build_views_1.build_view)(icon, { parent: this });\n }\n }\n render() {\n super.render();\n this.group_el.style.display = \"flex\";\n this.group_el.style.alignItems = \"stretch\";\n // Create an anchor HTML element that is styled as a bokeh button.\n // When its 'href' and 'download' attributes are set, it's a downloadable link:\n // * A click triggers a download\n // * A right click allows to \"Save as\" the file\n // There are three main cases:\n // 1. embed=True: The widget is a download link\n // 2. auto=False: The widget is first a button and becomes a download link after the first click\n // 3. auto=True: The widget is a button, i.e right click to \"Save as...\" won't work\n this.anchor_el = document.createElement('a');\n this.button_el = (0, dom_1.button)({\n disabled: this.model.disabled,\n type: \"bk_btn, bk_btn_type\",\n });\n if (this.icon_view != null) {\n const separator = this.model.label != \"\" ? (0, dom_1.nbsp)() : (0, dom_1.text)(\"\");\n (0, dom_1.prepend)(this.button_el, this.icon_view.el, separator);\n this.icon_view.render();\n }\n this._update_button_style();\n this._update_label();\n // Changing the disabled property calls render() so it needs to be handled here.\n // This callback is inherited from ControlView in bokehjs.\n if (this.model.disabled) {\n this.anchor_el.setAttribute(\"disabled\", \"\");\n this._downloadable = false;\n }\n else {\n this.anchor_el.removeAttribute(\"disabled\");\n // auto=False + toggle Disabled ==> Needs to reset the link as it was.\n if (this._prev_download)\n this.anchor_el.download = this._prev_download;\n if (this._prev_href)\n this.anchor_el.href = this._prev_href;\n if (this.anchor_el.download && this.anchor_el.download)\n this._downloadable = true;\n }\n // If embedded the button is just a download link.\n // Otherwise clicks will be handled by the code itself, allowing for more interactivity.\n if (this.model.embed)\n this._make_link_downloadable();\n else {\n // Add a \"click\" listener, note that it's not going to\n // handle right clicks (they won't increment 'clicks')\n this._click_listener = this._increment_clicks.bind(this);\n this.anchor_el.addEventListener(\"click\", this._click_listener);\n }\n this.button_el.appendChild(this.anchor_el);\n this.group_el.appendChild(this.button_el);\n }\n stylesheets() {\n return [...super.stylesheets(), buttons_css_1.default];\n }\n _increment_clicks() {\n this.model.clicks = this.model.clicks + 1;\n }\n _handle_click() {\n // When auto=False the button becomes a link which no longer\n // requires being updated.\n if ((!this.model.auto && this._downloadable) || this.anchor_el.hasAttribute(\"disabled\"))\n return;\n this._make_link_downloadable();\n if (!this.model.embed && this.model.auto) {\n // Temporarily removing the event listener to emulate a click\n // event on the anchor link which will trigger a download.\n this.anchor_el.removeEventListener(\"click\", this._click_listener);\n this.anchor_el.click();\n // In this case #3 the widget is not a link so these attributes are removed.\n this.anchor_el.removeAttribute(\"href\");\n this.anchor_el.removeAttribute(\"download\");\n this.anchor_el.addEventListener(\"click\", this._click_listener);\n }\n // Store the current state for handling changes of the disabled property.\n this._prev_href = this.anchor_el.getAttribute(\"href\");\n this._prev_download = this.anchor_el.getAttribute(\"download\");\n }\n _make_link_downloadable() {\n this._update_href();\n this._update_download();\n if (this.anchor_el.download && this.anchor_el.href) {\n this._downloadable = true;\n }\n }\n _update_href() {\n if (this.model.data) {\n const blob = dataURItoBlob(this.model.data);\n this.anchor_el.href = URL.createObjectURL(blob);\n }\n }\n _update_download() {\n if (this.model.filename) {\n this.anchor_el.download = this.model.filename;\n }\n }\n _update_label() {\n this.anchor_el.textContent = this.model.label;\n }\n _update_button_style() {\n const btn_type = buttons[`btn_${this.model.button_type}`];\n if (!this.button_el.hasAttribute(\"class\")) { // When the widget is rendered.\n this.button_el.classList.add(buttons.btn);\n this.button_el.classList.add(btn_type);\n }\n else { // When the button type is changed.\n const prev_button_type = this.anchor_el.classList.item(1);\n if (prev_button_type)\n this.button_el.classList.replace(prev_button_type, btn_type);\n }\n }\n }\n exports.FileDownloadView = FileDownloadView;\n FileDownloadView.__name__ = \"FileDownloadView\";\n class FileDownload extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.FileDownload = FileDownload;\n _a = FileDownload;\n FileDownload.__name__ = \"FileDownload\";\n FileDownload.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = FileDownloadView;\n _a.define(({ Boolean, Int, Nullable, Ref, String }) => ({\n auto: [Boolean, false],\n clicks: [Int, 0],\n data: [Nullable(String), null],\n embed: [Boolean, false],\n icon: [Nullable(Ref(icon_1.Icon)), null],\n label: [String, \"Download\"],\n filename: [Nullable(String), null],\n button_type: [enums_1.ButtonType, \"default\"],\n _transfers: [Int, 0],\n }));\n _a.override({\n title: \"\",\n });\n })();\n}\n","/* models/html.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n class DOMEvent extends bokeh_events_1.ModelEvent {\n constructor(node, data) {\n super();\n this.node = node;\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, node: this.node, data: this.data };\n }\n }\n exports.DOMEvent = DOMEvent;\n _a = DOMEvent;\n DOMEvent.__name__ = \"DOMEvent\";\n (() => {\n _a.prototype.event_name = \"dom_event\";\n })();\n function htmlDecode(input) {\n var doc = new DOMParser().parseFromString(input, \"text/html\");\n return doc.documentElement.textContent;\n }\n exports.htmlDecode = htmlDecode;\n function runScripts(node) {\n Array.from(node.querySelectorAll(\"script\")).forEach((oldScript) => {\n const newScript = document.createElement(\"script\");\n Array.from(oldScript.attributes)\n .forEach((attr) => newScript.setAttribute(attr.name, attr.value));\n newScript.appendChild(document.createTextNode(oldScript.innerHTML));\n if (oldScript.parentNode)\n oldScript.parentNode.replaceChild(newScript, oldScript);\n });\n }\n exports.runScripts = runScripts;\n class HTMLView extends layout_1.PanelMarkupView {\n constructor() {\n super(...arguments);\n this._event_listeners = {};\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => {\n const html = this.process_tex();\n this.set_html(html);\n });\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n });\n this.connect(this.model.properties.events.change, () => {\n this._remove_event_listeners();\n this._setup_event_listeners();\n });\n }\n rerender() {\n this.render();\n this.invalidate_layout();\n }\n set_html(html) {\n if (html) {\n this.container.innerHTML = html;\n if (this.model.run_scripts)\n runScripts(this.container);\n this._setup_event_listeners();\n }\n }\n render() {\n super.render();\n this.container.style.visibility = 'hidden';\n this.shadow_el.appendChild(this.container);\n if (this.provider.status == \"failed\" || this.provider.status == \"loaded\")\n this._has_finished = true;\n const html = this.process_tex();\n this.watch_stylesheets();\n this.set_html(html);\n }\n style_redraw() {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n }\n process_tex() {\n const decoded = htmlDecode(this.model.text);\n const text = decoded || this.model.text;\n if (this.model.disable_math || !this.contains_tex(text))\n return text;\n const tex_parts = this.provider.MathJax.find_tex(text);\n const processed_text = [];\n let last_index = 0;\n for (const part of tex_parts) {\n processed_text.push(text.slice(last_index, part.start.n));\n processed_text.push(this.provider.MathJax.tex2svg(part.math, { display: part.display }).outerHTML);\n last_index = part.end.n;\n }\n if (last_index < text.length)\n processed_text.push(text.slice(last_index));\n return processed_text.join(\"\");\n }\n contains_tex(html) {\n if (!this.provider.MathJax)\n return false;\n return this.provider.MathJax.find_tex(html).length > 0;\n }\n _remove_event_listeners() {\n for (const node in this._event_listeners) {\n const el = document.getElementById(node);\n if (el == null) {\n console.warn(`DOM node '${node}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n for (const event_name in this._event_listeners[node]) {\n const event_callback = this._event_listeners[node][event_name];\n el.removeEventListener(event_name, event_callback);\n }\n }\n this._event_listeners = {};\n }\n _setup_event_listeners() {\n for (const node in this.model.events) {\n const el = document.getElementById(node);\n if (el == null) {\n console.warn(`DOM node '${node}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n for (const event_name of this.model.events[node]) {\n const callback = (event) => {\n this.model.trigger_event(new DOMEvent(node, (0, event_to_object_1.serializeEvent)(event)));\n };\n el.addEventListener(event_name, callback);\n if (!(node in this._event_listeners))\n this._event_listeners[node] = {};\n this._event_listeners[node][event_name] = callback;\n }\n }\n }\n }\n exports.HTMLView = HTMLView;\n HTMLView.__name__ = \"HTMLView\";\n class HTML extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.HTML = HTML;\n _b = HTML;\n HTML.__name__ = \"HTML\";\n HTML.__module__ = \"panel.models.markup\";\n (() => {\n _b.prototype.default_view = HTMLView;\n _b.define(({ Any, Boolean }) => ({\n events: [Any, {}],\n run_scripts: [Boolean, true]\n }));\n })();\n}\n","/* models/ipywidget.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const Jupyter = window.Jupyter;\n class IPyWidgetView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n let manager;\n if ((Jupyter != null) && (Jupyter.notebook != null))\n manager = Jupyter.notebook.kernel.widget_manager;\n else if (window.PyViz.widget_manager != null)\n manager = window.PyViz.widget_manager;\n else {\n console.warn(\"Panel IPyWidget model could not find a WidgetManager\");\n return;\n }\n this.manager = manager;\n this.ipychildren = [];\n }\n remove() {\n this.ipyview.remove();\n super.remove();\n }\n _ipy_stylesheets() {\n const stylesheets = [];\n for (const child of document.head.children) {\n if (child instanceof HTMLStyleElement) {\n const raw_css = child.textContent;\n if (raw_css != null) {\n const css = raw_css.replace(/:root/g, \":host\");\n stylesheets.push(new dom_1.InlineStyleSheet(css));\n }\n }\n }\n return stylesheets;\n }\n stylesheets() {\n return [...super.stylesheets(), ...this._ipy_stylesheets()];\n }\n render() {\n super.render();\n const { spec, state } = this.model.bundle;\n this.manager.set_state(state).then(async (models) => {\n const model = models.find((item) => item.model_id == spec.model_id);\n if (model == null)\n return;\n const view = await this.manager.create_view(model, { el: this.el });\n this.ipyview = view;\n this.ipychildren = [];\n if (view.children_views) {\n for (const child of view.children_views.views)\n this.ipychildren.push(await child);\n }\n this.shadow_el.appendChild(this.ipyview.el);\n this.ipyview.trigger('displayed', this.ipyview);\n for (const child of this.ipychildren)\n child.trigger('displayed', child);\n this.invalidate_layout();\n });\n }\n }\n exports.IPyWidgetView = IPyWidgetView;\n IPyWidgetView.__name__ = \"IPyWidgetView\";\n class IPyWidget extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.IPyWidget = IPyWidget;\n _a = IPyWidget;\n IPyWidget.__name__ = \"IPyWidget\";\n IPyWidget.__module__ = \"panel.models.ipywidget\";\n (() => {\n _a.prototype.default_view = IPyWidgetView;\n _a.define(({ Any }) => ({\n bundle: [Any, {}],\n }));\n })();\n}\n","/* models/json.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const json_formatter_js_1 = tslib_1.__importDefault(require(\"18bba7b7e1\") /* json-formatter-js */);\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class JSONView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n const { depth, hover_preview, text, theme } = this.model.properties;\n this.on_change([depth, hover_preview, text, theme], () => this.render());\n }\n render() {\n super.render();\n const text = this.model.text.replace(/(\\r\\n|\\n|\\r)/gm, \"\");\n let json;\n try {\n json = window.JSON.parse(text);\n }\n catch (err) {\n this.container.innerHTML = \"<b>Invalid JSON:</b> \" + err.toString();\n return;\n }\n const config = { hoverPreviewEnabled: this.model.hover_preview, theme: this.model.theme };\n const depth = this.model.depth == null ? Infinity : this.model.depth;\n const formatter = new json_formatter_js_1.default(json, depth, config);\n const rendered = formatter.render();\n let style = \"border-radius: 5px; padding: 10px; width: 100%; height: 100%;\";\n if (this.model.theme == \"dark\")\n rendered.style.cssText = \"background-color: rgb(30, 30, 30);\" + style;\n else\n rendered.style.cssText = style;\n this.container.append(rendered);\n }\n }\n exports.JSONView = JSONView;\n JSONView.__name__ = \"JSONView\";\n exports.JSONTheme = (0, kinds_1.Enum)(\"dark\", \"light\");\n class JSON extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.JSON = JSON;\n _a = JSON;\n JSON.__name__ = \"JSON\";\n JSON.__module__ = \"panel.models.markup\";\n (() => {\n _a.prototype.default_view = JSONView;\n _a.define(({ Array, Boolean, Int, Nullable, String }) => ({\n css: [Array(String), []],\n depth: [Nullable(Int), 1],\n hover_preview: [Boolean, false],\n theme: [exports.JSONTheme, \"dark\"],\n }));\n })();\n}\n","/* json-formatter-js/dist/json-formatter.esm.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n function t(t) { return null === t ? \"null\" : typeof t; }\n function e(t) { return !!t && \"object\" == typeof t; }\n function r(t) {\n if (void 0 === t)\n return \"\";\n if (null === t)\n return \"Object\";\n if (\"object\" == typeof t && !t.constructor)\n return \"Object\";\n var e = /function ([^(]*)/.exec(t.constructor.toString());\n return e && e.length > 1 ? e[1] : \"\";\n }\n function n(t, e, r) { return \"null\" === t || \"undefined\" === t ? t : (\"string\" !== t && \"stringifiable\" !== t || (r = '\"' + r.replace(/\"/g, '\\\\\"') + '\"'), \"function\" === t ? e.toString().replace(/[\\r\\n]/g, \"\").replace(/\\{.*\\}/, \"\") + \"{…}\" : r); }\n function o(o) { var i = \"\"; return e(o) ? (i = r(o), Array.isArray(o) && (i += \"[\" + o.length + \"]\")) : i = n(t(o), o, o), i; }\n function i(t) { return \"json-formatter-\" + t; }\n function s(t, e, r) { var n = document.createElement(t); return e && n.classList.add(i(e)), void 0 !== r && (r instanceof Node ? n.appendChild(r) : n.appendChild(document.createTextNode(String(r)))), n; }\n !function (t) {\n if (t && \"undefined\" != typeof window) {\n var e = document.createElement(\"style\");\n e.setAttribute(\"media\", \"screen\"), e.innerHTML = t, document.head.appendChild(e);\n }\n }('.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-row,\\n.json-formatter-row a,\\n.json-formatter-row a:hover {\\n color: black;\\n text-decoration: none;\\n}\\n.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-row .json-formatter-string,\\n.json-formatter-row .json-formatter-stringifiable {\\n color: green;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-row .json-formatter-number {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-boolean {\\n color: red;\\n}\\n.json-formatter-row .json-formatter-null {\\n color: #855A00;\\n}\\n.json-formatter-row .json-formatter-undefined {\\n color: #ca0b69;\\n}\\n.json-formatter-row .json-formatter-function {\\n color: #FF20ED;\\n}\\n.json-formatter-row .json-formatter-date {\\n background-color: rgba(0, 0, 0, 0.05);\\n}\\n.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: blue;\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-bracket {\\n color: blue;\\n}\\n.json-formatter-row .json-formatter-key {\\n color: #00008B;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n.json-formatter-dark.json-formatter-row {\\n font-family: monospace;\\n}\\n.json-formatter-dark.json-formatter-row,\\n.json-formatter-dark.json-formatter-row a,\\n.json-formatter-dark.json-formatter-row a:hover {\\n color: white;\\n text-decoration: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-row {\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty {\\n opacity: 0.5;\\n margin-left: 1rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty:after {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-object:after {\\n content: \"No properties\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-children.json-formatter-empty.json-formatter-array:after {\\n content: \"[]\";\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-string,\\n.json-formatter-dark.json-formatter-row .json-formatter-stringifiable {\\n color: #31F031;\\n white-space: pre;\\n word-wrap: break-word;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-number {\\n color: #66C2FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-boolean {\\n color: #EC4242;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-null {\\n color: #EEC97D;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-undefined {\\n color: #ef8fbe;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-function {\\n color: #FD48CB;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-date {\\n background-color: rgba(255, 255, 255, 0.05);\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-url {\\n text-decoration: underline;\\n color: #027BFF;\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-bracket {\\n color: #9494FF;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-key {\\n color: #23A0DB;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler-link {\\n cursor: pointer;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler {\\n line-height: 1.2rem;\\n font-size: 0.7rem;\\n vertical-align: middle;\\n opacity: 0.6;\\n cursor: pointer;\\n padding-right: 0.2rem;\\n}\\n.json-formatter-dark.json-formatter-row .json-formatter-toggler:after {\\n display: inline-block;\\n transition: transform 100ms ease-in;\\n content: \"►\";\\n}\\n.json-formatter-dark.json-formatter-row > a > .json-formatter-preview-text {\\n opacity: 0;\\n transition: opacity 0.15s ease-in;\\n font-style: italic;\\n}\\n.json-formatter-dark.json-formatter-row:hover > a > .json-formatter-preview-text {\\n opacity: 0.6;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-toggler-link .json-formatter-toggler:after {\\n transform: rotate(90deg);\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > .json-formatter-children:after {\\n display: inline-block;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open > a > .json-formatter-preview-text {\\n display: none;\\n}\\n.json-formatter-dark.json-formatter-row.json-formatter-open.json-formatter-empty:after {\\n display: block;\\n}\\n');\n var a = /(^\\d{1,4}[\\.|\\\\/|-]\\d{1,2}[\\.|\\\\/|-]\\d{1,4})(\\s*(?:0?[1-9]:[0-5]|1(?=[012])\\d:[0-5])\\d\\s*[ap]m)?$/, f = /\\d{2}:\\d{2}:\\d{2} GMT-\\d{4}/, m = /\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}.\\d{3}Z/, l = window.requestAnimationFrame || function (t) { return t(), 0; }, d = { hoverPreviewEnabled: !1, hoverPreviewArrayCount: 100, hoverPreviewFieldCount: 5, animateOpen: !0, animateClose: !0, theme: null, useToJSON: !0, sortPropertiesBy: null }, c = function () {\n function c(t, e, r, n) { void 0 === e && (e = 1), void 0 === r && (r = d), this.json = t, this.open = e, this.config = r, this.key = n, this._isOpen = null, void 0 === this.config.hoverPreviewEnabled && (this.config.hoverPreviewEnabled = d.hoverPreviewEnabled), void 0 === this.config.hoverPreviewArrayCount && (this.config.hoverPreviewArrayCount = d.hoverPreviewArrayCount), void 0 === this.config.hoverPreviewFieldCount && (this.config.hoverPreviewFieldCount = d.hoverPreviewFieldCount), void 0 === this.config.useToJSON && (this.config.useToJSON = d.useToJSON), \"\" === this.key && (this.key = '\"\"'); }\n return Object.defineProperty(c.prototype, \"isOpen\", { get: function () { return null !== this._isOpen ? this._isOpen : this.open > 0; }, set: function (t) { this._isOpen = t; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isDate\", { get: function () { return this.json instanceof Date || \"string\" === this.type && (a.test(this.json) || m.test(this.json) || f.test(this.json)); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isUrl\", { get: function () { return \"string\" === this.type && 0 === this.json.indexOf(\"http\"); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isArray\", { get: function () { return Array.isArray(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isObject\", { get: function () { return e(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isEmptyObject\", { get: function () { return !this.keys.length && !this.isArray; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"isEmpty\", { get: function () { return this.isEmptyObject || this.keys && !this.keys.length && this.isArray; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"useToJSON\", { get: function () { return this.config.useToJSON && \"stringifiable\" === this.type; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"hasKey\", { get: function () { return void 0 !== this.key; }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"constructorName\", { get: function () { return r(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"type\", { get: function () { return this.config.useToJSON && this.json && this.json.toJSON ? \"stringifiable\" : t(this.json); }, enumerable: !0, configurable: !0 }), Object.defineProperty(c.prototype, \"keys\", { get: function () {\n if (this.isObject) {\n var t = Object.keys(this.json);\n return !this.isArray && this.config.sortPropertiesBy ? t.sort(this.config.sortPropertiesBy) : t;\n }\n return [];\n }, enumerable: !0, configurable: !0 }), c.prototype.toggleOpen = function () { this.isOpen = !this.isOpen, this.element && (this.isOpen ? this.appendChildren(this.config.animateOpen) : this.removeChildren(this.config.animateClose), this.element.classList.toggle(i(\"open\"))); }, c.prototype.openAtDepth = function (t) { void 0 === t && (t = 1), t < 0 || (this.open = t, this.isOpen = 0 !== t, this.element && (this.removeChildren(!1), 0 === t ? this.element.classList.remove(i(\"open\")) : (this.appendChildren(this.config.animateOpen), this.element.classList.add(i(\"open\"))))); }, c.prototype.getInlinepreview = function () {\n var t = this;\n if (this.isArray)\n return this.json.length > this.config.hoverPreviewArrayCount ? \"Array[\" + this.json.length + \"]\" : \"[\" + this.json.map(o).join(\", \") + \"]\";\n var e = this.keys, r = e.slice(0, this.config.hoverPreviewFieldCount).map((function (e) { return e + \":\" + o(t.json[e]); })), n = e.length >= this.config.hoverPreviewFieldCount ? \"…\" : \"\";\n return \"{\" + r.join(\", \") + n + \"}\";\n }, c.prototype.render = function () {\n this.element = s(\"div\", \"row\");\n var t = this.isObject ? s(\"a\", \"toggler-link\") : s(\"span\");\n if (this.isObject && !this.useToJSON && t.appendChild(s(\"span\", \"toggler\")), this.hasKey && t.appendChild(s(\"span\", \"key\", this.key + \":\")), this.isObject && !this.useToJSON) {\n var e = s(\"span\", \"value\"), r = s(\"span\"), o = s(\"span\", \"constructor-name\", this.constructorName);\n if (r.appendChild(o), this.isArray) {\n var a = s(\"span\");\n a.appendChild(s(\"span\", \"bracket\", \"[\")), a.appendChild(s(\"span\", \"number\", this.json.length)), a.appendChild(s(\"span\", \"bracket\", \"]\")), r.appendChild(a);\n }\n e.appendChild(r), t.appendChild(e);\n }\n else {\n (e = this.isUrl ? s(\"a\") : s(\"span\")).classList.add(i(this.type)), this.isDate && e.classList.add(i(\"date\")), this.isUrl && (e.classList.add(i(\"url\")), e.setAttribute(\"href\", this.json));\n var f = n(this.type, this.json, this.useToJSON ? this.json.toJSON() : this.json);\n e.appendChild(document.createTextNode(f)), t.appendChild(e);\n }\n if (this.isObject && this.config.hoverPreviewEnabled) {\n var m = s(\"span\", \"preview-text\");\n m.appendChild(document.createTextNode(this.getInlinepreview())), t.appendChild(m);\n }\n var l = s(\"div\", \"children\");\n return this.isObject && l.classList.add(i(\"object\")), this.isArray && l.classList.add(i(\"array\")), this.isEmpty && l.classList.add(i(\"empty\")), this.config && this.config.theme && this.element.classList.add(i(this.config.theme)), this.isOpen && this.element.classList.add(i(\"open\")), this.element.appendChild(t), this.element.appendChild(l), this.isObject && this.isOpen && this.appendChildren(), this.isObject && !this.useToJSON && t.addEventListener(\"click\", this.toggleOpen.bind(this)), this.element;\n }, c.prototype.appendChildren = function (t) {\n var e = this;\n void 0 === t && (t = !1);\n var r = this.element.querySelector(\"div.\" + i(\"children\"));\n if (r && !this.isEmpty)\n if (t) {\n var n = 0, o = function () { var t = e.keys[n], i = new c(e.json[t], e.open - 1, e.config, t); r.appendChild(i.render()), (n += 1) < e.keys.length && (n > 10 ? o() : l(o)); };\n l(o);\n }\n else\n this.keys.forEach((function (t) { var n = new c(e.json[t], e.open - 1, e.config, t); r.appendChild(n.render()); }));\n }, c.prototype.removeChildren = function (t) {\n void 0 === t && (t = !1);\n var e = this.element.querySelector(\"div.\" + i(\"children\"));\n if (t) {\n var r = 0, n = function () { e && e.children.length && (e.removeChild(e.children[0]), (r += 1) > 10 ? n() : l(n)); };\n l(n);\n }\n else\n e && (e.innerHTML = \"\");\n }, c;\n }();\n exports.default = c;\n}\n","/* models/jsoneditor.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class JSONEditEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.JSONEditEvent = JSONEditEvent;\n _a = JSONEditEvent;\n JSONEditEvent.__name__ = \"JSONEditEvent\";\n (() => {\n _a.prototype.event_name = \"json_edit\";\n })();\n class JSONEditorView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n const { data, disabled, templates, menu, mode, search, schema } = this.model.properties;\n this.on_change([data], () => this.editor.update(this.model.data));\n this.on_change([templates], () => {\n this.editor.options.templates = this.model.templates;\n });\n this.on_change([menu], () => {\n this.editor.options.menu = this.model.menu;\n });\n this.on_change([search], () => {\n this.editor.options.search = this.model.search;\n });\n this.on_change([schema], () => {\n this.editor.options.schema = this.model.schema;\n });\n this.on_change([disabled, mode], () => {\n const mode = this.model.disabled ? 'view' : this.model.mode;\n this.editor.setMode(mode);\n });\n }\n stylesheets() {\n const styles = super.stylesheets();\n for (const css of this.model.css)\n styles.push(new dom_1.ImportedStyleSheet(css));\n return styles;\n }\n remove() {\n super.remove();\n this.editor.destroy();\n }\n render() {\n super.render();\n const mode = this.model.disabled ? 'view' : this.model.mode;\n this.editor = new window.JSONEditor(this.shadow_el, {\n menu: this.model.menu,\n mode: mode,\n onChangeJSON: (json) => {\n this.model.data = json;\n },\n onSelectionChange: (start, end) => {\n this.model.selection = [start, end];\n },\n search: this.model.search,\n schema: this.model.schema,\n templates: this.model.templates,\n });\n this.editor.set(this.model.data);\n }\n }\n exports.JSONEditorView = JSONEditorView;\n JSONEditorView.__name__ = \"JSONEditorView\";\n class JSONEditor extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.JSONEditor = JSONEditor;\n _b = JSONEditor;\n JSONEditor.__name__ = \"JSONEditor\";\n JSONEditor.__module__ = \"panel.models.jsoneditor\";\n (() => {\n _b.prototype.default_view = JSONEditorView;\n _b.define(({ Any, Array, Boolean, String }) => ({\n css: [Array(String), []],\n data: [Any, {}],\n mode: [String, 'tree'],\n menu: [Boolean, true],\n search: [Boolean, true],\n selection: [Array(Any), []],\n schema: [Any, null],\n templates: [Array(Any), []],\n }));\n })();\n}\n","/* models/katex.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class KaTeXView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => this.render());\n }\n render() {\n super.render();\n this.container.innerHTML = this.model.text;\n if (!window.renderMathInElement) {\n return;\n }\n window.renderMathInElement(this.shadow_el, {\n delimiters: [\n { left: \"$$\", right: \"$$\", display: true },\n { left: \"\\\\[\", right: \"\\\\]\", display: true },\n { left: \"$\", right: \"$\", display: false },\n { left: \"\\\\(\", right: \"\\\\)\", display: false }\n ]\n });\n }\n }\n exports.KaTeXView = KaTeXView;\n KaTeXView.__name__ = \"KaTeXView\";\n class KaTeX extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.KaTeX = KaTeX;\n _a = KaTeX;\n KaTeX.__name__ = \"KaTeX\";\n KaTeX.__module__ = \"panel.models.katex\";\n (() => {\n _a.prototype.default_view = KaTeXView;\n })();\n}\n","/* models/location.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const model_1 = require(\"@bokehjs/model\");\n class LocationView extends view_1.View {\n initialize() {\n super.initialize();\n this.model.pathname = window.location.pathname;\n this.model.search = window.location.search;\n this.model.hash = window.location.hash;\n // Readonly parameters on python side\n this.model.href = window.location.href;\n this.model.hostname = window.location.hostname;\n this.model.protocol = window.location.protocol;\n this.model.port = window.location.port;\n this._hash_listener = () => {\n this.model.hash = window.location.hash;\n };\n window.addEventListener('hashchange', this._hash_listener);\n this._has_finished = true;\n this.notify_finished();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.pathname.change, () => this.update('pathname'));\n this.connect(this.model.properties.search.change, () => this.update('search'));\n this.connect(this.model.properties.hash.change, () => this.update('hash'));\n this.connect(this.model.properties.reload.change, () => this.update('reload'));\n }\n remove() {\n super.remove();\n window.removeEventListener('hashchange', this._hash_listener);\n }\n update(change) {\n if (!this.model.reload || (change === 'reload')) {\n window.history.pushState({}, '', `${this.model.pathname}${this.model.search}${this.model.hash}`);\n this.model.href = window.location.href;\n if (change === 'reload')\n window.location.reload();\n }\n else {\n if (change == 'pathname')\n window.location.pathname = this.model.pathname;\n if (change == 'search')\n window.location.search = this.model.search;\n if (change == 'hash')\n window.location.hash = this.model.hash;\n }\n }\n }\n exports.LocationView = LocationView;\n LocationView.__name__ = \"LocationView\";\n class Location extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Location = Location;\n _a = Location;\n Location.__name__ = \"Location\";\n Location.__module__ = \"panel.models.location\";\n (() => {\n _a.prototype.default_view = LocationView;\n _a.define(({ Boolean, String }) => ({\n href: [String, \"\"],\n hostname: [String, \"\"],\n pathname: [String, \"\"],\n protocol: [String, \"\"],\n port: [String, \"\"],\n search: [String, \"\"],\n hash: [String, \"\"],\n reload: [Boolean, false],\n }));\n })();\n}\n","/* models/mathjax.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class MathJaxView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.text.change, () => this.render());\n }\n render() {\n super.render();\n this.container.innerHTML = this.has_math_disabled() ? this.model.text : this.process_tex(this.model.text);\n }\n }\n exports.MathJaxView = MathJaxView;\n MathJaxView.__name__ = \"MathJaxView\";\n class MathJax extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.MathJax = MathJax;\n _a = MathJax;\n MathJax.__name__ = \"MathJax\";\n MathJax.__module__ = \"panel.models.mathjax\";\n (() => {\n _a.prototype.default_view = MathJaxView;\n })();\n}\n","/* models/pdf.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const markup_1 = require(\"@bokehjs/models/widgets/markup\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const html_1 = require(\"3db2e41978\") /* ./html */;\n class PDFView extends layout_1.PanelMarkupView {\n connect_signals() {\n super.connect_signals();\n const p = this.model.properties;\n const { text, width, height, embed, start_page } = p;\n this.on_change([text, width, height, embed, start_page], () => {\n this.update();\n });\n }\n render() {\n super.render();\n this.update();\n }\n update() {\n if (this.model.embed) {\n const blob = this.convert_base64_to_blob();\n const url = URL.createObjectURL(blob);\n const w = this.model.width || \"100%\";\n const h = this.model.height || \"100%\";\n this.container.innerHTML = `<embed src=\"${url}#page=${this.model.start_page}\" type=\"application/pdf\" width=\"${w}\" height=\"${h}\"></embed>`;\n }\n else {\n const html = (0, html_1.htmlDecode)(this.model.text);\n this.container.innerHTML = html || \"\";\n }\n }\n convert_base64_to_blob() {\n const byteCharacters = atob(this.model.text);\n const sliceSize = 512;\n var byteArrays = [];\n for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) {\n const slice = byteCharacters.slice(offset, offset + sliceSize);\n const byteNumbers = new Uint8Array(slice.length);\n for (let i = 0; i < slice.length; i++) {\n byteNumbers[i] = slice.charCodeAt(i);\n }\n byteArrays.push(byteNumbers);\n }\n return new Blob(byteArrays, { type: \"application/pdf\" });\n }\n }\n exports.PDFView = PDFView;\n PDFView.__name__ = \"PDFView\";\n class PDF extends markup_1.Markup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PDF = PDF;\n _a = PDF;\n PDF.__name__ = \"PDF\";\n PDF.__module__ = \"panel.models.markup\";\n (() => {\n _a.prototype.default_view = PDFView;\n _a.define(({ Number, Boolean }) => ({\n embed: [Boolean, true],\n start_page: [Number, 1],\n }));\n })();\n}\n","/* models/perspective.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const THEMES = {\n 'material-dark': 'Material Dark',\n 'material': 'Material Light',\n 'vaporwave': 'Vaporwave',\n 'solarized': 'Solarized',\n 'solarized-dark': 'Solarized Dark',\n 'monokai': 'Monokai'\n };\n const PLUGINS = {\n 'datagrid': 'Datagrid',\n 'd3_x_bar': 'X Bar',\n 'd3_y_bar': 'Y Bar',\n 'd3_xy_line': 'X/Y Line',\n 'd3_y_line': 'Y Line',\n 'd3_y_area': 'Y Area',\n 'd3_y_scatter': 'Y Scatter',\n 'd3_xy_scatter': 'X/Y Scatter',\n 'd3_treemap': 'Treemap',\n 'd3_candlestick': 'Candlestick',\n 'd3_sunburst': 'Sunburst',\n 'd3_heatmap': 'Heatmap',\n 'd3_ohlc': 'OHLC'\n };\n function objectFlip(obj) {\n const ret = {};\n Object.keys(obj).forEach(key => {\n ret[obj[key]] = key;\n });\n return ret;\n }\n const PLUGINS_REVERSE = objectFlip(PLUGINS);\n const THEMES_REVERSE = objectFlip(THEMES);\n class PerspectiveClickEvent extends bokeh_events_1.ModelEvent {\n constructor(config, column_names, row) {\n super();\n this.config = config;\n this.column_names = column_names;\n this.row = row;\n }\n get event_values() {\n return { model: this.origin, config: this.config, column_names: this.column_names, row: this.row };\n }\n }\n exports.PerspectiveClickEvent = PerspectiveClickEvent;\n _a = PerspectiveClickEvent;\n PerspectiveClickEvent.__name__ = \"PerspectiveClickEvent\";\n (() => {\n _a.prototype.event_name = \"perspective-click\";\n })();\n class PerspectiveView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._updating = false;\n this._config_listener = null;\n this._current_config = null;\n this._loaded = false;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.source.properties.data.change, () => this.setData());\n this.connect(this.model.source.streaming, () => this.stream());\n this.connect(this.model.source.patching, () => this.patch());\n this.connect(this.model.properties.schema.change, () => {\n this.worker.table(this.model.schema).then((table) => {\n this.table = table;\n this.table.update(this.data);\n this.perspective_element.load(this.table);\n });\n });\n this.connect(this.model.properties.toggle_config.change, () => {\n this.perspective_element.toggleConfig();\n });\n this.connect(this.model.properties.columns.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"columns\": this.model.columns });\n });\n this.connect(this.model.properties.expressions.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"expressions\": this.model.expressions });\n });\n this.connect(this.model.properties.split_by.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"split_by\": this.model.split_by });\n });\n this.connect(this.model.properties.group_by.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"group_by\": this.model.group_by });\n });\n this.connect(this.model.properties.aggregates.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"aggregates\": this.model.aggregates });\n });\n this.connect(this.model.properties.filters.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"filter\": this.model.filters });\n });\n this.connect(this.model.properties.sort.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"sort\": this.model.sort });\n });\n this.connect(this.model.properties.plugin.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin\": PLUGINS[this.model.plugin] });\n });\n this.connect(this.model.properties.selectable.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin_config\": Object.assign(Object.assign({}, this._current_config), { selectable: this.model.selectable }) });\n });\n this.connect(this.model.properties.editable.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"plugin_config\": Object.assign(Object.assign({}, this._current_config), { editable: this.model.editable }) });\n });\n this.connect(this.model.properties.theme.change, () => {\n if (this._updating)\n return;\n this.perspective_element.restore({ \"theme\": THEMES[this.model.theme] }).catch(() => { });\n });\n }\n disconnect_signals() {\n if (this._config_listener != null)\n this.perspective_element.removeEventListener(\"perspective-config-update\", this._config_listener);\n this._config_listener = null;\n super.disconnect_signals();\n }\n remove() {\n this.perspective_element.delete(() => this.worker.terminate());\n super.remove();\n }\n render() {\n super.render();\n this.worker = window.perspective.worker();\n const container = (0, dom_1.div)({\n class: \"pnx-perspective-viewer\",\n style: {\n zIndex: 0,\n }\n });\n container.innerHTML = \"<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>\";\n this.perspective_element = container.children[0];\n this.perspective_element.resetThemes([...Object.values(THEMES)]).catch(() => { });\n if (this.model.toggle_config)\n this.perspective_element.toggleConfig();\n (0, layout_1.set_size)(container, this.model);\n this.shadow_el.appendChild(container);\n this.worker.table(this.model.schema).then((table) => {\n this.table = table;\n this.table.update(this.data);\n this.perspective_element.load(this.table);\n const plugin_config = Object.assign(Object.assign({}, this.model.plugin_config), { editable: this.model.editable, selectable: this.model.selectable });\n this.perspective_element.restore({\n aggregates: this.model.aggregates,\n columns: this.model.columns,\n expressions: this.model.expressions,\n filter: this.model.filters,\n split_by: this.model.split_by,\n group_by: this.model.group_by,\n plugin: PLUGINS[this.model.plugin],\n plugin_config: plugin_config,\n sort: this.model.sort,\n theme: THEMES[this.model.theme]\n }).catch(() => { });\n this.perspective_element.save().then((config) => {\n this._current_config = config;\n });\n this._config_listener = () => this.sync_config();\n this.perspective_element.addEventListener(\"perspective-config-update\", this._config_listener);\n this.perspective_element.addEventListener(\"perspective-click\", (event) => {\n this.model.trigger_event(new PerspectiveClickEvent(event.detail.config, event.detail.column_names, event.detail.row));\n });\n this._loaded = true;\n });\n }\n sync_config() {\n if (this._updating)\n return true;\n this.perspective_element.save().then((config) => {\n this._current_config = config;\n const props = {};\n for (let option in config) {\n let value = config[option];\n if (value === undefined || (option == 'plugin' && value === \"debug\") || option === 'settings')\n continue;\n if (option === 'filter')\n option = 'filters';\n else if (option === 'plugin')\n value = PLUGINS_REVERSE[value];\n else if (option === 'theme')\n value = THEMES_REVERSE[value];\n props[option] = value;\n }\n this._updating = true;\n this.model.setv(props);\n this._updating = false;\n });\n return true;\n }\n get data() {\n const data = {};\n for (const column of this.model.source.columns())\n data[column] = this.model.source.get_array(column);\n return data;\n }\n setData() {\n if (!this._loaded)\n return;\n for (const col of this.model.source.columns()) {\n if (!(col in this.model.schema))\n return;\n }\n this.table.replace(this.data);\n }\n stream() {\n if (this._loaded)\n this.table.replace(this.data);\n }\n patch() {\n if (this._loaded)\n this.table.replace(this.data);\n }\n }\n exports.PerspectiveView = PerspectiveView;\n PerspectiveView.__name__ = \"PerspectiveView\";\n class Perspective extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Perspective = Perspective;\n _b = Perspective;\n Perspective.__name__ = \"Perspective\";\n Perspective.__module__ = \"panel.models.perspective\";\n (() => {\n _b.prototype.default_view = PerspectiveView;\n _b.define(({ Any, Array, Boolean, Ref, Nullable, String }) => ({\n aggregates: [Any, {}],\n columns: [Array(Nullable(String)), []],\n expressions: [Nullable(Array(String)), null],\n split_by: [Nullable(Array(String)), null],\n editable: [Boolean, true],\n filters: [Nullable(Array(Any)), null],\n group_by: [Nullable(Array(String)), null],\n plugin: [String,],\n plugin_config: [Any, {}],\n selectable: [Boolean, true],\n schema: [Any, {}],\n toggle_config: [Boolean, true],\n sort: [Nullable(Array(Array(String))), null],\n source: [Ref(column_data_source_1.ColumnDataSource),],\n theme: [String, 'material']\n }));\n })();\n}\n","/* models/player.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const widget_1 = require(\"@bokehjs/models/widgets/widget\");\n function press(btn_list) {\n btn_list.forEach((btn) => btn.style.borderStyle = 'inset');\n }\n function unpress(btn_list) {\n btn_list.forEach((btn) => btn.style.borderStyle = 'outset');\n }\n class PlayerView extends widget_1.WidgetView {\n constructor() {\n super(...arguments);\n this._changing = false;\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.direction.change, () => this.set_direction());\n this.connect(this.model.properties.value.change, () => this.render());\n this.connect(this.model.properties.loop_policy.change, () => this.set_loop_state(this.model.loop_policy));\n this.connect(this.model.properties.disabled.change, () => this.toggle_disable());\n this.connect(this.model.properties.show_loop_controls.change, () => {\n if (this.model.show_loop_controls && this.loop_state.parentNode != this.groupEl)\n this.groupEl.appendChild(this.loop_state);\n else if (!this.model.show_loop_controls && this.loop_state.parentNode == this.groupEl)\n this.groupEl.removeChild(this.loop_state);\n });\n }\n toggle_disable() {\n this.sliderEl.disabled = this.model.disabled;\n for (const el of this.buttonEl.children) {\n const anyEl = el;\n anyEl.disabled = this.model.disabled;\n }\n for (const el of this.loop_state.children) {\n if (el.tagName == \"input\") {\n const anyEl = el;\n anyEl.disabled = this.model.disabled;\n }\n }\n }\n get_height() {\n return 250;\n }\n render() {\n if (this.sliderEl == null) {\n super.render();\n }\n else {\n this.sliderEl.min = String(this.model.start);\n this.sliderEl.max = String(this.model.end);\n this.sliderEl.value = String(this.model.value);\n return;\n }\n // Layout to group the elements\n this.groupEl = (0, dom_1.div)();\n this.groupEl.style.display = \"flex\";\n this.groupEl.style.flexDirection = \"column\";\n this.groupEl.style.alignItems = \"center\";\n // Slider\n this.sliderEl = document.createElement('input');\n this.sliderEl.style.width = \"100%\";\n this.sliderEl.setAttribute(\"type\", \"range\");\n this.sliderEl.value = String(this.model.value);\n this.sliderEl.min = String(this.model.start);\n this.sliderEl.max = String(this.model.end);\n this.sliderEl.addEventListener('input', (ev) => {\n this.set_frame(parseInt(ev.target.value), false);\n });\n this.sliderEl.addEventListener('change', (ev) => {\n this.set_frame(parseInt(ev.target.value));\n });\n // Buttons\n const button_div = (0, dom_1.div)();\n this.buttonEl = button_div;\n button_div.style.cssText = \"margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;\";\n const button_style_small = \"text-align: center; min-width: 20px; flex-grow: 1; margin: 2px\";\n const button_style = \"text-align: center; min-width: 40px; flex-grow: 2; margin: 2px\";\n const slower = document.createElement('button');\n slower.style.cssText = button_style_small;\n slower.appendChild(document.createTextNode('–'));\n slower.onclick = () => this.slower();\n button_div.appendChild(slower);\n const first = document.createElement('button');\n first.style.cssText = button_style;\n first.appendChild(document.createTextNode('\\u275a\\u25c0\\u25c0'));\n first.onclick = () => this.first_frame();\n button_div.appendChild(first);\n const previous = document.createElement('button');\n previous.style.cssText = button_style;\n previous.appendChild(document.createTextNode('\\u275a\\u25c0'));\n previous.onclick = () => this.previous_frame();\n button_div.appendChild(previous);\n const reverse = document.createElement('button');\n reverse.style.cssText = button_style;\n reverse.appendChild(document.createTextNode('\\u25c0'));\n reverse.onclick = () => this.reverse_animation();\n button_div.appendChild(reverse);\n const pause = document.createElement('button');\n pause.style.cssText = button_style;\n pause.appendChild(document.createTextNode('\\u275a\\u275a'));\n pause.onclick = () => this.pause_animation();\n button_div.appendChild(pause);\n const play = document.createElement('button');\n play.style.cssText = button_style;\n play.appendChild(document.createTextNode('\\u25b6'));\n play.onclick = () => this.play_animation();\n button_div.appendChild(play);\n const next = document.createElement('button');\n next.style.cssText = button_style;\n next.appendChild(document.createTextNode('\\u25b6\\u275a'));\n next.onclick = () => this.next_frame();\n button_div.appendChild(next);\n const last = document.createElement('button');\n last.style.cssText = button_style;\n last.appendChild(document.createTextNode('\\u25b6\\u25b6\\u275a'));\n last.onclick = () => this.last_frame();\n button_div.appendChild(last);\n const faster = document.createElement('button');\n faster.style.cssText = button_style_small;\n faster.appendChild(document.createTextNode('+'));\n faster.onclick = () => this.faster();\n button_div.appendChild(faster);\n // toggle\n this._toggle_reverse = () => {\n unpress([pause, play]);\n press([reverse]);\n };\n this._toogle_pause = () => {\n unpress([reverse, play]);\n press([pause]);\n };\n this._toggle_play = () => {\n unpress([reverse, pause]);\n press([play]);\n };\n // Loop control\n this.loop_state = document.createElement('form');\n this.loop_state.style.cssText = \"margin: 0 auto; display: table\";\n const once = document.createElement('input');\n once.type = \"radio\";\n once.value = \"once\";\n once.name = \"state\";\n const once_label = document.createElement('label');\n once_label.innerHTML = \"Once\";\n once_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n const loop = document.createElement('input');\n loop.setAttribute(\"type\", \"radio\");\n loop.setAttribute(\"value\", \"loop\");\n loop.setAttribute(\"name\", \"state\");\n const loop_label = document.createElement('label');\n loop_label.innerHTML = \"Loop\";\n loop_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n const reflect = document.createElement('input');\n reflect.setAttribute(\"type\", \"radio\");\n reflect.setAttribute(\"value\", \"reflect\");\n reflect.setAttribute(\"name\", \"state\");\n const reflect_label = document.createElement('label');\n reflect_label.innerHTML = \"Reflect\";\n reflect_label.style.cssText = \"padding: 0 10px 0 5px; user-select:none;\";\n if (this.model.loop_policy == \"once\")\n once.checked = true;\n else if (this.model.loop_policy == \"loop\")\n loop.checked = true;\n else\n reflect.checked = true;\n // Compose everything\n this.loop_state.appendChild(once);\n this.loop_state.appendChild(once_label);\n this.loop_state.appendChild(loop);\n this.loop_state.appendChild(loop_label);\n this.loop_state.appendChild(reflect);\n this.loop_state.appendChild(reflect_label);\n this.groupEl.appendChild(this.sliderEl);\n this.groupEl.appendChild(button_div);\n if (this.model.show_loop_controls)\n this.groupEl.appendChild(this.loop_state);\n this.toggle_disable();\n this.shadow_el.appendChild(this.groupEl);\n }\n set_frame(frame, throttled = true) {\n this.model.value = frame;\n if (throttled)\n this.model.value_throttled = frame;\n if (this.sliderEl.value != String(frame))\n this.sliderEl.value = String(frame);\n }\n get_loop_state() {\n var button_group = this.loop_state.state;\n for (var i = 0; i < button_group.length; i++) {\n var button = button_group[i];\n if (button.checked)\n return button.value;\n }\n return \"once\";\n }\n set_loop_state(state) {\n var button_group = this.loop_state.state;\n for (var i = 0; i < button_group.length; i++) {\n var button = button_group[i];\n if (button.value == state)\n button.checked = true;\n }\n }\n next_frame() {\n this.set_frame(Math.min(this.model.end, this.model.value + this.model.step));\n }\n previous_frame() {\n this.set_frame(Math.max(this.model.start, this.model.value - this.model.step));\n }\n first_frame() {\n this.set_frame(this.model.start);\n }\n last_frame() {\n this.set_frame(this.model.end);\n }\n slower() {\n this.model.interval = Math.round(this.model.interval / 0.7);\n if (this.model.direction > 0)\n this.play_animation();\n else if (this.model.direction < 0)\n this.reverse_animation();\n }\n faster() {\n this.model.interval = Math.round(this.model.interval * 0.7);\n if (this.model.direction > 0)\n this.play_animation();\n else if (this.model.direction < 0)\n this.reverse_animation();\n }\n anim_step_forward() {\n if (this.model.value < this.model.end) {\n this.next_frame();\n }\n else {\n var loop_state = this.get_loop_state();\n if (loop_state == \"loop\") {\n this.first_frame();\n }\n else if (loop_state == \"reflect\") {\n this.last_frame();\n this.reverse_animation();\n }\n else {\n this.pause_animation();\n this.last_frame();\n }\n }\n }\n anim_step_reverse() {\n if (this.model.value > this.model.start) {\n this.previous_frame();\n }\n else {\n var loop_state = this.get_loop_state();\n if (loop_state == \"loop\") {\n this.last_frame();\n }\n else if (loop_state == \"reflect\") {\n this.first_frame();\n this.play_animation();\n }\n else {\n this.pause_animation();\n this.first_frame();\n }\n }\n }\n set_direction() {\n if (this._changing)\n return;\n else if (this.model.direction === 0)\n this.pause_animation();\n else if (this.model.direction === 1)\n this.play_animation();\n else if (this.model.direction === -1)\n this.reverse_animation();\n }\n pause_animation() {\n this._toogle_pause();\n this._changing = true;\n this.model.direction = 0;\n this._changing = false;\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n play_animation() {\n this.pause_animation();\n this._toggle_play();\n this._changing = true;\n this.model.direction = 1;\n this._changing = false;\n if (!this.timer)\n this.timer = setInterval(() => this.anim_step_forward(), this.model.interval);\n }\n reverse_animation() {\n this.pause_animation();\n this._toggle_reverse();\n this._changing = true;\n this.model.direction = -1;\n this._changing = false;\n if (!this.timer)\n this.timer = setInterval(() => this.anim_step_reverse(), this.model.interval);\n }\n }\n exports.PlayerView = PlayerView;\n PlayerView.__name__ = \"PlayerView\";\n exports.LoopPolicy = (0, kinds_1.Enum)(\"once\", \"loop\", \"reflect\");\n class Player extends widget_1.Widget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Player = Player;\n _a = Player;\n Player.__name__ = \"Player\";\n Player.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = PlayerView;\n _a.define(({ Boolean, Int }) => ({\n direction: [Int, 0],\n interval: [Int, 500],\n start: [Int, 0],\n end: [Int, 10],\n step: [Int, 1],\n loop_policy: [exports.LoopPolicy, \"once\"],\n value: [Int, 0],\n value_throttled: [Int, 0],\n show_loop_controls: [Boolean, true],\n }));\n _a.override({ width: 400 });\n })();\n}\n","/* models/plotly.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const eq_1 = require(\"@bokehjs/core/util/eq\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const util_1 = require(\"990b5dd5c7\") /* ./util */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function convertUndefined(obj) {\n Object\n .entries(obj)\n .forEach(([key, value]) => {\n if (!!value && (typeof value === 'object')) {\n convertUndefined(value);\n }\n else if (value === undefined) {\n obj[key] = null;\n }\n });\n return obj;\n }\n const filterEventData = (gd, eventData, event) => {\n // Ported from dash-core-components/src/components/Graph.react.js\n let filteredEventData = Array.isArray(eventData) ? [] : {};\n if (event === \"click\" || event === \"hover\" || event === \"selected\") {\n const points = [];\n if (eventData === undefined || eventData === null) {\n return null;\n }\n /*\n * remove `data`, `layout`, `xaxis`, etc\n * objects from the event data since they're so big\n * and cause JSON stringify circular structure errors.\n *\n * also, pull down the `customdata` point from the data array\n * into the event object\n */\n const data = gd.data;\n for (let i = 0; i < eventData.points.length; i++) {\n const fullPoint = eventData.points[i];\n let pointData = {};\n for (let property in fullPoint) {\n const val = fullPoint[property];\n if (fullPoint.hasOwnProperty(property) &&\n !Array.isArray(val) && !(0, util_1.isPlainObject)(val) &&\n val !== undefined) {\n pointData[property] = val;\n }\n }\n if (fullPoint !== undefined && fullPoint !== null) {\n if (fullPoint.hasOwnProperty(\"curveNumber\") &&\n fullPoint.hasOwnProperty(\"pointNumber\") &&\n data[fullPoint[\"curveNumber\"]].hasOwnProperty(\"customdata\")) {\n pointData[\"customdata\"] =\n data[fullPoint[\"curveNumber\"]].customdata[fullPoint[\"pointNumber\"]];\n }\n // specific to histogram. see https://github.com/plotly/plotly.js/pull/2113/\n if (fullPoint.hasOwnProperty('pointNumbers')) {\n pointData[\"pointNumbers\"] = fullPoint.pointNumbers;\n }\n }\n points[i] = pointData;\n }\n filteredEventData[\"points\"] = points;\n }\n else if (event === 'relayout' || event === 'restyle') {\n /*\n * relayout shouldn't include any big objects\n * it will usually just contain the ranges of the axes like\n * \"xaxis.range[0]\": 0.7715822247381828,\n * \"xaxis.range[1]\": 3.0095292008680063`\n */\n for (let property in eventData) {\n if (eventData.hasOwnProperty(property)) {\n filteredEventData[property] = eventData[property];\n }\n }\n }\n if (eventData.hasOwnProperty('range')) {\n filteredEventData[\"range\"] = eventData[\"range\"];\n }\n if (eventData.hasOwnProperty('lassoPoints')) {\n filteredEventData[\"lassoPoints\"] = eventData[\"lassoPoints\"];\n }\n return convertUndefined(filteredEventData);\n };\n const _isHidden = (gd) => {\n var display = window.getComputedStyle(gd).display;\n return !display || display === 'none';\n };\n class PlotlyPlotView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._settingViewport = false;\n this._plotInitialized = false;\n this._rendered = false;\n this._reacting = false;\n this._relayouting = false;\n this._end_relayouting = (0, debounce_1.debounce)(() => {\n this._relayouting = false;\n }, 2000, false);\n }\n connect_signals() {\n super.connect_signals();\n const { data, data_sources, layout, relayout, restyle } = this.model.properties;\n this.on_change([data, data_sources, layout], () => {\n const render_count = this.model._render_count;\n setTimeout(() => {\n if (this.model._render_count === render_count)\n this.model._render_count += 1;\n }, 250);\n });\n this.on_change([relayout], () => {\n if (this.model.relayout == null)\n return;\n window.Plotly.relayout(this.container, this.model.relayout);\n this.model.relayout = null;\n });\n this.on_change([restyle], () => {\n if (this.model.restyle == null)\n return;\n window.Plotly.restyle(this.container, this.model.restyle.data, this.model.restyle.traces);\n this.model.restyle = null;\n });\n this.connect(this.model.properties.viewport_update_policy.change, () => {\n this._updateSetViewportFunction();\n });\n this.connect(this.model.properties.viewport_update_throttle.change, () => {\n this._updateSetViewportFunction();\n });\n this.connect(this.model.properties._render_count.change, () => {\n this.plot();\n });\n this.connect(this.model.properties.frames.change, () => {\n this.plot(true);\n });\n this.connect(this.model.properties.viewport.change, () => this._updateViewportFromProperty());\n }\n remove() {\n window.Plotly.purge(this.container);\n super.remove();\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)();\n (0, layout_1.set_size)(this.container, this.model);\n this._rendered = false;\n this.shadow_el.appendChild(this.container);\n this.watch_stylesheets();\n this.plot().then(() => {\n this._rendered = true;\n if (this.model.relayout != null)\n window.Plotly.relayout(this.container, this.model.relayout);\n window.Plotly.Plots.resize(this.container);\n });\n }\n style_redraw() {\n if (this._rendered)\n window.Plotly.Plots.resize(this.container);\n }\n after_layout() {\n super.after_layout();\n if (this._rendered)\n window.Plotly.Plots.resize(this.container);\n }\n _trace_data() {\n const data = [];\n for (let i = 0; i < this.model.data.length; i++)\n data.push(this._get_trace(i, false));\n return data;\n }\n _layout_data() {\n const newLayout = (0, util_1.deepCopy)(this.model.layout);\n if (this._relayouting) {\n const { layout } = this.container;\n // For each xaxis* and yaxis* property of layout, if the value has a 'range'\n // property then use this in newLayout\n Object.keys(layout).reduce((value, key) => {\n if (key.slice(1, 5) === \"axis\" && 'range' in value) {\n newLayout[key].range = value.range;\n }\n }, {});\n }\n return newLayout;\n }\n _install_callbacks() {\n // - plotly_relayout\n this.container.on('plotly_relayout', (eventData) => {\n if (eventData['_update_from_property'] !== true) {\n this.model.relayout_data = filterEventData(this.container, eventData, 'relayout');\n this._updateViewportProperty();\n this._end_relayouting();\n }\n });\n // - plotly_relayouting\n this.container.on('plotly_relayouting', () => {\n if (this.model.viewport_update_policy !== 'mouseup') {\n this._relayouting = true;\n this._updateViewportProperty();\n }\n });\n // - plotly_restyle\n this.container.on('plotly_restyle', (eventData) => {\n this.model.restyle_data = filterEventData(this.container, eventData, 'restyle');\n this._updateViewportProperty();\n });\n // - plotly_click\n this.container.on('plotly_click', (eventData) => {\n this.model.click_data = filterEventData(this.container, eventData, 'click');\n });\n // - plotly_hover\n this.container.on('plotly_hover', (eventData) => {\n this.model.hover_data = filterEventData(this.container, eventData, 'hover');\n });\n // - plotly_selected\n this.container.on('plotly_selected', (eventData) => {\n this.model.selected_data = filterEventData(this.container, eventData, 'selected');\n });\n // - plotly_clickannotation\n this.container.on('plotly_clickannotation', (eventData) => {\n delete eventData[\"event\"];\n delete eventData[\"fullAnnotation\"];\n this.model.clickannotation_data = eventData;\n });\n // - plotly_deselect\n this.container.on('plotly_deselect', () => {\n this.model.selected_data = null;\n });\n // - plotly_unhover\n this.container.on('plotly_unhover', () => {\n this.model.hover_data = null;\n });\n }\n async plot(new_plot = false) {\n if (!window.Plotly)\n return;\n const data = this._trace_data();\n const newLayout = this._layout_data();\n this._reacting = true;\n if (new_plot) {\n const obj = { data: data, layout: newLayout, config: this.model.config, frames: this.model.frames };\n await window.Plotly.newPlot(this.container, obj);\n }\n else {\n await window.Plotly.react(this.container, data, newLayout, this.model.config);\n if (this.model.frames != null)\n await window.Plotly.addFrames(this.container, this.model.frames);\n }\n this._updateSetViewportFunction();\n this._updateViewportProperty();\n if (!this._plotInitialized)\n this._install_callbacks();\n else if (!_isHidden(this.container))\n window.Plotly.Plots.resize(this.container);\n this._reacting = false;\n this._plotInitialized = true;\n }\n _get_trace(index, update) {\n const trace = (0, object_1.clone)(this.model.data[index]);\n const cds = this.model.data_sources[index];\n for (const column of cds.columns()) {\n let array = cds.get_array(column)[0];\n if (array.shape != null && array.shape.length > 1) {\n const arrays = [];\n const shape = array.shape;\n for (let s = 0; s < shape[0]; s++) {\n arrays.push(array.slice(s * shape[1], (s + 1) * shape[1]));\n }\n array = arrays;\n }\n let prop_path = column.split(\".\");\n let prop = prop_path[prop_path.length - 1];\n let prop_parent = trace;\n for (let k of prop_path.slice(0, -1)) {\n prop_parent = prop_parent[k];\n }\n if (update && prop_path.length == 1) {\n prop_parent[prop] = [array];\n }\n else {\n prop_parent[prop] = array;\n }\n }\n return trace;\n }\n _updateViewportFromProperty() {\n if (!window.Plotly || this._settingViewport || this._reacting || !this.model.viewport) {\n return;\n }\n const fullLayout = this.container._fullLayout;\n // Call relayout if viewport differs from fullLayout\n Object.keys(this.model.viewport).reduce((value, key) => {\n if (!(0, eq_1.is_equal)((0, util_1.get)(fullLayout, key), value)) {\n let clonedViewport = (0, util_1.deepCopy)(this.model.viewport);\n clonedViewport['_update_from_property'] = true;\n this._settingViewport = true;\n window.Plotly.relayout(this.el, clonedViewport).then(() => {\n this._settingViewport = false;\n });\n return false;\n }\n else {\n return true;\n }\n }, {});\n }\n _updateViewportProperty() {\n const fullLayout = this.container._fullLayout;\n let viewport = {};\n // Get range for all xaxis and yaxis properties\n for (let prop in fullLayout) {\n if (!fullLayout.hasOwnProperty(prop))\n continue;\n let maybe_axis = prop.slice(0, 5);\n if (maybe_axis === 'xaxis' || maybe_axis === 'yaxis')\n viewport[prop + '.range'] = (0, util_1.deepCopy)(fullLayout[prop].range);\n }\n if (!(0, eq_1.is_equal)(viewport, this.model.viewport))\n this._setViewport(viewport);\n }\n _updateSetViewportFunction() {\n if (this.model.viewport_update_policy === \"continuous\" ||\n this.model.viewport_update_policy === \"mouseup\") {\n this._setViewport = (viewport) => {\n if (!this._settingViewport) {\n this._settingViewport = true;\n this.model.viewport = viewport;\n this._settingViewport = false;\n }\n };\n }\n else {\n this._setViewport = (0, util_1.throttle)((viewport) => {\n if (!this._settingViewport) {\n this._settingViewport = true;\n this.model.viewport = viewport;\n this._settingViewport = false;\n }\n }, this.model.viewport_update_throttle);\n }\n }\n }\n exports.PlotlyPlotView = PlotlyPlotView;\n PlotlyPlotView.__name__ = \"PlotlyPlotView\";\n class PlotlyPlot extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.PlotlyPlot = PlotlyPlot;\n _a = PlotlyPlot;\n PlotlyPlot.__name__ = \"PlotlyPlot\";\n PlotlyPlot.__module__ = \"panel.models.plotly\";\n (() => {\n _a.prototype.default_view = PlotlyPlotView;\n _a.define(({ Array, Any, Nullable, Number, Ref, String }) => ({\n data: [Array(Any), []],\n layout: [Any, {}],\n config: [Any, {}],\n frames: [Nullable(Array(Any)), null],\n data_sources: [Array(Ref(column_data_source_1.ColumnDataSource)), []],\n relayout: [Nullable(Any), {}],\n restyle: [Nullable(Any), {}],\n relayout_data: [Any, {}],\n restyle_data: [Array(Any), []],\n click_data: [Any, {}],\n hover_data: [Any, {}],\n clickannotation_data: [Any, {}],\n selected_data: [Any, {}],\n viewport: [Any, {}],\n viewport_update_policy: [String, \"mouseup\"],\n viewport_update_throttle: [Number, 200],\n _render_count: [Number, 0],\n }));\n })();\n}\n","/* models/util.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const get = (obj, path, defaultValue = undefined) => {\n const travel = (regexp) => String.prototype.split\n .call(path, regexp)\n .filter(Boolean)\n .reduce((res, key) => (res !== null && res !== undefined ? res[key] : res), obj);\n const result = travel(/[,[\\]]+?/) || travel(/[,[\\].]+?/);\n return result === undefined || result === obj ? defaultValue : result;\n };\n exports.get = get;\n function throttle(func, timeFrame) {\n var lastTime = 0;\n return function () {\n var now = Number(new Date());\n if (now - lastTime >= timeFrame) {\n func();\n lastTime = now;\n }\n };\n }\n exports.throttle = throttle;\n function deepCopy(obj) {\n var copy;\n // Handle the 3 simple types, and null or undefined\n if (null == obj || \"object\" != typeof obj)\n return obj;\n // Handle Array\n if (obj instanceof Array) {\n copy = [];\n for (var i = 0, len = obj.length; i < len; i++) {\n copy[i] = deepCopy(obj[i]);\n }\n return copy;\n }\n // Handle Object\n if (obj instanceof Object) {\n const copy = {};\n for (const attr in obj) {\n const key = attr;\n if (obj.hasOwnProperty(key))\n copy[key] = deepCopy(obj[key]);\n }\n return copy;\n }\n throw new Error(\"Unable to copy obj! Its type isn't supported.\");\n }\n exports.deepCopy = deepCopy;\n function isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n }\n exports.isPlainObject = isPlainObject;\n}\n","/* models/progress.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class ProgressView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n const render = () => this.render();\n this.connect(this.model.properties.height.change, render);\n this.connect(this.model.properties.width.change, render);\n this.connect(this.model.properties.height_policy.change, render);\n this.connect(this.model.properties.width_policy.change, render);\n this.connect(this.model.properties.sizing_mode.change, render);\n this.connect(this.model.properties.active.change, () => this.setCSS());\n this.connect(this.model.properties.bar_color.change, () => this.setCSS());\n this.connect(this.model.properties.css_classes.change, () => this.setCSS());\n this.connect(this.model.properties.value.change, () => this.setValue());\n this.connect(this.model.properties.max.change, () => this.setMax());\n }\n render() {\n super.render();\n const style = Object.assign(Object.assign({}, this.model.styles), { display: \"inline-block\" });\n this.progressEl = document.createElement('progress');\n this.setValue();\n this.setMax();\n // Set styling\n this.setCSS();\n for (const prop in style)\n this.progressEl.style.setProperty(prop, style[prop]);\n this.shadow_el.appendChild(this.progressEl);\n }\n stylesheets() {\n const styles = super.stylesheets();\n for (const css of this.model.css)\n styles.push(new dom_1.ImportedStyleSheet(css));\n return styles;\n }\n setCSS() {\n let css = this.model.css_classes.join(\" \") + \" \" + this.model.bar_color;\n if (this.model.active)\n css = css + \" active\";\n this.progressEl.className = css;\n }\n setValue() {\n if (this.model.value == null)\n this.progressEl.value = 0;\n else if (this.model.value >= 0)\n this.progressEl.value = this.model.value;\n else if (this.model.value < 0)\n this.progressEl.removeAttribute(\"value\");\n }\n setMax() {\n if (this.model.max != null)\n this.progressEl.max = this.model.max;\n }\n }\n exports.ProgressView = ProgressView;\n ProgressView.__name__ = \"ProgressView\";\n class Progress extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Progress = Progress;\n _a = Progress;\n Progress.__name__ = \"Progress\";\n Progress.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = ProgressView;\n _a.define(({ Any, Array, Boolean, Number, String }) => ({\n active: [Boolean, true],\n bar_color: [String, 'primary'],\n css: [Array(String), []],\n max: [Number, 100],\n value: [Any, null],\n }));\n })();\n}\n","/* models/quill.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const normalizeNative = (nativeRange) => {\n var _b, _c;\n // document.getSelection model has properties startContainer and endContainer\n // shadow.getSelection model has baseNode and focusNode\n // Unify formats to always look like document.getSelection\n if (nativeRange) {\n const range = nativeRange;\n // // HACK: To allow pasting\n if (((_c = (_b = range.baseNode) === null || _b === void 0 ? void 0 : _b.classList) === null || _c === void 0 ? void 0 : _c.value) === 'ql-clipboard') {\n return null;\n }\n if (range.baseNode) {\n range.startContainer = nativeRange.baseNode;\n range.endContainer = nativeRange.focusNode;\n range.startOffset = nativeRange.baseOffset;\n range.endOffset = nativeRange.focusOffset;\n if (range.endOffset < range.startOffset) {\n range.startContainer = nativeRange.focusNode;\n range.endContainer = nativeRange.baseNode;\n range.startOffset = nativeRange.focusOffset;\n range.endOffset = nativeRange.baseOffset;\n }\n }\n if (range.startContainer) {\n return {\n start: { node: range.startContainer, offset: range.startOffset },\n end: { node: range.endContainer, offset: range.endOffset },\n native: range\n };\n }\n }\n return null;\n };\n class QuillInputView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.disabled.change, () => this.quill.enable(!this.model.disabled));\n this.connect(this.model.properties.visible.change, () => {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n });\n this.connect(this.model.properties.text.change, () => {\n if (this._editing)\n return;\n this._editing = true;\n this.quill.enable(false);\n this.quill.setContents([]);\n this.quill.clipboard.dangerouslyPasteHTML(this.model.text);\n this.quill.enable(!this.model.disabled);\n this._editing = false;\n });\n const { mode, toolbar, placeholder } = this.model.properties;\n this.on_change([placeholder], () => {\n this.quill.root.setAttribute('data-placeholder', this.model.placeholder);\n });\n this.on_change([mode, toolbar], () => {\n this.render();\n this._layout_toolbar();\n });\n }\n _layout_toolbar() {\n if (this._toolbar == null) {\n this.el.style.removeProperty('padding-top');\n }\n else {\n const height = this._toolbar.getBoundingClientRect().height + 1;\n this.el.style.paddingTop = height + \"px\";\n this._toolbar.style.marginTop = -height + \"px\";\n }\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ style: \"visibility: hidden;\" });\n this.shadow_el.appendChild(this.container);\n const theme = (this.model.mode === 'bubble') ? 'bubble' : 'snow';\n this.watch_stylesheets();\n this.quill = new window.Quill(this.container, {\n modules: {\n toolbar: this.model.toolbar\n },\n readOnly: true,\n placeholder: this.model.placeholder,\n theme: theme\n });\n // Apply only with getSelection() is defined (e.g. undefined on Firefox)\n if (typeof this.quill.root.getRootNode().getSelection !== 'undefined') {\n // Hack Quill and replace document.getSelection with shadow.getSelection\n // see https://stackoverflow.com/questions/67914657/quill-editor-inside-shadow-dom/67944380#67944380\n this.quill.selection.getNativeRange = () => {\n const selection = this.shadow_el.getSelection();\n const range = normalizeNative(selection);\n return range;\n };\n }\n this._editor = this.shadow_el.querySelector('.ql-editor');\n this._toolbar = this.shadow_el.querySelector('.ql-toolbar');\n const delta = this.quill.clipboard.convert(this.model.text);\n this.quill.setContents(delta);\n this.quill.on('text-change', () => {\n if (this._editing)\n return;\n this._editing = true;\n this.model.text = this._editor.innerHTML;\n this._editing = false;\n });\n if (!this.model.disabled)\n this.quill.enable(!this.model.disabled);\n document.addEventListener(\"selectionchange\", (..._args) => {\n // Update selection and some other properties\n this.quill.selection.update();\n });\n }\n style_redraw() {\n if (this.model.visible)\n this.container.style.visibility = 'visible';\n const delta = this.quill.clipboard.convert(this.model.text);\n this.quill.setContents(delta);\n this.invalidate_layout();\n }\n after_layout() {\n super.after_layout();\n this._layout_toolbar();\n }\n }\n exports.QuillInputView = QuillInputView;\n QuillInputView.__name__ = \"QuillInputView\";\n class QuillInput extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.QuillInput = QuillInput;\n _a = QuillInput;\n QuillInput.__name__ = \"QuillInput\";\n QuillInput.__module__ = \"panel.models.quill\";\n (() => {\n _a.prototype.default_view = QuillInputView;\n _a.define(({ Any, String }) => ({\n mode: [String, 'toolbar'],\n placeholder: [String, ''],\n text: [String, ''],\n toolbar: [Any, null],\n }));\n _a.override({\n height: 300\n });\n })();\n}\n","/* models/radio_button_group.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const radio_button_group_1 = require(\"@bokehjs/models/widgets/radio_button_group\");\n class RadioButtonGroupView extends radio_button_group_1.RadioButtonGroupView {\n *children() {\n yield* super.children();\n if (this.tooltip != null)\n yield this.tooltip;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { tooltip } = this.model;\n if (tooltip != null)\n this.tooltip = await (0, build_views_1.build_view)(tooltip, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n render() {\n super.render();\n const toggle = (visible) => {\n var _b;\n (_b = this.tooltip) === null || _b === void 0 ? void 0 : _b.model.setv({\n visible,\n });\n };\n let timer;\n this.el.addEventListener(\"mouseenter\", () => {\n timer = setTimeout(() => toggle(true), this.model.tooltip_delay);\n });\n this.el.addEventListener(\"mouseleave\", () => {\n clearTimeout(timer);\n toggle(false);\n });\n }\n }\n exports.RadioButtonGroupView = RadioButtonGroupView;\n RadioButtonGroupView.__name__ = \"RadioButtonGroupView\";\n class RadioButtonGroup extends radio_button_group_1.RadioButtonGroup {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.RadioButtonGroup = RadioButtonGroup;\n _a = RadioButtonGroup;\n RadioButtonGroup.__name__ = \"RadioButtonGroup\";\n RadioButtonGroup.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = RadioButtonGroupView;\n _a.define(({ Nullable, Ref, Number }) => ({\n tooltip: [Nullable(Ref(tooltip_1.Tooltip)), null],\n tooltip_delay: [Number, 500],\n }));\n })();\n}\n","/* models/reactive_html.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n const hooks_1 = require(\"283ce7811c\") /* preact/hooks */;\n const preact_2 = require(\"b3f51db71c\") /* htm/preact */;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const data_1 = require(\"4e27eda472\") /* ./data */;\n const event_to_object_1 = require(\"490942d778\") /* ./event-to-object */;\n const html_1 = require(\"3db2e41978\") /* ./html */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function serialize_attrs(attrs) {\n const serialized = {};\n for (const attr in attrs) {\n let value = attrs[attr];\n if (typeof value !== \"string\")\n value = value;\n else if (value !== \"\" && (value === \"NaN\" || !isNaN(Number(value))))\n value = Number(value);\n else if (value === 'false' || value === 'true')\n value = value === 'true' ? true : false;\n serialized[attr] = value;\n }\n return serialized;\n }\n function escapeRegex(string) {\n return string.replace(/[-\\/\\\\^$*+?.()|[\\]]/g, '\\\\$&');\n }\n function extractToken(template, str, tokens) {\n const tokenMapping = {};\n for (const match of tokens)\n tokenMapping[`{${match}}`] = \"(.*)\";\n const tokenList = [];\n let regexpTemplate = \"^\" + escapeRegex(template) + \"$\";\n // Find the order of the tokens\n let i, tokenIndex, tokenEntry;\n for (const m in tokenMapping) {\n tokenIndex = template.indexOf(m);\n // Token found\n if (tokenIndex > -1) {\n regexpTemplate = regexpTemplate.replace(m, tokenMapping[m]);\n tokenEntry = {\n index: tokenIndex,\n token: m\n };\n for (i = 0; i < tokenList.length && tokenList[i].index < tokenIndex; i++)\n ;\n // Insert it at index i\n if (i < tokenList.length)\n tokenList.splice(i, 0, tokenEntry);\n else\n tokenList.push(tokenEntry);\n }\n }\n regexpTemplate = regexpTemplate.replace(/\\{[^{}]+\\}/g, '.*');\n var match = new RegExp(regexpTemplate).exec(str);\n let result = null;\n if (match) {\n result = {};\n // Find your token entry\n for (i = 0; i < tokenList.length; i++)\n result[tokenList[i].token.slice(1, -1)] = match[i + 1];\n }\n return result;\n }\n function element_lookup(root, el_id) {\n let el = root.getElementById(el_id);\n if (el == null) {\n el = document.getElementById(el_id);\n }\n return el;\n }\n class ReactiveHTMLView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this._parent = null;\n this._changing = false;\n this._event_listeners = {};\n this._mutation_observers = [];\n this._script_fns = {};\n this._state = {};\n }\n initialize() {\n super.initialize();\n this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;\n }\n _recursive_connect(model, update_children, path) {\n for (const prop in model.properties) {\n let subpath;\n if (path.length)\n subpath = `${path}.${prop}`;\n else\n subpath = prop;\n const obj = model[prop];\n if (obj == null)\n continue;\n if (obj.properties != null)\n this._recursive_connect(obj, true, subpath);\n this.connect(model.properties[prop].change, () => {\n if (update_children) {\n for (const node in this.model.children) {\n if (this.model.children[node] == prop) {\n let children = model[prop];\n if (!(0, types_1.isArray)(children))\n children = [children];\n this._render_node(node, children);\n return;\n }\n }\n }\n if (!this._changing) {\n this._update(subpath);\n }\n });\n }\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.children.change, async () => {\n this.html = (0, html_1.htmlDecode)(this.model.html) || this.model.html;\n await this.rebuild();\n });\n this._recursive_connect(this.model.data, true, '');\n this.connect(this.model.properties.events.change, () => {\n this._remove_event_listeners();\n this._setup_event_listeners();\n });\n this.connect_scripts();\n }\n connect_scripts() {\n const id = this.model.data.id;\n for (let prop in this.model.scripts) {\n const scripts = this.model.scripts[prop];\n let data_model = this.model.data;\n let attr;\n if (prop.indexOf('.') >= 0) {\n const path = prop.split('.');\n attr = path[path.length - 1];\n for (const p of path.slice(0, -1))\n data_model = data_model[p];\n }\n else {\n attr = prop;\n }\n for (const script of scripts) {\n const decoded_script = (0, html_1.htmlDecode)(script) || script;\n const script_fn = this._render_script(decoded_script, id);\n this._script_fns[prop] = script_fn;\n const property = data_model.properties[attr];\n if (property == null)\n continue;\n this.connect(property.change, () => {\n if (!this._changing)\n this.run_script(prop);\n });\n }\n }\n }\n run_script(property, silent = false) {\n const script_fn = this._script_fns[property];\n if (script_fn === undefined) {\n if (!silent)\n console.log(`Script '${property}' could not be found.`);\n return;\n }\n const this_obj = {\n get_records: (property, index) => this.get_records(property, index)\n };\n for (const name in this._script_fns)\n this_obj[name] = () => this.run_script(name);\n return script_fn(this.model, this.model.data, this._state, this, (s) => this.run_script(s), this_obj);\n }\n get_records(property, index = true) {\n return (0, data_1.dict_to_records)(this.model.data[property], index);\n }\n disconnect_signals() {\n super.disconnect_signals();\n this._remove_event_listeners();\n this._remove_mutation_observers();\n }\n remove() {\n this.run_script('remove', true);\n super.remove();\n }\n get child_models() {\n const models = [];\n for (const parent in this.model.children) {\n for (const model of this.model.children[parent])\n if (typeof model !== 'string')\n models.push(model);\n }\n return models;\n }\n _after_layout() {\n this.run_script('after_layout', true);\n }\n render() {\n this.empty();\n this._update_stylesheets();\n this._update_css_classes();\n this._apply_styles();\n this._apply_visible();\n this.container = (0, dom_1.div)({ style: \"display: contents;\" });\n this.shadow_el.append(this.container);\n this._update();\n this._render_children();\n this._setup_mutation_observers();\n this._setup_event_listeners();\n this.run_script('render', true);\n }\n _send_event(elname, attr, event) {\n let serialized = (0, event_to_object_1.serializeEvent)(event);\n serialized.type = attr;\n for (const key in serialized) {\n if (serialized[key] === undefined)\n delete serialized[key];\n }\n this.model.trigger_event(new html_1.DOMEvent(elname, serialized));\n }\n _render_child(model, el) {\n const view = this._child_views.get(model);\n if (view == null)\n el.innerHTML = (0, html_1.htmlDecode)(model) || model;\n else {\n el.appendChild(view.el);\n view.render();\n view.after_render();\n }\n }\n _render_node(node, children) {\n const id = this.model.data.id;\n if (this.model.looped.indexOf(node) > -1) {\n for (let i = 0; i < children.length; i++) {\n const el = element_lookup(this.shadow_el, `${node}-${i}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${i}-${id}' could not be found. Cannot render children.`);\n continue;\n }\n this._render_child(children[i], el);\n }\n }\n else {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${id}' could not be found. Cannot render children.`);\n return;\n }\n for (const child of children)\n this._render_child(child, el);\n }\n }\n _render_children() {\n for (const node in this.model.children) {\n let children = this.model.children[node];\n if (typeof children == \"string\") {\n children = this.model.data[children];\n if (!(0, types_1.isArray)(children))\n children = [children];\n }\n this._render_node(node, children);\n }\n }\n _render_html(literal, state = {}) {\n let htm = literal.replace(/[`]/g, '\\\\$&');\n let callbacks = '';\n const methods = [];\n for (const elname in this.model.callbacks) {\n for (const callback of this.model.callbacks[elname]) {\n const [cb, method] = callback;\n let definition;\n htm = htm.replaceAll('${' + method + '}', '$--{' + method + '}');\n if (method.startsWith('script(')) {\n const meth = (method\n .replace(\"('\", \"_\").replace(\"')\", \"\")\n .replace('(\"', \"_\").replace('\")', \"\")\n .replace('-', '_'));\n const script_name = meth.replaceAll(\"script_\", \"\");\n htm = htm.replaceAll(method, meth);\n definition = `\n const ${meth} = (event) => {\n view._state.event = event\n view.run_script(\"${script_name}\")\n delete view._state.event\n }\n `;\n }\n else {\n definition = `\n const ${method} = (event) => {\n let elname = \"${elname}\"\n if (RegExp(\"\\{\\{.*loop\\.index.*\\}\\}\").test(elname)) {\n const pattern = RegExp(elname.replace(/\\{\\{(.+?)\\}\\}/g, String.fromCharCode(92) + \"d+\"))\n for (const p of event.path) {\n if (pattern.exec(p.id) != null) {\n elname = p.id.split(\"-\").slice(null, -1).join(\"-\")\n break\n }\n }\n }\n view._send_event(elname, \"${cb}\", event)\n }\n `;\n }\n if (methods.indexOf(method) > -1)\n continue;\n methods.push(method);\n callbacks = callbacks + definition;\n }\n }\n htm = (htm\n .replaceAll('${model.', '$-{model.')\n .replaceAll('${', '${data.')\n .replaceAll('$-{model.', '${model.')\n .replaceAll('$--{', '${'));\n return new Function(\"view, model, data, state, html, useCallback\", callbacks + \"return html`\" + htm + \"`;\")(this, this.model, this.model.data, state, preact_2.html, hooks_1.useCallback);\n }\n _render_script(literal, id) {\n const scripts = [];\n for (const elname of this.model.nodes) {\n const elvar = elname.replace('-', '_');\n if (literal.indexOf(elvar) === -1)\n continue;\n const script = `\n let ${elvar} = view.shadow_el.getElementById('${elname}-${id}')\n if (${elvar} == null)\n ${elvar} = document.getElementById('${elname}-${id}')\n if (${elvar} == null) {\n console.warn(\"DOM node '${elname}' could not be found. Cannot execute callback.\")\n return\n }\n `;\n scripts.push(script);\n }\n const event = `\n let event = null\n if (state.event !== undefined) {\n event = state.event\n }\n `;\n scripts.push(event);\n scripts.push(literal);\n return new Function(\"model, data, state, view, script, self\", scripts.join('\\n'));\n }\n _remove_mutation_observers() {\n for (const observer of this._mutation_observers)\n observer.disconnect();\n this._mutation_observers = [];\n }\n _setup_mutation_observers() {\n const id = this.model.data.id;\n for (const name in this.model.attrs) {\n const el = element_lookup(this.shadow_el, `${name}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${name}-${id}' could not be found. Cannot set up MutationObserver.`);\n continue;\n }\n const observer = new MutationObserver(() => {\n this._update_model(el, name);\n });\n observer.observe(el, { attributes: true });\n this._mutation_observers.push(observer);\n }\n }\n _remove_event_listeners() {\n const id = this.model.data.id;\n for (const node in this._event_listeners) {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null)\n continue;\n for (const event_name in this._event_listeners[node]) {\n const event_callback = this._event_listeners[node][event_name];\n el.removeEventListener(event_name, event_callback);\n }\n }\n this._event_listeners = {};\n }\n _setup_event_listeners() {\n const id = this.model.data.id;\n for (const node in this.model.events) {\n const el = element_lookup(this.shadow_el, `${node}-${id}`);\n if (el == null) {\n console.warn(`DOM node '${node}-${id}' could not be found. Cannot subscribe to DOM events.`);\n continue;\n }\n const node_events = this.model.events[node];\n for (const event_name in node_events) {\n const event_callback = (event) => {\n this._send_event(node, event_name, event);\n if (node in this.model.attrs && node_events[event_name])\n this._update_model(el, node);\n };\n el.addEventListener(event_name, event_callback);\n if (!(node in this._event_listeners))\n this._event_listeners[node] = {};\n this._event_listeners[node][event_name] = event_callback;\n }\n }\n }\n _update(property = null) {\n if (property == null || (this.html.indexOf(`\\${${property}}`) > -1)) {\n const rendered = this._render_html(this.html);\n if (rendered == null)\n return;\n try {\n this._changing = true;\n (0, preact_1.render)(rendered, this.container);\n }\n finally {\n this._changing = false;\n }\n }\n }\n _update_model(el, name) {\n if (this._changing)\n return;\n const attrs = {};\n for (const attr_info of this.model.attrs[name]) {\n const [attr, tokens, template] = attr_info;\n let value = attr === 'children' ? el.innerHTML : el[attr];\n if (tokens.length === 1 && (`{${tokens[0]}}` === template))\n attrs[tokens[0]] = value;\n else if (typeof value === 'string') {\n value = extractToken(template, value, tokens);\n if (value == null)\n console.warn(`Could not resolve parameters in ${name} element ${attr} attribute value ${value}.`);\n else {\n for (const param in value) {\n if (value[param] === undefined)\n console.warn(`Could not resolve ${param} in ${name} element ${attr} attribute value ${value}.`);\n else\n attrs[param] = value[param];\n }\n }\n }\n }\n try {\n this._changing = true;\n this.model.data.setv(serialize_attrs(attrs));\n }\n catch (_b) {\n console.log('Could not serialize', attrs);\n }\n finally {\n this._changing = false;\n }\n }\n }\n exports.ReactiveHTMLView = ReactiveHTMLView;\n ReactiveHTMLView.__name__ = \"ReactiveHTMLView\";\n class ReactiveHTML extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.ReactiveHTML = ReactiveHTML;\n _a = ReactiveHTML;\n ReactiveHTML.__name__ = \"ReactiveHTML\";\n ReactiveHTML.__module__ = \"panel.models.reactive_html\";\n (() => {\n _a.prototype.default_view = ReactiveHTMLView;\n _a.define(({ Array, Any, String }) => ({\n attrs: [Any, {}],\n callbacks: [Any, {}],\n children: [Any, {}],\n data: [Any,],\n events: [Any, {}],\n html: [String, \"\"],\n looped: [Array(String), []],\n nodes: [Array(String), []],\n scripts: [Any, {}],\n }));\n })();\n}\n","/* preact/dist/preact.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var n, l, u, i, t, r, o, f, e = {}, c = [], s = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;\n function a(n, l) {\n for (var u in l)\n n[u] = l[u];\n return n;\n }\n function h(n) { var l = n.parentNode; l && l.removeChild(n); }\n function v(l, u, i) {\n var t, r, o, f = {};\n for (o in u)\n \"key\" == o ? t = u[o] : \"ref\" == o ? r = u[o] : f[o] = u[o];\n if (arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : i), \"function\" == typeof l && null != l.defaultProps)\n for (o in l.defaultProps)\n void 0 === f[o] && (f[o] = l.defaultProps[o]);\n return y(l, f, t, r, null);\n }\n exports.createElement = v;\n exports.h = v;\n function y(n, i, t, r, o) { var f = { type: n, props: i, key: t, ref: r, __k: null, __: null, __b: 0, __e: null, __d: void 0, __c: null, __h: null, constructor: void 0, __v: null == o ? ++u : o }; return null == o && null != l.vnode && l.vnode(f), f; }\n function p() { return { current: null }; }\n exports.createRef = p;\n function d(n) { return n.children; }\n exports.Fragment = d;\n function _(n, l) { this.props = n, this.context = l; }\n exports.Component = _;\n function k(n, l) {\n if (null == l)\n return n.__ ? k(n.__, n.__.__k.indexOf(n) + 1) : null;\n for (var u; l < n.__k.length; l++)\n if (null != (u = n.__k[l]) && null != u.__e)\n return u.__e;\n return \"function\" == typeof n.type ? k(n) : null;\n }\n function b(n) {\n var l, u;\n if (null != (n = n.__) && null != n.__c) {\n for (n.__e = n.__c.base = null, l = 0; l < n.__k.length; l++)\n if (null != (u = n.__k[l]) && null != u.__e) {\n n.__e = n.__c.base = u.__e;\n break;\n }\n return b(n);\n }\n }\n function g(n) { (!n.__d && (n.__d = !0) && t.push(n) && !m.__r++ || r !== l.debounceRendering) && ((r = l.debounceRendering) || o)(m); }\n function m() {\n var n, l, u, i, r, o, f, e;\n for (t.sort(function (n, l) { return n.__v.__b - l.__v.__b; }); n = t.shift();)\n n.__d && (l = t.length, i = void 0, r = void 0, f = (o = (u = n).__v).__e, (e = u.__P) && (i = [], (r = a({}, o)).__v = o.__v + 1, z(e, o, r, u.__n, void 0 !== e.ownerSVGElement, null != o.__h ? [f] : null, i, null == f ? k(o) : f, o.__h), L(i, o), o.__e != f && b(o)), t.length > l && t.sort(function (n, l) { return n.__v.__b - l.__v.__b; }));\n m.__r = 0;\n }\n function w(n, l, u, i, t, r, o, f, s, a) {\n var h, v, p, _, b, g, m, w = i && i.__k || c, A = w.length;\n for (u.__k = [], h = 0; h < l.length; h++)\n if (null != (_ = u.__k[h] = null == (_ = l[h]) || \"boolean\" == typeof _ ? null : \"string\" == typeof _ || \"number\" == typeof _ || \"bigint\" == typeof _ ? y(null, _, null, null, _) : Array.isArray(_) ? y(d, { children: _ }, null, null, null) : _.__b > 0 ? y(_.type, _.props, _.key, _.ref ? _.ref : null, _.__v) : _)) {\n if (_.__ = u, _.__b = u.__b + 1, null === (p = w[h]) || p && _.key == p.key && _.type === p.type)\n w[h] = void 0;\n else\n for (v = 0; v < A; v++) {\n if ((p = w[v]) && _.key == p.key && _.type === p.type) {\n w[v] = void 0;\n break;\n }\n p = null;\n }\n z(n, _, p = p || e, t, r, o, f, s, a), b = _.__e, (v = _.ref) && p.ref != v && (m || (m = []), p.ref && m.push(p.ref, null, _), m.push(v, _.__c || b, _)), null != b ? (null == g && (g = b), \"function\" == typeof _.type && _.__k === p.__k ? _.__d = s = x(_, s, n) : s = P(n, _, p, w, b, s), \"function\" == typeof u.type && (u.__d = s)) : s && p.__e == s && s.parentNode != n && (s = k(p));\n }\n for (u.__e = g, h = A; h--;)\n null != w[h] && (\"function\" == typeof u.type && null != w[h].__e && w[h].__e == u.__d && (u.__d = C(i).nextSibling), O(w[h], w[h]));\n if (m)\n for (h = 0; h < m.length; h++)\n N(m[h], m[++h], m[++h]);\n }\n function x(n, l, u) {\n for (var i, t = n.__k, r = 0; t && r < t.length; r++)\n (i = t[r]) && (i.__ = n, l = \"function\" == typeof i.type ? x(i, l, u) : P(u, i, i, t, i.__e, l));\n return l;\n }\n function A(n, l) { return l = l || [], null == n || \"boolean\" == typeof n || (Array.isArray(n) ? n.some(function (n) { A(n, l); }) : l.push(n)), l; }\n exports.toChildArray = A;\n function P(n, l, u, i, t, r) {\n var o, f, e;\n if (void 0 !== l.__d)\n o = l.__d, l.__d = void 0;\n else if (null == u || t != r || null == t.parentNode)\n n: if (null == r || r.parentNode !== n)\n n.appendChild(t), o = null;\n else {\n for (f = r, e = 0; (f = f.nextSibling) && e < i.length; e += 1)\n if (f == t)\n break n;\n n.insertBefore(t, r), o = r;\n }\n return void 0 !== o ? o : t.nextSibling;\n }\n function C(n) {\n var l, u, i;\n if (null == n.type || \"string\" == typeof n.type)\n return n.__e;\n if (n.__k)\n for (l = n.__k.length - 1; l >= 0; l--)\n if ((u = n.__k[l]) && (i = C(u)))\n return i;\n return null;\n }\n function $(n, l, u, i, t) {\n var r;\n for (r in u)\n \"children\" === r || \"key\" === r || r in l || I(n, r, null, u[r], i);\n for (r in l)\n t && \"function\" != typeof l[r] || \"children\" === r || \"key\" === r || \"value\" === r || \"checked\" === r || u[r] === l[r] || I(n, r, l[r], u[r], i);\n }\n function H(n, l, u) { \"-\" === l[0] ? n.setProperty(l, null == u ? \"\" : u) : n[l] = null == u ? \"\" : \"number\" != typeof u || s.test(l) ? u : u + \"px\"; }\n function I(n, l, u, i, t) {\n var r;\n n: if (\"style\" === l)\n if (\"string\" == typeof u)\n n.style.cssText = u;\n else {\n if (\"string\" == typeof i && (n.style.cssText = i = \"\"), i)\n for (l in i)\n u && l in u || H(n.style, l, \"\");\n if (u)\n for (l in u)\n i && u[l] === i[l] || H(n.style, l, u[l]);\n }\n else if (\"o\" === l[0] && \"n\" === l[1])\n r = l !== (l = l.replace(/Capture$/, \"\")), l = l.toLowerCase() in n ? l.toLowerCase().slice(2) : l.slice(2), n.l || (n.l = {}), n.l[l + r] = u, u ? i || n.addEventListener(l, r ? j : T, r) : n.removeEventListener(l, r ? j : T, r);\n else if (\"dangerouslySetInnerHTML\" !== l) {\n if (t)\n l = l.replace(/xlink(H|:h)/, \"h\").replace(/sName$/, \"s\");\n else if (\"width\" !== l && \"height\" !== l && \"href\" !== l && \"list\" !== l && \"form\" !== l && \"tabIndex\" !== l && \"download\" !== l && l in n)\n try {\n n[l] = null == u ? \"\" : u;\n break n;\n }\n catch (n) { }\n \"function\" == typeof u || (null == u || !1 === u && -1 == l.indexOf(\"-\") ? n.removeAttribute(l) : n.setAttribute(l, u));\n }\n }\n function T(n) { return this.l[n.type + !1](l.event ? l.event(n) : n); }\n function j(n) { return this.l[n.type + !0](l.event ? l.event(n) : n); }\n function z(n, u, i, t, r, o, f, e, c) {\n var s, h, v, y, p, k, b, g, m, x, A, P, C, $, H, I = u.type;\n if (void 0 !== u.constructor)\n return null;\n null != i.__h && (c = i.__h, e = u.__e = i.__e, u.__h = null, o = [e]), (s = l.__b) && s(u);\n try {\n n: if (\"function\" == typeof I) {\n if (g = u.props, m = (s = I.contextType) && t[s.__c], x = s ? m ? m.props.value : s.__ : t, i.__c ? b = (h = u.__c = i.__c).__ = h.__E : (\"prototype\" in I && I.prototype.render ? u.__c = h = new I(g, x) : (u.__c = h = new _(g, x), h.constructor = I, h.render = S), m && m.sub(h), h.props = g, h.state || (h.state = {}), h.context = x, h.__n = t, v = h.__d = !0, h.__h = [], h._sb = []), null == h.__s && (h.__s = h.state), null != I.getDerivedStateFromProps && (h.__s == h.state && (h.__s = a({}, h.__s)), a(h.__s, I.getDerivedStateFromProps(g, h.__s))), y = h.props, p = h.state, h.__v = u, v)\n null == I.getDerivedStateFromProps && null != h.componentWillMount && h.componentWillMount(), null != h.componentDidMount && h.__h.push(h.componentDidMount);\n else {\n if (null == I.getDerivedStateFromProps && g !== y && null != h.componentWillReceiveProps && h.componentWillReceiveProps(g, x), !h.__e && null != h.shouldComponentUpdate && !1 === h.shouldComponentUpdate(g, h.__s, x) || u.__v === i.__v) {\n for (u.__v !== i.__v && (h.props = g, h.state = h.__s, h.__d = !1), h.__e = !1, u.__e = i.__e, u.__k = i.__k, u.__k.forEach(function (n) { n && (n.__ = u); }), A = 0; A < h._sb.length; A++)\n h.__h.push(h._sb[A]);\n h._sb = [], h.__h.length && f.push(h);\n break n;\n }\n null != h.componentWillUpdate && h.componentWillUpdate(g, h.__s, x), null != h.componentDidUpdate && h.__h.push(function () { h.componentDidUpdate(y, p, k); });\n }\n if (h.context = x, h.props = g, h.__P = n, P = l.__r, C = 0, \"prototype\" in I && I.prototype.render) {\n for (h.state = h.__s, h.__d = !1, P && P(u), s = h.render(h.props, h.state, h.context), $ = 0; $ < h._sb.length; $++)\n h.__h.push(h._sb[$]);\n h._sb = [];\n }\n else\n do {\n h.__d = !1, P && P(u), s = h.render(h.props, h.state, h.context), h.state = h.__s;\n } while (h.__d && ++C < 25);\n h.state = h.__s, null != h.getChildContext && (t = a(a({}, t), h.getChildContext())), v || null == h.getSnapshotBeforeUpdate || (k = h.getSnapshotBeforeUpdate(y, p)), H = null != s && s.type === d && null == s.key ? s.props.children : s, w(n, Array.isArray(H) ? H : [H], u, i, t, r, o, f, e, c), h.base = u.__e, u.__h = null, h.__h.length && f.push(h), b && (h.__E = h.__ = null), h.__e = !1;\n }\n else\n null == o && u.__v === i.__v ? (u.__k = i.__k, u.__e = i.__e) : u.__e = M(i.__e, u, i, t, r, o, f, c);\n (s = l.diffed) && s(u);\n }\n catch (n) {\n u.__v = null, (c || null != o) && (u.__e = e, u.__h = !!c, o[o.indexOf(e)] = null), l.__e(n, u, i);\n }\n }\n function L(n, u) {\n l.__c && l.__c(u, n), n.some(function (u) {\n try {\n n = u.__h, u.__h = [], n.some(function (n) { n.call(u); });\n }\n catch (n) {\n l.__e(n, u.__v);\n }\n });\n }\n function M(l, u, i, t, r, o, f, c) {\n var s, a, v, y = i.props, p = u.props, d = u.type, _ = 0;\n if (\"svg\" === d && (r = !0), null != o)\n for (; _ < o.length; _++)\n if ((s = o[_]) && \"setAttribute\" in s == !!d && (d ? s.localName === d : 3 === s.nodeType)) {\n l = s, o[_] = null;\n break;\n }\n if (null == l) {\n if (null === d)\n return document.createTextNode(p);\n l = r ? document.createElementNS(\"http://www.w3.org/2000/svg\", d) : document.createElement(d, p.is && p), o = null, c = !1;\n }\n if (null === d)\n y === p || c && l.data === p || (l.data = p);\n else {\n if (o = o && n.call(l.childNodes), a = (y = i.props || e).dangerouslySetInnerHTML, v = p.dangerouslySetInnerHTML, !c) {\n if (null != o)\n for (y = {}, _ = 0; _ < l.attributes.length; _++)\n y[l.attributes[_].name] = l.attributes[_].value;\n (v || a) && (v && (a && v.__html == a.__html || v.__html === l.innerHTML) || (l.innerHTML = v && v.__html || \"\"));\n }\n if ($(l, p, y, r, c), v)\n u.__k = [];\n else if (_ = u.props.children, w(l, Array.isArray(_) ? _ : [_], u, i, t, r && \"foreignObject\" !== d, o, f, o ? o[0] : i.__k && k(i, 0), c), null != o)\n for (_ = o.length; _--;)\n null != o[_] && h(o[_]);\n c || (\"value\" in p && void 0 !== (_ = p.value) && (_ !== l.value || \"progress\" === d && !_ || \"option\" === d && _ !== y.value) && I(l, \"value\", _, y.value, !1), \"checked\" in p && void 0 !== (_ = p.checked) && _ !== l.checked && I(l, \"checked\", _, y.checked, !1));\n }\n return l;\n }\n function N(n, u, i) {\n try {\n \"function\" == typeof n ? n(u) : n.current = u;\n }\n catch (n) {\n l.__e(n, i);\n }\n }\n function O(n, u, i) {\n var t, r;\n if (l.unmount && l.unmount(n), (t = n.ref) && (t.current && t.current !== n.__e || N(t, null, u)), null != (t = n.__c)) {\n if (t.componentWillUnmount)\n try {\n t.componentWillUnmount();\n }\n catch (n) {\n l.__e(n, u);\n }\n t.base = t.__P = null, n.__c = void 0;\n }\n if (t = n.__k)\n for (r = 0; r < t.length; r++)\n t[r] && O(t[r], u, i || \"function\" != typeof n.type);\n i || null == n.__e || h(n.__e), n.__ = n.__e = n.__d = void 0;\n }\n function S(n, l, u) { return this.constructor(n, u); }\n function q(u, i, t) { var r, o, f; l.__ && l.__(u, i), o = (r = \"function\" == typeof t) ? null : t && t.__k || i.__k, f = [], z(i, u = (!r && t || i).__k = v(d, null, [u]), o || e, e, void 0 !== i.ownerSVGElement, !r && t ? [t] : o ? null : i.firstChild ? n.call(i.childNodes) : null, f, !r && t ? t : o ? o.__e : i.firstChild, r), L(f, u); }\n exports.render = q;\n function B(n, l) { q(n, l, B); }\n exports.hydrate = B;\n function D(l, u, i) {\n var t, r, o, f = a({}, l.props);\n for (o in u)\n \"key\" == o ? t = u[o] : \"ref\" == o ? r = u[o] : f[o] = u[o];\n return arguments.length > 2 && (f.children = arguments.length > 3 ? n.call(arguments, 2) : i), y(l.type, f, t || l.key, r || l.ref, null);\n }\n exports.cloneElement = D;\n function E(n, l) { var u = { __c: l = \"__cC\" + f++, __: n, Consumer: function (n, l) { return n.children(l); }, Provider: function (n) { var u, i; return this.getChildContext || (u = [], (i = {})[l] = this, this.getChildContext = function () { return i; }, this.shouldComponentUpdate = function (n) { this.props.value !== n.value && u.some(function (n) { n.__e = !0, g(n); }); }, this.sub = function (n) { u.push(n); var l = n.componentWillUnmount; n.componentWillUnmount = function () { u.splice(u.indexOf(n), 1), l && l.call(n); }; }), n.children; } }; return u.Provider.__ = u.Consumer.contextType = u; }\n exports.createContext = E;\n n = c.slice, exports.options = l = { __e: function (n, l, u, i) {\n for (var t, r, o; l = l.__;)\n if ((t = l.__c) && !t.__)\n try {\n if ((r = t.constructor) && null != r.getDerivedStateFromError && (t.setState(r.getDerivedStateFromError(n)), o = t.__d), null != t.componentDidCatch && (t.componentDidCatch(n, i || {}), o = t.__d), o)\n return t.__E = t;\n }\n catch (l) {\n n = l;\n }\n throw n;\n } }, u = 0, exports.isValidElement = i = function (n) { return null != n && void 0 === n.constructor; }, _.prototype.setState = function (n, l) { var u; u = null != this.__s && this.__s !== this.state ? this.__s : this.__s = a({}, this.state), \"function\" == typeof n && (n = n(a({}, u), this.props)), n && a(u, n), null != n && this.__v && (l && this._sb.push(l), g(this)); }, _.prototype.forceUpdate = function (n) { this.__v && (this.__e = !0, n && this.__h.push(n), g(this)); }, _.prototype.render = d, t = [], o = \"function\" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, m.__r = 0, f = 0;\n}\n","/* preact/hooks/dist/hooks.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n var t, r, u, i, o = 0, f = [], c = [], e = preact_1.options.__b, a = preact_1.options.__r, v = preact_1.options.diffed, l = preact_1.options.__c, m = preact_1.options.unmount;\n function d(t, u) { preact_1.options.__h && preact_1.options.__h(r, t, o || u), o = 0; var i = r.__H || (r.__H = { __: [], __h: [] }); return t >= i.__.length && i.__.push({ __V: c }), i.__[t]; }\n function p(n) { return o = 1, y(B, n); }\n exports.useState = p;\n function y(n, u, i) {\n var o = d(t++, 2);\n if (o.t = n, !o.__c && (o.__ = [i ? i(u) : B(void 0, u), function (n) { var t = o.__N ? o.__N[0] : o.__[0], r = o.t(t, n); t !== r && (o.__N = [r, o.__[1]], o.__c.setState({})); }], o.__c = r, !r.u)) {\n r.u = !0;\n var f = r.shouldComponentUpdate;\n r.shouldComponentUpdate = function (n, t, r) {\n if (!o.__c.__H)\n return !0;\n var u = o.__c.__H.__.filter(function (n) { return n.__c; });\n if (u.every(function (n) { return !n.__N; }))\n return !f || f.call(this, n, t, r);\n var i = !1;\n return u.forEach(function (n) {\n if (n.__N) {\n var t = n.__[0];\n n.__ = n.__N, n.__N = void 0, t !== n.__[0] && (i = !0);\n }\n }), !(!i && o.__c.props === n) && (!f || f.call(this, n, t, r));\n };\n }\n return o.__N || o.__;\n }\n exports.useReducer = y;\n function h(u, i) { var o = d(t++, 3); !preact_1.options.__s && z(o.__H, i) && (o.__ = u, o.i = i, r.__H.__h.push(o)); }\n exports.useEffect = h;\n function s(u, i) { var o = d(t++, 4); !preact_1.options.__s && z(o.__H, i) && (o.__ = u, o.i = i, r.__h.push(o)); }\n exports.useLayoutEffect = s;\n function _(n) { return o = 5, F(function () { return { current: n }; }, []); }\n exports.useRef = _;\n function A(n, t, r) { o = 6, s(function () { return \"function\" == typeof n ? (n(t()), function () { return n(null); }) : n ? (n.current = t(), function () { return n.current = null; }) : void 0; }, null == r ? r : r.concat(n)); }\n exports.useImperativeHandle = A;\n function F(n, r) { var u = d(t++, 7); return z(u.__H, r) ? (u.__V = n(), u.i = r, u.__h = n, u.__V) : u.__; }\n exports.useMemo = F;\n function T(n, t) { return o = 8, F(function () { return n; }, t); }\n exports.useCallback = T;\n function q(n) { var u = r.context[n.__c], i = d(t++, 9); return i.c = n, u ? (null == i.__ && (i.__ = !0, u.sub(r)), u.props.value) : n.__; }\n exports.useContext = q;\n function x(t, r) { preact_1.options.useDebugValue && preact_1.options.useDebugValue(r ? r(t) : t); }\n exports.useDebugValue = x;\n function P(n) { var u = d(t++, 10), i = p(); return u.__ = n, r.componentDidCatch || (r.componentDidCatch = function (n, t) { u.__ && u.__(n, t), i[1](n); }), [i[0], function () { i[1](void 0); }]; }\n exports.useErrorBoundary = P;\n function V() {\n var n = d(t++, 11);\n if (!n.__) {\n for (var u = r.__v; null !== u && !u.__m && null !== u.__;)\n u = u.__;\n var i = u.__m || (u.__m = [0, 0]);\n n.__ = \"P\" + i[0] + \"-\" + i[1]++;\n }\n return n.__;\n }\n exports.useId = V;\n function b() {\n for (var t; t = f.shift();)\n if (t.__P && t.__H)\n try {\n t.__H.__h.forEach(k), t.__H.__h.forEach(w), t.__H.__h = [];\n }\n catch (r) {\n t.__H.__h = [], preact_1.options.__e(r, t.__v);\n }\n }\n preact_1.options.__b = function (n) { r = null, e && e(n); }, preact_1.options.__r = function (n) { a && a(n), t = 0; var i = (r = n.__c).__H; i && (u === r ? (i.__h = [], r.__h = [], i.__.forEach(function (n) { n.__N && (n.__ = n.__N), n.__V = c, n.__N = n.i = void 0; })) : (i.__h.forEach(k), i.__h.forEach(w), i.__h = [])), u = r; }, preact_1.options.diffed = function (t) { v && v(t); var o = t.__c; o && o.__H && (o.__H.__h.length && (1 !== f.push(o) && i === preact_1.options.requestAnimationFrame || ((i = preact_1.options.requestAnimationFrame) || j)(b)), o.__H.__.forEach(function (n) { n.i && (n.__H = n.i), n.__V !== c && (n.__ = n.__V), n.i = void 0, n.__V = c; })), u = r = null; }, preact_1.options.__c = function (t, r) {\n r.some(function (t) {\n try {\n t.__h.forEach(k), t.__h = t.__h.filter(function (n) { return !n.__ || w(n); });\n }\n catch (u) {\n r.some(function (n) { n.__h && (n.__h = []); }), r = [], preact_1.options.__e(u, t.__v);\n }\n }), l && l(t, r);\n }, preact_1.options.unmount = function (t) {\n m && m(t);\n var r, u = t.__c;\n u && u.__H && (u.__H.__.forEach(function (n) {\n try {\n k(n);\n }\n catch (n) {\n r = n;\n }\n }), u.__H = void 0, r && preact_1.options.__e(r, u.__v));\n };\n var g = \"function\" == typeof requestAnimationFrame;\n function j(n) { var t, r = function () { clearTimeout(u), g && cancelAnimationFrame(t), setTimeout(n); }, u = setTimeout(r, 100); g && (t = requestAnimationFrame(r)); }\n function k(n) { var t = r, u = n.__c; \"function\" == typeof u && (n.__c = void 0, u()), r = t; }\n function w(n) { var t = r; n.__c = n.__(), r = t; }\n function z(n, t) { return !n || n.length !== t.length || t.some(function (t, r) { return t !== n[r]; }); }\n function B(n, t) { return \"function\" == typeof t ? t(n) : t; }\n}\n","/* htm/preact/index.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const preact_1 = require(\"1b70f5b1d3\") /* preact */;\n var preact_2 = require(\"1b70f5b1d3\") /* preact */;\n __esExport(\"h\", preact_2.h);\n __esExport(\"render\", preact_2.render);\n __esExport(\"Component\", preact_2.Component);\n const htm_1 = tslib_1.__importDefault(require(\"ab33dd3f38\") /* htm */);\n var m = htm_1.default.bind(preact_1.h);\n exports.html = m;\n}\n","/* htm/dist/htm.module.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var n = function (t, s, r, e) {\n var u;\n s[0] = 0;\n for (var h = 1; h < s.length; h++) {\n var p = s[h++], a = s[h] ? (s[0] |= p ? 1 : 2, r[s[h++]]) : s[++h];\n 3 === p ? e[0] = a : 4 === p ? e[1] = Object.assign(e[1] || {}, a) : 5 === p ? (e[1] = e[1] || {})[s[++h]] = a : 6 === p ? e[1][s[++h]] += a + \"\" : p ? (u = t.apply(a, n(t, a, r, [\"\", null])), e.push(u), a[0] ? s[0] |= 2 : (s[h - 2] = 0, s[h] = u)) : e.push(a);\n }\n return e;\n }, t = new Map;\n function default_1(s) {\n var r = t.get(this);\n return r || (r = new Map, t.set(this, r)), (r = n(this, r.get(s) || (r.set(s, r = function (n) {\n for (var t, s, r = 1, e = \"\", u = \"\", h = [0], p = function (n) { 1 === r && (n || (e = e.replace(/^\\s*\\n\\s*|\\s*\\n\\s*$/g, \"\"))) ? h.push(0, n, e) : 3 === r && (n || e) ? (h.push(3, n, e), r = 2) : 2 === r && \"...\" === e && n ? h.push(4, n, 0) : 2 === r && e && !n ? h.push(5, 0, !0, e) : r >= 5 && ((e || !n && 5 === r) && (h.push(r, 0, e, s), r = 6), n && (h.push(r, n, 0, s), r = 6)), e = \"\"; }, a = 0; a < n.length; a++) {\n a && (1 === r && p(), p(a));\n for (var l = 0; l < n[a].length; l++)\n t = n[a][l], 1 === r ? \"<\" === t ? (p(), h = [h], r = 3) : e += t : 4 === r ? \"--\" === e && \">\" === t ? (r = 1, e = \"\") : e = t + e[0] : u ? t === u ? u = \"\" : e += t : '\"' === t || \"'\" === t ? u = t : \">\" === t ? (p(), r = 1) : r && (\"=\" === t ? (r = 5, s = e, e = \"\") : \"/\" === t && (r < 5 || \">\" === n[a][l + 1]) ? (p(), 3 === r && (h = h[0]), r = h, (h = h[0]).push(2, 0, r), r = 0) : \" \" === t || \"\\t\" === t || \"\\n\" === t || \"\\r\" === t ? (p(), r = 2) : e += t), 3 === r && \"!--\" === e && (r = 4, h = h[0]);\n }\n return p(), h;\n }(s)), r), arguments, [])).length > 1 ? r : r[0];\n }\n exports.default = default_1;\n}\n","/* models/singleselect.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const input_widget_1 = require(\"@bokehjs/models/widgets/input_widget\");\n const inputs = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\"));\n class SingleSelectView extends input_widget_1.InputWidgetView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.value.change, () => this.render_selection());\n this.connect(this.model.properties.options.change, () => this.render());\n this.connect(this.model.properties.disabled_options.change, () => this.render());\n this.connect(this.model.properties.size.change, () => this.render());\n this.connect(this.model.properties.disabled.change, () => this.render());\n }\n render() {\n super.render();\n const options = this.model.options.map((opt) => {\n let value, _label;\n if ((0, types_1.isString)(opt))\n value = _label = opt;\n else\n [value, _label] = opt;\n let disabled = this.model.disabled_options.includes(value);\n return (0, dom_1.option)({ value: value, disabled: disabled }, _label);\n });\n this.input_el = (0, dom_1.select)({\n multiple: false,\n class: inputs.input,\n name: this.model.name,\n disabled: this.model.disabled,\n }, options);\n this.input_el.style.backgroundImage = 'none';\n this.input_el.addEventListener(\"change\", () => this.change_input());\n this.group_el.appendChild(this.input_el);\n this.render_selection();\n }\n render_selection() {\n const selected = this.model.value;\n for (const el of this.input_el.querySelectorAll('option'))\n if (el.value === selected)\n el.selected = true;\n // Note that some browser implementations might not reduce\n // the number of visible options for size <= 3.\n this.input_el.size = this.model.size;\n }\n change_input() {\n const is_focused = this.el.querySelector('select:focus') != null;\n let value = null;\n for (const el of this.shadow_el.querySelectorAll('option')) {\n if (el.selected) {\n value = el.value;\n break;\n }\n }\n this.model.value = value;\n super.change_input();\n // Restore focus back to the <select> afterwards,\n // so that even if python on_change callback is invoked,\n // focus remains on <select> and one can seamlessly scroll\n // up/down.\n if (is_focused)\n this.input_el.focus();\n }\n }\n exports.SingleSelectView = SingleSelectView;\n SingleSelectView.__name__ = \"SingleSelectView\";\n class SingleSelect extends input_widget_1.InputWidget {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.SingleSelect = SingleSelect;\n _a = SingleSelect;\n SingleSelect.__name__ = \"SingleSelect\";\n SingleSelect.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = SingleSelectView;\n _a.define(({ Any, Array, Int, Nullable, String }) => ({\n disabled_options: [Array(String), []],\n options: [Array(Any), []],\n size: [Int, 4],\n value: [Nullable(String), null],\n }));\n })();\n}\n","/* models/speech_to_text.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const iconStarted = `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"22px\" style=\"vertical-align: middle;\" fill=\"currentColor\" class=\"bi bi-mic\" viewBox=\"0 0 16 16\">\n <path fill-rule=\"evenodd\" d=\"M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z\"/>\n <path fill-rule=\"evenodd\" d=\"M10 8V3a2 2 0 1 0-4 0v5a2 2 0 1 0 4 0zM8 0a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V3a3 3 0 0 0-3-3z\"/>\n</svg>`;\n const iconNotStarted = `<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"22px\" style=\"vertical-align: middle;\" fill=\"currentColor\" class=\"bi bi-mic-mute\" viewBox=\"0 0 16 16\">\n<path fill-rule=\"evenodd\" d=\"M12.734 9.613A4.995 4.995 0 0 0 13 8V7a.5.5 0 0 0-1 0v1c0 .274-.027.54-.08.799l.814.814zm-2.522 1.72A4 4 0 0 1 4 8V7a.5.5 0 0 0-1 0v1a5 5 0 0 0 4.5 4.975V15h-3a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-3v-2.025a4.973 4.973 0 0 0 2.43-.923l-.718-.719zM11 7.88V3a3 3 0 0 0-5.842-.963l.845.845A2 2 0 0 1 10 3v3.879l1 1zM8.738 9.86l.748.748A3 3 0 0 1 5 8V6.121l1 1V8a2 2 0 0 0 2.738 1.86zm4.908 3.494l-12-12 .708-.708 12 12-.708.707z\"/>\n</svg>`;\n const titleStarted = \"Click to STOP the speech recognition.\";\n const titleNotStarted = \"Click to START the speech recognition.\";\n const { webkitSpeechRecognition } = window;\n const { webkitSpeechGrammarList } = window;\n function htmlToElement(html) {\n var template = document.createElement('template');\n html = html.trim(); // Never return a text node of whitespace as the result\n template.innerHTML = html;\n return template.content.firstChild;\n }\n function deserializeGrammars(grammars) {\n if (grammars) {\n var speechRecognitionList = new webkitSpeechGrammarList();\n for (let grammar of grammars) {\n if (grammar.src)\n speechRecognitionList.addFromString(grammar.src, grammar.weight);\n else if (grammar.uri)\n speechRecognitionList.addFromURI(grammar.uri, grammar.weight);\n }\n return speechRecognitionList;\n }\n else\n return null;\n }\n function round(value) {\n return Math.round((value + Number.EPSILON) * 100) / 100;\n }\n function serializeResults(results_) {\n const results = [];\n for (let result of results_) {\n let alternatives = [];\n let item = { is_final: result.isFinal, alternatives: alternatives };\n for (let i = 0; i < result.length; i++) {\n let alternative = {\n confidence: round(result[i].confidence),\n transcript: result[i].transcript\n };\n alternatives.push(alternative);\n }\n item.alternatives = alternatives;\n results.push(item);\n }\n return results;\n }\n class SpeechToTextView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.recognition = new webkitSpeechRecognition();\n this.recognition.lang = this.model.lang;\n this.recognition.continuous = this.model.continuous;\n this.recognition.interimResults = this.model.interim_results;\n this.recognition.maxAlternatives = this.model.max_alternatives;\n this.recognition.serviceURI = this.model.service_uri;\n this.setGrammars();\n this.recognition.onresult = (event) => {\n this.model.results = serializeResults(event.results);\n };\n this.recognition.onerror = (event) => {\n console.log(\"SpeechToText Error\");\n console.log(event);\n };\n this.recognition.onnomatch = (event) => {\n console.log(\"SpeechToText No Match\");\n console.log(event);\n };\n this.recognition.onaudiostart = () => this.model.audio_started = true;\n this.recognition.onaudioend = () => this.model.audio_started = false;\n this.recognition.onsoundstart = () => this.model.sound_started = true;\n this.recognition.onsoundend = () => this.model.sound_started = false;\n this.recognition.onspeechstart = () => this.model.speech_started = true;\n this.recognition.onspeechend = () => this.model.speech_started = false;\n this.recognition.onstart = () => {\n this.buttonEl.onclick = () => { this.recognition.stop(); };\n this.buttonEl.innerHTML = this.iconStarted();\n this.buttonEl.setAttribute(\"title\", titleStarted);\n this.model.started = true;\n };\n this.recognition.onend = () => {\n this.buttonEl.onclick = () => { this.recognition.start(); };\n this.buttonEl.innerHTML = this.iconNotStarted();\n this.buttonEl.setAttribute(\"title\", titleNotStarted);\n this.model.started = false;\n };\n this.buttonEl = htmlToElement(`<button class=\"bk bk-btn bk-btn-${this.model.button_type}\" type=\"button\" title=\"${titleNotStarted}\"></button>`);\n this.buttonEl.innerHTML = this.iconNotStarted();\n this.buttonEl.onclick = () => this.recognition.start();\n }\n iconStarted() {\n if (this.model.button_started !== '')\n return this.model.button_started;\n else\n return iconStarted;\n }\n iconNotStarted() {\n if (this.model.button_not_started !== '')\n return this.model.button_not_started;\n else\n return iconNotStarted;\n }\n setIcon() {\n if (this.model.started)\n this.buttonEl.innerHTML = this.iconStarted();\n else\n this.buttonEl.innerHTML = this.iconNotStarted();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.start.change, () => {\n this.model.start = false;\n this.recognition.start();\n });\n this.connect(this.model.properties.stop.change, () => {\n this.model.stop = false;\n this.recognition.stop();\n });\n this.connect(this.model.properties.abort.change, () => {\n this.model.abort = false;\n this.recognition.abort();\n });\n this.connect(this.model.properties.grammars.change, () => this.setGrammars());\n this.connect(this.model.properties.lang.change, () => this.recognition.lang = this.model.lang);\n this.connect(this.model.properties.continuous.change, () => this.recognition.continuous = this.model.continuous);\n this.connect(this.model.properties.interim_results.change, () => this.recognition.interimResults = this.model.interim_results);\n this.connect(this.model.properties.max_alternatives.change, () => this.recognition.maxAlternatives = this.model.max_alternatives);\n this.connect(this.model.properties.service_uri.change, () => this.recognition.serviceURI = this.model.service_uri);\n this.connect(this.model.properties.button_type.change, () => this.buttonEl.className = `bk bk-btn bk-btn-${this.model.button_type}`);\n this.connect(this.model.properties.button_hide.change, () => this.render());\n const { button_not_started, button_started } = this.model.properties;\n this.on_change([button_not_started, button_started], () => this.setIcon());\n }\n setGrammars() {\n this.recognition.grammars = deserializeGrammars(this.model.grammars);\n }\n render() {\n super.render();\n if (!this.model.button_hide)\n this.shadow_el.appendChild(this.buttonEl);\n }\n }\n exports.SpeechToTextView = SpeechToTextView;\n SpeechToTextView.__name__ = \"SpeechToTextView\";\n class SpeechToText extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.SpeechToText = SpeechToText;\n _a = SpeechToText;\n SpeechToText.__name__ = \"SpeechToText\";\n SpeechToText.__module__ = \"panel.models.speech_to_text\";\n (() => {\n _a.prototype.default_view = SpeechToTextView;\n _a.define(({ Any, Array, Boolean, Number, String }) => ({\n start: [Boolean, false],\n stop: [Boolean, false],\n abort: [Boolean, false],\n grammars: [Array(Any), []],\n lang: [String, ''],\n continuous: [Boolean, false],\n interim_results: [Boolean, false],\n max_alternatives: [Number, 1],\n service_uri: [String, ''],\n started: [Boolean, false],\n audio_started: [Boolean, false],\n sound_started: [Boolean, false],\n speech_started: [Boolean, false],\n button_type: [String, 'light'],\n button_hide: [Boolean, false],\n button_not_started: [String, ''],\n button_started: [String, ''],\n results: [Array(Any), []],\n }));\n })();\n}\n","/* models/state.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const view_1 = require(\"@bokehjs/core/view\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n const model_1 = require(\"@bokehjs/model\");\n const receiver_1 = require(\"@bokehjs/protocol/receiver\");\n function get_json(file, callback) {\n var xobj = new XMLHttpRequest();\n xobj.overrideMimeType(\"application/json\");\n xobj.open('GET', file, true);\n xobj.onreadystatechange = function () {\n if (xobj.readyState == 4 && xobj.status == 200) {\n callback(xobj.responseText);\n }\n };\n xobj.send(null);\n }\n class StateView extends view_1.View {\n }\n exports.StateView = StateView;\n StateView.__name__ = \"StateView\";\n class State extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n this._receiver = new receiver_1.Receiver();\n this._cache = {};\n }\n apply_state(state) {\n this._receiver.consume(state.header);\n this._receiver.consume(state.metadata);\n this._receiver.consume(state.content);\n if (this._receiver.message && this.document)\n this.document.apply_json_patch(this._receiver.message.content);\n }\n _receive_json(result, path) {\n const state = JSON.parse(result);\n this._cache[path] = state;\n let current = this.state;\n for (const i of this.values) {\n if (current instanceof Map)\n current = current.get(i);\n else\n current = current[i];\n }\n if (current === path)\n this.apply_state(state);\n else if (this._cache[current])\n this.apply_state(this._cache[current]);\n }\n set_state(widget, value) {\n let values = (0, array_1.copy)(this.values);\n const index = this.widgets[widget.id];\n values[index] = value;\n let state = this.state;\n for (const i of values) {\n if (state instanceof Map)\n state = state.get(i);\n else\n state = state[i];\n }\n this.values = values;\n if (this.json) {\n if (this._cache[state]) {\n this.apply_state(this._cache[state]);\n }\n else {\n get_json(state, (result) => this._receive_json(result, state));\n }\n }\n else {\n this.apply_state(state);\n }\n }\n }\n exports.State = State;\n _a = State;\n State.__name__ = \"State\";\n State.__module__ = \"panel.models.state\";\n (() => {\n _a.prototype.default_view = StateView;\n _a.define(({ Any, Boolean }) => ({\n json: [Boolean, false],\n state: [Any, {}],\n widgets: [Any, {}],\n values: [Any, []],\n }));\n })();\n}\n","/* models/tabs.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const tabs = tslib_1.__importStar(require(\"@bokehjs/styles/tabs.css\"));\n const grid_1 = require(\"@bokehjs/core/layout/grid\");\n const enums_1 = require(\"@bokehjs/core/enums\");\n const alignments_1 = require(\"@bokehjs/models/layouts/alignments\");\n const tabs_1 = require(\"@bokehjs/models/layouts/tabs\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n function show(element) {\n element.style.visibility = \"\";\n element.style.opacity = \"\";\n }\n function hide(element) {\n element.style.visibility = \"hidden\";\n element.style.opacity = \"0\";\n }\n class TabsView extends tabs_1.TabsView {\n connect_signals() {\n super.connect_signals();\n let view = this;\n while (view != null) {\n if (view.model.type.endsWith('Tabs')) {\n view.connect(view.model.properties.active.change, () => this.update_zindex());\n }\n view = view.parent || view._parent; // Handle ReactiveHTML\n }\n }\n get is_visible() {\n let parent = this.parent;\n let current_view = this;\n while (parent != null) {\n if (parent.model.type.endsWith('Tabs')) {\n if (parent.child_views.indexOf(current_view) !== parent.model.active) {\n return false;\n }\n }\n current_view = parent;\n parent = parent.parent || parent._parent; // Handle ReactiveHTML\n }\n return true;\n }\n render() {\n super.render();\n this.update_zindex();\n }\n update_zindex() {\n const { child_views } = this;\n for (const child_view of child_views) {\n if (child_view != null && child_view.el != null) {\n child_view.el.style.zIndex = \"\";\n }\n }\n if (this.is_visible) {\n const active = child_views[this.model.active];\n if (active != null && active.el != null)\n active.el.style.zIndex = \"1\";\n }\n }\n _after_layout() {\n layout_dom_1.LayoutDOMView.prototype._after_layout.call(this);\n const { child_views } = this;\n for (const child_view of child_views) {\n if (child_view !== undefined)\n hide(child_view.el);\n }\n const { active } = this.model;\n if (active in child_views) {\n const tab = child_views[active];\n if (tab !== undefined)\n show(tab.el);\n }\n }\n _update_layout() {\n layout_dom_1.LayoutDOMView.prototype._update_layout.call(this);\n const loc = this.model.tabs_location;\n this.class_list.remove([...enums_1.Location].map((loc) => tabs[loc]));\n this.class_list.add(tabs[loc]);\n const layoutable = new grid_1.Container();\n for (const view of this.child_views) {\n if (view == undefined)\n continue;\n view.style.append(\":host\", { grid_area: \"stack\" });\n if (view instanceof layout_dom_1.LayoutDOMView && view.layout != null) {\n layoutable.add({ r0: 0, c0: 0, r1: 1, c1: 1 }, view);\n }\n }\n if (layoutable.size != 0) {\n this.layout = new alignments_1.GridAlignmentLayout(layoutable);\n this.layout.set_sizing();\n }\n else {\n delete this.layout;\n }\n }\n update_active() {\n const i = this.model.active;\n const { header_els } = this;\n for (const el of header_els) {\n el.classList.remove(tabs.active);\n }\n if (i in header_els) {\n header_els[i].classList.add(tabs.active);\n }\n const { child_views } = this;\n for (const child_view of child_views) {\n hide(child_view.el);\n }\n if (i in child_views) {\n const view = child_views[i];\n show(view.el);\n if (view.invalidate_render == null)\n view.invalidate_render();\n }\n }\n }\n exports.TabsView = TabsView;\n TabsView.__name__ = \"TabsView\";\n class Tabs extends tabs_1.Tabs {\n }\n exports.Tabs = Tabs;\n _a = Tabs;\n Tabs.__name__ = \"Tabs\";\n Tabs.__module__ = \"panel.models.tabs\";\n (() => {\n _a.prototype.default_view = TabsView;\n })();\n}\n","/* models/terminal.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class KeystrokeEvent extends bokeh_events_1.ModelEvent {\n constructor(key) {\n super();\n this.key = key;\n }\n get event_values() {\n return { model: this.origin, key: this.key };\n }\n }\n exports.KeystrokeEvent = KeystrokeEvent;\n _a = KeystrokeEvent;\n KeystrokeEvent.__name__ = \"KeystrokeEvent\";\n (() => {\n _a.prototype.event_name = \"keystroke\";\n })();\n class TerminalView extends layout_1.HTMLBoxView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.output.change, this.write);\n this.connect(this.model.properties._clears.change, this.clear);\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ class: \"terminal-container\" });\n (0, layout_1.set_size)(this.container, this.model);\n this.term = this.getNewTerminal();\n this.term.onData((value) => {\n this.handleOnData(value);\n });\n this.webLinksAddon = this.getNewWebLinksAddon();\n this.term.loadAddon(this.webLinksAddon);\n this.term.open(this.container);\n this.term.onRender(() => {\n if (!this._rendered)\n this.fit();\n });\n this.write();\n this.shadow_el.appendChild(this.container);\n }\n getNewTerminal() {\n const wn = window;\n if (wn.Terminal)\n return new wn.Terminal(this.model.options);\n else\n return new wn.xtermjs.Terminal(this.model.options);\n }\n getNewWebLinksAddon() {\n const wn = window;\n return new wn.WebLinksAddon.WebLinksAddon();\n }\n handleOnData(value) {\n this.model.trigger_event(new KeystrokeEvent(value));\n }\n write() {\n const text = this.model.output;\n if (text == null || !text.length)\n return;\n // https://stackoverflow.com/questions/65367607/how-to-handle-new-line-in-xterm-js-while-writing-data-into-the-terminal\n const cleaned = text.replace(/\\r?\\n/g, \"\\r\\n\");\n // var text = Array.from(cleaned, (x) => x.charCodeAt(0))\n this.term.write(cleaned);\n }\n clear() {\n this.term.clear();\n }\n fit() {\n const width = this.container.offsetWidth;\n const height = this.container.offsetHeight;\n const renderer = this.term._core._renderService;\n const cell_width = renderer.dimensions.actualCellWidth || 9;\n const cell_height = renderer.dimensions.actualCellHeight || 18;\n if (width == null || height == null || width <= 0 || height <= 0)\n return;\n const cols = Math.max(2, Math.floor(width / cell_width));\n const rows = Math.max(1, Math.floor(height / cell_height));\n if (this.term.rows !== rows || this.term.cols !== cols)\n this.term.resize(cols, rows);\n this.model.ncols = cols;\n this.model.nrows = rows;\n this._rendered = true;\n }\n after_layout() {\n super.after_layout();\n this.fit();\n }\n }\n exports.TerminalView = TerminalView;\n TerminalView.__name__ = \"TerminalView\";\n // The Bokeh .ts model corresponding to the Bokeh .py model\n class Terminal extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Terminal = Terminal;\n _b = Terminal;\n Terminal.__name__ = \"Terminal\";\n Terminal.__module__ = \"panel.models.terminal\";\n (() => {\n _b.prototype.default_view = TerminalView;\n _b.define(({ Any, Int, String }) => ({\n _clears: [Int, 0],\n options: [Any, {}],\n output: [String, ''],\n ncols: [Int, 0],\n nrows: [Int, 0],\n }));\n })();\n}\n","/* models/textarea_input.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const textarea_input_1 = require(\"@bokehjs/models/widgets/textarea_input\");\n class TextAreaInputView extends textarea_input_1.TextAreaInputView {\n connect_signals() {\n super.connect_signals();\n const { value, max_rows } = this.model.properties;\n this.on_change([max_rows, value], () => this.update_rows());\n }\n update_rows() {\n if (!this.model.auto_grow) {\n return;\n }\n // Use this.el directly to access the textarea element\n const textarea = this.input_el;\n const textLines = textarea.value.split(\"\\n\");\n const numRows = Math.max(textLines.length, this.model.rows, 1);\n textarea.rows = Math.min(numRows, this.model.max_rows || Infinity);\n }\n render() {\n super.render();\n this.update_rows();\n this.el.addEventListener(\"input\", () => {\n this.update_rows();\n });\n }\n }\n exports.TextAreaInputView = TextAreaInputView;\n TextAreaInputView.__name__ = \"TextAreaInputView\";\n class TextAreaInput extends textarea_input_1.TextAreaInput {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TextAreaInput = TextAreaInput;\n _a = TextAreaInput;\n TextAreaInput.__name__ = \"TextAreaInput\";\n TextAreaInput.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = TextAreaInputView;\n _a.define(({ Boolean, Int, Nullable }) => ({\n auto_grow: [Boolean, false],\n max_rows: [Nullable(Int), null]\n }));\n })();\n}\n","/* models/text_to_speech.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n function toVoicesList(voices) {\n var voicesList = [];\n for (let voice of voices) {\n var item = {\n default: voice.default,\n lang: voice.lang,\n local_service: voice.localService,\n name: voice.name,\n voice_uri: voice.voiceURI,\n };\n voicesList.push(item);\n }\n return voicesList;\n }\n class TextToSpeechView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.model.paused = speechSynthesis.paused;\n this.model.pending = speechSynthesis.pending;\n this.model.speaking = speechSynthesis.speaking;\n // Hack: Keeps speeking for longer texts\n // https://stackoverflow.com/questions/21947730/chrome-speech-synthesis-with-longer-texts\n this._callback = window.setInterval(function () {\n if (!speechSynthesis.paused && speechSynthesis.speaking) {\n window.speechSynthesis.resume();\n }\n }, 10000);\n const populateVoiceList = () => {\n if (typeof speechSynthesis === 'undefined')\n return;\n // According to https://talkrapp.com/speechSynthesis.html not all voices are available\n // The article includes code for ios to handle this. Might be useful.\n this.voices = speechSynthesis.getVoices();\n if (!this.voices)\n return;\n this.model.voices = toVoicesList(this.voices);\n };\n populateVoiceList();\n if (typeof speechSynthesis !== 'undefined' && speechSynthesis.onvoiceschanged !== undefined)\n speechSynthesis.onvoiceschanged = populateVoiceList;\n }\n remove() {\n if (this._callback != null)\n clearInterval(this._callback);\n speechSynthesis.cancel();\n super.remove();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.speak.change, () => {\n this.speak();\n });\n this.connect(this.model.properties.pause.change, () => {\n this.model.pause = false;\n speechSynthesis.pause();\n });\n this.connect(this.model.properties.resume.change, () => {\n this.model.resume = false;\n speechSynthesis.resume();\n });\n this.connect(this.model.properties.cancel.change, () => {\n this.model.cancel = false;\n speechSynthesis.cancel();\n });\n }\n speak() {\n let utterance = new SpeechSynthesisUtterance(this.model.speak.text);\n utterance.pitch = this.model.speak.pitch;\n utterance.volume = this.model.speak.volume;\n utterance.rate = this.model.speak.rate;\n if (this.model.voices) {\n for (let voice of this.voices) {\n if (voice.name === this.model.speak.voice)\n utterance.voice = voice;\n }\n }\n utterance.onpause = () => this.model.paused = true;\n utterance.onstart = () => {\n this.model.speaking = true;\n this.model.paused = false;\n this.model.pending = speechSynthesis.pending;\n };\n utterance.onresume = () => this.model.paused = false;\n utterance.onend = () => {\n this.model.speaking = false;\n this.model.paused = false;\n this.model.pending = speechSynthesis.pending;\n };\n speechSynthesis.speak(utterance);\n this.model.paused = speechSynthesis.paused;\n this.model.pending = speechSynthesis.pending;\n }\n render() {\n super.render();\n // Hack: This will make sure voices are assigned when\n // Bokeh/ Panel is served first time with --show option.\n if (!this.model.voices)\n this.model.voices = toVoicesList(this.voices);\n if (this.model.speak != null && this.model.speak.text)\n this.speak();\n }\n }\n exports.TextToSpeechView = TextToSpeechView;\n TextToSpeechView.__name__ = \"TextToSpeechView\";\n class TextToSpeech extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TextToSpeech = TextToSpeech;\n _a = TextToSpeech;\n TextToSpeech.__name__ = \"TextToSpeech\";\n TextToSpeech.__module__ = \"panel.models.text_to_speech\";\n (() => {\n _a.prototype.default_view = TextToSpeechView;\n _a.define(({ Any, Array, Boolean }) => ({\n paused: [Boolean, false],\n pending: [Boolean, false],\n speaking: [Boolean, false],\n voices: [Array(Any), []],\n cancel: [Boolean, false],\n pause: [Boolean, false],\n resume: [Boolean, false],\n speak: [Any, {}],\n }));\n })();\n}\n","/* models/tooltip_icon.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n var _a;\n const control_1 = require(\"@bokehjs/models/widgets/control\");\n const tooltip_1 = require(\"@bokehjs/models/ui/tooltip\");\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const inputs_css_1 = tslib_1.__importStar(require(\"@bokehjs/styles/widgets/inputs.css\")), inputs = inputs_css_1;\n const icons_css_1 = tslib_1.__importDefault(require(\"@bokehjs/styles/icons.css\"));\n class TooltipIconView extends control_1.ControlView {\n *controls() { }\n *children() {\n yield* super.children();\n yield this.description;\n }\n async lazy_initialize() {\n await super.lazy_initialize();\n const { description } = this.model;\n this.description = await (0, build_views_1.build_view)(description, { parent: this });\n }\n remove() {\n var _b;\n (_b = this.description) === null || _b === void 0 ? void 0 : _b.remove();\n super.remove();\n }\n stylesheets() {\n return [...super.stylesheets(), inputs_css_1.default, icons_css_1.default];\n }\n render() {\n super.render();\n const icon_el = (0, dom_1.div)({ class: inputs.icon });\n this.desc_el = (0, dom_1.div)({ class: inputs.description }, icon_el);\n const { desc_el, description } = this;\n description.model.target = desc_el;\n let persistent = false;\n const toggle = (visible) => {\n description.model.setv({\n visible,\n closable: persistent,\n });\n icon_el.classList.toggle(inputs.opaque, visible && persistent);\n };\n this.on_change(description.model.properties.visible, () => {\n const { visible } = description.model;\n if (!visible) {\n persistent = false;\n }\n toggle(visible);\n });\n desc_el.addEventListener('mouseenter', () => {\n toggle(true);\n });\n desc_el.addEventListener('mouseleave', () => {\n if (!persistent)\n toggle(false);\n });\n document.addEventListener('mousedown', (event) => {\n const path = event.composedPath();\n if (path.includes(description.el)) {\n return;\n }\n else if (path.includes(desc_el)) {\n persistent = !persistent;\n toggle(persistent);\n }\n else {\n persistent = false;\n toggle(false);\n }\n });\n window.addEventListener('blur', () => {\n persistent = false;\n toggle(false);\n });\n // Label to get highlight when icon is hovered\n this.shadow_el.appendChild((0, dom_1.label)(this.desc_el));\n }\n change_input() { }\n }\n exports.TooltipIconView = TooltipIconView;\n TooltipIconView.__name__ = \"TooltipIconView\";\n class TooltipIcon extends control_1.Control {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TooltipIcon = TooltipIcon;\n _a = TooltipIcon;\n TooltipIcon.__name__ = \"TooltipIcon\";\n TooltipIcon.__module__ = 'panel.models.widgets';\n (() => {\n _a.prototype.default_view = TooltipIconView;\n _a.define(({ Ref }) => ({\n description: [Ref(tooltip_1.Tooltip), new tooltip_1.Tooltip()],\n }));\n })();\n}\n","/* models/trend.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const build_views_1 = require(\"@bokehjs/core/build_views\");\n const plots_1 = require(\"@bokehjs/models/plots\");\n const glyphs_1 = require(\"@bokehjs/models/glyphs\");\n const dom_1 = require(\"@bokehjs/core/dom\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const formatters_1 = require(\"@bokehjs/models/formatters\");\n const red = \"#d9534f\";\n const green = \"#5cb85c\";\n const blue = \"#428bca\";\n class TrendIndicatorView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this.containerDiv = (0, dom_1.div)({ style: \"height:100%; width:100%;\" });\n this.titleDiv = (0, dom_1.div)({ style: \"font-size: 1em; word-wrap: break-word;\" });\n this.valueDiv = (0, dom_1.div)({ style: \"font-size: 2em\" });\n this.value2Div = (0, dom_1.div)({ style: \"font-size: 1em; opacity: 0.5; display: inline\" });\n this.changeDiv = (0, dom_1.div)({ style: \"font-size: 1em; opacity: 0.5; display: inline\" });\n this.textDiv = (0, dom_1.div)({}, this.titleDiv, this.valueDiv, (0, dom_1.div)({}, this.changeDiv, this.value2Div));\n this.updateTitle();\n this.updateValue();\n this.updateValue2();\n this.updateValueChange();\n this.updateTextFontSize();\n this.plotDiv = (0, dom_1.div)({});\n this.containerDiv = (0, dom_1.div)({ style: \"height:100%; width:100%\" }, this.textDiv, this.plotDiv);\n this.updateLayout();\n }\n connect_signals() {\n super.connect_signals();\n const { pos_color, neg_color } = this.model.properties;\n this.on_change([pos_color, neg_color], () => this.updateValueChange());\n const { plot_color, plot_type, width, height, sizing_mode } = this.model.properties;\n this.on_change([plot_color, plot_type, width, height, sizing_mode], () => this.render());\n this.connect(this.model.properties.title.change, () => this.updateTitle(true));\n this.connect(this.model.properties.value.change, () => this.updateValue(true));\n this.connect(this.model.properties.value_change.change, () => this.updateValue2(true));\n this.connect(this.model.properties.layout.change, () => this.updateLayout());\n }\n async render() {\n super.render();\n this.shadow_el.appendChild(this.containerDiv);\n await this.setPlot();\n }\n async setPlot() {\n this.plot = new plots_1.Plot({\n background_fill_color: null,\n border_fill_color: null,\n outline_line_color: null,\n min_border: 0,\n sizing_mode: \"stretch_both\",\n toolbar_location: null,\n });\n var source = this.model.source;\n if (this.model.plot_type === \"line\") {\n var line = new glyphs_1.Line({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 4,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(line, source);\n }\n else if (this.model.plot_type === \"step\") {\n var step = new glyphs_1.Step({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 3,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(step, source);\n }\n else if (this.model.plot_type === \"area\") {\n var varea = new glyphs_1.VArea({\n x: { field: this.model.plot_x },\n y1: { field: this.model.plot_y },\n y2: 0,\n fill_color: this.model.plot_color,\n fill_alpha: 0.5,\n });\n this.plot.add_glyph(varea, source);\n var line = new glyphs_1.Line({\n x: { field: this.model.plot_x },\n y: { field: this.model.plot_y },\n line_width: 3,\n line_color: this.model.plot_color,\n });\n this.plot.add_glyph(line, source);\n }\n else {\n var vbar = new glyphs_1.VBar({\n x: { field: this.model.plot_x },\n top: { field: this.model.plot_y },\n width: 0.9,\n line_color: null,\n fill_color: this.model.plot_color\n });\n this.plot.add_glyph(vbar, source);\n }\n const view = await (0, build_views_1.build_view)(this.plot);\n this.plotDiv.innerHTML = \"\";\n view.render_to(this.plotDiv);\n }\n after_layout() {\n super.after_layout();\n this.updateTextFontSize();\n }\n updateTextFontSize() {\n this.updateTextFontSizeColumn();\n }\n updateTextFontSizeColumn() {\n let elWidth = this.containerDiv.clientWidth;\n let elHeight = this.containerDiv.clientHeight;\n if (this.model.layout === \"column\")\n elHeight = Math.round(elHeight / 2);\n else\n elWidth = Math.round(elWidth / 2);\n const widthTitle = this.model.title.length;\n const widthValue = 2 * this._value_format.length;\n const widthValue2 = this._value_change_format.length + 1;\n const widthConstraint1 = elWidth / widthTitle * 2.0;\n const widthConstraint2 = elWidth / widthValue * 1.8;\n const widthConstraint3 = elWidth / widthValue2 * 2.0;\n const heightConstraint = elHeight / 6;\n const fontSize = Math.min(widthConstraint1, widthConstraint2, widthConstraint3, heightConstraint);\n this.textDiv.style.fontSize = Math.trunc(fontSize) + \"px\";\n this.textDiv.style.lineHeight = \"1.3\";\n }\n updateTitle(update_fontsize = false) {\n this.titleDiv.innerText = this.model.title;\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValue(update_fontsize = false) {\n this._value_format = this.model.formatter.doFormat([this.model.value], { loc: 0 })[0];\n this.valueDiv.innerText = this._value_format;\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValue2(update_fontsize = false) {\n this._value_change_format = this.model.change_formatter.doFormat([this.model.value_change], { loc: 0 })[0];\n this.value2Div.innerText = this._value_change_format;\n this.updateValueChange();\n if (update_fontsize)\n this.updateTextFontSize();\n }\n updateValueChange() {\n if (this.model.value_change > 0) {\n this.changeDiv.innerHTML = \"▲\";\n this.changeDiv.style.color = this.model.pos_color;\n }\n else if (this.model.value_change < 0) {\n this.changeDiv.innerHTML = \"▼\";\n this.changeDiv.style.color = this.model.neg_color;\n }\n else {\n this.changeDiv.innerHTML = \" \";\n this.changeDiv.style.color = \"inherit\";\n }\n }\n updateLayout() {\n if (this.model.layout === \"column\") {\n this.containerDiv.style.display = \"block\";\n this.textDiv.style.height = \"50%\";\n this.textDiv.style.width = \"100%\";\n this.plotDiv.style.height = \"50%\";\n this.plotDiv.style.width = \"100%\";\n }\n else {\n this.containerDiv.style.display = \"flex\";\n this.textDiv.style.height = \"100%\";\n this.textDiv.style.width = \"\";\n this.plotDiv.style.height = \"100%\";\n this.plotDiv.style.width = \"\";\n this.textDiv.style.flex = \"1\";\n this.plotDiv.style.flex = \"1\";\n }\n if (this._has_finished)\n this.invalidate_layout();\n }\n }\n exports.TrendIndicatorView = TrendIndicatorView;\n TrendIndicatorView.__name__ = \"TrendIndicatorView\";\n class TrendIndicator extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.TrendIndicator = TrendIndicator;\n _a = TrendIndicator;\n TrendIndicator.__name__ = \"TrendIndicator\";\n TrendIndicator.__module__ = \"panel.models.trend\";\n (() => {\n _a.prototype.default_view = TrendIndicatorView;\n _a.define(({ Number, String, Ref }) => ({\n description: [String, \"\"],\n formatter: [Ref(formatters_1.TickFormatter), () => new formatters_1.BasicTickFormatter()],\n change_formatter: [Ref(formatters_1.TickFormatter), () => new formatters_1.NumeralTickFormatter()],\n layout: [String, \"column\"],\n source: [Ref(column_data_source_1.ColumnDataSource)],\n plot_x: [String, \"x\"],\n plot_y: [String, \"y\"],\n plot_color: [String, blue],\n plot_type: [String, \"bar\"],\n pos_color: [String, green],\n neg_color: [String, red],\n title: [String, \"\"],\n value: [Number, 0],\n value_change: [Number, 0],\n }));\n })();\n}\n","/* models/vega.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a, _b;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const layout_dom_1 = require(\"@bokehjs/models/layouts/layout_dom\");\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n class VegaEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.VegaEvent = VegaEvent;\n _a = VegaEvent;\n VegaEvent.__name__ = \"VegaEvent\";\n (() => {\n _a.prototype.event_name = \"vega_event\";\n })();\n class VegaPlotView extends layout_dom_1.LayoutDOMView {\n constructor() {\n super(...arguments);\n this._rendered = false;\n }\n connect_signals() {\n super.connect_signals();\n const { data, show_actions, theme } = this.model.properties;\n this._replot = (0, debounce_1.debounce)(() => this._plot(), 20);\n this.on_change([data, show_actions, theme], () => {\n this._replot();\n });\n this.connect(this.model.properties.data_sources.change, () => this._connect_sources());\n this.connect(this.model.properties.events.change, () => {\n for (const event of this.model.events) {\n if (this._callbacks.indexOf(event) > -1)\n continue;\n this._callbacks.push(event);\n const callback = (name, value) => this._dispatch_event(name, value);\n const timeout = this.model.throttle[event] || 20;\n this.vega_view.addSignalListener(event, (0, debounce_1.debounce)(callback, timeout, false));\n }\n });\n this._connected = [];\n this._connect_sources();\n }\n _connect_sources() {\n for (const ds in this.model.data_sources) {\n const cds = this.model.data_sources[ds];\n if (this._connected.indexOf(ds) < 0) {\n this.connect(cds.properties.data.change, () => this._replot());\n this._connected.push(ds);\n }\n }\n }\n remove() {\n if (this.vega_view) {\n this.vega_view.finalize();\n }\n super.remove();\n }\n _dispatch_event(name, value) {\n if ('vlPoint' in value && value.vlPoint.or != null) {\n const indexes = [];\n for (const index of value.vlPoint.or) {\n if (index._vgsid_ !== undefined) { // If \"_vgsid_\" property exists\n indexes.push(index._vgsid_);\n }\n else { // If \"_vgsid_\" property doesn't exist\n // Iterate through all properties in the \"index\" object\n for (const key in index) {\n if (index.hasOwnProperty(key)) { // To ensure key comes from \"index\" object itself, not its prototype\n indexes.push({ [key]: index[key] }); // Push a new object with this key-value pair into the array\n }\n }\n }\n }\n value = indexes;\n }\n this.model.trigger_event(new VegaEvent({ type: name, value: value }));\n }\n _fetch_datasets() {\n const datasets = {};\n for (const ds in this.model.data_sources) {\n const cds = this.model.data_sources[ds];\n const data = [];\n const columns = cds.columns();\n for (let i = 0; i < cds.get_length(); i++) {\n const item = {};\n for (const column of columns) {\n item[column] = cds.data[column][i];\n }\n data.push(item);\n }\n datasets[ds] = data;\n }\n return datasets;\n }\n get child_models() {\n return [];\n }\n render() {\n super.render();\n this._rendered = false;\n this.container = (0, dom_1.div)();\n (0, layout_1.set_size)(this.container, this.model);\n this._callbacks = [];\n this._plot();\n this.shadow_el.append(this.container);\n }\n _plot() {\n const data = this.model.data;\n if ((data == null) || !window.vegaEmbed)\n return;\n if (this.model.data_sources && (Object.keys(this.model.data_sources).length > 0)) {\n const datasets = this._fetch_datasets();\n if ('data' in datasets) {\n data.data['values'] = datasets['data'];\n delete datasets['data'];\n }\n if (data.data != null) {\n const data_objs = (0, types_1.isArray)(data.data) ? data.data : [data.data];\n for (const d of data_objs) {\n if (d.name in datasets) {\n d['values'] = datasets[d.name];\n delete datasets[d.name];\n }\n }\n }\n this.model.data['datasets'] = datasets;\n }\n const config = { actions: this.model.show_actions, theme: this.model.theme };\n window.vegaEmbed(this.container, this.model.data, config).then((result) => {\n this.vega_view = result.view;\n this._resize = (0, debounce_1.debounce)(() => this.resize_view(result.view), 50);\n const callback = (name, value) => this._dispatch_event(name, value);\n for (const event of this.model.events) {\n this._callbacks.push(event);\n const timeout = this.model.throttle[event] || 20;\n this.vega_view.addSignalListener(event, (0, debounce_1.debounce)(callback, timeout, false));\n }\n });\n }\n after_layout() {\n super.after_layout();\n if (this.vega_view != null) {\n this._resize();\n }\n }\n resize_view(view) {\n const canvas = view._renderer.canvas();\n if (!this._rendered && canvas !== null) {\n for (const listener of view._eventListeners) {\n if (listener.type === 'resize')\n listener.handler(new Event('resize'));\n }\n this._rendered = true;\n }\n }\n }\n exports.VegaPlotView = VegaPlotView;\n VegaPlotView.__name__ = \"VegaPlotView\";\n class VegaPlot extends layout_dom_1.LayoutDOM {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VegaPlot = VegaPlot;\n _b = VegaPlot;\n VegaPlot.__name__ = \"VegaPlot\";\n VegaPlot.__module__ = \"panel.models.vega\";\n (() => {\n _b.prototype.default_view = VegaPlotView;\n _b.define(({ Any, Array, Boolean, Nullable, String }) => ({\n data: [Any, {}],\n data_sources: [Any, {}],\n events: [Array(String), []],\n show_actions: [Boolean, false],\n theme: [Nullable(String), null],\n throttle: [Any, {}]\n }));\n })();\n}\n","/* models/video.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VideoView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._blocked = false;\n this._setting = false;\n this._time = Date.now();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.loop.change, () => this.set_loop());\n this.connect(this.model.properties.paused.change, () => this.set_paused());\n this.connect(this.model.properties.muted.change, () => this.set_muted());\n this.connect(this.model.properties.autoplay.change, () => this.set_autoplay());\n this.connect(this.model.properties.time.change, () => this.set_time());\n this.connect(this.model.properties.value.change, () => this.set_value());\n this.connect(this.model.properties.volume.change, () => this.set_volume());\n }\n render() {\n super.render();\n this.videoEl = document.createElement('video');\n this.containerEl = document.createElement('div');\n this.containerEl.className = \"pn-video-container\";\n this.containerEl.style.height = '100%';\n this.containerEl.style.width = '100%';\n this.videoEl.style.objectFit = 'fill';\n this.videoEl.style.width = '100%';\n this.videoEl.style.height = '100%';\n if (!this.model.sizing_mode || this.model.sizing_mode === 'fixed') {\n if (this.model.height)\n this.videoEl.height = this.model.height;\n if (this.model.width)\n this.videoEl.width = this.model.width;\n }\n if (this.model.max_height)\n this.videoEl.style.maxHeight = `${this.model.max_height}px`;\n if (this.model.max_width)\n this.videoEl.style.maxWidth = `${this.model.max_width}px`;\n this.videoEl.controls = true;\n this.videoEl.src = this.model.value;\n this.videoEl.currentTime = this.model.time;\n this.videoEl.loop = this.model.loop;\n this.videoEl.muted = this.model.muted;\n this.videoEl.autoplay = this.model.autoplay;\n if (this.model.volume != null)\n this.videoEl.volume = this.model.volume / 100;\n else\n this.model.volume = this.videoEl.volume * 100;\n this.videoEl.onpause = () => this.model.paused = true;\n this.videoEl.onplay = () => this.model.paused = false;\n this.videoEl.ontimeupdate = () => this.update_time(this);\n this.videoEl.onvolumechange = () => this.update_volume(this);\n this.containerEl.appendChild(this.videoEl);\n this.shadow_el.appendChild(this.containerEl);\n if (!this.model.paused)\n this.videoEl.play();\n }\n update_time(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n if ((Date.now() - view._time) < view.model.throttle)\n return;\n view._blocked = true;\n view.model.time = view.videoEl.currentTime;\n view._time = Date.now();\n }\n update_volume(view) {\n if (view._setting) {\n view._setting = false;\n return;\n }\n view._blocked = true;\n view.model.volume = view.videoEl.volume * 100;\n }\n set_loop() {\n this.videoEl.loop = this.model.loop;\n }\n set_muted() {\n this.videoEl.muted = this.model.muted;\n }\n set_autoplay() {\n this.videoEl.autoplay = this.model.autoplay;\n }\n set_paused() {\n if (!this.videoEl.paused && this.model.paused)\n this.videoEl.pause();\n if (this.videoEl.paused && !this.model.paused)\n this.videoEl.play();\n }\n set_volume() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n if (this.model.volume != null)\n this.videoEl.volume = this.model.volume / 100;\n }\n set_time() {\n if (this._blocked) {\n this._blocked = false;\n return;\n }\n this._setting = true;\n this.videoEl.currentTime = this.model.time;\n }\n set_value() {\n this.videoEl.src = this.model.value;\n }\n }\n exports.VideoView = VideoView;\n VideoView.__name__ = \"VideoView\";\n class Video extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.Video = Video;\n _a = Video;\n Video.__name__ = \"Video\";\n Video.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = VideoView;\n _a.define(({ Any, Boolean, Int, Number, Nullable }) => ({\n loop: [Boolean, false],\n paused: [Boolean, true],\n muted: [Boolean, false],\n autoplay: [Boolean, false],\n time: [Number, 0],\n throttle: [Int, 250],\n value: [Any, ''],\n volume: [Nullable(Int), null],\n }));\n })();\n}\n","/* models/videostream.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VideoStreamView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.constraints = {\n 'audio': false,\n 'video': true\n };\n }\n initialize() {\n super.initialize();\n if (this.model.timeout !== null)\n this.set_timeout();\n }\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.timeout.change, () => this.set_timeout());\n this.connect(this.model.properties.snapshot.change, () => this.snapshot());\n this.connect(this.model.properties.paused.change, () => this.pause());\n }\n pause() {\n if (this.model.paused) {\n if (this.timer != null) {\n clearInterval(this.timer);\n this.timer = null;\n }\n this.videoEl.pause();\n }\n else\n this.videoEl.play();\n this.set_timeout();\n }\n set_timeout() {\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n if (this.model.timeout != null && this.model.timeout > 0)\n this.timer = setInterval(() => this.snapshot(), this.model.timeout);\n }\n snapshot() {\n this.canvasEl.width = this.videoEl.videoWidth;\n this.canvasEl.height = this.videoEl.videoHeight;\n const context = this.canvasEl.getContext('2d');\n if (context)\n context.drawImage(this.videoEl, 0, 0, this.canvasEl.width, this.canvasEl.height);\n this.model.value = this.canvasEl.toDataURL(\"image/\" + this.model.format, 0.95);\n }\n remove() {\n super.remove();\n if (this.timer) {\n clearInterval(this.timer);\n this.timer = null;\n }\n }\n render() {\n super.render();\n if (this.videoEl)\n return;\n this.videoEl = document.createElement('video');\n if (!this.model.sizing_mode || this.model.sizing_mode === 'fixed') {\n if (this.model.height)\n this.videoEl.height = this.model.height;\n if (this.model.width)\n this.videoEl.width = this.model.width;\n }\n this.videoEl.style.objectFit = 'fill';\n this.videoEl.style.minWidth = '100%';\n this.videoEl.style.minHeight = '100%';\n this.canvasEl = document.createElement('canvas');\n this.shadow_el.appendChild(this.videoEl);\n if (navigator.mediaDevices.getUserMedia) {\n navigator.mediaDevices.getUserMedia(this.constraints)\n .then(stream => {\n this.videoEl.srcObject = stream;\n if (!this.model.paused) {\n this.videoEl.play();\n }\n })\n .catch(console.error);\n }\n }\n }\n exports.VideoStreamView = VideoStreamView;\n VideoStreamView.__name__ = \"VideoStreamView\";\n class VideoStream extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VideoStream = VideoStream;\n _a = VideoStream;\n VideoStream.__name__ = \"VideoStream\";\n VideoStream.__module__ = \"panel.models.widgets\";\n (() => {\n _a.prototype.default_view = VideoStreamView;\n _a.define(({ Any, Boolean, Int, Nullable, String }) => ({\n format: [String, 'png'],\n paused: [Boolean, false],\n snapshot: [Boolean, false],\n timeout: [Nullable(Int), null],\n value: [Any]\n }));\n _a.override({\n height: 240,\n width: 320\n });\n })();\n}\n","/* models/vizzu.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const types_1 = require(\"@bokehjs/core/util/types\");\n const column_data_source_1 = require(\"@bokehjs/models/sources/column_data_source\");\n const bokeh_events_1 = require(\"@bokehjs/core/bokeh_events\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const layout_1 = require(\"c64c1219c8\") /* ./layout */;\n class VizzuEvent extends bokeh_events_1.ModelEvent {\n constructor(data) {\n super();\n this.data = data;\n this.event_name = \"vizzu_event\";\n this.publish = true;\n }\n get event_values() {\n return { model: this.origin, data: this.data };\n }\n }\n exports.VizzuEvent = VizzuEvent;\n VizzuEvent.__name__ = \"VizzuEvent\";\n const VECTORIZED_PROPERTIES = ['x', 'y', 'color', 'label', 'lightness', 'size', 'splittedBy', 'dividedBy'];\n class VizzuChartView extends layout_1.HTMLBoxView {\n constructor() {\n super(...arguments);\n this.update = [];\n this._animating = false;\n }\n connect_signals() {\n super.connect_signals();\n const update = (0, debounce_1.debounce)(() => {\n if (!this.valid_config) {\n console.warn('Vizzu config not valid given current data.');\n return;\n }\n else if (!this.update.length || this._animating)\n return;\n else {\n let change = {};\n for (const prop of this.update) {\n if (prop === 'config')\n change = Object.assign(Object.assign({}, change), { config: this.config() });\n else if (prop === 'data')\n change = Object.assign(Object.assign({}, change), { data: this.data() });\n else\n change = Object.assign(Object.assign({}, change), { style: this.model.style });\n }\n this._animating = true;\n this.vizzu_view.animate(change, this.model.duration + 'ms').then(() => {\n this._animating = false;\n if (this.update.length)\n update();\n });\n this.update = [];\n }\n }, 20);\n const update_prop = (prop) => {\n if (!this.update.includes(prop))\n this.update.push(prop);\n update();\n };\n this.connect(this.model.properties.config.change, () => update_prop('config'));\n this.connect(this.model.source.properties.data.change, () => update_prop('data'));\n this.connect(this.model.source.streaming, () => update_prop('data'));\n this.connect(this.model.source.patching, () => update_prop('data'));\n this.connect(this.model.properties.tooltip.change, () => {\n this.vizzu_view.feature('tooltip', this.model.tooltip);\n });\n this.connect(this.model.properties.style.change, () => update_prop('style'));\n }\n get valid_config() {\n const columns = this.model.source.columns();\n if ('channels' in this.model.config) {\n for (const col of Object.values(this.model.config.channels)) {\n if ((0, types_1.isArray)(col)) {\n for (const c of col) {\n if (col != null && !columns.includes(c))\n return false;\n }\n }\n else if ((0, types_1.isObject)(col)) {\n for (const prop of Object.keys(col)) {\n for (const c of col[prop]) {\n if (col != null && !columns.includes(c))\n return false;\n }\n }\n }\n else if (col != null && !columns.includes(col))\n return false;\n }\n }\n else {\n for (const prop of VECTORIZED_PROPERTIES) {\n if (prop in this.model.config && !columns.includes(this.model.config[prop]))\n return false;\n }\n }\n return true;\n }\n config() {\n let config = Object.assign({}, this.model.config);\n if ('channels' in config)\n config['channels'] = Object.assign({}, config.channels);\n if (config.preset != undefined)\n config = window.Vizzu.presets[config.preset](config);\n return config;\n }\n data() {\n const series = [];\n for (const column of this.model.columns) {\n let array = [...this.model.source.get_array(column.name)];\n if (column.type === 'datetime' || column.type == 'date')\n column.type = 'dimension';\n if (column.type === 'dimension')\n array = array.map(String);\n series.push(Object.assign(Object.assign({}, column), { values: array }));\n }\n return { series };\n }\n render() {\n super.render();\n this.container = (0, dom_1.div)({ 'style': 'display: contents;' });\n this.shadow_el.append(this.container);\n const state = { config: this.config(), data: this.data(), style: this.model.style };\n this.vizzu_view = new window.Vizzu(this.container, state);\n this._animating = true;\n this.vizzu_view.initializing.then((chart) => {\n chart.on('click', (event) => {\n this.model.trigger_event(new VizzuEvent(event.data));\n });\n chart.feature('tooltip', this.model.tooltip);\n this._animating = false;\n });\n }\n remove() {\n if (this.vizzu_view) {\n this.vizzu_view.detach();\n }\n super.remove();\n }\n }\n exports.VizzuChartView = VizzuChartView;\n VizzuChartView.__name__ = \"VizzuChartView\";\n class VizzuChart extends layout_1.HTMLBox {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VizzuChart = VizzuChart;\n _a = VizzuChart;\n VizzuChart.__name__ = \"VizzuChart\";\n VizzuChart.__module__ = \"panel.models.vizzu\";\n (() => {\n _a.prototype.default_view = VizzuChartView;\n _a.define(({ Any, Array, Boolean, Number, Ref }) => ({\n animation: [Any, {}],\n config: [Any, {}],\n columns: [Array(Any), []],\n source: [Ref(column_data_source_1.ColumnDataSource),],\n duration: [Number, 500],\n style: [Any, {}],\n tooltip: [Boolean, false],\n }));\n })();\n}\n","/* models/vtk/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var vtkjs_1 = require(\"173e6cb054\") /* ./vtkjs */;\n __esExport(\"VTKJSPlot\", vtkjs_1.VTKJSPlot);\n var vtkvolume_1 = require(\"9cb70c6ab6\") /* ./vtkvolume */;\n __esExport(\"VTKVolumePlot\", vtkvolume_1.VTKVolumePlot);\n var vtkaxes_1 = require(\"5a606f3f35\") /* ./vtkaxes */;\n __esExport(\"VTKAxes\", vtkaxes_1.VTKAxes);\n var vtksynchronized_1 = require(\"66775d6392\") /* ./vtksynchronized */;\n __esExport(\"VTKSynchronizedPlot\", vtksynchronized_1.VTKSynchronizedPlot);\n}\n","/* models/vtk/vtkjs.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKJSPlotView extends vtklayout_1.AbstractVTKView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => {\n this.invalidate_render();\n });\n }\n render() {\n super.render();\n this._create_orientation_widget();\n this._set_axes();\n }\n invalidate_render() {\n this._vtk_renwin = null;\n super.invalidate_render();\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindow.newInstance({\n rootContainer: this._vtk_container,\n container: this._vtk_container,\n });\n }\n plot() {\n if (this.model.data == null) {\n this._vtk_renwin.getRenderWindow().render();\n return;\n }\n const dataAccessHelper = util_1.vtkns.DataAccessHelper.get(\"zip\", {\n zipContent: atob(this.model.data),\n callback: (_zip) => {\n const sceneImporter = util_1.vtkns.HttpSceneLoader.newInstance({\n renderer: this._vtk_renwin.getRenderer(),\n dataAccessHelper,\n });\n const fn = window.vtk.macro.debounce(() => {\n setTimeout(() => {\n if (this._axes == null && this.model.axes)\n this._set_axes();\n this._set_camera_state();\n this._get_camera_state();\n this._vtk_renwin.getRenderWindow().render();\n }, 100);\n }, 100);\n sceneImporter.setUrl(\"index.json\");\n sceneImporter.onReady(fn);\n },\n });\n }\n }\n exports.VTKJSPlotView = VTKJSPlotView;\n VTKJSPlotView.__name__ = \"VTKJSPlotView\";\n class VTKJSPlot extends vtklayout_1.AbstractVTKPlot {\n }\n exports.VTKJSPlot = VTKJSPlot;\n _a = VTKJSPlot;\n VTKJSPlot.__name__ = \"VTKJSPlot\";\n (() => {\n _a.prototype.default_view = VTKJSPlotView;\n _a.define(({ Boolean, Nullable, String }) => ({\n data: [Nullable(String)],\n enable_keybindings: [Boolean, false],\n }));\n })();\n}\n","/* models/vtk/vtklayout.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const dom_1 = require(\"@bokehjs/core/dom\");\n const object_1 = require(\"@bokehjs/core/util/object\");\n const color_mapper_1 = require(\"@bokehjs/models/mappers/color_mapper\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n const layout_1 = require(\"c64c1219c8\") /* ../layout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n const vtkcolorbar_1 = require(\"c010237f8b\") /* ./vtkcolorbar */;\n const vtkaxes_1 = require(\"5a606f3f35\") /* ./vtkaxes */;\n const INFO_DIV_STYLE = {\n padding: \"0px 2px 0px 2px\",\n maxHeight: \"150px\",\n height: \"auto\",\n backgroundColor: \"rgba(255, 255, 255, 0.4)\",\n borderRadius: \"10px\",\n margin: \"2px\",\n boxSizing: \"border-box\",\n overflow: \"hidden\",\n overflowY: \"auto\",\n transition: \"width 0.1s linear\",\n bottom: \"0px\",\n position: \"absolute\",\n };\n const textPositions = (0, kinds_1.Enum)(\"LowerLeft\", \"LowerRight\", \"UpperLeft\", \"UpperRight\", \"LowerEdge\", \"RightEdge\", \"LeftEdge\", \"UpperEdge\");\n class AbstractVTKView extends layout_1.HTMLBoxView {\n initialize() {\n super.initialize();\n this._camera_callbacks = [];\n this._renderable = true;\n this._setting_camera = false;\n this._rendered = false;\n }\n _add_colorbars() {\n //construct colorbars\n const old_info_div = this.shadow_el.querySelector(\".vtk_info\");\n if (old_info_div)\n this.shadow_el.removeChild(old_info_div);\n if (this.model.color_mappers.length < 1)\n return;\n const info_div = document.createElement(\"div\");\n const expand_width = \"350px\";\n const collapsed_width = \"30px\";\n info_div.classList.add('vtk_info');\n (0, util_1.applyStyle)(info_div, INFO_DIV_STYLE);\n (0, util_1.applyStyle)(info_div, { width: expand_width });\n this.shadow_el.appendChild(info_div);\n //construct colorbars\n const colorbars = [];\n this.model.color_mappers.forEach((mapper) => {\n const cb = new vtkcolorbar_1.VTKColorBar(info_div, mapper);\n colorbars.push(cb);\n });\n //content when collapsed\n const dots = document.createElement('div');\n (0, util_1.applyStyle)(dots, { textAlign: \"center\", fontSize: \"20px\" });\n dots.innerText = \"...\";\n info_div.addEventListener('click', () => {\n if (info_div.style.width === collapsed_width) {\n info_div.removeChild(dots);\n (0, util_1.applyStyle)(info_div, { height: \"auto\", width: expand_width });\n colorbars.forEach((cb) => info_div.appendChild(cb.canvas));\n }\n else {\n colorbars.forEach((cb) => info_div.removeChild(cb.canvas));\n (0, util_1.applyStyle)(info_div, { height: collapsed_width, width: collapsed_width });\n info_div.appendChild(dots);\n }\n });\n info_div.click();\n }\n _init_annotations_container() {\n if (!this._annotations_container) {\n this._annotations_container = document.createElement(\"div\");\n this._annotations_container.style.position = \"absolute\";\n this._annotations_container.style.width = \"100%\";\n this._annotations_container.style.height = \"100%\";\n this._annotations_container.style.top = \"0\";\n this._annotations_container.style.left = \"0\";\n this._annotations_container.style.pointerEvents = \"none\";\n }\n }\n _clean_annotations() {\n if (this._annotations_container) {\n while (this._annotations_container.firstElementChild) {\n this._annotations_container.firstElementChild.remove();\n }\n }\n }\n _add_annotations() {\n this._clean_annotations();\n const { annotations } = this.model;\n if (annotations != null) {\n for (let annotation of annotations) {\n const { viewport, color, fontSize, fontFamily } = annotation;\n textPositions.values.forEach((pos) => {\n const text = annotation[pos];\n if (text) {\n const div = document.createElement(\"div\");\n div.textContent = text;\n const { style } = div;\n style.position = \"absolute\";\n style.color = `rgb(${color.map((val) => 255 * val).join(\",\")})`;\n style.fontSize = `${fontSize}px`;\n style.padding = \"5px\";\n style.fontFamily = fontFamily;\n style.width = \"fit-content\";\n if (pos == \"UpperLeft\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.left = `${viewport[0] * 100}%`;\n }\n if (pos == \"UpperRight\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.right = `${(1 - viewport[2]) * 100}%`;\n }\n if (pos == \"LowerLeft\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.left = `${viewport[0] * 100}%`;\n }\n if (pos == \"LowerRight\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.right = `${(1 - viewport[2]) * 100}%`;\n }\n if (pos == \"UpperEdge\") {\n style.top = `${(1 - viewport[3]) * 100}%`;\n style.left = `${(viewport[0] + (viewport[2] - viewport[0]) / 2) * 100}%`;\n style.transform = \"translateX(-50%)\";\n }\n if (pos == \"LowerEdge\") {\n style.bottom = `${viewport[1] * 100}%`;\n style.left = `${(viewport[0] + (viewport[2] - viewport[0]) / 2) * 100}%`;\n style.transform = \"translateX(-50%)\";\n }\n if (pos == \"LeftEdge\") {\n style.left = `${viewport[0] * 100}%`;\n style.top = `${(1 - viewport[3] + (viewport[3] - viewport[1]) / 2) * 100}%`;\n style.transform = \"translateY(-50%)\";\n }\n if (pos == \"RightEdge\") {\n style.right = `${(1 - viewport[2]) * 100}%`;\n style.top = `${(1 - viewport[3] + (viewport[3] - viewport[1]) / 2) * 100}%`;\n style.transform = \"translateY(-50%)\";\n }\n this._annotations_container.appendChild(div);\n }\n });\n }\n }\n }\n connect_signals() {\n super.connect_signals();\n this.on_change(this.model.properties.orientation_widget, () => {\n this._orientation_widget_visibility(this.model.orientation_widget);\n });\n this.on_change(this.model.properties.camera, () => this._set_camera_state());\n this.on_change(this.model.properties.axes, () => {\n this._delete_axes();\n if (this.model.axes)\n this._set_axes();\n this._vtk_render();\n });\n this.on_change(this.model.properties.color_mappers, () => this._add_colorbars());\n this.on_change(this.model.properties.annotations, () => this._add_annotations());\n }\n render() {\n super.render();\n this._rendered = false;\n if (this._vtk_renwin && this._vtk_container) {\n // warning if _vtk_renwin contain controllers or other elements\n // we must attach them to the new el\n this.shadow_el.appendChild(this._vtk_container);\n this.shadow_el.appendChild(this._annotations_container);\n return;\n }\n this._orientationWidget = null;\n this._axes = null;\n this._vtk_container = (0, dom_1.div)();\n this.init_vtk_renwin();\n this._init_annotations_container();\n (0, layout_1.set_size)(this._vtk_container, this.model);\n this.shadow_el.appendChild(this._vtk_container);\n // update camera model state only at the end of the interaction\n // with the scene (avoid bouncing events and large amount of events)\n this._vtk_renwin.getInteractor().onEndAnimation(() => this._get_camera_state());\n this._remove_default_key_binding();\n this._bind_key_events();\n this.plot();\n this.model.renderer_el = this._vtk_renwin;\n this.shadow_el.appendChild(this._annotations_container);\n }\n after_layout() {\n super.after_layout();\n if (this._renderable)\n this._vtk_renwin.resize(); // resize call render method\n this._vtk_render();\n if (!this._rendered) {\n this._add_colorbars();\n this._add_annotations();\n this._rendered = true;\n }\n }\n invalidate_render() {\n this._unsubscribe_camera_cb();\n super.invalidate_render();\n }\n remove() {\n this._unsubscribe_camera_cb();\n window.removeEventListener(\"resize\", this._vtk_renwin.resize);\n if (this._orientationWidget != null)\n this._orientationWidget.delete();\n this._vtk_renwin.getRenderWindow().getInteractor().delete();\n this._vtk_renwin.delete();\n super.remove();\n }\n get _vtk_camera_state() {\n const vtk_camera = this._vtk_renwin.getRenderer().getActiveCamera();\n let state;\n if (vtk_camera) {\n state = (0, object_1.clone)(vtk_camera.get());\n delete state.cameraLightTransform;\n delete state.classHierarchy;\n delete state.vtkObject;\n delete state.vtkCamera;\n delete state.viewPlaneNormal;\n delete state.flattenedDepIds;\n delete state.managedInstanceId;\n delete state.directionOfProjection;\n }\n return state;\n }\n get _axes_canvas() {\n let axes_canvas = this._vtk_container.querySelector(\".axes-canvas\");\n if (!axes_canvas) {\n axes_canvas = (0, dom_1.canvas)({\n style: {\n position: \"absolute\",\n top: \"0\",\n left: \"0\",\n width: \"100%\",\n height: \"100%\",\n },\n });\n axes_canvas.classList.add(\"axes-canvas\");\n this._vtk_container.appendChild(axes_canvas);\n this._vtk_renwin.setResizeCallback(() => {\n if (this._axes_canvas) {\n const dims = this._vtk_container.getBoundingClientRect();\n const width = Math.floor(dims.width * window.devicePixelRatio);\n const height = Math.floor(dims.height * window.devicePixelRatio);\n this._axes_canvas.setAttribute(\"width\", width.toFixed());\n this._axes_canvas.setAttribute(\"height\", height.toFixed());\n }\n });\n }\n return axes_canvas;\n }\n _bind_key_events() {\n this.el.addEventListener(\"mouseenter\", () => {\n const interactor = this._vtk_renwin.getInteractor();\n if (this.model.enable_keybindings) {\n document\n .querySelector(\"body\")\n .addEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .addEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .addEventListener(\"keyup\", interactor.handleKeyUp);\n }\n });\n this.el.addEventListener(\"mouseleave\", () => {\n const interactor = this._vtk_renwin.getInteractor();\n document\n .querySelector(\"body\")\n .removeEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keyup\", interactor.handleKeyUp);\n });\n }\n _create_orientation_widget() {\n const axes = util_1.vtkns.AxesActor.newInstance();\n // add orientation widget\n this._orientationWidget = util_1.vtkns.OrientationMarkerWidget.newInstance({\n actor: axes,\n interactor: this._vtk_renwin.getInteractor(),\n });\n this._orientationWidget.setEnabled(true);\n this._orientationWidget.setViewportCorner(util_1.vtkns.OrientationMarkerWidget.Corners.BOTTOM_RIGHT);\n this._orientationWidget.setViewportSize(0.15);\n this._orientationWidget.setMinPixelSize(75);\n this._orientationWidget.setMaxPixelSize(300);\n if (this.model.interactive_orientation_widget)\n this._make_orientation_widget_interactive();\n this._orientation_widget_visibility(this.model.orientation_widget);\n }\n _make_orientation_widget_interactive() {\n this._widgetManager = util_1.vtkns.WidgetManager.newInstance();\n this._widgetManager.setRenderer(this._orientationWidget.getRenderer());\n const axes = this._orientationWidget.getActor();\n const widget = util_1.vtkns.InteractiveOrientationWidget.newInstance();\n widget.placeWidget(axes.getBounds());\n widget.setBounds(axes.getBounds());\n widget.setPlaceFactor(1);\n const vw = this._widgetManager.addWidget(widget);\n // Manage user interaction\n vw.onOrientationChange(({ direction }) => {\n const camera = this._vtk_renwin.getRenderer().getActiveCamera();\n const focalPoint = camera.getFocalPoint();\n const position = camera.getPosition();\n const viewUp = camera.getViewUp();\n const distance = Math.sqrt(Math.pow(position[0] - focalPoint[0], 2) +\n Math.pow(position[1] - focalPoint[1], 2) +\n Math.pow(position[2] - focalPoint[2], 2));\n camera.setPosition(focalPoint[0] + direction[0] * distance, focalPoint[1] + direction[1] * distance, focalPoint[2] + direction[2] * distance);\n if (direction[0])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 1, 2));\n if (direction[1])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 2));\n if (direction[2])\n camera.setViewUp((0, util_1.majorAxis)(viewUp, 0, 1));\n this._vtk_renwin.getRenderer().resetCameraClippingRange();\n this._vtk_render();\n this._get_camera_state();\n });\n }\n _delete_axes() {\n if (this._axes) {\n Object.keys(this._axes).forEach((key) => this._vtk_renwin.getRenderer().removeActor(this._axes[key]));\n this._axes = null;\n const textCtx = this._axes_canvas.getContext(\"2d\");\n if (textCtx)\n textCtx.clearRect(0, 0, this._axes_canvas.clientWidth * window.devicePixelRatio, this._axes_canvas.clientHeight * window.devicePixelRatio);\n }\n }\n _get_camera_state() {\n if (!this._setting_camera) {\n this._setting_camera = true;\n this.model.camera = this._vtk_camera_state;\n this._setting_camera = false;\n }\n }\n _orientation_widget_visibility(visibility) {\n this._orientationWidget.setEnabled(visibility);\n if (this._widgetManager != null) {\n if (visibility)\n this._widgetManager.enablePicking();\n else\n this._widgetManager.disablePicking();\n }\n this._vtk_render();\n }\n _remove_default_key_binding() {\n const interactor = this._vtk_renwin.getInteractor();\n document\n .querySelector(\"body\")\n .removeEventListener(\"keypress\", interactor.handleKeyPress);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keydown\", interactor.handleKeyDown);\n document\n .querySelector(\"body\")\n .removeEventListener(\"keyup\", interactor.handleKeyUp);\n }\n _set_axes() {\n if (this.model.axes && this._vtk_renwin.getRenderer()) {\n const { psActor, axesActor, gridActor } = this.model.axes.create_axes(this._axes_canvas);\n this._axes = { psActor, axesActor, gridActor };\n if (psActor)\n this._vtk_renwin.getRenderer().addActor(psActor);\n if (axesActor)\n this._vtk_renwin.getRenderer().addActor(axesActor);\n if (gridActor)\n this._vtk_renwin.getRenderer().addActor(gridActor);\n }\n }\n _set_camera_state() {\n if (!this._setting_camera && this._vtk_renwin.getRenderer() !== undefined) {\n this._setting_camera = true;\n if (this.model.camera &&\n JSON.stringify(this.model.camera) != JSON.stringify(this._vtk_camera_state))\n this._vtk_renwin\n .getRenderer()\n .getActiveCamera()\n .set(this.model.camera);\n this._vtk_renwin.getRenderer().resetCameraClippingRange();\n this._setting_camera = false;\n }\n }\n _unsubscribe_camera_cb() {\n this._camera_callbacks\n .splice(0, this._camera_callbacks.length)\n .map((cb) => cb.unsubscribe());\n }\n _vtk_render() {\n if (this._renderable) {\n if (this._orientationWidget)\n this._orientationWidget.updateMarkerOrientation();\n this._vtk_renwin.getRenderWindow().render();\n }\n }\n }\n exports.AbstractVTKView = AbstractVTKView;\n AbstractVTKView.__name__ = \"AbstractVTKView\";\n class AbstractVTKPlot extends layout_1.HTMLBox {\n constructor(attrs) {\n (0, util_1.setup_vtkns)();\n super(attrs);\n }\n getActors() {\n return this.renderer_el.getRenderer().getActors();\n }\n }\n exports.AbstractVTKPlot = AbstractVTKPlot;\n _a = AbstractVTKPlot;\n AbstractVTKPlot.__name__ = \"AbstractVTKPlot\";\n AbstractVTKPlot.__module__ = \"panel.models.vtk\";\n (() => {\n _a.define(({ Any, Ref, Array, Boolean, Nullable }) => ({\n axes: [Nullable(Ref(vtkaxes_1.VTKAxes)), null],\n camera: [Any, {}],\n color_mappers: [Array(Ref(color_mapper_1.ColorMapper)), []],\n orientation_widget: [Boolean, false],\n interactive_orientation_widget: [Boolean, false],\n annotations: [Nullable(Array(Any)), null],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/util.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const array_1 = require(\"@bokehjs/core/util/array\");\n const kinds_1 = require(\"@bokehjs/core/kinds\");\n exports.ARRAY_TYPES = {\n uint8: Uint8Array,\n int8: Int8Array,\n uint16: Uint16Array,\n int16: Int16Array,\n uint32: Uint32Array,\n int32: Int32Array,\n float32: Float32Array,\n float64: Float64Array,\n };\n exports.vtkns = {};\n function setup_vtkns() {\n if (exports.vtkns.Actor != null)\n return;\n const vtk = window.vtk;\n exports.vtkns[\"Actor\"] = vtk.Rendering.Core.vtkActor;\n exports.vtkns[\"AxesActor\"] = vtk.Rendering.Core.vtkAxesActor;\n exports.vtkns[\"Base64\"] = vtk.Common.Core.vtkBase64;\n exports.vtkns[\"BoundingBox\"] = vtk.Common.DataModel.vtkBoundingBox;\n exports.vtkns[\"Camera\"] = vtk.Rendering.Core.vtkCamera;\n exports.vtkns[\"ColorTransferFunction\"] = vtk.Rendering.Core.vtkColorTransferFunction;\n exports.vtkns[\"CubeSource\"] = vtk.Filters.Sources.vtkCubeSource;\n exports.vtkns[\"DataAccessHelper\"] = vtk.IO.Core.DataAccessHelper;\n exports.vtkns[\"DataArray\"] = vtk.Common.Core.vtkDataArray;\n exports.vtkns[\"Follower\"] = vtk.Rendering.Core.vtkFollower;\n exports.vtkns[\"FullScreenRenderWindow\"] = vtk.Rendering.Misc.vtkFullScreenRenderWindow;\n exports.vtkns[\"Glyph3DMapper\"] = vtk.Rendering.Core.vtkGlyph3DMapper;\n exports.vtkns[\"HttpSceneLoader\"] = vtk.IO.Core.vtkHttpSceneLoader;\n exports.vtkns[\"ImageData\"] = vtk.Common.DataModel.vtkImageData;\n exports.vtkns[\"ImageMapper\"] = vtk.Rendering.Core.vtkImageMapper;\n exports.vtkns[\"ImageProperty\"] = vtk.Rendering.Core.vtkImageProperty;\n exports.vtkns[\"ImageSlice\"] = vtk.Rendering.Core.vtkImageSlice;\n exports.vtkns[\"InteractiveOrientationWidget\"] =\n vtk.Widgets.Widgets3D.vtkInteractiveOrientationWidget;\n exports.vtkns[\"InteractorStyleTrackballCamera\"] =\n vtk.Interaction.Style.vtkInteractorStyleTrackballCamera;\n exports.vtkns[\"Light\"] = vtk.Rendering.Core.vtkLight;\n exports.vtkns[\"LineSource\"] = vtk.Filters.Sources.vtkLineSource;\n exports.vtkns[\"LookupTable\"] = vtk.Common.Core.vtkLookupTable;\n exports.vtkns[\"macro\"] = vtk.macro;\n exports.vtkns[\"Mapper\"] = vtk.Rendering.Core.vtkMapper;\n exports.vtkns[\"OpenGLRenderWindow\"] = vtk.Rendering.OpenGL.vtkRenderWindow;\n exports.vtkns[\"OrientationMarkerWidget\"] =\n vtk.Interaction.Widgets.vtkOrientationMarkerWidget;\n exports.vtkns[\"OutlineFilter\"] = vtk.Filters.General.vtkOutlineFilter;\n exports.vtkns[\"PiecewiseFunction\"] = vtk.Common.DataModel.vtkPiecewiseFunction;\n exports.vtkns[\"PixelSpaceCallbackMapper\"] =\n vtk.Rendering.Core.vtkPixelSpaceCallbackMapper;\n exports.vtkns[\"PlaneSource\"] = vtk.Filters.Sources.vtkPlaneSource;\n exports.vtkns[\"PointSource\"] = vtk.Filters.Sources.vtkPointSource;\n exports.vtkns[\"PolyData\"] = vtk.Common.DataModel.vtkPolyData;\n exports.vtkns[\"Property\"] = vtk.Rendering.Core.vtkProperty;\n exports.vtkns[\"Renderer\"] = vtk.Rendering.Core.vtkRenderer;\n exports.vtkns[\"RenderWindow\"] = vtk.Rendering.Core.vtkRenderWindow;\n exports.vtkns[\"RenderWindowInteractor\"] = vtk.Rendering.Core.vtkRenderWindowInteractor;\n exports.vtkns[\"SphereMapper\"] = vtk.Rendering.Core.vtkSphereMapper;\n exports.vtkns[\"SynchronizableRenderWindow\"] =\n vtk.Rendering.Misc.vtkSynchronizableRenderWindow;\n exports.vtkns[\"Texture\"] = vtk.Rendering.Core.vtkTexture;\n exports.vtkns[\"Volume\"] = vtk.Rendering.Core.vtkVolume;\n exports.vtkns[\"VolumeController\"] = vtk.Interaction.UI.vtkVolumeController;\n exports.vtkns[\"VolumeMapper\"] = vtk.Rendering.Core.vtkVolumeMapper;\n exports.vtkns[\"VolumeProperty\"] = vtk.Rendering.Core.vtkVolumeProperty;\n exports.vtkns[\"WidgetManager\"] = vtk.Widgets.Core.vtkWidgetManager;\n const { vtkObjectManager } = exports.vtkns.SynchronizableRenderWindow;\n vtkObjectManager.setTypeMapping(\"vtkVolumeMapper\", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkSmartVolumeMapper\", exports.vtkns.VolumeMapper.newInstance, vtkObjectManager.oneTimeGenericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkFollower\", exports.vtkns.Follower.newInstance, vtkObjectManager.genericUpdater);\n vtkObjectManager.setTypeMapping(\"vtkOpenGLGlyph3DMapper\", exports.vtkns.Glyph3DMapper.newInstance, vtkObjectManager.genericUpdater);\n }\n exports.setup_vtkns = setup_vtkns;\n if (window.vtk)\n setup_vtkns();\n exports.Interpolation = (0, kinds_1.Enum)(\"fast_linear\", \"linear\", \"nearest\");\n function applyStyle(el, style) {\n Object.keys(style).forEach((key) => {\n el.style[key] = style[key];\n });\n }\n exports.applyStyle = applyStyle;\n function hexToRGB(color) {\n return [\n parseInt(color.slice(1, 3), 16) / 255,\n parseInt(color.slice(3, 5), 16) / 255,\n parseInt(color.slice(5, 7), 16) / 255,\n ];\n }\n exports.hexToRGB = hexToRGB;\n function valToHex(val) {\n const hex = Math.min(Math.max(Math.round(val), 0), 255).toString(16);\n return hex.length == 2 ? hex : \"0\" + hex;\n }\n function rgbToHex(r, g, b) {\n return \"#\" + valToHex(r) + valToHex(g) + valToHex(b);\n }\n exports.rgbToHex = rgbToHex;\n function vtkLutToMapper(vtk_lut) {\n //For the moment only linear colormapper are handle\n const { scale, nodes } = vtk_lut.get(\"scale\", \"nodes\");\n if (scale !== exports.vtkns.ColorTransferFunction.Scale.LINEAR)\n throw \"Error transfer function scale not handle\";\n const x = nodes.map((a) => a.x);\n const low = Math.min(...x);\n const high = Math.max(...x);\n const vals = (0, array_1.linspace)(low, high, 255);\n const rgb = [0, 0, 0];\n const palette = vals.map((val) => {\n vtk_lut.getColor(val, rgb);\n return rgbToHex(rgb[0] * 255, rgb[1] * 255, rgb[2] * 255);\n });\n return { low, high, palette };\n }\n exports.vtkLutToMapper = vtkLutToMapper;\n function utf8ToAB(utf8_str) {\n var buf = new ArrayBuffer(utf8_str.length); // 2 bytes for each char\n var bufView = new Uint8Array(buf);\n for (var i = 0, strLen = utf8_str.length; i < strLen; i++) {\n bufView[i] = utf8_str.charCodeAt(i);\n }\n return buf;\n }\n function data2VTKImageData(data) {\n const source = exports.vtkns.ImageData.newInstance({\n spacing: data.spacing,\n });\n source.setDimensions(data.dims);\n source.setOrigin(data.origin != null ? data.origin : data.dims.map((v) => v / 2));\n const dataArray = exports.vtkns.DataArray.newInstance({\n name: \"scalars\",\n numberOfComponents: 1,\n values: new exports.ARRAY_TYPES[data.dtype](utf8ToAB(atob(data.buffer))),\n });\n source.getPointData().setScalars(dataArray);\n return source;\n }\n exports.data2VTKImageData = data2VTKImageData;\n function majorAxis(vec3, idxA, idxB) {\n const axis = [0, 0, 0];\n const idx = Math.abs(vec3[idxA]) > Math.abs(vec3[idxB]) ? idxA : idxB;\n const value = vec3[idx] > 0 ? 1 : -1;\n axis[idx] = value;\n return axis;\n }\n exports.majorAxis = majorAxis;\n function cartesian_product(...arrays) {\n return arrays.reduce((acc, curr) => [...acc].flatMap((c) => curr.map((n) => [].concat(c, n))));\n }\n exports.cartesian_product = cartesian_product;\n}\n","/* models/vtk/vtkcolorbar.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const mappers_1 = require(\"@bokehjs/models/mappers\");\n const array_1 = require(\"@bokehjs/core/util/array\");\n class VTKColorBar {\n constructor(parent, mapper, options = {}) {\n this.parent = parent;\n this.mapper = mapper;\n this.options = options;\n if (!options.ticksNum)\n options.ticksNum = 5;\n if (!options.fontFamily)\n options.fontFamily = \"Arial\";\n if (!options.fontSize)\n options.fontSize = \"12px\";\n if (!options.ticksSize)\n options.ticksSize = 2;\n this.canvas = document.createElement(\"canvas\");\n this.canvas.style.width = \"100%\";\n this.parent.appendChild(this.canvas);\n this.ctx = this.canvas.getContext(\"2d\");\n this.ctx.font = `${this.options.fontSize} ${this.options.fontFamily}`;\n this.ctx.lineWidth = options.ticksSize;\n if (!options.height)\n options.height = `${(this.font_height + 1) * 4}px`; //title/ticks/colorbar\n this.canvas.style.height = options.height;\n this.draw_colorbar();\n }\n get values() {\n const { min, max } = this.mapper.metrics;\n return (0, array_1.linspace)(min, max, this.options.ticksNum);\n }\n get ticks() {\n return this.values.map((v) => v.toExponential(3));\n }\n get title() {\n return this.mapper.name ? this.mapper.name : \"scalars\";\n }\n get font_height() {\n let font_height = 0;\n this.values.forEach((val) => {\n const { actualBoundingBoxAscent, actualBoundingBoxDescent, } = this.ctx.measureText(`${val}`);\n const height = actualBoundingBoxAscent + actualBoundingBoxDescent;\n if (font_height < height)\n font_height = height;\n });\n return font_height;\n }\n draw_colorbar() {\n this.canvas.width = this.canvas.clientWidth;\n this.canvas.height = this.canvas.clientHeight;\n const { palette } = this.mapper;\n this.ctx.font = `${this.options.fontSize} ${this.options.fontFamily}`;\n const font_height = this.font_height;\n this.ctx.save();\n //colorbar\n const image = document.createElement(\"canvas\");\n const h = 1;\n const w = palette.length;\n image.width = w;\n image.height = h;\n const image_ctx = image.getContext(\"2d\");\n const image_data = image_ctx.getImageData(0, 0, w, h);\n const cmap = new mappers_1.LinearColorMapper({ palette }).rgba_mapper;\n const buf8 = cmap.v_compute((0, array_1.range)(0, palette.length));\n image_data.data.set(buf8);\n image_ctx.putImageData(image_data, 0, 0);\n this.ctx.drawImage(image, 0, 2 * (this.font_height + 1) + 1, this.canvas.width, this.canvas.height);\n this.ctx.restore();\n this.ctx.save();\n //title\n this.ctx.textAlign = 'center';\n this.ctx.fillText(this.title, this.canvas.width / 2, font_height + 1);\n this.ctx.restore();\n this.ctx.save();\n //ticks\n const tick_x_positions = (0, array_1.linspace)(0, this.canvas.width, 5);\n tick_x_positions.forEach((xpos, idx) => {\n let xpos_tick = xpos;\n if (idx == 0) {\n xpos_tick = xpos + Math.ceil(this.ctx.lineWidth / 2);\n this.ctx.textAlign = \"left\";\n }\n else if (idx == tick_x_positions.length - 1) {\n xpos_tick = xpos - Math.ceil(this.ctx.lineWidth / 2);\n this.ctx.textAlign = \"right\";\n }\n else {\n this.ctx.textAlign = \"center\";\n }\n this.ctx.moveTo(xpos_tick, 2 * (font_height + 1));\n this.ctx.lineTo(xpos_tick, 2 * (font_height + 1) + 5);\n this.ctx.stroke();\n this.ctx.fillText(`${this.ticks[idx]}`, xpos, 2 * (font_height + 1));\n });\n this.ctx.restore();\n }\n }\n exports.VTKColorBar = VTKColorBar;\n VTKColorBar.__name__ = \"VTKColorBar\";\n}\n","/* models/vtk/vtkaxes.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const model_1 = require(\"@bokehjs/model\");\n const gl_matrix_1 = require(\"2f3fd5db07\") /* gl-matrix */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKAxes extends model_1.Model {\n constructor(attrs) {\n super(attrs);\n }\n get xticks() {\n if (this.xticker)\n return this.xticker.ticks;\n else\n return [];\n }\n get yticks() {\n if (this.yticker)\n return this.yticker.ticks;\n else\n return [];\n }\n get zticks() {\n if (this.zticker)\n return this.zticker.ticks;\n else\n return [];\n }\n get xlabels() {\n var _b;\n return ((_b = this.xticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.xticker.labels\n : this.xticks.map((elem) => elem.toFixed(this.digits));\n }\n get ylabels() {\n var _b;\n return ((_b = this.yticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.yticker.labels\n : this.yticks.map((elem) => elem.toFixed(this.digits));\n }\n get zlabels() {\n var _b;\n return ((_b = this.zticker) === null || _b === void 0 ? void 0 : _b.labels)\n ? this.zticker.labels\n : this.zticks.map((elem) => elem.toFixed(this.digits));\n }\n _make_grid_lines(n, m, offset) {\n const out = [];\n for (let i = 0; i < n - 1; i++) {\n for (let j = 0; j < m - 1; j++) {\n const v0 = i * m + j + offset;\n const v1 = i * m + j + 1 + offset;\n const v2 = (i + 1) * m + j + 1 + offset;\n const v3 = (i + 1) * m + j + offset;\n const line = [5, v0, v1, v2, v3, v0];\n out.push(line);\n }\n }\n return out;\n }\n _create_grid_axes() {\n const pts = [];\n pts.push((0, util_1.cartesian_product)(this.xticks, this.yticks, [this.origin[2]])); //xy\n pts.push((0, util_1.cartesian_product)([this.origin[0]], this.yticks, this.zticks)); //yz\n pts.push((0, util_1.cartesian_product)(this.xticks, [this.origin[1]], this.zticks)); //xz\n const polys = [];\n let offset = 0;\n polys.push(this._make_grid_lines(this.xticks.length, this.yticks.length, offset)); //xy\n offset += this.xticks.length * this.yticks.length;\n polys.push(this._make_grid_lines(this.yticks.length, this.zticks.length, offset)); //yz\n offset += this.yticks.length * this.zticks.length;\n polys.push(this._make_grid_lines(this.xticks.length, this.zticks.length, offset)); //xz\n const gridPolyData = window.vtk({\n vtkClass: \"vtkPolyData\",\n points: {\n vtkClass: \"vtkPoints\",\n dataType: \"Float32Array\",\n numberOfComponents: 3,\n values: pts.flat(2),\n },\n lines: {\n vtkClass: \"vtkCellArray\",\n dataType: \"Uint32Array\",\n values: polys.flat(2),\n },\n });\n const gridMapper = util_1.vtkns.Mapper.newInstance();\n const gridActor = util_1.vtkns.Actor.newInstance();\n gridMapper.setInputData(gridPolyData);\n gridActor.setMapper(gridMapper);\n gridActor.getProperty().setOpacity(this.grid_opacity);\n gridActor.setVisibility(this.show_grid);\n return gridActor;\n }\n create_axes(canvas) {\n if (this.origin == null)\n return { psActor: null, axesActor: null, gridActor: null };\n const points = [this.xticks, this.yticks, this.zticks].map((arr, axis) => {\n let coords = null;\n switch (axis) {\n case 0:\n coords = (0, util_1.cartesian_product)(arr, [this.origin[1]], [this.origin[2]]);\n break;\n case 1:\n coords = (0, util_1.cartesian_product)([this.origin[0]], arr, [this.origin[2]]);\n break;\n case 2:\n coords = (0, util_1.cartesian_product)([this.origin[0]], [this.origin[1]], arr);\n break;\n }\n return coords;\n }).flat(2);\n const axesPolyData = window.vtk({\n vtkClass: \"vtkPolyData\",\n points: {\n vtkClass: \"vtkPoints\",\n dataType: \"Float32Array\",\n numberOfComponents: 3,\n values: points,\n },\n lines: {\n vtkClass: \"vtkCellArray\",\n dataType: \"Uint32Array\",\n values: [\n 2,\n 0,\n this.xticks.length - 1,\n 2,\n this.xticks.length,\n this.xticks.length + this.yticks.length - 1,\n 2,\n this.xticks.length + this.yticks.length,\n this.xticks.length + this.yticks.length + this.zticks.length - 1,\n ],\n },\n });\n const psMapper = util_1.vtkns.PixelSpaceCallbackMapper.newInstance();\n psMapper.setInputData(axesPolyData);\n psMapper.setUseZValues(true);\n psMapper.setCallback((coordsList, camera, aspect) => {\n const textCtx = canvas.getContext(\"2d\");\n if (textCtx) {\n const dims = {\n height: canvas.clientHeight * window.devicePixelRatio,\n width: canvas.clientWidth * window.devicePixelRatio,\n };\n const dataPoints = psMapper.getInputData().getPoints();\n const viewMatrix = camera.getViewMatrix();\n gl_matrix_1.mat4.transpose(viewMatrix, viewMatrix);\n const projMatrix = camera.getProjectionMatrix(aspect, -1, 1);\n gl_matrix_1.mat4.transpose(projMatrix, projMatrix);\n textCtx.clearRect(0, 0, dims.width, dims.height);\n coordsList.forEach((xy, idx) => {\n const pdPoint = dataPoints.getPoint(idx);\n const vc = gl_matrix_1.vec3.fromValues(pdPoint[0], pdPoint[1], pdPoint[2]);\n gl_matrix_1.vec3.transformMat4(vc, vc, viewMatrix);\n vc[2] += 0.05; // sensibility\n gl_matrix_1.vec3.transformMat4(vc, vc, projMatrix);\n if (vc[2] - 0.001 < xy[3]) {\n textCtx.font = \"30px serif\";\n textCtx.textAlign = \"center\";\n textCtx.textBaseline = \"alphabetic\";\n textCtx.fillText(`.`, xy[0], dims.height - xy[1] + 2);\n textCtx.font = `${this.fontsize * window.devicePixelRatio}px serif`;\n textCtx.textAlign = \"right\";\n textCtx.textBaseline = \"top\";\n let label;\n if (idx < this.xticks.length)\n label = this.xlabels[idx];\n else if (idx >= this.xticks.length &&\n idx < this.xticks.length + this.yticks.length)\n label = this.ylabels[idx - this.xticks.length];\n else\n label = this.zlabels[idx - (this.xticks.length + this.yticks.length)];\n textCtx.fillText(`${label}`, xy[0], dims.height - xy[1]);\n }\n });\n }\n });\n const psActor = util_1.vtkns.Actor.newInstance(); //PixelSpace\n psActor.setMapper(psMapper);\n const axesMapper = util_1.vtkns.Mapper.newInstance();\n axesMapper.setInputData(axesPolyData);\n const axesActor = util_1.vtkns.Actor.newInstance();\n axesActor.setMapper(axesMapper);\n axesActor.getProperty().setOpacity(this.axes_opacity);\n const gridActor = this._create_grid_axes();\n return { psActor, axesActor, gridActor };\n }\n }\n exports.VTKAxes = VTKAxes;\n _a = VTKAxes;\n VTKAxes.__name__ = \"VTKAxes\";\n VTKAxes.__module__ = \"panel.models.vtk\";\n (() => {\n _a.define(({ Any, Array, Boolean, Number }) => ({\n origin: [Array(Number), [0, 0, 0]],\n xticker: [Any, null],\n yticker: [Any, null],\n zticker: [Any, null],\n digits: [Number, 1],\n show_grid: [Boolean, true],\n grid_opacity: [Number, 0.1],\n axes_opacity: [Number, 1],\n fontsize: [Number, 12]\n }));\n })();\n}\n","/* gl-matrix/esm/index.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n exports.glMatrix = glMatrix;\n const mat2 = tslib_1.__importStar(require(\"7c0b8e6048\") /* ./mat2.js */);\n exports.mat2 = mat2;\n const mat2d = tslib_1.__importStar(require(\"dc03f0a621\") /* ./mat2d.js */);\n exports.mat2d = mat2d;\n const mat3 = tslib_1.__importStar(require(\"0285c50a7e\") /* ./mat3.js */);\n exports.mat3 = mat3;\n const mat4 = tslib_1.__importStar(require(\"a427635f32\") /* ./mat4.js */);\n exports.mat4 = mat4;\n const quat = tslib_1.__importStar(require(\"eb06fc032a\") /* ./quat.js */);\n exports.quat = quat;\n const quat2 = tslib_1.__importStar(require(\"277615c682\") /* ./quat2.js */);\n exports.quat2 = quat2;\n const vec2 = tslib_1.__importStar(require(\"c56d9ff837\") /* ./vec2.js */);\n exports.vec2 = vec2;\n const vec3 = tslib_1.__importStar(require(\"2c5eb22089\") /* ./vec3.js */);\n exports.vec3 = vec3;\n const vec4 = tslib_1.__importStar(require(\"c1aa33d719\") /* ./vec4.js */);\n exports.vec4 = vec4;\n}\n","/* gl-matrix/esm/common.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n /**\n * Common utilities\n * @module glMatrix\n */\n // Configuration Constants\n exports.EPSILON = 0.000001;\n exports.ARRAY_TYPE = typeof Float32Array !== 'undefined' ? Float32Array : Array;\n exports.RANDOM = Math.random;\n /**\n * Sets the type of array used when creating new vectors and matrices\n *\n * @param {Type} type Array type, such as Float32Array or Array\n */\n function setMatrixArrayType(type) {\n exports.ARRAY_TYPE = type;\n }\n exports.setMatrixArrayType = setMatrixArrayType;\n var degree = Math.PI / 180;\n /**\n * Convert Degree To Radian\n *\n * @param {Number} a Angle in Degrees\n */\n function toRadian(a) {\n return a * degree;\n }\n exports.toRadian = toRadian;\n /**\n * Tests whether or not the arguments have approximately the same value, within an absolute\n * or relative tolerance of glMatrix.EPSILON (an absolute tolerance is used for values less\n * than or equal to 1.0, and a relative tolerance is used for larger values)\n *\n * @param {Number} a The first number to test.\n * @param {Number} b The second number to test.\n * @returns {Boolean} True if the numbers are approximately equal, false otherwise.\n */\n function equals(a, b) {\n return Math.abs(a - b) <= exports.EPSILON * Math.max(1.0, Math.abs(a), Math.abs(b));\n }\n exports.equals = equals;\n if (!Math.hypot)\n Math.hypot = function () {\n var y = 0, i = arguments.length;\n while (i--) {\n y += arguments[i] * arguments[i];\n }\n return Math.sqrt(y);\n };\n}\n","/* gl-matrix/esm/mat2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2x2 Matrix\n * @module mat2\n */\n /**\n * Creates a new identity mat2\n *\n * @returns {mat2} a new 2x2 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat2 initialized with values from an existing matrix\n *\n * @param {mat2} a matrix to clone\n * @returns {mat2} a new 2x2 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat2 to another\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a mat2 to the identity matrix\n *\n * @param {mat2} out the receiving matrix\n * @returns {mat2} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Create a new mat2 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out A new 2x2 matrix\n */\n function fromValues(m00, m01, m10, m11) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat2 to the given values\n *\n * @param {mat2} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m10 Component in column 1, row 0 position (index 2)\n * @param {Number} m11 Component in column 1, row 1 position (index 3)\n * @returns {mat2} out\n */\n function set(out, m00, m01, m10, m11) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m10;\n out[3] = m11;\n return out;\n }\n exports.set = set;\n /**\n * Transpose the values of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache\n // some values\n if (out === a) {\n var a1 = a[1];\n out[1] = a[2];\n out[2] = a1;\n }\n else {\n out[0] = a[0];\n out[1] = a[2];\n out[2] = a[1];\n out[3] = a[3];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function invert(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3]; // Calculate the determinant\n var det = a0 * a3 - a2 * a1;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = a3 * det;\n out[1] = -a1 * det;\n out[2] = -a2 * det;\n out[3] = a0 * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the source matrix\n * @returns {mat2} out\n */\n function adjoint(out, a) {\n // Caching this value is nessecary if out == a\n var a0 = a[0];\n out[0] = a[3];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a0;\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat2\n *\n * @param {mat2} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n return a[0] * a[3] - a[2] * a[1];\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function multiply(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a mat2 by the given angle\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n function rotate(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat2 by the dimensions in the given vec2\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2} out\n **/\n function scale(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n return out;\n }\n exports.scale = scale;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.rotate(dest, dest, rad);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2.identity(dest);\n * mat2.scale(dest, dest, vec);\n *\n * @param {mat2} out mat2 receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat2} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Returns a string representation of a mat2\n *\n * @param {mat2} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat2\n *\n * @param {mat2} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3]);\n }\n exports.frob = frob;\n /**\n * Returns L, D and U matrices (Lower triangular, Diagonal and Upper triangular) by factorizing the input matrix\n * @param {mat2} L the lower triangular matrix\n * @param {mat2} D the diagonal matrix\n * @param {mat2} U the upper triangular matrix\n * @param {mat2} a the input matrix to factorize\n */\n function LDU(L, D, U, a) {\n L[2] = a[2] / a[0];\n U[0] = a[0];\n U[1] = a[1];\n U[3] = a[3] - L[2] * U[1];\n return [L, D, U];\n }\n exports.LDU = LDU;\n /**\n * Adds two mat2's\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @returns {mat2} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat2} a The first matrix.\n * @param {mat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat2} a The first matrix.\n * @param {mat2} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n }\n exports.equals = equals;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2} out the receiving matrix\n * @param {mat2} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat2's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2} out the receiving vector\n * @param {mat2} a the first operand\n * @param {mat2} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Alias for {@link mat2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat2.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat2d.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2x3 Matrix\n * @module mat2d\n * @description\n * A mat2d contains six elements defined as:\n * <pre>\n * [a, b,\n * c, d,\n * tx, ty]\n * </pre>\n * This is a short form for the 3x3 matrix:\n * <pre>\n * [a, b, 0,\n * c, d, 0,\n * tx, ty, 1]\n * </pre>\n * The last column is ignored so the array is shorter and operations are faster.\n */\n /**\n * Creates a new identity mat2d\n *\n * @returns {mat2d} a new 2x3 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(6);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[4] = 0;\n out[5] = 0;\n }\n out[0] = 1;\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat2d initialized with values from an existing matrix\n *\n * @param {mat2d} a matrix to clone\n * @returns {mat2d} a new 2x3 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat2d to another\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a mat2d to the identity matrix\n *\n * @param {mat2d} out the receiving matrix\n * @returns {mat2d} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.identity = identity;\n /**\n * Create a new mat2d with the given values\n *\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} A new mat2d\n */\n function fromValues(a, b, c, d, tx, ty) {\n var out = new glMatrix.ARRAY_TYPE(6);\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat2d to the given values\n *\n * @param {mat2d} out the receiving matrix\n * @param {Number} a Component A (index 0)\n * @param {Number} b Component B (index 1)\n * @param {Number} c Component C (index 2)\n * @param {Number} d Component D (index 3)\n * @param {Number} tx Component TX (index 4)\n * @param {Number} ty Component TY (index 5)\n * @returns {mat2d} out\n */\n function set(out, a, b, c, d, tx, ty) {\n out[0] = a;\n out[1] = b;\n out[2] = c;\n out[3] = d;\n out[4] = tx;\n out[5] = ty;\n return out;\n }\n exports.set = set;\n /**\n * Inverts a mat2d\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the source matrix\n * @returns {mat2d} out\n */\n function invert(out, a) {\n var aa = a[0], ab = a[1], ac = a[2], ad = a[3];\n var atx = a[4], aty = a[5];\n var det = aa * ad - ab * ac;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = ad * det;\n out[1] = -ab * det;\n out[2] = -ac * det;\n out[3] = aa * det;\n out[4] = (ac * aty - ad * atx) * det;\n out[5] = (ab * atx - aa * aty) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the determinant of a mat2d\n *\n * @param {mat2d} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n return a[0] * a[3] - a[1] * a[2];\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function multiply(out, a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n out[0] = a0 * b0 + a2 * b1;\n out[1] = a1 * b0 + a3 * b1;\n out[2] = a0 * b2 + a2 * b3;\n out[3] = a1 * b2 + a3 * b3;\n out[4] = a0 * b4 + a2 * b5 + a4;\n out[5] = a1 * b4 + a3 * b5 + a5;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a mat2d by the given angle\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n function rotate(out, a, rad) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n out[0] = a0 * c + a2 * s;\n out[1] = a1 * c + a3 * s;\n out[2] = a0 * -s + a2 * c;\n out[3] = a1 * -s + a3 * c;\n out[4] = a4;\n out[5] = a5;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat2d} out\n **/\n function scale(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0 * v0;\n out[1] = a1 * v0;\n out[2] = a2 * v1;\n out[3] = a3 * v1;\n out[4] = a4;\n out[5] = a5;\n return out;\n }\n exports.scale = scale;\n /**\n * Translates the mat2d by the dimensions in the given vec2\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to translate\n * @param {vec2} v the vec2 to translate the matrix by\n * @returns {mat2d} out\n **/\n function translate(out, a, v) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var v0 = v[0], v1 = v[1];\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = a0 * v0 + a2 * v1 + a4;\n out[5] = a1 * v0 + a3 * v1 + a5;\n return out;\n }\n exports.translate = translate;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.rotate(dest, dest, rad);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat2d} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = -s;\n out[3] = c;\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.scale(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat2d} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = v[1];\n out[4] = 0;\n out[5] = 0;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat2d.identity(dest);\n * mat2d.translate(dest, dest, vec);\n *\n * @param {mat2d} out mat2d receiving operation result\n * @param {vec2} v Translation vector\n * @returns {mat2d} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = v[0];\n out[5] = v[1];\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Returns a string representation of a mat2d\n *\n * @param {mat2d} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat2d(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat2d\n *\n * @param {mat2d} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], 1);\n }\n exports.frob = frob;\n /**\n * Adds two mat2d's\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @returns {mat2d} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat2d} out the receiving matrix\n * @param {mat2d} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat2d} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat2d's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat2d} out the receiving vector\n * @param {mat2d} a the first operand\n * @param {mat2d} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat2d} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat2d} a The first matrix.\n * @param {mat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat2d} a The first matrix.\n * @param {mat2d} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat2d.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat2d.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat3.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 3x3 Matrix\n * @module mat3\n */\n /**\n * Creates a new identity mat3\n *\n * @returns {mat3} a new 3x3 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(9);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n }\n out[0] = 1;\n out[4] = 1;\n out[8] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Copies the upper-left 3x3 values into the given mat3.\n *\n * @param {mat3} out the receiving 3x3 matrix\n * @param {mat4} a the source 4x4 matrix\n * @returns {mat3} out\n */\n function fromMat4(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[4];\n out[4] = a[5];\n out[5] = a[6];\n out[6] = a[8];\n out[7] = a[9];\n out[8] = a[10];\n return out;\n }\n exports.fromMat4 = fromMat4;\n /**\n * Creates a new mat3 initialized with values from an existing matrix\n *\n * @param {mat3} a matrix to clone\n * @returns {mat3} a new 3x3 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat3 to another\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.copy = copy;\n /**\n * Create a new mat3 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} A new mat3\n */\n function fromValues(m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n var out = new glMatrix.ARRAY_TYPE(9);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat3 to the given values\n *\n * @param {mat3} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m10 Component in column 1, row 0 position (index 3)\n * @param {Number} m11 Component in column 1, row 1 position (index 4)\n * @param {Number} m12 Component in column 1, row 2 position (index 5)\n * @param {Number} m20 Component in column 2, row 0 position (index 6)\n * @param {Number} m21 Component in column 2, row 1 position (index 7)\n * @param {Number} m22 Component in column 2, row 2 position (index 8)\n * @returns {mat3} out\n */\n function set(out, m00, m01, m02, m10, m11, m12, m20, m21, m22) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m10;\n out[4] = m11;\n out[5] = m12;\n out[6] = m20;\n out[7] = m21;\n out[8] = m22;\n return out;\n }\n exports.set = set;\n /**\n * Set a mat3 to the identity matrix\n *\n * @param {mat3} out the receiving matrix\n * @returns {mat3} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Transpose the values of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a12 = a[5];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a01;\n out[5] = a[7];\n out[6] = a02;\n out[7] = a12;\n }\n else {\n out[0] = a[0];\n out[1] = a[3];\n out[2] = a[6];\n out[3] = a[1];\n out[4] = a[4];\n out[5] = a[7];\n out[6] = a[2];\n out[7] = a[5];\n out[8] = a[8];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function invert(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b01 = a22 * a11 - a12 * a21;\n var b11 = -a22 * a10 + a12 * a20;\n var b21 = a21 * a10 - a11 * a20; // Calculate the determinant\n var det = a00 * b01 + a01 * b11 + a02 * b21;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = b01 * det;\n out[1] = (-a22 * a01 + a02 * a21) * det;\n out[2] = (a12 * a01 - a02 * a11) * det;\n out[3] = b11 * det;\n out[4] = (a22 * a00 - a02 * a20) * det;\n out[5] = (-a12 * a00 + a02 * a10) * det;\n out[6] = b21 * det;\n out[7] = (-a21 * a00 + a01 * a20) * det;\n out[8] = (a11 * a00 - a01 * a10) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the source matrix\n * @returns {mat3} out\n */\n function adjoint(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n out[0] = a11 * a22 - a12 * a21;\n out[1] = a02 * a21 - a01 * a22;\n out[2] = a01 * a12 - a02 * a11;\n out[3] = a12 * a20 - a10 * a22;\n out[4] = a00 * a22 - a02 * a20;\n out[5] = a02 * a10 - a00 * a12;\n out[6] = a10 * a21 - a11 * a20;\n out[7] = a01 * a20 - a00 * a21;\n out[8] = a00 * a11 - a01 * a10;\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat3\n *\n * @param {mat3} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n return a00 * (a22 * a11 - a12 * a21) + a01 * (-a22 * a10 + a12 * a20) + a02 * (a21 * a10 - a11 * a20);\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function multiply(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2];\n var a10 = a[3], a11 = a[4], a12 = a[5];\n var a20 = a[6], a21 = a[7], a22 = a[8];\n var b00 = b[0], b01 = b[1], b02 = b[2];\n var b10 = b[3], b11 = b[4], b12 = b[5];\n var b20 = b[6], b21 = b[7], b22 = b[8];\n out[0] = b00 * a00 + b01 * a10 + b02 * a20;\n out[1] = b00 * a01 + b01 * a11 + b02 * a21;\n out[2] = b00 * a02 + b01 * a12 + b02 * a22;\n out[3] = b10 * a00 + b11 * a10 + b12 * a20;\n out[4] = b10 * a01 + b11 * a11 + b12 * a21;\n out[5] = b10 * a02 + b11 * a12 + b12 * a22;\n out[6] = b20 * a00 + b21 * a10 + b22 * a20;\n out[7] = b20 * a01 + b21 * a11 + b22 * a21;\n out[8] = b20 * a02 + b21 * a12 + b22 * a22;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Translate a mat3 by the given vector\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to translate\n * @param {vec2} v vector to translate by\n * @returns {mat3} out\n */\n function translate(out, a, v) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], x = v[0], y = v[1];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a10;\n out[4] = a11;\n out[5] = a12;\n out[6] = x * a00 + y * a10 + a20;\n out[7] = x * a01 + y * a11 + a21;\n out[8] = x * a02 + y * a12 + a22;\n return out;\n }\n exports.translate = translate;\n /**\n * Rotates a mat3 by the given angle\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n function rotate(out, a, rad) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a10 = a[3], a11 = a[4], a12 = a[5], a20 = a[6], a21 = a[7], a22 = a[8], s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c * a00 + s * a10;\n out[1] = c * a01 + s * a11;\n out[2] = c * a02 + s * a12;\n out[3] = c * a10 - s * a00;\n out[4] = c * a11 - s * a01;\n out[5] = c * a12 - s * a02;\n out[6] = a20;\n out[7] = a21;\n out[8] = a22;\n return out;\n }\n exports.rotate = rotate;\n /**\n * Scales the mat3 by the dimensions in the given vec2\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to rotate\n * @param {vec2} v the vec2 to scale the matrix by\n * @returns {mat3} out\n **/\n function scale(out, a, v) {\n var x = v[0], y = v[1];\n out[0] = x * a[0];\n out[1] = x * a[1];\n out[2] = x * a[2];\n out[3] = y * a[3];\n out[4] = y * a[4];\n out[5] = y * a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n return out;\n }\n exports.scale = scale;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.translate(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {vec2} v Translation vector\n * @returns {mat3} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 1;\n out[5] = 0;\n out[6] = v[0];\n out[7] = v[1];\n out[8] = 1;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a matrix from a given angle\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.rotate(dest, dest, rad);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat3} out\n */\n function fromRotation(out, rad) {\n var s = Math.sin(rad), c = Math.cos(rad);\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = -s;\n out[4] = c;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat3.identity(dest);\n * mat3.scale(dest, dest, vec);\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {vec2} v Scaling vector\n * @returns {mat3} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = v[1];\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 1;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Copies the values from a mat2d into a mat3\n *\n * @param {mat3} out the receiving matrix\n * @param {mat2d} a the matrix to copy\n * @returns {mat3} out\n **/\n function fromMat2d(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = 0;\n out[3] = a[2];\n out[4] = a[3];\n out[5] = 0;\n out[6] = a[4];\n out[7] = a[5];\n out[8] = 1;\n return out;\n }\n exports.fromMat2d = fromMat2d;\n /**\n * Calculates a 3x3 matrix from the given quaternion\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {quat} q Quaternion to create matrix from\n *\n * @returns {mat3} out\n */\n function fromQuat(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[3] = yx - wz;\n out[6] = zx + wy;\n out[1] = yx + wz;\n out[4] = 1 - xx - zz;\n out[7] = zy - wx;\n out[2] = zx - wy;\n out[5] = zy + wx;\n out[8] = 1 - xx - yy;\n return out;\n }\n exports.fromQuat = fromQuat;\n /**\n * Calculates a 3x3 normal matrix (transpose inverse) from the 4x4 matrix\n *\n * @param {mat3} out mat3 receiving operation result\n * @param {mat4} a Mat4 to derive the normal matrix from\n *\n * @returns {mat3} out\n */\n function normalFromMat4(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[2] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[3] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[4] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[5] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[6] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[7] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[8] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n return out;\n }\n exports.normalFromMat4 = normalFromMat4;\n /**\n * Generates a 2D projection matrix with the given bounds\n *\n * @param {mat3} out mat3 frustum matrix will be written into\n * @param {number} width Width of your gl context\n * @param {number} height Height of gl context\n * @returns {mat3} out\n */\n function projection(out, width, height) {\n out[0] = 2 / width;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = -2 / height;\n out[5] = 0;\n out[6] = -1;\n out[7] = 1;\n out[8] = 1;\n return out;\n }\n exports.projection = projection;\n /**\n * Returns a string representation of a mat3\n *\n * @param {mat3} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat3\n *\n * @param {mat3} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8]);\n }\n exports.frob = frob;\n /**\n * Adds two mat3's\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @returns {mat3} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat3} out the receiving matrix\n * @param {mat3} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat3} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat3's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat3} out the receiving vector\n * @param {mat3} a the first operand\n * @param {mat3} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat3} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat3} a The first matrix.\n * @param {mat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat3} a The first matrix.\n * @param {mat3} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7], a8 = a[8];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7], b8 = b[8];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat3.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat3.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/mat4.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 4x4 Matrix<br>Format: column-major, when typed out it looks like row-major<br>The matrices are being post multiplied.\n * @module mat4\n */\n /**\n * Creates a new identity mat4\n *\n * @returns {mat4} a new 4x4 matrix\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(16);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n }\n out[0] = 1;\n out[5] = 1;\n out[10] = 1;\n out[15] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Creates a new mat4 initialized with values from an existing matrix\n *\n * @param {mat4} a matrix to clone\n * @returns {mat4} a new 4x4 matrix\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.clone = clone;\n /**\n * Copy the values from one mat4 to another\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.copy = copy;\n /**\n * Create a new mat4 with the given values\n *\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} A new mat4\n */\n function fromValues(m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n var out = new glMatrix.ARRAY_TYPE(16);\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Set the components of a mat4 to the given values\n *\n * @param {mat4} out the receiving matrix\n * @param {Number} m00 Component in column 0, row 0 position (index 0)\n * @param {Number} m01 Component in column 0, row 1 position (index 1)\n * @param {Number} m02 Component in column 0, row 2 position (index 2)\n * @param {Number} m03 Component in column 0, row 3 position (index 3)\n * @param {Number} m10 Component in column 1, row 0 position (index 4)\n * @param {Number} m11 Component in column 1, row 1 position (index 5)\n * @param {Number} m12 Component in column 1, row 2 position (index 6)\n * @param {Number} m13 Component in column 1, row 3 position (index 7)\n * @param {Number} m20 Component in column 2, row 0 position (index 8)\n * @param {Number} m21 Component in column 2, row 1 position (index 9)\n * @param {Number} m22 Component in column 2, row 2 position (index 10)\n * @param {Number} m23 Component in column 2, row 3 position (index 11)\n * @param {Number} m30 Component in column 3, row 0 position (index 12)\n * @param {Number} m31 Component in column 3, row 1 position (index 13)\n * @param {Number} m32 Component in column 3, row 2 position (index 14)\n * @param {Number} m33 Component in column 3, row 3 position (index 15)\n * @returns {mat4} out\n */\n function set(out, m00, m01, m02, m03, m10, m11, m12, m13, m20, m21, m22, m23, m30, m31, m32, m33) {\n out[0] = m00;\n out[1] = m01;\n out[2] = m02;\n out[3] = m03;\n out[4] = m10;\n out[5] = m11;\n out[6] = m12;\n out[7] = m13;\n out[8] = m20;\n out[9] = m21;\n out[10] = m22;\n out[11] = m23;\n out[12] = m30;\n out[13] = m31;\n out[14] = m32;\n out[15] = m33;\n return out;\n }\n exports.set = set;\n /**\n * Set a mat4 to the identity matrix\n *\n * @param {mat4} out the receiving matrix\n * @returns {mat4} out\n */\n function identity(out) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Transpose the values of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function transpose(out, a) {\n // If we are transposing ourselves we can skip a few steps but have to cache some values\n if (out === a) {\n var a01 = a[1], a02 = a[2], a03 = a[3];\n var a12 = a[6], a13 = a[7];\n var a23 = a[11];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a01;\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a02;\n out[9] = a12;\n out[11] = a[14];\n out[12] = a03;\n out[13] = a13;\n out[14] = a23;\n }\n else {\n out[0] = a[0];\n out[1] = a[4];\n out[2] = a[8];\n out[3] = a[12];\n out[4] = a[1];\n out[5] = a[5];\n out[6] = a[9];\n out[7] = a[13];\n out[8] = a[2];\n out[9] = a[6];\n out[10] = a[10];\n out[11] = a[14];\n out[12] = a[3];\n out[13] = a[7];\n out[14] = a[11];\n out[15] = a[15];\n }\n return out;\n }\n exports.transpose = transpose;\n /**\n * Inverts a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function invert(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n var det = b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n if (!det) {\n return null;\n }\n det = 1.0 / det;\n out[0] = (a11 * b11 - a12 * b10 + a13 * b09) * det;\n out[1] = (a02 * b10 - a01 * b11 - a03 * b09) * det;\n out[2] = (a31 * b05 - a32 * b04 + a33 * b03) * det;\n out[3] = (a22 * b04 - a21 * b05 - a23 * b03) * det;\n out[4] = (a12 * b08 - a10 * b11 - a13 * b07) * det;\n out[5] = (a00 * b11 - a02 * b08 + a03 * b07) * det;\n out[6] = (a32 * b02 - a30 * b05 - a33 * b01) * det;\n out[7] = (a20 * b05 - a22 * b02 + a23 * b01) * det;\n out[8] = (a10 * b10 - a11 * b08 + a13 * b06) * det;\n out[9] = (a01 * b08 - a00 * b10 - a03 * b06) * det;\n out[10] = (a30 * b04 - a31 * b02 + a33 * b00) * det;\n out[11] = (a21 * b02 - a20 * b04 - a23 * b00) * det;\n out[12] = (a11 * b07 - a10 * b09 - a12 * b06) * det;\n out[13] = (a00 * b09 - a01 * b07 + a02 * b06) * det;\n out[14] = (a31 * b01 - a30 * b03 - a32 * b00) * det;\n out[15] = (a20 * b03 - a21 * b01 + a22 * b00) * det;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the adjugate of a mat4\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the source matrix\n * @returns {mat4} out\n */\n function adjoint(out, a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n out[0] = a11 * (a22 * a33 - a23 * a32) - a21 * (a12 * a33 - a13 * a32) + a31 * (a12 * a23 - a13 * a22);\n out[1] = -(a01 * (a22 * a33 - a23 * a32) - a21 * (a02 * a33 - a03 * a32) + a31 * (a02 * a23 - a03 * a22));\n out[2] = a01 * (a12 * a33 - a13 * a32) - a11 * (a02 * a33 - a03 * a32) + a31 * (a02 * a13 - a03 * a12);\n out[3] = -(a01 * (a12 * a23 - a13 * a22) - a11 * (a02 * a23 - a03 * a22) + a21 * (a02 * a13 - a03 * a12));\n out[4] = -(a10 * (a22 * a33 - a23 * a32) - a20 * (a12 * a33 - a13 * a32) + a30 * (a12 * a23 - a13 * a22));\n out[5] = a00 * (a22 * a33 - a23 * a32) - a20 * (a02 * a33 - a03 * a32) + a30 * (a02 * a23 - a03 * a22);\n out[6] = -(a00 * (a12 * a33 - a13 * a32) - a10 * (a02 * a33 - a03 * a32) + a30 * (a02 * a13 - a03 * a12));\n out[7] = a00 * (a12 * a23 - a13 * a22) - a10 * (a02 * a23 - a03 * a22) + a20 * (a02 * a13 - a03 * a12);\n out[8] = a10 * (a21 * a33 - a23 * a31) - a20 * (a11 * a33 - a13 * a31) + a30 * (a11 * a23 - a13 * a21);\n out[9] = -(a00 * (a21 * a33 - a23 * a31) - a20 * (a01 * a33 - a03 * a31) + a30 * (a01 * a23 - a03 * a21));\n out[10] = a00 * (a11 * a33 - a13 * a31) - a10 * (a01 * a33 - a03 * a31) + a30 * (a01 * a13 - a03 * a11);\n out[11] = -(a00 * (a11 * a23 - a13 * a21) - a10 * (a01 * a23 - a03 * a21) + a20 * (a01 * a13 - a03 * a11));\n out[12] = -(a10 * (a21 * a32 - a22 * a31) - a20 * (a11 * a32 - a12 * a31) + a30 * (a11 * a22 - a12 * a21));\n out[13] = a00 * (a21 * a32 - a22 * a31) - a20 * (a01 * a32 - a02 * a31) + a30 * (a01 * a22 - a02 * a21);\n out[14] = -(a00 * (a11 * a32 - a12 * a31) - a10 * (a01 * a32 - a02 * a31) + a30 * (a01 * a12 - a02 * a11));\n out[15] = a00 * (a11 * a22 - a12 * a21) - a10 * (a01 * a22 - a02 * a21) + a20 * (a01 * a12 - a02 * a11);\n return out;\n }\n exports.adjoint = adjoint;\n /**\n * Calculates the determinant of a mat4\n *\n * @param {mat4} a the source matrix\n * @returns {Number} determinant of a\n */\n function determinant(a) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15];\n var b00 = a00 * a11 - a01 * a10;\n var b01 = a00 * a12 - a02 * a10;\n var b02 = a00 * a13 - a03 * a10;\n var b03 = a01 * a12 - a02 * a11;\n var b04 = a01 * a13 - a03 * a11;\n var b05 = a02 * a13 - a03 * a12;\n var b06 = a20 * a31 - a21 * a30;\n var b07 = a20 * a32 - a22 * a30;\n var b08 = a20 * a33 - a23 * a30;\n var b09 = a21 * a32 - a22 * a31;\n var b10 = a21 * a33 - a23 * a31;\n var b11 = a22 * a33 - a23 * a32; // Calculate the determinant\n return b00 * b11 - b01 * b10 + b02 * b09 + b03 * b08 - b04 * b07 + b05 * b06;\n }\n exports.determinant = determinant;\n /**\n * Multiplies two mat4s\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function multiply(out, a, b) {\n var a00 = a[0], a01 = a[1], a02 = a[2], a03 = a[3];\n var a10 = a[4], a11 = a[5], a12 = a[6], a13 = a[7];\n var a20 = a[8], a21 = a[9], a22 = a[10], a23 = a[11];\n var a30 = a[12], a31 = a[13], a32 = a[14], a33 = a[15]; // Cache only the current line of the second matrix\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n out[0] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[1] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[2] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[3] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[4];\n b1 = b[5];\n b2 = b[6];\n b3 = b[7];\n out[4] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[5] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[6] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[7] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[8];\n b1 = b[9];\n b2 = b[10];\n b3 = b[11];\n out[8] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[9] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[10] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[11] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n b0 = b[12];\n b1 = b[13];\n b2 = b[14];\n b3 = b[15];\n out[12] = b0 * a00 + b1 * a10 + b2 * a20 + b3 * a30;\n out[13] = b0 * a01 + b1 * a11 + b2 * a21 + b3 * a31;\n out[14] = b0 * a02 + b1 * a12 + b2 * a22 + b3 * a32;\n out[15] = b0 * a03 + b1 * a13 + b2 * a23 + b3 * a33;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Translate a mat4 by the given vector\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to translate\n * @param {vec3} v vector to translate by\n * @returns {mat4} out\n */\n function translate(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n if (a === out) {\n out[12] = a[0] * x + a[4] * y + a[8] * z + a[12];\n out[13] = a[1] * x + a[5] * y + a[9] * z + a[13];\n out[14] = a[2] * x + a[6] * y + a[10] * z + a[14];\n out[15] = a[3] * x + a[7] * y + a[11] * z + a[15];\n }\n else {\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11];\n out[0] = a00;\n out[1] = a01;\n out[2] = a02;\n out[3] = a03;\n out[4] = a10;\n out[5] = a11;\n out[6] = a12;\n out[7] = a13;\n out[8] = a20;\n out[9] = a21;\n out[10] = a22;\n out[11] = a23;\n out[12] = a00 * x + a10 * y + a20 * z + a[12];\n out[13] = a01 * x + a11 * y + a21 * z + a[13];\n out[14] = a02 * x + a12 * y + a22 * z + a[14];\n out[15] = a03 * x + a13 * y + a23 * z + a[15];\n }\n return out;\n }\n exports.translate = translate;\n /**\n * Scales the mat4 by the dimensions in the given vec3 not using vectorization\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {vec3} v the vec3 to scale the matrix by\n * @returns {mat4} out\n **/\n function scale(out, a, v) {\n var x = v[0], y = v[1], z = v[2];\n out[0] = a[0] * x;\n out[1] = a[1] * x;\n out[2] = a[2] * x;\n out[3] = a[3] * x;\n out[4] = a[4] * y;\n out[5] = a[5] * y;\n out[6] = a[6] * y;\n out[7] = a[7] * y;\n out[8] = a[8] * z;\n out[9] = a[9] * z;\n out[10] = a[10] * z;\n out[11] = a[11] * z;\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n return out;\n }\n exports.scale = scale;\n /**\n * Rotates a mat4 by the given angle around the given axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n function rotate(out, a, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n var a00, a01, a02, a03;\n var a10, a11, a12, a13;\n var a20, a21, a22, a23;\n var b00, b01, b02;\n var b10, b11, b12;\n var b20, b21, b22;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c;\n a00 = a[0];\n a01 = a[1];\n a02 = a[2];\n a03 = a[3];\n a10 = a[4];\n a11 = a[5];\n a12 = a[6];\n a13 = a[7];\n a20 = a[8];\n a21 = a[9];\n a22 = a[10];\n a23 = a[11]; // Construct the elements of the rotation matrix\n b00 = x * x * t + c;\n b01 = y * x * t + z * s;\n b02 = z * x * t - y * s;\n b10 = x * y * t - z * s;\n b11 = y * y * t + c;\n b12 = z * y * t + x * s;\n b20 = x * z * t + y * s;\n b21 = y * z * t - x * s;\n b22 = z * z * t + c; // Perform rotation-specific matrix multiplication\n out[0] = a00 * b00 + a10 * b01 + a20 * b02;\n out[1] = a01 * b00 + a11 * b01 + a21 * b02;\n out[2] = a02 * b00 + a12 * b01 + a22 * b02;\n out[3] = a03 * b00 + a13 * b01 + a23 * b02;\n out[4] = a00 * b10 + a10 * b11 + a20 * b12;\n out[5] = a01 * b10 + a11 * b11 + a21 * b12;\n out[6] = a02 * b10 + a12 * b11 + a22 * b12;\n out[7] = a03 * b10 + a13 * b11 + a23 * b12;\n out[8] = a00 * b20 + a10 * b21 + a20 * b22;\n out[9] = a01 * b20 + a11 * b21 + a21 * b22;\n out[10] = a02 * b20 + a12 * b21 + a22 * b22;\n out[11] = a03 * b20 + a13 * b21 + a23 * b22;\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n }\n return out;\n }\n exports.rotate = rotate;\n /**\n * Rotates a matrix by the given angle around the X axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateX(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[4] = a10 * c + a20 * s;\n out[5] = a11 * c + a21 * s;\n out[6] = a12 * c + a22 * s;\n out[7] = a13 * c + a23 * s;\n out[8] = a20 * c - a10 * s;\n out[9] = a21 * c - a11 * s;\n out[10] = a22 * c - a12 * s;\n out[11] = a23 * c - a13 * s;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a matrix by the given angle around the Y axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateY(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a20 = a[8];\n var a21 = a[9];\n var a22 = a[10];\n var a23 = a[11];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged rows\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c - a20 * s;\n out[1] = a01 * c - a21 * s;\n out[2] = a02 * c - a22 * s;\n out[3] = a03 * c - a23 * s;\n out[8] = a00 * s + a20 * c;\n out[9] = a01 * s + a21 * c;\n out[10] = a02 * s + a22 * c;\n out[11] = a03 * s + a23 * c;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a matrix by the given angle around the Z axis\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to rotate\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function rotateZ(out, a, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad);\n var a00 = a[0];\n var a01 = a[1];\n var a02 = a[2];\n var a03 = a[3];\n var a10 = a[4];\n var a11 = a[5];\n var a12 = a[6];\n var a13 = a[7];\n if (a !== out) {\n // If the source and destination differ, copy the unchanged last row\n out[8] = a[8];\n out[9] = a[9];\n out[10] = a[10];\n out[11] = a[11];\n out[12] = a[12];\n out[13] = a[13];\n out[14] = a[14];\n out[15] = a[15];\n } // Perform axis-specific matrix multiplication\n out[0] = a00 * c + a10 * s;\n out[1] = a01 * c + a11 * s;\n out[2] = a02 * c + a12 * s;\n out[3] = a03 * c + a13 * s;\n out[4] = a10 * c - a00 * s;\n out[5] = a11 * c - a01 * s;\n out[6] = a12 * c - a02 * s;\n out[7] = a13 * c - a03 * s;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Creates a matrix from a vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\n function fromTranslation(out, v) {\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a matrix from a vector scaling\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.scale(dest, dest, vec);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {vec3} v Scaling vector\n * @returns {mat4} out\n */\n function fromScaling(out, v) {\n out[0] = v[0];\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = v[1];\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = v[2];\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromScaling = fromScaling;\n /**\n * Creates a matrix from a given angle around a given axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotate(dest, dest, rad, axis);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @param {vec3} axis the axis to rotate around\n * @returns {mat4} out\n */\n function fromRotation(out, rad, axis) {\n var x = axis[0], y = axis[1], z = axis[2];\n var len = Math.hypot(x, y, z);\n var s, c, t;\n if (len < glMatrix.EPSILON) {\n return null;\n }\n len = 1 / len;\n x *= len;\n y *= len;\n z *= len;\n s = Math.sin(rad);\n c = Math.cos(rad);\n t = 1 - c; // Perform rotation-specific matrix multiplication\n out[0] = x * x * t + c;\n out[1] = y * x * t + z * s;\n out[2] = z * x * t - y * s;\n out[3] = 0;\n out[4] = x * y * t - z * s;\n out[5] = y * y * t + c;\n out[6] = z * y * t + x * s;\n out[7] = 0;\n out[8] = x * z * t + y * s;\n out[9] = y * z * t - x * s;\n out[10] = z * z * t + c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a matrix from the given angle around the X axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateX(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromXRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = 1;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = c;\n out[6] = s;\n out[7] = 0;\n out[8] = 0;\n out[9] = -s;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromXRotation = fromXRotation;\n /**\n * Creates a matrix from the given angle around the Y axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateY(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromYRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = 0;\n out[2] = -s;\n out[3] = 0;\n out[4] = 0;\n out[5] = 1;\n out[6] = 0;\n out[7] = 0;\n out[8] = s;\n out[9] = 0;\n out[10] = c;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromYRotation = fromYRotation;\n /**\n * Creates a matrix from the given angle around the Z axis\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.rotateZ(dest, dest, rad);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {Number} rad the angle to rotate the matrix by\n * @returns {mat4} out\n */\n function fromZRotation(out, rad) {\n var s = Math.sin(rad);\n var c = Math.cos(rad); // Perform axis-specific matrix multiplication\n out[0] = c;\n out[1] = s;\n out[2] = 0;\n out[3] = 0;\n out[4] = -s;\n out[5] = c;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 1;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromZRotation = fromZRotation;\n /**\n * Creates a matrix from a quaternion rotation and vector translation\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @returns {mat4} out\n */\n function fromRotationTranslation(out, q, v) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - (yy + zz);\n out[1] = xy + wz;\n out[2] = xz - wy;\n out[3] = 0;\n out[4] = xy - wz;\n out[5] = 1 - (xx + zz);\n out[6] = yz + wx;\n out[7] = 0;\n out[8] = xz + wy;\n out[9] = yz - wx;\n out[10] = 1 - (xx + yy);\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslation = fromRotationTranslation;\n /**\n * Creates a new mat4 from a dual quat.\n *\n * @param {mat4} out Matrix\n * @param {quat2} a Dual Quaternion\n * @returns {mat4} mat4 receiving operation result\n */\n function fromQuat2(out, a) {\n var translation = new glMatrix.ARRAY_TYPE(3);\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7];\n var magnitude = bx * bx + by * by + bz * bz + bw * bw; //Only scale if it makes sense\n if (magnitude > 0) {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2 / magnitude;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2 / magnitude;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2 / magnitude;\n }\n else {\n translation[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n translation[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n translation[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n }\n fromRotationTranslation(out, a, translation);\n return out;\n }\n exports.fromQuat2 = fromQuat2;\n /**\n * Returns the translation vector component of a transformation\n * matrix. If a matrix is built with fromRotationTranslation,\n * the returned vector will be the same as the translation vector\n * originally supplied.\n * @param {vec3} out Vector to receive translation component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n function getTranslation(out, mat) {\n out[0] = mat[12];\n out[1] = mat[13];\n out[2] = mat[14];\n return out;\n }\n exports.getTranslation = getTranslation;\n /**\n * Returns the scaling factor component of a transformation\n * matrix. If a matrix is built with fromRotationTranslationScale\n * with a normalized Quaternion paramter, the returned vector will be\n * the same as the scaling vector\n * originally supplied.\n * @param {vec3} out Vector to receive scaling factor component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {vec3} out\n */\n function getScaling(out, mat) {\n var m11 = mat[0];\n var m12 = mat[1];\n var m13 = mat[2];\n var m21 = mat[4];\n var m22 = mat[5];\n var m23 = mat[6];\n var m31 = mat[8];\n var m32 = mat[9];\n var m33 = mat[10];\n out[0] = Math.hypot(m11, m12, m13);\n out[1] = Math.hypot(m21, m22, m23);\n out[2] = Math.hypot(m31, m32, m33);\n return out;\n }\n exports.getScaling = getScaling;\n /**\n * Returns a quaternion representing the rotational component\n * of a transformation matrix. If a matrix is built with\n * fromRotationTranslation, the returned quaternion will be the\n * same as the quaternion originally supplied.\n * @param {quat} out Quaternion to receive the rotation component\n * @param {mat4} mat Matrix to be decomposed (input)\n * @return {quat} out\n */\n function getRotation(out, mat) {\n var scaling = new glMatrix.ARRAY_TYPE(3);\n getScaling(scaling, mat);\n var is1 = 1 / scaling[0];\n var is2 = 1 / scaling[1];\n var is3 = 1 / scaling[2];\n var sm11 = mat[0] * is1;\n var sm12 = mat[1] * is2;\n var sm13 = mat[2] * is3;\n var sm21 = mat[4] * is1;\n var sm22 = mat[5] * is2;\n var sm23 = mat[6] * is3;\n var sm31 = mat[8] * is1;\n var sm32 = mat[9] * is2;\n var sm33 = mat[10] * is3;\n var trace = sm11 + sm22 + sm33;\n var S = 0;\n if (trace > 0) {\n S = Math.sqrt(trace + 1.0) * 2;\n out[3] = 0.25 * S;\n out[0] = (sm23 - sm32) / S;\n out[1] = (sm31 - sm13) / S;\n out[2] = (sm12 - sm21) / S;\n }\n else if (sm11 > sm22 && sm11 > sm33) {\n S = Math.sqrt(1.0 + sm11 - sm22 - sm33) * 2;\n out[3] = (sm23 - sm32) / S;\n out[0] = 0.25 * S;\n out[1] = (sm12 + sm21) / S;\n out[2] = (sm31 + sm13) / S;\n }\n else if (sm22 > sm33) {\n S = Math.sqrt(1.0 + sm22 - sm11 - sm33) * 2;\n out[3] = (sm31 - sm13) / S;\n out[0] = (sm12 + sm21) / S;\n out[1] = 0.25 * S;\n out[2] = (sm23 + sm32) / S;\n }\n else {\n S = Math.sqrt(1.0 + sm33 - sm11 - sm22) * 2;\n out[3] = (sm12 - sm21) / S;\n out[0] = (sm31 + sm13) / S;\n out[1] = (sm23 + sm32) / S;\n out[2] = 0.25 * S;\n }\n return out;\n }\n exports.getRotation = getRotation;\n /**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @param {vec3} s Scaling vector\n * @returns {mat4} out\n */\n function fromRotationTranslationScale(out, q, v, s) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n out[0] = (1 - (yy + zz)) * sx;\n out[1] = (xy + wz) * sx;\n out[2] = (xz - wy) * sx;\n out[3] = 0;\n out[4] = (xy - wz) * sy;\n out[5] = (1 - (xx + zz)) * sy;\n out[6] = (yz + wx) * sy;\n out[7] = 0;\n out[8] = (xz + wy) * sz;\n out[9] = (yz - wx) * sz;\n out[10] = (1 - (xx + yy)) * sz;\n out[11] = 0;\n out[12] = v[0];\n out[13] = v[1];\n out[14] = v[2];\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslationScale = fromRotationTranslationScale;\n /**\n * Creates a matrix from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin\n * This is equivalent to (but much faster than):\n *\n * mat4.identity(dest);\n * mat4.translate(dest, vec);\n * mat4.translate(dest, origin);\n * let quatMat = mat4.create();\n * quat4.toMat4(quat, quatMat);\n * mat4.multiply(dest, quatMat);\n * mat4.scale(dest, scale)\n * mat4.translate(dest, negativeOrigin);\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat4} q Rotation quaternion\n * @param {vec3} v Translation vector\n * @param {vec3} s Scaling vector\n * @param {vec3} o The origin vector around which to scale and rotate\n * @returns {mat4} out\n */\n function fromRotationTranslationScaleOrigin(out, q, v, s, o) {\n // Quaternion math\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var xy = x * y2;\n var xz = x * z2;\n var yy = y * y2;\n var yz = y * z2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n var sx = s[0];\n var sy = s[1];\n var sz = s[2];\n var ox = o[0];\n var oy = o[1];\n var oz = o[2];\n var out0 = (1 - (yy + zz)) * sx;\n var out1 = (xy + wz) * sx;\n var out2 = (xz - wy) * sx;\n var out4 = (xy - wz) * sy;\n var out5 = (1 - (xx + zz)) * sy;\n var out6 = (yz + wx) * sy;\n var out8 = (xz + wy) * sz;\n var out9 = (yz - wx) * sz;\n var out10 = (1 - (xx + yy)) * sz;\n out[0] = out0;\n out[1] = out1;\n out[2] = out2;\n out[3] = 0;\n out[4] = out4;\n out[5] = out5;\n out[6] = out6;\n out[7] = 0;\n out[8] = out8;\n out[9] = out9;\n out[10] = out10;\n out[11] = 0;\n out[12] = v[0] + ox - (out0 * ox + out4 * oy + out8 * oz);\n out[13] = v[1] + oy - (out1 * ox + out5 * oy + out9 * oz);\n out[14] = v[2] + oz - (out2 * ox + out6 * oy + out10 * oz);\n out[15] = 1;\n return out;\n }\n exports.fromRotationTranslationScaleOrigin = fromRotationTranslationScaleOrigin;\n /**\n * Calculates a 4x4 matrix from the given quaternion\n *\n * @param {mat4} out mat4 receiving operation result\n * @param {quat} q Quaternion to create matrix from\n *\n * @returns {mat4} out\n */\n function fromQuat(out, q) {\n var x = q[0], y = q[1], z = q[2], w = q[3];\n var x2 = x + x;\n var y2 = y + y;\n var z2 = z + z;\n var xx = x * x2;\n var yx = y * x2;\n var yy = y * y2;\n var zx = z * x2;\n var zy = z * y2;\n var zz = z * z2;\n var wx = w * x2;\n var wy = w * y2;\n var wz = w * z2;\n out[0] = 1 - yy - zz;\n out[1] = yx + wz;\n out[2] = zx - wy;\n out[3] = 0;\n out[4] = yx - wz;\n out[5] = 1 - xx - zz;\n out[6] = zy + wx;\n out[7] = 0;\n out[8] = zx + wy;\n out[9] = zy - wx;\n out[10] = 1 - xx - yy;\n out[11] = 0;\n out[12] = 0;\n out[13] = 0;\n out[14] = 0;\n out[15] = 1;\n return out;\n }\n exports.fromQuat = fromQuat;\n /**\n * Generates a frustum matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Number} left Left bound of the frustum\n * @param {Number} right Right bound of the frustum\n * @param {Number} bottom Bottom bound of the frustum\n * @param {Number} top Top bound of the frustum\n * @param {Number} near Near bound of the frustum\n * @param {Number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function frustum(out, left, right, bottom, top, near, far) {\n var rl = 1 / (right - left);\n var tb = 1 / (top - bottom);\n var nf = 1 / (near - far);\n out[0] = near * 2 * rl;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = near * 2 * tb;\n out[6] = 0;\n out[7] = 0;\n out[8] = (right + left) * rl;\n out[9] = (top + bottom) * tb;\n out[10] = (far + near) * nf;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[14] = far * near * 2 * nf;\n out[15] = 0;\n return out;\n }\n exports.frustum = frustum;\n /**\n * Generates a perspective projection matrix with the given bounds.\n * Passing null/undefined/no value for far will generate infinite projection matrix.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} fovy Vertical field of view in radians\n * @param {number} aspect Aspect ratio. typically viewport width/height\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum, can be null or Infinity\n * @returns {mat4} out\n */\n function perspective(out, fovy, aspect, near, far) {\n var f = 1.0 / Math.tan(fovy / 2), nf;\n out[0] = f / aspect;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = f;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[11] = -1;\n out[12] = 0;\n out[13] = 0;\n out[15] = 0;\n if (far != null && far !== Infinity) {\n nf = 1 / (near - far);\n out[10] = (far + near) * nf;\n out[14] = 2 * far * near * nf;\n }\n else {\n out[10] = -1;\n out[14] = -2 * near;\n }\n return out;\n }\n exports.perspective = perspective;\n /**\n * Generates a perspective projection matrix with the given field of view.\n * This is primarily useful for generating projection matrices to be used\n * with the still experiemental WebVR API.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {Object} fov Object containing the following values: upDegrees, downDegrees, leftDegrees, rightDegrees\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function perspectiveFromFieldOfView(out, fov, near, far) {\n var upTan = Math.tan(fov.upDegrees * Math.PI / 180.0);\n var downTan = Math.tan(fov.downDegrees * Math.PI / 180.0);\n var leftTan = Math.tan(fov.leftDegrees * Math.PI / 180.0);\n var rightTan = Math.tan(fov.rightDegrees * Math.PI / 180.0);\n var xScale = 2.0 / (leftTan + rightTan);\n var yScale = 2.0 / (upTan + downTan);\n out[0] = xScale;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n out[4] = 0.0;\n out[5] = yScale;\n out[6] = 0.0;\n out[7] = 0.0;\n out[8] = -((leftTan - rightTan) * xScale * 0.5);\n out[9] = (upTan - downTan) * yScale * 0.5;\n out[10] = far / (near - far);\n out[11] = -1.0;\n out[12] = 0.0;\n out[13] = 0.0;\n out[14] = far * near / (near - far);\n out[15] = 0.0;\n return out;\n }\n exports.perspectiveFromFieldOfView = perspectiveFromFieldOfView;\n /**\n * Generates a orthogonal projection matrix with the given bounds\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {number} left Left bound of the frustum\n * @param {number} right Right bound of the frustum\n * @param {number} bottom Bottom bound of the frustum\n * @param {number} top Top bound of the frustum\n * @param {number} near Near bound of the frustum\n * @param {number} far Far bound of the frustum\n * @returns {mat4} out\n */\n function ortho(out, left, right, bottom, top, near, far) {\n var lr = 1 / (left - right);\n var bt = 1 / (bottom - top);\n var nf = 1 / (near - far);\n out[0] = -2 * lr;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n out[4] = 0;\n out[5] = -2 * bt;\n out[6] = 0;\n out[7] = 0;\n out[8] = 0;\n out[9] = 0;\n out[10] = 2 * nf;\n out[11] = 0;\n out[12] = (left + right) * lr;\n out[13] = (top + bottom) * bt;\n out[14] = (far + near) * nf;\n out[15] = 1;\n return out;\n }\n exports.ortho = ortho;\n /**\n * Generates a look-at matrix with the given eye position, focal point, and up axis.\n * If you want a matrix that actually makes an object look at another object, you should use targetTo instead.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\n function lookAt(out, eye, center, up) {\n var x0, x1, x2, y0, y1, y2, z0, z1, z2, len;\n var eyex = eye[0];\n var eyey = eye[1];\n var eyez = eye[2];\n var upx = up[0];\n var upy = up[1];\n var upz = up[2];\n var centerx = center[0];\n var centery = center[1];\n var centerz = center[2];\n if (Math.abs(eyex - centerx) < glMatrix.EPSILON && Math.abs(eyey - centery) < glMatrix.EPSILON && Math.abs(eyez - centerz) < glMatrix.EPSILON) {\n return identity(out);\n }\n z0 = eyex - centerx;\n z1 = eyey - centery;\n z2 = eyez - centerz;\n len = 1 / Math.hypot(z0, z1, z2);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n x0 = upy * z2 - upz * z1;\n x1 = upz * z0 - upx * z2;\n x2 = upx * z1 - upy * z0;\n len = Math.hypot(x0, x1, x2);\n if (!len) {\n x0 = 0;\n x1 = 0;\n x2 = 0;\n }\n else {\n len = 1 / len;\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n y0 = z1 * x2 - z2 * x1;\n y1 = z2 * x0 - z0 * x2;\n y2 = z0 * x1 - z1 * x0;\n len = Math.hypot(y0, y1, y2);\n if (!len) {\n y0 = 0;\n y1 = 0;\n y2 = 0;\n }\n else {\n len = 1 / len;\n y0 *= len;\n y1 *= len;\n y2 *= len;\n }\n out[0] = x0;\n out[1] = y0;\n out[2] = z0;\n out[3] = 0;\n out[4] = x1;\n out[5] = y1;\n out[6] = z1;\n out[7] = 0;\n out[8] = x2;\n out[9] = y2;\n out[10] = z2;\n out[11] = 0;\n out[12] = -(x0 * eyex + x1 * eyey + x2 * eyez);\n out[13] = -(y0 * eyex + y1 * eyey + y2 * eyez);\n out[14] = -(z0 * eyex + z1 * eyey + z2 * eyez);\n out[15] = 1;\n return out;\n }\n exports.lookAt = lookAt;\n /**\n * Generates a matrix that makes something look at something else.\n *\n * @param {mat4} out mat4 frustum matrix will be written into\n * @param {vec3} eye Position of the viewer\n * @param {vec3} center Point the viewer is looking at\n * @param {vec3} up vec3 pointing up\n * @returns {mat4} out\n */\n function targetTo(out, eye, target, up) {\n var eyex = eye[0], eyey = eye[1], eyez = eye[2], upx = up[0], upy = up[1], upz = up[2];\n var z0 = eyex - target[0], z1 = eyey - target[1], z2 = eyez - target[2];\n var len = z0 * z0 + z1 * z1 + z2 * z2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n z0 *= len;\n z1 *= len;\n z2 *= len;\n }\n var x0 = upy * z2 - upz * z1, x1 = upz * z0 - upx * z2, x2 = upx * z1 - upy * z0;\n len = x0 * x0 + x1 * x1 + x2 * x2;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n x0 *= len;\n x1 *= len;\n x2 *= len;\n }\n out[0] = x0;\n out[1] = x1;\n out[2] = x2;\n out[3] = 0;\n out[4] = z1 * x2 - z2 * x1;\n out[5] = z2 * x0 - z0 * x2;\n out[6] = z0 * x1 - z1 * x0;\n out[7] = 0;\n out[8] = z0;\n out[9] = z1;\n out[10] = z2;\n out[11] = 0;\n out[12] = eyex;\n out[13] = eyey;\n out[14] = eyez;\n out[15] = 1;\n return out;\n }\n exports.targetTo = targetTo;\n /**\n * Returns a string representation of a mat4\n *\n * @param {mat4} a matrix to represent as a string\n * @returns {String} string representation of the matrix\n */\n function str(a) {\n return \"mat4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \", \" + a[8] + \", \" + a[9] + \", \" + a[10] + \", \" + a[11] + \", \" + a[12] + \", \" + a[13] + \", \" + a[14] + \", \" + a[15] + \")\";\n }\n exports.str = str;\n /**\n * Returns Frobenius norm of a mat4\n *\n * @param {mat4} a the matrix to calculate Frobenius norm of\n * @returns {Number} Frobenius norm\n */\n function frob(a) {\n return Math.hypot(a[0], a[1], a[2], a[3], a[4], a[5], a[6], a[7], a[8], a[9], a[10], a[11], a[12], a[13], a[14], a[15]);\n }\n exports.frob = frob;\n /**\n * Adds two mat4's\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n out[8] = a[8] + b[8];\n out[9] = a[9] + b[9];\n out[10] = a[10] + b[10];\n out[11] = a[11] + b[11];\n out[12] = a[12] + b[12];\n out[13] = a[13] + b[13];\n out[14] = a[14] + b[14];\n out[15] = a[15] + b[15];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts matrix b from matrix a\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @returns {mat4} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n out[4] = a[4] - b[4];\n out[5] = a[5] - b[5];\n out[6] = a[6] - b[6];\n out[7] = a[7] - b[7];\n out[8] = a[8] - b[8];\n out[9] = a[9] - b[9];\n out[10] = a[10] - b[10];\n out[11] = a[11] - b[11];\n out[12] = a[12] - b[12];\n out[13] = a[13] - b[13];\n out[14] = a[14] - b[14];\n out[15] = a[15] - b[15];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiply each element of the matrix by a scalar.\n *\n * @param {mat4} out the receiving matrix\n * @param {mat4} a the matrix to scale\n * @param {Number} b amount to scale the matrix's elements by\n * @returns {mat4} out\n */\n function multiplyScalar(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n out[8] = a[8] * b;\n out[9] = a[9] * b;\n out[10] = a[10] * b;\n out[11] = a[11] * b;\n out[12] = a[12] * b;\n out[13] = a[13] * b;\n out[14] = a[14] * b;\n out[15] = a[15] * b;\n return out;\n }\n exports.multiplyScalar = multiplyScalar;\n /**\n * Adds two mat4's after multiplying each element of the second operand by a scalar value.\n *\n * @param {mat4} out the receiving vector\n * @param {mat4} a the first operand\n * @param {mat4} b the second operand\n * @param {Number} scale the amount to scale b's elements by before adding\n * @returns {mat4} out\n */\n function multiplyScalarAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n out[4] = a[4] + b[4] * scale;\n out[5] = a[5] + b[5] * scale;\n out[6] = a[6] + b[6] * scale;\n out[7] = a[7] + b[7] * scale;\n out[8] = a[8] + b[8] * scale;\n out[9] = a[9] + b[9] * scale;\n out[10] = a[10] + b[10] * scale;\n out[11] = a[11] + b[11] * scale;\n out[12] = a[12] + b[12] * scale;\n out[13] = a[13] + b[13] * scale;\n out[14] = a[14] + b[14] * scale;\n out[15] = a[15] + b[15] * scale;\n return out;\n }\n exports.multiplyScalarAndAdd = multiplyScalarAndAdd;\n /**\n * Returns whether or not the matrices have exactly the same elements in the same position (when compared with ===)\n *\n * @param {mat4} a The first matrix.\n * @param {mat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7] && a[8] === b[8] && a[9] === b[9] && a[10] === b[10] && a[11] === b[11] && a[12] === b[12] && a[13] === b[13] && a[14] === b[14] && a[15] === b[15];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the matrices have approximately the same elements in the same position.\n *\n * @param {mat4} a The first matrix.\n * @param {mat4} b The second matrix.\n * @returns {Boolean} True if the matrices are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var a8 = a[8], a9 = a[9], a10 = a[10], a11 = a[11];\n var a12 = a[12], a13 = a[13], a14 = a[14], a15 = a[15];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n var b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n var b8 = b[8], b9 = b[9], b10 = b[10], b11 = b[11];\n var b12 = b[12], b13 = b[13], b14 = b[14], b15 = b[15];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7)) && Math.abs(a8 - b8) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a8), Math.abs(b8)) && Math.abs(a9 - b9) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a9), Math.abs(b9)) && Math.abs(a10 - b10) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a10), Math.abs(b10)) && Math.abs(a11 - b11) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a11), Math.abs(b11)) && Math.abs(a12 - b12) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a12), Math.abs(b12)) && Math.abs(a13 - b13) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a13), Math.abs(b13)) && Math.abs(a14 - b14) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a14), Math.abs(b14)) && Math.abs(a15 - b15) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a15), Math.abs(b15));\n }\n exports.equals = equals;\n /**\n * Alias for {@link mat4.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link mat4.subtract}\n * @function\n */\n exports.sub = subtract;\n}\n","/* gl-matrix/esm/quat.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n const mat3 = tslib_1.__importStar(require(\"0285c50a7e\") /* ./mat3.js */);\n const vec3 = tslib_1.__importStar(require(\"2c5eb22089\") /* ./vec3.js */);\n const vec4 = tslib_1.__importStar(require(\"c1aa33d719\") /* ./vec4.js */);\n /**\n * Quaternion\n * @module quat\n */\n /**\n * Creates a new identity quat\n *\n * @returns {quat} a new quaternion\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n out[3] = 1;\n return out;\n }\n exports.create = create;\n /**\n * Set a quat to the identity quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n exports.identity = identity;\n /**\n * Sets a quat from the given angle and rotation axis,\n * then returns it.\n *\n * @param {quat} out the receiving quaternion\n * @param {vec3} axis the axis around which to rotate\n * @param {Number} rad the angle in radians\n * @returns {quat} out\n **/\n function setAxisAngle(out, axis, rad) {\n rad = rad * 0.5;\n var s = Math.sin(rad);\n out[0] = s * axis[0];\n out[1] = s * axis[1];\n out[2] = s * axis[2];\n out[3] = Math.cos(rad);\n return out;\n }\n exports.setAxisAngle = setAxisAngle;\n /**\n * Gets the rotation axis and angle for a given\n * quaternion. If a quaternion is created with\n * setAxisAngle, this method will return the same\n * values as providied in the original parameter list\n * OR functionally equivalent values.\n * Example: The quaternion formed by axis [0, 0, 1] and\n * angle -90 is the same as the quaternion formed by\n * [0, 0, 1] and 270. This method favors the latter.\n * @param {vec3} out_axis Vector receiving the axis of rotation\n * @param {quat} q Quaternion to be decomposed\n * @return {Number} Angle, in radians, of the rotation\n */\n function getAxisAngle(out_axis, q) {\n var rad = Math.acos(q[3]) * 2.0;\n var s = Math.sin(rad / 2.0);\n if (s > glMatrix.EPSILON) {\n out_axis[0] = q[0] / s;\n out_axis[1] = q[1] / s;\n out_axis[2] = q[2] / s;\n }\n else {\n // If s is zero, return any axis (no rotation - axis does not matter)\n out_axis[0] = 1;\n out_axis[1] = 0;\n out_axis[2] = 0;\n }\n return rad;\n }\n exports.getAxisAngle = getAxisAngle;\n /**\n * Gets the angular distance between two unit quaternions\n *\n * @param {quat} a Origin unit quaternion\n * @param {quat} b Destination unit quaternion\n * @return {Number} Angle, in radians, between the two quaternions\n */\n function getAngle(a, b) {\n var dotproduct = (0, exports.dot)(a, b);\n return Math.acos(2 * dotproduct * dotproduct - 1);\n }\n exports.getAngle = getAngle;\n /**\n * Multiplies two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n */\n function multiply(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n out[0] = ax * bw + aw * bx + ay * bz - az * by;\n out[1] = ay * bw + aw * by + az * bx - ax * bz;\n out[2] = az * bw + aw * bz + ax * by - ay * bx;\n out[3] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Rotates a quaternion by the given angle about the X axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateX(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + aw * bx;\n out[1] = ay * bw + az * bx;\n out[2] = az * bw - ay * bx;\n out[3] = aw * bw - ax * bx;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a quaternion by the given angle about the Y axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateY(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var by = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw - az * by;\n out[1] = ay * bw + aw * by;\n out[2] = az * bw + ax * by;\n out[3] = aw * bw - ay * by;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a quaternion by the given angle about the Z axis\n *\n * @param {quat} out quat receiving operation result\n * @param {quat} a quat to rotate\n * @param {number} rad angle (in radians) to rotate\n * @returns {quat} out\n */\n function rotateZ(out, a, rad) {\n rad *= 0.5;\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bz = Math.sin(rad), bw = Math.cos(rad);\n out[0] = ax * bw + ay * bz;\n out[1] = ay * bw - ax * bz;\n out[2] = az * bw + aw * bz;\n out[3] = aw * bw - az * bz;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Calculates the W component of a quat from the X, Y, and Z components.\n * Assumes that quaternion is 1 unit in length.\n * Any existing W component will be ignored.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate W component of\n * @returns {quat} out\n */\n function calculateW(out, a) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = Math.sqrt(Math.abs(1.0 - x * x - y * y - z * z));\n return out;\n }\n exports.calculateW = calculateW;\n /**\n * Calculate the exponential of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n function exp(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var et = Math.exp(w);\n var s = r > 0 ? et * Math.sin(r) / r : 0;\n out[0] = x * s;\n out[1] = y * s;\n out[2] = z * s;\n out[3] = et * Math.cos(r);\n return out;\n }\n exports.exp = exp;\n /**\n * Calculate the natural logarithm of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @returns {quat} out\n */\n function ln(out, a) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n var r = Math.sqrt(x * x + y * y + z * z);\n var t = r > 0 ? Math.atan2(r, w) / r : 0;\n out[0] = x * t;\n out[1] = y * t;\n out[2] = z * t;\n out[3] = 0.5 * Math.log(x * x + y * y + z * z + w * w);\n return out;\n }\n exports.ln = ln;\n /**\n * Calculate the scalar power of a unit quaternion.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate the exponential of\n * @param {Number} b amount to scale the quaternion by\n * @returns {quat} out\n */\n function pow(out, a, b) {\n ln(out, a);\n (0, exports.scale)(out, out, b);\n exp(out, out);\n return out;\n }\n exports.pow = pow;\n /**\n * Performs a spherical linear interpolation between two quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n function slerp(out, a, b, t) {\n // benchmarks:\n // http://jsperf.com/quaternion-slerp-implementations\n var ax = a[0], ay = a[1], az = a[2], aw = a[3];\n var bx = b[0], by = b[1], bz = b[2], bw = b[3];\n var omega, cosom, sinom, scale0, scale1; // calc cosine\n cosom = ax * bx + ay * by + az * bz + aw * bw; // adjust signs (if necessary)\n if (cosom < 0.0) {\n cosom = -cosom;\n bx = -bx;\n by = -by;\n bz = -bz;\n bw = -bw;\n } // calculate coefficients\n if (1.0 - cosom > glMatrix.EPSILON) {\n // standard case (slerp)\n omega = Math.acos(cosom);\n sinom = Math.sin(omega);\n scale0 = Math.sin((1.0 - t) * omega) / sinom;\n scale1 = Math.sin(t * omega) / sinom;\n }\n else {\n // \"from\" and \"to\" quaternions are very close\n // ... so we can do a linear interpolation\n scale0 = 1.0 - t;\n scale1 = t;\n } // calculate final values\n out[0] = scale0 * ax + scale1 * bx;\n out[1] = scale0 * ay + scale1 * by;\n out[2] = scale0 * az + scale1 * bz;\n out[3] = scale0 * aw + scale1 * bw;\n return out;\n }\n exports.slerp = slerp;\n /**\n * Generates a random unit quaternion\n *\n * @param {quat} out the receiving quaternion\n * @returns {quat} out\n */\n function random(out) {\n // Implementation of http://planning.cs.uiuc.edu/node198.html\n // TODO: Calling random 3 times is probably not the fastest solution\n var u1 = glMatrix.RANDOM();\n var u2 = glMatrix.RANDOM();\n var u3 = glMatrix.RANDOM();\n var sqrt1MinusU1 = Math.sqrt(1 - u1);\n var sqrtU1 = Math.sqrt(u1);\n out[0] = sqrt1MinusU1 * Math.sin(2.0 * Math.PI * u2);\n out[1] = sqrt1MinusU1 * Math.cos(2.0 * Math.PI * u2);\n out[2] = sqrtU1 * Math.sin(2.0 * Math.PI * u3);\n out[3] = sqrtU1 * Math.cos(2.0 * Math.PI * u3);\n return out;\n }\n exports.random = random;\n /**\n * Calculates the inverse of a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate inverse of\n * @returns {quat} out\n */\n function invert(out, a) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var dot = a0 * a0 + a1 * a1 + a2 * a2 + a3 * a3;\n var invDot = dot ? 1.0 / dot : 0; // TODO: Would be faster to return [0,0,0,0] immediately if dot == 0\n out[0] = -a0 * invDot;\n out[1] = -a1 * invDot;\n out[2] = -a2 * invDot;\n out[3] = a3 * invDot;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the conjugate of a quat\n * If the quaternion is normalized, this function is faster than quat.inverse and produces the same result.\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quat to calculate conjugate of\n * @returns {quat} out\n */\n function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n return out;\n }\n exports.conjugate = conjugate;\n /**\n * Creates a quaternion from the given 3x3 rotation matrix.\n *\n * NOTE: The resultant quaternion is not normalized, so you should be sure\n * to renormalize the quaternion yourself where necessary.\n *\n * @param {quat} out the receiving quaternion\n * @param {mat3} m rotation matrix\n * @returns {quat} out\n * @function\n */\n function fromMat3(out, m) {\n // Algorithm in Ken Shoemake's article in 1987 SIGGRAPH course notes\n // article \"Quaternion Calculus and Fast Animation\".\n var fTrace = m[0] + m[4] + m[8];\n var fRoot;\n if (fTrace > 0.0) {\n // |w| > 1/2, may as well choose w > 1/2\n fRoot = Math.sqrt(fTrace + 1.0); // 2w\n out[3] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot; // 1/(4w)\n out[0] = (m[5] - m[7]) * fRoot;\n out[1] = (m[6] - m[2]) * fRoot;\n out[2] = (m[1] - m[3]) * fRoot;\n }\n else {\n // |w| <= 1/2\n var i = 0;\n if (m[4] > m[0])\n i = 1;\n if (m[8] > m[i * 3 + i])\n i = 2;\n var j = (i + 1) % 3;\n var k = (i + 2) % 3;\n fRoot = Math.sqrt(m[i * 3 + i] - m[j * 3 + j] - m[k * 3 + k] + 1.0);\n out[i] = 0.5 * fRoot;\n fRoot = 0.5 / fRoot;\n out[3] = (m[j * 3 + k] - m[k * 3 + j]) * fRoot;\n out[j] = (m[j * 3 + i] + m[i * 3 + j]) * fRoot;\n out[k] = (m[k * 3 + i] + m[i * 3 + k]) * fRoot;\n }\n return out;\n }\n exports.fromMat3 = fromMat3;\n /**\n * Creates a quaternion from the given euler angle x, y, z.\n *\n * @param {quat} out the receiving quaternion\n * @param {x} Angle to rotate around X axis in degrees.\n * @param {y} Angle to rotate around Y axis in degrees.\n * @param {z} Angle to rotate around Z axis in degrees.\n * @returns {quat} out\n * @function\n */\n function fromEuler(out, x, y, z) {\n var halfToRad = 0.5 * Math.PI / 180.0;\n x *= halfToRad;\n y *= halfToRad;\n z *= halfToRad;\n var sx = Math.sin(x);\n var cx = Math.cos(x);\n var sy = Math.sin(y);\n var cy = Math.cos(y);\n var sz = Math.sin(z);\n var cz = Math.cos(z);\n out[0] = sx * cy * cz - cx * sy * sz;\n out[1] = cx * sy * cz + sx * cy * sz;\n out[2] = cx * cy * sz - sx * sy * cz;\n out[3] = cx * cy * cz + sx * sy * sz;\n return out;\n }\n exports.fromEuler = fromEuler;\n /**\n * Returns a string representation of a quatenion\n *\n * @param {quat} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"quat(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat} a quaternion to clone\n * @returns {quat} a new quaternion\n * @function\n */\n exports.clone = vec4.clone;\n /**\n * Creates a new quat initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} a new quaternion\n * @function\n */\n exports.fromValues = vec4.fromValues;\n /**\n * Copy the values from one quat to another\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the source quaternion\n * @returns {quat} out\n * @function\n */\n exports.copy = vec4.copy;\n /**\n * Set the components of a quat to the given values\n *\n * @param {quat} out the receiving quaternion\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {quat} out\n * @function\n */\n exports.set = vec4.set;\n /**\n * Adds two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {quat} out\n * @function\n */\n exports.add = vec4.add;\n /**\n * Alias for {@link quat.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Scales a quat by a scalar number\n *\n * @param {quat} out the receiving vector\n * @param {quat} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {quat} out\n * @function\n */\n exports.scale = vec4.scale;\n /**\n * Calculates the dot product of two quat's\n *\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n exports.dot = vec4.dot;\n /**\n * Performs a linear interpolation between two quat's\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n * @function\n */\n exports.lerp = vec4.lerp;\n /**\n * Calculates the length of a quat\n *\n * @param {quat} a vector to calculate length of\n * @returns {Number} length of a\n */\n exports.length = vec4.length;\n /**\n * Alias for {@link quat.length}\n * @function\n */\n exports.len = exports.length;\n /**\n * Calculates the squared length of a quat\n *\n * @param {quat} a vector to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n exports.squaredLength = vec4.squaredLength;\n /**\n * Alias for {@link quat.squaredLength}\n * @function\n */\n exports.sqrLen = exports.squaredLength;\n /**\n * Normalize a quat\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a quaternion to normalize\n * @returns {quat} out\n * @function\n */\n exports.normalize = vec4.normalize;\n /**\n * Returns whether or not the quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {quat} a The first quaternion.\n * @param {quat} b The second quaternion.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n exports.exactEquals = vec4.exactEquals;\n /**\n * Returns whether or not the quaternions have approximately the same elements in the same position.\n *\n * @param {quat} a The first vector.\n * @param {quat} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n exports.equals = vec4.equals;\n /**\n * Sets a quaternion to represent the shortest rotation from one\n * vector to another.\n *\n * Both vectors are assumed to be unit length.\n *\n * @param {quat} out the receiving quaternion.\n * @param {vec3} a the initial vector\n * @param {vec3} b the destination vector\n * @returns {quat} out\n */\n exports.rotationTo = function () {\n var tmpvec3 = vec3.create();\n var xUnitVec3 = vec3.fromValues(1, 0, 0);\n var yUnitVec3 = vec3.fromValues(0, 1, 0);\n return function (out, a, b) {\n var dot = vec3.dot(a, b);\n if (dot < -0.999999) {\n vec3.cross(tmpvec3, xUnitVec3, a);\n if (vec3.len(tmpvec3) < 0.000001)\n vec3.cross(tmpvec3, yUnitVec3, a);\n vec3.normalize(tmpvec3, tmpvec3);\n setAxisAngle(out, tmpvec3, Math.PI);\n return out;\n }\n else if (dot > 0.999999) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n return out;\n }\n else {\n vec3.cross(tmpvec3, a, b);\n out[0] = tmpvec3[0];\n out[1] = tmpvec3[1];\n out[2] = tmpvec3[2];\n out[3] = 1 + dot;\n return (0, exports.normalize)(out, out);\n }\n };\n }();\n /**\n * Performs a spherical linear interpolation with two control points\n *\n * @param {quat} out the receiving quaternion\n * @param {quat} a the first operand\n * @param {quat} b the second operand\n * @param {quat} c the third operand\n * @param {quat} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat} out\n */\n exports.sqlerp = function () {\n var temp1 = create();\n var temp2 = create();\n return function (out, a, b, c, d, t) {\n slerp(temp1, a, d, t);\n slerp(temp2, b, c, t);\n slerp(out, temp1, temp2, 2 * t * (1 - t));\n return out;\n };\n }();\n /**\n * Sets the specified quaternion with values corresponding to the given\n * axes. Each axis is a vec3 and is expected to be unit length and\n * perpendicular to all other specified axes.\n *\n * @param {vec3} view the vector representing the viewing direction\n * @param {vec3} right the vector representing the local \"right\" direction\n * @param {vec3} up the vector representing the local \"up\" direction\n * @returns {quat} out\n */\n exports.setAxes = function () {\n var matr = mat3.create();\n return function (out, view, right, up) {\n matr[0] = right[0];\n matr[3] = right[1];\n matr[6] = right[2];\n matr[1] = up[0];\n matr[4] = up[1];\n matr[7] = up[2];\n matr[2] = -view[0];\n matr[5] = -view[1];\n matr[8] = -view[2];\n return (0, exports.normalize)(out, fromMat3(out, matr));\n };\n }();\n}\n","/* gl-matrix/esm/vec3.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 3 Dimensional Vector\n * @module vec3\n */\n /**\n * Creates a new, empty vec3\n *\n * @returns {vec3} a new 3D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(3);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec3 initialized with values from an existing vector\n *\n * @param {vec3} a vector to clone\n * @returns {vec3} a new 3D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n }\n exports.clone = clone;\n /**\n * Calculates the length of a vec3\n *\n * @param {vec3} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return Math.hypot(x, y, z);\n }\n exports.length = length;\n /**\n * Creates a new vec3 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} a new 3D vector\n */\n function fromValues(x, y, z) {\n var out = new glMatrix.ARRAY_TYPE(3);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec3 to another\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the source vector\n * @returns {vec3} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec3 to the given values\n *\n * @param {vec3} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @returns {vec3} out\n */\n function set(out, x, y, z) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to ceil\n * @returns {vec3} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to floor\n * @returns {vec3} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to round\n * @returns {vec3} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec3 by a scalar number\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec3} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec3's after scaling the second operand by a scalar value\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec3} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return Math.hypot(x, y, z);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n return x * x + y * y + z * z;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the squared length of a vec3\n *\n * @param {vec3} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n return x * x + y * y + z * z;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to negate\n * @returns {vec3} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to invert\n * @returns {vec3} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec3\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a vector to normalize\n * @returns {vec3} out\n */\n function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var len = x * x + y * y + z * z;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n out[2] = a[2] * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec3's\n *\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2];\n }\n exports.dot = dot;\n /**\n * Computes the cross product of two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @returns {vec3} out\n */\n function cross(out, a, b) {\n var ax = a[0], ay = a[1], az = a[2];\n var bx = b[0], by = b[1], bz = b[2];\n out[0] = ay * bz - az * by;\n out[1] = az * bx - ax * bz;\n out[2] = ax * by - ay * bx;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec3's\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Performs a hermite interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {vec3} c the third operand\n * @param {vec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function hermite(out, a, b, c, d, t) {\n var factorTimes2 = t * t;\n var factor1 = factorTimes2 * (2 * t - 3) + 1;\n var factor2 = factorTimes2 * (t - 2) + t;\n var factor3 = factorTimes2 * (t - 1);\n var factor4 = factorTimes2 * (3 - 2 * t);\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n }\n exports.hermite = hermite;\n /**\n * Performs a bezier interpolation with two control points\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the first operand\n * @param {vec3} b the second operand\n * @param {vec3} c the third operand\n * @param {vec3} d the fourth operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec3} out\n */\n function bezier(out, a, b, c, d, t) {\n var inverseFactor = 1 - t;\n var inverseFactorTimesTwo = inverseFactor * inverseFactor;\n var factorTimes2 = t * t;\n var factor1 = inverseFactorTimesTwo * inverseFactor;\n var factor2 = 3 * t * inverseFactorTimesTwo;\n var factor3 = 3 * factorTimes2 * inverseFactor;\n var factor4 = factorTimes2 * t;\n out[0] = a[0] * factor1 + b[0] * factor2 + c[0] * factor3 + d[0] * factor4;\n out[1] = a[1] * factor1 + b[1] * factor2 + c[1] * factor3 + d[1] * factor4;\n out[2] = a[2] * factor1 + b[2] * factor2 + c[2] * factor3 + d[2] * factor4;\n return out;\n }\n exports.bezier = bezier;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec3} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec3} out\n */\n function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n var z = glMatrix.RANDOM() * 2.0 - 1.0;\n var zScale = Math.sqrt(1.0 - z * z) * scale;\n out[0] = Math.cos(r) * zScale;\n out[1] = Math.sin(r) * zScale;\n out[2] = z * scale;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec3 with a mat4.\n * 4th vector component is implicitly '1'\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec3} out\n */\n function transformMat4(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n var w = m[3] * x + m[7] * y + m[11] * z + m[15];\n w = w || 1.0;\n out[0] = (m[0] * x + m[4] * y + m[8] * z + m[12]) / w;\n out[1] = (m[1] * x + m[5] * y + m[9] * z + m[13]) / w;\n out[2] = (m[2] * x + m[6] * y + m[10] * z + m[14]) / w;\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Transforms the vec3 with a mat3.\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {mat3} m the 3x3 matrix to transform with\n * @returns {vec3} out\n */\n function transformMat3(out, a, m) {\n var x = a[0], y = a[1], z = a[2];\n out[0] = x * m[0] + y * m[3] + z * m[6];\n out[1] = x * m[1] + y * m[4] + z * m[7];\n out[2] = x * m[2] + y * m[5] + z * m[8];\n return out;\n }\n exports.transformMat3 = transformMat3;\n /**\n * Transforms the vec3 with a quat\n * Can also be used for dual quaternions. (Multiply it with the real part)\n *\n * @param {vec3} out the receiving vector\n * @param {vec3} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec3} out\n */\n function transformQuat(out, a, q) {\n // benchmarks: https://jsperf.com/quaternion-transform-vec3-implementations-fixed\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3];\n var x = a[0], y = a[1], z = a[2]; // var qvec = [qx, qy, qz];\n // var uv = vec3.cross([], qvec, a);\n var uvx = qy * z - qz * y, uvy = qz * x - qx * z, uvz = qx * y - qy * x; // var uuv = vec3.cross([], qvec, uv);\n var uuvx = qy * uvz - qz * uvy, uuvy = qz * uvx - qx * uvz, uuvz = qx * uvy - qy * uvx; // vec3.scale(uv, uv, 2 * w);\n var w2 = qw * 2;\n uvx *= w2;\n uvy *= w2;\n uvz *= w2; // vec3.scale(uuv, uuv, 2);\n uuvx *= 2;\n uuvy *= 2;\n uuvz *= 2; // return vec3.add(out, a, vec3.add(out, uv, uuv));\n out[0] = x + uvx + uuvx;\n out[1] = y + uvy + uuvy;\n out[2] = z + uvz + uuvz;\n return out;\n }\n exports.transformQuat = transformQuat;\n /**\n * Rotate a 3D vector around the x-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateX(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0];\n r[1] = p[1] * Math.cos(rad) - p[2] * Math.sin(rad);\n r[2] = p[1] * Math.sin(rad) + p[2] * Math.cos(rad); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotate a 3D vector around the y-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateY(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[2] * Math.sin(rad) + p[0] * Math.cos(rad);\n r[1] = p[1];\n r[2] = p[2] * Math.cos(rad) - p[0] * Math.sin(rad); //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotate a 3D vector around the z-axis\n * @param {vec3} out The receiving vec3\n * @param {vec3} a The vec3 point to rotate\n * @param {vec3} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec3} out\n */\n function rotateZ(out, a, b, rad) {\n var p = [], r = []; //Translate point to the origin\n p[0] = a[0] - b[0];\n p[1] = a[1] - b[1];\n p[2] = a[2] - b[2]; //perform rotation\n r[0] = p[0] * Math.cos(rad) - p[1] * Math.sin(rad);\n r[1] = p[0] * Math.sin(rad) + p[1] * Math.cos(rad);\n r[2] = p[2]; //translate to correct position\n out[0] = r[0] + b[0];\n out[1] = r[1] + b[1];\n out[2] = r[2] + b[2];\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Get the angle between two 3D vectors\n * @param {vec3} a The first operand\n * @param {vec3} b The second operand\n * @returns {Number} The angle in radians\n */\n function angle(a, b) {\n var ax = a[0], ay = a[1], az = a[2], bx = b[0], by = b[1], bz = b[2], mag1 = Math.sqrt(ax * ax + ay * ay + az * az), mag2 = Math.sqrt(bx * bx + by * by + bz * bz), mag = mag1 * mag2, cosine = mag && dot(a, b) / mag;\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n }\n exports.angle = angle;\n /**\n * Set the components of a vec3 to zero\n *\n * @param {vec3} out the receiving vector\n * @returns {vec3} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec3} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec3(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec3} a The first vector.\n * @param {vec3} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2];\n var b0 = b[0], b1 = b[1], b2 = b[2];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec3.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec3.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec3.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec3.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec3.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec3.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec3.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec3s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec3. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec3s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 3;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n }\n return a;\n };\n }();\n}\n","/* gl-matrix/esm/vec4.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 4 Dimensional Vector\n * @module vec4\n */\n /**\n * Creates a new, empty vec4\n *\n * @returns {vec4} a new 4D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(4);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec4 initialized with values from an existing vector\n *\n * @param {vec4} a vector to clone\n * @returns {vec4} a new 4D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.clone = clone;\n /**\n * Creates a new vec4 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} a new 4D vector\n */\n function fromValues(x, y, z, w) {\n var out = new glMatrix.ARRAY_TYPE(4);\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec4 to another\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the source vector\n * @returns {vec4} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec4 to the given values\n *\n * @param {vec4} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @param {Number} z Z component\n * @param {Number} w W component\n * @returns {vec4} out\n */\n function set(out, x, y, z, w) {\n out[0] = x;\n out[1] = y;\n out[2] = z;\n out[3] = w;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n out[2] = a[2] - b[2];\n out[3] = a[3] - b[3];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n out[2] = a[2] * b[2];\n out[3] = a[3] * b[3];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n out[2] = a[2] / b[2];\n out[3] = a[3] / b[3];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to ceil\n * @returns {vec4} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n out[2] = Math.ceil(a[2]);\n out[3] = Math.ceil(a[3]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to floor\n * @returns {vec4} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n out[2] = Math.floor(a[2]);\n out[3] = Math.floor(a[3]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n out[2] = Math.min(a[2], b[2]);\n out[3] = Math.min(a[3], b[3]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {vec4} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n out[2] = Math.max(a[2], b[2]);\n out[3] = Math.max(a[3], b[3]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to round\n * @returns {vec4} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n out[2] = Math.round(a[2]);\n out[3] = Math.round(a[3]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec4 by a scalar number\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec4} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec4's after scaling the second operand by a scalar value\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec4} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n out[2] = a[2] + b[2] * scale;\n out[3] = a[3] + b[3] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return Math.hypot(x, y, z, w);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0];\n var y = b[1] - a[1];\n var z = b[2] - a[2];\n var w = b[3] - a[3];\n return x * x + y * y + z * z + w * w;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the length of a vec4\n *\n * @param {vec4} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return Math.hypot(x, y, z, w);\n }\n exports.length = length;\n /**\n * Calculates the squared length of a vec4\n *\n * @param {vec4} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n return x * x + y * y + z * z + w * w;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to negate\n * @returns {vec4} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = -a[3];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to invert\n * @returns {vec4} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n out[2] = 1.0 / a[2];\n out[3] = 1.0 / a[3];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec4\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a vector to normalize\n * @returns {vec4} out\n */\n function normalize(out, a) {\n var x = a[0];\n var y = a[1];\n var z = a[2];\n var w = a[3];\n var len = x * x + y * y + z * z + w * w;\n if (len > 0) {\n len = 1 / Math.sqrt(len);\n }\n out[0] = x * len;\n out[1] = y * len;\n out[2] = z * len;\n out[3] = w * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec4's\n *\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1] + a[2] * b[2] + a[3] * b[3];\n }\n exports.dot = dot;\n /**\n * Returns the cross-product of three vectors in a 4-dimensional space\n *\n * @param {vec4} result the receiving vector\n * @param {vec4} U the first vector\n * @param {vec4} V the second vector\n * @param {vec4} W the third vector\n * @returns {vec4} result\n */\n function cross(out, u, v, w) {\n var A = v[0] * w[1] - v[1] * w[0], B = v[0] * w[2] - v[2] * w[0], C = v[0] * w[3] - v[3] * w[0], D = v[1] * w[2] - v[2] * w[1], E = v[1] * w[3] - v[3] * w[1], F = v[2] * w[3] - v[3] * w[2];\n var G = u[0];\n var H = u[1];\n var I = u[2];\n var J = u[3];\n out[0] = H * F - I * E + J * D;\n out[1] = -(G * F) + I * C - J * B;\n out[2] = G * E - H * C + J * A;\n out[3] = -(G * D) + H * B - I * A;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec4's\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the first operand\n * @param {vec4} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec4} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0];\n var ay = a[1];\n var az = a[2];\n var aw = a[3];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n out[2] = az + t * (b[2] - az);\n out[3] = aw + t * (b[3] - aw);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec4} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec4} out\n */\n function random(out, scale) {\n scale = scale || 1.0; // Marsaglia, George. Choosing a Point from the Surface of a\n // Sphere. Ann. Math. Statist. 43 (1972), no. 2, 645--646.\n // http://projecteuclid.org/euclid.aoms/1177692644;\n var v1, v2, v3, v4;\n var s1, s2;\n do {\n v1 = glMatrix.RANDOM() * 2 - 1;\n v2 = glMatrix.RANDOM() * 2 - 1;\n s1 = v1 * v1 + v2 * v2;\n } while (s1 >= 1);\n do {\n v3 = glMatrix.RANDOM() * 2 - 1;\n v4 = glMatrix.RANDOM() * 2 - 1;\n s2 = v3 * v3 + v4 * v4;\n } while (s2 >= 1);\n var d = Math.sqrt((1 - s1) / s2);\n out[0] = scale * v1;\n out[1] = scale * v2;\n out[2] = scale * v3 * d;\n out[3] = scale * v4 * d;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec4 with a mat4.\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec4} out\n */\n function transformMat4(out, a, m) {\n var x = a[0], y = a[1], z = a[2], w = a[3];\n out[0] = m[0] * x + m[4] * y + m[8] * z + m[12] * w;\n out[1] = m[1] * x + m[5] * y + m[9] * z + m[13] * w;\n out[2] = m[2] * x + m[6] * y + m[10] * z + m[14] * w;\n out[3] = m[3] * x + m[7] * y + m[11] * z + m[15] * w;\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Transforms the vec4 with a quat\n *\n * @param {vec4} out the receiving vector\n * @param {vec4} a the vector to transform\n * @param {quat} q quaternion to transform with\n * @returns {vec4} out\n */\n function transformQuat(out, a, q) {\n var x = a[0], y = a[1], z = a[2];\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3]; // calculate quat * vec\n var ix = qw * x + qy * z - qz * y;\n var iy = qw * y + qz * x - qx * z;\n var iz = qw * z + qx * y - qy * x;\n var iw = -qx * x - qy * y - qz * z; // calculate result * inverse quat\n out[0] = ix * qw + iw * -qx + iy * -qz - iz * -qy;\n out[1] = iy * qw + iw * -qy + iz * -qx - ix * -qz;\n out[2] = iz * qw + iw * -qz + ix * -qy - iy * -qx;\n out[3] = a[3];\n return out;\n }\n exports.transformQuat = transformQuat;\n /**\n * Set the components of a vec4 to zero\n *\n * @param {vec4} out the receiving vector\n * @returns {vec4} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n out[2] = 0.0;\n out[3] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec4} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec4(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors have exactly the same elements in the same position (when compared with ===)\n *\n * @param {vec4} a The first vector.\n * @param {vec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec4} a The first vector.\n * @param {vec4} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec4.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec4.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec4.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec4.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec4.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec4.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec4.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec4s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec4. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec4s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 4;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n vec[2] = a[i + 2];\n vec[3] = a[i + 3];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n a[i + 2] = vec[2];\n a[i + 3] = vec[3];\n }\n return a;\n };\n }();\n}\n","/* gl-matrix/esm/quat2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n const quat = tslib_1.__importStar(require(\"eb06fc032a\") /* ./quat.js */);\n const mat4 = tslib_1.__importStar(require(\"a427635f32\") /* ./mat4.js */);\n /**\n * Dual Quaternion<br>\n * Format: [real, dual]<br>\n * Quaternion format: XYZW<br>\n * Make sure to have normalized dual quaternions, otherwise the functions may not work as intended.<br>\n * @module quat2\n */\n /**\n * Creates a new identity dual quat\n *\n * @returns {quat2} a new dual quaternion [real -> rotation, dual -> translation]\n */\n function create() {\n var dq = new glMatrix.ARRAY_TYPE(8);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n dq[0] = 0;\n dq[1] = 0;\n dq[2] = 0;\n dq[4] = 0;\n dq[5] = 0;\n dq[6] = 0;\n dq[7] = 0;\n }\n dq[3] = 1;\n return dq;\n }\n exports.create = create;\n /**\n * Creates a new quat initialized with values from an existing quaternion\n *\n * @param {quat2} a dual quaternion to clone\n * @returns {quat2} new dual quaternion\n * @function\n */\n function clone(a) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = a[0];\n dq[1] = a[1];\n dq[2] = a[2];\n dq[3] = a[3];\n dq[4] = a[4];\n dq[5] = a[5];\n dq[6] = a[6];\n dq[7] = a[7];\n return dq;\n }\n exports.clone = clone;\n /**\n * Creates a new dual quat initialized with the given values\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} new dual quaternion\n * @function\n */\n function fromValues(x1, y1, z1, w1, x2, y2, z2, w2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n dq[4] = x2;\n dq[5] = y2;\n dq[6] = z2;\n dq[7] = w2;\n return dq;\n }\n exports.fromValues = fromValues;\n /**\n * Creates a new dual quat from the given values (quat and translation)\n *\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component (translation)\n * @param {Number} y2 Y component (translation)\n * @param {Number} z2 Z component (translation)\n * @returns {quat2} new dual quaternion\n * @function\n */\n function fromRotationTranslationValues(x1, y1, z1, w1, x2, y2, z2) {\n var dq = new glMatrix.ARRAY_TYPE(8);\n dq[0] = x1;\n dq[1] = y1;\n dq[2] = z1;\n dq[3] = w1;\n var ax = x2 * 0.5, ay = y2 * 0.5, az = z2 * 0.5;\n dq[4] = ax * w1 + ay * z1 - az * y1;\n dq[5] = ay * w1 + az * x1 - ax * z1;\n dq[6] = az * w1 + ax * y1 - ay * x1;\n dq[7] = -ax * x1 - ay * y1 - az * z1;\n return dq;\n }\n exports.fromRotationTranslationValues = fromRotationTranslationValues;\n /**\n * Creates a dual quat from a quaternion and a translation\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {quat} q a normalized quaternion\n * @param {vec3} t tranlation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromRotationTranslation(out, q, t) {\n var ax = t[0] * 0.5, ay = t[1] * 0.5, az = t[2] * 0.5, bx = q[0], by = q[1], bz = q[2], bw = q[3];\n out[0] = bx;\n out[1] = by;\n out[2] = bz;\n out[3] = bw;\n out[4] = ax * bw + ay * bz - az * by;\n out[5] = ay * bw + az * bx - ax * bz;\n out[6] = az * bw + ax * by - ay * bx;\n out[7] = -ax * bx - ay * by - az * bz;\n return out;\n }\n exports.fromRotationTranslation = fromRotationTranslation;\n /**\n * Creates a dual quat from a translation\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {vec3} t translation vector\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromTranslation(out, t) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = t[0] * 0.5;\n out[5] = t[1] * 0.5;\n out[6] = t[2] * 0.5;\n out[7] = 0;\n return out;\n }\n exports.fromTranslation = fromTranslation;\n /**\n * Creates a dual quat from a quaternion\n *\n * @param {quat2} dual quaternion receiving operation result\n * @param {quat} q the quaternion\n * @returns {quat2} dual quaternion receiving operation result\n * @function\n */\n function fromRotation(out, q) {\n out[0] = q[0];\n out[1] = q[1];\n out[2] = q[2];\n out[3] = q[3];\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n }\n exports.fromRotation = fromRotation;\n /**\n * Creates a new dual quat from a matrix (4x4)\n *\n * @param {quat2} out the dual quaternion\n * @param {mat4} a the matrix\n * @returns {quat2} dual quat receiving operation result\n * @function\n */\n function fromMat4(out, a) {\n //TODO Optimize this\n var outer = quat.create();\n mat4.getRotation(outer, a);\n var t = new glMatrix.ARRAY_TYPE(3);\n mat4.getTranslation(t, a);\n fromRotationTranslation(out, outer, t);\n return out;\n }\n exports.fromMat4 = fromMat4;\n /**\n * Copy the values from one dual quat to another\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the source dual quaternion\n * @returns {quat2} out\n * @function\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n out[2] = a[2];\n out[3] = a[3];\n out[4] = a[4];\n out[5] = a[5];\n out[6] = a[6];\n out[7] = a[7];\n return out;\n }\n exports.copy = copy;\n /**\n * Set a dual quat to the identity dual quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @returns {quat2} out\n */\n function identity(out) {\n out[0] = 0;\n out[1] = 0;\n out[2] = 0;\n out[3] = 1;\n out[4] = 0;\n out[5] = 0;\n out[6] = 0;\n out[7] = 0;\n return out;\n }\n exports.identity = identity;\n /**\n * Set the components of a dual quat to the given values\n *\n * @param {quat2} out the receiving quaternion\n * @param {Number} x1 X component\n * @param {Number} y1 Y component\n * @param {Number} z1 Z component\n * @param {Number} w1 W component\n * @param {Number} x2 X component\n * @param {Number} y2 Y component\n * @param {Number} z2 Z component\n * @param {Number} w2 W component\n * @returns {quat2} out\n * @function\n */\n function set(out, x1, y1, z1, w1, x2, y2, z2, w2) {\n out[0] = x1;\n out[1] = y1;\n out[2] = z1;\n out[3] = w1;\n out[4] = x2;\n out[5] = y2;\n out[6] = z2;\n out[7] = w2;\n return out;\n }\n exports.set = set;\n /**\n * Gets the real part of a dual quat\n * @param {quat} out real part\n * @param {quat2} a Dual Quaternion\n * @return {quat} real part\n */\n exports.getReal = quat.copy;\n /**\n * Gets the dual part of a dual quat\n * @param {quat} out dual part\n * @param {quat2} a Dual Quaternion\n * @return {quat} dual part\n */\n function getDual(out, a) {\n out[0] = a[4];\n out[1] = a[5];\n out[2] = a[6];\n out[3] = a[7];\n return out;\n }\n exports.getDual = getDual;\n /**\n * Set the real component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat} q a quaternion representing the real part\n * @returns {quat2} out\n * @function\n */\n exports.setReal = quat.copy;\n /**\n * Set the dual component of a dual quat to the given quaternion\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat} q a quaternion representing the dual part\n * @returns {quat2} out\n * @function\n */\n function setDual(out, q) {\n out[4] = q[0];\n out[5] = q[1];\n out[6] = q[2];\n out[7] = q[3];\n return out;\n }\n exports.setDual = setDual;\n /**\n * Gets the translation of a normalized dual quat\n * @param {vec3} out translation\n * @param {quat2} a Dual Quaternion to be decomposed\n * @return {vec3} translation\n */\n function getTranslation(out, a) {\n var ax = a[4], ay = a[5], az = a[6], aw = a[7], bx = -a[0], by = -a[1], bz = -a[2], bw = a[3];\n out[0] = (ax * bw + aw * bx + ay * bz - az * by) * 2;\n out[1] = (ay * bw + aw * by + az * bx - ax * bz) * 2;\n out[2] = (az * bw + aw * bz + ax * by - ay * bx) * 2;\n return out;\n }\n exports.getTranslation = getTranslation;\n /**\n * Translates a dual quat by the given vector\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to translate\n * @param {vec3} v vector to translate by\n * @returns {quat2} out\n */\n function translate(out, a, v) {\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3], bx1 = v[0] * 0.5, by1 = v[1] * 0.5, bz1 = v[2] * 0.5, ax2 = a[4], ay2 = a[5], az2 = a[6], aw2 = a[7];\n out[0] = ax1;\n out[1] = ay1;\n out[2] = az1;\n out[3] = aw1;\n out[4] = aw1 * bx1 + ay1 * bz1 - az1 * by1 + ax2;\n out[5] = aw1 * by1 + az1 * bx1 - ax1 * bz1 + ay2;\n out[6] = aw1 * bz1 + ax1 * by1 - ay1 * bx1 + az2;\n out[7] = -ax1 * bx1 - ay1 * by1 - az1 * bz1 + aw2;\n return out;\n }\n exports.translate = translate;\n /**\n * Rotates a dual quat around the X axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateX(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateX(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateX = rotateX;\n /**\n * Rotates a dual quat around the Y axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateY(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateY(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateY = rotateY;\n /**\n * Rotates a dual quat around the Z axis\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {number} rad how far should the rotation be\n * @returns {quat2} out\n */\n function rotateZ(out, a, rad) {\n var bx = -a[0], by = -a[1], bz = -a[2], bw = a[3], ax = a[4], ay = a[5], az = a[6], aw = a[7], ax1 = ax * bw + aw * bx + ay * bz - az * by, ay1 = ay * bw + aw * by + az * bx - ax * bz, az1 = az * bw + aw * bz + ax * by - ay * bx, aw1 = aw * bw - ax * bx - ay * by - az * bz;\n quat.rotateZ(out, a, rad);\n bx = out[0];\n by = out[1];\n bz = out[2];\n bw = out[3];\n out[4] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[5] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[6] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[7] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n return out;\n }\n exports.rotateZ = rotateZ;\n /**\n * Rotates a dual quat by a given quaternion (a * q)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {quat} q quaternion to rotate by\n * @returns {quat2} out\n */\n function rotateByQuatAppend(out, a, q) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], ax = a[0], ay = a[1], az = a[2], aw = a[3];\n out[0] = ax * qw + aw * qx + ay * qz - az * qy;\n out[1] = ay * qw + aw * qy + az * qx - ax * qz;\n out[2] = az * qw + aw * qz + ax * qy - ay * qx;\n out[3] = aw * qw - ax * qx - ay * qy - az * qz;\n ax = a[4];\n ay = a[5];\n az = a[6];\n aw = a[7];\n out[4] = ax * qw + aw * qx + ay * qz - az * qy;\n out[5] = ay * qw + aw * qy + az * qx - ax * qz;\n out[6] = az * qw + aw * qz + ax * qy - ay * qx;\n out[7] = aw * qw - ax * qx - ay * qy - az * qz;\n return out;\n }\n exports.rotateByQuatAppend = rotateByQuatAppend;\n /**\n * Rotates a dual quat by a given quaternion (q * a)\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat} q quaternion to rotate by\n * @param {quat2} a the dual quaternion to rotate\n * @returns {quat2} out\n */\n function rotateByQuatPrepend(out, q, a) {\n var qx = q[0], qy = q[1], qz = q[2], qw = q[3], bx = a[0], by = a[1], bz = a[2], bw = a[3];\n out[0] = qx * bw + qw * bx + qy * bz - qz * by;\n out[1] = qy * bw + qw * by + qz * bx - qx * bz;\n out[2] = qz * bw + qw * bz + qx * by - qy * bx;\n out[3] = qw * bw - qx * bx - qy * by - qz * bz;\n bx = a[4];\n by = a[5];\n bz = a[6];\n bw = a[7];\n out[4] = qx * bw + qw * bx + qy * bz - qz * by;\n out[5] = qy * bw + qw * by + qz * bx - qx * bz;\n out[6] = qz * bw + qw * bz + qx * by - qy * bx;\n out[7] = qw * bw - qx * bx - qy * by - qz * bz;\n return out;\n }\n exports.rotateByQuatPrepend = rotateByQuatPrepend;\n /**\n * Rotates a dual quat around a given axis. Does the normalisation automatically\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the dual quaternion to rotate\n * @param {vec3} axis the axis to rotate around\n * @param {Number} rad how far the rotation should be\n * @returns {quat2} out\n */\n function rotateAroundAxis(out, a, axis, rad) {\n //Special case for rad = 0\n if (Math.abs(rad) < glMatrix.EPSILON) {\n return copy(out, a);\n }\n var axisLength = Math.hypot(axis[0], axis[1], axis[2]);\n rad = rad * 0.5;\n var s = Math.sin(rad);\n var bx = s * axis[0] / axisLength;\n var by = s * axis[1] / axisLength;\n var bz = s * axis[2] / axisLength;\n var bw = Math.cos(rad);\n var ax1 = a[0], ay1 = a[1], az1 = a[2], aw1 = a[3];\n out[0] = ax1 * bw + aw1 * bx + ay1 * bz - az1 * by;\n out[1] = ay1 * bw + aw1 * by + az1 * bx - ax1 * bz;\n out[2] = az1 * bw + aw1 * bz + ax1 * by - ay1 * bx;\n out[3] = aw1 * bw - ax1 * bx - ay1 * by - az1 * bz;\n var ax = a[4], ay = a[5], az = a[6], aw = a[7];\n out[4] = ax * bw + aw * bx + ay * bz - az * by;\n out[5] = ay * bw + aw * by + az * bx - ax * bz;\n out[6] = az * bw + aw * bz + ax * by - ay * bx;\n out[7] = aw * bw - ax * bx - ay * by - az * bz;\n return out;\n }\n exports.rotateAroundAxis = rotateAroundAxis;\n /**\n * Adds two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {quat2} out\n * @function\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n out[2] = a[2] + b[2];\n out[3] = a[3] + b[3];\n out[4] = a[4] + b[4];\n out[5] = a[5] + b[5];\n out[6] = a[6] + b[6];\n out[7] = a[7] + b[7];\n return out;\n }\n exports.add = add;\n /**\n * Multiplies two dual quat's\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {quat2} out\n */\n function multiply(out, a, b) {\n var ax0 = a[0], ay0 = a[1], az0 = a[2], aw0 = a[3], bx1 = b[4], by1 = b[5], bz1 = b[6], bw1 = b[7], ax1 = a[4], ay1 = a[5], az1 = a[6], aw1 = a[7], bx0 = b[0], by0 = b[1], bz0 = b[2], bw0 = b[3];\n out[0] = ax0 * bw0 + aw0 * bx0 + ay0 * bz0 - az0 * by0;\n out[1] = ay0 * bw0 + aw0 * by0 + az0 * bx0 - ax0 * bz0;\n out[2] = az0 * bw0 + aw0 * bz0 + ax0 * by0 - ay0 * bx0;\n out[3] = aw0 * bw0 - ax0 * bx0 - ay0 * by0 - az0 * bz0;\n out[4] = ax0 * bw1 + aw0 * bx1 + ay0 * bz1 - az0 * by1 + ax1 * bw0 + aw1 * bx0 + ay1 * bz0 - az1 * by0;\n out[5] = ay0 * bw1 + aw0 * by1 + az0 * bx1 - ax0 * bz1 + ay1 * bw0 + aw1 * by0 + az1 * bx0 - ax1 * bz0;\n out[6] = az0 * bw1 + aw0 * bz1 + ax0 * by1 - ay0 * bx1 + az1 * bw0 + aw1 * bz0 + ax1 * by0 - ay1 * bx0;\n out[7] = aw0 * bw1 - ax0 * bx1 - ay0 * by1 - az0 * bz1 + aw1 * bw0 - ax1 * bx0 - ay1 * by0 - az1 * bz0;\n return out;\n }\n exports.multiply = multiply;\n /**\n * Alias for {@link quat2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Scales a dual quat by a scalar number\n *\n * @param {quat2} out the receiving dual quat\n * @param {quat2} a the dual quat to scale\n * @param {Number} b amount to scale the dual quat by\n * @returns {quat2} out\n * @function\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n out[2] = a[2] * b;\n out[3] = a[3] * b;\n out[4] = a[4] * b;\n out[5] = a[5] * b;\n out[6] = a[6] * b;\n out[7] = a[7] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Calculates the dot product of two dual quat's (The dot product of the real parts)\n *\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @returns {Number} dot product of a and b\n * @function\n */\n exports.dot = quat.dot;\n /**\n * Performs a linear interpolation between two dual quats's\n * NOTE: The resulting dual quaternions won't always be normalized (The error is most noticeable when t = 0.5)\n *\n * @param {quat2} out the receiving dual quat\n * @param {quat2} a the first operand\n * @param {quat2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {quat2} out\n */\n function lerp(out, a, b, t) {\n var mt = 1 - t;\n if ((0, exports.dot)(a, b) < 0)\n t = -t;\n out[0] = a[0] * mt + b[0] * t;\n out[1] = a[1] * mt + b[1] * t;\n out[2] = a[2] * mt + b[2] * t;\n out[3] = a[3] * mt + b[3] * t;\n out[4] = a[4] * mt + b[4] * t;\n out[5] = a[5] * mt + b[5] * t;\n out[6] = a[6] * mt + b[6] * t;\n out[7] = a[7] * mt + b[7] * t;\n return out;\n }\n exports.lerp = lerp;\n /**\n * Calculates the inverse of a dual quat. If they are normalized, conjugate is cheaper\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a dual quat to calculate inverse of\n * @returns {quat2} out\n */\n function invert(out, a) {\n var sqlen = (0, exports.squaredLength)(a);\n out[0] = -a[0] / sqlen;\n out[1] = -a[1] / sqlen;\n out[2] = -a[2] / sqlen;\n out[3] = a[3] / sqlen;\n out[4] = -a[4] / sqlen;\n out[5] = -a[5] / sqlen;\n out[6] = -a[6] / sqlen;\n out[7] = a[7] / sqlen;\n return out;\n }\n exports.invert = invert;\n /**\n * Calculates the conjugate of a dual quat\n * If the dual quaternion is normalized, this function is faster than quat2.inverse and produces the same result.\n *\n * @param {quat2} out the receiving quaternion\n * @param {quat2} a quat to calculate conjugate of\n * @returns {quat2} out\n */\n function conjugate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n out[2] = -a[2];\n out[3] = a[3];\n out[4] = -a[4];\n out[5] = -a[5];\n out[6] = -a[6];\n out[7] = a[7];\n return out;\n }\n exports.conjugate = conjugate;\n /**\n * Calculates the length of a dual quat\n *\n * @param {quat2} a dual quat to calculate length of\n * @returns {Number} length of a\n * @function\n */\n exports.length = quat.length;\n /**\n * Alias for {@link quat2.length}\n * @function\n */\n exports.len = exports.length;\n /**\n * Calculates the squared length of a dual quat\n *\n * @param {quat2} a dual quat to calculate squared length of\n * @returns {Number} squared length of a\n * @function\n */\n exports.squaredLength = quat.squaredLength;\n /**\n * Alias for {@link quat2.squaredLength}\n * @function\n */\n exports.sqrLen = exports.squaredLength;\n /**\n * Normalize a dual quat\n *\n * @param {quat2} out the receiving dual quaternion\n * @param {quat2} a dual quaternion to normalize\n * @returns {quat2} out\n * @function\n */\n function normalize(out, a) {\n var magnitude = (0, exports.squaredLength)(a);\n if (magnitude > 0) {\n magnitude = Math.sqrt(magnitude);\n var a0 = a[0] / magnitude;\n var a1 = a[1] / magnitude;\n var a2 = a[2] / magnitude;\n var a3 = a[3] / magnitude;\n var b0 = a[4];\n var b1 = a[5];\n var b2 = a[6];\n var b3 = a[7];\n var a_dot_b = a0 * b0 + a1 * b1 + a2 * b2 + a3 * b3;\n out[0] = a0;\n out[1] = a1;\n out[2] = a2;\n out[3] = a3;\n out[4] = (b0 - a0 * a_dot_b) / magnitude;\n out[5] = (b1 - a1 * a_dot_b) / magnitude;\n out[6] = (b2 - a2 * a_dot_b) / magnitude;\n out[7] = (b3 - a3 * a_dot_b) / magnitude;\n }\n return out;\n }\n exports.normalize = normalize;\n /**\n * Returns a string representation of a dual quatenion\n *\n * @param {quat2} a dual quaternion to represent as a string\n * @returns {String} string representation of the dual quat\n */\n function str(a) {\n return \"quat2(\" + a[0] + \", \" + a[1] + \", \" + a[2] + \", \" + a[3] + \", \" + a[4] + \", \" + a[5] + \", \" + a[6] + \", \" + a[7] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the dual quaternions have exactly the same elements in the same position (when compared with ===)\n *\n * @param {quat2} a the first dual quaternion.\n * @param {quat2} b the second dual quaternion.\n * @returns {Boolean} true if the dual quaternions are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1] && a[2] === b[2] && a[3] === b[3] && a[4] === b[4] && a[5] === b[5] && a[6] === b[6] && a[7] === b[7];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the dual quaternions have approximately the same elements in the same position.\n *\n * @param {quat2} a the first dual quat.\n * @param {quat2} b the second dual quat.\n * @returns {Boolean} true if the dual quats are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1], a2 = a[2], a3 = a[3], a4 = a[4], a5 = a[5], a6 = a[6], a7 = a[7];\n var b0 = b[0], b1 = b[1], b2 = b[2], b3 = b[3], b4 = b[4], b5 = b[5], b6 = b[6], b7 = b[7];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1)) && Math.abs(a2 - b2) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a2), Math.abs(b2)) && Math.abs(a3 - b3) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a3), Math.abs(b3)) && Math.abs(a4 - b4) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a4), Math.abs(b4)) && Math.abs(a5 - b5) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a5), Math.abs(b5)) && Math.abs(a6 - b6) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a6), Math.abs(b6)) && Math.abs(a7 - b7) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a7), Math.abs(b7));\n }\n exports.equals = equals;\n}\n","/* gl-matrix/esm/vec2.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const tslib_1 = require(\"tslib\");\n const glMatrix = tslib_1.__importStar(require(\"68ca94c15c\") /* ./common.js */);\n /**\n * 2 Dimensional Vector\n * @module vec2\n */\n /**\n * Creates a new, empty vec2\n *\n * @returns {vec2} a new 2D vector\n */\n function create() {\n var out = new glMatrix.ARRAY_TYPE(2);\n if (glMatrix.ARRAY_TYPE != Float32Array) {\n out[0] = 0;\n out[1] = 0;\n }\n return out;\n }\n exports.create = create;\n /**\n * Creates a new vec2 initialized with values from an existing vector\n *\n * @param {vec2} a vector to clone\n * @returns {vec2} a new 2D vector\n */\n function clone(a) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = a[0];\n out[1] = a[1];\n return out;\n }\n exports.clone = clone;\n /**\n * Creates a new vec2 initialized with the given values\n *\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} a new 2D vector\n */\n function fromValues(x, y) {\n var out = new glMatrix.ARRAY_TYPE(2);\n out[0] = x;\n out[1] = y;\n return out;\n }\n exports.fromValues = fromValues;\n /**\n * Copy the values from one vec2 to another\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the source vector\n * @returns {vec2} out\n */\n function copy(out, a) {\n out[0] = a[0];\n out[1] = a[1];\n return out;\n }\n exports.copy = copy;\n /**\n * Set the components of a vec2 to the given values\n *\n * @param {vec2} out the receiving vector\n * @param {Number} x X component\n * @param {Number} y Y component\n * @returns {vec2} out\n */\n function set(out, x, y) {\n out[0] = x;\n out[1] = y;\n return out;\n }\n exports.set = set;\n /**\n * Adds two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function add(out, a, b) {\n out[0] = a[0] + b[0];\n out[1] = a[1] + b[1];\n return out;\n }\n exports.add = add;\n /**\n * Subtracts vector b from vector a\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function subtract(out, a, b) {\n out[0] = a[0] - b[0];\n out[1] = a[1] - b[1];\n return out;\n }\n exports.subtract = subtract;\n /**\n * Multiplies two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function multiply(out, a, b) {\n out[0] = a[0] * b[0];\n out[1] = a[1] * b[1];\n return out;\n }\n exports.multiply = multiply;\n /**\n * Divides two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function divide(out, a, b) {\n out[0] = a[0] / b[0];\n out[1] = a[1] / b[1];\n return out;\n }\n exports.divide = divide;\n /**\n * Math.ceil the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to ceil\n * @returns {vec2} out\n */\n function ceil(out, a) {\n out[0] = Math.ceil(a[0]);\n out[1] = Math.ceil(a[1]);\n return out;\n }\n exports.ceil = ceil;\n /**\n * Math.floor the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to floor\n * @returns {vec2} out\n */\n function floor(out, a) {\n out[0] = Math.floor(a[0]);\n out[1] = Math.floor(a[1]);\n return out;\n }\n exports.floor = floor;\n /**\n * Returns the minimum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function min(out, a, b) {\n out[0] = Math.min(a[0], b[0]);\n out[1] = Math.min(a[1], b[1]);\n return out;\n }\n exports.min = min;\n /**\n * Returns the maximum of two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec2} out\n */\n function max(out, a, b) {\n out[0] = Math.max(a[0], b[0]);\n out[1] = Math.max(a[1], b[1]);\n return out;\n }\n exports.max = max;\n /**\n * Math.round the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to round\n * @returns {vec2} out\n */\n function round(out, a) {\n out[0] = Math.round(a[0]);\n out[1] = Math.round(a[1]);\n return out;\n }\n exports.round = round;\n /**\n * Scales a vec2 by a scalar number\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to scale\n * @param {Number} b amount to scale the vector by\n * @returns {vec2} out\n */\n function scale(out, a, b) {\n out[0] = a[0] * b;\n out[1] = a[1] * b;\n return out;\n }\n exports.scale = scale;\n /**\n * Adds two vec2's after scaling the second operand by a scalar value\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} scale the amount to scale b by before adding\n * @returns {vec2} out\n */\n function scaleAndAdd(out, a, b, scale) {\n out[0] = a[0] + b[0] * scale;\n out[1] = a[1] + b[1] * scale;\n return out;\n }\n exports.scaleAndAdd = scaleAndAdd;\n /**\n * Calculates the euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} distance between a and b\n */\n function distance(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return Math.hypot(x, y);\n }\n exports.distance = distance;\n /**\n * Calculates the squared euclidian distance between two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} squared distance between a and b\n */\n function squaredDistance(a, b) {\n var x = b[0] - a[0], y = b[1] - a[1];\n return x * x + y * y;\n }\n exports.squaredDistance = squaredDistance;\n /**\n * Calculates the length of a vec2\n *\n * @param {vec2} a vector to calculate length of\n * @returns {Number} length of a\n */\n function length(a) {\n var x = a[0], y = a[1];\n return Math.hypot(x, y);\n }\n exports.length = length;\n /**\n * Calculates the squared length of a vec2\n *\n * @param {vec2} a vector to calculate squared length of\n * @returns {Number} squared length of a\n */\n function squaredLength(a) {\n var x = a[0], y = a[1];\n return x * x + y * y;\n }\n exports.squaredLength = squaredLength;\n /**\n * Negates the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to negate\n * @returns {vec2} out\n */\n function negate(out, a) {\n out[0] = -a[0];\n out[1] = -a[1];\n return out;\n }\n exports.negate = negate;\n /**\n * Returns the inverse of the components of a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to invert\n * @returns {vec2} out\n */\n function inverse(out, a) {\n out[0] = 1.0 / a[0];\n out[1] = 1.0 / a[1];\n return out;\n }\n exports.inverse = inverse;\n /**\n * Normalize a vec2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a vector to normalize\n * @returns {vec2} out\n */\n function normalize(out, a) {\n var x = a[0], y = a[1];\n var len = x * x + y * y;\n if (len > 0) {\n //TODO: evaluate use of glm_invsqrt here?\n len = 1 / Math.sqrt(len);\n }\n out[0] = a[0] * len;\n out[1] = a[1] * len;\n return out;\n }\n exports.normalize = normalize;\n /**\n * Calculates the dot product of two vec2's\n *\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {Number} dot product of a and b\n */\n function dot(a, b) {\n return a[0] * b[0] + a[1] * b[1];\n }\n exports.dot = dot;\n /**\n * Computes the cross product of two vec2's\n * Note that the cross product must by definition produce a 3D vector\n *\n * @param {vec3} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @returns {vec3} out\n */\n function cross(out, a, b) {\n var z = a[0] * b[1] - a[1] * b[0];\n out[0] = out[1] = 0;\n out[2] = z;\n return out;\n }\n exports.cross = cross;\n /**\n * Performs a linear interpolation between two vec2's\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the first operand\n * @param {vec2} b the second operand\n * @param {Number} t interpolation amount, in the range [0-1], between the two inputs\n * @returns {vec2} out\n */\n function lerp(out, a, b, t) {\n var ax = a[0], ay = a[1];\n out[0] = ax + t * (b[0] - ax);\n out[1] = ay + t * (b[1] - ay);\n return out;\n }\n exports.lerp = lerp;\n /**\n * Generates a random vector with the given scale\n *\n * @param {vec2} out the receiving vector\n * @param {Number} [scale] Length of the resulting vector. If ommitted, a unit vector will be returned\n * @returns {vec2} out\n */\n function random(out, scale) {\n scale = scale || 1.0;\n var r = glMatrix.RANDOM() * 2.0 * Math.PI;\n out[0] = Math.cos(r) * scale;\n out[1] = Math.sin(r) * scale;\n return out;\n }\n exports.random = random;\n /**\n * Transforms the vec2 with a mat2\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat2(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y;\n out[1] = m[1] * x + m[3] * y;\n return out;\n }\n exports.transformMat2 = transformMat2;\n /**\n * Transforms the vec2 with a mat2d\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat2d} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat2d(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[2] * y + m[4];\n out[1] = m[1] * x + m[3] * y + m[5];\n return out;\n }\n exports.transformMat2d = transformMat2d;\n /**\n * Transforms the vec2 with a mat3\n * 3rd vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat3} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat3(out, a, m) {\n var x = a[0], y = a[1];\n out[0] = m[0] * x + m[3] * y + m[6];\n out[1] = m[1] * x + m[4] * y + m[7];\n return out;\n }\n exports.transformMat3 = transformMat3;\n /**\n * Transforms the vec2 with a mat4\n * 3rd vector component is implicitly '0'\n * 4th vector component is implicitly '1'\n *\n * @param {vec2} out the receiving vector\n * @param {vec2} a the vector to transform\n * @param {mat4} m matrix to transform with\n * @returns {vec2} out\n */\n function transformMat4(out, a, m) {\n var x = a[0];\n var y = a[1];\n out[0] = m[0] * x + m[4] * y + m[12];\n out[1] = m[1] * x + m[5] * y + m[13];\n return out;\n }\n exports.transformMat4 = transformMat4;\n /**\n * Rotate a 2D vector\n * @param {vec2} out The receiving vec2\n * @param {vec2} a The vec2 point to rotate\n * @param {vec2} b The origin of the rotation\n * @param {Number} rad The angle of rotation in radians\n * @returns {vec2} out\n */\n function rotate(out, a, b, rad) {\n //Translate point to the origin\n var p0 = a[0] - b[0], p1 = a[1] - b[1], sinC = Math.sin(rad), cosC = Math.cos(rad); //perform rotation and translate to correct position\n out[0] = p0 * cosC - p1 * sinC + b[0];\n out[1] = p0 * sinC + p1 * cosC + b[1];\n return out;\n }\n exports.rotate = rotate;\n /**\n * Get the angle between two 2D vectors\n * @param {vec2} a The first operand\n * @param {vec2} b The second operand\n * @returns {Number} The angle in radians\n */\n function angle(a, b) {\n var x1 = a[0], y1 = a[1], x2 = b[0], y2 = b[1], \n // mag is the product of the magnitudes of a and b\n mag = Math.sqrt(x1 * x1 + y1 * y1) * Math.sqrt(x2 * x2 + y2 * y2), \n // mag &&.. short circuits if mag == 0\n cosine = mag && (x1 * x2 + y1 * y2) / mag; // Math.min(Math.max(cosine, -1), 1) clamps the cosine between -1 and 1\n return Math.acos(Math.min(Math.max(cosine, -1), 1));\n }\n exports.angle = angle;\n /**\n * Set the components of a vec2 to zero\n *\n * @param {vec2} out the receiving vector\n * @returns {vec2} out\n */\n function zero(out) {\n out[0] = 0.0;\n out[1] = 0.0;\n return out;\n }\n exports.zero = zero;\n /**\n * Returns a string representation of a vector\n *\n * @param {vec2} a vector to represent as a string\n * @returns {String} string representation of the vector\n */\n function str(a) {\n return \"vec2(\" + a[0] + \", \" + a[1] + \")\";\n }\n exports.str = str;\n /**\n * Returns whether or not the vectors exactly have the same elements in the same position (when compared with ===)\n *\n * @param {vec2} a The first vector.\n * @param {vec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function exactEquals(a, b) {\n return a[0] === b[0] && a[1] === b[1];\n }\n exports.exactEquals = exactEquals;\n /**\n * Returns whether or not the vectors have approximately the same elements in the same position.\n *\n * @param {vec2} a The first vector.\n * @param {vec2} b The second vector.\n * @returns {Boolean} True if the vectors are equal, false otherwise.\n */\n function equals(a, b) {\n var a0 = a[0], a1 = a[1];\n var b0 = b[0], b1 = b[1];\n return Math.abs(a0 - b0) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a0), Math.abs(b0)) && Math.abs(a1 - b1) <= glMatrix.EPSILON * Math.max(1.0, Math.abs(a1), Math.abs(b1));\n }\n exports.equals = equals;\n /**\n * Alias for {@link vec2.length}\n * @function\n */\n exports.len = length;\n /**\n * Alias for {@link vec2.subtract}\n * @function\n */\n exports.sub = subtract;\n /**\n * Alias for {@link vec2.multiply}\n * @function\n */\n exports.mul = multiply;\n /**\n * Alias for {@link vec2.divide}\n * @function\n */\n exports.div = divide;\n /**\n * Alias for {@link vec2.distance}\n * @function\n */\n exports.dist = distance;\n /**\n * Alias for {@link vec2.squaredDistance}\n * @function\n */\n exports.sqrDist = squaredDistance;\n /**\n * Alias for {@link vec2.squaredLength}\n * @function\n */\n exports.sqrLen = squaredLength;\n /**\n * Perform some operation over an array of vec2s.\n *\n * @param {Array} a the array of vectors to iterate over\n * @param {Number} stride Number of elements between the start of each vec2. If 0 assumes tightly packed\n * @param {Number} offset Number of elements to skip at the beginning of the array\n * @param {Number} count Number of vec2s to iterate over. If 0 iterates over entire array\n * @param {Function} fn Function to call for each vector in the array\n * @param {Object} [arg] additional argument to pass to fn\n * @returns {Array} a\n * @function\n */\n exports.forEach = function () {\n var vec = create();\n return function (a, stride, offset, count, fn, arg) {\n var i, l;\n if (!stride) {\n stride = 2;\n }\n if (!offset) {\n offset = 0;\n }\n if (count) {\n l = Math.min(count * stride + offset, a.length);\n }\n else {\n l = a.length;\n }\n for (i = offset; i < l; i += stride) {\n vec[0] = a[i];\n vec[1] = a[i + 1];\n fn(vec, vec, arg);\n a[i] = vec[0];\n a[i + 1] = vec[1];\n }\n return a;\n };\n }();\n}\n","/* models/vtk/vtkvolume.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n class VTKVolumePlotView extends vtklayout_1.AbstractVTKView {\n connect_signals() {\n super.connect_signals();\n this.connect(this.model.properties.data.change, () => {\n this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);\n this.invalidate_render();\n });\n this.connect(this.model.properties.colormap.change, () => {\n this.colormap_selector.value = this.model.colormap;\n const event = new Event(\"change\");\n this.colormap_selector.dispatchEvent(event);\n });\n this.connect(this.model.properties.shadow.change, () => {\n this.shadow_selector.value = this.model.shadow ? \"1\" : \"0\";\n const event = new Event(\"change\");\n this.shadow_selector.dispatchEvent(event);\n });\n this.connect(this.model.properties.sampling.change, () => {\n this.sampling_slider.value = this.model.sampling.toFixed(2);\n const event = new Event(\"input\");\n this.sampling_slider.dispatchEvent(event);\n });\n this.connect(this.model.properties.edge_gradient.change, () => {\n this.edge_gradient_slider.value = this.model.edge_gradient.toFixed(2);\n const event = new Event(\"input\");\n this.edge_gradient_slider.dispatchEvent(event);\n });\n this.connect(this.model.properties.rescale.change, () => {\n this._controllerWidget.setRescaleColorMap(this.model.rescale);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.ambient.change, () => {\n this.volume.getProperty().setAmbient(this.model.ambient);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.diffuse.change, () => {\n this.volume.getProperty().setDiffuse(this.model.diffuse);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.camera.change, () => {\n if (!this._setting_camera) {\n this._set_camera_state();\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.specular.change, () => {\n this.volume.getProperty().setSpecular(this.model.specular);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.specular_power.change, () => {\n this.volume.getProperty().setSpecularPower(this.model.specular_power);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.display_volume.change, () => {\n this._set_volume_visibility(this.model.display_volume);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.display_slices.change, () => {\n this._set_slices_visibility(this.model.display_slices);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.slice_i.change, () => {\n if (this.image_actor_i !== undefined) {\n this.image_actor_i.getMapper().setISlice(this.model.slice_i);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.slice_j.change, () => {\n if (this.image_actor_j !== undefined) {\n this.image_actor_j.getMapper().setJSlice(this.model.slice_j);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.slice_k.change, () => {\n if (this.image_actor_k !== undefined) {\n this.image_actor_k.getMapper().setKSlice(this.model.slice_k);\n this._vtk_renwin.getRenderWindow().render();\n }\n });\n this.connect(this.model.properties.render_background.change, () => {\n this._vtk_renwin\n .getRenderer()\n .setBackground(...(0, util_1.hexToRGB)(this.model.render_background));\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.interpolation.change, () => {\n this._set_interpolation(this.model.interpolation);\n this._vtk_renwin.getRenderWindow().render();\n });\n this.connect(this.model.properties.controller_expanded.change, () => {\n if (this._controllerWidget != null)\n this._controllerWidget.setExpanded(this.model.controller_expanded);\n });\n this.connect(this.model.properties.nan_opacity.change, () => {\n const scalar_opacity = this.image_actor_i.getProperty().getScalarOpacity();\n scalar_opacity.get([\"nodes\"]).nodes[0].y = this.model.nan_opacity;\n scalar_opacity.modified();\n this._vtk_renwin.getRenderWindow().render();\n });\n }\n render() {\n this._vtk_renwin = null;\n this._orientationWidget = null;\n this._axes = null;\n super.render();\n this._create_orientation_widget();\n this._set_axes();\n this._vtk_renwin.getRenderer().resetCamera();\n if (Object.keys(this.model.camera).length)\n this._set_camera_state();\n this._get_camera_state();\n }\n invalidate_render() {\n this._vtk_renwin = null;\n super.invalidate_render();\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindow.newInstance({\n rootContainer: this.shadow_el,\n container: this._vtk_container,\n });\n }\n plot() {\n this._controllerWidget = util_1.vtkns.VolumeController.newInstance({\n size: [400, 150],\n rescaleColorMap: this.model.rescale,\n });\n this._plot_volume();\n this._plot_slices();\n this._controllerWidget.setupContent(this._vtk_renwin.getRenderWindow(), this.volume, true);\n this._controllerWidget.setContainer(this.el);\n this._controllerWidget.setExpanded(this.model.controller_expanded);\n this._connect_js_controls();\n this._vtk_renwin.getRenderWindow().getInteractor();\n this._vtk_renwin.getRenderWindow().getInteractor().setDesiredUpdateRate(45);\n this._set_volume_visibility(this.model.display_volume);\n this._set_slices_visibility(this.model.display_slices);\n this._vtk_renwin\n .getRenderer()\n .setBackground(...(0, util_1.hexToRGB)(this.model.render_background));\n this._set_interpolation(this.model.interpolation);\n this._set_camera_state();\n }\n get vtk_image_data() {\n if (!this._vtk_image_data)\n this._vtk_image_data = (0, util_1.data2VTKImageData)(this.model.data);\n return this._vtk_image_data;\n }\n get volume() {\n return this._vtk_renwin.getRenderer().getVolumes()[0];\n }\n get image_actor_i() {\n return this._vtk_renwin.getRenderer().getActors()[0];\n }\n get image_actor_j() {\n return this._vtk_renwin.getRenderer().getActors()[1];\n }\n get image_actor_k() {\n return this._vtk_renwin.getRenderer().getActors()[2];\n }\n get shadow_selector() {\n return this.el.querySelector(\".js-shadow\");\n }\n get edge_gradient_slider() {\n return this.el.querySelector(\".js-edge\");\n }\n get sampling_slider() {\n return this.el.querySelector(\".js-spacing\");\n }\n get colormap_selector() {\n return this.el.querySelector(\".js-color-preset\");\n }\n _connect_js_controls() {\n const { el: controller_el } = this._controllerWidget.get('el');\n if (controller_el !== undefined) {\n const controller_button = controller_el.querySelector('.js-button');\n controller_button.addEventListener('click', () => this.model.controller_expanded = this._controllerWidget.getExpanded());\n }\n // Colormap selector\n this.colormap_selector.addEventListener(\"change\", () => {\n this.model.colormap = this.colormap_selector.value;\n });\n if (!this.model.colormap)\n this.model.colormap = this.colormap_selector.value;\n else\n this.model.properties.colormap.change.emit();\n // Shadow selector\n this.shadow_selector.addEventListener(\"change\", () => {\n this.model.shadow = !!Number(this.shadow_selector.value);\n });\n if ((this.model.shadow = !!Number(this.shadow_selector.value)))\n this.model.properties.shadow.change.emit();\n // Sampling slider\n this.sampling_slider.addEventListener(\"input\", () => {\n const js_sampling_value = Number(this.sampling_slider.value);\n if (Math.abs(this.model.sampling - js_sampling_value) >= 5e-3)\n this.model.sampling = js_sampling_value;\n });\n if (Math.abs(this.model.sampling - Number(this.shadow_selector.value)) >= 5e-3)\n this.model.properties.sampling.change.emit();\n // Edge Gradient slider\n this.edge_gradient_slider.addEventListener(\"input\", () => {\n const js_edge_gradient_value = Number(this.edge_gradient_slider.value);\n if (Math.abs(this.model.edge_gradient - js_edge_gradient_value) >= 5e-3)\n this.model.edge_gradient = js_edge_gradient_value;\n });\n if (Math.abs(this.model.edge_gradient - Number(this.edge_gradient_slider.value)) >= 5e-3)\n this.model.properties.edge_gradient.change.emit();\n }\n _plot_slices() {\n const source = this._vtk_image_data;\n const image_actor_i = util_1.vtkns.ImageSlice.newInstance();\n const image_actor_j = util_1.vtkns.ImageSlice.newInstance();\n const image_actor_k = util_1.vtkns.ImageSlice.newInstance();\n const image_mapper_i = util_1.vtkns.ImageMapper.newInstance();\n const image_mapper_j = util_1.vtkns.ImageMapper.newInstance();\n const image_mapper_k = util_1.vtkns.ImageMapper.newInstance();\n image_mapper_i.setInputData(source);\n image_mapper_i.setISlice(this.model.slice_i);\n image_actor_i.setMapper(image_mapper_i);\n image_mapper_j.setInputData(source);\n image_mapper_j.setJSlice(this.model.slice_j);\n image_actor_j.setMapper(image_mapper_j);\n image_mapper_k.setInputData(source);\n image_mapper_k.setKSlice(this.model.slice_k);\n image_actor_k.setMapper(image_mapper_k);\n // set_color and opacity\n const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();\n const lookupTable = this.volume.getProperty().getRGBTransferFunction(0);\n const range = this.volume.getMapper().getInputData().getPointData().getScalars().getRange();\n piecewiseFunction.removeAllPoints();\n piecewiseFunction.addPoint(range[0] - 1, this.model.nan_opacity);\n piecewiseFunction.addPoint(range[0], 1);\n piecewiseFunction.addPoint(range[1], 1);\n const property = image_actor_i.getProperty();\n image_actor_j.setProperty(property);\n image_actor_k.setProperty(property);\n property.setRGBTransferFunction(lookupTable);\n property.setScalarOpacity(piecewiseFunction);\n const renderer = this._vtk_renwin.getRenderer();\n renderer.addActor(image_actor_i);\n renderer.addActor(image_actor_j);\n renderer.addActor(image_actor_k);\n }\n _plot_volume() {\n //Create vtk volume and add it to the scene\n const source = this.vtk_image_data;\n const actor = util_1.vtkns.Volume.newInstance();\n const mapper = util_1.vtkns.VolumeMapper.newInstance();\n actor.setMapper(mapper);\n mapper.setInputData(source);\n const dataArray = source.getPointData().getScalars() || source.getPointData().getArrays()[0];\n const dataRange = dataArray.getRange();\n const lookupTable = util_1.vtkns.ColorTransferFunction.newInstance();\n if (this.model.colormap != null) {\n const preset = util_1.vtkns.ColorTransferFunction.vtkColorMaps.getPresetByName(this.model.colormap);\n lookupTable.applyColorMap(preset);\n }\n lookupTable.onModified(() => (this.model.mapper = (0, util_1.vtkLutToMapper)(lookupTable)));\n const piecewiseFunction = util_1.vtkns.PiecewiseFunction.newInstance();\n const sampleDistance = 0.7 *\n Math.sqrt(source\n .getSpacing()\n .map((v) => v * v)\n .reduce((a, b) => a + b, 0));\n mapper.setSampleDistance(sampleDistance);\n actor.getProperty().setRGBTransferFunction(0, lookupTable);\n actor.getProperty().setScalarOpacity(0, piecewiseFunction);\n actor.getProperty().setInterpolationTypeToFastLinear();\n // actor.getProperty().setInterpolationTypeToLinear();\n // For better looking volume rendering\n // - distance in world coordinates a scalar opacity of 1.0\n actor\n .getProperty()\n .setScalarOpacityUnitDistance(0, util_1.vtkns.BoundingBox.getDiagonalLength(source.getBounds()) /\n Math.max(...source.getDimensions()));\n // - control how we emphasize surface boundaries\n // => max should be around the average gradient magnitude for the\n // volume or maybe average plus one std dev of the gradient magnitude\n // (adjusted for spacing, this is a world coordinate gradient, not a\n // pixel gradient)\n // => max hack: (dataRange[1] - dataRange[0]) * 0.05\n actor.getProperty().setGradientOpacityMinimumValue(0, 0);\n actor\n .getProperty()\n .setGradientOpacityMaximumValue(0, (dataRange[1] - dataRange[0]) * 0.05);\n // - Use shading based on gradient\n actor.getProperty().setShade(this.model.shadow);\n actor.getProperty().setUseGradientOpacity(0, true);\n // - generic good default\n actor.getProperty().setGradientOpacityMinimumOpacity(0, 0.0);\n actor.getProperty().setGradientOpacityMaximumOpacity(0, 1.0);\n actor.getProperty().setAmbient(this.model.ambient);\n actor.getProperty().setDiffuse(this.model.diffuse);\n actor.getProperty().setSpecular(this.model.specular);\n actor.getProperty().setSpecularPower(this.model.specular_power);\n this._vtk_renwin.getRenderer().addVolume(actor);\n }\n _set_interpolation(interpolation) {\n if (interpolation == \"fast_linear\") {\n this.volume.getProperty().setInterpolationTypeToFastLinear();\n this.image_actor_i.getProperty().setInterpolationTypeToLinear();\n }\n else if (interpolation == \"linear\") {\n this.volume.getProperty().setInterpolationTypeToLinear();\n this.image_actor_i.getProperty().setInterpolationTypeToLinear();\n }\n else {\n //nearest\n this.volume.getProperty().setInterpolationTypeToNearest();\n this.image_actor_i.getProperty().setInterpolationTypeToNearest();\n }\n }\n _set_slices_visibility(visibility) {\n this.image_actor_i.setVisibility(visibility);\n this.image_actor_j.setVisibility(visibility);\n this.image_actor_k.setVisibility(visibility);\n }\n _set_volume_visibility(visibility) {\n this.volume.setVisibility(visibility);\n }\n }\n exports.VTKVolumePlotView = VTKVolumePlotView;\n VTKVolumePlotView.__name__ = \"VTKVolumePlotView\";\n class VTKVolumePlot extends vtklayout_1.AbstractVTKPlot {\n constructor(attrs) {\n super(attrs);\n }\n }\n exports.VTKVolumePlot = VTKVolumePlot;\n _a = VTKVolumePlot;\n VTKVolumePlot.__name__ = \"VTKVolumePlot\";\n (() => {\n _a.prototype.default_view = VTKVolumePlotView;\n _a.define(({ Any, Array, Boolean, Int, Number, String, Struct }) => ({\n ambient: [Number, 0.2],\n colormap: [String],\n data: [Any],\n diffuse: [Number, 0.7],\n display_slices: [Boolean, false],\n display_volume: [Boolean, true],\n edge_gradient: [Number, 0.2],\n interpolation: [util_1.Interpolation, 'fast_linear'],\n mapper: [Struct({ palette: Array(String), low: Number, high: Number }), { palette: [], low: 0, high: 0 }],\n nan_opacity: [Number, 1],\n render_background: [String, '#52576e'],\n rescale: [Boolean, false],\n sampling: [Number, 0.4],\n shadow: [Boolean, true],\n slice_i: [Int, 0],\n slice_j: [Int, 0],\n slice_k: [Int, 0],\n specular: [Number, 0.3],\n specular_power: [Number, 8.0],\n controller_expanded: [Boolean, true],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/vtksynchronized.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n var _a;\n const object_1 = require(\"@bokehjs/core/util/object\");\n const debounce_1 = require(\"99a25e6992\") /* debounce */;\n const vtklayout_1 = require(\"1de1ccb7ff\") /* ./vtklayout */;\n const panel_fullscreen_renwin_sync_1 = require(\"877619fe71\") /* ./panel_fullscreen_renwin_sync */;\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n const CONTEXT_NAME = \"panel\";\n class VTKSynchronizedPlotView extends vtklayout_1.AbstractVTKView {\n initialize() {\n super.initialize();\n this._renderable = false;\n // Context initialisation\n this._synchronizer_context = util_1.vtkns.SynchronizableRenderWindow.getSynchronizerContext(`${CONTEXT_NAME}-{this.model.id}`);\n }\n connect_signals() {\n super.connect_signals();\n const update = (0, debounce_1.debounce)(() => {\n this._vtk_renwin.delete();\n this._vtk_renwin = null;\n this.invalidate_render();\n }, 20);\n this.connect(this.model.properties.arrays.change, update);\n this.connect(this.model.properties.scene.change, update);\n this.connect(this.model.properties.one_time_reset.change, () => {\n this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();\n });\n }\n init_vtk_renwin() {\n this._vtk_renwin = util_1.vtkns.FullScreenRenderWindowSynchronized.newInstance({\n rootContainer: this.el,\n container: this._vtk_container,\n synchronizerContext: this._synchronizer_context,\n });\n }\n remove() {\n if (this._vtk_renwin) {\n this._vtk_renwin.delete();\n }\n super.remove();\n }\n plot() {\n this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();\n const state = (0, object_1.clone)(this.model.scene);\n this._sync_plot(state, () => this._on_scene_ready()).then(() => {\n this._set_camera_state();\n this._get_camera_state();\n });\n }\n _on_scene_ready() {\n this._renderable = true;\n this._camera_callbacks.push(this._vtk_renwin\n .getRenderer()\n .getActiveCamera()\n .onModified(() => this._vtk_render()));\n if (!this._orientationWidget)\n this._create_orientation_widget();\n if (!this._axes)\n this._set_axes();\n this._vtk_renwin.resize();\n this._vtk_render();\n }\n _sync_plot(state, onSceneReady) {\n // Need to ensure all promises are resolved before calling this function\n this._renderable = false;\n this._unsubscribe_camera_cb();\n this._synchronizer_context.setFetchArrayFunction((hash) => {\n return Promise.resolve(this.model.arrays[hash]);\n });\n const renderer = this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);\n if (renderer && !this._vtk_renwin.getRenderer())\n this._vtk_renwin.getRenderWindow().addRenderer(renderer);\n return this._vtk_renwin\n .getRenderWindow()\n .synchronize(state).then(onSceneReady);\n }\n }\n exports.VTKSynchronizedPlotView = VTKSynchronizedPlotView;\n VTKSynchronizedPlotView.__name__ = \"VTKSynchronizedPlotView\";\n class VTKSynchronizedPlot extends vtklayout_1.AbstractVTKPlot {\n constructor(attrs) {\n super(attrs);\n (0, panel_fullscreen_renwin_sync_1.initialize_fullscreen_render)();\n this.outline = util_1.vtkns.OutlineFilter.newInstance(); //use to display bounding box of a selected actor\n const mapper = util_1.vtkns.Mapper.newInstance();\n mapper.setInputConnection(this.outline.getOutputPort());\n this.outline_actor = util_1.vtkns.Actor.newInstance();\n this.outline_actor.setMapper(mapper);\n }\n getActors(ptr_ref) {\n let actors = this.renderer_el.getRenderer().getActors();\n if (ptr_ref) {\n const context = this.renderer_el.getSynchronizerContext(CONTEXT_NAME);\n actors = actors.filter((actor) => {\n const id_actor = context.getInstanceId(actor);\n return id_actor ? id_actor.slice(-16) == ptr_ref.slice(1, 17) : false;\n });\n }\n return actors;\n }\n }\n exports.VTKSynchronizedPlot = VTKSynchronizedPlot;\n _a = VTKSynchronizedPlot;\n VTKSynchronizedPlot.__name__ = \"VTKSynchronizedPlot\";\n VTKSynchronizedPlot.__module__ = \"panel.models.vtk\";\n (() => {\n _a.prototype.default_view = VTKSynchronizedPlotView;\n _a.define(({ Any, Array, Boolean, Bytes, Dict, String }) => ({\n arrays: [Dict(Bytes), {}],\n arrays_processed: [Array(String), []],\n enable_keybindings: [Boolean, false],\n one_time_reset: [Boolean, false],\n rebuild: [Boolean, false],\n scene: [Any, {}],\n }));\n _a.override({\n height: 300,\n width: 300,\n });\n })();\n}\n","/* models/vtk/panel_fullscreen_renwin_sync.js */ function _(require, module, exports, __esModule, __esExport) {\n __esModule();\n const util_1 = require(\"a76a9b7c23\") /* ./util */;\n //------------------------//\n //Custom Extended Classes\n //------------------------//\n const DEFAULT_VALUES = {\n containerStyle: null,\n controlPanelStyle: null,\n listenWindowResize: true,\n resizeCallback: null,\n controllerVisibility: true,\n synchronizerContextName: \"default\",\n };\n const STYLE_CONTROL_PANEL = {\n position: \"absolute\",\n left: \"25px\",\n top: \"25px\",\n backgroundColor: \"white\",\n borderRadius: \"5px\",\n listStyle: \"none\",\n padding: \"5px 10px\",\n margin: \"0\",\n display: \"block\",\n border: \"solid 1px black\",\n maxWidth: \"calc(100vw - 70px)\",\n maxHeight: \"calc(100vh - 60px)\",\n overflow: \"auto\",\n };\n function panelFullScreenRenderWindowSynchronized(publicAPI, model) {\n // Panel (modification) synchronizable renderWindow\n model.renderWindow = util_1.vtkns.SynchronizableRenderWindow.newInstance({\n synchronizerContext: model.synchronizerContext,\n });\n // OpenGlRenderWindow\n model.openGLRenderWindow = util_1.vtkns.OpenGLRenderWindow.newInstance();\n model.openGLRenderWindow.setContainer(model.container);\n model.renderWindow.addView(model.openGLRenderWindow);\n // Interactor\n model.interactor = util_1.vtkns.RenderWindowInteractor.newInstance();\n model.interactor.setInteractorStyle(util_1.vtkns.InteractorStyleTrackballCamera.newInstance());\n model.interactor.setView(model.openGLRenderWindow);\n model.interactor.initialize();\n model.interactor.bindEvents(model.container);\n publicAPI.getRenderer = () => model.renderWindow.getRenderers()[0];\n publicAPI.removeController = () => {\n const el = model.controlContainer;\n if (el) {\n el.parentNode.removeChild(el);\n }\n };\n publicAPI.setControllerVisibility = (visible) => {\n model.controllerVisibility = visible;\n if (model.controlContainer) {\n if (visible) {\n model.controlContainer.style.display = \"block\";\n }\n else {\n model.controlContainer.style.display = \"none\";\n }\n }\n };\n publicAPI.toggleControllerVisibility = () => {\n publicAPI.setControllerVisibility(!model.controllerVisibility);\n };\n publicAPI.addController = (html) => {\n model.controlContainer = document.createElement(\"div\");\n (0, util_1.applyStyle)(model.controlContainer, model.controlPanelStyle || STYLE_CONTROL_PANEL);\n model.rootContainer.appendChild(model.controlContainer);\n model.controlContainer.innerHTML = html;\n publicAPI.setControllerVisibility(model.controllerVisibility);\n model.rootContainer.addEventListener(\"keypress\", (e) => {\n if (String.fromCharCode(e.charCode) === \"c\") {\n publicAPI.toggleControllerVisibility();\n }\n });\n };\n // Properly release GL context\n publicAPI.delete = window.vtk.macro.chain(publicAPI.setContainer, model.openGLRenderWindow.delete, publicAPI.delete);\n // Handle window resize\n publicAPI.resize = () => {\n const dims = model.container.getBoundingClientRect();\n const devicePixelRatio = window.devicePixelRatio || 1;\n model.openGLRenderWindow.setSize(Math.floor(dims.width * devicePixelRatio), Math.floor(dims.height * devicePixelRatio));\n if (model.resizeCallback) {\n model.resizeCallback(dims);\n }\n model.renderWindow.render();\n };\n publicAPI.setResizeCallback = (cb) => {\n model.resizeCallback = cb;\n publicAPI.resize();\n };\n if (model.listenWindowResize) {\n window.addEventListener(\"resize\", publicAPI.resize);\n }\n publicAPI.resize();\n }\n function initialize_fullscreen_render() {\n let FullScreenRenderWindowSynchronized = {\n newInstance: window.vtk.macro.newInstance((publicAPI, model, initialValues = {}) => {\n Object.assign(model, DEFAULT_VALUES, initialValues);\n // Object methods\n window.vtk.macro.obj(publicAPI, model);\n window.vtk.macro.get(publicAPI, model, [\n \"renderWindow\",\n \"openGLRenderWindow\",\n \"interactor\",\n \"rootContainer\",\n \"container\",\n \"controlContainer\",\n \"synchronizerContext\",\n ]);\n // Object specific methods\n panelFullScreenRenderWindowSynchronized(publicAPI, model);\n }),\n };\n util_1.vtkns.FullScreenRenderWindowSynchronized = FullScreenRenderWindowSynchronized;\n }\n exports.initialize_fullscreen_render = initialize_fullscreen_render;\n}\n"]}
|