/*! 'francy-extension-jupyter, v1.1.1 - Francy - An Interactive Discrete Mathematics Framework for GAP. Renders [application/vnd.francy+json] MIME Type on Jupyter Environments, by Manuel Martins <manuelmachadomartins@gmail.com>.' */
define(function(){return function(n){var r={};function u(e){if(r[e]){return r[e].exports}var t=r[e]={i:e,l:false,exports:{}};n[e].call(t.exports,t,t.exports,u);t.l=true;return t.exports}u.m=n;u.c=r;u.d=function(e,t,n){if(!u.o(e,t)){Object.defineProperty(e,t,{enumerable:true,get:n})}};u.r=function(e){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})};u.t=function(t,e){if(e&1)t=u(t);if(e&8)return t;if(e&4&&typeof t==="object"&&t&&t.__esModule)return t;var n=Object.create(null);u.r(n);Object.defineProperty(n,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var r in t)u.d(n,r,function(e){return t[e]}.bind(null,r));return n};u.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};u.d(e,"a",e);return e};u.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)};u.p="";return u(u.s=1)}([function(e){e.exports={a:"1.1.1"}},function(e,t,n){e.exports=n(2)},function(e,t,n){"use strict";n.r(t);var l="application/vnd.francy+json";var p="jp-OutputWidget-Francy";var i="francy-drawing-div";(function e(){if(!window.document.getElementById("div#".concat(i))){var t=window.document.createElement("div");t.setAttribute("id",i);t.setAttribute("style","visibility: false;");window.document.body.appendChild(t)}})();function s(n,e){var t=e.FrancyApp,r=e.Logger,u=e.Renderers,o=u===void 0?[]:u;var a=new t({appendTo:"#".concat(i),callbackHandler:function e(t){n.notebook.kernel.execute(t,{iopub:{output:function e(t){if(t.content&&t.content.data&&t.content.data[l]){a.load(t.content.data[l]).render().catch(function(e){return r.error(e)}).then(function(e){return r.debug("Interactive trigger result",e)})}}}},{})}});o.forEach(function(e){return a.RenderingManager.register(new e)});a.Components.MathJax.tryInitialize();return a}function v(e,t,n){var r=e.Francy,u=e.Logger;r.load(t.data).render().catch(function(e){return u.error(e)}).then(function(e){return n.append(e)})}function a(e,t){var n=t.cell.output_area;var r=n.element.find(p.split(" ")[0])}function g(e,t){var n=t.output,r=t.output_area;var u=r.element.find(p.split(" ")[0])}function r(i,e,t){var c=e.FrancyApp,d=e.Logger,n=e.Renderers,f=n===void 0?[]:n;var r=t.get_cells().reduce(function(e,t){return t.output_area?t:e},{}),u=r.output_area;var o=function e(t,n,r){var u=this.create_output_subarea(n,p,l);this.keyboard_manager.register_events(u);var o={data:t,metadata:n[l]};var a=s(i,{FrancyApp:c,Logger:d,Renderers:f});v({Francy:a,Logger:d},o,u[0]);r.append(u);return u};u.events.on("clear_output.CodeCell",a);u.events.on("output_added.OutputArea",g);u.register_mime_type(l,o,{safe:true,index:0})}function u(t){t.get_cells().forEach(function(e){if(e.output_area&&e.output_area.outputs.find(function(e){return e.data&&e.data[l]})){t.render_cell_output(e)}})}var o=n(0);n.d(t,"register_renderer",function(){return r});n.d(t,"render_cells",function(){return u});n.d(t,"init",function(){return s});n.d(t,"version",function(){return o["a"]});n.p=document.querySelector("body").getAttribute("data-base-url")+"nbextensions/jupyter_francy/"}])});