"use strict";(self.webpackChunk_cocalc_static=self.webpackChunk_cocalc_static||[]).push([[9425],{18737:(t,e,r)=>{r.d(e,{l:()=>a,v:()=>c});var i=r(26131),n=r(89368),o=r(62799);function a(t){var e=(0,i.path_split)(t),r=(0,i.separate_file_extension)(e.tail);return{directory:e.head,base:r.name,filename:e.tail}}function c(t,e){var r=(0,i.encode_path)(e);return(0,n.join)(o.appBasePath,t,"raw",r)}},49425:(t,e,r)=>{r.r(e),r.d(e,{Actions:()=>_});var i,n=r(23040),o=r.n(n),a=r(55696),c=r(55637),s=r(18737),p=(i=function(t,e){return i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},i(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function r(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(r.prototype=e.prototype,new r)}),_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return p(e,t),e.prototype._init2=function(){this.is_public||(this._init_syncstring_value(),this._init_spellcheck(),this._init_iframe_reload())},e.prototype._init_iframe_reload=function(){var t=this;this._syncstring.on("save-to-disk",(function(){t.set_reload("iframe")}))},e.prototype._raw_default_frame_tree=function(){return this.is_public?{type:"html"}:{direction:"col",type:"node",first:{type:"cm"},second:{type:"iframe"}}},e.prototype.reload=function(e){var r=this._get_frame_node(e);r&&("iframe"===r.get("type")?this.set_reload("iframe",(new Date).getTime()):t.prototype.reload.call(this,e))},e.prototype.print=function(e){var r=this._get_frame_node(e);if(r)if("cm"!==r.get("type"))try{switch(r.get("type")){case"iframe":(0,c.kX)({src:(0,s.v)(this.project_id,this.path)});break;case"preview":(0,c.kX)({html:o()("#frame-".concat(e)).html(),project_id:this.project_id,path:this.path});break;default:throw Error("Printing not implemented")}}catch(t){this.set_error(t)}else t.prototype.print.call(this,e)},e}(a.e)}}]);