@holoviz/panel 1.2.2-a.2 → 1.2.2-a.4

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.
Files changed (39) hide show
  1. package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js +1 -1
  2. package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js.map +1 -1
  3. package/dist/bundled/notificationarea/panel/1.2.2-a.4/dist/bundled/font-awesome/css/all.min.css +2 -0
  4. package/dist/bundled/panel/1.2.2-a.4/dist/bundled/bootstrap5/css/bootstrap.min.css +2 -0
  5. package/dist/bundled/panel/1.2.2-a.4/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +2 -0
  6. package/dist/bundled/panel/1.2.2-a.4/dist/bundled/font-awesome/css/all.min.css +2 -0
  7. package/dist/bundled/panel/1.2.2-a.4/dist/bundled/jquery/jquery.slim.min.js +2 -0
  8. package/dist/bundled/plotlyplot/panel/1.2.2-a.4/dist/bundled/jquery/jquery.slim.min.js +2 -0
  9. package/dist/css/button.css +7 -0
  10. package/dist/lib/models/column.d.ts +3 -0
  11. package/dist/lib/models/column.js +15 -12
  12. package/dist/lib/models/column.js.map +1 -1
  13. package/dist/lib/models/data.js +4 -0
  14. package/dist/lib/models/data.js.map +1 -1
  15. package/dist/lib/models/echarts.d.ts +1 -0
  16. package/dist/lib/models/echarts.js +2 -1
  17. package/dist/lib/models/echarts.js.map +1 -1
  18. package/dist/lib/models/perspective.d.ts +9 -0
  19. package/dist/lib/models/perspective.js +48 -5
  20. package/dist/lib/models/perspective.js.map +1 -1
  21. package/dist/lib/models/reactive_html.d.ts +0 -2
  22. package/dist/lib/models/reactive_html.js +3 -12
  23. package/dist/lib/models/reactive_html.js.map +1 -1
  24. package/dist/lib/models/tabulator.d.ts +1 -1
  25. package/dist/lib/models/tabulator.js +21 -12
  26. package/dist/lib/models/tabulator.js.map +1 -1
  27. package/dist/lib/styles/button.css.js +1 -1
  28. package/dist/panel.js +111 -59
  29. package/dist/panel.js.map +1 -1
  30. package/dist/panel.json +1 -1
  31. package/dist/panel.min.js +10 -10
  32. package/dist/wheels/{panel-1.2.2a2-py3-none-any.whl → panel-1.2.2a4-py3-none-any.whl} +0 -0
  33. package/package.json +1 -1
  34. package/dist/bundled/notificationarea/panel/1.2.2-a.2/dist/bundled/font-awesome/css/all.min.css +0 -2
  35. package/dist/bundled/panel/1.2.2-a.2/dist/bundled/bootstrap5/css/bootstrap.min.css +0 -2
  36. package/dist/bundled/panel/1.2.2-a.2/dist/bundled/bootstrap5/js/bootstrap.bundle.min.js +0 -2
  37. package/dist/bundled/panel/1.2.2-a.2/dist/bundled/font-awesome/css/all.min.css +0 -2
  38. package/dist/bundled/panel/1.2.2-a.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
  39. package/dist/bundled/plotlyplot/panel/1.2.2-a.2/dist/bundled/jquery/jquery.slim.min.js +0 -2
package/dist/panel.min.js CHANGED
@@ -42,18 +42,18 @@
42
42
  })
43
43
  ({
44
44
  "4e90918c0a": function _(e,s,t,a,b){a();const o=e("tslib").__importStar(e("6e19b31aba"));t.Panel=o;(0,e("@bokehjs/base").register_models)(o)},
45
- "6e19b31aba": function _(e,a,t,c,o){c();const l=e("tslib");o("AcePlot",e("7df2008a2e").AcePlot),o("Audio",e("78153b60aa").Audio),o("BrowserInfo",e("6df8bf1ac7").BrowserInfo),o("Card",e("c1e57c7e7d").Card),o("Column",e("067b508b04").Column),o("CommManager",e("1e66dab844").CommManager),o("CustomSelect",e("9c8629b48f").CustomSelect),o("DataTabulator",e("fc45b724c1").DataTabulator),o("DatetimePicker",e("6658732ce1").DatetimePicker),o("DeckGLPlot",e("991e3a226c").DeckGLPlot),o("ECharts",e("eded13f5d7").ECharts),o("HTML",e("6b3b0facc2").HTML),o("IPyWidget",e("e3556c1e99").IPyWidget),o("JSON",e("66846b828c").JSON),o("JSONEditor",e("4b8a56c700").JSONEditor),o("FileDownload",e("9c15016be8").FileDownload),o("KaTeX",e("197cfa57e5").KaTeX),o("Location",e("00a25cf872").Location),o("MathJax",e("46a1770629").MathJax),o("PDF",e("d49a559fbc").PDF),o("Perspective",e("9f0456e5b5").Perspective),o("Player",e("c172556ad3").Player),o("PlotlyPlot",e("bb3d0ded66").PlotlyPlot),o("Progress",e("b82925a928").Progress),o("QuillInput",e("e115225ba2").QuillInput),o("ReactiveHTML",e("b969c294f5").ReactiveHTML),o("SingleSelect",e("6b20024bba").SingleSelect),o("SpeechToText",e("cd0c80cc4c").SpeechToText),o("State",e("66717cb841").State),o("Tabs",e("67a5649f75").Tabs),o("Terminal",e("cd4a941f8d").Terminal),o("TextToSpeech",e("eb4ae0acfa").TextToSpeech),o("TooltipIcon",e("26ffc3afe8").TooltipIcon),o("TrendIndicator",e("8f4ab32d74").TrendIndicator),o("VegaPlot",e("3b23e1bc5c").VegaPlot),o("Video",e("4ac59b8079").Video),o("VideoStream",e("797fd61298").VideoStream),o("VizzuChart",e("e8339ee57a").VizzuChart),l.__exportStar(e("c51f25e2a7"),t)},
45
+ "6e19b31aba": function _(e,a,t,c,o){c();const l=e("tslib");o("AcePlot",e("7df2008a2e").AcePlot),o("Audio",e("78153b60aa").Audio),o("BrowserInfo",e("6df8bf1ac7").BrowserInfo),o("Card",e("c1e57c7e7d").Card),o("Column",e("13afd4a31a").Column),o("CommManager",e("1e66dab844").CommManager),o("CustomSelect",e("9c8629b48f").CustomSelect),o("DataTabulator",e("b2950aa706").DataTabulator),o("DatetimePicker",e("6658732ce1").DatetimePicker),o("DeckGLPlot",e("991e3a226c").DeckGLPlot),o("ECharts",e("54ac9fb4a9").ECharts),o("HTML",e("6b3b0facc2").HTML),o("IPyWidget",e("e3556c1e99").IPyWidget),o("JSON",e("66846b828c").JSON),o("JSONEditor",e("4b8a56c700").JSONEditor),o("FileDownload",e("9c15016be8").FileDownload),o("KaTeX",e("197cfa57e5").KaTeX),o("Location",e("00a25cf872").Location),o("MathJax",e("46a1770629").MathJax),o("PDF",e("d49a559fbc").PDF),o("Perspective",e("d39fde6463").Perspective),o("Player",e("c172556ad3").Player),o("PlotlyPlot",e("bb3d0ded66").PlotlyPlot),o("Progress",e("b82925a928").Progress),o("QuillInput",e("e115225ba2").QuillInput),o("ReactiveHTML",e("8b89b5165f").ReactiveHTML),o("SingleSelect",e("6b20024bba").SingleSelect),o("SpeechToText",e("cd0c80cc4c").SpeechToText),o("State",e("66717cb841").State),o("Tabs",e("67a5649f75").Tabs),o("Terminal",e("cd4a941f8d").Terminal),o("TextToSpeech",e("eb4ae0acfa").TextToSpeech),o("TooltipIcon",e("26ffc3afe8").TooltipIcon),o("TrendIndicator",e("8f4ab32d74").TrendIndicator),o("VegaPlot",e("3b23e1bc5c").VegaPlot),o("Video",e("4ac59b8079").Video),o("VideoStream",e("797fd61298").VideoStream),o("VizzuChart",e("e8339ee57a").VizzuChart),l.__exportStar(e("c51f25e2a7"),t)},
46
46
  "7df2008a2e": function _(e,t,i,o,n){var s;o();const a=e("@bokehjs/core/dom"),d=e("ea218d1c3c");class h extends d.HTMLBoxView{initialize(){super.initialize(),this._container=(0,a.div)({id:"_"+Math.random().toString(36).substr(2,9),style:{width:"100%",height:"100%",zIndex:0}})}connect_signals(){super.connect_signals(),this.connect(this.model.properties.code.change,(()=>this._update_code_from_model())),this.connect(this.model.properties.theme.change,(()=>this._update_theme())),this.connect(this.model.properties.language.change,(()=>this._update_language())),this.connect(this.model.properties.filename.change,(()=>this._update_filename())),this.connect(this.model.properties.print_margin.change,(()=>this._update_print_margin())),this.connect(this.model.properties.annotations.change,(()=>this._add_annotations())),this.connect(this.model.properties.readonly.change,(()=>{this._editor.setReadOnly(this.model.readonly)}))}render(){super.render(),this._container!==this.shadow_el.childNodes[0]&&this.shadow_el.append(this._container),this._container.textContent=this.model.code,this._editor=window.ace.edit(this._container),this._editor.renderer.attachToShadowRoot(),this._langTools=window.ace.require("ace/ext/language_tools"),this._modelist=window.ace.require("ace/ext/modelist"),this._editor.setOptions({enableBasicAutocompletion:!0,enableSnippets:!0,fontFamily:"monospace"}),this._update_theme(),this._update_filename(),this._update_language(),this._editor.setReadOnly(this.model.readonly),this._editor.setShowPrintMargin(this.model.print_margin),this._editor.on("change",(()=>this._update_code_from_editor()))}_update_code_from_model(){this._editor&&this._editor.getValue()!=this.model.code&&this._editor.setValue(this.model.code)}_update_print_margin(){this._editor.setShowPrintMargin(this.model.print_margin)}_update_code_from_editor(){this._editor.getValue()!=this.model.code&&(this.model.code=this._editor.getValue())}_update_theme(){this._editor.setTheme(`ace/theme/${this.model.theme}`)}_update_filename(){if(this.model.filename){const e=this._modelist.getModeForPath(this.model.filename).mode;this.model.language=e.slice(9)}}_update_language(){null!=this.model.language&&this._editor.session.setMode(`ace/mode/${this.model.language}`)}_add_annotations(){this._editor.session.setAnnotations(this.model.annotations)}after_layout(){super.after_layout(),this._editor.resize()}}i.AcePlotView=h,h.__name__="AcePlotView";class r extends d.HTMLBox{constructor(e){super(e)}}i.AcePlot=r,s=r,r.__name__="AcePlot",r.__module__="panel.models.ace",s.prototype.default_view=h,s.define((({Any:e,Array:t,Boolean:i,String:o,Nullable:n})=>({code:[o,""],filename:[n(o),null],language:[o,""],theme:[o,"chrome"],annotations:[t(e),[]],readonly:[i,!1],print_margin:[i,!1]}))),s.override({height:300,width:300})},
47
47
  "ea218d1c3c": function _(e,t,i,s,h){s();const l=e("@bokehjs/core/dom"),a=e("@bokehjs/core/util/types"),n=e("@bokehjs/models/widgets/widget"),d=e("@bokehjs/models/layouts/layout_dom");class r extends n.WidgetView{async lazy_initialize(){await super.lazy_initialize(),"not_started"!=this.provider.status&&"loading"!=this.provider.status||this.provider.ready.connect((()=>{this.contains_tex_string(this.model.text)&&this.render()}))}watch_stylesheets(){this._initialized_stylesheets={};for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets[t.href]=!1,t.addEventListener("load",(()=>{this._initialized_stylesheets[t.href]=!0,Object.values(this._initialized_stylesheets).every(Boolean)&&this.style_redraw()})))}}style_redraw(){}has_math_disabled(){return this.model.disable_math||!this.contains_tex_string(this.model.text)}render(){super.render(),_(this.el,this.model),this.container=(0,l.div)(),_(this.container,this.model,!1),this.shadow_el.appendChild(this.container),"failed"!=this.provider.status&&"loaded"!=this.provider.status||(this._has_finished=!0)}}function _(e,t,i=!0){let s=null!=t.width?"fixed":"fit",h=null!=t.height?"fixed":"fit";const{sizing_mode:l,margin:n}=t;if(null!=l)if("fixed"==l)s=h="fixed";else if("stretch_both"==l)s=h="max";else if("stretch_width"==l)s="max";else if("stretch_height"==l)h="max";else switch(l){case"scale_width":s="max",h="min";break;case"scale_height":s="min",h="max";break;case"scale_both":s="max",h="max";break;default:throw new Error("unreachable")}let d,r;i?(0,a.isArray)(n)?4===n.length?(r=n[0]+n[2],d=n[1]+n[3]):(r=2*n[0],d=2*n[1]):null==n?r=d=0:d=r=2*n:r=d=0,"fixed"==s&&t.width?e.style.width=t.width+"px":"max"==s&&(e.style.width=d?`calc(100% - ${d}px)`:"100%"),null!=t.min_width&&(e.style.minWidth=t.min_width+"px"),null!=t.max_width&&(e.style.maxWidth=t.max_width+"px"),"fixed"==h&&t.height?e.style.height=t.height+"px":"max"==h&&(e.style.height=r?`calc(100% - ${r}px)`:"100%"),null!=t.min_height&&(e.style.minHeight=t.min_height+"px"),null!=t.max_width&&(e.style.maxHeight=t.max_height+"px")}i.PanelMarkupView=r,r.__name__="PanelMarkupView",i.set_size=_;class o extends d.LayoutDOMView{render(){super.render(),_(this.el,this.model)}watch_stylesheets(){this._initialized_stylesheets={};for(const e of this._applied_stylesheets){const t=e.el;t instanceof HTMLLinkElement&&(this._initialized_stylesheets[t.href]=!1,t.addEventListener("load",(()=>{this._initialized_stylesheets[t.href]=!0,Object.values(this._initialized_stylesheets).every(Boolean)&&this.style_redraw()})))}}style_redraw(){}get child_models(){return[]}}i.HTMLBoxView=o,o.__name__="HTMLBoxView";class c extends d.LayoutDOM{constructor(e){super(e)}}i.HTMLBox=c,c.__name__="HTMLBox"},
48
48
  "78153b60aa": function _(e,t,i,o,s){var l;o();const d=e("ea218d1c3c");class u extends d.HTMLBoxView{initialize(){super.initialize(),this._blocked=!1,this._setting=!1,this._time=Date.now()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.loop.change,(()=>this.set_loop())),this.connect(this.model.properties.paused.change,(()=>this.set_paused())),this.connect(this.model.properties.time.change,(()=>this.set_time())),this.connect(this.model.properties.value.change,(()=>this.set_value())),this.connect(this.model.properties.volume.change,(()=>this.set_volume())),this.connect(this.model.properties.muted.change,(()=>this.set_muted())),this.connect(this.model.properties.autoplay.change,(()=>this.set_autoplay()))}render(){super.render(),this.audioEl=document.createElement("audio"),this.audioEl.controls=!0,this.audioEl.src=this.model.value,this.audioEl.currentTime=this.model.time,this.audioEl.loop=this.model.loop,this.audioEl.muted=this.model.muted,this.audioEl.autoplay=this.model.autoplay,null!=this.model.volume?this.audioEl.volume=this.model.volume/100:this.model.volume=100*this.audioEl.volume,this.audioEl.onpause=()=>this.model.paused=!0,this.audioEl.onplay=()=>this.model.paused=!1,this.audioEl.ontimeupdate=()=>this.update_time(this),this.audioEl.onvolumechange=()=>this.update_volume(this),this.shadow_el.appendChild(this.audioEl),this.model.paused||this.audioEl.play()}update_time(e){e._setting?e._setting=!1:Date.now()-e._time<e.model.throttle||(e._blocked=!0,e.model.time=e.audioEl.currentTime,e._time=Date.now())}update_volume(e){e._setting?e._setting=!1:(e._blocked=!0,e.model.volume=100*e.audioEl.volume)}set_loop(){this.audioEl.loop=this.model.loop}set_muted(){this.audioEl.muted=this.model.muted}set_autoplay(){this.audioEl.autoplay=this.model.autoplay}set_paused(){!this.audioEl.paused&&this.model.paused&&this.audioEl.pause(),this.audioEl.paused&&!this.model.paused&&this.audioEl.play()}set_volume(){this._blocked?this._blocked=!1:(this._setting=!0,null!=this.model.volume&&(this.audioEl.volume=this.model.volume/100))}set_time(){this._blocked?this._blocked=!1:(this._setting=!0,this.audioEl.currentTime=this.model.time)}set_value(){this.audioEl.src=this.model.value}}i.AudioView=u,u.__name__="AudioView";class a extends d.HTMLBox{constructor(e){super(e)}}i.Audio=a,l=a,a.__name__="Audio",a.__module__="panel.models.widgets",l.prototype.default_view=u,l.define((({Any:e,Boolean:t,Number:i,Nullable:o})=>({loop:[t,!1],paused:[t,!0],muted:[t,!1],autoplay:[t,!1],time:[i,0],throttle:[i,250],value:[e,""],volume:[o(i),null]})))},
49
49
  "6df8bf1ac7": function _(e,i,o,n,l){var t;n();const a=e("@bokehjs/core/view"),r=e("@bokehjs/model");class s extends a.View{initialize(){super.initialize(),null!=window.matchMedia&&(this.model.dark_mode=window.matchMedia("(prefers-color-scheme: dark)").matches),this.model.device_pixel_ratio=window.devicePixelRatio,null!=navigator&&(this.model.language=navigator.language,this.model.webdriver=navigator.webdriver),this.model.timezone=Intl.DateTimeFormat().resolvedOptions().timeZone,this.model.timezone_offset=(new Date).getTimezoneOffset(),this._has_finished=!0,this.notify_finished()}}o.BrowserInfoView=s,s.__name__="BrowserInfoView";class d extends r.Model{constructor(e){super(e)}}o.BrowserInfo=d,t=d,d.__name__="BrowserInfo",d.__module__="panel.models.browser",t.prototype.default_view=s,t.define((({Boolean:e,Nullable:i,Number:o,String:n})=>({dark_mode:[i(e),null],device_pixel_ratio:[i(o),null],language:[i(n),null],timezone:[i(n),null],timezone_offset:[i(o),null],webdriver:[i(e),null]})))},
50
- "c1e57c7e7d": function _(e,l,s,t,a){t();const d=e("tslib");var o;const i=e("067b508b04"),h=d.__importStar(e("@bokehjs/core/dom"));class n extends i.ColumnView{connect_signals(){super.connect_signals();const{active_header_background:e,children:l,collapsed:s,header_background:t,header_color:a,hide_header:d}=this.model.properties;this.on_change(l,(()=>this.render())),this.on_change(s,(()=>this._collapse())),this.on_change([a,d],(()=>this.render())),this.on_change([e,s,t],(()=>{const e=this.header_background;null!=e&&(this.child_views[0].el.style.backgroundColor=e,this.header_el.style.backgroundColor=e)}))}get header_background(){let e=this.model.header_background;return!this.model.collapsed&&this.model.active_header_background&&(e=this.model.active_header_background),e}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.class_list.add(...this.css_classes());const{button_css_classes:e,header_color:l,header_tag:s,header_css_classes:t}=this.model,a=this.header_background,d=this.child_views[0];let o;if(this.model.collapsible){this.button_el=h.createElement("button",{type:"button",class:t});const l=h.createElement("div",{class:e});l.innerHTML=this.model.collapsed?"\u25ba":"\u25bc",this.button_el.appendChild(l),this.button_el.style.backgroundColor=null!=a?a:"",d.el.style.backgroundColor=null!=a?a:"",this.button_el.appendChild(d.el),this.button_el.onclick=()=>this._toggle_button(),o=this.button_el}else o=h.createElement(s,{class:t}),o.style.backgroundColor=null!=a?a:"",o.appendChild(d.el);this.header_el=o,this.model.hide_header||(o.style.color=null!=l?l:"",this.shadow_el.appendChild(o),d.render(),d.after_render());for(const e of this.child_views.slice(1))this.model.collapsed||this.shadow_el.appendChild(e.el),e.render(),e.after_render()}async update_children(){await this.build_child_views(),this.render(),this.invalidate_layout()}_toggle_button(){this.model.collapsed=!this.model.collapsed}_collapse(){for(const e of this.child_views.slice(1))this.model.collapsed?(this.shadow_el.removeChild(e.el),e.model.visible=!1):(this.shadow_el.appendChild(e.el),e.model.visible=!0);this.button_el.children[0].innerHTML=this.model.collapsed?"\u25ba":"\u25bc",this.invalidate_layout()}_createElement(){return h.createElement(this.model.tag,{class:this.css_classes()})}}s.CardView=n,n.__name__="CardView";class r extends i.Column{constructor(e){super(e)}}s.Card=r,o=r,r.__name__="Card",r.__module__="panel.models.layout",o.prototype.default_view=n,o.define((({Array:e,Boolean:l,Nullable:s,String:t})=>({active_header_background:[s(t),null],button_css_classes:[e(t),[]],collapsed:[l,!0],collapsible:[l,!0],header_background:[s(t),null],header_color:[s(t),null],header_css_classes:[e(t),[]],header_tag:[t,"div"],hide_header:[l,!1],tag:[t,"div"]})))},
51
- "067b508b04": function _(t,s,l,e,o){e();const _=t("tslib");var i;const n=t("@bokehjs/models/layouts/column"),r=_.__importStar(t("@bokehjs/core/dom"));class c extends n.ColumnView{connect_signals(){super.connect_signals();const{children:t,scroll_button_threshold:s}=this.model.properties;this.on_change(t,(()=>this.trigger_auto_scroll())),this.on_change(s,(()=>this.toggle_scroll_button()))}get distance_from_latest(){return this.el.scrollHeight-this.el.scrollTop-this.el.clientHeight}scroll_to_latest(){requestAnimationFrame((()=>{this.el.scrollTop=this.el.scrollHeight}))}trigger_auto_scroll(){const t=this.model.auto_scroll_limit,s=this.distance_from_latest<=t;0!=t&&s&&this.scroll_to_latest()}toggle_scroll_button(){const t=this.model.scroll_button_threshold,s=this.distance_from_latest>=t;this.scroll_down_button_el&&this.scroll_down_button_el.classList.toggle("visible",0!==t&&s)}render(){super.render(),this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.class_list.add(...this.css_classes()),this.scroll_down_button_el=r.createElement("div",{class:"scroll-button"}),this.shadow_el.appendChild(this.scroll_down_button_el),this.el.addEventListener("scroll",(()=>{this.toggle_scroll_button()})),this.scroll_down_button_el.addEventListener("click",(()=>{this.scroll_to_latest()}));for(const t of this.child_views)this.shadow_el.appendChild(t.el),t.render(),t.after_render()}after_render(){super.after_render(),requestAnimationFrame((()=>{this.model.view_latest&&this.scroll_to_latest(),this.toggle_scroll_button()}))}}l.ColumnView=c,c.__name__="ColumnView";class h extends n.Column{constructor(t){super(t)}}l.Column=h,i=h,h.__name__="Column",h.__module__="panel.models.layout",i.prototype.default_view=c,i.define((({Int:t,Boolean:s})=>({auto_scroll_limit:[t,0],scroll_button_threshold:[t,0],view_latest:[s,!1]})))},
50
+ "c1e57c7e7d": function _(e,l,s,t,a){t();const d=e("tslib");var o;const i=e("13afd4a31a"),h=d.__importStar(e("@bokehjs/core/dom"));class n extends i.ColumnView{connect_signals(){super.connect_signals();const{active_header_background:e,children:l,collapsed:s,header_background:t,header_color:a,hide_header:d}=this.model.properties;this.on_change(l,(()=>this.render())),this.on_change(s,(()=>this._collapse())),this.on_change([a,d],(()=>this.render())),this.on_change([e,s,t],(()=>{const e=this.header_background;null!=e&&(this.child_views[0].el.style.backgroundColor=e,this.header_el.style.backgroundColor=e)}))}get header_background(){let e=this.model.header_background;return!this.model.collapsed&&this.model.active_header_background&&(e=this.model.active_header_background),e}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.class_list.add(...this.css_classes());const{button_css_classes:e,header_color:l,header_tag:s,header_css_classes:t}=this.model,a=this.header_background,d=this.child_views[0];let o;if(this.model.collapsible){this.button_el=h.createElement("button",{type:"button",class:t});const l=h.createElement("div",{class:e});l.innerHTML=this.model.collapsed?"\u25ba":"\u25bc",this.button_el.appendChild(l),this.button_el.style.backgroundColor=null!=a?a:"",d.el.style.backgroundColor=null!=a?a:"",this.button_el.appendChild(d.el),this.button_el.onclick=()=>this._toggle_button(),o=this.button_el}else o=h.createElement(s,{class:t}),o.style.backgroundColor=null!=a?a:"",o.appendChild(d.el);this.header_el=o,this.model.hide_header||(o.style.color=null!=l?l:"",this.shadow_el.appendChild(o),d.render(),d.after_render());for(const e of this.child_views.slice(1))this.model.collapsed||this.shadow_el.appendChild(e.el),e.render(),e.after_render()}async update_children(){await this.build_child_views(),this.render(),this.invalidate_layout()}_toggle_button(){this.model.collapsed=!this.model.collapsed}_collapse(){for(const e of this.child_views.slice(1))this.model.collapsed?(this.shadow_el.removeChild(e.el),e.model.visible=!1):(this.shadow_el.appendChild(e.el),e.model.visible=!0);this.button_el.children[0].innerHTML=this.model.collapsed?"\u25ba":"\u25bc",this.invalidate_layout()}_createElement(){return h.createElement(this.model.tag,{class:this.css_classes()})}}s.CardView=n,n.__name__="CardView";class r extends i.Column{constructor(e){super(e)}}s.Card=r,o=r,r.__name__="Card",r.__module__="panel.models.layout",o.prototype.default_view=n,o.define((({Array:e,Boolean:l,Nullable:s,String:t})=>({active_header_background:[s(t),null],button_css_classes:[e(t),[]],collapsed:[l,!0],collapsible:[l,!0],header_background:[s(t),null],header_color:[s(t),null],header_css_classes:[e(t),[]],header_tag:[t,"div"],hide_header:[l,!1],tag:[t,"div"]})))},
51
+ "13afd4a31a": function _(t,o,l,s,e){s();const i=t("tslib");var _;const r=t("@bokehjs/models/layouts/column"),n=i.__importStar(t("@bokehjs/core/dom"));class c extends r.ColumnView{connect_signals(){super.connect_signals();const{children:t,scroll_position:o,scroll_button_threshold:l}=this.model.properties;this.on_change(t,(()=>this.trigger_auto_scroll())),this.on_change(o,(()=>this.scroll_to_position())),this.on_change(l,(()=>this.toggle_scroll_button()))}get distance_from_latest(){return this.el.scrollHeight-this.el.scrollTop-this.el.clientHeight}scroll_to_position(){requestAnimationFrame((()=>{this.el.scrollTop=this.model.scroll_position}))}scroll_to_latest(){requestAnimationFrame((()=>{this.el.scrollTop=this.el.scrollHeight}))}trigger_auto_scroll(){const t=this.model.auto_scroll_limit,o=this.distance_from_latest<=t;0!=t&&o&&this.scroll_to_latest()}record_scroll_position(){this.model.scroll_position=this.el.scrollTop}toggle_scroll_button(){const t=this.model.scroll_button_threshold,o=this.distance_from_latest>=t;this.scroll_down_button_el&&this.scroll_down_button_el.classList.toggle("visible",0!==t&&o)}render(){super.render(),this.scroll_down_button_el=n.createElement("div",{class:"scroll-button"}),this.shadow_el.appendChild(this.scroll_down_button_el),this.el.addEventListener("scroll",(()=>{this.record_scroll_position(),this.toggle_scroll_button()})),this.scroll_down_button_el.addEventListener("click",(()=>{this.scroll_to_latest()}))}after_render(){super.after_render(),requestAnimationFrame((()=>{this.model.scroll_position&&this.scroll_to_position(),this.model.view_latest&&this.scroll_to_latest(),this.toggle_scroll_button()}))}}l.ColumnView=c,c.__name__="ColumnView";class h extends r.Column{constructor(t){super(t)}}l.Column=h,_=h,h.__name__="Column",h.__module__="panel.models.layout",_.prototype.default_view=c,_.define((({Int:t,Boolean:o})=>({scroll_position:[t,0],auto_scroll_limit:[t,0],scroll_button_threshold:[t,0],view_latest:[o,!1]})))},
52
52
  "1e66dab844": function _(e,t,s,n,i){var o;n();const c=e("@bokehjs/document"),l=e("@bokehjs/core/view"),_=e("@bokehjs/model"),h=e("@bokehjs/protocol/message"),r=e("@bokehjs/protocol/receiver");s.comm_settings={debounce:!0};class a extends l.View{}s.CommManagerView=a,a.__name__="CommManagerView";class d extends _.Model{constructor(e){super(e),this._document_listener=e=>this._document_changed(e)}initialize(){super.initialize(),this._receiver=new r.Receiver,this._event_buffer=[],this._blocked=!1,this._timeout=Date.now(),null!=window.PyViz&&window.PyViz.comm_manager?(this.ns=window.PyViz,this.ns.comm_manager.register_target(this.plot_id,this.comm_id,(e=>{for(const t of this.ns.shared_views.get(this.plot_id))t!==this&&t.msg_handler(e);try{this.msg_handler(e)}catch(e){console.error(e)}})),this._client_comm=this.ns.comm_manager.get_client_comm(this.plot_id,this.client_comm_id,(e=>this.on_ack(e))),null==this.ns.shared_views&&(this.ns.shared_views=new Map),this.ns.shared_views.has(this.plot_id)?this.ns.shared_views.get(this.plot_id).push(this):this.ns.shared_views.set(this.plot_id,[this])):console.log("Could not find comm manager on window.PyViz, ensure the extension is loaded.")}_doc_attached(){super._doc_attached(),null!=this.document&&this.document.on_change(this._document_listener)}_document_changed(e){e instanceof c.ModelChangedEvent&&!e.model.properties[e.attr].syncable||(this._event_buffer.push(e),s.comm_settings.debounce?(!this._blocked||Date.now()>this._timeout)&&(setTimeout((()=>this.process_events()),this.debounce),this._blocked=!0,this._timeout=Date.now()+this.timeout):this.process_events())}_extract_buffers(e,t){let s;if(e instanceof Array){s=[];for(const n of e)s.push(this._extract_buffers(n,t))}else if(e instanceof Object){s={};for(const n in e){if("buffer"===n&&e[n]instanceof ArrayBuffer){s={id:Object.keys(t).length},t.push(e[n]);break}s[n]=this._extract_buffers(e[n],t)}}else s=e;return s}process_events(){if(null==this.document||null==this._client_comm)return;const e=this.document.create_json_patch(this._event_buffer);this._event_buffer=[];const t=Object.assign({},h.Message.create("PATCH-DOC",{},e)),s=[];t.content=this._extract_buffers(t.content,s),this._client_comm.send(t,{},s);for(const t of this.ns.shared_views.get(this.plot_id))t!==this&&null!=t.document&&t.document.apply_json_patch(e,[],this.id)}disconnect_signals(){super.disconnect_signals(),this.ns.shared_views.shared_views.delete(this.plot_id)}on_ack(e){const t=e.metadata;this._event_buffer.length?(this._blocked=!0,this._timeout=Date.now()+this.timeout,this.process_events()):this._blocked=!1,"Ready"==t.msg_type&&t.content?console.log("Python callback returned following output:",t.content):"Error"==t.msg_type&&console.log("Python failed with the following traceback:",t.traceback)}msg_handler(e){const t=e.metadata,s=e.buffers,n=e.content.data,i=this.plot_id;if("Ready"==t.msg_type)t.content?console.log("Python callback returned following output:",t.content):"Error"==t.msg_type&&console.log("Python failed with the following traceback:",t.traceback);else if(null!=i){let e=null;if(i in this.ns.plot_index&&null!=this.ns.plot_index[i]?e=this.ns.plot_index[i]:void 0!==window.Bokeh&&i in window.Bokeh.index&&(e=window.Bokeh.index[i]),null==e)return;if(n.length)this._receiver.consume(n);else{if(!(null!=s&&s.length>0))return;this._receiver.consume(s[0].buffer)}const t=this._receiver.message;if(null!=t&&Object.keys(t.content).length>0&&null!=this.document){const e=t.content;this.document.apply_json_patch(e,t.buffers)}}}}s.CommManager=d,o=d,d.__name__="CommManager",d.__module__="panel.models.comm_manager",o.prototype.default_view=a,o.define((({Int:e,String:t,Nullable:s})=>({plot_id:[s(t),null],comm_id:[s(t),null],client_comm_id:[s(t),null],timeout:[e,5e3],debounce:[e,50]})))},
53
53
  "9c8629b48f": function _(e,t,s,o,i){var l;o();const d=e("@bokehjs/models/widgets/selectbox");class n extends d.SelectView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.disabled_options.change,(()=>this._update_disabled_options()))}options_el(){let e=super.options_el();return e.forEach((e=>{this.model.disabled_options.includes(e.value)&&e.setAttribute("disabled","true")})),e}_update_disabled_options(){for(const e of this.input_el.options)this.model.disabled_options.includes(e.value)?e.setAttribute("disabled","true"):e.removeAttribute("disabled")}}s.CustomSelectView=n,n.__name__="CustomSelectView";class _ extends d.Select{constructor(e){super(e)}}s.CustomSelect=_,l=_,_.__name__="CustomSelect",_.__module__="panel.models.widgets",l.prototype.default_view=n,l.define((({Array:e,String:t})=>({disabled_options:[e(t),[]]})))},
