notebook 7.1.0a0__py3-none-any.whl → 7.1.0a1__py3-none-any.whl
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.
Potentially problematic release.
This version of notebook might be problematic. Click here for more details.
- notebook/_version.py +1 -1
- notebook/app.py +5 -2
- notebook/static/1053.bundle.js +1 -1
- notebook/static/1157.bundle.js +1 -0
- notebook/static/1169.bundle.js +1 -1
- notebook/static/1198.bundle.js +1 -1
- notebook/static/131.bundle.js +2 -2
- notebook/static/1326.bundle.js +2 -0
- notebook/static/1337.bundle.js +1 -1
- notebook/static/134.bundle.js +1 -1
- notebook/static/1408.bundle.js +1 -1
- notebook/static/1496.bundle.js +1 -0
- notebook/static/1584.bundle.js +1 -1
- notebook/static/1604.bundle.js +1 -0
- notebook/static/1647.bundle.js +1 -1
- notebook/static/1650.bundle.js +1 -1
- notebook/static/1682.bundle.js +1 -1
- notebook/static/1684.bundle.js +1 -1
- notebook/static/1809.bundle.js +1 -1
- notebook/static/1827.bundle.js +1 -1
- notebook/static/1833.bundle.js +1 -1
- notebook/static/1835.bundle.js +1 -1
- notebook/static/1895.bundle.js +1 -0
- notebook/static/1950.bundle.js +1 -1
- notebook/static/1958.bundle.js +1 -1
- notebook/static/2007.bundle.js +1 -1
- notebook/static/2067.bundle.js +1 -1
- notebook/static/2088.bundle.js +1 -1
- notebook/static/2089.bundle.js +1 -1
- notebook/static/2122.bundle.js +1 -1
- notebook/static/2167.bundle.js +1 -1
- notebook/static/2184.bundle.js +1 -1
- notebook/static/2311.bundle.js +1 -1
- notebook/static/2401.bundle.js +1 -1
- notebook/static/2479.bundle.js +1 -1
- notebook/static/2489.bundle.js +1 -1
- notebook/static/2502.bundle.js +1 -0
- notebook/static/2512.bundle.js +1 -1
- notebook/static/2515.bundle.js +1 -0
- notebook/static/2552.bundle.js +1 -1
- notebook/static/2577.bundle.js +1 -0
- notebook/static/2607.bundle.js +1 -1
- notebook/static/2615.bundle.js +1 -1
- notebook/static/270.bundle.js +1 -1
- notebook/static/2866.bundle.js +1 -1
- notebook/static/2883.bundle.js +1 -1
- notebook/static/2913.bundle.js +1 -1
- notebook/static/2924.bundle.js +1 -1
- notebook/static/2944.bundle.js +1 -0
- notebook/static/3079.bundle.js +1 -1
- notebook/static/3129.bundle.js +1 -1
- notebook/static/3146.bundle.js +1 -1
- notebook/static/3190.bundle.js +2 -0
- notebook/static/3213.bundle.js +1 -1
- notebook/static/3301.bundle.js +1 -1
- notebook/static/3340.bundle.js +1 -1
- notebook/static/3360.bundle.js +1 -1
- notebook/static/3466.bundle.js +1 -1
- notebook/static/3512.bundle.js +1 -1
- notebook/static/3642.bundle.js +1 -0
- notebook/static/3676.bundle.js +1 -1
- notebook/static/3680.bundle.js +1 -1
- notebook/static/3768.bundle.js +1 -1
- notebook/static/377.bundle.js +1 -1
- notebook/static/3863.bundle.js +1 -1
- notebook/static/3881.bundle.js +1 -1
- notebook/static/4042.bundle.js +1 -1
- notebook/static/4058.bundle.js +1 -1
- notebook/static/4131.bundle.js +1 -1
- notebook/static/4166.bundle.js +1 -0
- notebook/static/4212.bundle.js +1 -1
- notebook/static/4271.bundle.js +1 -1
- notebook/static/4291.bundle.js +1 -1
- notebook/static/433.bundle.js +1 -0
- notebook/static/4382.bundle.js +1 -1
- notebook/static/4461.bundle.js +1 -0
- notebook/static/4499.bundle.js +1 -0
- notebook/static/4501.bundle.js +1 -0
- notebook/static/4526.bundle.js +1 -1
- notebook/static/4558.bundle.js +1 -1
- notebook/static/4588.bundle.js +1 -1
- notebook/static/4630.bundle.js +1 -1
- notebook/static/4645.bundle.js +1 -1
- notebook/static/4670.bundle.js +1 -1
- notebook/static/4810.bundle.js +1 -1
- notebook/static/4811.bundle.js +1 -1
- notebook/static/4837.bundle.js +1 -1
- notebook/static/4892.bundle.js +1 -0
- notebook/static/5088.bundle.js +1 -1
- notebook/static/5099.bundle.js +1 -1
- notebook/static/5115.bundle.js +1 -1
- notebook/static/5135.bundle.js +1 -1
- notebook/static/514.bundle.js +1 -1
- notebook/static/5313.bundle.js +1 -1
- notebook/static/5325.bundle.js +1 -1
- notebook/static/5346.bundle.js +1 -1
- notebook/static/5376.bundle.js +1 -0
- notebook/static/5426.bundle.js +1 -1
- notebook/static/5573.bundle.js +1 -1
- notebook/static/5601.bundle.js +1 -1
- notebook/static/5649.bundle.js +1 -1
- notebook/static/5733.bundle.js +1 -1
- notebook/static/5828.bundle.js +1 -1
- notebook/static/5850.bundle.js +1 -1
- notebook/static/5874.bundle.js +744 -0
- notebook/static/5874.bundle.js.LICENSE.txt +4 -0
- notebook/static/5912.bundle.js +1 -1
- notebook/static/5921.bundle.js +1 -1
- notebook/static/5982.bundle.js +1 -0
- notebook/static/6017.bundle.js +1 -1
- notebook/static/6027.bundle.js +1 -1
- notebook/static/6061.bundle.js +1 -1
- notebook/static/6139.bundle.js +1 -1
- notebook/static/62.bundle.js +1 -1
- notebook/static/6249.bundle.js +1 -0
- notebook/static/6256.bundle.js +1 -1
- notebook/static/6262.bundle.js +1 -0
- notebook/static/6271.bundle.js +1 -1
- notebook/static/6345.bundle.js +1 -1
- notebook/static/6405.bundle.js +1 -0
- notebook/static/6604.bundle.js +1 -1
- notebook/static/6621.bundle.js +1 -1
- notebook/static/6627.bundle.js +1 -1
- notebook/static/6731.bundle.js +1 -1
- notebook/static/6815.bundle.js +1 -1
- notebook/static/6853.bundle.js +1 -1
- notebook/static/{4842.bundle.js → 6869.bundle.js} +1 -1
- notebook/static/6893.bundle.js +1 -1
- notebook/static/690.bundle.js +1 -1
- notebook/static/6962.bundle.js +1 -1
- notebook/static/6972.bundle.js +1 -1
- notebook/static/6999.bundle.js +1 -1
- notebook/static/7154.bundle.js +1 -1
- notebook/static/7226.bundle.js +1 -1
- notebook/static/7252.bundle.js +1 -1
- notebook/static/7302.bundle.js +1 -1
- notebook/static/7333.bundle.js +2 -0
- notebook/static/7339.bundle.js +1 -0
- notebook/static/7369.bundle.js +1 -1
- notebook/static/7386.bundle.js +1 -1
- notebook/static/7391.bundle.js +1 -1
- notebook/static/7394.bundle.js +1 -1
- notebook/static/7427.bundle.js +1 -1
- notebook/static/7582.bundle.js +1 -1
- notebook/static/{7407.bundle.js → 7590.bundle.js} +1 -1
- notebook/static/7603.bundle.js +1 -1
- notebook/static/7639.bundle.js +1 -1
- notebook/static/7674.bundle.js +1 -1
- notebook/static/7684.bundle.js +1 -1
- notebook/static/7811.bundle.js +1 -1
- notebook/static/7819.bundle.js +1 -1
- notebook/static/7866.bundle.js +1 -1
- notebook/static/7900.bundle.js +1 -1
- notebook/static/7906.bundle.js +1 -1
- notebook/static/7943.bundle.js +1 -0
- notebook/static/8010.bundle.js +1 -1
- notebook/static/8032.bundle.js +1 -1
- notebook/static/8055.bundle.js +1 -0
- notebook/static/8579.bundle.js +1 -1
- notebook/static/8633.bundle.js +1 -1
- notebook/static/8771.bundle.js +1 -1
- notebook/static/8781.bundle.js +1 -0
- notebook/static/882.bundle.js +1 -0
- notebook/static/8845.bundle.js +1 -1
- notebook/static/8875.bundle.js +1 -1
- notebook/static/8907.bundle.js +1 -1
- notebook/static/8928.bundle.js +1 -1
- notebook/static/8929.bundle.js +1 -1
- notebook/static/893.bundle.js +1 -1
- notebook/static/901.bundle.js +1 -1
- notebook/static/9068.bundle.js +1 -1
- notebook/static/911.bundle.js +1 -1
- notebook/static/9151.bundle.js +1 -1
- notebook/static/9161.bundle.js +1 -1
- notebook/static/9239.bundle.js +1 -1
- notebook/static/9250.bundle.js +1 -1
- notebook/static/9268.bundle.js +1 -1
- notebook/static/9284.bundle.js +1 -0
- notebook/static/9308.bundle.js +1 -1
- notebook/static/9335.bundle.js +1 -1
- notebook/static/9341.bundle.js +1 -1
- notebook/static/9380.bundle.js +1 -1
- notebook/static/9466.bundle.js +1 -0
- notebook/static/9554.bundle.js +1 -0
- notebook/static/9605.bundle.js +1 -1
- notebook/static/9638.bundle.js +1 -1
- notebook/static/9680.bundle.js +1 -1
- notebook/static/9685.bundle.js +1 -1
- notebook/static/9752.bundle.js +1 -1
- notebook/static/9799.bundle.js +1 -1
- notebook/static/9821.bundle.js +1 -1
- notebook/static/9852.bundle.js +1 -1
- notebook/static/9987.bundle.js +1 -0
- notebook/static/bundle.js +1 -1
- notebook/static/third-party-licenses.json +177 -111
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/package.json.orig +15 -15
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/documentsearch-extension/package.json.orig +5 -5
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/package.json.orig +6 -6
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/package.json.orig +10 -10
- notebook-7.1.0a1.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +17 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/package.json.orig +17 -17
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/package.json +12 -12
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/package.json.orig +11 -11
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/50.e41798f78fa32030e149.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.9fa8bfe8da6242a4fc6b.js +1 -0
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.79046a2eb17bde1af38c.js → notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/928.faa0d74ec3a151a81a90.js +1 -1
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/93.eae3497dd223d842d198.js +1 -0
- notebook-7.1.0a1.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.02d92bfa6cab99929020.js +1 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/third-party-licenses.json +4 -4
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/METADATA +2 -2
- notebook-7.1.0a1.dist-info/RECORD +430 -0
- notebook/static/1306.bundle.js +0 -1
- notebook/static/1945.bundle.js +0 -1
- notebook/static/1964.bundle.js +0 -1
- notebook/static/3412.bundle.js +0 -1
- notebook/static/3434.bundle.js +0 -1
- notebook/static/3618.bundle.js +0 -1
- notebook/static/3672.bundle.js +0 -1
- notebook/static/3791.bundle.js +0 -1
- notebook/static/3993.bundle.js +0 -1
- notebook/static/4234.bundle.js +0 -1
- notebook/static/4793.bundle.js +0 -1
- notebook/static/4826.bundle.js +0 -1
- notebook/static/4867.bundle.js +0 -1
- notebook/static/5058.bundle.js +0 -1
- notebook/static/5329.bundle.js +0 -1
- notebook/static/5591.bundle.js +0 -1
- notebook/static/5642.bundle.js +0 -1
- notebook/static/6359.bundle.js +0 -1
- notebook/static/6667.bundle.js +0 -1
- notebook/static/6843.bundle.js +0 -1
- notebook/static/7763.bundle.js +0 -1
- notebook/static/7764.bundle.js +0 -1
- notebook/static/8723.bundle.js +0 -2
- notebook/static/880.bundle.js +0 -1
- notebook/static/8968.bundle.js +0 -1
- notebook/static/9086.bundle.js +0 -1
- notebook/static/9213.bundle.js +0 -2
- notebook/static/9381.bundle.js +0 -1
- notebook/static/9514.bundle.js +0 -1
- notebook/static/9545.bundle.js +0 -1
- notebook/static/973.bundle.js +0 -2
- notebook-7.1.0a0.data/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/file-actions.json +0 -10
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/568.ffc2f99974c3b184be5a.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/776.c7baadfaddfd4518c935.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/922.0beff4620746e288bd5e.js +0 -1
- notebook-7.1.0a0.data/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/remoteEntry.e73b0142911cf6300a74.js +0 -1
- notebook-7.1.0a0.dist-info/RECORD +0 -427
- /notebook/static/{9213.bundle.js.LICENSE.txt → 1326.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{8723.bundle.js.LICENSE.txt → 3190.bundle.js.LICENSE.txt} +0 -0
- /notebook/static/{973.bundle.js.LICENSE.txt → 7333.bundle.js.LICENSE.txt} +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/etc/jupyter/jupyter_server_config.d/notebook.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/applications/jupyter-notebook.desktop +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/icons/hicolor/scalable/apps/notebook.svg +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/menus.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/pages.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/shell.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/title.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/top.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/application-extension/zen.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/help-extension/open.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/checkpoints.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/kernel-logo.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/notebook-extension/scroll-output.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/lab/schemas/@jupyter-notebook/tree-extension/widget.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/interface-switcher.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/schemas/@jupyter-notebook/lab-extension/launch-tree.json +0 -0
- {notebook-7.1.0a0.data → notebook-7.1.0a1.data}/data/share/jupyter/labextensions/@jupyter-notebook/lab-extension/static/style.js +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/WHEEL +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/entry_points.txt +0 -0
- {notebook-7.1.0a0.dist-info → notebook-7.1.0a1.dist-info}/licenses/LICENSE +0 -0
notebook/static/3412.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3412],{3412:(t,e,n)=>{n.d(e,{diagram:()=>O});var i=n(86850),s=n(2314),r=n(35476),a=n(28482),o=n(57838),c=(n(27693),n(7608),n(31699),function(){var t=function(t,e,n,i){for(n=n||{},i=t.length;i--;n[t[i]]=e);return n},e=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],s=[1,11],r=[1,12],a=[1,13],o=[1,16],c=[1,17],l={trace:function(){},yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:function(t,e,n,i,s,r,a){var o=r.length-1;switch(s){case 1:return r[o-1];case 2:case 6:case 7:this.$=[];break;case 3:r[o-1].push(r[o]),this.$=r[o-1];break;case 4:case 5:this.$=r[o];break;case 8:i.getCommonDb().setDiagramTitle(r[o].substr(6)),this.$=r[o].substr(6);break;case 9:this.$=r[o].trim(),i.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=r[o].trim(),i.getCommonDb().setAccDescription(this.$);break;case 12:i.addSection(r[o].substr(8)),this.$=r[o].substr(8);break;case 15:i.addTask(r[o],0,""),this.$=r[o];break;case 16:i.addEvent(r[o].substr(2)),this.$=r[o]}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:c},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:18,11:n,12:i,14:s,16:r,17:a,18:14,19:15,20:o,21:c},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,19]},{15:[1,20]},t(e,[2,11]),t(e,[2,12]),t(e,[2,13]),t(e,[2,14]),t(e,[2,15]),t(e,[2,16]),t(e,[2,4]),t(e,[2,9]),t(e,[2,10])],defaultActions:{},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=[0],n=[],i=[null],s=[],r=this.table,a="",o=0,c=0,l=s.slice.call(arguments,1),h=Object.create(this.lexer),d={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(d.yy[u]=this.yy[u]);h.setInput(t,d.yy),d.yy.lexer=h,d.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;s.push(p);var g=h.options&&h.options.ranges;"function"==typeof d.yy.parseError?this.parseError=d.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var y,f,m,_,b,k,x,v,S,w={};;){if(f=e[e.length-1],this.defaultActions[f]?m=this.defaultActions[f]:(null==y&&(S=void 0,"number"!=typeof(S=n.pop()||h.lex()||1)&&(S instanceof Array&&(S=(n=S).pop()),S=this.symbols_[S]||S),y=S),m=r[f]&&r[f][y]),void 0===m||!m.length||!m[0]){var $;for(b in v=[],r[f])this.terminals_[b]&&b>2&&v.push("'"+this.terminals_[b]+"'");$=h.showPosition?"Parse error on line "+(o+1)+":\n"+h.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[y]||y)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==y?"end of input":"'"+(this.terminals_[y]||y)+"'"),this.parseError($,{text:h.match,token:this.terminals_[y]||y,line:h.yylineno,loc:p,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+y);switch(m[0]){case 1:e.push(y),i.push(h.yytext),s.push(h.yylloc),e.push(m[1]),y=null,c=h.yyleng,a=h.yytext,o=h.yylineno,p=h.yylloc;break;case 2:if(k=this.productions_[m[1]][1],w.$=i[i.length-k],w._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},g&&(w._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),void 0!==(_=this.performAction.apply(w,[a,c,o,d.yy,m[1],i,s].concat(l))))return _;k&&(e=e.slice(0,-1*k*2),i=i.slice(0,-1*k),s=s.slice(0,-1*k)),e.push(this.productions_[m[1]][0]),i.push(w.$),s.push(w._$),x=r[e[e.length-2]][e[e.length-1]],e.push(x);break;case 3:return!0}}return!0}},h={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===i.length?this.yylloc.first_column:0)+i[i.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,i,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((n=this._input.match(this.rules[s[r]]))&&(!e||n[0].length>e[0].length)){if(e=n,i=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,i){switch(n){case 0:case 1:case 3:case 4:break;case 2:return 10;case 5:return 4;case 6:return 11;case 7:return this.begin("acc_title"),12;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),14;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:return 17;case 15:return 21;case 16:return 20;case 17:return 6;case 18:return"INVALID"}},rules:[/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:timeline\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?::\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,9,11,14,15,16,17,18],inclusive:!0}}};function d(){this.yy={}}return l.lexer=h,d.prototype=l,l.Parser=d,new d}());c.parser=c;const l=c;let h="",d=0;const u=[],p=[],g=[],y=()=>i.K,f=function(){u.length=0,p.length=0,h="",g.length=0,(0,i.t)()},m=function(t){h=t,u.push(t)},_=function(){return u},b=function(){let t=S(),e=0;for(;!t&&e<100;)t=S(),e++;return p.push(...g),p},k=function(t,e,n){const i={id:d++,section:h,type:h,task:t,score:e||0,events:n?[n]:[]};g.push(i)},x=function(t){g.find((t=>t.id===d-1)).events.push(t)},v=function(t){const e={section:h,type:h,description:t,task:t,classes:[]};p.push(e)},S=function(){let t=!0;for(const[e,n]of g.entries())g[e].processed,t=t&&n.processed;return t},w={clear:f,getCommonDb:y,addSection:m,getSections:_,getTasks:b,addTask:k,addTaskOrg:v,addEvent:x},$=Object.freeze(Object.defineProperty({__proto__:null,addEvent:x,addSection:m,addTask:k,addTaskOrg:v,clear:f,default:w,getCommonDb:y,getSections:_,getTasks:b},Symbol.toStringTag,{value:"Module"}));function E(t,e){t.each((function(){var t,n=(0,s.Ys)(this),i=n.text().split(/(\s+|<br>)/).reverse(),r=[],a=n.attr("y"),o=parseFloat(n.attr("dy")),c=n.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",o+"em");for(let s=0;s<i.length;s++)t=i[i.length-1-s],r.push(t),c.text(r.join(" ").trim()),(c.node().getComputedTextLength()>e||"<br>"===t)&&(r.pop(),c.text(r.join(" ").trim()),r="<br>"===t?[""]:[t],c=n.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))}))}const T=function(t,e,n,i){const s=n%12-1,r=t.append("g");e.section=s,r.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+s);const a=r.append("g"),o=r.append("g"),c=o.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),l=i.fontSize&&i.fontSize.replace?i.fontSize.replace("px",""):i.fontSize;return e.height=c.height+1.1*l*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,o.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),function(t,e,n){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)}(a,e,s),e},I=function(t,e,n){const i=t.append("g"),s=i.append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(E,e.width).node().getBBox(),r=n.fontSize&&n.fontSize.replace?n.fontSize.replace("px",""):n.fontSize;return i.remove(),s.height+1.1*r*.5+e.padding},C=function(t,e,n,s,r,a,o,c,l,h,d){var u;for(const c of e){const e={descr:c.task,section:n,number:n,width:150,padding:20,maxHeight:a};i.l.debug("taskNode",e);const p=t.append("g").attr("class","taskWrapper"),g=T(p,e,n,o).height;if(i.l.debug("taskHeight after draw",g),p.attr("transform",`translate(${s}, ${r})`),a=Math.max(a,g),c.events){const e=t.append("g").attr("class","lineWrapper");let i=a;r+=100,i+=L(t,c.events,n,s,r,o),r-=100,e.append("line").attr("x1",s+95).attr("y1",r+a).attr("x2",s+95).attr("y2",r+a+(d?a:h)+l+120).attr("stroke-width",2).attr("stroke","black").attr("marker-end","url(#arrowhead)").attr("stroke-dasharray","5,5")}s+=200,d&&!(null==(u=o.timeline)?void 0:u.disableMulticolor)&&n++}r-=10},L=function(t,e,n,s,r,a){let o=0;const c=r;r+=100;for(const c of e){const e={descr:c,section:n,number:n,width:150,padding:20,maxHeight:50};i.l.debug("eventNode",e);const l=t.append("g").attr("class","eventWrapper"),h=T(l,e,n,a).height;o+=h,l.attr("transform",`translate(${s}, ${r})`),r=r+10+h}return r=c,o},O={db:$,renderer:{setConf:()=>{},draw:function(t,e,n,r){var a,o;const c=(0,i.c)(),l=c.leftMargin??50;i.l.debug("timeline",r.db);const h=c.securityLevel;let d;"sandbox"===h&&(d=(0,s.Ys)("#i"+e));const u=("sandbox"===h?(0,s.Ys)(d.nodes()[0].contentDocument.body):(0,s.Ys)("body")).select("#"+e);u.append("g");const p=r.db.getTasks(),g=r.db.getCommonDb().getDiagramTitle();i.l.debug("task",p),u.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z");const y=r.db.getSections();i.l.debug("sections",y);let f=0,m=0,_=0,b=0,k=50+l,x=50;b=50;let v=0,S=!0;y.forEach((function(t){const e=I(u,{number:v,descr:t,section:v,width:150,padding:20,maxHeight:f},c);i.l.debug("sectionHeight before draw",e),f=Math.max(f,e+20)}));let w=0,$=0;i.l.debug("tasks.length",p.length);for(const[t,e]of p.entries()){const n={number:t,descr:e,section:e.section,width:150,padding:20,maxHeight:m},s=I(u,n,c);i.l.debug("taskHeight before draw",s),m=Math.max(m,s+20),w=Math.max(w,e.events.length);let r=0;for(let t=0;t<e.events.length;t++){const n={descr:e.events[t],section:e.section,number:e.section,width:150,padding:20,maxHeight:50};r+=I(u,n,c)}$=Math.max($,r)}i.l.debug("maxSectionHeight before draw",f),i.l.debug("maxTaskHeight before draw",m),y&&y.length>0?y.forEach((t=>{const e=p.filter((e=>e.section===t)),n={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:f};i.l.debug("sectionNode",n);const s=u.append("g"),r=T(s,n,v,c);i.l.debug("sectionNode output",r),s.attr("transform",`translate(${k}, 50)`),x+=f+50,e.length>0&&C(u,e,v,k,x,m,c,0,$,f,!1),k+=200*Math.max(e.length,1),x=50,v++})):(S=!1,C(u,p,v,k,x,m,c,0,$,f,!0));const E=u.node().getBBox();i.l.debug("bounds",E),g&&u.append("text").text(g).attr("x",E.width/2-l).attr("font-size","4ex").attr("font-weight","bold").attr("y",20),_=S?f+m+150:m+100,u.append("g").attr("class","lineWrapper").append("line").attr("x1",l).attr("y1",_).attr("x2",E.width+3*l).attr("y2",_).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),(0,i.o)(void 0,u,(null==(a=c.timeline)?void 0:a.padding)??50,(null==(o=c.timeline)?void 0:o.useMaxWidth)??!1)}},parser:l,styles:t=>`\n .edge {\n stroke-width: 3;\n }\n ${(t=>{let e="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)t["lineColor"+e]=t["lineColor"+e]||t["cScaleInv"+e],(0,r.Z)(t["lineColor"+e])?t["lineColor"+e]=(0,a.Z)(t["lineColor"+e],20):t["lineColor"+e]=(0,o.Z)(t["lineColor"+e],20);for(let n=0;n<t.THEME_COLOR_LIMIT;n++){const i=""+(17-3*n);e+=`\n .section-${n-1} rect, .section-${n-1} path, .section-${n-1} circle, .section-${n-1} path {\n fill: ${t["cScale"+n]};\n }\n .section-${n-1} text {\n fill: ${t["cScaleLabel"+n]};\n }\n .node-icon-${n-1} {\n font-size: 40px;\n color: ${t["cScaleLabel"+n]};\n }\n .section-edge-${n-1}{\n stroke: ${t["cScale"+n]};\n }\n .edge-depth-${n-1}{\n stroke-width: ${i};\n }\n .section-${n-1} line {\n stroke: ${t["cScaleInv"+n]} ;\n stroke-width: 3;\n }\n\n .lineWrapper line{\n stroke: ${t["cScaleLabel"+n]} ;\n }\n\n .disabled, .disabled circle, .disabled text {\n fill: lightgray;\n }\n .disabled text {\n fill: #efefef;\n }\n `}return e})(t)}\n .section-root rect, .section-root path, .section-root circle {\n fill: ${t.git0};\n }\n .section-root text {\n fill: ${t.gitBranchLabel0};\n }\n .icon-container {\n height:100%;\n display: flex;\n justify-content: center;\n align-items: center;\n }\n .edge {\n fill: none;\n }\n .eventWrapper {\n filter: brightness(120%);\n }\n`}}}]);
|
notebook/static/3434.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3434],{3434:(t,e,r)=>{r.d(e,{diagram:()=>C});var i=r(86850),n=r(2314),a=(r(27693),r(7608),r(31699),function(){var t=function(t,e,r,i){for(r=r||{},i=t.length;i--;r[t[i]]=e);return r},e=[1,3],r=[1,6],i=[1,4],n=[1,5],a=[2,5],c=[1,12],s=[5,7,13,19,21,23,24,26,28,31,36,39,46],o=[7,13,19,21,23,24,26,28,31,36,39],l=[7,12,13,19,21,23,24,26,28,31,36,39],h=[7,13,46],m=[1,42],u=[1,41],y=[7,13,29,32,34,37,46],g=[1,55],p=[1,56],b=[1,57],d=[7,13,32,34,41,46],f={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,GG:5,document:6,EOF:7,":":8,DIR:9,options:10,body:11,OPT:12,NL:13,line:14,statement:15,commitStatement:16,mergeStatement:17,cherryPickStatement:18,acc_title:19,acc_title_value:20,acc_descr:21,acc_descr_value:22,acc_descr_multiline_value:23,section:24,branchStatement:25,CHECKOUT:26,ref:27,BRANCH:28,ORDER:29,NUM:30,CHERRY_PICK:31,COMMIT_ID:32,STR:33,COMMIT_TAG:34,EMPTYSTR:35,MERGE:36,COMMIT_TYPE:37,commitType:38,COMMIT:39,commit_arg:40,COMMIT_MSG:41,NORMAL:42,REVERSE:43,HIGHLIGHT:44,ID:45,";":46,$accept:0,$end:1},terminals_:{2:"error",5:"GG",7:"EOF",8:":",9:"DIR",12:"OPT",13:"NL",19:"acc_title",20:"acc_title_value",21:"acc_descr",22:"acc_descr_value",23:"acc_descr_multiline_value",24:"section",26:"CHECKOUT",28:"BRANCH",29:"ORDER",30:"NUM",31:"CHERRY_PICK",32:"COMMIT_ID",33:"STR",34:"COMMIT_TAG",35:"EMPTYSTR",36:"MERGE",37:"COMMIT_TYPE",39:"COMMIT",41:"COMMIT_MSG",42:"NORMAL",43:"REVERSE",44:"HIGHLIGHT",45:"ID",46:";"},productions_:[0,[3,2],[3,3],[3,4],[3,5],[6,0],[6,2],[10,2],[10,1],[11,0],[11,2],[14,2],[14,1],[15,1],[15,1],[15,1],[15,2],[15,2],[15,1],[15,1],[15,1],[15,2],[25,2],[25,4],[18,3],[18,5],[18,5],[18,5],[18,5],[17,2],[17,4],[17,4],[17,4],[17,6],[17,6],[17,6],[17,6],[17,6],[17,6],[17,8],[17,8],[17,8],[17,8],[17,8],[17,8],[16,2],[16,3],[16,3],[16,5],[16,5],[16,3],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,3],[16,5],[16,5],[16,5],[16,5],[16,5],[16,5],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,7],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[16,9],[40,0],[40,1],[38,1],[38,1],[38,1],[27,1],[27,1],[4,1],[4,1],[4,1]],performAction:function(t,e,r,i,n,a,c){var s=a.length-1;switch(n){case 2:return a[s];case 3:return a[s-1];case 4:return i.setDirection(a[s-3]),a[s-1];case 6:i.setOptions(a[s-1]),this.$=a[s];break;case 7:a[s-1]+=a[s],this.$=a[s-1];break;case 9:this.$=[];break;case 10:a[s-1].push(a[s]),this.$=a[s-1];break;case 11:this.$=a[s-1];break;case 16:this.$=a[s].trim(),i.setAccTitle(this.$);break;case 17:case 18:this.$=a[s].trim(),i.setAccDescription(this.$);break;case 19:i.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 21:i.checkout(a[s]);break;case 22:i.branch(a[s]);break;case 23:i.branch(a[s-2],a[s]);break;case 24:i.cherryPick(a[s],"",void 0);break;case 25:i.cherryPick(a[s-2],"",a[s]);break;case 26:case 28:i.cherryPick(a[s-2],"","");break;case 27:i.cherryPick(a[s],"",a[s-2]);break;case 29:i.merge(a[s],"","","");break;case 30:i.merge(a[s-2],a[s],"","");break;case 31:i.merge(a[s-2],"",a[s],"");break;case 32:i.merge(a[s-2],"","",a[s]);break;case 33:i.merge(a[s-4],a[s],"",a[s-2]);break;case 34:i.merge(a[s-4],"",a[s],a[s-2]);break;case 35:i.merge(a[s-4],"",a[s-2],a[s]);break;case 36:i.merge(a[s-4],a[s-2],a[s],"");break;case 37:i.merge(a[s-4],a[s-2],"",a[s]);break;case 38:i.merge(a[s-4],a[s],a[s-2],"");break;case 39:i.merge(a[s-6],a[s-4],a[s-2],a[s]);break;case 40:i.merge(a[s-6],a[s],a[s-4],a[s-2]);break;case 41:i.merge(a[s-6],a[s-4],a[s],a[s-2]);break;case 42:i.merge(a[s-6],a[s-2],a[s-4],a[s]);break;case 43:i.merge(a[s-6],a[s],a[s-2],a[s-4]);break;case 44:i.merge(a[s-6],a[s-2],a[s],a[s-4]);break;case 45:i.commit(a[s]);break;case 46:i.commit("","",i.commitType.NORMAL,a[s]);break;case 47:i.commit("","",a[s],"");break;case 48:i.commit("","",a[s],a[s-2]);break;case 49:i.commit("","",a[s-2],a[s]);break;case 50:i.commit("",a[s],i.commitType.NORMAL,"");break;case 51:i.commit("",a[s-2],i.commitType.NORMAL,a[s]);break;case 52:i.commit("",a[s],i.commitType.NORMAL,a[s-2]);break;case 53:i.commit("",a[s-2],a[s],"");break;case 54:i.commit("",a[s],a[s-2],"");break;case 55:i.commit("",a[s-4],a[s-2],a[s]);break;case 56:i.commit("",a[s-4],a[s],a[s-2]);break;case 57:i.commit("",a[s-2],a[s-4],a[s]);break;case 58:i.commit("",a[s],a[s-4],a[s-2]);break;case 59:i.commit("",a[s],a[s-2],a[s-4]);break;case 60:i.commit("",a[s-2],a[s],a[s-4]);break;case 61:i.commit(a[s],"",i.commitType.NORMAL,"");break;case 62:i.commit(a[s],"",i.commitType.NORMAL,a[s-2]);break;case 63:i.commit(a[s-2],"",i.commitType.NORMAL,a[s]);break;case 64:i.commit(a[s-2],"",a[s],"");break;case 65:i.commit(a[s],"",a[s-2],"");break;case 66:i.commit(a[s],a[s-2],i.commitType.NORMAL,"");break;case 67:i.commit(a[s-2],a[s],i.commitType.NORMAL,"");break;case 68:i.commit(a[s-4],"",a[s-2],a[s]);break;case 69:i.commit(a[s-4],"",a[s],a[s-2]);break;case 70:i.commit(a[s-2],"",a[s-4],a[s]);break;case 71:i.commit(a[s],"",a[s-4],a[s-2]);break;case 72:i.commit(a[s],"",a[s-2],a[s-4]);break;case 73:i.commit(a[s-2],"",a[s],a[s-4]);break;case 74:i.commit(a[s-4],a[s],a[s-2],"");break;case 75:i.commit(a[s-4],a[s-2],a[s],"");break;case 76:i.commit(a[s-2],a[s],a[s-4],"");break;case 77:i.commit(a[s],a[s-2],a[s-4],"");break;case 78:i.commit(a[s],a[s-4],a[s-2],"");break;case 79:i.commit(a[s-2],a[s-4],a[s],"");break;case 80:i.commit(a[s-4],a[s],i.commitType.NORMAL,a[s-2]);break;case 81:i.commit(a[s-4],a[s-2],i.commitType.NORMAL,a[s]);break;case 82:i.commit(a[s-2],a[s],i.commitType.NORMAL,a[s-4]);break;case 83:i.commit(a[s],a[s-2],i.commitType.NORMAL,a[s-4]);break;case 84:i.commit(a[s],a[s-4],i.commitType.NORMAL,a[s-2]);break;case 85:i.commit(a[s-2],a[s-4],i.commitType.NORMAL,a[s]);break;case 86:i.commit(a[s-6],a[s-4],a[s-2],a[s]);break;case 87:i.commit(a[s-6],a[s-4],a[s],a[s-2]);break;case 88:i.commit(a[s-6],a[s-2],a[s-4],a[s]);break;case 89:i.commit(a[s-6],a[s],a[s-4],a[s-2]);break;case 90:i.commit(a[s-6],a[s-2],a[s],a[s-4]);break;case 91:i.commit(a[s-6],a[s],a[s-2],a[s-4]);break;case 92:i.commit(a[s-4],a[s-6],a[s-2],a[s]);break;case 93:i.commit(a[s-4],a[s-6],a[s],a[s-2]);break;case 94:i.commit(a[s-2],a[s-6],a[s-4],a[s]);break;case 95:i.commit(a[s],a[s-6],a[s-4],a[s-2]);break;case 96:i.commit(a[s-2],a[s-6],a[s],a[s-4]);break;case 97:i.commit(a[s],a[s-6],a[s-2],a[s-4]);break;case 98:i.commit(a[s],a[s-4],a[s-2],a[s-6]);break;case 99:i.commit(a[s-2],a[s-4],a[s],a[s-6]);break;case 100:i.commit(a[s],a[s-2],a[s-4],a[s-6]);break;case 101:i.commit(a[s-2],a[s],a[s-4],a[s-6]);break;case 102:i.commit(a[s-4],a[s-2],a[s],a[s-6]);break;case 103:i.commit(a[s-4],a[s],a[s-2],a[s-6]);break;case 104:i.commit(a[s-2],a[s-4],a[s-6],a[s]);break;case 105:i.commit(a[s],a[s-4],a[s-6],a[s-2]);break;case 106:i.commit(a[s-2],a[s],a[s-6],a[s-4]);break;case 107:i.commit(a[s],a[s-2],a[s-6],a[s-4]);break;case 108:i.commit(a[s-4],a[s-2],a[s-6],a[s]);break;case 109:i.commit(a[s-4],a[s],a[s-6],a[s-2]);break;case 110:this.$="";break;case 111:this.$=a[s];break;case 112:this.$=i.commitType.NORMAL;break;case 113:this.$=i.commitType.REVERSE;break;case 114:this.$=i.commitType.HIGHLIGHT}},table:[{3:1,4:2,5:e,7:r,13:i,46:n},{1:[3]},{3:7,4:2,5:e,7:r,13:i,46:n},{6:8,7:a,8:[1,9],9:[1,10],10:11,13:c},t(s,[2,117]),t(s,[2,118]),t(s,[2,119]),{1:[2,1]},{7:[1,13]},{6:14,7:a,10:11,13:c},{8:[1,15]},t(o,[2,9],{11:16,12:[1,17]}),t(l,[2,8]),{1:[2,2]},{7:[1,18]},{6:19,7:a,10:11,13:c},{7:[2,6],13:[1,22],14:20,15:21,16:23,17:24,18:25,19:[1,26],21:[1,27],23:[1,28],24:[1,29],25:30,26:[1,31],28:[1,35],31:[1,34],36:[1,33],39:[1,32]},t(l,[2,7]),{1:[2,3]},{7:[1,36]},t(o,[2,10]),{4:37,7:r,13:i,46:n},t(o,[2,12]),t(h,[2,13]),t(h,[2,14]),t(h,[2,15]),{20:[1,38]},{22:[1,39]},t(h,[2,18]),t(h,[2,19]),t(h,[2,20]),{27:40,33:m,45:u},t(h,[2,110],{40:43,32:[1,46],33:[1,48],34:[1,44],37:[1,45],41:[1,47]}),{27:49,33:m,45:u},{32:[1,50],34:[1,51]},{27:52,33:m,45:u},{1:[2,4]},t(o,[2,11]),t(h,[2,16]),t(h,[2,17]),t(h,[2,21]),t(y,[2,115]),t(y,[2,116]),t(h,[2,45]),{33:[1,53]},{38:54,42:g,43:p,44:b},{33:[1,58]},{33:[1,59]},t(h,[2,111]),t(h,[2,29],{32:[1,60],34:[1,62],37:[1,61]}),{33:[1,63]},{33:[1,64],35:[1,65]},t(h,[2,22],{29:[1,66]}),t(h,[2,46],{32:[1,68],37:[1,67],41:[1,69]}),t(h,[2,47],{32:[1,71],34:[1,70],41:[1,72]}),t(d,[2,112]),t(d,[2,113]),t(d,[2,114]),t(h,[2,50],{34:[1,73],37:[1,74],41:[1,75]}),t(h,[2,61],{32:[1,78],34:[1,76],37:[1,77]}),{33:[1,79]},{38:80,42:g,43:p,44:b},{33:[1,81]},t(h,[2,24],{34:[1,82]}),{32:[1,83]},{32:[1,84]},{30:[1,85]},{38:86,42:g,43:p,44:b},{33:[1,87]},{33:[1,88]},{33:[1,89]},{33:[1,90]},{33:[1,91]},{33:[1,92]},{38:93,42:g,43:p,44:b},{33:[1,94]},{33:[1,95]},{38:96,42:g,43:p,44:b},{33:[1,97]},t(h,[2,30],{34:[1,99],37:[1,98]}),t(h,[2,31],{32:[1,101],34:[1,100]}),t(h,[2,32],{32:[1,102],37:[1,103]}),{33:[1,104],35:[1,105]},{33:[1,106]},{33:[1,107]},t(h,[2,23]),t(h,[2,48],{32:[1,108],41:[1,109]}),t(h,[2,52],{37:[1,110],41:[1,111]}),t(h,[2,62],{32:[1,113],37:[1,112]}),t(h,[2,49],{32:[1,114],41:[1,115]}),t(h,[2,54],{34:[1,116],41:[1,117]}),t(h,[2,65],{32:[1,119],34:[1,118]}),t(h,[2,51],{37:[1,120],41:[1,121]}),t(h,[2,53],{34:[1,122],41:[1,123]}),t(h,[2,66],{34:[1,125],37:[1,124]}),t(h,[2,63],{32:[1,127],37:[1,126]}),t(h,[2,64],{32:[1,129],34:[1,128]}),t(h,[2,67],{34:[1,131],37:[1,130]}),{38:132,42:g,43:p,44:b},{33:[1,133]},{33:[1,134]},{33:[1,135]},{33:[1,136]},{38:137,42:g,43:p,44:b},t(h,[2,25]),t(h,[2,26]),t(h,[2,27]),t(h,[2,28]),{33:[1,138]},{33:[1,139]},{38:140,42:g,43:p,44:b},{33:[1,141]},{38:142,42:g,43:p,44:b},{33:[1,143]},{33:[1,144]},{33:[1,145]},{33:[1,146]},{33:[1,147]},{33:[1,148]},{33:[1,149]},{38:150,42:g,43:p,44:b},{33:[1,151]},{33:[1,152]},{33:[1,153]},{38:154,42:g,43:p,44:b},{33:[1,155]},{38:156,42:g,43:p,44:b},{33:[1,157]},{33:[1,158]},{33:[1,159]},{38:160,42:g,43:p,44:b},{33:[1,161]},t(h,[2,36],{34:[1,162]}),t(h,[2,37],{37:[1,163]}),t(h,[2,35],{32:[1,164]}),t(h,[2,38],{34:[1,165]}),t(h,[2,33],{37:[1,166]}),t(h,[2,34],{32:[1,167]}),t(h,[2,59],{41:[1,168]}),t(h,[2,72],{32:[1,169]}),t(h,[2,60],{41:[1,170]}),t(h,[2,83],{37:[1,171]}),t(h,[2,73],{32:[1,172]}),t(h,[2,82],{37:[1,173]}),t(h,[2,58],{41:[1,174]}),t(h,[2,71],{32:[1,175]}),t(h,[2,57],{41:[1,176]}),t(h,[2,77],{34:[1,177]}),t(h,[2,70],{32:[1,178]}),t(h,[2,76],{34:[1,179]}),t(h,[2,56],{41:[1,180]}),t(h,[2,84],{37:[1,181]}),t(h,[2,55],{41:[1,182]}),t(h,[2,78],{34:[1,183]}),t(h,[2,79],{34:[1,184]}),t(h,[2,85],{37:[1,185]}),t(h,[2,69],{32:[1,186]}),t(h,[2,80],{37:[1,187]}),t(h,[2,68],{32:[1,188]}),t(h,[2,74],{34:[1,189]}),t(h,[2,75],{34:[1,190]}),t(h,[2,81],{37:[1,191]}),{33:[1,192]},{38:193,42:g,43:p,44:b},{33:[1,194]},{33:[1,195]},{38:196,42:g,43:p,44:b},{33:[1,197]},{33:[1,198]},{33:[1,199]},{33:[1,200]},{38:201,42:g,43:p,44:b},{33:[1,202]},{38:203,42:g,43:p,44:b},{33:[1,204]},{33:[1,205]},{33:[1,206]},{33:[1,207]},{33:[1,208]},{33:[1,209]},{33:[1,210]},{38:211,42:g,43:p,44:b},{33:[1,212]},{33:[1,213]},{33:[1,214]},{38:215,42:g,43:p,44:b},{33:[1,216]},{38:217,42:g,43:p,44:b},{33:[1,218]},{33:[1,219]},{33:[1,220]},{38:221,42:g,43:p,44:b},t(h,[2,39]),t(h,[2,41]),t(h,[2,40]),t(h,[2,42]),t(h,[2,44]),t(h,[2,43]),t(h,[2,100]),t(h,[2,101]),t(h,[2,98]),t(h,[2,99]),t(h,[2,103]),t(h,[2,102]),t(h,[2,107]),t(h,[2,106]),t(h,[2,105]),t(h,[2,104]),t(h,[2,109]),t(h,[2,108]),t(h,[2,97]),t(h,[2,96]),t(h,[2,95]),t(h,[2,94]),t(h,[2,92]),t(h,[2,93]),t(h,[2,91]),t(h,[2,90]),t(h,[2,89]),t(h,[2,88]),t(h,[2,86]),t(h,[2,87])],defaultActions:{7:[2,1],13:[2,2],18:[2,3],36:[2,4]},parseError:function(t,e){if(!e.recoverable){var r=new Error(t);throw r.hash=e,r}this.trace(t)},parse:function(t){var e=[0],r=[],i=[null],n=[],a=this.table,c="",s=0,o=0,l=n.slice.call(arguments,1),h=Object.create(this.lexer),m={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(m.yy[u]=this.yy[u]);h.setInput(t,m.yy),m.yy.lexer=h,m.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var y=h.yylloc;n.push(y);var g=h.options&&h.options.ranges;"function"==typeof m.yy.parseError?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var p,b,d,f,k,$,x,_,w,T={};;){if(b=e[e.length-1],this.defaultActions[b]?d=this.defaultActions[b]:(null==p&&(w=void 0,"number"!=typeof(w=r.pop()||h.lex()||1)&&(w instanceof Array&&(w=(r=w).pop()),w=this.symbols_[w]||w),p=w),d=a[b]&&a[b][p]),void 0===d||!d.length||!d[0]){var E;for(k in _=[],a[b])this.terminals_[k]&&k>2&&_.push("'"+this.terminals_[k]+"'");E=h.showPosition?"Parse error on line "+(s+1)+":\n"+h.showPosition()+"\nExpecting "+_.join(", ")+", got '"+(this.terminals_[p]||p)+"'":"Parse error on line "+(s+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(E,{text:h.match,token:this.terminals_[p]||p,line:h.yylineno,loc:y,expected:_})}if(d[0]instanceof Array&&d.length>1)throw new Error("Parse Error: multiple actions possible at state: "+b+", token: "+p);switch(d[0]){case 1:e.push(p),i.push(h.yytext),n.push(h.yylloc),e.push(d[1]),p=null,o=h.yyleng,c=h.yytext,s=h.yylineno,y=h.yylloc;break;case 2:if($=this.productions_[d[1]][1],T.$=i[i.length-$],T._$={first_line:n[n.length-($||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-($||1)].first_column,last_column:n[n.length-1].last_column},g&&(T._$.range=[n[n.length-($||1)].range[0],n[n.length-1].range[1]]),void 0!==(f=this.performAction.apply(T,[c,o,s,m.yy,d[1],i,n].concat(l))))return f;$&&(e=e.slice(0,-1*$*2),i=i.slice(0,-1*$),n=n.slice(0,-1*$)),e.push(this.productions_[d[1]][0]),i.push(T.$),n.push(T._$),x=a[e[e.length-2]][e[e.length-1]],e.push(x);break;case 3:return!0}}return!0}},k={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===i.length?this.yylloc.first_column:0)+i[i.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var r,i,n;if(this.options.backtrack_lexer&&(n={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(n.yylloc.range=this.yylloc.range.slice(0))),(i=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=i.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:i?i[i.length-1].length-i[i.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack){for(var a in n)this[a]=n[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,r,i;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var n=this._currentRules(),a=0;a<n.length;a++)if((r=this._input.match(this.rules[n[a]]))&&(!e||r[0].length>e[0].length)){if(e=r,i=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,n[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,n[i]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,r,i){switch(r){case 0:return this.begin("acc_title"),19;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),21;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:case 29:case 33:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return 13;case 8:case 9:break;case 10:return 5;case 11:return 39;case 12:return 32;case 13:return 37;case 14:return 41;case 15:return 42;case 16:return 43;case 17:return 44;case 18:return 34;case 19:return 28;case 20:return 29;case 21:return 36;case 22:return 31;case 23:return 26;case 24:case 25:return 9;case 26:return 8;case 27:return"CARET";case 28:this.begin("options");break;case 30:return 12;case 31:return 35;case 32:this.begin("string");break;case 34:return 33;case 35:return 30;case 36:return 45;case 37:return 7}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:TB\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},options:{rules:[29,30],inclusive:!1},string:{rules:[33,34],inclusive:!1},INITIAL:{rules:[0,2,4,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,31,32,35,36,37,38],inclusive:!0}}};function $(){this.yy={}}return f.lexer=k,$.prototype=f,f.Parser=$,new $}());a.parser=a;const c=a;let s=(0,i.c)().gitGraph.mainBranchName,o=(0,i.c)().gitGraph.mainBranchOrder,l={},h=null,m={};m[s]={name:s,order:o};let u={};u[s]=h;let y=s,g="LR",p=0;function b(){return(0,i.x)({length:7})}let d={};const f=function(t){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0===u[t]){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}{y=t;const e=u[y];h=l[e]}};function k(t,e,r){const i=t.indexOf(e);-1===i?t.push(r):t.splice(i,1,r)}function $(t){const e=t.reduce(((t,e)=>t.seq>e.seq?t:e),t[0]);let r="";t.forEach((function(t){r+=t===e?"\t*":"\t|"}));const n=[r,e.id,e.seq];for(let t in u)u[t]===e.id&&n.push(t);if(i.l.debug(n.join(" ")),e.parents&&2==e.parents.length){const r=l[e.parents[0]];k(t,e,r),t.push(l[e.parents[1]])}else{if(0==e.parents.length)return;{const r=l[e.parents];k(t,e,r)}}$(t=function(t,e){const r=Object.create(null);return t.reduce(((t,e)=>{const i=e.id;return r[i]||(r[i]=!0,t.push(e)),t}),[])}(t))}const x=function(){const t=Object.keys(l).map((function(t){return l[t]}));return t.forEach((function(t){i.l.debug(t.id)})),t.sort(((t,e)=>t.seq-e.seq)),t},_={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},w={getConfig:()=>(0,i.c)().gitGraph,setDirection:function(t){g=t},setOptions:function(t){i.l.debug("options str",t),t=(t=t&&t.trim())||"{}";try{d=JSON.parse(t)}catch(t){i.l.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return d},commit:function(t,e,r,n){i.l.debug("Entering commit:",t,e,r,n),e=i.e.sanitizeText(e,(0,i.c)()),t=i.e.sanitizeText(t,(0,i.c)()),n=i.e.sanitizeText(n,(0,i.c)());const a={id:e||p+"-"+b(),message:t,seq:p++,type:r||_.NORMAL,tag:n||"",parents:null==h?[]:[h.id],branch:y};h=a,l[a.id]=a,u[y]=a.id,i.l.debug("in pushCommit "+a.id)},branch:function(t,e){if(t=i.e.sanitizeText(t,(0,i.c)()),void 0!==u[t]){let e=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw e.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},e}u[t]=null!=h?h.id:null,m[t]={name:t,order:e?parseInt(e,10):null},f(t),i.l.debug("in createBranch")},merge:function(t,e,r,n){t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)());const a=l[u[y]],c=l[u[t]];if(y===t){let e=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(void 0===a||!a){let e=new Error('Incorrect usage of "merge". Current branch ('+y+")has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},e}if(void 0===u[t]){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},e}if(void 0===c||!c){let e=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},e}if(a===c){let e=new Error('Incorrect usage of "merge". Both branches have same head');throw e.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},e}if(e&&void 0!==l[e]){let i=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw i.hash={text:"merge "+t+e+r+n,token:"merge "+t+e+r+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+n]},i}const s={id:e||p+"-"+b(),message:"merged branch "+t+" into "+y,seq:p++,parents:[null==h?null:h.id,u[t]],branch:y,type:_.MERGE,customType:r,customId:!!e,tag:n||""};h=s,l[s.id]=s,u[y]=s.id,i.l.debug(u),i.l.debug("in mergeBranch")},cherryPick:function(t,e,r){if(i.l.debug("Entering cherryPick:",t,e,r),t=i.e.sanitizeText(t,(0,i.c)()),e=i.e.sanitizeText(e,(0,i.c)()),r=i.e.sanitizeText(r,(0,i.c)()),!t||void 0===l[t]){let r=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}let n=l[t],a=n.branch;if(n.type===_.MERGE){let r=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}if(!e||void 0===l[e]){if(a===y){let r=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const c=l[u[y]];if(void 0===c||!c){let r=new Error('Incorrect usage of "cherry-pick". Current branch ('+y+")has no commits");throw r.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},r}const s={id:p+"-"+b(),message:"cherry-picked "+n+" into "+y,seq:p++,parents:[null==h?null:h.id,n.id],branch:y,type:_.CHERRY_PICK,tag:r??"cherry-pick:"+n.id};h=s,l[s.id]=s,u[y]=s.id,i.l.debug(u),i.l.debug("in cherryPick")}},checkout:f,prettyPrint:function(){i.l.debug(l),$([x()[0]])},clear:function(){l={},h=null;let t=(0,i.c)().gitGraph.mainBranchName,e=(0,i.c)().gitGraph.mainBranchOrder;u={},u[t]=null,m={},m[t]={name:t,order:e},y=t,p=0,(0,i.t)()},getBranchesAsObjArray:function(){return Object.values(m).map(((t,e)=>null!==t.order?t:{...t,order:parseFloat(`0.${e}`,10)})).sort(((t,e)=>t.order-e.order)).map((({name:t})=>({name:t})))},getBranches:function(){return u},getCommits:function(){return l},getCommitsArray:x,getCurrentBranch:function(){return y},getDirection:function(){return g},getHead:function(){return h},setAccTitle:i.s,getAccTitle:i.g,getAccDescription:i.a,setAccDescription:i.b,setDiagramTitle:i.q,getDiagramTitle:i.r,commitType:_};let T={};let E={},L={},M=[],v=0,A="LR";const R=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];r="string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?t:[];for(const t of r){const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=t.trim(),e.appendChild(r)}return e},O=(t,e,r)=>{const n=(0,i.y)().gitGraph,a=t.append("g").attr("class","commit-bullets"),c=t.append("g").attr("class","commit-labels");let s=0;"TB"===A&&(s=30),Object.keys(e).sort(((t,r)=>e[t].seq-e[r].seq)).forEach((t=>{const i=e[t],o="TB"===A?s+10:E[i.branch].pos,l="TB"===A?E[i.branch].pos:s+10;if(r){let t,e=void 0!==i.customType&&""!==i.customType?i.customType:i.type;switch(e){case 0:default:t="commit-normal";break;case 1:t="commit-reverse";break;case 2:t="commit-highlight";break;case 3:t="commit-merge";break;case 4:t="commit-cherry-pick"}if(2===e){const e=a.append("rect");e.attr("x",l-10),e.attr("y",o-10),e.attr("height",20),e.attr("width",20),e.attr("class",`commit ${i.id} commit-highlight${E[i.branch].index%8} ${t}-outer`),a.append("rect").attr("x",l-6).attr("y",o-6).attr("height",12).attr("width",12).attr("class",`commit ${i.id} commit${E[i.branch].index%8} ${t}-inner`)}else if(4===e)a.append("circle").attr("cx",l).attr("cy",o).attr("r",10).attr("class",`commit ${i.id} ${t}`),a.append("circle").attr("cx",l-3).attr("cy",o+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),a.append("circle").attr("cx",l+3).attr("cy",o+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${i.id} ${t}`),a.append("line").attr("x1",l+3).attr("y1",o+1).attr("x2",l).attr("y2",o-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`),a.append("line").attr("x1",l-3).attr("y1",o+1).attr("x2",l).attr("y2",o-5).attr("stroke","#fff").attr("class",`commit ${i.id} ${t}`);else{const r=a.append("circle");if(r.attr("cx",l),r.attr("cy",o),r.attr("r",3===i.type?9:10),r.attr("class",`commit ${i.id} commit${E[i.branch].index%8}`),3===e){const e=a.append("circle");e.attr("cx",l),e.attr("cy",o),e.attr("r",6),e.attr("class",`commit ${t} ${i.id} commit${E[i.branch].index%8}`)}1===e&&a.append("path").attr("d",`M ${l-5},${o-5}L${l+5},${o+5}M${l-5},${o+5}L${l+5},${o-5}`).attr("class",`commit ${t} ${i.id} commit${E[i.branch].index%8}`)}}if(L[i.id]="TB"===A?{x:l,y:s+10}:{x:s+10,y:o},r){const t=4,e=2;if(4!==i.type&&(i.customId&&3===i.type||3!==i.type)&&n.showCommitLabel){const r=c.append("g"),a=r.insert("rect").attr("class","commit-label-bkg"),h=r.append("text").attr("x",s).attr("y",o+25).attr("class","commit-label").text(i.id);let m=h.node().getBBox();if(a.attr("x",s+10-m.width/2-e).attr("y",o+13.5).attr("width",m.width+2*e).attr("height",m.height+2*e),"TB"===A&&(a.attr("x",l-(m.width+4*t+5)).attr("y",o-12),h.attr("x",l-(m.width+4*t)).attr("y",o+m.height-12)),"TB"!==A&&h.attr("x",s+10-m.width/2),n.rotateCommitLabel)if("TB"===A)h.attr("transform","rotate(-45, "+l+", "+o+")"),a.attr("transform","rotate(-45, "+l+", "+o+")");else{let t=-7.5-(m.width+10)/25*9.5,e=10+m.width/25*8.5;r.attr("transform","translate("+t+", "+e+") rotate(-45, "+s+", "+o+")")}}if(i.tag){const r=c.insert("polygon"),n=c.append("circle"),a=c.append("text").attr("y",o-16).attr("class","tag-label").text(i.tag);let h=a.node().getBBox();a.attr("x",s+10-h.width/2);const m=h.height/2,u=o-19.2;r.attr("class","tag-label-bkg").attr("points",`\n ${s-h.width/2-t/2},${u+e}\n ${s-h.width/2-t/2},${u-e}\n ${s+10-h.width/2-t},${u-m-e}\n ${s+10+h.width/2+t},${u-m-e}\n ${s+10+h.width/2+t},${u+m+e}\n ${s+10-h.width/2-t},${u+m+e}`),n.attr("cx",s-h.width/2+t/2).attr("cy",u).attr("r",1.5).attr("class","tag-hole"),"TB"===A&&(r.attr("class","tag-label-bkg").attr("points",`\n ${l},${s+e}\n ${l},${s-e}\n ${l+10},${s-m-e}\n ${l+10+h.width+t},${s-m-e}\n ${l+10+h.width+t},${s+m+e}\n ${l+10},${s+m+e}`).attr("transform","translate(12,12) rotate(45, "+l+","+s+")"),n.attr("cx",l+t/2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+l+","+s+")"),a.attr("x",l+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+l+","+s+")"))}}s+=50,s>v&&(v=s)}))},I=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(M.every((t=>Math.abs(t-i)>=10)))return M.push(i),i;const n=Math.abs(t-e);return I(t,e-n/5,r+1)},C={parser:c,db:w,renderer:{draw:function(t,e,r,a){E={},L={},T={},v=0,M=[],A="LR";const c=(0,i.y)(),s=c.gitGraph;i.l.debug("in gitgraph renderer",t+"\n","id:",e,r),T=a.db.getCommits();const o=a.db.getBranchesAsObjArray();A=a.db.getDirection();const l=(0,n.Ys)(`[id="${e}"]`);let h=0;o.forEach(((t,e)=>{const r=R(t.name),i=l.append("g"),n=i.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node().appendChild(r);let c=r.getBBox();E[t.name]={pos:h,index:e},h+=50+(s.rotateCommitLabel?40:0)+("TB"===A?c.width/2:0),a.remove(),n.remove(),i.remove()})),O(l,T,!1),s.showBranches&&((t,e)=>{const r=(0,i.y)().gitGraph,n=t.append("g");e.forEach(((t,e)=>{const i=e%8,a=E[t.name].pos,c=n.append("line");c.attr("x1",0),c.attr("y1",a),c.attr("x2",v),c.attr("y2",a),c.attr("class","branch branch"+i),"TB"===A&&(c.attr("y1",30),c.attr("x1",a),c.attr("y2",v),c.attr("x2",a)),M.push(a);let s=t.name;const o=R(s),l=n.insert("rect"),h=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+i);h.node().appendChild(o);let m=o.getBBox();l.attr("class","branchLabelBkg label"+i).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(!0===r.rotateCommitLabel?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),h.attr("transform","translate("+(-m.width-14-(!0===r.rotateCommitLabel?30:0))+", "+(a-m.height/2-1)+")"),"TB"===A&&(l.attr("x",a-m.width/2-10).attr("y",0),h.attr("transform","translate("+(a-m.width/2-5)+", 0)")),"TB"!==A&&l.attr("transform","translate(-19, "+(a-m.height/2)+")")}))})(l,o),((t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach((t=>{const i=e[t];i.parents&&i.parents.length>0&&i.parents.forEach((t=>{((t,e,r,i)=>{const n=L[e.id],a=L[r.id],c=((t,e,r)=>Object.keys(r).filter((i=>r[i].branch===e.branch&&r[i].seq>t.seq&&r[i].seq<e.seq)).length>0)(e,r,i);let s,o="",l="",h=0,m=0,u=E[r.branch].index;if(c){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",h=10,m=10,u=E[r.branch].index;const t=n.y<a.y?I(n.y,a.y):I(a.y,n.y),e=n.x<a.x?I(n.x,a.x):I(a.x,n.x);s="TB"===A?n.x<a.x?`M ${n.x} ${n.y} L ${e-h} ${n.y} ${l} ${e} ${n.y+m} L ${e} ${a.y-h} ${o} ${e+m} ${a.y} L ${a.x} ${a.y}`:`M ${n.x} ${n.y} L ${e+h} ${n.y} ${o} ${e} ${n.y+m} L ${e} ${a.y-h} ${l} ${e-m} ${a.y} L ${a.x} ${a.y}`:n.y<a.y?`M ${n.x} ${n.y} L ${n.x} ${t-h} ${o} ${n.x+m} ${t} L ${a.x-h} ${t} ${l} ${a.x} ${t+m} L ${a.x} ${a.y}`:`M ${n.x} ${n.y} L ${n.x} ${t+h} ${l} ${n.x+m} ${t} L ${a.x-h} ${t} ${o} ${a.x} ${t-m} L ${a.x} ${a.y}`}else"TB"===A?(n.x<a.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",h=20,m=20,u=E[r.branch].index,s=`M ${n.x} ${n.y} L ${a.x-h} ${n.y} ${l} ${a.x} ${n.y+m} L ${a.x} ${a.y}`),n.x>a.x&&(o="A 20 20, 0, 0, 0,",l="A 20 20, 0, 0, 1,",h=20,m=20,u=E[e.branch].index,s=`M ${n.x} ${n.y} L ${n.x} ${a.y-h} ${l} ${n.x-m} ${a.y} L ${a.x} ${a.y}`),n.x===a.x&&(u=E[e.branch].index,s=`M ${n.x} ${n.y} L ${n.x+h} ${n.y} ${o} ${n.x+m} ${a.y+h} L ${a.x} ${a.y}`)):(n.y<a.y&&(o="A 20 20, 0, 0, 0,",h=20,m=20,u=E[r.branch].index,s=`M ${n.x} ${n.y} L ${n.x} ${a.y-h} ${o} ${n.x+m} ${a.y} L ${a.x} ${a.y}`),n.y>a.y&&(o="A 20 20, 0, 0, 0,",h=20,m=20,u=E[e.branch].index,s=`M ${n.x} ${n.y} L ${a.x-h} ${n.y} ${o} ${a.x} ${n.y-m} L ${a.x} ${a.y}`),n.y===a.y&&(u=E[e.branch].index,s=`M ${n.x} ${n.y} L ${n.x} ${a.y-h} ${o} ${n.x+m} ${a.y} L ${a.x} ${a.y}`));t.append("path").attr("d",s).attr("class","arrow arrow"+u%8)})(r,e[t],i,e)}))}))})(l,T),O(l,T,!0),i.u.insertTitle(l,"gitTitleText",s.titleTopMargin,a.db.getDiagramTitle()),(0,i.z)(void 0,l,s.diagramPadding,s.useMaxWidth??c.useMaxWidth)}},styles:t=>`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n ${[0,1,2,3,4,5,6,7].map((e=>`\n .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${e} { fill: ${t["git"+e]}; }\n .arrow${e} { stroke: ${t["git"+e]}; }\n `)).join("\n")}\n\n .branch {\n stroke-width: 1;\n stroke: ${t.lineColor};\n stroke-dasharray: 2;\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n .commit-reverse {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n stroke-width: 3;\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${t.primaryColor};\n fill: ${t.primaryColor};\n }\n\n .arrow { stroke-width: 8; stroke-linecap: round; fill: none}\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`}}}]);
|
notebook/static/3618.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3618],{23618:(t,i,n)=>{n.d(i,{diagram:()=>h});var s=n(86850),e=(n(27693),n(7608),n(2314),n(31699),function(){var t=function(t,i,n,s){for(n=n||{},s=t.length;s--;n[t[s]]=i);return n},i=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,i,n,s,e,r,h){switch(r.length,e){case 1:return s;case 4:break;case 6:s.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(i,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(i,[2,3]),t(i,[2,4]),t(i,[2,5]),t(i,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,i){if(!i.recoverable){var n=new Error(t);throw n.hash=i,n}this.trace(t)},parse:function(t){var i=[0],n=[],s=[null],e=[],r=this.table,h="",o=0,l=0,c=e.slice.call(arguments,1),a=Object.create(this.lexer),y={yy:{}};for(var u in this.yy)Object.prototype.hasOwnProperty.call(this.yy,u)&&(y.yy[u]=this.yy[u]);a.setInput(t,y.yy),y.yy.lexer=a,y.yy.parser=this,void 0===a.yylloc&&(a.yylloc={});var p=a.yylloc;e.push(p);var f=a.options&&a.options.ranges;"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,m,d,k,x,b,v,E,w={};;){if(_=i[i.length-1],this.defaultActions[_]?m=this.defaultActions[_]:(null==g&&(E=void 0,"number"!=typeof(E=n.pop()||a.lex()||1)&&(E instanceof Array&&(E=(n=E).pop()),E=this.symbols_[E]||E),g=E),m=r[_]&&r[_][g]),void 0===m||!m.length||!m[0]){var I;for(k in v=[],r[_])this.terminals_[k]&&k>2&&v.push("'"+this.terminals_[k]+"'");I=a.showPosition?"Parse error on line "+(o+1)+":\n"+a.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(o+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError(I,{text:a.match,token:this.terminals_[g]||g,line:a.yylineno,loc:p,expected:v})}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(m[0]){case 1:i.push(g),s.push(a.yytext),e.push(a.yylloc),i.push(m[1]),g=null,l=a.yyleng,h=a.yytext,o=a.yylineno,p=a.yylloc;break;case 2:if(x=this.productions_[m[1]][1],w.$=s[s.length-x],w._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},f&&(w._$.range=[e[e.length-(x||1)].range[0],e[e.length-1].range[1]]),void 0!==(d=this.performAction.apply(w,[h,l,o,y.yy,m[1],s,e].concat(c))))return d;x&&(i=i.slice(0,-1*x*2),s=s.slice(0,-1*x),e=e.slice(0,-1*x)),i.push(this.productions_[m[1]][0]),s.push(w.$),e.push(w._$),b=r[i[i.length-2]][i[i.length-1]],i.push(b);break;case 3:return!0}}return!0}},s={EOF:1,parseError:function(t,i){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,i)},setInput:function(t,i){return this.yy=i||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var i=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-i),this.offset-=i;var s=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===s.length?this.yylloc.first_column:0)+s[s.length-n.length].length-n[0].length:this.yylloc.first_column-i},this.options.ranges&&(this.yylloc.range=[e[0],e[0]+this.yyleng-i]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),i=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+i+"^"},test_match:function(t,i){var n,s,e;if(this.options.backtrack_lexer&&(e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(e.yylloc.range=this.yylloc.range.slice(0))),(s=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=s.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:s?s[s.length-1].length-s[s.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,i,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var r in e)this[r]=e[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,i,n,s;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var e=this._currentRules(),r=0;r<e.length;r++)if((n=this._input.match(this.rules[e[r]]))&&(!i||n[0].length>i[0].length)){if(i=n,s=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,e[r])))return t;if(this._backtrack){i=!1;continue}return!1}if(!this.options.flex)break}return i?!1!==(t=this.test_match(i,e[s]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,i,n,s){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function e(){this.yy={}}return n.lexer=s,e.prototype=n,n.Parser=e,new e}());e.parser=e;let r=false;const h={parser:e,db:{clear:()=>{r=false},setInfo:t=>{r=t},getInfo:()=>r},renderer:{draw:(t,i,n)=>{s.l.debug("rendering info diagram\n"+t);const e=(0,s.A)(i);(0,s.i)(e,100,400,!0),e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${n}`)}}}}}]);
|
notebook/static/3672.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3672],{63672:(t,e,a)=>{a.d(e,{diagram:()=>f});var r=a(38968),i=a(2314),n=a(7259),d=a(67406),o=a(86850);a(27693),a(7608),a(31699);let s=0;const l=function(t,e,a,r){const{displayText:i,cssStyle:n}=e.getDisplayDetails(),d=t.append("tspan").attr("x",r.padding).text(i);""!==n&&d.attr("style",e.cssStyle),a||d.attr("dy",r.textHeight)},p=function(t,e,a,r){o.l.debug("Rendering class ",e,a);const i=e.id,n={id:i,label:e.id,width:0,height:0},d=t.append("g").attr("id",r.db.lookUpDomId(i)).attr("class","classGroup");let s;s=e.link?d.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",a.textHeight+a.padding).attr("x",0):d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);let p=!0;e.annotations.forEach((function(t){const e=s.append("tspan").text("«"+t+"»");p||e.attr("dy",a.textHeight),p=!1}));let c=function(t){let e=t.id;return t.type&&(e+="<"+(0,o.v)(t.type)+">"),e}(e);const g=s.append("tspan").text(c).attr("class","title");p||g.attr("dy",a.textHeight);const h=s.node().getBBox().height;let f,x,u;if(e.members.length>0){f=d.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin/2).attr("y2",a.padding+h+a.dividerMargin/2);const t=d.append("text").attr("x",a.padding).attr("y",h+a.dividerMargin+a.textHeight).attr("fill","white").attr("class","classText");p=!0,e.members.forEach((function(e){l(t,e,p,a),p=!1})),x=t.node().getBBox()}if(e.methods.length>0){u=d.append("line").attr("x1",0).attr("y1",a.padding+h+a.dividerMargin+x.height).attr("y2",a.padding+h+a.dividerMargin+x.height);const t=d.append("text").attr("x",a.padding).attr("y",h+2*a.dividerMargin+x.height+a.textHeight).attr("fill","white").attr("class","classText");p=!0,e.methods.forEach((function(e){l(t,e,p,a),p=!1}))}const y=d.node().getBBox();var b=" ";e.cssClasses.length>0&&(b+=e.cssClasses.join(" "));const m=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",y.width+2*a.padding).attr("height",y.height+a.padding+.5*a.dividerMargin).attr("class",b).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(m-t.getBBox().width)/2)})),e.tooltip&&s.insert("title").text(e.tooltip),f&&f.attr("x2",m),u&&u.attr("x2",m),n.width=m,n.height=y.height+a.padding+.5*a.dividerMargin,n};let c={};const g=function(t){const e=Object.entries(c).find((e=>e[1].label===t));if(e)return e[0]},h={draw:function(t,e,a,r){const l=(0,o.c)().class;c={},o.l.info("Rendering diagram "+t);const h=(0,o.c)().securityLevel;let f;"sandbox"===h&&(f=(0,i.Ys)("#i"+e));const x="sandbox"===h?(0,i.Ys)(f.nodes()[0].contentDocument.body):(0,i.Ys)("body"),u=x.select(`[id='${e}']`);var y;(y=u).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),y.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),y.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),y.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");const b=new d.k({multigraph:!0});b.setGraph({isMultiGraph:!0}),b.setDefaultEdgeLabel((function(){return{}}));const m=r.db.getClasses(),k=Object.keys(m);for(const t of k){const e=m[t],a=p(u,e,l,r);c[a.id]=a,b.setNode(a.id,a),o.l.info("Org height: "+a.height)}r.db.getRelations().forEach((function(t){o.l.info("tjoho"+g(t.id1)+g(t.id2)+JSON.stringify(t)),b.setEdge(g(t.id1),g(t.id2),{relation:t},t.title||"DEFAULT")})),r.db.getNotes().forEach((function(t){o.l.debug(`Adding note: ${JSON.stringify(t)}`);const e=function(t,e,a,r){o.l.debug("Rendering note ",e,a);const i=e.id,n={id:i,text:e.text,width:0,height:0},d=t.append("g").attr("id",i).attr("class","classGroup");let s=d.append("text").attr("y",a.textHeight+a.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split("\n");l.forEach((function(t){o.l.debug(`Adding line: ${t}`),s.append("tspan").text(t).attr("class","title").attr("dy",a.textHeight)}));const p=d.node().getBBox(),c=d.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",p.width+2*a.padding).attr("height",p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin).node().getBBox().width;return s.node().childNodes.forEach((function(t){t.setAttribute("x",(c-t.getBBox().width)/2)})),n.width=c,n.height=p.height+l.length*a.textHeight+a.padding+.5*a.dividerMargin,n}(u,t,l);c[e.id]=e,b.setNode(e.id,e),t.class&&t.class in m&&b.setEdge(t.id,g(t.class),{relation:{id1:t.id,id2:t.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")})),(0,n.bK)(b),b.nodes().forEach((function(t){void 0!==t&&void 0!==b.node(t)&&(o.l.debug("Node "+t+": "+JSON.stringify(b.node(t))),x.select("#"+(r.db.lookUpDomId(t)||t)).attr("transform","translate("+(b.node(t).x-b.node(t).width/2)+","+(b.node(t).y-b.node(t).height/2)+" )"))})),b.edges().forEach((function(t){void 0!==t&&void 0!==b.edge(t)&&(o.l.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(b.edge(t))),function(t,e,a,r,n){const d=function(t){switch(t){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter((t=>!Number.isNaN(t.y)));const l=e.points,p=(0,i.jvg)().x((function(t){return t.x})).y((function(t){return t.y})).curve(i.$0Z),c=t.append("path").attr("d",p(l)).attr("id","edge"+s).attr("class","relation");let g,h,f="";r.arrowMarkerAbsolute&&(f=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,f=f.replace(/\(/g,"\\("),f=f.replace(/\)/g,"\\)")),1==a.relation.lineType&&c.attr("class","relation dashed-line"),10==a.relation.lineType&&c.attr("class","relation dotted-line"),"none"!==a.relation.type1&&c.attr("marker-start","url("+f+"#"+d(a.relation.type1)+"Start)"),"none"!==a.relation.type2&&c.attr("marker-end","url("+f+"#"+d(a.relation.type2)+"End)");const x=e.points.length;let u,y,b,m,k=o.u.calcLabelPosition(e.points);if(g=k.x,h=k.y,x%2!=0&&x>1){let t=o.u.calcCardinalityPosition("none"!==a.relation.type1,e.points,e.points[0]),r=o.u.calcCardinalityPosition("none"!==a.relation.type2,e.points,e.points[x-1]);o.l.debug("cardinality_1_point "+JSON.stringify(t)),o.l.debug("cardinality_2_point "+JSON.stringify(r)),u=t.x,y=t.y,b=r.x,m=r.y}if(void 0!==a.title){const e=t.append("g").attr("class","classLabel"),i=e.append("text").attr("class","label").attr("x",g).attr("y",h).attr("fill","red").attr("text-anchor","middle").text(a.title);window.label=i;const n=i.node().getBBox();e.insert("rect",":first-child").attr("class","box").attr("x",n.x-r.padding/2).attr("y",n.y-r.padding/2).attr("width",n.width+r.padding).attr("height",n.height+r.padding)}o.l.info("Rendering relation "+JSON.stringify(a)),void 0!==a.relationTitle1&&"none"!==a.relationTitle1&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",u).attr("y",y).attr("fill","black").attr("font-size","6").text(a.relationTitle1),void 0!==a.relationTitle2&&"none"!==a.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",b).attr("y",m).attr("fill","black").attr("font-size","6").text(a.relationTitle2),s++}(u,b.edge(t),b.edge(t).relation,l,r))}));const w=u.node().getBBox(),E=w.width+40,L=w.height+40;(0,o.i)(u,L,E,l.useMaxWidth);const T=`${w.x-20} ${w.y-20} ${E} ${L}`;o.l.debug(`viewBox ${T}`),u.attr("viewBox",T)}},f={parser:r.p,db:r.d,renderer:h,styles:r.s,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,r.d.clear()}}}}]);
|
notebook/static/3791.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3791],{83330:(t,e,i)=>{i.d(e,{diagram:()=>y});var n=i(86850),s=i(2314),r=(i(27693),i(7608),i(31699),function(){var t=function(t,e,i,n){for(i=i||{},n=t.length;n--;i[t[n]]=e);return i},e=[1,3],i=[1,4],n=[1,5],s=[1,6],r=[1,10,12,14,16,18,19,20,21,22],l=[2,4],a=[1,5,10,12,14,16,18,19,20,21,22],c=[20,21,22],o=[2,7],h=[1,12],u=[1,13],y=[1,14],p=[1,15],d=[1,16],g=[1,17],_={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,PIE:5,document:6,showData:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,section:19,NEWLINE:20,";":21,EOF:22,$accept:0,$end:1},terminals_:{2:"error",5:"PIE",7:"showData",10:"txt",11:"value",12:"title",13:"title_value",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"section",20:"NEWLINE",21:";",22:"EOF"},productions_:[0,[3,2],[3,2],[3,3],[6,0],[6,2],[8,2],[9,0],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[4,1],[4,1],[4,1]],performAction:function(t,e,i,n,s,r,l){var a=r.length-1;switch(s){case 3:n.setShowData(!0);break;case 6:this.$=r[a-1];break;case 8:n.addSection(r[a-1],n.cleanupValue(r[a]));break;case 9:this.$=r[a].trim(),n.setDiagramTitle(this.$);break;case 10:this.$=r[a].trim(),n.setAccTitle(this.$);break;case 11:case 12:this.$=r[a].trim(),n.setAccDescription(this.$);break;case 13:n.addSection(r[a].substr(8)),this.$=r[a].substr(8)}},table:[{3:1,4:2,5:e,20:i,21:n,22:s},{1:[3]},{3:7,4:2,5:e,20:i,21:n,22:s},t(r,l,{6:8,7:[1,9]}),t(a,[2,14]),t(a,[2,15]),t(a,[2,16]),{1:[2,1]},t(c,o,{8:10,9:11,1:[2,2],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,l,{6:18}),t(r,[2,5]),{4:19,20:i,21:n,22:s},{11:[1,20]},{13:[1,21]},{15:[1,22]},{17:[1,23]},t(c,[2,12]),t(c,[2,13]),t(c,o,{8:10,9:11,1:[2,3],10:h,12:u,14:y,16:p,18:d,19:g}),t(r,[2,6]),t(c,[2,8]),t(c,[2,9]),t(c,[2,10]),t(c,[2,11])],defaultActions:{7:[2,1]},parseError:function(t,e){if(!e.recoverable){var i=new Error(t);throw i.hash=e,i}this.trace(t)},parse:function(t){var e=[0],i=[],n=[null],s=[],r=this.table,l="",a=0,c=0,o=s.slice.call(arguments,1),h=Object.create(this.lexer),u={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(u.yy[y]=this.yy[y]);h.setInput(t,u.yy),u.yy.lexer=h,u.yy.parser=this,void 0===h.yylloc&&(h.yylloc={});var p=h.yylloc;s.push(p);var d=h.options&&h.options.ranges;"function"==typeof u.yy.parseError?this.parseError=u.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var g,_,f,m,b,k,x,v,S,w={};;){if(_=e[e.length-1],this.defaultActions[_]?f=this.defaultActions[_]:(null==g&&(S=void 0,"number"!=typeof(S=i.pop()||h.lex()||1)&&(S instanceof Array&&(S=(i=S).pop()),S=this.symbols_[S]||S),g=S),f=r[_]&&r[_][g]),void 0===f||!f.length||!f[0]){var $;for(b in v=[],r[_])this.terminals_[b]&&b>2&&v.push("'"+this.terminals_[b]+"'");$=h.showPosition?"Parse error on line "+(a+1)+":\n"+h.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[g]||g)+"'":"Parse error on line "+(a+1)+": Unexpected "+(1==g?"end of input":"'"+(this.terminals_[g]||g)+"'"),this.parseError($,{text:h.match,token:this.terminals_[g]||g,line:h.yylineno,loc:p,expected:v})}if(f[0]instanceof Array&&f.length>1)throw new Error("Parse Error: multiple actions possible at state: "+_+", token: "+g);switch(f[0]){case 1:e.push(g),n.push(h.yytext),s.push(h.yylloc),e.push(f[1]),g=null,c=h.yyleng,l=h.yytext,a=h.yylineno,p=h.yylloc;break;case 2:if(k=this.productions_[f[1]][1],w.$=n[n.length-k],w._$={first_line:s[s.length-(k||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(k||1)].first_column,last_column:s[s.length-1].last_column},d&&(w._$.range=[s[s.length-(k||1)].range[0],s[s.length-1].range[1]]),void 0!==(m=this.performAction.apply(w,[l,c,a,u.yy,f[1],n,s].concat(o))))return m;k&&(e=e.slice(0,-1*k*2),n=n.slice(0,-1*k),s=s.slice(0,-1*k)),e.push(this.productions_[f[1]][0]),n.push(w.$),s.push(w._$),x=r[e[e.length-2]][e[e.length-1]],e.push(x);break;case 3:return!0}}return!0}},f={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,i=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var n=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),i.length-1&&(this.yylineno-=i.length-1);var s=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:i?(i.length===n.length?this.yylloc.first_column:0)+n[n.length-i.length].length-i[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[s[0],s[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var i,n,s;if(this.options.backtrack_lexer&&(s={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(s.yylloc.range=this.yylloc.range.slice(0))),(n=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],i=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),i)return i;if(this._backtrack){for(var r in s)this[r]=s[r];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,i,n;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var s=this._currentRules(),r=0;r<s.length;r++)if((i=this._input.match(this.rules[s[r]]))&&(!e||i[0].length>e[0].length)){if(e=i,n=r,this.options.backtrack_lexer){if(!1!==(t=this.test_match(i,s[r])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,s[n]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){return this.next()||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,i,n){switch(i){case 0:case 1:case 3:case 4:break;case 2:return 20;case 5:return this.begin("title"),12;case 6:return this.popState(),"title_value";case 7:return this.begin("acc_title"),14;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),16;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:case 15:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 16:return"txt";case 17:return 5;case 18:return 7;case 19:return"value";case 20:return 22}},rules:[/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[6],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,7,9,11,14,17,18,19,20],inclusive:!0}}};function m(){this.yy={}}return _.lexer=f,m.prototype=_,_.Parser=m,new m}());r.parser=r;const l=r,a=n.B.pie,c={};let o=c,h=false;const u=structuredClone(a),y={parser:l,db:{getConfig:()=>structuredClone(u),clear:()=>{o=structuredClone(c),h=false,(0,n.t)()},setDiagramTitle:n.q,getDiagramTitle:n.r,setAccTitle:n.s,getAccTitle:n.g,setAccDescription:n.b,getAccDescription:n.a,addSection:(t,e)=>{t=(0,n.d)(t,(0,n.c)()),void 0===o[t]&&(o[t]=e,n.l.debug(`added new section: ${t}, with value: ${e}`))},getSections:()=>o,cleanupValue:t=>(":"===t.substring(0,1)&&(t=t.substring(1).trim()),Number(t.trim())),setShowData:t=>{h=t},getShowData:()=>h},renderer:{draw:(t,e,i,r)=>{var l,a;n.l.debug("rendering pie chart\n"+t);const c=r.db,o=(0,n.c)(),h=(0,n.C)(c.getConfig(),o.pie),u=(null==(a=null==(l=document.getElementById(e))?void 0:l.parentElement)?void 0:a.offsetWidth)??h.useWidth,y=(0,n.A)(e);y.attr("viewBox",`0 0 ${u} 450`),(0,n.i)(y,450,u,h.useMaxWidth);const p=y.append("g");p.attr("transform","translate("+u/2+",225)");const{themeVariables:d}=o;let[g]=(0,n.D)(d.pieOuterStrokeWidth);g??(g=2);const _=h.textPosition,f=Math.min(u,450)/2-40,m=(0,s.Nb1)().innerRadius(0).outerRadius(f),b=(0,s.Nb1)().innerRadius(f*_).outerRadius(f*_);p.append("circle").attr("cx",0).attr("cy",0).attr("r",f+g/2).attr("class","pieOuterCircle");const k=c.getSections(),x=(t=>{const e=Object.entries(t).map((t=>({label:t[0],value:t[1]}))).sort(((t,e)=>e.value-t.value));return(0,s.ve8)().value((t=>t.value))(e)})(k),v=[d.pie1,d.pie2,d.pie3,d.pie4,d.pie5,d.pie6,d.pie7,d.pie8,d.pie9,d.pie10,d.pie11,d.pie12],S=(0,s.PKp)(v);p.selectAll("mySlices").data(x).enter().append("path").attr("d",m).attr("fill",(t=>S(t.data.label))).attr("class","pieCircle");let w=0;Object.keys(k).forEach((t=>{w+=k[t]})),p.selectAll("mySlices").data(x).enter().append("text").text((t=>(t.data.value/w*100).toFixed(0)+"%")).attr("transform",(t=>"translate("+b.centroid(t)+")")).style("text-anchor","middle").attr("class","slice"),p.append("text").text(c.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");const $=p.selectAll(".legend").data(S.domain()).enter().append("g").attr("class","legend").attr("transform",((t,e)=>"translate(216,"+(22*e-22*S.domain().length/2)+")"));$.append("rect").attr("width",18).attr("height",18).style("fill",S).style("stroke",S),$.data(x).append("text").attr("x",22).attr("y",14).text((t=>{const{label:e,value:i}=t.data;return c.getShowData()?`${e} [${i}]`:e}))}},styles:t=>`\n .pieCircle{\n stroke: ${t.pieStrokeColor};\n stroke-width : ${t.pieStrokeWidth};\n opacity : ${t.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${t.pieOuterStrokeColor};\n stroke-width: ${t.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${t.pieTitleTextSize};\n fill: ${t.pieTitleTextColor};\n font-family: ${t.fontFamily};\n }\n .slice {\n font-family: ${t.fontFamily};\n fill: ${t.pieSectionTextColor};\n font-size:${t.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${t.pieLegendTextColor};\n font-family: ${t.fontFamily};\n font-size: ${t.pieLegendTextSize};\n }\n`}}}]);
|
notebook/static/3993.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[3993],{74193:(e,t,n)=>{n.d(t,{a:()=>l});var r=n(51723);function l(e,t){var n=e.append("foreignObject").attr("width","100000"),l=n.append("xhtml:div");l.attr("xmlns","http://www.w3.org/1999/xhtml");var o=t.label;switch(typeof o){case"function":l.insert(o);break;case"object":l.insert((function(){return o}));break;default:l.html(o)}r.bg(l,t.labelStyle),l.style("display","inline-block"),l.style("white-space","nowrap");var a=l.node().getBoundingClientRect();return n.attr("width",a.width).attr("height",a.height),n}},51723:(e,t,n)=>{n.d(t,{$p:()=>d,O1:()=>a,WR:()=>p,bF:()=>o,bg:()=>c});var r=n(53541),l=n(48489);function o(e,t){return!!e.children(t).length}function a(e){return i(e.v)+":"+i(e.w)+":"+i(e.name)}var s=/:/g;function i(e){return e?String(e).replace(s,"\\:"):""}function c(e,t){t&&e.attr("style",t)}function d(e,t,n){t&&e.attr("class",t).attr("class",n+" "+e.attr("class"))}function p(e,t){var n=t.graph();if(r.Z(n)){var o=n.transition;if(l.Z(o))return o(e)}return e}},3993:(e,t,n)=>{n.d(t,{diagram:()=>a});var r=n(87763),l=n(18056),o=n(86850);n(2314),n(67406),n(7259),n(81779),n(27693),n(7608),n(31699);const a={parser:r.p,db:r.f,renderer:l.f,styles:l.a,init:e=>{e.flowchart||(e.flowchart={}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,(0,o.p)({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}}),l.f.setConf(e.flowchart),r.f.clear(),r.f.setGen("gen-2")}}},18056:(e,t,n)=>{n.d(t,{a:()=>h,f:()=>u});var r=n(67406),l=n(2314),o=n(86850),a=n(59308),s=n(74193),i=n(90267),c=n(42528);const d=(e,t)=>i.Z.lang.round(c.Z.parse(e)[t]);var p=n(14728);const b={},w=function(e,t,n,r,l,a){const i=r.select(`[id="${n}"]`);Object.keys(e).forEach((function(n){const r=e[n];let c="default";r.classes.length>0&&(c=r.classes.join(" ")),c+=" flowchart-label";const d=(0,o.k)(r.styles);let p,b=void 0!==r.text?r.text:r.id;if(o.l.info("vertex",r,r.labelType),"markdown"===r.labelType)o.l.info("vertex",r,r.labelType);else if((0,o.m)((0,o.c)().flowchart.htmlLabels)){const e={label:b.replace(/fa[blrs]?:fa-[\w-]+/g,(e=>`<i class='${e.replace(":"," ")}'></i>`))};p=(0,s.a)(i,e).node(),p.parentNode.removeChild(p)}else{const e=l.createElementNS("http://www.w3.org/2000/svg","text");e.setAttribute("style",d.labelStyle.replace("color:","fill:"));const t=b.split(o.e.lineBreakRegex);for(const n of t){const t=l.createElementNS("http://www.w3.org/2000/svg","tspan");t.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),t.setAttribute("dy","1em"),t.setAttribute("x","1"),t.textContent=n,e.appendChild(t)}p=e}let w=0,f="";switch(r.type){case"round":w=5,f="rect";break;case"square":case"group":default:f="rect";break;case"diamond":f="question";break;case"hexagon":f="hexagon";break;case"odd":case"odd_right":f="rect_left_inv_arrow";break;case"lean_right":f="lean_right";break;case"lean_left":f="lean_left";break;case"trapezoid":f="trapezoid";break;case"inv_trapezoid":f="inv_trapezoid";break;case"circle":f="circle";break;case"ellipse":f="ellipse";break;case"stadium":f="stadium";break;case"subroutine":f="subroutine";break;case"cylinder":f="cylinder";break;case"doublecircle":f="doublecircle"}t.setNode(r.id,{labelStyle:d.labelStyle,shape:f,labelText:b,labelType:r.labelType,rx:w,ry:w,class:c,style:d.style,id:r.id,link:r.link,linkTarget:r.linkTarget,tooltip:a.db.getTooltip(r.id)||"",domId:a.db.lookUpDomId(r.id),haveCallback:r.haveCallback,width:"group"===r.type?500:void 0,dir:r.dir,type:r.type,props:r.props,padding:(0,o.c)().flowchart.padding}),o.l.info("setNode",{labelStyle:d.labelStyle,labelType:r.labelType,shape:f,labelText:b,rx:w,ry:w,class:c,style:d.style,id:r.id,domId:a.db.lookUpDomId(r.id),width:"group"===r.type?500:void 0,type:r.type,dir:r.dir,props:r.props,padding:(0,o.c)().flowchart.padding})}))},f=function(e,t,n){o.l.info("abc78 edges = ",e);let r,a,s=0,i={};if(void 0!==e.defaultStyle){const t=(0,o.k)(e.defaultStyle);r=t.style,a=t.labelStyle}e.forEach((function(n){s++;const c="L-"+n.start+"-"+n.end;void 0===i[c]?(i[c]=0,o.l.info("abc78 new entry",c,i[c])):(i[c]++,o.l.info("abc78 new entry",c,i[c]));let d=c+"-"+i[c];o.l.info("abc78 new link id to be used is",c,d,i[c]);const p="LS-"+n.start,w="LE-"+n.end,f={style:"",labelStyle:""};switch(f.minlen=n.length||1,"arrow_open"===n.type?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",n.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle"}let u="",h="";switch(n.stroke){case"normal":u="fill:none;",void 0!==r&&(u=r),void 0!==a&&(h=a),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;"}if(void 0!==n.style){const e=(0,o.k)(n.style);u=e.style,h=e.labelStyle}f.style=f.style+=u,f.labelStyle=f.labelStyle+=h,void 0!==n.interpolate?f.curve=(0,o.n)(n.interpolate,l.c_6):void 0!==e.defaultInterpolate?f.curve=(0,o.n)(e.defaultInterpolate,l.c_6):f.curve=(0,o.n)(b.curve,l.c_6),void 0===n.text?void 0!==n.style&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType=n.labelType,f.label=n.text.replace(o.e.lineBreakRegex,"\n"),void 0===n.style&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=d,f.classes="flowchart-link "+p+" "+w,t.setEdge(n.start,n.end,f,s)}))},u={setConf:function(e){const t=Object.keys(e);for(const n of t)b[n]=e[n]},addVertices:w,addEdges:f,getClasses:function(e,t){return t.db.getClasses()},draw:async function(e,t,n,s){o.l.info("Drawing flowchart");let i=s.db.getDirection();void 0===i&&(i="TD");const{securityLevel:c,flowchart:d}=(0,o.c)(),p=d.nodeSpacing||50,b=d.rankSpacing||50;let u;"sandbox"===c&&(u=(0,l.Ys)("#i"+t));const h="sandbox"===c?(0,l.Ys)(u.nodes()[0].contentDocument.body):(0,l.Ys)("body"),g="sandbox"===c?u.nodes()[0].contentDocument:document,y=new r.k({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:p,ranksep:b,marginx:0,marginy:0}).setDefaultEdgeLabel((function(){return{}}));let k;const x=s.db.getSubGraphs();o.l.info("Subgraphs - ",x);for(let e=x.length-1;e>=0;e--)k=x[e],o.l.info("Subgraph - ",k),s.db.addVertex(k.id,{text:k.title,type:k.labelType},"group",void 0,k.classes,k.dir);const v=s.db.getVertices(),m=s.db.getEdges();o.l.info("Edges",m);let T=0;for(T=x.length-1;T>=0;T--){k=x[T],(0,l.td_)("cluster").append("text");for(let e=0;e<k.nodes.length;e++)o.l.info("Setting up subgraphs",k.nodes[e],k.id),y.setParent(k.nodes[e],k.id)}w(v,y,t,h,g,s),f(m,y);const S=h.select(`[id="${t}"]`),_=h.select("#"+t+" g");if(await(0,a.r)(_,y,["point","circle","cross"],"flowchart",t),o.u.insertTitle(S,"flowchartTitleText",d.titleTopMargin,s.db.getDiagramTitle()),(0,o.o)(y,S,d.diagramPadding,d.useMaxWidth),s.db.indexNodes("subGraph"+T),!d.htmlLabels){const e=g.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of e){const e=t.getBBox(),n=g.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",e.width),n.setAttribute("height",e.height),t.insertBefore(n,t.firstChild)}}Object.keys(v).forEach((function(e){const n=v[e];if(n.link){const r=(0,l.Ys)("#"+t+' [id="'+e+'"]');if(r){const e=g.createElementNS("http://www.w3.org/2000/svg","a");e.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),e.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===c?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):n.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);const t=r.insert((function(){return e}),":first-child"),l=r.select(".label-container");l&&t.append((function(){return l.node()}));const o=r.select(".label");o&&t.append((function(){return o.node()}))}}}))}},h=e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${((e,t)=>{const n=d,r=n(e,"r"),l=n(e,"g"),o=n(e,"b");return p.Z(r,l,o,.5)})(e.edgeLabelBackground)};\n // background-color: \n }\n\n .cluster rect {\n fill: ${e.clusterBkg};\n stroke: ${e.clusterBorder};\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n`}}]);
|
notebook/static/4234.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4234],{84498:(e,t,n)=>{n.r(t),n.d(t,{CellList:()=>v,CellTypeSwitcher:()=>_,CommandEditStatus:()=>E,ExecutionIndicator:()=>k,ExecutionIndicatorComponent:()=>y,INotebookTools:()=>we,INotebookTracker:()=>be,INotebookWidgetFactory:()=>_e,KernelError:()=>g,Notebook:()=>ce,NotebookActions:()=>C,NotebookAdapter:()=>P,NotebookModel:()=>M,NotebookModelFactory:()=>I,NotebookPanel:()=>ue,NotebookSearchProvider:()=>me,NotebookToCFactory:()=>pe,NotebookToCModel:()=>ve,NotebookTools:()=>B,NotebookTracker:()=>ye,NotebookTrustStatus:()=>xe,NotebookViewModel:()=>$,NotebookWidgetFactory:()=>Se,NotebookWindowedLayout:()=>z,RunningStatus:()=>ge,StaticNotebook:()=>re,ToolbarItems:()=>p,getIdForHeading:()=>fe});var o=n(67569),i=n(49230),s=n(82743),l=n(58977),a=n(33625),d=n(20998),r=n(81997),c=n(78156),h=n.n(c);const u="application/vnd.jupyter.cells";class g extends Error{constructor(e){const t=e,n=t.ename,o=t.evalue;super(`KernelReplyNotOK: ${n} ${o}`),this.errorName=n,this.errorValue=o,this.traceback=t.traceback,Object.setPrototypeOf(this,g.prototype)}}class C{static get executed(){return m.executed}static get executionScheduled(){return m.executionScheduled}static get selectionExecuted(){return m.selectionExecuted}constructor(){}}var m;!function(e){function t(e,t){if(!e.model||!e.activeCell)return;const n=m.getState(e),o=e.widgets.findIndex((t=>e.isSelectedOrActive(t)));let i=e.widgets.slice(o+1).findIndex((t=>!e.isSelectedOrActive(t)));i>=0?i+=o+1:i=e.model.cells.length,t>0?e.moveCell(o,i,i-o):e.moveCell(o,o+t,i-o),m.handleState(e,n,!0)}function n(e,t="below",n,o=!1){if(!e.model||!e.activeCell)return;const i=m.getState(e),s=e.model;e.mode="command";let l=0;const a=e.activeCellIndex;s.sharedModel.transact((()=>{switch(t){case"below":l=e.activeCellIndex+1;break;case"belowSelected":e.widgets.forEach(((t,n)=>{e.isSelectedOrActive(t)&&(l=n+1)}));break;case"above":l=e.activeCellIndex;break;case"replace":{const t=[];e.widgets.forEach(((n,o)=>{const i=!1!==n.model.sharedModel.getMetadata("deletable");e.isSelectedOrActive(n)&&i&&t.push(o)})),t.length>0&&t.reverse().forEach((e=>{s.sharedModel.deleteCell(e)})),l=t[0];break}}s.sharedModel.insertCells(l,n.map((t=>(t.id="code"===t.cell_type&&"cut"===e.lastClipboardInteraction&&"string"==typeof t.id?t.id:void 0,t))))})),e.activeCellIndex=a+n.length,e.deselectAll(),o&&(e.lastClipboardInteraction="paste"),m.handleState(e,i,!0)}function r(t,n,o){const s=(0,a.findIndex)(o.widgets,((e,n)=>t.model.id===e.model.id));if(-1===s)return-1;if(!o.widgets.length)return s+1;let l=e.getHeadingInfo(t);if(t.isHidden||!(t instanceof i.MarkdownCell)||!l.isHeading)return s+1;let d,r=!1,c=0;for(d=s+1;d<o.widgets.length;d++){let t=o.widgets[d],i=e.getHeadingInfo(t);if(i.isHeading&&i.headingLevel<=l.headingLevel){d-=1;break}r&&i.isHeading&&i.headingLevel<=c&&(r=!1),n||r?t.setHidden(!0):(i.collapsed&&i.isHeading&&(r=!0,c=i.headingLevel),t.setHidden(!1))}return d===o.widgets.length?t.numberChildNodes=d-s-1:t.numberChildNodes=d-s,e.setCellCollapse(t,n),d+1}function h(e){if(!(e instanceof i.MarkdownCell))return{isHeading:!1,headingLevel:7};let t=e.headingInfo.level;return{isHeading:t>0,headingLevel:t,collapsed:e.headingCollapsed}}e.splitCell=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.mode="edit",e.deselectAll();const n=e.model,o=e.activeCellIndex,i=e.widgets[o],s=i.editor;if(!s)return;const l=s.getSelections(),a=i.model.sharedModel.getSource(),d=[0];let r=-1,c=-1;for(let e=0;e<l.length;e++)r=s.getOffsetAt(l[e].start),c=s.getOffsetAt(l[e].end),r<c?(d.push(r),d.push(c)):c<r?(d.push(c),d.push(r)):d.push(r);d.push(a.length);const h=d.slice(0,-1).map(((e,t)=>{const{cell_type:n,metadata:o}=i.model.sharedModel.toJSON();return{cell_type:n,metadata:o,source:a.slice(e,d[t+1]).replace(/^\n+/,"").replace(/\n+$/,"")}}));n.sharedModel.transact((()=>{n.sharedModel.deleteCell(o),n.sharedModel.insertCells(o,h)}));const u=r!==c?2:1;e.activeCellIndex=o+h.length-u,e.scrollToItem(e.activeCellIndex).then((()=>{var t;null===(t=e.activeCell)||void 0===t||t.editor.focus()})).catch((e=>{})),m.handleState(e,t)},e.mergeCells=function(e,t=!1){if(!e.model||!e.activeCell)return;const n=m.getState(e),o=[],s=[],l=e.model,a=l.cells,d=e.activeCell,r=e.activeCellIndex,c={};if(e.widgets.forEach(((t,n)=>{if(e.isSelectedOrActive(t)){o.push(t.model.sharedModel.getSource()),n!==r&&s.push(n);const e=t.model;if((0,i.isRawCellModel)(e)||(0,i.isMarkdownCellModel)(e))for(const t of e.attachments.keys)c[t]=e.attachments.get(t).toJSON()}})),1===o.length)if(!0===t){if(0===r)return;const e=a.get(r-1);o.unshift(e.sharedModel.getSource()),s.push(r-1)}else if(!1===t){if(r===a.length-1)return;const e=a.get(r+1);o.push(e.sharedModel.getSource()),s.push(r+1)}e.deselectAll();const h=d.model.sharedModel,{cell_type:u,metadata:g}=h.toJSON();"code"===h.cell_type&&(g.trusted=!0);const C={cell_type:u,metadata:g,source:o.join("\n\n"),attachments:"markdown"===h.cell_type||"raw"===h.cell_type?c:void 0};l.sharedModel.transact((()=>{l.sharedModel.deleteCell(r),l.sharedModel.insertCell(r,C),s.sort(((e,t)=>t-e)).forEach((e=>{l.sharedModel.deleteCell(e)}))})),d instanceof i.MarkdownCell&&(e.activeCell.rendered=!1),m.handleState(e,n)},e.deleteCells=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);m.deleteCells(e),m.handleState(e,t,!0)},e.insertAbove=function(e){if(!e.model)return;const t=m.getState(e),n=e.model,o=e.activeCell?e.activeCellIndex:0;n.sharedModel.insertCell(o,{cell_type:e.notebookConfig.defaultCell,metadata:"code"===e.notebookConfig.defaultCell?{trusted:!0}:{}}),e.activeCellIndex=o,e.deselectAll(),m.handleState(e,t,!0)},e.insertBelow=function(e){if(!e.model)return;const t=m.getState(e),n=e.model,o=e.activeCell?e.activeCellIndex+1:0;n.sharedModel.insertCell(o,{cell_type:e.notebookConfig.defaultCell,metadata:"code"===e.notebookConfig.defaultCell?{trusted:!0}:{}}),e.activeCellIndex=o,e.deselectAll(),m.handleState(e,t,!0)},e.moveDown=function(e){t(e,1)},e.moveUp=function(e){t(e,-1)},e.changeCellType=function(e,t){if(!e.model||!e.activeCell)return;const n=m.getState(e);m.changeCellType(e,t),m.handleState(e,n)},e.run=function(e,t,n,o){if(!e.model||!e.activeCell)return Promise.resolve(!1);const i=m.getState(e),s=m.runSelected(e,t,n,o);return m.handleRunState(e,i,!1),s},e.runAndAdvance=async function(e,t,n,o){var i;if(!e.model||!e.activeCell)return Promise.resolve(!1);const l=m.getState(e),a=m.runSelected(e,t,n,o),d=e.model;return e.activeCellIndex===e.widgets.length-1?(d.sharedModel.insertCell(e.widgets.length,{cell_type:e.notebookConfig.defaultCell,metadata:"code"===e.notebookConfig.defaultCell?{trusted:!0}:{}}),e.activeCellIndex++,!1===(null===(i=e.activeCell)||void 0===i?void 0:i.inViewport)&&await(0,s.signalToPromise)(e.activeCell.inViewportChanged,200).catch((()=>{})),e.mode="edit"):e.activeCellIndex++,m.handleState(e,l,!0),a},e.runAndInsert=async function(e,t,n,o){var i;if(!e.model||!e.activeCell)return Promise.resolve(!1);const l=m.getState(e),a=m.runSelected(e,t,n,o);return e.model.sharedModel.insertCell(e.activeCellIndex+1,{cell_type:e.notebookConfig.defaultCell,metadata:"code"===e.notebookConfig.defaultCell?{trusted:!0}:{}}),e.activeCellIndex++,!1===(null===(i=e.activeCell)||void 0===i?void 0:i.inViewport)&&await(0,s.signalToPromise)(e.activeCell.inViewportChanged,200).catch((()=>{})),e.mode="edit",m.handleState(e,l,!0),a},e.runAll=function(e,t,n,o){if(!e.model||!e.activeCell)return Promise.resolve(!1);const i=m.getState(e);e.widgets.forEach((t=>{e.select(t)}));const s=m.runSelected(e,t,n,o);return m.handleRunState(e,i,!0),s},e.renderAllMarkdown=function(e){if(!e.model||!e.activeCell)return Promise.resolve(!1);const t=e.activeCellIndex,n=m.getState(e);if(e.widgets.forEach(((t,n)=>{"markdown"===t.model.type&&(e.select(t),e.activeCellIndex=n)})),"markdown"!==e.activeCell.model.type)return Promise.resolve(!0);const o=m.runSelected(e);return e.activeCellIndex=t,m.handleRunState(e,n,!0),o},e.runAllAbove=function(e,t,n,o){const{activeCell:i,activeCellIndex:s,model:l}=e;if(!l||!i||s<1)return Promise.resolve(!1);const a=m.getState(e);e.activeCellIndex--,e.deselectAll();for(let t=0;t<e.activeCellIndex;++t)e.select(e.widgets[t]);const d=m.runSelected(e,t,n,o);return e.activeCellIndex++,m.handleRunState(e,a,!0),d},e.runAllBelow=function(e,t,n,o){if(!e.model||!e.activeCell)return Promise.resolve(!1);const i=m.getState(e);e.deselectAll();for(let t=e.activeCellIndex;t<e.widgets.length;++t)e.select(e.widgets[t]);const s=m.runSelected(e,t,n,o);return m.handleRunState(e,i,!0),s},e.replaceSelection=function(e,t){var n,o,i;e.model&&(null===(n=e.activeCell)||void 0===n?void 0:n.editor)&&(null===(i=(o=e.activeCell.editor).replaceSelection)||void 0===i||i.call(o,t))},e.selectAbove=function(e){if(!e.model||!e.activeCell)return;const t=e.layout.footer;if(t&&document.activeElement===t.node)return t.node.blur(),void(e.mode="command");if(0===e.activeCellIndex)return;let n=e.activeCellIndex-1;for(;n>=0;){const t=e.widgets[n];if(!t.inputHidden&&!t.isHidden)break;n-=1}const o=m.getState(e);e.activeCellIndex=n,e.deselectAll(),m.handleState(e,o,!0)},e.selectBelow=function(e){if(!e.model||!e.activeCell)return;let t=e.widgets.length-1;for(;e.widgets[t].isHidden||e.widgets[t].inputHidden;)t-=1;if(e.activeCellIndex===t){const t=e.layout.footer;return void(null==t||t.node.focus())}let n=e.activeCellIndex+1;for(;n<t;){let t=e.widgets[n];if(!t.inputHidden&&!t.isHidden)break;n+=1}const o=m.getState(e);e.activeCellIndex=n,e.deselectAll(),m.handleState(e,o,!0)},e.insertSameLevelHeadingAbove=async function(e){if(!e.model||!e.activeCell)return;let t=m.Headings.determineHeadingLevel(e.activeCell,e);-1==t?await m.Headings.insertHeadingAboveCellIndex(0,1,e):await m.Headings.insertHeadingAboveCellIndex(e.activeCellIndex,t,e)},e.insertSameLevelHeadingBelow=async function(e){if(!e.model||!e.activeCell)return;let t=m.Headings.determineHeadingLevel(e.activeCell,e);t=t>-1?t:1;let n=m.Headings.findLowerEqualLevelHeadingBelow(e.activeCell,e,!0);await m.Headings.insertHeadingAboveCellIndex(-1==n?e.model.cells.length:n,t,e)},e.selectHeadingAboveOrCollapseHeading=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);let n=h(e.activeCell);if(n.isHeading&&!n.collapsed)r(e.activeCell,!0,e);else{let t=m.Headings.findLowerEqualLevelParentHeadingAbove(e.activeCell,e,!0);t>-1&&(e.activeCellIndex=t)}e.deselectAll(),m.handleState(e,t,!0)},e.selectHeadingBelowOrExpandHeading=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);let n=h(e.activeCell);if(n.isHeading&&n.collapsed)r(e.activeCell,!1,e);else{let t=m.Headings.findHeadingBelow(e.activeCell,e,!0);t>-1&&(e.activeCellIndex=t)}e.deselectAll(),m.handleState(e,t,!0)},e.extendSelectionAbove=function(e,t=!1){if(!e.model||!e.activeCell)return;if(0===e.activeCellIndex)return;const n=m.getState(e);e.mode="command",t?e.extendContiguousSelectionTo(0):e.extendContiguousSelectionTo(e.activeCellIndex-1),m.handleState(e,n,!0)},e.extendSelectionBelow=function(e,t=!1){if(!e.model||!e.activeCell)return;if(e.activeCellIndex===e.widgets.length-1)return;const n=m.getState(e);e.mode="command",t?e.extendContiguousSelectionTo(e.widgets.length-1):e.extendContiguousSelectionTo(e.activeCellIndex+1),m.handleState(e,n,!0)},e.selectAll=function(e){e.model&&e.activeCell&&e.widgets.forEach((t=>{e.select(t)}))},e.deselectAll=function(e){e.model&&e.activeCell&&e.deselectAll()},e.copy=function(e){m.copyOrCut(e,!1)},e.cut=function(e){m.copyOrCut(e,!0)},e.paste=function(e,t="below"){const i=o.Clipboard.getInstance();i.hasData(u)&&n(e,t,i.getData(u),!0)},e.duplicate=function(e,t="below"){const o=m.selectedCells(e);o&&0!==o.length&&n(e,t,o,!1)},e.undo=function(e){if(!e.model)return;const t=m.getState(e);e.mode="command",e.model.sharedModel.undo(),e.deselectAll(),m.handleState(e,t)},e.redo=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.mode="command",e.model.sharedModel.redo(),e.deselectAll(),m.handleState(e,t)},e.toggleAllLineNumbers=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e),n=e.editorConfig,o=!(n.code.lineNumbers&&n.markdown.lineNumbers&&n.raw.lineNumbers),i={code:{...n.code,lineNumbers:o},markdown:{...n.markdown,lineNumbers:o},raw:{...n.raw,lineNumbers:o}};e.editorConfig=i,m.handleState(e,t)},e.clearOutputs=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);let n=-1;for(const t of e.model.cells){const o=e.widgets[++n];e.isSelectedOrActive(o)&&"code"===t.type&&t.sharedModel.transact((()=>{t.clearExecution(),o.outputHidden=!1}),!1)}m.handleState(e,t,!0)},e.clearAllOutputs=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);let n=-1;for(const t of e.model.cells){const o=e.widgets[++n];"code"===t.type&&t.sharedModel.transact((()=>{t.clearExecution(),o.outputHidden=!1}),!1)}m.handleState(e,t,!0)},e.hideCode=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.inputHidden=!0)})),m.handleState(e,t)},e.showCode=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.inputHidden=!1)})),m.handleState(e,t)},e.hideAllCode=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((e=>{"code"===e.model.type&&(e.inputHidden=!0)})),m.handleState(e,t)},e.showAllCode=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((e=>{"code"===e.model.type&&(e.inputHidden=!1)})),m.handleState(e,t)},e.hideOutput=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.outputHidden=!0)})),m.handleState(e,t,!0)},e.showOutput=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.outputHidden=!1)})),m.handleState(e,t)},e.hideAllOutputs=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((e=>{"code"===e.model.type&&(e.outputHidden=!0)})),m.handleState(e,t,!0)},e.renderSideBySide=function(e){e.renderingLayout="side-by-side"},e.renderDefault=function(e){e.renderingLayout="default"},e.showAllOutputs=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((e=>{"code"===e.model.type&&(e.outputHidden=!1)})),m.handleState(e,t)},e.enableOutputScrolling=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.outputsScrolled=!0)})),m.handleState(e,t,!0)},e.disableOutputScrolling=function(e){if(!e.model||!e.activeCell)return;const t=m.getState(e);e.widgets.forEach((t=>{e.isSelectedOrActive(t)&&"code"===t.model.type&&(t.outputsScrolled=!1)})),m.handleState(e,t)},e.selectLastRunCell=function(e){let t=null,n=null;e.widgets.forEach(((e,o)=>{if("code"===e.model.type){const i=e.model.getMetadata("execution");if(i&&d.JSONExt.isObject(i)&&void 0!==i["iopub.status.busy"]){const e=i["iopub.status.busy"].toString();if(e){const i=new Date(e);(!t||i>=t)&&(t=i,n=o)}}}})),null!==n&&(e.activeCellIndex=n)},e.setMarkdownHeader=function(e,t){if(!e.model||!e.activeCell)return;const n=m.getState(e),o=e.model.cells;t=Math.min(Math.max(t,1),6),e.widgets.forEach(((n,i)=>{e.isSelectedOrActive(n)&&m.setMarkdownHeader(o.get(i),t)})),m.changeCellType(e,"markdown"),m.handleState(e,n)},e.collapseAllHeadings=function(t){for(const n of t.widgets)e.getHeadingInfo(n).isHeading&&(e.setHeadingCollapse(n,!0,t),e.setCellCollapse(n,!0))},e.expandAllHeadings=function(t){for(const n of t.widgets)e.getHeadingInfo(n).isHeading&&(e.setHeadingCollapse(n,!1,t),e.setCellCollapse(n,!1))},e.expandParent=function e(t,n){let o=function(e,t){const n=(0,a.findIndex)(t.widgets,((t,n)=>e.model.id===t.model.id));if(-1===n)return;if(n>=t.widgets.length)return;let o=h(t.widgets[n]);for(let e=n-1;e>=0;e--)if(e<t.widgets.length){let n=h(t.widgets[e]);if(n.isHeading&&n.headingLevel<o.headingLevel)return t.widgets[e]}}(t,n);o&&(h(o).collapsed||o.isHidden)&&(o.isHidden&&e(o,n),h(o).collapsed&&r(o,!1,n))},e.findNextParentHeading=function(e,t){let n=(0,a.findIndex)(t.widgets,((t,n)=>e.model.id===t.model.id));if(-1===n)return-1;let o=h(e);for(n+=1;n<t.widgets.length;n++){let e=h(t.widgets[n]);if(e.isHeading&&e.headingLevel<=o.headingLevel)return n}return t.widgets.length},e.setHeadingCollapse=r,e.toggleCurrentHeadingCollapse=function(t){if(!t.activeCell||void 0===t.activeCellIndex)return;let n=e.getHeadingInfo(t.activeCell);n.isHeading&&e.setHeadingCollapse(t.activeCell,!n.collapsed,t),t.scrollToItem(t.activeCellIndex).catch((e=>{}))},e.setCellCollapse=function(e,t){e instanceof i.MarkdownCell?e.headingCollapsed=t:e.setHidden(t)},e.getHeadingInfo=h,e.trust=function(e,t){const n=(t=t||l.nullTranslator).load("jupyterlab");if(!e.model)return Promise.resolve();const i=(0,a.every)(e.model.cells,(e=>e.trusted)),s=c.createElement("p",null,n.__("A trusted Jupyter notebook may execute hidden malicious code when you open it."),c.createElement("br",null),n.__('Selecting "Trust" will re-render this notebook in a trusted state.'),c.createElement("br",null),n.__("For more information, see")," ",c.createElement("a",{href:"https://jupyter-server.readthedocs.io/en/stable/operators/security.html",target:"_blank",rel:"noopener noreferrer"},n.__("the Jupyter security documentation")),".");return i?(0,o.showDialog)({body:n.__("Notebook is already trusted"),buttons:[o.Dialog.okButton()]}).then((()=>{})):(0,o.showDialog)({body:s,title:n.__("Trust this notebook?"),buttons:[o.Dialog.cancelButton(),o.Dialog.warnButton({label:n.__("Trust"),ariaLabel:n.__("Confirm Trusting this notebook")})]}).then((t=>{if(t.button.accept&&e.model)for(const t of e.model.cells)t.trusted=!0}))}}(C||(C={})),function(e){function t(e){var t,n;return{wasFocused:e.node.contains(document.activeElement),activeCellId:null!==(n=null===(t=e.activeCell)||void 0===t?void 0:t.model.id)&&void 0!==n?n:null}}function n(e,t,n=!1){const{activeCell:o,activeCellIndex:i}=e;(t.wasFocused||"edit"===e.mode)&&e.activate(),n&&o&&e.scrollToItem(i,"smart",.05).catch((e=>{}))}function d(e){const t=e.model.sharedModel,n=[];e.mode="command",e.widgets.forEach(((t,o)=>{var i;const s=!1!==t.model.getMetadata("deletable");e.isSelectedOrActive(t)&&s&&(n.push(o),null===(i=e.model)||void 0===i||i.deletedCells.push(t.model.id))})),n.length>0&&(t.transact((()=>{n.reverse().forEach((e=>{t.deleteCell(e)})),t.cells.length==n.length&&t.insertCell(0,{cell_type:e.notebookConfig.defaultCell,metadata:"code"===e.notebookConfig.defaultCell?{trusted:!0}:{}})})),e.activeCellIndex=n[0]-n.length+1),e.deselectAll()}let c;e.executed=new r.Signal({}),e.executionScheduled=new r.Signal({}),e.selectionExecuted=new r.Signal({}),e.getState=t,e.handleState=n,e.handleRunState=function(e,t,n=!1){var o;if((t.wasFocused||"edit"===e.mode)&&e.activate(),n&&t.activeCellId){const n=e.widgets.findIndex((e=>e.model.id===t.activeCellId));(null===(o=e.widgets[n])||void 0===o?void 0:o.inputArea)&&e.scrollToItem(n).catch((e=>{}))}},e.runSelected=function(t,n,s,d){t.mode="command";let r=t.activeCellIndex;const c=t.widgets.filter(((e,n)=>{const o=t.isSelectedOrActive(e);return o&&(r=n),o}));return t.activeCellIndex=r,t.deselectAll(),Promise.all(c.map((r=>async function(t,n,s,d,r){var c,h,u;const C=(r=r||l.nullTranslator).load("jupyterlab");switch(n.model.type){case"markdown":n.rendered=!0,n.inputHidden=!1,e.executed.emit({notebook:t,cell:n,success:!0});break;case"code":if(s){if(s.isTerminating){await(0,o.showDialog)({title:C.__("Kernel Terminating"),body:C.__("The kernel for %1 appears to be terminating. You can not run any cell for now.",null===(c=s.session)||void 0===c?void 0:c.path),buttons:[o.Dialog.okButton()]});break}if(s.pendingInput)return await(0,o.showDialog)({title:C.__("Cell not executed due to pending input"),body:C.__("The cell has not been executed to avoid kernel deadlock as there is another pending input! Submit your pending input and try again."),buttons:[o.Dialog.okButton()]}),!1;if(s.hasNoKernel&&await s.startKernel()&&d&&await d.selectKernel(s),s.hasNoKernel)return n.model.sharedModel.transact((()=>{n.model.clearExecution()})),!0;const l=null!==(u=null===(h=t.model)||void 0===h?void 0:h.deletedCells)&&void 0!==u?u:[];e.executionScheduled.emit({notebook:t,cell:n});let r=!1;try{const e=await i.CodeCell.execute(n,s,{deletedCells:l,recordTiming:t.notebookConfig.recordTiming});l.splice(0,l.length),r=(()=>{if(n.isDisposed)return!1;if(!e)return!0;if("ok"===e.content.status){const o=e.content;return o.payload&&o.payload.length&&function(e,t,n){var o;const i=null===(o=e.payload)||void 0===o?void 0:o.filter((e=>"set_next_input"===e.source))[0];if(!i)return;const s=i.text;if(i.replace)return void n.model.sharedModel.setSource(s);const l=t.model.sharedModel,d=t.model.cells,r=(0,a.findIndex)(d,(e=>e===n.model));-1===r?l.insertCell(l.cells.length,{cell_type:"code",source:s,metadata:{trusted:!1}}):l.insertCell(r+1,{cell_type:"code",source:s,metadata:{trusted:!1}})}(o,t,n),!0}throw new g(e.content)})()}catch(o){if(!n.isDisposed&&!o.message.startsWith("Canceled"))throw e.executed.emit({notebook:t,cell:n,success:!1,error:o}),o;r=!1}return r&&e.executed.emit({notebook:t,cell:n,success:!0}),r}n.model.sharedModel.transact((()=>{n.model.clearExecution()}),!1)}return Promise.resolve(!0)}(t,r,n,s,d)))).then((n=>!t.isDisposed&&(e.selectionExecuted.emit({notebook:t,lastCell:t.widgets[r]}),t.update(),n.every((e=>e))))).catch((n=>{if(!n.message.startsWith("KernelReplyNotOK"))throw n;return c.map((e=>{"code"===e.model.type&&null==e.model.executionCount&&e.setPrompt("")})),e.selectionExecuted.emit({notebook:t,lastCell:t.widgets[r]}),t.update(),!1}))},e.selectedCells=function(e){return e.widgets.filter((t=>e.isSelectedOrActive(t))).map((e=>e.model.toJSON())).map((e=>(void 0!==e.metadata.deletable&&delete e.metadata.deletable,e)))},e.copyOrCut=function(i,s){if(!i.model||!i.activeCell)return;const l=t(i),a=o.Clipboard.getInstance();i.mode="command",a.clear();const r=e.selectedCells(i);a.setData(u,r),s?d(i):i.deselectAll(),i.lastClipboardInteraction=s?"cut":"copy",n(i,l)},e.changeCellType=function(e,t){const n=e.model.sharedModel;e.widgets.forEach(((o,i)=>{if(e.isSelectedOrActive(o)){if(o.model.type!==t){const e=o.model.toJSON();n.transact((()=>{n.deleteCell(i),e.metadata.trusted="code"===t||void 0;const o=n.insertCell(i,{cell_type:t,source:e.source,metadata:e.metadata});e.attachments&&["markdown","raw"].includes(t)&&(o.attachments=e.attachments)}))}"markdown"===t&&((o=e.widgets[i]).rendered=!1)}})),e.deselectAll()},e.deleteCells=d,e.setMarkdownHeader=function(e,t){let n=e.sharedModel.getSource();const o=Array(t+1).join("#")+" ",i=/^(#+\s*)|^(\s*)/.exec(n);i&&(n=n.slice(i[0].length)),e.sharedModel.setSource(o+n)},function(t){function n(e,t,n=!1,o=!1){let i=t.widgets.indexOf(e)-(n?1:0);for(;i>=0;){if(C.getHeadingInfo(t.widgets[i]).isHeading)return o?i:t.widgets[i];i--}return o?-1:null}t.findParentHeading=n,t.findLowerEqualLevelParentHeadingAbove=function(t,n,o=!1){let i=e.Headings.determineHeadingLevel(t,n);-1==i&&(i=1);let s=n.widgets.indexOf(t)-1;for(;s>=0;){let e=n.widgets[s],t=C.getHeadingInfo(e);if(t.isHeading&&t.headingLevel<=i)return o?s:e;s--}return o?-1:null},t.findLowerEqualLevelHeadingBelow=function(t,n,o=!1){let i=e.Headings.determineHeadingLevel(t,n);-1==i&&(i=1);let s=n.widgets.indexOf(t)+1;for(;s<n.widgets.length;){let e=n.widgets[s],t=C.getHeadingInfo(e);if(t.isHeading&&t.headingLevel<=i)return o?s:e;s++}return o?-1:null},t.findHeadingBelow=function(e,t,n=!1){let o=t.widgets.indexOf(e)+1;for(;o<t.widgets.length;){let e=t.widgets[o];if(C.getHeadingInfo(e).isHeading)return n?o:e;o++}return n?-1:null},t.determineHeadingLevel=function(e,t){let o=C.getHeadingInfo(e);if(o.isHeading)return o.headingLevel;{let o=n(e,t,!0);return null==o?-1:C.getHeadingInfo(o).headingLevel}},t.insertHeadingAboveCellIndex=async function(t,n,o){var i;n=Math.min(Math.max(n,1),6);const l=e.getState(o);o.model.sharedModel.insertCell(t,{cell_type:"markdown",source:"#".repeat(n)+" "}),o.activeCellIndex=t,!1===(null===(i=o.activeCell)||void 0===i?void 0:i.inViewport)&&await(0,s.signalToPromise)(o.activeCell.inViewportChanged,200).catch((()=>{})),o.deselectAll(),e.handleState(o,l,!0),o.mode="edit",o.widgets[t].setHidden(!1)}}(c=e.Headings||(e.Headings={}))}(m||(m={}));class v{constructor(e){this.model=e,this._cellMap=new WeakMap,this._changed=new r.Signal(this),this._isDisposed=!1,this._insertCells(0,this.model.cells),this.model.changed.connect(this._onSharedModelChanged,this)}get changed(){return this._changed}get isDisposed(){return this._isDisposed}get length(){return this.model.cells.length}*[Symbol.iterator](){for(const e of this.model.cells)yield this._cellMap.get(e)}dispose(){var e;if(!this._isDisposed){this._isDisposed=!0;for(const t of this.model.cells)null===(e=this._cellMap.get(t))||void 0===e||e.dispose();r.Signal.clearData(this)}}get(e){return this._cellMap.get(this.model.cells[e])}_insertCells(e,t){return t.forEach((e=>{let t;switch(e.cell_type){case"code":t=new i.CodeCellModel({sharedModel:e});break;case"markdown":t=new i.MarkdownCellModel({sharedModel:e});break;default:t=new i.RawCellModel({sharedModel:e})}this._cellMap.set(e,t),e.disposed.connect((()=>{t.dispose(),this._cellMap.delete(e)}))})),this.length}_onSharedModelChanged(e,t){var n;let o=0;const i=new Array;null===(n=t.cellsChange)||void 0===n||n.forEach((e=>{null!=e.insert?(this._insertCells(o,e.insert),i.push({type:"add",newIndex:o,newValues:e.insert.map((e=>this._cellMap.get(e))),oldIndex:-2,oldValues:[]}),o+=e.insert.length):null!=e.delete?i.push({type:"remove",newIndex:-1,newValues:[],oldIndex:o,oldValues:new Array(e.delete).fill(void 0)}):null!=e.retain&&(o+=e.retain)})),i.forEach((e=>this._changed.emit(e)))}}var p,f=n(22205);!function(e){function t(e,t){const n=(t||l.nullTranslator).load("jupyterlab");function i(){if(e.context.model.readOnly)return(0,o.showDialog)({title:n.__("Cannot Save"),body:n.__("Document is read-only"),buttons:[o.Dialog.okButton()]});e.context.save().then((()=>{if(!e.isDisposed)return e.context.createCheckpoint()}))}return(0,f.addToolbarButtonClass)(f.ReactWidget.create(c.createElement(f.UseSignal,{signal:e.context.fileChanged},(()=>c.createElement(f.ToolbarButtonComponent,{icon:f.saveIcon,onClick:i,tooltip:n.__("Save the notebook contents and create checkpoint"),enabled:!!(e&&e.context&&e.context.contentsModel&&e.context.contentsModel.writable)})))))}function n(e,t){const n=(t||l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.addIcon,onClick:()=>{C.insertBelow(e.content)},tooltip:n.__("Insert a cell below")})}function i(e,t){const n=(t||l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.cutIcon,onClick:()=>{C.cut(e.content)},tooltip:n.__("Cut the selected cells")})}function s(e,t){const n=(t||l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.copyIcon,onClick:()=>{C.copy(e.content)},tooltip:n.__("Copy the selected cells")})}function a(e,t){const n=(t||l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.pasteIcon,onClick:()=>{C.paste(e.content)},tooltip:n.__("Paste cells from the clipboard")})}function d(e,t,n){const o=(null!=n?n:l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.runIcon,onClick:()=>{C.runAndAdvance(e.content,e.sessionContext,t,n)},tooltip:o.__("Run the selected cells and advance")})}function r(e,t,n){const i=(null!=n?n:l.nullTranslator).load("jupyterlab");return new f.ToolbarButton({icon:f.fastForwardIcon,onClick:()=>{const i=null!=t?t:new o.SessionContextDialogs({translator:n});i.restart(e.sessionContext).then((t=>(t&&C.runAll(e.content,e.sessionContext,i,n),t)))},tooltip:i.__("Restart the kernel, then re-run the whole notebook")})}function h(e,t){return new _(e.content,t)}e.createSaveButton=t,e.createInsertButton=n,e.createCutButton=i,e.createCopyButton=s,e.createPasteButton=a,e.createRunButton=d,e.createRestartRunAllButton=r,e.createCellTypeItem=h,e.getDefaultItems=function(e,l,c){return[{name:"save",widget:t(e,c)},{name:"insert",widget:n(e,c)},{name:"cut",widget:i(e,c)},{name:"copy",widget:s(e,c)},{name:"paste",widget:a(e,c)},{name:"run",widget:d(e,l,c)},{name:"interrupt",widget:o.Toolbar.createInterruptButton(e.sessionContext,c)},{name:"restart",widget:o.Toolbar.createRestartButton(e.sessionContext,l,c)},{name:"restart-and-run",widget:r(e,l,c)},{name:"cellType",widget:h(e,c)},{name:"spacer",widget:f.Toolbar.createSpacerItem()},{name:"kernelName",widget:o.Toolbar.createKernelNameItem(e.sessionContext,l,c)}]}}(p||(p={}));class _ extends f.ReactWidget{constructor(e,t){super(),this.handleChange=e=>{"-"!==e.target.value&&(C.changeCellType(this._notebook,e.target.value),this._notebook.activate())},this.handleKeyDown=e=>{13===e.keyCode&&this._notebook.activate()},this._trans=(t||l.nullTranslator).load("jupyterlab"),this.addClass("jp-Notebook-toolbarCellType"),this._notebook=e,e.model&&this.update(),e.activeCellChanged.connect(this.update,this),e.selectionChanged.connect(this.update,this)}render(){let e="-";this._notebook.activeCell&&(e=this._notebook.activeCell.model.type);for(const t of this._notebook.widgets)if(this._notebook.isSelectedOrActive(t)&&t.model.type!==e){e="-";break}return c.createElement(f.HTMLSelect,{className:"jp-Notebook-toolbarCellTypeDropdown",onChange:this.handleChange,onKeyDown:this.handleKeyDown,value:e,"aria-label":this._trans.__("Cell type"),title:this._trans.__("Select the cell type")},c.createElement("option",{value:"-"},"-"),c.createElement("option",{value:"code"},this._trans.__("Code")),c.createElement("option",{value:"markdown"},this._trans.__("Markdown")),c.createElement("option",{value:"raw"},this._trans.__("Raw")))}}var w=n(22679),b=n(79551);function y(e){const t=e.translator||l.nullTranslator,n=(0,o.translateKernelStatuses)(t),i=t.load("jupyterlab"),s=e.state,a=e.displayOption.showOnToolBar,d=e.displayOption.showProgress,r=a?"down":"up",c=h().createElement("div",null);if(!s)return c;const u=s.kernelStatus,g={alignSelf:"normal",height:"24px"},C=s.totalTime,m=s.scheduledCellNumber||0,v=m-(s.scheduledCell.size||0);let p=100*v/m,_=d?"":"hidden";!d&&p<100&&(p=0);const b=e=>h().createElement(w.ProgressCircle,{progress:e,width:16,height:24,label:i.__("Kernel status")}),y=e=>i.__("Kernel status: %1",e),k=(e,t,o)=>h().createElement("div",{className:"jp-Notebook-ExecutionIndicator",title:d?"":y(n[e]),"data-status":e},t,h().createElement("div",{className:`jp-Notebook-ExecutionIndicator-tooltip ${r} ${_}`},h().createElement("span",null," ",y(n[e])," "),o));if("connecting"===s.kernelStatus||"disconnected"===s.kernelStatus||"unknown"===s.kernelStatus)return k(u,h().createElement(f.offlineBoltIcon.react,{...g}),[]);if("starting"===s.kernelStatus||"terminating"===s.kernelStatus||"restarting"===s.kernelStatus||"initializing"===s.kernelStatus)return k(u,h().createElement(f.circleIcon.react,{...g}),[]);if("busy"===s.executionStatus)return k("busy",b(p),[h().createElement("span",{key:0},i.__(`Executed ${v}/${m} cells`)),h().createElement("span",{key:1},i._n("Elapsed time: %1 second","Elapsed time: %1 seconds",C))]);{const e="busy"===s.kernelStatus?0:100,t="busy"===s.kernelStatus||0===C?[]:[h().createElement("span",{key:0},i._n("Executed %1 cell","Executed %1 cells",m)),h().createElement("span",{key:1},i._n("Elapsed time: %1 second","Elapsed time: %1 seconds",C))];return k(s.kernelStatus,b(e),t)}}class k extends f.VDomRenderer{constructor(e,t=!0){super(new k.Model),this.translator=e||l.nullTranslator,this.addClass("jp-mod-highlighted")}render(){if(null!==this.model&&this.model.renderFlag){const e=this.model.currentNotebook;return e?h().createElement(y,{displayOption:this.model.displayOption,state:this.model.executionState(e),translator:this.translator}):h().createElement(y,{displayOption:this.model.displayOption,state:void 0,translator:this.translator})}return h().createElement("div",null)}}!function(e){class t extends f.VDomModel{constructor(){super(),this._notebookExecutionProgress=new WeakMap,this._displayOption={showOnToolBar:!0,showProgress:!0},this._renderFlag=!0}attachNotebook(e){var t,n,o,i;if(e&&e.content&&e.context){const s=e.content,l=e.context;if(this._currentNotebook=s,!this._notebookExecutionProgress.has(s)){this._notebookExecutionProgress.set(s,{executionStatus:"idle",kernelStatus:"idle",totalTime:0,interval:0,timeout:0,scheduledCell:new Set,scheduledCellNumber:0,needReset:!0});const e=this._notebookExecutionProgress.get(s),a=t=>{e&&(e.kernelStatus=t.kernelDisplayStatus),this.stateChanged.emit(void 0)};l.statusChanged.connect(a,this);const d=t=>{e&&(e.kernelStatus=t.kernelDisplayStatus),this.stateChanged.emit(void 0)};l.connectionStatusChanged.connect(d,this),l.disposed.connect((e=>{e.connectionStatusChanged.disconnect(d,this),e.statusChanged.disconnect(a,this)}));const r=(e,t)=>{const n=t.msg,o=n.header.msg_id;if("execute_request"===n.header.msg_type)this._cellScheduledCallback(s,o);else if(b.KernelMessage.isStatusMsg(n)&&"idle"===n.content.execution_state){const e=n.parent_header.msg_id;this._cellExecutedCallback(s,e)}else b.KernelMessage.isStatusMsg(n)&&"restarting"===n.content.execution_state?this._restartHandler(s):"execute_input"===n.header.msg_type&&this._startTimer(s)};null===(n=null===(t=l.session)||void 0===t?void 0:t.kernel)||void 0===n||n.anyMessage.connect(r),null===(i=null===(o=l.session)||void 0===o?void 0:o.kernel)||void 0===i||i.disposed.connect((e=>e.anyMessage.disconnect(r)));const c=(t,n)=>{e&&(this._resetTime(e),this.stateChanged.emit(void 0),n.newValue&&n.newValue.anyMessage.connect(r))};l.kernelChanged.connect(c),l.disposed.connect((e=>e.kernelChanged.disconnect(c)))}}}get currentNotebook(){return this._currentNotebook}get displayOption(){return this._displayOption}set displayOption(e){this._displayOption=e}executionState(e){return this._notebookExecutionProgress.get(e)}_scheduleSwitchToIdle(e){window.setTimeout((()=>{e.executionStatus="idle",clearInterval(e.interval),this.stateChanged.emit(void 0)}),150),e.timeout=window.setTimeout((()=>{e.needReset=!0}),1e3)}_cellExecutedCallback(e,t){const n=this._notebookExecutionProgress.get(e);n&&n.scheduledCell.has(t)&&(n.scheduledCell.delete(t),0===n.scheduledCell.size&&this._scheduleSwitchToIdle(n))}_restartHandler(e){const t=this._notebookExecutionProgress.get(e);t&&(t.scheduledCell.clear(),this._scheduleSwitchToIdle(t))}_startTimer(e){const t=this._notebookExecutionProgress.get(e);t&&(t.scheduledCell.size>0?"busy"!==t.executionStatus&&(t.executionStatus="busy",clearTimeout(t.timeout),this.stateChanged.emit(void 0),t.interval=window.setInterval((()=>{this._tick(t)}),1e3)):this._resetTime(t))}_cellScheduledCallback(e,t){const n=this._notebookExecutionProgress.get(e);n&&!n.scheduledCell.has(t)&&(n.needReset&&this._resetTime(n),n.scheduledCell.add(t),n.scheduledCellNumber+=1)}_tick(e){e.totalTime+=1,this.stateChanged.emit(void 0)}_resetTime(e){e.totalTime=0,e.scheduledCellNumber=0,e.executionStatus="idle",e.scheduledCell=new Set,clearTimeout(e.timeout),clearInterval(e.interval),e.needReset=!1}get renderFlag(){return this._renderFlag}updateRenderOption(e){this.displayOption.showOnToolBar&&(e.showOnToolBar?this._renderFlag=!0:this._renderFlag=!1),this.displayOption.showProgress=e.showProgress,this.stateChanged.emit(void 0)}}function n(e){let t=!0,n=!0;const o=e.get("kernelStatus").composite;return o&&(t=!o.showOnStatusBar,n=o.showProgress),{showOnToolBar:t,showProgress:n}}e.Model=t,e.createExecutionIndicatorItem=function(t,o,i){const s=new e(o);return s.model.displayOption={showOnToolBar:!0,showProgress:!0},s.model.attachNotebook({content:t.content,context:t.sessionContext}),i&&i.then((e=>{const t=e=>{s.model.updateRenderOption(n(e))};e.changed.connect(t),t(e),s.disposed.connect((()=>{e.changed.disconnect(t)}))})).catch((e=>{console.error(e.message)})),s},e.getSettingValue=n}(k||(k={}));var x=n(52976),S=n(23781);class M{constructor(e={}){var t,n;this.standaloneModel=!1,this._dirty=!1,this._readOnly=!1,this._contentChanged=new r.Signal(this),this._stateChanged=new r.Signal(this),this._isDisposed=!1,this._metadataChanged=new r.Signal(this),this.standaloneModel=void 0===e.sharedModel,e.sharedModel?this.sharedModel=e.sharedModel:this.sharedModel=S.YNotebook.create({disableDocumentWideUndoRedo:null===(t=e.disableDocumentWideUndoRedo)||void 0===t||t,data:{nbformat:x.MAJOR_VERSION,nbformat_minor:x.MINOR_VERSION,metadata:{kernelspec:{name:"",display_name:""},language_info:{name:null!==(n=e.languagePreference)&&void 0!==n?n:""}}}}),this._cells=new v(this.sharedModel),this._trans=(e.translator||l.nullTranslator).load("jupyterlab"),this._deletedCells=[],this._collaborationEnabled=!!(null==e?void 0:e.collaborationEnabled),this._cells.changed.connect(this._onCellsChanged,this),this.sharedModel.changed.connect(this._onStateChanged,this),this.sharedModel.metadataChanged.connect(this._onMetadataChanged,this)}get contentChanged(){return this._contentChanged}get metadataChanged(){return this._metadataChanged}get stateChanged(){return this._stateChanged}get cells(){return this._cells}get dirty(){return this._dirty}set dirty(e){const t=this._dirty;e!==t&&(this._dirty=e,this.triggerStateChange({name:"dirty",oldValue:t,newValue:e}))}get readOnly(){return this._readOnly}set readOnly(e){if(e===this._readOnly)return;const t=this._readOnly;this._readOnly=e,this.triggerStateChange({name:"readOnly",oldValue:t,newValue:e})}get metadata(){return this.sharedModel.metadata}get nbformat(){return this.sharedModel.nbformat}get nbformatMinor(){return this.sharedModel.nbformat_minor}get defaultKernelName(){var e;const t=this.getMetadata("kernelspec");return null!==(e=null==t?void 0:t.name)&&void 0!==e?e:""}get deletedCells(){return this._deletedCells}get defaultKernelLanguage(){var e;const t=this.getMetadata("language_info");return null!==(e=null==t?void 0:t.name)&&void 0!==e?e:""}get collaborative(){return this._collaborationEnabled}dispose(){if(this.isDisposed)return;this._isDisposed=!0;const e=this.cells;this._cells=null,e.dispose(),this.standaloneModel&&this.sharedModel.dispose(),r.Signal.clearData(this)}deleteMetadata(e){return this.sharedModel.deleteMetadata(e)}getMetadata(e){return this.sharedModel.getMetadata(e)}setMetadata(e,t){void 0===t?this.sharedModel.deleteMetadata(e):this.sharedModel.setMetadata(e,t)}toString(){return JSON.stringify(this.toJSON())}fromString(e){this.fromJSON(JSON.parse(e))}toJSON(){return this._ensureMetadata(),this.sharedModel.toJSON()}fromJSON(e){var t,n;const i=d.JSONExt.deepCopy(e),s=e.metadata.orig_nbformat;if(i.nbformat=Math.max(e.nbformat,x.MAJOR_VERSION),(i.nbformat!==e.nbformat||i.nbformat_minor<x.MINOR_VERSION)&&(i.nbformat_minor=x.MINOR_VERSION),void 0!==s&&i.nbformat!==s){let e;e=i.nbformat>s?this._trans.__("This notebook has been converted from an older notebook format (v%1)\nto the current notebook format (v%2).\nThe next time you save this notebook, the current notebook format (v%2) will be used.\n'Older versions of Jupyter may not be able to read the new format.' To preserve the original format version,\nclose the notebook without saving it.",s,i.nbformat):this._trans.__("This notebook has been converted from an newer notebook format (v%1)\nto the current notebook format (v%2).\nThe next time you save this notebook, the current notebook format (v%2) will be used.\nSome features of the original notebook may not be available.' To preserve the original format version,\nclose the notebook without saving it.",s,i.nbformat),(0,o.showDialog)({title:this._trans.__("Notebook converted"),body:e,buttons:[o.Dialog.okButton({label:this._trans.__("Ok")})]})}0===(null!==(n=null===(t=i.cells)||void 0===t?void 0:t.length)&&void 0!==n?n:0)&&(i.cells=[{cell_type:"code",source:"",metadata:{trusted:!0}}]),this.sharedModel.fromJSON(i),this._ensureMetadata(),this.dirty=!0}_onCellsChanged(e,t){switch(t.type){case"add":case"set":t.newValues.forEach((e=>{e.contentChanged.connect(this.triggerContentChange,this)}))}this.triggerContentChange()}_onMetadataChanged(e,t){this._metadataChanged.emit(t),this.triggerContentChange()}_onStateChanged(e,t){t.stateChange&&t.stateChange.forEach((e=>{"dirty"===e.name?this.dirty=e.newValue:e.oldValue!==e.newValue&&this.triggerStateChange({newValue:void 0,oldValue:void 0,...e})}))}_ensureMetadata(e=""){this.getMetadata("language_info")||this.sharedModel.setMetadata("language_info",{name:e}),this.getMetadata("kernelspec")||this.sharedModel.setMetadata("kernelspec",{name:"",display_name:""})}triggerStateChange(e){this._stateChanged.emit(e)}triggerContentChange(){this._contentChanged.emit(void 0),this.dirty=!0}get isDisposed(){return this._isDisposed}}class I{constructor(e={}){var t,n;this._disposed=!1,this._disableDocumentWideUndoRedo=null===(t=e.disableDocumentWideUndoRedo)||void 0===t||t,this._collaborative=null===(n=e.collaborative)||void 0===n||n}get disableDocumentWideUndoRedo(){return this._disableDocumentWideUndoRedo}set disableDocumentWideUndoRedo(e){this._disableDocumentWideUndoRedo=e}get name(){return"notebook"}get contentType(){return"notebook"}get fileFormat(){return"json"}get collaborative(){return this._collaborative}get isDisposed(){return this._disposed}dispose(){this._disposed=!0}createNew(e={}){return new M({languagePreference:e.languagePreference,sharedModel:e.sharedModel,collaborationEnabled:e.collaborationEnabled&&this.collaborative,disableDocumentWideUndoRedo:this._disableDocumentWideUndoRedo})}preferredLanguage(e){return""}}function A(e){const t=(e.translator||l.nullTranslator).load("jupyterlab");return c.createElement(w.TextItem,{source:t.__("Mode: %1",e.modeNames[e.notebookMode])})}class E extends f.VDomRenderer{constructor(e){super(new E.Model),this.translator=e||l.nullTranslator,this._trans=this.translator.load("jupyterlab"),this._modeNames={command:this._trans.__("Command"),edit:this._trans.__("Edit")}}render(){return this.model?(this.node.title=this._trans.__("Notebook is in %1 mode",this._modeNames[this.model.notebookMode]),c.createElement(A,{notebookMode:this.model.notebookMode,translator:this.translator,modeNames:this._modeNames})):null}}!function(e){class t extends f.VDomModel{constructor(){super(...arguments),this._onChanged=e=>{const t=this._notebookMode;this._notebook?this._notebookMode=e.mode:this._notebookMode="command",this._triggerChange(t,this._notebookMode)},this._notebookMode="command",this._notebook=null}get notebookMode(){return this._notebookMode}set notebook(e){const t=this._notebook;null!==t&&(t.stateChanged.disconnect(this._onChanged,this),t.activeCellChanged.disconnect(this._onChanged,this),t.modelContentChanged.disconnect(this._onChanged,this));const n=this._notebookMode;this._notebook=e,null===this._notebook?this._notebookMode="command":(this._notebookMode=this._notebook.mode,this._notebook.stateChanged.connect(this._onChanged,this),this._notebook.activeCellChanged.connect(this._onChanged,this),this._notebook.modelContentChanged.connect(this._onChanged,this)),this._triggerChange(n,this._notebookMode)}_triggerChange(e,t){e!==t&&this.stateChanged.emit(void 0)}}e.Model=t}(E||(E={}));var T=n(46698);class P extends T.WidgetLSPAdapter{constructor(e,t){super(e,t),this.editorWidget=e,this.options=t,this._type="code",this._readyDelegate=new d.PromiseDelegate,this._editorToCell=new Map,this.editor=e.content,this._cellToEditor=new WeakMap,Promise.all([this.widget.context.sessionContext.ready,this.connectionManager.ready]).then((async()=>{await this.initOnceReady(),this._readyDelegate.resolve()})).catch(console.error)}get documentPath(){return this.widget.context.path}get mimeType(){var e;let t,n=this.language_info();return t=n&&n.mimetype?n.mimetype:this.widget.content.codeMimetype,Array.isArray(t)?null!==(e=t[0])&&void 0!==e?e:"text/plain":t}get languageFileExtension(){let e=this.language_info();if(e&&e.file_extension)return e.file_extension.replace(".","")}get wrapperElement(){return this.widget.node}get editors(){if(this.isDisposed)return[];let e=this.widget.content;return this._editorToCell.clear(),e.isDisposed?[]:e.widgets.map((e=>({ceEditor:this._getCellEditor(e),type:e.model.type,value:e.model.sharedModel.getSource()})))}get activeEditor(){return this.editor.activeCell?this._getCellEditor(this.editor.activeCell):void 0}get ready(){return this._readyDelegate.promise}getEditorIndexAt(e){let t=this._getCellAt(e);return this.widget.content.widgets.findIndex((e=>t===e))}getEditorIndex(e){let t=this._editorToCell.get(e);return this.editor.widgets.findIndex((e=>t===e))}getEditorWrapper(e){return this._editorToCell.get(e).node}async onKernelChanged(e,t){if(t.newValue)try{const e=this._languageInfo;await(0,T.untilReady)(this.isReady,-1),await this._updateLanguageInfo();const t=this._languageInfo;(null==e?void 0:e.name)!=t.name||(null==e?void 0:e.mimetype)!=(null==t?void 0:t.mimetype)||(null==e?void 0:e.file_extension)!=(null==t?void 0:t.file_extension)?(console.log(`Changed to ${this._languageInfo.name} kernel, reconnecting`),this.reloadConnection()):console.log("Keeping old LSP connection as the new kernel uses the same langauge")}catch(e){console.warn(e),this.reloadConnection()}}dispose(){this.isDisposed||(this.widget.context.sessionContext.kernelChanged.disconnect(this.onKernelChanged,this),this.widget.content.activeCellChanged.disconnect(this._activeCellChanged,this),super.dispose(),this._editorToCell.clear(),r.Signal.clearData(this))}isReady(){var e;return!this.widget.isDisposed&&this.widget.context.isReady&&this.widget.content.isVisible&&this.widget.content.widgets.length>0&&null!=(null===(e=this.widget.context.sessionContext.session)||void 0===e?void 0:e.kernel)}async handleCellChange(e,t){let n=[],o=[];const i=this._type;if("set"===t.type){let e=[],s=[];if(t.newValues.length===t.oldValues.length){for(let n=0;n<t.newValues.length;n++)t.oldValues[n].type===i&&t.newValues[n].type!==i?e.push(t.newValues[n]):t.oldValues[n].type!==i&&t.newValues[n].type===i&&s.push(t.newValues[n]);n=s,o=e}}else"add"==t.type&&(n=t.newValues.filter((e=>e.type===i)));(o.length||n.length||"set"===t.type||"move"===t.type||"remove"===t.type)&&await this.updateDocuments();for(let e of n){let t=this.widget.content.widgets.find((t=>t.model.id===e.id));t?this._getCellEditor(t):console.warn(`Widget for added cell with ID: ${e.id} not found!`)}}createVirtualDocument(){return new T.VirtualDocument({language:this.language,foreignCodeExtractors:this.options.foreignCodeExtractorsManager,path:this.documentPath,fileExtension:this.languageFileExtension,standalone:!1,hasLspSupportedFile:!1})}language_info(){return this._languageInfo}async initOnceReady(){await(0,T.untilReady)(this.isReady.bind(this),-1),await this._updateLanguageInfo(),this.initVirtual(),this.connectDocument(this.virtualDocument,!1).catch(console.warn),this.widget.context.sessionContext.kernelChanged.connect(this.onKernelChanged,this),this.widget.content.activeCellChanged.connect(this._activeCellChanged,this),this._connectModelSignals(this.widget),this.editor.modelChanged.connect((e=>{console.warn("Model changed, connecting cell change handler; this is not something we were expecting"),this._connectModelSignals(e)}))}_connectModelSignals(e){null===e.model?console.warn(`Model is missing for notebook ${e}, cannot connect cell changed signal!`):e.model.cells.changed.connect(this.handleCellChange,this)}async _updateLanguageInfo(){var e,t,n,o;const i=null===(o=await(null===(n=null===(t=null===(e=this.widget.context.sessionContext)||void 0===e?void 0:e.session)||void 0===t?void 0:t.kernel)||void 0===n?void 0:n.info))||void 0===o?void 0:o.language_info;if(!i)throw new Error("Language info update failed (no session, kernel, or info available)");this._languageInfo=i}_activeCellChanged(e,t){t&&t.model.type===this._type&&this._activeEditorChanged.emit({editor:this._getCellEditor(t)})}_getCellAt(e){let t=this.virtualDocument.getEditorAtVirtualLine(e);return this._editorToCell.get(t)}_getCellEditor(e){if(!this._cellToEditor.has(e)){const t=Object.freeze({getEditor:()=>e.editor,ready:async()=>(await e.ready,e.editor),reveal:async()=>(await this.editor.scrollToCell(e),e.editor)});this._cellToEditor.set(e,t),this._editorToCell.set(t,e),e.disposed.connect((()=>{this._cellToEditor.delete(e),this._editorToCell.delete(t),this._editorRemoved.emit({editor:t})})),this._editorAdded.emit({editor:t})}return this._cellToEditor.get(e)}}var N,O=n(63540),L=n(13596),D=n(49503),H=n(35111);class R extends H.Widget{constructor(){super(),this._items=[],this.layout=new H.PanelLayout,this.addClass("jp-RankedPanel")}addWidget(e,t){const n={widget:e,rank:t},o=a.ArrayExt.upperBound(this._items,n,N.itemCmp);a.ArrayExt.insert(this._items,o,n),this.layout.insertWidget(o,e)}onChildRemoved(e){const t=a.ArrayExt.findFirstIndex(this._items,(t=>t.widget===e.child));-1!==t&&a.ArrayExt.removeAt(this._items,t)}}class B extends H.Widget{constructor(e){super(),this.addClass("jp-NotebookTools"),this.translator=e.translator||l.nullTranslator,this._tools=[],this.layout=new H.PanelLayout,this._tracker=e.tracker,this._tracker.currentChanged.connect(this._onActiveNotebookPanelChanged,this),this._tracker.activeCellChanged.connect(this._onActiveCellChanged,this),this._tracker.selectionChanged.connect(this._onSelectionChanged,this),this._onActiveNotebookPanelChanged(),this._onActiveCellChanged(),this._onSelectionChanged()}get activeCell(){return this._tracker.activeCell}get selectedCells(){const e=this._tracker.currentWidget;if(!e)return[];const t=e.content;return t.widgets.filter((e=>t.isSelectedOrActive(e)))}get activeNotebookPanel(){return this._tracker.currentWidget}addItem(e){var t;const n=e.tool,o=null!==(t=e.rank)&&void 0!==t?t:100;let i;const s=this._tools.find((t=>t.section===e.section));if(!s)throw new Error(`The section ${e.section} does not exist`);i=s.panel,n.addClass("jp-NotebookTools-tool"),i.addWidget(n,o),n.notebookTools=this,D.MessageLoop.sendMessage(n,B.ActiveNotebookPanelMessage),D.MessageLoop.sendMessage(n,B.ActiveCellMessage)}addSection(e){var t;const n=e.sectionName,o=e.label||e.sectionName,i=e.tool;let s=null!==(t=e.rank)&&void 0!==t?t:null;const l=new R;if(l.title.label=o,i&&l.addWidget(i,0),this._tools.push({section:n,panel:l,rank:s}),null!=s)this.layout.insertWidget(s,new f.Collapser({widget:l}));else{let e=null;const t=this.layout;for(let n=0;n<t.widgets.length;n++){let o=t.widgets[n];if(o instanceof f.Collapser&&"advancedToolsSection"===o.widget.id){e=n;break}}null!==e?this.layout.insertWidget(e,new f.Collapser({widget:l})):this.layout.addWidget(new f.Collapser({widget:l}))}}_onActiveNotebookPanelChanged(){this._prevActiveNotebookModel&&!this._prevActiveNotebookModel.isDisposed&&this._prevActiveNotebookModel.metadataChanged.disconnect(this._onActiveNotebookPanelMetadataChanged,this);const e=this.activeNotebookPanel&&this.activeNotebookPanel.content?this.activeNotebookPanel.content.model:null;this._prevActiveNotebookModel=e,e&&e.metadataChanged.connect(this._onActiveNotebookPanelMetadataChanged,this);for(const e of this._toolChildren())D.MessageLoop.sendMessage(e,B.ActiveNotebookPanelMessage)}_onActiveCellChanged(){this._prevActiveCell&&!this._prevActiveCell.isDisposed&&this._prevActiveCell.metadataChanged.disconnect(this._onActiveCellMetadataChanged,this);const e=this.activeCell?this.activeCell.model:null;this._prevActiveCell=e,e&&e.metadataChanged.connect(this._onActiveCellMetadataChanged,this);for(const e of this._toolChildren())D.MessageLoop.sendMessage(e,B.ActiveCellMessage)}_onSelectionChanged(){for(const e of this._toolChildren())D.MessageLoop.sendMessage(e,B.SelectionMessage)}_onActiveNotebookPanelMetadataChanged(e,t){const n=new L.ObservableJSON.ChangeMessage("activenotebookpanel-metadata-changed",{oldValue:void 0,newValue:void 0,...t});for(const e of this._toolChildren())D.MessageLoop.sendMessage(e,n)}_onActiveCellMetadataChanged(e,t){const n=new L.ObservableJSON.ChangeMessage("activecell-metadata-changed",{newValue:void 0,oldValue:void 0,...t});for(const e of this._toolChildren())D.MessageLoop.sendMessage(e,n)}*_toolChildren(){for(let e of this._tools)yield*e.panel.children()}}!function(e){e.ActiveNotebookPanelMessage=new D.ConflatableMessage("activenotebookpanel-changed"),e.ActiveCellMessage=new D.ConflatableMessage("activecell-changed"),e.SelectionMessage=new D.ConflatableMessage("selection-changed");class t extends H.Widget{dispose(){super.dispose(),this.notebookTools&&(this.notebookTools=null)}processMessage(e){switch(super.processMessage(e),e.type){case"activenotebookpanel-changed":this.onActiveNotebookPanelChanged(e);break;case"activecell-changed":this.onActiveCellChanged(e);break;case"selection-changed":this.onSelectionChanged(e);break;case"activecell-metadata-changed":this.onActiveCellMetadataChanged(e);break;case"activenotebookpanel-metadata-changed":this.onActiveNotebookPanelMetadataChanged(e)}}onActiveNotebookPanelChanged(e){}onActiveCellChanged(e){}onSelectionChanged(e){}onActiveCellMetadataChanged(e){}onActiveNotebookPanelMetadataChanged(e){}}e.Tool=t,e.MetadataEditorTool=class extends t{constructor(e){super();const{editorFactory:t}=e;this.addClass("jp-MetadataEditorTool");const n=this.layout=new H.PanelLayout;this._editorFactory=t,this._editorLabel=e.label||"Edit Metadata",this.createEditor();const o=new H.Widget({node:document.createElement("label")});o.node.textContent=e.label||"Edit Metadata",n.addWidget(o),n.addWidget(this.editor)}get editor(){return this._editor}onActiveNotebookPanelChanged(e){this.editor.dispose(),this.notebookTools.activeNotebookPanel&&this.createEditor()}createEditor(){this._editor=new O.JSONEditor({editorFactory:this._editorFactory}),this.editor.title.label=this._editorLabel,this.layout.addWidget(this.editor)}}}(B||(B={})),function(e){e.itemCmp=function(e,t){return e.rank-t.rank}}(N||(N={}));var V=n(95051),F=n(63159),W=n(18395),j=n(20805),U=n(14421),q=n(24475);const K="jp-mod-dropTarget",J="jp-mod-dropSource";class $ extends f.WindowedListModel{constructor(e,t){super(t),this.cells=e,this.estimateWidgetSize=e=>{const t=this.cells[e].model.sharedModel.getSource().split("\n").length;return $.DEFAULT_EDITOR_LINE_HEIGHT*t+$.DEFAULT_CELL_MARGIN},this.widgetRenderer=e=>this.cells[e],this._estimatedWidgetSize=$.DEFAULT_CELL_SIZE}}$.DEFAULT_CELL_SIZE=39,$.DEFAULT_EDITOR_LINE_HEIGHT=17,$.DEFAULT_CELL_MARGIN=22;class z extends f.WindowedLayout{constructor(){super(...arguments),this._header=null,this._footer=null,this._willBeRemoved=null,this._topHiddenCodeCells=-1}get header(){return this._header}set header(e){var t;this._header&&this._header.isAttached&&H.Widget.detach(this._header),this._header=e,this._header&&(null===(t=this.parent)||void 0===t?void 0:t.isAttached)&&H.Widget.attach(this._header,this.parent.node)}get footer(){return this._footer}set footer(e){var t;this._footer&&this._footer.isAttached&&H.Widget.detach(this._footer),this._footer=e,this._footer&&(null===(t=this.parent)||void 0===t?void 0:t.isAttached)&&H.Widget.attach(this._footer,this.parent.node)}dispose(){var e,t;this.isDisposed||(null===(e=this._header)||void 0===e||e.dispose(),null===(t=this._footer)||void 0===t||t.dispose(),super.dispose())}removeWidget(e){const t=this.widgets.indexOf(e);t>=0?this.removeWidgetAt(t):e===this._willBeRemoved&&this.parent&&this.detachWidget(t,e)}attachWidget(e,t){const n=t.isPlaceholder();if(this.parent.isAttached&&D.MessageLoop.sendMessage(t,H.Widget.Msg.BeforeAttach),!n&&t instanceof i.CodeCell&&t.node.parentElement)t.node.style.display="",this._topHiddenCodeCells=-1;else{const e=this._findNearestChildBinarySearch(this.parent.viewportNode.childElementCount-1,0,parseInt(t.dataset.windowedListIndex,10)+1);let n=this.parent.viewportNode.children[e];this.parent.viewportNode.insertBefore(t.node,n),this.parent.isAttached&&D.MessageLoop.sendMessage(t,H.Widget.Msg.AfterAttach)}t.inViewport=!0}detachWidget(e,t){t.inViewport=!1,t instanceof i.CodeCell&&!t.node.classList.contains(J)&&t!==this._willBeRemoved?(t.node.style.display="none",this._topHiddenCodeCells=-1):(this.parent.isAttached&&D.MessageLoop.sendMessage(t,H.Widget.Msg.BeforeDetach),this.parent.viewportNode.removeChild(t.node),t.node.classList.remove(K)),this.parent.isAttached&&D.MessageLoop.sendMessage(t,H.Widget.Msg.AfterDetach)}moveWidget(e,t,n){if(this._topHiddenCodeCells<0){this._topHiddenCodeCells=0;for(let e=0;e<this.parent.viewportNode.children.length&&"none"==this.parent.viewportNode.children[e].style.display;e++)this._topHiddenCodeCells++}const o=this.parent.viewportNode.children[t+this._topHiddenCodeCells];e<t?o.insertAdjacentElement("afterend",n.node):o.insertAdjacentElement("beforebegin",n.node)}onAfterAttach(e){super.onAfterAttach(e),this._header&&!this._header.isAttached&&H.Widget.attach(this._header,this.parent.node,this.parent.node.firstElementChild),this._footer&&!this._footer.isAttached&&H.Widget.attach(this._footer,this.parent.node)}onBeforeDetach(e){var t,n;(null===(t=this._header)||void 0===t?void 0:t.isAttached)&&H.Widget.detach(this._header),(null===(n=this._footer)||void 0===n?void 0:n.isAttached)&&H.Widget.detach(this._footer),super.onBeforeDetach(e)}onChildRemoved(e){this._willBeRemoved=e.child,super.onChildRemoved(e),this._willBeRemoved=null}_findNearestChildBinarySearch(e,t,n){for(;t<=e;){const o=t+Math.floor((e-t)/2),i=parseInt(this.parent.viewportNode.children[o].dataset.windowedListIndex,10);if(i===n)return o;i<n?t=o+1:i>n&&(e=o-1)}return t>0?t:0}}class Y extends H.Widget{constructor(e){super({node:document.createElement("button")}),this.notebook=e,this.node.dataset.jpTraversable="true";const t=e.translator.load("jupyterlab");this.addClass("jp-Notebook-footer"),this.node.innerText=t.__("Click to add a cell.")}handleEvent(e){switch(e.type){case"click":this.onClick();break;case"keydown":if("ArrowUp"===e.key){this.onArrowUp();break}}}onClick(){this.notebook.widgets.length>0&&(this.notebook.activeCellIndex=this.notebook.widgets.length-1),C.insertBelow(this.notebook)}onArrowUp(){}onAfterAttach(e){super.onAfterAttach(e),this.node.addEventListener("click",this),this.node.addEventListener("keydown",this)}onBeforeDetach(e){this.node.removeEventListener("click",this),this.node.removeEventListener("keydown",this),super.onBeforeDetach(e)}}const Q="jp-Notebook-cell",G="jp-mod-editMode",X="jp-mod-commandMode",Z="jp-mod-active",ee="jp-mod-selected",te="jp-mod-multiSelected",ne="jp-dragImage",oe="jp-dragImage-singlePrompt",ie="jp-dragImage-content",se="jp-dragImage-prompt",le="jp-dragImage-multipleBack",ae="application/vnd.jupyter.cells",de="jp-mod-sideBySide";void 0===window.requestIdleCallback&&(window.requestIdleCallback=function(e){let t=Date.now();return setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=function(e){clearTimeout(e)});class re extends f.WindowedList{constructor(e){var t,n,o,i,s;const a=new Array;super({model:new $(a,{overscanCount:null!==(n=null===(t=e.notebookConfig)||void 0===t?void 0:t.overscanCount)&&void 0!==n?n:re.defaultNotebookConfig.overscanCount,windowingActive:"full"===(null!==(i=null===(o=e.notebookConfig)||void 0===o?void 0:o.windowingMode)&&void 0!==i?i:re.defaultNotebookConfig.windowingMode)}),layout:new z}),this._cellCollapsed=new r.Signal(this),this._cellInViewportChanged=new r.Signal(this),this._renderingLayoutChanged=new r.Signal(this),this.addClass("jp-Notebook"),this.cellsArray=a,this._idleCallBack=null,this._editorConfig=re.defaultEditorConfig,this._notebookConfig=re.defaultNotebookConfig,this._mimetype="text/plain",this._notebookModel=null,this._modelChanged=new r.Signal(this),this._modelContentChanged=new r.Signal(this),this.node.dataset.jpKernelUser="true",this.node.dataset.jpUndoer="true",this.node.dataset.jpCodeRunner="true",this.node.dataset.jpTraversable="true",this.rendermime=e.rendermime,this.translator=e.translator||l.nullTranslator,this.contentFactory=e.contentFactory,this.editorConfig=e.editorConfig||re.defaultEditorConfig,this.notebookConfig=e.notebookConfig||re.defaultNotebookConfig,this._updateNotebookConfig(),this._mimetypeService=e.mimeTypeService,this.renderingLayout=null===(s=e.notebookConfig)||void 0===s?void 0:s.renderingLayout}get cellCollapsed(){return this._cellCollapsed}get cellInViewportChanged(){return this._cellInViewportChanged}get modelChanged(){return this._modelChanged}get modelContentChanged(){return this._modelContentChanged}get renderingLayoutChanged(){return this._renderingLayoutChanged}get model(){return this._notebookModel}set model(e){var t;if(e=e||null,this._notebookModel===e)return;const n=this._notebookModel;this._notebookModel=e,this._onModelChanged(n,e),this.onModelChanged(n,e),this._modelChanged.emit(void 0),this.viewModel.itemsList=null!==(t=null==e?void 0:e.cells)&&void 0!==t?t:null}get codeMimetype(){return this._mimetype}get widgets(){return this.cellsArray}get editorConfig(){return this._editorConfig}set editorConfig(e){this._editorConfig=e,this._updateEditorConfig()}get notebookConfig(){return this._notebookConfig}set notebookConfig(e){this._notebookConfig=e,this._updateNotebookConfig()}get renderingLayout(){return this._renderingLayout}set renderingLayout(e){var t;this._renderingLayout=e,"side-by-side"===this._renderingLayout?this.node.classList.add(de):this.node.classList.remove(de),this._renderingLayoutChanged.emit(null!==(t=this._renderingLayout)&&void 0!==t?t:"default")}dispose(){var e;this.isDisposed||(this._notebookModel=null,null===(e=this.layout.header)||void 0===e||e.dispose(),super.dispose())}moveCell(e,t,n=1){if(!this.model)return;const o=Math.min(this.model.cells.length-1,Math.max(0,t));if(o===e)return;const i=new Array(n);for(let t=0;t<n;t++){i[t]={};const n=this.widgets[e+t];if("markdown"===n.model.type)for(const e of["rendered","headingCollapsed"])i[t][e]=n[e]}this.model.sharedModel.moveCells(e,o,n);for(let e=0;e<n;e++){const n=this.widgets[t+e],o=i[e];for(const e in o)n[e]=o[e]}}renderCellOutputs(e){const t=this.viewModel.widgetRenderer(e);t instanceof i.CodeCell&&t.isPlaceholder()&&(t.dataset.windowedListIndex=`${e}`,this.layout.insertWidget(e,t),"full"===this.notebookConfig.windowingMode&&requestAnimationFrame((()=>{this.layout.removeWidget(t)})))}addHeader(){const e=this.translator.load("jupyterlab"),t=new H.Widget;t.node.textContent=e.__("The notebook is empty. Click the + button on the toolbar to add a new cell."),this.layout.header=t}removeHeader(){var e;null===(e=this.layout.header)||void 0===e||e.dispose(),this.layout.header=null}onModelChanged(e,t){}onModelContentChanged(e,t){this._modelContentChanged.emit(void 0)}onMetadataChanged(e,t){"language_info"===t.key&&this._updateMimetype()}onCellInserted(e,t){}onCellRemoved(e,t){}onUpdateRequest(e){"defer"===this.notebookConfig.windowingMode?this._runOnIdleTime():super.onUpdateRequest(e)}_onModelChanged(e,t){var n;if(e)for(e.contentChanged.disconnect(this.onModelContentChanged,this),e.metadataChanged.disconnect(this.onMetadataChanged,this),e.cells.changed.disconnect(this._onCellsChanged,this);this.cellsArray.length;)this._removeCell(0);if(!t)return void(this._mimetype="text/plain");this._updateMimetype();const o=t.cells;null!==(n=t.collaborative)&&void 0!==n&&n||o.length||t.sharedModel.insertCell(0,{cell_type:this.notebookConfig.defaultCell,metadata:"code"===this.notebookConfig.defaultCell?{trusted:!0}:{}});let i=-1;for(const e of o)this._insertCell(++i,e);t.cells.changed.connect(this._onCellsChanged,this),t.metadataChanged.connect(this.onMetadataChanged,this),t.contentChanged.connect(this.onModelContentChanged,this)}_onCellsChanged(e,t){switch(this.removeHeader(),t.type){case"add":{let e=0;e=t.newIndex;for(const n of t.newValues)this._insertCell(e++,n);this._updateDataWindowedListIndex(t.newIndex,this.model.cells.length,t.newValues.length);break}case"remove":for(let e=t.oldValues.length;e>0;e--)this._removeCell(t.oldIndex);if(this._updateDataWindowedListIndex(t.oldIndex,this.model.cells.length+t.oldValues.length,-1*t.oldValues.length),!e.length){const e=this.model;requestAnimationFrame((()=>{!e||e.isDisposed||e.sharedModel.cells.length||e.sharedModel.insertCell(0,{cell_type:this.notebookConfig.defaultCell,metadata:"code"===this.notebookConfig.defaultCell?{trusted:!0}:{}})}))}break;default:return}this.model.sharedModel.cells.length||this.addHeader(),this.update()}_insertCell(e,t){let n;switch(t.type){case"code":n=this._createCodeCell(t),n.model.mimeType=this._mimetype;break;case"markdown":n=this._createMarkdownCell(t),""===t.sharedModel.getSource()&&(n.rendered=!1);break;default:n=this._createRawCell(t)}n.inViewportChanged.connect(this._onCellInViewportChanged,this),n.addClass(Q),a.ArrayExt.insert(this.cellsArray,e,n),this.onCellInserted(e,n),this._scheduleCellRenderOnIdle()}_createCodeCell(e){const t=this.rendermime,n={contentFactory:this.contentFactory,editorConfig:this.editorConfig.code,inputHistoryScope:this.notebookConfig.inputHistoryScope,maxNumberOutputs:this.notebookConfig.maxNumberOutputs,model:e,placeholder:"none"!==this._notebookConfig.windowingMode,rendermime:t,translator:this.translator},o=this.contentFactory.createCodeCell(n);return o.syncCollapse=!0,o.syncEditable=!0,o.syncScrolled=!0,o.outputArea.inputRequested.connect((()=>{this._onInputRequested(o).catch((e=>{console.error("Failed to scroll to cell requesting input.",e)}))})),o}_createMarkdownCell(e){const t=this.rendermime,n={contentFactory:this.contentFactory,editorConfig:this.editorConfig.markdown,model:e,placeholder:"none"!==this._notebookConfig.windowingMode,rendermime:t,showEditorForReadOnlyMarkdown:this._notebookConfig.showEditorForReadOnlyMarkdown},o=this.contentFactory.createMarkdownCell(n);return o.syncCollapse=!0,o.syncEditable=!0,o.headingCollapsedChanged.connect(this._onCellCollapsed,this),o}_createRawCell(e){const t=this.contentFactory,n={editorConfig:this.editorConfig.raw,model:e,contentFactory:t,placeholder:"none"!==this._notebookConfig.windowingMode},o=this.contentFactory.createRawCell(n);return o.syncCollapse=!0,o.syncEditable=!0,o}_removeCell(e){const t=this.cellsArray[e];t.parent=null,a.ArrayExt.removeAt(this.cellsArray,e),this.onCellRemoved(e,t),t.dispose()}_updateMimetype(){var e;const t=null===(e=this._notebookModel)||void 0===e?void 0:e.getMetadata("language_info");if(t){this._mimetype=this._mimetypeService.getMimeTypeByLanguage(t);for(const e of this.widgets)"code"===e.model.type&&(e.model.mimeType=this._mimetype)}}_onCellCollapsed(e,t){C.setHeadingCollapse(e,t,this),this._cellCollapsed.emit(e)}_onCellInViewportChanged(e){this._cellInViewportChanged.emit(e)}async _onInputRequested(e){if(!e.inViewport){const t=this.widgets.findIndex((t=>t===e));if(t>=0){await this.scrollToItem(t);const n=e.node.querySelector(".jp-Stdin");n&&(W.ElementExt.scrollIntoViewIfNeeded(this.node,n),n.focus())}}}_scheduleCellRenderOnIdle(){"none"===this.notebookConfig.windowingMode||this.isDisposed||this._idleCallBack||(this._idleCallBack=requestIdleCallback((e=>{this._idleCallBack=null,this._runOnIdleTime(e.didTimeout?50:e.timeRemaining())}),{timeout:3e3}))}_updateDataWindowedListIndex(e,t,n){for(let o=0;o<this.viewportNode.childElementCount;o++){const i=this.viewportNode.children[o],s=parseInt(i.dataset.windowedListIndex,10);s>=e&&s<t&&(i.dataset.windowedListIndex=`${s+n}`)}}_updateEditorConfig(){for(let e=0;e<this.widgets.length;e++){const t=this.widgets[e];let n={};switch(t.model.type){case"code":n=this._editorConfig.code;break;case"markdown":n=this._editorConfig.markdown;break;default:n=this._editorConfig.raw}t.updateEditorConfig({...n})}}async _runOnIdleTime(e=50){const t=Date.now();let n=0;for(;Date.now()-t<e&&n<this.cellsArray.length;){const e=this.cellsArray[n];if(e.isPlaceholder())switch(this.notebookConfig.windowingMode){case"defer":await this._updateForDeferMode(e,n);break;case"full":this._renderCSSAndJSOutputs(e,n)}n++}n<this.cellsArray.length?"defer"===this.notebookConfig.windowingMode&&this.viewportNode.clientHeight<this.node.clientHeight?await this._runOnIdleTime():this._scheduleCellRenderOnIdle():this._idleCallBack&&(window.cancelIdleCallback(this._idleCallBack),this._idleCallBack=null)}async _updateForDeferMode(e,t){e.dataset.windowedListIndex=`${t}`,this.layout.insertWidget(t,e),await e.ready}_renderCSSAndJSOutputs(e,t){var n,o,s;if(e instanceof i.CodeCell)for(let i=0;i<(null!==(o=null===(n=e.model.outputs)||void 0===n?void 0:n.length)&&void 0!==o?o:0);i++)if((null!==(s=e.model.outputs.get(i).data["text/html"])&&void 0!==s?s:"").match(/(<style[^>]*>[^<]*<\/style[^>]*>|<script[^>]*>.*?<\/script[^>]*>)/gims)){this.renderCellOutputs(t);break}}_updateNotebookConfig(){this.toggleClass("jp-mod-scrollPastEnd",this._notebookConfig.scrollPastEnd),this.toggleClass("jp-mod-showHiddenCellsButton",this._notebookConfig.showHiddenCellsButton);const e=this._notebookConfig.showEditorForReadOnlyMarkdown;if(void 0!==e)for(const t of this.cellsArray)"markdown"===t.model.type&&(t.showEditorForReadOnly=e);this.viewModel.windowingActive="full"===this._notebookConfig.windowingMode}}!function(e){e.defaultEditorConfig={code:{lineNumbers:!1,lineWrap:!1,matchBrackets:!0},markdown:{lineNumbers:!1,lineWrap:!0,matchBrackets:!1},raw:{lineNumbers:!1,lineWrap:!0,matchBrackets:!1}},e.defaultNotebookConfig={showHiddenCellsButton:!0,scrollPastEnd:!0,defaultCell:"code",recordTiming:!1,inputHistoryScope:"global",maxNumberOutputs:50,showEditorForReadOnlyMarkdown:!0,disableDocumentWideUndoRedo:!0,renderingLayout:"default",sideBySideLeftMarginOverride:"10px",sideBySideRightMarginOverride:"10px",sideBySideOutputRatio:1,overscanCount:1,windowingMode:"full"};class t extends i.Cell.ContentFactory{createCodeCell(e){return new i.CodeCell(e).initializeState()}createMarkdownCell(e){return new i.MarkdownCell(e).initializeState()}createRawCell(e){return new i.RawCell(e).initializeState()}}e.ContentFactory=t}(re||(re={}));class ce extends re{constructor(e){super(e),this._activeCellIndex=-1,this._activeCell=null,this._mode="command",this._drag=null,this._dragData=null,this._mouseMode=null,this._activeCellChanged=new r.Signal(this),this._stateChanged=new r.Signal(this),this._selectionChanged=new r.Signal(this),this._checkCacheOnNextResize=!1,this._lastClipboardInteraction=null,this._selectedCells=[],this.node.tabIndex=0,this.node.setAttribute("data-lm-dragscroll","true"),this.activeCellChanged.connect(this._updateSelectedCells,this),this.selectionChanged.connect(this._updateSelectedCells,this),this.addFooter()}get selectedCells(){return this._selectedCells}addFooter(){const e=new Y(this);this.layout.footer=e}_onCellsChanged(e,t){var n,o;const i=null===(n=this.activeCell)||void 0===n?void 0:n.model.id;if(super._onCellsChanged(e,t),i){const e=null===(o=this.model)||void 0===o?void 0:o.sharedModel.cells.findIndex((e=>e.getId()===i));null!=e&&(this.activeCellIndex=e)}}get activeCellChanged(){return this._activeCellChanged}get stateChanged(){return this._stateChanged}get selectionChanged(){return this._selectionChanged}get mode(){return this._mode}set mode(e){const t=this.activeCell;if(t||(e="command"),e===this._mode)return void this._ensureFocus();this.update();const n=this._mode;if(this._mode=e,"edit"===e){for(const e of this.widgets)this.deselect(e);t instanceof i.MarkdownCell&&(t.rendered=!1),t.inputHidden=!1}else this.node.focus();this._stateChanged.emit({name:"mode",oldValue:n,newValue:e}),this._ensureFocus()}get activeCellIndex(){return this.model&&this.widgets.length?this._activeCellIndex:-1}set activeCellIndex(e){var t;const n=this._activeCellIndex;this.model&&this.widgets.length?(e=Math.max(e,0),e=Math.min(e,this.widgets.length-1)):e=-1,this._activeCellIndex=e;const o=null!==(t=this.widgets[e])&&void 0!==t?t:null,s=o!==this._activeCell;s&&(this.update(),this._activeCell=o),(s||e!=n)&&this._activeCellChanged.emit(o),"edit"===this.mode&&o instanceof i.MarkdownCell&&(o.rendered=!1),this._ensureFocus(),e!==n&&(this._trimSelections(),this._stateChanged.emit({name:"activeCellIndex",oldValue:n,newValue:e}))}get activeCell(){return this._activeCell}get lastClipboardInteraction(){return this._lastClipboardInteraction}set lastClipboardInteraction(e){this._lastClipboardInteraction=e}dispose(){this.isDisposed||(this._activeCell=null,super.dispose())}moveCell(e,t,n=1){const o=e<=this.activeCellIndex&&this.activeCellIndex<e+n?this.activeCellIndex+t-e-(e>t?0:n-1):-1,i=this.widgets.slice(e,e+n).map((e=>this.isSelected(e)));super.moveCell(e,t,n),o>=0&&(this.activeCellIndex=o),e>t?i.forEach(((e,n)=>{e&&this.select(this.widgets[t+n])})):i.forEach(((e,o)=>{e&&this.select(this.widgets[t-n+1+o])}))}select(e){he.selectedProperty.get(e)||(he.selectedProperty.set(e,!0),this._selectionChanged.emit(void 0),this.update())}deselect(e){he.selectedProperty.get(e)&&(he.selectedProperty.set(e,!1),this._selectionChanged.emit(void 0),this.update())}isSelected(e){return he.selectedProperty.get(e)}isSelectedOrActive(e){return e===this._activeCell||he.selectedProperty.get(e)}deselectAll(){let e=!1;for(const t of this.widgets)he.selectedProperty.get(t)&&(e=!0),he.selectedProperty.set(t,!1);e&&this._selectionChanged.emit(void 0),this.activeCellIndex=this.activeCellIndex,this.update()}extendContiguousSelectionTo(e){let t,{head:n,anchor:o}=this.getContiguousSelection();if(null===o||null===n){if(e===this.activeCellIndex)return;n=this.activeCellIndex,o=this.activeCellIndex}if(this.activeCellIndex=e,(e=this.activeCellIndex)===o)return void this.deselectAll();let i=!1;if(n<e)for(n<o&&(he.selectedProperty.set(this.widgets[n],!1),i=!0),t=n+1;t<e;t++)t!==o&&(he.selectedProperty.set(this.widgets[t],!he.selectedProperty.get(this.widgets[t])),i=!0);else if(e<n)for(o<n&&(he.selectedProperty.set(this.widgets[n],!1),i=!0),t=e+1;t<n;t++)t!==o&&(he.selectedProperty.set(this.widgets[t],!he.selectedProperty.get(this.widgets[t])),i=!0);he.selectedProperty.get(this.widgets[o])||(i=!0),he.selectedProperty.set(this.widgets[o],!0),he.selectedProperty.get(this.widgets[e])||(i=!0),he.selectedProperty.set(this.widgets[e],!0),i&&this._selectionChanged.emit(void 0)}getContiguousSelection(){const e=this.widgets,t=a.ArrayExt.findFirstIndex(e,(e=>this.isSelected(e)));if(-1===t)return{head:null,anchor:null};const n=a.ArrayExt.findLastIndex(e,(e=>this.isSelected(e)),-1,t);for(let o=t;o<=n;o++)if(!this.isSelected(e[o]))throw new Error("Selection not contiguous");const o=this.activeCellIndex;if(t!==o&&n!==o)throw new Error("Active cell not at endpoint of selection");return t===o?{head:t,anchor:n}:{head:n,anchor:t}}async scrollToCell(e,t="auto"){try{await this.scrollToItem(this.widgets.findIndex((t=>t===e)),t)}catch(e){}this.deselectAll(),this.select(e),e.activate()}_parseFragment(e){const t=e.slice(1);if(!t)return;const n=t.split("=");return 1===n.length?{kind:"heading",value:t}:{kind:n[0],value:n.slice(1).join("=")}}async setFragment(e){const t=this._parseFragment(e);if(!t)return;let n;switch(t.kind){case"heading":n=await this._findHeading(t.value);break;case"cell-id":n=this._findCellById(t.value);break;default:console.warn(`Unknown target type for URI fragment ${e}, interpreting as a heading`),n=await this._findHeading(t.kind+"="+t.value)}if(null==n)return;let{cell:o,element:i}=n;o.inViewport||await this.scrollToCell(o,"center"),null==i&&(i=o.node);const s=this.node.getBoundingClientRect(),l=i.getBoundingClientRect();(l.top>s.bottom||l.bottom<s.top)&&i.scrollIntoView({block:"center"})}handleEvent(e){if(this.model)switch(e.type){case"contextmenu":e.eventPhase===Event.CAPTURING_PHASE&&this._evtContextMenuCapture(e);break;case"mousedown":e.eventPhase===Event.CAPTURING_PHASE?this._evtMouseDownCapture(e):e.defaultPrevented||this._evtMouseDown(e);break;case"mouseup":e.currentTarget===document&&this._evtDocumentMouseup(e);break;case"mousemove":e.currentTarget===document&&this._evtDocumentMousemove(e);break;case"keydown":this._ensureFocus(!0);break;case"dblclick":this._evtDblClick(e);break;case"focusin":this._evtFocusIn(e);break;case"focusout":this._evtFocusOut(e);break;case"lm-dragenter":this._evtDragEnter(e);break;case"lm-dragleave":this._evtDragLeave(e);break;case"lm-dragover":this._evtDragOver(e);break;case"lm-drop":this._evtDrop(e);break;default:super.handleEvent(e)}}onAfterAttach(e){super.onAfterAttach(e);const t=this.node;t.addEventListener("contextmenu",this,!0),t.addEventListener("mousedown",this,!0),t.addEventListener("mousedown",this),t.addEventListener("keydown",this),t.addEventListener("dblclick",this),t.addEventListener("focusin",this),t.addEventListener("focusout",this),t.addEventListener("lm-dragenter",this,!0),t.addEventListener("lm-dragleave",this,!0),t.addEventListener("lm-dragover",this,!0),t.addEventListener("lm-drop",this,!0)}onBeforeDetach(e){const t=this.node;t.removeEventListener("contextmenu",this,!0),t.removeEventListener("mousedown",this,!0),t.removeEventListener("mousedown",this),t.removeEventListener("keydown",this),t.removeEventListener("dblclick",this),t.removeEventListener("focusin",this),t.removeEventListener("focusout",this),t.removeEventListener("lm-dragenter",this,!0),t.removeEventListener("lm-dragleave",this,!0),t.removeEventListener("lm-dragover",this,!0),t.removeEventListener("lm-drop",this,!0),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),super.onBeforeAttach(e)}onAfterShow(e){super.onAfterShow(e),this._checkCacheOnNextResize=!0}onResize(e){var t;if(!this._checkCacheOnNextResize)return super.onResize(e);super.onResize(e),this._checkCacheOnNextResize=!1;const n=this._cellLayoutStateCache,o=parseInt(this.node.style.width,10);if(!n||o!==n.width){this._cellLayoutStateCache={width:o};for(const e of this.widgets)e instanceof i.Cell&&e.inViewport&&(null===(t=e.editorWidget)||void 0===t||t.update())}}onBeforeHide(e){super.onBeforeHide(e);const t=parseInt(this.node.style.width,10);this._cellLayoutStateCache={width:t}}onActivateRequest(e){super.onActivateRequest(e),this._ensureFocus(!0)}onUpdateRequest(e){super.onUpdateRequest(e);const t=this.activeCell;"edit"===this.mode?(this.addClass(G),this.removeClass(X)):(this.addClass(X),this.removeClass(G)),t&&t.addClass(Z);let n=0;for(const e of this.widgets)e!==t&&e.removeClass(Z),e.removeClass(te),this.isSelectedOrActive(e)?(e.addClass(ee),n++):e.removeClass(ee);n>1&&(null==t||t.addClass(te))}onCellInserted(e,t){t.ready.then((()=>{t.isDisposed||t.editor.edgeRequested.connect(this._onEdgeRequest,this)})),this.activeCellIndex=e<=this.activeCellIndex?this.activeCellIndex+1:this.activeCellIndex}onCellRemoved(e,t){this.activeCellIndex=e<=this.activeCellIndex?this.activeCellIndex-1:this.activeCellIndex,this.isSelected(t)&&this._selectionChanged.emit(void 0)}onModelChanged(e,t){super.onModelChanged(e,t),this.activeCellIndex=0}_onEdgeRequest(e,t){const n=this.activeCellIndex;if("top"===t){if(this.activeCellIndex--,this.activeCellIndex<n){const e=this.activeCell.editor;if(e){const t=e.lineCount-1;e.setCursorPosition({line:t,column:0})}}}else if("bottom"===t&&(this.activeCellIndex++,this.activeCellIndex>n)){const e=this.activeCell.editor;e&&e.setCursorPosition({line:0,column:0})}this.mode="edit"}_ensureFocus(e=!1){var t,n;const o=this.activeCell;"edit"===this.mode&&o&&!0!==(null===(t=o.editor)||void 0===t?void 0:t.hasFocus())&&(o.inViewport?null===(n=o.editor)||void 0===n||n.focus():this.scrollToItem(this.activeCellIndex).then((()=>{o.ready.then((()=>{var e;null===(e=o.editor)||void 0===e||e.focus()}))})).catch((e=>{}))),e&&!this.node.contains(document.activeElement)&&this.node.focus()}_findCell(e){let t=e;for(;t&&t!==this.node;){if(t.classList.contains(Q)){const e=a.ArrayExt.findFirstIndex(this.widgets,(e=>e.node===t));if(-1!==e)return e;break}t=t.parentElement}return-1}_findEventTargetAndCell(e){let t=e.target,n=this._findCell(t);return-1===n&&(t=document.elementFromPoint(e.clientX,e.clientY),n=this._findCell(t)),[t,n]}async _findHeading(e){for(let t=0;t<this.widgets.length;t++){const n=this.widgets[t];if("raw"!==n.model.type&&("markdown"!==n.model.type||n.rendered))for(const t of n.headings){let o="";switch(t.type){case i.Cell.HeadingType.HTML:o=t.id;break;case i.Cell.HeadingType.Markdown:{const e=t;o=await F.TableOfContentsUtils.Markdown.getHeadingId(this.rendermime.markdownParser,e.raw,e.level)}}if(o===e)return{cell:n,element:this.node.querySelector(`h${t.level}[id="${o}"]`)}}}return null}_findCellById(e){for(let t=0;t<this.widgets.length;t++){const n=this.widgets[t];if(n.model.id===e)return{cell:n}}return null}_evtContextMenuCapture(e){var t;if(e.shiftKey)return;const[n,o]=this._findEventTargetAndCell(e),i=this.widgets[o];i&&(null===(t=i.editorWidget)||void 0===t?void 0:t.node.contains(n))&&e.preventDefault()}_evtMouseDownCapture(e){var t;const{button:n,shiftKey:o}=e,[i,s]=this._findEventTargetAndCell(e),l=this.widgets[s];2===n&&!o&&l&&(null===(t=l.editorWidget)||void 0===t?void 0:t.node.contains(i))&&(this.mode="command",e.preventDefault())}_evtMouseDown(e){var t,n,o;const{button:i,shiftKey:s}=e;if(0!==i&&2!==i)return;if(s&&2===i)return;const[l,a]=this._findEventTargetAndCell(e),d=this.widgets[a];let r;if(r=d?(null===(t=d.editorWidget)||void 0===t?void 0:t.node.contains(l))?"input":(null===(n=d.promptNode)||void 0===n?void 0:n.contains(l))?"prompt":"cell":"notebook","input"!==r&&(this.mode="command"),"notebook"===r)this.deselectAll();else if("prompt"===r||"cell"===r){const t=""!==(null!==(o=window.getSelection())&&void 0!==o?o:"").toString();if(0!==i||!s||t||["INPUT","OPTION"].includes(l.tagName))0!==i||s?2===i&&(this.isSelectedOrActive(d)||(this.deselectAll(),this.activeCellIndex=a),e.preventDefault()):("prompt"===r&&(this._dragData={pressX:e.clientX,pressY:e.clientY,index:a},this._mouseMode="couldDrag",document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0),e.preventDefault()),this.isSelectedOrActive(d)||(this.deselectAll(),this.activeCellIndex=a));else{e.preventDefault();try{this.extendContiguousSelectionTo(a)}catch(e){return console.error(e),void this.deselectAll()}this._mouseMode="select",document.addEventListener("mouseup",this,!0),document.addEventListener("mousemove",this,!0)}}else"input"===r&&(2!==i||this.isSelectedOrActive(d)||(this.deselectAll(),this.activeCellIndex=a));this._ensureFocus(!0)}_evtDocumentMouseup(e){if(e.preventDefault(),e.stopPropagation(),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),"couldDrag"===this._mouseMode){const[,t]=this._findEventTargetAndCell(e);this.deselectAll(),this.activeCellIndex=t,this.activeCell.node.contains(document.activeElement)||this.node.focus()}this._mouseMode=null}_evtDocumentMousemove(e){switch(e.preventDefault(),e.stopPropagation(),this._mouseMode){case"select":{const t=e.target,n=this._findCell(t);-1!==n&&this.extendContiguousSelectionTo(n);break}case"couldDrag":{const t=this._dragData,n=Math.abs(e.clientX-t.pressX),o=Math.abs(e.clientY-t.pressY);(n>=5||o>=5)&&(this._mouseMode=null,this._startDrag(t.index,e.clientX,e.clientY));break}}}_evtDragEnter(e){if(!e.mimeData.hasData(ae))return;e.preventDefault(),e.stopPropagation();const t=e.target,n=this._findCell(t);-1!==n&&this.cellsArray[n].node.classList.add(K)}_evtDragLeave(e){if(!e.mimeData.hasData(ae))return;e.preventDefault(),e.stopPropagation();const t=this.node.getElementsByClassName(K);t.length&&t[0].classList.remove(K)}_evtDragOver(e){if(!e.mimeData.hasData(ae))return;e.preventDefault(),e.stopPropagation(),e.dropAction=e.proposedAction;const t=this.node.getElementsByClassName(K);t.length&&t[0].classList.remove(K);const n=e.target,o=this._findCell(n);-1!==o&&this.cellsArray[o].node.classList.add(K)}_evtDrop(e){if(!e.mimeData.hasData(ae))return;if(e.preventDefault(),e.stopPropagation(),"none"===e.proposedAction)return void(e.dropAction="none");let t=e.target;for(;t&&t.parentElement;){if(t.classList.contains(K)){t.classList.remove(K);break}t=t.parentElement}const n=this.model,o=e.source;if(o===this){e.dropAction="move";const n=e.mimeData.getData("internal:cells"),s=n[n.length-1];if(s instanceof i.MarkdownCell&&s.headingCollapsed){const e=C.findNextParentHeading(s,o);if(e>0){const t=(0,a.findIndex)(o.widgets,(e=>s.model.id===e.model.id));n.push(...o.widgets.slice(t+1,e))}}let l=a.ArrayExt.firstIndexOf(this.widgets,n[0]),d=this._findCell(t);if(-1!==d&&d>l?d-=1:-1===d&&(d=this.widgets.length-1),d>=l&&d<l+n.length)return;this.moveCell(l,d,n.length)}else{e.dropAction="copy";let o=this._findCell(t);-1===o&&(o=this.widgets.length);const i=o,s=e.mimeData.getData(ae);n.sharedModel.insertCells(o,s),this.deselectAll(),this.activeCellIndex=i,this.extendContiguousSelectionTo(o-1)}}_startDrag(e,t,n){var o;const i=this.model.cells,s=[],l=[];let a=-1;for(const e of this.widgets){const t=i.get(++a);this.isSelectedOrActive(e)&&(e.addClass(J),s.push(t.toJSON()),l.push(e))}const r=this.activeCell;let c,h=null;if("code"===(null==r?void 0:r.model.type)){const e=r.model.executionCount;c=" ",e&&(c=e.toString())}else c="";h=he.createDragImage(s.length,c,null!==(o=null==r?void 0:r.model.sharedModel.getSource().split("\n")[0].slice(0,26))&&void 0!==o?o:""),this._drag=new j.Drag({mimeData:new d.MimeData,dragImage:h,supportedActions:"copy-move",proposedAction:"copy",source:this}),this._drag.mimeData.setData(ae,s),this._drag.mimeData.setData("internal:cells",l);const u=l.map((e=>e.model.sharedModel.getSource())).join("\n");this._drag.mimeData.setData("text/plain",u),document.removeEventListener("mousemove",this,!0),document.removeEventListener("mouseup",this,!0),this._mouseMode=null,this._drag.start(t,n).then((e=>{if(!this.isDisposed){this._drag=null;for(const e of l)e.removeClass(J)}}))}_evtFocusIn(e){var t;const n=e.target,o=this._findCell(n);if(-1!==o){const e=this.widgets[o];e.editorWidget&&!e.editorWidget.node.contains(n)&&(this.mode="command"),this.activeCellIndex=o;const i=null===(t=e.editorWidget)||void 0===t?void 0:t.node;(null==i?void 0:i.contains(n))&&(this.mode="edit"),this.activeCellIndex=o}else this.mode="command"}_evtFocusOut(e){var t;const n=e.relatedTarget;if(!n)return;const o=this._findCell(n);-1!==o&&(null===(t=this.widgets[o].editorWidget)||void 0===t?void 0:t.node.contains(n))||"command"!==this.mode&&(this.mode="command",n&&n.focus())}_evtDblClick(e){const t=this.model;if(!t)return;this.deselectAll();const[n,o]=this._findEventTargetAndCell(e);e.target.classList.contains("jp-collapseHeadingButton")||-1===o||(this.activeCellIndex=o,"markdown"===t.cells.get(o).type?this.widgets[o].rendered=!1:"img"===n.localName&&n.classList.toggle("jp-mod-unconfined"))}_trimSelections(){for(let e=0;e<this.widgets.length;e++)if(e!==this._activeCellIndex){const t=this.widgets[e];!t.model.isDisposed&&t.editor&&t.model.selections.delete(t.editor.uuid)}}_updateSelectedCells(){this._selectedCells=this.widgets.filter((e=>this.isSelectedOrActive(e)))}}var he;!function(e){class t extends re.ContentFactory{}e.ContentFactory=t}(ce||(ce={})),function(e){e.selectedProperty=new U.AttachedProperty({name:"selected",create:()=>!1});class t extends H.PanelLayout{onUpdateRequest(e){}}e.NotebookPanelLayout=t,e.createDragImage=function(e,t,n){return e>1?""!==t?q.VirtualDOM.realize(q.h.div(q.h.div({className:ne},q.h.span({className:se},"["+t+"]:"),q.h.span({className:ie},n)),q.h.div({className:le},""))):q.VirtualDOM.realize(q.h.div(q.h.div({className:ne},q.h.span({className:se}),q.h.span({className:ie},n)),q.h.div({className:le},""))):""!==t?q.VirtualDOM.realize(q.h.div(q.h.div({className:`${ne} ${oe}`},q.h.span({className:se},"["+t+"]:"),q.h.span({className:ie},n)))):q.VirtualDOM.realize(q.h.div(q.h.div({className:`${ne} ${oe}`},q.h.span({className:se}),q.h.span({className:ie},n))))}}(he||(he={}));class ue extends V.DocumentWidget{constructor(e){super(e),this._autorestarting=!1,this.addClass("jp-NotebookPanel"),this.toolbar.addClass("jp-NotebookPanel-toolbar"),this.content.addClass("jp-NotebookPanel-notebook"),this.content.model=this.context.model,this.context.sessionContext.kernelChanged.connect(this._onKernelChanged,this),this.context.sessionContext.statusChanged.connect(this._onSessionStatusChanged,this),this.context.saveState.connect(this._onSave,this),this.revealed.then((()=>{if(!this.isDisposed&&1===this.content.widgets.length){const e=this.content.widgets[0].model;"code"===e.type&&""===e.sharedModel.getSource()&&(this.content.mode="edit")}}))}_onSave(e,t){if("started"===t&&this.model)for(const e of this.model.cells)if((0,i.isMarkdownCellModel)(e))for(const t of e.attachments.keys)e.sharedModel.getSource().includes(t)||e.attachments.remove(t)}get sessionContext(){return this.context.sessionContext}get model(){return this.content.model}setConfig(e){this.content.editorConfig=e.editorConfig,this.content.notebookConfig=e.notebookConfig;const t=this.context.sessionContext.kernelPreference;this.context.sessionContext.kernelPreference={...t,shutdownOnDispose:e.kernelShutdown,autoStartDefault:e.autoStartDefault}}setFragment(e){this.context.ready.then((()=>{this.content.setFragment(e)}))}dispose(){this.content.dispose(),super.dispose()}[o.Printing.symbol](){return async()=>{this.context.model.dirty&&!this.context.model.readOnly&&await this.context.save(),await o.Printing.printURL(s.PageConfig.getNBConvertURL({format:"html",download:!1,path:this.context.path}))}}onBeforeHide(e){super.onBeforeHide(e),this.content.isParentHidden=!0}onBeforeShow(e){this.content.isParentHidden=!1,super.onBeforeShow(e)}_onKernelChanged(e,t){if(!this.model||!t.newValue)return;const{newValue:n}=t;n.info.then((e=>{var t;this.model&&(null===(t=this.context.sessionContext.session)||void 0===t?void 0:t.kernel)===n&&this._updateLanguage(e.language_info)})),this._updateSpec(n)}_onSessionStatusChanged(e,t){var n;"autorestarting"!==t||this._autorestarting?"restarting"===t||(this._autorestarting=!1):((0,o.showDialog)({title:this._trans.__("Kernel Restarting"),body:this._trans.__("The kernel for %1 appears to have died. It will restart automatically.",null===(n=this.sessionContext.session)||void 0===n?void 0:n.path),buttons:[o.Dialog.okButton({label:this._trans.__("Ok")})]}),this._autorestarting=!0)}_updateLanguage(e){this.model.setMetadata("language_info",e)}async _updateSpec(e){const t=await e.spec;this.isDisposed||this.model.setMetadata("kernelspec",{name:e.name,display_name:null==t?void 0:t.display_name,language:null==t?void 0:t.language})}}!function(e){class t extends ce.ContentFactory{createNotebook(e){return new ce(e)}}e.ContentFactory=t,e.IContentFactory=new d.Token("@jupyterlab/notebook:IContentFactory","A factory object that creates new notebooks.\n Use this if you want to create and host notebooks in your own UI elements.")}(ue||(ue={}));var ge,Ce=n(75725);class me extends Ce.SearchProvider{constructor(e,t=l.nullTranslator){super(e),this.translator=t,this._textSelection=null,this._currentProviderIndex=null,this._delayedActiveCellChangeHandler=null,this._onSelection=!1,this._selectedCells=1,this._selectedLines=0,this._query=null,this._searchProviders=[],this._editorSelectionsObservable=null,this._selectionSearchMode="cells",this._selectionLock=!1,this._handleHighlightsAfterActiveCellChange=this._handleHighlightsAfterActiveCellChange.bind(this),this.widget.model.cells.changed.connect(this._onCellsChanged,this),this.widget.content.activeCellChanged.connect(this._onActiveCellChanged,this),this.widget.content.selectionChanged.connect(this._onCellSelectionChanged,this),this.widget.content.stateChanged.connect(this._onNotebookStateChanged,this),this._observeActiveCell(),this._filtersChanged.connect(this._setEnginesSelectionSearchMode,this)}_onNotebookStateChanged(e,t){"mode"===t.name&&window.setTimeout((()=>{var e;"command"===t.newValue&&(null===(e=document.activeElement)||void 0===e?void 0:e.closest(".jp-DocumentSearch-overlay"))||(this._updateSelectionMode(),this._filtersChanged.emit())}),0)}static isApplicable(e){return e instanceof ue}static createNew(e,t){return new me(e,t)}get currentMatchIndex(){let e=0,t=!1;for(let n=0;n<this._searchProviders.length;n++){const o=this._searchProviders[n];if(this._currentProviderIndex==n){const n=o.currentMatchIndex;if(null===n)return null;e+=n,t=!0;break}e+=o.matchesCount}return t?e:null}get matchesCount(){return this._searchProviders.reduce(((e,t)=>e+t.matchesCount),0)}get isReadOnly(){var e,t,n;return null!==(n=null===(t=null===(e=this.widget)||void 0===e?void 0:e.content.model)||void 0===t?void 0:t.readOnly)&&void 0!==n&&n}get replaceOptionsSupport(){return{preserveCase:!0}}getSelectionState(){const e="cells"===this._selectionSearchMode,t=e?this._selectedCells:this._selectedLines;return t>1?"multiple":1!==t||e?"none":"single"}dispose(){var e;if(this.isDisposed)return;this.widget.content.activeCellChanged.disconnect(this._onActiveCellChanged,this),null===(e=this.widget.model)||void 0===e||e.cells.changed.disconnect(this._onCellsChanged,this),this.widget.content.stateChanged.disconnect(this._onNotebookStateChanged,this),this.widget.content.selectionChanged.disconnect(this._onCellSelectionChanged,this),this._stopObservingLastCell(),super.dispose();const t=this.widget.content.activeCellIndex;this.endQuery().then((()=>{this.widget.isDisposed||(this.widget.content.activeCellIndex=t)})).catch((e=>{console.error(`Fail to end search query in notebook:\n${e}`)}))}getFilters(){const e=this.translator.load("jupyterlab");return{output:{title:e.__("Search Cell Outputs"),description:e.__("Search in the cell outputs."),default:!1,supportReplace:!1},selection:{title:"cells"===this._selectionSearchMode?e._n("Search in %1 Selected Cell","Search in %1 Selected Cells",this._selectedCells):e._n("Search in %1 Selected Line","Search in %1 Selected Lines",this._selectedLines),description:e.__("Search only in the selected cells or text (depending on edit/command mode)."),default:!1,supportReplace:!0}}}_updateSelectionMode(){this._selectionLock||(this._selectionSearchMode=1===this._selectedCells&&"edit"===this.widget.content.mode&&0!==this._selectedLines?"text":"cells")}getInitialQuery(){const e=this.widget.content.activeCell,t=null==e?void 0:e.editor;return t?t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to):""}async clearHighlight(){this._selectionLock=!0,null!==this._currentProviderIndex&&this._currentProviderIndex<this._searchProviders.length&&(await this._searchProviders[this._currentProviderIndex].clearHighlight(),this._currentProviderIndex=null),this._selectionLock=!1}async highlightNext(e=!0,t){const n=await this._stepNext(!1,e,t);return null!=n?n:void 0}async highlightPrevious(e=!0,t){const n=await this._stepNext(!0,e,t);return null!=n?n:void 0}async startQuery(e,t){if(!this.widget)return;await this.endQuery();let n=this.widget.content.widgets;this._query=e,this._filters={output:!1,selection:!1,...null!=t?t:{}},this._onSelection=this._filters.selection;const o=this.widget.content.activeCellIndex;return this._searchProviders=await Promise.all(n.map((async(t,n)=>{const s=(0,i.createCellSearchProvider)(t);return await s.setIsActive(!this._filters.selection||this.widget.content.isSelectedOrActive(t)),this._onSelection&&"text"===this._selectionSearchMode&&n===o&&this._textSelection&&await s.setSearchSelection(this._textSelection),await s.startQuery(e,this._filters),s}))),this._currentProviderIndex=o,await this.highlightNext(!0,{from:"selection-start",scroll:!1,select:!1}),Promise.resolve()}async endQuery(){await Promise.all(this._searchProviders.map((e=>e.endQuery().then((()=>{e.dispose()}))))),this._searchProviders.length=0,this._currentProviderIndex=null}async replaceCurrentMatch(e,t=!0,n){let o=!1;const i=async(e=!1)=>{var n;const o=null===(n=this.widget)||void 0===n?void 0:n.content.activeCell;"markdown"===(null==o?void 0:o.model.type)&&o.rendered&&(o.rendered=!1,e&&await this.highlightNext(t))};if(null!==this._currentProviderIndex){await i();const s=this._searchProviders[this._currentProviderIndex];o=await s.replaceCurrentMatch(e,!1,n),null===s.currentMatchIndex&&await this.highlightNext(t)}return await i(!0),o}async replaceAllMatches(e,t){return(await Promise.all(this._searchProviders.map((n=>n.replaceAllMatches(e,t))))).includes(!0)}async validateFilter(e,t){if("output"!==e)return t;if(t&&this.widget.content.widgets.some((e=>e instanceof i.CodeCell&&e.isPlaceholder()))){const e=this.translator.load("jupyterlab");if(!(await(0,o.showDialog)({title:e.__("Confirmation"),body:e.__("Searching outputs is expensive and requires to first rendered all outputs. Are you sure you want to search in the cell outputs?"),buttons:[o.Dialog.cancelButton({label:e.__("Cancel")}),o.Dialog.okButton({label:e.__("Ok")})]})).button.accept)return!1;this.widget.content.widgets.forEach(((e,t)=>{e instanceof i.CodeCell&&e.isPlaceholder()&&this.widget.content.renderCellOutputs(t)}))}return t}_addCellProvider(e){var t,n;const o=this.widget.content.widgets[e],s=(0,i.createCellSearchProvider)(o);a.ArrayExt.insert(this._searchProviders,e,s),s.setIsActive(!(null!==(n=null===(t=this._filters)||void 0===t?void 0:t.selection)&&void 0!==n&&n)||this.widget.content.isSelectedOrActive(o)).then((()=>{s.startQuery(this._query,this._filters)}))}_removeCellProvider(e){const t=a.ArrayExt.removeAt(this._searchProviders,e);null==t||t.dispose()}async _onCellsChanged(e,t){switch(t.type){case"add":t.newValues.forEach(((e,n)=>{this._addCellProvider(t.newIndex+n)}));break;case"move":a.ArrayExt.move(this._searchProviders,t.oldIndex,t.newIndex);break;case"remove":for(let e=0;e<t.oldValues.length;e++)this._removeCellProvider(t.oldIndex);break;case"set":t.newValues.forEach(((e,n)=>{this._addCellProvider(t.newIndex+n),this._removeCellProvider(t.newIndex+n+1)}))}this._stateChanged.emit()}async _stepNext(e=!1,t=!1,n){const o=async e=>{var t;if(null!==(t=null==n?void 0:n.scroll)&&void 0!==t&&!t)return;if(this._selectionLock=!0,this.widget.content.activeCellIndex!==this._currentProviderIndex&&(this.widget.content.activeCellIndex=this._currentProviderIndex),-1===this.widget.content.activeCellIndex)return console.warn("No active cell (no cells or no model), aborting search"),void(this._selectionLock=!1);const o=this.widget.content.activeCell;if(!o.inViewport)try{await this.widget.content.scrollToItem(this._currentProviderIndex)}catch(e){}if(o.inputHidden&&(o.inputHidden=!1),!o.inViewport)return void(this._selectionLock=!1);await o.ready;const i=o.editor;i.revealPosition(i.getPositionAt(e.position)),this._selectionLock=!1};null===this._currentProviderIndex&&(this._currentProviderIndex=this.widget.content.activeCellIndex),e&&"command"===this.widget.content.mode&&(this._searchProviders[this._currentProviderIndex].getCurrentMatch()||(this._currentProviderIndex-=1),t&&(this._currentProviderIndex=(this._currentProviderIndex+this._searchProviders.length)%this._searchProviders.length));const i=this._currentProviderIndex;do{const i=this._searchProviders[this._currentProviderIndex],s=e?await i.highlightPrevious(!1,n):await i.highlightNext(!1,n);if(s)return await o(s),s;this._currentProviderIndex=this._currentProviderIndex+(e?-1:1),t&&(this._currentProviderIndex=(this._currentProviderIndex+this._searchProviders.length)%this._searchProviders.length)}while(t?this._currentProviderIndex!==i:0<=this._currentProviderIndex&&this._currentProviderIndex<this._searchProviders.length);if(t){const t=this._searchProviders[i],s=e?await t.highlightPrevious(!1,n):await t.highlightNext(!1,n);if(s)return await o(s),s}return this._currentProviderIndex=null,null}async _onActiveCellChanged(){null!==this._delayedActiveCellChangeHandler&&(clearTimeout(this._delayedActiveCellChangeHandler),this._delayedActiveCellChangeHandler=null),this.widget.content.activeCellIndex!==this._currentProviderIndex&&(this._delayedActiveCellChangeHandler=setTimeout((()=>{this.delayedActiveCellChangeHandlerReady=this._handleHighlightsAfterActiveCellChange()}),0)),this._observeActiveCell()}async _handleHighlightsAfterActiveCellChange(){if(this._onSelection){const e=null!==this._currentProviderIndex&&this._currentProviderIndex<this.widget.content.widgets.length?this.widget.content.widgets[this._currentProviderIndex]:null;e&&this.widget.content.isSelectedOrActive(e)||(await this._updateCellSelection(),await this.clearHighlight(),this._currentProviderIndex=this.widget.content.activeCellIndex)}await this._ensureCurrentMatch()}async _ensureCurrentMatch(){if(null!==this._currentProviderIndex){const e=this._searchProviders[this._currentProviderIndex];if(!e)return;!e.getCurrentMatch()&&this.matchesCount&&await this.highlightNext(!0,{from:"start",scroll:!1,select:!1})}}_observeActiveCell(){var e;const t=null===(e=this.widget.content.activeCell)||void 0===e?void 0:e.editor;t&&(this._stopObservingLastCell(),t.model.selections.changed.connect(this._setSelectedLines,this),this._editorSelectionsObservable=t.model.selections)}_stopObservingLastCell(){this._editorSelectionsObservable&&this._editorSelectionsObservable.changed.disconnect(this._setSelectedLines,this)}_setSelectedLines(){var e;const t=null===(e=this.widget.content.activeCell)||void 0===e?void 0:e.editor;if(!t)return;const n=t.getSelection(),{start:o,end:i}=n,s=i.line===o.line&&i.column===o.column?0:i.line-o.line+1;this._textSelection=n,s!==this._selectedLines&&(this._selectedLines=s,this._updateSelectionMode()),this._filtersChanged.emit()}async _setEnginesSelectionSearchMode(){let e;e=!!this._onSelection&&"text"===this._selectionSearchMode,this._selectionLock||await Promise.all(this._searchProviders.map(((t,n)=>{const o=this.widget.content.activeCellIndex===n;return t.setProtectSelection(o&&this._onSelection),t.setSearchSelection(o&&e?this._textSelection:null)})))}async _onCellSelectionChanged(){if(null!==this._delayedActiveCellChangeHandler&&(clearTimeout(this._delayedActiveCellChangeHandler),this._delayedActiveCellChangeHandler=null),await this._updateCellSelection(),null===this._currentProviderIndex){const e=this.widget.content.widgets.findIndex((e=>this.widget.content.isSelectedOrActive(e)));this._currentProviderIndex=e}await this._ensureCurrentMatch()}async _updateCellSelection(){const e=this.widget.content.widgets;let t=0;await Promise.all(e.map((async(e,n)=>{const o=this._searchProviders[n],i=this.widget.content.isSelectedOrActive(e);i&&(t+=1),o&&this._onSelection&&await o.setIsActive(i)}))),t!==this._selectedCells&&(this._selectedCells=t,this._updateSelectionMode()),this._filtersChanged.emit()}}!function(e){e[e.Idle=-1]="Idle",e[e.Scheduled=0]="Scheduled",e[e.Running=1]="Running"}(ge||(ge={}));class ve extends F.TableOfContentsModel{constructor(e,t,n,o){super(e,o),this.parser=t,this.sanitizer=n,this.configMetadataMap={numberHeaders:["toc-autonumbering","toc/number_sections"],numberingH1:["!toc/skip_h1_title"],baseNumbering:["toc/base_numbering"]},this._runningCells=new Array,this._cellToHeadingIndex=new WeakMap,e.context.ready.then((()=>{this.setConfiguration({})})),this.widget.context.model.metadataChanged.connect(this.onMetadataChanged,this),this.widget.content.activeCellChanged.connect(this.onActiveCellChanged,this),C.executionScheduled.connect(this.onExecutionScheduled,this),C.executed.connect(this.onExecuted,this),this.headingsChanged.connect(this.onHeadingsChanged,this)}get documentType(){return"notebook"}get isAlwaysActive(){return!0}get supportedOptions(){return["baseNumbering","maximalDepth","numberingH1","numberHeaders","includeOutput","syncCollapseState"]}getCellHeadings(e){const t=new Array;let n=this._cellToHeadingIndex.get(e);if(void 0!==n){const e=this.headings[n];for(t.push(e);this.headings[n-1]&&this.headings[n-1].cellRef===e.cellRef;)n--,t.unshift(this.headings[n])}return t}dispose(){var e,t,n;this.isDisposed||(this.headingsChanged.disconnect(this.onHeadingsChanged,this),null===(t=null===(e=this.widget.context)||void 0===e?void 0:e.model)||void 0===t||t.metadataChanged.disconnect(this.onMetadataChanged,this),null===(n=this.widget.content)||void 0===n||n.activeCellChanged.disconnect(this.onActiveCellChanged,this),C.executionScheduled.disconnect(this.onExecutionScheduled,this),C.executed.disconnect(this.onExecuted,this),this._runningCells.length=0,super.dispose())}setConfiguration(e){const t=this.loadConfigurationFromMetadata();super.setConfiguration({...this.configuration,...t,...e})}toggleCollapse(e){super.toggleCollapse(e),this.updateRunningStatus(this.headings)}getHeadings(){const e=this.widget.content.widgets,t=[],n=new Array;for(let o=0;o<e.length;o++){const i=e[o];switch(i.model.type){case"code":!this.configuration.syncCollapseState&&this.configuration.includeOutput&&t.push(...F.TableOfContentsUtils.filterHeadings(i.headings,this.configuration,n).map((e=>({...e,cellRef:i,collapsed:!1,isRunning:ge.Idle}))));break;case"markdown":{const e=F.TableOfContentsUtils.filterHeadings(i.headings,this.configuration,n).map(((e,t)=>({...e,cellRef:i,collapsed:!1,isRunning:ge.Idle})));if(this.configuration.syncCollapseState&&i.headingCollapsed){const t=Math.min(...e.map((e=>e.level)));e.find((e=>e.level===t)).collapsed=i.headingCollapsed}t.push(...e);break}}t.length>0&&this._cellToHeadingIndex.set(i,t.length-1)}return this.updateRunningStatus(t),Promise.resolve(t)}loadConfigurationFromMetadata(){const e=this.widget.content.model,t={};if(e)for(const n in this.configMetadataMap){const o=this.configMetadataMap[n];for(const i of o){let o=i;const s="!"===o[0];s&&(o=o.slice(1));const l=o.split("/");let a=e.getMetadata(l[0]);for(let e=1;e<l.length;e++)a=(null!=a?a:{})[l[e]];void 0!==a&&("boolean"==typeof a&&s&&(a=!a),t[n]=a)}}return t}onActiveCellChanged(e,t){const n=this.getCellHeadings(t)[0];this.setActiveHeading(null!=n?n:null,!1)}onHeadingsChanged(){this.widget.content.activeCell&&this.onActiveCellChanged(this.widget.content,this.widget.content.activeCell)}onExecuted(e,t){this._runningCells.forEach(((e,n)=>{if(e===t.cell){this._runningCells.splice(n,1);const t=this._cellToHeadingIndex.get(e);void 0!==t&&(this.headings[t].isRunning=ge.Idle)}})),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onExecutionScheduled(e,t){this._runningCells.includes(t.cell)||this._runningCells.push(t.cell),this.updateRunningStatus(this.headings),this.stateChanged.emit()}onMetadataChanged(){this.setConfiguration({})}updateRunningStatus(e){this._runningCells.forEach(((e,t)=>{const n=this._cellToHeadingIndex.get(e);if(void 0!==n){const e=this.headings[n];e.isRunning=Math.max(t>0?ge.Scheduled:ge.Running,e.isRunning)}}));let t=0;for(;t<e.length;){const o=e[t];if(t++,o.collapsed){const t=Math.max(o.isRunning,n(e,o.level));o.dataset={...o.dataset,"data-running":t.toString()}}else o.dataset={...o.dataset,"data-running":o.isRunning.toString()}}function n(e,o){let i=ge.Idle;for(;t<e.length;){const s=e[t];if(s.dataset={...s.dataset,"data-running":s.isRunning.toString()},!(s.level>o))break;t++,i=Math.max(s.isRunning,i),s.collapsed&&(i=Math.max(i,n(e,s.level)),s.dataset={...s.dataset,"data-running":i.toString()})}return i}}}class pe extends F.TableOfContentsFactory{constructor(e,t,n){super(e),this.parser=t,this.sanitizer=n}_createNew(e,t){const n=new ve(e,this.parser,this.sanitizer,t);let o=new WeakMap;const s=(t,n)=>{if(n){const t=t=>{if(!t.inViewport)return;const i=o.get(n);if(i){const t=e.content.node.getBoundingClientRect(),n=i.getBoundingClientRect();(n.top>t.bottom||n.bottom<t.top)&&i.scrollIntoView({block:"center"})}},i=n.cellRef,s=e.content.widgets.indexOf(i);e.content.activeCellIndex=s,i.inViewport?t(i):e.content.scrollToItem(s).then((()=>{t(i)})).catch((e=>{console.error("Fail to scroll to cell to display the required heading.")}))}},l=e=>{n.getCellHeadings(e).forEach((async e=>{var t,n;const i=await fe(e,this.parser),s=i?`h${e.level}[id="${i}"]`:`h${e.level}`;void 0!==e.outputIndex?o.set(e,F.TableOfContentsUtils.addPrefix(e.cellRef.outputArea.widgets[e.outputIndex].node,s,null!==(t=e.prefix)&&void 0!==t?t:"")):o.set(e,F.TableOfContentsUtils.addPrefix(e.cellRef.node,s,null!==(n=e.prefix)&&void 0!==n?n:""))}))},a=t=>{this.parser&&(F.TableOfContentsUtils.clearNumbering(e.content.node),o=new WeakMap,e.content.widgets.forEach((e=>{l(e)})))},d=(t,o)=>{var s,l,a,d;if(n.configuration.syncCollapseState)if(null!==o){const e=o.cellRef;e.headingCollapsed!==(null!==(s=o.collapsed)&&void 0!==s&&s)&&(e.headingCollapsed=null!==(l=o.collapsed)&&void 0!==l&&l)}else{const t=null!==(d=null===(a=n.headings[0])||void 0===a?void 0:a.collapsed)&&void 0!==d&&d;e.content.widgets.forEach((e=>{e instanceof i.MarkdownCell&&e.headingInfo.level>=0&&(e.headingCollapsed=t)}))}},r=(e,t)=>{if(n.configuration.syncCollapseState){const e=n.getCellHeadings(t)[0];e&&n.toggleCollapse({heading:e,collapsed:t.headingCollapsed})}},c=(e,t)=>{t.inViewport?l(t):F.TableOfContentsUtils.clearNumbering(t.node)};return e.context.ready.then((()=>{a(),n.activeHeadingChanged.connect(s),n.headingsChanged.connect(a),n.collapseChanged.connect(d),e.content.cellCollapsed.connect(r),e.content.cellInViewportChanged.connect(c),e.disposed.connect((()=>{n.activeHeadingChanged.disconnect(s),n.headingsChanged.disconnect(a),n.collapseChanged.disconnect(d),e.content.cellCollapsed.disconnect(r),e.content.cellInViewportChanged.disconnect(c)}))})),n}}async function fe(e,t){let n=null;return e.type===i.Cell.HeadingType.Markdown?n=await F.TableOfContentsUtils.Markdown.getHeadingId(t,e.raw,e.level):e.type===i.Cell.HeadingType.HTML&&(n=e.id),n}const _e=new d.Token("@jupyterlab/notebook:INotebookWidgetFactory","A service to create the notebook viewer."),we=new d.Token("@jupyterlab/notebook:INotebookTools",'A service for the "Notebook Tools" panel in the\n right sidebar. Use this to add your own functionality to the panel.'),be=new d.Token("@jupyterlab/notebook:INotebookTracker","A widget tracker for notebooks.\n Use this if you want to be able to iterate over and interact with notebooks\n created by the application.");class ye extends o.WidgetTracker{constructor(){super(...arguments),this._activeCell=null,this._activeCellChanged=new r.Signal(this),this._selectionChanged=new r.Signal(this)}get activeCell(){const e=this.currentWidget;return e&&e.content.activeCell||null}get activeCellChanged(){return this._activeCellChanged}get selectionChanged(){return this._selectionChanged}add(e){const t=super.add(e);return e.content.activeCellChanged.connect(this._onActiveCellChanged,this),e.content.selectionChanged.connect(this._onSelectionChanged,this),t}dispose(){this._activeCell=null,super.dispose()}onCurrentChanged(e){const t=this.activeCell;t&&t===this._activeCell||(this._activeCell=t,e&&this._activeCellChanged.emit(e.content.activeCell||null))}_onActiveCellChanged(e,t){this.currentWidget&&this.currentWidget.content===e&&(this._activeCell=t||null,this._activeCellChanged.emit(this._activeCell))}_onSelectionChanged(e){this.currentWidget&&this.currentWidget.content===e&&this._selectionChanged.emit(void 0)}}function ke(e){return e.allCellsTrusted?h().createElement(f.trustedIcon.react,{top:"2px",stylesheet:"statusBar"}):h().createElement(f.notTrustedIcon.react,{top:"2px",stylesheet:"statusBar"})}class xe extends f.VDomRenderer{constructor(e){super(new xe.Model),this.translator=e||l.nullTranslator,this.node.classList.add("jp-StatusItem-trust")}render(){if(!this.model)return null;const e=function(e,t){const n=(t=t||l.nullTranslator).load("jupyterlab");return e.trustedCells===e.totalCells?n.__("Notebook trusted: %1 of %2 code cells trusted.",e.trustedCells,e.totalCells):e.activeCellTrusted?n.__("Active cell trusted: %1 of %2 code cells trusted.",e.trustedCells,e.totalCells):n.__("Notebook not trusted: %1 of %2 code cells trusted.",e.trustedCells,e.totalCells)}(this.model,this.translator);return e!==this.node.title&&(this.node.title=e),h().createElement(ke,{allCellsTrusted:this.model.trustedCells===this.model.totalCells,activeCellTrusted:this.model.activeCellTrusted,totalCells:this.model.totalCells,trustedCells:this.model.trustedCells})}}!function(e){class t extends f.VDomModel{constructor(){super(...arguments),this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1,this._notebook=null}get trustedCells(){return this._trustedCells}get totalCells(){return this._totalCells}get activeCellTrusted(){return this._activeCellTrusted}get notebook(){return this._notebook}set notebook(e){const t=this._notebook;null!==t&&(t.activeCellChanged.disconnect(this._onActiveCellChanged,this),t.modelContentChanged.disconnect(this._onModelChanged,this));const n=this._getAllState();if(this._notebook=e,null===this._notebook)this._trustedCells=0,this._totalCells=0,this._activeCellTrusted=!1;else{this._notebook.activeCellChanged.connect(this._onActiveCellChanged,this),this._notebook.modelContentChanged.connect(this._onModelChanged,this),this._notebook.activeCell?this._activeCellTrusted=this._notebook.activeCell.model.trusted:this._activeCellTrusted=!1;const{total:e,trusted:t}=this._deriveCellTrustState(this._notebook.model);this._totalCells=e,this._trustedCells=t}this._triggerChange(n,this._getAllState())}_onModelChanged(e){const t=this._getAllState(),{total:n,trusted:o}=this._deriveCellTrustState(e.model);this._totalCells=n,this._trustedCells=o,this._triggerChange(t,this._getAllState())}_onActiveCellChanged(e,t){const n=this._getAllState();this._activeCellTrusted=!!t&&t.model.trusted,this._triggerChange(n,this._getAllState())}_deriveCellTrustState(e){if(null===e)return{total:0,trusted:0};let t=0,n=0;for(const o of e.cells)"code"===o.type&&(t++,o.trusted&&n++);return{total:t,trusted:n}}_getAllState(){return[this._trustedCells,this._totalCells,this.activeCellTrusted]}_triggerChange(e,t){e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]||this.stateChanged.emit(void 0)}}e.Model=t}(xe||(xe={}));class Se extends V.ABCWidgetFactory{constructor(e){super(e),this.rendermime=e.rendermime,this.contentFactory=e.contentFactory,this.mimeTypeService=e.mimeTypeService,this._editorConfig=e.editorConfig||re.defaultEditorConfig,this._notebookConfig=e.notebookConfig||re.defaultNotebookConfig}get editorConfig(){return this._editorConfig}set editorConfig(e){this._editorConfig=e}get notebookConfig(){return this._notebookConfig}set notebookConfig(e){this._notebookConfig=e}createNewWidget(e,t){const n=e.translator,o={rendermime:t?t.content.rendermime:this.rendermime.clone({resolver:e.urlResolver}),contentFactory:this.contentFactory,mimeTypeService:this.mimeTypeService,editorConfig:t?t.content.editorConfig:this._editorConfig,notebookConfig:t?t.content.notebookConfig:this._notebookConfig,translator:n},i=this.contentFactory.createNotebook(o);return new ue({context:e,content:i})}}}}]);
|
notebook/static/4793.bundle.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";(self.webpackChunk_JUPYTERLAB_CORE_OUTPUT=self.webpackChunk_JUPYTERLAB_CORE_OUTPUT||[]).push([[4793],{24793:(e,t,l)=>{l.d(t,{diagram:()=>f});var n=l(38968),a=l(2314),o=l(67406),i=l(86850),s=l(59308);l(27693),l(7608),l(31699),l(7259),l(81779);const d=e=>i.e.sanitizeText(e,(0,i.c)());let r={dividerMargin:10,padding:5,textHeight:10,curve:void 0};const c=function(e,t,l,n,a){const o=Object.keys(e);i.l.info("keys:",o),i.l.info(e),o.filter((t=>e[t].parent==a)).forEach((function(l){var o,s;const r=e[l],c=r.cssClasses.join(" "),p=r.label??r.id,b={labelStyle:"",shape:"class_box",labelText:d(p),classData:r,rx:0,ry:0,class:c,style:"",id:r.id,domId:r.domId,tooltip:n.db.getTooltip(r.id,a)||"",haveCallback:r.haveCallback,link:r.link,width:"group"===r.type?500:void 0,type:r.type,padding:(null==(o=(0,i.c)().flowchart)?void 0:o.padding)??(null==(s=(0,i.c)().class)?void 0:s.padding)};t.setNode(r.id,b),a&&t.setParent(r.id,a),i.l.info("setNode",b)}))};function p(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}const b={setConf:function(e){r={...r,...e}},draw:async function(e,t,l,n){i.l.info("Drawing class - ",t);const b=(0,i.c)().flowchart??(0,i.c)().class,f=(0,i.c)().securityLevel;i.l.info("config:",b);const u=(null==b?void 0:b.nodeSpacing)??50,g=(null==b?void 0:b.rankSpacing)??50,y=new o.k({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:u,ranksep:g,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),h=n.db.getNamespaces(),v=n.db.getClasses(),w=n.db.getRelations(),k=n.db.getNotes();let T;i.l.info(w),function(e,t,l,n){const a=Object.keys(e);i.l.info("keys:",a),i.l.info(e),a.forEach((function(l){var a,o;const s=e[l],r={shape:"rect",id:s.id,domId:s.domId,labelText:d(s.id),labelStyle:"",style:"fill: none; stroke: black",padding:(null==(a=(0,i.c)().flowchart)?void 0:a.padding)??(null==(o=(0,i.c)().class)?void 0:o.padding)};t.setNode(s.id,r),c(s.classes,t,0,n,s.id),i.l.info("setNode",r)}))}(h,y,0,n),c(v,y,0,n),function(e,t){const l=(0,i.c)().flowchart;let n=0;e.forEach((function(e){var o;n++;const s={classes:"relation",pattern:1==e.relation.lineType?"dashed":"solid",id:"id"+n,arrowhead:"arrow_open"===e.type?"none":"normal",startLabelRight:"none"===e.relationTitle1?"":e.relationTitle1,endLabelLeft:"none"===e.relationTitle2?"":e.relationTitle2,arrowTypeStart:p(e.relation.type1),arrowTypeEnd:p(e.relation.type2),style:"fill:none",labelStyle:"",curve:(0,i.n)(null==l?void 0:l.curve,a.c_6)};if(i.l.info(s,e),void 0!==e.style){const t=(0,i.k)(e.style);s.style=t.style,s.labelStyle=t.labelStyle}e.text=e.title,void 0===e.text?void 0!==e.style&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",(null==(o=(0,i.c)().flowchart)?void 0:o.htmlLabels)??(0,i.c)().htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+e.text+"</span>"):(s.labelType="text",s.label=e.text.replace(i.e.lineBreakRegex,"\n"),void 0===e.style&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),t.setEdge(e.id1,e.id2,s,n)}))}(w,y),function(e,t,l,n){i.l.info(e),e.forEach((function(e,o){var s,c;const p=e,b=p.text,f={labelStyle:"",shape:"note",labelText:d(b),noteData:p,rx:0,ry:0,class:"",style:"",id:p.id,domId:p.id,tooltip:"",type:"note",padding:(null==(s=(0,i.c)().flowchart)?void 0:s.padding)??(null==(c=(0,i.c)().class)?void 0:c.padding)};if(t.setNode(p.id,f),i.l.info("setNode",f),!p.class||!(p.class in n))return;const u=l+o,g={id:`edgeNote${u}`,classes:"relation",pattern:"dotted",arrowhead:"none",startLabelRight:"",endLabelLeft:"",arrowTypeStart:"none",arrowTypeEnd:"none",style:"fill:none",labelStyle:"",curve:(0,i.n)(r.curve,a.c_6)};t.setEdge(p.id,p.class,g,u)}))}(k,y,w.length+1,v),"sandbox"===f&&(T=(0,a.Ys)("#i"+t));const x="sandbox"===f?(0,a.Ys)(T.nodes()[0].contentDocument.body):(0,a.Ys)("body"),m=x.select(`[id="${t}"]`),S=x.select("#"+t+" g");if(await(0,s.r)(S,y,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",t),i.u.insertTitle(m,"classTitleText",(null==b?void 0:b.titleTopMargin)??5,n.db.getDiagramTitle()),(0,i.o)(y,m,null==b?void 0:b.diagramPadding,null==b?void 0:b.useMaxWidth),!(null==b?void 0:b.htmlLabels)){const e="sandbox"===f?T.nodes()[0].contentDocument:document,l=e.querySelectorAll('[id="'+t+'"] .edgeLabel .label');for(const t of l){const l=t.getBBox(),n=e.createElementNS("http://www.w3.org/2000/svg","rect");n.setAttribute("rx",0),n.setAttribute("ry",0),n.setAttribute("width",l.width),n.setAttribute("height",l.height),t.insertBefore(n,t.firstChild)}}}},f={parser:n.p,db:n.d,renderer:b,styles:n.s,init:e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute,n.d.clear()}}}}]);
|