wg-backend-django/dell-env/lib/python3.11/site-packages/jupyterlab_plotly/labextension/static/855.323c80e7298812d692e7.js

1 line
14 KiB
JavaScript
Raw Normal View History

2023-10-30 03:40:43 -04:00
"use strict";(self.webpackChunkjupyterlab_plotly=self.webpackChunkjupyterlab_plotly||[]).push([[855],{855:(e,t,a)=>{a.r(t),a.d(t,{FigureModel:()=>d,FigureView:()=>y,MODULE_NAME:()=>n.o,MODULE_VERSION:()=>n.Y});var s=a(900),l=a(431),i=a.n(l),r=a(478),o=a.n(r),n=a(657);window.PlotlyConfig={MathJaxConfig:"local"};const _="^"+n.Y;class d extends s.DOMWidgetModel{defaults(){return Object.assign(Object.assign({},super.defaults()),{_model_name:d.model_name,_model_module:d.model_module,_model_module_version:d.model_module_version,_view_name:d.view_name,_view_module:d.view_module,_view_module_version:d.view_module_version,_data:[],_layout:{},_config:{},_py2js_addTraces:null,_py2js_deleteTraces:null,_py2js_moveTraces:null,_py2js_restyle:null,_py2js_relayout:null,_py2js_update:null,_py2js_animate:null,_py2js_removeLayoutProps:null,_py2js_removeTraceProps:null,_js2py_restyle:null,_js2py_relayout:null,_js2py_update:null,_js2py_layoutDelta:null,_js2py_traceDeltas:null,_js2py_pointsCallback:null,_last_layout_edit_id:0,_last_trace_edit_id:0})}initialize(){super.initialize.apply(this,arguments),this.on("change:_data",this.do_data,this),this.on("change:_layout",this.do_layout,this),this.on("change:_py2js_addTraces",this.do_addTraces,this),this.on("change:_py2js_deleteTraces",this.do_deleteTraces,this),this.on("change:_py2js_moveTraces",this.do_moveTraces,this),this.on("change:_py2js_restyle",this.do_restyle,this),this.on("change:_py2js_relayout",this.do_relayout,this),this.on("change:_py2js_update",this.do_update,this),this.on("change:_py2js_animate",this.do_animate,this),this.on("change:_py2js_removeLayoutProps",this.do_removeLayoutProps,this),this.on("change:_py2js_removeTraceProps",this.do_removeTraceProps,this)}_normalize_trace_indexes(e){if(null==e){var t=this.get("_data").length;e=i().range(t)}return Array.isArray(e)||(e=[e]),e}do_data(){}do_layout(){}do_addTraces(){var e=this.get("_py2js_addTraces");if(null!==e){var t=this.get("_data"),a=e.trace_data;i().forEach(a,(function(e){t.push(e)}))}}do_deleteTraces(){var e=this.get("_py2js_deleteTraces");if(null!==e){var t=e.delete_inds,a=this.get("_data");t.slice().reverse().forEach((function(e){a.splice(e,1)}))}}do_moveTraces(){var e=this.get("_py2js_moveTraces");null!==e&&function(e,t,a){for(var s=[],l=t.length-1;l>=0;l--)s.splice(0,0,e[t[l]]),e.splice(t[l],1);var r=i()(a).zip(s).sortBy(0).unzip().value();a=r[0],s=r[1];for(var o=0;o<a.length;o++)e.splice(a[o],0,s[o])}(this.get("_data"),e.current_trace_inds,e.new_trace_inds)}do_restyle(){var e=this.get("_py2js_restyle");if(null!==e){var t=e.restyle_data,a=this._normalize_trace_indexes(e.restyle_traces);f(this.get("_data"),t,a)}}do_relayout(){var e=this.get("_py2js_relayout");null!==e&&v(this.get("_layout"),e.relayout_data)}do_update(){var e=this.get("_py2js_update");if(null!==e){var t=e.style_data,a=e.layout_data,s=this._normalize_trace_indexes(e.style_traces);f(this.get("_data"),t,s),v(this.get("_layout"),a)}}do_animate(){var e=this.get("_py2js_animate");if(null!==e){for(var t=e.style_data,a=e.layout_data,s=this._normalize_trace_indexes(e.style_traces),l=0;l<t.length;l++){var i=t[l],r=s[l];v(this.get("_data")[r],i)}v(this.get("_layout"),a)}}do_removeLayoutProps(){var e=this.get("_py2js_removeLayoutProps");if(null!==e){var t=e.remove_props;m(this.get("_layout"),t)}}do_removeTraceProps(){var e=this.get("_py2js_removeTraceProps");if(null!==e){var t=e.remove_props,a=e.remove_trace;m(this.get("_data")[a],t)}}}d.serializers=Object.assign(Object.assign({},s.DOMWidgetModel.serializers),{_data:{deserialize:c,serialize:h},_layout:{deserialize:c,serialize:h},_py2js_addTraces:{deserialize:c,serialize:h},_py2js_deleteTraces:{deserialize:c,serialize:h},_py2js_moveTraces:{deserialize:c,serialize:h},_py2js_restyle:{deserialize:c,serialize:h},_py2js_relayout:{deserialize:c,serialize:h},_py2js_update:{deserialize:c,serialize:h},_py2js_animate:{deserialize:c,serialize:h},_py2js_removeLayoutProps:{deserialize:c,serialize:h},_py2js_removeTraceProps:{deserialize:c,serialize:h},_js2py_restyle:{deserialize:c,serialize:h},_js2py_relayout:{deserialize:c,serializ