54
- "fc45b724c1": function _(t,e,i,s,o){var l,n,a;s();const r=t("@bokehjs/core/dom"),d=t("@bokehjs/core/util/types"),c=t("@bokehjs/core/bokeh_events"),h=t("@bokehjs/core/dom"),u=t("@bokehjs/core/kinds"),m=t("@bokehjs/models/sources/column_data_source"),g=t("@bokehjs/models/widgets/tables"),_=t("99a25e6992"),f=t("1e66dab844"),p=t("fd9108e30e"),b=t("ea218d1c3c");class w extends c.ModelEvent{constructor(t,e,i){super(),this.column=t,this.row=e,this.pre=i}get event_values(){return{model:this.origin,column:this.column,row:this.row,pre:this.pre}}}i.TableEditEvent=w,l=w,w.__name__="TableEditEvent",l.prototype.event_name="table-edit";class y extends c.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e}get event_values(){return{model:this.origin,column:this.column,row:this.row}}}function x(t,e,i){for(const s of i)if(s[t]==e)return s;return null}function v(t,e,i,s=0){const o={};if(0==t.length)return o;const l=i[s];for(const n of t){const t=v(n._children,e,i,s+1);for(const e in t)(0,d.isArray)(t[e])?n[e]=t[e].reduce(((t,e)=>t+e),0)/t[e].length:n[e]=t[e];for(const t of e.slice(1)){const e=n[t.field];if(t.field in o){const i=o[t.field];"min"===l?o[t.field]=Math.min(e,i):"max"===l?o[t.field]=Math.max(e,i):"sum"===l?o[t.field]=e+i:"mean"===l&&((0,d.isArray)(o[t.field])?o[t.field].push(e):o[t.field]=[i,e])}else o[t.field]=e}}return o}function C(t,e,i,s){const o=[],l=e[0].field;for(const s of t){const t=s[i[0]];let n=x(l,t,o);null==n&&(n={_children:[]},n[l]=t,o.push(n));let a=n;const r={};for(const t of i.slice(1)){a=x(l,s[t],a._children),null==a&&(a={_children:[]},a[l]=s[t],n._children.push(a)),r[t]=n;for(const t of e.slice(1))a[t.field]=s[t];n=a}for(const t of e.slice(1))a[t.field]=s[t.field]}const n=[];for(const t of i)n.push(t in s?s[t]:"sum");return v(o,e,n),o}i.CellClickEvent=y,n=y,y.__name__="CellClickEvent",n.prototype.event_name="cell-click";const S=function(t,e,i,s,o,l,n){let a;a=0;const r={zone:new window.luxon.IANAZone("UTC")};if(t="-9223372036854776"==String(t)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(t,r),e="-9223372036854776"==String(e)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(e,r),t.isValid){if(e.isValid)return t-e;a=1}else a=e.isValid?-1:0;return a*=-1,a},M=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","date"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(function(t){13==t.keyCode&&r(),27==t.keyCode&&s()})),a},T=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd'T'T");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd'T'T",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","datetime-local"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(function(t){13==t.keyCode&&r(),27==t.keyCode&&s()})),a};class z extends b.HTMLBoxView{constructor(){super(...arguments),this.columns=new Map,this._tabulator_cell_updating=!1,this._updating_page=!1,this._updating_sort=!1,this._selection_updating=!1,this._lastVerticalScrollbarTopPosition=0,this._applied_styles=!1,this._building=!1}connect_signals(){super.connect_signals();const t=this.model.properties,{configuration:e,layout:i,columns:s,groupby:o}=t;this.on_change([e,i,o],(0,_.debounce)((()=>this.invalidate_render()),20,!1)),this.on_change([s],(()=>{this.tabulator.setColumns(this.getColumns()),this.setHidden()})),this.connect(t.download.change,(()=>{const t=this.model.filename.endsWith(".json")?"json":"csv";this.tabulator.download(t,this.model.filename)})),this.connect(t.children.change,(()=>this.renderChildren())),this.connect(t.expanded.change,(()=>{for(const t of this.tabulator.rowManager.getRows())t.cells.length>0&&t.cells[0].layoutElement();for(const t of this.tabulator.rowManager.getRows())if(t.cells.length>0){const e=t.data._index,i=this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc";t.cells[1].element.innerText=i}})),this.connect(t.cell_styles.change,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.connect(t.hidden_columns.change,(()=>{this.setHidden(),this.tabulator.redraw(!0)})),this.connect(t.page_size.change,(()=>this.setPageSize())),this.connect(t.page.change,(()=>{this._updating_page||this.setPage()})),this.connect(t.visible.change,(()=>this.setVisibility())),this.connect(t.max_page.change,(()=>this.setMaxPage())),this.connect(t.frozen_rows.change,(()=>this.setFrozen())),this.connect(t.sorters.change,(()=>this.setSorters())),this.connect(t.theme_classes.change,(()=>this.setCSSClasses(this.tabulator.element))),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>{const t=this.model.source.selected.indices;this.updateOrAddData(),this.tabulator.rowManager.element.scrollTop=this._lastVerticalScrollbarTopPosition,this.model.source.selected.indices=t})),this.connect(this.model.source.selected.change,(()=>this.setSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.setSelection()))}get groupBy(){return!!this.model.groupby.length&&(t=>{const e=[];for(const i of this.model.groupby){const s=i+": "+t[i];e.push(s)}return e.join(", ")})}get sorters(){const t=[];this.model.sorters.length&&t.push({column:"_index",dir:"asc"});for(const e of this.model.sorters.reverse())void 0===e.column&&(e.column=e.field),t.push(e);return t}invalidate_render(){this.tabulator.destroy(),this.tabulator=null,this.render()}redraw(){this._building||(null!=this.tabulator.columnManager.element&&this.tabulator.columnManager.redraw(!0),null!=this.tabulator.rowManager.renderer&&(this.tabulator.rowManager.redraw(!0),this.renderChildren(),this.setStyles()))}after_layout(){super.after_layout(),null!=this.tabulator&&this._initializing&&this.redraw(),this._initializing=!1}setCSSClasses(t){t.className="pnx-tabulator tabulator";for(const e of this.model.theme_classes)t.classList.add(e)}render(){super.render(),this._initializing=!0;const t=(0,h.div)({style:"display: contents;"}),e=(0,h.div)({style:"width: 100%; height: 100%; visibility: hidden;"});this.setCSSClasses(e),t.appendChild(e),this.shadow_el.appendChild(t);let i=this.getConfiguration();this.tabulator=new Tabulator(e,i),this.watch_stylesheets(),this.init_callbacks()}style_redraw(){this.model.visible&&(this.tabulator.element.style.visibility="visible"),this._initializing||this._building||this.redraw()}tableInit(){this._building=!0;this.tabulator.modules.ajax.sendRequest=(t,e,i)=>this.requestPage(e.page,e.sort),this.tabulator.modules.page._parseRemoteData=()=>!1}init_callbacks(){this.tabulator.on("tableBuilding",(()=>this.tableInit())),this.tabulator.on("tableBuilt",(()=>this.tableBuilt())),this.tabulator.on("selectableCheck",(t=>{const e=this.model.selectable_rows;return null==e||e.includes(t._row.data._index)})),this.tabulator.on("tooltips",(t=>t.getColumn().getField()+": "+t.getValue())),this.tabulator.on("scrollVertical",(0,_.debounce)((()=>{this.setStyles()}),50,!1)),this.tabulator.on("rowSelectionChanged",((t,e)=>this.rowSelectionChanged(t,e))),this.tabulator.on("rowClick",((t,e)=>this.rowClicked(t,e))),this.tabulator.on("cellEdited",(t=>this.cellEdited(t))),this.tabulator.on("dataFiltering",(t=>{this.model.filters=t})),this.tabulator.on("dataFiltered",((t,e)=>{this._building||(0===e.length&&this.tabulator.rowManager.renderEmptyScroll(),this.updatePage(this.tabulator.getPage()))})),this.tabulator.on("pageLoaded",(t=>{this.updatePage(t)})),this.tabulator.on("renderComplete",(()=>{this._building||this.postUpdate()})),this.tabulator.on("dataSorting",(t=>{const e=[];for(const i of t)"_index"!==i.field&&e.push({field:i.field,dir:i.dir});"remote"!==this.model.pagination&&(this._updating_sort=!0,this.model.sorters=e,this._updating_sort=!1)}))}tableBuilt(){this._building=!1,this.setSelection(),this.renderChildren(),this.setStyles(),this.model.pagination&&(this.setMaxPage(),this.tabulator.setPage(this.model.page))}requestPage(t,e){return new Promise(((i,s)=>{try{if(null!=t&&null!=e){this._updating_sort=!0;const i=[];for(const t of e)"_index"!==t.field&&i.push({field:t.field,dir:t.dir});this.model.sorters=i,this._updating_sort=!1,this._updating_page=!0;try{this.model.page=t||1}finally{this._updating_page=!1}}i([])}catch(t){s(t)}}))}getLayout(){switch(this.model.layout){case"fit_data":return"fitData";case"fit_data_fill":return"fitDataFill";case"fit_data_stretch":return"fitDataStretch";case"fit_data_table":return"fitDataTable";case"fit_columns":return"fitColumns"}}getConfiguration(){let t="toggle"===this.model.select_mode||NaN,e=Object.assign(Object.assign({},this.model.configuration),{index:"_index",nestedFieldSeparator:!1,movableColumns:!1,selectable:t,columns:this.getColumns(),initialSort:this.sorters,layout:this.getLayout(),pagination:null!=this.model.pagination,paginationMode:this.model.pagination,paginationSize:this.model.page_size,paginationInitialPage:1,groupBy:this.groupBy,rowFormatter:t=>this._render_row(t),frozenRows:t=>!!this.model.frozen_rows.length&&this.model.frozen_rows.includes(t._row.data._index)});"remote"===this.model.pagination&&(e.ajaxURL="http://panel.pyviz.org",e.sortMode="remote");const i=this.model.source;let s;return s=null===i||0===i.columns().length?[]:(0,p.transform_cds_to_records)(i,!0),e.dataTree&&(s=C(s,this.model.columns,this.model.indexes,this.model.aggregators)),Object.assign(Object.assign({},e),{data:s})}get child_models(){var t;const e=[];for(const i of this.model.expanded)(null===(t=this.model.children)||void 0===t?void 0:t.has(i))&&e.push(this.model.children.get(i));return e}renderChildren(){new Promise((async t=>{await this.build_child_views(),t(null)})).then((()=>{for(const t of this.model.expanded){const e=this.tabulator.getRow(t);this._render_row(e,!1)}this._update_children(),null!=this.tabulator.rowManager.renderer&&this.tabulator.rowManager.adjustTableSize(),this.invalidate_layout()}))}_render_row(t,e=!0){var i;const s=null===(i=t._row)||void 0===i?void 0:i.data._index;if(!this.model.expanded.includes(s)||!this.model.children.has(s))return;const o=this.model.children.get(s),l=this._child_views.get(o);if(null==l)return;const n=t.getElement(),a=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,r=n.style.paddingLeft?"-"+n.style.paddingLeft:"0",d=(0,h.div)({style:"background-color: "+a+"; margin-left:"+r+"; max-width: 100%; overflow-x: hidden;"});d.appendChild(l.el),n.appendChild(d),l.render(),l.after_render(),e&&(this._update_children(),this.tabulator.rowManager.adjustTableSize(),this.invalidate_layout())}_expand_render(t){const e=t._cell.row.data._index;return"<i>"+(this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc")+"</i>"}_update_expand(t){const e=t._cell.row.data._index,i=[...this.model.expanded],s=i.indexOf(e);if(s<0)i.push(e);else{const t=i.splice(s,1)[0];if(t in this.model.children){const e=this.model.children[t],i=this._child_views.get(e);void 0!==i&&null!=i.el&&(0,r.undisplay)(i.el)}}if(this.model.expanded=i,i.indexOf(e)<0)return;let o=!0;for(const t of this.model.expanded)if(!(t in this.model.children)){o=!1;break}o&&this.renderChildren()}getData(){let t=(0,p.transform_cds_to_records)(this.model.source,!0);return this.model.configuration.dataTree&&(t=C(t,this.model.columns,this.model.indexes,this.model.aggregators)),t}getColumns(){var t;this.columns=new Map;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let i=[];if(i.push({field:"_index",frozen:!0,visible:!1}),null!=e)for(const t of e)if(null!=t.columns){const e=[];for(const i of t.columns)e.push(Object.assign({},i));i.push(Object.assign(Object.assign({},t),{columns:e}))}else if("expand"===t.formatter){const t={hozAlign:"center",cellClick:(t,e)=>{this._update_expand(e)},formatter:t=>this._expand_render(t),width:40,frozen:!0};i.push(t)}else{const e=Object.assign({},t);"rowSelection"===e.formatter&&(e.cellClick=(t,e)=>{e.getRow().toggleSelect()}),i.push(e)}for(const t of this.model.columns){let s=null;if(null!=e)for(const e of i)if(null!=e.columns){for(const i of e.columns)if(t.field===i.field){s=i;break}if(null!=s)break}else if(t.field===e.field){s=e;break}if(null==s&&(s={field:t.field}),this.columns.set(t.field,s),null==s.title&&(s.title=t.title),null==s.width&&null!=t.width&&0!=t.width&&(s.width=t.width),null==s.formatter&&null!=t.formatter){const e=t.formatter.type;s.formatter="BooleanFormatter"===e?"tickCross":e=>{const i=t.formatter.doFormat(e.getRow(),e,e.getValue(),null,null);if("HTMLTemplateFormatter"===t.formatter.type)return i;const s=(0,h.div)();s.innerHTML=i;const o=s.children[0];return"function(){return c.convert(arguments)}"===o.innerHTML?"":o}}"timestamp"==s.sorter&&(s.sorter=S),void 0===s.sorter&&(s.sorter="string");const o=t.editor,l=o.type;null!=s.editor?"date"===s.editor?s.editor=M:"datetime"===s.editor&&(s.editor=T):"StringEditor"===l?o.completions.length>0?(s.editor="list",s.editorParams={values:o.completions,autocomplete:!0,listOnEmpty:!0}):s.editor="input":"TextEditor"===l?s.editor="textarea":"IntEditor"===l||"NumberEditor"===l?(s.editor="number",s.editorParams={step:o.step},s.validator="IntEditor"===l?"integer":"numeric"):"CheckboxEditor"===l?s.editor="tickCross":"DateEditor"===l?s.editor=M:"SelectEditor"===l?(s.editor="list",s.editorParams={values:o.options}):null!=o&&null!=o.default_view&&(s.editor=(e,i,s,o)=>{this.renderEditor(t,e,i,s,o)}),s.visible=0!=s.visible&&!this.model.hidden_columns.includes(t.field),s.editable=()=>this.model.editable&&null!=o.default_view,s.headerFilter&&"boolean"==typeof s.headerFilter&&"string"==typeof s.editor&&(s.headerFilter=s.editor,s.headerFilterParams=s.editorParams);for(const t of this.model.sorters)s.field===t.field&&(s.headerSortStartingDir=t.dir);s.cellClick=(e,i)=>{const s=i.getData()._index,o=new y(t.field,s);this.model.trigger_event(o)},null==e&&i.push(s)}for(const t in this.model.buttons){const e={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const s=i.getData()._index,o=new y(t,s);this.model.trigger_event(o)}};i.push(e)}return i}renderEditor(t,e,i,s,o){const l=t.editor,n=new l.default_view({column:t,model:l,parent:this,container:e._cell.element});return n.initialize(),n.connect_signals(),i((()=>{n.setValue(e.getValue())})),n.inputEl.addEventListener("input",(()=>{const t=n.serializeValue(),i=e.getValue(),l=n.validate();l.valid||o(l.msg),null!=i&&typeof t!=typeof i?o("Mismatching type"):s(n.serializeValue())})),n.inputEl}setData(){const t=this.getData();null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t)}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=(null==e?void 0:e.data._index)||0;this.setData(),this.model.follow&&e&&this.tabulator.scrollToRow(i,"top",!1)}postUpdate(){this.setSelection(),this.setStyles()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=(0,p.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(t)}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}setVisibility(){null!=this.tabulator&&(this.tabulator.element.style.visibility=this.model.visible?"visible":"hidden")}updatePage(t){"local"===this.model.pagination&&this.model.page!==t&&(this._updating_page=!0,this.model.page=t,this._updating_page=!1,this.setStyles())}setGroupBy(){this.tabulator.setGroupBy(this.groupBy)}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setStyles(){const t=this.model.cell_styles.data;if(null!=this.tabulator&&0!=this.tabulator.getDataCount()&&null!=t&&t.size){this._applied_styles=!1;for(const e of t.keys()){const i=t.get(e),s=this.tabulator.getRow(e);if(!s)continue;const o=s._row.cells;for(const t of i.keys()){const e=i.get(t),s=o[t];if(null==s||!e.length)continue;const l=s.element;for(const t of e){let e,i;if((0,d.isArray)(t))[e,i]=t;else{if(!t.includes(":"))continue;[e,i]=t.split(":")}l.style.setProperty(e,i.trimLeft()),this._applied_styles=!0}}}}}setHidden(){for(const t of this.tabulator.getColumns()){const e=t._column;"_index"==e.field||this.model.hidden_columns.includes(e.field)?t.hide():t.show()}}setMaxPage(){this.tabulator.setMaxPage(this.model.max_page),this.tabulator.modules.page.pagesElement&&this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(Math.min(this.model.max_page,this.model.page)),"local"===this.model.pagination&&(this.renderChildren(),this.setStyles())}setPageSize(){this.tabulator.setPageSize(this.model.page_size),"local"===this.model.pagination&&(this.renderChildren(),this.setStyles())}setSelection(){if(null==this.tabulator||this._initializing||this._selection_updating)return;const t=this.model.source.selected.indices,e=this.tabulator.getSelectedData().map((t=>t._index));if(JSON.stringify(t)!=JSON.stringify(e)){this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t);for(const e of t){this.tabulator.rowManager.findRow(e)&&this.tabulator.scrollToRow(e,"center",!1).catch((()=>{}))}this._selection_updating=!1}}rowClicked(t,e){var i;if(this._selection_updating||this._initializing||"string"==typeof this.model.select_mode||!1===this.model.select_mode||this.model.configuration.dataTree||"\u25ba"===(null===(i=t.srcElement)||void 0===i?void 0:i.innerText))return;let s=[];const o=this.model.source.selected,l=e._row.data._index;if(t.ctrlKey||t.metaKey)s=[...this.model.source.selected.indices];else if(t.shiftKey&&o.indices.length){const t=o.indices[o.indices.length-1];if(l>t)for(let e=t;e<l;e++)s.push(e);else for(let e=t;e>l;e--)s.push(e)}if(s.indexOf(l)<0?s.push(l):s.splice(s.indexOf(l),1),"number"==typeof this.model.select_mode)for(;s.length>this.model.select_mode;)s.shift();const n=this._filter_selected(s);this.tabulator.deselectRow(),this.tabulator.selectRow(n),this._selection_updating=!0,o.indices=n,this._selection_updating=!1}_filter_selected(t){const e=[];for(const i of t)(null==this.model.selectable_rows||this.model.selectable_rows.indexOf(i)>=0)&&e.push(i);return e}rowSelectionChanged(t,e){if(this._selection_updating||this._initializing||"boolean"==typeof this.model.select_mode||"number"==typeof this.model.select_mode||this.model.configuration.dataTree)return;const i=t.map((t=>t._index)),s=this._filter_selected(i);this._selection_updating=i.length===s.length,this.model.source.selected.indices=s,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,i=this.columns.get(e),s=t.getData()._index,o=t._cell.value;if("numeric"!==i.validator||""!==o){this._tabulator_cell_updating=!0,f.comm_settings.debounce=!1,this.model.trigger_event(new w(e,s,!0));try{this.model.source.patch({[e]:[[s,o]]})}finally{f.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new w(e,s,!1)),this.tabulator.scrollToRow(s,"top",!1)}else t.setValue(NaN,!0)}}i.DataTabulatorView=z,z.__name__="DataTabulatorView",i.TableLayout=(0,u.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class k extends b.HTMLBox{constructor(t){super(t)}}i.DataTabulator=k,a=k,k.__name__="DataTabulator",k.__module__="panel.models.tabulator",a.prototype.default_view=z,a.define((({Any:t,Array:e,Boolean:s,Nullable:o,Number:l,Ref:n,String:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,{}],configuration:[t,{}],columns:[e(n(g.TableColumn)),[]],download:[s,!1],editable:[s,!0],expanded:[e(l),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[s,!0],frozen_rows:[e(l),[]],groupby:[e(a),[]],hidden_columns:[e(a),[]],indexes:[e(a),[]],layout:[i.TableLayout,"fit_data"],max_page:[l,0],pagination:[o(a),null],page:[l,0],page_size:[l,0],select_mode:[t,!0],selectable_rows:[o(e(l)),null],source:[n(m.ColumnDataSource)],sorters:[e(t),[]],cell_styles:[t,{}],theme_classes:[e(a),[]]})))},
54
+ "b2950aa706": function _(t,e,i,s,o){var l,n,a;s();const r=t("@bokehjs/core/dom"),d=t("@bokehjs/core/util/types"),c=t("@bokehjs/core/bokeh_events"),h=t("@bokehjs/core/dom"),u=t("@bokehjs/core/kinds"),m=t("@bokehjs/models/sources/column_data_source"),g=t("@bokehjs/models/widgets/tables"),_=t("99a25e6992"),f=t("1e66dab844"),p=t("4e27eda472"),b=t("ea218d1c3c");class w extends c.ModelEvent{constructor(t,e,i){super(),this.column=t,this.row=e,this.pre=i}get event_values(){return{model:this.origin,column:this.column,row:this.row,pre:this.pre}}}i.TableEditEvent=w,l=w,w.__name__="TableEditEvent",l.prototype.event_name="table-edit";class y extends c.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e}get event_values(){return{model:this.origin,column:this.column,row:this.row}}}function v(t,e,i){for(const s of i)if(s[t]==e)return s;return null}function x(t,e,i,s=0){const o={};if(0==t.length)return o;const l=i[s];for(const n of t){const t=x(n._children,e,i,s+1);for(const e in t)(0,d.isArray)(t[e])?n[e]=t[e].reduce(((t,e)=>t+e),0)/t[e].length:n[e]=t[e];for(const t of e.slice(1)){const e=n[t.field];if(t.field in o){const i=o[t.field];"min"===l?o[t.field]=Math.min(e,i):"max"===l?o[t.field]=Math.max(e,i):"sum"===l?o[t.field]=e+i:"mean"===l&&((0,d.isArray)(o[t.field])?o[t.field].push(e):o[t.field]=[i,e])}else o[t.field]=e}}return o}function C(t,e,i,s){const o=[],l=e[0].field;for(const s of t){const t=s[i[0]];let n=v(l,t,o);null==n&&(n={_children:[]},n[l]=t,o.push(n));let a=n;const r={};for(const t of i.slice(1)){a=v(l,s[t],a._children),null==a&&(a={_children:[]},a[l]=s[t],n._children.push(a)),r[t]=n;for(const t of e.slice(1))a[t.field]=s[t];n=a}for(const t of e.slice(1))a[t.field]=s[t.field]}const n=[];for(const t of i)n.push(t in s?s[t]:"sum");return x(o,e,n),o}i.CellClickEvent=y,n=y,y.__name__="CellClickEvent",n.prototype.event_name="cell-click";const S=function(t,e,i,s,o,l,n){let a;a=0;const r={zone:new window.luxon.IANAZone("UTC")};if(t="-9223372036854776"==String(t)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(t,r),e="-9223372036854776"==String(e)?window.luxon.DateTime.fromISO("invalid"):window.luxon.DateTime.fromMillis(e,r),t.isValid){if(e.isValid)return t-e;a=1}else a=e.isValid?-1:0;return a*=-1,a},M=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","date"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(function(t){13==t.keyCode&&r(),27==t.keyCode&&s()})),a},T=function(t,e,i,s){const o=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===o||null===o?null:window.luxon.DateTime.fromMillis(o,l).toFormat("yyyy-MM-dd'T'T");const a=document.createElement("input");function r(){const t=window.luxon.DateTime.fromFormat(a.value,"yyyy-MM-dd'T'T",l).toMillis();t!=n?i(t):s()}return a.setAttribute("type","datetime-local"),a.style.padding="4px",a.style.width="100%",a.style.boxSizing="border-box",a.value=n,e((()=>{a.focus(),a.style.height="100%"})),a.addEventListener("blur",r),a.addEventListener("keydown",(function(t){13==t.keyCode&&r(),27==t.keyCode&&s()})),a};class z extends b.HTMLBoxView{constructor(){super(...arguments),this.columns=new Map,this._tabulator_cell_updating=!1,this._updating_page=!1,this._updating_sort=!1,this._selection_updating=!1,this._lastVerticalScrollbarTopPosition=0,this._applied_styles=!1,this._building=!1}connect_signals(){super.connect_signals();const t=this.model.properties,{configuration:e,layout:i,columns:s,groupby:o}=t;this.on_change([e,i,o],(0,_.debounce)((()=>{this.invalidate_render()}),20,!1)),this.on_change([s],(()=>{this.tabulator.setColumns(this.getColumns()),this.setHidden()})),this.connect(t.download.change,(()=>{const t=this.model.filename.endsWith(".json")?"json":"csv";this.tabulator.download(t,this.model.filename)})),this.connect(t.children.change,(()=>this.renderChildren())),this.connect(t.expanded.change,(()=>{for(const t of this.tabulator.rowManager.getRows())t.cells.length>0&&t.cells[0].layoutElement();for(const t of this.tabulator.rowManager.getRows())if(t.cells.length>0){const e=t.data._index,i=this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc";t.cells[1].element.innerText=i}})),this.connect(t.cell_styles.change,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.connect(t.hidden_columns.change,(()=>{this.setHidden(),this.tabulator.redraw(!0)})),this.connect(t.page_size.change,(()=>this.setPageSize())),this.connect(t.page.change,(()=>{this._updating_page||this.setPage()})),this.connect(t.visible.change,(()=>this.setVisibility())),this.connect(t.max_page.change,(()=>this.setMaxPage())),this.connect(t.frozen_rows.change,(()=>this.setFrozen())),this.connect(t.sorters.change,(()=>this.setSorters())),this.connect(t.theme_classes.change,(()=>this.setCSSClasses(this.tabulator.element))),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.source.streaming,(()=>this.addData())),this.connect(this.model.source.patching,(()=>{const t=this.model.source.selected.indices;this.updateOrAddData(),this.tabulator.rowManager.element.scrollTop=this._lastVerticalScrollbarTopPosition,this.model.source.selected.indices=t})),this.connect(this.model.source.selected.change,(()=>this.setSelection())),this.connect(this.model.source.selected.properties.indices.change,(()=>this.setSelection()))}get groupBy(){return!!this.model.groupby.length&&(t=>{const e=[];for(const i of this.model.groupby){const s=i+": "+t[i];e.push(s)}return e.join(", ")})}get sorters(){const t=[];this.model.sorters.length&&t.push({column:"_index",dir:"asc"});for(const e of this.model.sorters.reverse())void 0===e.column&&(e.column=e.field),t.push(e);return t}invalidate_render(){this.tabulator.destroy(),this.tabulator=null,this.render()}redraw(){this._building||(null!=this.tabulator.columnManager.element&&this.tabulator.columnManager.redraw(!0),null!=this.tabulator.rowManager.renderer&&(this.tabulator.rowManager.redraw(!0),this.renderChildren(),this.setStyles()))}after_layout(){super.after_layout(),null!=this.tabulator&&this._initializing&&this.redraw(),this._initializing=!1}setCSSClasses(t){t.className="pnx-tabulator tabulator";for(const e of this.model.theme_classes)t.classList.add(e)}render(){null!=this.tabulator&&this.tabulator.destroy(),super.render(),this._initializing=!0;const t=(0,h.div)({style:"display: contents;"}),e=(0,h.div)({style:"width: 100%; height: 100%; visibility: hidden;"});this.setCSSClasses(e),t.appendChild(e),this.shadow_el.appendChild(t);let i=this.getConfiguration();this.tabulator=new Tabulator(e,i),this.watch_stylesheets(),this.init_callbacks()}style_redraw(){this.model.visible&&(this.tabulator.element.style.visibility="visible"),this._initializing||this._building||this.redraw()}tableInit(){this._building=!0;this.tabulator.modules.ajax.sendRequest=(t,e,i)=>this.requestPage(e.page,e.sort),this.tabulator.modules.page._parseRemoteData=()=>!1}init_callbacks(){this.tabulator.on("tableBuilding",(()=>this.tableInit())),this.tabulator.on("tableBuilt",(()=>this.tableBuilt())),this.tabulator.on("selectableCheck",(t=>{const e=this.model.selectable_rows;return null==e||e.includes(t._row.data._index)})),this.tabulator.on("tooltips",(t=>t.getColumn().getField()+": "+t.getValue())),this.tabulator.on("scrollVertical",(0,_.debounce)((()=>{this.setStyles()}),50,!1)),this.tabulator.on("rowSelectionChanged",((t,e)=>this.rowSelectionChanged(t,e))),this.tabulator.on("rowClick",((t,e)=>this.rowClicked(t,e))),this.tabulator.on("cellEdited",(t=>this.cellEdited(t))),this.tabulator.on("dataFiltering",(t=>{this.model.filters=t})),this.tabulator.on("dataFiltered",((t,e)=>{this._building||(0===e.length&&this.tabulator.rowManager.renderEmptyScroll(),this.updatePage(this.tabulator.getPage()))})),this.tabulator.on("pageLoaded",(t=>{this.updatePage(t)})),this.tabulator.on("renderComplete",(()=>{this._building||this.postUpdate()})),this.tabulator.on("dataSorting",(t=>{const e=[];for(const i of t)"_index"!==i.field&&e.push({field:i.field,dir:i.dir});"remote"!==this.model.pagination&&(this._updating_sort=!0,this.model.sorters=e,this._updating_sort=!1)}))}tableBuilt(){this._building=!1,this.setSelection(),this.renderChildren(),this.setStyles(),this.model.pagination&&(this.setMaxPage(),this.tabulator.setPage(this.model.page))}requestPage(t,e){return new Promise(((i,s)=>{try{if(null!=t&&null!=e){this._updating_sort=!0;const i=[];for(const t of e)"_index"!==t.field&&i.push({field:t.field,dir:t.dir});this.model.sorters=i,this._updating_sort=!1,this._updating_page=!0;try{this.model.page=t||1}finally{this._updating_page=!1}}i([])}catch(t){s(t)}}))}getLayout(){switch(this.model.layout){case"fit_data":return"fitData";case"fit_data_fill":return"fitDataFill";case"fit_data_stretch":return"fitDataStretch";case"fit_data_table":return"fitDataTable";case"fit_columns":return"fitColumns"}}getConfiguration(){let t="toggle"===this.model.select_mode||NaN,e=Object.assign(Object.assign({},this.model.configuration),{index:"_index",nestedFieldSeparator:!1,movableColumns:!1,selectable:t,columns:this.getColumns(),initialSort:this.sorters,layout:this.getLayout(),pagination:null!=this.model.pagination,paginationMode:this.model.pagination,paginationSize:this.model.page_size,paginationInitialPage:1,groupBy:this.groupBy,rowFormatter:t=>this._render_row(t),frozenRows:t=>!!this.model.frozen_rows.length&&this.model.frozen_rows.includes(t._row.data._index)});"remote"===this.model.pagination&&(e.ajaxURL="http://panel.pyviz.org",e.sortMode="remote");const i=this.model.source;let s;return s=null===i||0===i.columns().length?[]:(0,p.transform_cds_to_records)(i,!0),e.dataTree&&(s=C(s,this.model.columns,this.model.indexes,this.model.aggregators)),Object.assign(Object.assign({},e),{data:s})}get child_models(){var t,e;const i=[];for(const s of this.model.expanded){const o=null===(e=(t=this.model.children).get)||void 0===e?void 0:e.call(t,s);null!=o&&i.push(o)}return i}renderChildren(){new Promise((async t=>{await this.build_child_views(),t(null)})).then((()=>{for(const t of this.model.expanded){const e=this.tabulator.getRow(t);this._render_row(e,!1)}this._update_children(),null!=this.tabulator.rowManager.renderer&&this.tabulator.rowManager.adjustTableSize(),this.invalidate_layout()}))}_render_row(t,e=!0){var i;const s=null===(i=t._row)||void 0===i?void 0:i.data._index;if(!this.model.expanded.includes(s)||null==this.model.children.get(s))return;const o=this.model.children.get(s),l=null==o?null:this._child_views.get(o);if(null==l)return;const n=t.getElement(),a=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,r=n.style.paddingLeft?"-"+n.style.paddingLeft:"0",d=(0,h.div)({style:"background-color: "+a+"; margin-left:"+r+"; max-width: 100%; overflow-x: hidden;"});d.appendChild(l.el),n.appendChild(d),l.has_finished()||(l.render(),l.after_render()),e&&(this._update_children(),this.tabulator.rowManager.adjustTableSize(),this.invalidate_layout())}_expand_render(t){const e=t._cell.row.data._index;return"<i>"+(this.model.expanded.indexOf(e)<0?"\u25ba":"\u25bc")+"</i>"}_update_expand(t){var e,i,s,o;const l=t._cell.row.data._index,n=[...this.model.expanded],a=n.indexOf(l);if(a<0)n.push(l);else{const t=n.splice(a,1)[0],s=null===(i=(e=this.model.children).get)||void 0===i?void 0:i.call(e,t);if(null!=s){const t=this._child_views.get(s);void 0!==t&&null!=t.el&&(0,r.undisplay)(t.el)}}if(this.model.expanded=n,n.indexOf(l)<0)return;let d=!0;for(const t of this.model.expanded)if(null==(null===(o=(s=this.model.children).get)||void 0===o?void 0:o.call(s,t))){d=!1;break}d&&this.renderChildren()}getData(){let t=(0,p.transform_cds_to_records)(this.model.source,!0);return this.model.configuration.dataTree&&(t=C(t,this.model.columns,this.model.indexes,this.model.aggregators)),t}getColumns(){var t;this.columns=new Map;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let i=[];if(i.push({field:"_index",frozen:!0,visible:!1}),null!=e)for(const t of e)if(null!=t.columns){const e=[];for(const i of t.columns)e.push(Object.assign({},i));i.push(Object.assign(Object.assign({},t),{columns:e}))}else if("expand"===t.formatter){const t={hozAlign:"center",cellClick:(t,e)=>{this._update_expand(e)},formatter:t=>this._expand_render(t),width:40,frozen:!0};i.push(t)}else{const e=Object.assign({},t);"rowSelection"===e.formatter&&(e.cellClick=(t,e)=>{e.getRow().toggleSelect()}),i.push(e)}for(const t of this.model.columns){let s=null;if(null!=e)for(const e of i)if(null!=e.columns){for(const i of e.columns)if(t.field===i.field){s=i;break}if(null!=s)break}else if(t.field===e.field){s=e;break}if(null==s&&(s={field:t.field}),this.columns.set(t.field,s),null==s.title&&(s.title=t.title),null==s.width&&null!=t.width&&0!=t.width&&(s.width=t.width),null==s.formatter&&null!=t.formatter){const e=t.formatter.type;s.formatter="BooleanFormatter"===e?"tickCross":e=>{const i=t.formatter.doFormat(e.getRow(),e,e.getValue(),null,null);if("HTMLTemplateFormatter"===t.formatter.type)return i;const s=(0,h.div)();s.innerHTML=i;const o=s.children[0];return"function(){return c.convert(arguments)}"===o.innerHTML?"":o}}"timestamp"==s.sorter&&(s.sorter=S),void 0===s.sorter&&(s.sorter="string");const o=t.editor,l=o.type;null!=s.editor?"date"===s.editor?s.editor=M:"datetime"===s.editor&&(s.editor=T):"StringEditor"===l?o.completions.length>0?(s.editor="list",s.editorParams={values:o.completions,autocomplete:!0,listOnEmpty:!0}):s.editor="input":"TextEditor"===l?s.editor="textarea":"IntEditor"===l||"NumberEditor"===l?(s.editor="number",s.editorParams={step:o.step},s.validator="IntEditor"===l?"integer":"numeric"):"CheckboxEditor"===l?s.editor="tickCross":"DateEditor"===l?s.editor=M:"SelectEditor"===l?(s.editor="list",s.editorParams={values:o.options}):null!=o&&null!=o.default_view&&(s.editor=(e,i,s,o)=>{this.renderEditor(t,e,i,s,o)}),s.visible=0!=s.visible&&!this.model.hidden_columns.includes(t.field),s.editable=()=>this.model.editable&&null!=o.default_view,s.headerFilter&&"boolean"==typeof s.headerFilter&&"string"==typeof s.editor&&(s.headerFilter=s.editor,s.headerFilterParams=s.editorParams);for(const t of this.model.sorters)s.field===t.field&&(s.headerSortStartingDir=t.dir);s.cellClick=(e,i)=>{const s=i.getData()._index,o=new y(t.field,s);this.model.trigger_event(o)},null==e&&i.push(s)}for(const t in this.model.buttons){const e={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const s=i.getData()._index,o=new y(t,s);this.model.trigger_event(o)}};i.push(e)}return i}renderEditor(t,e,i,s,o){const l=t.editor,n=new l.default_view({column:t,model:l,parent:this,container:e._cell.element});return n.initialize(),n.connect_signals(),i((()=>{n.setValue(e.getValue())})),n.inputEl.addEventListener("input",(()=>{const t=n.serializeValue(),i=e.getValue(),l=n.validate();l.valid||o(l.msg),null!=i&&typeof t!=typeof i?o("Mismatching type"):s(n.serializeValue())})),n.inputEl}setData(){if(this._initializing||this._building||!this.tabulator.initialized)return;const t=this.getData();null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t)}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=(null==e?void 0:e.data._index)||0;this.setData(),this.model.follow&&e&&this.tabulator.scrollToRow(i,"top",!1)}postUpdate(){this.setSelection(),this.setStyles()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=(0,p.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(t)}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}setVisibility(){null!=this.tabulator&&(this.tabulator.element.style.visibility=this.model.visible?"visible":"hidden")}updatePage(t){"local"===this.model.pagination&&this.model.page!==t&&(this._updating_page=!0,this.model.page=t,this._updating_page=!1,this.setStyles())}setGroupBy(){this.tabulator.setGroupBy(this.groupBy)}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setStyles(){const t=this.model.cell_styles.data;if(null!=this.tabulator&&0!=this.tabulator.getDataCount()&&null!=t&&t.size){this._applied_styles=!1;for(const e of t.keys()){const i=t.get(e),s=this.tabulator.getRow(e);if(!s)continue;const o=s._row.cells;for(const t of i.keys()){const e=i.get(t),s=o[t];if(null==s||!e.length)continue;const l=s.element;for(const t of e){let e,i;if((0,d.isArray)(t))[e,i]=t;else{if(!t.includes(":"))continue;[e,i]=t.split(":")}l.style.setProperty(e,i.trimLeft()),this._applied_styles=!0}}}}}setHidden(){for(const t of this.tabulator.getColumns()){const e=t._column;"_index"==e.field||this.model.hidden_columns.includes(e.field)?t.hide():t.show()}}setMaxPage(){this.tabulator.setMaxPage(this.model.max_page),this.tabulator.modules.page.pagesElement&&this.tabulator.modules.page._setPageButtons()}setPage(){this.tabulator.setPage(Math.min(this.model.max_page,this.model.page)),"local"===this.model.pagination&&(this.renderChildren(),this.setStyles())}setPageSize(){this.tabulator.setPageSize(this.model.page_size),"local"===this.model.pagination&&(this.renderChildren(),this.setStyles())}setSelection(){if(null==this.tabulator||this._initializing||this._selection_updating||!this.tabulator.initialized)return;const t=this.model.source.selected.indices,e=this.tabulator.getSelectedData().map((t=>t._index));if(JSON.stringify(t)!=JSON.stringify(e)){this._selection_updating=!0,this.tabulator.deselectRow(),this.tabulator.selectRow(t);for(const e of t){this.tabulator.rowManager.findRow(e)&&this.tabulator.scrollToRow(e,"center",!1).catch((()=>{}))}this._selection_updating=!1}}rowClicked(t,e){var i;if(this._selection_updating||this._initializing||"string"==typeof this.model.select_mode||!1===this.model.select_mode||this.model.configuration.dataTree||"\u25ba"===(null===(i=t.srcElement)||void 0===i?void 0:i.innerText))return;let s=[];const o=this.model.source.selected,l=e._row.data._index;if(t.ctrlKey||t.metaKey)s=[...this.model.source.selected.indices];else if(t.shiftKey&&o.indices.length){const t=o.indices[o.indices.length-1];if(l>t)for(let e=t;e<l;e++)s.push(e);else for(let e=t;e>l;e--)s.push(e)}if(s.indexOf(l)<0?s.push(l):s.splice(s.indexOf(l),1),"number"==typeof this.model.select_mode)for(;s.length>this.model.select_mode;)s.shift();const n=this._filter_selected(s);this.tabulator.deselectRow(),this.tabulator.selectRow(n),this._selection_updating=!0,o.indices=n,this._selection_updating=!1}_filter_selected(t){const e=[];for(const i of t)(null==this.model.selectable_rows||this.model.selectable_rows.indexOf(i)>=0)&&e.push(i);return e}rowSelectionChanged(t,e){if(this._selection_updating||this._initializing||"boolean"==typeof this.model.select_mode||"number"==typeof this.model.select_mode||this.model.configuration.dataTree)return;const i=t.map((t=>t._index)),s=this._filter_selected(i);this._selection_updating=i.length===s.length,this.model.source.selected.indices=s,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,i=this.columns.get(e),s=t.getData()._index,o=t._cell.value;if("numeric"!==i.validator||""!==o){this._tabulator_cell_updating=!0,f.comm_settings.debounce=!1,this.model.trigger_event(new w(e,s,!0));try{this.model.source.patch({[e]:[[s,o]]})}finally{f.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new w(e,s,!1)),this.tabulator.scrollToRow(s,"top",!1)}else t.setValue(NaN,!0)}}i.DataTabulatorView=z,z.__name__="DataTabulatorView",i.TableLayout=(0,u.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class k extends b.HTMLBox{constructor(t){super(t)}}i.DataTabulator=k,a=k,k.__name__="DataTabulator",k.__module__="panel.models.tabulator",a.prototype.default_view=z,a.define((({Any:t,Array:e,Boolean:s,Nullable:o,Number:l,Ref:n,String:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,new Map],configuration:[t,{}],columns:[e(n(g.TableColumn)),[]],download:[s,!1],editable:[s,!0],expanded:[e(l),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[s,!0],frozen_rows:[e(l),[]],groupby:[e(a),[]],hidden_columns:[e(a),[]],indexes:[e(a),[]],layout:[i.TableLayout,"fit_data"],max_page:[l,0],pagination:[o(a),null],page:[l,0],page_size:[l,0],select_mode:[t,!0],selectable_rows:[o(e(l)),null],source:[n(m.ColumnDataSource)],sorters:[e(t),[]],cell_styles:[t,{}],theme_classes:[e(a),[]]})))},
55
55
  "99a25e6992": function _(n,l,u,t,e){function o(n,l,u){var t,e,o,a,r;function i(){var c=Date.now()-a;c<l&&c>=0?t=setTimeout(i,l-c):(t=null,u||(r=n.apply(o,e),o=e=null))}null==l&&(l=100);var c=function(){o=this,e=arguments,a=Date.now();var c=u&&!t;return t||(t=setTimeout(i,l)),c&&(r=n.apply(o,e),o=e=null),r};return c.clear=function(){t&&(clearTimeout(t),t=null)},c.flush=function(){t&&(r=n.apply(o,e),o=e=null,clearTimeout(t),t=null)},c}o.debounce=o,l.exports=o},
