diff --git a/docs/index.js b/docs/index.js index da8914c..7c53b27 100644 --- a/docs/index.js +++ b/docs/index.js @@ -1,5 +1,5 @@ /*! Menduz diagrams */ -const buildInformation={date:"2020-08-22T17:53:08.149Z",commit:"HEAD",ref:"?"};!function(){"use strict";function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e} +const buildInformation={date:"2020-08-22T19:10:08.527Z",commit:"HEAD",ref:"?"};!function(){"use strict";function unwrapExports(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function createCommonjsModule(e,t){return e(t={exports:{}},t.exports),t.exports}function getCjsExportFromNamespace(e){return e&&e.default||e} /* object-assign (c) Sindre Sorhus @@ -1006,7 +1006,7 @@ function logEvent(e,t,n,r,i){var o=r||{};i&&i.global||(o=tslib_2(tslib_2({},r),{ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. - */var ERRORS=(_a$2={},_a$2["no-ga-id"]='"'+ANALYTICS_ID_FIELD+'" field is empty in Firebase config. Firebase Analytics requires this field to contain a valid measurement ID.',_a$2["already-exists"]="A Firebase Analytics instance with the measurement ID ${id} already exists. Only one Firebase Analytics instance can be created for each measurement ID.",_a$2["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",_a$2["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate",_a$2["indexedDB-unsupported"]="IndexedDB is not supported by current browswer",_a$2["invalid-indexedDB-context"]="Environment doesn't support IndexedDB: {$errorInfo}. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments",_a$2["cookies-not-enabled"]="Cookies are not enabled in this browser environment. Analytics requires cookies to be enabled.",_a$2["invalid-analytics-context"]="Firebase Analytics is not supported in browser extensions.",_a$2),ERROR_FACTORY$1=new index_cjs_3("analytics","Analytics",ERRORS),initializedIdPromisesMap={},dataLayerName="dataLayer",gtagName="gtag",gtagCoreFunction,wrappedGtagFunction,globalInitDone=!1;function settings(e){if(globalInitDone)throw ERROR_FACTORY$1.create("already-initialized");e.dataLayerName&&(dataLayerName=e.dataLayerName),e.gtagName&&(gtagName=e.gtagName)}function factory(e,t){if(index_cjs_22())throw ERROR_FACTORY$1.create("invalid-analytics-context");if(!index_cjs_6())throw ERROR_FACTORY$1.create("cookies-not-enabled");if(!index_cjs_26())throw ERROR_FACTORY$1.create("indexedDB-unsupported");index_cjs_47().catch((function(e){throw ERROR_FACTORY$1.create("invalid-indexedDB-context",{errorInfo:e})}));var n=e.options[ANALYTICS_ID_FIELD];if(!n)throw ERROR_FACTORY$1.create("no-ga-id");if(null!=initializedIdPromisesMap[n])throw ERROR_FACTORY$1.create("already-exists",{id:n});if(!globalInitDone){findGtagScriptOnPage()||insertScriptTag(dataLayerName),getOrCreateDataLayer(dataLayerName);var r=wrapOrCreateGtag(initializedIdPromisesMap,dataLayerName,gtagName),i=r.wrappedGtag,o=r.gtagCore;wrappedGtagFunction=i,gtagCoreFunction=o,globalInitDone=!0}return initializedIdPromisesMap[n]=initializeGAId(e,t,gtagCoreFunction),{app:e,logEvent:function(e,t,r){return logEvent(wrappedGtagFunction,n,e,t,r)},setCurrentScreen:function(e,t){return setCurrentScreen(wrappedGtagFunction,n,e,t)},setUserId:function(e,t){return setUserId(wrappedGtagFunction,n,e,t)},setUserProperties:function(e,t){return setUserProperties(wrappedGtagFunction,n,e,t)},setAnalyticsCollectionEnabled:function(e){return setAnalyticsCollectionEnabled(n,e)}}}var name$3="@firebase/analytics",version$5="0.4.2",ANALYTICS_TYPE="analytics";function registerAnalytics(e){e.INTERNAL.registerComponent(new index_cjs_1$1(ANALYTICS_TYPE,(function(e){return factory(e.getProvider("app").getImmediate(),e.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:settings,EventName:EventName,isSupported:isSupported})),e.INTERNAL.registerComponent(new index_cjs_1$1("analytics-internal",(function(e){try{return{logEvent:e.getProvider(ANALYTICS_TYPE).getImmediate().logEvent}}catch(e){throw ERROR_FACTORY$1.create("interop-component-reg-failed",{reason:e})}}),"PRIVATE")),e.registerVersion(name$3,version$5)}function isSupported(){return tslib_7(this,void 0,void 0,(function(){return tslib_8(this,(function(e){switch(e.label){case 0:if(index_cjs_22())return[2,!1];if(!index_cjs_6())return[2,!1];if(!index_cjs_26())return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,index_cjs_47()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}))}))}registerAnalytics(firebase);let firebaseConfig={apiKey:"AIzaSyBhfoK4AFBLsruM0sDJ-sAFyksh4FqMpC8",authDomain:"diagrams-de8ed.firebaseapp.com",databaseURL:"https://diagrams-de8ed.firebaseio.com",projectId:"diagrams-de8ed",storageBucket:"diagrams-de8ed.appspot.com",messagingSenderId:"346071222923",appId:"1:346071222923:web:4d57d09e64ea7ed1ee628e",measurementId:"G-HLCQLCWE0G"};async function addFirebase(){index_cjs$3.initializeApp(firebaseConfig),index_cjs$3.analytics(),await index_cjs$3.auth().setPersistence(index_cjs$3.auth.Auth.Persistence.LOCAL),await new Promise((e,t)=>{const n=index_cjs$3.auth().onAuthStateChanged(t=>{n(),e(t)},e=>{console.error(e),t("API Failed")})})}function newNotebook(e){const t=index_cjs$3.database().ref(`users/${e}/notebooks`).push();return t.child("meta/uid").set(e,(function(e){e&&console.log("error setting uid",e)})),t.child("meta/title").set("Untitled notebook",(function(e){e&&console.log("error setting titile2",e)})),t}function openByHash(e,t){return index_cjs$3.database().ref().child(`users/${e}/notebooks/${t}`)}function logEvent$1(e){index_cjs$3.analytics().logEvent(e)}function logException(e){index_cjs$3.analytics().logEvent("exception",{description:"object"==typeof e?e.message:e,fatal:"object"==typeof e})}function logPageView(e,t){index_cjs$3.analytics().logEvent("page_view",{page_location:e,page_path:t})}globalThis.firebase=index_cjs$3;const history=createHashHistory();function navigateTo(e,t){const n={pathname:e,state:t||{}};history.location.pathname!=n.pathname&&history.push(n)}history.listen(e=>{logPageView(location.toString(),e.pathname)});var interopRequireDefault=createCommonjsModule((function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}}}));unwrapExports(interopRequireDefault);var _typeof_1=createCommonjsModule((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t})),interopRequireWildcard=createCommonjsModule((function(e){function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof_1(e)&&"function"!=typeof e)return{default:e};var n=t();if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}}));function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}unwrapExports(interopRequireWildcard);var defineProperty=_defineProperty;function _arrayWithHoles(e){if(Array.isArray(e))return e}var arrayWithHoles=_arrayWithHoles;function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}var iterableToArrayLimit=_iterableToArrayLimit;function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}unwrapExports(MonacoContainer);var objectWithoutPropertiesLoose=_objectWithoutPropertiesLoose$1;function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var objectWithoutProperties=_objectWithoutProperties;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var classCallCheck=_classCallCheck;function _defineProperties(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.src,r=(0,n.default)(e,["src"]);return this.configScriptSrc=t,this.__config=(0,utils.deepMerge)(this.__config,this.validateConfig(r)),this}},{key:"validateConfig",value:function(e){return e.urls?(this.informAboutDepreciation(),{paths:{vs:e.urls.monacoBase}}):e}},{key:"informAboutDepreciation",value:function(){console.warn("Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-react#config\n ")}},{key:"injectScripts",value:function(e){document.body.appendChild(e)}},{key:"createScript",value:function(e){var t=document.createElement("script");return e&&(t.src=e),t}},{key:"createMonacoLoaderScript",value:function(e){var t=this,n=this.createScript("".concat(this.__config.paths.vs,"/loader.js"));return n.onload=function(n){return t.injectScripts(e)},n.onerror=this.reject,n}},{key:"createConfigScript",value:function(){var e=this.createScript();return this.configScriptSrc?e.src=this.configScriptSrc:e.innerHTML="\n require.config(".concat(JSON.stringify(this.__config),");\n require(['vs/editor/editor.main'], function() {\n document.dispatchEvent(new Event('monaco_init'));\n });\n "),e.onerror=this.reject,e}},{key:"init",value:function(){if(!this.isInitialized){if(window.monaco&&window.monaco.editor)return new Promise((function(e,t){return e(window.monaco)}));document.addEventListener("monaco_init",this.handleConfigScriptLoad);var e=this.createConfigScript(),t=this.createMonacoLoaderScript(e);this.injectScripts(t)}return this.isInitialized=!0,(0,utils.makeCancelable)(this.wrapperPromise)}}]),e}())(a.default);t.default=s}));unwrapExports(monaco$1);var noop_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n}));unwrapExports(noop_1);var deepMerge=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=interopRequireDefault(defineProperty);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i=function e(t,i){return Object.keys(i).forEach((function(n){i[n]instanceof Object&&t[n]&&Object.assign(i[n],e(t[n],i[n]))})),function(e){for(var t=1;t2&&void 0!==arguments[2])||arguments[2],r=(0,react.useRef)(!0);(0,react.useEffect)(r.current||!n?function(e){r.current=!1}:e,t)};t.default=n}));unwrapExports(useUpdate_1);var hooks=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMount",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"useUpdate",{enumerable:!0,get:function(){return r.default}});var n=interopRequireDefault(useMount_1),r=interopRequireDefault(useUpdate_1)}));unwrapExports(hooks);var themes_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={"night-dark":{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#202124"}}};t.default=n}));unwrapExports(themes_1);var Editor_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=interopRequireDefault(defineProperty),r=interopRequireDefault(slicedToArray),i=interopRequireWildcard(react),o=interopRequireDefault(propTypes),a=interopRequireDefault(MonacoContainer),s=interopRequireDefault(themes_1);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=function(e){var t=e.value,o=e.language,c=e.editorDidMount,u=e.theme,h=e.line,p=e.width,f=e.height,d=e.loading,m=e.options,g=e.overrideServices,y=e._isControlledMode,v=e.className,_=e.wrapperClassName,b=(0,i.useState)(!1),w=(0,r.default)(b,2),E=w[0],T=w[1],k=(0,i.useState)(!0),S=(0,r.default)(k,2),x=S[0],C=S[1],P=(0,i.useRef)(),A=(0,i.useRef)(),I=(0,i.useRef)();(0,hooks.useMount)((function(e){var t=utils.monaco.init();return t.then((function(e){return(A.current=e)&&C(!1)})).catch((function(e){return"cancelation"!==(null==e?void 0:e.type)&&console.error("Monaco initialization: error:",e)})),function(e){return P.current?R():t.cancel()}})),(0,hooks.useUpdate)((function(e){P.current.updateOptions(m)}),[m],E),(0,hooks.useUpdate)((function(e){if(P.current.getOption(A.current.editor.EditorOption.readOnly))P.current.setValue(t);else if(t!==P.current.getValue()){if(P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:t}]),y){var n=P.current.getModel();n.forceTokenization(n.getLineCount())}P.current.pushUndoStop()}}),[t],E),(0,hooks.useUpdate)((function(e){P.current.setValue(t),A.current.editor.setModelLanguage(P.current.getModel(),o)}),[o],E),(0,hooks.useUpdate)((function(e){P.current.setScrollPosition({scrollTop:h})}),[h],E),(0,hooks.useUpdate)((function(e){A.current.editor.setTheme(u)}),[u],E);var D=(0,i.useCallback)((function(e){P.current=A.current.editor.create(I.current,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g,f=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=b(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$1")+t:e+t}function b(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:R(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],h=u.length>1,p=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},d=t[0].match(this.rules.block.item),m=!1,g=d.length,y=0;y1||this.options.smartLists&&i!==u)&&(o=d.slice(y+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),y=g-1)),a=m||/\n\n(?!\s*$)/.test(n),y!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=M(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return F(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return F(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?t(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),j=S,$=T,B=x,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:j,table:j,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};V.def=$(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=$(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=$(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=//,V.html=$(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=$(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=$(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=B({},V),V.gfm=B({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=$(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=$(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=B({},V.normal,{html:$("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:j,paragraph:$(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:j,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:j,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=$(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=$(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=$(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=$(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=$(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=$(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=$(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=$(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=$(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=$(G._blockSkip,"g").getRegex(),G.overlapSkip=$(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=$(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=$(G.tag).replace("comment",V._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=$(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=$(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=$(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=B({},G),G.pedantic=B({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=B({},G.normal,{escape:$(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var K=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||U,this.options.tokenizer=this.options.tokenizer||new L,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:H.normal,inline:q.normal};this.options.pedantic?(t.block=H.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=H.gfm,this.options.breaks?t.inline=q.breaks:t.inline=q.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,Y))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,Y))){if(o=this.tokenizer.inlineText(e,r,W))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,i=[{key:"rules",get:function(){return{block:H,inline:q}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),Q=r.defaults,X=k,J=w,Z=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
'+(n?e:J(e,!0))+"
\n":"
"+(n?e:J(e,!0))+"
\n"},t.blockquote=function(e){return"
\n"+e+"
\n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
\n":"
\n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r='"},t.image=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=E,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,h,p,f,d,m,g,y,v,_,b="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=_+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=_+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:_}):m+=_),m+=this.parse(g.tokens,d),u+=this.renderer.listitem(m,v,y);b+=this.renderer.list(u,p,f);continue;case"html":b+=this.renderer.html(h.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+se(e.message+"",!0)+"
    ";throw e}}return he.options=he.setOptions=function(e){return oe(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Z,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;a{e=e=>{r(e),n.isPending=!1},t=e=>{i(e),n.isPending=!1}}).catch(e=>Promise.reject(e));return n.resolve=e,n.reject=t,"finally"in n||(n.finally=e=>{n.then(e),n.catch(e)}),n.isPending=!0,n}Object.defineProperty(t,"__esModule",{value:!0}),t.future=n,t.default=n})),future=unwrapExports(fpFuture),fpFuture_1=fpFuture.future;async function injectScript(e){const t=future(),n=document.createElement("script");return n.src=e,n.async=!0,n.type="application/javascript",n.addEventListener("load",t.resolve),n.addEventListener("error",e=>t.reject(e.error||e)),document.body.appendChild(n),t}async function injectCss(e){const t=future(),n=document.createElement("link");return n.href=e,n.rel="stylesheet",n.addEventListener("load",t.resolve),n.addEventListener("error",e=>t.reject(e.error||e)),document.body.appendChild(n),t}function fallbackCopyTextToClipboard(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}async function copyTextToClipboard(e){return navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):fallbackCopyTextToClipboard(e)}function generateStaticLinkFragment(e){return"/static?t="+encodeURIComponent(e)}function generateStaticLink(e){return document.location.protocol+"//"+document.location.host+"#"+generateStaticLinkFragment(e)}var sizeMap={small:16,medium:32,large:64};function getSvgProps(e){var t=e["aria-label"],n=e.className,r=e.size,i=e.verticalAlign,o=e.svgDataByHeight,a=sizeMap[r]||r,s=closestNaturalHeight(Object.keys(o),a),l=o[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:n,viewBox:"0 0 "+l+" "+s,width:a*(l/s),height:a,fill:"currentColor",style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:o[s].path}}}function closestNaturalHeight(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,n){return n<=t?n:e}),e[0])}var _extends$1=Object.assign||function(e){for(var t=1;t'},24:{width:24,path:''}}})))}function DownloadIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function LinkIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function MarkGithubIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''}}})))}function RepoForkedIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''}}})))}function ShareAndroidIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function download(e,t){var n=document.createElement("a");n.setAttribute("href",URL.createObjectURL(new Blob([t],{type:"image/svg+xml"}))),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}function DownloadSvg(e){const t=react_7(null);return react.createElement(react.Fragment,null,"dangerouslySetInnerHTML"in e?react.createElement("div",{ref:t,dangerouslySetInnerHTML:e.dangerouslySetInnerHTML}):react.createElement("div",{ref:t},e.children),react.createElement("button",{className:"btn btn-sm btn-link",onClick:function(){download("diagram.svg",("children"in e?'\n\n':"")+t.current.innerHTML)},style:{fontSize:12}},react.createElement(DownloadIcon,{size:16}),"Download SVG"))}AlertIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},DownloadIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},LinkIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},MarkGithubIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},RepoForkedIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},ShareAndroidIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"};const monospaceFont='Menlo, Monaco, "Courier New", monospace',font="14px "+monospaceFont,DIAGRAM_MARGIN=10,ACTOR_MARGIN=10,ACTOR_PADDING=10,SIGNAL_MARGIN=5,SIGNAL_PADDING=5,NOTE_MARGIN=10,NOTE_PADDING=5,NOTE_OVERLAP=15,TITLE_MARGIN=0,TITLE_PADDING=5,SELF_SIGNAL_WIDTH=20,ALIGN_LEFT=0,ALIGN_CENTER=1,ALIGN_HORIZONTAL_CENTER=2,ALIGN_VERTICAL_CENTER=3,can=document.createElement("canvas"),ctx=can.getContext("2d");function textBBox(e,t){ctx.font=t||font;const n=ctx.measureText(e);return Object.assign(n,{height:n.actualBoundingBoxDescent+n.actualBoundingBoxAscent})}class AssertException extends Error{toString(){return"AssertException: "+this.message}}function assert(e,t){if(!e)throw new AssertException(t)}function layout(e){if(e.signalsHeight_=0,e.actorsHeight_=0,e.width=0,e.height=0,e.title){e.title_={};var t=e.title_,n=textBBox(e.title);t.textBB=n,t.message=e.title,t.width=n.width+2*(TITLE_PADDING+TITLE_MARGIN),t.height=n.height+2*(TITLE_PADDING+TITLE_MARGIN),t.x=DIAGRAM_MARGIN,t.y=DIAGRAM_MARGIN,e.width+=t.width,e.height+=t.height}function r(t,n,r){if(assert(t=e.actors.length){const n=e.actors[t];n.paddingRight=0|Math.max(r,n.paddingRight||0)}else{const i=e.actors[t];i.distances[n]=0|Math.max(r,i.distances[n]?i.distances[n]:0)}}e.actors.forEach(t=>{var n=textBBox(t.name);t.textBB=n,t.x=0,t.y=0,t.width=n.width+2*(ACTOR_PADDING+ACTOR_MARGIN),t.height=n.height+2*(ACTOR_PADDING+ACTOR_MARGIN),t.distances=[],t.paddingRight=0,e.actorsHeight_=0|Math.max(t.height,e.actorsHeight_||0)}),e.signals.forEach(t=>{var n,i,o=textBBox(t.message);t.textBB=o,t.width=o.width,t.height=o.height;var a=0;if("Signal"==t.type)t.width+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),t.height+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),t.isSelf()?(i=(n=t.actorA.index)+1,t.width+=SELF_SIGNAL_WIDTH):(n=Math.min(t.actorA.index,t.actorB.index),i=Math.max(t.actorA.index,t.actorB.index));else if("Note"==t.type)if(t.width+=2*(NOTE_MARGIN+NOTE_PADDING),t.height+=2*(NOTE_MARGIN+NOTE_PADDING),a=2*ACTOR_MARGIN,t.placement==Diagram.PLACEMENT.LEFTOF)n=(i=t.actor.index)-1;else if(t.placement==Diagram.PLACEMENT.RIGHTOF)i=(n=t.actor.index)+1;else if(t.placement==Diagram.PLACEMENT.OVER&&t.hasManyActors())n=Math.min(t.actor[0].index,t.actor[1].index),i=Math.max(t.actor[0].index,t.actor[1].index),a=-(2*NOTE_PADDING+2*NOTE_OVERLAP);else if(t.placement==Diagram.PLACEMENT.OVER)return r((n=t.actor.index)-1,n,t.width/2),r(n,n+1,t.width/2),void(e.signalsHeight_+=t.height);r(n,i,t.width+a),e.signalsHeight_+=t.height});var i=0;e.actors.forEach(t=>{t.x=Math.max(i,t.x),t.distances.forEach((n,r)=>{if(void 0===n)return;const i=e.actors[r];n=0|Math.max(n,t.width/2,i.width/2),i.x=0|Math.max(i.x,t.x+t.width/2+n-i.width/2)}),i=t.x+t.width+t.paddingRight}),e.width=Math.max(i,e.width),e.width+=2*DIAGRAM_MARGIN,e.height+=2*DIAGRAM_MARGIN+2*e.actorsHeight_+e.signalsHeight_}async function initializeDiagrams(){await injectScript("bower_components/underscore/underscore-min.js"),await injectScript("bower_components/js-sequence-diagrams/dist/sequence-diagram-min.js")}function Line(e){return react.createElement("line",{x1:0|e.x1,x2:0|e.x2,y1:0|e.y1,y2:0|e.y2,style:{strokeWidth:"2px"},stroke:"#000000",fill:"none",strokeDasharray:void 0===e.linetype?void 0:e.linetype===Diagram.LINETYPE.DOTTED?"6px, 2px":void 0,markerEnd:void 0===e.arrowhead?void 0:e.arrowhead==Diagram.ARROWTYPE.FILLED?"url(#markerArrowBlock)":"url(#markerArrowOpen)"})}function Rect(e){return react.createElement("rect",{x:0|e.x,y:0|e.y,width:0|e.width,height:0|e.height,style:{strokeWidth:"2px"},stroke:"#000000",fill:"#ffffff"})}function Text(e){var t=textBBox(e.text,e.font),n=e.x,r=e.y;return e.align!=ALIGN_CENTER&&e.align!=ALIGN_HORIZONTAL_CENTER||(n-=t.width/2),e.align!=ALIGN_CENTER&&e.align!=ALIGN_VERTICAL_CENTER||(r-=t.height/2),r+=t.height,react.createElement("text",{x:0|n,y:0|r,style:{font:e.font},textAnchor:"start"},react.createElement("tspan",{x:0|n,y:0|r},e.text))}function getCenterX(e){return e.x+e.width/2}function getCenterY(e){return e.y+e.height/2}function TextBox(e){var t=e.box.x+e.margin,n=e.box.y+e.margin,r=e.box.width-2*e.margin,i=e.box.height-2*e.margin;const o=react.createElement(Rect,{x:t,y:n,width:r,height:i});return e.align==ALIGN_CENTER?(t=getCenterX(e.box),n=getCenterY(e.box)):(t+=e.padding,n+=e.padding),react.createElement(react.Fragment,null,o,react.createElement(Text,{x:t,y:n,text:e.text,font:e.font,align:e.align}))}function ActorSVG(e){return e.actor.y=e.offsetY,e.actor.height=e.height,react.createElement(TextBox,{box:e.actor,text:e.actor.name,margin:ACTOR_MARGIN,padding:ACTOR_PADDING,font:e.font,align:ALIGN_CENTER})}function RenderDiagram(e){const{diagram:t}=e;if(!t)return react.createElement("div",null,"Empty diagram");var n=0;const r=[];return t.actors.map((function(e){r.push(react.createElement(ActorSVG,{actor:e,offsetY:n,height:t.actorsHeight_,font:font,key:r.length})),r.push(react.createElement(ActorSVG,{actor:e,offsetY:n+t.actorsHeight_+t.signalsHeight_,height:t.actorsHeight_,font:font,key:r.length}));var i=getCenterX(e);r.push(react.createElement(Line,{x1:i,y1:n+t.actorsHeight_-ACTOR_MARGIN,x2:i,y2:n+t.actorsHeight_+ACTOR_MARGIN+t.signalsHeight_,key:r.length}))})),n+=t.actorsHeight_,t.signals.forEach((function(e){"Signal"==e.type?e.isSelf()?function(e){assert(e.isSelf(),"signal must be a self signal");var t=e.textBB,i=getCenterX(e.actorA),o=n+SIGNAL_MARGIN+SIGNAL_PADDING,a=o+e.height-2*SIGNAL_MARGIN-SIGNAL_PADDING;r.push(react.createElement(Line,{x1:i,y1:o,x2:i+SELF_SIGNAL_WIDTH,y2:o,linetype:e.linetype,key:r.length})),r.push(react.createElement(Line,{x1:i+SELF_SIGNAL_WIDTH,y1:o,x2:i+SELF_SIGNAL_WIDTH,y2:a,linetype:e.linetype,key:r.length})),r.push(react.createElement(Line,{x1:i+SELF_SIGNAL_WIDTH,y1:a,x2:i,y2:a,linetype:e.linetype,arrowhead:e.arrowtype,key:r.length}));var s=i+SELF_SIGNAL_WIDTH+SIGNAL_PADDING,l=(a-o-t.height)/2;r.push(react.createElement(Text,{x:s,y:o+l,text:e.message,font:font,align:ALIGN_LEFT,key:r.length}))}(e):function(e){var t=getCenterX(e.actorA),i=getCenterX(e.actorB),o=(i-t)/2+t,a=n+SIGNAL_MARGIN+SIGNAL_PADDING;r.push(react.createElement(Text,{x:o,y:a,text:e.message,font:font,align:ALIGN_HORIZONTAL_CENTER,key:r.length})),a=n+e.height-SIGNAL_PADDING,r.push(react.createElement(Line,{x1:t,y1:a,x2:i,y2:a,linetype:e.linetype,arrowhead:e.arrowtype,key:r.length}))}(e):"Note"==e.type&&function(e){e.y=n;var t=getCenterX(e.hasManyActors()?e.actor[0]:e.actor);switch(e.placement){case Diagram.PLACEMENT.RIGHTOF:e.x=t+ACTOR_MARGIN;break;case Diagram.PLACEMENT.LEFTOF:e.x=t-ACTOR_MARGIN-e.width;break;case Diagram.PLACEMENT.OVER:if(e.hasManyActors()){var i=getCenterX(e.actor[1]),o=NOTE_OVERLAP+NOTE_PADDING;e.x=Math.min(t,i)-o,e.width=Math.max(t,i)+o-e.x}else e.x=t-e.width/2;break;default:throw new Error("Unhandled note placement: "+e.placement)}r.push(react.createElement(TextBox,{box:e,text:e.message,margin:NOTE_MARGIN,padding:NOTE_PADDING,font:font,align:ALIGN_LEFT,key:r.length}))}(e),n+=e.height})),react.createElement(DownloadSvg,null,react.createElement("svg",{width:0|t.width,height:0|t.height,xmlns:"http://www.w3.org/2000/svg"},react.createElement("defs",null,react.createElement("marker",{viewBox:"0 0 5 5",markerWidth:"5",markerHeight:"5",orient:"auto",refX:"5",refY:"2.5",id:"markerArrowBlock"},react.createElement("path",{d:"M 0 0 L 5 2.5 L 0 5 z"})),react.createElement("marker",{viewBox:"0 0 9.6 16",markerWidth:"4",markerHeight:"16",orient:"auto",refX:"9.6",refY:"8",id:"markerArrowOpen"},react.createElement("path",{d:"M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z"}))),r))}function SequenceDiagram(e){const{input:t,className:n}=e,r=react_7(null),[i,o]=react_6(0),[a,s]=react_6(0),[l,c]=react_6(null),[u,h]=react_6(null);return react_5(()=>{try{const e=Diagram.parse(t.trim().replace(/^sequenceDiagram[\s\n\r]*/,""));layout(e),o(e.width),s(e.height),c(null),h(e)}catch(e){c(e.toString())}},[t,r]),l?react.createElement("pre",{className:n},l):react.createElement("div",{className:n,style:{width:i,height:a},ref:r},react.createElement(RenderDiagram,{diagram:u}))}window.Snap={};const DEFAULT_EXAMPLE='\n# Collaborative diagrams tool\n\n## This editor works with live collaboration, like Google Docs\n\nOnce you get an editable link, you can share it, and multiple users can edit the same document.\n\nWe use it for architecture discussions and planning with my team, it helps a lot because now that all of us are remote.\n\n## How to use it?\n\n1. Click in "Make a copy" in the top bar\n2. Edit the document created for you! Share the link to start collaborating.\n\n## What can we do with this tool?\n\n### Sequence diagrams\n\n```sequence\nAndrew->China: Says Hello\nNote right of China: China thinks about it\nChina--\x3eAndrew: How are you?\nAndrew->>China: I am good thanks!\n```\n\n### Graphviz\n\n```dot\ndigraph G {\n\n\tsubgraph cluster_0 {\n\t\tstyle=filled;\n\t\tcolor=lightgrey;\n\t\tnode [style=filled,color=white];\n\t\ta0 -> a1 -> a2 -> a3;\n\t\tlabel = "process #1";\n\t}\n\n\tsubgraph cluster_1 {\n\t\tnode [style=filled];\n\t\tb0 -> b1 -> b2 -> b3;\n\t\tlabel = "process #2";\n\t\tcolor=blue\n\t}\n\tstart -> a0;\n\tstart -> b0;\n\ta1 -> b3;\n\tb2 -> a3;\n\ta3 -> a0;\n\ta3 -> end;\n\tb3 -> end;\n\n\tstart [shape=Mdiamond];\n\tend [shape=Msquare];\n}\n```\n\n### This is another title with a sequence diagram\n\n```sequence\nTitle: Here is a title\nA->B: Normal line\nB--\x3eC: Dashed line\nC->>D: Open arrow\nD--\x3e>A: Dashed open arrow\n```\n\n### Add notes\n\n```sequence\n# Example of a comment.\nNote left of A: Note to the left of A\nNote right of A: Note to the right of A\nNote over A: Note over A\nNote over A,B: Note over both A and B\n```\n\n### Specify participants\n\n```sequence\nparticipant C\nparticipant B\nparticipant A\nNote right of A: By listing the participants you can change their order\n```\n\n### Code example:\n\n```javascript\n// this example generates a static link to use with this site\n\nconst content = "# this is a title\\n .. put sequences, .dot files or markdown in here ..";\n\nfunction generateStaticLink(content) {\n return `https://diagrams.menduz.com/#/static?t=${encodeURIComponent(content)}`;\n}\n\nconsole.log(generateStaticLink(content));\n```\n\n### Attributions\n\n- Sequence diagrams parser & syntax: https://bramp.github.io/js-sequence-diagrams/\n- Firepad: https://github.com/FirebaseExtended/firepad\n\n### Contact & feedback\n\nYou can contact me on https://twitter.com/@menduz\n\n### Help me pay the hosting\n\nIf you want to help with the expenses of the site, here is my Ethereum address, anything you send is more than welcome:\n\n```\nmenduz.eth - 0xf2f58ed9Ab3057838d88D06be8269270cDc8Aa89\n```\n\nThanks and enjoy!\n\n';function createCommonjsModule$1(e,t){return e(t={exports:{}},t.exports),t.exports}var expatlib=createCommonjsModule$1((function(e,t){var n,r=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,n){t=e}));var i,o={};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);var a,s="./this.program",l="";document.currentScript&&(l=document.currentScript.src),n&&(l=n),l=0!==l.indexOf("blob:")?l.substr(0,l.lastIndexOf("/")+1):"",a=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText};var c,u,h=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);for(i in o)o.hasOwnProperty(i)&&(r[i]=o[i]);o=null,r.arguments&&r.arguments,r.thisProgram&&(s=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime&&r.noExitRuntime,"object"!=typeof WebAssembly&&p("no native wasm support detected");var f=new WebAssembly.Table({initial:153,maximum:153,element:"anyfunc"}),d=!1;function m(e,t){e||U("Assertion failed: "+t)}var g,y,v,_,b,w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function E(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&w)return w.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function T(e,t){return e?E(v,e,t):""}function k(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i}function S(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}function x(e,t){return e%t>0&&(e+=t-e%t),e}function C(e){g=e,r.HEAP8=y=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=_=new Int32Array(e),r.HEAPU8=v=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=b=new Float64Array(e)}var P=r.INITIAL_MEMORY||16777216;function A(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?r.dynCall_v(n):r.dynCall_vi(n,t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}(u=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:P/65536,maximum:32768}))&&(g=u.buffer),P=g.byteLength,C(g),_[2100]=5251440;var I=[],D=[],R=[],O=[];function N(e){I.unshift(e)}function M(e){O.unshift(e)}var F=Math.abs,L=Math.ceil,j=Math.floor,$=Math.min,B=0,V=null;function G(e){B++,r.monitorRunDependencies&&r.monitorRunDependencies(B)}function z(e){if(B--,r.monitorRunDependencies&&r.monitorRunDependencies(B),0==B&&V){var t=V;V=null,t()}}function U(e){throw r.onAbort&&r.onAbort(e),h(e+=""),p(e),d=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function H(e){return function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}(e,"data:application/octet-stream;base64,")}r.preloadedImages={},r.preloadedAudios={};var q,W,Y,K="expatlib.wasm";function Q(){try{if(c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){U(e)}}H(K)||(q=K,K=r.locateFile?r.locateFile(q,l):l+q);var X={1284:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";t.startElement()},1504:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";t.endElement()},1716:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";t.characterData()}};function J(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return r.extraStackTrace&&(e+="\n"+r.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}D.push({func:function(){me()}});var Z={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Z.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return Z.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Z.normalize(e.join("/"))},join2:function(e,t){return Z.normalize(e+"/"+t)}};function ee(e){return _[Ne()>>2]=e,e}var te={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:ie.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=te.resolve(e).substr(1),t=te.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s0&&(h(E(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(E(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(p(E(e.output,0)),e.output=[])}}},re={ops_table:null,mount:function(e){return re.createNode(null,"/",16895,0)},createNode:function(e,t,n,r){if(ie.isBlkdev(n)||ie.isFIFO(n))throw new ie.ErrnoError(63);re.ops_table||(re.ops_table={dir:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr,lookup:re.node_ops.lookup,mknod:re.node_ops.mknod,rename:re.node_ops.rename,unlink:re.node_ops.unlink,rmdir:re.node_ops.rmdir,readdir:re.node_ops.readdir,symlink:re.node_ops.symlink},stream:{llseek:re.stream_ops.llseek}},file:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr},stream:{llseek:re.stream_ops.llseek,read:re.stream_ops.read,write:re.stream_ops.write,allocate:re.stream_ops.allocate,mmap:re.stream_ops.mmap,msync:re.stream_ops.msync}},link:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr,readlink:re.node_ops.readlink},stream:{}},chrdev:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr},stream:ie.chrdev_stream_ops}});var i=ie.createNode(e,t,n,r);return ie.isDir(i.mode)?(i.node_ops=re.ops_table.dir.node,i.stream_ops=re.ops_table.dir.stream,i.contents={}):ie.isFile(i.mode)?(i.node_ops=re.ops_table.file.node,i.stream_ops=re.ops_table.file.stream,i.usedBytes=0,i.contents=null):ie.isLink(i.mode)?(i.node_ops=re.ops_table.link.node,i.stream_ops=re.ops_table.link.stream):ie.isChrdev(i.mode)&&(i.node_ops=re.ops_table.chrdev.node,i.stream_ops=re.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i),i},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],n=0;n=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var n=e.contents;return e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||i+r8)throw new ie.ErrnoError(32);for(var i=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=ie.root,a="/",s=0;s40)throw new ie.ErrnoError(32)}}return{path:a,node:o}},getPath:function(e){for(var t;;){if(ie.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?n+"/"+t:n+t:n}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var n=0,r=0;r>>0)%ie.nameTable.length},hashAddNode:function(e){var t=ie.hashName(e.parent.id,e.name);e.name_next=ie.nameTable[t],ie.nameTable[t]=e},hashRemoveNode:function(e){var t=ie.hashName(e.parent.id,e.name);if(ie.nameTable[t]===e)ie.nameTable[t]=e.name_next;else for(var n=ie.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode:function(e,t){var n=ie.mayLookup(e);if(n)throw new ie.ErrnoError(n,e);for(var r=ie.hashName(e.id,t),i=ie.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return ie.lookup(e,t)},createNode:function(e,t,n,r){var i=new ie.FSNode(e,t,n,r);return ie.hashAddNode(i),i},destroyNode:function(e){ie.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=ie.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return ie.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=ie.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return ie.lookupNode(e,t),20}catch(e){}return ie.nodePermissions(e,"wx")},mayDelete:function(e,t,n){var r;try{r=ie.lookupNode(e,t)}catch(e){return e.errno}var i=ie.nodePermissions(e,"wx");if(i)return i;if(n){if(!ie.isDir(r.mode))return 54;if(ie.isRoot(r)||ie.getPath(r)===ie.cwd())return 10}else if(ie.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?ie.isLink(e.mode)?32:ie.isDir(e.mode)&&("r"!==ie.flagsToPermissionString(t)||512&t)?31:ie.nodePermissions(e,ie.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||ie.MAX_OPEN_FDS;for(var n=e;n<=t;n++)if(!ie.streams[n])return n;throw new ie.ErrnoError(33)},getStream:function(e){return ie.streams[e]},createStream:function(e,t,n){ie.FSStream||(ie.FSStream=function(){},ie.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var r=new ie.FSStream;for(var i in e)r[i]=e[i];e=r;var o=ie.nextfd(t,n);return e.fd=o,ie.streams[o]=e,e},closeStream:function(e){ie.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=ie.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new ie.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){ie.devices[e]={stream_ops:t}},getDevice:function(e){return ie.devices[e]},getMounts:function(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),ie.syncFSRequests++,ie.syncFSRequests>1&&p("warning: "+ie.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=ie.getMounts(ie.root.mount),r=0;function i(e){return ie.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,n){var r,i="/"===n,o=!n;if(i&&ie.root)throw new ie.ErrnoError(10);if(!i&&!o){var a=ie.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,ie.isMountpoint(r))throw new ie.ErrnoError(10);if(!ie.isDir(r.mode))throw new ie.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?ie.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount:function(e){var t=ie.lookupPath(e,{follow_mount:!1});if(!ie.isMountpoint(t.node))throw new ie.ErrnoError(28);var n=t.node,r=n.mounted,i=ie.getMounts(r);Object.keys(ie.nameTable).forEach((function(e){for(var t=ie.nameTable[e];t;){var n=t.name_next;-1!==i.indexOf(t.mount)&&ie.destroyNode(t),t=n}})),n.mounted=null;var o=n.mount.mounts.indexOf(r);n.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,n){var r=ie.lookupPath(e,{parent:!0}).node,i=Z.basename(e);if(!i||"."===i||".."===i)throw new ie.ErrnoError(28);var o=ie.mayCreate(r,i);if(o)throw new ie.ErrnoError(o);if(!r.node_ops.mknod)throw new ie.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,ie.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,ie.mknod(e,t,0)},mkdirTree:function(e,t){for(var n=e.split("/"),r="",i=0;ithis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((function(e){var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(i.responseType="arraybuffer"),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):he(i.responseText||"",!0)}(t,i)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:n},s=ie.createFile(e,t,a,r,i);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(s.stream_ops).forEach((function(e){var t=s.stream_ops[e];l[e]=function(){if(!ie.forceLoadFile(s))throw new ie.ErrnoError(29);return t.apply(null,arguments)}})),l.read=function(e,t,n,r,i){if(!ie.forceLoadFile(s))throw new ie.ErrnoError(29);var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(o.slice)for(var l=0;l>2]=r.dev,_[n+4>>2]=0,_[n+8>>2]=r.ino,_[n+12>>2]=r.mode,_[n+16>>2]=r.nlink,_[n+20>>2]=r.uid,_[n+24>>2]=r.gid,_[n+28>>2]=r.rdev,_[n+32>>2]=0,Y=[r.size>>>0,(W=r.size,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[n+40>>2]=Y[0],_[n+44>>2]=Y[1],_[n+48>>2]=4096,_[n+52>>2]=r.blocks,_[n+56>>2]=r.atime.getTime()/1e3|0,_[n+60>>2]=0,_[n+64>>2]=r.mtime.getTime()/1e3|0,_[n+68>>2]=0,_[n+72>>2]=r.ctime.getTime()/1e3|0,_[n+76>>2]=0,Y=[r.ino>>>0,(W=r.ino,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[n+80>>2]=Y[0],_[n+84>>2]=Y[1],0},doMsync:function(e,t,n,r,i){var o=v.slice(e,e+n);ie.msync(t,o,i,n,r)},doMkdir:function(e,t){return"/"===(e=Z.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),ie.mkdir(e,t,0),0},doMknod:function(e,t,n){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ie.mknod(e,t,n),0},doReadlink:function(e,t,n){if(n<=0)return-28;var r=ie.readlink(e),i=Math.min(n,S(r)),o=y[t+i];return k(r,v,t,n+1),y[t+i]=o,i},doAccess:function(e,t){if(-8&t)return-28;var n;if(!(n=ie.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&ie.nodePermissions(n,r)?-2:0},doDup:function(e,t,n){var r=ie.getStream(n);return r&&ie.close(r),ie.open(e,t,0,n,n).fd},doReadv:function(e,t,n,r){for(var i=0,o=0;o>2],s=_[t+(8*o+4)>>2],l=ie.read(e,y,a,s,r);if(l<0)return-1;if(i+=l,l>2],s=_[t+(8*o+4)>>2],l=ie.write(e,y,a,s,r);if(l<0)return-1;i+=l}return i},varargs:void 0,get:function(){return oe.varargs+=4,_[oe.varargs-4>>2]},getStr:function(e){return T(e)},getStreamFromFD:function(e){var t=ie.getStream(e);if(!t)throw new ie.ErrnoError(8);return t},get64:function(e,t){return e}};function ae(e){try{return u.grow(e-g.byteLength+65535>>>16),C(u.buffer),1}catch(e){}}var se={};function le(){if(!le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var t in se)e[t]=se[t];var n=[];for(var t in e)n.push(t+"="+e[t]);le.strings=n}return le.strings}function ce(e,t){ce.array||(ce.array=[]);var n,r=ce.array;for(r.length=0;n=v[e++];)100===n||102===n?(t=t+7&-8,r.push(b[t>>3]),t+=8):(t=t+3&-4,r.push(_[t>>2]),t+=4);return r}var ue=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ie.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};function he(e,t,n){var r=n>0?n:S(e)+1,i=new Array(r),o=k(e,i,0,i.length);return t&&(i.length=o),i}Object.defineProperties(ue.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ie.isDir(this.mode)}},isDevice:{get:function(){return ie.isChrdev(this.mode)}}}),ie.FSNode=ue,ie.staticInit();var pe={j:function(){return 42},b:function(){U()},a:function(e,t,n){var r=ce(t,n);return X[e].apply(null,r)},d:function(e,t,n){v.copyWithin(e,t,t+n)},e:function(e){e>>>=0;var t=v.length;if(e>2147483648)return!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);if(r=Math.min(r,e+100663296),ae(Math.min(2147483648,x(Math.max(16777216,e,r),65536))))return!0}return!1},f:function(e,t){var n=0;return le().forEach((function(r,i){var o=t+n;_[e+4*i>>2]=o,function(e,t,n){for(var r=0;r>0]=e.charCodeAt(r);n||(y[t>>0]=0)}(r,o),n+=r.length+1})),0},g:function(e,t){var n=le();_[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),_[t>>2]=r,0},h:function(e){try{var t=oe.getStreamFromFD(e);return ie.close(t),0}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},i:function(e,t,n,r,i){try{var o=oe.getStreamFromFD(e),a=4294967296*n+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(ie.llseek(o,a,r),Y=[o.position>>>0,(W=o.position,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[i>>2]=Y[0],_[i+4>>2]=Y[1],o.getdents&&0===a&&0===r&&(o.getdents=null),0)}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},c:function(e,t,n,r){try{var i=oe.getStreamFromFD(e),o=oe.doWritev(i,t,n);return _[r>>2]=o,0}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},k:function(e){var t=Date.now();return _[e>>2]=t/1e3|0,_[e+4>>2]=t%1e3*1e3|0,0},memory:u,table:f},fe=function(){var e={a:pe};function t(e,t){var n=e.exports;r.asm=n,z()}function n(e){t(e.instance)}function i(t){return(c||"function"!=typeof fetch?new Promise((function(e,t){e(Q())})):fetch(K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+K+"'";return e.arrayBuffer()})).catch((function(){return Q()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),U(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(c||"function"!=typeof WebAssembly.instantiateStreaming||H(K)||"function"!=typeof fetch)return i(n);fetch(K,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),i(n)}))}))}(),{}}();r.asm=fe;var de,me=r.___wasm_call_ctors=function(){return(me=r.___wasm_call_ctors=r.asm.l).apply(null,arguments)},ge=(r.___em_js__array_bounds_check_error=function(){return(r.___em_js__array_bounds_check_error=r.asm.m).apply(null,arguments)},r._emscripten_bind_CExpat_CExpat_0=function(){return(ge=r._emscripten_bind_CExpat_CExpat_0=r.asm.n).apply(null,arguments)}),ye=r._emscripten_bind_CExpat_create_0=function(){return(ye=r._emscripten_bind_CExpat_create_0=r.asm.o).apply(null,arguments)},ve=r._emscripten_bind_CExpat_destroy_0=function(){return(ve=r._emscripten_bind_CExpat_destroy_0=r.asm.p).apply(null,arguments)},_e=r._emscripten_bind_CExpat_parse_1=function(){return(_e=r._emscripten_bind_CExpat_parse_1=r.asm.q).apply(null,arguments)},be=r._emscripten_bind_CExpat_tag_0=function(){return(be=r._emscripten_bind_CExpat_tag_0=r.asm.r).apply(null,arguments)},we=r._emscripten_bind_CExpat_attrs_0=function(){return(we=r._emscripten_bind_CExpat_attrs_0=r.asm.s).apply(null,arguments)},Ee=r._emscripten_bind_CExpat_content_0=function(){return(Ee=r._emscripten_bind_CExpat_content_0=r.asm.t).apply(null,arguments)},Te=r._emscripten_bind_CExpat_startElement_0=function(){return(Te=r._emscripten_bind_CExpat_startElement_0=r.asm.u).apply(null,arguments)},ke=r._emscripten_bind_CExpat_endElement_0=function(){return(ke=r._emscripten_bind_CExpat_endElement_0=r.asm.v).apply(null,arguments)},Se=r._emscripten_bind_CExpat_characterData_0=function(){return(Se=r._emscripten_bind_CExpat_characterData_0=r.asm.w).apply(null,arguments)},xe=r._emscripten_bind_CExpat___destroy___0=function(){return(xe=r._emscripten_bind_CExpat___destroy___0=r.asm.x).apply(null,arguments)},Ce=r._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Ce=r._emscripten_bind_CExpatJS_CExpatJS_0=r.asm.y).apply(null,arguments)},Pe=r._emscripten_bind_CExpatJS_startElement_0=function(){return(Pe=r._emscripten_bind_CExpatJS_startElement_0=r.asm.z).apply(null,arguments)},Ae=r._emscripten_bind_CExpatJS_endElement_0=function(){return(Ae=r._emscripten_bind_CExpatJS_endElement_0=r.asm.A).apply(null,arguments)},Ie=r._emscripten_bind_CExpatJS_characterData_0=function(){return(Ie=r._emscripten_bind_CExpatJS_characterData_0=r.asm.B).apply(null,arguments)},De=r._emscripten_bind_CExpatJS___destroy___0=function(){return(De=r._emscripten_bind_CExpatJS___destroy___0=r.asm.C).apply(null,arguments)},Re=r._emscripten_bind_VoidPtr___destroy___0=function(){return(Re=r._emscripten_bind_VoidPtr___destroy___0=r.asm.D).apply(null,arguments)},Oe=r._malloc=function(){return(Oe=r._malloc=r.asm.E).apply(null,arguments)},Ne=(r._free=function(){return(r._free=r.asm.F).apply(null,arguments)},r.___errno_location=function(){return(Ne=r.___errno_location=r.asm.G).apply(null,arguments)});function Me(e){function n(){de||(de=!0,r.calledRun=!0,d||(r.noFSInit||ie.init.initialized||ie.init(),ne.init(),A(D),ie.ignorePermissions=!1,A(R),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)M(r.postRun.shift());A(O)}()))}B>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)N(r.preRun.shift());A(I)}(),B>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.dynCall_vi=function(){return(r.dynCall_vi=r.asm.H).apply(null,arguments)},r.asm=fe,V=function e(){de||Me(),de||(V=e)},r.run=Me,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();function Fe(){}function Le(e){return(e||Fe).__cache__}function je(e,t){var n=Le(t),r=n[e];return r||((r=Object.create((t||Fe).prototype)).ptr=e,n[e]=r)}Me(),Fe.prototype=Object.create(Fe.prototype),Fe.prototype.constructor=Fe,Fe.prototype.__class__=Fe,Fe.__cache__={},r.WrapperObject=Fe,r.getCache=Le,r.wrapPointer=je,r.castObject=function(e,t){return je(e.ptr,t)},r.NULL=je(0),r.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete Le(e.__class__)[e.ptr]},r.compare=function(e,t){return e.ptr===t.ptr},r.getPointer=function(e){return e.ptr},r.getClass=function(e){return e.__class__};var $e={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if($e.needed){for(var e=0;e<$e.temps.length;e++)r._free($e.temps[e]);$e.temps.length=0,r._free($e.buffer),$e.buffer=0,$e.size+=$e.needed,$e.needed=0}$e.buffer||($e.size+=128,$e.buffer=r._malloc($e.size),m($e.buffer)),$e.pos=0},alloc:function(e,t){m($e.buffer);var n,i=t.BYTES_PER_ELEMENT,o=e.length*i;return o=o+7&-8,$e.pos+o>=$e.size?(m(o>0),$e.needed+=o,n=r._malloc(o),$e.temps.push(n)):(n=$e.buffer+$e.pos,$e.pos+=o),n},copy:function(e,t,n){switch(n>>>=0,t.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var r=0;r=r);)++i;if(i-t>16&&e.subarray&&x)return x.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function P(e,t){return e?C(E,e,t):""}function A(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i}function I(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}function D(e,t){return e%t>0&&(e+=t-e%t),e}function R(e){b=e,r.HEAP8=w=new Int8Array(e),r.HEAP16=T=new Int16Array(e),r.HEAP32=k=new Int32Array(e),r.HEAPU8=E=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=S=new Float64Array(e)}var O=r.INITIAL_MEMORY||16777216;function N(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?r.dynCall_v(n):r.dynCall_vi(n,t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}(d=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:O/65536,maximum:32768}))&&(b=d.buffer),O=b.byteLength,R(b),k[54684]=5461776;var M=[],F=[],L=[],j=[];function $(e){M.unshift(e)}function B(e){j.unshift(e)}var V=Math.abs,G=Math.ceil,z=Math.floor,U=Math.min,H=0,q=null;function W(e){H++,r.monitorRunDependencies&&r.monitorRunDependencies(H)}function Y(e){if(H--,r.monitorRunDependencies&&r.monitorRunDependencies(H),0==H&&q){var t=q;q=null,t()}}function K(e){throw r.onAbort&&r.onAbort(e),u(e+=""),h(e),v=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function Q(e){return function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}(e,"data:application/octet-stream;base64,")}r.preloadedImages={},r.preloadedAudios={};var X,J,Z,ee="graphvizlib.wasm";function te(){try{if(p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(e){K(e)}}Q(ee)||(X=ee,ee=r.locateFile?r.locateFile(X,c):c+X);var ne,re={1186:function(e,t){var n=P(e),r=P(t);ue.createPath("/",ae.dirname(n)),ue.writeFile(ae.join("/",n),r)}};function ie(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return r.extraStackTrace&&(e+="\n"+r.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}function oe(e){return k[Le()>>2]=e,e}F.push({func:function(){Pe()}}),ne=function(){return performance.now()};var ae={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ae.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return ae.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ae.normalize(e.join("/"))},join2:function(e,t){return ae.normalize(e+"/"+t)}},se={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:ue.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=se.resolve(e).substr(1),t=se.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s0&&(u(C(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(h(C(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(h(C(e.output,0)),e.output=[])}}},ce={ops_table:null,mount:function(e){return ce.createNode(null,"/",16895,0)},createNode:function(e,t,n,r){if(ue.isBlkdev(n)||ue.isFIFO(n))throw new ue.ErrnoError(63);ce.ops_table||(ce.ops_table={dir:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,lookup:ce.node_ops.lookup,mknod:ce.node_ops.mknod,rename:ce.node_ops.rename,unlink:ce.node_ops.unlink,rmdir:ce.node_ops.rmdir,readdir:ce.node_ops.readdir,symlink:ce.node_ops.symlink},stream:{llseek:ce.stream_ops.llseek}},file:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:{llseek:ce.stream_ops.llseek,read:ce.stream_ops.read,write:ce.stream_ops.write,allocate:ce.stream_ops.allocate,mmap:ce.stream_ops.mmap,msync:ce.stream_ops.msync}},link:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,readlink:ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:ue.chrdev_stream_ops}});var i=ue.createNode(e,t,n,r);return ue.isDir(i.mode)?(i.node_ops=ce.ops_table.dir.node,i.stream_ops=ce.ops_table.dir.stream,i.contents={}):ue.isFile(i.mode)?(i.node_ops=ce.ops_table.file.node,i.stream_ops=ce.ops_table.file.stream,i.usedBytes=0,i.contents=null):ue.isLink(i.mode)?(i.node_ops=ce.ops_table.link.node,i.stream_ops=ce.ops_table.link.stream):ue.isChrdev(i.mode)&&(i.node_ops=ce.ops_table.chrdev.node,i.stream_ops=ce.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i),i},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],n=0;n=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var n=e.contents;return e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||i+r8)throw new ue.ErrnoError(32);for(var i=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=ue.root,a="/",s=0;s40)throw new ue.ErrnoError(32)}}return{path:a,node:o}},getPath:function(e){for(var t;;){if(ue.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?n+"/"+t:n+t:n}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var n=0,r=0;r>>0)%ue.nameTable.length},hashAddNode:function(e){var t=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[t],ue.nameTable[t]=e},hashRemoveNode:function(e){var t=ue.hashName(e.parent.id,e.name);if(ue.nameTable[t]===e)ue.nameTable[t]=e.name_next;else for(var n=ue.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode:function(e,t){var n=ue.mayLookup(e);if(n)throw new ue.ErrnoError(n,e);for(var r=ue.hashName(e.id,t),i=ue.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return ue.lookup(e,t)},createNode:function(e,t,n,r){var i=new ue.FSNode(e,t,n,r);return ue.hashAddNode(i),i},destroyNode:function(e){ue.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=ue.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return ue.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=ue.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return ue.lookupNode(e,t),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete:function(e,t,n){var r;try{r=ue.lookupNode(e,t)}catch(e){return e.errno}var i=ue.nodePermissions(e,"wx");if(i)return i;if(n){if(!ue.isDir(r.mode))return 54;if(ue.isRoot(r)||ue.getPath(r)===ue.cwd())return 10}else if(ue.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(t)||512&t)?31:ue.nodePermissions(e,ue.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||ue.MAX_OPEN_FDS;for(var n=e;n<=t;n++)if(!ue.streams[n])return n;throw new ue.ErrnoError(33)},getStream:function(e){return ue.streams[e]},createStream:function(e,t,n){ue.FSStream||(ue.FSStream=function(){},ue.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var r=new ue.FSStream;for(var i in e)r[i]=e[i];e=r;var o=ue.nextfd(t,n);return e.fd=o,ue.streams[o]=e,e},closeStream:function(e){ue.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=ue.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new ue.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){ue.devices[e]={stream_ops:t}},getDevice:function(e){return ue.devices[e]},getMounts:function(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&h("warning: "+ue.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=ue.getMounts(ue.root.mount),r=0;function i(e){return ue.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,n){var r,i="/"===n,o=!n;if(i&&ue.root)throw new ue.ErrnoError(10);if(!i&&!o){var a=ue.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,ue.isMountpoint(r))throw new ue.ErrnoError(10);if(!ue.isDir(r.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?ue.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount:function(e){var t=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(t.node))throw new ue.ErrnoError(28);var n=t.node,r=n.mounted,i=ue.getMounts(r);Object.keys(ue.nameTable).forEach((function(e){for(var t=ue.nameTable[e];t;){var n=t.name_next;-1!==i.indexOf(t.mount)&&ue.destroyNode(t),t=n}})),n.mounted=null;var o=n.mount.mounts.indexOf(r);n.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,n){var r=ue.lookupPath(e,{parent:!0}).node,i=ae.basename(e);if(!i||"."===i||".."===i)throw new ue.ErrnoError(28);var o=ue.mayCreate(r,i);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.mknod)throw new ue.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,ue.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,ue.mknod(e,t,0)},mkdirTree:function(e,t){for(var n=e.split("/"),r="",i=0;ithis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((function(e){var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(i.responseType="arraybuffer"),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ke(i.responseText||"",!0)}(t,i)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:n},s=ue.createFile(e,t,a,r,i);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(s.stream_ops).forEach((function(e){var t=s.stream_ops[e];l[e]=function(){if(!ue.forceLoadFile(s))throw new ue.ErrnoError(29);return t.apply(null,arguments)}})),l.read=function(e,t,n,r,i){if(!ue.forceLoadFile(s))throw new ue.ErrnoError(29);var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(o.slice)for(var l=0;l>2]=r.dev,k[n+4>>2]=0,k[n+8>>2]=r.ino,k[n+12>>2]=r.mode,k[n+16>>2]=r.nlink,k[n+20>>2]=r.uid,k[n+24>>2]=r.gid,k[n+28>>2]=r.rdev,k[n+32>>2]=0,Z=[r.size>>>0,(J=r.size,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[n+40>>2]=Z[0],k[n+44>>2]=Z[1],k[n+48>>2]=4096,k[n+52>>2]=r.blocks,k[n+56>>2]=r.atime.getTime()/1e3|0,k[n+60>>2]=0,k[n+64>>2]=r.mtime.getTime()/1e3|0,k[n+68>>2]=0,k[n+72>>2]=r.ctime.getTime()/1e3|0,k[n+76>>2]=0,Z=[r.ino>>>0,(J=r.ino,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[n+80>>2]=Z[0],k[n+84>>2]=Z[1],0},doMsync:function(e,t,n,r,i){var o=E.slice(e,e+n);ue.msync(t,o,i,n,r)},doMkdir:function(e,t){return"/"===(e=ae.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),ue.mkdir(e,t,0),0},doMknod:function(e,t,n){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ue.mknod(e,t,n),0},doReadlink:function(e,t,n){if(n<=0)return-28;var r=ue.readlink(e),i=Math.min(n,I(r)),o=w[t+i];return A(r,E,t,n+1),w[t+i]=o,i},doAccess:function(e,t){if(-8&t)return-28;var n;if(!(n=ue.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&ue.nodePermissions(n,r)?-2:0},doDup:function(e,t,n){var r=ue.getStream(n);return r&&ue.close(r),ue.open(e,t,0,n,n).fd},doReadv:function(e,t,n,r){for(var i=0,o=0;o>2],s=k[t+(8*o+4)>>2],l=ue.read(e,w,a,s,r);if(l<0)return-1;if(i+=l,l>2],s=k[t+(8*o+4)>>2],l=ue.write(e,w,a,s,r);if(l<0)return-1;i+=l}return i},varargs:void 0,get:function(){return he.varargs+=4,k[he.varargs-4>>2]},getStr:function(e){return P(e)},getStreamFromFD:function(e){var t=ue.getStream(e);if(!t)throw new ue.ErrnoError(8);return t},get64:function(e,t){return e}},pe=0;function fe(e){try{return d.grow(e-b.byteLength+65535>>>16),R(d.buffer),1}catch(e){}}var de={};function me(){if(!me.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var t in de)e[t]=de[t];var n=[];for(var t in e)n.push(t+"="+e[t]);me.strings=n}return me.strings}function ge(e){return e%4==0&&(e%100!=0||e%400==0)}function ye(e,t){for(var n=0,r=0;r<=t;n+=e[r++]);return n}var ve=[31,29,31,30,31,30,31,31,30,31,30,31],_e=[31,28,31,30,31,30,31,31,30,31,30,31];function be(e,t){for(var n=new Date(e.getTime());t>0;){var r=ge(n.getFullYear()),i=n.getMonth(),o=(r?ve:_e)[i];if(!(t>o-n.getDate()))return n.setDate(n.getDate()+t),n;t-=o-n.getDate()+1,n.setDate(1),i<11?n.setMonth(i+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1))}return n}function we(e,t,n,r){var i=k[r+40>>2],o={tm_sec:k[r>>2],tm_min:k[r+4>>2],tm_hour:k[r+8>>2],tm_mday:k[r+12>>2],tm_mon:k[r+16>>2],tm_year:k[r+20>>2],tm_wday:k[r+24>>2],tm_yday:k[r+28>>2],tm_isdst:k[r+32>>2],tm_gmtoff:k[r+36>>2],tm_zone:i?P(i):""},a=P(n),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)a=a.replace(new RegExp(l,"g"),s[l]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,n){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(r=n(e.getDate()-t.getDate())),r}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=be(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),i=d(n),o=d(r);return f(i,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+ye(ge(e.tm_year+1900)?ve:_e,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return p(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),n=0===t.getDay()?t:be(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(n,r)<0){var i=ye(ge(r.getFullYear())?ve:_e,r.getMonth()-1)-31,o=31-n.getDate()+i+r.getDate();return p(Math.ceil(o/7),2)}return 0===f(n,t)?"01":"00"},"%V":function(e){var t,n=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),i=d(n),o=d(r),a=be(new Date(e.tm_year+1900,0,1),e.tm_yday);return f(a,i)<0?"53":f(o,a)<=0?"01":(t=i.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(n?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in g)a.indexOf(l)>=0&&(a=a.replace(new RegExp(l,"g"),g[l](o)));var y=ke(a,!1);return y.length>t?0:(function(e,t){w.set(e,t)}(y,e),y.length-1)}function Ee(e,t){Ee.array||(Ee.array=[]);var n,r=Ee.array;for(r.length=0;n=E[e++];)100===n||102===n?(t=t+7&-8,r.push(S[t>>3]),t+=8):(t=t+3&-4,r.push(k[t>>2]),t+=4);return r}var Te=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};function ke(e,t,n){var r=n>0?n:I(e)+1,i=new Array(r),o=A(e,i,0,i.length);return t&&(i.length=o),i}Object.defineProperties(Te.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=Te,ue.staticInit();var Se={L:function(e,t){return function(e,t){var n;if(0===e)n=Date.now();else{if(1!==e&&4!==e)return oe(28),-1;n=ne()}return k[t>>2]=n/1e3|0,k[t+4>>2]=n%1e3*1e3*1e3|0,0}(e,t)},k:function(e){return Ne(e)},j:function(e,t,n){throw e},J:function(e,t){return oe(63),-1},Q:function(e,t){try{return e=he.getStr(e),he.doAccess(e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},x:function(e,t,n){he.varargs=n;try{var r=he.getStreamFromFD(e);switch(t){case 0:return(i=he.get())<0?-28:ue.open(r.path,r.flags,0,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=he.get();return r.flags|=i,0;case 12:return i=he.get(),T[i+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return oe(28),-1;default:return-28}}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},S:function(e,t){try{var n=he.getStreamFromFD(e);return he.doStat(ue.stat,n.path,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},p:function(){return 42},N:function(e,t,n){he.varargs=n;try{var r=he.getStreamFromFD(e);switch(t){case 21509:case 21505:return r.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var i=he.get();return k[i>>2]=0,0;case 21520:return r.tty?-28:-59;case 21531:return i=he.get(),ue.ioctl(r,t,i);case 21523:case 21524:return r.tty?0:-59;default:K("bad ioctl syscall "+t)}}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},O:function(e,t,n,r,i,o){try{return function(e,t,n,r,i,o){var a;o<<=12;var s=!1;if(0!=(16&r)&&e%16384!=0)return-28;if(0!=(32&r)){if(!(a=Be(16384,t)))return-48;je(a,0,t),s=!0}else{var l=ue.getStream(i);if(!l)return-8;var c=ue.mmap(l,E,e,t,o,n,r);a=c.ptr,s=c.allocated}return he.mappings[a]={malloc:a,len:t,allocated:s,fd:i,prot:n,flags:r,offset:o},a}(e,t,n,r,i,o)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},P:function(e,t){try{return function(e,t){if(-1==(0|e)||0===t)return-28;var n=he.mappings[e];if(!n)return 0;if(t===n.len){var r=ue.getStream(n.fd);2&n.prot&&he.doMsync(e,r,t,n.flags,n.offset),ue.munmap(r),he.mappings[e]=null,n.allocated&&Me(n.malloc)}return 0}(e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},y:function(e,t,n){he.varargs=n;try{var r=he.getStr(e),i=he.get();return ue.open(r,t,i).fd}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},R:function(e,t){try{return e=he.getStr(e),he.doStat(ue.stat,e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},K:function(e){try{return e=he.getStr(e),ue.unlink(e),0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},v:function(){K()},B:function(e,t,n){var r=Ee(t,n);return re[e].apply(null,r)},d:function(e,t){!function(e,t){throw $e(e,t||1),"longjmp"}(e,t)},D:function(e,t,n){E.copyWithin(e,t,t+n)},E:function(e){e>>>=0;var t=E.length;if(e>2147483648)return!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);if(r=Math.min(r,e+100663296),fe(Math.min(2147483648,D(Math.max(16777216,e,r),65536))))return!0}return!1},H:function(e,t){var n=0;return me().forEach((function(r,i){var o=t+n;k[e+4*i>>2]=o,function(e,t,n){for(var r=0;r>0]=e.charCodeAt(r);n||(w[t>>0]=0)}(r,o),n+=r.length+1})),0},I:function(e,t){var n=me();k[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),k[t>>2]=r,0},l:function(e){!function(e,t){t&&f&&0===e||(f||(v=!0,r.onExit&&r.onExit(e)),l(e,new rt(e)))}(e)},o:function(e){try{var t=he.getStreamFromFD(e);return ue.close(t),0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},G:function(e,t){try{var n=he.getStreamFromFD(e),r=n.tty?2:ue.isDir(n.mode)?3:ue.isLink(n.mode)?7:4;return w[t>>0]=r,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},M:function(e,t,n,r){try{var i=he.getStreamFromFD(e),o=he.doReadv(i,t,n);return k[r>>2]=o,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},C:function(e,t,n,r,i){try{var o=he.getStreamFromFD(e),a=4294967296*n+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(ue.llseek(o,a,r),Z=[o.position>>>0,(J=o.position,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[i>>2]=Z[0],k[i+4>>2]=Z[1],o.getdents&&0===a&&0===r&&(o.getdents=null),0)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},w:function(e,t,n,r){try{var i=he.getStreamFromFD(e),o=he.doWritev(i,t,n);return k[r>>2]=o,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},a:function(){return 0|m},V:function(e){var t=Date.now();return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3|0,0},W:function(e){var t=tt();try{return Ze(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},T:function(e,t){var n=tt();try{return et(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},u:function(e){var t=tt();try{return We(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},f:function(e,t){var n=tt();try{return Ye(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},e:function(e,t,n){var r=tt();try{return Ke(e,t,n)}catch(e){if(nt(r),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},g:function(e,t,n,r){var i=tt();try{return Qe(e,t,n,r)}catch(e){if(nt(i),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},m:function(e,t,n,r,i){var o=tt();try{return Xe(e,t,n,r,i)}catch(e){if(nt(o),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},U:function(e,t,n,r,i,o,a){var s=tt();try{return Je(e,t,n,r,i,o,a)}catch(e){if(nt(s),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},r:function(e){var t=tt();try{Ve(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},h:function(e,t){var n=tt();try{Ge(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},n:function(e,t,n){var r=tt();try{ze(e,t,n)}catch(e){if(nt(r),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},t:function(e,t,n,r){var i=tt();try{Ue(e,t,n,r)}catch(e){if(nt(i),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},s:function(e,t,n,r,i){var o=tt();try{He(e,t,n,r,i)}catch(e){if(nt(o),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},q:function(e,t,n,r,i,o){var a=tt();try{qe(e,t,n,r,i,o)}catch(e){if(nt(a),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},memory:d,i:function e(t,n,r,i){n|=0,r|=0,i|=0;var o=0;for(pe=pe+1|0,k[(t|=0)>>2]=pe;(0|o)<(0|i);){if(0==(0|k[r+(o<<3)>>2]))return k[r+(o<<3)>>2]=pe,k[r+(4+(o<<3))>>2]=n,k[r+(8+(o<<3))>>2]=0,g(0|i),0|r;o=o+1|0}return r=0|e(0|t,0|n,0|(r=0|Fe(0|r,8*(1+(i=2*i|0)|0)|0)),0|i),g(0|i),0|r},b:function(e){g(0|e)},F:function(e,t,n,r){return we(e,t,n,r)},table:y,c:function(e,t,n){e|=0,t|=0,n|=0;for(var r=0,i=0;(0|r)<(0|n)&&0!=(0|(i=0|k[t+(r<<3)>>2]));){if((0|i)==(0|e))return 0|k[t+(4+(r<<3))>>2];r=r+1|0}return 0},z:function(e){var t=Date.now()/1e3|0;return e&&(k[e>>2]=t),t},A:function(e){return 0!==e&&je(e,0,16),0}},xe=function(){var e={a:Se};function t(e,t){var n=e.exports;r.asm=n,Y()}function n(e){t(e.instance)}function i(t){return(p||"function"!=typeof fetch?new Promise((function(e,t){e(te())})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return te()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){h("failed to asynchronously prepare wasm: "+e),K(e)}))}if(W(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return h("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(p||"function"!=typeof WebAssembly.instantiateStreaming||Q(ee)||"function"!=typeof fetch)return i(n);fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){h("wasm streaming compile failed: "+e),h("falling back to ArrayBuffer instantiation"),i(n)}))}))}(),{}}();r.asm=xe;var Ce,Pe=r.___wasm_call_ctors=function(){return(Pe=r.___wasm_call_ctors=r.asm.X).apply(null,arguments)},Ae=(r.___em_js__array_bounds_check_error=function(){return(r.___em_js__array_bounds_check_error=r.asm.Y).apply(null,arguments)},r._emscripten_bind_VoidPtr___destroy___0=function(){return(Ae=r._emscripten_bind_VoidPtr___destroy___0=r.asm.Z).apply(null,arguments)}),Ie=r._emscripten_bind_Main_layout_3=function(){return(Ie=r._emscripten_bind_Main_layout_3=r.asm._).apply(null,arguments)},De=r._emscripten_bind_Main_lastError_0=function(){return(De=r._emscripten_bind_Main_lastError_0=r.asm.$).apply(null,arguments)},Re=r._emscripten_bind_Main_createFile_2=function(){return(Re=r._emscripten_bind_Main_createFile_2=r.asm.aa).apply(null,arguments)},Oe=r._emscripten_bind_Main___destroy___0=function(){return(Oe=r._emscripten_bind_Main___destroy___0=r.asm.ba).apply(null,arguments)},Ne=r._malloc=function(){return(Ne=r._malloc=r.asm.ca).apply(null,arguments)},Me=r._free=function(){return(Me=r._free=r.asm.da).apply(null,arguments)},Fe=r._realloc=function(){return(Fe=r._realloc=r.asm.ea).apply(null,arguments)},Le=r.___errno_location=function(){return(Le=r.___errno_location=r.asm.fa).apply(null,arguments)},je=r._memset=function(){return(je=r._memset=r.asm.ga).apply(null,arguments)},$e=r._setThrew=function(){return($e=r._setThrew=r.asm.ha).apply(null,arguments)},Be=r._memalign=function(){return(Be=r._memalign=r.asm.ia).apply(null,arguments)},Ve=r.dynCall_v=function(){return(Ve=r.dynCall_v=r.asm.ja).apply(null,arguments)},Ge=r.dynCall_vi=function(){return(Ge=r.dynCall_vi=r.asm.ka).apply(null,arguments)},ze=r.dynCall_vii=function(){return(ze=r.dynCall_vii=r.asm.la).apply(null,arguments)},Ue=r.dynCall_viii=function(){return(Ue=r.dynCall_viii=r.asm.ma).apply(null,arguments)},He=r.dynCall_viiii=function(){return(He=r.dynCall_viiii=r.asm.na).apply(null,arguments)},qe=r.dynCall_viiiii=function(){return(qe=r.dynCall_viiiii=r.asm.oa).apply(null,arguments)},We=r.dynCall_i=function(){return(We=r.dynCall_i=r.asm.pa).apply(null,arguments)},Ye=r.dynCall_ii=function(){return(Ye=r.dynCall_ii=r.asm.qa).apply(null,arguments)},Ke=r.dynCall_iii=function(){return(Ke=r.dynCall_iii=r.asm.ra).apply(null,arguments)},Qe=r.dynCall_iiii=function(){return(Qe=r.dynCall_iiii=r.asm.sa).apply(null,arguments)},Xe=r.dynCall_iiiii=function(){return(Xe=r.dynCall_iiiii=r.asm.ta).apply(null,arguments)},Je=r.dynCall_iiiiiii=function(){return(Je=r.dynCall_iiiiiii=r.asm.ua).apply(null,arguments)},Ze=r.dynCall_d=function(){return(Ze=r.dynCall_d=r.asm.va).apply(null,arguments)},et=r.dynCall_di=function(){return(et=r.dynCall_di=r.asm.wa).apply(null,arguments)},tt=r.stackSave=function(){return(tt=r.stackSave=r.asm.xa).apply(null,arguments)},nt=r.stackRestore=function(){return(nt=r.stackRestore=r.asm.ya).apply(null,arguments)};function rt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function it(e){function n(){Ce||(Ce=!0,r.calledRun=!0,v||(r.noFSInit||ue.init.initialized||ue.init(),le.init(),N(F),ue.ignorePermissions=!1,N(L),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)B(r.postRun.shift());N(j)}()))}H>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)$(r.preRun.shift());N(M)}(),H>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.asm=xe,q=function e(){Ce||it(),Ce||(q=e)},r.run=it,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();function ot(){}function at(e){return(e||ot).__cache__}function st(e,t){var n=at(t),r=n[e];return r||((r=Object.create((t||ot).prototype)).ptr=e,n[e]=r)}f=!0,it(),ot.prototype=Object.create(ot.prototype),ot.prototype.constructor=ot,ot.prototype.__class__=ot,ot.__cache__={},r.WrapperObject=ot,r.getCache=at,r.wrapPointer=st,r.castObject=function(e,t){return st(e.ptr,t)},r.NULL=st(0),r.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete at(e.__class__)[e.ptr]},r.compare=function(e,t){return e.ptr===t.ptr},r.getPointer=function(e){return e.ptr},r.getClass=function(e){return e.__class__};var lt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(lt.needed){for(var e=0;e=lt.size?(_(o>0),lt.needed+=o,n=r._malloc(o),lt.temps.push(n)):(n=lt.buffer+lt.pos,lt.pos+=o),n},copy:function(e,t,n){switch(n>>>=0,t.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var r=0;r\n\n'}}function imagesToFiles(e){return e.map(imageToFile)}function createFiles(e,t){var n=__assign({images:[],files:[]},t);__spreadArrays$1(n.files,imagesToFiles(n.images)).forEach((function(t){return e.Main.prototype.createFile(t.path,t.data)}))}var graphviz={layout:function(e,t,n,r){return void 0===t&&(t="svg"),void 0===n&&(n="dot"),e?loadWasm(graphvizlib$1,null==r?void 0:r.wasmFolder).then((function(i){createFiles(i,r);var o=i.Main.prototype.layout(e,t,n);if(!o)throw new Error(i.Main.prototype.lastError());return o})):Promise.resolve("")},circo:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"circo",n)},dot:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"dot",n)},fdp:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"fdp",n)},neato:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"neato",n)},osage:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"osage",n)},patchwork:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"patchwork",n)},twopi:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"twopi",n)}};function closeMenu(){document.querySelectorAll(".dropdown[open]").forEach(e=>{e.removeAttribute("open")})}function DropdownShare(e){return react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{className:"btn "+e.className,"aria-haspopup":"true"},e.label,react.createElement("div",{className:"dropdown-caret"})),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw",style:{width:200}},e.children))}var lottie=createCommonjsModule((function(module){"undefined"!=typeof navigator&&function(e,t){module.exports?module.exports=t(e):(e.lottie=t(e),e.bodymovin=e.lottie)}(window||{},(function(window){var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],n=t.length;for(e=0;e1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[0]+=t/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var e,t,n=[];for(e=0;e<256;e+=1)t=e.toString(16),n[e]=1==t.length?"0"+t:t;return function(e,t,r){return e<0&&(e=0),t<0&&(t=0),r<0&&(r=0),"#"+n[e]+n[t]+n[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e].length,r=0;r0||e>-1e-6&&e<0?r(1e4*e)/1e4:e}function R(){var e=this.props;return"matrix("+D(e[0])+","+D(e[1])+","+D(e[4])+","+D(e[5])+","+D(e[12])+","+D(e[13])+")"}return function(){this.reset=i,this.rotate=o,this.rotateX=a,this.rotateY=s,this.rotateZ=l,this.skew=u,this.skewFromAxis=h,this.shear=c,this.scale=p,this.setTransform=f,this.translate=d,this.transform=m,this.applyToPoint=b,this.applyToX=w,this.applyToY=E,this.applyToZ=T,this.applyToPointArray=P,this.applyToTriplePoints=C,this.applyToPointStringified=A,this.toCSS=I,this.to2dCSS=R,this.clone=v,this.cloneFromProps=_,this.equals=y,this.inversePoints=x,this.inversePoint=S,this.getInverseMatrix=k,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}(); + */var ERRORS=(_a$2={},_a$2["no-ga-id"]='"'+ANALYTICS_ID_FIELD+'" field is empty in Firebase config. Firebase Analytics requires this field to contain a valid measurement ID.',_a$2["already-exists"]="A Firebase Analytics instance with the measurement ID ${id} already exists. Only one Firebase Analytics instance can be created for each measurement ID.",_a$2["already-initialized"]="Firebase Analytics has already been initialized.settings() must be called before initializing any Analytics instanceor it will have no effect.",_a$2["interop-component-reg-failed"]="Firebase Analytics Interop Component failed to instantiate",_a$2["indexedDB-unsupported"]="IndexedDB is not supported by current browswer",_a$2["invalid-indexedDB-context"]="Environment doesn't support IndexedDB: {$errorInfo}. Wrap initialization of analytics in analytics.isSupported() to prevent initialization in unsupported environments",_a$2["cookies-not-enabled"]="Cookies are not enabled in this browser environment. Analytics requires cookies to be enabled.",_a$2["invalid-analytics-context"]="Firebase Analytics is not supported in browser extensions.",_a$2),ERROR_FACTORY$1=new index_cjs_3("analytics","Analytics",ERRORS),initializedIdPromisesMap={},dataLayerName="dataLayer",gtagName="gtag",gtagCoreFunction,wrappedGtagFunction,globalInitDone=!1;function settings(e){if(globalInitDone)throw ERROR_FACTORY$1.create("already-initialized");e.dataLayerName&&(dataLayerName=e.dataLayerName),e.gtagName&&(gtagName=e.gtagName)}function factory(e,t){if(index_cjs_22())throw ERROR_FACTORY$1.create("invalid-analytics-context");if(!index_cjs_6())throw ERROR_FACTORY$1.create("cookies-not-enabled");if(!index_cjs_26())throw ERROR_FACTORY$1.create("indexedDB-unsupported");index_cjs_47().catch((function(e){throw ERROR_FACTORY$1.create("invalid-indexedDB-context",{errorInfo:e})}));var n=e.options[ANALYTICS_ID_FIELD];if(!n)throw ERROR_FACTORY$1.create("no-ga-id");if(null!=initializedIdPromisesMap[n])throw ERROR_FACTORY$1.create("already-exists",{id:n});if(!globalInitDone){findGtagScriptOnPage()||insertScriptTag(dataLayerName),getOrCreateDataLayer(dataLayerName);var r=wrapOrCreateGtag(initializedIdPromisesMap,dataLayerName,gtagName),i=r.wrappedGtag,o=r.gtagCore;wrappedGtagFunction=i,gtagCoreFunction=o,globalInitDone=!0}return initializedIdPromisesMap[n]=initializeGAId(e,t,gtagCoreFunction),{app:e,logEvent:function(e,t,r){return logEvent(wrappedGtagFunction,n,e,t,r)},setCurrentScreen:function(e,t){return setCurrentScreen(wrappedGtagFunction,n,e,t)},setUserId:function(e,t){return setUserId(wrappedGtagFunction,n,e,t)},setUserProperties:function(e,t){return setUserProperties(wrappedGtagFunction,n,e,t)},setAnalyticsCollectionEnabled:function(e){return setAnalyticsCollectionEnabled(n,e)}}}var name$3="@firebase/analytics",version$5="0.4.2",ANALYTICS_TYPE="analytics";function registerAnalytics(e){e.INTERNAL.registerComponent(new index_cjs_1$1(ANALYTICS_TYPE,(function(e){return factory(e.getProvider("app").getImmediate(),e.getProvider("installations").getImmediate())}),"PUBLIC").setServiceProps({settings:settings,EventName:EventName,isSupported:isSupported})),e.INTERNAL.registerComponent(new index_cjs_1$1("analytics-internal",(function(e){try{return{logEvent:e.getProvider(ANALYTICS_TYPE).getImmediate().logEvent}}catch(e){throw ERROR_FACTORY$1.create("interop-component-reg-failed",{reason:e})}}),"PRIVATE")),e.registerVersion(name$3,version$5)}function isSupported(){return tslib_7(this,void 0,void 0,(function(){return tslib_8(this,(function(e){switch(e.label){case 0:if(index_cjs_22())return[2,!1];if(!index_cjs_6())return[2,!1];if(!index_cjs_26())return[2,!1];e.label=1;case 1:return e.trys.push([1,3,,4]),[4,index_cjs_47()];case 2:return[2,e.sent()];case 3:return e.sent(),[2,!1];case 4:return[2]}}))}))}registerAnalytics(firebase);var fpFuture=createCommonjsModule((function(e,t){function n(){let e,t;const n=new Promise((r,i)=>{e=e=>{r(e),n.isPending=!1},t=e=>{i(e),n.isPending=!1}}).catch(e=>Promise.reject(e));return n.resolve=e,n.reject=t,"finally"in n||(n.finally=e=>{n.then(e),n.catch(e)}),n.isPending=!0,n}Object.defineProperty(t,"__esModule",{value:!0}),t.future=n,t.default=n})),future=unwrapExports(fpFuture),fpFuture_1=fpFuture.future;let firebaseConfig={apiKey:"AIzaSyBhfoK4AFBLsruM0sDJ-sAFyksh4FqMpC8",authDomain:"diagrams-de8ed.firebaseapp.com",databaseURL:"https://diagrams-de8ed.firebaseio.com",projectId:"diagrams-de8ed",storageBucket:"diagrams-de8ed.appspot.com",messagingSenderId:"346071222923",appId:"1:346071222923:web:4d57d09e64ea7ed1ee628e",measurementId:"G-HLCQLCWE0G"};async function addFirebase(){index_cjs$3.initializeApp(firebaseConfig),index_cjs$3.analytics(),await index_cjs$3.auth().setPersistence(index_cjs$3.auth.Auth.Persistence.LOCAL),await new Promise((e,t)=>{const n=index_cjs$3.auth().onAuthStateChanged(t=>{n(),e(t)},e=>{console.error(e),t("API Failed")})})}function newNotebook(e){const t=index_cjs$3.database().ref(`users/${e}/notebooks`).push();return t.child("meta/uid").set(e,(function(e){e&&console.log("error setting uid",e)})),t.child("meta/title").set("Untitled notebook",(function(e){e&&console.log("error setting titile2",e)})),t}function openByHash(e,t){return index_cjs$3.database().ref().child(`users/${e}/notebooks/${t}`)}function logEvent$1(e){index_cjs$3.analytics().logEvent(e)}function logException(e){index_cjs$3.analytics().logEvent("exception",{description:"object"==typeof e?e.message:e,fatal:"object"==typeof e})}function logPageView(e,t){index_cjs$3.analytics().logEvent("page_view",{page_location:e,page_path:t})}async function newNotebookWithContent(e){const t=future();let n=index_cjs$3.auth().currentUser&&index_cjs$3.auth().currentUser.uid||"anonymous";const r=newNotebook(n);return new Firepad.Headless(r).setText(e,(function(e,i){t.resolve({ref:r,data:e,succeed:i,owner:n})})),t}globalThis.firebase=index_cjs$3;const history=createHashHistory();function navigateTo(e,t){const n={pathname:e,state:t||{}};history.location.pathname!=n.pathname&&history.push(n)}history.listen(e=>{logPageView(location.toString(),e.pathname)});var interopRequireDefault=createCommonjsModule((function(e){e.exports=function(e){return e&&e.__esModule?e:{default:e}}}));unwrapExports(interopRequireDefault);var _typeof_1=createCommonjsModule((function(e){function t(n){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=t=function(e){return typeof e}:e.exports=t=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(n)}e.exports=t})),interopRequireWildcard=createCommonjsModule((function(e){function t(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return t=function(){return e},e}e.exports=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==_typeof_1(e)&&"function"!=typeof e)return{default:e};var n=t();if(n&&n.has(e))return n.get(e);var r={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if(Object.prototype.hasOwnProperty.call(e,o)){var a=i?Object.getOwnPropertyDescriptor(e,o):null;a&&(a.get||a.set)?Object.defineProperty(r,o,a):r[o]=e[o]}return r.default=e,n&&n.set(e,r),r}}));function _defineProperty(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}unwrapExports(interopRequireWildcard);var defineProperty=_defineProperty;function _arrayWithHoles(e){if(Array.isArray(e))return e}var arrayWithHoles=_arrayWithHoles;function _iterableToArrayLimit(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}}var iterableToArrayLimit=_iterableToArrayLimit;function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=0||(i[n]=e[n]);return i}unwrapExports(MonacoContainer);var objectWithoutPropertiesLoose=_objectWithoutPropertiesLoose$1;function _objectWithoutProperties(e,t){if(null==e)return{};var n,r,i=objectWithoutPropertiesLoose(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var objectWithoutProperties=_objectWithoutProperties;function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var classCallCheck=_classCallCheck;function _defineProperties(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},t=e.src,r=(0,n.default)(e,["src"]);return this.configScriptSrc=t,this.__config=(0,utils.deepMerge)(this.__config,this.validateConfig(r)),this}},{key:"validateConfig",value:function(e){return e.urls?(this.informAboutDepreciation(),{paths:{vs:e.urls.monacoBase}}):e}},{key:"informAboutDepreciation",value:function(){console.warn("Deprecation warning!\n You are using deprecated way of configuration.\n\n Instead of using\n monaco.config({ urls: { monacoBase: '...' } })\n use\n monaco.config({ paths: { vs: '...' } })\n\n For more please check the link https://github.com/suren-atoyan/monaco-react#config\n ")}},{key:"injectScripts",value:function(e){document.body.appendChild(e)}},{key:"createScript",value:function(e){var t=document.createElement("script");return e&&(t.src=e),t}},{key:"createMonacoLoaderScript",value:function(e){var t=this,n=this.createScript("".concat(this.__config.paths.vs,"/loader.js"));return n.onload=function(n){return t.injectScripts(e)},n.onerror=this.reject,n}},{key:"createConfigScript",value:function(){var e=this.createScript();return this.configScriptSrc?e.src=this.configScriptSrc:e.innerHTML="\n require.config(".concat(JSON.stringify(this.__config),");\n require(['vs/editor/editor.main'], function() {\n document.dispatchEvent(new Event('monaco_init'));\n });\n "),e.onerror=this.reject,e}},{key:"init",value:function(){if(!this.isInitialized){if(window.monaco&&window.monaco.editor)return new Promise((function(e,t){return e(window.monaco)}));document.addEventListener("monaco_init",this.handleConfigScriptLoad);var e=this.createConfigScript(),t=this.createMonacoLoaderScript(e);this.injectScripts(t)}return this.isInitialized=!0,(0,utils.makeCancelable)(this.wrapperPromise)}}]),e}())(a.default);t.default=s}));unwrapExports(monaco$1);var noop_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=function(e){};t.default=n}));unwrapExports(noop_1);var deepMerge=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=interopRequireDefault(defineProperty);function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var i=function e(t,i){return Object.keys(i).forEach((function(n){i[n]instanceof Object&&t[n]&&Object.assign(i[n],e(t[n],i[n]))})),function(e){for(var t=1;t2&&void 0!==arguments[2])||arguments[2],r=(0,react.useRef)(!0);(0,react.useEffect)(r.current||!n?function(e){r.current=!1}:e,t)};t.default=n}));unwrapExports(useUpdate_1);var hooks=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useMount",{enumerable:!0,get:function(){return n.default}}),Object.defineProperty(t,"useUpdate",{enumerable:!0,get:function(){return r.default}});var n=interopRequireDefault(useMount_1),r=interopRequireDefault(useUpdate_1)}));unwrapExports(hooks);var themes_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n={"night-dark":{base:"vs-dark",inherit:!0,rules:[],colors:{"editor.background":"#202124"}}};t.default=n}));unwrapExports(themes_1);var Editor_1=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=interopRequireDefault(defineProperty),r=interopRequireDefault(slicedToArray),i=interopRequireWildcard(react),o=interopRequireDefault(propTypes),a=interopRequireDefault(MonacoContainer),s=interopRequireDefault(themes_1);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var c=function(e){var t=e.value,o=e.language,c=e.editorDidMount,u=e.theme,h=e.line,p=e.width,f=e.height,d=e.loading,m=e.options,g=e.overrideServices,y=e._isControlledMode,v=e.className,_=e.wrapperClassName,b=(0,i.useState)(!1),w=(0,r.default)(b,2),E=w[0],T=w[1],k=(0,i.useState)(!0),S=(0,r.default)(k,2),x=S[0],C=S[1],P=(0,i.useRef)(),A=(0,i.useRef)(),I=(0,i.useRef)();(0,hooks.useMount)((function(e){var t=utils.monaco.init();return t.then((function(e){return(A.current=e)&&C(!1)})).catch((function(e){return"cancelation"!==(null==e?void 0:e.type)&&console.error("Monaco initialization: error:",e)})),function(e){return P.current?R():t.cancel()}})),(0,hooks.useUpdate)((function(e){P.current.updateOptions(m)}),[m],E),(0,hooks.useUpdate)((function(e){if(P.current.getOption(A.current.editor.EditorOption.readOnly))P.current.setValue(t);else if(t!==P.current.getValue()){if(P.current.executeEdits("",[{range:P.current.getModel().getFullModelRange(),text:t}]),y){var n=P.current.getModel();n.forceTokenization(n.getLineCount())}P.current.pushUndoStop()}}),[t],E),(0,hooks.useUpdate)((function(e){P.current.setValue(t),A.current.editor.setModelLanguage(P.current.getModel(),o)}),[o],E),(0,hooks.useUpdate)((function(e){P.current.setScrollPosition({scrollTop:h})}),[h],E),(0,hooks.useUpdate)((function(e){A.current.editor.setTheme(u)}),[u],E);var D=(0,i.useCallback)((function(e){P.current=A.current.editor.create(I.current,function(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n=e.length?{done:!0}:{done:!1,value:e[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(r=e[Symbol.iterator]()).next.bind(r)}var r=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){function t(){return{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1}}e.exports={defaults:{baseUrl:null,breaks:!1,gfm:!0,headerIds:!0,headerPrefix:"",highlight:null,langPrefix:"language-",mangle:!0,pedantic:!1,renderer:null,sanitize:!1,sanitizer:null,silent:!1,smartLists:!1,smartypants:!1,tokenizer:null,walkTokens:null,xhtml:!1},getDefaults:t,changeDefaults:function(t){e.exports.defaults=t}}})),i=(r.defaults,r.getDefaults,r.changeDefaults,/[&<>"']/),o=/[&<>"']/g,a=/[<>"']|&(?!#?\w+;)/,s=/[<>"']|&(?!#?\w+;)/g,l={"&":"&","<":"<",">":">",'"':""","'":"'"},c=function(e){return l[e]},u=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi;function h(e){return e.replace(u,(function(e,t){return"colon"===(t=t.toLowerCase())?":":"#"===t.charAt(0)?"x"===t.charAt(1)?String.fromCharCode(parseInt(t.substring(2),16)):String.fromCharCode(+t.substring(1)):""}))}var p=/(^|[^\[])\^/g,f=/[^\w:]/g,d=/^$|^[a-z][a-z0-9+.-]*:|^[?#]/i,m={},g=/^[^:]+:\/*[^/]*$/,y=/^([^:]+:)[\s\S]*$/,v=/^([^:]+:\/*[^/]*)[\s\S]*$/;function _(e,t){m[" "+e]||(g.test(e)?m[" "+e]=e+"/":m[" "+e]=b(e,"/",!0));var n=-1===(e=m[" "+e]).indexOf(":");return"//"===t.substring(0,2)?n?t:e.replace(y,"$1")+t:"/"===t.charAt(0)?n?t:e.replace(v,"$1")+t:e+t}function b(e,t,n){var r=e.length;if(0===r)return"";for(var i=0;i=0&&"\\"===n[i];)r=!r;return r?"|":" |"})).split(/ \|/),r=0;if(n.length>t)n.splice(t);else for(;n.length1?{type:"space",raw:t[0]}:{raw:"\n"}},t.code=function(e,t){var n=this.rules.block.code.exec(e);if(n){var r=t[t.length-1];if(r&&"paragraph"===r.type)return{raw:n[0],text:n[0].trimRight()};var i=n[0].replace(/^ {4}/gm,"");return{type:"code",raw:n[0],codeBlockStyle:"indented",text:this.options.pedantic?i:R(i,"\n")}}},t.fences=function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],r=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var r=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:t[0].length>=r.length?e.slice(r.length):e})).join("\n")}(n,t[3]||"");return{type:"code",raw:n,lang:t[2]?t[2].trim():t[2],text:r}}},t.heading=function(e){var t=this.rules.block.heading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},t.nptable=function(e){var t=this.rules.block.nptable.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[],raw:t[0]};if(n.header.length===n.align.length){var r,i=n.align.length;for(r=0;r ?/gm,"");return{type:"blockquote",raw:t[0],text:n}}},t.list=function(e){var t=this.rules.block.list.exec(e);if(t){for(var n,r,i,o,a,s,l,c=t[0],u=t[2],h=u.length>1,p=")"===u[u.length-1],f={type:"list",raw:c,ordered:h,start:h?+u.slice(0,-1):"",loose:!1,items:[]},d=t[0].match(this.rules.block.item),m=!1,g=d.length,y=0;y1||this.options.smartLists&&i!==u)&&(o=d.slice(y+1).join("\n"),f.raw=f.raw.substring(0,f.raw.length-o.length),y=g-1)),a=m||/\n\n(?!\s*$)/.test(n),y!==g-1&&(m="\n"===n.charAt(n.length-1),a||(a=m)),a&&(f.loose=!0),l=void 0,(s=/^\[[ xX]\] /.test(n))&&(l=" "!==n[1],n=n.replace(/^\[[ xX]\] +/,"")),f.items.push({type:"list_item",raw:c,task:s,checked:l,loose:a,text:n});return f}},t.html=function(e){var t=this.rules.block.html.exec(e);if(t)return{type:this.options.sanitize?"paragraph":"html",raw:t[0],pre:!this.options.sanitizer&&("pre"===t[1]||"script"===t[1]||"style"===t[1]),text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(t[0]):N(t[0]):t[0]}},t.def=function(e){var t=this.rules.block.def.exec(e);if(t)return t[3]&&(t[3]=t[3].substring(1,t[3].length-1)),{tag:t[1].toLowerCase().replace(/\s+/g," "),raw:t[0],href:t[2],title:t[3]}},t.table=function(e){var t=this.rules.block.table.exec(e);if(t){var n={type:"table",header:O(t[1].replace(/^ *| *\| *$/g,"")),align:t[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:t[3]?t[3].replace(/\n$/,"").split("\n"):[]};if(n.header.length===n.align.length){n.raw=t[0];var r,i=n.align.length;for(r=0;r/i.test(r[0])&&(t=!1),!n&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?n=!0:n&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(n=!1),{type:this.options.sanitize?"text":"html",raw:r[0],inLink:t,inRawBlock:n,text:this.options.sanitize?this.options.sanitizer?this.options.sanitizer(r[0]):N(r[0]):r[0]}},t.link=function(e){var t=this.rules.inline.link.exec(e);if(t){var n=M(t[2],"()");if(n>-1){var r=(0===t[0].indexOf("!")?5:4)+t[1].length+n;t[2]=t[2].substring(0,n),t[0]=t[0].substring(0,r).trim(),t[3]=""}var i=t[2],o="";if(this.options.pedantic){var a=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);a?(i=a[1],o=a[3]):o=""}else o=t[3]?t[3].slice(1,-1):"";return F(t,{href:(i=i.trim().replace(/^<([\s\S]*)>$/,"$1"))?i.replace(this.rules.inline._escapes,"$1"):i,title:o?o.replace(this.rules.inline._escapes,"$1"):o},t[0])}},t.reflink=function(e,t){var n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){var r=(n[2]||n[1]).replace(/\s+/g," ");if(!(r=t[r.toLowerCase()])||!r.href){var i=n[0].charAt(0);return{type:"text",raw:i,text:i}}return F(n,r,n[0])}},t.strong=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.strong.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="**"===r[0]?this.rules.inline.strong.endAst:this.rules.inline.strong.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.strong.middle.exec(t.slice(0,r.index+3)))return{type:"strong",raw:e.slice(0,i[0].length),text:e.slice(2,i[0].length-2)}}},t.em=function(e,t,n){void 0===n&&(n="");var r=this.rules.inline.em.start.exec(e);if(r&&(!r[1]||r[1]&&(""===n||this.rules.inline.punctuation.exec(n)))){t=t.slice(-1*e.length);var i,o="*"===r[0]?this.rules.inline.em.endAst:this.rules.inline.em.endUnd;for(o.lastIndex=0;null!=(r=o.exec(t));)if(i=this.rules.inline.em.middle.exec(t.slice(0,r.index+2)))return{type:"em",raw:e.slice(0,i[0].length),text:e.slice(1,i[0].length-1)}}},t.codespan=function(e){var t=this.rules.inline.code.exec(e);if(t){var n=t[2].replace(/\n/g," "),r=/[^ ]/.test(n),i=n.startsWith(" ")&&n.endsWith(" ");return r&&i&&(n=n.substring(1,n.length-1)),n=N(n,!0),{type:"codespan",raw:t[0],text:n}}},t.br=function(e){var t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}},t.del=function(e){var t=this.rules.inline.del.exec(e);if(t)return{type:"del",raw:t[0],text:t[1]}},t.autolink=function(e,t){var n,r,i=this.rules.inline.autolink.exec(e);if(i)return r="@"===i[2]?"mailto:"+(n=N(this.options.mangle?t(i[1]):i[1])):n=N(i[1]),{type:"link",raw:i[0],text:n,href:r,tokens:[{type:"text",raw:n,text:n}]}},t.url=function(e,t){var n;if(n=this.rules.inline.url.exec(e)){var r,i;if("@"===n[2])i="mailto:"+(r=N(this.options.mangle?t(n[0]):n[0]));else{var o;do{o=n[0],n[0]=this.rules.inline._backpedal.exec(n[0])[0]}while(o!==n[0]);r=N(n[0]),i="www."===n[1]?"http://"+r:r}return{type:"link",raw:n[0],text:r,href:i,tokens:[{type:"text",raw:r,text:r}]}}},t.inlineText=function(e,t,n){var r,i=this.rules.inline.text.exec(e);if(i)return r=t?this.options.sanitize?this.options.sanitizer?this.options.sanitizer(i[0]):N(i[0]):i[0]:N(this.options.smartypants?n(i[0]):i[0]),{type:"text",raw:i[0],text:r}},e}(),j=S,$=T,B=x,V={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:/^ {0,3}(`{3,}(?=[^`\n]*\n)|~{3,})([^\n]*)\n(?:|([\s\S]*?)\n)(?: {0,3}\1[~`]* *(?:\n+|$)|$)/,hr:/^ {0,3}((?:- *){3,}|(?:_ *){3,}|(?:\* *){3,})(?:\n+|$)/,heading:/^ {0,3}(#{1,6}) +([^\n]*?)(?: +#+)? *(?:\n+|$)/,blockquote:/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/,list:/^( {0,3})(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:"^ {0,3}(?:<(script|pre|style)[\\s>][\\s\\S]*?(?:[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?\\?>\\n*|\\n*|\\n*|)[\\s\\S]*?(?:\\n{2,}|$)|<(?!script|pre|style)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$)|(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:\\n{2,}|$))",def:/^ {0,3}\[(label)\]: *\n? *]+)>?(?:(?: +\n? *| *\n *)(title))? *(?:\n+|$)/,nptable:j,table:j,lheading:/^([^\n]+)\n {0,3}(=+|-+) *(?:\n+|$)/,_paragraph:/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html)[^\n]+)*)/,text:/^[^\n]+/,_label:/(?!\s*\])(?:\\[\[\]]|[^\[\]])+/,_title:/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/};V.def=$(V.def).replace("label",V._label).replace("title",V._title).getRegex(),V.bullet=/(?:[*+-]|\d{1,9}[.)])/,V.item=/^( *)(bull) ?[^\n]*(?:\n(?!\1bull ?)[^\n]*)*/,V.item=$(V.item,"gm").replace(/bull/g,V.bullet).getRegex(),V.list=$(V.list).replace(/bull/g,V.bullet).replace("hr","\\n+(?=\\1?(?:(?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$))").replace("def","\\n+(?="+V.def.source+")").getRegex(),V._tag="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",V._comment=//,V.html=$(V.html,"i").replace("comment",V._comment).replace("tag",V._tag).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),V.paragraph=$(V._paragraph).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("|lheading","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.blockquote=$(V.blockquote).replace("paragraph",V.paragraph).getRegex(),V.normal=B({},V),V.gfm=B({},V.normal,{nptable:"^ *([^|\\n ].*\\|.*)\\n *([-:]+ *\\|[-| :]*)(?:\\n((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)",table:"^ *\\|(.+)\\n *\\|?( *[-:]+[-| :]*)(?:\\n *((?:(?!\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)"}),V.gfm.nptable=$(V.gfm.nptable).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.gfm.table=$(V.gfm.table).replace("hr",V.hr).replace("heading"," {0,3}#{1,6} ").replace("blockquote"," {0,3}>").replace("code"," {4}[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html",")|<(?:script|pre|style|!--)").replace("tag",V._tag).getRegex(),V.pedantic=B({},V.normal,{html:$("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",V._comment).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/,fences:j,paragraph:$(V.normal._paragraph).replace("hr",V.hr).replace("heading"," *#{1,6} *[^\n]").replace("lheading",V.lheading).replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").getRegex()});var G={escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,autolink:/^<(scheme:[^\s\x00-\x1f<>]*|email)>/,url:j,tag:"^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^",link:/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/,reflink:/^!?\[(label)\]\[(?!\s*\])((?:\\[\[\]]?|[^\[\]\\])+)\]/,nolink:/^!?\[(?!\s*\])((?:\[[^\[\]]*\]|\\[\[\]]|[^\[\]])*)\](?:\[\])?/,reflinkSearch:"reflink|nolink(?!\\()",strong:{start:/^(?:(\*\*(?=[*punctuation]))|\*\*)(?![\s])|__/,middle:/^\*\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*\*$|^__(?![\s])((?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?)__$/,endAst:/[^punctuation\s]\*\*(?!\*)|[punctuation]\*\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]__(?!_)(?:(?=[punctuation\s])|$)/},em:{start:/^(?:(\*(?=[punctuation]))|\*)(?![*\s])|_/,middle:/^\*(?:(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)|\*(?:(?!overlapSkip)(?:[^*]|\\\*)|overlapSkip)*?\*)+?\*$|^_(?![_\s])(?:(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)|_(?:(?!overlapSkip)(?:[^_]|\\_)|overlapSkip)*?_)+?_$/,endAst:/[^punctuation\s]\*(?!\*)|[punctuation]\*(?!\*)(?:(?=[punctuation\s]|$))/,endUnd:/[^\s]_(?!_)(?:(?=[punctuation\s])|$)/},code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,br:/^( {2,}|\\)\n(?!\s*$)/,del:j,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\?@\\[\\]`^{|}~"};G.punctuation=$(G.punctuation).replace(/punctuation/g,G._punctuation).getRegex(),G._blockSkip="\\[[^\\]]*?\\]\\([^\\)]*?\\)|`[^`]*?`|<[^>]*?>",G._overlapSkip="__[^_]*?__|\\*\\*\\[^\\*\\]*?\\*\\*",G.em.start=$(G.em.start).replace(/punctuation/g,G._punctuation).getRegex(),G.em.middle=$(G.em.middle).replace(/punctuation/g,G._punctuation).replace(/overlapSkip/g,G._overlapSkip).getRegex(),G.em.endAst=$(G.em.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.em.endUnd=$(G.em.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.start=$(G.strong.start).replace(/punctuation/g,G._punctuation).getRegex(),G.strong.middle=$(G.strong.middle).replace(/punctuation/g,G._punctuation).replace(/blockSkip/g,G._blockSkip).getRegex(),G.strong.endAst=$(G.strong.endAst,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.strong.endUnd=$(G.strong.endUnd,"g").replace(/punctuation/g,G._punctuation).getRegex(),G.blockSkip=$(G._blockSkip,"g").getRegex(),G.overlapSkip=$(G._overlapSkip,"g").getRegex(),G._escapes=/\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/g,G._scheme=/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/,G._email=/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/,G.autolink=$(G.autolink).replace("scheme",G._scheme).replace("email",G._email).getRegex(),G._attribute=/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/,G.tag=$(G.tag).replace("comment",V._comment).replace("attribute",G._attribute).getRegex(),G._label=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,G._href=/<(?:\\[<>]?|[^\s<>\\])*>|[^\s\x00-\x1f]*/,G._title=/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/,G.link=$(G.link).replace("label",G._label).replace("href",G._href).replace("title",G._title).getRegex(),G.reflink=$(G.reflink).replace("label",G._label).getRegex(),G.reflinkSearch=$(G.reflinkSearch,"g").replace("reflink",G.reflink).replace("nolink",G.nolink).getRegex(),G.normal=B({},G),G.pedantic=B({},G.normal,{strong:{start:/^__|\*\*/,middle:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,endAst:/\*\*(?!\*)/g,endUnd:/__(?!_)/g},em:{start:/^_|\*/,middle:/^()\*(?=\S)([\s\S]*?\S)\*(?!\*)|^_(?=\S)([\s\S]*?\S)_(?!_)/,endAst:/\*(?!\*)/g,endUnd:/_(?!_)/g},link:$(/^!?\[(label)\]\((.*?)\)/).replace("label",G._label).getRegex(),reflink:$(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",G._label).getRegex()}),G.gfm=B({},G.normal,{escape:$(G.escape).replace("])","~|])").getRegex(),_extended_email:/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/,url:/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,_backpedal:/(?:[^?!.,:;*_~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_~)]+(?!$))+/,del:/^~+(?=\S)([\s\S]*?\S)~+/,text:/^(`+|[^`])(?:[\s\S]*?(?:(?=[\\.5&&(n="x"+n.toString(16)),r+="&#"+n+";";return r}var K=function(){function t(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||U,this.options.tokenizer=this.options.tokenizer||new L,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options;var t={block:H.normal,inline:q.normal};this.options.pedantic?(t.block=H.pedantic,t.inline=q.pedantic):this.options.gfm&&(t.block=H.gfm,this.options.breaks?t.inline=q.breaks:t.inline=q.gfm),this.tokenizer.rules=t}t.lex=function(e,n){return new t(n).lex(e)};var n,r,i,o=t.prototype;return o.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," "),this.blockTokens(e,this.tokens,!0),this.inline(this.tokens),this.tokens},o.blockTokens=function(e,t,n){var r,i,o,a;for(void 0===t&&(t=[]),void 0===n&&(n=!0),e=e.replace(/^ +$/gm,"");e;)if(r=this.tokenizer.space(e))e=e.substring(r.raw.length),r.type&&t.push(r);else if(r=this.tokenizer.code(e,t))e=e.substring(r.raw.length),r.type?t.push(r):((a=t[t.length-1]).raw+="\n"+r.raw,a.text+="\n"+r.text);else if(r=this.tokenizer.fences(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.heading(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.nptable(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.hr(e))e=e.substring(r.raw.length),t.push(r);else if(r=this.tokenizer.blockquote(e))e=e.substring(r.raw.length),r.tokens=this.blockTokens(r.text,[],n),t.push(r);else if(r=this.tokenizer.list(e)){for(e=e.substring(r.raw.length),o=r.items.length,i=0;i0)for(;null!=(a=this.tokenizer.rules.inline.reflinkSearch.exec(s));)l.includes(a[0].slice(a[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(a=this.tokenizer.rules.inline.blockSkip.exec(s));)s=s.slice(0,a.index)+"["+"a".repeat(a[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;e;)if(o=this.tokenizer.escape(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.tag(e,n,r))e=e.substring(o.raw.length),n=o.inLink,r=o.inRawBlock,t.push(o);else if(o=this.tokenizer.link(e))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.reflink(e,this.tokens.links))e=e.substring(o.raw.length),"link"===o.type&&(o.tokens=this.inlineTokens(o.text,[],!0,r)),t.push(o);else if(o=this.tokenizer.strong(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.em(e,s,i))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.codespan(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.br(e))e=e.substring(o.raw.length),t.push(o);else if(o=this.tokenizer.del(e))e=e.substring(o.raw.length),o.tokens=this.inlineTokens(o.text,[],n,r),t.push(o);else if(o=this.tokenizer.autolink(e,Y))e=e.substring(o.raw.length),t.push(o);else if(n||!(o=this.tokenizer.url(e,Y))){if(o=this.tokenizer.inlineText(e,r,W))e=e.substring(o.raw.length),i=o.raw.slice(-1),t.push(o);else if(e){var c="Infinite loop on byte: "+e.charCodeAt(0);if(this.options.silent){console.error(c);break}throw new Error(c)}}else e=e.substring(o.raw.length),t.push(o);return t},n=t,i=[{key:"rules",get:function(){return{block:H,inline:q}}}],(r=null)&&e(n.prototype,r),i&&e(n,i),t}(),Q=r.defaults,X=k,J=w,Z=function(){function e(e){this.options=e||Q}var t=e.prototype;return t.code=function(e,t,n){var r=(t||"").match(/\S*/)[0];if(this.options.highlight){var i=this.options.highlight(e,r);null!=i&&i!==e&&(n=!0,e=i)}return r?'
    '+(n?e:J(e,!0))+"
    \n":"
    "+(n?e:J(e,!0))+"
    \n"},t.blockquote=function(e){return"
    \n"+e+"
    \n"},t.html=function(e){return e},t.heading=function(e,t,n,r){return this.options.headerIds?"'+e+"\n":""+e+"\n"},t.hr=function(){return this.options.xhtml?"
    \n":"
    \n"},t.list=function(e,t,n){var r=t?"ol":"ul";return"<"+r+(t&&1!==n?' start="'+n+'"':"")+">\n"+e+"\n"},t.listitem=function(e){return"
  • "+e+"
  • \n"},t.checkbox=function(e){return" "},t.paragraph=function(e){return"

    "+e+"

    \n"},t.table=function(e,t){return t&&(t=""+t+""),"\n\n"+e+"\n"+t+"
    \n"},t.tablerow=function(e){return"\n"+e+"\n"},t.tablecell=function(e,t){var n=t.header?"th":"td";return(t.align?"<"+n+' align="'+t.align+'">':"<"+n+">")+e+"\n"},t.strong=function(e){return""+e+""},t.em=function(e){return""+e+""},t.codespan=function(e){return""+e+""},t.br=function(){return this.options.xhtml?"
    ":"
    "},t.del=function(e){return""+e+""},t.link=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r='
    "},t.image=function(e,t,n){if(null===(e=X(this.options.sanitize,this.options.baseUrl,e)))return n;var r=''+n+'":">"},t.text=function(e){return e},e}(),ee=function(){function e(){}var t=e.prototype;return t.strong=function(e){return e},t.em=function(e){return e},t.codespan=function(e){return e},t.del=function(e){return e},t.html=function(e){return e},t.text=function(e){return e},t.link=function(e,t,n){return""+n},t.image=function(e,t,n){return""+n},t.br=function(){return""},e}(),te=function(){function e(){this.seen={}}return e.prototype.slug=function(e){var t=e.toLowerCase().trim().replace(/<[!\/a-z].*?>/gi,"").replace(/[\u2000-\u206F\u2E00-\u2E7F\\'!"#$%&()*+,./:;<=>?@[\]^`{|}~]/g,"").replace(/\s/g,"-");if(this.seen.hasOwnProperty(t)){var n=t;do{this.seen[n]++,t=n+"-"+this.seen[n]}while(this.seen.hasOwnProperty(t))}return this.seen[t]=0,t},e}(),ne=r.defaults,re=E,ie=function(){function e(e){this.options=e||ne,this.options.renderer=this.options.renderer||new Z,this.renderer=this.options.renderer,this.renderer.options=this.options,this.textRenderer=new ee,this.slugger=new te}e.parse=function(t,n){return new e(n).parse(t)};var t=e.prototype;return t.parse=function(e,t){void 0===t&&(t=!0);var n,r,i,o,a,s,l,c,u,h,p,f,d,m,g,y,v,_,b="",w=e.length;for(n=0;n0&&"text"===g.tokens[0].type?(g.tokens[0].text=_+" "+g.tokens[0].text,g.tokens[0].tokens&&g.tokens[0].tokens.length>0&&"text"===g.tokens[0].tokens[0].type&&(g.tokens[0].tokens[0].text=_+" "+g.tokens[0].tokens[0].text)):g.tokens.unshift({type:"text",text:_}):m+=_),m+=this.parse(g.tokens,d),u+=this.renderer.listitem(m,v,y);b+=this.renderer.list(u,p,f);continue;case"html":b+=this.renderer.html(h.text);continue;case"paragraph":b+=this.renderer.paragraph(this.parseInline(h.tokens));continue;case"text":for(u=h.tokens?this.parseInline(h.tokens):h.text;n+1An error occurred:

    "+se(e.message+"",!0)+"
    ";throw e}}return he.options=he.setOptions=function(e){return oe(he.defaults,e),ce(he.defaults),he},he.getDefaults=le,he.defaults=ue,he.use=function(e){var t=oe({},e);if(e.renderer&&function(){var n=he.defaults.renderer||new Z,r=function(t){var r=n[t];n[t]=function(){for(var i=arguments.length,o=new Array(i),a=0;at.reject(e.error||e)),document.body.appendChild(n),t}async function injectCss(e){const t=future(),n=document.createElement("link");return n.href=e,n.rel="stylesheet",n.addEventListener("load",t.resolve),n.addEventListener("error",e=>t.reject(e.error||e)),document.body.appendChild(n),t}function fallbackCopyTextToClipboard(e){var t=document.createElement("textarea");t.value=e,t.style.top="0",t.style.left="0",t.style.position="fixed",document.body.appendChild(t),t.focus(),t.select();try{var n=document.execCommand("copy")?"successful":"unsuccessful";console.log("Fallback: Copying text command was "+n)}catch(e){console.error("Fallback: Oops, unable to copy",e)}document.body.removeChild(t)}async function copyTextToClipboard(e){return navigator.clipboard?navigator.clipboard.writeText(e).then((function(){console.log("Async: Copying to clipboard was successful!")}),(function(e){console.error("Async: Could not copy text: ",e)})):fallbackCopyTextToClipboard(e)}function generateStaticLinkFragment(e){return"/static?t="+encodeURIComponent(e)}function generateStaticLink(e){return document.location.protocol+"//"+document.location.host+"#"+generateStaticLinkFragment(e)}var sizeMap={small:16,medium:32,large:64};function getSvgProps(e){var t=e["aria-label"],n=e.className,r=e.size,i=e.verticalAlign,o=e.svgDataByHeight,a=sizeMap[r]||r,s=closestNaturalHeight(Object.keys(o),a),l=o[s].width;return{"aria-hidden":t?"false":"true","aria-label":t,role:"img",className:n,viewBox:"0 0 "+l+" "+s,width:a*(l/s),height:a,fill:"currentColor",style:{display:"inline-block",userSelect:"none",verticalAlign:i},dangerouslySetInnerHTML:{__html:o[s].path}}}function closestNaturalHeight(e,t){return e.map((function(e){return parseInt(e,10)})).reduce((function(e,n){return n<=t?n:e}),e[0])}var _extends$1=Object.assign||function(e){for(var t=1;t'},24:{width:24,path:''}}})))}function DownloadIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function LinkIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function MarkGithubIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''}}})))}function RepoForkedIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''}}})))}function ShareAndroidIcon(e){return react.createElement("svg",getSvgProps(_extends$1({},e,{svgDataByHeight:{16:{width:16,path:''},24:{width:24,path:''}}})))}function download(e,t){var n=document.createElement("a");n.setAttribute("href",URL.createObjectURL(new Blob([t],{type:"image/svg+xml"}))),n.setAttribute("download",e),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n)}function DownloadSvg(e){const t=react_7(null);return react.createElement(react.Fragment,null,"dangerouslySetInnerHTML"in e?react.createElement("div",{ref:t,dangerouslySetInnerHTML:e.dangerouslySetInnerHTML}):react.createElement("div",{ref:t},e.children),react.createElement("button",{className:"btn btn-sm btn-link",onClick:function(){download("diagram.svg",("children"in e?'\n\n':"")+t.current.innerHTML)},style:{fontSize:12}},react.createElement(DownloadIcon,{size:16}),"Download SVG"))}AlertIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},DownloadIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},LinkIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},MarkGithubIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},RepoForkedIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"},ShareAndroidIcon.defaultProps={className:"octicon",size:16,verticalAlign:"text-bottom"};const monospaceFont='Menlo, Monaco, "Courier New", monospace',font="14px "+monospaceFont,DIAGRAM_MARGIN=10,ACTOR_MARGIN=10,ACTOR_PADDING=10,SIGNAL_MARGIN=5,SIGNAL_PADDING=5,NOTE_MARGIN=10,NOTE_PADDING=5,NOTE_OVERLAP=15,TITLE_MARGIN=0,TITLE_PADDING=5,SELF_SIGNAL_WIDTH=20,ALIGN_LEFT=0,ALIGN_CENTER=1,ALIGN_HORIZONTAL_CENTER=2,ALIGN_VERTICAL_CENTER=3,can=document.createElement("canvas"),ctx=can.getContext("2d");function textBBox(e,t){ctx.font=t||font;const n=ctx.measureText(e);return Object.assign(n,{height:n.actualBoundingBoxDescent+n.actualBoundingBoxAscent})}class AssertException extends Error{toString(){return"AssertException: "+this.message}}function assert(e,t){if(!e)throw new AssertException(t)}function layout(e){if(e.signalsHeight_=0,e.actorsHeight_=0,e.width=0,e.height=0,e.title){e.title_={};var t=e.title_,n=textBBox(e.title);t.textBB=n,t.message=e.title,t.width=n.width+2*(TITLE_PADDING+TITLE_MARGIN),t.height=n.height+2*(TITLE_PADDING+TITLE_MARGIN),t.x=DIAGRAM_MARGIN,t.y=DIAGRAM_MARGIN,e.width+=t.width,e.height+=t.height}function r(t,n,r){if(assert(t=e.actors.length){const n=e.actors[t];n.paddingRight=0|Math.max(r,n.paddingRight||0)}else{const i=e.actors[t];i.distances[n]=0|Math.max(r,i.distances[n]?i.distances[n]:0)}}e.actors.forEach(t=>{var n=textBBox(t.name);t.textBB=n,t.x=0,t.y=0,t.width=n.width+2*(ACTOR_PADDING+ACTOR_MARGIN),t.height=n.height+2*(ACTOR_PADDING+ACTOR_MARGIN),t.distances=[],t.paddingRight=0,e.actorsHeight_=0|Math.max(t.height,e.actorsHeight_||0)}),e.signals.forEach(t=>{var n,i,o=textBBox(t.message);t.textBB=o,t.width=o.width,t.height=o.height;var a=0;if("Signal"==t.type)t.width+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),t.height+=2*(SIGNAL_MARGIN+SIGNAL_PADDING),t.isSelf()?(i=(n=t.actorA.index)+1,t.width+=SELF_SIGNAL_WIDTH):(n=Math.min(t.actorA.index,t.actorB.index),i=Math.max(t.actorA.index,t.actorB.index));else if("Note"==t.type)if(t.width+=2*(NOTE_MARGIN+NOTE_PADDING),t.height+=2*(NOTE_MARGIN+NOTE_PADDING),a=2*ACTOR_MARGIN,t.placement==Diagram.PLACEMENT.LEFTOF)n=(i=t.actor.index)-1;else if(t.placement==Diagram.PLACEMENT.RIGHTOF)i=(n=t.actor.index)+1;else if(t.placement==Diagram.PLACEMENT.OVER&&t.hasManyActors())n=Math.min(t.actor[0].index,t.actor[1].index),i=Math.max(t.actor[0].index,t.actor[1].index),a=-(2*NOTE_PADDING+2*NOTE_OVERLAP);else if(t.placement==Diagram.PLACEMENT.OVER)return r((n=t.actor.index)-1,n,t.width/2),r(n,n+1,t.width/2),void(e.signalsHeight_+=t.height);r(n,i,t.width+a),e.signalsHeight_+=t.height});var i=0;e.actors.forEach(t=>{t.x=Math.max(i,t.x),t.distances.forEach((n,r)=>{if(void 0===n)return;const i=e.actors[r];n=0|Math.max(n,t.width/2,i.width/2),i.x=0|Math.max(i.x,t.x+t.width/2+n-i.width/2)}),i=t.x+t.width+t.paddingRight}),e.width=Math.max(i,e.width),e.width+=2*DIAGRAM_MARGIN,e.height+=2*DIAGRAM_MARGIN+2*e.actorsHeight_+e.signalsHeight_}async function initializeDiagrams(){await injectScript("bower_components/underscore/underscore-min.js"),await injectScript("bower_components/js-sequence-diagrams/dist/sequence-diagram-min.js")}function Line(e){return react.createElement("line",{x1:0|e.x1,x2:0|e.x2,y1:0|e.y1,y2:0|e.y2,style:{strokeWidth:"2px"},stroke:"#000000",fill:"none",strokeDasharray:void 0===e.linetype?void 0:e.linetype===Diagram.LINETYPE.DOTTED?"6px, 2px":void 0,markerEnd:void 0===e.arrowhead?void 0:e.arrowhead==Diagram.ARROWTYPE.FILLED?"url(#markerArrowBlock)":"url(#markerArrowOpen)"})}function Rect(e){return react.createElement("rect",{x:0|e.x,y:0|e.y,width:0|e.width,height:0|e.height,style:{strokeWidth:"2px"},stroke:"#000000",fill:"#ffffff"})}function Text(e){var t=textBBox(e.text,e.font),n=e.x,r=e.y;return e.align!=ALIGN_CENTER&&e.align!=ALIGN_HORIZONTAL_CENTER||(n-=t.width/2),e.align!=ALIGN_CENTER&&e.align!=ALIGN_VERTICAL_CENTER||(r-=t.height/2),r+=t.height,react.createElement("text",{x:0|n,y:0|r,style:{font:e.font},textAnchor:"start"},react.createElement("tspan",{x:0|n,y:0|r},e.text))}function getCenterX(e){return e.x+e.width/2}function getCenterY(e){return e.y+e.height/2}function TextBox(e){var t=e.box.x+e.margin,n=e.box.y+e.margin,r=e.box.width-2*e.margin,i=e.box.height-2*e.margin;const o=react.createElement(Rect,{x:t,y:n,width:r,height:i});return e.align==ALIGN_CENTER?(t=getCenterX(e.box),n=getCenterY(e.box)):(t+=e.padding,n+=e.padding),react.createElement(react.Fragment,null,o,react.createElement(Text,{x:t,y:n,text:e.text,font:e.font,align:e.align}))}function ActorSVG(e){return e.actor.y=e.offsetY,e.actor.height=e.height,react.createElement(TextBox,{box:e.actor,text:e.actor.name,margin:ACTOR_MARGIN,padding:ACTOR_PADDING,font:e.font,align:ALIGN_CENTER})}function RenderDiagram(e){const{diagram:t}=e;if(!t)return react.createElement("div",null,"Empty diagram");var n=0;const r=[];return t.actors.map((function(e){r.push(react.createElement(ActorSVG,{actor:e,offsetY:n,height:t.actorsHeight_,font:font,key:r.length})),r.push(react.createElement(ActorSVG,{actor:e,offsetY:n+t.actorsHeight_+t.signalsHeight_,height:t.actorsHeight_,font:font,key:r.length}));var i=getCenterX(e);r.push(react.createElement(Line,{x1:i,y1:n+t.actorsHeight_-ACTOR_MARGIN,x2:i,y2:n+t.actorsHeight_+ACTOR_MARGIN+t.signalsHeight_,key:r.length}))})),n+=t.actorsHeight_,t.signals.forEach((function(e){"Signal"==e.type?e.isSelf()?function(e){assert(e.isSelf(),"signal must be a self signal");var t=e.textBB,i=getCenterX(e.actorA),o=n+SIGNAL_MARGIN+SIGNAL_PADDING,a=o+e.height-2*SIGNAL_MARGIN-SIGNAL_PADDING;r.push(react.createElement(Line,{x1:i,y1:o,x2:i+SELF_SIGNAL_WIDTH,y2:o,linetype:e.linetype,key:r.length})),r.push(react.createElement(Line,{x1:i+SELF_SIGNAL_WIDTH,y1:o,x2:i+SELF_SIGNAL_WIDTH,y2:a,linetype:e.linetype,key:r.length})),r.push(react.createElement(Line,{x1:i+SELF_SIGNAL_WIDTH,y1:a,x2:i,y2:a,linetype:e.linetype,arrowhead:e.arrowtype,key:r.length}));var s=i+SELF_SIGNAL_WIDTH+SIGNAL_PADDING,l=(a-o-t.height)/2;r.push(react.createElement(Text,{x:s,y:o+l,text:e.message,font:font,align:ALIGN_LEFT,key:r.length}))}(e):function(e){var t=getCenterX(e.actorA),i=getCenterX(e.actorB),o=(i-t)/2+t,a=n+SIGNAL_MARGIN+SIGNAL_PADDING;r.push(react.createElement(Text,{x:o,y:a,text:e.message,font:font,align:ALIGN_HORIZONTAL_CENTER,key:r.length})),a=n+e.height-SIGNAL_PADDING,r.push(react.createElement(Line,{x1:t,y1:a,x2:i,y2:a,linetype:e.linetype,arrowhead:e.arrowtype,key:r.length}))}(e):"Note"==e.type&&function(e){e.y=n;var t=getCenterX(e.hasManyActors()?e.actor[0]:e.actor);switch(e.placement){case Diagram.PLACEMENT.RIGHTOF:e.x=t+ACTOR_MARGIN;break;case Diagram.PLACEMENT.LEFTOF:e.x=t-ACTOR_MARGIN-e.width;break;case Diagram.PLACEMENT.OVER:if(e.hasManyActors()){var i=getCenterX(e.actor[1]),o=NOTE_OVERLAP+NOTE_PADDING;e.x=Math.min(t,i)-o,e.width=Math.max(t,i)+o-e.x}else e.x=t-e.width/2;break;default:throw new Error("Unhandled note placement: "+e.placement)}r.push(react.createElement(TextBox,{box:e,text:e.message,margin:NOTE_MARGIN,padding:NOTE_PADDING,font:font,align:ALIGN_LEFT,key:r.length}))}(e),n+=e.height})),react.createElement(DownloadSvg,null,react.createElement("svg",{width:0|t.width,height:0|t.height,xmlns:"http://www.w3.org/2000/svg"},react.createElement("defs",null,react.createElement("marker",{viewBox:"0 0 5 5",markerWidth:"5",markerHeight:"5",orient:"auto",refX:"5",refY:"2.5",id:"markerArrowBlock"},react.createElement("path",{d:"M 0 0 L 5 2.5 L 0 5 z"})),react.createElement("marker",{viewBox:"0 0 9.6 16",markerWidth:"4",markerHeight:"16",orient:"auto",refX:"9.6",refY:"8",id:"markerArrowOpen"},react.createElement("path",{d:"M 9.6,8 1.92,16 0,13.7 5.76,8 0,2.286 1.92,0 9.6,8 z"}))),r))}function SequenceDiagram(e){const{input:t,className:n}=e,r=react_7(null),[i,o]=react_6(0),[a,s]=react_6(0),[l,c]=react_6(null),[u,h]=react_6(null);return react_5(()=>{try{const e=Diagram.parse(t.trim().replace(/^sequenceDiagram[\s\n\r]*/,""));layout(e),o(e.width),s(e.height),c(null),h(e)}catch(e){c(e.toString())}},[t,r]),l?react.createElement("pre",{className:n},l):react.createElement("div",{className:n,style:{width:i,height:a+32},ref:r},react.createElement(RenderDiagram,{diagram:u}))}window.Snap={};const DEFAULT_EXAMPLE='\n# Collaborative diagrams tool\n\n## This editor works with live collaboration, like Google Docs\n\nOnce you get an editable link, you can share it, and multiple users can edit the same document.\n\nWe use it for architecture discussions and planning with my team, it helps a lot because now that all of us are remote.\n\n## How to use it?\n\n1. Click in "Make a copy" in the top bar\n2. Edit the document created for you! Share the link to start collaborating.\n\n## What can we do with this tool?\n\n### Sequence diagrams\n\n```sequence\nAndrew->China: Says Hello\nNote right of China: China thinks about it\nChina--\x3eAndrew: How are you?\nAndrew->>China: I am good thanks!\n```\n\n### Graphviz\n\n```dot\ndigraph G {\n\n\tsubgraph cluster_0 {\n\t\tstyle=filled;\n\t\tcolor=lightgrey;\n\t\tnode [style=filled,color=white];\n\t\ta0 -> a1 -> a2 -> a3;\n\t\tlabel = "process #1";\n\t}\n\n\tsubgraph cluster_1 {\n\t\tnode [style=filled];\n\t\tb0 -> b1 -> b2 -> b3;\n\t\tlabel = "process #2";\n\t\tcolor=blue\n\t}\n\tstart -> a0;\n\tstart -> b0;\n\ta1 -> b3;\n\tb2 -> a3;\n\ta3 -> a0;\n\ta3 -> end;\n\tb3 -> end;\n\n\tstart [shape=Mdiamond];\n\tend [shape=Msquare];\n}\n```\n\n### This is another title with a sequence diagram\n\n```sequence\nTitle: Here is a title\nA->B: Normal line\nB--\x3eC: Dashed line\nC->>D: Open arrow\nD--\x3e>A: Dashed open arrow\n```\n\n### Add notes\n\n```sequence\n# Example of a comment.\nNote left of A: Note to the left of A\nNote right of A: Note to the right of A\nNote over A: Note over A\nNote over A,B: Note over both A and B\n```\n\n### Specify participants\n\n```sequence\nparticipant C\nparticipant B\nparticipant A\nNote right of A: By listing the participants you can change their order\n```\n\n### Code example:\n\n```javascript\n// this example generates a static link to use with this site\n\nconst content = "# this is a title\\n .. put sequences, .dot files or markdown in here ..";\n\nfunction generateStaticLink(content) {\n return `https://diagrams.menduz.com/#/static?t=${encodeURIComponent(content)}`;\n}\n\nconsole.log(generateStaticLink(content));\n```\n\n### Attributions\n\n- Sequence diagrams parser & syntax: https://bramp.github.io/js-sequence-diagrams/\n- Firepad: https://github.com/FirebaseExtended/firepad\n\n### Contact & feedback\n\nYou can contact me on https://twitter.com/@menduz\n\n### Help me pay the hosting\n\nIf you want to help with the expenses of the site, here is my Ethereum address, anything you send is more than welcome:\n\n```\nmenduz.eth - 0xf2f58ed9Ab3057838d88D06be8269270cDc8Aa89\n```\n\nThanks and enjoy!\n\n';function closeMenu(){document.querySelectorAll(".dropdown[open]").forEach(e=>{e.removeAttribute("open")})}function DropdownShare(e){return react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{className:"btn "+e.className,"aria-haspopup":"true"},e.label,react.createElement("div",{className:"dropdown-caret"})),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw",style:{width:200}},e.children))}var lottie=createCommonjsModule((function(module){"undefined"!=typeof navigator&&function(e,t){module.exports?module.exports=t(e):(e.lottie=t(e),e.bodymovin=e.lottie)}(window||{},(function(window){var svgNS="http://www.w3.org/2000/svg",locationHref="",initialDefaultFrame=-999999,subframeEnabled=!0,expressionsPlugin,isSafari=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),bm_pow=Math.pow,bm_sqrt=Math.sqrt,bm_floor=Math.floor,bm_max=Math.max,bm_min=Math.min,BMMath={};function ProjectInterface(){return{}}!function(){var e,t=["abs","acos","acosh","asin","asinh","atan","atanh","atan2","ceil","cbrt","expm1","clz32","cos","cosh","exp","floor","fround","hypot","imul","log","log1p","log2","log10","max","min","pow","random","round","sign","sin","sinh","sqrt","tan","tanh","trunc","E","LN10","LN2","LOG10E","LOG2E","PI","SQRT1_2","SQRT2"],n=t.length;for(e=0;e1?n[1]=1:n[1]<=0&&(n[1]=0),HSVtoRGB(n[0],n[1],n[2])}function addBrightnessToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[2]+=t,n[2]>1?n[2]=1:n[2]<0&&(n[2]=0),HSVtoRGB(n[0],n[1],n[2])}function addHueToRGB(e,t){var n=RGBtoHSV(255*e[0],255*e[1],255*e[2]);return n[0]+=t/360,n[0]>1?n[0]-=1:n[0]<0&&(n[0]+=1),HSVtoRGB(n[0],n[1],n[2])}var rgbToHex=function(){var e,t,n=[];for(e=0;e<256;e+=1)t=e.toString(16),n[e]=1==t.length?"0"+t:t;return function(e,t,r){return e<0&&(e=0),t<0&&(t=0),r<0&&(r=0),"#"+n[e]+n[t]+n[r]}}();function BaseEvent(){}BaseEvent.prototype={triggerEvent:function(e,t){if(this._cbs[e])for(var n=this._cbs[e].length,r=0;r0||e>-1e-6&&e<0?r(1e4*e)/1e4:e}function R(){var e=this.props;return"matrix("+D(e[0])+","+D(e[1])+","+D(e[4])+","+D(e[5])+","+D(e[12])+","+D(e[13])+")"}return function(){this.reset=i,this.rotate=o,this.rotateX=a,this.rotateY=s,this.rotateZ=l,this.skew=u,this.skewFromAxis=h,this.shear=c,this.scale=p,this.setTransform=f,this.translate=d,this.transform=m,this.applyToPoint=b,this.applyToX=w,this.applyToY=E,this.applyToZ=T,this.applyToPointArray=P,this.applyToTriplePoints=C,this.applyToPointStringified=A,this.toCSS=I,this.to2dCSS=R,this.clone=v,this.cloneFromProps=_,this.equals=y,this.inversePoints=x,this.inversePoint=S,this.getInverseMatrix=k,this._t=this.transform,this.isIdentity=g,this._identity=!0,this._identityCalculated=!1,this.props=createTypedArray("float32",16),this.reset()}}(); /*! Transformation Matrix v2.0 (c) Epistemex 2014-2015 @@ -1021,4 +1021,4 @@ function logEvent(e,t,n,r,i){var o=r||{};i&&i.global||(o=tslib_2(tslib_2({},r),{ * Copyright (c) 2014-2017, Jon Schlinkert. * Released under the MIT License. */ -function isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function isPlainObject(e){var t,n;return!1!==isObject(e)&&(void 0===(t=e.constructor)||!1!==isObject(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function lowercaseKeys(e){return e?Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{}):{}}function mergeDeep(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{isPlainObject(t[r])?r in e?n[r]=mergeDeep(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}function merge(e,t,n){if("string"==typeof t){let[e,r]=t.split(" ");n=Object.assign(r?{method:e,url:r}:{url:e},n)}else n=Object.assign({},t);n.headers=lowercaseKeys(n.headers);const r=mergeDeep(e||{},n);return e&&e.mediaType.previews.length&&(r.mediaType.previews=e.mediaType.previews.filter(e=>!r.mediaType.previews.includes(e)).concat(r.mediaType.previews)),r.mediaType.previews=r.mediaType.previews.map(e=>e.replace(/-preview/,"")),r}function addQueryParameters(e,t){const n=/\?/.test(e)?"&":"?",r=Object.keys(t);return 0===r.length?e:e+n+r.map(e=>"q"===e?"q="+t.q.split("+").map(encodeURIComponent).join("+"):`${e}=${encodeURIComponent(t[e])}`).join("&")}beforeAfterHook.Hook=Hook_1,beforeAfterHook.Singular=Singular,beforeAfterHook.Collection=Collection;const urlVariableRegex=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(urlVariableRegex);return t?t.map(removeNonChars).reduce((e,t)=>e.concat(t),[]):[]}function omit(e,t){return Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,n){return t="+"===e||"#"===e?encodeReserved(t):encodeUnreserved(t),n?encodeUnreserved(n)+"="+t:t}function isDefined(e){return null!=e}function isKeyOperator(e){return";"===e||"&"===e||"?"===e}function getValues(e,t,n,r){var i=e[n],o=[];if(isDefined(i)&&""!==i)if("string"==typeof i||"number"==typeof i||"boolean"==typeof i)i=i.toString(),r&&"*"!==r&&(i=i.substring(0,parseInt(r,10))),o.push(encodeValue(t,i,isKeyOperator(t)?n:""));else if("*"===r)Array.isArray(i)?i.filter(isDefined).forEach((function(e){o.push(encodeValue(t,e,isKeyOperator(t)?n:""))})):Object.keys(i).forEach((function(e){isDefined(i[e])&&o.push(encodeValue(t,i[e],e))}));else{const e=[];Array.isArray(i)?i.filter(isDefined).forEach((function(n){e.push(encodeValue(t,n))})):Object.keys(i).forEach((function(n){isDefined(i[n])&&(e.push(encodeUnreserved(n)),e.push(encodeValue(t,i[n].toString())))})),isKeyOperator(t)?o.push(encodeUnreserved(n)+"="+e.join(",")):0!==e.length&&o.push(e.join(","))}else";"===t?isDefined(i)&&o.push(encodeUnreserved(n)):""!==i||"&"!==t&&"?"!==t?""===i&&o.push(""):o.push(encodeUnreserved(n)+"=");return o}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var n=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,r,i){if(r){let e="";const i=[];if(-1!==n.indexOf(r.charAt(0))&&(e=r.charAt(0),r=r.substr(1)),r.split(/,/g).forEach((function(n){var r=/([^:\*]*)(?::(\d+)|(\*))?/.exec(n);i.push(getValues(t,e,r[1],r[2]||r[3]))})),e&&"+"!==e){var o=",";return"?"===e?o="&":"#"!==e&&(o=e),(0!==i.length?e:"")+i.join(o)}return i.join(",")}return encodeReserved(i)}))}function parse$1(e){let t,n=e.method.toUpperCase(),r=(e.url||"/").replace(/:([a-z]\w+)/g,"{+$1}"),i=Object.assign({},e.headers),o=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const a=extractUrlVariableNames(r);r=parseUrl(r).expand(o),/^http/.test(r)||(r=e.baseUrl+r);const s=omit(o,Object.keys(e).filter(e=>a.includes(e)).concat("baseUrl"));if(!/application\/octet-stream/i.test(i.accept)&&(e.mediaType.format&&(i.accept=i.accept.split(/,/).map(t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,"application/vnd$1$2."+e.mediaType.format)).join(",")),e.mediaType.previews.length)){const t=i.accept.match(/[\w-]+(?=-preview)/g)||[];i.accept=t.concat(e.mediaType.previews).map(t=>`application/vnd.github.${t}-preview${e.mediaType.format?"."+e.mediaType.format:"+json"}`).join(",")}return["GET","HEAD"].includes(n)?r=addQueryParameters(r,s):"data"in s?t=s.data:Object.keys(s).length?t=s:i["content-length"]=0,i["content-type"]||void 0===t||(i["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(n)&&void 0===t&&(t=""),Object.assign({method:n,url:r,headers:i},void 0!==t?{body:t}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,n){return parse$1(merge(e,t,n))}function withDefaults(e,t){const n=merge(e,t),r=endpointWithDefaults.bind(null,n);return Object.assign(r,{DEFAULTS:n,defaults:withDefaults.bind(null,n),merge:merge.bind(null,n),parse:parse$1})}const VERSION="6.0.5",userAgent=`octokit-endpoint.js/${VERSION} ${getUserAgent()}`,DEFAULTS={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":userAgent},mediaType:{format:"",previews:[]}},endpoint=withDefaults(null,DEFAULTS);var browser$2=createCommonjsModule((function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,t.default=n.fetch.bind(n),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response})),browser_1=browser$2.Headers,browser_2=browser$2.Request,browser_3=browser$2.Response;class Deprecation extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}}var wrappy_1=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),n=0;nconsole.warn(e));class RequestError extends Error{constructor(e,t,n){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=t,Object.defineProperty(this,"code",{get:()=>(logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),t)}),this.headers=n.headers||{};const r=Object.assign({},n.request);n.request.headers.authorization&&(r.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),r.url=r.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=r}}const VERSION$1="5.4.7";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){(isPlainObject(e.body)||Array.isArray(e.body))&&(e.body=JSON.stringify(e.body));let t,n,r={};return(e.request&&e.request.fetch||browser$2)(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(i=>{n=i.url,t=i.status;for(const e of i.headers)r[e[0]]=e[1];if(204===t||205===t)return;if("HEAD"===e.method){if(t<400)return;throw new RequestError(i.statusText,t,{headers:r,request:e})}if(304===t)throw new RequestError("Not modified",t,{headers:r,request:e});if(t>=400)return i.text().then(n=>{const i=new RequestError(n,t,{headers:r,request:e});try{let e=JSON.parse(i.message);Object.assign(i,e);let t=e.errors;i.message=i.message+": "+t.map(JSON.stringify).join(", ")}catch(e){}throw i});const o=i.headers.get("content-type");return/application\/json/.test(o)?i.json():!o||/^text\/|charset=utf-8$/.test(o)?i.text():getBufferResponse(i)}).then(e=>({status:t,url:n,headers:r,data:e})).catch(t=>{if(t instanceof RequestError)throw t;throw new RequestError(t.message,500,{headers:r,request:e})})}function withDefaults$1(e,t){const n=e.defaults(t);return Object.assign((function(e,t){const r=n.merge(e,t);if(!r.request||!r.request.hook)return fetchWrapper(n.parse(r));const i=(e,t)=>fetchWrapper(n.parse(n.merge(e,t)));return Object.assign(i,{endpoint:n,defaults:withDefaults$1.bind(null,n)}),r.request.hook(i,r)}),{endpoint:n,defaults:withDefaults$1.bind(null,n)})}const request=withDefaults$1(endpoint,{headers:{"user-agent":`octokit-request.js/${VERSION$1} ${getUserAgent()}`}}),VERSION$2="4.5.4";class GraphqlError extends Error{constructor(e,t){super(t.data.errors[0].message),Object.assign(this,t.data),Object.assign(this,{headers:t.headers}),this.name="GraphqlError",this.request=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const NON_VARIABLE_OPTIONS=["method","baseUrl","url","headers","request","query","mediaType"];function graphql(e,t,n){n=n="string"==typeof t?Object.assign({query:t},n):t;const r=Object.keys(n).reduce((e,t)=>NON_VARIABLE_OPTIONS.includes(t)?(e[t]=n[t],e):(e.variables||(e.variables={}),e.variables[t]=n[t],e),{});return e(r).then(e=>{if(e.data.errors){const t={};for(const n of Object.keys(e.headers))t[n]=e.headers[n];throw new GraphqlError(r,{headers:t,data:e.data})}return e.data.data})}function withDefaults$2(e,t){const n=e.defaults(t);return Object.assign((e,t)=>graphql(n,e,t),{defaults:withDefaults$2.bind(null,n),endpoint:request.endpoint})}const graphql$1=withDefaults$2(request,{headers:{"user-agent":`octokit-graphql.js/${VERSION$2} ${getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults$2(e,{method:"POST",url:"/graphql"})}async function auth(e){const t=3===e.split(/\./).length?"app":/^v\d+\./.test(e)?"installation":"oauth";return{type:"token",token:e,tokenType:t}}function withAuthorizationPrefix(e){return 3===e.split(/\./).length?"bearer "+e:"token "+e}async function hook(e,t,n,r){const i=t.endpoint.merge(n,r);return i.headers.authorization=withAuthorizationPrefix(e),t(i)}const createTokenAuth=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if("string"!=typeof e)throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})},VERSION$3="3.1.2";class Octokit{constructor(e={}){const t=new Collection,n={baseUrl:request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=[e.userAgent,`octokit-core.js/${VERSION$3} ${getUserAgent()}`].filter(Boolean).join(" "),e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=request.defaults(n),this.graphql=withCustomRequest(this.request).defaults({...n,baseUrl:n.baseUrl.replace(/\/api\/v3$/,"/api")}),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=t,e.authStrategy){const n=e.authStrategy(Object.assign({request:this.request},e.auth));t.wrap("request",n.hook),this.auth=n}else if(e.auth){const n=createTokenAuth(e.auth);t.wrap("request",n.hook),this.auth=n}else this.auth=async()=>({type:"unauthenticated"});this.constructor.plugins.forEach(t=>{Object.assign(this,t(this,e))})}static defaults(e){return class extends(this){constructor(...t){const n=t[0]||{};super("function"!=typeof e?Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null):e(n))}}}static plugin(...e){var t;const n=this.plugins;return(t=class extends(this){}).plugins=n.concat(e.filter(e=>!n.includes(e))),t}}Octokit.VERSION=VERSION$3,Octokit.plugins=[];const VERSION$4="1.0.0";function requestLog(e){e.hook.wrap("request",(t,n)=>{e.log.debug("request",n);const r=Date.now(),i=e.request.endpoint.parse(n),o=i.url.replace(n.baseUrl,"");return t(n).then(t=>(e.log.info(`${i.method} ${o} - ${t.status} in ${Date.now()-r}ms`),t)).catch(t=>{throw e.log.info(`${i.method} ${o} - ${t.status} in ${Date.now()-r}ms`),t})})}requestLog.VERSION=VERSION$4;const VERSION$5="2.3.0";function normalizePaginatedListResponse(e){if(!("total_count"in e.data&&!("url"in e.data)))return e;const t=e.data.incomplete_results,n=e.data.repository_selection,r=e.data.total_count;delete e.data.incomplete_results,delete e.data.repository_selection,delete e.data.total_count;const i=Object.keys(e.data)[0],o=e.data[i];return e.data=o,void 0!==t&&(e.data.incomplete_results=t),void 0!==n&&(e.data.repository_selection=n),e.data.total_count=r,e}function iterator(e,t,n){const r="function"==typeof t?t.endpoint(n):e.request.endpoint(t,n),i="function"==typeof t?t:e.request,o=r.method,a=r.headers;let s=r.url;return{[Symbol.asyncIterator]:()=>({next:()=>s?i({method:o,url:s,headers:a}).then(normalizePaginatedListResponse).then(e=>(s=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:e})):Promise.resolve({done:!0})})}}function paginate(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),gather(e,[],iterator(e,t,n)[Symbol.asyncIterator](),r)}function gather(e,t,n,r){return n.next().then(i=>{if(i.done)return t;let o=!1;return t=t.concat(r?r(i.value,(function(){o=!0})):i.value.data),o?t:gather(e,t,n,r)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=VERSION$5;const Endpoints={actions:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{mediaType:{previews:["machine-man"]}}],checkToken:["POST /applications/{client_id}/token"],createContentAttachment:["POST /content_references/{content_reference_id}/attachments",{mediaType:{previews:["corsair"]}}],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens",{mediaType:{previews:["machine-man"]}}],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}",{mediaType:{previews:["machine-man"]}}],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app",{mediaType:{previews:["machine-man"]}}],getBySlug:["GET /apps/{app_slug}",{mediaType:{previews:["machine-man"]}}],getInstallation:["GET /app/installations/{installation_id}",{mediaType:{previews:["machine-man"]}}],getOrgInstallation:["GET /orgs/{org}/installation",{mediaType:{previews:["machine-man"]}}],getRepoInstallation:["GET /repos/{owner}/{repo}/installation",{mediaType:{previews:["machine-man"]}}],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation",{mediaType:{previews:["machine-man"]}}],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories",{mediaType:{previews:["machine-man"]}}],listInstallations:["GET /app/installations",{mediaType:{previews:["machine-man"]}}],listInstallationsForAuthenticatedUser:["GET /user/installations",{mediaType:{previews:["machine-man"]}}],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories",{mediaType:{previews:["machine-man"]}}],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{mediaType:{previews:["machine-man"]}}],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs",{mediaType:{previews:["antiope"]}}],createSuite:["POST /repos/{owner}/{repo}/check-suites",{mediaType:{previews:["antiope"]}}],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}",{mediaType:{previews:["antiope"]}}],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}",{mediaType:{previews:["antiope"]}}],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",{mediaType:{previews:["antiope"]}}],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs",{mediaType:{previews:["antiope"]}}],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",{mediaType:{previews:["antiope"]}}],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites",{mediaType:{previews:["antiope"]}}],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest",{mediaType:{previews:["antiope"]}}],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences",{mediaType:{previews:["antiope"]}}],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}",{mediaType:{previews:["antiope"]}}]},codeScanning:{getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct",{mediaType:{previews:["scarlet-witch"]}}],getConductCode:["GET /codes_of_conduct/{key}",{mediaType:{previews:["scarlet-witch"]}}],getForRepo:["GET /repos/{owner}/{repo}/community/code_of_conduct",{mediaType:{previews:["scarlet-witch"]}}]},emojis:{get:["GET /emojis"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",{mediaType:{previews:["mockingbird"]}}],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import"],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors"],getImportStatus:["GET /repos/{owner}/{repo}/import"],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],listForAuthenticatedUser:["GET /user/migrations",{mediaType:{previews:["wyandotte"]}}],listForOrg:["GET /orgs/{org}/migrations",{mediaType:{previews:["wyandotte"]}}],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs"],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],updateImport:["PATCH /repos/{owner}/{repo}/import"]},orgs:{blockUser:["PUT /orgs/{org}/blocks/{username}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createInvitation:["POST /orgs/{org}/invitations"],createWebhook:["POST /orgs/{org}/hooks"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],get:["GET /orgs/{org}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations",{mediaType:{previews:["machine-man"]}}],listBlockedUsers:["GET /orgs/{org}/blocks"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],createCard:["POST /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],createColumn:["POST /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],createForAuthenticatedUser:["POST /user/projects",{mediaType:{previews:["inertia"]}}],createForOrg:["POST /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],createForRepo:["POST /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],delete:["DELETE /projects/{project_id}",{mediaType:{previews:["inertia"]}}],deleteCard:["DELETE /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],deleteColumn:["DELETE /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],get:["GET /projects/{project_id}",{mediaType:{previews:["inertia"]}}],getCard:["GET /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],getColumn:["GET /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission",{mediaType:{previews:["inertia"]}}],listCards:["GET /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],listCollaborators:["GET /projects/{project_id}/collaborators",{mediaType:{previews:["inertia"]}}],listColumns:["GET /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],listForOrg:["GET /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],listForRepo:["GET /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],listForUser:["GET /users/{username}/projects",{mediaType:{previews:["inertia"]}}],moveCard:["POST /projects/columns/cards/{card_id}/moves",{mediaType:{previews:["inertia"]}}],moveColumn:["POST /projects/columns/{column_id}/moves",{mediaType:{previews:["inertia"]}}],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],update:["PATCH /projects/{project_id}",{mediaType:{previews:["inertia"]}}],updateCard:["PATCH /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],updateColumn:["PATCH /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch",{mediaType:{previews:["lydian"]}}],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteLegacy:["DELETE /reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}},{deprecated:"octokit.reactions.deleteLegacy() is deprecated, see https://developer.github.com/v3/reactions/#delete-a-reaction-legacy"}],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createPagesSite:["POST /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],createRelease:["POST /repos/{owner}/{repo}/releases"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate",{mediaType:{previews:["baptiste"]}}],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],downloadArchive:["GET /repos/{owner}/{repo}/{archive_format}/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile",{mediaType:{previews:["black-panther"]}}],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head",{mediaType:{previews:["groot"]}}],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",{mediaType:{previews:["groot"]}}],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits",{mediaType:{previews:["cloak"]}}],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics",{mediaType:{previews:["mercy"]}}],users:["GET /search/users"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects",{mediaType:{previews:["inertia"]}}],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys"],deleteEmailForAuthenticated:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}},VERSION$6="4.1.2";function endpointsToMethods(e,t){const n={};for(const[r,i]of Object.entries(t))for(const[t,o]of Object.entries(i)){const[i,a,s]=o,[l,c]=i.split(/ /),u=Object.assign({method:l,url:c},a);n[r]||(n[r]={});const h=n[r];s?h[t]=decorate(e,r,t,u,s):h[t]=e.request.defaults(u)}return n}function decorate(e,t,n,r,i){const o=e.request.defaults(r);return Object.assign((function(...r){let a=o.endpoint.merge(...r);if(i.mapToData)return a=Object.assign({},a,{data:a[i.mapToData],[i.mapToData]:void 0}),o(a);if(i.renamed){const[r,o]=i.renamed;e.log.warn(`octokit.${t}.${n}() has been renamed to octokit.${r}.${o}()`)}if(i.deprecated&&e.log.warn(i.deprecated),i.renamedParameters){const a=o.endpoint.merge(...r);for(const[r,o]of Object.entries(i.renamedParameters))r in a&&(e.log.warn(`"${r}" parameter is deprecated for "octokit.${t}.${n}()". Use "${o}" instead`),o in a||(a[o]=a[r]),delete a[r]);return o(a)}return o(...r)}),o)}function restEndpointMethods(e){return endpointsToMethods(e,Endpoints)}restEndpointMethods.VERSION=VERSION$6;const VERSION$7="18.0.3",Octokit$1=Octokit.plugin(requestLog,restEndpointMethods,paginateRest).defaults({userAgent:"octokit-rest.js/"+VERSION$7}),authContext=react_14();function ProvideAuth(e){const t=useProvideAuth();return react.createElement(authContext.Provider,{value:t},e.children)}const useAuth=()=>react_8(authContext);function storeCredential(e,t){localStorage.setItem(e+"_key",t)}function loadCredential(e){return localStorage.getItem(e+"_key")}function useProvideAuth(){const[e,t]=react_6(null),[n,r]=react_6(null),[i,o]=react_6(!1);var a=new index_cjs$3.auth.GithubAuthProvider;function s(){t(null),r(null),localStorage.clear()}a.addScope("gist");const l=async()=>index_cjs$3.auth().signOut().then(()=>{logEvent$1("sign_out"),s(),location.reload()});async function c(e,n=!1){let i=loadCredential(e.uid);if(r(e.uid),i){const r=new Octokit$1({auth:i}),{data:o}=await r.request("/user");if(o.id)return n&&index_cjs$3.database().ref().child("users/"+e.uid+"/profile").set({login:o.login,id:o.id,name:o.name,avatar_url:o.avatar_url}),t({user:e,octokit:r,gh:o}),e}return l(),null}return react_5(()=>{const e=index_cjs$3.auth().onAuthStateChanged(e=>{e?c(e):s()});return()=>e()},[]),{uid:n,data:e,signin:async()=>(o(!0),index_cjs$3.auth().signInWithPopup(a).then(e=>{e.credential&&storeCredential(e.user.uid,e.credential.accessToken),logEvent$1("sign_in");const t=c(e.user,!0);return t.then(()=>o(!1)),t}).catch(e=>{logEvent$1("cancel_signin"),o(!1),logException(e)})),signout:l,loading:i}}let isResizing=!1;function ResizeableSidebar(e){const[t,n]=react_6(e.size),r=react_11((function(e){if(!isResizing)return;let t=e.clientX-document.body.offsetLeft;n(t>150?t:0)}),[]),i=react_11((function(e){if(!isResizing)return;isResizing=!1,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)}),[]);return react_5(()=>{t!=e.size&&e.onResize(t)},[t]),react.createElement("div",{className:"sidebar-container"},react.createElement("div",{className:"sidebar-dragger "+(isResizing?"active":""),onMouseDown:function(e){e.stopPropagation(),e.preventDefault(),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i),isResizing=!0},style:{left:e.size}}),e.children)}function Avatar(e){const[t,n]=react_6(),r=useAuth();return react_5(()=>{e.userId&&r.uid&&index_cjs$3.database().ref().child(`users/${e.userId}/profile`).once("value",(function(e){n(e.toJSON())}))},[e.userId]),t?react.createElement("img",{className:"avatar avatar-small "+e.className,alt:t.login,title:t.login,"aria-label":t.login,src:t.avatar_url+"&s=40",width:"20",height:"20",onClick:e.onClick}):react.createElement("img",{className:"avatar",height:"20",width:"20",title:"anonymous",alt:"anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",onClick:e.onClick})}function UserList(e){const t=useAuth(),[n,r]=react_6({});return react_5(()=>{if(e.documentRef){r({});const t=e.documentRef.child("users");return t.on("value",e=>{r(e.toJSON())}),()=>{t.off()}}},[e.documentRef]),react.createElement("div",{className:"AvatarStack AvatarStack--three-plus AvatarStack--right d-inline-block flex-self-center"},react.createElement("div",{className:"AvatarStack-body"},Object.keys(n||{}).map(e=>t.uid!=e&&react.createElement(Avatar,{userId:e,className:"tooltipped tooltipped-sw tooltipped-align-right-1",key:e}))))}function UserMenu(){const e=useAuth();return e.data?react.createElement(react.Fragment,null,react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn btn-invisible user-name",style:{color:"#000"}},react.createElement("span",{className:"mr-2"},e.data.user.displayName),react.createElement("img",{className:"avatar avatar-small",alt:e.data.user.displayName,src:e.data.user.photoURL+"&s=40",width:"20",height:"20","aria-label":e.data.user.displayName}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:"#/list",onClick:()=>{navigateTo("/list")}},react.createElement("span",null,"My notebooks"))),react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:document.location.toString(),onClick:()=>{e.signout().then(()=>closeMenu()).catch(()=>closeMenu())}},react.createElement("span",null,"Sign out")))))):react.createElement(react.Fragment,null,react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn btn-invisible user-name",style:{color:"#000"}},react.createElement("span",{className:"mr-2"},"Anonymous"),react.createElement("img",{className:"avatar avatar-small",alt:"Anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",width:"20",height:"20","aria-label":"Sign in"}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:document.location.toString(),onClick:()=>{e.signin().then(()=>closeMenu()).catch(()=>closeMenu())}},react.createElement(MarkGithubIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Sign in"))))))}class ErrorBoundary extends react.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error(e),console.log(t)}render(){return this.state.hasError?react.createElement("h1",null,"Something went wrong."):this.props.children}}marked.setOptions({sanitize:!0});var escapeReplacements={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function unescape(e){return e.replace(/&(amp|lt|gt|quot|#39);/g,(function(e,t){return escapeReplacements[t]}))}function Code(e){const t=react_7(null);return react_5(()=>{t.current&&e.language&&monaco.editor.colorizeElement(t.current,{tabSize:2})},[t,e.code,e.language]),react.createElement("pre",{ref:t,"data-lang":e.language},unescape(e.code))}function defaultExpandedSize(){return.3*window.innerWidth}function Dot(e){const[t,n]=react_6("Loading..."),[r,i]=react_6();return react_5(()=>{graphviz.dot(e.code,"svg",{wasmFolder:"wasm"}).then(e=>{i(""),n(e)}).catch(e=>{i(e.message)})},[e.code]),react.createElement(react.Fragment,null,r&&react.createElement("pre",null,r),react.createElement(DownloadSvg,{dangerouslySetInnerHTML:{__html:t}}))}function render$1(e,t=0){if("type"in e){if("heading"!==e.type){if("code"===e.type)return"sequence"==e.lang?react.createElement(SequenceDiagram,{key:t,input:unescape(e.text)||""}):"dot"==e.lang?react.createElement(Dot,{key:t,code:unescape(e.text)||""}):react.createElement(Code,{key:t,language:e.lang||"",code:unescape(e.text)});if("paragraph"===e.type)return"tokens"in e?react.createElement("p",{key:t},e.tokens.map(render$1)):react.createElement("p",{key:t},unescape(e.text));if("blockquote"===e.type)return"tokens"in e?react.createElement("blockquote",{key:t},e.tokens.map(render$1)):react.createElement("blockquote",{key:t},unescape(e.text));if("em"===e.type)return"tokens"in e?react.createElement("em",{key:t},e.tokens.map(render$1)):react.createElement("em",{key:t},unescape(e.text));if("strong"===e.type)return"tokens"in e?react.createElement("b",{key:t},e.tokens.map(render$1)):react.createElement("b",{key:t},unescape(e.text));if("html"===e.type)return react.createElement("span",{key:t},JSON.stringify(e.raw,null,2));if("text"===e.type)return"tokens"in e?react.createElement("span",{key:t},e.tokens.map(render$1)):react.createElement("span",{key:t},unescape(e.text));if("codespan"===e.type)return react.createElement("code",{key:t},unescape(e.text));if("link"===e.type)return react.createElement("span",{key:t},unescape(e.text));if("space"===e.type)return react.createElement("div",{key:t});if("escape"===e.type)return react.createElement("span",{key:t},unescape(e.text));if("hr"===e.type)return react.createElement("hr",{key:t});if("list_item"===e.type)return"tokens"in e?react.createElement("li",{key:t},e.tokens.map(render$1)):react.createElement("li",{key:t},unescape(e.text));if("list"===e.type){const n=e;return n.ordered?react.createElement("ol",{key:t,start:n.start},n.items.map(render$1)):react.createElement("ul",{key:t},n.items.map(render$1))}return react.createElement("span",{key:t,style:{color:"red!important"}},e.raw)}switch(e.depth){case 1:return react.createElement("h1",{key:t},unescape(e.text));case 2:return react.createElement("h2",{key:t},unescape(e.text));case 3:return react.createElement("h3",{key:t},unescape(e.text));case 4:return react.createElement("h4",{key:t},unescape(e.text));case 5:return react.createElement("h5",{key:t},unescape(e.text));default:return react.createElement("h6",{key:t},unescape(e.text))}}return react.createElement("code",{key:t,style:{color:"orange!important"}},JSON.stringify(e,null,2))}function Editor$1(e){const t=react_7(),[n,r]=react_6(null),[i,o]=react_6(!1),[a,s]=react_6(!1),[l,c]=react_6(null),[u,h]=react_6([]),p=useRouteMatch(),f=useLocation(),d=useAuth(),m="notepadId"in p.params,g=e.readonly||m,[y,v]=react_6(e.readonly?0:defaultExpandedSize()),[_,b]=react_6(),[,w]=react_6(!1),[E,T]=react_6(null),[k,S]=react_6(null);let x=null;react_5(()=>{const e=new URLSearchParams(f.search);b(e.get("t")||""),e.has("open")&&v(defaultExpandedSize())},[f.search]);const C=g?"vs-disabled":"vs";function P(){let e=index_cjs$3.auth().currentUser&&index_cjs$3.auth().currentUser.uid||"anonymous";o(!0);const n=newNotebook(e),r=t.current.getValue();new Firepad.Headless(n).setText(r,(function(t,r){o(!1),r&&(logEvent$1("make_copy"),v(defaultExpandedSize()),navigateTo(`/notebook/${e}/${n.key}`))}))}react_5(()=>{if("notebook"in p.params&&p.params.notebook){const e=openByHash(p.params.user,p.params.notebook);r(e)}else r(null)},[p.url]),react_5(()=>{if(t.current)if(monaco.editor.defineTheme("vs-disabled",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#eeeeee"}}),monaco.editor.setTheme(C),t.current.render(),x=null,l&&(l.dispose(),t.current.setValue("")),n){t.current.setValue("");let e={defaultText:DEFAULT_EXAMPLE};d.uid&&(e.userId=d.uid),c(Firepad.fromMonaco(n,t.current,e))}else g&&_&&(c(null),t.current.setValue(_||""))},[t.current,n,_,g]),react_5(()=>{l&&l.on("synced",(function(e){s(!e)}))},[l]),react_5(()=>{l&&d.uid&&l.setUserId(d.uid)},[d.data]),react_5(()=>{t.current&&t.current.layout()},[y]);let A=!1;for(let e of u)if("type"in e&&"heading"==e.type){document.title=e.text+" - Diagrams",x=e.text,A=!0;break}A||(document.title="Untitled document - Diagrams");const I=u.map(render$1);return react_5(()=>{n?(n.child("meta").once("value",(function(e){S(e||null)})),x&&n.child("meta/title").set(x,e=>{e&&console.log("err, cant set meta")})):S(null)},[n,x]),react_5(()=>{k&&index_cjs$3.database().ref().child(`users/${k.child("uid").val()}/profile`).once("value",(function(e){T(e.toJSON())}))},[k]),react.createElement("div",{className:0==y?"fullscreen":""},react.createElement(ResizeableSidebar,{size:y,onResize:e=>v(e)},react.createElement("div",{className:"tools d-flex flex-justify-between",style:{width:y}},react.createElement("div",{className:"p-2 d-flex"},_?react.createElement("div",{className:"flex-self-center ml-2"},react.createElement("span",{className:"css-truncate css-truncate-overflow"},x)):E?react.createElement(react.Fragment,null,react.createElement("img",{className:"avatar avatar-small m-2",alt:E.login,src:E.avatar_url+"&s=40",width:"20",height:"20","aria-label":E.login}),react.createElement("div",{className:"flex-self-center"},react.createElement("span",{style:{fontFamily:monospaceFont}},E.login)," / ",react.createElement("span",{className:"css-truncate css-truncate-overflow"},x))):react.createElement(react.Fragment,null,react.createElement("img",{className:"avatar avatar-small m-2",alt:"anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",width:"20",height:"20","aria-label":"Sign in"}),react.createElement("div",{className:"flex-self-center"},react.createElement("span",{style:{fontFamily:monospaceFont,fontWeight:"bold"}},"anonymous")," / ",react.createElement("span",{className:"css-truncate css-truncate-overflow"},x)))),react.createElement("div",{className:"p-2"},react.createElement((function(){return d.uid?react.createElement("button",{className:"btn tooltipped tooltipped-se mr-2","aria-label":"Makes a copy",onClick:P,"aria-disabled":!d.uid},react.createElement(RepoForkedIcon,{size:16}),react.createElement("span",null,"Make a copy",i&&react.createElement("span",{className:"AnimatedEllipsis"}))):react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn"},react.createElement(RepoForkedIcon,{size:16}),"Make a copy",i&&react.createElement("span",{className:"AnimatedEllipsis"}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-se",style:{width:300}},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:async()=>{o(!0),await d.signin(),P()},href:document.location.toString()},react.createElement(MarkGithubIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Sign-in with GitHub"))),react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:async()=>{o(!0),P()},href:document.location.toString()},react.createElement("span",null,"Continue anonymously")))))}),null))),react.createElement("div",{className:"editor",style:{width:y}},g&&react.createElement("div",{className:"readonly-notice",style:{borderBottom:"1px solid #dbdbda"}},react.createElement("div",{className:"Toast Toast--warning",style:{maxWidth:1e3,width:"auto"}},react.createElement("span",{className:"Toast-icon"},react.createElement(AlertIcon,{size:16})),react.createElement("span",{className:"Toast-content"},"This is a read-only page. Make a copy to edit the document."))),react.createElement(ErrorBoundary,null,react.createElement(Monaco,{theme:C,language:"markdown",loading:react.createElement("div",null,"Loading editor..."),value:"",editorDidMount:function(e,n){t.current=n,w(!0),t.current.onDidChangeModelContent(e=>{const n=parseMD(t.current.getValue());h(n)})},options:{fontFamily:monospaceFont,lineNumbers:"on",minimap:{enabled:!1},automaticLayout:!0}})))),react.createElement("div",{className:"content",style:{left:y+5}},react.createElement("div",{className:"top-bar content-bar d-flex flex-justify-between"},react.createElement("div",{className:"p-2"},react.createElement("button",{className:"btn btn-octicon tooltipped tooltipped-se mr-2","aria-label":"Show or hide the code editor.",onClick:()=>{v(0==y?defaultExpandedSize():0)}},react.createElement(UseAnimations,{reverse:0==y,animation:skipBack$3,size:24,strokeColor:"#586069"})),a&&react.createElement("span",{className:"m-1"},react.createElement("span",null,"Saving"),react.createElement("span",{className:"AnimatedEllipsis"}))),react.createElement("div",{className:"p-2 d-flex"},react.createElement(UserList,{documentRef:n}),react.createElement(DropdownShare,{label:"Share",className:"btn-invisible"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:function(){copyTextToClipboard(generateStaticLink(t.current.getValue())).then(()=>{t.current.focus(),logEvent$1("share_ro"),closeMenu()})},href:document.location.toString()},react.createElement(ShareAndroidIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Copy read-only link"))),g||react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:function(){copyTextToClipboard(document.location.toString()).then(()=>{t.current.focus(),logEvent$1("share_editable"),closeMenu()})},href:document.location.toString()},react.createElement(LinkIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Share editable link")))),react.createElement(UserMenu,null))),react.createElement("div",{className:"scroll"},react.createElement("div",{className:"markdown-body"},I))))}function ListNotebooks(e){return react.createElement("div",{className:"Box"},Object.keys(e.data).map(t=>react.createElement("div",{key:t,className:"Box-row d-flex flex-items-center"},react.createElement("div",{className:"flex-auto"},react.createElement("strong",null,react.createElement(Link,{to:`/notebook/${e.data[t].meta.uid}/${t}`},e.data[t].meta.title))),react.createElement("button",{type:"button",className:"btn btn-primary",name:"button",onClick:()=>{navigateTo(`/notebook/${e.data[t].meta.uid}/${t}`)}},"Open"))))}function List(){const e=useAuth(),[t,n]=react_6(null);return document.title="My notebooks - Sequence diagrams",react_5(()=>{e.uid&&index_cjs$3.database().ref("users/"+e.uid+"/notebooks").once("value",e=>{n(e.toJSON())})},[e.uid]),e.uid?react.createElement("div",{className:"content p-responsive",style:{left:0}},react.createElement("div",{className:"top-bar content-bar d-flex flex-justify-between"},react.createElement("div",{className:"p-2 d-flex"},react.createElement("span",{className:"flex-self-center"},"My notebooks")),react.createElement("div",{className:"p-2 d-flex"},react.createElement(UserMenu,null))),react.createElement("div",{className:"scroll p-4"},react.createElement("div",{className:"Subhead pt-4"},react.createElement("div",{className:"Subhead-heading"},"My notebooks"),react.createElement("div",{className:"Subhead-actions"},react.createElement("a",{href:"#url",className:"btn btn-sm btn-primary",role:"button"},"New notebook")),react.createElement("div",{className:"Subhead-description"},"Here are the notebooks of your own.")),t?react.createElement(ListNotebooks,{data:t}):react.createElement("span",{className:"m-1"},react.createElement("span",null,"Loading"),react.createElement("span",{className:"AnimatedEllipsis"})))):react.createElement("div",{className:"p-11"},"Please sign in to see this page. ",react.createElement(UserMenu,null))}function Index(){return useAuth().uid?react.createElement(Redirect,{to:"/list"}):react.createElement(Redirect,{to:generateStaticLinkFragment(DEFAULT_EXAMPLE)+"&open=true"})}function RedirectOldModel(){const e=useRouteMatch();return react.createElement(Redirect,{to:"/notebook/anonymous/"+e.params.notepadId})}function App(){return react.createElement(react.Fragment,null,react.createElement(ProvideAuth,null,react.createElement(Router,{history:history},react.createElement(Switch,null,react.createElement(Route,{exact:!0,path:"/notebook/:user/:notebook"},react.createElement(Editor$1,{newModel:!0})),react.createElement(Route,{exact:!0,path:"/editor/:notepadId"},react.createElement(RedirectOldModel,null)),react.createElement(Route,{exact:!0,path:"/static"},react.createElement(Editor$1,{readonly:!0})),react.createElement(Route,{path:"/list"},react.createElement(List,null)),react.createElement(Route,{path:"/"},react.createElement(Index,null))))))}async function initUI(e){const t=document.getElementById("loading-placeholder");t&&t.remove(),reactDom.render(react.createElement(App,null),e)}async function addFirepad(){await injectScript("firepad/firepad.min.js"),await injectCss("firepad/firepad.css")}async function main(){await addFirebase(),await addFirepad(),await initializeDiagrams(),initUI(document.getElementById("app"))}main().catch(e=>{console.error(e)})}(); +function isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function isPlainObject(e){var t,n;return!1!==isObject(e)&&(void 0===(t=e.constructor)||!1!==isObject(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf"))}function lowercaseKeys(e){return e?Object.keys(e).reduce((t,n)=>(t[n.toLowerCase()]=e[n],t),{}):{}}function mergeDeep(e,t){const n=Object.assign({},e);return Object.keys(t).forEach(r=>{isPlainObject(t[r])?r in e?n[r]=mergeDeep(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})}),n}function merge(e,t,n){if("string"==typeof t){let[e,r]=t.split(" ");n=Object.assign(r?{method:e,url:r}:{url:e},n)}else n=Object.assign({},t);n.headers=lowercaseKeys(n.headers);const r=mergeDeep(e||{},n);return e&&e.mediaType.previews.length&&(r.mediaType.previews=e.mediaType.previews.filter(e=>!r.mediaType.previews.includes(e)).concat(r.mediaType.previews)),r.mediaType.previews=r.mediaType.previews.map(e=>e.replace(/-preview/,"")),r}function addQueryParameters(e,t){const n=/\?/.test(e)?"&":"?",r=Object.keys(t);return 0===r.length?e:e+n+r.map(e=>"q"===e?"q="+t.q.split("+").map(encodeURIComponent).join("+"):`${e}=${encodeURIComponent(t[e])}`).join("&")}beforeAfterHook.Hook=Hook_1,beforeAfterHook.Singular=Singular,beforeAfterHook.Collection=Collection;const urlVariableRegex=/\{[^}]+\}/g;function removeNonChars(e){return e.replace(/^\W+|\W+$/g,"").split(/,/)}function extractUrlVariableNames(e){const t=e.match(urlVariableRegex);return t?t.map(removeNonChars).reduce((e,t)=>e.concat(t),[]):[]}function omit(e,t){return Object.keys(e).filter(e=>!t.includes(e)).reduce((t,n)=>(t[n]=e[n],t),{})}function encodeReserved(e){return e.split(/(%[0-9A-Fa-f]{2})/g).map((function(e){return/%[0-9A-Fa-f]/.test(e)||(e=encodeURI(e).replace(/%5B/g,"[").replace(/%5D/g,"]")),e})).join("")}function encodeUnreserved(e){return encodeURIComponent(e).replace(/[!'()*]/g,(function(e){return"%"+e.charCodeAt(0).toString(16).toUpperCase()}))}function encodeValue(e,t,n){return t="+"===e||"#"===e?encodeReserved(t):encodeUnreserved(t),n?encodeUnreserved(n)+"="+t:t}function isDefined(e){return null!=e}function isKeyOperator(e){return";"===e||"&"===e||"?"===e}function getValues(e,t,n,r){var i=e[n],o=[];if(isDefined(i)&&""!==i)if("string"==typeof i||"number"==typeof i||"boolean"==typeof i)i=i.toString(),r&&"*"!==r&&(i=i.substring(0,parseInt(r,10))),o.push(encodeValue(t,i,isKeyOperator(t)?n:""));else if("*"===r)Array.isArray(i)?i.filter(isDefined).forEach((function(e){o.push(encodeValue(t,e,isKeyOperator(t)?n:""))})):Object.keys(i).forEach((function(e){isDefined(i[e])&&o.push(encodeValue(t,i[e],e))}));else{const e=[];Array.isArray(i)?i.filter(isDefined).forEach((function(n){e.push(encodeValue(t,n))})):Object.keys(i).forEach((function(n){isDefined(i[n])&&(e.push(encodeUnreserved(n)),e.push(encodeValue(t,i[n].toString())))})),isKeyOperator(t)?o.push(encodeUnreserved(n)+"="+e.join(",")):0!==e.length&&o.push(e.join(","))}else";"===t?isDefined(i)&&o.push(encodeUnreserved(n)):""!==i||"&"!==t&&"?"!==t?""===i&&o.push(""):o.push(encodeUnreserved(n)+"=");return o}function parseUrl(e){return{expand:expand.bind(null,e)}}function expand(e,t){var n=["+","#",".","/",";","?","&"];return e.replace(/\{([^\{\}]+)\}|([^\{\}]+)/g,(function(e,r,i){if(r){let e="";const i=[];if(-1!==n.indexOf(r.charAt(0))&&(e=r.charAt(0),r=r.substr(1)),r.split(/,/g).forEach((function(n){var r=/([^:\*]*)(?::(\d+)|(\*))?/.exec(n);i.push(getValues(t,e,r[1],r[2]||r[3]))})),e&&"+"!==e){var o=",";return"?"===e?o="&":"#"!==e&&(o=e),(0!==i.length?e:"")+i.join(o)}return i.join(",")}return encodeReserved(i)}))}function parse$1(e){let t,n=e.method.toUpperCase(),r=(e.url||"/").replace(/:([a-z]\w+)/g,"{+$1}"),i=Object.assign({},e.headers),o=omit(e,["method","baseUrl","url","headers","request","mediaType"]);const a=extractUrlVariableNames(r);r=parseUrl(r).expand(o),/^http/.test(r)||(r=e.baseUrl+r);const s=omit(o,Object.keys(e).filter(e=>a.includes(e)).concat("baseUrl"));if(!/application\/octet-stream/i.test(i.accept)&&(e.mediaType.format&&(i.accept=i.accept.split(/,/).map(t=>t.replace(/application\/vnd(\.\w+)(\.v3)?(\.\w+)?(\+json)?$/,"application/vnd$1$2."+e.mediaType.format)).join(",")),e.mediaType.previews.length)){const t=i.accept.match(/[\w-]+(?=-preview)/g)||[];i.accept=t.concat(e.mediaType.previews).map(t=>`application/vnd.github.${t}-preview${e.mediaType.format?"."+e.mediaType.format:"+json"}`).join(",")}return["GET","HEAD"].includes(n)?r=addQueryParameters(r,s):"data"in s?t=s.data:Object.keys(s).length?t=s:i["content-length"]=0,i["content-type"]||void 0===t||(i["content-type"]="application/json; charset=utf-8"),["PATCH","PUT"].includes(n)&&void 0===t&&(t=""),Object.assign({method:n,url:r,headers:i},void 0!==t?{body:t}:null,e.request?{request:e.request}:null)}function endpointWithDefaults(e,t,n){return parse$1(merge(e,t,n))}function withDefaults(e,t){const n=merge(e,t),r=endpointWithDefaults.bind(null,n);return Object.assign(r,{DEFAULTS:n,defaults:withDefaults.bind(null,n),merge:merge.bind(null,n),parse:parse$1})}const VERSION="6.0.5",userAgent=`octokit-endpoint.js/${VERSION} ${getUserAgent()}`,DEFAULTS={method:"GET",baseUrl:"https://api.github.com",headers:{accept:"application/vnd.github.v3+json","user-agent":userAgent},mediaType:{format:"",previews:[]}},endpoint=withDefaults(null,DEFAULTS);var browser$2=createCommonjsModule((function(e,t){var n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==n)return n;throw new Error("unable to locate global object")}();e.exports=t=n.fetch,t.default=n.fetch.bind(n),t.Headers=n.Headers,t.Request=n.Request,t.Response=n.Response})),browser_1=browser$2.Headers,browser_2=browser$2.Request,browser_3=browser$2.Response;class Deprecation extends Error{constructor(e){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="Deprecation"}}var wrappy_1=wrappy;function wrappy(e,t){if(e&&t)return wrappy(e)(t);if("function"!=typeof e)throw new TypeError("need wrapper function");return Object.keys(e).forEach((function(t){n[t]=e[t]})),n;function n(){for(var t=new Array(arguments.length),n=0;nconsole.warn(e));class RequestError extends Error{constructor(e,t,n){super(e),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor),this.name="HttpError",this.status=t,Object.defineProperty(this,"code",{get:()=>(logOnce(new Deprecation("[@octokit/request-error] `error.code` is deprecated, use `error.status`.")),t)}),this.headers=n.headers||{};const r=Object.assign({},n.request);n.request.headers.authorization&&(r.headers=Object.assign({},n.request.headers,{authorization:n.request.headers.authorization.replace(/ .*$/," [REDACTED]")})),r.url=r.url.replace(/\bclient_secret=\w+/g,"client_secret=[REDACTED]").replace(/\baccess_token=\w+/g,"access_token=[REDACTED]"),this.request=r}}const VERSION$1="5.4.7";function getBufferResponse(e){return e.arrayBuffer()}function fetchWrapper(e){(isPlainObject(e.body)||Array.isArray(e.body))&&(e.body=JSON.stringify(e.body));let t,n,r={};return(e.request&&e.request.fetch||browser$2)(e.url,Object.assign({method:e.method,body:e.body,headers:e.headers,redirect:e.redirect},e.request)).then(i=>{n=i.url,t=i.status;for(const e of i.headers)r[e[0]]=e[1];if(204===t||205===t)return;if("HEAD"===e.method){if(t<400)return;throw new RequestError(i.statusText,t,{headers:r,request:e})}if(304===t)throw new RequestError("Not modified",t,{headers:r,request:e});if(t>=400)return i.text().then(n=>{const i=new RequestError(n,t,{headers:r,request:e});try{let e=JSON.parse(i.message);Object.assign(i,e);let t=e.errors;i.message=i.message+": "+t.map(JSON.stringify).join(", ")}catch(e){}throw i});const o=i.headers.get("content-type");return/application\/json/.test(o)?i.json():!o||/^text\/|charset=utf-8$/.test(o)?i.text():getBufferResponse(i)}).then(e=>({status:t,url:n,headers:r,data:e})).catch(t=>{if(t instanceof RequestError)throw t;throw new RequestError(t.message,500,{headers:r,request:e})})}function withDefaults$1(e,t){const n=e.defaults(t);return Object.assign((function(e,t){const r=n.merge(e,t);if(!r.request||!r.request.hook)return fetchWrapper(n.parse(r));const i=(e,t)=>fetchWrapper(n.parse(n.merge(e,t)));return Object.assign(i,{endpoint:n,defaults:withDefaults$1.bind(null,n)}),r.request.hook(i,r)}),{endpoint:n,defaults:withDefaults$1.bind(null,n)})}const request=withDefaults$1(endpoint,{headers:{"user-agent":`octokit-request.js/${VERSION$1} ${getUserAgent()}`}}),VERSION$2="4.5.4";class GraphqlError extends Error{constructor(e,t){super(t.data.errors[0].message),Object.assign(this,t.data),Object.assign(this,{headers:t.headers}),this.name="GraphqlError",this.request=e,Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}}const NON_VARIABLE_OPTIONS=["method","baseUrl","url","headers","request","query","mediaType"];function graphql(e,t,n){n=n="string"==typeof t?Object.assign({query:t},n):t;const r=Object.keys(n).reduce((e,t)=>NON_VARIABLE_OPTIONS.includes(t)?(e[t]=n[t],e):(e.variables||(e.variables={}),e.variables[t]=n[t],e),{});return e(r).then(e=>{if(e.data.errors){const t={};for(const n of Object.keys(e.headers))t[n]=e.headers[n];throw new GraphqlError(r,{headers:t,data:e.data})}return e.data.data})}function withDefaults$2(e,t){const n=e.defaults(t);return Object.assign((e,t)=>graphql(n,e,t),{defaults:withDefaults$2.bind(null,n),endpoint:request.endpoint})}const graphql$1=withDefaults$2(request,{headers:{"user-agent":`octokit-graphql.js/${VERSION$2} ${getUserAgent()}`},method:"POST",url:"/graphql"});function withCustomRequest(e){return withDefaults$2(e,{method:"POST",url:"/graphql"})}async function auth(e){const t=3===e.split(/\./).length?"app":/^v\d+\./.test(e)?"installation":"oauth";return{type:"token",token:e,tokenType:t}}function withAuthorizationPrefix(e){return 3===e.split(/\./).length?"bearer "+e:"token "+e}async function hook(e,t,n,r){const i=t.endpoint.merge(n,r);return i.headers.authorization=withAuthorizationPrefix(e),t(i)}const createTokenAuth=function(e){if(!e)throw new Error("[@octokit/auth-token] No token passed to createTokenAuth");if("string"!=typeof e)throw new Error("[@octokit/auth-token] Token passed to createTokenAuth is not a string");return e=e.replace(/^(token|bearer) +/i,""),Object.assign(auth.bind(null,e),{hook:hook.bind(null,e)})},VERSION$3="3.1.2";class Octokit{constructor(e={}){const t=new Collection,n={baseUrl:request.endpoint.DEFAULTS.baseUrl,headers:{},request:Object.assign({},e.request,{hook:t.bind(null,"request")}),mediaType:{previews:[],format:""}};if(n.headers["user-agent"]=[e.userAgent,`octokit-core.js/${VERSION$3} ${getUserAgent()}`].filter(Boolean).join(" "),e.baseUrl&&(n.baseUrl=e.baseUrl),e.previews&&(n.mediaType.previews=e.previews),e.timeZone&&(n.headers["time-zone"]=e.timeZone),this.request=request.defaults(n),this.graphql=withCustomRequest(this.request).defaults({...n,baseUrl:n.baseUrl.replace(/\/api\/v3$/,"/api")}),this.log=Object.assign({debug:()=>{},info:()=>{},warn:console.warn.bind(console),error:console.error.bind(console)},e.log),this.hook=t,e.authStrategy){const n=e.authStrategy(Object.assign({request:this.request},e.auth));t.wrap("request",n.hook),this.auth=n}else if(e.auth){const n=createTokenAuth(e.auth);t.wrap("request",n.hook),this.auth=n}else this.auth=async()=>({type:"unauthenticated"});this.constructor.plugins.forEach(t=>{Object.assign(this,t(this,e))})}static defaults(e){return class extends(this){constructor(...t){const n=t[0]||{};super("function"!=typeof e?Object.assign({},e,n,n.userAgent&&e.userAgent?{userAgent:`${n.userAgent} ${e.userAgent}`}:null):e(n))}}}static plugin(...e){var t;const n=this.plugins;return(t=class extends(this){}).plugins=n.concat(e.filter(e=>!n.includes(e))),t}}Octokit.VERSION=VERSION$3,Octokit.plugins=[];const VERSION$4="1.0.0";function requestLog(e){e.hook.wrap("request",(t,n)=>{e.log.debug("request",n);const r=Date.now(),i=e.request.endpoint.parse(n),o=i.url.replace(n.baseUrl,"");return t(n).then(t=>(e.log.info(`${i.method} ${o} - ${t.status} in ${Date.now()-r}ms`),t)).catch(t=>{throw e.log.info(`${i.method} ${o} - ${t.status} in ${Date.now()-r}ms`),t})})}requestLog.VERSION=VERSION$4;const VERSION$5="2.3.0";function normalizePaginatedListResponse(e){if(!("total_count"in e.data&&!("url"in e.data)))return e;const t=e.data.incomplete_results,n=e.data.repository_selection,r=e.data.total_count;delete e.data.incomplete_results,delete e.data.repository_selection,delete e.data.total_count;const i=Object.keys(e.data)[0],o=e.data[i];return e.data=o,void 0!==t&&(e.data.incomplete_results=t),void 0!==n&&(e.data.repository_selection=n),e.data.total_count=r,e}function iterator(e,t,n){const r="function"==typeof t?t.endpoint(n):e.request.endpoint(t,n),i="function"==typeof t?t:e.request,o=r.method,a=r.headers;let s=r.url;return{[Symbol.asyncIterator]:()=>({next:()=>s?i({method:o,url:s,headers:a}).then(normalizePaginatedListResponse).then(e=>(s=((e.headers.link||"").match(/<([^>]+)>;\s*rel="next"/)||[])[1],{value:e})):Promise.resolve({done:!0})})}}function paginate(e,t,n,r){return"function"==typeof n&&(r=n,n=void 0),gather(e,[],iterator(e,t,n)[Symbol.asyncIterator](),r)}function gather(e,t,n,r){return n.next().then(i=>{if(i.done)return t;let o=!1;return t=t.concat(r?r(i.value,(function(){o=!0})):i.value.data),o?t:gather(e,t,n,r)})}function paginateRest(e){return{paginate:Object.assign(paginate.bind(null,e),{iterator:iterator.bind(null,e)})}}paginateRest.VERSION=VERSION$5;const Endpoints={actions:{addSelectedRepoToOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],cancelWorkflowRun:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel"],createOrUpdateOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}"],createOrUpdateRepoSecret:["PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}"],createRegistrationTokenForOrg:["POST /orgs/{org}/actions/runners/registration-token"],createRegistrationTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/registration-token"],createRemoveTokenForOrg:["POST /orgs/{org}/actions/runners/remove-token"],createRemoveTokenForRepo:["POST /repos/{owner}/{repo}/actions/runners/remove-token"],createWorkflowDispatch:["POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches"],deleteArtifact:["DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],deleteOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}"],deleteRepoSecret:["DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}"],deleteSelfHostedRunnerFromOrg:["DELETE /orgs/{org}/actions/runners/{runner_id}"],deleteSelfHostedRunnerFromRepo:["DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}"],deleteWorkflowRun:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}"],deleteWorkflowRunLogs:["DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],downloadArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}"],downloadJobLogsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs"],downloadWorkflowRunLogs:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs"],getArtifact:["GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}"],getJobForWorkflowRun:["GET /repos/{owner}/{repo}/actions/jobs/{job_id}"],getOrgPublicKey:["GET /orgs/{org}/actions/secrets/public-key"],getOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}"],getRepoPublicKey:["GET /repos/{owner}/{repo}/actions/secrets/public-key"],getRepoSecret:["GET /repos/{owner}/{repo}/actions/secrets/{secret_name}"],getSelfHostedRunnerForOrg:["GET /orgs/{org}/actions/runners/{runner_id}"],getSelfHostedRunnerForRepo:["GET /repos/{owner}/{repo}/actions/runners/{runner_id}"],getWorkflow:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}"],getWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}"],getWorkflowRunUsage:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing"],getWorkflowUsage:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing"],listArtifactsForRepo:["GET /repos/{owner}/{repo}/actions/artifacts"],listJobsForWorkflowRun:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs"],listOrgSecrets:["GET /orgs/{org}/actions/secrets"],listRepoSecrets:["GET /repos/{owner}/{repo}/actions/secrets"],listRepoWorkflows:["GET /repos/{owner}/{repo}/actions/workflows"],listRunnerApplicationsForOrg:["GET /orgs/{org}/actions/runners/downloads"],listRunnerApplicationsForRepo:["GET /repos/{owner}/{repo}/actions/runners/downloads"],listSelectedReposForOrgSecret:["GET /orgs/{org}/actions/secrets/{secret_name}/repositories"],listSelfHostedRunnersForOrg:["GET /orgs/{org}/actions/runners"],listSelfHostedRunnersForRepo:["GET /repos/{owner}/{repo}/actions/runners"],listWorkflowRunArtifacts:["GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts"],listWorkflowRuns:["GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs"],listWorkflowRunsForRepo:["GET /repos/{owner}/{repo}/actions/runs"],reRunWorkflow:["POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun"],removeSelectedRepoFromOrgSecret:["DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}"],setSelectedReposForOrgSecret:["PUT /orgs/{org}/actions/secrets/{secret_name}/repositories"]},activity:{checkRepoIsStarredByAuthenticatedUser:["GET /user/starred/{owner}/{repo}"],deleteRepoSubscription:["DELETE /repos/{owner}/{repo}/subscription"],deleteThreadSubscription:["DELETE /notifications/threads/{thread_id}/subscription"],getFeeds:["GET /feeds"],getRepoSubscription:["GET /repos/{owner}/{repo}/subscription"],getThread:["GET /notifications/threads/{thread_id}"],getThreadSubscriptionForAuthenticatedUser:["GET /notifications/threads/{thread_id}/subscription"],listEventsForAuthenticatedUser:["GET /users/{username}/events"],listNotificationsForAuthenticatedUser:["GET /notifications"],listOrgEventsForAuthenticatedUser:["GET /users/{username}/events/orgs/{org}"],listPublicEvents:["GET /events"],listPublicEventsForRepoNetwork:["GET /networks/{owner}/{repo}/events"],listPublicEventsForUser:["GET /users/{username}/events/public"],listPublicOrgEvents:["GET /orgs/{org}/events"],listReceivedEventsForUser:["GET /users/{username}/received_events"],listReceivedPublicEventsForUser:["GET /users/{username}/received_events/public"],listRepoEvents:["GET /repos/{owner}/{repo}/events"],listRepoNotificationsForAuthenticatedUser:["GET /repos/{owner}/{repo}/notifications"],listReposStarredByAuthenticatedUser:["GET /user/starred"],listReposStarredByUser:["GET /users/{username}/starred"],listReposWatchedByUser:["GET /users/{username}/subscriptions"],listStargazersForRepo:["GET /repos/{owner}/{repo}/stargazers"],listWatchedReposForAuthenticatedUser:["GET /user/subscriptions"],listWatchersForRepo:["GET /repos/{owner}/{repo}/subscribers"],markNotificationsAsRead:["PUT /notifications"],markRepoNotificationsAsRead:["PUT /repos/{owner}/{repo}/notifications"],markThreadAsRead:["PATCH /notifications/threads/{thread_id}"],setRepoSubscription:["PUT /repos/{owner}/{repo}/subscription"],setThreadSubscription:["PUT /notifications/threads/{thread_id}/subscription"],starRepoForAuthenticatedUser:["PUT /user/starred/{owner}/{repo}"],unstarRepoForAuthenticatedUser:["DELETE /user/starred/{owner}/{repo}"]},apps:{addRepoToInstallation:["PUT /user/installations/{installation_id}/repositories/{repository_id}",{mediaType:{previews:["machine-man"]}}],checkToken:["POST /applications/{client_id}/token"],createContentAttachment:["POST /content_references/{content_reference_id}/attachments",{mediaType:{previews:["corsair"]}}],createFromManifest:["POST /app-manifests/{code}/conversions"],createInstallationAccessToken:["POST /app/installations/{installation_id}/access_tokens",{mediaType:{previews:["machine-man"]}}],deleteAuthorization:["DELETE /applications/{client_id}/grant"],deleteInstallation:["DELETE /app/installations/{installation_id}",{mediaType:{previews:["machine-man"]}}],deleteToken:["DELETE /applications/{client_id}/token"],getAuthenticated:["GET /app",{mediaType:{previews:["machine-man"]}}],getBySlug:["GET /apps/{app_slug}",{mediaType:{previews:["machine-man"]}}],getInstallation:["GET /app/installations/{installation_id}",{mediaType:{previews:["machine-man"]}}],getOrgInstallation:["GET /orgs/{org}/installation",{mediaType:{previews:["machine-man"]}}],getRepoInstallation:["GET /repos/{owner}/{repo}/installation",{mediaType:{previews:["machine-man"]}}],getSubscriptionPlanForAccount:["GET /marketplace_listing/accounts/{account_id}"],getSubscriptionPlanForAccountStubbed:["GET /marketplace_listing/stubbed/accounts/{account_id}"],getUserInstallation:["GET /users/{username}/installation",{mediaType:{previews:["machine-man"]}}],listAccountsForPlan:["GET /marketplace_listing/plans/{plan_id}/accounts"],listAccountsForPlanStubbed:["GET /marketplace_listing/stubbed/plans/{plan_id}/accounts"],listInstallationReposForAuthenticatedUser:["GET /user/installations/{installation_id}/repositories",{mediaType:{previews:["machine-man"]}}],listInstallations:["GET /app/installations",{mediaType:{previews:["machine-man"]}}],listInstallationsForAuthenticatedUser:["GET /user/installations",{mediaType:{previews:["machine-man"]}}],listPlans:["GET /marketplace_listing/plans"],listPlansStubbed:["GET /marketplace_listing/stubbed/plans"],listReposAccessibleToInstallation:["GET /installation/repositories",{mediaType:{previews:["machine-man"]}}],listSubscriptionsForAuthenticatedUser:["GET /user/marketplace_purchases"],listSubscriptionsForAuthenticatedUserStubbed:["GET /user/marketplace_purchases/stubbed"],removeRepoFromInstallation:["DELETE /user/installations/{installation_id}/repositories/{repository_id}",{mediaType:{previews:["machine-man"]}}],resetToken:["PATCH /applications/{client_id}/token"],revokeInstallationAccessToken:["DELETE /installation/token"],suspendInstallation:["PUT /app/installations/{installation_id}/suspended"],unsuspendInstallation:["DELETE /app/installations/{installation_id}/suspended"]},billing:{getGithubActionsBillingOrg:["GET /orgs/{org}/settings/billing/actions"],getGithubActionsBillingUser:["GET /users/{username}/settings/billing/actions"],getGithubPackagesBillingOrg:["GET /orgs/{org}/settings/billing/packages"],getGithubPackagesBillingUser:["GET /users/{username}/settings/billing/packages"],getSharedStorageBillingOrg:["GET /orgs/{org}/settings/billing/shared-storage"],getSharedStorageBillingUser:["GET /users/{username}/settings/billing/shared-storage"]},checks:{create:["POST /repos/{owner}/{repo}/check-runs",{mediaType:{previews:["antiope"]}}],createSuite:["POST /repos/{owner}/{repo}/check-suites",{mediaType:{previews:["antiope"]}}],get:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}",{mediaType:{previews:["antiope"]}}],getSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}",{mediaType:{previews:["antiope"]}}],listAnnotations:["GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations",{mediaType:{previews:["antiope"]}}],listForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-runs",{mediaType:{previews:["antiope"]}}],listForSuite:["GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs",{mediaType:{previews:["antiope"]}}],listSuitesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/check-suites",{mediaType:{previews:["antiope"]}}],rerequestSuite:["POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest",{mediaType:{previews:["antiope"]}}],setSuitesPreferences:["PATCH /repos/{owner}/{repo}/check-suites/preferences",{mediaType:{previews:["antiope"]}}],update:["PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}",{mediaType:{previews:["antiope"]}}]},codeScanning:{getAlert:["GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_id}"],listAlertsForRepo:["GET /repos/{owner}/{repo}/code-scanning/alerts"]},codesOfConduct:{getAllCodesOfConduct:["GET /codes_of_conduct",{mediaType:{previews:["scarlet-witch"]}}],getConductCode:["GET /codes_of_conduct/{key}",{mediaType:{previews:["scarlet-witch"]}}],getForRepo:["GET /repos/{owner}/{repo}/community/code_of_conduct",{mediaType:{previews:["scarlet-witch"]}}]},emojis:{get:["GET /emojis"]},gists:{checkIsStarred:["GET /gists/{gist_id}/star"],create:["POST /gists"],createComment:["POST /gists/{gist_id}/comments"],delete:["DELETE /gists/{gist_id}"],deleteComment:["DELETE /gists/{gist_id}/comments/{comment_id}"],fork:["POST /gists/{gist_id}/forks"],get:["GET /gists/{gist_id}"],getComment:["GET /gists/{gist_id}/comments/{comment_id}"],getRevision:["GET /gists/{gist_id}/{sha}"],list:["GET /gists"],listComments:["GET /gists/{gist_id}/comments"],listCommits:["GET /gists/{gist_id}/commits"],listForUser:["GET /users/{username}/gists"],listForks:["GET /gists/{gist_id}/forks"],listPublic:["GET /gists/public"],listStarred:["GET /gists/starred"],star:["PUT /gists/{gist_id}/star"],unstar:["DELETE /gists/{gist_id}/star"],update:["PATCH /gists/{gist_id}"],updateComment:["PATCH /gists/{gist_id}/comments/{comment_id}"]},git:{createBlob:["POST /repos/{owner}/{repo}/git/blobs"],createCommit:["POST /repos/{owner}/{repo}/git/commits"],createRef:["POST /repos/{owner}/{repo}/git/refs"],createTag:["POST /repos/{owner}/{repo}/git/tags"],createTree:["POST /repos/{owner}/{repo}/git/trees"],deleteRef:["DELETE /repos/{owner}/{repo}/git/refs/{ref}"],getBlob:["GET /repos/{owner}/{repo}/git/blobs/{file_sha}"],getCommit:["GET /repos/{owner}/{repo}/git/commits/{commit_sha}"],getRef:["GET /repos/{owner}/{repo}/git/ref/{ref}"],getTag:["GET /repos/{owner}/{repo}/git/tags/{tag_sha}"],getTree:["GET /repos/{owner}/{repo}/git/trees/{tree_sha}"],listMatchingRefs:["GET /repos/{owner}/{repo}/git/matching-refs/{ref}"],updateRef:["PATCH /repos/{owner}/{repo}/git/refs/{ref}"]},gitignore:{getAllTemplates:["GET /gitignore/templates"],getTemplate:["GET /gitignore/templates/{name}"]},interactions:{getRestrictionsForOrg:["GET /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],getRestrictionsForRepo:["GET /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}],removeRestrictionsForOrg:["DELETE /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],removeRestrictionsForRepo:["DELETE /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}],setRestrictionsForOrg:["PUT /orgs/{org}/interaction-limits",{mediaType:{previews:["sombra"]}}],setRestrictionsForRepo:["PUT /repos/{owner}/{repo}/interaction-limits",{mediaType:{previews:["sombra"]}}]},issues:{addAssignees:["POST /repos/{owner}/{repo}/issues/{issue_number}/assignees"],addLabels:["POST /repos/{owner}/{repo}/issues/{issue_number}/labels"],checkUserCanBeAssigned:["GET /repos/{owner}/{repo}/assignees/{assignee}"],create:["POST /repos/{owner}/{repo}/issues"],createComment:["POST /repos/{owner}/{repo}/issues/{issue_number}/comments"],createLabel:["POST /repos/{owner}/{repo}/labels"],createMilestone:["POST /repos/{owner}/{repo}/milestones"],deleteComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}"],deleteLabel:["DELETE /repos/{owner}/{repo}/labels/{name}"],deleteMilestone:["DELETE /repos/{owner}/{repo}/milestones/{milestone_number}"],get:["GET /repos/{owner}/{repo}/issues/{issue_number}"],getComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}"],getEvent:["GET /repos/{owner}/{repo}/issues/events/{event_id}"],getLabel:["GET /repos/{owner}/{repo}/labels/{name}"],getMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}"],list:["GET /issues"],listAssignees:["GET /repos/{owner}/{repo}/assignees"],listComments:["GET /repos/{owner}/{repo}/issues/{issue_number}/comments"],listCommentsForRepo:["GET /repos/{owner}/{repo}/issues/comments"],listEvents:["GET /repos/{owner}/{repo}/issues/{issue_number}/events"],listEventsForRepo:["GET /repos/{owner}/{repo}/issues/events"],listEventsForTimeline:["GET /repos/{owner}/{repo}/issues/{issue_number}/timeline",{mediaType:{previews:["mockingbird"]}}],listForAuthenticatedUser:["GET /user/issues"],listForOrg:["GET /orgs/{org}/issues"],listForRepo:["GET /repos/{owner}/{repo}/issues"],listLabelsForMilestone:["GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels"],listLabelsForRepo:["GET /repos/{owner}/{repo}/labels"],listLabelsOnIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/labels"],listMilestones:["GET /repos/{owner}/{repo}/milestones"],lock:["PUT /repos/{owner}/{repo}/issues/{issue_number}/lock"],removeAllLabels:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels"],removeAssignees:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees"],removeLabel:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}"],setLabels:["PUT /repos/{owner}/{repo}/issues/{issue_number}/labels"],unlock:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock"],update:["PATCH /repos/{owner}/{repo}/issues/{issue_number}"],updateComment:["PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}"],updateLabel:["PATCH /repos/{owner}/{repo}/labels/{name}"],updateMilestone:["PATCH /repos/{owner}/{repo}/milestones/{milestone_number}"]},licenses:{get:["GET /licenses/{license}"],getAllCommonlyUsed:["GET /licenses"],getForRepo:["GET /repos/{owner}/{repo}/license"]},markdown:{render:["POST /markdown"],renderRaw:["POST /markdown/raw",{headers:{"content-type":"text/plain; charset=utf-8"}}]},meta:{get:["GET /meta"]},migrations:{cancelImport:["DELETE /repos/{owner}/{repo}/import"],deleteArchiveForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],deleteArchiveForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],downloadArchiveForOrg:["GET /orgs/{org}/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getArchiveForAuthenticatedUser:["GET /user/migrations/{migration_id}/archive",{mediaType:{previews:["wyandotte"]}}],getCommitAuthors:["GET /repos/{owner}/{repo}/import/authors"],getImportStatus:["GET /repos/{owner}/{repo}/import"],getLargeFiles:["GET /repos/{owner}/{repo}/import/large_files"],getStatusForAuthenticatedUser:["GET /user/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],getStatusForOrg:["GET /orgs/{org}/migrations/{migration_id}",{mediaType:{previews:["wyandotte"]}}],listForAuthenticatedUser:["GET /user/migrations",{mediaType:{previews:["wyandotte"]}}],listForOrg:["GET /orgs/{org}/migrations",{mediaType:{previews:["wyandotte"]}}],listReposForOrg:["GET /orgs/{org}/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],listReposForUser:["GET /user/migrations/{migration_id}/repositories",{mediaType:{previews:["wyandotte"]}}],mapCommitAuthor:["PATCH /repos/{owner}/{repo}/import/authors/{author_id}"],setLfsPreference:["PATCH /repos/{owner}/{repo}/import/lfs"],startForAuthenticatedUser:["POST /user/migrations"],startForOrg:["POST /orgs/{org}/migrations"],startImport:["PUT /repos/{owner}/{repo}/import"],unlockRepoForAuthenticatedUser:["DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],unlockRepoForOrg:["DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock",{mediaType:{previews:["wyandotte"]}}],updateImport:["PATCH /repos/{owner}/{repo}/import"]},orgs:{blockUser:["PUT /orgs/{org}/blocks/{username}"],checkBlockedUser:["GET /orgs/{org}/blocks/{username}"],checkMembershipForUser:["GET /orgs/{org}/members/{username}"],checkPublicMembershipForUser:["GET /orgs/{org}/public_members/{username}"],convertMemberToOutsideCollaborator:["PUT /orgs/{org}/outside_collaborators/{username}"],createInvitation:["POST /orgs/{org}/invitations"],createWebhook:["POST /orgs/{org}/hooks"],deleteWebhook:["DELETE /orgs/{org}/hooks/{hook_id}"],get:["GET /orgs/{org}"],getMembershipForAuthenticatedUser:["GET /user/memberships/orgs/{org}"],getMembershipForUser:["GET /orgs/{org}/memberships/{username}"],getWebhook:["GET /orgs/{org}/hooks/{hook_id}"],list:["GET /organizations"],listAppInstallations:["GET /orgs/{org}/installations",{mediaType:{previews:["machine-man"]}}],listBlockedUsers:["GET /orgs/{org}/blocks"],listForAuthenticatedUser:["GET /user/orgs"],listForUser:["GET /users/{username}/orgs"],listInvitationTeams:["GET /orgs/{org}/invitations/{invitation_id}/teams"],listMembers:["GET /orgs/{org}/members"],listMembershipsForAuthenticatedUser:["GET /user/memberships/orgs"],listOutsideCollaborators:["GET /orgs/{org}/outside_collaborators"],listPendingInvitations:["GET /orgs/{org}/invitations"],listPublicMembers:["GET /orgs/{org}/public_members"],listWebhooks:["GET /orgs/{org}/hooks"],pingWebhook:["POST /orgs/{org}/hooks/{hook_id}/pings"],removeMember:["DELETE /orgs/{org}/members/{username}"],removeMembershipForUser:["DELETE /orgs/{org}/memberships/{username}"],removeOutsideCollaborator:["DELETE /orgs/{org}/outside_collaborators/{username}"],removePublicMembershipForAuthenticatedUser:["DELETE /orgs/{org}/public_members/{username}"],setMembershipForUser:["PUT /orgs/{org}/memberships/{username}"],setPublicMembershipForAuthenticatedUser:["PUT /orgs/{org}/public_members/{username}"],unblockUser:["DELETE /orgs/{org}/blocks/{username}"],update:["PATCH /orgs/{org}"],updateMembershipForAuthenticatedUser:["PATCH /user/memberships/orgs/{org}"],updateWebhook:["PATCH /orgs/{org}/hooks/{hook_id}"]},projects:{addCollaborator:["PUT /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],createCard:["POST /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],createColumn:["POST /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],createForAuthenticatedUser:["POST /user/projects",{mediaType:{previews:["inertia"]}}],createForOrg:["POST /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],createForRepo:["POST /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],delete:["DELETE /projects/{project_id}",{mediaType:{previews:["inertia"]}}],deleteCard:["DELETE /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],deleteColumn:["DELETE /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],get:["GET /projects/{project_id}",{mediaType:{previews:["inertia"]}}],getCard:["GET /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],getColumn:["GET /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}],getPermissionForUser:["GET /projects/{project_id}/collaborators/{username}/permission",{mediaType:{previews:["inertia"]}}],listCards:["GET /projects/columns/{column_id}/cards",{mediaType:{previews:["inertia"]}}],listCollaborators:["GET /projects/{project_id}/collaborators",{mediaType:{previews:["inertia"]}}],listColumns:["GET /projects/{project_id}/columns",{mediaType:{previews:["inertia"]}}],listForOrg:["GET /orgs/{org}/projects",{mediaType:{previews:["inertia"]}}],listForRepo:["GET /repos/{owner}/{repo}/projects",{mediaType:{previews:["inertia"]}}],listForUser:["GET /users/{username}/projects",{mediaType:{previews:["inertia"]}}],moveCard:["POST /projects/columns/cards/{card_id}/moves",{mediaType:{previews:["inertia"]}}],moveColumn:["POST /projects/columns/{column_id}/moves",{mediaType:{previews:["inertia"]}}],removeCollaborator:["DELETE /projects/{project_id}/collaborators/{username}",{mediaType:{previews:["inertia"]}}],update:["PATCH /projects/{project_id}",{mediaType:{previews:["inertia"]}}],updateCard:["PATCH /projects/columns/cards/{card_id}",{mediaType:{previews:["inertia"]}}],updateColumn:["PATCH /projects/columns/{column_id}",{mediaType:{previews:["inertia"]}}]},pulls:{checkIfMerged:["GET /repos/{owner}/{repo}/pulls/{pull_number}/merge"],create:["POST /repos/{owner}/{repo}/pulls"],createReplyForReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies"],createReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],createReviewComment:["POST /repos/{owner}/{repo}/pulls/{pull_number}/comments"],deletePendingReview:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],deleteReviewComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}"],dismissReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals"],get:["GET /repos/{owner}/{repo}/pulls/{pull_number}"],getReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],getReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}"],list:["GET /repos/{owner}/{repo}/pulls"],listCommentsForReview:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments"],listCommits:["GET /repos/{owner}/{repo}/pulls/{pull_number}/commits"],listFiles:["GET /repos/{owner}/{repo}/pulls/{pull_number}/files"],listRequestedReviewers:["GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],listReviewComments:["GET /repos/{owner}/{repo}/pulls/{pull_number}/comments"],listReviewCommentsForRepo:["GET /repos/{owner}/{repo}/pulls/comments"],listReviews:["GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews"],merge:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge"],removeRequestedReviewers:["DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],requestReviewers:["POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers"],submitReview:["POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events"],update:["PATCH /repos/{owner}/{repo}/pulls/{pull_number}"],updateBranch:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch",{mediaType:{previews:["lydian"]}}],updateReview:["PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}"],updateReviewComment:["PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}"]},rateLimit:{get:["GET /rate_limit"]},reactions:{createForCommitComment:["POST /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssue:["POST /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForIssueComment:["POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForPullRequestReviewComment:["POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],createForTeamDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],deleteForCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssue:["DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForIssueComment:["DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForPullRequestComment:["DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussion:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteForTeamDiscussionComment:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}}],deleteLegacy:["DELETE /reactions/{reaction_id}",{mediaType:{previews:["squirrel-girl"]}},{deprecated:"octokit.reactions.deleteLegacy() is deprecated, see https://developer.github.com/v3/reactions/#delete-a-reaction-legacy"}],listForCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssue:["GET /repos/{owner}/{repo}/issues/{issue_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForIssueComment:["GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForPullRequestReviewComment:["GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}],listForTeamDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions",{mediaType:{previews:["squirrel-girl"]}}]},repos:{acceptInvitation:["PATCH /user/repository_invitations/{invitation_id}"],addAppAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],addCollaborator:["PUT /repos/{owner}/{repo}/collaborators/{username}"],addStatusCheckContexts:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],addTeamAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],addUserAccessRestrictions:["POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],checkCollaborator:["GET /repos/{owner}/{repo}/collaborators/{username}"],checkVulnerabilityAlerts:["GET /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],compareCommits:["GET /repos/{owner}/{repo}/compare/{base}...{head}"],createCommitComment:["POST /repos/{owner}/{repo}/commits/{commit_sha}/comments"],createCommitSignatureProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],createCommitStatus:["POST /repos/{owner}/{repo}/statuses/{sha}"],createDeployKey:["POST /repos/{owner}/{repo}/keys"],createDeployment:["POST /repos/{owner}/{repo}/deployments"],createDeploymentStatus:["POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],createDispatchEvent:["POST /repos/{owner}/{repo}/dispatches"],createForAuthenticatedUser:["POST /user/repos"],createFork:["POST /repos/{owner}/{repo}/forks"],createInOrg:["POST /orgs/{org}/repos"],createOrUpdateFileContents:["PUT /repos/{owner}/{repo}/contents/{path}"],createPagesSite:["POST /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],createRelease:["POST /repos/{owner}/{repo}/releases"],createUsingTemplate:["POST /repos/{template_owner}/{template_repo}/generate",{mediaType:{previews:["baptiste"]}}],createWebhook:["POST /repos/{owner}/{repo}/hooks"],declineInvitation:["DELETE /user/repository_invitations/{invitation_id}"],delete:["DELETE /repos/{owner}/{repo}"],deleteAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],deleteAdminBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],deleteBranchProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection"],deleteCommitComment:["DELETE /repos/{owner}/{repo}/comments/{comment_id}"],deleteCommitSignatureProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],deleteDeployKey:["DELETE /repos/{owner}/{repo}/keys/{key_id}"],deleteDeployment:["DELETE /repos/{owner}/{repo}/deployments/{deployment_id}"],deleteFile:["DELETE /repos/{owner}/{repo}/contents/{path}"],deleteInvitation:["DELETE /repos/{owner}/{repo}/invitations/{invitation_id}"],deletePagesSite:["DELETE /repos/{owner}/{repo}/pages",{mediaType:{previews:["switcheroo"]}}],deletePullRequestReviewProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],deleteRelease:["DELETE /repos/{owner}/{repo}/releases/{release_id}"],deleteReleaseAsset:["DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}"],deleteWebhook:["DELETE /repos/{owner}/{repo}/hooks/{hook_id}"],disableAutomatedSecurityFixes:["DELETE /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],disableVulnerabilityAlerts:["DELETE /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],downloadArchive:["GET /repos/{owner}/{repo}/{archive_format}/{ref}"],enableAutomatedSecurityFixes:["PUT /repos/{owner}/{repo}/automated-security-fixes",{mediaType:{previews:["london"]}}],enableVulnerabilityAlerts:["PUT /repos/{owner}/{repo}/vulnerability-alerts",{mediaType:{previews:["dorian"]}}],get:["GET /repos/{owner}/{repo}"],getAccessRestrictions:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions"],getAdminBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],getAllStatusCheckContexts:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts"],getAllTopics:["GET /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],getAppsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps"],getBranch:["GET /repos/{owner}/{repo}/branches/{branch}"],getBranchProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection"],getClones:["GET /repos/{owner}/{repo}/traffic/clones"],getCodeFrequencyStats:["GET /repos/{owner}/{repo}/stats/code_frequency"],getCollaboratorPermissionLevel:["GET /repos/{owner}/{repo}/collaborators/{username}/permission"],getCombinedStatusForRef:["GET /repos/{owner}/{repo}/commits/{ref}/status"],getCommit:["GET /repos/{owner}/{repo}/commits/{ref}"],getCommitActivityStats:["GET /repos/{owner}/{repo}/stats/commit_activity"],getCommitComment:["GET /repos/{owner}/{repo}/comments/{comment_id}"],getCommitSignatureProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures",{mediaType:{previews:["zzzax"]}}],getCommunityProfileMetrics:["GET /repos/{owner}/{repo}/community/profile",{mediaType:{previews:["black-panther"]}}],getContent:["GET /repos/{owner}/{repo}/contents/{path}"],getContributorsStats:["GET /repos/{owner}/{repo}/stats/contributors"],getDeployKey:["GET /repos/{owner}/{repo}/keys/{key_id}"],getDeployment:["GET /repos/{owner}/{repo}/deployments/{deployment_id}"],getDeploymentStatus:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}"],getLatestPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/latest"],getLatestRelease:["GET /repos/{owner}/{repo}/releases/latest"],getPages:["GET /repos/{owner}/{repo}/pages"],getPagesBuild:["GET /repos/{owner}/{repo}/pages/builds/{build_id}"],getParticipationStats:["GET /repos/{owner}/{repo}/stats/participation"],getPullRequestReviewProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],getPunchCardStats:["GET /repos/{owner}/{repo}/stats/punch_card"],getReadme:["GET /repos/{owner}/{repo}/readme"],getRelease:["GET /repos/{owner}/{repo}/releases/{release_id}"],getReleaseAsset:["GET /repos/{owner}/{repo}/releases/assets/{asset_id}"],getReleaseByTag:["GET /repos/{owner}/{repo}/releases/tags/{tag}"],getStatusChecksProtection:["GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],getTeamsWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams"],getTopPaths:["GET /repos/{owner}/{repo}/traffic/popular/paths"],getTopReferrers:["GET /repos/{owner}/{repo}/traffic/popular/referrers"],getUsersWithAccessToProtectedBranch:["GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users"],getViews:["GET /repos/{owner}/{repo}/traffic/views"],getWebhook:["GET /repos/{owner}/{repo}/hooks/{hook_id}"],listBranches:["GET /repos/{owner}/{repo}/branches"],listBranchesForHeadCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head",{mediaType:{previews:["groot"]}}],listCollaborators:["GET /repos/{owner}/{repo}/collaborators"],listCommentsForCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/comments"],listCommitCommentsForRepo:["GET /repos/{owner}/{repo}/comments"],listCommitStatusesForRef:["GET /repos/{owner}/{repo}/commits/{ref}/statuses"],listCommits:["GET /repos/{owner}/{repo}/commits"],listContributors:["GET /repos/{owner}/{repo}/contributors"],listDeployKeys:["GET /repos/{owner}/{repo}/keys"],listDeploymentStatuses:["GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses"],listDeployments:["GET /repos/{owner}/{repo}/deployments"],listForAuthenticatedUser:["GET /user/repos"],listForOrg:["GET /orgs/{org}/repos"],listForUser:["GET /users/{username}/repos"],listForks:["GET /repos/{owner}/{repo}/forks"],listInvitations:["GET /repos/{owner}/{repo}/invitations"],listInvitationsForAuthenticatedUser:["GET /user/repository_invitations"],listLanguages:["GET /repos/{owner}/{repo}/languages"],listPagesBuilds:["GET /repos/{owner}/{repo}/pages/builds"],listPublic:["GET /repositories"],listPullRequestsAssociatedWithCommit:["GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls",{mediaType:{previews:["groot"]}}],listReleaseAssets:["GET /repos/{owner}/{repo}/releases/{release_id}/assets"],listReleases:["GET /repos/{owner}/{repo}/releases"],listTags:["GET /repos/{owner}/{repo}/tags"],listTeams:["GET /repos/{owner}/{repo}/teams"],listWebhooks:["GET /repos/{owner}/{repo}/hooks"],merge:["POST /repos/{owner}/{repo}/merges"],pingWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/pings"],removeAppAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],removeCollaborator:["DELETE /repos/{owner}/{repo}/collaborators/{username}"],removeStatusCheckContexts:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],removeStatusCheckProtection:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],removeTeamAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],removeUserAccessRestrictions:["DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],replaceAllTopics:["PUT /repos/{owner}/{repo}/topics",{mediaType:{previews:["mercy"]}}],requestPagesBuild:["POST /repos/{owner}/{repo}/pages/builds"],setAdminBranchProtection:["POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins"],setAppAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps",{},{mapToData:"apps"}],setStatusCheckContexts:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts",{},{mapToData:"contexts"}],setTeamAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams",{},{mapToData:"teams"}],setUserAccessRestrictions:["PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users",{},{mapToData:"users"}],testPushWebhook:["POST /repos/{owner}/{repo}/hooks/{hook_id}/tests"],transfer:["POST /repos/{owner}/{repo}/transfer"],update:["PATCH /repos/{owner}/{repo}"],updateBranchProtection:["PUT /repos/{owner}/{repo}/branches/{branch}/protection"],updateCommitComment:["PATCH /repos/{owner}/{repo}/comments/{comment_id}"],updateInformationAboutPagesSite:["PUT /repos/{owner}/{repo}/pages"],updateInvitation:["PATCH /repos/{owner}/{repo}/invitations/{invitation_id}"],updatePullRequestReviewProtection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews"],updateRelease:["PATCH /repos/{owner}/{repo}/releases/{release_id}"],updateReleaseAsset:["PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}"],updateStatusCheckPotection:["PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks"],updateWebhook:["PATCH /repos/{owner}/{repo}/hooks/{hook_id}"],uploadReleaseAsset:["POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}",{baseUrl:"https://uploads.github.com"}]},search:{code:["GET /search/code"],commits:["GET /search/commits",{mediaType:{previews:["cloak"]}}],issuesAndPullRequests:["GET /search/issues"],labels:["GET /search/labels"],repos:["GET /search/repositories"],topics:["GET /search/topics",{mediaType:{previews:["mercy"]}}],users:["GET /search/users"]},teams:{addOrUpdateMembershipForUserInOrg:["PUT /orgs/{org}/teams/{team_slug}/memberships/{username}"],addOrUpdateProjectPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],addOrUpdateRepoPermissionsInOrg:["PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],checkPermissionsForProjectInOrg:["GET /orgs/{org}/teams/{team_slug}/projects/{project_id}",{mediaType:{previews:["inertia"]}}],checkPermissionsForRepoInOrg:["GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],create:["POST /orgs/{org}/teams"],createDiscussionCommentInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],createDiscussionInOrg:["POST /orgs/{org}/teams/{team_slug}/discussions"],deleteDiscussionCommentInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],deleteDiscussionInOrg:["DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],deleteInOrg:["DELETE /orgs/{org}/teams/{team_slug}"],getByName:["GET /orgs/{org}/teams/{team_slug}"],getDiscussionCommentInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],getDiscussionInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],getMembershipForUserInOrg:["GET /orgs/{org}/teams/{team_slug}/memberships/{username}"],list:["GET /orgs/{org}/teams"],listChildInOrg:["GET /orgs/{org}/teams/{team_slug}/teams"],listDiscussionCommentsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments"],listDiscussionsInOrg:["GET /orgs/{org}/teams/{team_slug}/discussions"],listForAuthenticatedUser:["GET /user/teams"],listMembersInOrg:["GET /orgs/{org}/teams/{team_slug}/members"],listPendingInvitationsInOrg:["GET /orgs/{org}/teams/{team_slug}/invitations"],listProjectsInOrg:["GET /orgs/{org}/teams/{team_slug}/projects",{mediaType:{previews:["inertia"]}}],listReposInOrg:["GET /orgs/{org}/teams/{team_slug}/repos"],removeMembershipForUserInOrg:["DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}"],removeProjectInOrg:["DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}"],removeRepoInOrg:["DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}"],updateDiscussionCommentInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}"],updateDiscussionInOrg:["PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}"],updateInOrg:["PATCH /orgs/{org}/teams/{team_slug}"]},users:{addEmailForAuthenticated:["POST /user/emails"],block:["PUT /user/blocks/{username}"],checkBlocked:["GET /user/blocks/{username}"],checkFollowingForUser:["GET /users/{username}/following/{target_user}"],checkPersonIsFollowedByAuthenticated:["GET /user/following/{username}"],createGpgKeyForAuthenticated:["POST /user/gpg_keys"],createPublicSshKeyForAuthenticated:["POST /user/keys"],deleteEmailForAuthenticated:["DELETE /user/emails"],deleteGpgKeyForAuthenticated:["DELETE /user/gpg_keys/{gpg_key_id}"],deletePublicSshKeyForAuthenticated:["DELETE /user/keys/{key_id}"],follow:["PUT /user/following/{username}"],getAuthenticated:["GET /user"],getByUsername:["GET /users/{username}"],getContextForUser:["GET /users/{username}/hovercard"],getGpgKeyForAuthenticated:["GET /user/gpg_keys/{gpg_key_id}"],getPublicSshKeyForAuthenticated:["GET /user/keys/{key_id}"],list:["GET /users"],listBlockedByAuthenticated:["GET /user/blocks"],listEmailsForAuthenticated:["GET /user/emails"],listFollowedByAuthenticated:["GET /user/following"],listFollowersForAuthenticatedUser:["GET /user/followers"],listFollowersForUser:["GET /users/{username}/followers"],listFollowingForUser:["GET /users/{username}/following"],listGpgKeysForAuthenticated:["GET /user/gpg_keys"],listGpgKeysForUser:["GET /users/{username}/gpg_keys"],listPublicEmailsForAuthenticated:["GET /user/public_emails"],listPublicKeysForUser:["GET /users/{username}/keys"],listPublicSshKeysForAuthenticated:["GET /user/keys"],setPrimaryEmailVisibilityForAuthenticated:["PATCH /user/email/visibility"],unblock:["DELETE /user/blocks/{username}"],unfollow:["DELETE /user/following/{username}"],updateAuthenticated:["PATCH /user"]}},VERSION$6="4.1.2";function endpointsToMethods(e,t){const n={};for(const[r,i]of Object.entries(t))for(const[t,o]of Object.entries(i)){const[i,a,s]=o,[l,c]=i.split(/ /),u=Object.assign({method:l,url:c},a);n[r]||(n[r]={});const h=n[r];s?h[t]=decorate(e,r,t,u,s):h[t]=e.request.defaults(u)}return n}function decorate(e,t,n,r,i){const o=e.request.defaults(r);return Object.assign((function(...r){let a=o.endpoint.merge(...r);if(i.mapToData)return a=Object.assign({},a,{data:a[i.mapToData],[i.mapToData]:void 0}),o(a);if(i.renamed){const[r,o]=i.renamed;e.log.warn(`octokit.${t}.${n}() has been renamed to octokit.${r}.${o}()`)}if(i.deprecated&&e.log.warn(i.deprecated),i.renamedParameters){const a=o.endpoint.merge(...r);for(const[r,o]of Object.entries(i.renamedParameters))r in a&&(e.log.warn(`"${r}" parameter is deprecated for "octokit.${t}.${n}()". Use "${o}" instead`),o in a||(a[o]=a[r]),delete a[r]);return o(a)}return o(...r)}),o)}function restEndpointMethods(e){return endpointsToMethods(e,Endpoints)}restEndpointMethods.VERSION=VERSION$6;const VERSION$7="18.0.3",Octokit$1=Octokit.plugin(requestLog,restEndpointMethods,paginateRest).defaults({userAgent:"octokit-rest.js/"+VERSION$7}),authContext=react_14();function ProvideAuth(e){const t=useProvideAuth();return react.createElement(authContext.Provider,{value:t},e.children)}const useAuth=()=>react_8(authContext);function storeCredential(e,t){localStorage.setItem(e+"_key",t)}function loadCredential(e){return localStorage.getItem(e+"_key")}function useProvideAuth(){const[e,t]=react_6(null),[n,r]=react_6(null),[i,o]=react_6(!1);var a=new index_cjs$3.auth.GithubAuthProvider;function s(){t(null),r(null),localStorage.clear()}a.addScope("gist");const l=async()=>index_cjs$3.auth().signOut().then(()=>{logEvent$1("sign_out"),s(),location.reload()});async function c(e,n=!1){let i=loadCredential(e.uid);if(r(e.uid),i){const r=new Octokit$1({auth:i}),{data:o}=await r.request("/user");if(o.id)return n&&index_cjs$3.database().ref().child("users/"+e.uid+"/profile").set({login:o.login,id:o.id,name:o.name,avatar_url:o.avatar_url}),t({user:e,octokit:r,gh:o}),e}return l(),null}return react_5(()=>{const e=index_cjs$3.auth().onAuthStateChanged(e=>{e?c(e):s()});return()=>e()},[]),{uid:n,data:e,signin:async()=>(o(!0),index_cjs$3.auth().signInWithPopup(a).then(e=>{e.credential&&storeCredential(e.user.uid,e.credential.accessToken),logEvent$1("sign_in");const t=c(e.user,!0);return t.then(()=>o(!1)),t}).catch(e=>{logEvent$1("cancel_signin"),o(!1),logException(e)})),signout:l,loading:i}}let isResizing=!1;function ResizeableSidebar(e){const[t,n]=react_6(e.size),r=react_11((function(e){if(!isResizing)return;let t=e.clientX-document.body.offsetLeft;n(t>150?t:0)}),[]),i=react_11((function(e){if(!isResizing)return;isResizing=!1,document.removeEventListener("mousemove",r),document.removeEventListener("mouseup",i)}),[]);return react_5(()=>{t!=e.size&&e.onResize(t)},[t]),react.createElement("div",{className:"sidebar-container"},react.createElement("div",{className:"sidebar-dragger "+(isResizing?"active":""),onMouseDown:function(e){e.stopPropagation(),e.preventDefault(),document.addEventListener("mousemove",r),document.addEventListener("mouseup",i),isResizing=!0},style:{left:e.size}}),e.children)}function Avatar(e){const[t,n]=react_6(),r=useAuth();return react_5(()=>{e.userId&&r.uid&&index_cjs$3.database().ref().child(`users/${e.userId}/profile`).once("value",(function(e){n(e.toJSON())}))},[e.userId]),t?react.createElement("img",{className:"avatar avatar-small "+e.className,alt:t.login,title:t.login,"aria-label":t.login,src:t.avatar_url+"&s=40",width:"20",height:"20",onClick:e.onClick}):react.createElement("img",{className:"avatar",height:"20",width:"20",title:"anonymous",alt:"anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",onClick:e.onClick})}function UserList(e){const t=useAuth(),[n,r]=react_6({});return react_5(()=>{if(e.documentRef){r({});const t=e.documentRef.child("users");return t.on("value",e=>{r(e.toJSON())}),()=>{t.off()}}},[e.documentRef]),react.createElement("div",{className:"AvatarStack AvatarStack--three-plus AvatarStack--right d-inline-block flex-self-center"},react.createElement("div",{className:"AvatarStack-body"},Object.keys(n||{}).map(e=>t.uid!=e&&react.createElement(Avatar,{userId:e,className:"tooltipped tooltipped-sw tooltipped-align-right-1",key:e}))))}function UserMenu(){const e=useAuth();return e.data?react.createElement(react.Fragment,null,react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn btn-invisible user-name",style:{color:"#000"}},react.createElement("span",{className:"mr-2"},e.data.user.displayName),react.createElement("img",{className:"avatar avatar-small",alt:e.data.user.displayName,src:e.data.user.photoURL+"&s=40",width:"20",height:"20","aria-label":e.data.user.displayName}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:"#/list",onClick:()=>{navigateTo("/list")}},react.createElement("span",null,"My notebooks"))),react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:document.location.toString(),onClick:()=>{e.signout().then(()=>closeMenu()).catch(()=>closeMenu())}},react.createElement("span",null,"Sign out")))))):react.createElement(react.Fragment,null,react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn btn-invisible user-name",style:{color:"#000"}},react.createElement("span",{className:"mr-2"},"Anonymous"),react.createElement("img",{className:"avatar avatar-small",alt:"Anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",width:"20",height:"20","aria-label":"Sign in"}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-sw"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",href:document.location.toString(),onClick:()=>{e.signin().then(()=>closeMenu()).catch(()=>closeMenu())}},react.createElement(MarkGithubIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Sign in"))))))}class ErrorBoundary extends react.Component{constructor(e){super(e),this.state={hasError:!1}}static getDerivedStateFromError(e){return{hasError:!0}}componentDidCatch(e,t){console.error(e),console.log(t)}render(){return this.state.hasError?react.createElement("h1",null,"Something went wrong."):this.props.children}}function createCommonjsModule$1(e,t){return e(t={exports:{}},t.exports),t.exports}var expatlib=createCommonjsModule$1((function(e,t){var n,r=(n="undefined"!=typeof document&&document.currentScript?document.currentScript.src:void 0,function(e){var t,r=void 0!==(e=e||{})?e:{};r.ready=new Promise((function(e,n){t=e}));var i,o={};for(i in r)r.hasOwnProperty(i)&&(o[i]=r[i]);var a,s="./this.program",l="";document.currentScript&&(l=document.currentScript.src),n&&(l=n),l=0!==l.indexOf("blob:")?l.substr(0,l.lastIndexOf("/")+1):"",a=function(e){var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText};var c,u,h=r.print||console.log.bind(console),p=r.printErr||console.warn.bind(console);for(i in o)o.hasOwnProperty(i)&&(r[i]=o[i]);o=null,r.arguments&&r.arguments,r.thisProgram&&(s=r.thisProgram),r.quit&&r.quit,r.wasmBinary&&(c=r.wasmBinary),r.noExitRuntime&&r.noExitRuntime,"object"!=typeof WebAssembly&&p("no native wasm support detected");var f=new WebAssembly.Table({initial:153,maximum:153,element:"anyfunc"}),d=!1;function m(e,t){e||U("Assertion failed: "+t)}var g,y,v,_,b,w="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function E(e,t,n){for(var r=t+n,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.subarray&&w)return w.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function T(e,t){return e?E(v,e,t):""}function k(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i}function S(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}function x(e,t){return e%t>0&&(e+=t-e%t),e}function C(e){g=e,r.HEAP8=y=new Int8Array(e),r.HEAP16=new Int16Array(e),r.HEAP32=_=new Int32Array(e),r.HEAPU8=v=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=b=new Float64Array(e)}var P=r.INITIAL_MEMORY||16777216;function A(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?r.dynCall_v(n):r.dynCall_vi(n,t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}(u=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:P/65536,maximum:32768}))&&(g=u.buffer),P=g.byteLength,C(g),_[2100]=5251440;var I=[],D=[],R=[],O=[];function N(e){I.unshift(e)}function M(e){O.unshift(e)}var F=Math.abs,L=Math.ceil,j=Math.floor,$=Math.min,B=0,V=null;function G(e){B++,r.monitorRunDependencies&&r.monitorRunDependencies(B)}function z(e){if(B--,r.monitorRunDependencies&&r.monitorRunDependencies(B),0==B&&V){var t=V;V=null,t()}}function U(e){throw r.onAbort&&r.onAbort(e),h(e+=""),p(e),d=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function H(e){return function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}(e,"data:application/octet-stream;base64,")}r.preloadedImages={},r.preloadedAudios={};var q,W,Y,K="expatlib.wasm";function Q(){try{if(c)return new Uint8Array(c);throw"both async and sync fetching of the wasm failed"}catch(e){U(e)}}H(K)||(q=K,K=r.locateFile?r.locateFile(q,l):l+q);var X={1284:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("startElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::startElement.";t.startElement()},1504:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("endElement"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::endElement.";t.endElement()},1716:function(e){var t=r.getCache(r.CExpatJS)[e];if(!t.hasOwnProperty("characterData"))throw"a JSImplementation must implement all functions, you forgot CExpatJS::characterData.";t.characterData()}};function J(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return r.extraStackTrace&&(e+="\n"+r.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}D.push({func:function(){me()}});var Z={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=Z.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return Z.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return Z.normalize(e.join("/"))},join2:function(e,t){return Z.normalize(e+"/"+t)}};function ee(e){return _[Ne()>>2]=e,e}var te={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:ie.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=te.resolve(e).substr(1),t=te.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s0&&(h(E(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(p(E(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(p(E(e.output,0)),e.output=[])}}},re={ops_table:null,mount:function(e){return re.createNode(null,"/",16895,0)},createNode:function(e,t,n,r){if(ie.isBlkdev(n)||ie.isFIFO(n))throw new ie.ErrnoError(63);re.ops_table||(re.ops_table={dir:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr,lookup:re.node_ops.lookup,mknod:re.node_ops.mknod,rename:re.node_ops.rename,unlink:re.node_ops.unlink,rmdir:re.node_ops.rmdir,readdir:re.node_ops.readdir,symlink:re.node_ops.symlink},stream:{llseek:re.stream_ops.llseek}},file:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr},stream:{llseek:re.stream_ops.llseek,read:re.stream_ops.read,write:re.stream_ops.write,allocate:re.stream_ops.allocate,mmap:re.stream_ops.mmap,msync:re.stream_ops.msync}},link:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr,readlink:re.node_ops.readlink},stream:{}},chrdev:{node:{getattr:re.node_ops.getattr,setattr:re.node_ops.setattr},stream:ie.chrdev_stream_ops}});var i=ie.createNode(e,t,n,r);return ie.isDir(i.mode)?(i.node_ops=re.ops_table.dir.node,i.stream_ops=re.ops_table.dir.stream,i.contents={}):ie.isFile(i.mode)?(i.node_ops=re.ops_table.file.node,i.stream_ops=re.ops_table.file.stream,i.usedBytes=0,i.contents=null):ie.isLink(i.mode)?(i.node_ops=re.ops_table.link.node,i.stream_ops=re.ops_table.link.stream):ie.isChrdev(i.mode)&&(i.node_ops=re.ops_table.chrdev.node,i.stream_ops=re.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i),i},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],n=0;n=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var n=e.contents;return e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||i+r8)throw new ie.ErrnoError(32);for(var i=Z.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=ie.root,a="/",s=0;s40)throw new ie.ErrnoError(32)}}return{path:a,node:o}},getPath:function(e){for(var t;;){if(ie.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?n+"/"+t:n+t:n}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var n=0,r=0;r>>0)%ie.nameTable.length},hashAddNode:function(e){var t=ie.hashName(e.parent.id,e.name);e.name_next=ie.nameTable[t],ie.nameTable[t]=e},hashRemoveNode:function(e){var t=ie.hashName(e.parent.id,e.name);if(ie.nameTable[t]===e)ie.nameTable[t]=e.name_next;else for(var n=ie.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode:function(e,t){var n=ie.mayLookup(e);if(n)throw new ie.ErrnoError(n,e);for(var r=ie.hashName(e.id,t),i=ie.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return ie.lookup(e,t)},createNode:function(e,t,n,r){var i=new ie.FSNode(e,t,n,r);return ie.hashAddNode(i),i},destroyNode:function(e){ie.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=ie.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return ie.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=ie.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return ie.lookupNode(e,t),20}catch(e){}return ie.nodePermissions(e,"wx")},mayDelete:function(e,t,n){var r;try{r=ie.lookupNode(e,t)}catch(e){return e.errno}var i=ie.nodePermissions(e,"wx");if(i)return i;if(n){if(!ie.isDir(r.mode))return 54;if(ie.isRoot(r)||ie.getPath(r)===ie.cwd())return 10}else if(ie.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?ie.isLink(e.mode)?32:ie.isDir(e.mode)&&("r"!==ie.flagsToPermissionString(t)||512&t)?31:ie.nodePermissions(e,ie.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||ie.MAX_OPEN_FDS;for(var n=e;n<=t;n++)if(!ie.streams[n])return n;throw new ie.ErrnoError(33)},getStream:function(e){return ie.streams[e]},createStream:function(e,t,n){ie.FSStream||(ie.FSStream=function(){},ie.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var r=new ie.FSStream;for(var i in e)r[i]=e[i];e=r;var o=ie.nextfd(t,n);return e.fd=o,ie.streams[o]=e,e},closeStream:function(e){ie.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=ie.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new ie.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){ie.devices[e]={stream_ops:t}},getDevice:function(e){return ie.devices[e]},getMounts:function(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),ie.syncFSRequests++,ie.syncFSRequests>1&&p("warning: "+ie.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=ie.getMounts(ie.root.mount),r=0;function i(e){return ie.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,n){var r,i="/"===n,o=!n;if(i&&ie.root)throw new ie.ErrnoError(10);if(!i&&!o){var a=ie.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,ie.isMountpoint(r))throw new ie.ErrnoError(10);if(!ie.isDir(r.mode))throw new ie.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?ie.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount:function(e){var t=ie.lookupPath(e,{follow_mount:!1});if(!ie.isMountpoint(t.node))throw new ie.ErrnoError(28);var n=t.node,r=n.mounted,i=ie.getMounts(r);Object.keys(ie.nameTable).forEach((function(e){for(var t=ie.nameTable[e];t;){var n=t.name_next;-1!==i.indexOf(t.mount)&&ie.destroyNode(t),t=n}})),n.mounted=null;var o=n.mount.mounts.indexOf(r);n.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,n){var r=ie.lookupPath(e,{parent:!0}).node,i=Z.basename(e);if(!i||"."===i||".."===i)throw new ie.ErrnoError(28);var o=ie.mayCreate(r,i);if(o)throw new ie.ErrnoError(o);if(!r.node_ops.mknod)throw new ie.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,ie.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,ie.mknod(e,t,0)},mkdirTree:function(e,t){for(var n=e.split("/"),r="",i=0;ithis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((function(e){var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(i.responseType="arraybuffer"),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):he(i.responseText||"",!0)}(t,i)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,h("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:n},s=ie.createFile(e,t,a,r,i);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(s.stream_ops).forEach((function(e){var t=s.stream_ops[e];l[e]=function(){if(!ie.forceLoadFile(s))throw new ie.ErrnoError(29);return t.apply(null,arguments)}})),l.read=function(e,t,n,r,i){if(!ie.forceLoadFile(s))throw new ie.ErrnoError(29);var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(o.slice)for(var l=0;l>2]=r.dev,_[n+4>>2]=0,_[n+8>>2]=r.ino,_[n+12>>2]=r.mode,_[n+16>>2]=r.nlink,_[n+20>>2]=r.uid,_[n+24>>2]=r.gid,_[n+28>>2]=r.rdev,_[n+32>>2]=0,Y=[r.size>>>0,(W=r.size,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[n+40>>2]=Y[0],_[n+44>>2]=Y[1],_[n+48>>2]=4096,_[n+52>>2]=r.blocks,_[n+56>>2]=r.atime.getTime()/1e3|0,_[n+60>>2]=0,_[n+64>>2]=r.mtime.getTime()/1e3|0,_[n+68>>2]=0,_[n+72>>2]=r.ctime.getTime()/1e3|0,_[n+76>>2]=0,Y=[r.ino>>>0,(W=r.ino,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[n+80>>2]=Y[0],_[n+84>>2]=Y[1],0},doMsync:function(e,t,n,r,i){var o=v.slice(e,e+n);ie.msync(t,o,i,n,r)},doMkdir:function(e,t){return"/"===(e=Z.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),ie.mkdir(e,t,0),0},doMknod:function(e,t,n){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ie.mknod(e,t,n),0},doReadlink:function(e,t,n){if(n<=0)return-28;var r=ie.readlink(e),i=Math.min(n,S(r)),o=y[t+i];return k(r,v,t,n+1),y[t+i]=o,i},doAccess:function(e,t){if(-8&t)return-28;var n;if(!(n=ie.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&ie.nodePermissions(n,r)?-2:0},doDup:function(e,t,n){var r=ie.getStream(n);return r&&ie.close(r),ie.open(e,t,0,n,n).fd},doReadv:function(e,t,n,r){for(var i=0,o=0;o>2],s=_[t+(8*o+4)>>2],l=ie.read(e,y,a,s,r);if(l<0)return-1;if(i+=l,l>2],s=_[t+(8*o+4)>>2],l=ie.write(e,y,a,s,r);if(l<0)return-1;i+=l}return i},varargs:void 0,get:function(){return oe.varargs+=4,_[oe.varargs-4>>2]},getStr:function(e){return T(e)},getStreamFromFD:function(e){var t=ie.getStream(e);if(!t)throw new ie.ErrnoError(8);return t},get64:function(e,t){return e}};function ae(e){try{return u.grow(e-g.byteLength+65535>>>16),C(u.buffer),1}catch(e){}}var se={};function le(){if(!le.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var t in se)e[t]=se[t];var n=[];for(var t in e)n.push(t+"="+e[t]);le.strings=n}return le.strings}function ce(e,t){ce.array||(ce.array=[]);var n,r=ce.array;for(r.length=0;n=v[e++];)100===n||102===n?(t=t+7&-8,r.push(b[t>>3]),t+=8):(t=t+3&-4,r.push(_[t>>2]),t+=4);return r}var ue=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ie.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};function he(e,t,n){var r=n>0?n:S(e)+1,i=new Array(r),o=k(e,i,0,i.length);return t&&(i.length=o),i}Object.defineProperties(ue.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ie.isDir(this.mode)}},isDevice:{get:function(){return ie.isChrdev(this.mode)}}}),ie.FSNode=ue,ie.staticInit();var pe={j:function(){return 42},b:function(){U()},a:function(e,t,n){var r=ce(t,n);return X[e].apply(null,r)},d:function(e,t,n){v.copyWithin(e,t,t+n)},e:function(e){e>>>=0;var t=v.length;if(e>2147483648)return!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);if(r=Math.min(r,e+100663296),ae(Math.min(2147483648,x(Math.max(16777216,e,r),65536))))return!0}return!1},f:function(e,t){var n=0;return le().forEach((function(r,i){var o=t+n;_[e+4*i>>2]=o,function(e,t,n){for(var r=0;r>0]=e.charCodeAt(r);n||(y[t>>0]=0)}(r,o),n+=r.length+1})),0},g:function(e,t){var n=le();_[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),_[t>>2]=r,0},h:function(e){try{var t=oe.getStreamFromFD(e);return ie.close(t),0}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},i:function(e,t,n,r,i){try{var o=oe.getStreamFromFD(e),a=4294967296*n+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(ie.llseek(o,a,r),Y=[o.position>>>0,(W=o.position,+F(W)>=1?W>0?(0|$(+j(W/4294967296),4294967295))>>>0:~~+L((W-+(~~W>>>0))/4294967296)>>>0:0)],_[i>>2]=Y[0],_[i+4>>2]=Y[1],o.getdents&&0===a&&0===r&&(o.getdents=null),0)}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},c:function(e,t,n,r){try{var i=oe.getStreamFromFD(e),o=oe.doWritev(i,t,n);return _[r>>2]=o,0}catch(e){return void 0!==ie&&e instanceof ie.ErrnoError||U(e),e.errno}},k:function(e){var t=Date.now();return _[e>>2]=t/1e3|0,_[e+4>>2]=t%1e3*1e3|0,0},memory:u,table:f},fe=function(){var e={a:pe};function t(e,t){var n=e.exports;r.asm=n,z()}function n(e){t(e.instance)}function i(t){return(c||"function"!=typeof fetch?new Promise((function(e,t){e(Q())})):fetch(K,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+K+"'";return e.arrayBuffer()})).catch((function(){return Q()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){p("failed to asynchronously prepare wasm: "+e),U(e)}))}if(G(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return p("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(c||"function"!=typeof WebAssembly.instantiateStreaming||H(K)||"function"!=typeof fetch)return i(n);fetch(K,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){p("wasm streaming compile failed: "+e),p("falling back to ArrayBuffer instantiation"),i(n)}))}))}(),{}}();r.asm=fe;var de,me=r.___wasm_call_ctors=function(){return(me=r.___wasm_call_ctors=r.asm.l).apply(null,arguments)},ge=(r.___em_js__array_bounds_check_error=function(){return(r.___em_js__array_bounds_check_error=r.asm.m).apply(null,arguments)},r._emscripten_bind_CExpat_CExpat_0=function(){return(ge=r._emscripten_bind_CExpat_CExpat_0=r.asm.n).apply(null,arguments)}),ye=r._emscripten_bind_CExpat_create_0=function(){return(ye=r._emscripten_bind_CExpat_create_0=r.asm.o).apply(null,arguments)},ve=r._emscripten_bind_CExpat_destroy_0=function(){return(ve=r._emscripten_bind_CExpat_destroy_0=r.asm.p).apply(null,arguments)},_e=r._emscripten_bind_CExpat_parse_1=function(){return(_e=r._emscripten_bind_CExpat_parse_1=r.asm.q).apply(null,arguments)},be=r._emscripten_bind_CExpat_tag_0=function(){return(be=r._emscripten_bind_CExpat_tag_0=r.asm.r).apply(null,arguments)},we=r._emscripten_bind_CExpat_attrs_0=function(){return(we=r._emscripten_bind_CExpat_attrs_0=r.asm.s).apply(null,arguments)},Ee=r._emscripten_bind_CExpat_content_0=function(){return(Ee=r._emscripten_bind_CExpat_content_0=r.asm.t).apply(null,arguments)},Te=r._emscripten_bind_CExpat_startElement_0=function(){return(Te=r._emscripten_bind_CExpat_startElement_0=r.asm.u).apply(null,arguments)},ke=r._emscripten_bind_CExpat_endElement_0=function(){return(ke=r._emscripten_bind_CExpat_endElement_0=r.asm.v).apply(null,arguments)},Se=r._emscripten_bind_CExpat_characterData_0=function(){return(Se=r._emscripten_bind_CExpat_characterData_0=r.asm.w).apply(null,arguments)},xe=r._emscripten_bind_CExpat___destroy___0=function(){return(xe=r._emscripten_bind_CExpat___destroy___0=r.asm.x).apply(null,arguments)},Ce=r._emscripten_bind_CExpatJS_CExpatJS_0=function(){return(Ce=r._emscripten_bind_CExpatJS_CExpatJS_0=r.asm.y).apply(null,arguments)},Pe=r._emscripten_bind_CExpatJS_startElement_0=function(){return(Pe=r._emscripten_bind_CExpatJS_startElement_0=r.asm.z).apply(null,arguments)},Ae=r._emscripten_bind_CExpatJS_endElement_0=function(){return(Ae=r._emscripten_bind_CExpatJS_endElement_0=r.asm.A).apply(null,arguments)},Ie=r._emscripten_bind_CExpatJS_characterData_0=function(){return(Ie=r._emscripten_bind_CExpatJS_characterData_0=r.asm.B).apply(null,arguments)},De=r._emscripten_bind_CExpatJS___destroy___0=function(){return(De=r._emscripten_bind_CExpatJS___destroy___0=r.asm.C).apply(null,arguments)},Re=r._emscripten_bind_VoidPtr___destroy___0=function(){return(Re=r._emscripten_bind_VoidPtr___destroy___0=r.asm.D).apply(null,arguments)},Oe=r._malloc=function(){return(Oe=r._malloc=r.asm.E).apply(null,arguments)},Ne=(r._free=function(){return(r._free=r.asm.F).apply(null,arguments)},r.___errno_location=function(){return(Ne=r.___errno_location=r.asm.G).apply(null,arguments)});function Me(e){function n(){de||(de=!0,r.calledRun=!0,d||(r.noFSInit||ie.init.initialized||ie.init(),ne.init(),A(D),ie.ignorePermissions=!1,A(R),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)M(r.postRun.shift());A(O)}()))}B>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)N(r.preRun.shift());A(I)}(),B>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.dynCall_vi=function(){return(r.dynCall_vi=r.asm.H).apply(null,arguments)},r.asm=fe,V=function e(){de||Me(),de||(V=e)},r.run=Me,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();function Fe(){}function Le(e){return(e||Fe).__cache__}function je(e,t){var n=Le(t),r=n[e];return r||((r=Object.create((t||Fe).prototype)).ptr=e,n[e]=r)}Me(),Fe.prototype=Object.create(Fe.prototype),Fe.prototype.constructor=Fe,Fe.prototype.__class__=Fe,Fe.__cache__={},r.WrapperObject=Fe,r.getCache=Le,r.wrapPointer=je,r.castObject=function(e,t){return je(e.ptr,t)},r.NULL=je(0),r.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete Le(e.__class__)[e.ptr]},r.compare=function(e,t){return e.ptr===t.ptr},r.getPointer=function(e){return e.ptr},r.getClass=function(e){return e.__class__};var $e={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if($e.needed){for(var e=0;e<$e.temps.length;e++)r._free($e.temps[e]);$e.temps.length=0,r._free($e.buffer),$e.buffer=0,$e.size+=$e.needed,$e.needed=0}$e.buffer||($e.size+=128,$e.buffer=r._malloc($e.size),m($e.buffer)),$e.pos=0},alloc:function(e,t){m($e.buffer);var n,i=t.BYTES_PER_ELEMENT,o=e.length*i;return o=o+7&-8,$e.pos+o>=$e.size?(m(o>0),$e.needed+=o,n=r._malloc(o),$e.temps.push(n)):(n=$e.buffer+$e.pos,$e.pos+=o),n},copy:function(e,t,n){switch(n>>>=0,t.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var r=0;r=r);)++i;if(i-t>16&&e.subarray&&x)return x.decode(e.subarray(t,i));for(var o="";t>10,56320|1023&c)}}else o+=String.fromCharCode((31&a)<<6|s)}else o+=String.fromCharCode(a)}return o}function P(e,t){return e?C(E,e,t):""}function A(e,t,n,r){if(!(r>0))return 0;for(var i=n,o=n+r-1,a=0;a=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(n>=o)break;t[n++]=s}else if(s<=2047){if(n+1>=o)break;t[n++]=192|s>>6,t[n++]=128|63&s}else if(s<=65535){if(n+2>=o)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|63&s}else{if(n+3>=o)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|63&s}}return t[n]=0,n-i}function I(e){for(var t=0,n=0;n=55296&&r<=57343&&(r=65536+((1023&r)<<10)|1023&e.charCodeAt(++n)),r<=127?++t:t+=r<=2047?2:r<=65535?3:4}return t}function D(e,t){return e%t>0&&(e+=t-e%t),e}function R(e){b=e,r.HEAP8=w=new Int8Array(e),r.HEAP16=T=new Int16Array(e),r.HEAP32=k=new Int32Array(e),r.HEAPU8=E=new Uint8Array(e),r.HEAPU16=new Uint16Array(e),r.HEAPU32=new Uint32Array(e),r.HEAPF32=new Float32Array(e),r.HEAPF64=S=new Float64Array(e)}var O=r.INITIAL_MEMORY||16777216;function N(e){for(;e.length>0;){var t=e.shift();if("function"!=typeof t){var n=t.func;"number"==typeof n?void 0===t.arg?r.dynCall_v(n):r.dynCall_vi(n,t.arg):n(void 0===t.arg?null:t.arg)}else t(r)}}(d=r.wasmMemory?r.wasmMemory:new WebAssembly.Memory({initial:O/65536,maximum:32768}))&&(b=d.buffer),O=b.byteLength,R(b),k[54684]=5461776;var M=[],F=[],L=[],j=[];function $(e){M.unshift(e)}function B(e){j.unshift(e)}var V=Math.abs,G=Math.ceil,z=Math.floor,U=Math.min,H=0,q=null;function W(e){H++,r.monitorRunDependencies&&r.monitorRunDependencies(H)}function Y(e){if(H--,r.monitorRunDependencies&&r.monitorRunDependencies(H),0==H&&q){var t=q;q=null,t()}}function K(e){throw r.onAbort&&r.onAbort(e),u(e+=""),h(e),v=!0,e="abort("+e+"). Build with -s ASSERTIONS=1 for more info.",new WebAssembly.RuntimeError(e)}function Q(e){return function(e,t){return String.prototype.startsWith?e.startsWith(t):0===e.indexOf(t)}(e,"data:application/octet-stream;base64,")}r.preloadedImages={},r.preloadedAudios={};var X,J,Z,ee="graphvizlib.wasm";function te(){try{if(p)return new Uint8Array(p);throw"both async and sync fetching of the wasm failed"}catch(e){K(e)}}Q(ee)||(X=ee,ee=r.locateFile?r.locateFile(X,c):c+X);var ne,re={1186:function(e,t){var n=P(e),r=P(t);ue.createPath("/",ae.dirname(n)),ue.writeFile(ae.join("/",n),r)}};function ie(){var e=function(){var e=new Error;if(!e.stack){try{throw new Error}catch(t){e=t}if(!e.stack)return"(no stack trace available)"}return e.stack.toString()}();return r.extraStackTrace&&(e+="\n"+r.extraStackTrace()),e.replace(/\b_Z[\w\d_]+/g,(function(e){return e==e?e:e+" ["+e+"]"}))}function oe(e){return k[Le()>>2]=e,e}F.push({func:function(){Pe()}}),ne=function(){return performance.now()};var ae={splitPath:function(e){return/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1)},normalizeArray:function(e,t){for(var n=0,r=e.length-1;r>=0;r--){var i=e[r];"."===i?e.splice(r,1):".."===i?(e.splice(r,1),n++):n&&(e.splice(r,1),n--)}if(t)for(;n;n--)e.unshift("..");return e},normalize:function(e){var t="/"===e.charAt(0),n="/"===e.substr(-1);return(e=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||t||(e="."),e&&n&&(e+="/"),(t?"/":"")+e},dirname:function(e){var t=ae.splitPath(e),n=t[0],r=t[1];return n||r?(r&&(r=r.substr(0,r.length-1)),n+r):"."},basename:function(e){if("/"===e)return"/";var t=e.lastIndexOf("/");return-1===t?e:e.substr(t+1)},extname:function(e){return ae.splitPath(e)[3]},join:function(){var e=Array.prototype.slice.call(arguments,0);return ae.normalize(e.join("/"))},join2:function(e,t){return ae.normalize(e+"/"+t)}},se={resolve:function(){for(var e="",t=!1,n=arguments.length-1;n>=-1&&!t;n--){var r=n>=0?arguments[n]:ue.cwd();if("string"!=typeof r)throw new TypeError("Arguments to path.resolve must be strings");if(!r)return"";e=r+"/"+e,t="/"===r.charAt(0)}return(t?"/":"")+(e=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!t).join("/"))||"."},relative:function(e,t){function n(e){for(var t=0;t=0&&""===e[n];n--);return t>n?[]:e.slice(t,n-t+1)}e=se.resolve(e).substr(1),t=se.resolve(t).substr(1);for(var r=n(e.split("/")),i=n(t.split("/")),o=Math.min(r.length,i.length),a=o,s=0;s0&&(u(C(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(h(C(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},flush:function(e){e.output&&e.output.length>0&&(h(C(e.output,0)),e.output=[])}}},ce={ops_table:null,mount:function(e){return ce.createNode(null,"/",16895,0)},createNode:function(e,t,n,r){if(ue.isBlkdev(n)||ue.isFIFO(n))throw new ue.ErrnoError(63);ce.ops_table||(ce.ops_table={dir:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,lookup:ce.node_ops.lookup,mknod:ce.node_ops.mknod,rename:ce.node_ops.rename,unlink:ce.node_ops.unlink,rmdir:ce.node_ops.rmdir,readdir:ce.node_ops.readdir,symlink:ce.node_ops.symlink},stream:{llseek:ce.stream_ops.llseek}},file:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:{llseek:ce.stream_ops.llseek,read:ce.stream_ops.read,write:ce.stream_ops.write,allocate:ce.stream_ops.allocate,mmap:ce.stream_ops.mmap,msync:ce.stream_ops.msync}},link:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr,readlink:ce.node_ops.readlink},stream:{}},chrdev:{node:{getattr:ce.node_ops.getattr,setattr:ce.node_ops.setattr},stream:ue.chrdev_stream_ops}});var i=ue.createNode(e,t,n,r);return ue.isDir(i.mode)?(i.node_ops=ce.ops_table.dir.node,i.stream_ops=ce.ops_table.dir.stream,i.contents={}):ue.isFile(i.mode)?(i.node_ops=ce.ops_table.file.node,i.stream_ops=ce.ops_table.file.stream,i.usedBytes=0,i.contents=null):ue.isLink(i.mode)?(i.node_ops=ce.ops_table.link.node,i.stream_ops=ce.ops_table.link.stream):ue.isChrdev(i.mode)&&(i.node_ops=ce.ops_table.chrdev.node,i.stream_ops=ce.ops_table.chrdev.stream),i.timestamp=Date.now(),e&&(e.contents[t]=i),i},getFileDataAsRegularArray:function(e){if(e.contents&&e.contents.subarray){for(var t=[],n=0;n=t)){t=Math.max(t,n*(n<1048576?2:1.125)>>>0),0!=n&&(t=Math.max(t,256));var r=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(r.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t){if(0==t)return e.contents=null,void(e.usedBytes=0);if(!e.contents||e.contents.subarray){var n=e.contents;return e.contents=new Uint8Array(t),n&&e.contents.set(n.subarray(0,Math.min(t,e.usedBytes))),void(e.usedBytes=t)}if(e.contents||(e.contents=[]),e.contents.length>t)e.contents.length=t;else for(;e.contents.length=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-i,r);if(a>8&&o.subarray)t.set(o.subarray(i,i+a),n);else for(var s=0;s0||i+r8)throw new ue.ErrnoError(32);for(var i=ae.normalizeArray(e.split("/").filter((function(e){return!!e})),!1),o=ue.root,a="/",s=0;s40)throw new ue.ErrnoError(32)}}return{path:a,node:o}},getPath:function(e){for(var t;;){if(ue.isRoot(e)){var n=e.mount.mountpoint;return t?"/"!==n[n.length-1]?n+"/"+t:n+t:n}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:function(e,t){for(var n=0,r=0;r>>0)%ue.nameTable.length},hashAddNode:function(e){var t=ue.hashName(e.parent.id,e.name);e.name_next=ue.nameTable[t],ue.nameTable[t]=e},hashRemoveNode:function(e){var t=ue.hashName(e.parent.id,e.name);if(ue.nameTable[t]===e)ue.nameTable[t]=e.name_next;else for(var n=ue.nameTable[t];n;){if(n.name_next===e){n.name_next=e.name_next;break}n=n.name_next}},lookupNode:function(e,t){var n=ue.mayLookup(e);if(n)throw new ue.ErrnoError(n,e);for(var r=ue.hashName(e.id,t),i=ue.nameTable[r];i;i=i.name_next){var o=i.name;if(i.parent.id===e.id&&o===t)return i}return ue.lookup(e,t)},createNode:function(e,t,n,r){var i=new ue.FSNode(e,t,n,r);return ue.hashAddNode(i),i},destroyNode:function(e){ue.hashRemoveNode(e)},isRoot:function(e){return e===e.parent},isMountpoint:function(e){return!!e.mounted},isFile:function(e){return 32768==(61440&e)},isDir:function(e){return 16384==(61440&e)},isLink:function(e){return 40960==(61440&e)},isChrdev:function(e){return 8192==(61440&e)},isBlkdev:function(e){return 24576==(61440&e)},isFIFO:function(e){return 4096==(61440&e)},isSocket:function(e){return 49152==(49152&e)},flagModes:{r:0,rs:1052672,"r+":2,w:577,wx:705,xw:705,"w+":578,"wx+":706,"xw+":706,a:1089,ax:1217,xa:1217,"a+":1090,"ax+":1218,"xa+":1218},modeStringToFlags:function(e){var t=ue.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:function(e){var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:function(e,t){return ue.ignorePermissions||(-1===t.indexOf("r")||292&e.mode)&&(-1===t.indexOf("w")||146&e.mode)&&(-1===t.indexOf("x")||73&e.mode)?0:2},mayLookup:function(e){var t=ue.nodePermissions(e,"x");return t||(e.node_ops.lookup?0:2)},mayCreate:function(e,t){try{return ue.lookupNode(e,t),20}catch(e){}return ue.nodePermissions(e,"wx")},mayDelete:function(e,t,n){var r;try{r=ue.lookupNode(e,t)}catch(e){return e.errno}var i=ue.nodePermissions(e,"wx");if(i)return i;if(n){if(!ue.isDir(r.mode))return 54;if(ue.isRoot(r)||ue.getPath(r)===ue.cwd())return 10}else if(ue.isDir(r.mode))return 31;return 0},mayOpen:function(e,t){return e?ue.isLink(e.mode)?32:ue.isDir(e.mode)&&("r"!==ue.flagsToPermissionString(t)||512&t)?31:ue.nodePermissions(e,ue.flagsToPermissionString(t)):44},MAX_OPEN_FDS:4096,nextfd:function(e,t){e=e||0,t=t||ue.MAX_OPEN_FDS;for(var n=e;n<=t;n++)if(!ue.streams[n])return n;throw new ue.ErrnoError(33)},getStream:function(e){return ue.streams[e]},createStream:function(e,t,n){ue.FSStream||(ue.FSStream=function(){},ue.FSStream.prototype={object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return 0!=(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}}});var r=new ue.FSStream;for(var i in e)r[i]=e[i];e=r;var o=ue.nextfd(t,n);return e.fd=o,ue.streams[o]=e,e},closeStream:function(e){ue.streams[e]=null},chrdev_stream_ops:{open:function(e){var t=ue.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:function(){throw new ue.ErrnoError(70)}},major:function(e){return e>>8},minor:function(e){return 255&e},makedev:function(e,t){return e<<8|t},registerDevice:function(e,t){ue.devices[e]={stream_ops:t}},getDevice:function(e){return ue.devices[e]},getMounts:function(e){for(var t=[],n=[e];n.length;){var r=n.pop();t.push(r),n.push.apply(n,r.mounts)}return t},syncfs:function(e,t){"function"==typeof e&&(t=e,e=!1),ue.syncFSRequests++,ue.syncFSRequests>1&&h("warning: "+ue.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var n=ue.getMounts(ue.root.mount),r=0;function i(e){return ue.syncFSRequests--,t(e)}function o(e){if(e)return o.errored?void 0:(o.errored=!0,i(e));++r>=n.length&&i(null)}n.forEach((function(t){if(!t.type.syncfs)return o(null);t.type.syncfs(t,e,o)}))},mount:function(e,t,n){var r,i="/"===n,o=!n;if(i&&ue.root)throw new ue.ErrnoError(10);if(!i&&!o){var a=ue.lookupPath(n,{follow_mount:!1});if(n=a.path,r=a.node,ue.isMountpoint(r))throw new ue.ErrnoError(10);if(!ue.isDir(r.mode))throw new ue.ErrnoError(54)}var s={type:e,opts:t,mountpoint:n,mounts:[]},l=e.mount(s);return l.mount=s,s.root=l,i?ue.root=l:r&&(r.mounted=s,r.mount&&r.mount.mounts.push(s)),l},unmount:function(e){var t=ue.lookupPath(e,{follow_mount:!1});if(!ue.isMountpoint(t.node))throw new ue.ErrnoError(28);var n=t.node,r=n.mounted,i=ue.getMounts(r);Object.keys(ue.nameTable).forEach((function(e){for(var t=ue.nameTable[e];t;){var n=t.name_next;-1!==i.indexOf(t.mount)&&ue.destroyNode(t),t=n}})),n.mounted=null;var o=n.mount.mounts.indexOf(r);n.mount.mounts.splice(o,1)},lookup:function(e,t){return e.node_ops.lookup(e,t)},mknod:function(e,t,n){var r=ue.lookupPath(e,{parent:!0}).node,i=ae.basename(e);if(!i||"."===i||".."===i)throw new ue.ErrnoError(28);var o=ue.mayCreate(r,i);if(o)throw new ue.ErrnoError(o);if(!r.node_ops.mknod)throw new ue.ErrnoError(63);return r.node_ops.mknod(r,i,t,n)},create:function(e,t){return t=void 0!==t?t:438,t&=4095,t|=32768,ue.mknod(e,t,0)},mkdir:function(e,t){return t=void 0!==t?t:511,t&=1023,t|=16384,ue.mknod(e,t,0)},mkdirTree:function(e,t){for(var n=e.split("/"),r="",i=0;ithis.length-1||e<0)){var t=e%this.chunkSize,n=e/this.chunkSize|0;return this.getter(n)[t]}},o.prototype.setDataGetter=function(e){this.getter=e},o.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",n,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+n+". Status: "+e.status);var t,r=Number(e.getResponseHeader("Content-length")),i=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,o=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;i||(a=r);var s=this;s.setDataGetter((function(e){var t=e*a,i=(e+1)*a-1;if(i=Math.min(i,r-1),void 0===s.chunks[e]&&(s.chunks[e]=function(e,t){if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>r-1)throw new Error("only "+r+" bytes available! programmer error!");var i=new XMLHttpRequest;if(i.open("GET",n,!1),r!==a&&i.setRequestHeader("Range","bytes="+e+"-"+t),"undefined"!=typeof Uint8Array&&(i.responseType="arraybuffer"),i.overrideMimeType&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.send(null),!(i.status>=200&&i.status<300||304===i.status))throw new Error("Couldn't load "+n+". Status: "+i.status);return void 0!==i.response?new Uint8Array(i.response||[]):ke(i.responseText||"",!0)}(t,i)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!o&&r||(a=r=1,r=this.getter(0).length,a=r,u("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=r,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a={isDevice:!1,url:n},s=ue.createFile(e,t,a,r,i);a.contents?s.contents=a.contents:a.url&&(s.contents=null,s.url=a.url),Object.defineProperties(s,{usedBytes:{get:function(){return this.contents.length}}});var l={};return Object.keys(s.stream_ops).forEach((function(e){var t=s.stream_ops[e];l[e]=function(){if(!ue.forceLoadFile(s))throw new ue.ErrnoError(29);return t.apply(null,arguments)}})),l.read=function(e,t,n,r,i){if(!ue.forceLoadFile(s))throw new ue.ErrnoError(29);var o=e.node.contents;if(i>=o.length)return 0;var a=Math.min(o.length-i,r);if(o.slice)for(var l=0;l>2]=r.dev,k[n+4>>2]=0,k[n+8>>2]=r.ino,k[n+12>>2]=r.mode,k[n+16>>2]=r.nlink,k[n+20>>2]=r.uid,k[n+24>>2]=r.gid,k[n+28>>2]=r.rdev,k[n+32>>2]=0,Z=[r.size>>>0,(J=r.size,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[n+40>>2]=Z[0],k[n+44>>2]=Z[1],k[n+48>>2]=4096,k[n+52>>2]=r.blocks,k[n+56>>2]=r.atime.getTime()/1e3|0,k[n+60>>2]=0,k[n+64>>2]=r.mtime.getTime()/1e3|0,k[n+68>>2]=0,k[n+72>>2]=r.ctime.getTime()/1e3|0,k[n+76>>2]=0,Z=[r.ino>>>0,(J=r.ino,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[n+80>>2]=Z[0],k[n+84>>2]=Z[1],0},doMsync:function(e,t,n,r,i){var o=E.slice(e,e+n);ue.msync(t,o,i,n,r)},doMkdir:function(e,t){return"/"===(e=ae.normalize(e))[e.length-1]&&(e=e.substr(0,e.length-1)),ue.mkdir(e,t,0),0},doMknod:function(e,t,n){switch(61440&t){case 32768:case 8192:case 24576:case 4096:case 49152:break;default:return-28}return ue.mknod(e,t,n),0},doReadlink:function(e,t,n){if(n<=0)return-28;var r=ue.readlink(e),i=Math.min(n,I(r)),o=w[t+i];return A(r,E,t,n+1),w[t+i]=o,i},doAccess:function(e,t){if(-8&t)return-28;var n;if(!(n=ue.lookupPath(e,{follow:!0}).node))return-44;var r="";return 4&t&&(r+="r"),2&t&&(r+="w"),1&t&&(r+="x"),r&&ue.nodePermissions(n,r)?-2:0},doDup:function(e,t,n){var r=ue.getStream(n);return r&&ue.close(r),ue.open(e,t,0,n,n).fd},doReadv:function(e,t,n,r){for(var i=0,o=0;o>2],s=k[t+(8*o+4)>>2],l=ue.read(e,w,a,s,r);if(l<0)return-1;if(i+=l,l>2],s=k[t+(8*o+4)>>2],l=ue.write(e,w,a,s,r);if(l<0)return-1;i+=l}return i},varargs:void 0,get:function(){return he.varargs+=4,k[he.varargs-4>>2]},getStr:function(e){return P(e)},getStreamFromFD:function(e){var t=ue.getStream(e);if(!t)throw new ue.ErrnoError(8);return t},get64:function(e,t){return e}},pe=0;function fe(e){try{return d.grow(e-b.byteLength+65535>>>16),R(d.buffer),1}catch(e){}}var de={};function me(){if(!me.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:s||"./this.program"};for(var t in de)e[t]=de[t];var n=[];for(var t in e)n.push(t+"="+e[t]);me.strings=n}return me.strings}function ge(e){return e%4==0&&(e%100!=0||e%400==0)}function ye(e,t){for(var n=0,r=0;r<=t;n+=e[r++]);return n}var ve=[31,29,31,30,31,30,31,31,30,31,30,31],_e=[31,28,31,30,31,30,31,31,30,31,30,31];function be(e,t){for(var n=new Date(e.getTime());t>0;){var r=ge(n.getFullYear()),i=n.getMonth(),o=(r?ve:_e)[i];if(!(t>o-n.getDate()))return n.setDate(n.getDate()+t),n;t-=o-n.getDate()+1,n.setDate(1),i<11?n.setMonth(i+1):(n.setMonth(0),n.setFullYear(n.getFullYear()+1))}return n}function we(e,t,n,r){var i=k[r+40>>2],o={tm_sec:k[r>>2],tm_min:k[r+4>>2],tm_hour:k[r+8>>2],tm_mday:k[r+12>>2],tm_mon:k[r+16>>2],tm_year:k[r+20>>2],tm_wday:k[r+24>>2],tm_yday:k[r+28>>2],tm_isdst:k[r+32>>2],tm_gmtoff:k[r+36>>2],tm_zone:i?P(i):""},a=P(n),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var l in s)a=a.replace(new RegExp(l,"g"),s[l]);var c=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],u=["January","February","March","April","May","June","July","August","September","October","November","December"];function h(e,t,n){for(var r="number"==typeof e?e.toString():e||"";r.length0?1:0}var r;return 0===(r=n(e.getFullYear()-t.getFullYear()))&&0===(r=n(e.getMonth()-t.getMonth()))&&(r=n(e.getDate()-t.getDate())),r}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function m(e){var t=be(new Date(e.tm_year+1900,0,1),e.tm_yday),n=new Date(t.getFullYear(),0,4),r=new Date(t.getFullYear()+1,0,4),i=d(n),o=d(r);return f(i,t)<=0?f(o,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var g={"%a":function(e){return c[e.tm_wday].substring(0,3)},"%A":function(e){return c[e.tm_wday]},"%b":function(e){return u[e.tm_mon].substring(0,3)},"%B":function(e){return u[e.tm_mon]},"%C":function(e){return p((e.tm_year+1900)/100|0,2)},"%d":function(e){return p(e.tm_mday,2)},"%e":function(e){return h(e.tm_mday,2," ")},"%g":function(e){return m(e).toString().substring(2)},"%G":function(e){return m(e)},"%H":function(e){return p(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),p(t,2)},"%j":function(e){return p(e.tm_mday+ye(ge(e.tm_year+1900)?ve:_e,e.tm_mon-1),3)},"%m":function(e){return p(e.tm_mon+1,2)},"%M":function(e){return p(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return p(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=new Date(e.tm_year+1900,0,1),n=0===t.getDay()?t:be(t,7-t.getDay()),r=new Date(e.tm_year+1900,e.tm_mon,e.tm_mday);if(f(n,r)<0){var i=ye(ge(r.getFullYear())?ve:_e,r.getMonth()-1)-31,o=31-n.getDate()+i+r.getDate();return p(Math.ceil(o/7),2)}return 0===f(n,t)?"01":"00"},"%V":function(e){var t,n=new Date(e.tm_year+1900,0,4),r=new Date(e.tm_year+1901,0,4),i=d(n),o=d(r),a=be(new Date(e.tm_year+1900,0,1),e.tm_yday);return f(a,i)<0?"53":f(o,a)<=0?"01":(t=i.getFullYear()=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(n?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var l in g)a.indexOf(l)>=0&&(a=a.replace(new RegExp(l,"g"),g[l](o)));var y=ke(a,!1);return y.length>t?0:(function(e,t){w.set(e,t)}(y,e),y.length-1)}function Ee(e,t){Ee.array||(Ee.array=[]);var n,r=Ee.array;for(r.length=0;n=E[e++];)100===n||102===n?(t=t+7&-8,r.push(S[t>>3]),t+=8):(t=t+3&-4,r.push(k[t>>2]),t+=4);return r}var Te=function(e,t,n,r){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=ue.nextInode++,this.name=t,this.mode=n,this.node_ops={},this.stream_ops={},this.rdev=r};function ke(e,t,n){var r=n>0?n:I(e)+1,i=new Array(r),o=A(e,i,0,i.length);return t&&(i.length=o),i}Object.defineProperties(Te.prototype,{read:{get:function(){return 365==(365&this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return 146==(146&this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return ue.isDir(this.mode)}},isDevice:{get:function(){return ue.isChrdev(this.mode)}}}),ue.FSNode=Te,ue.staticInit();var Se={L:function(e,t){return function(e,t){var n;if(0===e)n=Date.now();else{if(1!==e&&4!==e)return oe(28),-1;n=ne()}return k[t>>2]=n/1e3|0,k[t+4>>2]=n%1e3*1e3*1e3|0,0}(e,t)},k:function(e){return Ne(e)},j:function(e,t,n){throw e},J:function(e,t){return oe(63),-1},Q:function(e,t){try{return e=he.getStr(e),he.doAccess(e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},x:function(e,t,n){he.varargs=n;try{var r=he.getStreamFromFD(e);switch(t){case 0:return(i=he.get())<0?-28:ue.open(r.path,r.flags,0,i).fd;case 1:case 2:return 0;case 3:return r.flags;case 4:var i=he.get();return r.flags|=i,0;case 12:return i=he.get(),T[i+0>>1]=2,0;case 13:case 14:return 0;case 16:case 8:return-28;case 9:return oe(28),-1;default:return-28}}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},S:function(e,t){try{var n=he.getStreamFromFD(e);return he.doStat(ue.stat,n.path,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},p:function(){return 42},N:function(e,t,n){he.varargs=n;try{var r=he.getStreamFromFD(e);switch(t){case 21509:case 21505:return r.tty?0:-59;case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:return r.tty?0:-59;case 21519:if(!r.tty)return-59;var i=he.get();return k[i>>2]=0,0;case 21520:return r.tty?-28:-59;case 21531:return i=he.get(),ue.ioctl(r,t,i);case 21523:case 21524:return r.tty?0:-59;default:K("bad ioctl syscall "+t)}}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},O:function(e,t,n,r,i,o){try{return function(e,t,n,r,i,o){var a;o<<=12;var s=!1;if(0!=(16&r)&&e%16384!=0)return-28;if(0!=(32&r)){if(!(a=Be(16384,t)))return-48;je(a,0,t),s=!0}else{var l=ue.getStream(i);if(!l)return-8;var c=ue.mmap(l,E,e,t,o,n,r);a=c.ptr,s=c.allocated}return he.mappings[a]={malloc:a,len:t,allocated:s,fd:i,prot:n,flags:r,offset:o},a}(e,t,n,r,i,o)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},P:function(e,t){try{return function(e,t){if(-1==(0|e)||0===t)return-28;var n=he.mappings[e];if(!n)return 0;if(t===n.len){var r=ue.getStream(n.fd);2&n.prot&&he.doMsync(e,r,t,n.flags,n.offset),ue.munmap(r),he.mappings[e]=null,n.allocated&&Me(n.malloc)}return 0}(e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},y:function(e,t,n){he.varargs=n;try{var r=he.getStr(e),i=he.get();return ue.open(r,t,i).fd}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},R:function(e,t){try{return e=he.getStr(e),he.doStat(ue.stat,e,t)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},K:function(e){try{return e=he.getStr(e),ue.unlink(e),0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),-e.errno}},v:function(){K()},B:function(e,t,n){var r=Ee(t,n);return re[e].apply(null,r)},d:function(e,t){!function(e,t){throw $e(e,t||1),"longjmp"}(e,t)},D:function(e,t,n){E.copyWithin(e,t,t+n)},E:function(e){e>>>=0;var t=E.length;if(e>2147483648)return!1;for(var n=1;n<=4;n*=2){var r=t*(1+.2/n);if(r=Math.min(r,e+100663296),fe(Math.min(2147483648,D(Math.max(16777216,e,r),65536))))return!0}return!1},H:function(e,t){var n=0;return me().forEach((function(r,i){var o=t+n;k[e+4*i>>2]=o,function(e,t,n){for(var r=0;r>0]=e.charCodeAt(r);n||(w[t>>0]=0)}(r,o),n+=r.length+1})),0},I:function(e,t){var n=me();k[e>>2]=n.length;var r=0;return n.forEach((function(e){r+=e.length+1})),k[t>>2]=r,0},l:function(e){!function(e,t){t&&f&&0===e||(f||(v=!0,r.onExit&&r.onExit(e)),l(e,new rt(e)))}(e)},o:function(e){try{var t=he.getStreamFromFD(e);return ue.close(t),0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},G:function(e,t){try{var n=he.getStreamFromFD(e),r=n.tty?2:ue.isDir(n.mode)?3:ue.isLink(n.mode)?7:4;return w[t>>0]=r,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},M:function(e,t,n,r){try{var i=he.getStreamFromFD(e),o=he.doReadv(i,t,n);return k[r>>2]=o,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},C:function(e,t,n,r,i){try{var o=he.getStreamFromFD(e),a=4294967296*n+(t>>>0);return a<=-9007199254740992||a>=9007199254740992?-61:(ue.llseek(o,a,r),Z=[o.position>>>0,(J=o.position,+V(J)>=1?J>0?(0|U(+z(J/4294967296),4294967295))>>>0:~~+G((J-+(~~J>>>0))/4294967296)>>>0:0)],k[i>>2]=Z[0],k[i+4>>2]=Z[1],o.getdents&&0===a&&0===r&&(o.getdents=null),0)}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},w:function(e,t,n,r){try{var i=he.getStreamFromFD(e),o=he.doWritev(i,t,n);return k[r>>2]=o,0}catch(e){return void 0!==ue&&e instanceof ue.ErrnoError||K(e),e.errno}},a:function(){return 0|m},V:function(e){var t=Date.now();return k[e>>2]=t/1e3|0,k[e+4>>2]=t%1e3*1e3|0,0},W:function(e){var t=tt();try{return Ze(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},T:function(e,t){var n=tt();try{return et(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},u:function(e){var t=tt();try{return We(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},f:function(e,t){var n=tt();try{return Ye(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},e:function(e,t,n){var r=tt();try{return Ke(e,t,n)}catch(e){if(nt(r),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},g:function(e,t,n,r){var i=tt();try{return Qe(e,t,n,r)}catch(e){if(nt(i),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},m:function(e,t,n,r,i){var o=tt();try{return Xe(e,t,n,r,i)}catch(e){if(nt(o),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},U:function(e,t,n,r,i,o,a){var s=tt();try{return Je(e,t,n,r,i,o,a)}catch(e){if(nt(s),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},r:function(e){var t=tt();try{Ve(e)}catch(e){if(nt(t),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},h:function(e,t){var n=tt();try{Ge(e,t)}catch(e){if(nt(n),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},n:function(e,t,n){var r=tt();try{ze(e,t,n)}catch(e){if(nt(r),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},t:function(e,t,n,r){var i=tt();try{Ue(e,t,n,r)}catch(e){if(nt(i),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},s:function(e,t,n,r,i){var o=tt();try{He(e,t,n,r,i)}catch(e){if(nt(o),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},q:function(e,t,n,r,i,o){var a=tt();try{qe(e,t,n,r,i,o)}catch(e){if(nt(a),e!==e+0&&"longjmp"!==e)throw e;$e(1,0)}},memory:d,i:function e(t,n,r,i){n|=0,r|=0,i|=0;var o=0;for(pe=pe+1|0,k[(t|=0)>>2]=pe;(0|o)<(0|i);){if(0==(0|k[r+(o<<3)>>2]))return k[r+(o<<3)>>2]=pe,k[r+(4+(o<<3))>>2]=n,k[r+(8+(o<<3))>>2]=0,g(0|i),0|r;o=o+1|0}return r=0|e(0|t,0|n,0|(r=0|Fe(0|r,8*(1+(i=2*i|0)|0)|0)),0|i),g(0|i),0|r},b:function(e){g(0|e)},F:function(e,t,n,r){return we(e,t,n,r)},table:y,c:function(e,t,n){e|=0,t|=0,n|=0;for(var r=0,i=0;(0|r)<(0|n)&&0!=(0|(i=0|k[t+(r<<3)>>2]));){if((0|i)==(0|e))return 0|k[t+(4+(r<<3))>>2];r=r+1|0}return 0},z:function(e){var t=Date.now()/1e3|0;return e&&(k[e>>2]=t),t},A:function(e){return 0!==e&&je(e,0,16),0}},xe=function(){var e={a:Se};function t(e,t){var n=e.exports;r.asm=n,Y()}function n(e){t(e.instance)}function i(t){return(p||"function"!=typeof fetch?new Promise((function(e,t){e(te())})):fetch(ee,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+ee+"'";return e.arrayBuffer()})).catch((function(){return te()}))).then((function(t){return WebAssembly.instantiate(t,e)})).then(t,(function(e){h("failed to asynchronously prepare wasm: "+e),K(e)}))}if(W(),r.instantiateWasm)try{return r.instantiateWasm(e,t)}catch(e){return h("Module.instantiateWasm callback failed with error: "+e),!1}return function(){if(p||"function"!=typeof WebAssembly.instantiateStreaming||Q(ee)||"function"!=typeof fetch)return i(n);fetch(ee,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(n,(function(e){h("wasm streaming compile failed: "+e),h("falling back to ArrayBuffer instantiation"),i(n)}))}))}(),{}}();r.asm=xe;var Ce,Pe=r.___wasm_call_ctors=function(){return(Pe=r.___wasm_call_ctors=r.asm.X).apply(null,arguments)},Ae=(r.___em_js__array_bounds_check_error=function(){return(r.___em_js__array_bounds_check_error=r.asm.Y).apply(null,arguments)},r._emscripten_bind_VoidPtr___destroy___0=function(){return(Ae=r._emscripten_bind_VoidPtr___destroy___0=r.asm.Z).apply(null,arguments)}),Ie=r._emscripten_bind_Main_layout_3=function(){return(Ie=r._emscripten_bind_Main_layout_3=r.asm._).apply(null,arguments)},De=r._emscripten_bind_Main_lastError_0=function(){return(De=r._emscripten_bind_Main_lastError_0=r.asm.$).apply(null,arguments)},Re=r._emscripten_bind_Main_createFile_2=function(){return(Re=r._emscripten_bind_Main_createFile_2=r.asm.aa).apply(null,arguments)},Oe=r._emscripten_bind_Main___destroy___0=function(){return(Oe=r._emscripten_bind_Main___destroy___0=r.asm.ba).apply(null,arguments)},Ne=r._malloc=function(){return(Ne=r._malloc=r.asm.ca).apply(null,arguments)},Me=r._free=function(){return(Me=r._free=r.asm.da).apply(null,arguments)},Fe=r._realloc=function(){return(Fe=r._realloc=r.asm.ea).apply(null,arguments)},Le=r.___errno_location=function(){return(Le=r.___errno_location=r.asm.fa).apply(null,arguments)},je=r._memset=function(){return(je=r._memset=r.asm.ga).apply(null,arguments)},$e=r._setThrew=function(){return($e=r._setThrew=r.asm.ha).apply(null,arguments)},Be=r._memalign=function(){return(Be=r._memalign=r.asm.ia).apply(null,arguments)},Ve=r.dynCall_v=function(){return(Ve=r.dynCall_v=r.asm.ja).apply(null,arguments)},Ge=r.dynCall_vi=function(){return(Ge=r.dynCall_vi=r.asm.ka).apply(null,arguments)},ze=r.dynCall_vii=function(){return(ze=r.dynCall_vii=r.asm.la).apply(null,arguments)},Ue=r.dynCall_viii=function(){return(Ue=r.dynCall_viii=r.asm.ma).apply(null,arguments)},He=r.dynCall_viiii=function(){return(He=r.dynCall_viiii=r.asm.na).apply(null,arguments)},qe=r.dynCall_viiiii=function(){return(qe=r.dynCall_viiiii=r.asm.oa).apply(null,arguments)},We=r.dynCall_i=function(){return(We=r.dynCall_i=r.asm.pa).apply(null,arguments)},Ye=r.dynCall_ii=function(){return(Ye=r.dynCall_ii=r.asm.qa).apply(null,arguments)},Ke=r.dynCall_iii=function(){return(Ke=r.dynCall_iii=r.asm.ra).apply(null,arguments)},Qe=r.dynCall_iiii=function(){return(Qe=r.dynCall_iiii=r.asm.sa).apply(null,arguments)},Xe=r.dynCall_iiiii=function(){return(Xe=r.dynCall_iiiii=r.asm.ta).apply(null,arguments)},Je=r.dynCall_iiiiiii=function(){return(Je=r.dynCall_iiiiiii=r.asm.ua).apply(null,arguments)},Ze=r.dynCall_d=function(){return(Ze=r.dynCall_d=r.asm.va).apply(null,arguments)},et=r.dynCall_di=function(){return(et=r.dynCall_di=r.asm.wa).apply(null,arguments)},tt=r.stackSave=function(){return(tt=r.stackSave=r.asm.xa).apply(null,arguments)},nt=r.stackRestore=function(){return(nt=r.stackRestore=r.asm.ya).apply(null,arguments)};function rt(e){this.name="ExitStatus",this.message="Program terminated with exit("+e+")",this.status=e}function it(e){function n(){Ce||(Ce=!0,r.calledRun=!0,v||(r.noFSInit||ue.init.initialized||ue.init(),le.init(),N(F),ue.ignorePermissions=!1,N(L),t(r),r.onRuntimeInitialized&&r.onRuntimeInitialized(),function(){if(r.postRun)for("function"==typeof r.postRun&&(r.postRun=[r.postRun]);r.postRun.length;)B(r.postRun.shift());N(j)}()))}H>0||(function(){if(r.preRun)for("function"==typeof r.preRun&&(r.preRun=[r.preRun]);r.preRun.length;)$(r.preRun.shift());N(M)}(),H>0||(r.setStatus?(r.setStatus("Running..."),setTimeout((function(){setTimeout((function(){r.setStatus("")}),1),n()}),1)):n()))}if(r.asm=xe,q=function e(){Ce||it(),Ce||(q=e)},r.run=it,r.preInit)for("function"==typeof r.preInit&&(r.preInit=[r.preInit]);r.preInit.length>0;)r.preInit.pop()();function ot(){}function at(e){return(e||ot).__cache__}function st(e,t){var n=at(t),r=n[e];return r||((r=Object.create((t||ot).prototype)).ptr=e,n[e]=r)}f=!0,it(),ot.prototype=Object.create(ot.prototype),ot.prototype.constructor=ot,ot.prototype.__class__=ot,ot.__cache__={},r.WrapperObject=ot,r.getCache=at,r.wrapPointer=st,r.castObject=function(e,t){return st(e.ptr,t)},r.NULL=st(0),r.destroy=function(e){if(!e.__destroy__)throw"Error: Cannot destroy object. (Did you create it yourself?)";e.__destroy__(),delete at(e.__class__)[e.ptr]},r.compare=function(e,t){return e.ptr===t.ptr},r.getPointer=function(e){return e.ptr},r.getClass=function(e){return e.__class__};var lt={buffer:0,size:0,pos:0,temps:[],needed:0,prepare:function(){if(lt.needed){for(var e=0;e=lt.size?(_(o>0),lt.needed+=o,n=r._malloc(o),lt.temps.push(n)):(n=lt.buffer+lt.pos,lt.pos+=o),n},copy:function(e,t,n){switch(n>>>=0,t.BYTES_PER_ELEMENT){case 2:n>>>=1;break;case 4:n>>>=2;break;case 8:n>>>=3}for(var r=0;r\n\n'}}function imagesToFiles(e){return e.map(imageToFile)}function createFiles(e,t){var n=__assign({images:[],files:[]},t);__spreadArrays$1(n.files,imagesToFiles(n.images)).forEach((function(t){return e.Main.prototype.createFile(t.path,t.data)}))}var graphviz={layout:function(e,t,n,r){return void 0===t&&(t="svg"),void 0===n&&(n="dot"),e?loadWasm(graphvizlib$1,null==r?void 0:r.wasmFolder).then((function(i){createFiles(i,r);var o=i.Main.prototype.layout(e,t,n);if(!o)throw new Error(i.Main.prototype.lastError());return o})):Promise.resolve("")},circo:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"circo",n)},dot:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"dot",n)},fdp:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"fdp",n)},neato:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"neato",n)},osage:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"osage",n)},patchwork:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"patchwork",n)},twopi:function(e,t,n){return void 0===t&&(t="svg"),this.layout(e,t,"twopi",n)}},escapeReplacements={amp:"&",lt:"<",gt:">",quot:'"',"#39":"'"};function unescape(e){return e.text.replace(/&(amp|lt|gt|quot|#39);/g,(function(e,t){return escapeReplacements[t]}))}function Code(e){const t=react_7(null),[n,r]=react_6("txt"),[i,o]=react_6("");return react_12(()=>{t.current&&monaco.editor.colorize(i||"",n||"text",{tabSize:2}).then(e=>{t.current.innerHTML=e},e=>{console.error(e)})},[t,i,n]),react_5(()=>{e.code!=i&&o(e.code),e.language!=n&&r(e.language)}),react.createElement("pre",{ref:t,className:"vs"},i)}function Dot(e){const[t,n]=react_6("Loading..."),[r,i]=react_6();return react_5(()=>{graphviz.dot(e.code,"svg",{wasmFolder:"wasm"}).then(e=>{i(""),n(e)}).catch(e=>{i(e.message)})},[e.code]),react.createElement(react.Fragment,null,r&&react.createElement("pre",null,r),react.createElement(DownloadSvg,{dangerouslySetInnerHTML:{__html:t}}))}function renderMarkdown(e,t=0){if("type"in e){if("heading"!==e.type){if("code"===e.type)return"sequence"==e.lang?react.createElement(SequenceDiagram,{key:t,input:unescape(e)||""}):"dot"==e.lang?react.createElement(Dot,{key:t,code:unescape(e)||""}):react.createElement(Code,{key:t,language:e.lang||"",code:unescape(e)});if("paragraph"===e.type)return"tokens"in e?react.createElement("p",{key:t},e.tokens.map(renderMarkdown)):react.createElement("p",{key:t},unescape(e));if("blockquote"===e.type)return"tokens"in e?react.createElement("blockquote",{key:t},e.tokens.map(renderMarkdown)):react.createElement("blockquote",{key:t},unescape(e));if("em"===e.type)return"tokens"in e?react.createElement("em",{key:t},e.tokens.map(renderMarkdown)):react.createElement("em",{key:t},unescape(e));if("strong"===e.type)return"tokens"in e?react.createElement("b",{key:t},e.tokens.map(renderMarkdown)):react.createElement("b",{key:t},unescape(e));if("html"===e.type)return react.createElement("span",{key:t},JSON.stringify(e.raw,null,2));if("text"===e.type)return"tokens"in e?react.createElement("span",{key:t},e.tokens.map(renderMarkdown)):react.createElement("span",{key:t},unescape(e));if("codespan"===e.type)return react.createElement("code",{key:t},unescape(e));if("link"===e.type)return react.createElement("span",{key:t},unescape(e));if("space"===e.type)return react.createElement("div",{key:t,className:"my-2"});if("escape"===e.type)return react.createElement("span",{key:t},unescape(e));if("hr"===e.type)return react.createElement("hr",{key:t});if("list_item"===e.type)return"tokens"in e?react.createElement("li",{key:t},e.tokens.map(renderMarkdown)):react.createElement("li",{key:t},unescape(e));if("list"===e.type){const n=e;return n.ordered?react.createElement("ol",{key:t,start:n.start},n.items.map(renderMarkdown)):react.createElement("ul",{key:t},n.items.map(renderMarkdown))}return react.createElement("span",{key:t,style:{color:"red!important"}},e.raw)}switch(e.depth){case 1:return react.createElement("h1",{key:t},unescape(e));case 2:return react.createElement("h2",{key:t},unescape(e));case 3:return react.createElement("h3",{key:t},unescape(e));case 4:return react.createElement("h4",{key:t},unescape(e));case 5:return react.createElement("h5",{key:t},unescape(e));default:return react.createElement("h6",{key:t},unescape(e))}}return react.createElement("code",{key:t,style:{color:"orange!important"}},JSON.stringify(e,null,2))}function saveSize(e){localStorage.setItem("w-size",JSON.stringify({size:e}))}function loadSize(){try{const e=JSON.parse(localStorage.getItem("w-size")||"{}");if("number"==typeof e.size&&!isNaN(e.size)&&e.size>=0)return e.size}catch{}return.3*window.innerWidth}function Editor$1(e){const t=react_7(),[n,r]=react_6(null),[i,o]=react_6(!1),[a,s]=react_6(!1),[l,c]=react_6(null),[u,h]=react_6([]),p=useRouteMatch(),f=useLocation(),d=useAuth(),m="notepadId"in p.params,g=e.readonly||m,[y,v]=react_6(e.readonly?0:loadSize()),[_,b]=react_6(),[,w]=react_6(!1),[E,T]=react_6(null),[k,S]=react_6(null);let x=null;react_5(()=>{const e=new URLSearchParams(f.search);b(e.get("t")||""),e.has("open")&&v(loadSize())},[f.search]);const C=g?"vs-disabled":"vs";async function P(){const e=t.current.getValue();o(!0);const{ref:n,succeed:r,owner:i}=await newNotebookWithContent(e);o(!1),r&&(logEvent$1("make_copy"),v(loadSize()),navigateTo(`/notebook/${i}/${n.key}`))}react_5(()=>{if("notebook"in p.params&&p.params.notebook){const e=openByHash(p.params.user,p.params.notebook);r(e)}else r(null)},[p.url]),react_5(()=>{if(t.current)if(monaco.editor.defineTheme("vs-disabled",{base:"vs",inherit:!0,rules:[],colors:{"editor.background":"#eeeeee"}}),monaco.editor.setTheme(C),t.current.render(),x=null,l&&(l.dispose(),t.current.setValue("")),n){t.current.setValue("");let e={defaultText:DEFAULT_EXAMPLE};d.uid&&(e.userId=d.uid),c(Firepad.fromMonaco(n,t.current,e))}else g&&_&&(c(null),t.current.setValue(_||""))},[t.current,n,_,g]),react_5(()=>{l&&l.on("synced",(function(e){s(!e)}))},[l]),react_5(()=>{l&&d.uid&&l.setUserId(d.uid)},[d.data]),react_5(()=>{t.current&&t.current.layout()},[y]);let A=!1;for(let e of u)if("type"in e&&"heading"==e.type){document.title=e.text+" - Diagrams",x=e.text,A=!0;break}A||(document.title="Untitled document - Diagrams");const I=u.map(renderMarkdown);return react_5(()=>{n?(n.child("meta").once("value",(function(e){S(e||null)})),x&&n.child("meta/title").set(x,e=>{e&&console.log("err, cant set meta")})):S(null)},[n,x]),react_5(()=>{k&&index_cjs$3.database().ref().child(`users/${k.child("uid").val()}/profile`).once("value",(function(e){T(e.toJSON())}))},[k]),react.createElement("div",{className:0==y?"fullscreen":""},react.createElement(ResizeableSidebar,{size:y,onResize:e=>{v(e),saveSize(e)}},react.createElement("div",{className:"tools d-flex flex-justify-between",style:{width:y}},react.createElement("div",{className:"p-2 d-flex"},_?react.createElement("div",{className:"flex-self-center ml-2"},react.createElement("span",{className:"css-truncate css-truncate-overflow"},x)):E?react.createElement(react.Fragment,null,react.createElement("img",{className:"avatar avatar-small m-2",alt:E.login,src:E.avatar_url+"&s=40",width:"20",height:"20","aria-label":E.login}),react.createElement("div",{className:"flex-self-center"},react.createElement("span",{style:{fontFamily:monospaceFont}},E.login)," / ",react.createElement("span",{className:"css-truncate css-truncate-overflow"},x))):react.createElement(react.Fragment,null,react.createElement("img",{className:"avatar avatar-small m-2",alt:"anonymous",src:"https://user-images.githubusercontent.com/334891/29999089-2837c968-9009-11e7-92c1-6a7540a594d5.png",width:"20",height:"20","aria-label":"Sign in"}),react.createElement("div",{className:"flex-self-center"},react.createElement("span",{style:{fontFamily:monospaceFont,fontWeight:"bold"}},"anonymous")," / ",react.createElement("span",{className:"css-truncate css-truncate-overflow"},x)))),react.createElement("div",{className:"p-2"},react.createElement((function(){return d.uid?react.createElement("button",{className:"btn tooltipped tooltipped-se mr-2","aria-label":"Makes a copy",onClick:P,"aria-disabled":!d.uid},react.createElement(RepoForkedIcon,{size:16}),react.createElement("span",null,"Make a copy",i&&react.createElement("span",{className:"AnimatedEllipsis"}))):react.createElement("details",{className:"dropdown details-reset details-overlay d-inline-block mr-2"},react.createElement("summary",{"aria-haspopup":"true"},react.createElement("span",{className:"btn"},react.createElement(RepoForkedIcon,{size:16}),"Make a copy",i&&react.createElement("span",{className:"AnimatedEllipsis"}),react.createElement("div",{className:"dropdown-caret"}))),react.createElement("ul",{className:"dropdown-menu dropdown-menu-se",style:{width:300}},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:async()=>{o(!0),await d.signin(),P()},href:document.location.toString()},react.createElement(MarkGithubIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Sign-in with GitHub"))),react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:async()=>{o(!0),P()},href:document.location.toString()},react.createElement("span",null,"Continue anonymously")))))}),null))),react.createElement("div",{className:"editor",style:{width:y}},g&&react.createElement("div",{className:"readonly-notice",style:{borderBottom:"1px solid #dbdbda"}},react.createElement("div",{className:"Toast Toast--warning",style:{maxWidth:1e3,width:"auto"}},react.createElement("span",{className:"Toast-icon"},react.createElement(AlertIcon,{size:16})),react.createElement("span",{className:"Toast-content"},"This is a read-only page. Make a copy to edit the document."))),react.createElement(ErrorBoundary,null,react.createElement(Monaco,{theme:C,language:"markdown",loading:react.createElement("div",null,"Loading editor..."),value:"",editorDidMount:function(e,n){t.current=n,w(!0),t.current.onDidChangeModelContent(e=>{const n=parseMD(t.current.getValue());h(n)})},options:{fontFamily:monospaceFont,lineNumbers:"on",minimap:{enabled:!1},automaticLayout:!0}})))),react.createElement("div",{className:"content",style:{left:y+5}},react.createElement("div",{className:"top-bar content-bar d-flex flex-justify-between"},react.createElement("div",{className:"p-2"},react.createElement("button",{className:"btn btn-octicon tooltipped tooltipped-se mr-2","aria-label":"Show or hide the code editor.",onClick:()=>{v(0==y?loadSize():0)}},react.createElement(UseAnimations,{reverse:0==y,animation:skipBack$3,size:24,strokeColor:"#586069"})),a&&react.createElement("span",{className:"m-1"},react.createElement("span",null,"Saving"),react.createElement("span",{className:"AnimatedEllipsis"}))),react.createElement("div",{className:"p-2 d-flex"},react.createElement(UserList,{documentRef:n}),react.createElement(DropdownShare,{label:"Share",className:"btn-invisible"},react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:function(){copyTextToClipboard(generateStaticLink(t.current.getValue())).then(()=>{t.current.focus(),logEvent$1("share_ro"),closeMenu()})},href:document.location.toString()},react.createElement(ShareAndroidIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Copy read-only link"))),g||react.createElement("li",null,react.createElement("a",{className:"dropdown-item",onClick:function(){copyTextToClipboard(document.location.toString()).then(()=>{t.current.focus(),logEvent$1("share_editable"),closeMenu()})},href:document.location.toString()},react.createElement(LinkIcon,{size:16,className:"mr-2"}),react.createElement("span",null,"Share editable link")))),react.createElement(UserMenu,null))),react.createElement("div",{className:"scroll"},react.createElement("div",{className:"markdown-body"},I))))}function ListNotebooks(e){return react.createElement("div",{className:"Box"},Object.keys(e.data).map(t=>react.createElement("div",{key:t,className:"Box-row d-flex flex-items-center"},react.createElement("div",{className:"flex-auto"},react.createElement("strong",null,react.createElement(Link,{to:`/notebook/${e.data[t].meta.uid}/${t}`},e.data[t].meta.title))),react.createElement("button",{type:"button",className:"btn btn-primary",name:"button",onClick:()=>{navigateTo(`/notebook/${e.data[t].meta.uid}/${t}`)}},"Open"))))}function List(){const e=useAuth(),[t,n]=react_6(null),[r,i]=react_6(!1);if(document.title="My notebooks - Sequence diagrams",react_5(()=>{e.uid&&index_cjs$3.database().ref("users/"+e.uid+"/notebooks").once("value",e=>{n(e.toJSON())})},[e.uid]),!e.uid)return react.createElement("div",{className:"p-11"},"Please sign in to see this page. ",react.createElement(UserMenu,null));return react.createElement("div",{className:"content p-responsive",style:{left:0}},react.createElement("div",{className:"top-bar content-bar d-flex flex-justify-between"},react.createElement("div",{className:"p-2 d-flex"},react.createElement("span",{className:"flex-self-center"},"My notebooks")),react.createElement("div",{className:"p-2 d-flex"},react.createElement(UserMenu,null))),react.createElement("div",{className:"scroll p-4"},react.createElement("div",{className:"Subhead pt-4"},react.createElement("div",{className:"Subhead-heading"},"My notebooks"),react.createElement("div",{className:"Subhead-actions"},react.createElement("button",{disabled:!!r,className:"btn btn-sm btn-primary",role:"button",onClick:async function(){i(!0);const{ref:e,succeed:t,owner:n}=await newNotebookWithContent(DEFAULT_EXAMPLE);i(!1),t&&(logEvent$1("new_notebook_list"),navigateTo(`/notebook/${n}/${e.key}`))}},"New notebook",r&&react.createElement("span",{className:"AnimatedEllipsis"}))),react.createElement("div",{className:"Subhead-description"},"Here are the notebooks of your own.")),t?react.createElement(ListNotebooks,{data:t}):react.createElement("span",{className:"m-1"},react.createElement("span",null,"Loading"),react.createElement("span",{className:"AnimatedEllipsis"}))))}function Index(){return useAuth().uid?react.createElement(Redirect,{to:"/list"}):react.createElement(Redirect,{to:generateStaticLinkFragment(DEFAULT_EXAMPLE)+"&open=true"})}function RedirectOldModel(){const e=useRouteMatch();return react.createElement(Redirect,{to:"/notebook/anonymous/"+e.params.notepadId})}function App(){return react.createElement(react.Fragment,null,react.createElement(ProvideAuth,null,react.createElement(Router,{history:history},react.createElement(Switch,null,react.createElement(Route,{exact:!0,path:"/notebook/:user/:notebook"},react.createElement(Editor$1,{newModel:!0})),react.createElement(Route,{exact:!0,path:"/editor/:notepadId"},react.createElement(RedirectOldModel,null)),react.createElement(Route,{exact:!0,path:"/static"},react.createElement(Editor$1,{readonly:!0})),react.createElement(Route,{path:"/list"},react.createElement(List,null)),react.createElement(Route,{path:"/"},react.createElement(Index,null))))))}async function initUI(e){const t=document.getElementById("loading-placeholder");t&&t.remove(),reactDom.render(react.createElement(App,null),e)}async function addFirepad(){await injectScript("firepad/firepad.min.js"),await injectCss("firepad/firepad.css")}async function main(){await addFirebase(),await addFirepad(),await initializeDiagrams(),initUI(document.getElementById("app"))}marked.setOptions({sanitize:!0}),main().catch(e=>{console.error(e)})}(); diff --git a/src/components/Markdown.tsx b/src/components/Markdown.tsx new file mode 100644 index 0000000..74209be --- /dev/null +++ b/src/components/Markdown.tsx @@ -0,0 +1,186 @@ +import React, { + useRef, + useCallback, + ReactNode, + MouseEvent as ReactMouseEvent, + useState, + useEffect, + useLayoutEffect, +} from "react"; +import { graphviz } from "@hpcc-js/wasm"; +import type * as monacoEditor from "monaco-editor/esm/vs/editor/editor.api"; +import { DownloadSvg } from "./DownloadSvg"; +import { SequenceDiagram } from "src/diagrams"; +declare var monaco: typeof monacoEditor; + +var escapeReplacements: Record = { + amp: "&", + lt: "<", + gt: ">", + quot: '"', + "#39": "'", +}; + +function unescape(token: { text: string }) { + return token.text.replace(/&(amp|lt|gt|quot|#39);/g, function (_, r) { + return escapeReplacements[r]; + }); +} + +function Code($: { language: string; code: string }) { + const theRef = useRef(null); + const [language, setLanguage] = useState("txt"); + const [code, setCode] = useState(""); + + useLayoutEffect(() => { + if (theRef.current) { + monaco.editor + .colorize(code || "", language || "text", { + tabSize: 2, + }) + .then( + ($) => { + theRef.current!.innerHTML = $; + }, + (e) => { + debugger; + console.error(e); + } + ); + } + }, [theRef, code, language]); + + useEffect(() => { + if ($.code != code) setCode($.code); + if ($.language != language) setLanguage($.language); + }); + + return ( +
    +      {code}
    +    
    + ); +} + +function Dot(props: { code: string }) { + const [html, setHtml] = useState("Loading..."); + const [error, setError] = useState(); + + useEffect(() => { + graphviz + .dot(props.code, "svg", { wasmFolder: "wasm" }) + .then(($) => { + setError(""); + setHtml($); + }) + .catch((e) => { + setError(e.message); + }); + }, [props.code]); + + return ( + <> + {error &&
    {error}
    } + + + + ); +} + +export function renderMarkdown($: marked.Token, key: number = 0): any { + if ("type" in $) { + if ($.type === "heading") { + switch ($.depth) { + case 1: + return

    {unescape($)}

    ; + case 2: + return

    {unescape($)}

    ; + case 3: + return

    {unescape($)}

    ; + case 4: + return

    {unescape($)}

    ; + case 5: + return
    {unescape($)}
    ; + default: + return
    {unescape($)}
    ; + } + } else if ($.type === "code") { + if ($.lang == "sequence") { + return ; + } else if ($.lang == "dot") { + return ; + } + return ; + } else if ($.type === "paragraph") { + if ("tokens" in $) { + return

    {($ as any).tokens.map(renderMarkdown)}

    ; + } + return

    {unescape($)}

    ; + } else if ($.type === "blockquote") { + if ("tokens" in $) { + return ( +
    + {($ as any).tokens.map(renderMarkdown)} +
    + ); + } + return
    {unescape($)}
    ; + } else if ($.type === "em") { + if ("tokens" in $) { + return {($ as any).tokens.map(renderMarkdown)}; + } + return {unescape($)}; + } else if ($.type === "strong") { + if ("tokens" in $) { + return {($ as any).tokens.map(renderMarkdown)}; + } + return {unescape($)}; + } else if ($.type === "html") { + return {JSON.stringify($.raw, null, 2)}; + } else if ($.type === "text") { + if ("tokens" in $) { + return {($ as any).tokens.map(renderMarkdown)}; + } + return {unescape($)}; + } else if ($.type === "codespan") { + return {unescape($)}; + } else if ($.type === "link") { + return {unescape($)}; + } else if ($.type === "space") { + return
    ; + } else if ($.type === "escape") { + return {unescape($)}; + } else if ($.type === "hr") { + return
    ; + } else if ($.type === "list_item") { + if ("tokens" in $) { + return
  • {($ as any).tokens.map(renderMarkdown)}
  • ; + } + return
  • {unescape($)}
  • ; + } else if (($.type as any) === "list") { + const l = $ as marked.Tokens.List; + if (l.ordered) { + return ( +
      + {l.items.map(renderMarkdown)} +
    + ); + } + return
      {l.items.map(renderMarkdown)}
    ; + } else { + return ( + + {process.env.NODE_ENV == "production" + ? $.raw + : JSON.stringify($, null, 2)} + + ); + } + } + + return ( + + {JSON.stringify($, null, 2)} + + ); +} diff --git a/src/diagrams.tsx b/src/diagrams.tsx index 38ed261..a8616b2 100644 --- a/src/diagrams.tsx +++ b/src/diagrams.tsx @@ -2,7 +2,7 @@ import { injectScript } from "./helpers"; import React, { useEffect, useRef, useState } from "react"; import { DownloadSvg } from "./components/DownloadSvg"; -export const monospaceFont = `Menlo, Monaco, "Courier New", monospace` +export const monospaceFont = `Menlo, Monaco, "Courier New", monospace`; const font = `14px ${monospaceFont}`; @@ -684,7 +684,11 @@ export function SequenceDiagram(props: { input: string; className?: string }) { if (!error) { return ( -
    +
    ); diff --git a/src/firebase.ts b/src/firebase.ts index ff7f995..c1a3155 100644 --- a/src/firebase.ts +++ b/src/firebase.ts @@ -2,6 +2,7 @@ import app from "firebase/app"; import "firebase/auth"; import "firebase/database"; import "firebase/analytics"; +import future from "fp-future"; // Your web app's Firebase configuration let firebaseConfig = { @@ -77,5 +78,22 @@ export function logException(error: Error | string) { export function logPageView(page_location: string, page_path: string) { app.analytics!().logEvent("page_view", { page_location, page_path } as any); } +declare var Firepad: any; + +export async function newNotebookWithContent(content: string) { + const ret = future<{succeed: boolean, ref: app.database.Reference, data: any, owner: string}>(); + let owner = + (app.auth().currentUser && app.auth().currentUser!.uid) || "anonymous"; + + const ref = newNotebook(owner); + + const headless = new Firepad.Headless(ref); + + headless.setText(content, function (data: any, succeed: boolean) { + ret.resolve({ ref, data, succeed, owner }); + }); + + return ret; +} globalThis["firebase"] = app; diff --git a/src/pages/Editor.tsx b/src/pages/Editor.tsx index 037040d..f26342b 100644 --- a/src/pages/Editor.tsx +++ b/src/pages/Editor.tsx @@ -1,13 +1,18 @@ -import Monaco, { monaco as tmonaco } from "@monaco-editor/react"; +import Monaco from "@monaco-editor/react"; import type * as monacoEditor from "monaco-editor/esm/vs/editor/editor.api"; import React, { useState, useRef, useEffect } from "react"; import { useRouteMatch, useLocation } from "react-router-dom"; -import { logEvent, openByHashOld, newNotebook, openByHash } from "../firebase"; +import { + logEvent, + newNotebook, + openByHash, + newNotebookWithContent, +} from "../firebase"; import { parseMD } from "../md"; import marked from "marked"; -import { SequenceDiagram, monospaceFont } from "../diagrams"; +import { monospaceFont } from "../diagrams"; import { DEFAULT_EXAMPLE } from "../example"; -import { graphviz } from "@hpcc-js/wasm"; + import { DropdownShare, closeMenu } from "../components/Dropdown"; import app from "firebase/app"; import { @@ -21,12 +26,13 @@ import { copyTextToClipboard, generateStaticLink } from "../helpers"; import UseAnimations from "react-useanimations"; import skipBack from "react-useanimations/lib/skipBack"; import { navigateTo } from "../Nav"; -import { DownloadSvg } from "../components/DownloadSvg"; import { useAuth, GitHubUser } from "../Auth"; import { ResizeableSidebar } from "../components/Resize"; import { UserList } from "../components/UserList"; import { UserMenu } from "src/components/UserMenu"; import { ErrorBoundary } from "src/components/ErrorBounday"; +import { renderMarkdown } from "src/components/Markdown"; + declare var Firepad: any; declare var monaco: typeof monacoEditor; @@ -34,163 +40,24 @@ marked.setOptions({ sanitize: true, }); -var escapeReplacements: Record = { - amp: "&", - lt: "<", - gt: ">", - quot: '"', - "#39": "'", -}; - -function unescape(text: string) { - return text.replace(/&(amp|lt|gt|quot|#39);/g, function (_, r) { - return escapeReplacements[r]; - }); +function saveSize(size: number) { + localStorage.setItem("w-size", JSON.stringify({ size })); } -function Code($: { language: string; code: string }) { - const theRef = useRef(null); - - useEffect(() => { - if (theRef.current && $.language) { - monaco.editor.colorizeElement(theRef.current, { tabSize: 2 }); +function loadSize() { + try { + const stored = JSON.parse(localStorage.getItem("w-size") || "{}"); + if ( + typeof stored.size == "number" && + !isNaN(stored.size) && + stored.size >= 0 + ) { + return stored.size; } - }, [theRef, $.code, $.language]); - - return ( -
    -      {unescape($.code)}
    -    
    - ); -} - -function defaultExpandedSize() { + } catch {} return window.innerWidth * 0.3; } -function Dot(props: { code: string }) { - const [html, setHtml] = useState("Loading..."); - const [error, setError] = useState(); - - useEffect(() => { - graphviz - .dot(props.code, "svg", { wasmFolder: "wasm" }) - .then(($) => { - setError(""); - setHtml($); - }) - .catch((e) => { - setError(e.message); - }); - }, [props.code]); - - return ( - <> - {error &&
    {error}
    } - - - - ); -} - -function render($: marked.Token, key: number = 0): any { - if ("type" in $) { - if ($.type === "heading") { - switch ($.depth) { - case 1: - return

    {unescape($.text)}

    ; - case 2: - return

    {unescape($.text)}

    ; - case 3: - return

    {unescape($.text)}

    ; - case 4: - return

    {unescape($.text)}

    ; - case 5: - return
    {unescape($.text)}
    ; - default: - return
    {unescape($.text)}
    ; - } - } else if ($.type === "code") { - if ($.lang == "sequence") { - return ; - } else if ($.lang == "dot") { - return ; - } - return ( - - ); - } else if ($.type === "paragraph") { - if ("tokens" in $) { - return

    {($ as any).tokens.map(render)}

    ; - } - return

    {unescape($.text)}

    ; - } else if ($.type === "blockquote") { - if ("tokens" in $) { - return ( -
    {($ as any).tokens.map(render)}
    - ); - } - return
    {unescape($.text)}
    ; - } else if ($.type === "em") { - if ("tokens" in $) { - return {($ as any).tokens.map(render)}; - } - return {unescape($.text)}; - } else if ($.type === "strong") { - if ("tokens" in $) { - return {($ as any).tokens.map(render)}; - } - return {unescape($.text)}; - } else if ($.type === "html") { - return {JSON.stringify($.raw, null, 2)}; - } else if ($.type === "text") { - if ("tokens" in $) { - return {($ as any).tokens.map(render)}; - } - return {unescape($.text)}; - } else if ($.type === "codespan") { - return {unescape($.text)}; - } else if ($.type === "link") { - return {unescape($.text)}; - } else if ($.type === "space") { - return
    ; - } else if ($.type === "escape") { - return {unescape($.text)}; - } else if ($.type === "hr") { - return
    ; - } else if ($.type === "list_item") { - if ("tokens" in $) { - return
  • {($ as any).tokens.map(render)}
  • ; - } - return
  • {unescape($.text)}
  • ; - } else if (($.type as any) === "list") { - const l = $ as marked.Tokens.List; - if (l.ordered) { - return ( -
      - {l.items.map(render)} -
    - ); - } - return
      {l.items.map(render)}
    ; - } else { - return ( - - {process.env.NODE_ENV == "production" - ? $.raw - : JSON.stringify($, null, 2)} - - ); - } - } - - return ( - - {JSON.stringify($, null, 2)} - - ); -} - export function Editor(props: { readonly?: boolean; newModel?: boolean }) { const editorRef = useRef(); @@ -206,7 +73,7 @@ export function Editor(props: { readonly?: boolean; newModel?: boolean }) { const isOldModel = "notepadId" in match.params; const isReadonly = props.readonly || isOldModel; - const [size, setSize] = useState(props.readonly ? 0 : defaultExpandedSize()); + const [size, setSize] = useState(props.readonly ? 0 : loadSize()); const [staticContent, setStaticContent] = useState(); const [, setIsEditorReady] = useState(false); const [author, setAuthor] = useState(null); @@ -218,7 +85,7 @@ export function Editor(props: { readonly?: boolean; newModel?: boolean }) { const qs = new URLSearchParams(location.search); setStaticContent(qs.get("t") || ""); if (qs.has("open")) { - setSize(defaultExpandedSize()); + setSize(loadSize()); } }, [location.search]); @@ -304,26 +171,18 @@ export function Editor(props: { readonly?: boolean; newModel?: boolean }) { } }, [size]); - function makeCopy() { - let owner = - (app.auth().currentUser && app.auth().currentUser!.uid) || "anonymous"; - - setLoadingCopy(true); - - const ref = newNotebook(owner); - + async function makeCopy() { const val = editorRef.current!.getValue(); - const headless = new Firepad.Headless(ref); + setLoadingCopy(true); + const { ref, succeed, owner } = await newNotebookWithContent(val); + setLoadingCopy(false); - headless.setText(val, function (data: any, succeed: boolean) { - setLoadingCopy(false); - if (succeed) { - logEvent("make_copy"); - setSize(defaultExpandedSize()); - navigateTo(`/notebook/${owner}/${ref.key}`); - } - }); + if (succeed) { + logEvent("make_copy"); + setSize(loadSize()); + navigateTo(`/notebook/${owner}/${ref.key}`); + } } let hadTitle = false; @@ -341,7 +200,7 @@ export function Editor(props: { readonly?: boolean; newModel?: boolean }) { document.title = "Untitled document - Diagrams"; } - const c = md.map(render); + const c = md.map(renderMarkdown); function copyReadOnlyLink() { copyTextToClipboard( @@ -460,7 +319,13 @@ export function Editor(props: { readonly?: boolean; newModel?: boolean }) { return (
    - setSize(n)}> + { + setSize(n); + saveSize(n); + }} + >