@holoviz/panel 0.14.0-a.2 → 0.14.0-a.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundled/css/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/css/bootstrap.min.css +0 -0
- package/dist/bundled/css/{npm/golden-layout@1.5.9 → golden-layout@1.5.9}/src/css/goldenlayout-base.css +0 -0
- package/dist/bundled/datatabulator/@holoviz/panel/dist/bundled/tabulator-tables@5.3.2/dist/css/fast/tabulator_fast.min.css +1 -0
- package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js +1 -0
- package/dist/bundled/datatabulator/luxon/build/global/luxon.min.js.map +1 -0
- package/dist/bundled/datatabulator/{tabulator-tables@4.9.3 → tabulator-tables@5.3.2}/dist/css/fast/tabulator_fast.min.css +0 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bootstrap3.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bootstrap4.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_bulma.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_materialize.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_midnight.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_modern.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_semanticui.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_simple.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/css/tabulator_site.min.css +2 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/js/tabulator.js +27481 -0
- package/dist/bundled/datatabulator/tabulator-tables@5.3.2/dist/js/tabulator.js.map +1 -0
- package/dist/bundled/deckglplot/{npm/@deck.gl → @deck.gl}/json@8.6.7/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/3d-tiles@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/csv@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/@loaders.gl → @loaders.gl}/json@3.1.7/dist/dist.min.js +0 -0
- package/dist/bundled/deckglplot/{npm/deck.gl@8.6.7 → deck.gl@8.6.7}/dist.min.js +0 -0
- package/dist/bundled/echarts/{npm/echarts-gl@2.0.2 → echarts-gl@2.0.2}/dist/echarts-gl.min.js +0 -0
- package/dist/bundled/echarts/{npm/echarts@5.0.2 → echarts@5.0.2}/dist/echarts.min.js +0 -0
- package/dist/bundled/fastbasetemplate/fast_panel.css +1 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-extra.min.css +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-h5.js +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack-h5.js.map +0 -0
- package/dist/bundled/gridstack/{npm/gridstack@4.2.5 → gridstack@4.2.5}/dist/gridstack.min.css +0 -0
- package/dist/bundled/js/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/js/bootstrap.bundle.min.js +0 -0
- package/dist/bundled/js/{npm/bootstrap@4.6.1 → bootstrap@4.6.1}/dist/js/bootstrap.bundle.min.js.map +0 -0
- package/dist/bundled/js/{npm/golden-layout@1.5.9 → golden-layout@1.5.9}/dist/goldenlayout.min.js +0 -0
- package/dist/bundled/js/{npm/jquery@3.5.1 → jquery@3.5.1}/dist/jquery.slim.min.js +0 -0
- package/dist/bundled/jsoneditor/jsoneditor@9.5.6/dist/jsoneditor.min.css +6 -0
- package/dist/bundled/jsoneditor/jsoneditor@9.5.6/dist/jsoneditor.min.js +45 -0
- package/dist/bundled/notificationarea/{npm/notyf@3 → notyf@3}/notyf.min.css +0 -0
- package/dist/bundled/notificationarea/{npm/notyf@3 → notyf@3}/notyf.min.js +0 -0
- package/dist/bundled/plotlyplot/{npm/jquery@3.5.1 → jquery@3.5.1}/dist/jquery.slim.min.js +0 -0
- package/dist/css/markdown.css +7 -0
- package/dist/lib/models/comm_manager.d.ts +1 -0
- package/dist/lib/models/comm_manager.js +21 -1
- package/dist/lib/models/comm_manager.js.map +1 -1
- package/dist/lib/models/datetime_picker.js +4 -2
- package/dist/lib/models/datetime_picker.js.map +1 -1
- package/dist/lib/models/event-to-object.js +4 -0
- package/dist/lib/models/event-to-object.js.map +1 -1
- package/dist/lib/models/player.d.ts +2 -1
- package/dist/lib/models/player.js +11 -4
- package/dist/lib/models/player.js.map +1 -1
- package/dist/lib/models/reactive_html.js +11 -1
- package/dist/lib/models/reactive_html.js.map +1 -1
- package/dist/lib/models/tabulator.d.ts +5 -2
- package/dist/lib/models/tabulator.js +181 -162
- package/dist/lib/models/tabulator.js.map +1 -1
- package/dist/lib/styles/markdown.css.js +7 -0
- package/dist/panel.js +246 -175
- package/dist/panel.js.map +1 -1
- package/dist/panel.json +1 -1
- package/dist/panel.min.js +11 -11
- package/dist/wheels/bokeh-2.4.3-py3-none-any.whl +0 -0
- package/dist/wheels/panel-0.14.0a21-py3-none-any.whl +0 -0
- package/package.json +2 -2
- package/dist/bundled/datatabulator/npm/@holoviz/panel/dist/bundled/tabulator-tables@4.9.3/dist/css/fast/tabulator_fast.min.css +0 -1
- package/dist/bundled/datatabulator/npm/luxon/build/global/luxon.min.js +0 -1
- package/dist/bundled/datatabulator/npm/luxon/build/global/luxon.min.js.map +0 -1
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bootstrap/tabulator_bootstrap.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bootstrap/tabulator_bootstrap4.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/bulma/tabulator_bulma.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/materialize/tabulator_materialize.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/semantic-ui/tabulator_semantic-ui.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_midnight.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_modern.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_simple.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/css/tabulator_site.min.css +0 -3
- package/dist/bundled/datatabulator/tabulator-tables@4.9.3/dist/js/tabulator.js +0 -26546
- package/dist/bundled/jsoneditor/npm/jsoneditor@9.1.9/dist/jsoneditor.min.css +0 -6
- package/dist/bundled/jsoneditor/npm/jsoneditor@9.1.9/dist/jsoneditor.min.js +0 -46
package/dist/panel.min.js
CHANGED
|
@@ -42,17 +42,17 @@
|
|
|
42
42
|
})
|
|
43
43
|
({
|
|
44
44
|
"4e90918c0a": function _(e,s,t,o,i){o();const n=(0,e("tslib").__importStar)(e("eed113197d"));t.Panel=n;(0,e("@bokehjs/base").register_models)(n)},
|
|
45
|
-
"eed113197d": function _(e,a,t,o,c){o();const d=e("tslib");c("AcePlot",e("2e12ebdb23").AcePlot),c("Audio",e("33955cfa6f").Audio),c("Card",e("0972f6e77b").Card),c("CommManager",e("
|
|
45
|
+
"eed113197d": function _(e,a,t,o,c){o();const d=e("tslib");c("AcePlot",e("2e12ebdb23").AcePlot),c("Audio",e("33955cfa6f").Audio),c("Card",e("0972f6e77b").Card),c("CommManager",e("754fbb1f55").CommManager),c("CustomSelect",e("e258e515be").CustomSelect),c("DataTabulator",e("6ab332f75c").DataTabulator),c("DatetimePicker",e("297274885a").DatetimePicker),c("DeckGLPlot",e("0155f7af4d").DeckGLPlot),c("ECharts",e("9d046c4720").ECharts),c("HTML",e("3d7593ca5a").HTML),c("IDOM",e("7d45bd3bc4").IDOM),c("IPyWidget",e("0eae77d68f").IPyWidget),c("JSON",e("0d30bea0c8").JSON),c("JSONEditor",e("be9f51fc39").JSONEditor),c("FileDownload",e("1767172ffa").FileDownload),c("KaTeX",e("7b859fb3cf").KaTeX),c("Location",e("0c52a301f3").Location),c("MathJax",e("0c21036737").MathJax),c("Perspective",e("4ae96bd77b").Perspective),c("Player",e("588a5ae70d").Player),c("PlotlyPlot",e("42de27e56c").PlotlyPlot),c("Progress",e("979633320f").Progress),c("QuillInput",e("d51a79a0a3").QuillInput),c("ReactiveHTML",e("ad426de39c").ReactiveHTML),c("SingleSelect",e("ab54efe08a").SingleSelect),c("SpeechToText",e("a96be0bcc9").SpeechToText),c("State",e("bfa46a5f19").State),c("Tabs",e("f693d9aa84").Tabs),c("Terminal",e("3ea011fa55").Terminal),c("TextToSpeech",e("33cd2c254e").TextToSpeech),c("TrendIndicator",e("effe070807").TrendIndicator),c("VegaPlot",e("fea356270f").VegaPlot),c("Video",e("1b46fd56a8").Video),c("VideoStream",e("e3e9b8e495").VideoStream),(0,d.__exportStar)(e("c51f25e2a7"),t)},
|
|
46
46
|
"2e12ebdb23": function _(e,t,i,o,n){o();const s=e("@bokehjs/models/layouts/html_box"),a=e("@bokehjs/core/dom"),d=e("80a6464b1f");class h extends d.PanelHTMLBoxView{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.el.childNodes[0]&&this.el.appendChild(this._container),this._container.textContent=this.model.code,this._editor=window.ace.edit(this._container.id),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 _ extends s.HTMLBox{constructor(e){super(e)}static init_AcePlot(){this.prototype.default_view=h,this.define((({Any:e,Array:t,Boolean:i,String:o})=>({code:[o,""],filename:[o],language:[o],theme:[o,"chrome"],annotations:[t(e),[]],readonly:[i,!1],print_margin:[i,!1]}))),this.override({height:300,width:300})}}i.AcePlot=_,_.__name__="AcePlot",_.__module__="panel.models.ace",_.init_AcePlot()},
|
|
47
47
|
"80a6464b1f": function _(e,s,i,t,h){t();const n=e("@bokehjs/core/dom"),o=e("@bokehjs/core/util/color"),l=e("@bokehjs/core/layout/html"),a=e("@bokehjs/core/layout/types"),_=e("@bokehjs/models/widgets/markup"),c=e("@bokehjs/models/layouts/html_box");function d(e,s){let i=null!=s.width?"fixed":"fit",t=null!=s.height?"fixed":"fit";const{sizing_mode:h}=s;if(null!=h)if("fixed"==h)i=t="fixed";else if("stretch_both"==h)i=t="max";else if("stretch_width"==h)i="max";else if("stretch_height"==h)t="max";else switch(h){case"scale_width":i="max",t="min";break;case"scale_height":i="min",t="max";break;case"scale_both":i="max",t="max";break;default:throw new Error("unreachable")}"fixed"==i&&s.width?e.style.width=s.width+"px":"max"==i&&(e.style.width="100%"),null!=s.min_width&&(e.style.minWidth=s.min_width+"px"),null!=s.max_width&&(e.style.maxWidth=s.max_width+"px"),"fixed"==t&&s.height?e.style.height=s.height+"px":"max"==t&&(e.style.height="100%"),null!=s.min_height&&(e.style.minHeight=s.min_height+"px"),null!=s.max_width&&(e.style.maxHeight=s.max_height+"px")}i.set_size=d;class r extends l.VariadicBox{constructor(e,s,i){super(e),this.el=e,this.sizing_mode=s,this.changed=i,this._cache=new Map,this._cache_count=new Map}_measure(e){const s=[e.width,e.height,this.sizing_mode].toString(),i=this.changed&&"fixed"!=this.sizing_mode&&null!=this.sizing_mode?1:0,t=this._cache.get(s),h=this._cache_count.get(s);if(null!=t&&null!=h&&h>=i)return this._cache_count.set(s,h+1),t;const o=new a.Sizeable(e).bounded_to(this.sizing.size),l=(0,n.sized)(this.el,o,(()=>{const e=new a.Sizeable((0,n.content_size)(this.el)),{border:s,padding:i}=(0,n.extents)(this.el);return e.grow_by(s).grow_by(i).map(Math.ceil)}));return this._cache.set(s,l),this._cache_count.set(s,0),l}invalidate_cache(){}}i.CachedVariadicBox=r,r.__name__="CachedVariadicBox";class m extends _.MarkupView{_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new r(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),d(this.markup_el,this.model)}}i.PanelMarkupView=m,m.__name__="PanelMarkupView";class g extends c.HTMLBoxView{connect_signals(){super.connect_signals();const{css_classes:e,background:s}=this.model.properties;this._prev_css_classes=this.model.css_classes,this.on_change([e,s],(()=>{const e=[];let s=!1;for(const i of this.model.css_classes)"pn-loading"===i?s=!0:s?s=!1:e.push(i);const i=this._prev_css_classes;if(JSON.stringify(e)===JSON.stringify(i)){const{background:e}=this.model;this.el.style.backgroundColor=null!=e?(0,o.color2css)(e):"",(0,n.classes)(this.el).clear().add(...this.css_classes())}else this.invalidate_render();this._prev_css_classes=e}))}on_change(e,s){const i=this.model.properties;2===e.length&&e[0]===i.background&&e[1]===i.css_classes||super.on_change(e,s)}_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new r(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}render(){super.render(),d(this.el,this.model)}}i.PanelHTMLBoxView=g,g.__name__="PanelHTMLBoxView"},
|
|
48
48
|
"33955cfa6f": function _(e,t,i,o,s){o();const l=e("@bokehjs/models/layouts/html_box"),d=e("80a6464b1f");class u extends d.PanelHTMLBoxView{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.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 l.HTMLBox{constructor(e){super(e)}static init_Audio(){this.prototype.default_view=u,this.define((({Any:e,Boolean:t,Int:i,Number:o})=>({loop:[t,!1],paused:[t,!0],muted:[t,!1],autoplay:[t,!1],time:[o,0],throttle:[o,250],value:[e,""],volume:[i]})))}}i.Audio=a,a.__name__="Audio",a.__module__="panel.models.widgets",a.init_Audio()},
|
|
49
49
|
"0972f6e77b": function _(e,l,s,t,o){t();const i=e("tslib"),a=e("@bokehjs/models/layouts/column"),d=e("@bokehjs/core/util/bbox"),c=(0,i.__importStar)(e("@bokehjs/core/dom")),n=e("@bokehjs/core/dom"),h=e("@bokehjs/core/layout/grid"),r=e("@bokehjs/core/util/color");class _ extends a.ColumnView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.collapsed.change,(()=>this._collapse()));const{active_header_background:e,header_background:l,header_color:s,hide_header:t}=this.model.properties;this.on_change([e,l,s,t],(()=>this.render()))}_update_layout(){let e;e=this.model.hide_header?this.child_views.slice(1):this.model.collapsed?this.child_views.slice(0,1):this.child_views;const l=e.map((e=>e.layout));this.layout=new h.Column(l),this.layout.rows=this.model.rows,this.layout.spacing=[this.model.spacing,0],this.layout.set_sizing(this.box_sizing())}update_position(){if(this.model.collapsible&&!this.model.hide_header){const e=this.child_views[0],l=e.layout.bbox,s=e.layout.inner_bbox;if(0!=l.x1){let t;if(this.model.collapsible){const e=getComputedStyle(this.button_el.children[0]);t=parseFloat(e.width)+parseFloat(e.marginLeft)||0}else t=0;const o=new d.BBox({x0:l.x0,x1:l.x1-t,y0:l.y0,y1:l.y1}),i=new d.BBox({x0:s.x0,x1:s.x1-t,y0:s.y0,y1:s.y1});e.layout.set_geometry(o,i)}}super.update_position()}render(){(0,n.empty)(this.el);const{background:e,button_css_classes:l,header_color:s,header_tag:t,header_css_classes:o}=this.model;this.el.style.backgroundColor=null!=e?(0,r.color2css)(e):"",(0,n.classes)(this.el).clear().add(...this.css_classes());let i=this.model.header_background;!this.model.collapsed&&this.model.active_header_background&&(i=this.model.active_header_background);const a=this.child_views[0];let d;if(this.model.collapsible){this.button_el=c.createElement("button",{type:"button",class:o});const e=c.createElement("div",{class:l});e.innerHTML=this.model.collapsed?"\u25ba":"\u25bc",this.button_el.appendChild(e),this.button_el.style.backgroundColor=null!=i?i:"",a.el.style.backgroundColor=null!=i?i:"",this.button_el.appendChild(a.el),this.button_el.onclick=()=>this._toggle_button(),d=this.button_el}else d=c.createElement(t,{class:o}),d.style.backgroundColor=null!=i?i:"",d.appendChild(a.el);this.model.hide_header||(d.style.color=null!=s?s:"",this.el.appendChild(d),a.render());for(const e of this.child_views.slice(1))this.model.collapsed||this.el.appendChild(e.el),e.render()}_toggle_button(){this.model.collapsed=!this.model.collapsed}_collapse(){this.invalidate_render()}_createElement(){return c.createElement(this.model.tag,{class:this.css_classes()})}}s.CardView=_,_.__name__="CardView";class u extends a.Column{constructor(e){super(e)}static init_Card(){this.prototype.default_view=_,this.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"]})))}}s.Card=u,u.__name__="Card",u.__module__="panel.models.layout",u.init_Card()},
|
|
50
|
-
"
|
|
50
|
+
"754fbb1f55": function _(e,t,s,n,i){n();const o=e("@bokehjs/document"),_=e("@bokehjs/core/view"),c=e("@bokehjs/model"),h=e("@bokehjs/protocol/message"),l=e("@bokehjs/protocol/receiver");s.comm_settings={debounce:!0};class a extends _.View{renderTo(){}}s.CommManagerView=a,a.__name__="CommManagerView";class d extends c.Model{constructor(e){super(e),this._document_listener=e=>this._document_changed(e),this._receiver=new l.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);this.msg_handler(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.setter_id!==this.id&&(e instanceof o.ModelChangedEvent&&!(e.attr in e.model.serializable_attributes())||(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()))}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=h.Message.create("PATCH-DOC",{},e);this._client_comm.send(t);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;null!=s&&s.length>0?this._receiver.consume(s[0].buffer):this._receiver.consume(n);const t=this._receiver.message;null!=t&&Object.keys(t.content).length>0&&null!=this.document&&this.document.apply_json_patch(t.content,t.buffers,this.id)}}static init_CommManager(){this.prototype.default_view=a,this.define((({Int:e,String:t})=>({plot_id:[t],comm_id:[t],client_comm_id:[t],timeout:[e,5e3],debounce:[e,50]})))}}s.CommManager=d,d.__name__="CommManager",d.__module__="panel.models.comm_manager",d.init_CommManager()},
|
|
51
51
|
"e258e515be": 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),[]]})))},
|
|
52
|
-
"5e94fc93b9": function _(t,e,i,o,s){o();const l=t("@bokehjs/core/dom"),n=t("@bokehjs/core/util/types"),a=t("@bokehjs/models/layouts/html_box"),r=t("@bokehjs/core/build_views"),d=t("@bokehjs/core/bokeh_events"),c=t("@bokehjs/core/dom"),h=t("@bokehjs/core/kinds"),u=t("@bokehjs/models/sources/column_data_source"),m=t("@bokehjs/models/widgets/tables"),f=t("99a25e6992"),_=t("f34032fb47"),g=t("7f7d9e0c6b"),p=t("80a6464b1f");class b extends d.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e,this.event_name="table-edit"}_to_json(){return{model:this.origin,column:this.column,row:this.row}}}i.TableEditEvent=b,b.__name__="TableEditEvent";class y extends d.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e,this.event_name="cell-click"}_to_json(){return{model:this.origin,column:this.column,row:this.row}}}function w(t,e,i){for(const o of i)if(o[t]==e)return o;return null}function x(t,e,i,o=0){const s={};if(0==t.length)return s;const l=i[o];for(const a of t){const t=x(a._children,e,i,o+1);for(const e in t)(0,n.isArray)(t[e])?a[e]=t[e].reduce(((t,e)=>t+e),0)/t[e].length:a[e]=t[e];for(const t of e.slice(1)){const e=a[t.field];if(t.field in s){const i=s[t.field];"min"===l?s[t.field]=Math.min(e,i):"max"===l?s[t.field]=Math.max(e,i):"sum"===l?s[t.field]=e+i:"mean"===l&&((0,n.isArray)(s[t.field])?s[t.field].push(e):s[t.field]=[i,e])}else s[t.field]=e}}return s}function v(t,e,i,o){const s=[],l=e[0].field;for(const o of t){const t=o[i[0]];let n=w(l,t,s);null==n&&(n={_children:[]},n[l]=t,s.push(n));let a=n;const r={};for(const t of i.slice(1)){a=w(l,o[t],a._children),null==a&&(a={_children:[]},a[l]=o[t],n._children.push(a)),r[t]=n;for(const t of e.slice(1))a[t.field]=o[t];n=a}for(const t of e.slice(1))a[t.field]=o[t.field]}const n=[];for(const t of i)n.push(t in o?o[t]:"sum");return x(s,e,n),s}i.CellClickEvent=y,y.__name__="CellClickEvent";const T=function(t,e,i,o){const s=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===s||null===s?null:window.luxon.DateTime.fromMillis(s,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):o()}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&&o()})),a},S=function(t,e,i,o){const s=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===s||null===s?null:window.luxon.DateTime.fromMillis(s,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):o()}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&&o()})),a};class C extends p.PanelHTMLBoxView{constructor(){super(...arguments),this._tabulator_cell_updating=!1,this._updating_page=!0,this._updating_sort=!1,this._relayouting=!1,this._selection_updating=!1,this._lastVerticalScrollbarTopPosition=0,this._applied_styles=!1}connect_signals(){super.connect_signals();const t=this.model.properties,{configuration:e,layout:i,columns:o,theme:s,groupby:l}=t;this.on_change([e,i,o,l],(0,f.debounce)((()=>this.invalidate_render()),20,!1)),this.on_change([s],(()=>this.setCSS())),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()})),this.connect(t.styles.change,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.connect(t.hidden_columns.change,(()=>this.setHidden())),this.connect(t.page_size.change,(()=>this.setPageSize())),this.connect(t.page.change,(()=>{this._updating_page||this.setPage()})),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(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 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(),this.relayout()}renderComplete(){this._initializing&&(this.setSelection(),this.relayout(),this._initializing=!1,this._lastVerticalScrollbarTopPosition&&(this.tabulator.rowManager.element.scrollTop=this._lastVerticalScrollbarTopPosition))}redraw(){this.tabulator.redraw(!0),this.setStyles()}after_layout(){super.after_layout(),null==this.tabulator||this._relayouting&&!this._initializing||this.redraw()}render(){super.render();if(this.setCSS())return;this._initializing=!0;const t=(0,c.div)({class:"pnx-tabulator"});(0,p.set_size)(t,this.model);let e=this.getConfiguration();this.tabulator=new Tabulator(t,e),this.renderChildren(!0),"remote"===this.model.pagination&&(this.tabulator.options.pagination=this.model.pagination,this.tabulator.modules.page.mode="remote"),this.setGroupBy(),this.setHidden(),this.model.pagination?(this.setMaxPage(),this.tabulator.setPage(this.model.page),this.setData()):this.setFrozen(),this.el.appendChild(t)}tableInit(t,e){const i=e.modules.ajax;i.sendRequest=()=>t.requestPage(i.params.page,i.params.sorters),e.modules.page._parseRemoteData=()=>{}}relayout(){if(!this._relayouting){if(this._relayouting=!0,this.tabulator.rowManager.adjustTableSize(),this.update_layout(),this.compute_layout(),this.root!==this){this.invalidate_layout();const t=this.root._parent;null!=t&&null!=t.relayout&&t.relayout()}else null!=this._parent&&(null!=this._parent.relayout?this._parent.relayout():this._parent.invalidate_layout());this._relayouting=!1}}requestPage(t,e){return new Promise(((i,o)=>{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){o(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;const e=this;let i=Object.assign(Object.assign({},this.model.configuration),{index:"_index",nestedFieldSeparator:!1,movableColumns:!1,selectable:t,columns:this.getColumns(),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)},initialSort:this.sorters,layout:this.getLayout(),pagination:this.model.pagination,paginationSize:this.model.page_size,paginationInitialPage:1,tableBuilding:function(){e.tableInit(e,this)},renderComplete:()=>this.renderComplete(),rowSelectionChanged:(t,e)=>this.rowSelectionChanged(t,e),rowClick:(t,e)=>this.rowClicked(t,e),cellEdited:t=>this.cellEdited(t),selectableCheck:t=>{const e=this.model.selectable_rows;return null==e||e.indexOf(t._row.data._index)>=0},tooltips:t=>t.getColumn().getField()+": "+t.getValue(),scrollVertical:(0,f.debounce)((()=>{this._lastVerticalScrollbarTopPosition=this.tabulator.rowManager.element.scrollTop,this.setStyles()}),50,!1),rowFormatter:t=>this._render_row(t),dataFiltering:()=>{null!=this.tabulator&&(this.model.filters=this.tabulator.getHeaderFilters())}});"remote"===this.model.pagination&&(i.ajaxURL="http://panel.pyviz.org",i.ajaxSorting=!0);const o=this.model.source;let s;return s=null===o||0===o.columns().length?[]:(0,g.transform_cds_to_records)(o,!0),i.dataTree&&(s=v(s,this.model.columns,this.model.indexes,this.model.aggregators)),Object.assign(Object.assign({},i),{data:s})}renderChildren(t=!1){new Promise((async t=>{const e=[];for(const t of this.model.expanded)t in this.model.children&&e.push(this.model.children[t]);await(0,r.build_views)(this._child_views,e,{parent:null}),t(null)})).then((()=>{for(const t of this.model.expanded){const e=this.tabulator.getRow(t);this._render_row(e)}this.model.expanded.length||t||setTimeout((()=>this.relayout()),20)}))}_render_row(t){const e=t._row.data._index;if(this.model.expanded.indexOf(e)<0||!(e in this.model.children))return;const i=this.model.children[e],o=this._child_views.get(i);if(null==o)return;o._parent=this;const s=t.getElement();let l=s.children[s.children.length-1];if("bk"===l.className){if(l.children.length)return}else l=null;if(null==l){const t=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,e="-"+s.style.paddingLeft;l=(0,c.div)({style:"background-color: "+t+"; margin-left:"+e})}t.getElement().appendChild(l),o.renderTo(l)}_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],o=i.indexOf(e);if(o<0)i.push(e);else{const t=i.splice(o,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,l.undisplay)(i.el)}}this.model.expanded=i;const s=i.indexOf(e)<0?"\u25ba":"\u25bc";if(t._cell.element.innerText=s,i.indexOf(e)<0)return;let n=!0;for(const t of this.model.expanded)if(!(t in this.model.children)){n=!1;break}n&&this.renderChildren()}getData(){let t=(0,g.transform_cds_to_records)(this.model.source,!0);return this.model.configuration.dataTree&&(t=v(t,this.model.columns,this.model.indexes,this.model.aggregators)),t}getColumns(){var t;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let i=[];if(i.push({field:"_index",frozen:!0}),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 o=null;if(null!=e)for(const e of i)if(null!=e.columns){for(const i of e.columns)if(t.field===i.field){o=i;break}if(null!=o)break}else if(t.field===e.field){o=e;break}if(null==o&&(o={field:t.field}),null==o.title&&(o.title=t.title),null==o.width&&null!=t.width&&0!=t.width&&(o.width=t.width),null==o.formatter&&null!=t.formatter){const e=t.formatter.type;o.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 o=(0,c.div)();o.innerHTML=i;const s=o.children[0];return"function(){return c.convert(arguments)}"===s.innerHTML?"":s}}const s=t.editor,l=s.type;null!=o.editor?"date"===o.editor?o.editor=T:"datetime"===o.editor&&(o.editor=S):"StringEditor"===l?s.completions.length>0?(o.editor="autocomplete",o.editorParams={values:s.completions}):o.editor="input":"TextEditor"===l?o.editor="textarea":"IntEditor"===l||"NumberEditor"===l?(o.editor="number",o.editorParams={step:s.step}):"CheckboxEditor"===l?o.editor="tickCross":"DateEditor"===l?o.editor=T:"SelectEditor"===l?(o.editor="select",o.editorParams={values:s.options}):null!=s&&null!=s.default_view&&(o.editor=(e,i,o,s)=>{this.renderEditor(t,e,i,o,s)}),o.editable=()=>this.model.editable&&null!=s.default_view,o.headerFilter&&"boolean"==typeof o.headerFilter&&"string"==typeof o.editor&&(o.headerFilter=o.editor,o.headerFilterParams=o.editorParams);for(const t of this.model.sorters)o.field===t.field&&(o.headerSortStartingDir=t.dir);o.cellClick=(e,i)=>{const o=i._cell.row.data._index;this.model.trigger_event(new y(t.field,o))},null==e&&i.push(o)}for(const t in this.model.buttons){const e={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const o=i._cell.row.data._index;this.model.trigger_event(new y(t,o))}};i.push(e)}return i}renderEditor(t,e,i,o,s){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("change",(()=>{const t=n.serializeValue(),i=e.getValue(),l=n.validate();l.valid||s(l.msg),null!=i&&typeof t!=typeof i?s("Mismatching type"):o(n.serializeValue())})),n.inputEl}setData(){const t=this.getData();null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t),this.postUpdate()}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=(null==e?void 0:e.data._index)||0;this.setData(),this.postUpdate(),this.model.follow&&e&&this.tabulator.scrollToRow(i,"top",!1)}postUpdate(){this.model.pagination||this.setFrozen(),this.setSelection(),null==this.model.height&&null==this.model.pagination&&this.relayout()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=(0,g.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(t),this.postUpdate()}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}setGroupBy(){if(0==this.model.groupby.length)return void this.tabulator.setGroupBy(!1);this.tabulator.setGroupBy((t=>{const e=[];for(const i of this.model.groupby){const o=i+": "+t[i];e.push(o)}return e.join(", ")}))}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setCSS(){let t;t="default"==this.model.theme?"tabulator":"tabulator_"+this.model.theme;const e=this.model.theme_url+t+".min.css";let i=null;const o=document.getElementsByTagName("link"),s=this.model.theme_url.indexOf("dist/"),l=this.model.theme_url.slice(0,s);for(const t of o)if(t.href.indexOf(l)>=0){i=t;break}if(null!=i)return!i.href.endsWith(e)&&(i.href=e,setTimeout((()=>this.render()),100),!0);let n=document.getElementsByTagName("head")[0];const a=document.createElement("link");return a.type="text/css",a.rel="stylesheet",a.media="screen",a.href=e,a.onload=()=>{this.render(),this.relayout()},n.appendChild(a),!0}setStyles(){if(null!=this.tabulator&&0!=this.tabulator.getDataCount()){this._applied_styles=!1;for(const t in this.model.styles.data){const e=this.model.styles.data[t],i=this.tabulator.getRow(t);if(!i)continue;const o=i._row.cells;for(const t in e){const i=e[t],s=o[t];if(null==s||!i.length)continue;const l=s.element;for(const t of i){let e,i;if((0,n.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.indexOf(e.field)>-1?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))}setPageSize(){this.tabulator.setPageSize(this.model.page_size)}setSelection(){if(null==this.tabulator||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 o=[];const s=this.model.source.selected,l=e._row.data._index;if(t.ctrlKey||t.metaKey)o=this.model.source.selected.indices;else if(t.shiftKey&&s.indices.length){const t=s.indices[s.indices.length-1];if(l>t)for(let e=t;e<l;e++)o.push(e);else for(let e=t;e>l;e--)o.push(e)}if(o.indexOf(l)<0?o.push(l):o.splice(o.indexOf(l),1),"number"==typeof this.model.select_mode)for(;o.length>this.model.select_mode;)o.shift();const n=this._filter_selected(o);this.tabulator.deselectRow(),this.tabulator.selectRow(n),this._selection_updating=!0,s.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)),o=this._filter_selected(i);this._selection_updating=i.length===o.length,this.model.source.selected.indices=o,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,i=t._cell.row.data._index,o=t._cell.value;this._tabulator_cell_updating=!0,_.comm_settings.debounce=!1;try{this.model.source.patch({[e]:[[i,o]]})}finally{_.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new b(e,i)),this.setSorters(),this.tabulator.scrollToRow(i,"top",!1)}}i.DataTabulatorView=C,C.__name__="DataTabulatorView",i.TableLayout=(0,h.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class k extends a.HTMLBox{constructor(t){super(t)}static init_DataTabulator(){this.prototype.default_view=C,this.define((({Any:t,Array:e,Boolean:o,Nullable:s,Number:l,Ref:n,String:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,{}],configuration:[t,{}],columns:[e(n(m.TableColumn)),[]],download:[o,!1],editable:[o,!0],expanded:[e(l),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[o,!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:[s(a),null],page:[l,0],page_size:[l,0],select_mode:[t,!0],selectable_rows:[s(e(l)),null],source:[n(u.ColumnDataSource)],sorters:[e(t),[]],styles:[t,{}],theme:[a,"simple"],theme_url:[a,"https://unpkg.com/tabulator-tables@4.9.3/dist/css/"]})))}}i.DataTabulator=k,k.__name__="DataTabulator",k.__module__="panel.models.tabulator",k.init_DataTabulator()},
|
|
52
|
+
"6ab332f75c": function _(t,e,i,o,s){o();const l=t("@bokehjs/core/dom"),n=t("@bokehjs/core/util/types"),a=t("@bokehjs/models/layouts/html_box"),r=t("@bokehjs/core/build_views"),d=t("@bokehjs/core/bokeh_events"),h=t("@bokehjs/core/dom"),u=t("@bokehjs/core/kinds"),c=t("@bokehjs/models/sources/column_data_source"),m=t("@bokehjs/models/widgets/tables"),g=t("99a25e6992"),f=t("754fbb1f55"),_=t("7f7d9e0c6b"),p=t("80a6464b1f");class b extends d.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e,this.event_name="table-edit"}_to_json(){return{model:this.origin,column:this.column,row:this.row}}}i.TableEditEvent=b,b.__name__="TableEditEvent";class y extends d.ModelEvent{constructor(t,e){super(),this.column=t,this.row=e,this.event_name="cell-click"}_to_json(){return{model:this.origin,column:this.column,row:this.row}}}function w(t,e,i){for(const o of i)if(o[t]==e)return o;return null}function x(t,e,i,o=0){const s={};if(0==t.length)return s;const l=i[o];for(const a of t){const t=x(a._children,e,i,o+1);for(const e in t)(0,n.isArray)(t[e])?a[e]=t[e].reduce(((t,e)=>t+e),0)/t[e].length:a[e]=t[e];for(const t of e.slice(1)){const e=a[t.field];if(t.field in s){const i=s[t.field];"min"===l?s[t.field]=Math.min(e,i):"max"===l?s[t.field]=Math.max(e,i):"sum"===l?s[t.field]=e+i:"mean"===l&&((0,n.isArray)(s[t.field])?s[t.field].push(e):s[t.field]=[i,e])}else s[t.field]=e}}return s}function v(t,e,i,o){const s=[],l=e[0].field;for(const o of t){const t=o[i[0]];let n=w(l,t,s);null==n&&(n={_children:[]},n[l]=t,s.push(n));let a=n;const r={};for(const t of i.slice(1)){a=w(l,o[t],a._children),null==a&&(a={_children:[]},a[l]=o[t],n._children.push(a)),r[t]=n;for(const t of e.slice(1))a[t.field]=o[t];n=a}for(const t of e.slice(1))a[t.field]=o[t.field]}const n=[];for(const t of i)n.push(t in o?o[t]:"sum");return x(s,e,n),s}i.CellClickEvent=y,y.__name__="CellClickEvent";const T=function(t,e,i,o,s,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},C=function(t,e,i,o){const s=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===s||null===s?null:window.luxon.DateTime.fromMillis(s,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):o()}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&&o()})),a},S=function(t,e,i,o){const s=t.getValue(),l={zone:new window.luxon.IANAZone("UTC")};let n;n="NaN"===s||null===s?null:window.luxon.DateTime.fromMillis(s,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):o()}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&&o()})),a};class k extends p.PanelHTMLBoxView{constructor(){super(...arguments),this._tabulator_cell_updating=!1,this._updating_page=!0,this._updating_sort=!1,this._relayouting=!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:o,theme:s,groupby:l}=t;this.on_change([e,i,o,l],(0,g.debounce)((()=>this.invalidate_render()),20,!1)),this.on_change([s],(()=>this.setCSS())),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.styles.change,(()=>{this._applied_styles&&this.tabulator.redraw(!0),this.setStyles()})),this.connect(t.hidden_columns.change,(()=>this.setHidden())),this.connect(t.page_size.change,(()=>this.setPageSize())),this.connect(t.page.change,(()=>{this._updating_page||this.setPage()})),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(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 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(),this.relayout()}redraw(){this._building||(null!=this.tabulator.columnManager.element&&this.tabulator.columnManager.redraw(!0),null!=this.tabulator.rowManager.renderer&&(this.tabulator.rowManager.redraw(!0),this.setStyles()))}after_layout(){super.after_layout(),null==this.tabulator||this._relayouting&&!this._initializing||this.redraw()}render(){super.render();if(this.setCSS())return;this._initializing=!0;const t=(0,h.div)({class:"pnx-tabulator"});(0,p.set_size)(t,this.model);let e=this.getConfiguration();this.tabulator=new Tabulator(t,e),this.init_callbacks(),this.renderChildren(!0),this.setHidden(),this.el.appendChild(t)}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("dataLoading",(()=>{this.tabulator.modules.frozenColumns.active=!1})),this.tabulator.on("selectableCheck",(t=>{const e=this.model.selectable_rows;return null==e||e.indexOf(t._row.data._index)>=0})),this.tabulator.on("tooltips",(t=>t.getColumn().getField()+": "+t.getValue())),this.tabulator.on("scrollVertical",(0,g.debounce)((()=>{this.setStyles()}),50,!1)),this.tabulator.on("rowFormatter",(t=>this._render_row(t))),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._initializing||(0===e.length&&this.tabulator.rowManager.renderEmptyScroll(),this.updatePage(this.tabulator.getPage()))})),this.tabulator.on("pageLoaded",(t=>{this.updatePage(t)})),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.setHidden(),this.setSelection(),this.setMaxPage(),this.tabulator.setPage(this.model.page),this.setStyles(),this.renderChildren(),this.setGroupBy(),this.setFrozen(),this.tabulator.modules.frozenColumns.active=!0,this.tabulator.modules.frozenColumns.layout(),this._initializing=!1}relayout(){if(!this._relayouting){if(this._relayouting=!0,this.tabulator.rowManager.renderer&&this.tabulator.rowManager.adjustTableSize(),this.update_layout(),this.compute_layout(),this.root!==this){this.invalidate_layout();const t=this.root._parent;null!=t&&null!=t.relayout&&t.relayout()}else null!=this._parent&&(null!=this._parent.relayout?this._parent.relayout():this._parent.invalidate_layout());this._relayouting=!1}}requestPage(t,e){return new Promise(((i,o)=>{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){o(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});"remote"===this.model.pagination&&(e.ajaxURL="http://panel.pyviz.org",e.sortMode="remote");const i=this.model.source;let o;return o=null===i||0===i.columns().length?[]:(0,_.transform_cds_to_records)(i,!0),e.dataTree&&(o=v(o,this.model.columns,this.model.indexes,this.model.aggregators)),Object.assign(Object.assign({},e),{data:o})}renderChildren(t=!1){new Promise((async t=>{const e=[];for(const t of this.model.expanded)t in this.model.children&&e.push(this.model.children[t]);await(0,r.build_views)(this._child_views,e,{parent:null}),t(null)})).then((()=>{for(const t of this.model.expanded){const e=this.tabulator.getRow(t);this._render_row(e)}this.model.expanded.length||t||setTimeout((()=>this.relayout()),20)}))}_render_row(t){const e=t._row.data._index;if(this.model.expanded.indexOf(e)<0||!(e in this.model.children))return;const i=this.model.children[e],o=this._child_views.get(i);if(null==o)return;o._parent=this;const s=t.getElement();let l=s.children[s.children.length-1];if("bk"===l.className){if(l.children.length)return}else l=null;if(null==l){const t=getComputedStyle(this.tabulator.element.children[1].children[0]).backgroundColor,e="-"+s.style.paddingLeft;l=(0,h.div)({style:"background-color: "+t+"; margin-left:"+e})}t.getElement().appendChild(l),o.renderTo(l)}_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],o=i.indexOf(e);if(o<0)i.push(e);else{const t=i.splice(o,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,l.undisplay)(i.el)}}if(this.model.expanded=i,i.indexOf(e)<0)return;let s=!0;for(const t of this.model.expanded)if(!(t in this.model.children)){s=!1;break}s&&this.renderChildren()}getData(){let t=(0,_.transform_cds_to_records)(this.model.source,!0);return this.model.configuration.dataTree&&(t=v(t,this.model.columns,this.model.indexes,this.model.aggregators)),t}getColumns(){var t;const e=null===(t=this.model.configuration)||void 0===t?void 0:t.columns;let i=[];if(i.push({field:"_index",frozen:!0}),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 o=null;if(null!=e)for(const e of i)if(null!=e.columns){for(const i of e.columns)if(t.field===i.field){o=i;break}if(null!=o)break}else if(t.field===e.field){o=e;break}if(null==o&&(o={field:t.field}),null==o.title&&(o.title=t.title),null==o.width&&null!=t.width&&0!=t.width&&(o.width=t.width),null==o.formatter&&null!=t.formatter){const e=t.formatter.type;o.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 o=(0,h.div)();o.innerHTML=i;const s=o.children[0];return"function(){return c.convert(arguments)}"===s.innerHTML?"":s}}"timestamp"==o.sorter&&(o.sorter=T);const s=t.editor,l=s.type;null!=o.editor?"date"===o.editor?o.editor=C:"datetime"===o.editor&&(o.editor=S):"StringEditor"===l?s.completions.length>0?(o.editor="list",o.editorParams={values:s.completions,autocomplete:!0,listOnEmpty:!0}):o.editor="input":"TextEditor"===l?o.editor="textarea":"IntEditor"===l||"NumberEditor"===l?(o.editor="number",o.editorParams={step:s.step}):"CheckboxEditor"===l?o.editor="tickCross":"DateEditor"===l?o.editor=C:"SelectEditor"===l?(o.editor="list",o.editorParams={values:s.options}):null!=s&&null!=s.default_view&&(o.editor=(e,i,o,s)=>{this.renderEditor(t,e,i,o,s)}),o.editable=()=>this.model.editable&&null!=s.default_view,o.headerFilter&&"boolean"==typeof o.headerFilter&&"string"==typeof o.editor&&(o.headerFilter=o.editor,o.headerFilterParams=o.editorParams);for(const t of this.model.sorters)o.field===t.field&&(o.headerSortStartingDir=t.dir);o.cellClick=(e,i)=>{const o=i.getData()._index;this.model.trigger_event(new y(t.field,o))},null==e&&i.push(o)}for(const t in this.model.buttons){const e={formatter:()=>this.model.buttons[t],hozAlign:"center",cellClick:(e,i)=>{const o=i.getData()._index;this.model.trigger_event(new y(t,o))}};i.push(e)}return i}renderEditor(t,e,i,o,s){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("change",(()=>{const t=n.serializeValue(),i=e.getValue(),l=n.validate();l.valid||s(l.msg),null!=i&&typeof t!=typeof i?s("Mismatching type"):o(n.serializeValue())})),n.inputEl}setData(){const t=this.getData();null!=this.model.pagination?this.tabulator.rowManager.setData(t,!0,!1):this.tabulator.setData(t),this.postUpdate()}addData(){const t=this.tabulator.rowManager.getRows(),e=t[t.length-1],i=(null==e?void 0:e.data._index)||0;this.setData(),this.postUpdate(),this.model.follow&&e&&this.tabulator.scrollToRow(i,"top",!1)}postUpdate(){this.model.pagination||this.setFrozen(),this.setSelection(),null==this.model.height&&null==this.model.pagination&&this.relayout()}updateOrAddData(){if(this._tabulator_cell_updating)return;let t=(0,_.transform_cds_to_records)(this.model.source,!0);this.tabulator.setData(t),this.postUpdate()}setFrozen(){for(const t of this.model.frozen_rows)this.tabulator.getRow(t).freeze()}updatePage(t){"local"===this.model.pagination&&this.model.page!==t&&(this._updating_page=!0,this.model.page=t,this._updating_page=!1)}setGroupBy(){if(0==this.model.groupby.length)return void this.tabulator.setGroupBy(!1);const t=t=>{const e=[];for(const i of this.model.groupby){const o=i+": "+t[i];e.push(o)}return e.join(", ")};this.tabulator.setGroupBy(t),this.tabulator.setGroupBy(t)}setSorters(){this._updating_sort||this.tabulator.setSort(this.sorters)}setCSS(){let t,e;"default"==this.model.theme?t="tabulator":(e="bootstrap"==this.model.theme?"bootstrap3":"semantic-ui"==this.model.theme?"semanticui":this.model.theme,t="tabulator_"+e);const i=this.model.theme_url+t+".min.css";let o=null;const s=document.getElementsByTagName("link"),l=this.model.theme_url.indexOf("dist/"),n=this.model.theme_url.slice(0,l);for(const t of s)if(t.href.indexOf(n)>=0){o=t;break}if(null!=o)return!o.href.endsWith(i)&&(o.href=i,setTimeout((()=>this.render()),100),!0);let a=document.getElementsByTagName("head")[0];const r=document.createElement("link");return r.type="text/css",r.rel="stylesheet",r.media="screen",r.href=i,r.onload=()=>{this._building||(this.render(),this.relayout())},a.appendChild(r),!0}setStyles(){if(null!=this.tabulator&&0!=this.tabulator.getDataCount()){this._applied_styles=!1;for(const t in this.model.styles.data){const e=this.model.styles.data[t],i=this.tabulator.getRow(t);if(!i)continue;const o=i._row.cells;for(const t in e){const i=e[t],s=o[t];if(null==s||!i.length)continue;const l=s.element;for(const t of i){let e,i;if((0,n.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.indexOf(e.field)>-1?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))}setPageSize(){this.tabulator.setPageSize(this.model.page_size)}setSelection(){if(null==this.tabulator||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 o=[];const s=this.model.source.selected,l=e._row.data._index;if(t.ctrlKey||t.metaKey)o=this.model.source.selected.indices;else if(t.shiftKey&&s.indices.length){const t=s.indices[s.indices.length-1];if(l>t)for(let e=t;e<l;e++)o.push(e);else for(let e=t;e>l;e--)o.push(e)}if(o.indexOf(l)<0?o.push(l):o.splice(o.indexOf(l),1),"number"==typeof this.model.select_mode)for(;o.length>this.model.select_mode;)o.shift();const n=this._filter_selected(o);this.tabulator.deselectRow(),this.tabulator.selectRow(n),this._selection_updating=!0,s.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)),o=this._filter_selected(i);this._selection_updating=i.length===o.length,this.model.source.selected.indices=o,this._selection_updating=!1}cellEdited(t){const e=t._cell.column.field,i=t.getData()._index,o=t._cell.value;this._tabulator_cell_updating=!0,f.comm_settings.debounce=!1;try{this.model.source.patch({[e]:[[i,o]]})}finally{f.comm_settings.debounce=!0,this._tabulator_cell_updating=!1}this.model.trigger_event(new b(e,i)),this.tabulator.scrollToRow(i,"top",!1)}}i.DataTabulatorView=k,k.__name__="DataTabulatorView",i.TableLayout=(0,u.Enum)("fit_data","fit_data_fill","fit_data_stretch","fit_data_table","fit_columns");class M extends a.HTMLBox{constructor(t){super(t)}static init_DataTabulator(){this.prototype.default_view=k,this.define((({Any:t,Array:e,Boolean:o,Nullable:s,Number:l,Ref:n,String:a})=>({aggregators:[t,{}],buttons:[t,{}],children:[t,{}],configuration:[t,{}],columns:[e(n(m.TableColumn)),[]],download:[o,!1],editable:[o,!0],expanded:[e(l),[]],filename:[a,"table.csv"],filters:[e(t),[]],follow:[o,!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:[s(a),null],page:[l,0],page_size:[l,0],select_mode:[t,!0],selectable_rows:[s(e(l)),null],source:[n(c.ColumnDataSource)],sorters:[e(t),[]],styles:[t,{}],theme:[a,"simple"],theme_url:[a,"https://unpkg.com/tabulator-tables@5.3.2/dist/css/"]})))}}i.DataTabulator=M,M.__name__="DataTabulator",M.__module__="panel.models.tabulator",M.init_DataTabulator()},
|
|
53
53
|
"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},
|
|
54
54
|
"7f7d9e0c6b": function _(n,t,e,o,r){o(),e.transform_cds_to_records=function(n,t=!1,e=0){const o=[],r=n.columns(),l=n.get_length();if(0===r.length||null===l)return[];for(let c=e;c<l;c++){const e={};for(const t of r){let o=n.get_array(t);const r=null==o[0].shape?null:o[0].shape;null!=r&&r.length>1&&"number"==typeof r[0]?e[t]=o.slice(c*r[1],c*r[1]+r[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 r of n)(t||"index"!==r)&&(o[r]=n[r][e])}return[]}},
|
|
55
|
-
"
|
|
55
|
+
"297274885a": function _(e,t,i,s,n){s();const o=e("tslib"),a=(0,o.__importDefault)(e("50d3473f3f")),l=e("@bokehjs/models/widgets/input_widget"),d=e("@bokehjs/core/dom"),r=e("@bokehjs/core/enums"),m=e("@bokehjs/core/util/types"),c=(0,o.__importStar)(e("@bokehjs/styles/widgets/inputs.css")),h=(0,o.__importDefault)(e("@bokehjs/styles/widgets/flatpickr.css"));function _(e){const t=[];for(const i of e)if((0,m.isString)(i))t.push(i);else{const[e,s]=i;t.push({from:e,to:s})}return t}class u extends l.InputWidgetView{connect_signals(){super.connect_signals();const{value:e,min_date:t,max_date:i,disabled_dates:s,enabled_dates:n,position:o,inline:a,enable_time:l,enable_seconds:d,military_time:r,date_format:m,mode:c}=this.model.properties;this.connect(e.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.setDate(this.model.value)})),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(s.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("disable",this.model.disabled_dates)})),this.connect(n.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("enable",this.model.enabled_dates)})),this.connect(o.change,(()=>{var e;return null===(e=this._picker)||void 0===e?void 0:e.set("position",this.model.position)})),this.connect(a.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(d.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(m.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()}styles(){return[...super.styles(),h.default]}render(){null==this._picker&&(super.render(),this.input_el=(0,d.input)({type:"text",class:c.input,disabled:this.model.disabled}),this.group_el.appendChild(this.input_el),this._picker=(0,a.default)(this.input_el,{defaultDate:this.model.value,minDate:this.model.min_date?new Date(this.model.min_date):void 0,maxDate:this.model.max_date?new Date(this.model.max_date):void 0,inline:this.model.inline,position:this.model.position,disable:_(this.model.disabled_dates),enable:_(this.model.enabled_dates),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)}),this._picker.maxDateHasTime=!0,this._picker.minDateHasTime=!0)}_on_close(e,t,i){("range"!=this.model.mode||t.includes("to"))&&(this.model.value=t,this.change_input())}}i.DatetimePickerView=u,u.__name__="DatetimePickerView";class p extends l.InputWidget{constructor(e){super(e)}static init_DatetimePicker(){this.prototype.default_view=u,this.define((({Boolean:e,String:t,Array:i,Tuple:s,Or:n,Nullable:o})=>{const a=i(n(t,s(t,t)));return{value:[t],min_date:[o(t),null],max_date:[o(t),null],disabled_dates:[a,[]],enabled_dates:[a,[]],position:[r.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"]}}))}}i.DatetimePicker=p,p.__name__="DatetimePicker",p.__module__="panel.models.datetime_picker",p.init_DatetimePicker()},
|
|
56
56
|
"50d3473f3f": function _(e,n,t,a,i){
|
|
57
57
|
/* flatpickr v4.6.6, @license MIT */var o,r;o=this,r=function(){"use strict";
|
|
58
58
|
/*! *****************************************************************************
|
|
@@ -98,8 +98,8 @@
|
|
|
98
98
|
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}},
|
|
99
99
|
"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}},
|
|
100
100
|
"9d046c4720": function _(t,e,s,h,i){h();const r=t("@bokehjs/models/layouts/html_box");class n extends r.HTMLBoxView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,(()=>this._plot()));const{width:t,height:e,renderer:s,theme:h}=this.model.properties;this.on_change([t,e],(()=>this._resize())),this.on_change([h,s],(()=>this.render()))}render(){super.render();const t={width:this.model.width,height:this.model.height,renderer:this.model.renderer};null!=this._chart&&window.echarts.dispose(this._chart),this._chart=window.echarts.init(this.el,this.model.theme,t),this._plot()}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})}}s.EChartsView=n,n.__name__="EChartsView";class a extends r.HTMLBox{constructor(t){super(t)}static init_ECharts(){this.prototype.default_view=n,this.define((({Any:t,String:e})=>({data:[t,{}],theme:[e,"default"],renderer:[e,"canvas"]})))}}s.ECharts=a,a.__name__="ECharts",a.__module__="panel.models.echarts",a.init_ECharts()},
|
|
101
|
-
"3d7593ca5a": function _(e,t,n,s,r){s();const i=e("@bokehjs/models/widgets/markup"),o=e("@bokehjs/core/bokeh_events"),l=e("80a6464b1f"),_=e("
|
|
102
|
-
"
|
|
101
|
+
"3d7593ca5a": function _(e,t,n,s,r){s();const i=e("@bokehjs/models/widgets/markup"),o=e("@bokehjs/core/bokeh_events"),l=e("80a6464b1f"),_=e("d92f7d4d2b");class a extends o.ModelEvent{constructor(e,t){super(),this.node=e,this.data=t,this.event_name="dom_event"}_to_json(){return{model:this.origin,node:this.node,data:this.data}}}function d(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function c(e){Array.from(e.querySelectorAll("script")).forEach((e=>{const t=document.createElement("script");Array.from(e.attributes).forEach((e=>t.setAttribute(e.name,e.value))),t.appendChild(document.createTextNode(e.innerHTML)),e.parentNode&&e.parentNode.replaceChild(t,e)}))}n.DOMEvent=a,a.__name__="DOMEvent",n.htmlDecode=d,n.runScripts=c;class h extends l.PanelMarkupView{constructor(){super(...arguments),this._event_listeners={}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.events.change,(()=>{this._remove_event_listeners(),this._setup_event_listeners()}))}rerender(){this.render(),this.invalidate_layout()}render(){super.render();const e=this.process_tex();e?(this.markup_el.innerHTML=e,c(this.markup_el),this._setup_event_listeners()):this.markup_el.innerHTML=""}process_tex(){const e=d(this.model.text)||this.model.text;if(this.model.disable_math||!this.contains_tex(e))return e;const t=this.provider.MathJax.find_tex(e),n=[];let s=0;for(const r of t)n.push(e.slice(s,r.start.n)),n.push(this.provider.MathJax.tex2svg(r.math,{display:r.display}).outerHTML),s=r.end.n;return s<e.length&&n.push(e.slice(s)),n.join("")}contains_tex(e){return!!this.provider.MathJax&&this.provider.MathJax.find_tex(e).length>0}_remove_event_listeners(){for(const e in this._event_listeners){const t=document.getElementById(e);if(null!=t)for(const n in this._event_listeners[e]){const s=this._event_listeners[e][n];t.removeEventListener(n,s)}else console.warn(`DOM node '${e}' could not be found. Cannot subscribe to DOM events.`)}this._event_listeners={}}_setup_event_listeners(){for(const e in this.model.events){const t=document.getElementById(e);if(null!=t)for(const n of this.model.events[e]){const s=t=>{this.model.trigger_event(new a(e,(0,_.serializeEvent)(t)))};t.addEventListener(n,s),e in this._event_listeners||(this._event_listeners[e]={}),this._event_listeners[e][n]=s}else console.warn(`DOM node '${e}' could not be found. Cannot subscribe to DOM events.`)}}}n.HTMLView=h,h.__name__="HTMLView";class u extends i.Markup{constructor(e){super(e)}static init_HTML(){this.prototype.default_view=h,this.define((({Any:e})=>({events:[e,{}]})))}}n.HTML=u,u.__name__="HTML",u.__module__="panel.models.markup",u.init_HTML()},
|
|
102
|
+
"d92f7d4d2b": function _(e,t,a,r,n){function i(e){let t=null;return e&&(t=function(e){return{boundingClientRect:Object.assign({},e.getBoundingClientRect())}}(e),e.tagName in l&&l[e.tagName].forEach((a=>Object.assign(t,a(e))))),t}r(),a.serializeEvent=
|
|
103
103
|
/*
|
|
104
104
|
The MIT License (MIT)
|
|
105
105
|
|
|
@@ -123,8 +123,8 @@ let o,r;i();const c={fontFamily:'"Helvetica Neue", Helvetica, Arial, sans-serif'
|
|
|
123
123
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
124
124
|
SOFTWARE.
|
|
125
125
|
*/
|
|
126
|
-
function(e){const t={};return e.type in d&&Object.assign(t,d[e.type](e)),t.target=
|
|
127
|
-
"7d45bd3bc4": function _(require,module,exports,__esModule,__esExport){__esModule();const preact_1=require("6f11f2ef27"),hooks_1=require("4c02a9b43f"),preact_2=require("b3f51db71c"),fast_json_patch_1=require("cbecfde9cd"),html_box_1=require("@bokehjs/models/layouts/html_box"),layout_1=require("80a6464b1f"),event_to_object_1=require("
|
|
126
|
+
function(e){const t={};return void 0!==e.detail&&Object.assign(t,{detail:JSON.parse(JSON.stringify(e.detail))}),e.type in d&&Object.assign(t,d[e.type](e)),t.target=i(e.target),t.currentTarget=e.target===e.currentTarget?t.target:i(e.currentTarget),t.relatedTarget=i(e.relatedTarget),t};const o={hasValue:e=>({value:e.value}),hasCurrentTime:e=>({currentTime:e.currentTime}),hasFiles:e=>"file"===(null==e?void 0:e.type)?{files:Array.from(e.files).map((e=>({lastModified:e.lastModified,name:e.name,size:e.size,type:e.type})))}:{}};const s={hasValue:["BUTTON","INPUT","OPTION","LI","METER","PROGRESS","PARAM","SELECT","TEXTAREA"],hasCurrentTime:["AUDIO","VIDEO"],hasFiles:["INPUT"]},l={};Object.keys(s).forEach((e=>{s[e].forEach((t=>{(l[t]||(l[t]=[])).push(o[e])}))}));class c{clipboard(e){return{clipboardData:e.clipboardData}}composition(e){return{data:e.data}}keyboard(e){return{altKey:e.altKey,charCode:e.charCode,ctrlKey:e.ctrlKey,key:e.key,keyCode:e.keyCode,locale:e.locale,location:e.location,metaKey:e.metaKey,repeat:e.repeat,shiftKey:e.shiftKey,which:e.which}}mouse(e){return{altKey:e.altKey,button:e.button,buttons:e.buttons,clientX:e.clientX,clientY:e.clientY,ctrlKey:e.ctrlKey,metaKey:e.metaKey,pageX:e.pageX,pageY:e.pageY,screenX:e.screenX,screenY:e.screenY,shiftKey:e.shiftKey}}pointer(e){return Object.assign(Object.assign({},this.mouse(e)),{pointerId:e.pointerId,width:e.width,height:e.height,pressure:e.pressure,tiltX:e.tiltX,tiltY:e.tiltY,pointerType:e.pointerType,isPrimary:e.isPrimary})}selection(){return{selectedText:window.getSelection().toString()}}touch(e){return{altKey:e.altKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,shiftKey:e.shiftKey}}ui(e){return{detail:e.detail}}wheel(e){return{deltaMode:e.deltaMode,deltaX:e.deltaX,deltaY:e.deltaY,deltaZ:e.deltaZ}}animation(e){return{animationName:e.animationName,pseudoElement:e.pseudoElement,elapsedTime:e.elapsedTime}}transition(e){return{propertyName:e.propertyName,pseudoElement:e.pseudoElement,elapsedTime:e.elapsedTime}}}c.__name__="EventTransformCategories";const u={clipboard:["copy","cut","paste"],composition:["compositionend","compositionstart","compositionupdate"],keyboard:["keydown","keypress","keyup"],mouse:["click","contextmenu","doubleclick","drag","dragend","dragenter","dragexit","dragleave","dragover","dragstart","drop","mousedown","mouseenter","mouseleave","mousemove","mouseout","mouseover","mouseup"],pointer:["pointerdown","pointermove","pointerup","pointercancel","gotpointercapture","lostpointercapture","pointerenter","pointerleave","pointerover","pointerout"],selection:["select"],touch:["touchcancel","touchend","touchmove","touchstart"],ui:["scroll"],wheel:["wheel"],animation:["animationstart","animationend","animationiteration"],transition:["transitionend"]},d={},p=new c;Object.keys(u).forEach((e=>{u[e].forEach((t=>{d[t]=p[e]}))}))},
|
|
127
|
+
"7d45bd3bc4": function _(require,module,exports,__esModule,__esExport){__esModule();const preact_1=require("6f11f2ef27"),hooks_1=require("4c02a9b43f"),preact_2=require("b3f51db71c"),fast_json_patch_1=require("cbecfde9cd"),html_box_1=require("@bokehjs/models/layouts/html_box"),layout_1=require("80a6464b1f"),event_to_object_1=require("d92f7d4d2b"),LayoutConfigContext=(0,preact_1.createContext)({});function mountLayout(e,t,o,n){(0,preact_1.render)(preact_2.html`
|
|
128
128
|
<${Layout}
|
|
129
129
|
saveUpdateHook=${t}
|
|
130
130
|
sendEvent=${o}
|
|
@@ -166,12 +166,12 @@ var i,f=this&&this.__extends||(i=function(r,e){return i=Object.setPrototypeOf||{
|
|
|
166
166
|
"0c52a301f3": function _(e,o,t,i,h){i();const a=e("@bokehjs/core/view"),s=e("@bokehjs/model");class n extends a.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)}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=n,n.__name__="LocationView";class l extends s.Model{constructor(e){super(e)}static init_Location(){this.prototype.default_view=n,this.define((({Boolean:e,String:o})=>({href:[o,""],hostname:[o,""],pathname:[o,""],protocol:[o,""],port:[o,""],search:[o,""],hash:[o,""],reload:[e,!1]})))}}t.Location=l,l.__name__="Location",l.__module__="panel.models.location",l.init_Location()},
|
|
167
167
|
"0c21036737": function _(e,t,a,i,s){i();const h=e("@bokehjs/models/widgets/markup"),_=e("80a6464b1f");class n extends _.PanelMarkupView{initialize(){super.initialize(),this._hub=window.MathJax.Hub,this._hub.Config({tex2jax:{inlineMath:[["$","$"],["\\(","\\)"]]}})}render(){super.render(),this._hub&&(this.markup_el.innerHTML=this.model.text,this._hub.Queue(["Typeset",this._hub,this.markup_el]))}}a.MathJaxView=n,n.__name__="MathJaxView";class u extends h.Markup{constructor(e){super(e)}static init_MathJax(){this.prototype.default_view=n}}a.MathJax=u,u.__name__="MathJax",u.__module__="panel.models.mathjax",u.init_MathJax()},
|
|
168
168
|
"4ae96bd77b": function _(e,t,s,i,n){i();const l=e("@bokehjs/models/layouts/html_box"),o=e("@bokehjs/core/dom"),r=e("@bokehjs/models/sources/column_data_source"),a=e("80a6464b1f"),c={"material-dark":"Material Dark",material:"Material Light","material-dense":"Material Light","material-dense-dark":"Material Dark",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 _=p(h),d=p(c);class m extends a.PanelHTMLBoxView{constructor(){super(...arguments),this._updating=!1,this._config_listener=null,this._current_config=null,this._event_listener=null,this._loaded=!1}connect_signals(){super.connect_signals(),this.connect(this.model.source.properties.data.change,(()=>this.setData())),this.connect(this.model.properties.toggle_config.change,(()=>{this.perspective_element.toggleConfig(),this.fix_layout()})),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:c[this.model.theme]}).catch((()=>{}))})),null!=this.model.document&&(this._event_listener=e=>this.on_event(e),this.model.document.on_change(this._event_listener))}disconnect_signals(){null!=this._config_listener&&this.perspective_element.removeEventListener("perspective-config-update",this._config_listener),this._config_listener=null,null!=this.model.document&&null!=this._event_listener&&this.model.document.remove_on_change(this._event_listener),this._event_listener=null,super.disconnect_signals()}async render(){super.render(),this.worker=window.perspective.worker(),this.table=await this.worker.table(this.model.schema),this.table.update(this.data);const e=(0,o.div)({class:"pnx-perspective-viewer",style:{zIndex:0}});(0,a.set_size)(e,this.model),e.innerHTML="<perspective-viewer style='height:100%; width:100%;'></perspective-viewer>",this.perspective_element=e.children[0],this.perspective_element.resetThemes([...Object.values(c)]).catch((()=>{})),(0,a.set_size)(this.perspective_element,this.model),this.el.appendChild(e),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:c[this.model.theme]}).catch((()=>{})),this._config_listener=()=>this.sync_config(),this._current_config=await this.perspective_element.save(),this.model.toggle_config&&this.perspective_element.toggleConfig(),this.perspective_element.addEventListener("perspective-config-update",this._config_listener),this._loaded=!0,this.fix_layout()}fix_layout(){this.update_layout(),this.compute_layout(),this.invalidate_layout()}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=_[i]:"theme"===s&&(i=d[i]),t[s]=i)}this._updating=!0,this.model.setv(t),this._updating=!1})),!0}on_event(e){null!=(e=e.hint)&&null!=e.column_source&&e.column_source.id==this.model.source.id&&(void 0!==e.rollover?this.stream(e.data,e.rollover):void 0!==e.patches&&this.patch(e.patches))}get data(){const e={};for(const t of this.model.source.columns())e[t]=this.model.source.get_array(t);return e}stream(e,t){this._loaded&&(null==t?this.table.update(e):this.table.replace(this.data))}patch(e){this.table.replace(this.data)}setData(){this._loaded&&this.table.load(this.data)}}s.PerspectiveView=m,m.__name__="PerspectiveView";class g extends l.HTMLBox{constructor(e){super(e)}static init_Perspective(){this.prototype.default_view=m,this.define((({Any:e,Array:t,Boolean:s,Ref:i,Nullable:n,String:l})=>({aggregates:[e],columns:[t(n(l))],expressions:[n(t(l))],split_by:[n(t(l))],editable:[n(s)],filters:[n(t(e))],group_by:[n(t(l))],plugin:[l],plugin_config:[e],selectable:[n(s)],schema:[e,{}],toggle_config:[s,!0],sort:[n(t(t(l)))],source:[i(r.ColumnDataSource)],theme:[l]})))}}s.Perspective=g,g.__name__="Perspective",g.__module__="panel.models.perspective",g.init_Perspective()},
|
|
169
|
-
"
|
|
169
|
+
"588a5ae70d": function _(e,t,i,s,o){s();const l=e("@bokehjs/core/kinds"),n=e("@bokehjs/core/dom"),a=e("@bokehjs/models/widgets/widget");function r(e){e.forEach((e=>e.style.borderStyle="inset"))}function d(e){e.forEach((e=>e.style.borderStyle="outset"))}class h extends a.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,n.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,n.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 a=document.createElement("button");a.style.cssText=i,a.appendChild(document.createTextNode("\u25c0")),a.onclick=()=>this.reverse_animation(),e.appendChild(a);const h=document.createElement("button");h.style.cssText=i,h.appendChild(document.createTextNode("\u275a\u275a")),h.onclick=()=>this.pause_animation(),e.appendChild(h);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=()=>{d([h,c]),r([a])},this._toogle_pause=()=>{d([a,c]),r([h])},this._toggle_play=()=>{d([a,h]),r([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 y=document.createElement("label");y.innerHTML="Reflect",y.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(y),this.groupEl.appendChild(this.sliderEl),this.groupEl.appendChild(e),this.model.show_loop_controls&&this.groupEl.appendChild(this.loop_state),this.toggle_disable(),this.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=h,h.__name__="PlayerView",i.LoopPolicy=(0,l.Enum)("once","loop","reflect");class c extends a.Widget{constructor(e){super(e)}static init_Player(){this.prototype.default_view=h,this.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]}))),this.override({width:400})}}i.Player=c,c.__name__="Player",c.__module__="panel.models.widgets",c.init_Player()},
|
|
170
170
|
"42de27e56c": function _(t,e,o,i,l){i();const s=t("@bokehjs/core/dom"),r=t("@bokehjs/core/util/object"),a=t("@bokehjs/core/util/eq"),n=t("@bokehjs/models/layouts/html_box"),p=t("@bokehjs/models/sources/column_data_source"),_=t("99a25e6992"),h=t("990b5dd5c7"),u=t("80a6464b1f"),d=(t,e,o)=>{let i=Array.isArray(e)?[]:{};if("click"===o||"hover"===o||"selected"===o){const o=[];if(null==e)return null;const l=t.data;for(let t=0;t<e.points.length;t++){const i=e.points[t];let s={};for(let t in i){const e=i[t];!i.hasOwnProperty(t)||Array.isArray(e)||(0,h.isPlainObject)(e)||(s[t]=e)}null!=i&&(i.hasOwnProperty("curveNumber")&&i.hasOwnProperty("pointNumber")&&l[i.curveNumber].hasOwnProperty("customdata")&&(s.customdata=l[i.curveNumber].customdata[i.pointNumber]),i.hasOwnProperty("pointNumbers")&&(s.pointNumbers=i.pointNumbers)),o[t]=s}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 u.PanelHTMLBoxView{constructor(){super(...arguments),this._settingViewport=!1,this._plotInitialized=!1,this._reacting=!1,this._relayouting=!1,this._end_relayouting=(0,_.debounce)((()=>{this._relayouting=!1}),2e3,!1)}initialize(){super.initialize(),this._layout_wrapper=(0,s.div)({style:"height: 100%; width: 100%;"})}connect_signals(){super.connect_signals();const{data:t,data_sources:e,layout:o,relayout:i,restyle:l}=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._layout_wrapper,this.model.relayout),this.model.relayout=null)})),this.on_change([l],(()=>{null!=this.model.restyle&&(window.Plotly.restyle(this._layout_wrapper,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())),this.connect(this.model.properties.visibility.change,(()=>{this.el.style.visibility=this.model.visibility?"visible":"hidden"}))}async render(){super.render(),this.el.style.visibility=this.model.visibility?"visible":"hidden",this.el.appendChild(this._layout_wrapper),await this.plot(),window.Plotly.relayout(this._layout_wrapper,this.model.relayout)}_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,h.deepCopy)(this.model.layout);if(this._relayouting){const{layout:e}=this._layout_wrapper;Object.keys(e).reduce(((e,o)=>{"axis"===o.slice(1,5)&&"range"in e&&(t[o].range=e.range)}),{})}return t}_install_callbacks(){this._layout_wrapper.on("plotly_relayout",(t=>{!0!==t._update_from_property&&(this.model.relayout_data=d(this._layout_wrapper,t,"relayout"),this._updateViewportProperty(),this._end_relayouting())})),this._layout_wrapper.on("plotly_relayouting",(()=>{"mouseup"!==this.model.viewport_update_policy&&(this._relayouting=!0,this._updateViewportProperty())})),this._layout_wrapper.on("plotly_restyle",(t=>{this.model.restyle_data=d(this._layout_wrapper,t,"restyle"),this._updateViewportProperty()})),this._layout_wrapper.on("plotly_click",(t=>{this.model.click_data=d(this._layout_wrapper,t,"click")})),this._layout_wrapper.on("plotly_hover",(t=>{this.model.hover_data=d(this._layout_wrapper,t,"hover")})),this._layout_wrapper.on("plotly_selected",(t=>{this.model.selected_data=d(this._layout_wrapper,t,"selected")})),this._layout_wrapper.on("plotly_clickannotation",(t=>{delete t.event,delete t.fullAnnotation,this.model.clickannotation_data=t})),this._layout_wrapper.on("plotly_deselect",(()=>{this.model.selected_data=null})),this._layout_wrapper.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._layout_wrapper,t)}else await window.Plotly.react(this._layout_wrapper,e,o,this.model.config),null!=this.model.frames&&await window.Plotly.addFrames(this._layout_wrapper,this.model.frames);var i,l;this._updateSetViewportFunction(),this._updateViewportProperty(),this._plotInitialized?(i=this._layout_wrapper,(l=window.getComputedStyle(i).display)&&"none"!==l&&window.Plotly.Plots.resize(this._layout_wrapper)):this._install_callbacks(),this._reacting=!1,this._plotInitialized=!0}after_layout(){super.after_layout(),(0,u.set_size)(this.el,this.model),window.Plotly&&this._plotInitialized&&window.Plotly.Plots.resize(this._layout_wrapper)}_get_trace(t,e){const o=(0,r.clone)(this.model.data[t]),i=this.model.data_sources[t];for(const t of i.columns()){let l=i.get_array(t)[0];if(null!=l.shape&&l.shape.length>1){const t=[],e=l.shape;for(let o=0;o<e[0];o++)t.push(l.slice(o*e[1],(o+1)*e[1]));l=t}let s=t.split("."),r=s[s.length-1],a=o;for(let t of s.slice(0,-1))a=a[t];e&&1==s.length?a[r]=[l]:a[r]=l}return o}_updateViewportFromProperty(){if(!window.Plotly||this._settingViewport||this._reacting||!this.model.viewport)return;const t=this._layout_wrapper._fullLayout;Object.keys(this.model.viewport).reduce(((e,o)=>{if((0,a.isEqual)((0,h.get)(t,o),e))return!0;{let t=(0,h.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._layout_wrapper._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,h.deepCopy)(t[o].range))}(0,a.isEqual)(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,h.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 c extends n.HTMLBox{constructor(t){super(t)}static init_PlotlyPlot(){this.prototype.default_view=y,this.define((({Array:t,Any:e,Boolean:o,Ref:i,String:l,Nullable:s,Number:r})=>({data:[t(e),[]],layout:[e,{}],config:[e,{}],frames:[s(t(e)),null],data_sources:[t(i(p.ColumnDataSource)),[]],relayout:[s(e),{}],restyle:[s(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:[l,"mouseup"],viewport_update_throttle:[r,200],visibility:[o,!0],_render_count:[r,0]})))}}o.PlotlyPlot=c,c.__name__="PlotlyPlot",c.__module__="panel.models.plotly",c.init_PlotlyPlot()},
|
|
171
171
|
"990b5dd5c7": function _(t,n,r,e,o){e();r.get=(t,n,r)=>{const e=r=>String.prototype.split.call(n,r).filter(Boolean).reduce(((t,n)=>null!=t?t[n]:t),t),o=e(/[,[\]]+?/)||e(/[,[\].]+?/);return void 0===o||o===t?r:o},r.throttle=function(t,n){var r=0;return function(){var e=Number(new Date);e-r>=n&&(t(),r=e)}},r.deepCopy=function t(n){var r;if(null==n||"object"!=typeof n)return n;if(n instanceof Array){r=[];for(var e=0,o=n.length;e<o;e++)r[e]=t(n[e]);return r}if(n instanceof Object){const r={};for(const e in n){const o=e;n.hasOwnProperty(o)&&(r[o]=t(n[o]))}return r}throw new Error("Unable to copy obj! Its type isn't supported.")},r.isPlainObject=function(t){return"[object Object]"===Object.prototype.toString.call(t)}},
|
|
172
172
|
"979633320f": function _(e,s,t,i,o){i();const l=e("@bokehjs/models/layouts/html_box"),r=e("80a6464b1f");class h extends l.HTMLBoxView{connect_signals(){super.connect_signals();const e=()=>{this.render(),this.root.compute_layout()};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.style),{display:"inline-block"});this.progressEl=document.createElement("progress"),this.setValue(),this.setMax(),(0,r.set_size)(this.progressEl,this.model),this.setCSS();for(const s in e)this.progressEl.style.setProperty(s,e[s]);this.el.appendChild(this.progressEl)}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"),console.log(this.progressEl)}setMax(){null!=this.model.max&&(this.progressEl.max=this.model.max)}_update_layout(){let e=void 0!==this._prev_sizing_mode&&this._prev_sizing_mode!==this.model.sizing_mode;this._prev_sizing_mode=this.model.sizing_mode,this.layout=new r.CachedVariadicBox(this.el,this.model.sizing_mode,e),this.layout.set_sizing(this.box_sizing())}}t.ProgressView=h,h.__name__="ProgressView";class n extends l.HTMLBox{constructor(e){super(e)}static init_Progress(){this.prototype.default_view=h,this.define((({Any:e,Boolean:s,Number:t,String:i})=>({active:[s,!0],bar_color:[i,"primary"],style:[e,{}],max:[t,100],value:[e,null]})))}}t.Progress=n,n.__name__="Progress",n.__module__="panel.models.widgets",n.init_Progress()},
|
|
173
173
|
"d51a79a0a3": function _(t,e,i,l,o){l();const s=t("@bokehjs/core/dom"),n=t("@bokehjs/models/layouts/html_box"),h=t("80a6464b1f");class a extends h.PanelHTMLBoxView{initialize(){super.initialize(),this._container=(0,s.div)({})}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:t,toolbar:e,placeholder:i}=this.model.properties;this.on_change([i],(()=>{this.quill.root.setAttribute("data-placeholder",this.model.placeholder)})),this.on_change([t,e],(()=>{this.render(),this._layout_toolbar()}))}_layout_toolbar(){if(null==this._toolbar)this.el.style.removeProperty("padding-top");else{const t=this._toolbar.getBoundingClientRect().height+1;this.el.style.paddingTop=t+"px",this._toolbar.style.marginTop=-t+"px"}}render(){super.render(),this.el.appendChild(this._container);const t="bubble"===this.model.mode?"bubble":"snow";this.quill=new window.Quill(this._container,{modules:{toolbar:this.model.toolbar},readOnly:!0,placeholder:this.model.placeholder,theme:t}),this._editor=this.el.querySelector(".ql-editor"),this._toolbar=this.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)}after_layout(){super.after_layout(),this._layout_toolbar()}}i.QuillInputView=a,a.__name__="QuillInputView";class d extends n.HTMLBox{constructor(t){super(t)}static init_QuillInput(){this.prototype.default_view=a,this.define((({Any:t,String:e})=>({mode:[e,"toolbar"],placeholder:[e,""],text:[e,""],toolbar:[t,null]}))),this.override({height:300})}}i.QuillInput=d,d.__name__="QuillInput",d.__module__="panel.models.quill",d.init_QuillInput()},
|
|
174
|
-
"5fad190ca1": function _(e,t,s,n,i){n();const o=e("6f11f2ef27"),l=e("4c02a9b43f"),r=e("b3f51db71c"),c=e("@bokehjs/core/build_views"),a=e("@bokehjs/core/util/types"),d=e("@bokehjs/models/layouts/html_box"),h=e("@bokehjs/core/dom"),_=e("@bokehjs/core/util/color"),u=e("7f7d9e0c6b"),m=e("c4ee233e58"),p=e("3d7593ca5a"),f=e("80a6464b1f");function v(e,t,s){const n={};for(const e of s)n[`{${e}}`]="(.*)";const i=[];let o="^"+(e.replace(/[-\/\\^$*+?.()|[\]]/g,"\\$&")+"$");let l,r,c;for(const t in n)if(r=e.indexOf(t),r>-1){for(o=o.replace(t,n[t]),c={index:r,token:t},l=0;l<i.length&&i[l].index<r;l++);l<i.length?i.splice(l,0,c):i.push(c)}o=o.replace(/\{[^{}]+\}/g,".*");var a=new RegExp(o).exec(t);let d=null;if(a)for(d={},l=0;l<i.length;l++)d[i[l].token.slice(1,-1)]=a[l+1];return d}class g extends f.PanelHTMLBoxView{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,s){for(const n in e.properties){let i;i=s.length?`${s}.${n}`:n;const o=e[n];null!=o&&(null!=o.properties&&this._recursive_connect(o,!0,i),this.connect(e.properties[n].change,(()=>{if(t)for(const t in this.model.children)if(this.model.children[t]==n){let s=e[n];return(0,a.isArray)(s)||(s=[s]),this._render_node(t,s),void this.invalidate_layout()}this._changing||(this._update(i),this.invalidate_layout())})))}}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.invalidate_layout()})),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 s=this.model.scripts[t];let n,i=this.model.data;if(t.indexOf(".")>=0){const e=t.split(".");n=e[e.length-1];for(const t of e.slice(0,-1))i=i[t]}else n=t;for(const o of s){const s=(0,p.htmlDecode)(o)||o,l=this._render_script(s,e);this._script_fns[t]=l;const r=i.properties[n];null!=r&&this.connect(r.change,(()=>{this._changing||this.run_script(t)}))}}}run_script(e,t=!1){const s=this._script_fns[e];if(void 0===s)return void(t||console.log(`Script '${e}' could not be found.`));const n={get_records:(e,t)=>this.get_records(e,t)};for(const e in this._script_fns)n[e]=()=>this.run_script(e);return s(this.model,this.model.data,this._state,this,(e=>this.run_script(e)),n)}get_records(e,t=!0){return(0,u.dict_to_records)(this.model.data[e],t)}disconnect_signals(){super.disconnect_signals(),this._remove_event_listeners(),this._remove_mutation_observers(),this.run_script("remove",!0)}get child_models(){const e=[];for(const t in this.model.children)for(const s of this.model.children[t])"string"!=typeof s&&e.push(s);return e}async build_child_views(){await(0,c.build_views)(this._child_views,this.child_models,{parent:null})}compute_layout(){this.root!=this?super.compute_layout():(this.update_position(),this.after_layout(),this.notify_finished())}after_layout(){for(const e of this.child_views)e.after_layout();this.run_script("after_layout",!0),this._has_finished=!0}update_layout(){for(const e of this.child_views)this._align_view(e),e.compute_viewport(),e.update_layout(),e.compute_layout();this.root!=this&&this._update_layout()}_align_view(e){const{align:t}=e.model;let s,n;(0,a.isArray)(t)?[s,n]=t:s=n=t,"center"===s?(e.el.style.marginLeft="auto",e.el.style.marginRight="auto"):"end"===s&&(e.el.style.marginLeft="auto"),"center"===n?(e.el.style.marginTop="auto",e.el.style.marginBottom="auto"):"end"===n&&(e.el.style.marginTop="auto")}render(){(0,h.empty)(this.el);const{background:e}=this.model;this.el.style.backgroundColor=null!=e?(0,_.color2css)(e):"",(0,h.classes)(this.el).clear().add(...this.css_classes()),this._update(),this._render_children(),this._setup_mutation_observers(),this._setup_event_listeners(),this.run_script("render",!0)}_send_event(e,t,s){let n=(0,m.serializeEvent)(s);n.type=t;for(const e in n)void 0===n[e]&&delete n[e];this.model.trigger_event(new p.DOMEvent(e,n))}_render_child(e,t){const s=this._child_views.get(e);null==s?t.innerHTML=(0,p.htmlDecode)(e)||e:(s._parent=this,s.renderTo(t))}resize_layout(){null!=this._parent&&this._parent.resize_layout(),this.root!=this&&super.resize_layout()}invalidate_layout(){null!=this._parent&&this._parent.invalidate_layout(),this.root!=this&&this.root.has_finished()&&super.invalidate_layout()}update_position(){if(this.root!=this)return void super.update_position();this.el.style.display=this.model.visible?"block":"none",(0,f.set_size)(this.el,this.model);let{margin:e}=this.model,t=null;if(null==e)this.el.style.margin="";else{if((0,a.isNumber)(e))t={top:e,right:e,bottom:e,left:e};else if(2==e.length){const[s,n]=e;t={top:s,right:n,bottom:s,left:n}}else{const[s,n,i,o]=e;t={top:s,right:n,bottom:i,left:o}}const{top:s,right:n,bottom:i,left:o}=t;this.el.style.padding=`${s}px ${n}px ${i}px ${o}px`}for(const e of this.child_views)e.update_position()}_render_node(e,t){const s=this.model.data.id;if(this.model.looped.indexOf(e)>-1)for(let n=0;n<t.length;n++){let i=document.getElementById(`${e}-${n}-${s}`);null!=i?this._render_child(t[n],i):console.warn(`DOM node '${e}-${n}-${s}' could not be found. Cannot render children.`)}else{let n=document.getElementById(`${e}-${s}`);if(null==n)return void console.warn(`DOM node '${e}-${s}' could not be found. Cannot render children.`);for(const e of t)this._render_child(e,n)}}_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 s=e,n="";const i=[];for(const e in this.model.callbacks)for(const t of this.model.callbacks[e]){const[o,l]=t;let r;if(s=s.replaceAll("${"+l+"}","$--{"+l+"}"),l.startsWith("script(")){const e=l.replace("('","_").replace("')","").replace('("',"_").replace('")',"").replace("-","_"),t=e.replaceAll("script_","");s=s.replaceAll(l,e),r=`\n const ${e} = (event) => {\n view._state.event = event\n view.run_script("${t}")\n delete view._state.event\n }\n `}else r=`\n const ${l} = (event) => {\n view._send_event("${e}", "${o}", event)\n }\n `;i.indexOf(l)>-1||(i.push(l),n+=r)}return s=s.replaceAll("${model.","$-{model.").replaceAll("${","${data.").replaceAll("$-{model.","${model.").replaceAll("$--{","${"),new Function("view, model, data, state, html, useCallback",n+"return html`"+s+"`;")(this,this.model,this.model.data,t,r.html,l.useCallback)}_render_script(e,t){const s=[];for(const n of this.model.nodes){const i=n.replace("-","_");if(-1===e.indexOf(i))continue;const o=`\n const ${i} = document.getElementById('${n}-${t}')\n if (${i} == null) {\n console.warn("DOM node '${n}' could not be found. Cannot execute callback.")\n return\n }\n `;s.push(o)}return s.push("\n if (state.event !== undefined) {\n const event = state.event\n }\n "),s.push(e),new Function("model, data, state, view, script, self",s.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 s=document.getElementById(`${t}-${e}`);if(null==s){console.warn(`DOM node '${t}-${e}' could not be found. Cannot set up MutationObserver.`);continue}const n=new MutationObserver((()=>{this._update_model(s,t)}));n.observe(s,{attributes:!0}),this._mutation_observers.push(n)}}_remove_event_listeners(){const e=this.model.data.id;for(const t in this._event_listeners){const s=document.getElementById(`${t}-${e}`);if(null!=s)for(const e in this._event_listeners[t]){const n=this._event_listeners[t][e];s.removeEventListener(e,n)}}this._event_listeners={}}_setup_event_listeners(){const e=this.model.data.id;for(const t in this.model.events){const s=document.getElementById(`${t}-${e}`);if(null==s){console.warn(`DOM node '${t}-${e}' could not be found. Cannot subscribe to DOM events.`);continue}const n=this.model.events[t];for(const e in n){const i=i=>{this._send_event(t,e,i),t in this.model.attrs&&n[e]&&this._update_model(s,t)};s.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);try{this._changing=!0,(0,o.render)(e,this.el)}finally{this._changing=!1}}}_update_model(e,t){if(this._changing)return;const s={};for(const n of this.model.attrs[t]){const[i,o,l]=n;let r="children"===i?e.innerHTML:e[i];if(1===o.length&&`{${o[0]}}`===l)s[o[0]]=r;else if("string"==typeof r)if(r=v(l,r,o),null==r)console.warn(`Could not resolve parameters in ${t} element ${i} attribute value ${r}.`);else for(const e in r)void 0===r[e]?console.warn(`Could not resolve ${e} in ${t} element ${i} attribute value ${r}.`):s[e]=r[e]}try{this._changing=!0,this.model.data.setv(function(e){const t={};for(const s in e){let n=e[s];"string"!=typeof n?n=n:""===n||"NaN"!==n&&isNaN(Number(n))?"false"!==n&&"true"!==n||(n="true"===n):n=Number(n),t[s]=n}return t}(s))}catch(e){console.log("Could not serialize",s)}finally{this._changing=!1}}}s.ReactiveHTMLView=g,g.__name__="ReactiveHTMLView";class $ extends d.HTMLBox{constructor(e){super(e)}static init_ReactiveHTML(){this.prototype.default_view=g,this.define((({Array:e,Any:t,String:s})=>({attrs:[t,{}],callbacks:[t,{}],children:[t,{}],data:[t],events:[t,{}],html:[s,""],looped:[e(s),[]],nodes:[e(s),[]],scripts:[t,{}]})))}}s.ReactiveHTML=$,$.__name__="ReactiveHTML",$.__module__="panel.models.reactive_html",$.init_ReactiveHTML()},
|
|
174
|
+
"ad426de39c": function _(e,t,n,s,i){s();const o=e("6f11f2ef27"),l=e("4c02a9b43f"),r=e("b3f51db71c"),c=e("@bokehjs/core/build_views"),a=e("@bokehjs/core/util/types"),d=e("@bokehjs/models/layouts/html_box"),h=e("@bokehjs/core/dom"),_=e("@bokehjs/core/util/color"),u=e("7f7d9e0c6b"),p=e("d92f7d4d2b"),m=e("3d7593ca5a"),f=e("80a6464b1f");function v(e,t,n){const s={};for(const e of n)s[`{${e}}`]="(.*)";const i=[];let o="^"+(e.replace(/[-\/\\^$*+?.()|[\]]/g,"\\$&")+"$");let l,r,c;for(const t in s)if(r=e.indexOf(t),r>-1){for(o=o.replace(t,s[t]),c={index:r,token:t},l=0;l<i.length&&i[l].index<r;l++);l<i.length?i.splice(l,0,c):i.push(c)}o=o.replace(/\{[^{}]+\}/g,".*");var a=new RegExp(o).exec(t);let d=null;if(a)for(d={},l=0;l<i.length;l++)d[i[l].token.slice(1,-1)]=a[l+1];return d}class g extends f.PanelHTMLBoxView{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,m.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]),this._render_node(t,n),void this.invalidate_layout()}this._changing||(this._update(i),this.invalidate_layout())})))}}connect_signals(){super.connect_signals(),this.connect(this.model.properties.children.change,(async()=>{this.html=(0,m.htmlDecode)(this.model.html)||this.model.html,await this.rebuild(),this.invalidate_layout()})),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,m.htmlDecode)(o)||o,l=this._render_script(n,e);this._script_fns[t]=l;const r=i.properties[s];null!=r&&this.connect(r.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,u.dict_to_records)(this.model.data[e],t)}disconnect_signals(){super.disconnect_signals(),this._remove_event_listeners(),this._remove_mutation_observers(),this.run_script("remove",!0)}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(){await(0,c.build_views)(this._child_views,this.child_models,{parent:null})}compute_layout(){this.root!=this?super.compute_layout():(this.update_position(),this.after_layout(),this.notify_finished())}after_layout(){for(const e of this.child_views)e.after_layout();this.run_script("after_layout",!0),this._has_finished=!0}update_layout(){for(const e of this.child_views)this._align_view(e),e.compute_viewport(),e.update_layout(),e.compute_layout();this.root!=this&&this._update_layout()}_align_view(e){const{align:t}=e.model;let n,s;(0,a.isArray)(t)?[n,s]=t:n=s=t,"center"===n?(e.el.style.marginLeft="auto",e.el.style.marginRight="auto"):"end"===n&&(e.el.style.marginLeft="auto"),"center"===s?(e.el.style.marginTop="auto",e.el.style.marginBottom="auto"):"end"===s&&(e.el.style.marginTop="auto")}render(){(0,h.empty)(this.el);const{background:e}=this.model;this.el.style.backgroundColor=null!=e?(0,_.color2css)(e):"",(0,h.classes)(this.el).clear().add(...this.css_classes()),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,p.serializeEvent)(n);s.type=t;for(const e in s)void 0===s[e]&&delete s[e];this.model.trigger_event(new m.DOMEvent(e,s))}_render_child(e,t){const n=this._child_views.get(e);null==n?t.innerHTML=(0,m.htmlDecode)(e)||e:(n._parent=this,n.renderTo(t))}resize_layout(){null!=this._parent&&this._parent.resize_layout(),this.root!=this&&super.resize_layout()}invalidate_layout(){null!=this._parent&&this._parent.invalidate_layout(),this.root!=this&&this.root.has_finished()&&super.invalidate_layout()}update_position(){if(this.root!=this)return void super.update_position();this.el.style.display=this.model.visible?"block":"none",(0,f.set_size)(this.el,this.model);let{margin:e}=this.model,t=null;if(null==e)this.el.style.margin="";else{if((0,a.isNumber)(e))t={top:e,right:e,bottom:e,left:e};else if(2==e.length){const[n,s]=e;t={top:n,right:s,bottom:n,left:s}}else{const[n,s,i,o]=e;t={top:n,right:s,bottom:i,left:o}}const{top:n,right:s,bottom:i,left:o}=t;this.el.style.padding=`${n}px ${s}px ${i}px ${o}px`}for(const e of this.child_views)e.update_position()}_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++){let i=document.getElementById(`${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{let s=document.getElementById(`${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,l]=t;let r;if(n=n.replaceAll("${"+l+"}","$--{"+l+"}"),l.startsWith("script(")){const e=l.replace("('","_").replace("')","").replace('("',"_").replace('")',"").replace("-","_"),t=e.replaceAll("script_","");n=n.replaceAll(l,e),r=`\n const ${e} = (event) => {\n view._state.event = event\n view.run_script("${t}")\n delete view._state.event\n }\n `}else r=`\n const ${l} = (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(l)>-1||(i.push(l),s+=r)}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,r.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 const ${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 if (state.event !== undefined) {\n const 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=document.getElementById(`${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=document.getElementById(`${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=document.getElementById(`${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);try{this._changing=!0,(0,o.render)(e,this.el)}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,l]=s;let r="children"===i?e.innerHTML:e[i];if(1===o.length&&`{${o[0]}}`===l)n[o[0]]=r;else if("string"==typeof r)if(r=v(l,r,o),null==r)console.warn(`Could not resolve parameters in ${t} element ${i} attribute value ${r}.`);else for(const e in r)void 0===r[e]?console.warn(`Could not resolve ${e} in ${t} element ${i} attribute value ${r}.`):n[e]=r[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=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=g,g.__name__="ReactiveHTMLView";class $ extends d.HTMLBox{constructor(e){super(e)}static init_ReactiveHTML(){this.prototype.default_view=g,this.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,{}]})))}}n.ReactiveHTML=$,$.__name__="ReactiveHTML",$.__module__="panel.models.reactive_html",$.init_ReactiveHTML()},
|
|
175
175
|
"ab54efe08a": function _(e,t,s,i,n){i();const l=e("tslib"),o=e("@bokehjs/core/dom"),c=e("@bokehjs/core/util/types"),r=e("@bokehjs/models/widgets/input_widget"),d=(0,l.__importStar)(e("@bokehjs/styles/widgets/inputs.css"));class h extends r.InputWidgetView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.value.change,(()=>this.render_selection())),this.connect(this.model.properties.options.change,(()=>this.render())),this.connect(this.model.properties.disabled_options.change,(()=>this.render())),this.connect(this.model.properties.name.change,(()=>this.render())),this.connect(this.model.properties.title.change,(()=>this.render())),this.connect(this.model.properties.size.change,(()=>this.render())),this.connect(this.model.properties.disabled.change,(()=>this.render()))}render(){super.render();const e=this.model.options.map((e=>{let t,s;(0,c.isString)(e)?t=s=e:[t,s]=e;let i=this.model.disabled_options.includes(t);return(0,o.option)({value:t,disabled:i},s)}));this.select_el=(0,o.select)({multiple:!1,class:d.input,name:this.model.name,disabled:this.model.disabled},e),this.select_el.style.backgroundImage="none",this.select_el.addEventListener("change",(()=>this.change_input())),this.group_el.appendChild(this.select_el),this.render_selection()}render_selection(){const e=this.model.value;for(const t of this.el.querySelectorAll("option"))t.value===e&&(t.selected=!0);this.select_el.size=this.model.size}change_input(){const e=null!=this.el.querySelector("select:focus");let t=null;for(const e of this.el.querySelectorAll("option"))if(e.selected){t=e.value;break}this.model.value=t,super.change_input(),e&&this.select_el.focus()}}s.SingleSelectView=h,h.__name__="SingleSelectView";class a extends r.InputWidget{constructor(e){super(e)}static init_SingleSelect(){this.prototype.default_view=h,this.define((({Any:e,Array:t,Int:s,String:i})=>({disabled_options:[t(i),[]],options:[t(e),[]],size:[s,4],value:[i,""]})))}}s.SingleSelect=a,a.__name__="SingleSelect",a.__module__="panel.models.widgets",a.init_SingleSelect()},
|
|
176
176
|
"a96be0bcc9": function _(t,e,i,o,n){o();const s=t("@bokehjs/models/layouts/html_box"),r="Click to START the speech recognition.",{webkitSpeechRecognition:h}=window,{webkitSpeechGrammarList:l}=window;class a extends s.HTMLBoxView{initialize(){var t,e;super.initialize(),this.recognition=new h,this.recognition.lang=this.model.lang,this.recognition.continuous=this.model.continuous,this.recognition.interimResults=this.model.interim_results,this.recognition.maxAlternatives=this.model.max_alternatives,this.recognition.serviceURI=this.model.service_uri,this.setGrammars(),this.recognition.onresult=t=>{this.model.results=function(t){const e=[];for(let o of t){let t=[],n={is_final:o.isFinal,alternatives:t};for(let e=0;e<o.length;e++){let n={confidence:(i=o[e].confidence,Math.round(100*(i+Number.EPSILON))/100),transcript:o[e].transcript};t.push(n)}n.alternatives=t,e.push(n)}var i;return e}(t.results)},this.recognition.onerror=t=>{console.log("SpeechToText Error"),console.log(t)},this.recognition.onnomatch=t=>{console.log("SpeechToText No Match"),console.log(t)},this.recognition.onaudiostart=()=>this.model.audio_started=!0,this.recognition.onaudioend=()=>this.model.audio_started=!1,this.recognition.onsoundstart=()=>this.model.sound_started=!0,this.recognition.onsoundend=()=>this.model.sound_started=!1,this.recognition.onspeechstart=()=>this.model.speech_started=!0,this.recognition.onspeechend=()=>this.model.speech_started=!1,this.recognition.onstart=()=>{this.buttonEl.onclick=()=>{this.recognition.stop()},this.buttonEl.innerHTML=this.iconStarted(),this.buttonEl.setAttribute("title","Click to STOP the speech recognition."),this.model.started=!0},this.recognition.onend=()=>{this.buttonEl.onclick=()=>{this.recognition.start()},this.buttonEl.innerHTML=this.iconNotStarted(),this.buttonEl.setAttribute("title",r),this.model.started=!1},this.buttonEl=(t=`<button class="bk bk-btn bk-btn-${this.model.button_type}" type="button" title="${r}"></button>`,e=document.createElement("template"),t=t.trim(),e.innerHTML=t,e.content.firstChild),this.buttonEl.innerHTML=this.iconNotStarted(),this.buttonEl.onclick=()=>this.recognition.start()}iconStarted(){return""!==this.model.button_started?this.model.button_started:'<svg xmlns="http://www.w3.org/2000/svg" height="22px" style="vertical-align: middle;" fill="currentColor" class="bi bi-mic" viewBox="0 0 16 16">\n <path fill-rule="evenodd" d="M3.5 6.5A.5.5 0 0 1 4 7v1a4 4 0 0 0 8 0V7a.5.5 0 0 1 1 0v1a5 5 0 0 1-4.5 4.975V15h3a.5.5 0 0 1 0 1h-7a.5.5 0 0 1 0-1h3v-2.025A5 5 0 0 1 3 8V7a.5.5 0 0 1 .5-.5z"/>\n <path fill-rule="evenodd" d="M10 8V3a2 2 0 1 0-4 0v5a2 2 0 1 0 4 0zM8 0a3 3 0 0 0-3 3v5a3 3 0 0 0 6 0V3a3 3 0 0 0-3-3z"/>\n</svg>'}iconNotStarted(){return""!==this.model.button_not_started?this.model.button_not_started:'<svg xmlns="http://www.w3.org/2000/svg" height="22px" style="vertical-align: middle;" fill="currentColor" class="bi bi-mic-mute" viewBox="0 0 16 16">\n<path fill-rule="evenodd" d="M12.734 9.613A4.995 4.995 0 0 0 13 8V7a.5.5 0 0 0-1 0v1c0 .274-.027.54-.08.799l.814.814zm-2.522 1.72A4 4 0 0 1 4 8V7a.5.5 0 0 0-1 0v1a5 5 0 0 0 4.5 4.975V15h-3a.5.5 0 0 0 0 1h7a.5.5 0 0 0 0-1h-3v-2.025a4.973 4.973 0 0 0 2.43-.923l-.718-.719zM11 7.88V3a3 3 0 0 0-5.842-.963l.845.845A2 2 0 0 1 10 3v3.879l1 1zM8.738 9.86l.748.748A3 3 0 0 1 5 8V6.121l1 1V8a2 2 0 0 0 2.738 1.86zm4.908 3.494l-12-12 .708-.708 12 12-.708.707z"/>\n</svg>'}setIcon(){this.model.started?this.buttonEl.innerHTML=this.iconStarted():this.buttonEl.innerHTML=this.iconNotStarted()}connect_signals(){super.connect_signals(),this.connect(this.model.properties.start.change,(()=>{this.model.start=!1,this.recognition.start()})),this.connect(this.model.properties.stop.change,(()=>{this.model.stop=!1,this.recognition.stop()})),this.connect(this.model.properties.abort.change,(()=>{this.model.abort=!1,this.recognition.abort()})),this.connect(this.model.properties.grammars.change,(()=>this.setGrammars())),this.connect(this.model.properties.lang.change,(()=>this.recognition.lang=this.model.lang)),this.connect(this.model.properties.continuous.change,(()=>this.recognition.continuous=this.model.continuous)),this.connect(this.model.properties.interim_results.change,(()=>this.recognition.interimResults=this.model.interim_results)),this.connect(this.model.properties.max_alternatives.change,(()=>this.recognition.maxAlternatives=this.model.max_alternatives)),this.connect(this.model.properties.service_uri.change,(()=>this.recognition.serviceURI=this.model.service_uri)),this.connect(this.model.properties.button_type.change,(()=>this.buttonEl.className=`bk bk-btn bk-btn-${this.model.button_type}`)),this.connect(this.model.properties.button_hide.change,(()=>this.render()));const{button_not_started:t,button_started:e}=this.model.properties;this.on_change([t,e],(()=>this.setIcon()))}setGrammars(){this.recognition.grammars=function(t){if(t){var e=new l;for(let i of t)i.src?e.addFromString(i.src,i.weight):i.uri&&e.addFromURI(i.uri,i.weight);return e}return null}(this.model.grammars)}render(){super.render(),this.model.button_hide||this.el.appendChild(this.buttonEl)}}i.SpeechToTextView=a,a.__name__="SpeechToTextView";class c extends s.HTMLBox{constructor(t){super(t)}static init_SpeechToText(){this.prototype.default_view=a,this.define((({Array:t,Boolean:e,Number:i,String:o})=>({start:[e,!1],stop:[e,!1],abort:[e,!1],grammars:[t(o),[]],lang:[o,""],continuous:[e,!1],interim_results:[e,!1],max_alternatives:[i,1],service_uri:[o],started:[e,!1],audio_started:[e,!1],sound_started:[e,!1],speech_started:[e,!1],button_type:[o,"light"],button_hide:[e,!1],button_not_started:[o,""],button_started:[o,""],results:[t(o),[]]})))}}i.SpeechToText=c,c.__name__="SpeechToText",c.__module__="panel.models.speech_to_text",c.init_SpeechToText()},
|
|
177
177
|
"bfa46a5f19": function _(e,t,s,a,i){a();const o=e("@bokehjs/core/view"),c=e("@bokehjs/core/util/array"),n=e("@bokehjs/model"),h=e("@bokehjs/protocol/receiver");class _ extends o.View{renderTo(){}}s.StateView=_,_.__name__="StateView";class r extends n.Model{constructor(e){super(e),this._receiver=new h.Receiver,this._cache={}}apply_state(e){this._receiver.consume(e.header),this._receiver.consume(e.metadata),this._receiver.consume(e.content),this._receiver.message&&this.document&&this.document.apply_json_patch(this._receiver.message.content)}_receive_json(e,t){const s=JSON.parse(e);this._cache[t]=s;let a=this.state;for(const e of this.values)a=a[e];a===t?this.apply_state(s):this._cache[a]&&this.apply_state(this._cache[a])}set_state(e,t){let s=(0,c.copy)(this.values);s[this.widgets[e.id]]=t;let a=this.state;for(const e of s)a=a[e];var i,o,n;this.values=s,this.json?this._cache[a]?this.apply_state(this._cache[a]):(i=a,o=e=>this._receive_json(e,a),(n=new XMLHttpRequest).overrideMimeType("application/json"),n.open("GET",i,!0),n.onreadystatechange=function(){4==n.readyState&&200==n.status&&o(n.responseText)},n.send(null)):this.apply_state(a)}static init_State(){this.prototype.default_view=_,this.define((({Any:e,Boolean:t})=>({json:[t,!1],state:[e,{}],widgets:[e,{}],values:[e,[]]})))}}s.State=r,r.__name__="State",r.__module__="panel.models.state",r.init_State()},
|
|
@@ -202,4 +202,4 @@ var i,f=this&&this.__extends||(i=function(r,e){return i=Object.setPrototypeOf||{
|
|
|
202
202
|
"7785475bdd": function _(e,t,i,s,n){s();const r=e("e13c143c7d"),o=e("993f3118b2");class a extends r.AbstractVTKView{connect_signals(){super.connect_signals(),this.connect(this.model.properties.data.change,(()=>{this._vtk_image_data=(0,o.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.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,o.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.model.camera?this._set_camera_state():this._vtk_renwin.getRenderer().resetCamera(),this._get_camera_state()}invalidate_render(){this._vtk_renwin=null,super.invalidate_render()}init_vtk_renwin(){this._vtk_renwin=o.vtkns.FullScreenRenderWindow.newInstance({rootContainer:this.el,container:this._vtk_container})}plot(){this._controllerWidget=o.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,o.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,o.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=o.vtkns.ImageSlice.newInstance(),i=o.vtkns.ImageSlice.newInstance(),s=o.vtkns.ImageSlice.newInstance(),n=o.vtkns.ImageMapper.newInstance(),r=o.vtkns.ImageMapper.newInstance(),a=o.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),a.setInputData(e),a.setKSlice(this.model.slice_k),s.setMapper(a);const l=o.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 _=t.getProperty();i.setProperty(_),s.setProperty(_),_.setRGBTransferFunction(d),_.setScalarOpacity(l);const h=this._vtk_renwin.getRenderer();h.addActor(t),h.addActor(i),h.addActor(s)}_plot_volume(){const e=this.vtk_image_data,t=o.vtkns.Volume.newInstance(),i=o.vtkns.VolumeMapper.newInstance();t.setMapper(i),i.setInputData(e);const s=(e.getPointData().getScalars()||e.getPointData().getArrays()[0]).getRange(),n=o.vtkns.ColorTransferFunction.newInstance();n.onModified((()=>this.model.mapper=(0,o.vtkLutToMapper)(n)));const r=o.vtkns.PiecewiseFunction.newInstance(),a=.7*Math.sqrt(e.getSpacing().map((e=>e*e)).reduce(((e,t)=>e+t),0));i.setSampleDistance(a),t.getProperty().setRGBTransferFunction(0,n),t.getProperty().setScalarOpacity(0,r),t.getProperty().setInterpolationTypeToFastLinear(),t.getProperty().setScalarOpacityUnitDistance(0,o.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=a,a.__name__="VTKVolumePlotView";class l extends r.AbstractVTKPlot{constructor(e){super(e)}static init_VTKVolumePlot(){this.prototype.default_view=a,this.define((({Any:e,Array:t,Boolean:i,Int:s,Number:n,String:r,Struct:a})=>({ambient:[n,.2],colormap:[r],data:[e],diffuse:[n,.7],display_slices:[i,!1],display_volume:[i,!0],edge_gradient:[n,.2],interpolation:[o.Interpolation,"fast_linear"],mapper:[a({palette:t(r),low:n,high:n})],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]})))}}i.VTKVolumePlot=l,l.__name__="VTKVolumePlot",l.init_VTKVolumePlot()},
|
|
203
203
|
"0a57062475": function _(e,t,n,s,i){s();const r=e("@bokehjs/core/util/object"),o=e("e13c143c7d"),_=e("877619fe71"),a=e("993f3118b2"),c="panel";class h extends o.AbstractVTKView{initialize(){super.initialize(),this._promises=[],this._renderable=!1,this._arrays={},this._decoded_arrays={},this._pending_arrays={},this.registerArray=(e,t)=>(this._arrays[e]=t,this._pending_arrays[e]&&this._pending_arrays[e].resolve(t),!0),this._synchronizer_context=a.vtkns.SynchronizableRenderWindow.getSynchronizerContext(c)}connect_signals(){super.connect_signals(),this.connect(this.model.properties.arrays.change,(()=>this._decode_arrays())),this.connect(this.model.properties.scene.change,(()=>{if(this.model.rebuild)this._vtk_renwin=null,this.invalidate_render();else{const e=(0,r.clone)(this.model.scene);Promise.all(this._promises).then((()=>{this._sync_plot(e,(()=>{this._on_scene_ready()}))}))}})),this.connect(this.model.properties.one_time_reset.change,(()=>{this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters()}))}init_vtk_renwin(){this._vtk_renwin=a.vtkns.FullScreenRenderWindowSynchronized.newInstance({rootContainer:this.el,container:this._vtk_container,synchronizerContext:this._synchronizer_context})}plot(){this._vtk_renwin.getRenderWindow().clearOneTimeUpdaters(),this._decode_arrays();const e=(0,r.clone)(this.model.scene);Promise.all(this._promises).then((()=>{this._sync_plot(e,(()=>this._on_scene_ready())).then((()=>{this._set_camera_state(),this._get_camera_state()}))}))}_decode_arrays(){const e=new a.vtkns.ThirdParty.JSZip,t=this.model.arrays,n=this.registerArray,s=this.model.arrays_processed,i=this.model;Object.keys(t).forEach((r=>{this._decoded_arrays[r]||(this._decoded_arrays[r]=!0,this._promises.push(function(r){return e.loadAsync(atob(t[r])).then((e=>e.file("data/"+r))).then((e=>e.async("arraybuffer"))).then((e=>n(r,e))).then((()=>{s.push(r),i.properties.arrays_processed.change.emit()}))}(r)))}))}_on_scene_ready(){this._promises.length>0||(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._promises=[],this._unsubscribe_camera_cb(),this._synchronizer_context.setFetchArrayFunction((e=>Promise.resolve(this._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=h,h.__name__="VTKSynchronizedPlotView";class d extends o.AbstractVTKPlot{constructor(e){super(e),(0,_.initialize_fullscreen_render)(),this.outline=a.vtkns.OutlineFilter.newInstance();const t=a.vtkns.Mapper.newInstance();t.setInputConnection(this.outline.getOutputPort()),this.outline_actor=a.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(c);t=t.filter((t=>{const s=n.getInstanceId(t);return!!s&&s.slice(-16)==e.slice(1,17)}))}return t}static init_VTKSynchronizedPlot(){this.prototype.default_view=h,this.define((({Any:e,Array:t,Boolean:n,String:s})=>({arrays:[e,{}],arrays_processed:[t(s),[]],enable_keybindings:[n,!1],one_time_reset:[n],rebuild:[n,!1],scene:[e,{}]}))),this.override({height:300,width:300})}}n.VTKSynchronizedPlot=d,d.__name__="VTKSynchronizedPlot",d.__module__="panel.models.vtk",d.init_VTKSynchronizedPlot()},
|
|
204
204
|
"877619fe71": function _(e,n,o,t,r){t();const i=e("993f3118b2"),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}},
|
|
205
|
-
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"80a6464b1f","models/audio":"33955cfa6f","models/card":"0972f6e77b","models/comm_manager":"
|
|
205
|
+
}, "4e90918c0a", {"index":"4e90918c0a","models/index":"eed113197d","models/ace":"2e12ebdb23","models/layout":"80a6464b1f","models/audio":"33955cfa6f","models/card":"0972f6e77b","models/comm_manager":"754fbb1f55","models/customselect":"e258e515be","models/tabulator":"6ab332f75c","models/data":"7f7d9e0c6b","models/datetime_picker":"297274885a","models/deckgl":"0155f7af4d","models/tooltips":"6e04fbe567","models/echarts":"9d046c4720","models/html":"3d7593ca5a","models/event-to-object":"d92f7d4d2b","models/idom":"7d45bd3bc4","models/ipywidget":"0eae77d68f","models/json":"0d30bea0c8","models/json_editor":"be9f51fc39","models/file_download":"1767172ffa","models/katex":"7b859fb3cf","models/location":"0c52a301f3","models/mathjax":"0c21036737","models/perspective":"4ae96bd77b","models/player":"588a5ae70d","models/plotly":"42de27e56c","models/util":"990b5dd5c7","models/progress":"979633320f","models/quill":"d51a79a0a3","models/reactive_html":"ad426de39c","models/singleselect":"ab54efe08a","models/speech_to_text":"a96be0bcc9","models/state":"bfa46a5f19","models/tabs":"f693d9aa84","models/terminal":"3ea011fa55","models/text_to_speech":"33cd2c254e","models/trend":"effe070807","models/vega":"fea356270f","models/video":"1b46fd56a8","models/videostream":"e3e9b8e495","models/vtk/index":"c51f25e2a7","models/vtk/vtkjs":"b6d9199d03","models/vtk/vtklayout":"e13c143c7d","models/vtk/util":"993f3118b2","models/vtk/vtkcolorbar":"c010237f8b","models/vtk/vtkaxes":"ab478186ba","models/vtk/vtkvolume":"7785475bdd","models/vtk/vtksynchronized":"0a57062475","models/vtk/panel_fullscreen_renwin_sync":"877619fe71"}, {});});
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@holoviz/panel",
|
|
3
|
-
"version": "0.14.0-a.
|
|
3
|
+
"version": "0.14.0-a.21",
|
|
4
4
|
"description": "A high level dashboarding library for python visualization libraries.",
|
|
5
5
|
"license": "BSD-3-Clause",
|
|
6
6
|
"repository": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {},
|
|
23
23
|
"files": [
|
|
24
|
-
"dist/**/*.{js,js.map,d.ts,json,css}"
|
|
24
|
+
"dist/**/*.{js,js.map,d.ts,json,css,whl}"
|
|
25
25
|
],
|
|
26
26
|
"main": "dist/panel.min.js"
|
|
27
27
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Couldn't find the requested file /dist/bundled/tabulator-tables@4.9.3/dist/css/fast/tabulator_fast.min.css in @holoviz/panel.
|