56
- "fd9108e30e": function _(n,t,e,o,l){o(),e.transform_cds_to_records=function(n,t=!1,e=0){const o=[],l=n.columns(),r=n.get_length();if(0===l.length||null===r)return[];for(let c=e;c<r;c++){const e={};for(const t of l){let o=n.get_array(t);const l=null==o[0]||null==o[0].shape?null:o[0].shape;null!=l&&l.length>1&&"number"==typeof l[0]?e[t]=o.slice(c*l[1],c*l[1]+l[1]):e[t]=o[c]}t&&(e._index=c),o.push(e)}return o},e.dict_to_records=function(n,t=!0){for(let e=0;e<n.index.length;e++){const o={};for(const l of n)(t||"index"!==l)&&(o[l]=n[l][e])}return[]}},
56
+ "4e27eda472": function _(n,e,t,l,o){l(),t.transform_cds_to_records=function(n,e=!1,t=0){const l=[],o=n.columns(),r=n.get_length();if(0===o.length||null===r)return[];for(let s=t;s<r;s++){const t={};for(const e of o){let l=n.get_array(e);const o=null==l[0]||null==l[0].shape?null:l[0].shape;if(null!=o&&o.length>1&&"number"==typeof o[0])t[e]=l.slice(s*o[1],s*o[1]+o[1]);else if(l.length!=r&&l.length%r==0){const n=l.length/r;t[e]=l.slice(s*n,s*n+n)}else t[e]=l[s]}e&&(t._index=s),l.push(t)}return l},t.dict_to_records=function(n,e=!0){for(let t=0;t<n.index.length;t++){const l={};for(const o of n)(e||"index"!==o)&&(l[o]=n[o][t])}return[]}},
57
57
  "6658732ce1": function _(e,t,i,n,s){n();const o=e("tslib");var l;const a=o.__importDefault(e("1156ddcec2")),r=e("@bokehjs/models/widgets/input_widget"),d=e("@bokehjs/core/dom"),c=e("@bokehjs/core/enums"),h=e("@bokehjs/core/util/types"),u=o.__importStar(e("@bokehjs/styles/widgets/inputs.css")),m=o.__importDefault(e("@bokehjs/styles/widgets/flatpickr.css"));function _(e){const t=[];for(const i of e)if((0,h.isString)(i))t.push(i);else{const[e,n]=i;t.push({from:e,to:n})}return t}class p extends r.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:i,disabled_dates:n,enabled_dates:s,inline:o,enable_time:l,enable_seconds:a,military_time:r,date_format:d,mode:c}=this.model.properties;this.connect(e.change,(()=>{var e;return this.model.value?null===(e=this._picker)||void 0===e?void 0:e.setDate(this.model.value):this._clear()})),this.connect(t.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("minDate",this.model.min_date)})),this.connect(i.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("maxDate",this.model.max_date)})),this.connect(n.change,(()=>{var e;const{disabled_dates:t}=this.model;null===(e=this._picker)||void 0===e||e.set("disable",null!=t?_(t):[])})),this.connect(s.change,(()=>{var e;const{enabled_dates:t}=this.model;null!=t?null===(e=this._picker)||void 0===e||e.set("enable",_(t)):this._picker&&(this._picker.config._enable=void 0,this._picker.redraw(),this._picker.updateValue(!0))})),this.connect(o.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("inline",this.model.inline)})),this.connect(l.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("enableTime",this.model.enable_time)})),this.connect(a.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("enableSeconds",this.model.enable_seconds)})),this.connect(r.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("time_24hr",this.model.military_time)})),this.connect(c.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("mode",this.model.mode)})),this.connect(d.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("dateFormat",this.model.date_format)}))}remove(){var e;null===(e=this._picker)||void 0===e||e.destroy(),super.remove()}stylesheets(){return[...super.stylesheets(),m.default]}render(){if(null!=this._picker)return;super.render(),this.input_el=(0,d.input)({type:"text",class:u.input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el);const e={appendTo:this.group_el,positionElement:this.input_el,defaultDate:this.model.value,inline:this.model.inline,position:this._position.bind(this),enableTime:this.model.enable_time,enableSeconds:this.model.enable_seconds,time_24hr:this.model.military_time,dateFormat:this.model.date_format,mode:this.model.mode,onClose:(e,t,i)=>this._on_close(e,t,i)},{min_date:t,max_date:i,disabled_dates:n,enabled_dates:s}=this.model;null!=t&&(e.minDate=t),null!=i&&(e.maxDate=i),null!=n&&(e.disable=_(n)),null!=s&&(e.enable=_(s)),this._picker=(0,a.default)(this.input_el,e),this._picker.maxDateHasTime=!0,this._picker.minDateHasTime=!0}_clear(){var e;null===(e=this._picker)||void 0===e||e.clear(),this.model.value=null}_on_close(e,t,i){("range"!=this.model.mode||t.includes("to"))&&(this.model.value=t,this.change_input())}_position(e,t){const i=null!=t?t:e._positionElement,n=[...e.calendarContainer.children].reduce(((e,t)=>e+(0,d.bounding_box)(t).height),0),s=e.calendarContainer.offsetWidth,o=this.model.position.split(" "),l=o[0],a=o.length>1?o[1]:null,r=i.offsetTop,c=i.offsetTop+i.offsetHeight,h=i.offsetLeft,u=i.offsetLeft+i.offsetWidth,m=i.offsetWidth,_=window.innerHeight-c,p="above"===l||"below"!==l&&_<n&&r>n,f=e.config.appendTo?r+(p?-n-2:i.offsetHeight+2):window.scrollY+r+(p?-n-2:i.offsetHeight+2);if(e.calendarContainer.classList.toggle("arrowTop",!p),e.calendarContainer.classList.toggle("arrowBottom",p),e.config.inline)return;let g=window.scrollX+h,v=!1,b=!1;"center"===a?(g-=(s-m)/2,v=!0):"right"===a&&(g-=s-m,b=!0),e.calendarContainer.classList.toggle("arrowLeft",!v&&!b),e.calendarContainer.classList.toggle("arrowCenter",v),e.calendarContainer.classList.toggle("arrowRight",b);const k=window.document.body.offsetWidth-(window.scrollX+u),w=g+s>window.document.body.offsetWidth,y=k+s>window.document.body.offsetWidth;if(e.calendarContainer.classList.toggle("rightMost",w),!e.config.static)if(e.calendarContainer.style.top=`${f}px`,w)if(y){const t=this.shadow_el.styleSheets[0],i=window.document.body.offsetWidth,n=Math.max(0,i/2-s/2),o=".flatpickr-calendar.centerMost:before",l=".flatpickr-calendar.centerMost:after",a=t.cssRules.length,r=`{left:${h}px;right:auto;}`;e.calendarContainer.classList.toggle("rightMost",!1),e.calendarContainer.classList.toggle("centerMost",!0),t.insertRule(`${o},${l}${r}`,a),e.calendarContainer.style.left=`${n}px`,e.calendarContainer.style.right="auto"}else e.calendarContainer.style.left="auto",e.calendarContainer.style.right=`${k}px`;else e.calendarContainer.style.left=`${g}px`,e.calendarContainer.style.right="auto"}}i.DatetimePickerView=p,p.__name__="DatetimePickerView";class f extends r.InputWidget{constructor(e){super(e)}}i.DatetimePicker=f,l=f,f.__name__="DatetimePicker",f.__module__="panel.models.datetime_picker",l.prototype.default_view=p,l.define((({Boolean:e,String:t,Array:i,Tuple:n,Or:s,Nullable:o})=>{const l=i(s(t,n(t,t)));return{value:[o(t),null],min_date:[o(t),null],max_date:[o(t),null],disabled_dates:[o(l),null],enabled_dates:[o(l),null],position:[c.CalendarPosition,"auto"],inline:[e,!1],enable_time:[e,!0],enable_seconds:[e,!0],military_time:[e,!0],date_format:[t,"Y-m-d H:i:S"],mode:[t,"single"]}}))},
