var __awaiter=this&&this.__awaiter||function(e,t,n,r){function o(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,a){function i(e){try{s(r.next(e))}catch(t){a(t)}}function l(e){try{s(r["throw"](e))}catch(t){a(t)}}function s(e){e.done?n(e.value):o(e.value).then(i,l)}s((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,o,a,i;return i={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(i[Symbol.iterator]=function(){return this}),i;function l(e){return function(t){return s([e,t])}}function s(i){if(r)throw new TypeError("Generator is already executing.");while(n)try{if(r=1,o&&(a=i[0]&2?o["return"]:i[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,i[1])).done)return a;if(o=0,a)i=[i[0]&2,a.value];switch(i[0]){case 0:case 1:a=i;break;case 4:n.label++;return{value:i[1],done:false};case 5:n.label++;o=i[1];i=[0];continue;case 7:i=n.ops.pop();n.trys.pop();continue;default:if(!(a=n.trys,a=a.length>0&&a[a.length-1])&&(i[0]===6||i[0]===2)){n=0;continue}if(i[0]===3&&(!a||i[1]>a[0]&&i[1]<a[3])){n.label=i[1];break}if(i[0]===6&&n.label<a[1]){n.label=a[1];a=i;break}if(a&&n.label<a[2]){n.label=a[2];n.ops.push(i);break}if(a[2])n.ops.pop();n.trys.pop();continue}i=t.call(e,n)}catch(l){i=[6,l];o=0}finally{r=a=0}if(i[0]&5)throw i[1];return{value:i[0]?i[1]:void 0,done:true}}};export{t as Toast}from"./toastController-7495e3c9.js";export{l as FileFormatUtils}from"./languageUtils-d43f5d69.js";import{g as getMode}from"./index-15028158.js";import{g as getMode$1}from"./mode-e9fa2ced.js";import"./_commonjsHelpers-8a9f3b18.js";var loadFonts=function(e){return __awaiter(void 0,void 0,void 0,(function(){var t,n,r;return __generator(this,(function(o){switch(o.label){case 0:if(window===undefined||document===undefined)return[2];return[4,import("./webfontloader-7ddcbc0a.js").then((function(e){return e.w}))];case 1:t=o.sent();n=e;if(!n){r=getMode(document.documentElement);n=r==="material"?["Roboto","IBM Plex Mono"]:["Montserrat:400,600","Lato:400,400i,700,700i","IBM Plex Mono"]}t.load({google:{families:n}});return[2]}}))}))};var stencilaThemeVersion="0.27.1";var materialThemeVersion="0.16.1";var injectThemeVariables=function(){var e=getMode$1(document.documentElement);var t=e==="material"?"material":"stencila";var n=e==="material"?materialThemeVersion:stencilaThemeVersion;var r=document.createElement("link");r.rel="stylesheet";r.href="https://unpkg.com/@stencila/style-"+t+"@"+(n!==null&&n!==void 0?n:"latest")+"/dist/variables.css";document.head.prepend(r)};export{injectThemeVariables,loadFonts};
//# sourceMappingURL=index.js.map