58
58
  "1156ddcec2": function _(e,t,n,a,i){a();const o=e("tslib");var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},r.apply(this,arguments)},l=this&&this.__spreadArrays||function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var a=Array(e),i=0;for(t=0;t<n;t++)for(var o=arguments[t],r=0,l=o.length;r<l;r++,i++)a[i]=o[r];return a};const c=e("651d495396"),s=o.__importDefault(e("3bfa124fda")),d=e("15458073ce"),u=e("6b6749c6cf"),f=e("1bb8c967d1"),m=e("3d14787c35");e("6f45019dc1");var g=300;function p(e,t){var n={config:r(r({},c.defaults),v.defaultConfig),l10n:s.default};function a(){var e;return(null===(e=n.calendarContainer)||void 0===e?void 0:e.getRootNode()).activeElement||document.activeElement}function i(e){return e.bind(n)}function o(){var e=n.config;!1===e.weekNumbers&&1===e.showMonths||!0!==e.noCalendar&&window.requestAnimationFrame((function(){if(void 0!==n.calendarContainer&&(n.calendarContainer.style.visibility="hidden",n.calendarContainer.style.display="block"),void 0!==n.daysContainer){var t=(n.days.offsetWidth+1)*e.showMonths;n.daysContainer.style.width=t+"px",n.calendarContainer.style.width=t+(void 0!==n.weekWrapper?n.weekWrapper.offsetWidth:0)+"px",n.calendarContainer.style.removeProperty("visibility"),n.calendarContainer.style.removeProperty("display")}}))}function p(e){if(0===n.selectedDates.length){var t=void 0===n.config.minDate||(0,f.compareDates)(new Date,n.config.minDate)>=0?new Date:new Date(n.config.minDate.getTime()),a=(0,f.getDefaultHours)(n.config);t.setHours(a.hours,a.minutes,a.seconds,t.getMilliseconds()),n.selectedDates=[t],n.latestSelectedDateObj=t}void 0!==e&&"blur"!==e.type&&function(e){e.preventDefault();var t="keydown"===e.type,a=(0,u.getEventTarget)(e),i=a;void 0!==n.amPM&&a===n.amPM&&(n.amPM.textContent=n.l10n.amPM[(0,d.int)(n.amPM.textContent===n.l10n.amPM[0])]);var o=parseFloat(i.getAttribute("min")),r=parseFloat(i.getAttribute("max")),l=parseFloat(i.getAttribute("step")),c=parseInt(i.value,10),s=e.delta||(t?38===e.which?1:-1:0),f=c+l*s;if(void 0!==i.value&&2===i.value.length){var m=i===n.hourElement,g=i===n.minuteElement;f<o?(f=r+f+(0,d.int)(!m)+((0,d.int)(m)&&(0,d.int)(!n.amPM)),g&&x(void 0,-1,n.hourElement)):f>r&&(f=i===n.hourElement?f-r-(0,d.int)(!n.amPM):o,g&&x(void 0,1,n.hourElement)),n.amPM&&m&&(1===l?f+c===23:Math.abs(f-c)>l)&&(n.amPM.textContent=n.l10n.amPM[(0,d.int)(n.amPM.textContent===n.l10n.amPM[0])]),i.value=(0,d.pad)(f)}}(e);var i=n._input.value;h(),se(),n._input.value!==i&&n._debouncedChange()}function h(){if(void 0!==n.hourElement&&void 0!==n.minuteElement){var e,t,a=(parseInt(n.hourElement.value.slice(-2),10)||0)%24,i=(parseInt(n.minuteElement.value,10)||0)%60,o=void 0!==n.secondElement?(parseInt(n.secondElement.value,10)||0)%60:0;void 0!==n.amPM&&(e=a,t=n.amPM.textContent,a=e%12+12*(0,d.int)(t===n.l10n.amPM[1]));var r=void 0!==n.config.minTime||n.config.minDate&&n.minDateHasTime&&n.latestSelectedDateObj&&0===(0,f.compareDates)(n.latestSelectedDateObj,n.config.minDate,!0),l=void 0!==n.config.maxTime||n.config.maxDate&&n.maxDateHasTime&&n.latestSelectedDateObj&&0===(0,f.compareDates)(n.latestSelectedDateObj,n.config.maxDate,!0);if(void 0!==n.config.maxTime&&void 0!==n.config.minTime&&n.config.minTime>n.config.maxTime){var c=(0,f.calculateSecondsSinceMidnight)(n.config.minTime.getHours(),n.config.minTime.getMinutes(),n.config.minTime.getSeconds()),s=(0,f.calculateSecondsSinceMidnight)(n.config.maxTime.getHours(),n.config.maxTime.getMinutes(),n.config.maxTime.getSeconds()),u=(0,f.calculateSecondsSinceMidnight)(a,i,o);if(u>s&&u<c){var m=(0,f.parseSeconds)(c);a=m[0],i=m[1],o=m[2]}}else{if(l){var g=void 0!==n.config.maxTime?n.config.maxTime:n.config.maxDate;(a=Math.min(a,g.getHours()))===g.getHours()&&(i=Math.min(i,g.getMinutes())),i===g.getMinutes()&&(o=Math.min(o,g.getSeconds()))}if(r){var p=void 0!==n.config.minTime?n.config.minTime:n.config.minDate;(a=Math.max(a,p.getHours()))===p.getHours()&&i<p.getMinutes()&&(i=p.getMinutes()),i===p.getMinutes()&&(o=Math.max(o,p.getSeconds()))}}C(a,i,o)}}function D(e){var t=e||n.latestSelectedDateObj;t&&t instanceof Date&&C(t.getHours(),t.getMinutes(),t.getSeconds())}function C(e,t,a){void 0!==n.latestSelectedDateObj&&n.latestSelectedDateObj.setHours(e%24,t,a||0,0),n.hourElement&&n.minuteElement&&!n.isMobile&&(n.hourElement.value=(0,d.pad)(n.config.time_24hr?e:(12+e)%12+12*(0,d.int)(e%12==0)),n.minuteElement.value=(0,d.pad)(t),void 0!==n.amPM&&(n.amPM.textContent=n.l10n.amPM[(0,d.int)(e>=12)]),void 0!==n.secondElement&&(n.secondElement.value=(0,d.pad)(a)))}function b(e){var t=(0,u.getEventTarget)(e),n=parseInt(t.value)+(e.delta||0);(n/1e3>1||"Enter"===e.key&&!/[^\d]/.test(n.toString()))&&R(n)}function M(e,t,a,i){return t instanceof Array?t.forEach((function(t){return M(e,t,a,i)})):e instanceof Array?e.forEach((function(e){return M(e,t,a,i)})):(e.addEventListener(t,a,i),void n._handlers.push({remove:function(){return e.removeEventListener(t,a,i)}}))}function y(){ie("onChange")}function w(e,t){var a=void 0!==e?n.parseDate(e):n.latestSelectedDateObj||(n.config.minDate&&n.config.minDate>n.now?n.config.minDate:n.config.maxDate&&n.config.maxDate<n.now?n.config.maxDate:n.now),i=n.currentYear,o=n.currentMonth;try{void 0!==a&&(n.currentYear=a.getFullYear(),n.currentMonth=a.getMonth())}catch(e){e.message="Invalid date supplied: "+a,n.config.errorHandler(e)}t&&n.currentYear!==i&&(ie("onYearChange"),N()),!t||n.currentYear===i&&n.currentMonth===o||ie("onMonthChange"),n.redraw()}function E(e){var t=(0,u.getEventTarget)(e);~t.className.indexOf("arrow")&&x(e,t.classList.contains("arrowUp")?1:-1)}function x(e,t,n){var a=e&&(0,u.getEventTarget)(e),i=n||a&&a.parentNode&&a.parentNode.firstChild,o=oe("increment");o.delta=t,i&&i.dispatchEvent(o)}function k(e,t,a,i){var o=W(t,!0),r=(0,u.createElement)("span",e,t.getDate().toString());return r.dateObj=t,r.$i=i,r.setAttribute("aria-label",n.formatDate(t,n.config.ariaDateFormat)),-1===e.indexOf("hidden")&&0===(0,f.compareDates)(t,n.now)&&(n.todayDateElem=r,r.classList.add("today"),r.setAttribute("aria-current","date")),o?(r.tabIndex=-1,re(t)&&(r.classList.add("selected"),n.selectedDateElem=r,"range"===n.config.mode&&((0,u.toggleClass)(r,"startRange",n.selectedDates[0]&&0===(0,f.compareDates)(t,n.selectedDates[0],!0)),(0,u.toggleClass)(r,"endRange",n.selectedDates[1]&&0===(0,f.compareDates)(t,n.selectedDates[1],!0)),"nextMonthDay"===e&&r.classList.add("inRange")))):r.classList.add("flatpickr-disabled"),"range"===n.config.mode&&function(e){return!("range"!==n.config.mode||n.selectedDates.length<2)&&((0,f.compareDates)(e,n.selectedDates[0])>=0&&(0,f.compareDates)(e,n.selectedDates[1])<=0)}(t)&&!re(t)&&r.classList.add("inRange"),n.weekNumbers&&1===n.config.showMonths&&"prevMonthDay"!==e&&i%7==6&&n.weekNumbers.insertAdjacentHTML("beforeend","<span class='flatpickr-day'>"+n.config.getWeek(t)+"</span>"),ie("onDayCreate",r),r}function T(e){e.focus(),"range"===n.config.mode&&J(e)}function _(e){for(var t=e>0?0:n.config.showMonths-1,a=e>0?n.config.showMonths:-1,i=t;i!=a;i+=e)for(var o=n.daysContainer.children[i],r=e>0?0:o.children.length-1,l=e>0?o.children.length:-1,c=r;c!=l;c+=e){var s=o.children[c];if(-1===s.className.indexOf("hidden")&&W(s.dateObj))return s}}function I(e,t){var i=a(),o=B(i||document.body),r=void 0!==e?e:o?i:void 0!==n.selectedDateElem&&B(n.selectedDateElem)?n.selectedDateElem:void 0!==n.todayDateElem&&B(n.todayDateElem)?n.todayDateElem:_(t>0?1:-1);void 0===r?n._input.focus():o?function(e,t){for(var a=-1===e.className.indexOf("Month")?e.dateObj.getMonth():n.currentMonth,i=t>0?n.config.showMonths:-1,o=t>0?1:-1,r=a-n.currentMonth;r!=i;r+=o)for(var l=n.daysContainer.children[r],c=a-n.currentMonth===r?e.$i+t:t<0?l.children.length-1:0,s=l.children.length,d=c;d>=0&&d<s&&d!=(t>0?s:-1);d+=o){var u=l.children[d];if(-1===u.className.indexOf("hidden")&&W(u.dateObj)&&Math.abs(e.$i-d)>=Math.abs(t))return T(u)}n.changeMonth(o),I(_(o),0)}(r,t):T(r)}function S(e,t){for(var a=(new Date(e,t,1).getDay()-n.l10n.firstDayOfWeek+7)%7,i=n.utils.getDaysInMonth((t-1+12)%12,e),o=n.utils.getDaysInMonth(t,e),r=window.document.createDocumentFragment(),l=n.config.showMonths>1,c=l?"prevMonthDay hidden":"prevMonthDay",s=l?"nextMonthDay hidden":"nextMonthDay",d=i+1-a,f=0;d<=i;d++,f++)r.appendChild(k("flatpickr-day "+c,new Date(e,t-1,d),0,f));for(d=1;d<=o;d++,f++)r.appendChild(k("flatpickr-day",new Date(e,t,d),0,f));for(var m=o+1;m<=42-a&&(1===n.config.showMonths||f%7!=0);m++,f++)r.appendChild(k("flatpickr-day "+s,new Date(e,t+1,m%o),0,f));var g=(0,u.createElement)("div","dayContainer");return g.appendChild(r),g}function O(){if(void 0!==n.daysContainer){(0,u.clearNode)(n.daysContainer),n.weekNumbers&&(0,u.clearNode)(n.weekNumbers);for(var e=document.createDocumentFragment(),t=0;t<n.config.showMonths;t++){var a=new Date(n.currentYear,n.currentMonth,1);a.setMonth(n.currentMonth+t),e.appendChild(S(a.getFullYear(),a.getMonth()))}n.daysContainer.appendChild(e),n.days=n.daysContainer.firstChild,"range"===n.config.mode&&1===n.selectedDates.length&&J()}}function N(){if(!(n.config.showMonths>1||"dropdown"!==n.config.monthSelectorType)){var e=function(e){return!(void 0!==n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&e<n.config.minDate.getMonth())&&!(void 0!==n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()&&e>n.config.maxDate.getMonth())};n.monthsDropdownContainer.tabIndex=-1,n.monthsDropdownContainer.innerHTML="";for(var t=0;t<12;t++)if(e(t)){var a=(0,u.createElement)("option","flatpickr-monthDropdown-month");a.value=new Date(n.currentYear,t).getMonth().toString(),a.textContent=(0,m.monthToStr)(t,n.config.shorthandCurrentMonth,n.l10n),a.tabIndex=-1,n.currentMonth===t&&(a.selected=!0),n.monthsDropdownContainer.appendChild(a)}}}function A(){var e,t=(0,u.createElement)("div","flatpickr-month"),a=window.document.createDocumentFragment();n.config.showMonths>1||"static"===n.config.monthSelectorType?e=(0,u.createElement)("span","cur-month"):(n.monthsDropdownContainer=(0,u.createElement)("select","flatpickr-monthDropdown-months"),n.monthsDropdownContainer.setAttribute("aria-label",n.l10n.monthAriaLabel),M(n.monthsDropdownContainer,"change",(function(e){var t=(0,u.getEventTarget)(e),a=parseInt(t.value,10);n.changeMonth(a-n.currentMonth),ie("onMonthChange")})),N(),e=n.monthsDropdownContainer);var i=(0,u.createNumberInput)("cur-year",{tabindex:"-1"}),o=i.getElementsByTagName("input")[0];o.setAttribute("aria-label",n.l10n.yearAriaLabel),n.config.minDate&&o.setAttribute("min",n.config.minDate.getFullYear().toString()),n.config.maxDate&&(o.setAttribute("max",n.config.maxDate.getFullYear().toString()),o.disabled=!!n.config.minDate&&n.config.minDate.getFullYear()===n.config.maxDate.getFullYear());var r=(0,u.createElement)("div","flatpickr-current-month");return r.appendChild(e),r.appendChild(i),a.appendChild(r),t.appendChild(a),{container:t,yearElement:o,monthElement:e}}function P(){(0,u.clearNode)(n.monthNav),n.monthNav.appendChild(n.prevMonthNav),n.config.showMonths&&(n.yearElements=[],n.monthElements=[]);for(var e=n.config.showMonths;e--;){var t=A();n.yearElements.push(t.yearElement),n.monthElements.push(t.monthElement),n.monthNav.appendChild(t.container)}n.monthNav.appendChild(n.nextMonthNav)}function Y(){n.weekdayContainer?(0,u.clearNode)(n.weekdayContainer):n.weekdayContainer=(0,u.createElement)("div","flatpickr-weekdays");for(var e=n.config.showMonths;e--;){var t=(0,u.createElement)("div","flatpickr-weekdaycontainer");n.weekdayContainer.appendChild(t)}return F(),n.weekdayContainer}function F(){if(n.weekdayContainer){var e=n.l10n.firstDayOfWeek,t=l(n.l10n.weekdays.shorthand);e>0&&e<t.length&&(t=l(t.splice(e,t.length),t.splice(0,e)));for(var a=n.config.showMonths;a--;)n.weekdayContainer.children[a].innerHTML="\n <span class='flatpickr-weekday'>\n "+t.join("</span><span class='flatpickr-weekday'>")+"\n </span>\n "}}function j(e,t){void 0===t&&(t=!0);var a=t?e:e-n.currentMonth;a<0&&!0===n._hidePrevMonthArrow||a>0&&!0===n._hideNextMonthArrow||(n.currentMonth+=a,(n.currentMonth<0||n.currentMonth>11)&&(n.currentYear+=n.currentMonth>11?1:-1,n.currentMonth=(n.currentMonth+12)%12,ie("onYearChange"),N()),O(),ie("onMonthChange"),le())}function L(e){return n.calendarContainer.contains(e)}function H(e){if(n.isOpen&&!n.config.inline){var t=(0,u.getEventTarget)(e),a=L(t),i=!(t===n.input||t===n.altInput||n.element.contains(t)||e.path&&e.path.indexOf&&(~e.path.indexOf(n.input)||~e.path.indexOf(n.altInput)))&&!a&&!L(e.relatedTarget),o=!n.config.ignoredFocusElements.some((function(e){return e.contains(t)}));i&&o&&(n.config.allowInput&&n.setDate(n._input.value,!1,n.config.altInput?n.config.altFormat:n.config.dateFormat),void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement&&""!==n.input.value&&void 0!==n.input.value&&p(),n.close(),n.config&&"range"===n.config.mode&&1===n.selectedDates.length&&n.clear(!1))}}function R(e){if(!(!e||n.config.minDate&&e<n.config.minDate.getFullYear()||n.config.maxDate&&e>n.config.maxDate.getFullYear())){var t=e,a=n.currentYear!==t;n.currentYear=t||n.currentYear,n.config.maxDate&&n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth=Math.min(n.config.maxDate.getMonth(),n.currentMonth):n.config.minDate&&n.currentYear===n.config.minDate.getFullYear()&&(n.currentMonth=Math.max(n.config.minDate.getMonth(),n.currentMonth)),a&&(n.redraw(),ie("onYearChange"),N())}}function W(e,t){var a;void 0===t&&(t=!0);var i=n.parseDate(e,void 0,t);if(n.config.minDate&&i&&(0,f.compareDates)(i,n.config.minDate,void 0!==t?t:!n.minDateHasTime)<0||n.config.maxDate&&i&&(0,f.compareDates)(i,n.config.maxDate,void 0!==t?t:!n.maxDateHasTime)>0)return!1;if(!n.config.enable&&0===n.config.disable.length)return!0;if(void 0===i)return!1;for(var o=!!n.config.enable,r=null!==(a=n.config.enable)&&void 0!==a?a:n.config.disable,l=0,c=void 0;l<r.length;l++){if("function"==typeof(c=r[l])&&c(i))return o;if(c instanceof Date&&void 0!==i&&c.getTime()===i.getTime())return o;if("string"==typeof c){var s=n.parseDate(c,void 0,!0);return s&&s.getTime()===i.getTime()?o:!o}if("object"==typeof c&&void 0!==i&&c.from&&c.to&&i.getTime()>=c.from.getTime()&&i.getTime()<=c.to.getTime())return o}return!o}function B(e){return void 0!==n.daysContainer&&(-1===e.className.indexOf("hidden")&&-1===e.className.indexOf("flatpickr-disabled")&&n.daysContainer.contains(e))}function K(e){var t=e.target===n._input,a=n._input.value.trimEnd()!==ce();!t||!a||e.relatedTarget&&L(e.relatedTarget)||n.setDate(n._input.value,!0,e.target===n.altInput?n.config.altFormat:n.config.dateFormat)}function q(t){var i=(0,u.getEventTarget)(t),o=n.config.wrap?e.contains(i):i===n._input,r=n.config.allowInput,l=n.isOpen&&(!r||!o),c=n.config.inline&&o&&!r;if(13===t.keyCode&&o){if(r)return n.setDate(n._input.value,!0,i===n.altInput?n.config.altFormat:n.config.dateFormat),n.close(),i.blur();n.open()}else if(L(i)||l||c){var s=!!n.timeContainer&&n.timeContainer.contains(i);switch(t.keyCode){case 13:s?(t.preventDefault(),p(),G()):Z(t);break;case 27:t.preventDefault(),G();break;case 8:case 46:o&&!n.config.allowInput&&(t.preventDefault(),n.clear());break;case 37:case 39:if(s||o)n.hourElement&&n.hourElement.focus();else{t.preventDefault();var d=a();if(void 0!==n.daysContainer&&(!1===r||d&&B(d))){var f=39===t.keyCode?1:-1;t.ctrlKey?(t.stopPropagation(),j(f),I(_(1),0)):I(void 0,f)}}break;case 38:case 40:t.preventDefault();var m=40===t.keyCode?1:-1;n.daysContainer&&void 0!==i.$i||i===n.input||i===n.altInput?t.ctrlKey?(t.stopPropagation(),R(n.currentYear-m),I(_(1),0)):s||I(void 0,7*m):i===n.currentYearElement?R(n.currentYear-m):n.config.enableTime&&(!s&&n.hourElement&&n.hourElement.focus(),p(t),n._debouncedChange());break;case 9:if(s){var g=[n.hourElement,n.minuteElement,n.secondElement,n.amPM].concat(n.pluginElements).filter((function(e){return e})),v=g.indexOf(i);if(-1!==v){var D=g[v+(t.shiftKey?-1:1)];t.preventDefault(),(D||n._input).focus()}}else!n.config.noCalendar&&n.daysContainer&&n.daysContainer.contains(i)&&t.shiftKey&&(t.preventDefault(),n._input.focus())}}if(void 0!==n.amPM&&i===n.amPM)switch(t.key){case n.l10n.amPM[0].charAt(0):case n.l10n.amPM[0].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[0],h(),se();break;case n.l10n.amPM[1].charAt(0):case n.l10n.amPM[1].charAt(0).toLowerCase():n.amPM.textContent=n.l10n.amPM[1],h(),se()}(o||L(i))&&ie("onKeyDown",t)}function J(e,t){if(void 0===t&&(t="flatpickr-day"),1===n.selectedDates.length&&(!e||e.classList.contains(t)&&!e.classList.contains("flatpickr-disabled"))){for(var a=e?e.dateObj.getTime():n.days.firstElementChild.dateObj.getTime(),i=n.parseDate(n.selectedDates[0],void 0,!0).getTime(),o=Math.min(a,n.selectedDates[0].getTime()),r=Math.max(a,n.selectedDates[0].getTime()),l=!1,c=0,s=0,d=o;d<r;d+=f.duration.DAY)W(new Date(d),!0)||(l=l||d>o&&d<r,d<i&&(!c||d>c)?c=d:d>i&&(!s||d<s)&&(s=d));Array.from(n.rContainer.querySelectorAll("*:nth-child(-n+"+n.config.showMonths+") > ."+t)).forEach((function(t){var o=t.dateObj.getTime(),r=c>0&&o<c||s>0&&o>s;if(r)return t.classList.add("notAllowed"),void["inRange","startRange","endRange"].forEach((function(e){t.classList.remove(e)}));l&&!r||(["startRange","inRange","endRange","notAllowed"].forEach((function(e){t.classList.remove(e)})),void 0!==e&&(e.classList.add(a<=n.selectedDates[0].getTime()?"startRange":"endRange"),i<a&&o===i?t.classList.add("startRange"):i>a&&o===i&&t.classList.add("endRange"),o>=c&&(0===s||o<=s)&&(0,f.isBetween)(o,i,a)&&t.classList.add("inRange")))}))}}function U(){!n.isOpen||n.config.static||n.config.inline||X()}function $(e){return function(t){var a=n.config["_"+e+"Date"]=n.parseDate(t,n.config.dateFormat),i=n.config["_"+("min"===e?"max":"min")+"Date"];void 0!==a&&(n["min"===e?"minDateHasTime":"maxDateHasTime"]=a.getHours()>0||a.getMinutes()>0||a.getSeconds()>0),n.selectedDates&&(n.selectedDates=n.selectedDates.filter((function(e){return W(e)})),n.selectedDates.length||"min"!==e||D(a),se()),n.daysContainer&&(z(),void 0!==a?n.currentYearElement[e]=a.getFullYear().toString():n.currentYearElement.removeAttribute(e),n.currentYearElement.disabled=!!i&&void 0!==a&&i.getFullYear()===a.getFullYear())}}function Q(){return n.config.wrap?e.querySelector("[data-input]"):e}function V(){"object"!=typeof n.config.locale&&void 0===v.l10ns[n.config.locale]&&n.config.errorHandler(new Error("flatpickr: invalid locale "+n.config.locale)),n.l10n=r(r({},v.l10ns.default),"object"==typeof n.config.locale?n.config.locale:"default"!==n.config.locale?v.l10ns[n.config.locale]:void 0),m.tokenRegex.D="("+n.l10n.weekdays.shorthand.join("|")+")",m.tokenRegex.l="("+n.l10n.weekdays.longhand.join("|")+")",m.tokenRegex.M="("+n.l10n.months.shorthand.join("|")+")",m.tokenRegex.F="("+n.l10n.months.longhand.join("|")+")",m.tokenRegex.K="("+n.l10n.amPM[0]+"|"+n.l10n.amPM[1]+"|"+n.l10n.amPM[0].toLowerCase()+"|"+n.l10n.amPM[1].toLowerCase()+")",void 0===r(r({},t),JSON.parse(JSON.stringify(e.dataset||{}))).time_24hr&&void 0===v.defaultConfig.time_24hr&&(n.config.time_24hr=n.l10n.time_24hr),n.formatDate=(0,f.createDateFormatter)(n),n.parseDate=(0,f.createDateParser)({config:n.config,l10n:n.l10n})}function X(e){if("function"!=typeof n.config.position){if(void 0!==n.calendarContainer){ie("onPreCalendarPosition");var t=e||n._positionElement,a=Array.prototype.reduce.call(n.calendarContainer.children,(function(e,t){return e+t.offsetHeight}),0),i=n.calendarContainer.offsetWidth,o=n.config.position.split(" "),r=o[0],l=o.length>1?o[1]:null,c=t.getBoundingClientRect(),s=window.innerHeight-c.bottom,d="above"===r||"below"!==r&&s<a&&c.top>a,f=window.pageYOffset+c.top+(d?-a-2:t.offsetHeight+2);if((0,u.toggleClass)(n.calendarContainer,"arrowTop",!d),(0,u.toggleClass)(n.calendarContainer,"arrowBottom",d),!n.config.inline){var m=window.pageXOffset+c.left,g=!1,p=!1;"center"===l?(m-=(i-c.width)/2,g=!0):"right"===l&&(m-=i-c.width,p=!0),(0,u.toggleClass)(n.calendarContainer,"arrowLeft",!g&&!p),(0,u.toggleClass)(n.calendarContainer,"arrowCenter",g),(0,u.toggleClass)(n.calendarContainer,"arrowRight",p);var h=window.document.body.offsetWidth-(window.pageXOffset+c.right),v=m+i>window.document.body.offsetWidth,D=h+i>window.document.body.offsetWidth;if((0,u.toggleClass)(n.calendarContainer,"rightMost",v),!n.config.static)if(n.calendarContainer.style.top=f+"px",v)if(D){var C=function(){for(var e=null,t=0;t<document.styleSheets.length;t++){var n=document.styleSheets[t];if(n.cssRules){try{n.cssRules}catch(e){continue}e=n;break}}return null!=e?e:(a=document.createElement("style"),document.head.appendChild(a),a.sheet);var a}();if(void 0===C)return;var b=window.document.body.offsetWidth,M=Math.max(0,b/2-i/2),y=C.cssRules.length,w="{left:"+c.left+"px;right:auto;}";(0,u.toggleClass)(n.calendarContainer,"rightMost",!1),(0,u.toggleClass)(n.calendarContainer,"centerMost",!0),C.insertRule(".flatpickr-calendar.centerMost:before,.flatpickr-calendar.centerMost:after"+w,y),n.calendarContainer.style.left=M+"px",n.calendarContainer.style.right="auto"}else n.calendarContainer.style.left="auto",n.calendarContainer.style.right=h+"px";else n.calendarContainer.style.left=m+"px",n.calendarContainer.style.right="auto"}}}else n.config.position(n,e)}function z(){n.config.noCalendar||n.isMobile||(N(),le(),O())}function G(){n._input.focus(),-1!==window.navigator.userAgent.indexOf("MSIE")||void 0!==navigator.msMaxTouchPoints?setTimeout(n.close,0):n.close()}function Z(e){e.preventDefault(),e.stopPropagation();var t=(0,u.findParent)((0,u.getEventTarget)(e),(function(e){return e.classList&&e.classList.contains("flatpickr-day")&&!e.classList.contains("flatpickr-disabled")&&!e.classList.contains("notAllowed")}));if(void 0!==t){var a=t,i=n.latestSelectedDateObj=new Date(a.dateObj.getTime()),o=(i.getMonth()<n.currentMonth||i.getMonth()>n.currentMonth+n.config.showMonths-1)&&"range"!==n.config.mode;if(n.selectedDateElem=a,"single"===n.config.mode)n.selectedDates=[i];else if("multiple"===n.config.mode){var r=re(i);r?n.selectedDates.splice(parseInt(r),1):n.selectedDates.push(i)}else"range"===n.config.mode&&(2===n.selectedDates.length&&n.clear(!1,!1),n.latestSelectedDateObj=i,n.selectedDates.push(i),0!==(0,f.compareDates)(i,n.selectedDates[0],!0)&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()})));if(h(),o){var l=n.currentYear!==i.getFullYear();n.currentYear=i.getFullYear(),n.currentMonth=i.getMonth(),l&&(ie("onYearChange"),N()),ie("onMonthChange")}if(le(),O(),se(),o||"range"===n.config.mode||1!==n.config.showMonths?void 0!==n.selectedDateElem&&void 0===n.hourElement&&n.selectedDateElem&&n.selectedDateElem.focus():T(a),void 0!==n.hourElement&&void 0!==n.hourElement&&n.hourElement.focus(),n.config.closeOnSelect){var c="single"===n.config.mode&&!n.config.enableTime,s="range"===n.config.mode&&2===n.selectedDates.length&&!n.config.enableTime;(c||s)&&G()}y()}}n.parseDate=(0,f.createDateParser)({config:n.config,l10n:n.l10n}),n._handlers=[],n.pluginElements=[],n.loadedPlugins=[],n._bind=M,n._setHoursFromDate=D,n._positionCalendar=X,n.changeMonth=j,n.changeYear=R,n.clear=function(e,t){void 0===e&&(e=!0);void 0===t&&(t=!0);n.input.value="",void 0!==n.altInput&&(n.altInput.value="");void 0!==n.mobileInput&&(n.mobileInput.value="");n.selectedDates=[],n.latestSelectedDateObj=void 0,!0===t&&(n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth());if(!0===n.config.enableTime){var a=(0,f.getDefaultHours)(n.config);C(a.hours,a.minutes,a.seconds)}n.redraw(),e&&ie("onChange")},n.close=function(){n.isOpen=!1,n.isMobile||(void 0!==n.calendarContainer&&n.calendarContainer.classList.remove("open"),void 0!==n._input&&n._input.classList.remove("active"));ie("onClose")},n.onMouseOver=J,n._createElement=u.createElement,n.createDay=k,n.destroy=function(){void 0!==n.config&&ie("onDestroy");for(var e=n._handlers.length;e--;)n._handlers[e].remove();if(n._handlers=[],n.mobileInput)n.mobileInput.parentNode&&n.mobileInput.parentNode.removeChild(n.mobileInput),n.mobileInput=void 0;else if(n.calendarContainer&&n.calendarContainer.parentNode)if(n.config.static&&n.calendarContainer.parentNode){var t=n.calendarContainer.parentNode;if(t.lastChild&&t.removeChild(t.lastChild),t.parentNode){for(;t.firstChild;)t.parentNode.insertBefore(t.firstChild,t);t.parentNode.removeChild(t)}}else n.calendarContainer.parentNode.removeChild(n.calendarContainer);n.altInput&&(n.input.type="text",n.altInput.parentNode&&n.altInput.parentNode.removeChild(n.altInput),delete n.altInput);n.input&&(n.input.type=n.input._type,n.input.classList.remove("flatpickr-input"),n.input.removeAttribute("readonly"));["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach((function(e){try{delete n[e]}catch(e){}}))},n.isEnabled=W,n.jumpToDate=w,n.updateValue=se,n.open=function(e,t){void 0===t&&(t=n._positionElement);if(!0===n.isMobile){if(e){e.preventDefault();var a=(0,u.getEventTarget)(e);a&&a.blur()}return void 0!==n.mobileInput&&(n.mobileInput.focus(),n.mobileInput.click()),void ie("onOpen")}if(n._input.disabled||n.config.inline)return;var i=n.isOpen;n.isOpen=!0,i||(n.calendarContainer.classList.add("open"),n._input.classList.add("active"),ie("onOpen"),X(t));!0===n.config.enableTime&&!0===n.config.noCalendar&&(!1!==n.config.allowInput||void 0!==e&&n.timeContainer.contains(e.relatedTarget)||setTimeout((function(){return n.hourElement.select()}),50))},n.redraw=z,n.set=function(e,t){if(null!==e&&"object"==typeof e)for(var a in Object.assign(n.config,e),e)void 0!==ee[a]&&ee[a].forEach((function(e){return e()}));else n.config[e]=t,void 0!==ee[e]?ee[e].forEach((function(e){return e()})):c.HOOKS.indexOf(e)>-1&&(n.config[e]=(0,d.arrayify)(t));n.redraw(),se(!0)},n.setDate=function(e,t,a){void 0===t&&(t=!1);void 0===a&&(a=n.config.dateFormat);if(0!==e&&!e||e instanceof Array&&0===e.length)return n.clear(t);te(e,a),n.latestSelectedDateObj=n.selectedDates[n.selectedDates.length-1],n.redraw(),w(void 0,t),D(),0===n.selectedDates.length&&n.clear(!1);se(t),t&&ie("onChange")},n.toggle=function(e){if(!0===n.isOpen)return n.close();n.open(e)};var ee={locale:[V,F],showMonths:[P,o,Y],minDate:[w],maxDate:[w],positionElement:[ae],clickOpens:[function(){!0===n.config.clickOpens?(M(n._input,"focus",n.open),M(n._input,"click",n.open)):(n._input.removeEventListener("focus",n.open),n._input.removeEventListener("click",n.open))}]};function te(e,t){var a=[];if(e instanceof Array)a=e.map((function(e){return n.parseDate(e,t)}));else if(e instanceof Date||"number"==typeof e)a=[n.parseDate(e,t)];else if("string"==typeof e)switch(n.config.mode){case"single":case"time":a=[n.parseDate(e,t)];break;case"multiple":a=e.split(n.config.conjunction).map((function(e){return n.parseDate(e,t)}));break;case"range":a=e.split(n.l10n.rangeSeparator).map((function(e){return n.parseDate(e,t)}))}else n.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(e)));n.selectedDates=n.config.allowInvalidPreload?a:a.filter((function(e){return e instanceof Date&&W(e,!1)})),"range"===n.config.mode&&n.selectedDates.sort((function(e,t){return e.getTime()-t.getTime()}))}function ne(e){return e.slice().map((function(e){return"string"==typeof e||"number"==typeof e||e instanceof Date?n.parseDate(e,void 0,!0):e&&"object"==typeof e&&e.from&&e.to?{from:n.parseDate(e.from,void 0),to:n.parseDate(e.to,void 0)}:e})).filter((function(e){return e}))}function ae(){n._positionElement=n.config.positionElement||n._input}function ie(e,t){if(void 0!==n.config){var a=n.config[e];if(void 0!==a&&a.length>0)for(var i=0;a[i]&&i<a.length;i++)a[i](n.selectedDates,n.input.value,n,t);"onChange"===e&&(n.input.dispatchEvent(oe("change")),n.input.dispatchEvent(oe("input")))}}function oe(e){var t=document.createEvent("Event");return t.initEvent(e,!0,!0),t}function re(e){for(var t=0;t<n.selectedDates.length;t++){var a=n.selectedDates[t];if(a instanceof Date&&0===(0,f.compareDates)(a,e))return""+t}return!1}function le(){n.config.noCalendar||n.isMobile||!n.monthNav||(n.yearElements.forEach((function(e,t){var a=new Date(n.currentYear,n.currentMonth,1);a.setMonth(n.currentMonth+t),n.config.showMonths>1||"static"===n.config.monthSelectorType?n.monthElements[t].textContent=(0,m.monthToStr)(a.getMonth(),n.config.shorthandCurrentMonth,n.l10n)+" ":n.monthsDropdownContainer.value=a.getMonth().toString(),e.value=a.getFullYear().toString()})),n._hidePrevMonthArrow=void 0!==n.config.minDate&&(n.currentYear===n.config.minDate.getFullYear()?n.currentMonth<=n.config.minDate.getMonth():n.currentYear<n.config.minDate.getFullYear()),n._hideNextMonthArrow=void 0!==n.config.maxDate&&(n.currentYear===n.config.maxDate.getFullYear()?n.currentMonth+1>n.config.maxDate.getMonth():n.currentYear>n.config.maxDate.getFullYear()))}function ce(e){var t=e||(n.config.altInput?n.config.altFormat:n.config.dateFormat);return n.selectedDates.map((function(e){return n.formatDate(e,t)})).filter((function(e,t,a){return"range"!==n.config.mode||n.config.enableTime||a.indexOf(e)===t})).join("range"!==n.config.mode?n.config.conjunction:n.l10n.rangeSeparator)}function se(e){void 0===e&&(e=!0),void 0!==n.mobileInput&&n.mobileFormatStr&&(n.mobileInput.value=void 0!==n.latestSelectedDateObj?n.formatDate(n.latestSelectedDateObj,n.mobileFormatStr):""),n.input.value=ce(n.config.dateFormat),void 0!==n.altInput&&(n.altInput.value=ce(n.config.altFormat)),!1!==e&&ie("onValueUpdate")}function de(e){var t=(0,u.getEventTarget)(e),a=n.prevMonthNav.contains(t),i=n.nextMonthNav.contains(t);a||i?j(a?-1:1):n.yearElements.indexOf(t)>=0?t.select():t.classList.contains("arrowUp")?n.changeYear(n.currentYear+1):t.classList.contains("arrowDown")&&n.changeYear(n.currentYear-1)}return function(){n.element=n.input=e,n.isOpen=!1,function(){var a=["wrap","weekNumbers","allowInput","allowInvalidPreload","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],o=r(r({},JSON.parse(JSON.stringify(e.dataset||{}))),t),l={};n.config.parseDate=o.parseDate,n.config.formatDate=o.formatDate,Object.defineProperty(n.config,"enable",{get:function(){return n.config._enable},set:function(e){n.config._enable=ne(e)}}),Object.defineProperty(n.config,"disable",{get:function(){return n.config._disable},set:function(e){n.config._disable=ne(e)}});var s="time"===o.mode;if(!o.dateFormat&&(o.enableTime||s)){var u=v.defaultConfig.dateFormat||c.defaults.dateFormat;l.dateFormat=o.noCalendar||s?"H:i"+(o.enableSeconds?":S":""):u+" H:i"+(o.enableSeconds?":S":"")}if(o.altInput&&(o.enableTime||s)&&!o.altFormat){var f=v.defaultConfig.altFormat||c.defaults.altFormat;l.altFormat=o.noCalendar||s?"h:i"+(o.enableSeconds?":S K":" K"):f+" h:i"+(o.enableSeconds?":S":"")+" K"}Object.defineProperty(n.config,"minDate",{get:function(){return n.config._minDate},set:$("min")}),Object.defineProperty(n.config,"maxDate",{get:function(){return n.config._maxDate},set:$("max")});var m=function(e){return function(t){n.config["min"===e?"_minTime":"_maxTime"]=n.parseDate(t,"H:i:S")}};Object.defineProperty(n.config,"minTime",{get:function(){return n.config._minTime},set:m("min")}),Object.defineProperty(n.config,"maxTime",{get:function(){return n.config._maxTime},set:m("max")}),"time"===o.mode&&(n.config.noCalendar=!0,n.config.enableTime=!0);Object.assign(n.config,l,o);for(var g=0;g<a.length;g++)n.config[a[g]]=!0===n.config[a[g]]||"true"===n.config[a[g]];c.HOOKS.filter((function(e){return void 0!==n.config[e]})).forEach((function(e){n.config[e]=(0,d.arrayify)(n.config[e]||[]).map(i)})),n.isMobile=!n.config.disableMobile&&!n.config.inline&&"single"===n.config.mode&&!n.config.disable.length&&!n.config.enable&&!n.config.weekNumbers&&/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);for(g=0;g<n.config.plugins.length;g++){var p=n.config.plugins[g](n)||{};for(var h in p)c.HOOKS.indexOf(h)>-1?n.config[h]=(0,d.arrayify)(p[h]).map(i).concat(n.config[h]):void 0===o[h]&&(n.config[h]=p[h])}o.altInputClass||(n.config.altInputClass=Q().className+" "+n.config.altInputClass);ie("onParseConfig")}(),V(),function(){if(n.input=Q(),!n.input)return void n.config.errorHandler(new Error("Invalid input element specified"));n.input._type=n.input.type,n.input.type="text",n.input.classList.add("flatpickr-input"),n._input=n.input,n.config.altInput&&(n.altInput=(0,u.createElement)(n.input.nodeName,n.config.altInputClass),n._input=n.altInput,n.altInput.placeholder=n.input.placeholder,n.altInput.disabled=n.input.disabled,n.altInput.required=n.input.required,n.altInput.tabIndex=n.input.tabIndex,n.altInput.type="text",n.input.setAttribute("type","hidden"),!n.config.static&&n.input.parentNode&&n.input.parentNode.insertBefore(n.altInput,n.input.nextSibling));n.config.allowInput||n._input.setAttribute("readonly","readonly");ae()}(),function(){n.selectedDates=[],n.now=n.parseDate(n.config.now)||new Date;var e=n.config.defaultDate||("INPUT"!==n.input.nodeName&&"TEXTAREA"!==n.input.nodeName||!n.input.placeholder||n.input.value!==n.input.placeholder?n.input.value:null);e&&te(e,n.config.dateFormat);n._initialDate=n.selectedDates.length>0?n.selectedDates[0]:n.config.minDate&&n.config.minDate.getTime()>n.now.getTime()?n.config.minDate:n.config.maxDate&&n.config.maxDate.getTime()<n.now.getTime()?n.config.maxDate:n.now,n.currentYear=n._initialDate.getFullYear(),n.currentMonth=n._initialDate.getMonth(),n.selectedDates.length>0&&(n.latestSelectedDateObj=n.selectedDates[0]);void 0!==n.config.minTime&&(n.config.minTime=n.parseDate(n.config.minTime,"H:i"));void 0!==n.config.maxTime&&(n.config.maxTime=n.parseDate(n.config.maxTime,"H:i"));n.minDateHasTime=!!n.config.minDate&&(n.config.minDate.getHours()>0||n.config.minDate.getMinutes()>0||n.config.minDate.getSeconds()>0),n.maxDateHasTime=!!n.config.maxDate&&(n.config.maxDate.getHours()>0||n.config.maxDate.getMinutes()>0||n.config.maxDate.getSeconds()>0)}(),n.utils={getDaysInMonth:function(e,t){return void 0===e&&(e=n.currentMonth),void 0===t&&(t=n.currentYear),1===e&&(t%4==0&&t%100!=0||t%400==0)?29:n.l10n.daysInMonth[e]}},n.isMobile||function(){var e=window.document.createDocumentFragment();if(n.calendarContainer=(0,u.createElement)("div","flatpickr-calendar"),n.calendarContainer.tabIndex=-1,!n.config.noCalendar){if(e.appendChild((n.monthNav=(0,u.createElement)("div","flatpickr-months"),n.yearElements=[],n.monthElements=[],n.prevMonthNav=(0,u.createElement)("span","flatpickr-prev-month"),n.prevMonthNav.innerHTML=n.config.prevArrow,n.nextMonthNav=(0,u.createElement)("span","flatpickr-next-month"),n.nextMonthNav.innerHTML=n.config.nextArrow,P(),Object.defineProperty(n,"_hidePrevMonthArrow",{get:function(){return n.__hidePrevMonthArrow},set:function(e){n.__hidePrevMonthArrow!==e&&((0,u.toggleClass)(n.prevMonthNav,"flatpickr-disabled",e),n.__hidePrevMonthArrow=e)}}),Object.defineProperty(n,"_hideNextMonthArrow",{get:function(){return n.__hideNextMonthArrow},set:function(e){n.__hideNextMonthArrow!==e&&((0,u.toggleClass)(n.nextMonthNav,"flatpickr-disabled",e),n.__hideNextMonthArrow=e)}}),n.currentYearElement=n.yearElements[0],le(),n.monthNav)),n.innerContainer=(0,u.createElement)("div","flatpickr-innerContainer"),n.config.weekNumbers){var t=function(){n.calendarContainer.classList.add("hasWeeks");var e=(0,u.createElement)("div","flatpickr-weekwrapper");e.appendChild((0,u.createElement)("span","flatpickr-weekday",n.l10n.weekAbbreviation));var t=(0,u.createElement)("div","flatpickr-weeks");return e.appendChild(t),{weekWrapper:e,weekNumbers:t}}(),a=t.weekWrapper,i=t.weekNumbers;n.innerContainer.appendChild(a),n.weekNumbers=i,n.weekWrapper=a}n.rContainer=(0,u.createElement)("div","flatpickr-rContainer"),n.rContainer.appendChild(Y()),n.daysContainer||(n.daysContainer=(0,u.createElement)("div","flatpickr-days"),n.daysContainer.tabIndex=-1),O(),n.rContainer.appendChild(n.daysContainer),n.innerContainer.appendChild(n.rContainer),e.appendChild(n.innerContainer)}n.config.enableTime&&e.appendChild(function(){n.calendarContainer.classList.add("hasTime"),n.config.noCalendar&&n.calendarContainer.classList.add("noCalendar");var e=(0,f.getDefaultHours)(n.config);n.timeContainer=(0,u.createElement)("div","flatpickr-time"),n.timeContainer.tabIndex=-1;var t=(0,u.createElement)("span","flatpickr-time-separator",":"),a=(0,u.createNumberInput)("flatpickr-hour",{"aria-label":n.l10n.hourAriaLabel});n.hourElement=a.getElementsByTagName("input")[0];var i=(0,u.createNumberInput)("flatpickr-minute",{"aria-label":n.l10n.minuteAriaLabel});n.minuteElement=i.getElementsByTagName("input")[0],n.hourElement.tabIndex=n.minuteElement.tabIndex=-1,n.hourElement.value=(0,d.pad)(n.latestSelectedDateObj?n.latestSelectedDateObj.getHours():n.config.time_24hr?e.hours:function(e){switch(e%24){case 0:case 12:return 12;default:return e%12}}(e.hours)),n.minuteElement.value=(0,d.pad)(n.latestSelectedDateObj?n.latestSelectedDateObj.getMinutes():e.minutes),n.hourElement.setAttribute("step",n.config.hourIncrement.toString()),n.minuteElement.setAttribute("step",n.config.minuteIncrement.toString()),n.hourElement.setAttribute("min",n.config.time_24hr?"0":"1"),n.hourElement.setAttribute("max",n.config.time_24hr?"23":"12"),n.hourElement.setAttribute("maxlength","2"),n.minuteElement.setAttribute("min","0"),n.minuteElement.setAttribute("max","59"),n.minuteElement.setAttribute("maxlength","2"),n.timeContainer.appendChild(a),n.timeContainer.appendChild(t),n.timeContainer.appendChild(i),n.config.time_24hr&&n.timeContainer.classList.add("time24hr");if(n.config.enableSeconds){n.timeContainer.classList.add("hasSeconds");var o=(0,u.createNumberInput)("flatpickr-second");n.secondElement=o.getElementsByTagName("input")[0],n.secondElement.value=(0,d.pad)(n.latestSelectedDateObj?n.latestSelectedDateObj.getSeconds():e.seconds),n.secondElement.setAttribute("step",n.minuteElement.getAttribute("step")),n.secondElement.setAttribute("min","0"),n.secondElement.setAttribute("max","59"),n.secondElement.setAttribute("maxlength","2"),n.timeContainer.appendChild((0,u.createElement)("span","flatpickr-time-separator",":")),n.timeContainer.appendChild(o)}n.config.time_24hr||(n.amPM=(0,u.createElement)("span","flatpickr-am-pm",n.l10n.amPM[(0,d.int)((n.latestSelectedDateObj?n.hourElement.value:n.config.defaultHour)>11)]),n.amPM.title=n.l10n.toggleTitle,n.amPM.tabIndex=-1,n.timeContainer.appendChild(n.amPM));return n.timeContainer}());(0,u.toggleClass)(n.calendarContainer,"rangeMode","range"===n.config.mode),(0,u.toggleClass)(n.calendarContainer,"animate",!0===n.config.animate),(0,u.toggleClass)(n.calendarContainer,"multiMonth",n.config.showMonths>1),n.calendarContainer.appendChild(e);var o=void 0!==n.config.appendTo&&void 0!==n.config.appendTo.nodeType;if((n.config.inline||n.config.static)&&(n.calendarContainer.classList.add(n.config.inline?"inline":"static"),n.config.inline&&(!o&&n.element.parentNode?n.element.parentNode.insertBefore(n.calendarContainer,n._input.nextSibling):void 0!==n.config.appendTo&&n.config.appendTo.appendChild(n.calendarContainer)),n.config.static)){var r=(0,u.createElement)("div","flatpickr-wrapper");n.element.parentNode&&n.element.parentNode.insertBefore(r,n.element),r.appendChild(n.element),n.altInput&&r.appendChild(n.altInput),r.appendChild(n.calendarContainer)}n.config.static||n.config.inline||(void 0!==n.config.appendTo?n.config.appendTo:window.document.body).appendChild(n.calendarContainer)}(),function(){n.config.wrap&&["open","close","toggle","clear"].forEach((function(e){Array.prototype.forEach.call(n.element.querySelectorAll("[data-"+e+"]"),(function(t){return M(t,"click",n[e])}))}));if(n.isMobile)return void function(){var e=n.config.enableTime?n.config.noCalendar?"time":"datetime-local":"date";n.mobileInput=(0,u.createElement)("input",n.input.className+" flatpickr-mobile"),n.mobileInput.tabIndex=1,n.mobileInput.type=e,n.mobileInput.disabled=n.input.disabled,n.mobileInput.required=n.input.required,n.mobileInput.placeholder=n.input.placeholder,n.mobileFormatStr="datetime-local"===e?"Y-m-d\\TH:i:S":"date"===e?"Y-m-d":"H:i:S",n.selectedDates.length>0&&(n.mobileInput.defaultValue=n.mobileInput.value=n.formatDate(n.selectedDates[0],n.mobileFormatStr));n.config.minDate&&(n.mobileInput.min=n.formatDate(n.config.minDate,"Y-m-d"));n.config.maxDate&&(n.mobileInput.max=n.formatDate(n.config.maxDate,"Y-m-d"));n.input.getAttribute("step")&&(n.mobileInput.step=String(n.input.getAttribute("step")));n.input.type="hidden",void 0!==n.altInput&&(n.altInput.type="hidden");try{n.input.parentNode&&n.input.parentNode.insertBefore(n.mobileInput,n.input.nextSibling)}catch(e){}M(n.mobileInput,"change",(function(e){n.setDate((0,u.getEventTarget)(e).value,!1,n.mobileFormatStr),ie("onChange"),ie("onClose")}))}();var e=(0,d.debounce)(U,50);n._debouncedChange=(0,d.debounce)(y,g),n.daysContainer&&!/iPhone|iPad|iPod/i.test(navigator.userAgent)&&M(n.daysContainer,"mouseover",(function(e){"range"===n.config.mode&&J((0,u.getEventTarget)(e))}));M(n._input,"keydown",q),void 0!==n.calendarContainer&&M(n.calendarContainer,"keydown",q);n.config.inline||n.config.static||M(window,"resize",e);void 0!==window.ontouchstart?M(window.document,"touchstart",H):M(window.document,"mousedown",H);M(window.document,"focus",H,{capture:!0}),!0===n.config.clickOpens&&(M(n._input,"focus",n.open),M(n._input,"click",n.open));void 0!==n.daysContainer&&(M(n.monthNav,"click",de),M(n.monthNav,["keyup","increment"],b),M(n.daysContainer,"click",Z));if(void 0!==n.timeContainer&&void 0!==n.minuteElement&&void 0!==n.hourElement){var t=function(e){return(0,u.getEventTarget)(e).select()};M(n.timeContainer,["increment"],p),M(n.timeContainer,"blur",p,{capture:!0}),M(n.timeContainer,"click",E),M([n.hourElement,n.minuteElement],["focus","click"],t),void 0!==n.secondElement&&M(n.secondElement,"focus",(function(){return n.secondElement&&n.secondElement.select()})),void 0!==n.amPM&&M(n.amPM,"click",(function(e){p(e)}))}n.config.allowInput&&M(n._input,"blur",K)}(),(n.selectedDates.length||n.config.noCalendar)&&(n.config.enableTime&&D(n.config.noCalendar?n.latestSelectedDateObj:void 0),se(!1)),o();var a=/^((?!chrome|android).)*safari/i.test(navigator.userAgent);!n.isMobile&&a&&X(),ie("onReady")}(),n}function h(e,t){for(var n=Array.prototype.slice.call(e).filter((function(e){return e instanceof HTMLElement})),a=[],i=0;i<n.length;i++){var o=n[i];try{if(null!==o.getAttribute("data-fp-omit"))continue;void 0!==o._flatpickr&&(o._flatpickr.destroy(),o._flatpickr=void 0),o._flatpickr=p(o,t||{}),a.push(o._flatpickr)}catch(e){console.error(e)}}return 1===a.length?a[0]:a}"undefined"!=typeof HTMLElement&&"undefined"!=typeof HTMLCollection&&"undefined"!=typeof NodeList&&(HTMLCollection.prototype.flatpickr=NodeList.prototype.flatpickr=function(e){return h(this,e)},HTMLElement.prototype.flatpickr=function(e){return h([this],e)});var v=function(e,t){return"string"==typeof e?h(window.document.querySelectorAll(e),t):e instanceof Node?h([e],t):h(e,t)};v.defaultConfig={},v.l10ns={en:r({},s.default),default:r({},s.default)},v.localize=function(e){v.l10ns.default=r(r({},v.l10ns.default),e)},v.setDefaults=function(e){v.defaultConfig=r(r({},v.defaultConfig),e)},v.parseDate=(0,f.createDateParser)({}),v.formatDate=(0,f.createDateFormatter)({}),v.compareDates=f.compareDates,"undefined"!=typeof jQuery&&void 0!==jQuery.fn&&(jQuery.fn.flatpickr=function(e){return h(this,e)}),Date.prototype.fp_incr=function(e){return new Date(this.getFullYear(),this.getMonth(),this.getDate()+("string"==typeof e?parseInt(e,10):e))},"undefined"!=typeof window&&(window.flatpickr=v),n.default=v},
59
59
  "651d495396": function _(e,n,o,t,a){t(),o.HOOKS=["onChange","onClose","onDayCreate","onDestroy","onKeyDown","onMonthChange","onOpen","onParseConfig","onReady","onValueUpdate","onYearChange","onPreCalendarPosition"],o.defaults={_disable:[],allowInput:!1,allowInvalidPreload:!1,altFormat:"F j, Y",altInput:!1,altInputClass:"form-control input",animate:"object"==typeof window&&-1===window.navigator.userAgent.indexOf("MSIE"),ariaDateFormat:"F j, Y",autoFillDefaultTime:!0,clickOpens:!0,closeOnSelect:!0,conjunction:", ",dateFormat:"Y-m-d",defaultHour:12,defaultMinute:0,defaultSeconds:0,disable:[],disableMobile:!1,enableSeconds:!1,enableTime:!1,errorHandler:function(e){return"undefined"!=typeof console&&console.warn(e)},getWeek:function(e){var n=new Date(e.getTime());n.setHours(0,0,0,0),n.setDate(n.getDate()+3-(n.getDay()+6)%7);var o=new Date(n.getFullYear(),0,4);return 1+Math.round(((n.getTime()-o.getTime())/864e5-3+(o.getDay()+6)%7)/7)},hourIncrement:1,ignoredFocusElements:[],inline:!1,locale:"default",minuteIncrement:5,mode:"single",monthSelectorType:"dropdown",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>",noCalendar:!1,now:new Date,onChange:[],onClose:[],onDayCreate:[],onDestroy:[],onKeyDown:[],onMonthChange:[],onOpen:[],onParseConfig:[],onReady:[],onValueUpdate:[],onYearChange:[],onPreCalendarPosition:[],plugins:[],position:"auto",positionElement:void 0,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>",shorthandCurrentMonth:!1,showMonths:1,static:!1,time_24hr:!1,weekNumbers:!1,wrap:!1}},
@@ -63,7 +63,7 @@
63
63
  "1bb8c967d1": function _(e,t,n,a,r){a();const i=e("3d14787c35"),o=e("651d495396"),s=e("3bfa124fda");n.createDateFormatter=function(e){var t=e.config,n=void 0===t?o.defaults:t,a=e.l10n,r=void 0===a?s.english:a,u=e.isMobile,f=void 0!==u&&u;return function(e,t,a){var o=a||r;return void 0===n.formatDate||f?t.split("").map((function(t,a,r){return i.formats[t]&&"\\"!==r[a-1]?i.formats[t](e,o,n):"\\"!==t?t:""})).join(""):n.formatDate(e,t,o)}};n.createDateParser=function(e){var t=e.config,n=void 0===t?o.defaults:t,a=e.l10n,r=void 0===a?s.english:a;return function(e,t,a,s){if(0===e||e){var u,f=s||r,d=e;if(e instanceof Date)u=new Date(e.getTime());else if("string"!=typeof e&&void 0!==e.toFixed)u=new Date(e);else if("string"==typeof e){var c=t||(n||o.defaults).dateFormat,g=String(e).trim();if("today"===g)u=new Date,a=!0;else if(n&&n.parseDate)u=n.parseDate(e,c);else if(/Z$/.test(g)||/GMT$/.test(g))u=new Date(e);else{for(var m=void 0,l=[],v=0,D=0,h="";v<c.length;v++){var w=c[v],M="\\"===w,p="\\"===c[v-1]||M;if(i.tokenRegex[w]&&!p){h+=i.tokenRegex[w];var H=new RegExp(h).exec(e);H&&(m=!0)&&l["Y"!==w?"push":"unshift"]({fn:i.revFormat[w],val:H[++D]})}else M||(h+=".")}u=n&&n.noCalendar?new Date((new Date).setHours(0,0,0,0)):new Date((new Date).getFullYear(),0,1,0,0,0,0),l.forEach((function(e){var t=e.fn,n=e.val;return u=t(u,n,f)||u})),u=m?u:void 0}}if(u instanceof Date&&!isNaN(u.getTime()))return!0===a&&u.setHours(0,0,0,0),u;n.errorHandler(new Error("Invalid date provided: "+d))}}},n.compareDates=function(e,t,n){return void 0===n&&(n=!0),!1!==n?new Date(e.getTime()).setHours(0,0,0,0)-new Date(t.getTime()).setHours(0,0,0,0):e.getTime()-t.getTime()},n.compareTimes=function(e,t){return 3600*(e.getHours()-t.getHours())+60*(e.getMinutes()-t.getMinutes())+e.getSeconds()-t.getSeconds()};n.isBetween=function(e,t,n){return e>Math.min(t,n)&&e<Math.max(t,n)};n.calculateSecondsSinceMidnight=function(e,t,n){return 3600*e+60*t+n};n.parseSeconds=function(e){var t=Math.floor(e/3600),n=(e-3600*t)/60;return[t,n,e-3600*t-60*n]},n.duration={DAY:864e5},n.getDefaultHours=function(e){var t=e.defaultHour,n=e.defaultMinute,a=e.defaultSeconds;if(void 0!==e.minDate){var r=e.minDate.getHours(),i=e.minDate.getMinutes(),o=e.minDate.getSeconds();t<r&&(t=r),t===r&&n<i&&(n=i),t===r&&n===i&&a<o&&(a=e.minDate.getSeconds())}if(void 0!==e.maxDate){var s=e.maxDate.getHours(),u=e.maxDate.getMinutes();(t=Math.min(t,s))===s&&(n=Math.min(u,n)),t===s&&n===u&&(a=e.maxDate.getSeconds())}return{hours:t,minutes:n,seconds:a}}},
64
64
  "3d14787c35": function _(t,n,e,o,r){o();const u=t("15458073ce");var a=function(){};e.monthToStr=function(t,n,e){return e.months[n?"shorthand":"longhand"][t]},e.revFormat={D:a,F:function(t,n,e){t.setMonth(e.months.longhand.indexOf(n))},G:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},H:function(t,n){t.setHours(parseFloat(n))},J:function(t,n){t.setDate(parseFloat(n))},K:function(t,n,e){t.setHours(t.getHours()%12+12*(0,u.int)(new RegExp(e.amPM[1],"i").test(n)))},M:function(t,n,e){t.setMonth(e.months.shorthand.indexOf(n))},S:function(t,n){t.setSeconds(parseFloat(n))},U:function(t,n){return new Date(1e3*parseFloat(n))},W:function(t,n,e){var o=parseInt(n),r=new Date(t.getFullYear(),0,2+7*(o-1),0,0,0,0);return r.setDate(r.getDate()-r.getDay()+e.firstDayOfWeek),r},Y:function(t,n){t.setFullYear(parseFloat(n))},Z:function(t,n){return new Date(n)},d:function(t,n){t.setDate(parseFloat(n))},h:function(t,n){t.setHours((t.getHours()>=12?12:0)+parseFloat(n))},i:function(t,n){t.setMinutes(parseFloat(n))},j:function(t,n){t.setDate(parseFloat(n))},l:a,m:function(t,n){t.setMonth(parseFloat(n)-1)},n:function(t,n){t.setMonth(parseFloat(n)-1)},s:function(t,n){t.setSeconds(parseFloat(n))},u:function(t,n){return new Date(parseFloat(n))},w:a,y:function(t,n){t.setFullYear(2e3+parseFloat(n))}},e.tokenRegex={D:"",F:"",G:"(\\d\\d|\\d)",H:"(\\d\\d|\\d)",J:"(\\d\\d|\\d)\\w+",K:"",M:"",S:"(\\d\\d|\\d)",U:"(.+)",W:"(\\d\\d|\\d)",Y:"(\\d{4})",Z:"(.+)",d:"(\\d\\d|\\d)",h:"(\\d\\d|\\d)",i:"(\\d\\d|\\d)",j:"(\\d\\d|\\d)",l:"",m:"(\\d\\d|\\d)",n:"(\\d\\d|\\d)",s:"(\\d\\d|\\d)",u:"(.+)",w:"(\\d\\d|\\d)",y:"(\\d{2})"},e.formats={Z:function(t){return t.toISOString()},D:function(t,n,o){return n.weekdays.shorthand[e.formats.w(t,n,o)]},F:function(t,n,o){return(0,e.monthToStr)(e.formats.n(t,n,o)-1,!1,n)},G:function(t,n,o){return(0,u.pad)(e.formats.h(t,n,o))},H:function(t){return(0,u.pad)(t.getHours())},J:function(t,n){return void 0!==n.ordinal?t.getDate()+n.ordinal(t.getDate()):t.getDate()},K:function(t,n){return n.amPM[(0,u.int)(t.getHours()>11)]},M:function(t,n){return(0,e.monthToStr)(t.getMonth(),!0,n)},S:function(t){return(0,u.pad)(t.getSeconds())},U:function(t){return t.getTime()/1e3},W:function(t,n,e){return e.getWeek(t)},Y:function(t){return(0,u.pad)(t.getFullYear(),4)},d:function(t){return(0,u.pad)(t.getDate())},h:function(t){return t.getHours()%12?t.getHours()%12:12},i:function(t){return(0,u.pad)(t.getMinutes())},j:function(t){return t.getDate()},l:function(t,n){return n.weekdays.longhand[t.getDay()]},m:function(t){return(0,u.pad)(t.getMonth()+1)},n:function(t){return t.getMonth()+1},s:function(t){return t.getSeconds()},u:function(t){return t.getTime()},w:function(t){return t.getDay()},y:function(t){return String(t.getFullYear()).substring(2)}}},
65
65
  "6f45019dc1": function _(n,t,o,r,e){"function"!=typeof Object.assign&&(Object.assign=function(n){for(var t=[],o=1;o<arguments.length;o++)t[o-1]=arguments[o];if(!n)throw TypeError("Cannot convert undefined or null to object");for(var r=function(t){t&&Object.keys(t).forEach((function(o){return n[o]=t[o]}))},e=0,c=t;e<c.length;e++){r(c[e])}return n})},
66
- "991e3a226c": function _(e,t,o,i,a){i();const n=e("tslib");var s;const r=e("@bokehjs/core/dom"),c=e("@bokehjs/models/sources/column_data_source"),d=e("99a25e6992"),l=e("fd9108e30e"),_=e("@bokehjs/models/layouts/layout_dom"),h=e("9588ab7c9e"),p=n.__importDefault(e("093eb75864"));function u(){const e={},t=window.deck,o=Object.keys(t).filter((e=>e.charAt(0)===e.charAt(0).toUpperCase()));for(const i of o)e[i]=t[i];return e}class w extends _.LayoutDOMView{connect_signals(){super.connect_signals();const{data:e,mapbox_api_key:t,tooltip:o,layers:i,initialViewState:a,data_sources:n}=this.model.properties;this.on_change([t,o],(()=>this.render())),this.on_change([e,a],(()=>this.updateDeck())),this.on_change([i],(()=>this._update_layers())),this.on_change([n],(()=>this._connect_sources(!0))),this._layer_map={},this._connected=[],this._connect_sources()}remove(){this.deckGL.finalize(),super.remove()}_update_layers(){this._layer_map={},this._update_data(!0)}_connect_sources(e=!1){for(const e of this.model.data_sources)this._connected.indexOf(e)<0&&(this.connect(e.properties.data.change,(()=>this._update_data(!0))),this._connected.push(e));this._update_data(e)}initialize(){if(super.initialize(),window.deck.JSONConverter){const{CSVLoader:e,Tiles3DLoader:t}=window.loaders;window.loaders.registerLoaders([t,e]);const o={classes:u(),enumerations:{COORDINATE_SYSTEM:window.deck.COORDINATE_SYSTEM,GL:p.default},constants:{Tiles3DLoader:t}};this.jsonConverter=new window.deck.JSONConverter({configuration:o})}}_update_data(e=!0){let t=0;for(const e of this.model.layers){let o;if(t+=1,t-1 in this._layer_map)o=this.model.data_sources[this._layer_map[t-1]];else{if("number"!=typeof e.data)continue;this._layer_map[t-1]=e.data,o=this.model.data_sources[e.data]}e.data=(0,l.transform_cds_to_records)(o)}e&&this.updateDeck()}_on_click_event(e){const t={coordinate:e.coordinate,lngLat:e.coordinate,index:e.index};e.layer&&(t.layer=e.layer.id),this.model.clickState=t}_on_hover_event(e){if(null==e.coordinate)return;const t={coordinate:e.coordinate,lngLat:e.coordinate,index:e.index};e.layer&&(t.layer=e.layer.id),this.model.hoverState=t}_on_viewState_event(e){const t=Object.assign({},e.viewState);delete t.normalize;for(const e in t)e.startsWith("transition")&&delete t[e];const o=new window.deck.WebMercatorViewport(t);t.nw=o.unproject([0,0]),t.se=o.unproject([o.width,o.height]),this.model.viewState=t}get child_models(){return[]}getData(){const e=this.model.throttle.view||200,t=this.model.throttle.hover||100,o=(0,d.debounce)((e=>this._on_viewState_event(e)),e,!1),i=(0,d.debounce)((e=>this._on_hover_event(e)),t,!1);return Object.assign(Object.assign({},this.model.data),{layers:this.model.layers,initialViewState:this.model.initialViewState,onViewStateChange:o,onClick:e=>this._on_click_event(e),onHover:i})}updateDeck(){if(!this.deckGL)return void this.render();const e=this.getData();if(window.deck.updateDeck)window.deck.updateDeck(e,this.deckGL);else{const t=this.jsonConverter.convert(e);this.deckGL.setProps(t)}}createDeck({mapboxApiKey:e,container:t,jsonInput:o,tooltip:i}){let a;try{const n=this.jsonConverter.convert(o),s=(0,h.makeTooltip)(i,n.layers);a=new window.deck.DeckGL(Object.assign(Object.assign({},n),{map:window.mapboxgl,mapboxApiAccessToken:e,container:t,getTooltip:s,width:"100%",height:"100%"}))}catch(e){console.error(e)}return a}render(){super.render();const e=(0,r.div)({class:"deckgl"}),t=this.model.mapbox_api_key,o=this.model.tooltip,i=this.getData();window.deck.createDeck?this.deckGL=window.deck.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}):this.deckGL=this.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}),this.shadow_el.appendChild(e)}after_layout(){super.after_layout(),this.deckGL.redraw(!0)}}o.DeckGLPlotView=w,w.__name__="DeckGLPlotView";class m extends _.LayoutDOM{constructor(e){super(e)}}o.DeckGLPlot=m,s=m,m.__name__="DeckGLPlot",m.__module__="panel.models.deckgl",s.prototype.default_view=w,s.define((({Any:e,Array:t,String:o,Ref:i})=>({data:[e],data_sources:[t(i(c.ColumnDataSource)),[]],clickState:[e,{}],hoverState:[e,{}],initialViewState:[e,{}],layers:[t(e),[]],mapbox_api_key:[o,""],throttle:[e,{}],tooltip:[e,!0],viewState:[e,{}]}))),s.override({height:400,width:600})},
66
+ "991e3a226c": function _(e,t,o,i,a){i();const n=e("tslib");var s;const r=e("@bokehjs/core/dom"),c=e("@bokehjs/models/sources/column_data_source"),d=e("99a25e6992"),l=e("4e27eda472"),_=e("@bokehjs/models/layouts/layout_dom"),h=e("9588ab7c9e"),p=n.__importDefault(e("093eb75864"));function u(){const e={},t=window.deck,o=Object.keys(t).filter((e=>e.charAt(0)===e.charAt(0).toUpperCase()));for(const i of o)e[i]=t[i];return e}class w extends _.LayoutDOMView{connect_signals(){super.connect_signals();const{data:e,mapbox_api_key:t,tooltip:o,layers:i,initialViewState:a,data_sources:n}=this.model.properties;this.on_change([t,o],(()=>this.render())),this.on_change([e,a],(()=>this.updateDeck())),this.on_change([i],(()=>this._update_layers())),this.on_change([n],(()=>this._connect_sources(!0))),this._layer_map={},this._connected=[],this._connect_sources()}remove(){this.deckGL.finalize(),super.remove()}_update_layers(){this._layer_map={},this._update_data(!0)}_connect_sources(e=!1){for(const e of this.model.data_sources)this._connected.indexOf(e)<0&&(this.connect(e.properties.data.change,(()=>this._update_data(!0))),this._connected.push(e));this._update_data(e)}initialize(){if(super.initialize(),window.deck.JSONConverter){const{CSVLoader:e,Tiles3DLoader:t}=window.loaders;window.loaders.registerLoaders([t,e]);const o={classes:u(),enumerations:{COORDINATE_SYSTEM:window.deck.COORDINATE_SYSTEM,GL:p.default},constants:{Tiles3DLoader:t}};this.jsonConverter=new window.deck.JSONConverter({configuration:o})}}_update_data(e=!0){let t=0;for(const e of this.model.layers){let o;if(t+=1,t-1 in this._layer_map)o=this.model.data_sources[this._layer_map[t-1]];else{if("number"!=typeof e.data)continue;this._layer_map[t-1]=e.data,o=this.model.data_sources[e.data]}e.data=(0,l.transform_cds_to_records)(o)}e&&this.updateDeck()}_on_click_event(e){const t={coordinate:e.coordinate,lngLat:e.coordinate,index:e.index};e.layer&&(t.layer=e.layer.id),this.model.clickState=t}_on_hover_event(e){if(null==e.coordinate)return;const t={coordinate:e.coordinate,lngLat:e.coordinate,index:e.index};e.layer&&(t.layer=e.layer.id),this.model.hoverState=t}_on_viewState_event(e){const t=Object.assign({},e.viewState);delete t.normalize;for(const e in t)e.startsWith("transition")&&delete t[e];const o=new window.deck.WebMercatorViewport(t);t.nw=o.unproject([0,0]),t.se=o.unproject([o.width,o.height]),this.model.viewState=t}get child_models(){return[]}getData(){const e=this.model.throttle.view||200,t=this.model.throttle.hover||100,o=(0,d.debounce)((e=>this._on_viewState_event(e)),e,!1),i=(0,d.debounce)((e=>this._on_hover_event(e)),t,!1);return Object.assign(Object.assign({},this.model.data),{layers:this.model.layers,initialViewState:this.model.initialViewState,onViewStateChange:o,onClick:e=>this._on_click_event(e),onHover:i})}updateDeck(){if(!this.deckGL)return void this.render();const e=this.getData();if(window.deck.updateDeck)window.deck.updateDeck(e,this.deckGL);else{const t=this.jsonConverter.convert(e);this.deckGL.setProps(t)}}createDeck({mapboxApiKey:e,container:t,jsonInput:o,tooltip:i}){let a;try{const n=this.jsonConverter.convert(o),s=(0,h.makeTooltip)(i,n.layers);a=new window.deck.DeckGL(Object.assign(Object.assign({},n),{map:window.mapboxgl,mapboxApiAccessToken:e,container:t,getTooltip:s,width:"100%",height:"100%"}))}catch(e){console.error(e)}return a}render(){super.render();const e=(0,r.div)({class:"deckgl"}),t=this.model.mapbox_api_key,o=this.model.tooltip,i=this.getData();window.deck.createDeck?this.deckGL=window.deck.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}):this.deckGL=this.createDeck({mapboxApiKey:t,container:e,jsonInput:i,tooltip:o}),this.shadow_el.appendChild(e)}after_layout(){super.after_layout(),this.deckGL.redraw(!0)}}o.DeckGLPlotView=w,w.__name__="DeckGLPlotView";class m extends _.LayoutDOM{constructor(e){super(e)}}o.DeckGLPlot=m,s=m,m.__name__="DeckGLPlot",m.__module__="panel.models.deckgl",s.prototype.default_view=w,s.define((({Any:e,Array:t,String:o,Ref:i})=>({data:[e],data_sources:[t(i(c.ColumnDataSource)),[]],clickState:[e,{}],hoverState:[e,{}],initialViewState:[e,{}],layers:[t(e),[]],mapbox_api_key:[o,""],throttle:[e,{}],tooltip:[e,!0],viewState:[e,{}]}))),s.override({height:400,width:600})},
67
67
  "9588ab7c9e": function _(t,e,n,i,l){
68
68
  /*
69
69
  This file was adapted from https://github.com/uber/deck.gl/ the LICENSE
@@ -91,7 +91,7 @@
91
91
  */
92
92
  let o,r;i();const c={fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif',display:"flex",flex:"wrap",maxWidth:"500px",flexDirection:"column",zIndex:2};function s(){return document.createElement("div")}function a(t){if(!t.picked)return null;if(t.object===o)return r;const e={html:u(t.object),style:c};return r=e,o=t.object,e}n.getTooltipDefault=a;const f=new Set(["position","index"]);function u(t){const e=s();for(const n in t){if(f.has(n))continue;const i=s();i.className="header",i.textContent=n;const l=s();l.className="value",l.textContent=h(t[n]);const o=s();p(o,i,l),o.appendChild(i),o.appendChild(l),e.appendChild(o)}return e.innerHTML}function p(t,e,n){Object.assign(e.style,{fontWeight:700,marginRight:"10px",flex:"1 1 0%"}),Object.assign(n.style,{flex:"none",maxWidth:"250px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"}),Object.assign(t.style,{display:"flex",flexDirection:"row",justifyContent:"space-between",alignItems:"stretch"})}function h(t){let e;if(Array.isArray(t)&&t.length>4)e=`Array<${t.length}>`;else if("string"==typeof t)e=t;else if("number"==typeof t)e=String(t);else try{e=JSON.stringify(t)}catch(t){e="<Non-Serializable Object>"}return e.length>50&&(e=e.slice(0,50)),e}function d(t,e){let n=t;for(const t in e){if("object"==typeof e[t])for(const i in e[t])n=n.replace(`{${t}.${i}}`,e[t][i]);n=n.replace(`{${t}}`,e[t])}return n}n.tabularize=u,n.toText=h,n.substituteIn=d,n.makeTooltip=function(t,e){if(!t)return null;let n=!1;const i={};for(let l=0;l<e.length;l++){const o=e[l].id;"boolean"!=typeof t&&(l.toString()in t||o in t)&&(i[o]=o in t?t[o]:t[l.toString()],n=!0)}return t.html||t.text||n?e=>{if(!e.picked)return null;const l=n?i[e.layer.id]:t;if(null==l)return;if("boolean"==typeof l)return l?a(e):null;const o={style:l.style||c};return l.html?o.html=d(l.html,e.object):o.text=d(l.text,e.object),o}:a}},
93
93
  "093eb75864": function _(E,_,R,T,A){_.exports={DEPTH_BUFFER_BIT:256,STENCIL_BUFFER_BIT:1024,COLOR_BUFFER_BIT:16384,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,ZERO:0,ONE:1,SRC_COLOR:768,ONE_MINUS_SRC_COLOR:769,SRC_ALPHA:770,ONE_MINUS_SRC_ALPHA:771,DST_ALPHA:772,ONE_MINUS_DST_ALPHA:773,DST_COLOR:774,ONE_MINUS_DST_COLOR:775,SRC_ALPHA_SATURATE:776,CONSTANT_COLOR:32769,ONE_MINUS_CONSTANT_COLOR:32770,CONSTANT_ALPHA:32771,ONE_MINUS_CONSTANT_ALPHA:32772,FUNC_ADD:32774,FUNC_SUBTRACT:32778,FUNC_REVERSE_SUBTRACT:32779,BLEND_EQUATION:32777,BLEND_EQUATION_RGB:32777,BLEND_EQUATION_ALPHA:34877,BLEND_DST_RGB:32968,BLEND_SRC_RGB:32969,BLEND_DST_ALPHA:32970,BLEND_SRC_ALPHA:32971,BLEND_COLOR:32773,ARRAY_BUFFER_BINDING:34964,ELEMENT_ARRAY_BUFFER_BINDING:34965,LINE_WIDTH:2849,ALIASED_POINT_SIZE_RANGE:33901,ALIASED_LINE_WIDTH_RANGE:33902,CULL_FACE_MODE:2885,FRONT_FACE:2886,DEPTH_RANGE:2928,DEPTH_WRITEMASK:2930,DEPTH_CLEAR_VALUE:2931,DEPTH_FUNC:2932,STENCIL_CLEAR_VALUE:2961,STENCIL_FUNC:2962,STENCIL_FAIL:2964,STENCIL_PASS_DEPTH_FAIL:2965,STENCIL_PASS_DEPTH_PASS:2966,STENCIL_REF:2967,STENCIL_VALUE_MASK:2963,STENCIL_WRITEMASK:2968,STENCIL_BACK_FUNC:34816,STENCIL_BACK_FAIL:34817,STENCIL_BACK_PASS_DEPTH_FAIL:34818,STENCIL_BACK_PASS_DEPTH_PASS:34819,STENCIL_BACK_REF:36003,STENCIL_BACK_VALUE_MASK:36004,STENCIL_BACK_WRITEMASK:36005,VIEWPORT:2978,SCISSOR_BOX:3088,COLOR_CLEAR_VALUE:3106,COLOR_WRITEMASK:3107,UNPACK_ALIGNMENT:3317,PACK_ALIGNMENT:3333,MAX_TEXTURE_SIZE:3379,MAX_VIEWPORT_DIMS:3386,SUBPIXEL_BITS:3408,RED_BITS:3410,GREEN_BITS:3411,BLUE_BITS:3412,ALPHA_BITS:3413,DEPTH_BITS:3414,STENCIL_BITS:3415,POLYGON_OFFSET_UNITS:10752,POLYGON_OFFSET_FACTOR:32824,TEXTURE_BINDING_2D:32873,SAMPLE_BUFFERS:32936,SAMPLES:32937,SAMPLE_COVERAGE_VALUE:32938,SAMPLE_COVERAGE_INVERT:32939,COMPRESSED_TEXTURE_FORMATS:34467,VENDOR:7936,RENDERER:7937,VERSION:7938,IMPLEMENTATION_COLOR_READ_TYPE:35738,IMPLEMENTATION_COLOR_READ_FORMAT:35739,BROWSER_DEFAULT_WEBGL:37444,STATIC_DRAW:35044,STREAM_DRAW:35040,DYNAMIC_DRAW:35048,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,BUFFER_SIZE:34660,BUFFER_USAGE:34661,CURRENT_VERTEX_ATTRIB:34342,VERTEX_ATTRIB_ARRAY_ENABLED:34338,VERTEX_ATTRIB_ARRAY_SIZE:34339,VERTEX_ATTRIB_ARRAY_STRIDE:34340,VERTEX_ATTRIB_ARRAY_TYPE:34341,VERTEX_ATTRIB_ARRAY_NORMALIZED:34922,VERTEX_ATTRIB_ARRAY_POINTER:34373,VERTEX_ATTRIB_ARRAY_BUFFER_BINDING:34975,CULL_FACE:2884,FRONT:1028,BACK:1029,FRONT_AND_BACK:1032,BLEND:3042,DEPTH_TEST:2929,DITHER:3024,POLYGON_OFFSET_FILL:32823,SAMPLE_ALPHA_TO_COVERAGE:32926,SAMPLE_COVERAGE:32928,SCISSOR_TEST:3089,STENCIL_TEST:2960,NO_ERROR:0,INVALID_ENUM:1280,INVALID_VALUE:1281,INVALID_OPERATION:1282,OUT_OF_MEMORY:1285,CONTEXT_LOST_WEBGL:37442,CW:2304,CCW:2305,DONT_CARE:4352,FASTEST:4353,NICEST:4354,GENERATE_MIPMAP_HINT:33170,BYTE:5120,UNSIGNED_BYTE:5121,SHORT:5122,UNSIGNED_SHORT:5123,INT:5124,UNSIGNED_INT:5125,FLOAT:5126,DOUBLE:5130,DEPTH_COMPONENT:6402,ALPHA:6406,RGB:6407,RGBA:6408,LUMINANCE:6409,LUMINANCE_ALPHA:6410,UNSIGNED_SHORT_4_4_4_4:32819,UNSIGNED_SHORT_5_5_5_1:32820,UNSIGNED_SHORT_5_6_5:33635,FRAGMENT_SHADER:35632,VERTEX_SHADER:35633,COMPILE_STATUS:35713,DELETE_STATUS:35712,LINK_STATUS:35714,VALIDATE_STATUS:35715,ATTACHED_SHADERS:35717,ACTIVE_ATTRIBUTES:35721,ACTIVE_UNIFORMS:35718,MAX_VERTEX_ATTRIBS:34921,MAX_VERTEX_UNIFORM_VECTORS:36347,MAX_VARYING_VECTORS:36348,MAX_COMBINED_TEXTURE_IMAGE_UNITS:35661,MAX_VERTEX_TEXTURE_IMAGE_UNITS:35660,MAX_TEXTURE_IMAGE_UNITS:34930,MAX_FRAGMENT_UNIFORM_VECTORS:36349,SHADER_TYPE:35663,SHADING_LANGUAGE_VERSION:35724,CURRENT_PROGRAM:35725,NEVER:512,ALWAYS:519,LESS:513,EQUAL:514,LEQUAL:515,GREATER:516,GEQUAL:518,NOTEQUAL:517,KEEP:7680,REPLACE:7681,INCR:7682,DECR:7683,INVERT:5386,INCR_WRAP:34055,DECR_WRAP:34056,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987,TEXTURE_MAG_FILTER:10240,TEXTURE_MIN_FILTER:10241,TEXTURE_WRAP_S:10242,TEXTURE_WRAP_T:10243,TEXTURE_2D:3553,TEXTURE:5890,TEXTURE_CUBE_MAP:34067,TEXTURE_BINDING_CUBE_MAP:34068,TEXTURE_CUBE_MAP_POSITIVE_X:34069,TEXTURE_CUBE_MAP_NEGATIVE_X:34070,TEXTURE_CUBE_MAP_POSITIVE_Y:34071,TEXTURE_CUBE_MAP_NEGATIVE_Y:34072,TEXTURE_CUBE_MAP_POSITIVE_Z:34073,TEXTURE_CUBE_MAP_NEGATIVE_Z:34074,MAX_CUBE_MAP_TEXTURE_SIZE:34076,TEXTURE0:33984,ACTIVE_TEXTURE:34016,REPEAT:10497,CLAMP_TO_EDGE:33071,MIRRORED_REPEAT:33648,TEXTURE_WIDTH:4096,TEXTURE_HEIGHT:4097,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,INT_VEC2:35667,INT_VEC3:35668,INT_VEC4:35669,BOOL:35670,BOOL_VEC2:35671,BOOL_VEC3:35672,BOOL_VEC4:35673,FLOAT_MAT2:35674,FLOAT_MAT3:35675,FLOAT_MAT4:35676,SAMPLER_2D:35678,SAMPLER_CUBE:35680,LOW_FLOAT:36336,MEDIUM_FLOAT:36337,HIGH_FLOAT:36338,LOW_INT:36339,MEDIUM_INT:36340,HIGH_INT:36341,FRAMEBUFFER:36160,RENDERBUFFER:36161,RGBA4:32854,RGB5_A1:32855,RGB565:36194,DEPTH_COMPONENT16:33189,STENCIL_INDEX:6401,STENCIL_INDEX8:36168,DEPTH_STENCIL:34041,RENDERBUFFER_WIDTH:36162,RENDERBUFFER_HEIGHT:36163,RENDERBUFFER_INTERNAL_FORMAT:36164,RENDERBUFFER_RED_SIZE:36176,RENDERBUFFER_GREEN_SIZE:36177,RENDERBUFFER_BLUE_SIZE:36178,RENDERBUFFER_ALPHA_SIZE:36179,RENDERBUFFER_DEPTH_SIZE:36180,RENDERBUFFER_STENCIL_SIZE:36181,FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE:36048,FRAMEBUFFER_ATTACHMENT_OBJECT_NAME:36049,FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL:36050,FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE:36051,COLOR_ATTACHMENT0:36064,DEPTH_ATTACHMENT:36096,STENCIL_ATTACHMENT:36128,DEPTH_STENCIL_ATTACHMENT:33306,NONE:0,FRAMEBUFFER_COMPLETE:36053,FRAMEBUFFER_INCOMPLETE_ATTACHMENT:36054,FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT:36055,FRAMEBUFFER_INCOMPLETE_DIMENSIONS:36057,FRAMEBUFFER_UNSUPPORTED:36061,FRAMEBUFFER_BINDING:36006,RENDERBUFFER_BINDING:36007,READ_FRAMEBUFFER:36008,DRAW_FRAMEBUFFER:36009,MAX_RENDERBUFFER_SIZE:34024,INVALID_FRAMEBUFFER_OPERATION:1286,UNPACK_FLIP_Y_WEBGL:37440,UNPACK_PREMULTIPLY_ALPHA_WEBGL:37441,UNPACK_COLORSPACE_CONVERSION_WEBGL:37443,READ_BUFFER:3074,UNPACK_ROW_LENGTH:3314,UNPACK_SKIP_ROWS:3315,UNPACK_SKIP_PIXELS:3316,PACK_ROW_LENGTH:3330,PACK_SKIP_ROWS:3331,PACK_SKIP_PIXELS:3332,TEXTURE_BINDING_3D:32874,UNPACK_SKIP_IMAGES:32877,UNPACK_IMAGE_HEIGHT:32878,MAX_3D_TEXTURE_SIZE:32883,MAX_ELEMENTS_VERTICES:33e3,MAX_ELEMENTS_INDICES:33001,MAX_TEXTURE_LOD_BIAS:34045,MAX_FRAGMENT_UNIFORM_COMPONENTS:35657,MAX_VERTEX_UNIFORM_COMPONENTS:35658,MAX_ARRAY_TEXTURE_LAYERS:35071,MIN_PROGRAM_TEXEL_OFFSET:35076,MAX_PROGRAM_TEXEL_OFFSET:35077,MAX_VARYING_COMPONENTS:35659,FRAGMENT_SHADER_DERIVATIVE_HINT:35723,RASTERIZER_DISCARD:35977,VERTEX_ARRAY_BINDING:34229,MAX_VERTEX_OUTPUT_COMPONENTS:37154,MAX_FRAGMENT_INPUT_COMPONENTS:37157,MAX_SERVER_WAIT_TIMEOUT:37137,MAX_ELEMENT_INDEX:36203,RED:6403,RGB8:32849,RGBA8:32856,RGB10_A2:32857,TEXTURE_3D:32879,TEXTURE_WRAP_R:32882,TEXTURE_MIN_LOD:33082,TEXTURE_MAX_LOD:33083,TEXTURE_BASE_LEVEL:33084,TEXTURE_MAX_LEVEL:33085,TEXTURE_COMPARE_MODE:34892,TEXTURE_COMPARE_FUNC:34893,SRGB:35904,SRGB8:35905,SRGB8_ALPHA8:35907,COMPARE_REF_TO_TEXTURE:34894,RGBA32F:34836,RGB32F:34837,RGBA16F:34842,RGB16F:34843,TEXTURE_2D_ARRAY:35866,TEXTURE_BINDING_2D_ARRAY:35869,R11F_G11F_B10F:35898,RGB9_E5:35901,RGBA32UI:36208,RGB32UI:36209,RGBA16UI:36214,RGB16UI:36215,RGBA8UI:36220,RGB8UI:36221,RGBA32I:36226,RGB32I:36227,RGBA16I:36232,RGB16I:36233,RGBA8I:36238,RGB8I:36239,RED_INTEGER:36244,RGB_INTEGER:36248,RGBA_INTEGER:36249,R8:33321,RG8:33323,R16F:33325,R32F:33326,RG16F:33327,RG32F:33328,R8I:33329,R8UI:33330,R16I:33331,R16UI:33332,R32I:33333,R32UI:33334,RG8I:33335,RG8UI:33336,RG16I:33337,RG16UI:33338,RG32I:33339,RG32UI:33340,R8_SNORM:36756,RG8_SNORM:36757,RGB8_SNORM:36758,RGBA8_SNORM:36759,RGB10_A2UI:36975,TEXTURE_IMMUTABLE_FORMAT:37167,TEXTURE_IMMUTABLE_LEVELS:33503,UNSIGNED_INT_2_10_10_10_REV:33640,UNSIGNED_INT_10F_11F_11F_REV:35899,UNSIGNED_INT_5_9_9_9_REV:35902,FLOAT_32_UNSIGNED_INT_24_8_REV:36269,UNSIGNED_INT_24_8:34042,HALF_FLOAT:5131,RG:33319,RG_INTEGER:33320,INT_2_10_10_10_REV:36255,CURRENT_QUERY:34917,QUERY_RESULT:34918,QUERY_RESULT_AVAILABLE:34919,ANY_SAMPLES_PASSED:35887,ANY_SAMPLES_PASSED_CONSERVATIVE:36202,MAX_DRAW_BUFFERS:34852,DRAW_BUFFER0:34853,DRAW_BUFFER1:34854,DRAW_BUFFER2:34855,DRAW_BUFFER3:34856,DRAW_BUFFER4:34857,DRAW_BUFFER5:34858,DRAW_BUFFER6:34859,DRAW_BUFFER7:34860,DRAW_BUFFER8:34861,DRAW_BUFFER9:34862,DRAW_BUFFER10:34863,DRAW_BUFFER11:34864,DRAW_BUFFER12:34865,DRAW_BUFFER13:34866,DRAW_BUFFER14:34867,DRAW_BUFFER15:34868,MAX_COLOR_ATTACHMENTS:36063,COLOR_ATTACHMENT1:36065,COLOR_ATTACHMENT2:36066,COLOR_ATTACHMENT3:36067,COLOR_ATTACHMENT4:36068,COLOR_ATTACHMENT5:36069,COLOR_ATTACHMENT6:36070,COLOR_ATTACHMENT7:36071,COLOR_ATTACHMENT8:36072,COLOR_ATTACHMENT9:36073,COLOR_ATTACHMENT10:36074,COLOR_ATTACHMENT11:36075,COLOR_ATTACHMENT12:36076,COLOR_ATTACHMENT13:36077,COLOR_ATTACHMENT14:36078,COLOR_ATTACHMENT15:36079,SAMPLER_3D:35679,SAMPLER_2D_SHADOW:35682,SAMPLER_2D_ARRAY:36289,SAMPLER_2D_ARRAY_SHADOW:36292,SAMPLER_CUBE_SHADOW:36293,INT_SAMPLER_2D:36298,INT_SAMPLER_3D:36299,INT_SAMPLER_CUBE:36300,INT_SAMPLER_2D_ARRAY:36303,UNSIGNED_INT_SAMPLER_2D:36306,UNSIGNED_INT_SAMPLER_3D:36307,UNSIGNED_INT_SAMPLER_CUBE:36308,UNSIGNED_INT_SAMPLER_2D_ARRAY:36311,MAX_SAMPLES:36183,SAMPLER_BINDING:35097,PIXEL_PACK_BUFFER:35051,PIXEL_UNPACK_BUFFER:35052,PIXEL_PACK_BUFFER_BINDING:35053,PIXEL_UNPACK_BUFFER_BINDING:35055,COPY_READ_BUFFER:36662,COPY_WRITE_BUFFER:36663,COPY_READ_BUFFER_BINDING:36662,COPY_WRITE_BUFFER_BINDING:36663,FLOAT_MAT2x3:35685,FLOAT_MAT2x4:35686,FLOAT_MAT3x2:35687,FLOAT_MAT3x4:35688,FLOAT_MAT4x2:35689,FLOAT_MAT4x3:35690,UNSIGNED_INT_VEC2:36294,UNSIGNED_INT_VEC3:36295,UNSIGNED_INT_VEC4:36296,UNSIGNED_NORMALIZED:35863,SIGNED_NORMALIZED:36764,VERTEX_ATTRIB_ARRAY_INTEGER:35069,VERTEX_ATTRIB_ARRAY_DIVISOR:35070,TRANSFORM_FEEDBACK_BUFFER_MODE:35967,MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS:35968,TRANSFORM_FEEDBACK_VARYINGS:35971,TRANSFORM_FEEDBACK_BUFFER_START:35972,TRANSFORM_FEEDBACK_BUFFER_SIZE:35973,TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN:35976,MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS:35978,MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS:35979,INTERLEAVED_ATTRIBS:35980,SEPARATE_ATTRIBS:35981,TRANSFORM_FEEDBACK_BUFFER:35982,TRANSFORM_FEEDBACK_BUFFER_BINDING:35983,TRANSFORM_FEEDBACK:36386,TRANSFORM_FEEDBACK_PAUSED:36387,TRANSFORM_FEEDBACK_ACTIVE:36388,TRANSFORM_FEEDBACK_BINDING:36389,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING:33296,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE:33297,FRAMEBUFFER_ATTACHMENT_RED_SIZE:33298,FRAMEBUFFER_ATTACHMENT_GREEN_SIZE:33299,FRAMEBUFFER_ATTACHMENT_BLUE_SIZE:33300,FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE:33301,FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE:33302,FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE:33303,FRAMEBUFFER_DEFAULT:33304,DEPTH24_STENCIL8:35056,DRAW_FRAMEBUFFER_BINDING:36006,READ_FRAMEBUFFER_BINDING:36010,RENDERBUFFER_SAMPLES:36011,FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER:36052,FRAMEBUFFER_INCOMPLETE_MULTISAMPLE:36182,UNIFORM_BUFFER:35345,UNIFORM_BUFFER_BINDING:35368,UNIFORM_BUFFER_START:35369,UNIFORM_BUFFER_SIZE:35370,MAX_VERTEX_UNIFORM_BLOCKS:35371,MAX_FRAGMENT_UNIFORM_BLOCKS:35373,MAX_COMBINED_UNIFORM_BLOCKS:35374,MAX_UNIFORM_BUFFER_BINDINGS:35375,MAX_UNIFORM_BLOCK_SIZE:35376,MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS:35377,MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS:35379,UNIFORM_BUFFER_OFFSET_ALIGNMENT:35380,ACTIVE_UNIFORM_BLOCKS:35382,UNIFORM_TYPE:35383,UNIFORM_SIZE:35384,UNIFORM_BLOCK_INDEX:35386,UNIFORM_OFFSET:35387,UNIFORM_ARRAY_STRIDE:35388,UNIFORM_MATRIX_STRIDE:35389,UNIFORM_IS_ROW_MAJOR:35390,UNIFORM_BLOCK_BINDING:35391,UNIFORM_BLOCK_DATA_SIZE:35392,UNIFORM_BLOCK_ACTIVE_UNIFORMS:35394,UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES:35395,UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER:35396,UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER:35398,OBJECT_TYPE:37138,SYNC_CONDITION:37139,SYNC_STATUS:37140,SYNC_FLAGS:37141,SYNC_FENCE:37142,SYNC_GPU_COMMANDS_COMPLETE:37143,UNSIGNALED:37144,SIGNALED:37145,ALREADY_SIGNALED:37146,TIMEOUT_EXPIRED:37147,CONDITION_SATISFIED:37148,WAIT_FAILED:37149,SYNC_FLUSH_COMMANDS_BIT:1,COLOR:6144,DEPTH:6145,STENCIL:6146,MIN:32775,MAX:32776,DEPTH_COMPONENT24:33190,STREAM_READ:35041,STREAM_COPY:35042,STATIC_READ:35045,STATIC_COPY:35046,DYNAMIC_READ:35049,DYNAMIC_COPY:35050,DEPTH_COMPONENT32F:36012,DEPTH32F_STENCIL8:36013,INVALID_INDEX:4294967295,TIMEOUT_IGNORED:-1,MAX_CLIENT_WAIT_TIMEOUT_WEBGL:37447,VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE:35070,UNMASKED_VENDOR_WEBGL:37445,UNMASKED_RENDERER_WEBGL:37446,MAX_TEXTURE_MAX_ANISOTROPY_EXT:34047,TEXTURE_MAX_ANISOTROPY_EXT:34046,COMPRESSED_RGB_S3TC_DXT1_EXT:33776,COMPRESSED_RGBA_S3TC_DXT1_EXT:33777,COMPRESSED_RGBA_S3TC_DXT3_EXT:33778,COMPRESSED_RGBA_S3TC_DXT5_EXT:33779,COMPRESSED_R11_EAC:37488,COMPRESSED_SIGNED_R11_EAC:37489,COMPRESSED_RG11_EAC:37490,COMPRESSED_SIGNED_RG11_EAC:37491,COMPRESSED_RGB8_ETC2:37492,COMPRESSED_RGBA8_ETC2_EAC:37493,COMPRESSED_SRGB8_ETC2:37494,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:37495,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:37496,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:37497,COMPRESSED_RGB_PVRTC_4BPPV1_IMG:35840,COMPRESSED_RGBA_PVRTC_4BPPV1_IMG:35842,COMPRESSED_RGB_PVRTC_2BPPV1_IMG:35841,COMPRESSED_RGBA_PVRTC_2BPPV1_IMG:35843,COMPRESSED_RGB_ETC1_WEBGL:36196,COMPRESSED_RGB_ATC_WEBGL:35986,COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL:35986,COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL:34798,UNSIGNED_INT_24_8_WEBGL:34042,HALF_FLOAT_OES:36193,RGBA32F_EXT:34836,RGB32F_EXT:34837,FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE_EXT:33297,UNSIGNED_NORMALIZED_EXT:35863,MIN_EXT:32775,MAX_EXT:32776,SRGB_EXT:35904,SRGB_ALPHA_EXT:35906,SRGB8_ALPHA8_EXT:35907,FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING_EXT:33296,FRAGMENT_SHADER_DERIVATIVE_HINT_OES:35723,COLOR_ATTACHMENT0_WEBGL:36064,COLOR_ATTACHMENT1_WEBGL:36065,COLOR_ATTACHMENT2_WEBGL:36066,COLOR_ATTACHMENT3_WEBGL:36067,COLOR_ATTACHMENT4_WEBGL:36068,COLOR_ATTACHMENT5_WEBGL:36069,COLOR_ATTACHMENT6_WEBGL:36070,COLOR_ATTACHMENT7_WEBGL:36071,COLOR_ATTACHMENT8_WEBGL:36072,COLOR_ATTACHMENT9_WEBGL:36073,COLOR_ATTACHMENT10_WEBGL:36074,COLOR_ATTACHMENT11_WEBGL:36075,COLOR_ATTACHMENT12_WEBGL:36076,COLOR_ATTACHMENT13_WEBGL:36077,COLOR_ATTACHMENT14_WEBGL:36078,COLOR_ATTACHMENT15_WEBGL:36079,DRAW_BUFFER0_WEBGL:34853,DRAW_BUFFER1_WEBGL:34854,DRAW_BUFFER2_WEBGL:34855,DRAW_BUFFER3_WEBGL:34856,DRAW_BUFFER4_WEBGL:34857,DRAW_BUFFER5_WEBGL:34858,DRAW_BUFFER6_WEBGL:34859,DRAW_BUFFER7_WEBGL:34860,DRAW_BUFFER8_WEBGL:34861,DRAW_BUFFER9_WEBGL:34862,DRAW_BUFFER10_WEBGL:34863,DRAW_BUFFER11_WEBGL:34864,DRAW_BUFFER12_WEBGL:34865,DRAW_BUFFER13_WEBGL:34866,DRAW_BUFFER14_WEBGL:34867,DRAW_BUFFER15_WEBGL:34868,MAX_COLOR_ATTACHMENTS_WEBGL:36063,MAX_DRAW_BUFFERS_WEBGL:34852,VERTEX_ARRAY_BINDING_OES:34229,QUERY_COUNTER_BITS_EXT:34916,CURRENT_QUERY_EXT:34917,QUERY_RESULT_EXT:34918,QUERY_RESULT_AVAILABLE_EXT:34919,TIME_ELAPSED_EXT:35007,TIMESTAMP_EXT:36392,GPU_DISJOINT_EXT:36795}},
94
- "eded13f5d7": function _(e,t,s,n,i){var o,h;n();const c=e("@bokehjs/core/bokeh_events"),r=e("@bokehjs/core/dom"),a=e("490942d778"),l=e("ea218d1c3c"),d=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"].concat(["highlight","downplay","selectchanged","legendselectchangedEvent","legendselected","legendunselected","legendselectall","legendinverseselect","legendscroll","datazoom","datarangeselected","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","axisareaselected","brush","brushEnd","rushselected","globalcursortaken","rendered","finished"]);class _ extends c.ModelEvent{constructor(e,t,s){super(),this.type=e,this.data=t,this.query=s}get event_values(){return{model:this.origin,type:this.type,data:this.data,query:this.query}}}s.EChartsEvent=_,o=_,_.__name__="EChartsEvent",o.prototype.event_name="echarts_event";class u extends l.HTMLBoxView{constructor(){super(...arguments),this._callbacks=[]}connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,(()=>this._plot()));const{width:e,height:t,renderer:s,theme:n,event_config:i,js_events:o}=this.model.properties;this.on_change([e,t],(()=>this._resize())),this.on_change([n,s],(()=>this.render())),this.on_change([i,o],(()=>this._subscribe()))}render(){null!=this._chart&&window.echarts.dispose(this._chart),super.render(),this.container=(0,r.div)({style:"height: 100%; width: 100%;"});const e={width:this.model.width,height:this.model.height,renderer:this.model.renderer};this._chart=window.echarts.init(this.container,this.model.theme,e),this._plot(),this._subscribe(),this.shadow_el.append(this.container)}remove(){super.remove(),null!=this._chart&&window.echarts.dispose(this._chart)}after_layout(){super.after_layout(),this._chart.resize()}_plot(){null!=window.echarts&&this._chart.setOption(this.model.data)}_resize(){this._chart.resize({width:this.model.width,height:this.model.height})}_subscribe(){if(null!=window.echarts){for(const[e,t]of this._callbacks)this._chart.off(e,t);this._callbacks=[];for(const e in this.model.event_config){if(!d.includes(e)){console.warn(`Could not subscribe to unknown Echarts event: ${e}.`);continue}const t=this.model.event_config[e];for(const s of t){const t=t=>{var n;const i=Object.assign({},t);i.event=(0,a.serializeEvent)(null===(n=t.event)||void 0===n?void 0:n.event);const o=JSON.parse(JSON.stringify(i));this.model.trigger_event(new _(e,o,s))};null==s?this._chart.on(e,s,t):this._chart.on(e,t),this._callbacks.push([e,t])}}for(const e in this.model.js_events){if(!d.includes(e)){console.warn(`Could not subscribe to unknown Echarts event: ${e}.`);continue}const t=this.model.js_events[e];for(const s of t){const t=e=>{s.callback.execute(this._chart,e)};"query"in s?this._chart.on(e,s.query,t):this._chart.on(e,t),this._callbacks.push([e,t])}}}}}s.EChartsView=u,u.__name__="EChartsView";class g extends l.HTMLBox{constructor(e){super(e)}}s.ECharts=g,h=g,g.__name__="ECharts",g.__module__="panel.models.echarts",h.prototype.default_view=u,h.define((({Any:e,String:t})=>({data:[e,{}],event_config:[e,{}],js_events:[e,{}],theme:[t,"default"],renderer:[t,"canvas"]})))},
94
+ "54ac9fb4a9": function _(e,t,s,n,o){var i,h;n();const c=e("@bokehjs/core/bokeh_events"),r=e("@bokehjs/core/dom"),a=e("490942d778"),l=e("ea218d1c3c"),d=["click","dblclick","mousedown","mousemove","mouseup","mouseover","mouseout","globalout","contextmenu"].concat(["highlight","downplay","selectchanged","legendselectchangedEvent","legendselected","legendunselected","legendselectall","legendinverseselect","legendscroll","datazoom","datarangeselected","timelineplaychanged","restore","dataviewchanged","magictypechanged","geoselectchanged","geoselected","geounselected","axisareaselected","brush","brushEnd","rushselected","globalcursortaken","rendered","finished"]);class _ extends c.ModelEvent{constructor(e,t,s){super(),this.type=e,this.data=t,this.query=s}get event_values(){return{model:this.origin,type:this.type,data:this.data,query:this.query}}}s.EChartsEvent=_,i=_,_.__name__="EChartsEvent",i.prototype.event_name="echarts_event";class u extends l.HTMLBoxView{constructor(){super(...arguments),this._callbacks=[]}connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,(()=>this._plot()));const{width:e,height:t,renderer:s,theme:n,event_config:o,js_events:i}=this.model.properties;this.on_change([e,t],(()=>this._resize())),this.on_change([n,s],(()=>this.render())),this.on_change([o,i],(()=>this._subscribe()))}render(){null!=this._chart&&window.echarts.dispose(this._chart),super.render(),this.container=(0,r.div)({style:"height: 100%; width: 100%;"});const e={width:this.model.width,height:this.model.height,renderer:this.model.renderer};this._chart=window.echarts.init(this.container,this.model.theme,e),this._plot(),this._subscribe(),this.shadow_el.append(this.container)}remove(){super.remove(),null!=this._chart&&window.echarts.dispose(this._chart)}after_layout(){super.after_layout(),this._chart.resize()}_plot(){null!=window.echarts&&this._chart.setOption(this.model.data,this.model.options)}_resize(){this._chart.resize({width:this.model.width,height:this.model.height})}_subscribe(){if(null!=window.echarts){for(const[e,t]of this._callbacks)this._chart.off(e,t);this._callbacks=[];for(const e in this.model.event_config){if(!d.includes(e)){console.warn(`Could not subscribe to unknown Echarts event: ${e}.`);continue}const t=this.model.event_config[e];for(const s of t){const t=t=>{var n;const o=Object.assign({},t);o.event=(0,a.serializeEvent)(null===(n=t.event)||void 0===n?void 0:n.event);const i=JSON.parse(JSON.stringify(o));this.model.trigger_event(new _(e,i,s))};null==s?this._chart.on(e,s,t):this._chart.on(e,t),this._callbacks.push([e,t])}}for(const e in this.model.js_events){if(!d.includes(e)){console.warn(`Could not subscribe to unknown Echarts event: ${e}.`);continue}const t=this.model.js_events[e];for(const s of t){const t=e=>{s.callback.execute(this._chart,e)};"query"in s?this._chart.on(e,s.query,t):this._chart.on(e,t),this._callbacks.push([e,t])}}}}}s.EChartsView=u,u.__name__="EChartsView";class g extends l.HTMLBox{constructor(e){super(e)}}s.ECharts=g,h=g,g.__name__="ECharts",g.__module__="panel.models.echarts",h.prototype.default_view=u,h.define((({Any:e,String:t})=>({data:[e,{}],options:[e,{}],event_config:[e,{}],js_events:[e,{}],theme:[t,"default"],renderer:[t,"canvas"]})))},
95
95
  "490942d778": function _(e,t,a,r,n){function i(e){let t=null;return e&&(t=function(e){try{return{boundingClientRect:Object.assign({},e.getBoundingClientRect())}}catch(e){return{}}}(e),e.tagName in l&&l[e.tagName].forEach((a=>Object.assign(t,a(e))))),t}r(),a.serializeEvent=
96
96
  /*
97
97
  The MIT License (MIT)
@@ -127,13 +127,13 @@ function(e){const t={};return void 0!==e.detail&&Object.assign(t,{detail:JSON.pa
127
127
  "00a25cf872": function _(e,o,t,h,i){var a;h();const s=e("@bokehjs/core/view"),n=e("@bokehjs/model");class d extends s.View{initialize(){super.initialize(),this.model.pathname=window.location.pathname,this.model.search=window.location.search,this.model.hash=window.location.hash,this.model.href=window.location.href,this.model.hostname=window.location.hostname,this.model.protocol=window.location.protocol,this.model.port=window.location.port,this._hash_listener=()=>{this.model.hash=window.location.hash},window.addEventListener("hashchange",this._hash_listener),this._has_finished=!0,this.notify_finished()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.pathname.change,(()=>this.update("pathname"))),this.connect(this.model.properties.search.change,(()=>this.update("search"))),this.connect(this.model.properties.hash.change,(()=>this.update("hash"))),this.connect(this.model.properties.reload.change,(()=>this.update("reload")))}remove(){super.remove(),window.removeEventListener("hashchange",this._hash_listener)}update(e){this.model.reload&&"reload"!==e?("pathname"==e&&(window.location.pathname=this.model.pathname),"search"==e&&(window.location.search=this.model.search),"hash"==e&&(window.location.hash=this.model.hash)):(window.history.pushState({},"",`${this.model.pathname}${this.model.search}${this.model.hash}`),this.model.href=window.location.href,"reload"===e&&window.location.reload())}}t.LocationView=d,d.__name__="LocationView";class l extends n.Model{constructor(e){super(e)}}t.Location=l,a=l,l.__name__="Location",l.__module__="panel.models.location",a.prototype.default_view=d,a.define((({Boolean:e,String:o})=>({href:[o,""],hostname:[o,""],pathname:[o,""],protocol:[o,""],port:[o,""],search:[o,""],hash:[o,""],reload:[e,!1]})))},
128
128
  "46a1770629": function _(e,t,s,a,n){var r;a();const i=e("@bokehjs/models/widgets/markup"),o=e("ea218d1c3c");class _ extends o.PanelMarkupView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.text.change,(()=>this.render()))}render(){super.render(),this.container.innerHTML=this.has_math_disabled()?this.model.text:this.process_tex(this.model.text)}}s.MathJaxView=_,_.__name__="MathJaxView";class c extends i.Markup{constructor(e){super(e)}}s.MathJax=c,r=c,c.__name__="MathJax",c.__module__="panel.models.mathjax",r.prototype.default_view=_},
129
129
  "d49a559fbc": function _(e,t,s,n,o){var a;n();const i=e("@bokehjs/models/widgets/markup"),r=e("ea218d1c3c"),d=e("6b3b0facc2");class c extends r.PanelMarkupView{connect_signals(){super.connect_signals();const e=this.model.properties,{text:t,width:s,height:n,embed:o,start_page:a}=e;this.on_change([t,s,n,o,a],(()=>{this.update()}))}render(){super.render(),this.update()}update(){if(this.model.embed){const e=this.convert_base64_to_blob(),t=URL.createObjectURL(e),s=this.model.width||"100%",n=this.model.height||"100%";this.container.innerHTML=`<embed src="${t}#page=${this.model.start_page}" type="application/pdf" width="${s}" height="${n}"></embed>`}else{const e=(0,d.htmlDecode)(this.model.text);this.container.innerHTML=e||""}}convert_base64_to_blob(){const e=atob(this.model.text);var t=[];for(let s=0;s<e.length;s+=512){const n=e.slice(s,s+512),o=new Uint8Array(n.length);for(let e=0;e<n.length;e++)o[e]=n.charCodeAt(e);t.push(o)}return new Blob(t,{type:"application/pdf"})}}s.PDFView=c,c.__name__="PDFView";class l extends i.Markup{constructor(e){super(e)}}s.PDF=l,a=l,l.__name__="PDF",l.__module__="panel.models.markup",a.prototype.default_view=c,a.define((({Number:e,Boolean:t})=>({embed:[t,!0],start_page:[e,1]})))},
130
- "9f0456e5b5": function _(e,t,s,i,r){var n;i();const o=e("@bokehjs/core/dom"),l=e("@bokehjs/models/sources/column_data_source"),c=e("ea218d1c3c"),a={"material-dark":"Material Dark",material:"Material Light",vaporwave:"Vaporwave",solarized:"Solarized","solarized-dark":"Solarized Dark",monokai:"Monokai"},h={datagrid:"Datagrid",d3_x_bar:"X Bar",d3_y_bar:"Y Bar",d3_xy_line:"X/Y Line",d3_y_line:"Y Line",d3_y_area:"Y Area",d3_y_scatter:"Y Scatter",d3_xy_scatter:"X/Y Scatter",d3_treemap:"Treemap",d3_candlestick:"Candlestick",d3_sunburst:"Sunburst",d3_heatmap:"Heatmap",d3_ohlc:"OHLC"};function p(e){const t={};return Object.keys(e).forEach((s=>{t[e[s]]=s})),t}const d=p(h),_=p(a);class m extends c.HTMLBoxView{constructor(){super(...arguments),this._updating=!1,this._config_listener=null,this._current_config=null,this._loaded=!1}connect_signals(){super.connect_signals(),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.source.streaming,(()=>this.stream())),this.connect(this.model.source.patching,(()=>this.patch())),this.connect(this.model.properties.schema.change,(()=>{this.worker.table(this.model.schema).then((e=>{this.table=e,this.table.update(this.data),this.perspective_element.load(this.table)}))})),this.connect(this.model.properties.toggle_config.change,(()=>{this.perspective_element.toggleConfig()})),this.connect(this.model.properties.columns.change,(()=>{this.perspective_element.restore({columns:this.model.columns})})),this.connect(this.model.properties.expressions.change,(()=>{this.perspective_element.restore({expressions:this.model.expressions})})),this.connect(this.model.properties.split_by.change,(()=>{this.perspective_element.restore({split_by:this.model.split_by})})),this.connect(this.model.properties.group_by.change,(()=>{this.perspective_element.restore({group_by:this.model.group_by})})),this.connect(this.model.properties.aggregates.change,(()=>{this.perspective_element.restore({aggregates:this.model.aggregates})})),this.connect(this.model.properties.filters.change,(()=>{this.perspective_element.restore({filter:this.model.filters})})),this.connect(this.model.properties.sort.change,(()=>{this.perspective_element.restore({sort:this.model.sort})})),this.connect(this.model.properties.plugin.change,(()=>{this.perspective_element.restore({plugin:h[this.model.plugin]})})),this.connect(this.model.properties.selectable.change,(()=>{this.perspective_element.restore({plugin_config:Object.assign(Object.assign({},this._current_config),{selectable:this.model.selectable})})})),this.connect(this.model.properties.editable.change,(()=>{this.perspective_element.restore({plugin_config:Object.assign(Object.assign({},this._current_config),{editable:this.model.editable})})})),this.connect(this.model.properties.theme.change,(()=>{this.perspective_element.restore({theme:a[this.model.theme]}).catch((()=>{}))}))}disconnect_signals(){null!=this._config_listener&&this.perspective_element.removeEventListener("perspective-config-update",this._config_listener),this._config_listener=null,super.disconnect_signals()}remove(){this.perspective_element.delete((()=>this.worker.terminate())),super.remove()}render(){super.render(),this.worker=window.perspective.worker();const e=(0,o.div)({class:"pnx-perspective-viewer",style:{zIndex:0}});e.innerHTML="<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>",this.perspective_element=e.children[0],this.perspective_element.resetThemes([...Object.values(a)]).catch((()=>{})),this.model.toggle_config&&this.perspective_element.toggleConfig(),(0,c.set_size)(this.perspective_element,this.model),this.shadow_el.appendChild(e),this.worker.table(this.model.schema).then((e=>{this.table=e,this.table.update(this.data),this.perspective_element.load(this.table);const t=Object.assign(Object.assign({},this.model.plugin_config),{editable:this.model.editable,selectable:this.model.selectable});this.perspective_element.restore({aggregates:this.model.aggregates,columns:this.model.columns,expressions:this.model.expressions,filter:this.model.filters,split_by:this.model.split_by,group_by:this.model.group_by,plugin:h[this.model.plugin],plugin_config:t,sort:this.model.sort,theme:a[this.model.theme]}).catch((()=>{})),this.perspective_element.save().then((e=>{this._current_config=e})),this._config_listener=()=>this.sync_config(),this.perspective_element.addEventListener("perspective-config-update",this._config_listener),this._loaded=!0}))}sync_config(){return this._updating||this.perspective_element.save().then((e=>{this._current_config=e;const t={};for(let s in e){let i=e[s];void 0===i||"plugin"==s&&"debug"===i||"settings"===s||("filter"===s?s="filters":"plugin"===s?i=d[i]:"theme"===s&&(i=_[i]),t[s]=i)}this._updating=!0,this.model.setv(t),this._updating=!1})),!0}get data(){const e={};for(const t of this.model.source.columns())e[t]=this.model.source.get_array(t);return e}setData(){if(this._loaded){for(const e of this.model.source.columns())if(!(e in this.model.schema))return;this.table.replace(this.data)}}stream(){this._loaded&&this.table.replace(this.data)}patch(){this._loaded&&this.table.replace(this.data)}}s.PerspectiveView=m,m.__name__="PerspectiveView";class g extends c.HTMLBox{constructor(e){super(e)}}s.Perspective=g,n=g,g.__name__="Perspective",g.__module__="panel.models.perspective",n.prototype.default_view=m,n.define((({Any:e,Array:t,Boolean:s,Ref:i,Nullable:r,String:n})=>({aggregates:[e,{}],columns:[t(r(n)),[]],expressions:[r(t(n)),null],split_by:[r(t(n)),null],editable:[s,!0],filters:[r(t(e)),null],group_by:[r(t(n)),null],plugin:[n],plugin_config:[e,{}],selectable:[s,!0],schema:[e,{}],toggle_config:[s,!0],sort:[r(t(t(n))),null],source:[i(l.ColumnDataSource)],theme:[n,"material"]})))},
130
+ "d39fde6463": function _(e,t,s,i,n){var r,o;i();const l=e("@bokehjs/core/bokeh_events"),c=e("@bokehjs/core/dom"),a=e("@bokehjs/models/sources/column_data_source"),h=e("ea218d1c3c"),p={"material-dark":"Material Dark",material:"Material Light",vaporwave:"Vaporwave",solarized:"Solarized","solarized-dark":"Solarized Dark",monokai:"Monokai"},d={datagrid:"Datagrid",d3_x_bar:"X Bar",d3_y_bar:"Y Bar",d3_xy_line:"X/Y Line",d3_y_line:"Y Line",d3_y_area:"Y Area",d3_y_scatter:"Y Scatter",d3_xy_scatter:"X/Y Scatter",d3_treemap:"Treemap",d3_candlestick:"Candlestick",d3_sunburst:"Sunburst",d3_heatmap:"Heatmap",d3_ohlc:"OHLC"};function _(e){const t={};return Object.keys(e).forEach((s=>{t[e[s]]=s})),t}const g=_(d),m=_(p);class u extends l.ModelEvent{constructor(e,t,s){super(),this.config=e,this.column_names=t,this.row=s}get event_values(){return{model:this.origin,config:this.config,column_names:this.column_names,row:this.row}}}s.PerspectiveClickEvent=u,r=u,u.__name__="PerspectiveClickEvent",r.prototype.event_name="perspective-click";class v extends h.HTMLBoxView{constructor(){super(...arguments),this._updating=!1,this._config_listener=null,this._current_config=null,this._loaded=!1}connect_signals(){super.connect_signals(),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.source.streaming,(()=>this.stream())),this.connect(this.model.source.patching,(()=>this.patch())),this.connect(this.model.properties.schema.change,(()=>{this.worker.table(this.model.schema).then((e=>{this.table=e,this.table.update(this.data),this.perspective_element.load(this.table)}))})),this.connect(this.model.properties.toggle_config.change,(()=>{this.perspective_element.toggleConfig()})),this.connect(this.model.properties.columns.change,(()=>{this._updating||this.perspective_element.restore({columns:this.model.columns})})),this.connect(this.model.properties.expressions.change,(()=>{this._updating||this.perspective_element.restore({expressions:this.model.expressions})})),this.connect(this.model.properties.split_by.change,(()=>{this._updating||this.perspective_element.restore({split_by:this.model.split_by})})),this.connect(this.model.properties.group_by.change,(()=>{this._updating||this.perspective_element.restore({group_by:this.model.group_by})})),this.connect(this.model.properties.aggregates.change,(()=>{this._updating||this.perspective_element.restore({aggregates:this.model.aggregates})})),this.connect(this.model.properties.filters.change,(()=>{this._updating||this.perspective_element.restore({filter:this.model.filters})})),this.connect(this.model.properties.sort.change,(()=>{this._updating||this.perspective_element.restore({sort:this.model.sort})})),this.connect(this.model.properties.plugin.change,(()=>{this._updating||this.perspective_element.restore({plugin:d[this.model.plugin]})})),this.connect(this.model.properties.selectable.change,(()=>{this._updating||this.perspective_element.restore({plugin_config:Object.assign(Object.assign({},this._current_config),{selectable:this.model.selectable})})})),this.connect(this.model.properties.editable.change,(()=>{this._updating||this.perspective_element.restore({plugin_config:Object.assign(Object.assign({},this._current_config),{editable:this.model.editable})})})),this.connect(this.model.properties.theme.change,(()=>{this._updating||this.perspective_element.restore({theme:p[this.model.theme]}).catch((()=>{}))}))}disconnect_signals(){null!=this._config_listener&&this.perspective_element.removeEventListener("perspective-config-update",this._config_listener),this._config_listener=null,super.disconnect_signals()}remove(){this.perspective_element.delete((()=>this.worker.terminate())),super.remove()}render(){super.render(),this.worker=window.perspective.worker();const e=(0,c.div)({class:"pnx-perspective-viewer",style:{zIndex:0}});e.innerHTML="<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>",this.perspective_element=e.children[0],this.perspective_element.resetThemes([...Object.values(p)]).catch((()=>{})),this.model.toggle_config&&this.perspective_element.toggleConfig(),(0,h.set_size)(e,this.model),this.shadow_el.appendChild(e),this.worker.table(this.model.schema).then((e=>{this.table=e,this.table.update(this.data),this.perspective_element.load(this.table);const t=Object.assign(Object.assign({},this.model.plugin_config),{editable:this.model.editable,selectable:this.model.selectable});this.perspective_element.restore({aggregates:this.model.aggregates,columns:this.model.columns,expressions:this.model.expressions,filter:this.model.filters,split_by:this.model.split_by,group_by:this.model.group_by,plugin:d[this.model.plugin],plugin_config:t,sort:this.model.sort,theme:p[this.model.theme]}).catch((()=>{})),this.perspective_element.save().then((e=>{this._current_config=e})),this._config_listener=()=>this.sync_config(),this.perspective_element.addEventListener("perspective-config-update",this._config_listener),this.perspective_element.addEventListener("perspective-click",(e=>{this.model.trigger_event(new u(e.detail.config,e.detail.column_names,e.detail.row))})),this._loaded=!0}))}sync_config(){return this._updating||this.perspective_element.save().then((e=>{this._current_config=e;const t={};for(let s in e){let i=e[s];void 0===i||"plugin"==s&&"debug"===i||"settings"===s||("filter"===s?s="filters":"plugin"===s?i=g[i]:"theme"===s&&(i=m[i]),t[s]=i)}this._updating=!0,this.model.setv(t),this._updating=!1})),!0}get data(){const e={};for(const t of this.model.source.columns())e[t]=this.model.source.get_array(t);return e}setData(){if(this._loaded){for(const e of this.model.source.columns())if(!(e in this.model.schema))return;this.table.replace(this.data)}}stream(){this._loaded&&this.table.replace(this.data)}patch(){this._loaded&&this.table.replace(this.data)}}s.PerspectiveView=v,v.__name__="PerspectiveView";class b extends h.HTMLBox{constructor(e){super(e)}}s.Perspective=b,o=b,b.__name__="Perspective",b.__module__="panel.models.perspective",o.prototype.default_view=v,o.define((({Any:e,Array:t,Boolean:s,Ref:i,Nullable:n,String:r})=>({aggregates:[e,{}],columns:[t(n(r)),[]],expressions:[n(t(r)),null],split_by:[n(t(r)),null],editable:[s,!0],filters:[n(t(e)),null],group_by:[n(t(r)),null],plugin:[r],plugin_config:[e,{}],selectable:[s,!0],schema:[e,{}],toggle_config:[s,!0],sort:[n(t(t(r))),null],source:[i(a.ColumnDataSource)],theme:[r,"material"]})))},
131
131
  "c172556ad3": function _(e,t,i,s,o){var l;s();const n=e("@bokehjs/core/kinds"),a=e("@bokehjs/core/dom"),r=e("@bokehjs/models/widgets/widget");function d(e){e.forEach((e=>e.style.borderStyle="inset"))}function h(e){e.forEach((e=>e.style.borderStyle="outset"))}class c extends r.WidgetView{constructor(){super(...arguments),this._changing=!1}connect_signals(){super.connect_signals(),this.connect(this.model.properties.direction.change,(()=>this.set_direction())),this.connect(this.model.properties.value.change,(()=>this.render())),this.connect(this.model.properties.loop_policy.change,(()=>this.set_loop_state(this.model.loop_policy))),this.connect(this.model.properties.disabled.change,(()=>this.toggle_disable())),this.connect(this.model.properties.show_loop_controls.change,(()=>{this.model.show_loop_controls&&this.loop_state.parentNode!=this.groupEl?this.groupEl.appendChild(this.loop_state):this.model.show_loop_controls||this.loop_state.parentNode!=this.groupEl||this.groupEl.removeChild(this.loop_state)}))}toggle_disable(){this.sliderEl.disabled=this.model.disabled;for(const e of this.buttonEl.children){e.disabled=this.model.disabled}for(const e of this.loop_state.children)if("input"==e.tagName){e.disabled=this.model.disabled}}get_height(){return 250}render(){if(null!=this.sliderEl)return this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),void(this.sliderEl.value=String(this.model.value));super.render(),this.groupEl=(0,a.div)(),this.groupEl.style.display="flex",this.groupEl.style.flexDirection="column",this.groupEl.style.alignItems="center",this.sliderEl=document.createElement("input"),this.sliderEl.style.width="100%",this.sliderEl.setAttribute("type","range"),this.sliderEl.value=String(this.model.value),this.sliderEl.min=String(this.model.start),this.sliderEl.max=String(this.model.end),this.sliderEl.addEventListener("input",(e=>{this.set_frame(parseInt(e.target.value),!1)})),this.sliderEl.addEventListener("change",(e=>{this.set_frame(parseInt(e.target.value))}));const e=(0,a.div)();this.buttonEl=e,e.style.cssText="margin: 0 auto; display: flex; padding: 5px; align-items: stretch; width: 100%;";const t="text-align: center; min-width: 20px; flex-grow: 1; margin: 2px",i="text-align: center; min-width: 40px; flex-grow: 2; margin: 2px",s=document.createElement("button");s.style.cssText=t,s.appendChild(document.createTextNode("\u2013")),s.onclick=()=>this.slower(),e.appendChild(s);const o=document.createElement("button");o.style.cssText=i,o.appendChild(document.createTextNode("\u275a\u25c0\u25c0")),o.onclick=()=>this.first_frame(),e.appendChild(o);const l=document.createElement("button");l.style.cssText=i,l.appendChild(document.createTextNode("\u275a\u25c0")),l.onclick=()=>this.previous_frame(),e.appendChild(l);const n=document.createElement("button");n.style.cssText=i,n.appendChild(document.createTextNode("\u25c0")),n.onclick=()=>this.reverse_animation(),e.appendChild(n);const r=document.createElement("button");r.style.cssText=i,r.appendChild(document.createTextNode("\u275a\u275a")),r.onclick=()=>this.pause_animation(),e.appendChild(r);const c=document.createElement("button");c.style.cssText=i,c.appendChild(document.createTextNode("\u25b6")),c.onclick=()=>this.play_animation(),e.appendChild(c);const p=document.createElement("button");p.style.cssText=i,p.appendChild(document.createTextNode("\u25b6\u275a")),p.onclick=()=>this.next_frame(),e.appendChild(p);const m=document.createElement("button");m.style.cssText=i,m.appendChild(document.createTextNode("\u25b6\u25b6\u275a")),m.onclick=()=>this.last_frame(),e.appendChild(m);const _=document.createElement("button");_.style.cssText=t,_.appendChild(document.createTextNode("+")),_.onclick=()=>this.faster(),e.appendChild(_),this._toggle_reverse=()=>{h([r,c]),d([n])},this._toogle_pause=()=>{h([n,c]),d([r])},this._toggle_play=()=>{h([n,r]),d([c])},this.loop_state=document.createElement("form"),this.loop_state.style.cssText="margin: 0 auto; display: table";const u=document.createElement("input");u.type="radio",u.value="once",u.name="state";const g=document.createElement("label");g.innerHTML="Once",g.style.cssText="padding: 0 10px 0 5px; user-select:none;";const f=document.createElement("input");f.setAttribute("type","radio"),f.setAttribute("value","loop"),f.setAttribute("name","state");const v=document.createElement("label");v.innerHTML="Loop",v.style.cssText="padding: 0 10px 0 5px; user-select:none;";const E=document.createElement("input");E.setAttribute("type","radio"),E.setAttribute("value","reflect"),E.setAttribute("name","state");const x=document.createElement("label");x.innerHTML="Reflect",x.style.cssText="padding: 0 10px 0 5px; user-select:none;","once"==this.model.loop_policy?u.checked=!0:"loop"==this.model.loop_policy?f.checked=!0:E.checked=!0,this.loop_state.appendChild(u),this.loop_state.appendChild(g),this.loop_state.appendChild(f),this.loop_state.appendChild(v),this.loop_state.appendChild(E),this.loop_state.appendChild(x),this.groupEl.appendChild(this.sliderEl),this.groupEl.appendChild(e),this.model.show_loop_controls&&this.groupEl.appendChild(this.loop_state),this.toggle_disable(),this.shadow_el.appendChild(this.groupEl)}set_frame(e,t=!0){this.model.value=e,t&&(this.model.value_throttled=e),this.sliderEl.value!=String(e)&&(this.sliderEl.value=String(e))}get_loop_state(){for(var e=this.loop_state.state,t=0;t<e.length;t++){var i=e[t];if(i.checked)return i.value}return"once"}set_loop_state(e){for(var t=this.loop_state.state,i=0;i<t.length;i++){var s=t[i];s.value==e&&(s.checked=!0)}}next_frame(){this.set_frame(Math.min(this.model.end,this.model.value+this.model.step))}previous_frame(){this.set_frame(Math.max(this.model.start,this.model.value-this.model.step))}first_frame(){this.set_frame(this.model.start)}last_frame(){this.set_frame(this.model.end)}slower(){this.model.interval=Math.round(this.model.interval/.7),this.model.direction>0?this.play_animation():this.model.direction<0&&this.reverse_animation()}faster(){this.model.interval=Math.round(.7*this.model.interval),this.model.direction>0?this.play_animation():this.model.direction<0&&this.reverse_animation()}anim_step_forward(){if(this.model.value<this.model.end)this.next_frame();else{var e=this.get_loop_state();"loop"==e?this.first_frame():"reflect"==e?(this.last_frame(),this.reverse_animation()):(this.pause_animation(),this.last_frame())}}anim_step_reverse(){if(this.model.value>this.model.start)this.previous_frame();else{var e=this.get_loop_state();"loop"==e?this.last_frame():"reflect"==e?(this.first_frame(),this.play_animation()):(this.pause_animation(),this.first_frame())}}set_direction(){this._changing||(0===this.model.direction?this.pause_animation():1===this.model.direction?this.play_animation():-1===this.model.direction&&this.reverse_animation())}pause_animation(){this._toogle_pause(),this._changing=!0,this.model.direction=0,this._changing=!1,this.timer&&(clearInterval(this.timer),this.timer=null)}play_animation(){this.pause_animation(),this._toggle_play(),this._changing=!0,this.model.direction=1,this._changing=!1,this.timer||(this.timer=setInterval((()=>this.anim_step_forward()),this.model.interval))}reverse_animation(){this.pause_animation(),this._toggle_reverse(),this._changing=!0,this.model.direction=-1,this._changing=!1,this.timer||(this.timer=setInterval((()=>this.anim_step_reverse()),this.model.interval))}}i.PlayerView=c,c.__name__="PlayerView",i.LoopPolicy=(0,n.Enum)("once","loop","reflect");class p extends r.Widget{constructor(e){super(e)}}i.Player=p,l=p,p.__name__="Player",p.__module__="panel.models.widgets",l.prototype.default_view=c,l.define((({Boolean:e,Int:t})=>({direction:[t,0],interval:[t,500],start:[t,0],end:[t,10],step:[t,1],loop_policy:[i.LoopPolicy,"once"],value:[t,0],value_throttled:[t,0],show_loop_controls:[e,!0]}))),l.override({width:400})},
132
132
  "bb3d0ded66": function _(t,e,o,i,s){var r;i();const n=t("@bokehjs/core/dom"),l=t("@bokehjs/core/util/object"),a=t("@bokehjs/core/util/eq"),h=t("@bokehjs/models/sources/column_data_source"),c=t("99a25e6992"),d=t("990b5dd5c7"),p=t("ea218d1c3c");function _(t){return Object.entries(t).forEach((([e,o])=>{o&&"object"==typeof o?_(o):void 0===o&&(t[e]=null)})),t}const u=(t,e,o)=>{let i=Array.isArray(e)?[]:{};if("click"===o||"hover"===o||"selected"===o){const o=[];if(null==e)return null;const s=t.data;for(let t=0;t<e.points.length;t++){const i=e.points[t];let r={};for(let t in i){const e=i[t];!i.hasOwnProperty(t)||Array.isArray(e)||(0,d.isPlainObject)(e)||void 0===e||(r[t]=e)}null!=i&&(i.hasOwnProperty("curveNumber")&&i.hasOwnProperty("pointNumber")&&s[i.curveNumber].hasOwnProperty("customdata")&&(r.customdata=s[i.curveNumber].customdata[i.pointNumber]),i.hasOwnProperty("pointNumbers")&&(r.pointNumbers=i.pointNumbers)),o[t]=r}i.points=o}else if("relayout"===o||"restyle"===o)for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return e.hasOwnProperty("range")&&(i.range=e.range),e.hasOwnProperty("lassoPoints")&&(i.lassoPoints=e.lassoPoints),_(i)};class y extends p.HTMLBoxView{constructor(){super(...arguments),this._settingViewport=!1,this._plotInitialized=!1,this._rendered=!1,this._reacting=!1,this._relayouting=!1,this._end_relayouting=(0,c.debounce)((()=>{this._relayouting=!1}),2e3,!1)}connect_signals(){super.connect_signals();const{data:t,data_sources:e,layout:o,relayout:i,restyle:s}=this.model.properties;this.on_change([t,e,o],(()=>{const t=this.model._render_count;setTimeout((()=>{this.model._render_count===t&&(this.model._render_count+=1)}),250)})),this.on_change([i],(()=>{null!=this.model.relayout&&(window.Plotly.relayout(this.container,this.model.relayout),this.model.relayout=null)})),this.on_change([s],(()=>{null!=this.model.restyle&&(window.Plotly.restyle(this.container,this.model.restyle.data,this.model.restyle.traces),this.model.restyle=null)})),this.connect(this.model.properties.viewport_update_policy.change,(()=>{this._updateSetViewportFunction()})),this.connect(this.model.properties.viewport_update_throttle.change,(()=>{this._updateSetViewportFunction()})),this.connect(this.model.properties._render_count.change,(()=>{this.plot()})),this.connect(this.model.properties.frames.change,(()=>{this.plot(!0)})),this.connect(this.model.properties.viewport.change,(()=>this._updateViewportFromProperty()))}remove(){window.Plotly.purge(this.container),super.remove()}render(){super.render(),this.container=(0,n.div)(),(0,p.set_size)(this.container,this.model),this._rendered=!1,this.shadow_el.appendChild(this.container),this.watch_stylesheets(),this.plot().then((()=>{this._rendered=!0,null!=this.model.relayout&&window.Plotly.relayout(this.container,this.model.relayout),window.Plotly.Plots.resize(this.container)}))}style_redraw(){this._rendered&&window.Plotly.Plots.resize(this.container)}after_layout(){super.after_layout(),this._rendered&&window.Plotly.Plots.resize(this.container)}_trace_data(){const t=[];for(let e=0;e<this.model.data.length;e++)t.push(this._get_trace(e,!1));return t}_layout_data(){const t=(0,d.deepCopy)(this.model.layout);if(this._relayouting){const{layout:e}=this.container;Object.keys(e).reduce(((e,o)=>{"axis"===o.slice(1,5)&&"range"in e&&(t[o].range=e.range)}),{})}return t}_install_callbacks(){this.container.on("plotly_relayout",(t=>{!0!==t._update_from_property&&(this.model.relayout_data=u(this.container,t,"relayout"),this._updateViewportProperty(),this._end_relayouting())})),this.container.on("plotly_relayouting",(()=>{"mouseup"!==this.model.viewport_update_policy&&(this._relayouting=!0,this._updateViewportProperty())})),this.container.on("plotly_restyle",(t=>{this.model.restyle_data=u(this.container,t,"restyle"),this._updateViewportProperty()})),this.container.on("plotly_click",(t=>{this.model.click_data=u(this.container,t,"click")})),this.container.on("plotly_hover",(t=>{this.model.hover_data=u(this.container,t,"hover")})),this.container.on("plotly_selected",(t=>{this.model.selected_data=u(this.container,t,"selected")})),this.container.on("plotly_clickannotation",(t=>{delete t.event,delete t.fullAnnotation,this.model.clickannotation_data=t})),this.container.on("plotly_deselect",(()=>{this.model.selected_data=null})),this.container.on("plotly_unhover",(()=>{this.model.hover_data=null}))}async plot(t=!1){if(!window.Plotly)return;const e=this._trace_data(),o=this._layout_data();if(this._reacting=!0,t){const t={data:e,layout:o,config:this.model.config,frames:this.model.frames};await window.Plotly.newPlot(this.container,t)}else await window.Plotly.react(this.container,e,o,this.model.config),null!=this.model.frames&&await window.Plotly.addFrames(this.container,this.model.frames);var i,s;this._updateSetViewportFunction(),this._updateViewportProperty(),this._plotInitialized?(i=this.container,(s=window.getComputedStyle(i).display)&&"none"!==s&&window.Plotly.Plots.resize(this.container)):this._install_callbacks(),this._reacting=!1,this._plotInitialized=!0}_get_trace(t,e){const o=(0,l.clone)(this.model.data[t]),i=this.model.data_sources[t];for(const t of i.columns()){let s=i.get_array(t)[0];if(null!=s.shape&&s.shape.length>1){const t=[],e=s.shape;for(let o=0;o<e[0];o++)t.push(s.slice(o*e[1],(o+1)*e[1]));s=t}let r=t.split("."),n=r[r.length-1],l=o;for(let t of r.slice(0,-1))l=l[t];e&&1==r.length?l[n]=[s]:l[n]=s}return o}_updateViewportFromProperty(){if(!window.Plotly||this._settingViewport||this._reacting||!this.model.viewport)return;const t=this.container._fullLayout;Object.keys(this.model.viewport).reduce(((e,o)=>{if((0,a.is_equal)((0,d.get)(t,o),e))return!0;{let t=(0,d.deepCopy)(this.model.viewport);return t._update_from_property=!0,this._settingViewport=!0,window.Plotly.relayout(this.el,t).then((()=>{this._settingViewport=!1})),!1}}),{})}_updateViewportProperty(){const t=this.container._fullLayout;let e={};for(let o in t){if(!t.hasOwnProperty(o))continue;let i=o.slice(0,5);"xaxis"!==i&&"yaxis"!==i||(e[o+".range"]=(0,d.deepCopy)(t[o].range))}(0,a.is_equal)(e,this.model.viewport)||this._setViewport(e)}_updateSetViewportFunction(){"continuous"===this.model.viewport_update_policy||"mouseup"===this.model.viewport_update_policy?this._setViewport=t=>{this._settingViewport||(this._settingViewport=!0,this.model.viewport=t,this._settingViewport=!1)}:this._setViewport=(0,d.throttle)((t=>{this._settingViewport||(this._settingViewport=!0,this.model.viewport=t,this._settingViewport=!1)}),this.model.viewport_update_throttle)}}o.PlotlyPlotView=y,y.__name__="PlotlyPlotView";class w extends p.HTMLBox{constructor(t){super(t)}}o.PlotlyPlot=w,r=w,w.__name__="PlotlyPlot",w.__module__="panel.models.plotly",r.prototype.default_view=y,r.define((({Array:t,Any:e,Nullable:o,Number:i,Ref:s,String:r})=>({data:[t(e),[]],layout:[e,{}],config:[e,{}],frames:[o(t(e)),null],data_sources:[t(s(h.ColumnDataSource)),[]],relayout:[o(e),{}],restyle:[o(e),{}],relayout_data:[e,{}],restyle_data:[t(e),[]],click_data:[e,{}],hover_data:[e,{}],clickannotation_data:[e,{}],selected_data:[e,{}],viewport:[e,{}],viewport_update_policy:[r,"mouseup"],viewport_update_throttle:[i,200],_render_count:[i,0]})))},
133
133
  "990b5dd5c7": function _(t,n,e,r,o){r();e.get=(t,n,e=undefined)=>{const r=e=>String.prototype.split.call(n,e).filter(Boolean).reduce(((t,n)=>null!=t?t[n]:t),t),o=r(/[,[\]]+?/)||r(/[,[\].]+?/);return void 0===o||o===t?e:o},e.throttle=function(t,n){var e=0;return function(){var r=Number(new Date);r-e>=n&&(t(),e=r)}},e.deepCopy=function t(n){var e;if(null==n||"object"!=typeof n)return n;if(n instanceof Array){e=[];for(var r=0,o=n.length;r<o;r++)e[r]=t(n[r]);return e}if(n instanceof Object){const e={};for(const r in n){const o=r;n.hasOwnProperty(o)&&(e[o]=t(n[o]))}return e}throw new Error("Unable to copy obj! Its type isn't supported.")},e.isPlainObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)}},
134
134
  "b82925a928": function _(e,s,t,o,i){var r;o();const l=e("@bokehjs/core/dom"),h=e("ea218d1c3c");class n extends h.HTMLBoxView{connect_signals(){super.connect_signals();const e=()=>this.render();this.connect(this.model.properties.height.change,e),this.connect(this.model.properties.width.change,e),this.connect(this.model.properties.height_policy.change,e),this.connect(this.model.properties.width_policy.change,e),this.connect(this.model.properties.sizing_mode.change,e),this.connect(this.model.properties.active.change,(()=>this.setCSS())),this.connect(this.model.properties.bar_color.change,(()=>this.setCSS())),this.connect(this.model.properties.css_classes.change,(()=>this.setCSS())),this.connect(this.model.properties.value.change,(()=>this.setValue())),this.connect(this.model.properties.max.change,(()=>this.setMax()))}render(){super.render();const e=Object.assign(Object.assign({},this.model.styles),{display:"inline-block"});this.progressEl=document.createElement("progress"),this.setValue(),this.setMax(),this.setCSS();for(const s in e)this.progressEl.style.setProperty(s,e[s]);this.shadow_el.appendChild(this.progressEl)}stylesheets(){const e=super.stylesheets();for(const s of this.model.css)e.push(new l.ImportedStyleSheet(s));return e}setCSS(){let e=this.model.css_classes.join(" ")+" "+this.model.bar_color;this.model.active&&(e+=" active"),this.progressEl.className=e}setValue(){null==this.model.value?this.progressEl.value=0:this.model.value>=0?this.progressEl.value=this.model.value:this.model.value<0&&this.progressEl.removeAttribute("value")}setMax(){null!=this.model.max&&(this.progressEl.max=this.model.max)}}t.ProgressView=n,n.__name__="ProgressView";class c extends h.HTMLBox{constructor(e){super(e)}}t.Progress=c,r=c,c.__name__="Progress",c.__module__="panel.models.widgets",r.prototype.default_view=n,r.define((({Any:e,Array:s,Boolean:t,Number:o,String:i})=>({active:[t,!0],bar_color:[i,"primary"],css:[s(i),[]],max:[o,100],value:[e,null]})))},
135
135
  "e115225ba2": function _(e,t,i,l,o){var s;l();const n=e("@bokehjs/core/dom"),d=e("ea218d1c3c");class h extends d.HTMLBoxView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.disabled.change,(()=>this.quill.enable(!this.model.disabled))),this.connect(this.model.properties.text.change,(()=>{this._editing||(this._editing=!0,this.quill.enable(!1),this.quill.setContents([]),this.quill.clipboard.dangerouslyPasteHTML(this.model.text),this.quill.enable(!this.model.disabled),this._editing=!1)}));const{mode:e,toolbar:t,placeholder:i}=this.model.properties;this.on_change([i],(()=>{this.quill.root.setAttribute("data-placeholder",this.model.placeholder)})),this.on_change([e,t],(()=>{this.render(),this._layout_toolbar()}))}_layout_toolbar(){if(null==this._toolbar)this.el.style.removeProperty("padding-top");else{const e=this._toolbar.getBoundingClientRect().height+1;this.el.style.paddingTop=e+"px",this._toolbar.style.marginTop=-e+"px"}}render(){super.render(),this.container=(0,n.div)({style:"visibility: hidden;"}),this.shadow_el.appendChild(this.container);const e="bubble"===this.model.mode?"bubble":"snow";this.watch_stylesheets(),this.quill=new window.Quill(this.container,{modules:{toolbar:this.model.toolbar},readOnly:!0,placeholder:this.model.placeholder,theme:e}),this._editor=this.shadow_el.querySelector(".ql-editor"),this._toolbar=this.shadow_el.querySelector(".ql-toolbar"),this.quill.clipboard.dangerouslyPasteHTML(this.model.text),this.quill.on("text-change",(()=>{this._editing||(this._editing=!0,this.model.text=this._editor.innerHTML,this._editing=!1)})),this.model.disabled||this.quill.enable(!this.model.disabled),document.addEventListener("selectionchange",((...e)=>{this.quill.selection.update()}))}style_redraw(){this.container.style.visibility="visible"}after_layout(){super.after_layout(),this._layout_toolbar()}}i.QuillInputView=h,h.__name__="QuillInputView";class a extends d.HTMLBox{constructor(e){super(e)}}i.QuillInput=a,s=a,a.__name__="QuillInput",a.__module__="panel.models.quill",s.prototype.default_view=h,s.define((({Any:e,String:t})=>({mode:[t,"toolbar"],placeholder:[t,""],text:[t,""],toolbar:[e,null]}))),s.override({height:300})},
136
- "b969c294f5": function _(e,t,n,s,i){var o;s();const r=e("1b70f5b1d3"),l=e("283ce7811c"),c=e("b3f51db71c"),d=e("@bokehjs/core/dom"),h=e("@bokehjs/core/build_views"),a=e("@bokehjs/core/util/types"),_=e("fd9108e30e"),u=e("490942d778"),p=e("6b3b0facc2"),m=e("ea218d1c3c");function f(e,t,n){const s={};for(const e of n)s[`{${e}}`]="(.*)";const i=[];let o="^"+(e.replace(/[-\/\\^$*+?.()|[\]]/g,"\\$&")+"$");let r,l,c;for(const t in s)if(l=e.indexOf(t),l>-1){for(o=o.replace(t,s[t]),c={index:l,token:t},r=0;r<i.length&&i[r].index<l;r++);r<i.length?i.splice(r,0,c):i.push(c)}o=o.replace(/\{[^{}]+\}/g,".*");var d=new RegExp(o).exec(t);let h=null;if(d)for(h={},r=0;r<i.length;r++)h[i[r].token.slice(1,-1)]=d[r+1];return h}function v(e,t){let n=e.getElementById(t);return null==n&&(n=document.getElementById(t)),n}class $ extends m.HTMLBoxView{constructor(){super(...arguments),this._parent=null,this._changing=!1,this._event_listeners={},this._mutation_observers=[],this._script_fns={},this._state={}}initialize(){super.initialize(),this.html=(0,p.htmlDecode)(this.model.html)||this.model.html}_recursive_connect(e,t,n){for(const s in e.properties){let i;i=n.length?`${n}.${s}`:s;const o=e[s];null!=o&&(null!=o.properties&&this._recursive_connect(o,!0,i),this.connect(e.properties[s].change,(()=>{if(t)for(const t in this.model.children)if(this.model.children[t]==s){let n=e[s];return(0,a.isArray)(n)||(n=[n]),void this._render_node(t,n)}this._changing||this._update(i)})))}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(async()=>{this.html=(0,p.htmlDecode)(this.model.html)||this.model.html,await this.rebuild()})),this._recursive_connect(this.model.data,!0,""),this.connect(this.model.properties.events.change,(()=>{this._remove_event_listeners(),this._setup_event_listeners()})),this.connect_scripts()}connect_scripts(){const e=this.model.data.id;for(let t in this.model.scripts){const n=this.model.scripts[t];let s,i=this.model.data;if(t.indexOf(".")>=0){const e=t.split(".");s=e[e.length-1];for(const t of e.slice(0,-1))i=i[t]}else s=t;for(const o of n){const n=(0,p.htmlDecode)(o)||o,r=this._render_script(n,e);this._script_fns[t]=r;const l=i.properties[s];null!=l&&this.connect(l.change,(()=>{this._changing||this.run_script(t)}))}}}run_script(e,t=!1){const n=this._script_fns[e];if(void 0===n)return void(t||console.log(`Script '${e}' could not be found.`));const s={get_records:(e,t)=>this.get_records(e,t)};for(const e in this._script_fns)s[e]=()=>this.run_script(e);return n(this.model,this.model.data,this._state,this,(e=>this.run_script(e)),s)}get_records(e,t=!0){return(0,_.dict_to_records)(this.model.data[e],t)}disconnect_signals(){super.disconnect_signals(),this._remove_event_listeners(),this._remove_mutation_observers()}remove(){this.run_script("remove",!0),super.remove()}get child_models(){const e=[];for(const t in this.model.children)for(const n of this.model.children[t])"string"!=typeof n&&e.push(n);return e}async build_child_views(){const{created:e,removed:t}=await(0,h.build_views)(this._child_views,this.child_models,{parent:null});for(const e of t)this._resize_observer.unobserve(e.el);for(const t of e)this._resize_observer.observe(t.el,{box:"border-box"});return e}_after_layout(){this.run_script("after_layout",!0)}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.container=(0,d.div)({style:"display: contents;"}),this.shadow_el.append(this.container),this._update(),this._render_children(),this._setup_mutation_observers(),this._setup_event_listeners(),this.run_script("render",!0)}_send_event(e,t,n){let s=(0,u.serializeEvent)(n);s.type=t;for(const e in s)void 0===s[e]&&delete s[e];this.model.trigger_event(new p.DOMEvent(e,s))}_render_child(e,t){const n=this._child_views.get(e);null==n?t.innerHTML=(0,p.htmlDecode)(e)||e:n.render_to(t)}_render_node(e,t){const n=this.model.data.id;if(this.model.looped.indexOf(e)>-1)for(let s=0;s<t.length;s++){const i=v(this.shadow_el,`${e}-${s}-${n}`);null!=i?this._render_child(t[s],i):console.warn(`DOM node '${e}-${s}-${n}' could not be found. Cannot render children.`)}else{const s=v(this.shadow_el,`${e}-${n}`);if(null==s)return void console.warn(`DOM node '${e}-${n}' could not be found. Cannot render children.`);for(const e of t)this._render_child(e,s)}}_render_children(){for(const e in this.model.children){let t=this.model.children[e];"string"==typeof t&&(t=this.model.data[t],(0,a.isArray)(t)||(t=[t])),this._render_node(e,t)}}_render_html(e,t={}){let n=e,s="";const i=[];for(const e in this.model.callbacks)for(const t of this.model.callbacks[e]){const[o,r]=t;let l;if(n=n.replaceAll("${"+r+"}","$--{"+r+"}"),r.startsWith("script(")){const e=r.replace("('","_").replace("')","").replace('("',"_").replace('")',"").replace("-","_"),t=e.replaceAll("script_","");n=n.replaceAll(r,e),l=`\n const ${e} = (event) => {\n view._state.event = event\n view.run_script("${t}")\n delete view._state.event\n }\n `}else l=`\n const ${r} = (event) => {\n let elname = "${e}"\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, "${o}", event)\n }\n `;i.indexOf(r)>-1||(i.push(r),s+=l)}return n=n.replaceAll("${model.","$-{model.").replaceAll("${","${data.").replaceAll("$-{model.","${model.").replaceAll("$--{","${"),new Function("view, model, data, state, html, useCallback",s+"return html`"+n+"`;")(this,this.model,this.model.data,t,c.html,l.useCallback)}_render_script(e,t){const n=[];for(const s of this.model.nodes){const i=s.replace("-","_");if(-1===e.indexOf(i))continue;const o=`\n let ${i} = view.shadow_el.getElementById('${s}-${t}')\n if (${i} == null)\n ${i} = document.getElementById('${s}-${t}')\n if (${i} == null) {\n console.warn("DOM node '${s}' could not be found. Cannot execute callback.")\n return\n }\n `;n.push(o)}return n.push("\n let event = null\n if (state.event !== undefined) {\n event = state.event\n }\n "),n.push(e),new Function("model, data, state, view, script, self",n.join("\n"))}_remove_mutation_observers(){for(const e of this._mutation_observers)e.disconnect();this._mutation_observers=[]}_setup_mutation_observers(){const e=this.model.data.id;for(const t in this.model.attrs){const n=v(this.shadow_el,`${t}-${e}`);if(null==n){console.warn(`DOM node '${t}-${e}' could not be found. Cannot set up MutationObserver.`);continue}const s=new MutationObserver((()=>{this._update_model(n,t)}));s.observe(n,{attributes:!0}),this._mutation_observers.push(s)}}_remove_event_listeners(){const e=this.model.data.id;for(const t in this._event_listeners){const n=v(this.shadow_el,`${t}-${e}`);if(null!=n)for(const e in this._event_listeners[t]){const s=this._event_listeners[t][e];n.removeEventListener(e,s)}}this._event_listeners={}}_setup_event_listeners(){const e=this.model.data.id;for(const t in this.model.events){const n=v(this.shadow_el,`${t}-${e}`);if(null==n){console.warn(`DOM node '${t}-${e}' could not be found. Cannot subscribe to DOM events.`);continue}const s=this.model.events[t];for(const e in s){const i=i=>{this._send_event(t,e,i),t in this.model.attrs&&s[e]&&this._update_model(n,t)};n.addEventListener(e,i),t in this._event_listeners||(this._event_listeners[t]={}),this._event_listeners[t][e]=i}}}_update(e=null){if(null==e||this.html.indexOf(`\${${e}}`)>-1){const e=this._render_html(this.html);if(null==e)return;try{this._changing=!0,(0,r.render)(e,this.container)}finally{this._changing=!1}}}_update_model(e,t){if(this._changing)return;const n={};for(const s of this.model.attrs[t]){const[i,o,r]=s;let l="children"===i?e.innerHTML:e[i];if(1===o.length&&`{${o[0]}}`===r)n[o[0]]=l;else if("string"==typeof l)if(l=f(r,l,o),null==l)console.warn(`Could not resolve parameters in ${t} element ${i} attribute value ${l}.`);else for(const e in l)void 0===l[e]?console.warn(`Could not resolve ${e} in ${t} element ${i} attribute value ${l}.`):n[e]=l[e]}try{this._changing=!0,this.model.data.setv(function(e){const t={};for(const n in e){let s=e[n];"string"!=typeof s||(""===s||"NaN"!==s&&isNaN(Number(s))?"false"!==s&&"true"!==s||(s="true"===s):s=Number(s)),t[n]=s}return t}(n))}catch(e){console.log("Could not serialize",n)}finally{this._changing=!1}}}n.ReactiveHTMLView=$,$.__name__="ReactiveHTMLView";class g extends m.HTMLBox{constructor(e){super(e)}}n.ReactiveHTML=g,o=g,g.__name__="ReactiveHTML",g.__module__="panel.models.reactive_html",o.prototype.default_view=$,o.define((({Array:e,Any:t,String:n})=>({attrs:[t,{}],callbacks:[t,{}],children:[t,{}],data:[t],events:[t,{}],html:[n,""],looped:[e(n),[]],nodes:[e(n),[]],scripts:[t,{}]})))},
136
+ "8b89b5165f": function _(e,t,n,s,i){var o;s();const r=e("1b70f5b1d3"),l=e("283ce7811c"),c=e("b3f51db71c"),d=e("@bokehjs/core/dom"),h=e("@bokehjs/core/util/types"),a=e("4e27eda472"),_=e("490942d778"),u=e("6b3b0facc2"),p=e("ea218d1c3c");function m(e,t,n){const s={};for(const e of n)s[`{${e}}`]="(.*)";const i=[];let o="^"+(e.replace(/[-\/\\^$*+?.()|[\]]/g,"\\$&")+"$");let r,l,c;for(const t in s)if(l=e.indexOf(t),l>-1){for(o=o.replace(t,s[t]),c={index:l,token:t},r=0;r<i.length&&i[r].index<l;r++);r<i.length?i.splice(r,0,c):i.push(c)}o=o.replace(/\{[^{}]+\}/g,".*");var d=new RegExp(o).exec(t);let h=null;if(d)for(h={},r=0;r<i.length;r++)h[i[r].token.slice(1,-1)]=d[r+1];return h}function f(e,t){let n=e.getElementById(t);return null==n&&(n=document.getElementById(t)),n}class v extends p.HTMLBoxView{constructor(){super(...arguments),this._parent=null,this._changing=!1,this._event_listeners={},this._mutation_observers=[],this._script_fns={},this._state={}}initialize(){super.initialize(),this.html=(0,u.htmlDecode)(this.model.html)||this.model.html}_recursive_connect(e,t,n){for(const s in e.properties){let i;i=n.length?`${n}.${s}`:s;const o=e[s];null!=o&&(null!=o.properties&&this._recursive_connect(o,!0,i),this.connect(e.properties[s].change,(()=>{if(t)for(const t in this.model.children)if(this.model.children[t]==s){let n=e[s];return(0,h.isArray)(n)||(n=[n]),void this._render_node(t,n)}this._changing||this._update(i)})))}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(async()=>{this.html=(0,u.htmlDecode)(this.model.html)||this.model.html,await this.rebuild()})),this._recursive_connect(this.model.data,!0,""),this.connect(this.model.properties.events.change,(()=>{this._remove_event_listeners(),this._setup_event_listeners()})),this.connect_scripts()}connect_scripts(){const e=this.model.data.id;for(let t in this.model.scripts){const n=this.model.scripts[t];let s,i=this.model.data;if(t.indexOf(".")>=0){const e=t.split(".");s=e[e.length-1];for(const t of e.slice(0,-1))i=i[t]}else s=t;for(const o of n){const n=(0,u.htmlDecode)(o)||o,r=this._render_script(n,e);this._script_fns[t]=r;const l=i.properties[s];null!=l&&this.connect(l.change,(()=>{this._changing||this.run_script(t)}))}}}run_script(e,t=!1){const n=this._script_fns[e];if(void 0===n)return void(t||console.log(`Script '${e}' could not be found.`));const s={get_records:(e,t)=>this.get_records(e,t)};for(const e in this._script_fns)s[e]=()=>this.run_script(e);return n(this.model,this.model.data,this._state,this,(e=>this.run_script(e)),s)}get_records(e,t=!0){return(0,a.dict_to_records)(this.model.data[e],t)}disconnect_signals(){super.disconnect_signals(),this._remove_event_listeners(),this._remove_mutation_observers()}remove(){this.run_script("remove",!0),super.remove()}get child_models(){const e=[];for(const t in this.model.children)for(const n of this.model.children[t])"string"!=typeof n&&e.push(n);return e}_after_layout(){this.run_script("after_layout",!0)}render(){this.empty(),this._update_stylesheets(),this._update_css_classes(),this._apply_styles(),this._apply_visible(),this.container=(0,d.div)({style:"display: contents;"}),this.shadow_el.append(this.container),this._update(),this._render_children(),this._setup_mutation_observers(),this._setup_event_listeners(),this.run_script("render",!0)}_send_event(e,t,n){let s=(0,_.serializeEvent)(n);s.type=t;for(const e in s)void 0===s[e]&&delete s[e];this.model.trigger_event(new u.DOMEvent(e,s))}_render_child(e,t){const n=this._child_views.get(e);null==n?t.innerHTML=(0,u.htmlDecode)(e)||e:(t.appendChild(n.el),n.render(),n.after_render())}_render_node(e,t){const n=this.model.data.id;if(this.model.looped.indexOf(e)>-1)for(let s=0;s<t.length;s++){const i=f(this.shadow_el,`${e}-${s}-${n}`);null!=i?this._render_child(t[s],i):console.warn(`DOM node '${e}-${s}-${n}' could not be found. Cannot render children.`)}else{const s=f(this.shadow_el,`${e}-${n}`);if(null==s)return void console.warn(`DOM node '${e}-${n}' could not be found. Cannot render children.`);for(const e of t)this._render_child(e,s)}}_render_children(){for(const e in this.model.children){let t=this.model.children[e];"string"==typeof t&&(t=this.model.data[t],(0,h.isArray)(t)||(t=[t])),this._render_node(e,t)}}_render_html(e,t={}){let n=e,s="";const i=[];for(const e in this.model.callbacks)for(const t of this.model.callbacks[e]){const[o,r]=t;let l;if(n=n.replaceAll("${"+r+"}","$--{"+r+"}"),r.startsWith("script(")){const e=r.replace("('","_").replace("')","").replace('("',"_").replace('")',"").replace("-","_"),t=e.replaceAll("script_","");n=n.replaceAll(r,e),l=`\n const ${e} = (event) => {\n view._state.event = event\n view.run_script("${t}")\n delete view._state.event\n }\n `}else l=`\n const ${r} = (event) => {\n let elname = "${e}"\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, "${o}", event)\n }\n `;i.indexOf(r)>-1||(i.push(r),s+=l)}return n=n.replaceAll("${model.","$-{model.").replaceAll("${","${data.").replaceAll("$-{model.","${model.").replaceAll("$--{","${"),new Function("view, model, data, state, html, useCallback",s+"return html`"+n+"`;")(this,this.model,this.model.data,t,c.html,l.useCallback)}_render_script(e,t){const n=[];for(const s of this.model.nodes){const i=s.replace("-","_");if(-1===e.indexOf(i))continue;const o=`\n let ${i} = view.shadow_el.getElementById('${s}-${t}')\n if (${i} == null)\n ${i} = document.getElementById('${s}-${t}')\n if (${i} == null) {\n console.warn("DOM node '${s}' could not be found. Cannot execute callback.")\n return\n }\n `;n.push(o)}return n.push("\n let event = null\n if (state.event !== undefined) {\n event = state.event\n }\n "),n.push(e),new Function("model, data, state, view, script, self",n.join("\n"))}_remove_mutation_observers(){for(const e of this._mutation_observers)e.disconnect();this._mutation_observers=[]}_setup_mutation_observers(){const e=this.model.data.id;for(const t in this.model.attrs){const n=f(this.shadow_el,`${t}-${e}`);if(null==n){console.warn(`DOM node '${t}-${e}' could not be found. Cannot set up MutationObserver.`);continue}const s=new MutationObserver((()=>{this._update_model(n,t)}));s.observe(n,{attributes:!0}),this._mutation_observers.push(s)}}_remove_event_listeners(){const e=this.model.data.id;for(const t in this._event_listeners){const n=f(this.shadow_el,`${t}-${e}`);if(null!=n)for(const e in this._event_listeners[t]){const s=this._event_listeners[t][e];n.removeEventListener(e,s)}}this._event_listeners={}}_setup_event_listeners(){const e=this.model.data.id;for(const t in this.model.events){const n=f(this.shadow_el,`${t}-${e}`);if(null==n){console.warn(`DOM node '${t}-${e}' could not be found. Cannot subscribe to DOM events.`);continue}const s=this.model.events[t];for(const e in s){const i=i=>{this._send_event(t,e,i),t in this.model.attrs&&s[e]&&this._update_model(n,t)};n.addEventListener(e,i),t in this._event_listeners||(this._event_listeners[t]={}),this._event_listeners[t][e]=i}}}_update(e=null){if(null==e||this.html.indexOf(`\${${e}}`)>-1){const e=this._render_html(this.html);if(null==e)return;try{this._changing=!0,(0,r.render)(e,this.container)}finally{this._changing=!1}}}_update_model(e,t){if(this._changing)return;const n={};for(const s of this.model.attrs[t]){const[i,o,r]=s;let l="children"===i?e.innerHTML:e[i];if(1===o.length&&`{${o[0]}}`===r)n[o[0]]=l;else if("string"==typeof l)if(l=m(r,l,o),null==l)console.warn(`Could not resolve parameters in ${t} element ${i} attribute value ${l}.`);else for(const e in l)void 0===l[e]?console.warn(`Could not resolve ${e} in ${t} element ${i} attribute value ${l}.`):n[e]=l[e]}try{this._changing=!0,this.model.data.setv(function(e){const t={};for(const n in e){let s=e[n];"string"!=typeof s||(""===s||"NaN"!==s&&isNaN(Number(s))?"false"!==s&&"true"!==s||(s="true"===s):s=Number(s)),t[n]=s}return t}(n))}catch(e){console.log("Could not serialize",n)}finally{this._changing=!1}}}n.ReactiveHTMLView=v,v.__name__="ReactiveHTMLView";class $ extends p.HTMLBox{constructor(e){super(e)}}n.ReactiveHTML=$,o=$,$.__name__="ReactiveHTML",$.__module__="panel.models.reactive_html",o.prototype.default_view=v,o.define((({Array:e,Any:t,String:n})=>({attrs:[t,{}],callbacks:[t,{}],children:[t,{}],data:[t],events:[t,{}],html:[n,""],looped:[e(n),[]],nodes:[e(n),[]],scripts:[t,{}]})))},
137
137
  "1b70f5b1d3": function _(e,n,t,_,l){_();var o,r,i,u,s,c,f,p,a={},d=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function v(e,n){for(var t in n)e[t]=n[t];return e}function y(e){var n=e.parentNode;n&&n.removeChild(e)}function m(e,n,t){var _,l,r,i={};for(r in n)"key"==r?_=n[r]:"ref"==r?l=n[r]:i[r]=n[r];if(arguments.length>2&&(i.children=arguments.length>3?o.call(arguments,2):t),"function"==typeof e&&null!=e.defaultProps)for(r in e.defaultProps)void 0===i[r]&&(i[r]=e.defaultProps[r]);return g(e,i,_,l,null)}function g(e,n,t,_,l){var o={type:e,props:n,key:t,ref:_,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==l?++i:l};return null==l&&null!=r.vnode&&r.vnode(o),o}function k(e){return e.children}function b(e,n){this.props=e,this.context=n}function x(e,n){if(null==n)return e.__?x(e.__,e.__.__k.indexOf(e)+1):null;for(var t;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e)return t.__e;return"function"==typeof e.type?x(e):null}function C(e){var n,t;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,n=0;n<e.__k.length;n++)if(null!=(t=e.__k[n])&&null!=t.__e){e.__e=e.__c.base=t.__e;break}return C(e)}}function S(e){(!e.__d&&(e.__d=!0)&&s.push(e)&&!P.__r++||c!==r.debounceRendering)&&((c=r.debounceRendering)||f)(P)}function P(){var e,n,t,_,l,o,r,i;for(s.sort((function(e,n){return e.__v.__b-n.__v.__b}));e=s.shift();)e.__d&&(n=s.length,_=void 0,l=void 0,r=(o=(t=e).__v).__e,(i=t.__P)&&(_=[],(l=v({},o)).__v=o.__v+1,L(i,o,l,t.__n,void 0!==i.ownerSVGElement,null!=o.__h?[r]:null,_,null==r?x(o):r,o.__h),M(_,o),o.__e!=r&&C(o)),s.length>n&&s.sort((function(e,n){return e.__v.__b-n.__v.__b})));P.__r=0}function w(e,n,t,_,l,o,r,i,u,s){var c,f,p,h,v,y,m,b=_&&_.__k||d,C=b.length;for(t.__k=[],c=0;c<n.length;c++)if(null!=(h=t.__k[c]=null==(h=n[c])||"boolean"==typeof h?null:"string"==typeof h||"number"==typeof h||"bigint"==typeof h?g(null,h,null,null,h):Array.isArray(h)?g(k,{children:h},null,null,null):h.__b>0?g(h.type,h.props,h.key,h.ref?h.ref:null,h.__v):h)){if(h.__=t,h.__b=t.__b+1,null===(p=b[c])||p&&h.key==p.key&&h.type===p.type)b[c]=void 0;else for(f=0;f<C;f++){if((p=b[f])&&h.key==p.key&&h.type===p.type){b[f]=void 0;break}p=null}L(e,h,p=p||a,l,o,r,i,u,s),v=h.__e,(f=h.ref)&&p.ref!=f&&(m||(m=[]),p.ref&&m.push(p.ref,null,h),m.push(f,h.__c||v,h)),null!=v?(null==y&&(y=v),"function"==typeof h.type&&h.__k===p.__k?h.__d=u=E(h,u,e):u=U(e,h,p,b,v,u),"function"==typeof t.type&&(t.__d=u)):u&&p.__e==u&&u.parentNode!=e&&(u=x(p))}for(t.__e=y,c=C;c--;)null!=b[c]&&("function"==typeof t.type&&null!=b[c].__e&&b[c].__e==t.__d&&(t.__d=A(_).nextSibling),O(b[c],b[c]));if(m)for(c=0;c<m.length;c++)H(m[c],m[++c],m[++c])}function E(e,n,t){for(var _,l=e.__k,o=0;l&&o<l.length;o++)(_=l[o])&&(_.__=e,n="function"==typeof _.type?E(_,n,t):U(t,_,_,l,_.__e,n));return n}function U(e,n,t,_,l,o){var r,i,u;if(void 0!==n.__d)r=n.__d,n.__d=void 0;else if(null==t||l!=o||null==l.parentNode)e:if(null==o||o.parentNode!==e)e.appendChild(l),r=null;else{for(i=o,u=0;(i=i.nextSibling)&&u<_.length;u+=1)if(i==l)break e;e.insertBefore(l,o),r=o}return void 0!==r?r:l.nextSibling}function A(e){var n,t,_;if(null==e.type||"string"==typeof e.type)return e.__e;if(e.__k)for(n=e.__k.length-1;n>=0;n--)if((t=e.__k[n])&&(_=A(t)))return _;return null}function D(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||h.test(n)?t:t+"px"}function T(e,n,t,_,l){var o;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||D(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||D(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])o=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+o]=t,t?_||e.addEventListener(n,o?W:N,o):e.removeEventListener(n,o?W:N,o);else if("dangerouslySetInnerHTML"!==n){if(l)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&-1==n.indexOf("-")?e.removeAttribute(n):e.setAttribute(n,t))}}function N(e){return this.l[e.type+!1](r.event?r.event(e):e)}function W(e){return this.l[e.type+!0](r.event?r.event(e):e)}function L(e,n,t,_,l,o,i,u,s){var c,f,p,a,d,h,y,m,g,x,C,S,P,E,U,A=n.type;if(void 0!==n.constructor)return null;null!=t.__h&&(s=t.__h,u=n.__e=t.__e,n.__h=null,o=[u]),(c=r.__b)&&c(n);try{e:if("function"==typeof A){if(m=n.props,g=(c=A.contextType)&&_[c.__c],x=c?g?g.props.value:c.__:_,t.__c?y=(f=n.__c=t.__c).__=f.__E:("prototype"in A&&A.prototype.render?n.__c=f=new A(m,x):(n.__c=f=new b(m,x),f.constructor=A,f.render=R),g&&g.sub(f),f.props=m,f.state||(f.state={}),f.context=x,f.__n=_,p=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=A.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=v({},f.__s)),v(f.__s,A.getDerivedStateFromProps(m,f.__s))),a=f.props,d=f.state,f.__v=n,p)null==A.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==A.getDerivedStateFromProps&&m!==a&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(m,x),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(m,f.__s,x)||n.__v===t.__v){for(n.__v!==t.__v&&(f.props=m,f.state=f.__s,f.__d=!1),f.__e=!1,n.__e=t.__e,n.__k=t.__k,n.__k.forEach((function(e){e&&(e.__=n)})),C=0;C<f._sb.length;C++)f.__h.push(f._sb[C]);f._sb=[],f.__h.length&&i.push(f);break e}null!=f.componentWillUpdate&&f.componentWillUpdate(m,f.__s,x),null!=f.componentDidUpdate&&f.__h.push((function(){f.componentDidUpdate(a,d,h)}))}if(f.context=x,f.props=m,f.__P=e,S=r.__r,P=0,"prototype"in A&&A.prototype.render){for(f.state=f.__s,f.__d=!1,S&&S(n),c=f.render(f.props,f.state,f.context),E=0;E<f._sb.length;E++)f.__h.push(f._sb[E]);f._sb=[]}else do{f.__d=!1,S&&S(n),c=f.render(f.props,f.state,f.context),f.state=f.__s}while(f.__d&&++P<25);f.state=f.__s,null!=f.getChildContext&&(_=v(v({},_),f.getChildContext())),p||null==f.getSnapshotBeforeUpdate||(h=f.getSnapshotBeforeUpdate(a,d)),U=null!=c&&c.type===k&&null==c.key?c.props.children:c,w(e,Array.isArray(U)?U:[U],n,t,_,l,o,i,u,s),f.base=n.__e,n.__h=null,f.__h.length&&i.push(f),y&&(f.__E=f.__=null),f.__e=!1}else null==o&&n.__v===t.__v?(n.__k=t.__k,n.__e=t.__e):n.__e=F(t.__e,n,t,_,l,o,i,s);(c=r.diffed)&&c(n)}catch(e){n.__v=null,(s||null!=o)&&(n.__e=u,n.__h=!!s,o[o.indexOf(u)]=null),r.__e(e,n,t)}}function M(e,n){r.__c&&r.__c(n,e),e.some((function(n){try{e=n.__h,n.__h=[],e.some((function(e){e.call(n)}))}catch(e){r.__e(e,n.__v)}}))}function F(e,n,t,_,l,r,i,u){var s,c,f,p=t.props,d=n.props,h=n.type,v=0;if("svg"===h&&(l=!0),null!=r)for(;v<r.length;v++)if((s=r[v])&&"setAttribute"in s==!!h&&(h?s.localName===h:3===s.nodeType)){e=s,r[v]=null;break}if(null==e){if(null===h)return document.createTextNode(d);e=l?document.createElementNS("http://www.w3.org/2000/svg",h):document.createElement(h,d.is&&d),r=null,u=!1}if(null===h)p===d||u&&e.data===d||(e.data=d);else{if(r=r&&o.call(e.childNodes),c=(p=t.props||a).dangerouslySetInnerHTML,f=d.dangerouslySetInnerHTML,!u){if(null!=r)for(p={},v=0;v<e.attributes.length;v++)p[e.attributes[v].name]=e.attributes[v].value;(f||c)&&(f&&(c&&f.__html==c.__html||f.__html===e.innerHTML)||(e.innerHTML=f&&f.__html||""))}if(function(e,n,t,_,l){var o;for(o in t)"children"===o||"key"===o||o in n||T(e,o,null,t[o],_);for(o in n)l&&"function"!=typeof n[o]||"children"===o||"key"===o||"value"===o||"checked"===o||t[o]===n[o]||T(e,o,n[o],t[o],_)}(e,d,p,l,u),f)n.__k=[];else if(v=n.props.children,w(e,Array.isArray(v)?v:[v],n,t,_,l&&"foreignObject"!==h,r,i,r?r[0]:t.__k&&x(t,0),u),null!=r)for(v=r.length;v--;)null!=r[v]&&y(r[v]);u||("value"in d&&void 0!==(v=d.value)&&(v!==e.value||"progress"===h&&!v||"option"===h&&v!==p.value)&&T(e,"value",v,p.value,!1),"checked"in d&&void 0!==(v=d.checked)&&v!==e.checked&&T(e,"checked",v,p.checked,!1))}return e}function H(e,n,t){try{"function"==typeof e?e(n):e.current=n}catch(e){r.__e(e,t)}}function O(e,n,t){var _,l;if(r.unmount&&r.unmount(e),(_=e.ref)&&(_.current&&_.current!==e.__e||H(_,null,n)),null!=(_=e.__c)){if(_.componentWillUnmount)try{_.componentWillUnmount()}catch(e){r.__e(e,n)}_.base=_.__P=null,e.__c=void 0}if(_=e.__k)for(l=0;l<_.length;l++)_[l]&&O(_[l],n,t||"function"!=typeof e.type);t||null==e.__e||y(e.__e),e.__=e.__e=e.__d=void 0}function R(e,n,t){return this.constructor(e,t)}function I(e,n,t){var _,l,i;r.__&&r.__(e,n),l=(_="function"==typeof t)?null:t&&t.__k||n.__k,i=[],L(n,e=(!_&&t||n).__k=m(k,null,[e]),l||a,a,void 0!==n.ownerSVGElement,!_&&t?[t]:l?null:n.firstChild?o.call(n.childNodes):null,i,!_&&t?t:l?l.__e:n.firstChild,_),M(i,e)}t.options=r,t.isValidElement=u,t.createElement=m,t.h=m,t.createRef=function(){return{current:null}},t.Fragment=k,t.Component=b,t.toChildArray=function e(n,t){return t=t||[],null==n||"boolean"==typeof n||(Array.isArray(n)?n.some((function(n){e(n,t)})):t.push(n)),t},t.render=I,t.hydrate=function e(n,t){I(n,t,e)},t.cloneElement=function(e,n,t){var _,l,r,i=v({},e.props);for(r in n)"key"==r?_=n[r]:"ref"==r?l=n[r]:i[r]=n[r];return arguments.length>2&&(i.children=arguments.length>3?o.call(arguments,2):t),g(e.type,i,_||e.key,l||e.ref,null)},t.createContext=function(e,n){var t={__c:n="__cC"+p++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,_;return this.getChildContext||(t=[],(_={})[n]=this,this.getChildContext=function(){return _},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some((function(e){e.__e=!0,S(e)}))},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t},o=d.slice,t.options=r={__e:function(e,n,t,_){for(var l,o,r;n=n.__;)if((l=n.__c)&&!l.__)try{if((o=l.constructor)&&null!=o.getDerivedStateFromError&&(l.setState(o.getDerivedStateFromError(e)),r=l.__d),null!=l.componentDidCatch&&(l.componentDidCatch(e,_||{}),r=l.__d),r)return l.__E=l}catch(n){e=n}throw e}},i=0,t.isValidElement=u=function(e){return null!=e&&void 0===e.constructor},b.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=v({},this.state),"function"==typeof e&&(e=e(v({},t),this.props)),e&&v(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),S(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),S(this))},b.prototype.render=k,s=[],f="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,P.__r=0,p=0},
138
138
  "283ce7811c": function _(_,n,t,o,u){o();const i=_("1b70f5b1d3");var r,e,c,f,a=0,s=[],h=[],p=i.options.__b,v=i.options.__r,l=i.options.diffed,m=i.options.__c,d=i.options.unmount;function H(_,n){i.options.__h&&i.options.__h(e,_,a||n),a=0;var t=e.__H||(e.__H={__:[],__h:[]});return _>=t.__.length&&t.__.push({__V:h}),t.__[_]}function E(_){return a=1,N(q,_)}function N(_,n,t){var o=H(r++,2);if(o.t=_,!o.__c&&(o.__=[t?t(n):q(void 0,n),function(_){var n=o.__N?o.__N[0]:o.__[0],t=o.t(n,_);n!==t&&(o.__N=[t,o.__[1]],o.__c.setState({}))}],o.__c=e,!e.u)){e.u=!0;var u=e.shouldComponentUpdate;e.shouldComponentUpdate=function(_,n,t){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter((function(_){return _.__c}));if(i.every((function(_){return!_.__N})))return!u||u.call(this,_,n,t);var r=!1;return i.forEach((function(_){if(_.__N){var n=_.__[0];_.__=_.__N,_.__N=void 0,n!==_.__[0]&&(r=!0)}})),!(!r&&o.__c.props===_)&&(!u||u.call(this,_,n,t))}}return o.__N||o.__}function y(_,n){var t=H(r++,4);!i.options.__s&&F(t.__H,n)&&(t.__=_,t.i=n,e.__h.push(t))}function V(_,n){var t=H(r++,7);return F(t.__H,n)?(t.__V=_(),t.i=n,t.__h=_,t.__V):t.__}function b(){for(var _;_=s.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(A),_.__H.__h.forEach(D),_.__H.__h=[]}catch(n){_.__H.__h=[],i.options.__e(n,_.__v)}}t.useState=E,t.useReducer=N,t.useEffect=function(_,n){var t=H(r++,3);!i.options.__s&&F(t.__H,n)&&(t.__=_,t.i=n,e.__H.__h.push(t))},t.useLayoutEffect=y,t.useRef=function(_){return a=5,V((function(){return{current:_}}),[])},t.useImperativeHandle=function(_,n,t){a=6,y((function(){return"function"==typeof _?(_(n()),function(){return _(null)}):_?(_.current=n(),function(){return _.current=null}):void 0}),null==t?t:t.concat(_))},t.useMemo=V,t.useCallback=function(_,n){return a=8,V((function(){return _}),n)},t.useContext=function(_){var n=e.context[_.__c],t=H(r++,9);return t.c=_,n?(null==t.__&&(t.__=!0,n.sub(e)),n.props.value):_.__},t.useDebugValue=function(_,n){i.options.useDebugValue&&i.options.useDebugValue(n?n(_):_)},t.useErrorBoundary=function(_){var n=H(r++,10),t=E();return n.__=_,e.componentDidCatch||(e.componentDidCatch=function(_,o){n.__&&n.__(_,o),t[1](_)}),[t[0],function(){t[1](void 0)}]},t.useId=function(){var _=H(r++,11);if(!_.__){for(var n=e.__v;null!==n&&!n.__m&&null!==n.__;)n=n.__;var t=n.__m||(n.__m=[0,0]);_.__="P"+t[0]+"-"+t[1]++}return _.__},i.options.__b=function(_){e=null,p&&p(_)},i.options.__r=function(_){v&&v(_),r=0;var n=(e=_.__c).__H;n&&(c===e?(n.__h=[],e.__h=[],n.__.forEach((function(_){_.__N&&(_.__=_.__N),_.__V=h,_.__N=_.i=void 0}))):(n.__h.forEach(A),n.__h.forEach(D),n.__h=[])),c=e},i.options.diffed=function(_){l&&l(_);var n=_.__c;n&&n.__H&&(n.__H.__h.length&&(1!==s.push(n)&&f===i.options.requestAnimationFrame||((f=i.options.requestAnimationFrame)||C)(b)),n.__H.__.forEach((function(_){_.i&&(_.__H=_.i),_.__V!==h&&(_.__=_.__V),_.i=void 0,_.__V=h}))),c=e=null},i.options.__c=function(_,n){n.some((function(_){try{_.__h.forEach(A),_.__h=_.__h.filter((function(_){return!_.__||D(_)}))}catch(t){n.some((function(_){_.__h&&(_.__h=[])})),n=[],i.options.__e(t,_.__v)}})),m&&m(_,n)},i.options.unmount=function(_){d&&d(_);var n,t=_.__c;t&&t.__H&&(t.__H.__.forEach((function(_){try{A(_)}catch(_){n=_}})),t.__H=void 0,n&&i.options.__e(n,t.__v))};var g="function"==typeof requestAnimationFrame;function C(_){var n,t=function(){clearTimeout(o),g&&cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,100);g&&(n=requestAnimationFrame(t))}function A(_){var n=e,t=_.__c;"function"==typeof t&&(_.__c=void 0,t()),e=n}function D(_){var n=e;_.__c=_.__(),e=n}function F(_,n){return!_||_.length!==n.length||n.some((function(n,t){return n!==_[t]}))}function q(_,n){return"function"==typeof n?n(_):n}},
139
139
  "b3f51db71c": function _(n,t,d,e,b){e();const o=n("tslib"),r=n("1b70f5b1d3");var f=n("1b70f5b1d3");b("h",f.h),b("render",f.render),b("Component",f.Component);var a=o.__importDefault(n("ab33dd3f38")).default.bind(r.h);d.html=a},
@@ -170,4 +170,4 @@ function(e){const t={};return void 0!==e.detail&&Object.assign(t,{detail:JSON.pa
170
170
  "c2892117a7": function _(e,t,i,s,n){var r;s();const o=e("d7ded264dc"),a=e("a76a9b7c23");class l extends o.AbstractVTKView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,(()=>{this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data),this.invalidate_render()})),this.connect(this.model.properties.colormap.change,(()=>{this.colormap_selector.value=this.model.colormap;const e=new Event("change");this.colormap_selector.dispatchEvent(e)})),this.connect(this.model.properties.shadow.change,(()=>{this.shadow_selector.value=this.model.shadow?"1":"0";const e=new Event("change");this.shadow_selector.dispatchEvent(e)})),this.connect(this.model.properties.sampling.change,(()=>{this.sampling_slider.value=this.model.sampling.toFixed(2);const e=new Event("input");this.sampling_slider.dispatchEvent(e)})),this.connect(this.model.properties.edge_gradient.change,(()=>{this.edge_gradient_slider.value=this.model.edge_gradient.toFixed(2);const e=new Event("input");this.edge_gradient_slider.dispatchEvent(e)})),this.connect(this.model.properties.rescale.change,(()=>{this._controllerWidget.setRescaleColorMap(this.model.rescale),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.ambient.change,(()=>{this.volume.getProperty().setAmbient(this.model.ambient),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.diffuse.change,(()=>{this.volume.getProperty().setDiffuse(this.model.diffuse),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.camera.change,(()=>{this._setting_camera||(this._set_camera_state(),this._vtk_renwin.getRenderWindow().render())})),this.connect(this.model.properties.specular.change,(()=>{this.volume.getProperty().setSpecular(this.model.specular),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.specular_power.change,(()=>{this.volume.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.display_volume.change,(()=>{this._set_volume_visibility(this.model.display_volume),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.display_slices.change,(()=>{this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.slice_i.change,(()=>{void 0!==this.image_actor_i&&(this.image_actor_i.getMapper().setISlice(this.model.slice_i),this._vtk_renwin.getRenderWindow().render())})),this.connect(this.model.properties.slice_j.change,(()=>{void 0!==this.image_actor_j&&(this.image_actor_j.getMapper().setJSlice(this.model.slice_j),this._vtk_renwin.getRenderWindow().render())})),this.connect(this.model.properties.slice_k.change,(()=>{void 0!==this.image_actor_k&&(this.image_actor_k.getMapper().setKSlice(this.model.slice_k),this._vtk_renwin.getRenderWindow().render())})),this.connect(this.model.properties.render_background.change,(()=>{this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.interpolation.change,(()=>{this._set_interpolation(this.model.interpolation),this._vtk_renwin.getRenderWindow().render()})),this.connect(this.model.properties.controller_expanded.change,(()=>{null!=this._controllerWidget&&this._controllerWidget.setExpanded(this.model.controller_expanded)})),this.connect(this.model.properties.nan_opacity.change,(()=>{const e=this.image_actor_i.getProperty().getScalarOpacity();e.get(["nodes"]).nodes[0].y=this.model.nan_opacity,e.modified(),this._vtk_renwin.getRenderWindow().render()}))}render(){this._vtk_renwin=null,this._orientationWidget=null,this._axes=null,super.render(),this._create_orientation_widget(),this._set_axes(),this._vtk_renwin.getRenderer().resetCamera(),Object.keys(this.model.camera).length&&this._set_camera_state(),this._get_camera_state()}invalidate_render(){this._vtk_renwin=null,super.invalidate_render()}init_vtk_renwin(){this._vtk_renwin=a.vtkns.FullScreenRenderWindow.newInstance({rootContainer:this.shadow_el,container:this._vtk_container})}plot(){this._controllerWidget=a.vtkns.VolumeController.newInstance({size:[400,150],rescaleColorMap:this.model.rescale}),this._plot_volume(),this._plot_slices(),this._controllerWidget.setupContent(this._vtk_renwin.getRenderWindow(),this.volume,!0),this._controllerWidget.setContainer(this.el),this._controllerWidget.setExpanded(this.model.controller_expanded),this._connect_js_controls(),this._vtk_renwin.getRenderWindow().getInteractor(),this._vtk_renwin.getRenderWindow().getInteractor().setDesiredUpdateRate(45),this._set_volume_visibility(this.model.display_volume),this._set_slices_visibility(this.model.display_slices),this._vtk_renwin.getRenderer().setBackground(...(0,a.hexToRGB)(this.model.render_background)),this._set_interpolation(this.model.interpolation),this._set_camera_state()}get vtk_image_data(){return this._vtk_image_data||(this._vtk_image_data=(0,a.data2VTKImageData)(this.model.data)),this._vtk_image_data}get volume(){return this._vtk_renwin.getRenderer().getVolumes()[0]}get image_actor_i(){return this._vtk_renwin.getRenderer().getActors()[0]}get image_actor_j(){return this._vtk_renwin.getRenderer().getActors()[1]}get image_actor_k(){return this._vtk_renwin.getRenderer().getActors()[2]}get shadow_selector(){return this.el.querySelector(".js-shadow")}get edge_gradient_slider(){return this.el.querySelector(".js-edge")}get sampling_slider(){return this.el.querySelector(".js-spacing")}get colormap_selector(){return this.el.querySelector(".js-color-preset")}_connect_js_controls(){const{el:e}=this._controllerWidget.get("el");if(void 0!==e){e.querySelector(".js-button").addEventListener("click",(()=>this.model.controller_expanded=this._controllerWidget.getExpanded()))}this.colormap_selector.addEventListener("change",(()=>{this.model.colormap=this.colormap_selector.value})),this.model.colormap?this.model.properties.colormap.change.emit():this.model.colormap=this.colormap_selector.value,this.shadow_selector.addEventListener("change",(()=>{this.model.shadow=!!Number(this.shadow_selector.value)})),(this.model.shadow=!!Number(this.shadow_selector.value))&&this.model.properties.shadow.change.emit(),this.sampling_slider.addEventListener("input",(()=>{const e=Number(this.sampling_slider.value);Math.abs(this.model.sampling-e)>=.005&&(this.model.sampling=e)})),Math.abs(this.model.sampling-Number(this.shadow_selector.value))>=.005&&this.model.properties.sampling.change.emit(),this.edge_gradient_slider.addEventListener("input",(()=>{const e=Number(this.edge_gradient_slider.value);Math.abs(this.model.edge_gradient-e)>=.005&&(this.model.edge_gradient=e)})),Math.abs(this.model.edge_gradient-Number(this.edge_gradient_slider.value))>=.005&&this.model.properties.edge_gradient.change.emit()}_plot_slices(){const e=this._vtk_image_data,t=a.vtkns.ImageSlice.newInstance(),i=a.vtkns.ImageSlice.newInstance(),s=a.vtkns.ImageSlice.newInstance(),n=a.vtkns.ImageMapper.newInstance(),r=a.vtkns.ImageMapper.newInstance(),o=a.vtkns.ImageMapper.newInstance();n.setInputData(e),n.setISlice(this.model.slice_i),t.setMapper(n),r.setInputData(e),r.setJSlice(this.model.slice_j),i.setMapper(r),o.setInputData(e),o.setKSlice(this.model.slice_k),s.setMapper(o);const l=a.vtkns.PiecewiseFunction.newInstance(),d=this.volume.getProperty().getRGBTransferFunction(0),c=this.volume.getMapper().getInputData().getPointData().getScalars().getRange();l.removeAllPoints(),l.addPoint(c[0]-1,this.model.nan_opacity),l.addPoint(c[0],1),l.addPoint(c[1],1);const h=t.getProperty();i.setProperty(h),s.setProperty(h),h.setRGBTransferFunction(d),h.setScalarOpacity(l);const _=this._vtk_renwin.getRenderer();_.addActor(t),_.addActor(i),_.addActor(s)}_plot_volume(){const e=this.vtk_image_data,t=a.vtkns.Volume.newInstance(),i=a.vtkns.VolumeMapper.newInstance();t.setMapper(i),i.setInputData(e);const s=(e.getPointData().getScalars()||e.getPointData().getArrays()[0]).getRange(),n=a.vtkns.ColorTransferFunction.newInstance();if(null!=this.model.colormap){const e=a.vtkns.ColorTransferFunction.vtkColorMaps.getPresetByName(this.model.colormap);n.applyColorMap(e)}n.onModified((()=>this.model.mapper=(0,a.vtkLutToMapper)(n)));const r=a.vtkns.PiecewiseFunction.newInstance(),o=.7*Math.sqrt(e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0));i.setSampleDistance(o),t.getProperty().setRGBTransferFunction(0,n),t.getProperty().setScalarOpacity(0,r),t.getProperty().setInterpolationTypeToFastLinear(),t.getProperty().setScalarOpacityUnitDistance(0,a.vtkns.BoundingBox.getDiagonalLength(e.getBounds())/Math.max(...e.getDimensions())),t.getProperty().setGradientOpacityMinimumValue(0,0),t.getProperty().setGradientOpacityMaximumValue(0,.05*(s[1]-s[0])),t.getProperty().setShade(this.model.shadow),t.getProperty().setUseGradientOpacity(0,!0),t.getProperty().setGradientOpacityMinimumOpacity(0,0),t.getProperty().setGradientOpacityMaximumOpacity(0,1),t.getProperty().setAmbient(this.model.ambient),t.getProperty().setDiffuse(this.model.diffuse),t.getProperty().setSpecular(this.model.specular),t.getProperty().setSpecularPower(this.model.specular_power),this._vtk_renwin.getRenderer().addVolume(t)}_set_interpolation(e){"fast_linear"==e?(this.volume.getProperty().setInterpolationTypeToFastLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):"linear"==e?(this.volume.getProperty().setInterpolationTypeToLinear(),this.image_actor_i.getProperty().setInterpolationTypeToLinear()):(this.volume.getProperty().setInterpolationTypeToNearest(),this.image_actor_i.getProperty().setInterpolationTypeToNearest())}_set_slices_visibility(e){this.image_actor_i.setVisibility(e),this.image_actor_j.setVisibility(e),this.image_actor_k.setVisibility(e)}_set_volume_visibility(e){this.volume.setVisibility(e)}}i.VTKVolumePlotView=l,l.__name__="VTKVolumePlotView";class d extends o.AbstractVTKPlot{constructor(e){super(e)}}i.VTKVolumePlot=d,r=d,d.__name__="VTKVolumePlot",r.prototype.default_view=l,r.define((({Any:e,Array:t,Boolean:i,Int:s,Number:n,String:r,Struct:o})=>({ambient:[n,.2],colormap:[r],data:[e],diffuse:[n,.7],display_slices:[i,!1],display_volume:[i,!0],edge_gradient:[n,.2],interpolation:[a.Interpolation,"fast_linear"],mapper:[o({palette:t(r),low:n,high:n}),{palette:[],low:0,high:0}],nan_opacity:[n,1],render_background:[r,"#52576e"],rescale:[i,!1],sampling:[n,.4],shadow:[i,!0],slice_i:[s,0],slice_j:[s,0],slice_k:[s,0],specular:[n,.3],specular_power:[n,8],controller_expanded:[i,!0]}))),r.override({height:300,width:300})},
171
171
  "40c4377615": function _(e,t,n,i,r){var s;i();const o=e("@bokehjs/core/util/object"),_=e("99a25e6992"),c=e("d7ded264dc"),a=e("877619fe71"),h=e("a76a9b7c23"),d="panel";class l extends c.AbstractVTKView{initialize(){super.initialize(),this._renderable=!1,this._synchronizer_context=h.vtkns.SynchronizableRenderWindow.getSynchronizerContext(`${d}-{this.model.id}`)}connect_signals(){super.connect_signals();const e=(0,_.debounce)((()=>{this._vtk_renwin.delete(),this._vtk_renwin=null,this.invalidate_render()}),20);this.connect(this.model.properties.arrays.change,e),this.connect(this.model.properties.scene.change,e),this.connect(this.model.properties.one_time_reset.change,(()=>{this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters()}))}init_vtk_renwin(){this._vtk_renwin=h.vtkns.FullScreenRenderWindowSynchronized.newInstance({rootContainer:this.el,container:this._vtk_container,synchronizerContext:this._synchronizer_context})}remove(){this._vtk_renwin&&this._vtk_renwin.delete(),super.remove()}plot(){this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters();const e=(0,o.clone)(this.model.scene);this._sync_plot(e,(()=>this._on_scene_ready())).then((()=>{this._set_camera_state(),this._get_camera_state()}))}_on_scene_ready(){this._renderable=!0,this._camera_callbacks.push(this._vtk_renwin.getRenderer().getActiveCamera().onModified((()=>this._vtk_render()))),this._orientationWidget||this._create_orientation_widget(),this._axes||this._set_axes(),this._vtk_renwin.resize(),this._vtk_render()}_sync_plot(e,t){this._renderable=!1,this._unsubscribe_camera_cb(),this._synchronizer_context.setFetchArrayFunction((e=>Promise.resolve(this.model.arrays[e])));const n=this._synchronizer_context.getInstance(this.model.scene.dependencies[0].id);return n&&!this._vtk_renwin.getRenderer()&&this._vtk_renwin.getRenderWindow().addRenderer(n),this._vtk_renwin.getRenderWindow().synchronize(e).then(t)}}n.VTKSynchronizedPlotView=l,l.__name__="VTKSynchronizedPlotView";class v extends c.AbstractVTKPlot{constructor(e){super(e),(0,a.initialize_fullscreen_render)(),this.outline=h.vtkns.OutlineFilter.newInstance();const t=h.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=h.vtkns.Actor.newInstance(),this.outline_actor.setMapper(t)}getActors(e){let t=this.renderer_el.getRenderer().getActors();if(e){const n=this.renderer_el.getSynchronizerContext(d);t=t.filter((t=>{const i=n.getInstanceId(t);return!!i&&i.slice(-16)==e.slice(1,17)}))}return t}}n.VTKSynchronizedPlot=v,s=v,v.__name__="VTKSynchronizedPlot",v.__module__="panel.models.vtk",s.prototype.default_view=l,s.define((({Any:e,Array:t,Boolean:n,Bytes:i,Dict:r,String:s})=>({arrays:[r(i),{}],arrays_processed:[t(s),[]],enable_keybindings:[n,!1],one_time_reset:[n,!1],rebuild:[n,!1],scene:[e,{}]}))),s.override({height:300,width:300})},
172
172
  "877619fe71": function _(e,n,o,t,r){t();const i=e("a76a9b7c23"),l={containerStyle:null,controlPanelStyle:null,listenWindowResize:!0,resizeCallback:null,controllerVisibility:!0,synchronizerContextName:"default"},a={position:"absolute",left:"25px",top:"25px",backgroundColor:"white",borderRadius:"5px",listStyle:"none",padding:"5px 10px",margin:"0",display:"block",border:"solid 1px black",maxWidth:"calc(100vw - 70px)",maxHeight:"calc(100vh - 60px)",overflow:"auto"};o.initialize_fullscreen_render=function(){let e={newInstance:window.vtk.macro.newInstance(((e,n,o={})=>{Object.assign(n,l,o),window.vtk.macro.obj(e,n),window.vtk.macro.get(e,n,["renderWindow","openGLRenderWindow","interactor","rootContainer","container","controlContainer","synchronizerContext"]),function(e,n){n.renderWindow=i.vtkns.SynchronizableRenderWindow.newInstance({synchronizerContext:n.synchronizerContext}),n.openGLRenderWindow=i.vtkns.OpenGLRenderWindow.newInstance(),n.openGLRenderWindow.setContainer(n.container),n.renderWindow.addView(n.openGLRenderWindow),n.interactor=i.vtkns.RenderWindowInteractor.newInstance(),n.interactor.setInteractorStyle(i.vtkns.InteractorStyleTrackballCamera.newInstance()),n.interactor.setView(n.openGLRenderWindow),n.interactor.initialize(),n.interactor.bindEvents(n.container),e.getRenderer=()=>n.renderWindow.getRenderers()[0],e.removeController=()=>{const e=n.controlContainer;e&&e.parentNode.removeChild(e)},e.setControllerVisibility=e=>{n.controllerVisibility=e,n.controlContainer&&(n.controlContainer.style.display=e?"block":"none")},e.toggleControllerVisibility=()=>{e.setControllerVisibility(!n.controllerVisibility)},e.addController=o=>{n.controlContainer=document.createElement("div"),(0,i.applyStyle)(n.controlContainer,n.controlPanelStyle||a),n.rootContainer.appendChild(n.controlContainer),n.controlContainer.innerHTML=o,e.setControllerVisibility(n.controllerVisibility),n.rootContainer.addEventListener("keypress",(n=>{"c"===String.fromCharCode(n.charCode)&&e.toggleControllerVisibility()}))},e.delete=window.vtk.macro.chain(e.setContainer,n.openGLRenderWindow.delete,e.delete),e.resize=()=>{const e=n.container.getBoundingClientRect(),o=window.devicePixelRatio||1;n.openGLRenderWindow.setSize(Math.floor(e.width*o),Math.floor(e.height*o)),n.resizeCallback&&n.resizeCallback(e),n.renderWindow.render()},e.setResizeCallback=o=>{n.resizeCallback=o,e.resize()},n.listenWindowResize&&window.addEventListener("resize",e.resize),e.resize()}(e,n)}))};i.vtkns.FullScreenRenderWindowSynchronized=e}},
173
- }, "4e90918c0a", {"index":"4e90918c0a","models/index":"6e19b31aba","models/ace":"7df2008a2e","models/layout":"ea218d1c3c","models/audio":"78153b60aa","models/browser":"6df8bf1ac7","models/card":"c1e57c7e7d","models/column":"067b508b04","models/comm_manager":"1e66dab844","models/customselect":"9c8629b48f","models/tabulator":"fc45b724c1","models/data":"fd9108e30e","models/datetime_picker":"6658732ce1","models/deckgl":"991e3a226c","models/tooltips":"9588ab7c9e","models/echarts":"eded13f5d7","models/event-to-object":"490942d778","models/html":"6b3b0facc2","models/ipywidget":"e3556c1e99","models/json":"66846b828c","models/jsoneditor":"4b8a56c700","models/file_download":"9c15016be8","models/katex":"197cfa57e5","models/location":"00a25cf872","models/mathjax":"46a1770629","models/pdf":"d49a559fbc","models/perspective":"9f0456e5b5","models/player":"c172556ad3","models/plotly":"bb3d0ded66","models/util":"990b5dd5c7","models/progress":"b82925a928","models/quill":"e115225ba2","models/reactive_html":"b969c294f5","models/singleselect":"6b20024bba","models/speech_to_text":"cd0c80cc4c","models/state":"66717cb841","models/tabs":"67a5649f75","models/terminal":"cd4a941f8d","models/text_to_speech":"eb4ae0acfa","models/tooltip_icon":"26ffc3afe8","models/trend":"8f4ab32d74","models/vega":"3b23e1bc5c","models/video":"4ac59b8079","models/videostream":"797fd61298","models/vizzu":"e8339ee57a","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"3bce7c9db6","models/vtk/vtklayout":"d7ded264dc","models/vtk/util":"a76a9b7c23","models/vtk/vtkcolorbar":"787f6aeecd","models/vtk/vtkaxes":"7cec459a06","models/vtk/vtkvolume":"c2892117a7","models/vtk/vtksynchronized":"40c4377615","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
173
+ }, "4e90918c0a", {"index":"4e90918c0a","models/index":"6e19b31aba","models/ace":"7df2008a2e","models/layout":"ea218d1c3c","models/audio":"78153b60aa","models/browser":"6df8bf1ac7","models/card":"c1e57c7e7d","models/column":"13afd4a31a","models/comm_manager":"1e66dab844","models/customselect":"9c8629b48f","models/tabulator":"b2950aa706","models/data":"4e27eda472","models/datetime_picker":"6658732ce1","models/deckgl":"991e3a226c","models/tooltips":"9588ab7c9e","models/echarts":"54ac9fb4a9","models/event-to-object":"490942d778","models/html":"6b3b0facc2","models/ipywidget":"e3556c1e99","models/json":"66846b828c","models/jsoneditor":"4b8a56c700","models/file_download":"9c15016be8","models/katex":"197cfa57e5","models/location":"00a25cf872","models/mathjax":"46a1770629","models/pdf":"d49a559fbc","models/perspective":"d39fde6463","models/player":"c172556ad3","models/plotly":"bb3d0ded66","models/util":"990b5dd5c7","models/progress":"b82925a928","models/quill":"e115225ba2","models/reactive_html":"8b89b5165f","models/singleselect":"6b20024bba","models/speech_to_text":"cd0c80cc4c","models/state":"66717cb841","models/tabs":"67a5649f75","models/terminal":"cd4a941f8d","models/text_to_speech":"eb4ae0acfa","models/tooltip_icon":"26ffc3afe8","models/trend":"8f4ab32d74","models/vega":"3b23e1bc5c","models/video":"4ac59b8079","models/videostream":"797fd61298","models/vizzu":"e8339ee57a","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"3bce7c9db6","models/vtk/vtklayout":"d7ded264dc","models/vtk/util":"a76a9b7c23","models/vtk/vtkcolorbar":"787f6aeecd","models/vtk/vtkaxes":"7cec459a06","models/vtk/vtkvolume":"c2892117a7","models/vtk/vtksynchronized":"40c4377615","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});