diff --git a/js/apps/system/_admin/aardvark/APP/GruntFile.js b/js/apps/system/_admin/aardvark/APP/GruntFile.js index 30d093be75..bd16ca6432 100644 --- a/js/apps/system/_admin/aardvark/APP/GruntFile.js +++ b/js/apps/system/_admin/aardvark/APP/GruntFile.js @@ -66,7 +66,7 @@ "frontend/js/lib/sigma.plugins.lasso.js", "frontend/js/lib/sigma.layout.noverlap.js", "frontend/js/lib/sigma.layout.fruchtermanReingold.js", - "frontend/js/lib/sigma.exporters.svg.js", + "frontend/js/lib/sigma.exporters.image.js", "frontend/js/lib/sigma.canvas.edges.labels.curve.js", "frontend/js/lib/sigma.canvas.edges.labels.curvedArrow.js", "frontend/js/lib/sigma.canvas.edges.labels.def.js", diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js index d94d07f217..e506de4ebd 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js @@ -1,14 +1,15 @@ function AbstractAdapter(a,b,c,d,e){"use strict";if(void 0===a)throw"The nodes have to be given.";if(void 0===b)throw"The edges have to be given.";if(void 0===c)throw"An inheriting class has to be given.";if(void 0===d)throw"A reference to the graph viewer has to be given.";e=e||{};var f,g,h,i,j,k=this,l=!1,m={},n={},o={},p={},q=0,r={},s={},t=function(a){void 0!==a.prioList&&g.changePrioList(a.prioList||[])},u=function(a){m.range=a/2,m.start=a/4,m.getStart=function(){return this.start+Math.random()*this.range}},v=function(a){n.range=a/2,n.start=a/4,n.getStart=function(){return this.start+Math.random()*this.range}},w=function(b){var c=p[b]||b,d=$.grep(a,function(a){return a._id===c});if(0===d.length)return!1;if(1===d.length)return d[0];throw"Too many nodes with the same ID, should never happen"},x=function(a){var c=$.grep(b,function(b){return b._id===a});if(0===c.length)return!1;if(1===c.length)return c[0];throw"Too many edges with the same ID, should never happen"},y=function(b,c,d){var e={_data:b,_id:b._id},f=w(e._id);return f?f:(e.x=c||m.getStart(),e.y=d||n.getStart(),e.weight=1,a.push(e),e._outboundCounter=0,e._inboundCounter=0,e)},z=function(a){var b=y(a);return b.x=2*m.start,b.y=2*n.start,b.fixed=!0,b},A=function(){a.length=0,b.length=0,p={},o={},d.cleanUp()},B=function(a){var c,d,e,f=!0,g={_data:a,_id:a._id},i=x(g._id);if(i)return i;if(c=w(a._from),d=w(a._to),!c)throw"Unable to insert Edge, source node not existing "+a._from;if(!d)throw"Unable to insert Edge, target node not existing "+a._to;return g.source=c,g.source._isCommunity?(e=o[g.source._id],g.source=e.getNode(a._from),g.source._outboundCounter++,e.insertOutboundEdge(g),f=!1):c._outboundCounter++,g.target=d,g.target._isCommunity?(e=o[g.target._id],g.target=e.getNode(a._to),g.target._inboundCounter++,e.insertInboundEdge(g),f=!1):d._inboundCounter++,b.push(g),f&&h.call("insertEdge",c._id,d._id),g},C=function(b){var c;for(c=0;c0){var c,d=[];for(c=0;cf&&(c?c.collapse():K(b))},M=function(c){var d=c.getDissolveInfo(),e=d.nodes,g=d.edges.both,i=d.edges.inbound,j=d.edges.outbound;C(c),fi){var b=g.bucketNodes(_.values(a),i);_.each(b,function(a){if(a.nodes.length>1){var b=_.map(a.nodes,function(a){return a._id});I(b,a.reason)}})}},P=function(a,b){f=a,L(),void 0!==b&&b()},Q=function(a){i=a},R=function(a,b){a._expanded=!1;var c=b.removeOutboundEdgesFromNode(a);_.each(c,function(a){j(a),E(a,!0)})},S=function(a){a._expanded=!1,p[a._id]&&o[p[a._id]].collapseNode(a);var b=H(a),c=[];_.each(b,function(b){0===q?(r=b,s=a,c.push(b)):void 0!==a&&(a._id===r.target._id?b.target._id===s._id&&c.push(r):c.push(b),r=b,s=a),q++}),_.each(c,j),q=0},T=function(a){var b=a.getDissolveInfo();C(a),_.each(b.nodes,function(a){delete p[a._id]}),_.each(b.edges.outbound,function(a){j(a),E(a,!0)}),delete o[a._id]},U=function(a,b){a._isCommunity?k.expandCommunity(a,b):(a._expanded=!0,c.loadNode(a._id,b))},V=function(a,b){a._expanded?S(a):U(a,b)};j=function(a){var b,c=a.target;return c._isCommunity?(b=a._target,c.removeInboundEdge(a),b._inboundCounter--,0===b._inboundCounter&&(R(b,c),c.removeNode(b),delete p[b._id]),void(0===c._inboundCounter&&T(c))):(c._inboundCounter--,void(0===c._inboundCounter&&(S(c),C(c))))},i=Number.POSITIVE_INFINITY,g=e.prioList?new NodeReducer(e.prioList):new NodeReducer,h=new WebWorkerWrapper(ModularityJoiner,J),m.getStart=function(){return 0},n.getStart=function(){return 0},this.cleanUp=A,this.setWidth=u,this.setHeight=v,this.insertNode=y,this.insertInitialNode=z,this.insertEdge=B,this.removeNode=C,this.removeEdge=E,this.removeEdgesForNode=F,this.expandCommunity=N,this.setNodeLimit=P,this.setChildLimit=Q,this.checkSizeOfInserted=O,this.checkNodeLimit=L,this.explore=V,this.changeTo=t,this.getPrioList=g.getPrioList,this.dissolveCommunity=M}function ArangoAdapter(a,b,c,d){"use strict";if(void 0===a)throw"The nodes have to be given.";if(void 0===b)throw"The edges have to be given.";if(void 0===c)throw"A reference to the graph viewer has to be given.";if(void 0===d)throw"A configuration with node- and edgeCollection has to be given.";if(void 0===d.graph){if(void 0===d.nodeCollection)throw"The nodeCollection or a graphname has to be given.";if(void 0===d.edgeCollection)throw"The edgeCollection or a graphname has to be given."}var e,f,g,h,i,j=this,k={},l={},m={},n=function(a){h=a},o=function(a){f=a,l.node=l.base+"document?collection="+f},p=function(a){g=a,l.edge=l.base+"edge?collection="+g},q=function(a){$.ajax({cache:!1,type:"GET",async:!1,url:l.graph+"/"+a,contentType:"application/json",success:function(a){o(a.graph.vertices),p(a.graph.edges)}})},r=function(a){console.log(a.baseUrl);var b=a.baseUrl||"";void 0!==a.width&&e.setWidth(a.width),void 0!==a.height&&e.setHeight(a.height),i=void 0!==a.undirected&&a.undirected===!0?"any":"outbound",l.base=b+"_api/",l.cursor=l.base+"cursor",l.graph=l.base+"graph",l.collection=l.base+"collection/",l.document=l.base+"document/",l.any=l.base+"simple/any",a.graph?(q(a.graph),n(a.graph)):(o(a.nodeCollection),p(a.edgeCollection),n(void 0))},s=function(a,b,c){a!==m.getAllGraphs&&(a!==m.connectedEdges&&(b["@nodes"]=f,a!==m.childrenCentrality&&(b.dir=i)),b["@edges"]=g);var d={query:a,bindVars:b};$.ajax({type:"POST",url:l.cursor,data:JSON.stringify(d),contentType:"application/json",dataType:"json",processData:!1,success:function(a){c(a.result)},error:function(a){try{throw console.log(a.statusText),"["+a.errorNum+"] "+a.errorMessage}catch(b){throw"Undefined ERROR"}}})},t=function(a,b){var c=[],d=0,e=function(d){c.push(d.document||{}),c.length===a&&b(c)};for(d=0;a>d;d++)$.ajax({cache:!1,type:"PUT",url:l.any,data:JSON.stringify({collection:f}),contentType:"application/json",success:e})},u=function(b,c){if(0===b.length)return void(c&&c({errorCode:404}));b=b[0];var d={},f=e.insertNode(b[0].vertex),g=a.length;_.each(b,function(b){var c=e.insertNode(b.vertex),f=b.path;g=2&&$.ajax({cache:!1,type:"GET",url:l.collection,contentType:"application/json",dataType:"json",processData:!1,success:function(b){var c=b.collections,d=[],e=[];_.each(c,function(a){a.name.match(/^_/)||(3===a.type?e.push(a.name):2===a.type&&d.push(a.name))}),a(d,e)},error:function(a){throw a.statusText}})},j.getGraphs=function(a){a&&a.length>=1&&s(m.getAllGraphs,{},a)},j.getAttributeExamples=function(a){a&&a.length>=1&&t(10,function(b){var c=_.sortBy(_.uniq(_.flatten(_.map(b,function(a){return _.keys(a)}))),function(a){return a.toLowerCase()});a(c)})},j.getNodeCollection=function(){return f},j.getEdgeCollection=function(){return g},j.getDirection=function(){return i},j.getGraphName=function(){return h},j.setWidth=e.setWidth,j.changeTo=e.changeTo,j.getPrioList=e.getPrioList}function ColourMapper(){"use strict";var a,b={},c={},d=[],e=this,f=0;d.push({back:"#C8E6C9",front:"black"}),d.push({back:"#8aa249",front:"white"}),d.push({back:"#8BC34A",front:"black"}),d.push({back:"#388E3C",front:"white"}),d.push({back:"#4CAF50",front:"white"}),d.push({back:"#212121",front:"white"}),d.push({back:"#727272",front:"white"}),d.push({back:"#B6B6B6",front:"black"}),d.push({back:"#e5f0a3",front:"black"}),d.push({back:"#6c4313",front:"white"}),d.push({back:"#9d8564",front:"white"}),this.getColour=function(g){return void 0===b[g]&&(b[g]=d[f],void 0===c[d[f].back]&&(c[d[f].back]={front:d[f].front,list:[]}),c[d[f].back].list.push(g),f++,f===d.length&&(f=0)),void 0!==a&&a(e.getList()),b[g].back},this.getCommunityColour=function(){return"#333333"},this.getForegroundColour=function(g){return void 0===b[g]&&(b[g]=d[f],void 0===c[d[f].back]&&(c[d[f].back]={front:d[f].front,list:[]}),c[d[f].back].list.push(g),f++,f===d.length&&(f=0)),void 0!==a&&a(e.getList()),b[g].front},this.getForegroundCommunityColour=function(){return"white"},this.reset=function(){b={},c={},f=0,void 0!==a&&a(e.getList())},this.getList=function(){return c},this.setChangeListener=function(b){a=b},this.reset()}function CommunityNode(a,b){"use strict";if(_.isUndefined(a)||!_.isFunction(a.dissolveCommunity)||!_.isFunction(a.checkNodeLimit))throw"A parent element has to be given.";b=b||[];var c,d,e,f,g,h=this,i={},j=[],k=[],l={},m={},n={},o={},p=function(a){return h._expanded?2*a*Math.sqrt(j.length):a},q=function(a){return h._expanded?4*a*Math.sqrt(j.length):a},r=function(a){var b=h.position,c=a.x*b.z+b.x,d=a.y*b.z+b.y,e=a.z*b.z;return{x:c,y:d,z:e}},s=function(a){return h._expanded?r(a._source.position):h.position},t=function(a){return h._expanded?r(a._target.position):h.position},u=function(){var a=document.getElementById(h._id).getBBox();c.attr("transform","translate("+(a.x-5)+","+(a.y-25)+")"),d.attr("width",a.width+10).attr("height",a.height+30),e.attr("width",a.width+10)},v=function(){if(!f){var a=new DomObserverFactory;f=a.createObserver(function(a){_.any(a,function(a){return"transform"===a.attributeName})&&(u(),f.disconnect())})}return f},w=function(){g.stop(),j.length=0,_.each(i,function(a){j.push(a)}),g.start()},x=function(){g.stop(),k.length=0,_.each(l,function(a){k.push(a)}),g.start()},y=function(a){var b=[];return _.each(a,function(a){b.push(a)}),b},z=function(a){return!!i[a]},A=function(){return j},B=function(a){return i[a]},C=function(a){i[a._id]=a,w(),h._size++},D=function(a){_.each(a,function(a){i[a._id]=a,h._size++}),w()},E=function(a){var b=a._id||a;delete i[b],w(),h._size--},F=function(a){var b;return _.has(a,"_id")?b=a._id:(b=a,a=l[b]||m[b]),a.target=a._target,delete a._target,l[b]?(delete l[b],h._outboundCounter++,n[b]=a,void x()):(delete m[b],void h._inboundCounter--)},G=function(a){var b;return _.has(a,"_id")?b=a._id:(b=a,a=l[b]||n[b]),a.source=a._source,delete a._source,delete o[a.source._id][b],l[b]?(delete l[b],h._inboundCounter++,m[b]=a,void x()):(delete n[b],void h._outboundCounter--)},H=function(a){var b=a._id||a,c=[];return _.each(o[b],function(a){G(a),c.push(a)}),delete o[b],c},I=function(a){return a._target=a.target,a.target=h,n[a._id]?(delete n[a._id],h._outboundCounter--,l[a._id]=a,x(),!0):(m[a._id]=a,h._inboundCounter++,!1)},J=function(a){var b=a.source._id;return a._source=a.source,a.source=h,o[b]=o[b]||{},o[b][a._id]=a,m[a._id]?(delete m[a._id],h._inboundCounter--,l[a._id]=a,x(),!0):(h._outboundCounter++,n[a._id]=a,!1)},K=function(){return{nodes:j,edges:{both:k,inbound:y(m),outbound:y(n)}}},L=function(){this._expanded=!0},M=function(){a.dissolveCommunity(h)},N=function(){this._expanded=!1},O=function(a,b){var c=a.select("rect").attr("width"),d=a.append("text").attr("text-anchor","middle").attr("fill",b.getForegroundCommunityColour()).attr("stroke","none");c*=2,c/=3,h._reason&&h._reason.key&&(d.append("tspan").attr("x","0").attr("dy","-4").text(h._reason.key+":"),d.append("tspan").attr("x","0").attr("dy","16").text(h._reason.value)),d.append("tspan").attr("x",c).attr("y","0").attr("fill",b.getCommunityColour()).text(h._size)},P=function(b,c,d,e){var f=b.append("g").attr("stroke",e.getForegroundCommunityColour()).attr("fill",e.getCommunityColour());c(f,9),c(f,6),c(f,3),c(f),f.on("click",function(){h.expand(),a.checkNodeLimit(h),d()}),O(f,e)},Q=function(a,b){var c=a.selectAll(".node").data(j,function(a){return a._id});c.enter().append("g").attr("class","node").attr("id",function(a){return a._id}),c.exit().remove(),c.selectAll("* > *").remove(),b(c)},R=function(a,b){c=a.append("g"),d=c.append("rect").attr("rx","8").attr("ry","8").attr("fill","none").attr("stroke","black"),e=c.append("rect").attr("rx","8").attr("ry","8").attr("height","20").attr("fill","#686766").attr("stroke","none"),c.append("image").attr("id",h._id+"_dissolve").attr("xlink:href","img/icon_delete.png").attr("width","16").attr("height","16").attr("x","5").attr("y","2").attr("style","cursor:pointer").on("click",function(){h.dissolve(),b()}),c.append("image").attr("id",h._id+"_collapse").attr("xlink:href","img/gv_collapse.png").attr("width","16").attr("height","16").attr("x","25").attr("y","2").attr("style","cursor:pointer").on("click",function(){h.collapse(),b()});var f=c.append("text").attr("x","45").attr("y","15").attr("fill","white").attr("stroke","none").attr("text-anchor","left");h._reason&&f.text(h._reason.text),v().observe(document.getElementById(h._id),{subtree:!0,attributes:!0})},S=function(a){if(h._expanded){var b=a.focus(),c=[b[0]-h.position.x,b[1]-h.position.y];a.focus(c),_.each(j,function(b){b.position=a(b),b.position.x/=h.position.z,b.position.y/=h.position.z,b.position.z/=h.position.z}),a.focus(b)}},T=function(a,b,c,d,e){return a.on("click",null),h._expanded?(R(a,d),void Q(a,c,d,e)):void P(a,b,d,e)},U=function(a,b,c){if(h._expanded){var d=a.selectAll(".link"),e=d.select("line");b(e,d),c(d)}},V=function(a,b){var c,d,e=function(a){return a._id};h._expanded&&(d=a.selectAll(".link").data(k,e),d.enter().append("g").attr("class","link").attr("id",e),d.exit().remove(),d.selectAll("* > *").remove(),c=d.append("line"),b(c,d))},W=function(a){H(a)};g=new ForceLayouter({distance:100,gravity:.1,charge:-500,width:1,height:1,nodes:j,links:k}),this._id="*community_"+Math.floor(1e6*Math.random()),b.length>0?(this.x=b[0].x,this.y=b[0].y):(this.x=0,this.y=0),this._size=0,this._inboundCounter=0,this._outboundCounter=0,this._expanded=!1,this._isCommunity=!0,D(b),this.hasNode=z,this.getNodes=A,this.getNode=B,this.getDistance=p,this.getCharge=q,this.insertNode=C,this.insertInboundEdge=I,this.insertOutboundEdge=J,this.removeNode=E,this.removeInboundEdge=F,this.removeOutboundEdge=G,this.removeOutboundEdgesFromNode=H,this.collapseNode=W,this.dissolve=M,this.getDissolveInfo=K,this.collapse=N,this.expand=L,this.shapeNodes=T,this.shapeInnerEdges=V,this.updateInnerEdges=U,this.addDistortion=S,this.getSourcePosition=s,this.getTargetPosition=t}function DomObserverFactory(){"use strict";var a=window.WebKitMutationObserver||window.MutationObserver;this.createObserver=function(b){if(!a)throw"Observer not supported";return new a(b)}}function EdgeShaper(a,b,c){"use strict";var d,e,f,g=this,h=[],i={},j=new ContextMenu("gv_edge_cm"),k=function(a,b){return _.isArray(a)?b[_.find(a,function(a){return b[a]})]:b[a]},l=function(a){if(void 0===a)return[""];"string"!=typeof a&&(a=String(a));var b=a.match(/[\w\W]{1,10}(\s|$)|\S+?(\s|$)/g);return b[0]=$.trim(b[0]),b[1]=$.trim(b[1]),b[0].length>12&&(b[0]=$.trim(a.substring(0,10))+"-",b[1]=$.trim(a.substring(10)),b[1].length>12&&(b[1]=b[1].split(/\W/)[0],b[1].length>12&&(b[1]=b[1].substring(0,10)+"...")),b.length=2),b.length>2&&(b.length=2,b[1]+="..."),b},m=!0,n={},o=function(a){return a._id},p=function(a,b){},q=new ColourMapper,r=function(){q.reset()},s=p,t=p,u=p,v=p,w=function(){f={click:p,dblclick:p,mousedown:p,mouseup:p,mousemove:p,mouseout:p,mouseover:p}},x=function(a,b){return 180*Math.atan2(b.y-a.y,b.x-a.x)/Math.PI},y=function(a,b){var c,d=Math.sqrt((b.y-a.y)*(b.y-a.y)+(b.x-a.x)*(b.x-a.x));return a.x===b.x?d-=18*b.z:(c=Math.abs((b.y-a.y)/(b.x-a.x)),d-=.4>c?Math.abs(d*b.z*45/(b.x-a.x)):Math.abs(d*b.z*18/(b.y-a.y))),d},z=function(a,b){_.each(f,function(a,c){b.on(c,a)})},A=function(a,b){if("update"===a)s=b;else{if(void 0===f[a])throw"Sorry Unknown Event "+a+" cannot be bound.";f[a]=b}},B=function(a){var b,c,d,e;return d=a.source,e=a.target,d._isCommunity?(i[d._id]=d,b=d.getSourcePosition(a)):b=d.position,e._isCommunity?(i[e._id]=e,c=e.getTargetPosition(a)):c=e.position,{s:b,t:c}},C=function(a,b){i={},b.attr("transform",function(a){var b=B(a);return"translate("+b.s.x+", "+b.s.y+")rotate("+x(b.s,b.t)+")"}),a.attr("x2",function(a){var b=B(a);return y(b.s,b.t)})},D=function(a,b){t(a,b),m&&u(a,b),v(a,b),z(a,b),C(a,b)},E=function(a){void 0!==a&&(h=a);var b,c=g.parent.selectAll(".link").data(h,o);c.enter().append("g").attr("class","link").attr("id",o),c.exit().remove(),c.selectAll("* > *").remove(),b=c.append("line"),D(b,c),_.each(i,function(a){a.shapeInnerEdges(d3.select(this),D)}),j.bindMenu($(".link"))},F=function(){var a=g.parent.selectAll(".link"),b=a.select("line");C(b,a),s(a),_.each(i,function(a){a.updateInnerEdges(d3.select(this),C,s)})},G=function(a){switch($("svg defs marker#arrow").remove(),a.type){case EdgeShaper.shapes.NONE:t=p;break;case EdgeShaper.shapes.ARROW:t=function(a,b){a.attr("marker-end","url(#arrow)")},0===d.selectAll("defs")[0].length&&d.append("defs"),d.select("defs").append("marker").attr("id","arrow").attr("refX","10").attr("refY","5").attr("markerUnits","strokeWidth").attr("markerHeight","10").attr("markerWidth","10").attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z");break;default:throw"Sorry given Shape not known!"}},H=function(a){u=_.isFunction(a)?function(b,c){c.append("text").attr("text-anchor","middle").text(a)}:function(b,c){c.append("text").attr("text-anchor","middle").text(function(b){var c=l(k(a,b._data));return c[0]||""})},s=function(a){a.select("text").attr("transform",function(a){var b=B(a);return"translate("+y(b.s,b.t)/2+", -3)"})}},I=function(a){void 0!==a.reset&&a.reset&&w(),_.each(a,function(a,b){"reset"!==b&&A(b,a)})},J=function(a){switch($("svg defs #gradientEdgeColor").remove(),r(),a.type){case"single":v=function(b,c){b.attr("stroke",a.stroke)};break;case"gradient":0===d.selectAll("defs")[0].length&&d.append("defs");var b=d.select("defs").append("linearGradient").attr("id","gradientEdgeColor");b.append("stop").attr("offset","0").attr("stop-color",a.source),b.append("stop").attr("offset","0.4").attr("stop-color",a.source),b.append("stop").attr("offset","0.6").attr("stop-color",a.target),b.append("stop").attr("offset","1").attr("stop-color",a.target),v=function(a,b){a.attr("stroke","url(#gradientEdgeColor)"),a.attr("y2","0.0000000000000001")};break;case"attribute":v=function(b,c){c.attr("stroke",function(b){return q.getColour(b._data[a.key])})};break;default:throw"Sorry given colour-scheme not known"}},K=function(a){void 0!==a.shape&&G(a.shape),void 0!==a.label&&(H(a.label),g.label=a.label),void 0!==a.actions&&I(a.actions),void 0!==a.color&&J(a.color)};for(g.parent=a,w(),d=a;d[0][0]&&d[0][0].ownerSVGElement;)d=d3.select(d[0][0].ownerSVGElement);void 0===b&&(b={color:{type:"single",stroke:"#686766"}}),void 0===b.color&&(b.color={type:"single",stroke:"#686766"}),K(b),_.isFunction(c)&&(o=c),e=d.append("g"),g.changeTo=function(a){K(a),E(),F()},g.drawEdges=function(a){E(a),F()},g.updateEdges=function(){F()},g.reshapeEdges=function(){E()},g.activateLabel=function(a){m=!!a,E()},g.addAnEdgeFollowingTheCursor=function(a,b){return n=e.append("line"),n.attr("stroke","black").attr("id","connectionLine").attr("x1",a).attr("y1",b).attr("x2",a).attr("y2",b),function(a,b){n.attr("x2",a).attr("y2",b)}},g.removeCursorFollowingEdge=function(){n.remove&&(n.remove(),n={})},g.addMenuEntry=function(a,b){j.addEntry(a,b)},g.getLabel=function(){return g.label||""},g.resetColourMap=r}function EventDispatcher(a,b,c){"use strict";var d,e,f,g,h=this,i=function(b){if(void 0===b.shaper&&(b.shaper=a),d.checkNodeEditorConfig(b)){var c=new d.InsertNode(b),e=new d.PatchNode(b),f=new d.DeleteNode(b);h.events.CREATENODE=function(a,b,d,e){var f;return f=_.isFunction(a)?a():a,function(){c(f,b,d,e)}},h.events.PATCHNODE=function(a,b,c){if(!_.isFunction(b))throw"Please give a function to extract the new node data";return function(){e(a,b(),c)}},h.events.DELETENODE=function(a){return function(b){f(b,a)}}}},j=function(a){if(void 0===a.shaper&&(a.shaper=b),d.checkEdgeEditorConfig(a)){var c=new d.InsertEdge(a),e=new d.PatchEdge(a),f=new d.DeleteEdge(a),g=null,i=!1;h.events.STARTCREATEEDGE=function(a){return function(b){var c=d3.event||window.event;g=b,i=!1,void 0!==a&&a(b,c),c.stopPropagation()}},h.events.CANCELCREATEEDGE=function(a){return function(){g=null,void 0===a||i||a()}},h.events.FINISHCREATEEDGE=function(a){return function(b){null!==g&&b!==g&&(c(g,b,a),i=!0)}},h.events.PATCHEDGE=function(a,b,c){if(!_.isFunction(b))throw"Please give a function to extract the new node data";return function(){e(a,b(),c)}},h.events.DELETEEDGE=function(a){return function(b){f(b,a)}}}},k=function(){g=g||$("svg"),g.unbind(),_.each(e,function(a,b){g.bind(b,function(c){_.each(a,function(a){a(c)}),f[b]&&f[b](c)})})};if(void 0===a)throw"NodeShaper has to be given.";if(void 0===b)throw"EdgeShaper has to be given.";d=new EventLibrary,e={click:[],dblclick:[],mousedown:[],mouseup:[],mousemove:[],mouseout:[],mouseover:[]},f={},h.events={},void 0!==c&&(void 0!==c.expand&&d.checkExpandConfig(c.expand)&&(h.events.EXPAND=new d.Expand(c.expand),a.setGVStartFunction(function(){c.expand.reshapeNodes(),c.expand.startCallback()})),void 0!==c.drag&&d.checkDragConfig(c.drag)&&(h.events.DRAG=d.Drag(c.drag)),void 0!==c.nodeEditor&&i(c.nodeEditor),void 0!==c.edgeEditor&&j(c.edgeEditor)),Object.freeze(h.events),h.bind=function(c,d,e){if(void 0===e||!_.isFunction(e))throw"You have to give a function that should be bound as a third argument";var g={};switch(c){case"nodes":g[d]=e,a.changeTo({actions:g});break;case"edges":g[d]=e,b.changeTo({actions:g});break;case"svg":f[d]=e,k();break;default:if(void 0===c.bind)throw'Sorry cannot bind to object. Please give either "nodes", "edges" or a jQuery-selected DOM-Element';c.unbind(d),c.bind(d,e)}},h.rebind=function(c,d){switch(d=d||{},d.reset=!0,c){case"nodes":a.changeTo({actions:d});break;case"edges":b.changeTo({actions:d});break;case"svg":f={},_.each(d,function(a,b){"reset"!==b&&(f[b]=a)}),k();break;default:throw'Sorry cannot rebind to object. Please give either "nodes", "edges" or "svg"'}},h.fixSVG=function(a,b){if(void 0===e[a])throw"Sorry unkown event";e[a].push(b),k()},Object.freeze(h.events)}function EventLibrary(){"use strict";var a=this;this.checkExpandConfig=function(a){if(void 0===a.startCallback)throw"A callback to the Start-method has to be defined";if(void 0===a.adapter||void 0===a.adapter.explore)throw"An adapter to load data has to be defined";if(void 0===a.reshapeNodes)throw"A callback to reshape nodes has to be defined";return!0},this.Expand=function(b){a.checkExpandConfig(b);var c=b.startCallback,d=b.adapter.explore,e=b.reshapeNodes;return function(a){d(a,c),e(),c()}},this.checkDragConfig=function(a){if(void 0===a.layouter)throw"A layouter has to be defined";if(void 0===a.layouter.drag||!_.isFunction(a.layouter.drag))throw"The layouter has to offer a drag function";return!0},this.Drag=function(b){return a.checkDragConfig(b),b.layouter.drag},this.checkNodeEditorConfig=function(a){if(void 0===a.adapter)throw"An adapter has to be defined";if(void 0===a.shaper)throw"A node shaper has to be defined";return!0},this.checkEdgeEditorConfig=function(a){if(void 0===a.adapter)throw"An adapter has to be defined";if(void 0===a.shaper)throw"An edge Shaper has to be defined";return!0},this.InsertNode=function(b){a.checkNodeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b,e,f){var g,h;_.isFunction(a)&&!b?(g=a,h={}):(g=b,h=a),c.createNode(h,function(a){d.reshapeNodes(),g(a)},e,f)}},this.PatchNode=function(b){a.checkNodeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b,e){c.patchNode(a,b,function(a){d.reshapeNodes(),e(a)})}},this.DeleteNode=function(b){a.checkNodeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b){c.deleteNode(a,function(){d.reshapeNodes(),b()})}},this.SelectNodeCollection=function(b){a.checkNodeEditorConfig(b);var c=b.adapter;if(!_.isFunction(c.useNodeCollection))throw"The adapter has to support collection changes";return function(a,b){c.useNodeCollection(a),b()}},this.InsertEdge=function(b){a.checkEdgeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b,e){c.createEdge({source:a,target:b},function(a){d.reshapeEdges(),e(a)})}},this.PatchEdge=function(b){a.checkEdgeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b,e){c.patchEdge(a,b,function(a){d.reshapeEdges(),e(a)})}},this.DeleteEdge=function(b){a.checkEdgeEditorConfig(b);var c=b.adapter,d=b.shaper;return function(a,b){c.deleteEdge(a,function(){d.reshapeEdges(),b()})}}}function ForceLayouter(a){"use strict";var b=this,c=d3.layout.force(),d=a.charge||-600,e=a.distance||80,f=a.gravity||.01,g=function(a){var b=0;return b+=a.source._isCommunity?a.source.getDistance(e):e,b+=a.target._isCommunity?a.target.getDistance(e):e},h=function(a){return a._isCommunity?a.getCharge(d):d},i=a.onUpdate||function(){},j=a.width||880,k=a.height||680,l=function(a){a.distance&&(e=a.distance),a.gravity&&c.gravity(a.gravity),a.charge&&(d=a.charge)};if(void 0===a.nodes)throw"No nodes defined";if(void 0===a.links)throw"No links defined";c.nodes(a.nodes),c.links(a.links),c.size([j,k]),c.linkDistance(g),c.gravity(f),c.charge(h),c.on("tick",function(){}),b.start=function(){c.start()},b.stop=function(){c.stop()},b.drag=c.drag,b.setCombinedUpdateFunction=function(a,d,e){void 0!==e?(i=function(){c.alpha()<.1&&(a.updateNodes(),d.updateEdges(),e(),c.alpha()<.05&&b.stop())},c.on("tick",i)):(i=function(){c.alpha()<.1&&(a.updateNodes(),d.updateEdges(),c.alpha()<.05&&b.stop())},c.on("tick",i))},b.changeTo=function(a){l(a)},b.changeWidth=function(a){j=a,c.size([j,k])}}function FoxxAdapter(a,b,c,d,e){"use strict";if(void 0===a)throw"The nodes have to be given.";if(void 0===b)throw"The edges have to be given.";if(void 0===c)throw"The route has to be given.";if(void 0===d)throw"A reference to the graph viewer has to be given.";e=e||{};var f,g=this,h={},i={},j=c,k={cache:!1,contentType:"application/json",dataType:"json",processData:!1,error:function(a){try{throw console.log(a.statusText),"["+a.errorNum+"] "+a.errorMessage}catch(b){throw console.log(b),"Undefined ERROR"}}},l=function(){i.query={get:function(a,b){var c=$.extend(k,{type:"GET",url:j+"/query/"+a,success:b});$.ajax(c)}},i.nodes={post:function(a,b){var c=$.extend(k,{type:"POST",url:j+"/nodes",data:JSON.stringify(a),success:b});$.ajax(c)},put:function(a,b,c){var d=$.extend(k,{type:"PUT",url:j+"/nodes/"+a,data:JSON.stringify(b),success:c});$.ajax(d)},del:function(a,b){var c=$.extend(k,{type:"DELETE",url:j+"/nodes/"+a,success:b});$.ajax(c)}},i.edges={post:function(a,b){var c=$.extend(k,{type:"POST",url:j+"/edges",data:JSON.stringify(a),success:b});$.ajax(c)},put:function(a,b,c){var d=$.extend(k,{type:"PUT", url:j+"/edges/"+a,data:JSON.stringify(b),success:c});$.ajax(d)},del:function(a,b){var c=$.extend(k,{type:"DELETE",url:j+"/edges/"+a,success:b});$.ajax(c)}},i.forNode={del:function(a,b){var c=$.extend(k,{type:"DELETE",url:j+"/edges/forNode/"+a,success:b});$.ajax(c)}}},m=function(a,b,c){i[a].get(b,c)},n=function(a,b,c){i[a].post(b,c)},o=function(a,b,c){i[a].del(b,c)},p=function(a,b,c,d){i[a].put(b,c,d)},q=function(a){void 0!==a.width&&f.setWidth(a.width),void 0!==a.height&&f.setHeight(a.height)},r=function(b,c){var d={},e=b.first,g=a.length;e=f.insertNode(e),_.each(b.nodes,function(b){b=f.insertNode(b),g=l.TOTAL_NODES?$(".infoField").hide():$(".infoField").show());var e=t(l.NODES_TO_DISPLAY,d[c]);if(e.length>0)return _.each(e,function(a){l.randomNodes.push(a)}),void l.loadInitialNode(e[0]._id,a)}a({errorCode:404})},l.loadInitialNode=function(a,b){e.cleanUp(),l.loadNode(a,v(b))},l.getRandomNodes=function(){var a=[],b=[];l.definedNodes.length>0&&_.each(l.definedNodes,function(a){b.push(a)}),l.randomNodes.length>0&&_.each(l.randomNodes,function(a){b.push(a)});var c=0;return _.each(b,function(b){c0?_.each(d,function(a){s(o.traversal(k),{example:a.vertex._id},function(a){_.each(a,function(a){c.push(a)}),u(c,b)})}):s(o.traversal(k),{example:a},function(a){u(a,b)})})},l.loadNodeFromTreeByAttributeValue=function(a,b,c){var d={},e=o.traversalAttributeValue(k,d,f,a,b);s(e,d,function(a){u(a,c)})},l.getNodeExampleFromTreeByAttributeValue=function(a,b,c){var d,g=o.travesalAttributeValue(k,d,f,a,b);s(g,d,function(d){if(0===d.length)throw arangoHelper.arangoError("Graph error","no nodes found"),"No suitable nodes have been found.";_.each(d,function(d){if(d.vertex[a]===b){var f={};f._key=d.vertex._key,f._id=d.vertex._id,f._rev=d.vertex._rev,e.insertNode(f),c(f)}})})},l.loadAdditionalNodeByAttributeValue=function(a,b,c){l.getNodeExampleFromTreeByAttributeValue(a,b,c)},l.loadInitialNodeByAttributeValue=function(a,b,c){e.cleanUp(),l.loadNodeFromTreeByAttributeValue(a,b,v(c))},l.requestCentralityChildren=function(a,b){s(o.childrenCentrality,{id:a},function(a){b(a[0])})},l.createEdge=function(a,b){var c={};c._from=a.source._id,c._to=a.target._id,$.ajax({cache:!1,type:"POST",url:n.edges+i,data:JSON.stringify(c),dataType:"json",contentType:"application/json",processData:!1,success:function(a){if(a.error===!1){var d,f=a.edge;f._from=c._from,f._to=c._to,d=e.insertEdge(f),b(d)}},error:function(a){var b="";try{b=JSON.parse(a.responseText).errorMessage+" ("+JSON.parse(a.responseText).errorNum+")",arangoHelper.arangoError(a.statusText,b)}catch(c){throw a.statusText}}})},l.deleteEdge=function(a,b){$.ajax({cache:!1,type:"DELETE",url:n.edges+a._id,contentType:"application/json",dataType:"json",processData:!1,success:function(){e.removeEdge(a),void 0!==b&&_.isFunction(b)&&b()},error:function(a){var b="";try{b=JSON.parse(a.responseText).errorMessage+" ("+JSON.parse(a.responseText).errorNum+")",arangoHelper.arangoError(a.statusText,b)}catch(c){throw a.statusText}}})},l.patchEdge=function(a,b,c){$.ajax({cache:!1,type:"PUT",url:n.edges+a._id,data:JSON.stringify(b),dataType:"json",contentType:"application/json",processData:!1,success:function(){a._data=$.extend(a._data,b),c()},error:function(a){var b="";try{b=JSON.parse(a.responseText).errorMessage+" ("+JSON.parse(a.responseText).errorNum+")",arangoHelper.arangoError(a.statusText,b)}catch(c){throw a.statusText}}})},l.createNode=function(a,b){$.ajax({cache:!1,type:"POST",url:n.vertices+g,data:JSON.stringify(a),dataType:"json",contentType:"application/json",processData:!1,success:function(c){c.error===!1&&(a._key=c.vertex._key,a._id=c.vertex._id,a._rev=c.vertex._rev,e.insertNode(a),b(a))},error:function(a){var b="";try{b=JSON.parse(a.responseText).errorMessage+" ("+JSON.parse(a.responseText).errorNum+")",arangoHelper.arangoError(a.statusText,b)}catch(c){throw a.statusText}}})},l.deleteNode=function(a,b){$.ajax({cache:!1,type:"DELETE",url:n.vertices+a._id,dataType:"json",contentType:"application/json",processData:!1,success:function(){e.removeEdgesForNode(a),e.removeNode(a),void 0!==b&&_.isFunction(b)&&b()},error:function(a){var b="";try{b=JSON.parse(a.responseText).errorMessage+" ("+JSON.parse(a.responseText).errorNum+")",arangoHelper.arangoError(a.statusText,b)}catch(c){throw a.statusText}}})},l.patchNode=function(a,b,c){$.ajax({cache:!1,type:"PUT",url:n.vertices+a._id,data:JSON.stringify(b),dataType:"json",contentType:"application/json",processData:!1,success:function(){a._data=$.extend(a._data,b),c(a)},error:function(a){throw a.statusText}})},l.changeToGraph=function(a,b){e.cleanUp(),q(a),void 0!==b&&(k=b===!0?"any":"outbound")},l.setNodeLimit=function(a,b){e.setNodeLimit(a,b)},l.setChildLimit=function(a){e.setChildLimit(a)},l.expandCommunity=function(a,b){e.expandCommunity(a),void 0!==b&&b()},l.getGraphs=function(a){a&&a.length>=1&&s(o.getAllGraphs,{},a)},l.getAttributeExamples=function(a){if(a&&a.length>=1){var b,c=[],d=_.shuffle(l.getNodeCollections());for(b=0;b0&&(c=c.concat(_.flatten(_.map(e,function(a){return _.keys(a)}))))}c=_.sortBy(_.uniq(c),function(a){return a.toLowerCase()}),a(c)}},l.getEdgeCollections=function(){return h},l.getSelectedEdgeCollection=function(){return i},l.useEdgeCollection=function(a){if(!_.contains(h,a))throw"Collection "+a+" is not available in the graph.";i=a},l.getNodeCollections=function(){return f},l.getSelectedNodeCollection=function(){return g},l.useNodeCollection=function(a){if(!_.contains(f,a))throw"Collection "+a+" is not available in the graph.";g=a},l.getDirection=function(){return k},l.getGraphName=function(){return j},l.setWidth=e.setWidth,l.changeTo=e.changeTo,l.getPrioList=e.getPrioList}function JSONAdapter(a,b,c,d,e,f){"use strict";var g=this,h={},i={},j=new AbstractAdapter(b,c,this,d);h.range=e/2,h.start=e/4,h.getStart=function(){return this.start+Math.random()*this.range},i.range=f/2,i.start=f/4,i.getStart=function(){return this.start+Math.random()*this.range},g.loadNode=function(a,b){g.loadNodeFromTreeById(a,b)},g.loadInitialNode=function(b,c){var d=a+b+".json";j.cleanUp(),d3.json(d,function(a,d){void 0!==a&&null!==a&&console.log(a);var e=j.insertInitialNode(d);g.requestCentralityChildren(b,function(a){e._centrality=a}),_.each(d.children,function(a){var b=j.insertNode(a),c={_from:e._id,_to:b._id,_id:e._id+"-"+b._id};j.insertEdge(c),g.requestCentralityChildren(b._id,function(a){b._centrality=a}),delete b._data.children}),delete e._data.children,c&&c(e)})},g.loadNodeFromTreeById=function(b,c){var d=a+b+".json";d3.json(d,function(a,d){void 0!==a&&null!==a&&console.log(a);var e=j.insertNode(d);g.requestCentralityChildren(b,function(a){e._centrality=a}),_.each(d.children,function(a){var b=j.insertNode(a),c={_from:e._id,_to:b._id,_id:e._id+"-"+b._id};j.insertEdge(c),g.requestCentralityChildren(b._id,function(a){e._centrality=a}),delete b._data.children}),delete e._data.children,c&&c(e)})},g.requestCentralityChildren=function(b,c){var d=a+b+".json";d3.json(d,function(a,b){void 0!==a&&null!==a&&console.log(a),void 0!==c&&c(void 0!==b.children?b.children.length:0)})},g.loadNodeFromTreeByAttributeValue=function(a,b,c){throw"Sorry this adapter is read-only"},g.loadInitialNodeByAttributeValue=function(a,b,c){throw"Sorry this adapter is read-only"},g.createEdge=function(a,b){throw"Sorry this adapter is read-only"},g.deleteEdge=function(a,b){throw"Sorry this adapter is read-only"},g.patchEdge=function(a,b,c){throw"Sorry this adapter is read-only"},g.createNode=function(a,b){throw"Sorry this adapter is read-only"},g.deleteNode=function(a,b){throw"Sorry this adapter is read-only"},g.patchNode=function(a,b,c){throw"Sorry this adapter is read-only"},g.setNodeLimit=function(a,b){},g.setChildLimit=function(a){},g.expandCommunity=function(a,b){},g.setWidth=function(){},g.explore=j.explore}function ModularityJoiner(){"use strict";var a={},b=Array.prototype.forEach,c=Object.keys,d=Array.isArray,e=Object.prototype.toString,f=Array.prototype.indexOf,g=Array.prototype.map,h=Array.prototype.some,i={isArray:d||function(a){return"[object Array]"===e.call(a)},isFunction:function(a){return"function"==typeof a},isString:function(a){return"[object String]"===e.call(a)},each:function(c,d,e){if(null!==c&&void 0!==c){var f,g,h;if(b&&c.forEach===b)c.forEach(d,e);else if(c.length===+c.length){for(f=0,g=c.length;g>f;f++)if(d.call(e,c[f],f,c)===a)return}else for(h in c)if(c.hasOwnProperty(h)&&d.call(e,c[h],h,c)===a)return}},keys:c||function(a){if("object"!=typeof a||Array.isArray(a))throw new TypeError("Invalid object");var b,c=[];for(b in a)a.hasOwnProperty(b)&&(c[c.length]=b);return c},min:function(a,b,c){if(!b&&i.isArray(a)&&a[0]===+a[0]&&a.length<65535)return Math.min.apply(Math,a);if(!b&&i.isEmpty(a))return 1/0;var d={computed:1/0,value:1/0};return i.each(a,function(a,e,f){var g=b?b.call(c,a,e,f):a;gc&&(c=a,b=d)}),0>c?void delete q[a]:void(q[a]=b)},t=function(a,b){s(b)},u=function(a,b){return b>a?p[a]&&p[a][b]:p[b]&&p[b][a]},v=function(a,b){return b>a?p[a][b]:p[b][a]},w=function(a,b,c){return b>a?(p[a]=p[a]||{},void(p[a][b]=c)):(p[b]=p[b]||{},void(p[b][a]=c))},x=function(a,b){if(b>a){if(!p[a])return;return delete p[a][b],void(i.isEmpty(p[a])&&delete p[a])}a!==b&&x(b,a)},y=function(a,b){var c,d;return b>a?u(a,b)?(d=v(a,b),q[a]===b?void s(a):u(a,q[a])?(c=v(a,q[a]),void(d>c&&(q[a]=b))):void s(a)):void s(a):void(a!==b&&y(b,a))},z=function(a,b){o[a]._in+=o[b]._in,o[a]._out+=o[b]._out,delete o[b]},A=function(a,b){j[a]=j[a]||{},j[a][b]=(j[a][b]||0)+1,k[b]=k[b]||{},k[b][a]=(k[b][a]||0)+1,l[a]=l[a]||{_in:0,_out:0},l[b]=l[b]||{_in:0,_out:0},l[a]._out++,l[b]._in++,m++,n=Math.pow(m,-1)},B=function(a,b){j[a]&&(j[a][b]--,0===j[a][b]&&delete j[a][b],k[b][a]--,0===k[b][a]&&delete k[b][a],l[a]._out--,l[b]._in--,m--,n=m>0?Math.pow(m,-1):0,i.isEmpty(j[a])&&delete j[a],i.isEmpty(k[b])&&delete k[b],0===l[a]._in&&0===l[a]._out&&delete l[a],0===l[b]._in&&0===l[b]._out&&delete l[b])},C=function(){return o={},i.each(l,function(a,b){o[b]={_in:a._in/m,_out:a._out/m}}),o},D=function(a,b){return o[a]._out*o[b]._in+o[a]._in*o[b]._out},E=function(a){var b=i.keys(j[a]||{}),c=i.keys(k[a]||{});return i.union(b,c)},F=function(){p={},i.each(j,function(a,b){var c=k[b]||{},d=E(b);i.each(d,function(d){var e,f=a[d]||0;f+=c[d]||0,e=f*n-D(b,d),e>0&&w(b,d,e)})})},G=function(){return q={},i.each(p,t),q},H=function(a,b,c){var d;return u(c,a)?(d=v(c,a),u(c,b)?(d+=v(c,b),w(c,a,d),x(c,b),y(c,a),void y(c,b)):(d-=D(c,b),0>d&&x(c,a),void y(c,a))):void(u(c,b)&&(d=v(c,b),d-=D(c,a),d>0&&w(c,a,d),y(c,a),x(c,b),y(c,b)))},I=function(a,b){i.each(p,function(c,d){return d===a||d===b?void i.each(c,function(c,d){return d===b?(x(a,b),void y(a,b)):void H(a,b,d)}):void H(a,b,d)})},J=function(){return j},K=function(){return q},L=function(){return p},M=function(){return o},N=function(){return r},O=function(){var a,b,c=Number.NEGATIVE_INFINITY;return i.each(q,function(d,e){c=c?null:{sID:b,lID:a,val:c}},P=function(a){var b,c=Number.NEGATIVE_INFINITY;return i.each(a,function(a){a.q>c&&(c=a.q,b=a.nodes)}),b},Q=function(){C(),F(),G(),r={}},R=function(a){var b=a.sID,c=a.lID,d=a.val;r[b]=r[b]||{nodes:[b],q:0},r[c]?(r[b].nodes=r[b].nodes.concat(r[c].nodes),r[b].q+=r[c].q,delete r[c]):r[b].nodes.push(c),r[b].q+=d,I(b,c),z(b,c)},S=function(a,b,c){if(0===c.length)return!0;var d=[];return i.each(c,function(c){a[c]===Number.POSITIVE_INFINITY&&(a[c]=b,d=d.concat(E(c)))}),S(a,b+1,d)},T=function(a){var b={};if(i.each(j,function(a,c){b[c]=Number.POSITIVE_INFINITY}),b[a]=0,S(b,1,E(a)))return b;throw"FAIL!"},U=function(a){return function(b){return a[b]}},V=function(a,b){var c,d={},e=[],f={},g=function(a,b){var c=f[i.min(a,U(f))],e=f[i.min(b,U(f))],g=e-c;return 0===g&&(g=d[b[b.length-1]].q-d[a[a.length-1]].q),g};for(Q(),c=O();null!==c;)R(c),c=O();return d=N(),void 0!==b?(i.each(d,function(a,c){i.contains(a.nodes,b)&&delete d[c]}),e=i.pluck(i.values(d),"nodes"),f=T(b),e.sort(g),e[0]):P(d)};this.insertEdge=A,this.deleteEdge=B,this.getAdjacencyMatrix=J,this.getHeap=K,this.getDQ=L,this.getDegrees=M,this.getCommunities=N,this.getBest=O,this.setup=Q,this.joinCommunity=R,this.getCommunity=V}function NodeReducer(a){"use strict";a=a||[];var b=function(a,b){a.push(b)},c=function(a,b){if(!a.reason.example)return a.reason.example=b,1;var c=b._data||{},d=a.reason.example._data||{},e=_.union(_.keys(d),_.keys(c)),f=0,g=0;return _.each(e,function(a){void 0!==d[a]&&void 0!==c[a]&&(f++,d[a]===c[a]&&(f+=4))}),g=5*e.length,g++,f++,f/g},d=function(){return a},e=function(b){a=b},f=function(b,c){var d={},e=[];return _.each(b,function(b){var c,e,f=b._data,g=0;for(g=0;gd;d++){if(g[d]=g[d]||{reason:{type:"similar",text:"Similar Nodes"},nodes:[]},c(g[d],a)>h)return void b(g[d].nodes,a);i>g[d].nodes.length&&(f=d,i=g[d].nodes.length)}b(g[f].nodes,a)}),g):f(d,e)};this.bucketNodes=g,this.changePrioList=e,this.getPrioList=d}function NodeShaper(a,b,c){"use strict";var d,e,f=this,g=[],h=!0,i=new ContextMenu("gv_node_cm"),j=function(a,b){return _.isArray(a)?b[_.find(a,function(a){return b[a]})]:b[a]},k=function(a){if(void 0===a)return[""];"string"!=typeof a&&(a=String(a));var b=a.match(/[\w\W]{1,10}(\s|$)|\S+?(\s|$)/g);return b[0]=$.trim(b[0]),b[1]=$.trim(b[1]),b[0].length>12&&(b[0]=$.trim(a.substring(0,10)),b[1]=$.trim(a.substring(10)),b[1].length>12&&(b[1]=b[1].split(/\W/)[0],b[1].length>2&&(b[1]=b[1].substring(0,5)+"...")),b.length=2),b.length>2&&(b.length=2,b[1]+="..."),b},l=function(a){},m=l,n=function(a){return{x:a.x,y:a.y,z:1}},o=n,p=function(){_.each(g,function(a){a.position=o(a),a._isCommunity&&a.addDistortion(o)})},q=new ColourMapper,r=function(){q.reset()},s=function(a){return a._id},t=l,u=l,v=l,w=function(){return"black"},x=function(){f.parent.selectAll(".node").on("mousedown.drag",null),d={click:l,dblclick:l,drag:l,mousedown:l,mouseup:l,mousemove:l,mouseout:l,mouseover:l},e=l},y=function(a){_.each(d,function(b,c){"drag"===c?a.call(b):a.on(c,b)})},z=function(a){var b=a.filter(function(a){return a._isCommunity}),c=a.filter(function(a){return!a._isCommunity});u(c),b.each(function(a){a.shapeNodes(d3.select(this),u,z,m,q)}),h&&v(c),t(c),y(c),p()},A=function(a,b){if("update"===a)e=b;else{if(void 0===d[a])throw"Sorry Unknown Event "+a+" cannot be bound.";d[a]=b}},B=function(){var a=f.parent.selectAll(".node");p(),a.attr("transform",function(a){return"translate("+a.position.x+","+a.position.y+")scale("+a.position.z+")"}),e(a)},C=function(a){void 0!==a&&(g=a);var b=f.parent.selectAll(".node").data(g,s);b.enter().append("g").attr("class",function(a){return a._isCommunity?"node communitynode":"node"}).attr("id",s),b.exit().remove(),b.selectAll("* > *").remove(),z(b),B(),i.bindMenu($(".node"))},D=function(a){var b,c,d,e,f,g,h;switch(a.type){case NodeShaper.shapes.NONE:u=l;break;case NodeShaper.shapes.CIRCLE:b=a.radius||25,u=function(a,c){a.append("circle").attr("r",b),c&&a.attr("cx",-c).attr("cy",-c)};break;case NodeShaper.shapes.RECT:c=a.width||90,d=a.height||36,e=_.isFunction(c)?function(a){return-(c(a)/2)}:function(a){return-(c/2)},f=_.isFunction(d)?function(a){return-(d(a)/2)}:function(){return-(d/2)},u=function(a,b){b=b||0,a.append("rect").attr("width",c).attr("height",d).attr("x",function(a){return e(a)-b}).attr("y",function(a){return f(a)-b}).attr("rx","8").attr("ry","8")};break;case NodeShaper.shapes.IMAGE:c=a.width||32,d=a.height||32,g=a.fallback||"",h=a.source||g,e=_.isFunction(c)?function(a){return-(c(a)/2)}:-(c/2),f=_.isFunction(d)?function(a){return-(d(a)/2)}:-(d/2),u=function(a){var b=a.append("image").attr("width",c).attr("height",d).attr("x",e).attr("y",f);_.isFunction(h)?b.attr("xlink:href",h):b.attr("xlink:href",function(a){return a._data[h]?a._data[h]:g})};break;case void 0:break;default:throw"Sorry given Shape not known!"}},E=function(a){var b=[];_.each(a,function(a){b=$(a).find("text"),$(a).css("width","90px"),$(a).css("height","36px"),$(a).textfill({innerTag:"text",maxFontPixels:16,minFontPixels:10,explicitWidth:90,explicitHeight:36})})},F=function(a){v=_.isFunction(a)?function(b){var c=b.append("text").attr("text-anchor","middle").attr("fill",w).attr("stroke","none");c.each(function(b){var c=k(a(b)),d=c[0];2===c.length&&(d+=c[1]),d.length>15&&(d=d.substring(0,13)+"..."),void 0!==d&&""!==d||(d="ATTR NOT SET"),d3.select(this).append("tspan").attr("x","0").attr("dy","5").text(d)}),E(b)}:function(b){var c=b.append("text").attr("text-anchor","middle").attr("fill",w).attr("stroke","none");c.each(function(b){var c=k(j(a,b._data)),d=c[0];2===c.length&&(d+=c[1]),d.length>15&&(d=d.substring(0,13)+"..."),void 0!==d&&""!==d||(d="ATTR NOT SET"),d3.select(this).append("tspan").attr("x","0").attr("dy","5").text(d)}),E(b)}},G=function(a){void 0!==a.reset&&a.reset&&x(),_.each(a,function(a,b){"reset"!==b&&A(b,a)})},H=function(a){switch(r(),a.type){case"single":t=function(b){b.attr("fill",a.fill)},w=function(b){return a.stroke};break;case"expand":t=function(b){b.attr("fill",function(b){return b._expanded?a.expanded:a.collapsed})},w=function(a){return"white"};break;case"attribute":t=function(b){b.attr("fill",function(b){return void 0===b._data?q.getCommunityColour():q.getColour(j(a.key,b._data))}).attr("stroke",function(a){return a._expanded?"#fff":"transparent"}).attr("fill-opacity",function(a){return a._expanded?"1":"0.3"})},w=function(b){return void 0===b._data?q.getForegroundCommunityColour():q.getForegroundColour(j(a.key,b._data))};break;default:throw"Sorry given colour-scheme not known"}},I=function(a){if("reset"===a)o=n;else{if(!_.isFunction(a))throw"Sorry distortion cannot be parsed.";o=a}},J=function(a){void 0!==a.shape&&D(a.shape),void 0!==a.label&&(F(a.label),f.label=a.label),void 0!==a.actions&&G(a.actions),void 0!==a.color&&(H(a.color),f.color=a.color),void 0!==a.distortion&&I(a.distortion)};f.parent=a,x(),void 0===b&&(b={}),void 0===b.shape&&(b.shape={type:NodeShaper.shapes.RECT}),void 0===b.color&&(b.color={type:"single",fill:"#333333",stroke:"white"}),void 0===b.distortion&&(b.distortion="reset"),J(b),_.isFunction(c)&&(s=c),f.changeTo=function(a){J(a),C()},f.drawNodes=function(a){C(a)},f.updateNodes=function(){B()},f.reshapeNodes=function(){C()},f.activateLabel=function(a){h=!!a,C()},f.getColourMapping=function(){return q.getList()},f.setColourMappingListener=function(a){q.setChangeListener(a)},f.setGVStartFunction=function(a){m=a},f.getLabel=function(){return f.label||""},f.getColor=function(){return f.color.key||""},f.addMenuEntry=function(a,b){i.addEntry(a,b)},f.resetColourMap=r}function PreviewAdapter(a,b,c,d){"use strict";if(void 0===a)throw"The nodes have to be given.";if(void 0===b)throw"The edges have to be given.";if(void 0===c)throw"A reference to the graph viewer has to be given.";var e=this,f=new AbstractAdapter(a,b,this,c),g=function(a){void 0!==a.width&&f.setWidth(a.width),void 0!==a.height&&f.setHeight(a.height)},h=function(a,b){var c={},d=a.first;d=f.insertNode(d),_.each(a.nodes,function(a){a=f.insertNode(a),c[a._id]=a}),_.each(a.edges,function(a){f.insertEdge(a)}),delete c[d._id],void 0!==b&&_.isFunction(b)&&b(d)};d=d||{},g(d),e.loadInitialNode=function(a,b){f.cleanUp();var c=function(a){b(f.insertInitialNode(a))};e.loadNode(a,c)},e.loadNode=function(a,b){var c=[],d=[],e={},f={_id:1,label:"Node 1",image:"img/stored.png"},g={_id:2,label:"Node 2"},i={_id:3,label:"Node 3"},j={_id:4,label:"Node 4"},k={_id:5,label:"Node 5"},l={_id:"1-2",_from:1,_to:2,label:"Edge 1"},m={_id:"1-3",_from:1,_to:3,label:"Edge 2"},n={_id:"1-4",_from:1,_to:4,label:"Edge 3"},o={_id:"1-5",_from:1,_to:5,label:"Edge 4"},p={_id:"2-3",_from:2,_to:3,label:"Edge 5"};c.push(f),c.push(g),c.push(i),c.push(j),c.push(k),d.push(l),d.push(m),d.push(n),d.push(o),d.push(p),e.first=f,e.nodes=c,e.edges=d,h(e,b)},e.explore=f.explore,e.requestCentralityChildren=function(a,b){},e.createEdge=function(a,b){arangoHelper.arangoError("Server-side","createEdge was triggered.")},e.deleteEdge=function(a,b){arangoHelper.arangoError("Server-side","deleteEdge was triggered.")},e.patchEdge=function(a,b,c){arangoHelper.arangoError("Server-side","patchEdge was triggered.")},e.createNode=function(a,b){arangoHelper.arangoError("Server-side","createNode was triggered.")},e.deleteNode=function(a,b){arangoHelper.arangoError("Server-side","deleteNode was triggered."),arangoHelper.arangoError("Server-side","onNodeDelete was triggered.")},e.patchNode=function(a,b,c){arangoHelper.arangoError("Server-side","patchNode was triggered.")},e.setNodeLimit=function(a,b){f.setNodeLimit(a,b)},e.setChildLimit=function(a){f.setChildLimit(a)},e.setWidth=f.setWidth,e.expandCommunity=function(a,b){f.expandCommunity(a),void 0!==b&&b()}}function WebWorkerWrapper(a,b){"use strict";if(void 0===a)throw"A class has to be given.";if(void 0===b)throw"A callback has to be given.";var c,d=Array.prototype.slice.call(arguments),e={},f=function(){var c,d=function(a){switch(a.data.cmd){case"construct":try{w=new(Function.prototype.bind.apply(Construct,[null].concat(a.data.args))),w?self.postMessage({cmd:"construct",result:!0}):self.postMessage({cmd:"construct",result:!1})}catch(b){self.postMessage({cmd:"construct",result:!1,error:b.message||b})}break;default:var c,d={cmd:a.data.cmd};if(w&&"function"==typeof w[a.data.cmd])try{c=w[a.data.cmd].apply(w,a.data.args),c&&(d.result=c),self.postMessage(d)}catch(e){d.error=e.message||e,self.postMessage(d)}else d.error="Method not known",self.postMessage(d)}},e=function(a){var b="var w, Construct = "+a.toString()+";self.onmessage = "+d.toString();return new window.Blob(b.split())},f=window.URL,g=new e(a);return c=new window.Worker(f.createObjectURL(g)),c.onmessage=b,c},g=function(){return a.apply(this,d)};try{return c=f(),e.call=function(a){var b=Array.prototype.slice.call(arguments);b.shift(),c.postMessage({cmd:a,args:b})},d.shift(),d.shift(),d.unshift("construct"),e.call.apply(this,d),e}catch(h){d.shift(),d.shift(),g.prototype=a.prototype;try{c=new g}catch(i){return void b({data:{cmd:"construct",error:i}})}return e.call=function(a){var d=Array.prototype.slice.call(arguments),e={data:{cmd:a}};if(!_.isFunction(c[a]))return e.data.error="Method not known",void b(e);d.shift();try{e.data.result=c[a].apply(c,d),b(e)}catch(f){e.data.error=f,b(e)}},b({data:{cmd:"construct",result:!0}}),e}}function ZoomManager(a,b,c,d,e,f,g,h){"use strict";if(void 0===a||0>a)throw"A width has to be given.";if(void 0===b||0>b)throw"A height has to be given.";if(void 0===c||void 0===c.node||"svg"!==c.node().tagName.toLowerCase())throw"A svg has to be given.";if(void 0===d||void 0===d.node||"g"!==d.node().tagName.toLowerCase())throw"A group has to be given.";if(void 0===e||void 0===e.activateLabel||void 0===e.changeTo||void 0===e.updateNodes)throw"The Node shaper has to be given.";if(void 0===f||void 0===f.activateLabel||void 0===f.updateEdges)throw"The Edge shaper has to be given.";var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x=this,y=a*b,z=h||function(){},A=function(){var a,b;return l>=k?(b=i*l,b*=b,a=60*b):(b=j*l,b*=b,a=4*Math.PI*b),Math.floor(y/a)},B=function(){q=s/l-.99999999,r=t/l,p.distortion(q),p.radius(r)},C=function(a,b,c,g){g?null!==a&&(l=a):l=a,null!==b&&(m[0]+=b),null!==c&&(m[1]+=c),o=A(),z(o),e.activateLabel(l>=k),f.activateLabel(l>=k),B();var h="translate("+m+")",i=" scale("+l+")";d._isCommunity?d.attr("transform",h):d.attr("transform",h+i),v&&v.slider("option","value",l)},D=function(a){var b=[];return b[0]=a[0]-n[0],b[1]=a[1]-n[1],n[0]=a[0],n[1]=a[1],b},E=function(a){void 0===a&&(a={});var b=a.maxFont||16,c=a.minFont||6,d=a.maxRadius||25,e=a.minRadius||4;s=a.focusZoom||1,t=a.focusRadius||100,w=e/d,i=b,j=d,k=c/b,l=1,m=[0,0],n=[0,0],B(),o=A(),u=d3.behavior.zoom().scaleExtent([w,1]).on("zoom",function(){var a,b=d3.event.sourceEvent,c=l;"mousewheel"===b.type||"DOMMouseScroll"===b.type?(b.wheelDelta?b.wheelDelta>0?(c+=.01,c>1&&(c=1)):(c-=.01,w>c&&(c=w)):b.detail>0?(c+=.01,c>1&&(c=1)):(c-=.01,w>c&&(c=w)),a=[0,0]):a=D(d3.event.translate),C(c,a[0],a[1])})},F=function(){};p=d3.fisheye.circular(),E(g),c.call(u),e.changeTo({distortion:p}),c.on("mousemove",F),x.translation=function(){return null},x.scaleFactor=function(){return l},x.scaledMouse=function(){return null},x.getDistortion=function(){return q},x.getDistortionRadius=function(){return r},x.getNodeLimit=function(){return o},x.getMinimalZoomFactor=function(){return w},x.registerSlider=function(a){v=a},x.triggerScale=function(a){C(a,null,null,!0)},x.triggerTranslation=function(a,b){C(null,a,b,!0)},x.changeWidth=function(c){y=a*b}}function ArangoAdapterControls(a,b){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The ArangoAdapter has to be given.";this.addControlChangeCollections=function(c){var d="control_adapter_collections",e=d+"_";b.getCollections(function(f,g){b.getGraphs(function(h){uiComponentsHelper.createButton(a,"Collections",d,function(){modalDialogHelper.createModalDialog("Switch Collections",e,[{ type:"decission",id:"collections",group:"loadtype",text:"Select existing collections",isDefault:void 0===b.getGraphName(),interior:[{type:"list",id:"node_collection",text:"Vertex collection",objects:f,selected:b.getNodeCollection()},{type:"list",id:"edge_collection",text:"Edge collection",objects:g,selected:b.getEdgeCollection()}]},{type:"decission",id:"graphs",group:"loadtype",text:"Select existing graph",isDefault:void 0!==b.getGraphName(),interior:[{type:"list",id:"graph",objects:h,selected:b.getGraphName()}]},{type:"checkbox",text:"Start with random vertex",id:"random",selected:!0},{type:"checkbox",id:"undirected",selected:"any"===b.getDirection()}],function(){var a=$("#"+e+"node_collection").children("option").filter(":selected").text(),d=$("#"+e+"edge_collection").children("option").filter(":selected").text(),f=$("#"+e+"graph").children("option").filter(":selected").text(),g=!!$("#"+e+"undirected").prop("checked"),h=!!$("#"+e+"random").prop("checked"),i=$("input[type='radio'][name='loadtype']:checked").prop("id");return i===e+"collections"?b.changeToCollections(a,d,g):b.changeToGraph(f,g),h?void b.loadRandomNode(c):void(_.isFunction(c)&&c())})})})})},this.addControlChangePriority=function(){var c="control_adapter_priority",d=c+"_",e=(b.getPrioList(),"Group vertices");uiComponentsHelper.createButton(a,e,c,function(){modalDialogHelper.createModalChangeDialog(e,d,[{type:"extendable",id:"attribute",objects:b.getPrioList()}],function(){var a=$("input[id^="+d+"attribute_]"),c=[];a.each(function(a,b){var d=$(b).val();""!==d&&c.push(d)}),b.changeTo({prioList:c})})})},this.addAll=function(){this.addControlChangeCollections(),this.addControlChangePriority()}}function ContextMenu(a){"use strict";if(void 0===a)throw"An id has to be given.";var b,c,d="#"+a,e=function(a,d){var e,f;e=document.createElement("div"),e.className="context-menu-item",f=document.createElement("div"),f.className="context-menu-item-inner",f.appendChild(document.createTextNode(a)),f.onclick=function(){d(d3.select(c.target).data()[0])},e.appendChild(f),b.appendChild(e)},f=function(a){c=$.contextMenu.create(d,{shadow:!1}),a.each(function(){$(this).bind("contextmenu",function(a){return c.show(this,a),!1})})},g=function(){return b=document.getElementById(a),b&&b.parentElement.removeChild(b),b=document.createElement("div"),b.className="context-menu context-menu-theme-osx",b.id=a,document.body.appendChild(b),b};g(),this.addEntry=e,this.bindMenu=f}function EdgeShaperControls(a,b){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The EdgeShaper has to be given.";var c=this;this.addControlOpticShapeNone=function(){var c="control_edge_none";uiComponentsHelper.createButton(a,"None",c,function(){b.changeTo({shape:{type:EdgeShaper.shapes.NONE}})})},this.addControlOpticShapeArrow=function(){var c="control_edge_arrow";uiComponentsHelper.createButton(a,"Arrow",c,function(){b.changeTo({shape:{type:EdgeShaper.shapes.ARROW}})})},this.addControlOpticLabel=function(){var c="control_edge_label",d=c+"_";uiComponentsHelper.createButton(a,"Configure Label",c,function(){modalDialogHelper.createModalDialog("Switch Label Attribute",d,[{type:"text",id:"key",text:"Edge label attribute",value:b.getLabel()}],function(){var a=$("#"+d+"key").attr("value");b.changeTo({label:a})})})},this.addControlOpticLabelList=function(){var d="control_edge_label",e=d+"_";uiComponentsHelper.createButton(a,"Configure Label",d,function(){modalDialogHelper.createModalDialog("Change Label Attribute",e,[{type:"extendable",id:"label",text:"Edge label attribute",objects:b.getLabel()}],function(){var a=$("input[id^="+e+"label_]"),d=[];a.each(function(a,b){var c=$(b).val();""!==c&&d.push(c)});var f={label:d};c.applyLocalStorage(f),b.changeTo(f)})})},this.applyLocalStorage=function(a){if("undefined"!==Storage)try{var b=JSON.parse(localStorage.getItem("graphSettings")),c=window.location.hash.split("/")[1],d=window.location.pathname.split("/")[2],e=c+d;_.each(a,function(a,c){void 0!==c&&(b[e].viewer.hasOwnProperty("edgeShaper")||(b[e].viewer.edgeShaper={}),b[e].viewer.edgeShaper[c]=a)}),localStorage.setItem("graphSettings",JSON.stringify(b))}catch(f){console.log(f)}},this.addControlOpticSingleColour=function(){var c="control_edge_singlecolour",d=c+"_";uiComponentsHelper.createButton(a,"Single Colour",c,function(){modalDialogHelper.createModalDialog("Switch to Colour",d,[{type:"text",id:"stroke"}],function(){var a=$("#"+d+"stroke").attr("value");b.changeTo({color:{type:"single",stroke:a}})})})},this.addControlOpticAttributeColour=function(){var c="control_edge_attributecolour",d=c+"_";uiComponentsHelper.createButton(a,"Colour by Attribute",c,function(){modalDialogHelper.createModalDialog("Display colour by attribute",d,[{type:"text",id:"key"}],function(){var a=$("#"+d+"key").attr("value");b.changeTo({color:{type:"attribute",key:a}})})})},this.addControlOpticGradientColour=function(){var c="control_edge_gradientcolour",d=c+"_";uiComponentsHelper.createButton(a,"Gradient Colour",c,function(){modalDialogHelper.createModalDialog("Change colours for gradient",d,[{type:"text",id:"source"},{type:"text",id:"target"}],function(){var a=$("#"+d+"source").attr("value"),c=$("#"+d+"target").attr("value");b.changeTo({color:{type:"gradient",source:a,target:c}})})})},this.addAllOptics=function(){c.addControlOpticShapeNone(),c.addControlOpticShapeArrow(),c.addControlOpticLabel(),c.addControlOpticSingleColour(),c.addControlOpticAttributeColour(),c.addControlOpticGradientColour()},this.addAllActions=function(){},this.addAll=function(){c.addAllOptics(),c.addAllActions()}}function EventDispatcherControls(a,b,c,d,e){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The NodeShaper has to be given.";if(void 0===c)throw"The EdgeShaper has to be given.";if(void 0===d)throw"The Start callback has to be given.";var f=this,g={expand:{icon:"hand-pointer-o",title:"Expand a node."},add:{icon:"plus-square",title:"Add a node."},trash:{icon:"minus-square",title:"Remove a node/edge."},drag:{icon:"hand-rock-o",title:"Drag a node."},edge:{icon:"external-link-square",title:"Create an edge between two nodes."},edit:{icon:"pencil-square",title:"Edit attributes of a node."},view:{icon:"search",title:"View attributes of a node."}},h=new EventDispatcher(b,c,e),i=e.edgeEditor.adapter,j=!!i&&_.isFunction(i.useNodeCollection)&&_.isFunction(i.useEdgeCollection),k=function(b){a.appendChild(b)},l=function(a,b,c){var d=uiComponentsHelper.createIconButton(a,"control_event_"+b,c);k(d)},m=function(a){h.rebind("nodes",a)},n=function(a){h.rebind("edges",a)},o=function(a){h.rebind("svg",a)},p=function(a){var b=a||window.event,c={};return c.x=b.clientX,c.y=b.clientY,c.x+=document.body.scrollLeft,c.y+=document.body.scrollTop,c},q=function(a){var b,c,d,e=p(a),f=$("svg#graphViewerSVG").offset();return b=d3.select("svg#graphViewerSVG").node(),d=b.getBoundingClientRect(),$("svg#graphViewerSVG").height()<=d.height?{x:e.x-f.left,y:e.y-f.top}:(c=b.getBBox(),{x:e.x-(d.left-c.x),y:e.y-(d.top-c.y)})},r={nodes:{},edges:{},svg:{}},s=function(){var a="control_event_new_node",c=a+"_",e=function(a){var e=q(a);modalDialogHelper.createModalCreateDialog("Create New Node",c,{},function(a){h.events.CREATENODE(a,function(a){$("#"+c+"modal").modal("hide"),b.reshapeNodes(),d()},e.x,e.y)()})};r.nodes.newNode=e},t=function(){var a=function(a){modalDialogHelper.createModalViewDialog("View Node "+a._id,"control_event_node_view_",a._data,function(){modalDialogHelper.createModalEditDialog("Edit Node "+a._id,"control_event_node_edit_",a._data,function(b){h.events.PATCHNODE(a,b,function(){$("#control_event_node_edit_modal").modal("hide")})()})})},b=function(a){modalDialogHelper.createModalViewDialog("View Edge "+a._id,"control_event_edge_view_",a._data,function(){modalDialogHelper.createModalEditDialog("Edit Edge "+a._id,"control_event_edge_edit_",a._data,function(b){h.events.PATCHEDGE(a,b,function(){$("#control_event_edge_edit_modal").modal("hide")})()})})};r.nodes.view=a,r.edges.view=b},u=function(){var a=h.events.STARTCREATEEDGE(function(a,b){var d=q(b),e=c.addAnEdgeFollowingTheCursor(d.x,d.y);h.bind("svg","mousemove",function(a){var b=q(a);e(b.x,b.y)})}),b=h.events.FINISHCREATEEDGE(function(a){c.removeCursorFollowingEdge(),h.bind("svg","mousemove",function(){}),d()}),e=function(){h.events.CANCELCREATEEDGE(),c.removeCursorFollowingEdge(),h.bind("svg","mousemove",function(){})};r.nodes.startEdge=a,r.nodes.endEdge=b,r.svg.cancelEdge=e},v=function(){var a=function(a){arangoHelper.openDocEditor(a._id,"document")},b=function(a){arangoHelper.openDocEditor(a._id,"edge")};r.nodes.edit=a,r.edges.edit=b},w=function(){var a=function(a){modalDialogHelper.createModalDeleteDialog("Delete Node "+a._id,"control_event_node_delete_",a,function(a){h.events.DELETENODE(function(){$("#control_event_node_delete_modal").modal("hide"),b.reshapeNodes(),c.reshapeEdges(),d()})(a)})},e=function(a){modalDialogHelper.createModalDeleteDialog("Delete Edge "+a._id,"control_event_edge_delete_",a,function(a){h.events.DELETEEDGE(function(){$("#control_event_edge_delete_modal").modal("hide"),b.reshapeNodes(),c.reshapeEdges(),d()})(a)})};r.nodes.del=a,r.edges.del=e},x=function(){r.nodes.spot=h.events.EXPAND};s(),t(),u(),v(),w(),x(),this.dragRebinds=function(){return{nodes:{drag:h.events.DRAG}}},this.newNodeRebinds=function(){return{svg:{click:r.nodes.newNode}}},this.viewRebinds=function(){return{nodes:{click:r.nodes.view},edges:{click:r.edges.view}}},this.connectNodesRebinds=function(){return{nodes:{mousedown:r.nodes.startEdge,mouseup:r.nodes.endEdge},svg:{mouseup:r.svg.cancelEdge}}},this.editRebinds=function(){return{nodes:{click:r.nodes.edit},edges:{click:r.edges.edit}}},this.expandRebinds=function(){return{nodes:{click:r.nodes.spot}}},this.deleteRebinds=function(){return{nodes:{click:r.nodes.del},edges:{click:r.edges.del}}},this.rebindAll=function(a){m(a.nodes),n(a.edges),o(a.svg)},b.addMenuEntry("Edit",r.nodes.edit),b.addMenuEntry("Spot",r.nodes.spot),b.addMenuEntry("Trash",r.nodes.del),c.addMenuEntry("Edit",r.edges.edit),c.addMenuEntry("Trash",r.edges.del),this.addControlNewNode=function(){var a=g.add,b="select_node_collection",c=function(){j&&i.getNodeCollections().length>1&&modalDialogHelper.createModalDialog("Select Vertex Collection",b,[{type:"list",id:"vertex",objects:i.getNodeCollections(),text:"Select collection",selected:i.getSelectedNodeCollection()}],function(){var a=$("#"+b+"vertex").children("option").filter(":selected").text();i.useNodeCollection(a)},"Select"),f.rebindAll(f.newNodeRebinds())};l(a,"new_node",c)},this.addControlView=function(){var a=g.view,b=function(){f.rebindAll(f.viewRebinds())};l(a,"view",b)},this.addControlDrag=function(){var a=g.drag,b=function(){f.rebindAll(f.dragRebinds())};l(a,"drag",b)},this.addControlEdit=function(){var a=g.edit,b=function(){f.rebindAll(f.editRebinds())};l(a,"edit",b)},this.addControlExpand=function(){var a=g.expand,b=function(){f.rebindAll(f.expandRebinds())};l(a,"expand",b)},this.addControlDelete=function(){var a=g.trash,b=function(){f.rebindAll(f.deleteRebinds())};l(a,"delete",b)},this.addControlConnect=function(){var a=g.edge,b="select_edge_collection",c=function(){j&&i.getEdgeCollections().length>1&&modalDialogHelper.createModalDialog("Select Edge Collection",b,[{type:"list",id:"edge",objects:i.getEdgeCollections(),text:"Select collection",selected:i.getSelectedEdgeCollection()}],function(){var a=$("#"+b+"edge").children("option").filter(":selected").text();i.useEdgeCollection(a)},"Select"),f.rebindAll(f.connectNodesRebinds())};l(a,"connect",c)},this.addAll=function(){f.addControlExpand(),f.addControlDrag(),f.addControlEdit(),f.addControlConnect(),f.addControlNewNode(),f.addControlDelete()}}function GharialAdapterControls(a,b){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The GharialAdapter has to be given.";this.addControlChangeGraph=function(c){var d="control_adapter_graph",e=d+"_";b.getGraphs(function(f){uiComponentsHelper.createButton(a,"Switch Graph",d,function(){modalDialogHelper.createModalDialog("Switch Graph",e,[{type:"list",id:"graph",objects:f,text:"Select graph",selected:b.getGraphName()},{type:"checkbox",text:"Start with random vertex",id:"random",selected:!0}],function(){var a=$("#"+e+"graph").children("option").filter(":selected").text(),d=!!$("#"+e+"undirected").prop("checked"),f=!!$("#"+e+"random").prop("checked");return b.changeToGraph(a,d),f?void b.loadRandomNode(c):void(_.isFunction(c)&&c())})})})},this.addControlChangePriority=function(){var c="control_adapter_priority",d=c+"_",e="Group vertices";uiComponentsHelper.createButton(a,e,c,function(){modalDialogHelper.createModalChangeDialog(e+" by attribute",d,[{type:"extendable",id:"attribute",objects:b.getPrioList()}],function(){var a=$("input[id^="+d+"attribute_]"),c=[];_.each(a,function(a){var b=$(a).val();""!==b&&c.push(b)}),b.changeTo({prioList:c})})})},this.addAll=function(){this.addControlChangeGraph(),this.addControlChangePriority()}}function GraphViewerPreview(a,b){"use strict";var c,d,e,f,g,h,i,j=function(){return d3.select(a).append("svg").attr("id","graphViewerSVG").attr("width",d).attr("height",e).attr("class","graph-viewer").attr("style","width:"+d+"px;height:"+e+";")},k=function(a){var b=0;return _.each(a,function(c,d){c===!1?delete a[d]:b++}),b>0},l=function(a,b){_.each(b,function(b,c){a[c]=a[c]||{},_.each(b,function(b,d){a[c][d]=b})})},m=function(a){if(a){var b={};a.drag&&l(b,i.dragRebinds()),a.create&&(l(b,i.newNodeRebinds()),l(b,i.connectNodesRebinds())),a.remove&&l(b,i.deleteRebinds()),a.expand&&l(b,i.expandRebinds()),a.edit&&l(b,i.editRebinds()),i.rebindAll(b)}},n=function(b){var c=document.createElement("div");i=new EventDispatcherControls(c,f.nodeShaper,f.edgeShaper,f.start,f.dispatcherConfig),c.id="toolbox",c.className="btn-group btn-group-vertical pull-left toolbox",a.appendChild(c),_.each(b,function(a,b){switch(b){case"expand":i.addControlExpand();break;case"create":i.addControlNewNode(),i.addControlConnect();break;case"drag":i.addControlDrag();break;case"edit":i.addControlEdit();break;case"remove":i.addControlDelete()}})},o=function(a){var b=document.createElement("div");i=new EventDispatcherControls(b,f.nodeShaper,f.edgeShaper,f.start,f.dispatcherConfig)},p=function(){b&&(b.nodeShaper&&(b.nodeShaper.label&&(b.nodeShaper.label="label"),b.nodeShaper.shape&&b.nodeShaper.shape.type===NodeShaper.shapes.IMAGE&&b.nodeShaper.shape.source&&(b.nodeShaper.shape.source="image")),b.edgeShaper&&b.edgeShaper.label&&(b.edgeShaper.label="label"))},q=function(){return p(),new GraphViewer(c,d,e,h,b)};d=a.getBoundingClientRect().width,e=a.getBoundingClientRect().height,h={type:"preview"},b=b||{},g=k(b.toolbox),g&&(d-=43),c=j(),f=q(),g?n(b.toolbox):o(),f.loadGraph("1"),m(b.actions)}function GraphViewerUI(a,b,c,d,e,f){"use strict";if(void 0===a)throw"A parent element has to be given.";if(!a.id)throw"The parent element needs an unique id.";if(void 0===b)throw"An adapter configuration has to be given";var g,h,i,j,k,l,m,n,o,p=c+20||a.getBoundingClientRect().width-81+20,q=d||a.getBoundingClientRect().height,r=document.createElement("ul"),s=document.createElement("div"),t=function(){g.adapter.NODES_TO_DISPLAYGraph too big. A random section is rendered.
'),$(".infoField .fa-info-circle").attr("title","You can display additional/other vertices by using the toolbar buttons.").tooltip())},u=function(){var a,b=document.createElement("div"),c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("button"),h=document.createElement("span"),i=document.createElement("input"),j=document.createElement("i"),k=document.createElement("span"),l=function(){$(s).css("cursor","progress")},n=function(){$(s).css("cursor","")},o=function(a){return n(),a&&a.errorCode&&404===a.errorCode?void arangoHelper.arangoError("Graph error","could not find a matching node."):void 0},p=function(){l(),""===a.value||void 0===a.value?g.loadGraph(i.value,o):g.loadGraphWithAttributeValue(a.value,i.value,o)};b.id="filterDropdown",b.className="headerDropdown smallDropdown",c.className="dropdownInner",d.className="queryline",a=document.createElement("input"),m=document.createElement("ul"),e.className="pull-left input-append searchByAttribute",a.id="attribute",a.type="text",a.placeholder="Attribute name",f.id="attribute_example_toggle",f.className="button-neutral gv_example_toggle",h.className="caret gv_caret",m.className="gv-dropdown-menu",i.id="value",i.className="searchInput gv_searchInput",i.type="text",i.placeholder="Attribute value",j.id="loadnode",j.className="fa fa-search",k.className="searchEqualsLabel",k.appendChild(document.createTextNode("==")),c.appendChild(d),d.appendChild(e),e.appendChild(a),e.appendChild(f),e.appendChild(m),f.appendChild(h),d.appendChild(k),d.appendChild(i),d.appendChild(j),j.onclick=p,$(i).keypress(function(a){return 13===a.keyCode||13===a.which?(p(),!1):void 0}),f.onclick=function(){$(m).slideToggle(200)};var q=document.createElement("p");return q.className="dropdown-title",q.innerHTML="Filter graph by attribute:",b.appendChild(q),b.appendChild(c),b},v=function(){var a,b=document.createElement("div"),c=document.createElement("div"),d=document.createElement("div"),e=document.createElement("div"),f=document.createElement("button"),h=document.createElement("span"),i=document.createElement("input"),j=document.createElement("i"),k=document.createElement("span"),l=function(){$(s).css("cursor","progress")},m=function(){$(s).css("cursor","")},o=function(a){return m(),a&&a.errorCode&&404===a.errorCode?void arangoHelper.arangoError("Graph error","could not find a matching node."):void 0},p=function(){l(),""!==a.value&&g.loadGraphWithAdditionalNode(a.value,i.value,o)};b.id="nodeDropdown",b.className="headerDropdown smallDropdown",c.className="dropdownInner",d.className="queryline",a=document.createElement("input"),n=document.createElement("ul"),e.className="pull-left input-append searchByAttribute",a.id="attribute",a.type="text",a.placeholder="Attribute name",f.id="attribute_example_toggle2",f.className="button-neutral gv_example_toggle",h.className="caret gv_caret",n.className="gv-dropdown-menu",i.id="value",i.className="searchInput gv_searchInput",i.type="text",i.placeholder="Attribute value",j.id="loadnode",j.className="fa fa-search",k.className="searchEqualsLabel",k.appendChild(document.createTextNode("==")),c.appendChild(d),d.appendChild(e),e.appendChild(a),e.appendChild(f),e.appendChild(n),f.appendChild(h),d.appendChild(k),d.appendChild(i),d.appendChild(j),C(n),j.onclick=p,$(i).keypress(function(a){return 13===a.keyCode||13===a.which?(p(),!1):void 0}),f.onclick=function(){$(n).slideToggle(200)};var q=document.createElement("p");return q.className="dropdown-title",q.innerHTML="Add specific node by attribute:",b.appendChild(q),b.appendChild(c),b},w=function(){var a,b,c,d,e,f,g,h;return a=document.createElement("div"),a.id="configureDropdown",a.className="headerDropdown",b=document.createElement("div"),b.className="dropdownInner",c=document.createElement("ul"),d=document.createElement("li"),d.className="nav-header",d.appendChild(document.createTextNode("Vertices")),g=document.createElement("ul"),h=document.createElement("li"),h.className="nav-header",h.appendChild(document.createTextNode("Edges")),e=document.createElement("ul"),f=document.createElement("li"),f.className="nav-header",f.appendChild(document.createTextNode("Connection")),c.appendChild(d),g.appendChild(h),e.appendChild(f),b.appendChild(c),b.appendChild(g),b.appendChild(e),a.appendChild(b),{configure:a,nodes:c,edges:g,col:e}},x=function(a,b,c,d){var e,f,g,h,i,j,k,l,m,n,o;return a.className="headerButtonBar",e=document.createElement("ul"),e.className="headerButtonList",a.appendChild(e),g=document.createElement("li"),g.className="enabled",h=document.createElement("a"),h.id=b,h.className="headerButton",i=document.createElement("span"),i.className="icon_arangodb_settings2",$(i).attr("title","Configure"),e.appendChild(g),g.appendChild(h),h.appendChild(i),j=document.createElement("li"),j.className="enabled",k=document.createElement("a"),k.id=d,k.className="headerButton",l=document.createElement("span"),l.className="fa fa-search-plus",$(l).attr("title","Show additional vertices"),e.appendChild(j),j.appendChild(k),k.appendChild(l),m=document.createElement("li"),m.className="enabled",n=document.createElement("a"),n.id=c,n.className="headerButton",o=document.createElement("span"),o.className="icon_arangodb_filter",$(o).attr("title","Filter"),e.appendChild(m),m.appendChild(n),n.appendChild(o),f=w(),f.filter=u(),f.node=v(),h.onclick=function(){$("#filterdropdown").removeClass("activated"),$("#nodedropdown").removeClass("activated"),$("#configuredropdown").toggleClass("activated"),$(f.configure).slideToggle(200),$(f.filter).hide(),$(f.node).hide()},k.onclick=function(){$("#filterdropdown").removeClass("activated"),$("#configuredropdown").removeClass("activated"),$("#nodedropdown").toggleClass("activated"),$(f.node).slideToggle(200),$(f.filter).hide(),$(f.configure).hide()},n.onclick=function(){$("#configuredropdown").removeClass("activated"),$("#nodedropdown").removeClass("activated"),$("#filterdropdown").toggleClass("activated"),$(f.filter).slideToggle(200),$(f.node).hide(),$(f.configure).hide()},f},y=function(){return d3.select("#"+a.id+" #background").append("svg").attr("id","graphViewerSVG").attr("width",p).attr("height",q).attr("class","graph-viewer").style("width",p+"px").style("height",q+"px")},z=function(){var a=document.createElement("div"),b=document.createElement("div"),c=document.createElement("button"),d=document.createElement("button"),e=document.createElement("button"),f=document.createElement("button");a.className="gv_zoom_widget",b.className="gv_zoom_buttons_bg",c.className="btn btn-icon btn-zoom btn-zoom-top gv-zoom-btn pan-top",d.className="btn btn-icon btn-zoom btn-zoom-left gv-zoom-btn pan-left",e.className="btn btn-icon btn-zoom btn-zoom-right gv-zoom-btn pan-right",f.className="btn btn-icon btn-zoom btn-zoom-bottom gv-zoom-btn pan-bottom",c.onclick=function(){g.zoomManager.triggerTranslation(0,-10)},d.onclick=function(){g.zoomManager.triggerTranslation(-10,0)},e.onclick=function(){g.zoomManager.triggerTranslation(10,0)},f.onclick=function(){g.zoomManager.triggerTranslation(0,10)},b.appendChild(c),b.appendChild(d),b.appendChild(e),b.appendChild(f),l=document.createElement("div"),l.id="gv_zoom_slider",l.className="gv_zoom_slider",s.appendChild(a),s.insertBefore(a,o[0][0]),a.appendChild(b),a.appendChild(l),$("#gv_zoom_slider").slider({orientation:"vertical",min:g.zoomManager.getMinimalZoomFactor(),max:1,value:1,step:.01,slide:function(a,b){g.zoomManager.triggerScale(b.value)}}),g.zoomManager.registerSlider($("#gv_zoom_slider"))},A=function(){var a=document.createElement("div"),b=new EventDispatcherControls(a,g.nodeShaper,g.edgeShaper,g.start,g.dispatcherConfig);a.id="toolbox",a.className="btn-group btn-group-vertical toolbox",s.insertBefore(a,o[0][0]),b.addAll(),$("#control_event_expand").click()},B=function(){var a='
  • ';$(".headerBar .headerButtonList").prepend(a)},C=function(a){var b;b=a?$(a):$(m),b.innerHTML="";var c=document.createElement("li"),d=document.createElement("img");$(c).append(d),d.className="gv-throbber",b.append(c),g.adapter.getAttributeExamples(function(a){$(b).html(""),_.each(a,function(a){var c=document.createElement("li"),d=document.createElement("a"),e=document.createElement("label");$(c).append(d),$(d).append(e),$(e).append(document.createTextNode(a)),e.className="gv_dropdown_label",b.append(c),c.onclick=function(){b.value=a,$(b).parent().find("input").val(a),$(b).slideToggle(200)}})})},D=function(){var a=document.createElement("div"),b=document.createElement("div"),c=(document.createElement("a"),x(b,"configuredropdown","filterdropdown","nodedropdown"));i=new NodeShaperControls(c.nodes,g.nodeShaper),j=new EdgeShaperControls(c.edges,g.edgeShaper),k=new GharialAdapterControls(c.col,g.adapter),r.id="menubar",a.className="headerBar",b.id="modifiers",r.appendChild(a),r.appendChild(c.configure),r.appendChild(c.filter),r.appendChild(c.node),a.appendChild(b),k.addControlChangeGraph(function(){C(),g.start(!0)}),k.addControlChangePriority(),i.addControlOpticLabelAndColourList(g.adapter),j.addControlOpticLabelList(),C()},E=function(){h=i.createColourMappingList(),h.className="gv-colour-list",s.insertBefore(h,o[0][0])};a.appendChild(r),a.appendChild(s),s.className="contentDiv gv-background ",s.id="background",e=e||{},e.zoom=!0,$("#subNavigationBar .breadcrumb").html("Graph: "+b.graphName),o=y(),"undefined"!==Storage&&(this.graphSettings={},this.loadLocalStorage=function(){var a=b.baseUrl.split("/")[2],c=b.graphName+a;if(null===localStorage.getItem("graphSettings")||"null"===localStorage.getItem("graphSettings")){var d={};d[c]={viewer:e,adapter:b},localStorage.setItem("graphSettings",JSON.stringify(d))}else try{var f=JSON.parse(localStorage.getItem("graphSettings"));this.graphSettings=f,void 0!==f[c].viewer&&(e=f[c].viewer),void 0!==f[c].adapter&&(b=f[c].adapter)}catch(g){console.log("Could not load graph settings, resetting graph settings."),this.graphSettings[c]={viewer:e,adapter:b},localStorage.setItem("graphSettings",JSON.stringify(this.graphSettings))}},this.loadLocalStorage(),this.writeLocalStorage=function(){}),g=new GraphViewer(o,p,q,b,e),A(),z(),D(),E(),t(),B(),$("#graphSize").on("change",function(){var a=$("#graphSize").find(":selected").val();g.loadGraphWithRandomStart(function(a){a&&a.errorCode&&arangoHelper.arangoError("Graph","Sorry your graph seems to be empty")},a)}),f&&("string"==typeof f?g.loadGraph(f):g.loadGraphWithRandomStart(function(a){a&&a.errorCode&&arangoHelper.arangoError("Graph","Sorry your graph seems to be empty")})),this.changeWidth=function(a){g.changeWidth(a);var b=a-55;o.attr("width",b).style("width",b+"px")}}function GraphViewerWidget(a,b){"use strict";var c,d,e,f,g,h,i,j,k=function(){return d3.select(d).append("svg").attr("id","graphViewerSVG").attr("width",e).attr("height",f).attr("class","graph-viewer").attr("style","width:"+e+"px;height:"+f+"px;")},l=function(a){var b=0;return _.each(a,function(c,d){c===!1?delete a[d]:b++}),b>0},m=function(a,b){_.each(b,function(b,c){a[c]=a[c]||{},_.each(b,function(b,d){a[c][d]=b})})},n=function(a){if(a){var b={};a.drag&&m(b,j.dragRebinds()),a.create&&(m(b,j.newNodeRebinds()),m(b,j.connectNodesRebinds())),a.remove&&m(b,j.deleteRebinds()),a.expand&&m(b,j.expandRebinds()),a.edit&&m(b,j.editRebinds()),j.rebindAll(b)}},o=function(a){var b=document.createElement("div");j=new EventDispatcherControls(b,g.nodeShaper,g.edgeShaper,g.start,g.dispatcherConfig),b.id="toolbox",b.className="btn-group btn-group-vertical pull-left toolbox",d.appendChild(b),_.each(a,function(a,b){switch(b){case"expand":j.addControlExpand();break;case"create":j.addControlNewNode(),j.addControlConnect();break;case"drag":j.addControlDrag();break;case"edit":j.addControlEdit();break;case"remove":j.addControlDelete()}})},p=function(a){var b=document.createElement("div");j=new EventDispatcherControls(b,g.nodeShaper,g.edgeShaper,g.start,g.dispatcherConfig)},q=function(){return new GraphViewer(c,e,f,i,a)};d=document.body,e=d.getBoundingClientRect().width,f=d.getBoundingClientRect().height,i={type:"foxx",route:"."},a=a||{},h=l(a.toolbox),h&&(e-=43),c=k(),g=q(),h?o(a.toolbox):p(),b&&g.loadGraph(b),n(a.actions)}function LayouterControls(a,b){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The Layouter has to be given.";var c=this;this.addControlGravity=function(){var c="control_layout_gravity",d=c+"_";uiComponentsHelper.createButton(a,"Gravity",c,function(){modalDialogHelper.createModalDialog("Switch Gravity Strength",d,[{type:"text",id:"value"}],function(){var a=$("#"+d+"value").attr("value");b.changeTo({gravity:a})})})},this.addControlCharge=function(){var c="control_layout_charge",d=c+"_";uiComponentsHelper.createButton(a,"Charge",c,function(){modalDialogHelper.createModalDialog("Switch Charge Strength",d,[{type:"text",id:"value"}],function(){var a=$("#"+d+"value").attr("value");b.changeTo({charge:a})})})},this.addControlDistance=function(){var c="control_layout_distance",d=c+"_";uiComponentsHelper.createButton(a,"Distance",c,function(){modalDialogHelper.createModalDialog("Switch Distance Strength",d,[{type:"text",id:"value"}],function(){var a=$("#"+d+"value").attr("value");b.changeTo({distance:a})})})},this.addAll=function(){c.addControlDistance(),c.addControlGravity(),c.addControlCharge()}}function NodeShaperControls(a,b){"use strict";if(void 0===a)throw"A list element has to be given.";if(void 0===b)throw"The NodeShaper has to be given.";var c,d=this,e=function(a){for(;c.hasChildNodes();)c.removeChild(c.lastChild);var b=document.createElement("ul");c.appendChild(b),_.each(a,function(a,c){var d=document.createElement("ul"),e=a.list,f=a.front;d.style.backgroundColor=c,d.style.color=f,_.each(e,function(a){var b=document.createElement("li");b.appendChild(document.createTextNode(a)),d.appendChild(b)}),b.appendChild(d)})};this.addControlOpticShapeNone=function(){uiComponentsHelper.createButton(a,"None","control_node_none",function(){b.changeTo({shape:{type:NodeShaper.shapes.NONE}})})},this.applyLocalStorage=function(a){if("undefined"!==Storage)try{var b=JSON.parse(localStorage.getItem("graphSettings")),c=window.location.hash.split("/")[1],d=window.location.pathname.split("/")[2],e=c+d;_.each(a,function(a,c){void 0!==c&&(b[e].viewer.nodeShaper[c]=a)}),localStorage.setItem("graphSettings",JSON.stringify(b))}catch(f){console.log(f)}},this.addControlOpticShapeCircle=function(){var c="control_node_circle",d=c+"_";uiComponentsHelper.createButton(a,"Circle",c,function(){modalDialogHelper.createModalDialog("Switch to Circle",d,[{type:"text",id:"radius"}],function(){var a=$("#"+d+"radius").attr("value");b.changeTo({shape:{type:NodeShaper.shapes.CIRCLE,radius:a}})})})},this.addControlOpticShapeRect=function(){var c="control_node_rect",d=c+"_";uiComponentsHelper.createButton(a,"Rectangle",c,function(){modalDialogHelper.createModalDialog("Switch to Rectangle","control_node_rect_",[{type:"text",id:"width"},{type:"text",id:"height"}],function(){var a=$("#"+d+"width").attr("value"),c=$("#"+d+"height").attr("value");b.changeTo({shape:{type:NodeShaper.shapes.RECT,width:a,height:c}})})})},this.addControlOpticLabel=function(){var c="control_node_label",e=c+"_";uiComponentsHelper.createButton(a,"Configure Label",c,function(){modalDialogHelper.createModalChangeDialog("Change label attribute",e,[{type:"text",id:"key"}],function(){var a=$("#"+e+"key").attr("value"),c={label:a};d.applyLocalStorage(c),b.changeTo(c)})})},this.addControlOpticSingleColour=function(){var c="control_node_singlecolour",d=c+"_";uiComponentsHelper.createButton(a,"Single Colour",c,function(){modalDialogHelper.createModalDialog("Switch to Colour",d,[{type:"text",id:"fill"},{type:"text",id:"stroke"}],function(){var a=$("#"+d+"fill").attr("value"),c=$("#"+d+"stroke").attr("value");b.changeTo({color:{type:"single",fill:a,stroke:c}})})})},this.addControlOpticAttributeColour=function(){var c="control_node_attributecolour",d=c+"_";uiComponentsHelper.createButton(a,"Colour by Attribute",c,function(){modalDialogHelper.createModalDialog("Display colour by attribute",d,[{ -type:"text",id:"key"}],function(){var a=$("#"+d+"key").attr("value");b.changeTo({color:{type:"attribute",key:a}})})})},this.addControlOpticExpandColour=function(){var c="control_node_expandcolour",d=c+"_";uiComponentsHelper.createButton(a,"Expansion Colour",c,function(){modalDialogHelper.createModalDialog("Display colours for expansion",d,[{type:"text",id:"expanded"},{type:"text",id:"collapsed"}],function(){var a=$("#"+d+"expanded").attr("value"),c=$("#"+d+"collapsed").attr("value");b.changeTo({color:{type:"expand",expanded:a,collapsed:c}})})})},this.addControlOpticLabelAndColour=function(e){var f="control_node_labelandcolour",g=f+"_";uiComponentsHelper.createButton(a,"Configure Label",f,function(){modalDialogHelper.createModalChangeDialog("Change label attribute",g,[{type:"text",id:"label-attribute",text:"Vertex label attribute",value:b.getLabel()||""},{type:"decission",id:"samecolour",group:"colour",text:"Use this attribute for coloring, too",isDefault:b.getLabel()===b.getColor()},{type:"decission",id:"othercolour",group:"colour",text:"Use different attribute for coloring",isDefault:b.getLabel()!==b.getColor(),interior:[{type:"text",id:"colour-attribute",text:"Color attribute",value:b.getColor()||""}]}],function(){var a=$("#"+g+"label-attribute").attr("value"),e=$("#"+g+"colour-attribute").attr("value"),f=$("input[type='radio'][name='colour']:checked").attr("id");f===g+"samecolour"&&(e=a);var h={label:a,color:{type:"attribute",key:e}};d.applyLocalStorage(h),b.changeTo(h),void 0===c&&(c=d.createColourMappingList())})})},this.addControlOpticLabelAndColourList=function(e){var f="control_node_labelandcolourlist",g=f+"_";uiComponentsHelper.createButton(a,"Configure Label",f,function(){modalDialogHelper.createModalChangeDialog("Change label attribute",g,[{type:"extendable",id:"label",text:"Vertex label attribute",objects:b.getLabel()},{type:"decission",id:"samecolour",group:"colour",text:"Use this attribute for coloring, too",isDefault:b.getLabel()===b.getColor()},{type:"decission",id:"othercolour",group:"colour",text:"Use different attribute for coloring",isDefault:b.getLabel()!==b.getColor(),interior:[{type:"extendable",id:"colour",text:"Color attribute",objects:b.getColor()||""}]}],function(){var a=$("input[id^="+g+"label_]"),e=$("input[id^="+g+"colour_]"),f=$("input[type='radio'][name='colour']:checked").attr("id"),h=[],i=[];a.each(function(a,b){var c=$(b).val();""!==c&&h.push(c)}),e.each(function(a,b){var c=$(b).val();""!==c&&i.push(c)}),f===g+"samecolour"&&(i=h);var j={label:h,color:{type:"attribute",key:i}};d.applyLocalStorage(j),b.changeTo(j),void 0===c&&(c=d.createColourMappingList())})})},this.addAllOptics=function(){d.addControlOpticShapeNone(),d.addControlOpticShapeCircle(),d.addControlOpticShapeRect(),d.addControlOpticLabel(),d.addControlOpticSingleColour(),d.addControlOpticAttributeColour(),d.addControlOpticExpandColour()},this.addAllActions=function(){},this.addAll=function(){d.addAllOptics(),d.addAllActions()},this.createColourMappingList=function(){return void 0!==c?c:(c=document.createElement("div"),c.id="node_colour_list",e(b.getColourMapping()),b.setColourMappingListener(e),c)}}function GraphViewer(a,b,c,d,e){"use strict";if($("html").attr("xmlns:xlink","http://www.w3.org/1999/xlink"),void 0===a||void 0===a.append)throw"SVG has to be given and has to be selected using d3.select";if(void 0===b||0>=b)throw"A width greater 0 has to be given";if(void 0===c||0>=c)throw"A height greater 0 has to be given";if(void 0===d||void 0===d.type)throw"An adapter configuration has to be given";var f,g,h,i,j,k,l,m,n=this,o=[],p=[],q=function(a){if(!a)return a={},a.nodes=p,a.links=o,a.width=b,a.height=c,void(i=new ForceLayouter(a));switch(a.type.toLowerCase()){case"force":a.nodes=p,a.links=o,a.width=b,a.height=c,i=new ForceLayouter(a);break;default:throw"Sorry unknown layout type."}},r=function(a){f.setNodeLimit(a,n.start)},s=function(d){d&&(j=new ZoomManager(b,c,a,k,g,h,{},r))},t=function(a){var b=a.edgeShaper||{},c=a.nodeShaper||{},d=c.idfunc||void 0,e=a.zoom||!1;b.shape=b.shape||{type:EdgeShaper.shapes.ARROW},q(a.layouter),m=k.append("g"),h=new EdgeShaper(m,b),l=k.append("g"),g=new NodeShaper(l,c,d),i.setCombinedUpdateFunction(g,h),s(e)};switch(d.type.toLowerCase()){case"arango":d.width=b,d.height=c,f=new ArangoAdapter(p,o,this,d),f.setChildLimit(10);break;case"gharial":d.width=b,d.height=c,f=new GharialAdapter(p,o,this,d),f.setChildLimit(10);break;case"foxx":d.width=b,d.height=c,f=new FoxxAdapter(p,o,d.route,this,d);break;case"json":f=new JSONAdapter(d.path,p,o,this,b,c);break;case"preview":d.width=b,d.height=c,f=new PreviewAdapter(p,o,this,d);break;default:throw"Sorry unknown adapter type."}k=a.append("g"),t(e||{}),this.start=function(a){i.stop(),a&&(""!==$(".infoField").text()?_.each(p,function(a){_.each(f.randomNodes,function(b){a._id===b._id&&(a._expanded=!0)})}):_.each(p,function(a){a._expanded=!0})),g.drawNodes(p),h.drawEdges(o),i.start()},this.loadGraph=function(a,b){f.loadInitialNode(a,function(a){return a.errorCode?void b(a):(a._expanded=!0,n.start(),void(_.isFunction(b)&&b()))})},this.loadGraphWithRandomStart=function(a,b){f.loadRandomNode(function(b){return b.errorCode&&404===b.errorCode?void a(b):(b._expanded=!0,n.start(!0),void(_.isFunction(a)&&a()))},b)},this.loadGraphWithAdditionalNode=function(a,b,c){f.loadAdditionalNodeByAttributeValue(a,b,function(a){return a.errorCode?void c(a):(a._expanded=!0,n.start(),void(_.isFunction(c)&&c()))})},this.loadGraphWithAttributeValue=function(a,b,c){f.randomNodes=[],f.definedNodes=[],f.loadInitialNodeByAttributeValue(a,b,function(a){return a.errorCode?void c(a):(a._expanded=!0,n.start(),void(_.isFunction(c)&&c()))})},this.cleanUp=function(){g.resetColourMap(),h.resetColourMap()},this.changeWidth=function(a){i.changeWidth(a),j.changeWidth(a),f.setWidth(a)},this.dispatcherConfig={expand:{edges:o,nodes:p,startCallback:n.start,adapter:f,reshapeNodes:g.reshapeNodes},drag:{layouter:i},nodeEditor:{nodes:p,adapter:f},edgeEditor:{edges:o,adapter:f}},this.adapter=f,this.nodeShaper=g,this.edgeShaper=h,this.layouter=i,this.zoomManager=j}EdgeShaper.shapes=Object.freeze({NONE:0,ARROW:1}),NodeShaper.shapes=Object.freeze({NONE:0,CIRCLE:1,RECT:2,IMAGE:3});var modalDialogHelper=modalDialogHelper||{};!function(){"use strict";var a,b=function(a){$(document).bind("keypress.key13",function(b){b.which&&13===b.which&&$(a).click()})},c=function(){$(document).unbind("keypress.key13")},d=function(a,b,c,d,e){var f,g,h=function(){e(f)},i=modalDialogHelper.modalDivTemplate(a,b,c,h),j=document.createElement("tr"),k=document.createElement("th"),l=document.createElement("th"),m=document.createElement("th"),n=document.createElement("button"),o=1;f=function(){var a={};return _.each($("#"+c+"table tr:not(#first_row)"),function(b){var c=$(".keyCell input",b).val(),d=$(".valueCell input",b).val();a[c]=d}),a},i.appendChild(j),j.id="first_row",j.appendChild(k),k.className="keyCell",j.appendChild(l),l.className="valueCell",j.appendChild(m),m.className="actionCell",m.appendChild(n),n.id=c+"new",n.className="graphViewer-icon-button gv-icon-small add",g=function(a,b){var d,e,f,g=/^_(id|rev|key|from|to)/,h=document.createElement("tr"),j=document.createElement("th"),k=document.createElement("th"),l=document.createElement("th");g.test(b)||(i.appendChild(h),h.appendChild(k),k.className="keyCell",e=document.createElement("input"),e.type="text",e.id=c+b+"_key",e.value=b,k.appendChild(e),h.appendChild(l),l.className="valueCell",f=document.createElement("input"),f.type="text",f.id=c+b+"_value","object"==typeof a?f.value=JSON.stringify(a):f.value=a,l.appendChild(f),h.appendChild(j),j.className="actionCell",d=document.createElement("button"),d.id=c+b+"_delete",d.className="graphViewer-icon-button gv-icon-small delete",j.appendChild(d),d.onclick=function(){i.removeChild(h)})},n.onclick=function(){g("","new_"+o),o++},_.each(d,g),$("#"+c+"modal").modal("show")},e=function(a,b,c,d,e){var f=modalDialogHelper.modalDivTemplate(a,b,c,e),g=document.createElement("tr"),h=document.createElement("th"),i=document.createElement("pre");f.appendChild(g),g.appendChild(h),h.appendChild(i),i.className="gv-object-view",i.innerHTML=JSON.stringify(d,null,2),$("#"+c+"modal").modal("show")},f=function(a,b){var c=document.createElement("input");return c.type="text",c.id=a,c.value=b,c},g=function(a,b){var c=document.createElement("input");return c.type="checkbox",c.id=a,c.checked=b,c},h=function(a,b,c){var d=document.createElement("select");return d.id=a,_.each(_.sortBy(b,function(a){return a.toLowerCase()}),function(a){var b=document.createElement("option");b.value=a,b.selected=a===c,b.appendChild(document.createTextNode(a)),d.appendChild(b)}),d},i=function(a){var b=$(".decission_"+a),c=$("input[type='radio'][name='"+a+"']:checked").attr("id");b.each(function(){$(this).attr("decider")===c?$(this).css("display",""):$(this).css("display","none")})},j=function(b,c,d,e,f,g,h,j){var k=document.createElement("input"),l=b+c,m=document.createElement("label"),n=document.createElement("tbody");k.id=l,k.type="radio",k.name=d,k.className="gv-radio-button",m.className="radio",h.appendChild(m),m.appendChild(k),m.appendChild(document.createTextNode(e)),j.appendChild(n),$(n).toggleClass("decission_"+d,!0),$(n).attr("decider",l),_.each(g,function(c){a(n,b,c)}),f?k.checked=!0:k.checked=!1,m.onclick=function(a){i(d),a.stopPropagation()},i(d)},k=function(a,b,c,d,e,f){var g,h=[],i=a+b,j=1,k=document.createElement("th"),l=document.createElement("button"),m=document.createElement("input"),n=function(a){j++;var c,d=document.createElement("tr"),g=document.createElement("th"),k=document.createElement("th"),l=document.createElement("th"),m=document.createElement("input"),n=document.createElement("button");m.type="text",m.id=i+"_"+j,m.value=a||"",c=0===h.length?$(f):$(h[h.length-1]),c.after(d),d.appendChild(g),g.className="collectionTh capitalize",g.appendChild(document.createTextNode(b+" "+j+":")),d.appendChild(k),k.className="collectionTh",k.appendChild(m),n.id=i+"_"+j+"_remove",n.className="graphViewer-icon-button gv-icon-small delete",n.onclick=function(){e.removeChild(d),h.splice(h.indexOf(d),1)},l.appendChild(n),d.appendChild(l),h.push(d)};for(m.type="text",m.id=i+"_1",d.appendChild(m),k.appendChild(l),f.appendChild(k),l.onclick=function(){n()},l.id=i+"_addLine",l.className="graphViewer-icon-button gv-icon-small add","string"==typeof c&&c.length>0&&(c=[c]),c.length>0&&(m.value=c[0]),g=1;g'+c+""),a.disabled||$("#subNavigationBar .bottom").children().last().bind("click",function(){window.App.navigate(a.route,{trigger:!0})})})},buildUserSubNav:function(a,b){var c={General:{route:"#user/"+encodeURIComponent(a)},Permissions:{route:"#user/"+encodeURIComponent(a)+"/permission"}};c[b].active=!0,this.buildSubNavBar(c)},buildGraphSubNav:function(a,b){var c={Content:{route:"#graph2/"+encodeURIComponent(a)},Settings:{route:"#graph2/"+encodeURIComponent(a)+"/settings"}};c[b].active=!0,this.buildSubNavBar(c)},buildNodeSubNav:function(a,b,c){var d={Dashboard:{route:"#node/"+encodeURIComponent(a)}};d[b].active=!0,d[c].disabled=!0,this.buildSubNavBar(d)},buildNodesSubNav:function(a,b){var c={Overview:{route:"#nodes"},Shards:{route:"#shards"}};c[a].active=!0,b&&(c[b].disabled=!0),this.buildSubNavBar(c)},scaleability:void 0,buildCollectionSubNav:function(a,b){var c="#collection/"+encodeURIComponent(a),d={Content:{route:c+"/documents/1"},Indices:{route:"#cIndices/"+encodeURIComponent(a)},Info:{route:"#cInfo/"+encodeURIComponent(a)},Settings:{route:"#cSettings/"+encodeURIComponent(a)}};d[b].active=!0,this.buildSubNavBar(d)},enableKeyboardHotkeys:function(a){var b=window.arangoHelper.hotkeysFunctions;a===!0&&($(document).on("keydown",null,"j",b.scrollDown),$(document).on("keydown",null,"k",b.scrollUp))},databaseAllowed:function(a){var b=function(b,c){b?arangoHelper.arangoError("",""):$.ajax({type:"GET",cache:!1,url:this.databaseUrl("/_api/database/",c),contentType:"application/json",processData:!1,success:function(){a(!1,!0)},error:function(){a(!0,!1)}})}.bind(this);this.currentDatabase(b)},arangoNotification:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"success"})},arangoError:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"error"})},arangoWarning:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"warning"})},arangoMessage:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"message"})},hideArangoNotifications:function(){$.noty.clearQueue(),$.noty.closeAll()},openDocEditor:function(a,b,c){var d=a.split("/"),e=this,f=new window.DocumentView({collection:window.App.arangoDocumentStore});f.breadcrumb=function(){},f.colid=d[0],f.docid=d[1],f.el=".arangoFrame .innerDiv",f.render(),f.setType(b),$(".arangoFrame .headerBar").remove(),$(".arangoFrame .outerDiv").prepend(''),$(".arangoFrame .outerDiv").click(function(){e.closeDocEditor()}),$(".arangoFrame .innerDiv").click(function(a){a.stopPropagation()}),$(".fa-times").click(function(){e.closeDocEditor()}),$(".arangoFrame").show(),f.customView=!0,f.customDeleteFunction=function(){window.modalView.hide(),$(".arangoFrame").hide()},$(".arangoFrame #deleteDocumentButton").click(function(){f.deleteDocumentModal()}),$(".arangoFrame #saveDocumentButton").click(function(){f.saveDocument()}),$(".arangoFrame #deleteDocumentButton").css("display","none")},closeDocEditor:function(){$(".arangoFrame .outerDiv .fa-times").remove(),$(".arangoFrame").hide()},addAardvarkJob:function(a,b){$.ajax({cache:!1,type:"POST",url:this.databaseUrl("/_admin/aardvark/job"),data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){b&&b(!1,a)},error:function(a){b&&b(!0,a)}})},deleteAardvarkJob:function(a,b){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,success:function(a){b&&b(!1,a)},error:function(a){b&&b(!0,a)}})},deleteAllAardvarkJobs:function(a){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(b){a&&a(!1,b)},error:function(b){a&&a(!0,b)}})},getAardvarkJobs:function(a){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(b){a&&a(!1,b)},error:function(b){a&&a(!0,b)}})},getPendingJobs:function(a){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_api/job/pending"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},syncAndReturnUninishedAardvarkJobs:function(a,b){var c=function(c,d){if(c)b(!0);else{var e=function(c,e){if(c)arangoHelper.arangoError("","");else{var f=[];e.length>0?_.each(d,function(b){if(b.type===a||void 0===b.type){var c=!1;_.each(e,function(a){b.id===a&&(c=!0)}),c?f.push({collection:b.collection,id:b.id,type:b.type,desc:b.desc}):window.arangoHelper.deleteAardvarkJob(b.id)}}):d.length>0&&this.deleteAllAardvarkJobs(),b(!1,f)}}.bind(this);this.getPendingJobs(e)}}.bind(this);this.getAardvarkJobs(c)},getRandomToken:function(){return Math.round((new Date).getTime())},isSystemAttribute:function(a){var b=this.systemAttributes();return b[a]},isSystemCollection:function(a){return"_"===a.name.substr(0,1)},setDocumentStore:function(a){this.arangoDocumentStore=a},collectionApiType:function(a,b,c){if(b||void 0===this.CollectionTypes[a]){var d=function(b,c,d){b?arangoHelper.arangoError("Error","Could not detect collection type"):(this.CollectionTypes[a]=c.type,3===this.CollectionTypes[a]?d(!1,"edge"):d(!1,"document"))}.bind(this);this.arangoDocumentStore.getCollectionInfo(a,d,c)}else c(!1,this.CollectionTypes[a])},collectionType:function(a){if(!a||""===a.name)return"-";var b;return b=2===a.type?"document":3===a.type?"edge":"unknown",this.isSystemCollection(a)&&(b+=" (system)"),b},formatDT:function(a){var b=function(a){return 10>a?"0"+a:a};return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+" "+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())},escapeHtml:function(a){return String(a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},backendUrl:function(a){return frontendConfig.basePath+a},databaseUrl:function(a,b){if("/_db/"===a.substr(0,5))throw new Error("Calling databaseUrl with a databased url ("+a+") doesn't make any sense");return b||(b="_system",frontendConfig.db&&(b=frontendConfig.db)),this.backendUrl("/_db/"+encodeURIComponent(b)+a)},showAuthDialog:function(){var a=!0,b=localStorage.getItem("authenticationNotification");return"false"===b&&(a=!1),a},doNotShowAgain:function(){localStorage.setItem("authenticationNotification",!1)},renderEmpty:function(a){$("#content").html('")},download:function(a,b){$.ajax(a).success(function(a,c,d){if(b)return void b(a);var e=new Blob([JSON.stringify(a)],{type:d.getResponseHeader("Content-Type")||"application/octet-stream"}),f=window.URL.createObjectURL(e),g=document.createElement("a");document.body.appendChild(g),g.style="display: none",g.href=f,g.download=d.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),g.click(),window.URL.revokeObjectURL(f),document.body.removeChild(g)})}}}(),function(){"use strict";if(!window.hasOwnProperty("TEST_BUILD")){var a=function(){var a={};return a.createTemplate=function(a){var b=$("#"+a.replace(".","\\.")).html();return{render:function(a){var c=_.template(b);return c=c(a)}}},a};window.templateEngine=new a}}(),function(){"use strict";window.dygraphConfig={defaultFrame:12e5,zeropad:function(a){return 10>a?"0"+a:a},xAxisFormat:function(a){if(-1===a)return"";var b=new Date(a);return this.zeropad(b.getHours())+":"+this.zeropad(b.getMinutes())+":"+this.zeropad(b.getSeconds())},mergeObjects:function(a,b,c){c||(c=[]);var d,e={};return c.forEach(function(c){var d=a[c],f=b[c];void 0===d&&(d={}),void 0===f&&(f={}),e[c]=_.extend(d,f)}),d=_.extend(a,b),Object.keys(e).forEach(function(a){d[a]=e[a]}),d},mapStatToFigure:{pageFaults:["times","majorPageFaultsPerSecond","minorPageFaultsPerSecond"],systemUserTime:["times","systemTimePerSecond","userTimePerSecond"],totalTime:["times","avgQueueTime","avgRequestTime","avgIoTime"],dataTransfer:["times","bytesSentPerSecond","bytesReceivedPerSecond"],requests:["times","getsPerSecond","putsPerSecond","postsPerSecond","deletesPerSecond","patchesPerSecond","headsPerSecond","optionsPerSecond","othersPerSecond"]},colors:["rgb(95, 194, 135)","rgb(238, 190, 77)","#81ccd8","#7ca530","#3c3c3c","#aa90bd","#e1811d","#c7d4b2","#d0b2d4"],figureDependedOptions:{clusterRequestsPerSecond:{showLabelsOnHighlight:!0,title:"",header:"Cluster Requests per Second",stackedGraph:!0,div:"lineGraphLegend",labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},pageFaults:{header:"Page Faults",visibility:[!0,!1],labels:["datetime","Major Page","Minor Page"],div:"pageFaultsChart",labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},systemUserTime:{div:"systemUserTimeChart",header:"System and User Time",labels:["datetime","System Time","User Time"],stackedGraph:!0,labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},totalTime:{div:"totalTimeChart",header:"Total Time",labels:["datetime","Queue","Computation","I/O"],labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}},stackedGraph:!0},dataTransfer:{header:"Data Transfer",labels:["datetime","Bytes sent","Bytes received"],stackedGraph:!0,div:"dataTransferChart"},requests:{header:"Requests",labels:["datetime","Reads","Writes"],stackedGraph:!0,div:"requestsChart",axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}}},getDashBoardFigures:function(a){var b=[],c=this;return Object.keys(this.figureDependedOptions).forEach(function(d){"clusterRequestsPerSecond"!==d&&(c.figureDependedOptions[d].div||a)&&b.push(d)}),b},getDefaultConfig:function(a){var b=this,c={digitsAfterDecimal:1,drawGapPoints:!0,fillGraph:!0,fillAlpha:.85,showLabelsOnHighlight:!1,strokeWidth:0,lineWidth:0,strokeBorderWidth:0,includeZero:!0,highlightCircleSize:2.5,labelsSeparateLines:!0,strokeBorderColor:"rgba(0,0,0,0)",interactionModel:{},maxNumberWidth:10,colors:[this.colors[0]],xAxisLabelWidth:"50",rightGap:15,showRangeSelector:!1,rangeSelectorHeight:50,rangeSelectorPlotStrokeColor:"#365300",rangeSelectorPlotFillColor:"",pixelsPerLabel:50,labelsKMG2:!0,dateWindow:[(new Date).getTime()-this.defaultFrame,(new Date).getTime()],axes:{x:{valueFormatter:function(a){return b.xAxisFormat(a)}},y:{ticker:Dygraph.numericLinearTicks}}};return this.figureDependedOptions[a]&&(c=this.mergeObjects(c,this.figureDependedOptions[a],["axes"]),c.div&&c.labels&&(c.colors=this.getColors(c.labels),c.labelsDiv=document.getElementById(c.div+"Legend"),c.legend="always",c.showLabelsOnHighlight=!0)),c},getDetailChartConfig:function(a){var b=_.extend(this.getDefaultConfig(a),{showRangeSelector:!0,interactionModel:null,showLabelsOnHighlight:!0,highlightCircleSize:2.5,legend:"always",labelsDiv:"div#detailLegend.dashboard-legend-inner"});return"pageFaults"===a&&(b.visibility=[!0,!0]),b.labels||(b.labels=["datetime",b.header],b.colors=this.getColors(b.labels)),b},getColors:function(a){var b;return b=this.colors.concat([]),b.slice(0,a.length-1)}}}(),function(){"use strict";window.arangoCollectionModel=Backbone.Model.extend({idAttribute:"name",urlRoot:arangoHelper.databaseUrl("/_api/collection"),defaults:{id:"",name:"",status:"",type:"",isSystem:!1,picture:"",locked:!1,desc:void 0},getProperties:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+encodeURIComponent(this.get("id"))+"/properties"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},getFigures:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/figures"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(){a(!0)}})},getRevision:function(a,b){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/revision"),contentType:"application/json",processData:!1,success:function(c){a(!1,c,b)},error:function(){a(!0)}})},getIndex:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/index/?collection="+this.get("id")),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},createIndex:function(a,b){var c=this;$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/index?collection="+c.get("id")),headers:{"x-arango-async":"store"},data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a,d,e){e.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:e.getResponseHeader("x-arango-async-id"),type:"index",desc:"Creating Index",collection:c.get("id")}),b(!1,a)):b(!0,a)},error:function(a){b(!0,a)}})},deleteIndex:function(a,b){ -var c=this;$.ajax({cache:!1,type:"DELETE",url:arangoHelper.databaseUrl("/_api/index/"+this.get("name")+"/"+encodeURIComponent(a)),headers:{"x-arango-async":"store"},success:function(a,d,e){e.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:e.getResponseHeader("x-arango-async-id"),type:"index",desc:"Removing Index",collection:c.get("id")}),b(!1,a)):b(!0,a)},error:function(a){b(!0,a)}}),b()},truncateCollection:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/truncate"),success:function(){arangoHelper.arangoNotification("Collection truncated.")},error:function(){arangoHelper.arangoError("Collection error.")}})},loadCollection:function(a){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/load"),success:function(){a(!1)},error:function(){a(!0)}}),a()},unloadCollection:function(a){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/unload?flush=true"),success:function(){a(!1)},error:function(){a(!0)}}),a()},renameCollection:function(a,b){var c=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/rename"),data:JSON.stringify({name:a}),contentType:"application/json",processData:!1,success:function(){c.set("name",a),b(!1)},error:function(a){b(!0,a)}})},changeCollection:function(a,b,c,d){var e=!1;"true"===a?a=!0:"false"===a&&(a=!1);var f={waitForSync:a,journalSize:parseInt(b,10),indexBuckets:parseInt(c,10)};return $.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/properties"),data:JSON.stringify(f),contentType:"application/json",processData:!1,success:function(){d(!1)},error:function(a){d(!1,a)}}),e}})}(),window.DatabaseModel=Backbone.Model.extend({idAttribute:"name",initialize:function(){"use strict"},isNew:function(){"use strict";return!1},sync:function(a,b,c){"use strict";return"update"===a&&(a="create"),Backbone.sync(a,b,c)},url:arangoHelper.databaseUrl("/_api/database"),defaults:{}}),window.arangoDocumentModel=Backbone.Model.extend({initialize:function(){"use strict"},urlRoot:arangoHelper.databaseUrl("/_api/document"),defaults:{_id:"",_rev:"",_key:""},getSorted:function(){"use strict";var a=this,b=Object.keys(a.attributes).sort(function(a,b){var c=arangoHelper.isSystemAttribute(a),d=arangoHelper.isSystemAttribute(b);return c!==d?c?-1:1:b>a?-1:1}),c={};return _.each(b,function(b){c[b]=a.attributes[b]}),c}}),function(){"use strict";window.ArangoQuery=Backbone.Model.extend({urlRoot:arangoHelper.databaseUrl("/_api/user"),defaults:{name:"",type:"custom",value:""}})}(),window.Replication=Backbone.Model.extend({defaults:{state:{},server:{}},initialize:function(){}}),window.Statistics=Backbone.Model.extend({defaults:{},url:function(){"use strict";return"/_admin/statistics"}}),window.StatisticsDescription=Backbone.Model.extend({defaults:{figures:"",groups:""},url:function(){"use strict";return"/_admin/statistics-description"}}),window.Users=Backbone.Model.extend({defaults:{user:"",active:!1,extra:{}},idAttribute:"user",parse:function(a){return this.isNotNew=!0,a},isNew:function(){return!this.isNotNew},url:function(){return this.isNew()?arangoHelper.databaseUrl("/_api/user"):""!==this.get("user")?arangoHelper.databaseUrl("/_api/user/"+this.get("user")):arangoHelper.databaseUrl("/_api/user")},checkPassword:function(a,b){$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({passwd:a}),contentType:"application/json",processData:!1,success:function(a){b(!1,a)},error:function(a){b(!0,a)}})},setPassword:function(a){$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({passwd:a}),contentType:"application/json",processData:!1})},setExtras:function(a,b,c){$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({extra:{name:a,img:b}}),contentType:"application/json",processData:!1,success:function(){c(!1)},error:function(){c(!0)}})}}),function(){"use strict";window.ClusterCoordinator=Backbone.Model.extend({defaults:{name:"",status:"ok",address:"",protocol:""},idAttribute:"name",forList:function(){return{name:this.get("name"),status:this.get("status"),url:this.get("url")}}})}(),function(){"use strict";window.ClusterServer=Backbone.Model.extend({defaults:{name:"",address:"",role:"",status:"ok"},idAttribute:"name",forList:function(){return{name:this.get("name"),address:this.get("address"),status:this.get("status")}}})}(),function(){"use strict";window.Coordinator=Backbone.Model.extend({defaults:{address:"",protocol:"",name:"",status:""}})}(),function(){"use strict";window.CurrentDatabase=Backbone.Model.extend({url:arangoHelper.databaseUrl("/_api/database/current",frontendConfig.db),parse:function(a){return a.result}})}(),function(){"use strict";var a=function(a,b,c,d,e,f){var g={contentType:"application/json",processData:!1,type:c};b=b||function(){},f=_.extend({mount:a.encodedMount()},f);var h=_.reduce(f,function(a,b,c){return a+encodeURIComponent(c)+"="+encodeURIComponent(b)+"&"},"?");g.url=arangoHelper.databaseUrl("/_admin/aardvark/foxxes"+(d?"/"+d:"")+h.slice(0,h.length-1)),void 0!==e&&(g.data=JSON.stringify(e)),$.ajax(g).then(function(a){b(null,a)},function(a){window.xhr=a,b(_.extend(a.status?new Error(a.responseJSON?a.responseJSON.errorMessage:a.responseText):new Error("Network Error"),{statusCode:a.status}))})};window.Foxx=Backbone.Model.extend({idAttribute:"mount",defaults:{author:"Unknown Author",name:"",version:"Unknown Version",description:"No description",license:"Unknown License",contributors:[],scripts:{},config:{},deps:{},git:"",system:!1,development:!1},isNew:function(){return!1},encodedMount:function(){return encodeURIComponent(this.get("mount"))},destroy:function(b,c){a(this,c,"DELETE",void 0,void 0,b)},isBroken:function(){return!1},needsAttention:function(){return this.isBroken()||this.needsConfiguration()||this.hasUnconfiguredDependencies()},needsConfiguration:function(){return _.any(this.get("config"),function(a){return void 0===a.current&&a.required!==!1})},hasUnconfiguredDependencies:function(){return _.any(this.get("deps"),function(a){return void 0===a.current&&a.definition.required!==!1})},getConfiguration:function(b){a(this,function(a,c){a||this.set("config",c),"function"==typeof b&&b(a,c)}.bind(this),"GET","config")},setConfiguration:function(b,c){a(this,c,"PATCH","config",b)},getDependencies:function(b){a(this,function(a,c){a||this.set("deps",c),"function"==typeof b&&b(a,c)}.bind(this),"GET","deps")},setDependencies:function(b,c){a(this,c,"PATCH","deps",b)},toggleDevelopment:function(b,c){a(this,function(a,d){a||this.set("development",b),"function"==typeof c&&c(a,d)}.bind(this),"PATCH","devel",b)},runScript:function(b,c,d){a(this,d,"POST","scripts/"+b,c)},runTests:function(b,c){a(this,function(a,b){"function"==typeof c&&c(a?a.responseJSON:a,b)},"POST","tests",b)},isSystem:function(){return this.get("system")},isDevelopment:function(){return this.get("development")},download:function(){a(this,function(a,b){return a?void console.error(a.responseJSON):void(window.location.href=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/download/zip?mount="+this.encodedMount()+"&nonce="+b.nonce))}.bind(this),"POST","download/nonce")},fetchThumbnail:function(a){var b=new XMLHttpRequest;b.responseType="blob",b.onload=function(){this.thumbnailUrl=URL.createObjectURL(b.response),a()}.bind(this),b.onerror=a,b.open("GET","foxxes/thumbnail?mount="+this.encodedMount()),window.arangoHelper.getCurrentJwt()&&b.setRequestHeader("Authorization","bearer "+window.arangoHelper.getCurrentJwt()),b.send()}})}(),function(){"use strict";window.Graph=Backbone.Model.extend({idAttribute:"_key",urlRoot:arangoHelper.databaseUrl("/_api/gharial"),isNew:function(){return!this.get("_id")},parse:function(a){return a.graph||a},addEdgeDefinition:function(a){$.ajax({async:!1,type:"POST",url:this.urlRoot+"/"+this.get("_key")+"/edge",data:JSON.stringify(a)})},deleteEdgeDefinition:function(a){$.ajax({async:!1,type:"DELETE",url:this.urlRoot+"/"+this.get("_key")+"/edge/"+a})},modifyEdgeDefinition:function(a){$.ajax({async:!1,type:"PUT",url:this.urlRoot+"/"+this.get("_key")+"/edge/"+a.collection,data:JSON.stringify(a)})},addVertexCollection:function(a){$.ajax({async:!1,type:"POST",url:this.urlRoot+"/"+this.get("_key")+"/vertex",data:JSON.stringify({collection:a})})},deleteVertexCollection:function(a){$.ajax({async:!1,type:"DELETE",url:this.urlRoot+"/"+this.get("_key")+"/vertex/"+a})},defaults:{name:"",edgeDefinitions:[],orphanCollections:[]}})}(),function(){"use strict";window.newArangoLog=Backbone.Model.extend({defaults:{lid:"",level:"",timestamp:"",text:"",totalAmount:""},getLogStatus:function(){switch(this.get("level")){case 1:return"Error";case 2:return"Warning";case 3:return"Info";case 4:return"Debug";default:return"Unknown"}}})}(),function(){"use strict";window.Notification=Backbone.Model.extend({defaults:{title:"",date:0,content:"",priority:"",tags:"",seen:!1}})}(),function(){"use strict";window.queryManagementModel=Backbone.Model.extend({defaults:{id:"",query:"",started:"",runTime:""}})}(),window.UserConfig=Backbone.Model.extend({defaults:{graphs:"",queries:[]},model:window.UserConfigModel,parse:function(a){return a.result},url:function(){return window.App.currentUser?this.username=window.App.currentUser:this.username="root",arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config")},setItem:function(a,b,c){var d=this;$.ajax({type:"PUT",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,data:JSON.stringify({value:b}),async:!0,success:function(){d.set(a,b),c&&c()},error:function(){arangoHelper.arangoError("User configuration","Could not update user configuration for key: "+a)}})},getItem:function(a,b){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a)},error:function(){arangoHelper.arangoError("User configuration","Could not fetch user configuration for key: "+a)}})}}),function(){"use strict";window.workMonitorModel=Backbone.Model.extend({defaults:{name:"",number:"",status:"",type:""}})}(),function(){"use strict";window.AutomaticRetryCollection=Backbone.Collection.extend({_retryCount:0,checkRetries:function(){var a=this;return this.updateUrl(),this._retryCount>10?(window.setTimeout(function(){a._retryCount=0},1e4),window.App.clusterUnreachable(),!1):!0},successFullTry:function(){this._retryCount=0},failureTry:function(a,b,c){401===c.status?window.App.requestAuth():(window.App.clusterPlan.rotateCoordinator(),this._retryCount++,a())}})}(),function(){"use strict";window.PaginatedCollection=Backbone.Collection.extend({page:0,pagesize:10,totalAmount:0,getPage:function(){return this.page+1},setPage:function(a){return a>=this.getLastPageNumber()?void(this.page=this.getLastPageNumber()-1):1>a?void(this.page=0):void(this.page=a-1)},getLastPageNumber:function(){return Math.max(Math.ceil(this.totalAmount/this.pagesize),1)},getOffset:function(){return this.page*this.pagesize},getPageSize:function(){return this.pagesize},setPageSize:function(a){if("all"===a)this.pagesize="all";else try{a=parseInt(a,10),this.pagesize=a}catch(b){}},setToFirst:function(){this.page=0},setToLast:function(){this.setPage(this.getLastPageNumber())},setToPrev:function(){this.setPage(this.getPage()-1)},setToNext:function(){this.setPage(this.getPage()+1)},setTotal:function(a){this.totalAmount=a},getTotal:function(){return this.totalAmount},setTotalMinusOne:function(){this.totalAmount--}})}(),window.ClusterStatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics",updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(a,b){this.host=b.host,window.App.registerForUpdate(this)}}),function(){"use strict";window.ArangoCollections=Backbone.Collection.extend({url:arangoHelper.databaseUrl("/_api/collection"),model:arangoCollectionModel,searchOptions:{searchPhrase:null,includeSystem:!1,includeDocument:!0,includeEdge:!0,includeLoaded:!0,includeUnloaded:!0,sortBy:"name",sortOrder:1},translateStatus:function(a){switch(a){case 0:return"corrupted";case 1:return"new born collection";case 2:return"unloaded";case 3:return"loaded";case 4:return"unloading";case 5:return"deleted";case 6:return"loading";default:return}},translateTypePicture:function(a){var b="";switch(a){case"document":b+="fa-file-text-o";break;case"edge":b+="fa-share-alt";break;case"unknown":b+="fa-question";break;default:b+="fa-cogs"}return b},parse:function(a){var b=this;return _.each(a.result,function(a){a.isSystem=arangoHelper.isSystemCollection(a),a.type=arangoHelper.collectionType(a),a.status=b.translateStatus(a.status),a.picture=b.translateTypePicture(a.type)}),a.result},getPosition:function(a){var b,c=this.getFiltered(this.searchOptions),d=null,e=null;for(b=0;b0&&(d=c[b-1]),b0){var e,f=d.get("name").toLowerCase();for(e=0;ed?-1:1):0}),b},newCollection:function(a,b){var c={};c.name=a.collName,c.waitForSync=a.wfs,a.journalSize>0&&(c.journalSize=a.journalSize),c.isSystem=a.isSystem,c.type=parseInt(a.collType,10),a.shards&&(c.numberOfShards=a.shards,c.shardKeys=a.keys),a.replicationFactor&&(c.replicationFactor=JSON.parse(a.replicationFactor)),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/collection"),data:JSON.stringify(c),contentType:"application/json",processData:!1,success:function(a){b(!1,a)},error:function(a){b(!0,a)}})}})}(),function(){"use strict";window.ArangoDatabase=Backbone.Collection.extend({model:window.DatabaseModel,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_api/database"),comparator:function(a,b){var c=a.get("name").toLowerCase(),d=b.get("name").toLowerCase();return this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},parse:function(a){return a?_.map(a.result,function(a){return{name:a}}):void 0},initialize:function(){var a=this;this.fetch().done(function(){a.sort()})},setSortingDesc:function(a){this.sortOptions.desc=a},getDatabases:function(){var a=this;return this.fetch().done(function(){a.sort()}),this.models},getDatabasesForUser:function(a){$.ajax({type:"GET",cache:!1,url:this.url+"/user",contentType:"application/json",processData:!1,success:function(b){a(!1,b.result.sort())},error:function(){a(!0,[])}})},createDatabaseURL:function(a,b,c){var d=window.location,e=window.location.hash;b=b?"SSL"===b||"https:"===b?"https:":"http:":d.protocol,c=c||d.port;var f=b+"//"+window.location.hostname+":"+c+"/_db/"+encodeURIComponent(a)+"/_admin/aardvark/standalone.html";if(e){var g=e.split("/")[0];0===g.indexOf("#collection")&&(g="#collections"),0===g.indexOf("#service")&&(g="#services"),f+=g}return f},getCurrentDatabase:function(a){$.ajax({type:"GET",cache:!1,url:this.url+"/current",contentType:"application/json",processData:!1,success:function(b){200===b.code?a(!1,b.result.name):a(!1,b)},error:function(b){a(!0,b)}})},hasSystemAccess:function(a){var b=function(b,c){b?arangoHelper.arangoError("DB","Could not fetch databases"):a(!1,_.includes(c,"_system"))};this.getDatabasesForUser(b)}})}(),window.ArangoDocument=Backbone.Collection.extend({url:"/_api/document/",model:arangoDocumentModel,collectionInfo:{},deleteEdge:function(a,b,c){this.deleteDocument(a,b,c)},deleteDocument:function(a,b,c){$.ajax({cache:!1,type:"DELETE",contentType:"application/json",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),success:function(){c(!1)},error:function(){c(!0)}})},addDocument:function(a,b){var c=this;c.createTypeDocument(a,b)},createTypeEdge:function(a,b,c,d,e){var f;f=d?JSON.stringify({_key:d,_from:b,_to:c}):JSON.stringify({_from:b,_to:c}),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/document?collection="+encodeURIComponent(a)),data:f,contentType:"application/json",processData:!1,success:function(a){e(!1,a)},error:function(a){e(!0,a)}})},createTypeDocument:function(a,b,c,d){var e;e=b?JSON.stringify({_key:b}):JSON.stringify({});var f=arangoHelper.databaseUrl("/_api/document?collection="+encodeURIComponent(a));d&&(f+="?returnNew=true"),$.ajax({cache:!1,type:"POST",url:f,data:e,contentType:"application/json",processData:!1,success:function(a){d?c(!1,a):c(!1,a._id)},error:function(a){c(!0,a._id,a.responseJSON)}})},getCollectionInfo:function(a,b,c){var d=this;$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/collection/"+a+"?"+arangoHelper.getRandomToken()),contentType:"application/json",processData:!1,success:function(a){d.collectionInfo=a,b(!1,a,c)},error:function(a){b(!0,a,c)}})},getEdge:function(a,b,c){this.getDocument(a,b,c)},getDocument:function(a,b,c){var d=this;this.clearDocument(),$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),contentType:"application/json",processData:!1,success:function(a){d.add(a),c(!1,a,"document")},error:function(a){d.add(!0,a)}})},saveEdge:function(a,b,c,d,e,f){var g;try{g=JSON.parse(e),g._to=d,g._from=c}catch(h){arangoHelper.arangoError("Edge","Could not parsed document.")}$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b))+"#replaceEdge",data:JSON.stringify(g),contentType:"application/json",processData:!1,success:function(a){f(!1,a)},error:function(a){f(!0,a)}})},saveDocument:function(a,b,c,d){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),data:c,contentType:"application/json",processData:!1,success:function(a){d(!1,a)},error:function(a){d(!0,a)}})},updateLocalDocument:function(a){this.clearDocument(),this.add(a)},clearDocument:function(){this.reset()}}),function(){"use strict";window.ArangoDocuments=window.PaginatedCollection.extend({collectionID:1,filters:[],checkCursorTimer:void 0,MAX_SORT:12e3,lastQuery:{},sortAttribute:"",url:arangoHelper.databaseUrl("/_api/documents"),model:window.arangoDocumentModel,loadTotal:function(a){var b=this;$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/collection/"+this.collectionID+"/count"),contentType:"application/json",processData:!1,success:function(c){b.setTotal(c.count),a(!1)},error:function(){a(!0)}})},setCollection:function(a){var b=function(a){a&&arangoHelper.arangoError("Documents","Could not fetch documents count")};this.resetFilter(),this.collectionID=a,this.setPage(1),this.loadTotal(b)},setSort:function(a){this.sortAttribute=a},getSort:function(){return this.sortAttribute},addFilter:function(a,b,c){this.filters.push({attr:a,op:b,val:c})},setFiltersForQuery:function(a){if(0===this.filters.length)return"";var b=" FILTER",c="",d=_.map(this.filters,function(b,d){return"LIKE"===b.op?(c=" "+b.op+"(x.`"+b.attr+"`, @param",c+=d,c+=")"):(c="IN"===b.op||"NOT IN"===b.op?" ":" x.`",c+=b.attr,c+="IN"===b.op||"NOT IN"===b.op?" ":"` ",c+=b.op,c+="IN"===b.op||"NOT IN"===b.op?" x.@param":" @param",c+=d),a["param"+d]=b.val,c});return b+d.join(" &&")},setPagesize:function(a){this.setPageSize(a)},resetFilter:function(){this.filters=[]},moveDocument:function(a,b,c,d){var e,f,g,h,i={"@collection":b,filterid:a};e="FOR x IN @@collection",e+=" FILTER x._key == @filterid",e+=" INSERT x IN ",e+=c,f="FOR x in @@collection",f+=" FILTER x._key == @filterid",f+=" REMOVE x IN @@collection",g={query:e,bindVars:i},h={query:f,bindVars:i},window.progressView.show(),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),data:JSON.stringify(g),contentType:"application/json",success:function(){$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),data:JSON.stringify(h),contentType:"application/json",success:function(){d&&d(),window.progressView.hide()},error:function(){window.progressView.hide(),arangoHelper.arangoError("Document error","Documents inserted, but could not be removed.")}})},error:function(){window.progressView.hide(),arangoHelper.arangoError("Document error","Could not move selected documents.")}})},getDocuments:function(a){var b,c,d,e,f=this;c={"@collection":this.collectionID,offset:this.getOffset(),count:this.getPageSize()},b='FOR x IN @@collection LET att = APPEND(SLICE(ATTRIBUTES(x), 0, 25), "_key", true)',b+=this.setFiltersForQuery(c),this.getTotal()0&&(a+=" SORT x."+this.getSort()),a+=" RETURN x",b={query:a,bindVars:c}},uploadDocuments:function(a,b){$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_api/import?type=auto&collection="+encodeURIComponent(this.collectionID)+"&createCollection=false"),data:a,processData:!1,contentType:"json",dataType:"json",complete:function(a){if(4===a.readyState&&201===a.status)b(!1);else try{var c=JSON.parse(a.responseText);if(c.errors>0){var d="At least one error occurred during upload";b(!1,d)}}catch(e){console.log(e)}}})}})}(),function(){"use strict";window.ArangoLogs=window.PaginatedCollection.extend({upto:!1,loglevel:0,totalPages:0,parse:function(a){var b=[];return _.each(a.lid,function(c,d){b.push({level:a.level[d],lid:c,text:a.text[d],timestamp:a.timestamp[d],totalAmount:a.totalAmount})}),this.totalAmount=a.totalAmount,this.totalPages=Math.ceil(this.totalAmount/this.pagesize),b},initialize:function(a){a.upto===!0&&(this.upto=!0),this.loglevel=a.loglevel},model:window.newArangoLog,url:function(){var a,b,c,d=this.totalAmount-(this.page+1)*this.pagesize;return 0>d&&this.page===this.totalPages-1?(d=0,c=this.totalAmount%this.pagesize):c=this.pagesize,0===this.totalAmount&&(c=1),a=this.upto?"upto":"level",b="/_admin/log?"+a+"="+this.loglevel+"&size="+c+"&offset="+d,arangoHelper.databaseUrl(b)}})}(),function(){"use strict";window.ArangoQueries=Backbone.Collection.extend({initialize:function(a,b){var c=this;$.ajax("whoAmI?_="+Date.now(),{async:!0}).done(function(a){this.activeUser===!1||null===this.activeUser?c.activeUser="root":c.activeUser=a.user})},url:arangoHelper.databaseUrl("/_api/user/"),model:ArangoQuery,activeUser:null,parse:function(a){var b,c=this;return this.activeUser!==!1&&null!==this.activeUser||(this.activeUser="root"),_.each(a.result,function(a){if(a.user===c.activeUser)try{a.extra.queries&&(b=a.extra.queries)}catch(d){}}),b},saveCollectionQueries:function(a){if(this.activeUser===!1||null===this.activeUser)return!1;this.activeUser!==!1&&null!==this.activeUser||(this.activeUser="root");var b=[];this.each(function(a){b.push({value:a.attributes.value,parameter:a.attributes.parameter,name:a.attributes.name})}),$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.activeUser)),data:JSON.stringify({extra:{queries:b}}),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(){a(!0)}})},saveImportQueries:function(a,b){return 0===this.activeUser?!1:(window.progressView.show("Fetching documents..."),void $.ajax({cache:!1,type:"POST",url:"query/upload/"+encodeURIComponent(this.activeUser),data:a,contentType:"application/json",processData:!1,success:function(){window.progressView.hide(),arangoHelper.arangoNotification("Queries successfully imported."),b()},error:function(){window.progressView.hide(),arangoHelper.arangoError("Query error","queries could not be imported")}}))}})}(),window.ArangoReplication=Backbone.Collection.extend({model:window.Replication,url:"../api/user",getLogState:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/replication/logger-state"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},getApplyState:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/replication/applier-state"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})}}),window.StatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics"}),window.StatisticsDescriptionCollection=Backbone.Collection.extend({model:window.StatisticsDescription,url:"/_admin/statistics-description",parse:function(a){return a}}),window.ArangoUsers=Backbone.Collection.extend({model:window.Users,activeUser:null,activeUserSettings:{query:{},shell:{},testing:!0},sortOptions:{desc:!1},fetch:function(a){return window.App.currentUser&&"_system"!==window.App.currentDB.get("name")&&(this.url=frontendConfig.basePath+"/_api/user/"+encodeURIComponent(window.App.currentUser)),Backbone.Collection.prototype.fetch.call(this,a)},url:frontendConfig.basePath+"/_api/user",comparator:function(a,b){var c=a.get("user").toLowerCase(),d=b.get("user").toLowerCase();return this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},login:function(a,b,c){var d=this;$.ajax({url:arangoHelper.databaseUrl("/_open/auth"),method:"POST",data:JSON.stringify({username:a,password:b}),dataType:"json"}).success(function(a){arangoHelper.setCurrentJwt(a.jwt);var b=a.jwt.split(".");if(!b[1])throw new Error("Invalid JWT");if(!window.atob)throw new Error("base64 support missing in browser");var e=JSON.parse(atob(b[1]));d.activeUser=e.preferred_username,c(!1,d.activeUser)}).error(function(){arangoHelper.setCurrentJwt(null),d.activeUser=null,c(!0,null)})},setSortingDesc:function(a){this.sortOptions.desc=a},logout:function(){arangoHelper.setCurrentJwt(null),this.activeUser=null,this.reset(),window.App.navigate(""),window.location.reload()},setUserSettings:function(a,b){this.activeUserSettings.identifier=b},loadUserSettings:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(b.activeUser)),contentType:"application/json",processData:!1,success:function(c){b.activeUserSettings=c.extra,a(!1,c)},error:function(b){a(!0,b)}})},saveUserSettings:function(a){var b=this;$.ajax({cache:!1,type:"PUT",url:frontendConfig.basePath+"/_api/user/"+encodeURIComponent(b.activeUser),data:JSON.stringify({extra:b.activeUserSettings}),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},parse:function(a){var b=[];return a.result?_.each(a.result,function(a){b.push(a)}):b.push({user:a.user,active:a.active,extra:a.extra,changePassword:a.changePassword}),b},whoAmI:function(a){return this.activeUser?void a(!1,this.activeUser):void $.ajax("whoAmI?_="+Date.now()).success(function(b){a(!1,b.user)}).error(function(){a(!0,null)})}}),function(){"use strict";window.ClusterCoordinators=window.AutomaticRetryCollection.extend({model:window.ClusterCoordinator,url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/Coordinators"),updateUrl:function(){this.url=window.App.getNewRoute("Coordinators")},initialize:function(){},statusClass:function(a){switch(a){case"ok":return"success";case"warning":return"warning";case"critical":return"danger";case"missing":return"inactive";default:return"danger"}},getStatuses:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.getStatuses.bind(c,a,b))}).done(function(){c.successFullTry(),c.forEach(function(b){a(c.statusClass(b.get("status")),b.get("address"))}),b()})}},byAddress:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.byAddress.bind(c,a,b))}).done(function(){c.successFullTry(),a=a||{},c.forEach(function(b){var c=b.get("address");c=c.split(":")[0],a[c]=a[c]||{},a[c].coords=a[c].coords||[],a[c].coords.push(b)}),b(a)})}},checkConnection:function(a){var b=this;this.checkRetries()&&this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:b.failureTry.bind(b,b.checkConnection.bind(b,a))}).done(function(){b.successFullTry(),a()})}})}(),function(){"use strict";window.ClusterServers=window.AutomaticRetryCollection.extend({model:window.ClusterServer,host:"",url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/DBServers"),updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(a,b){this.host=b.host},statusClass:function(a){switch(a){case"ok":return"success";case"warning":return"warning";case"critical":return"danger";case"missing":return"inactive";default:return"danger"}},getStatuses:function(a){if(this.checkRetries()){var b=this,c=function(){b.successFullTry(),b._retryCount=0,b.forEach(function(c){a(b.statusClass(c.get("status")),c.get("address"))})};this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:b.failureTry.bind(b,b.getStatuses.bind(b,a))}).done(c)}},byAddress:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.byAddress.bind(c,a,b))}).done(function(){c.successFullTry(),a=a||{},c.forEach(function(b){var c=b.get("address");c=c.split(":")[0],a[c]=a[c]||{},a[c].dbs=a[c].dbs||[],a[c].dbs.push(b)}),b(a)}).error(function(a){console.log("error"),console.log(a)})}},getList:function(){throw new Error("Do not use")},getOverview:function(){throw new Error("Do not use DbServer.getOverview")}})}(),function(){"use strict";window.CoordinatorCollection=Backbone.Collection.extend({model:window.Coordinator,url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/Coordinators") -})}(),function(){"use strict";window.FoxxCollection=Backbone.Collection.extend({model:window.Foxx,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_admin/aardvark/foxxes"),comparator:function(a,b){var c,d;return this.sortOptions.desc===!0?(c=a.get("mount"),d=b.get("mount"),d>c?1:c>d?-1:0):(c=a.get("mount"),d=b.get("mount"),c>d?1:d>c?-1:0)},setSortingDesc:function(a){this.sortOptions.desc=a},installFromGithub:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/git?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},installFromStore:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/store?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},installFromZip:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/zip?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify({zipFile:a}),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},generate:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/generate?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})}})}(),function(){"use strict";window.GraphCollection=Backbone.Collection.extend({model:window.Graph,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_api/gharial"),dropAndDeleteGraph:function(a,b){$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/gharial/")+encodeURIComponent(a)+"?dropCollections=true",contentType:"application/json",processData:!0,success:function(){b(!0)},error:function(){b(!1)}})},comparator:function(a,b){var c=a.get("_key")||"",d=b.get("_key")||"";return c=c.toLowerCase(),d=d.toLowerCase(),this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},setSortingDesc:function(a){this.sortOptions.desc=a},parse:function(a){return a.error?void 0:a.graphs}})}(),function(){"use strict";window.NotificationCollection=Backbone.Collection.extend({model:window.Notification,url:""})}(),function(){"use strict";window.QueryManagementActive=Backbone.Collection.extend({model:window.queryManagementModel,url:function(){var a=frontendConfig.basePath+"/_api/query/current";return"_system"!==window.frontendConfig.db&&(a=arangoHelper.databaseUrl("/_api/query/current")),a},killRunningQuery:function(a,b){var c=frontendConfig.basePath+"/_api/query/"+encodeURIComponent(a);"_system"!==window.frontendConfig.db&&(c=arangoHelper.databaseUrl("/_api/query/"+encodeURIComponent(a))),$.ajax({url:c,type:"DELETE",success:function(a){b()}})}})}(),function(){"use strict";window.QueryManagementSlow=Backbone.Collection.extend({model:window.queryManagementModel,url:function(){var a=frontendConfig.basePath+"/_api/query/slow";return"_system"!==window.frontendConfig.db&&(a=arangoHelper.databaseUrl("/_api/query/slow")),a},deleteSlowQueryHistory:function(a){var b=frontendConfig.basePath+"/_api/query/slow";"_system"!==window.frontendConfig.db&&(b=arangoHelper.databaseUrl("/_api/query/slow")),$.ajax({url:b,type:"DELETE",success:function(b){a()}})}})}(),function(){"use strict";window.WorkMonitorCollection=Backbone.Collection.extend({model:window.workMonitorModel,url:"/_admin/work-monitor",parse:function(a){return a.work}})}(),function(){"use strict";window.PaginationView=Backbone.View.extend({collection:null,paginationDiv:"",idPrefix:"",rerender:function(){},jumpTo:function(a){this.collection.setPage(a),this.rerender()},firstPage:function(){this.jumpTo(1)},lastPage:function(){this.jumpTo(this.collection.getLastPageNumber())},firstDocuments:function(){this.jumpTo(1)},lastDocuments:function(){this.jumpTo(this.collection.getLastPageNumber())},prevDocuments:function(){this.jumpTo(this.collection.getPage()-1)},nextDocuments:function(){this.jumpTo(this.collection.getPage()+1)},renderPagination:function(){$(this.paginationDiv).html("");var a=this,b=this.collection.getPage(),c=this.collection.getLastPageNumber(),d=$(this.paginationDiv),e={page:b,lastPage:c,click:function(b){var c=window.location.hash.split("/");"documents"===c[2]?(e.page=b,window.location.hash=c[0]+"/"+c[1]+"/"+c[2]+"/"+b):(a.jumpTo(b),e.page=b)}};d.html(""),d.pagination(e),$(this.paginationDiv).prepend('
    '),$(this.paginationDiv).append('
    ')}})}(),function(){"use strict";window.ApplicationDetailView=Backbone.View.extend({el:"#content",divs:["#readme","#swagger","#app-info","#sideinformation","#information","#settings"],navs:["#service-info","#service-api","#service-readme","#service-settings"],template:templateEngine.createTemplate("applicationDetailView.ejs"),events:{"click .open":"openApp","click .delete":"deleteApp","click #app-deps":"showDepsDialog","click #app-switch-mode":"toggleDevelopment","click #app-scripts [data-script]":"runScript","click #app-tests":"runTests","click #app-replace":"replaceApp","click #download-app":"downloadApp","click .subMenuEntries li":"changeSubview","click #jsonLink":"toggleSwagger","mouseenter #app-scripts":"showDropdown","mouseleave #app-scripts":"hideDropdown"},resize:function(a){a?$(".innerContent").css("height","auto"):($(".innerContent").height($(".centralRow").height()-150),$("#swagger iframe").height($(".centralRow").height()-150),$("#swagger #swaggerJsonContent").height($(".centralRow").height()-150))},toggleSwagger:function(){var a=function(a){$("#jsonLink").html("JSON"),this.jsonEditor.setValue(JSON.stringify(a,null," "),1),$("#swaggerJsonContent").show(),$("#swagger iframe").hide()}.bind(this);if("Swagger"===$("#jsonLink").html()){var b=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")));arangoHelper.download(b,a)}else $("#swaggerJsonContent").hide(),$("#swagger iframe").show(),$("#jsonLink").html("Swagger")},changeSubview:function(a){_.each(this.navs,function(a){$(a).removeClass("active")}),$(a.currentTarget).addClass("active"),_.each(this.divs,function(a){$(".headerButtonBar").hide(),$(a).hide()}),"service-readme"===a.currentTarget.id?(this.resize(!0),$("#readme").show()):"service-api"===a.currentTarget.id?(this.resize(),$("#swagger").show()):"service-info"===a.currentTarget.id?(this.resize(!0),this.render(),$("#information").show(),$("#sideinformation").show()):"service-settings"===a.currentTarget.id&&(this.resize(!0),this.showConfigDialog(),$(".headerButtonBar").show(),$("#settings").show())},downloadApp:function(){this.model.isSystem()||this.model.download()},replaceApp:function(){var a=this.model.get("mount");window.foxxInstallView.upgrade(a,function(){window.App.applicationDetail(encodeURIComponent(a))}),$(".createModalDialog .arangoHeader").html("Replace Service"),$("#infoTab").click()},updateConfig:function(){this.model.getConfiguration(function(){$("#app-warning")[this.model.needsAttention()?"show":"hide"](),$("#app-warning-config")[this.model.needsConfiguration()?"show":"hide"](),this.model.needsConfiguration()?$("#app-config").addClass("error"):$("#app-config").removeClass("error")}.bind(this))},updateDeps:function(){this.model.getDependencies(function(){$("#app-warning")[this.model.needsAttention()?"show":"hide"](),$("#app-warning-deps")[this.model.hasUnconfiguredDependencies()?"show":"hide"](),this.model.hasUnconfiguredDependencies()?$("#app-deps").addClass("error"):$("#app-deps").removeClass("error")}.bind(this))},toggleDevelopment:function(){this.model.toggleDevelopment(!this.model.isDevelopment(),function(){this.model.isDevelopment()?($(".app-switch-mode").text("Set Production"),$("#app-development-indicator").css("display","inline"),$("#app-development-path").css("display","inline")):($(".app-switch-mode").text("Set Development"),$("#app-development-indicator").css("display","none"),$("#app-development-path").css("display","none"))}.bind(this))},runScript:function(a){a.preventDefault();var b=$(a.currentTarget).attr("data-script"),c=[window.modalView.createBlobEntry("app_script_arguments","Script arguments","",null,"optional",!1,[{rule:function(a){return a&&JSON.parse(a)},msg:"Must be well-formed JSON or empty"}])],d=[window.modalView.createSuccessButton("Run script",function(){var a=$("#app_script_arguments").val();a=a&&JSON.parse(a),window.modalView.hide(),this.model.runScript(b,a,function(a,c){var d;d=a?"

    The script failed with an error"+(a.statusCode?" (HTTP "+a.statusCode+")":"")+":

    "+a.message+"
    ":c?"

    Script results:

    "+JSON.stringify(c,null,2)+"
    ":"

    The script ran successfully.

    ",window.modalView.show("modalTable.ejs",'Result of script "'+b+'"',void 0,void 0,void 0,d)})}.bind(this))];window.modalView.show("modalTable.ejs",'Run script "'+b+'" on "'+this.model.get("mount")+'"',d,c)},showSwagger:function(a){a.preventDefault(),this.render("swagger")},showReadme:function(a){a.preventDefault(),this.render("readme")},runTests:function(a){a.preventDefault();var b="

    WARNING: Running tests may result in destructive side-effects including data loss. Please make sure not to run tests on a production database.

    ";this.model.isDevelopment()&&(b+="

    WARNING: This app is running in development mode. If any of the tests access the app's HTTP API they may become non-deterministic.

    ");var c=[window.modalView.createSuccessButton("Run tests",function(){window.modalView.hide(),this.model.runTests({reporter:"suite"},function(a,b){window.modalView.show("modalTestResults.ejs","Test results",void 0,void 0,void 0,a||b)})}.bind(this))];window.modalView.show("modalTable.ejs",'Run tests for app "'+this.model.get("mount")+'"',c,void 0,void 0,b)},render:function(a){return this.resize(),this.model.fetchThumbnail(function(){var b=function(b,c){var d=this;b?arangoHelper.arangoError("DB","Could not get current database"):($(this.el).html(this.template.render({app:this.model,baseUrl:arangoHelper.databaseUrl("",c),mode:a})),d.jsonEditor=ace.edit("swaggerJsonEditor"),d.jsonEditor.setReadOnly(!0),d.jsonEditor.getSession().setMode("ace/mode/json"),$.ajax({url:this.appUrl(c),headers:{accept:"text/html,*/*;q=0.9"}}).success(function(){$(".open",this.el).prop("disabled",!1)}.bind(this)),this.updateConfig(),this.updateDeps(),"swagger"===a&&$.get("./foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")),function(a){Object.keys(a.paths).length<1&&(d.render("readme"),$("#app-show-swagger").attr("disabled","true"))})),this.breadcrumb()}.bind(this);arangoHelper.currentDatabase(b),_.isEmpty(this.model.get("config"))&&$("#service-settings").attr("disabled",!0)}.bind(this)),$(this.el)},breadcrumb:function(){var a="Service: "+this.model.get("name")+'',b='

    Contributors:';this.model.get("contributors")&&this.model.get("contributors").length>0?_.each(this.model.get("contributors"),function(a){b+=''+a.name+""}):b+="No contributors",b+="

    ",$(".information").append(b),this.model.get("author")&&$(".information").append('

    Author:'+this.model.get("author")+"

    "),this.model.get("mount")&&$(".information").append('

    Mount:'+this.model.get("mount")+"

    "),this.model.get("development")&&this.model.get("path")&&$(".information").append('

    Path:'+this.model.get("path")+"

    "),$("#subNavigationBar .breadcrumb").html(a)},openApp:function(){var a=function(a,b){a?arangoHelper.arangoError("DB","Could not get current database"):window.open(this.appUrl(b),this.model.get("title")).focus()}.bind(this);arangoHelper.currentDatabase(a)},deleteApp:function(){var a=[window.modalView.createDeleteButton("Delete",function(){var a={teardown:$("#app_delete_run_teardown").is(":checked")};this.model.destroy(a,function(a,b){a||b.error!==!1||(window.modalView.hide(),window.App.navigate("services",{trigger:!0}))})}.bind(this))],b=[window.modalView.createCheckboxEntry("app_delete_run_teardown","Run teardown?",!0,"Should this app's teardown script be executed before removing the app?",!0)];window.modalView.show("modalTable.ejs",'Delete Foxx App mounted at "'+this.model.get("mount")+'"',a,b,void 0,"

    Are you sure? There is no way back...

    ",!0)},appUrl:function(a){return arangoHelper.databaseUrl(this.model.get("mount"),a)},applyConfig:function(){var a={};_.each(this.model.get("config"),function(b,c){var d=$("#app_config_"+c),e=d.val();if("boolean"===b.type||"bool"===b.type)return void(a[c]=d.is(":checked"));if(""===e&&b.hasOwnProperty("default"))return a[c]=b["default"],void("json"===b.type&&(a[c]=JSON.stringify(b["default"])));if("number"===b.type)a[c]=parseFloat(e);else if("integer"===b.type||"int"===b.type)a[c]=parseInt(e,10);else{if("json"!==b.type)return void(a[c]=window.arangoHelper.escapeHtml(e));a[c]=e&&JSON.stringify(JSON.parse(e))}}),this.model.setConfiguration(a,function(){this.updateConfig(),arangoHelper.arangoNotification(this.model.get("name"),"Settings applied.")}.bind(this))},showConfigDialog:function(){if(_.isEmpty(this.model.get("config")))return void $("#settings .buttons").html($("#hidden_buttons").html());var a=_.map(this.model.get("config"),function(a,b){var c=void 0===a["default"]?"":String(a["default"]),d=void 0===a.current?"":String(a.current),e="createTextEntry",f=!1,g=[];return"boolean"===a.type||"bool"===a.type?(e="createCheckboxEntry",a["default"]=a["default"]||!1,c=a["default"]||!1,d=a.current||!1):"json"===a.type?(e="createBlobEntry",c=void 0===a["default"]?"":JSON.stringify(a["default"]),d=void 0===a.current?"":a.current,g.push({rule:function(a){return a&&JSON.parse(a)},msg:"Must be well-formed JSON or empty."})):"integer"===a.type||"int"===a.type?g.push({rule:Joi.number().integer().optional().allow(""),msg:"Has to be an integer."}):"number"===a.type?g.push({rule:Joi.number().optional().allow(""),msg:"Has to be a number."}):("password"===a.type&&(e="createPasswordEntry"),g.push({rule:Joi.string().optional().allow(""),msg:"Has to be a string."})),void 0===a["default"]&&a.required!==!1&&(f=!0,g.unshift({rule:Joi.any().required(),msg:"This field is required."})),window.modalView[e]("app_config_"+b,b,d,a.description,c,f,g)}),b=[window.modalView.createSuccessButton("Apply",this.applyConfig.bind(this))];window.modalView.show("modalTable.ejs","Configuration",b,a,null,null,null,null,null,"settings"),$(".modal-footer").prepend($("#hidden_buttons").html())},applyDeps:function(){var a={};_.each(this.model.get("deps"),function(b,c){var d=$("#app_deps_"+c);a[c]=window.arangoHelper.escapeHtml(d.val())}),this.model.setDependencies(a,function(){window.modalView.hide(),this.updateDeps()}.bind(this))},showDepsDialog:function(){if(!_.isEmpty(this.model.get("deps"))){var a=_.map(this.model.get("deps"),function(a,b){var c=void 0===a.current?"":String(a.current),d="",e=a.definition.name;"*"!==a.definition.version&&(e+="@"+a.definition.version);var f=[{rule:Joi.string().optional().allow(""),msg:"Has to be a string."}];return a.definition.required&&f.push({rule:Joi.string().required(),msg:"This value is required."}),window.modalView.createTextEntry("app_deps_"+b,a.title,c,e,d,a.definition.required,f)}),b=[window.modalView.createSuccessButton("Apply",this.applyDeps.bind(this))];window.modalView.show("modalTable.ejs","Dependencies",b,a)}},showDropdown:function(){_.isEmpty(this.model.get("scripts"))||$("#scripts_dropdown").show(200)},hideDropdown:function(){$("#scripts_dropdown").hide()}})}(),function(){"use strict";window.ApplicationsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("applicationsView.ejs"),events:{"click #addApp":"createInstallModal","click #foxxToggle":"slideToggle","click #checkDevel":"toggleDevel","click #checkProduction":"toggleProduction","click #checkSystem":"toggleSystem"},fixCheckboxes:function(){this._showDevel?$("#checkDevel").attr("checked","checked"):$("#checkDevel").removeAttr("checked"),this._showSystem?$("#checkSystem").attr("checked","checked"):$("#checkSystem").removeAttr("checked"),this._showProd?$("#checkProduction").attr("checked","checked"):$("#checkProduction").removeAttr("checked"),$("#checkDevel").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),$("#checkSystem").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),$("#checkProduction").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),arangoHelper.setCheckboxStatus("#foxxDropdown")},toggleDevel:function(){var a=this;this._showDevel=!this._showDevel,_.each(this._installedSubViews,function(b){b.toggle("devel",a._showDevel)}),this.fixCheckboxes()},toggleProduction:function(){var a=this;this._showProd=!this._showProd,_.each(this._installedSubViews,function(b){b.toggle("production",a._showProd)}),this.fixCheckboxes()},toggleSystem:function(){this._showSystem=!this._showSystem;var a=this;_.each(this._installedSubViews,function(b){b.toggle("system",a._showSystem)}),this.fixCheckboxes()},reload:function(){var a=this;_.each(this._installedSubViews,function(a){a.undelegateEvents()}),this.collection.fetch({success:function(){a.createSubViews(),a.render()}})},createSubViews:function(){var a=this;this._installedSubViews={},a.collection.each(function(b){var c=new window.FoxxActiveView({model:b,appsView:a});a._installedSubViews[b.get("mount")]=c})},initialize:function(){this._installedSubViews={},this._showDevel=!0,this._showProd=!0,this._showSystem=!1},slideToggle:function(){$("#foxxToggle").toggleClass("activated"),$("#foxxDropdownOut").slideToggle(200)},createInstallModal:function(a){a.preventDefault(),window.foxxInstallView.install(this.reload.bind(this))},render:function(){this.collection.sort(),$(this.el).html(this.template.render({})),_.each(this._installedSubViews,function(a){$("#installedList").append(a.render())}),this.delegateEvents(),$("#checkDevel").attr("checked",this._showDevel),$("#checkProduction").attr("checked",this._showProd),$("#checkSystem").attr("checked",this._showSystem),arangoHelper.setCheckboxStatus("#foxxDropdown");var a=this;return _.each(this._installedSubViews,function(b){b.toggle("devel",a._showDevel),b.toggle("system",a._showSystem)}),arangoHelper.fixTooltips("icon_arangodb","left"),this}})}(),function(){"use strict";window.ClusterView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("clusterView.ejs"),events:{},statsEnabled:!1,historyInit:!1,initDone:!1,interval:5e3,maxValues:100,knownServers:[],chartData:{},charts:{},nvcharts:[],startHistory:{},startHistoryAccumulated:{},initialize:function(a){var b=this;window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),window.setInterval(function(){if("#cluster"===window.location.hash||""===window.location.hash||"#"===window.location.hash){var a=function(a){b.rerenderValues(a),b.rerenderGraphs(a)};b.getCoordStatHistory(a)}},this.interval))},render:function(){this.$el.html(this.template.render({})),this.initDone||(void 0!==this.coordinators.first()?this.getServerStatistics():this.waitForCoordinators(),this.initDone=!0),this.initGraphs()},waitForCoordinators:function(){var a=this;window.setTimeout(function(){a.coordinators?a.getServerStatistics():a.waitForCoordinators()},500)},updateServerTime:function(){this.serverTime=(new Date).getTime()},getServerStatistics:function(){var a=this;this.data=void 0;var b=this.coordinators.first();this.statCollectCoord=new window.ClusterStatisticsCollection([],{host:b.get("address")}),this.statCollectDBS=new window.ClusterStatisticsCollection([],{host:b.get("address")});var c=[];_.each(this.dbServers,function(a){a.each(function(a){c.push(a)})}),_.each(c,function(c){if("ok"===c.get("status")){-1===a.knownServers.indexOf(c.id)&&a.knownServers.push(c.id);var d=new window.Statistics({name:c.id});d.url=b.get("protocol")+"://"+b.get("address")+"/_admin/clusterStatistics?DBserver="+c.get("name"),a.statCollectDBS.add(d)}}),this.coordinators.forEach(function(b){if("ok"===b.get("status")){-1===a.knownServers.indexOf(b.id)&&a.knownServers.push(b.id);var c=new window.Statistics({name:b.id});c.url=b.get("protocol")+"://"+b.get("address")+"/_admin/statistics",a.statCollectCoord.add(c)}});var d=function(b){a.rerenderValues(b),a.rerenderGraphs(b)};a.getCoordStatHistory(d),a.renderNodes()},rerenderValues:function(a){var b=this;b.renderNodes(),this.renderValue("#clusterConnections",Math.round(a.clientConnectionsCurrent)),this.renderValue("#clusterConnectionsAvg",Math.round(a.clientConnections15M));var c=a.physicalMemory,d=a.residentSizeCurrent;this.renderValue("#clusterRam",[d,c])},renderValue:function(a,b,c,d){if("number"==typeof b)$(a).html(b);else if($.isArray(b)){var e=b[0],f=b[1],g=1/(f/e)*100;g>90?c=!0:g>70&&90>g&&(d=!0),$(a).html(g.toFixed(1)+" %")}else"string"==typeof b&&$(a).html(b);c?($(a).addClass("negative"),$(a).removeClass("warning"),$(a).removeClass("positive")):d?($(a).addClass("warning"),$(a).removeClass("positive"),$(a).removeClass("negative")):($(a).addClass("positive"),$(a).removeClass("negative"),$(a).removeClass("warning"))},renderNodes:function(){var a=this,b=function(a){var b=0,c=0,d=0,e=0;_.each(a,function(a){"Coordinator"===a.Role?(b++,"GOOD"!==a.Status&&c++):"DBServer"===a.Role&&(d++,"GOOD"!==a.Status&&e++)}),c>0?this.renderValue("#clusterCoordinators",b-c+"/"+b,!0):this.renderValue("#clusterCoordinators",b),e>0?this.renderValue("#clusterDBServers",d-e+"/"+d,!0):this.renderValue("#clusterDBServers",d)}.bind(this);$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a.Health)},error:function(){a.renderValue("#clusterCoordinators","N/A",!0),a.renderValue("#clusterDBServers","N/A",!0)}})},initValues:function(){var a=["#clusterNodes","#clusterRam","#clusterConnections","#clusterConnectionsAvg"];_.each(a,function(a){$(a).html('')})},graphData:{data:{sent:[],received:[]},http:[],average:[]},checkArraySizes:function(){var a=this;_.each(a.chartsOptions,function(b,c){_.each(b.options,function(b,d){b.values.length>a.maxValues-1&&a.chartsOptions[c].options[d].values.shift()})})},formatDataForGraph:function(a){var b=this;b.historyInit?(b.checkArraySizes(),b.chartsOptions[0].options[0].values.push({x:a.times[a.times.length-1],y:a.bytesSentPerSecond[a.bytesSentPerSecond.length-1]}),b.chartsOptions[0].options[1].values.push({x:a.times[a.times.length-1],y:a.bytesReceivedPerSecond[a.bytesReceivedPerSecond.length-1]}),b.chartsOptions[1].options[0].values.push({x:a.times[a.times.length-1],y:b.calcTotalHttp(a.http,a.bytesSentPerSecond.length-1)}),b.chartsOptions[2].options[0].values.push({x:a.times[a.times.length-1],y:a.avgRequestTime[a.bytesSentPerSecond.length-1]/b.coordinators.length})):(_.each(a.times,function(c,d){b.chartsOptions[0].options[0].values.push({x:c,y:a.bytesSentPerSecond[d]}),b.chartsOptions[0].options[1].values.push({x:c,y:a.bytesReceivedPerSecond[d]}),b.chartsOptions[1].options[0].values.push({x:c,y:b.calcTotalHttp(a.http,d)}),b.chartsOptions[2].options[0].values.push({x:c,y:a.avgRequestTime[d]/b.coordinators.length})}),b.historyInit=!0)},chartsOptions:[{id:"#clusterData",type:"bytes",count:2,options:[{area:!0,values:[],key:"Bytes out",color:"rgb(23,190,207)",strokeWidth:2,fillOpacity:.1},{area:!0,values:[],key:"Bytes in",color:"rgb(188, 189, 34)",strokeWidth:2,fillOpacity:.1}]},{id:"#clusterHttp",type:"bytes",options:[{area:!0,values:[],key:"Bytes",color:"rgb(0, 166, 90)",fillOpacity:.1}]},{id:"#clusterAverage",data:[],type:"seconds",options:[{area:!0,values:[],key:"Seconds",color:"rgb(243, 156, 18)",fillOpacity:.1}]}],initGraphs:function(){var a=this,b="No data...";_.each(a.chartsOptions,function(c){nv.addGraph(function(){a.charts[c.id]=nv.models.stackedAreaChart().options({useInteractiveGuideline:!0,showControls:!1,noData:b,duration:0}),a.charts[c.id].xAxis.axisLabel("").tickFormat(function(a){var b=new Date(1e3*a);return(b.getHours()<10?"0":"")+b.getHours()+":"+(b.getMinutes()<10?"0":"")+b.getMinutes()+":"+(b.getSeconds()<10?"0":"")+b.getSeconds()}).staggerLabels(!1),a.charts[c.id].yAxis.axisLabel("").tickFormat(function(a){var b;return"bytes"===c.type?null===a?"N/A":(b=parseFloat(d3.format(".2f")(a)),prettyBytes(b)):"seconds"===c.type?null===a?"N/A":b=parseFloat(d3.format(".3f")(a)):void 0});var d,e=a.returnGraphOptions(c.id);return e.length>0?_.each(e,function(a,b){c.options[b].values=a}):c.options[0].values=[],d=c.options,a.chartData[c.id]=d3.select(c.id).append("svg").datum(d).transition().duration(300).call(a.charts[c.id]).each("start",function(){window.setTimeout(function(){d3.selectAll(c.id+" *").each(function(){this.__transition__&&(this.__transition__.duration=0)})},0)}),nv.utils.windowResize(a.charts[c.id].update),a.nvcharts.push(a.charts[c.id]),a.charts[c.id]})})},returnGraphOptions:function(a){var b=[];return b="#clusterData"===a?[this.chartsOptions[0].options[0].values,this.chartsOptions[0].options[1].values]:"#clusterHttp"===a?[this.chartsOptions[1].options[0].values]:"#clusterAverage"===a?[this.chartsOptions[2].options[0].values]:[]},rerenderGraphs:function(a){if(this.statsEnabled){var b,c,d=this;this.formatDataForGraph(a),_.each(d.chartsOptions,function(a){c=d.returnGraphOptions(a.id),c.length>0?_.each(c,function(b,c){a.options[c].values=b}):a.options[0].values=[],b=a.options,b[0].values.length>0&&d.historyInit&&d.charts[a.id]&&d.charts[a.id].update()})}},calcTotalHttp:function(a,b){var c=0;return _.each(a,function(a){c+=a[b]}),c},getCoordStatHistory:function(a){$.ajax({url:"statistics/coordshort",json:!0}).success(function(b){this.statsEnabled=b.enabled,a(b.data)}.bind(this))}})}(),function(){"use strict";window.CollectionListItemView=Backbone.View.extend({tagName:"div",className:"tile pure-u-1-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 pure-u-xl-1-6",template:templateEngine.createTemplate("collectionsItemView.ejs"),initialize:function(a){this.collectionsView=a.collectionsView},events:{"click .iconSet.icon_arangodb_settings2":"createEditPropertiesModal","click .pull-left":"noop","click .icon_arangodb_settings2":"editProperties","click .spanInfo":"showProperties",click:"selectCollection"},render:function(){return this.model.get("locked")?($(this.el).addClass("locked"),$(this.el).addClass(this.model.get("lockType"))):$(this.el).removeClass("locked"),"loading"!==this.model.get("status")&&"unloading"!==this.model.get("status")||$(this.el).addClass("locked"),$(this.el).html(this.template.render({model:this.model})),$(this.el).attr("id","collection_"+this.model.get("name")),this},editProperties:function(a){return this.model.get("locked")?0:(a.stopPropagation(),void this.createEditPropertiesModal())},showProperties:function(a){return this.model.get("locked")?0:(a.stopPropagation(),void this.createInfoModal())},selectCollection:function(a){return $(a.target).hasClass("disabled")?0:this.model.get("locked")?0:"loading"===this.model.get("status")?0:void("unloaded"===this.model.get("status")?this.loadCollection():window.App.navigate("collection/"+encodeURIComponent(this.model.get("name"))+"/documents/1",{trigger:!0}))},noop:function(a){a.stopPropagation()},unloadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be unloaded."):void 0===a?(this.model.set("status","unloading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","unloaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" unloaded.")}.bind(this);this.model.unloadCollection(a),window.modalView.hide()},loadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be loaded."):void 0===a?(this.model.set("status","loading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","loaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" loaded.")}.bind(this);this.model.loadCollection(a),window.modalView.hide()},truncateCollection:function(){this.model.truncateCollection(),window.modalView.hide()},deleteCollection:function(){this.model.destroy({error:function(){arangoHelper.arangoError("Could not delete collection.")},success:function(){window.modalView.hide()}}),this.collectionsView.render()},saveModifiedCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c;c=b?this.model.get("name"):$("#change-collection-name").val();var d=this.model.get("status");if("loaded"===d){var e;try{e=JSON.parse(1024*$("#change-collection-size").val()*1024)}catch(f){return arangoHelper.arangoError("Please enter a valid number"),0}var g;try{if(g=JSON.parse($("#change-index-buckets").val()),1>g||parseInt(g,10)!==Math.pow(2,Math.log2(g)))throw new Error("invalid indexBuckets value")}catch(f){return arangoHelper.arangoError("Please enter a valid number of index buckets"),0}var h=function(a){a?arangoHelper.arangoError("Collection error: "+a.responseText):(this.collectionsView.render(),window.modalView.hide())}.bind(this),i=function(a){if(a)arangoHelper.arangoError("Collection error: "+a.responseText);else{var b=$("#change-collection-sync").val();this.model.changeCollection(b,e,g,h)}}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,i):i()}else if("unloaded"===d)if(this.model.get("name")!==c){var j=function(a,b){a?arangoHelper.arangoError("Collection error: "+b.responseText):(this.collectionsView.render(),window.modalView.hide())}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,j):j()}else window.modalView.hide()}}.bind(this);window.isCoordinator(a)},createEditPropertiesModal:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c=!1;"loaded"===this.model.get("status")&&(c=!0);var d=[],e=[];b||e.push(window.modalView.createTextEntry("change-collection-name","Name",this.model.get("name"),!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}]));var f=function(){e.push(window.modalView.createReadOnlyEntry("change-collection-id","ID",this.model.get("id"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-type","Type",this.model.get("type"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-status","Status",this.model.get("status"),"")),d.push(window.modalView.createDeleteButton("Delete",this.deleteCollection.bind(this))),d.push(window.modalView.createDeleteButton("Truncate",this.truncateCollection.bind(this))),c?d.push(window.modalView.createNotificationButton("Unload",this.unloadCollection.bind(this))):d.push(window.modalView.createNotificationButton("Load",this.loadCollection.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.saveModifiedCollection.bind(this)));var a=["General","Indices"],b=["modalTable.ejs","indicesView.ejs"];window.modalView.show(b,"Modify Collection",d,e,null,null,this.events,null,a),"loaded"===this.model.get("status")?this.getIndex():$($("#infoTab").children()[1]).remove(); -}.bind(this);if(c){var g=function(a,b){if(a)arangoHelper.arangoError("Collection","Could not fetch properties");else{var c=b.journalSize/1048576,d=b.indexBuckets,g=b.waitForSync;e.push(window.modalView.createTextEntry("change-collection-size","Journal size",c,"The maximal size of a journal or datafile (in MB). Must be at least 1.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),e.push(window.modalView.createTextEntry("change-index-buckets","Index buckets",d,"The number of index buckets for this collection. Must be at least 1 and a power of 2.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[1-9][0-9]*$/),msg:"Must be a number greater than 1 and a power of 2."}])),e.push(window.modalView.createSelectEntry("change-collection-sync","Wait for sync",g,"Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}]))}f()};this.model.getProperties(g)}else f()}}.bind(this);window.isCoordinator(a)},bindIndexEvents:function(){this.unbindIndexEvents();var a=this;$("#indexEditView #addIndex").bind("click",function(){a.toggleNewIndexView(),$("#cancelIndex").unbind("click"),$("#cancelIndex").bind("click",function(){a.toggleNewIndexView()}),$("#createIndex").unbind("click"),$("#createIndex").bind("click",function(){a.createIndex()})}),$("#newIndexType").bind("change",function(){a.selectIndexType()}),$(".deleteIndex").bind("click",function(b){a.prepDeleteIndex(b)}),$("#infoTab a").bind("click",function(a){if($("#indexDeleteModal").remove(),"Indices"!==$(a.currentTarget).html()||$(a.currentTarget).parent().hasClass("active")||($("#newIndexView").hide(),$("#indexEditView").show(),$("#modal-dialog .modal-footer .button-danger").hide(),$("#modal-dialog .modal-footer .button-success").hide(),$("#modal-dialog .modal-footer .button-notification").hide()),"General"===$(a.currentTarget).html()&&!$(a.currentTarget).parent().hasClass("active")){$("#modal-dialog .modal-footer .button-danger").show(),$("#modal-dialog .modal-footer .button-success").show(),$("#modal-dialog .modal-footer .button-notification").show();var b=$(".index-button-bar2")[0];$("#cancelIndex").is(":visible")&&($("#cancelIndex").detach().appendTo(b),$("#createIndex").detach().appendTo(b))}})},unbindIndexEvents:function(){$("#indexEditView #addIndex").unbind("click"),$("#newIndexType").unbind("change"),$("#infoTab a").unbind("click"),$(".deleteIndex").unbind("click")},createInfoModal:function(){var a=function(a,b,c){if(a)arangoHelper.arangoError("Figures","Could not get revision.");else{var d=[],e={figures:c,revision:b,model:this.model};window.modalView.show("modalCollectionInfo.ejs","Collection: "+this.model.get("name"),d,e)}}.bind(this),b=function(b,c){if(b)arangoHelper.arangoError("Figures","Could not get figures.");else{var d=c;this.model.getRevision(a,d)}}.bind(this);this.model.getFigures(b)},resetIndexForms:function(){$("#indexHeader input").val("").prop("checked",!1),$("#newIndexType").val("Geo").prop("selected",!0),this.selectIndexType()},createIndex:function(){var a,b,c,d=this,e=$("#newIndexType").val(),f={};switch(e){case"Geo":a=$("#newGeoFields").val();var g=d.checkboxToValue("#newGeoJson"),h=d.checkboxToValue("#newGeoConstraint"),i=d.checkboxToValue("#newGeoIgnoreNull");f={type:"geo",fields:d.stringToArray(a),geoJson:g,constraint:h,ignoreNull:i};break;case"Hash":a=$("#newHashFields").val(),b=d.checkboxToValue("#newHashUnique"),c=d.checkboxToValue("#newHashSparse"),f={type:"hash",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Fulltext":a=$("#newFulltextFields").val();var j=parseInt($("#newFulltextMinLength").val(),10)||0;f={type:"fulltext",fields:d.stringToArray(a),minLength:j};break;case"Skiplist":a=$("#newSkiplistFields").val(),b=d.checkboxToValue("#newSkiplistUnique"),c=d.checkboxToValue("#newSkiplistSparse"),f={type:"skiplist",fields:d.stringToArray(a),unique:b,sparse:c}}var k=function(a,b){if(a)if(b){var c=JSON.parse(b.responseText);arangoHelper.arangoError("Document error",c.errorMessage)}else arangoHelper.arangoError("Document error","Could not create index.");d.refreshCollectionsView()};window.modalView.hide(),d.model.createIndex(f,k)},lastTarget:null,prepDeleteIndex:function(a){var b=this;this.lastTarget=a,this.lastId=$(this.lastTarget.currentTarget).parent().parent().first().children().first().text(),$("#modal-dialog .modal-footer").after(''),$("#indexConfirmDelete").unbind("click"),$("#indexConfirmDelete").bind("click",function(){$("#indexDeleteModal").remove(),b.deleteIndex()}),$("#indexAbortDelete").unbind("click"),$("#indexAbortDelete").bind("click",function(){$("#indexDeleteModal").remove()})},refreshCollectionsView:function(){window.App.arangoCollectionsStore.fetch({success:function(){window.App.collectionsView.render()}})},deleteIndex:function(){var a=function(a){a?(arangoHelper.arangoError("Could not delete index"),$("tr th:contains('"+this.lastId+"')").parent().children().last().html(''),this.model.set("locked",!1),this.refreshCollectionsView()):a||void 0===a||($("tr th:contains('"+this.lastId+"')").parent().remove(),this.model.set("locked",!1),this.refreshCollectionsView()),this.refreshCollectionsView()}.bind(this);this.model.set("locked",!0),this.model.deleteIndex(this.lastId,a),$("tr th:contains('"+this.lastId+"')").parent().children().last().html('')},selectIndexType:function(){$(".newIndexClass").hide();var a=$("#newIndexType").val();$("#newIndexType"+a).show()},getIndex:function(){var a=function(a,b){a?window.arangoHelper.arangoError("Index",b.errorMessage):this.renderIndex(b)}.bind(this);this.model.getIndex(a)},renderIndex:function(a){this.index=a;var b="collectionInfoTh modal-text";if(this.index){var c="",d="";_.each(this.index.indexes,function(a){d="primary"===a.type||"edge"===a.type?'':'',void 0!==a.fields&&(c=a.fields.join(", "));var e=a.id.indexOf("/"),f=a.id.substr(e+1,a.id.length),g=a.hasOwnProperty("selectivityEstimate")?(100*a.selectivityEstimate).toFixed(2)+"%":"n/a",h=a.hasOwnProperty("sparse")?a.sparse:"n/a";$("#collectionEditIndexTable").append(""+f+""+a.type+""+a.unique+""+h+""+g+""+c+""+d+"")})}this.bindIndexEvents()},toggleNewIndexView:function(){var a=$(".index-button-bar2")[0];$("#indexEditView").is(":visible")?($("#indexEditView").hide(),$("#newIndexView").show(),$("#cancelIndex").detach().appendTo("#modal-dialog .modal-footer"),$("#createIndex").detach().appendTo("#modal-dialog .modal-footer")):($("#indexEditView").show(),$("#newIndexView").hide(),$("#cancelIndex").detach().appendTo(a),$("#createIndex").detach().appendTo(a)),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","right"),this.resetIndexForms()},stringToArray:function(a){var b=[];return a.split(",").forEach(function(a){a=a.replace(/(^\s+|\s+$)/g,""),""!==a&&b.push(a)}),b},checkboxToValue:function(a){return $(a).prop("checked")}})}(),function(){"use strict";window.CollectionsView=Backbone.View.extend({el:"#content",el2:"#collectionsThumbnailsIn",searchTimeout:null,refreshRate:1e4,template:templateEngine.createTemplate("collectionsView.ejs"),refetchCollections:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.checkLockedCollections()}})},checkLockedCollections:function(){var a=function(a,b){var c=this;a?console.log("Could not check locked collections"):(this.collection.each(function(a){a.set("locked",!1)}),_.each(b,function(a){var b=c.collection.findWhere({id:a.collection});b.set("locked",!0),b.set("lockType",a.type),b.set("desc",a.desc)}),this.collection.each(function(a){a.get("locked")||($("#collection_"+a.get("name")).find(".corneredBadge").removeClass("loaded unloaded"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").addClass(a.get("status"))),a.get("locked")||"loading"===a.get("status")?($("#collection_"+a.get("name")).addClass("locked"),a.get("locked")?($("#collection_"+a.get("name")).find(".corneredBadge").removeClass("loaded unloaded"),$("#collection_"+a.get("name")).find(".corneredBadge").addClass("inProgress"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("desc"))):$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status"))):($("#collection_"+a.get("name")).removeClass("locked"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").hasClass("inProgress")&&($("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").removeClass("inProgress"),$("#collection_"+a.get("name")+" .corneredBadge").addClass("loaded")),"unloaded"===a.get("status")&&$("#collection_"+a.get("name")+" .icon_arangodb_info").addClass("disabled"))}))}.bind(this);window.arangoHelper.syncAndReturnUninishedAardvarkJobs("index",a)},initialize:function(){var a=this;window.setInterval(function(){"#collections"===window.location.hash&&window.VISIBLE&&a.refetchCollections()},a.refreshRate)},render:function(){this.checkLockedCollections();var a=!1;$("#collectionsDropdown").is(":visible")&&(a=!0),$(this.el).html(this.template.render({})),this.setFilterValues(),a===!0&&$("#collectionsDropdown2").show();var b=this.collection.searchOptions;this.collection.getFiltered(b).forEach(function(a){$("#collectionsThumbnailsIn",this.el).append(new window.CollectionListItemView({model:a,collectionsView:this}).render().el)},this),"none"===$("#collectionsDropdown2").css("display")?$("#collectionsToggle").removeClass("activated"):$("#collectionsToggle").addClass("activated");var c;arangoHelper.setCheckboxStatus("#collectionsDropdown");try{c=b.searchPhrase.length}catch(d){}return $("#searchInput").val(b.searchPhrase),$("#searchInput").focus(),$("#searchInput")[0].setSelectionRange(c,c),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","left"),this},events:{"click #createCollection":"createCollection","keydown #searchInput":"restrictToSearchPhraseKey","change #searchInput":"restrictToSearchPhrase","click #searchSubmit":"restrictToSearchPhrase","click .checkSystemCollections":"checkSystem","click #checkLoaded":"checkLoaded","click #checkUnloaded":"checkUnloaded","click #checkDocument":"checkDocument","click #checkEdge":"checkEdge","click #sortName":"sortName","click #sortType":"sortType","click #sortOrder":"sortOrder","click #collectionsToggle":"toggleView","click .css-label":"checkBoxes"},updateCollectionsView:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},toggleView:function(){$("#collectionsToggle").toggleClass("activated"),$("#collectionsDropdown2").slideToggle(200)},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},checkSystem:function(){var a=this.collection.searchOptions,b=a.includeSystem;a.includeSystem=$(".checkSystemCollections").is(":checked")===!0,b!==a.includeSystem&&this.render()},checkEdge:function(){var a=this.collection.searchOptions,b=a.includeEdge;a.includeEdge=$("#checkEdge").is(":checked")===!0,b!==a.includeEdge&&this.render()},checkDocument:function(){var a=this.collection.searchOptions,b=a.includeDocument;a.includeDocument=$("#checkDocument").is(":checked")===!0,b!==a.includeDocument&&this.render()},checkLoaded:function(){var a=this.collection.searchOptions,b=a.includeLoaded;a.includeLoaded=$("#checkLoaded").is(":checked")===!0,b!==a.includeLoaded&&this.render()},checkUnloaded:function(){var a=this.collection.searchOptions,b=a.includeUnloaded;a.includeUnloaded=$("#checkUnloaded").is(":checked")===!0,b!==a.includeUnloaded&&this.render()},sortName:function(){var a=this.collection.searchOptions,b=a.sortBy;a.sortBy=$("#sortName").is(":checked")===!0?"name":"type",b!==a.sortBy&&this.render()},sortType:function(){var a=this.collection.searchOptions,b=a.sortBy;a.sortBy=$("#sortType").is(":checked")===!0?"type":"name",b!==a.sortBy&&this.render()},sortOrder:function(){var a=this.collection.searchOptions,b=a.sortOrder;a.sortOrder=$("#sortOrder").is(":checked")===!0?-1:1,b!==a.sortOrder&&this.render()},setFilterValues:function(){var a=this.collection.searchOptions;$("#checkLoaded").attr("checked",a.includeLoaded),$("#checkUnloaded").attr("checked",a.includeUnloaded),$(".checkSystemCollections").attr("checked",a.includeSystem),$("#checkEdge").attr("checked",a.includeEdge),$("#checkDocument").attr("checked",a.includeDocument),$("#sortName").attr("checked","type"!==a.sortBy),$("#sortType").attr("checked","type"===a.sortBy),$("#sortOrder").attr("checked",1!==a.sortOrder)},search:function(){var a=this.collection.searchOptions,b=$("#searchInput").val();b!==a.searchPhrase&&(a.searchPhrase=b,this.render())},resetSearch:function(){this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null);var a=this.collection.searchOptions;a.searchPhrase=null},restrictToSearchPhraseKey:function(){var a=this;this.resetSearch(),a.searchTimeout=setTimeout(function(){a.search()},200)},restrictToSearchPhrase:function(){this.resetSearch(),this.search()},createCollection:function(a){a.preventDefault(),this.createNewCollectionModal()},submitCreateCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("DB","Could not check coordinator state");else{var c=$("#new-collection-name").val(),d=$("#new-collection-size").val(),e=$("#new-replication-factor").val(),f=$("#new-collection-type").val(),g=$("#new-collection-sync").val(),h=1,i=[];if(""===e&&(e=1),b){if(h=$("#new-collection-shards").val(),""===h&&(h=1),h=parseInt(h,10),1>h)return arangoHelper.arangoError("Number of shards has to be an integer value greater or equal 1"),0;i=_.pluck($("#new-collection-shardBy").select2("data"),"text"),0===i.length&&i.push("_key")}if("_"===c.substr(0,1))return arangoHelper.arangoError('No "_" allowed as first character!'),0;var j=!1,k="true"===g;if(d>0)try{d=1024*JSON.parse(d)*1024}catch(l){return arangoHelper.arangoError("Please enter a valid number"),0}if(""===c)return arangoHelper.arangoError("No collection name entered!"),0;var m=function(a,b){if(a)try{b=JSON.parse(b.responseText),arangoHelper.arangoError("Error",b.errorMessage)}catch(c){}else this.updateCollectionsView();window.modalView.hide()}.bind(this);this.collection.newCollection({collName:c,wfs:k,isSystem:j,collSize:d,replicationFactor:e,collType:f,shards:h,shardBy:i},m)}}.bind(this);window.isCoordinator(a)},createNewCollectionModal:function(){var a=function(a,b){if(a)arangoHelper.arangoError("DB","Could not check coordinator state");else{var c=[],d=[],e={},f=[];d.push(window.modalView.createTextEntry("new-collection-name","Name","",!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}])),d.push(window.modalView.createSelectEntry("new-collection-type","Type","","The type of the collection to create.",[{value:2,label:"Document"},{value:3,label:"Edge"}])),b&&(d.push(window.modalView.createTextEntry("new-collection-shards","Shards","","The number of shards to create. You cannot change this afterwards. Recommended: DBServers squared","",!0)),d.push(window.modalView.createSelect2Entry("new-collection-shardBy","shardBy","","The keys used to distribute documents on shards. Type the key and press return to add it.","_key",!1))),c.push(window.modalView.createSuccessButton("Save",this.submitCreateCollection.bind(this))),f.push(window.modalView.createTextEntry("new-collection-size","Journal size","","The maximal size of a journal or datafile (in MB). Must be at least 1.","",!1,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),window.App.isCluster&&f.push(window.modalView.createTextEntry("new-replication-factor","Replication factor","","Numeric value. Must be at least 1. Description: TODO","",!1,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),f.push(window.modalView.createSelectEntry("new-collection-sync","Wait for sync","","Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}])),e.header="Advanced",e.content=f,window.modalView.show("modalTable.ejs","New Collection",c,d,e),$("#s2id_new-collection-shardBy .select2-search-field input").on("focusout",function(a){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||window.setTimeout(function(){$(a.currentTarget).parent().parent().parent().select2("close")},200))})}}.bind(this);window.isCoordinator(a)}})}(),function(){"use strict";function a(a,b){return void 0!==a&&null!==a||(a=0),a.toFixed(b)}window.DashboardView=Backbone.View.extend({el:"#content",interval:1e4,defaultTimeFrame:12e5,defaultDetailFrame:1728e5,history:{},graphs:{},events:{"click .subViewNavbar .subMenuEntry":"toggleViews"},tendencies:{asyncPerSecondCurrent:["asyncPerSecondCurrent","asyncPerSecondPercentChange"],syncPerSecondCurrent:["syncPerSecondCurrent","syncPerSecondPercentChange"],clientConnectionsCurrent:["clientConnectionsCurrent","clientConnectionsPercentChange"],clientConnectionsAverage:["clientConnections15M","clientConnections15MPercentChange"],numberOfThreadsCurrent:["numberOfThreadsCurrent","numberOfThreadsPercentChange"],numberOfThreadsAverage:["numberOfThreads15M","numberOfThreads15MPercentChange"],virtualSizeCurrent:["virtualSizeCurrent","virtualSizePercentChange"],virtualSizeAverage:["virtualSize15M","virtualSize15MPercentChange"]},barCharts:{totalTimeDistribution:["queueTimeDistributionPercent","requestTimeDistributionPercent"],dataTransferDistribution:["bytesSentDistributionPercent","bytesReceivedDistributionPercent"]},barChartsElementNames:{queueTimeDistributionPercent:"Queue",requestTimeDistributionPercent:"Computation",bytesSentDistributionPercent:"Bytes sent",bytesReceivedDistributionPercent:"Bytes received"},getDetailFigure:function(a){var b=$(a.currentTarget).attr("id").replace(/ChartButton/g,"");return b},showDetail:function(a){var b,c=this,d=this.getDetailFigure(a);b=this.dygraphConfig.getDetailChartConfig(d),this.getHistoryStatistics(d),this.detailGraphFigure=d,window.modalView.hideFooter=!0,window.modalView.hide(),window.modalView.show("modalGraph.ejs",b.header,void 0,void 0,void 0,void 0,this.events),window.modalView.hideFooter=!1,$("#modal-dialog").on("hidden",function(){c.hidden()}),$("#modal-dialog").toggleClass("modal-chart-detail",!0),b.height=.7*$(window).height(),b.width=$(".modal-inner-detail").width(),b.labelsDiv=$(b.labelsDiv)[0],this.detailGraph=new Dygraph(document.getElementById("lineChartDetail"),this.history[this.server][d],b)},hidden:function(){this.detailGraph.destroy(),delete this.detailGraph,delete this.detailGraphFigure},getCurrentSize:function(a){"#"!==a.substr(0,1)&&(a="#"+a);var b,c;return $(a).attr("style",""),b=$(a).height(),c=$(a).width(),{height:b,width:c}},prepareDygraphs:function(){var a,b=this;this.dygraphConfig.getDashBoardFigures().forEach(function(c){a=b.dygraphConfig.getDefaultConfig(c);var d=b.getCurrentSize(a.div);a.height=d.height,a.width=d.width,b.graphs[c]=new Dygraph(document.getElementById(a.div),b.history[b.server][c]||[],a)})},initialize:function(a){this.options=a,this.dygraphConfig=a.dygraphConfig,this.d3NotInitialized=!0,this.events["click .dashboard-sub-bar-menu-sign"]=this.showDetail.bind(this),this.events["mousedown .dygraph-rangesel-zoomhandle"]=this.stopUpdating.bind(this),this.events["mouseup .dygraph-rangesel-zoomhandle"]=this.startUpdating.bind(this),this.serverInfo=a.serverToShow,this.serverInfo?this.server=this.serverInfo.target:this.server="-local-",this.history[this.server]={}},toggleViews:function(a){var b=a.currentTarget.id.split("-")[0],c=this,d=["replication","requests","system"];_.each(d,function(a){b!==a?$("#"+a).hide():($("#"+a).show(),c.resize(),$(window).resize())}),$(".subMenuEntries").children().removeClass("active"),$("#"+b+"-statistics").addClass("active"),window.setTimeout(function(){c.resize(),$(window).resize()},200)},updateCharts:function(){var a=this;return this.detailGraph?void this.updateLineChart(this.detailGraphFigure,!0):(this.prepareD3Charts(this.isUpdating),this.prepareResidentSize(this.isUpdating),this.updateTendencies(),void Object.keys(this.graphs).forEach(function(b){a.updateLineChart(b,!1)}))},updateTendencies:function(){var a=this,b=this.tendencies,c="";Object.keys(b).forEach(function(b){var d="",e=0;a.history.hasOwnProperty(a.server)&&a.history[a.server].hasOwnProperty(b)&&(e=a.history[a.server][b][1]),0>e?c="#d05448":(c="#77DB99",d="+"),a.history.hasOwnProperty(a.server)&&a.history[a.server].hasOwnProperty(b)?$("#"+b).html(a.history[a.server][b][0]+'
    '+d+e+"%"):$("#"+b).html('

    data not ready yet

    ')})},updateDateWindow:function(a,b){var c,d,e=(new Date).getTime();return b&&a.dateWindow_?(c=a.dateWindow_[0],d=e-a.dateWindow_[1]-5*this.interval>0?a.dateWindow_[1]:e,[c,d]):[e-this.defaultTimeFrame,e]},updateLineChart:function(a,b){var c=b?this.detailGraph:this.graphs[a],d={file:this.history[this.server][a],dateWindow:this.updateDateWindow(c,b)},e=0,f=[];_.each(d.file,function(a){var b=a[0].getSeconds()-a[0].getSeconds()%10;d.file[e][0].setSeconds(b),f.push(d.file[e][0]),e++});for(var g=new Date(Math.max.apply(null,f)),h=new Date(Math.min.apply(null,f)),i=new Date(h.getTime()),j=[],k=[];g>i;)i=new Date(i.setSeconds(i.getSeconds()+10)),k.push(i);_.each(k,function(a){var b=!1;_.each(d.file,function(c){Math.floor(a.getTime()/1e3)===Math.floor(c[0].getTime()/1e3)&&(b=!0)}),b===!1&&a1)){var f=0,g=0;9===c.length&&(f+=c[1],f+=c[6],f+=c[7],f+=c[8],g+=c[2],g+=c[3],g+=c[4],g+=c[5],c=[c[0],f,g]),d.history[d.server][e].unshift(c)}})},cutOffHistory:function(a,b){for(var c=this,d=c.history[c.server][a];0!==d.length&&!(d[d.length-1][0]>=b);)d.pop()},cutOffDygraphHistory:function(a){var b=this,c=new Date(a);this.dygraphConfig.getDashBoardFigures(!0).forEach(function(a){b.dygraphConfig.mapStatToFigure[a]&&b.history[b.server][a]&&b.cutOffHistory(a,c)})},mergeHistory:function(b){var c,d=this;for(c=0;c=0;--c)d.values.push({label:this.getLabel(b[a[0]].cuts,c),value:b[a[0]].values[c]}),e.values.push({label:this.getLabel(b[a[1]].cuts,c),value:b[a[1]].values[c]});return[d,e]},getLabel:function(a,b){return a[b]?0===b?"0 - "+a[b]:a[b-1]+" - "+a[b]:">"+a[b-1]},renderReplicationStatistics:function(a){$("#repl-numbers table tr:nth-child(1) > td:nth-child(2)").html(a.state.totalEvents),$("#repl-numbers table tr:nth-child(2) > td:nth-child(2)").html(a.state.totalRequests),$("#repl-numbers table tr:nth-child(3) > td:nth-child(2)").html(a.state.totalFailedConnects),a.state.lastAppliedContinuousTick?$("#repl-ticks table tr:nth-child(1) > td:nth-child(2)").html(a.state.lastAppliedContinuousTick):$("#repl-ticks table tr:nth-child(1) > td:nth-child(2)").html("no data available").addClass("no-data"),a.state.lastProcessedContinuousTick?$("#repl-ticks table tr:nth-child(2) > td:nth-child(2)").html(a.state.lastProcessedContinuousTick):$("#repl-ticks table tr:nth-child(2) > td:nth-child(2)").html("no data available").addClass("no-data"),a.state.lastAvailableContinuousTick?$("#repl-ticks table tr:nth-child(3) > td:nth-child(2)").html(a.state.lastAvailableContinuousTick):$("#repl-ticks table tr:nth-child(3) > td:nth-child(2)").html("no data available").addClass("no-data"),$("#repl-progress table tr:nth-child(1) > td:nth-child(2)").html(a.state.progress.message),$("#repl-progress table tr:nth-child(2) > td:nth-child(2)").html(a.state.progress.time),$("#repl-progress table tr:nth-child(3) > td:nth-child(2)").html(a.state.progress.failedConnects)},getReplicationStatistics:function(){var a=this;$.ajax(arangoHelper.databaseUrl("/_api/replication/applier-state"),{async:!0}).done(function(b){if(b.hasOwnProperty("state")){var c;c=b.state.running?"active":"inactive",c=''+c+"",$("#replication-chart .dashboard-sub-bar").html("Replication "+c),a.renderReplicationStatistics(b)}})},getStatistics:function(a,b){var c=this,d=arangoHelper.databaseUrl("/_admin/aardvark/statistics/short","_system"),e="?start=";e+=c.nextStart?c.nextStart:((new Date).getTime()-c.defaultTimeFrame)/1e3,"-local-"!==c.server&&(e+="&type=short&DBserver="+c.serverInfo.target,c.history.hasOwnProperty(c.server)||(c.history[c.server]={})),$.ajax(d+e,{async:!0,xhrFields:{withCredentials:!0},crossDomain:!0}).done(function(d){d.times.length>0&&(c.isUpdating=!0,c.mergeHistory(d)),c.isUpdating!==!1&&(a&&a(d.enabled,b),c.updateCharts())}).error(function(a){console.log("stat fetch req error:"+a)}),this.getReplicationStatistics()},getHistoryStatistics:function(a){var b=this,c="statistics/long",d="?filter="+this.dygraphConfig.mapStatToFigure[a].join();"-local-"!==b.server&&(c=b.server.endpoint+arangoHelper.databaseUrl("/_admin/aardvark/statistics/cluster"),d+="&type=long&DBserver="+b.server.target,b.history.hasOwnProperty(b.server)||(b.history[b.server]={}));var e=window.location.href.split("/"),f=e[0]+"//"+e[2]+"/"+e[3]+"/_system/"+e[5]+"/"+e[6]+"/";$.ajax(f+c+d,{async:!0}).done(function(c){var d;for(b.history[b.server][a]=[],d=0;d data not ready yet

    '),$("#totalTimeDistribution").prepend('

    data not ready yet

    '),$(".dashboard-bar-chart-title").append('

    data not ready yet

    '))},removeEmptyDataLabels:function(){$(".dataNotReadyYet").remove()},prepareResidentSize:function(b){var c=this,d=this.getCurrentSize("#residentSizeChartContainer"),e=c.history[c.server].residentSizeCurrent/1024/1024,f="";f=1025>e?a(e,2)+" MB":a(e/1024,2)+" GB";var g=a(100*c.history[c.server].residentSizePercent,2),h=[a(c.history[c.server].physicalMemory/1024/1024/1024,0)+" GB"];return void 0===c.history[c.server].residentSizeChart?void this.addEmptyDataLabels():(this.removeEmptyDataLabels(),void nv.addGraph(function(){var a=nv.models.multiBarHorizontalChart().x(function(a){return a.label}).y(function(a){return a.value}).width(d.width).height(d.height).margin({top:($("residentSizeChartContainer").outerHeight()-$("residentSizeChartContainer").height())/2,right:1,bottom:($("residentSizeChartContainer").outerHeight()-$("residentSizeChartContainer").height())/2,left:1}).showValues(!1).showYAxis(!1).showXAxis(!1).showLegend(!1).showControls(!1).stacked(!0);return a.yAxis.tickFormat(function(a){return a+"%"}).showMaxMin(!1),a.xAxis.showMaxMin(!1),d3.select("#residentSizeChart svg").datum(c.history[c.server].residentSizeChart).call(a),d3.select("#residentSizeChart svg").select(".nv-zeroLine").remove(),b&&(d3.select("#residentSizeChart svg").select("#total").remove(),d3.select("#residentSizeChart svg").select("#percentage").remove()),d3.select(".dashboard-bar-chart-title .percentage").html(f+" ("+g+" %)"),d3.select(".dashboard-bar-chart-title .absolut").html(h[0]),nv.utils.windowResize(a.update),a},function(){d3.selectAll("#residentSizeChart .nv-bar").on("click",function(){})}))},prepareD3Charts:function(b){var c=this,d={totalTimeDistribution:["queueTimeDistributionPercent","requestTimeDistributionPercent"],dataTransferDistribution:["bytesSentDistributionPercent","bytesReceivedDistributionPercent"]};this.d3NotInitialized&&(b=!1,this.d3NotInitialized=!1),_.each(Object.keys(d),function(b){var d=c.getCurrentSize("#"+b+"Container .dashboard-interior-chart"),e="#"+b+"Container svg";return void 0===c.history[c.server].residentSizeChart?void c.addEmptyDataLabels():(c.removeEmptyDataLabels(),void nv.addGraph(function(){var f=[0,.25,.5,.75,1],g=75,h=23,i=6;d.width<219?(f=[0,.5,1],g=72,h=21,i=5):d.width<299?(f=[0,.3334,.6667,1],g=77):d.width<379?g=87:d.width<459?g=95:d.width<539?g=100:d.width<619&&(g=105);var j=nv.models.multiBarHorizontalChart().x(function(a){return a.label}).y(function(a){return a.value}).width(d.width).height(d.height).margin({top:5,right:20,bottom:h,left:g}).showValues(!1).showYAxis(!0).showXAxis(!0).showLegend(!1).showControls(!1).forceY([0,1]);return j.yAxis.showMaxMin(!1),d3.select(".nv-y.nv-axis").selectAll("text").attr("transform","translate (0, "+i+")"),j.yAxis.tickValues(f).tickFormat(function(b){return a(100*b*100/100,0)+"%"}),d3.select(e).datum(c.history[c.server][b]).call(j),nv.utils.windowResize(j.update),j},function(){d3.selectAll(e+" .nv-bar").on("click",function(){})}))})},stopUpdating:function(){this.isUpdating=!1},startUpdating:function(){var a=this;a.timer||(a.timer=window.setInterval(function(){window.App.isCluster?window.location.hash.indexOf(a.serverInfo.target)>-1&&a.getStatistics():a.getStatistics()},a.interval))},resize:function(){if(this.isUpdating){var a,b=this;_.each(this.graphs,function(c){a=b.getCurrentSize(c.maindiv_.id),c.resize(a.width,a.height); -}),this.detailGraph&&(a=this.getCurrentSize(this.detailGraph.maindiv_.id),this.detailGraph.resize(a.width,a.height)),this.prepareD3Charts(!0),this.prepareResidentSize(!0)}},template:templateEngine.createTemplate("dashboardView.ejs"),render:function(a){var b=function(a,b){return b||$(this.el).html(this.template.render()),a&&"_system"===frontendConfig.db?(this.prepareDygraphs(),this.isUpdating&&(this.prepareD3Charts(),this.prepareResidentSize(),this.updateTendencies(),$(window).trigger("resize")),this.startUpdating(),void $(window).resize()):($(this.el).html(""),void(this.server?$(this.el).append('
    Server statistics ('+this.server+") are disabled.
    "):$(this.el).append('
    Server statistics are disabled.
    ')))}.bind(this),c=function(){$(this.el).html(""),$(".contentDiv").remove(),$(".headerBar").remove(),$(".dashboard-headerbar").remove(),$(".dashboard-row").remove(),$(this.el).append('
    You do not have permission to view this page.
    '),$(this.el).append("
    You can switch to '_system' to see the dashboard.
    ")}.bind(this);if("_system"!==frontendConfig.db)return void c();var d=function(d,e){d||(e?this.getStatistics(b,a):c())}.bind(this);void 0===window.App.currentDB.get("name")?window.setTimeout(function(){return"_system"!==window.App.currentDB.get("name")?void c():void this.options.database.hasSystemAccess(d)}.bind(this),300):this.options.database.hasSystemAccess(d)}})}(),function(){"use strict";window.DatabaseView=Backbone.View.extend({users:null,el:"#content",template:templateEngine.createTemplate("databaseView.ejs"),dropdownVisible:!1,currentDB:"",events:{"click #createDatabase":"createDatabase","click #submitCreateDatabase":"submitCreateDatabase","click .editDatabase":"editDatabase","click #userManagementView .icon":"editDatabase","click #selectDatabase":"updateDatabase","click #submitDeleteDatabase":"submitDeleteDatabase","click .contentRowInactive a":"changeDatabase","keyup #databaseSearchInput":"search","click #databaseSearchSubmit":"search","click #databaseToggle":"toggleSettingsDropdown","click .css-label":"checkBoxes","click #dbSortDesc":"sorting"},sorting:function(){$("#dbSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#databaseDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},initialize:function(){this.collection.fetch({async:!0,cache:!1})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},render:function(){var a=function(a,b){a?arangoHelper.arangoError("DB","Could not get current db properties"):(this.currentDB=b,this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:"",currentDB:this.currentDB})),this.dropdownVisible===!0&&($("#dbSortDesc").attr("checked",this.collection.sortOptions.desc),$("#databaseToggle").toggleClass("activated"),$("#databaseDropdown2").show()),arangoHelper.setCheckboxStatus("#databaseDropdown"),this.replaceSVGs())}.bind(this);return this.collection.getCurrentDatabase(a),this},toggleSettingsDropdown:function(){$("#dbSortDesc").attr("checked",this.collection.sortOptions.desc),$("#databaseToggle").toggleClass("activated"),$("#databaseDropdown2").slideToggle(200)},selectedDatabase:function(){return $("#selectDatabases").val()},handleError:function(a,b,c){return 409===a?void arangoHelper.arangoError("DB","Database "+c+" already exists."):400===a?void arangoHelper.arangoError("DB","Invalid Parameters"):403===a?void arangoHelper.arangoError("DB","Insufficent rights. Execute this from _system database"):void 0},validateDatabaseInfo:function(a,b){return""===b?(arangoHelper.arangoError("DB","You have to define an owner for the new database"),!1):""===a?(arangoHelper.arangoError("DB","You have to define a name for the new database"),!1):0===a.indexOf("_")?(arangoHelper.arangoError("DB ","Databasename should not start with _"),!1):a.match(/^[a-zA-Z][a-zA-Z0-9_\-]*$/)?!0:(arangoHelper.arangoError("DB","Databasename may only contain numbers, letters, _ and -"),!1)},createDatabase:function(a){a.preventDefault(),this.createAddDatabaseModal()},switchDatabase:function(a){if(!$(a.target).parent().hasClass("iconSet")){var b=$(a.currentTarget).find("h5").text();if(""!==b){var c=this.collection.createDatabaseURL(b);window.location.replace(c)}}},submitCreateDatabase:function(){var a=this,b=$("#newDatabaseName").val(),c=$("#newUser").val(),d={name:b};this.collection.create(d,{error:function(c,d){a.handleError(d.status,d.statusText,b)},success:function(d){"root"!==c&&$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(c)+"/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})}),$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/root/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})}),"#databases"===window.location.hash&&a.updateDatabases(),arangoHelper.arangoNotification("Database "+d.get("name")+" created.")}}),arangoHelper.arangoNotification("Database creation in progress."),window.modalView.hide()},submitDeleteDatabase:function(a){var b=this.collection.where({name:a});b[0].destroy({wait:!0,url:arangoHelper.databaseUrl("/_api/database/"+a)}),this.updateDatabases(),window.App.naviView.dbSelectionView.render($("#dbSelect")),window.modalView.hide()},changeDatabase:function(a){var b=$(a.currentTarget).attr("id"),c=this.collection.createDatabaseURL(b);window.location.replace(c)},updateDatabases:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render(),window.App.handleSelectDatabase()}})},editDatabase:function(a){var b=this.evaluateDatabaseName($(a.currentTarget).attr("id"),"_edit-database"),c=!0;b===this.currentDB&&(c=!1),this.createEditDatabaseModal(b,c)},search:function(){var a,b,c,d;a=$("#databaseSearchInput"),b=$("#databaseSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("name").indexOf(b)}),$(this.el).html(this.template.render({collection:d,searchString:b,currentDB:this.currentDB})),this.replaceSVGs(),a=$("#databaseSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},replaceSVGs:function(){$(".svgToReplace").each(function(){var a=$(this),b=a.attr("id"),c=a.attr("src");$.get(c,function(c){var d=$(c).find("svg");d.attr("id",b).attr("class","tile-icon-svg").removeAttr("xmlns:a"),a.replaceWith(d)},"xml")})},evaluateDatabaseName:function(a,b){var c=a.lastIndexOf(b);return a.substring(0,c)},createEditDatabaseModal:function(a,b){var c=[],d=[];d.push(window.modalView.createReadOnlyEntry("id_name","Name",a,"")),b?c.push(window.modalView.createDeleteButton("Delete",this.submitDeleteDatabase.bind(this,a))):c.push(window.modalView.createDisabledButton("Delete")),window.modalView.show("modalTable.ejs","Delete database",c,d)},createAddDatabaseModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("newDatabaseName","Name","",!1,"Database Name",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Database name must start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No database name given."}]));var c=[];window.App.userCollection.each(function(a){c.push({value:a.get("user"),label:a.get("user")})}),b.push(window.modalView.createSelectEntry("newUser","Username",null!==this.users?this.users.whoAmI():"root","Please define the owner of this database. This will be the only user having initial access to this database if authentication is turned on. Please note that if you specify a username different to your account you will not be able to access the database with your account after having creating it. Specifying a username is mandatory even with authentication turned off. If there is a failure you will be informed.",c)),a.push(window.modalView.createSuccessButton("Create",this.submitCreateDatabase.bind(this))),window.modalView.show("modalTable.ejs","Create Database",a,b),$("#useDefaultPassword").change(function(){"true"===$("#useDefaultPassword").val()?$("#row_newPassword").hide():$("#row_newPassword").show()}),$("#row_newPassword").hide()}})}(),function(){"use strict";window.DBSelectionView=Backbone.View.extend({template:templateEngine.createTemplate("dbSelectionView.ejs"),events:{"click .dbSelectionLink":"changeDatabase"},initialize:function(a){this.current=a.current},changeDatabase:function(a){var b=$(a.currentTarget).closest(".dbSelectionLink.tab").attr("id"),c=this.collection.createDatabaseURL(b);window.location.replace(c)},render:function(a){var b=function(b,c){b?arangoHelper.arangoError("DB","Could not fetch databases"):(this.$el=a,this.$el.html(this.template.render({list:c,current:this.current.get("name")})),this.delegateEvents())}.bind(this);return this.collection.getDatabasesForUser(b),this.el}})}(),function(){"use strict";window.DocumentsView=window.PaginationView.extend({filters:{0:!0},filterId:0,paginationDiv:"#documentsToolbarF",idPrefix:"documents",addDocumentSwitch:!0,activeFilter:!1,lastCollectionName:void 0,restoredFilters:[],editMode:!1,allowUpload:!1,el:"#content",table:"#documentsTableID",template:templateEngine.createTemplate("documentsView.ejs"),collectionContext:{prev:null,next:null},editButtons:["#deleteSelected","#moveSelected"],initialize:function(a){this.documentStore=a.documentStore,this.collectionsStore=a.collectionsStore,this.tableView=new window.TableView({el:this.table,collection:this.collection}),this.tableView.setRowClick(this.clicked.bind(this)),this.tableView.setRemoveClick(this.remove.bind(this))},resize:function(){$("#docPureTable").height($(".centralRow").height()-210),$("#docPureTable .pure-table-body").css("max-height",$("#docPureTable").height()-47)},setCollectionId:function(a,b){this.collection.setCollection(a),this.collection.setPage(b),this.page=b;var c=function(b,c){b?arangoHelper.arangoError("Error","Could not get collection properties."):(this.type=c,this.collection.getDocuments(this.getDocsCallback.bind(this)),this.collectionModel=this.collectionsStore.get(a))}.bind(this);arangoHelper.collectionApiType(a,null,c)},getDocsCallback:function(a){$("#documents_last").css("visibility","hidden"),$("#documents_first").css("visibility","hidden"),a?(window.progressView.hide(),arangoHelper.arangoError("Document error","Could not fetch requested documents.")):a&&void 0===a||(window.progressView.hide(),this.drawTable(),this.renderPaginationElements())},events:{"click #collectionPrev":"prevCollection","click #collectionNext":"nextCollection","click #filterCollection":"filterCollection","click #markDocuments":"editDocuments","click #importCollection":"importCollection","click #exportCollection":"exportCollection","click #filterSend":"sendFilter","click #addFilterItem":"addFilterItem","click .removeFilterItem":"removeFilterItem","click #deleteSelected":"deleteSelectedDocs","click #moveSelected":"moveSelectedDocs","click #addDocumentButton":"addDocumentModal","click #documents_first":"firstDocuments","click #documents_last":"lastDocuments","click #documents_prev":"prevDocuments","click #documents_next":"nextDocuments","click #confirmDeleteBtn":"confirmDelete","click .key":"nop",keyup:"returnPressedHandler","keydown .queryline input":"filterValueKeydown","click #importModal":"showImportModal","click #resetView":"resetView","click #confirmDocImport":"startUpload","click #exportDocuments":"startDownload","change #documentSize":"setPagesize","change #docsSort":"setSorting"},showSpinner:function(){$("#uploadIndicator").show()},hideSpinner:function(){$("#uploadIndicator").hide()},showImportModal:function(){$("#docImportModal").modal("show")},hideImportModal:function(){$("#docImportModal").modal("hide")},setPagesize:function(){var a=$("#documentSize").find(":selected").val();this.collection.setPagesize(a),this.collection.getDocuments(this.getDocsCallback.bind(this))},setSorting:function(){var a=$("#docsSort").val();""!==a&&void 0!==a&&null!==a||(a="_key"),this.collection.setSort(a)},returnPressedHandler:function(a){13===a.keyCode&&$(a.target).is($("#docsSort"))&&this.collection.getDocuments(this.getDocsCallback.bind(this)),13===a.keyCode&&$("#confirmDeleteBtn").attr("disabled")===!1&&this.confirmDelete()},nop:function(a){a.stopPropagation()},resetView:function(){var a=function(a){a&&arangoHelper.arangoError("Document","Could not fetch documents count")};$("input").val(""),$("select").val("=="),this.removeAllFilterItems(),$("#documentSize").val(this.collection.getPageSize()),$("#documents_last").css("visibility","visible"),$("#documents_first").css("visibility","visible"),this.addDocumentSwitch=!0,this.collection.resetFilter(),this.collection.loadTotal(a),this.restoredFilters=[],this.allowUpload=!1,this.files=void 0,this.file=void 0,$("#confirmDocImport").attr("disabled",!0),this.markFilterToggle(),this.collection.getDocuments(this.getDocsCallback.bind(this))},startDownload:function(){var a=this.collection.buildDownloadDocumentQuery();""!==a||void 0!==a||null!==a?window.open(encodeURI("query/result/download/"+btoa(JSON.stringify(a)))):arangoHelper.arangoError("Document error","could not download documents")},startUpload:function(){var a=function(a,b){a?(arangoHelper.arangoError("Upload",b),this.hideSpinner()):(this.hideSpinner(),this.hideImportModal(),this.resetView())}.bind(this);this.allowUpload===!0&&(this.showSpinner(),this.collection.uploadDocuments(this.file,a))},uploadSetup:function(){var a=this;$("#importDocuments").change(function(b){a.files=b.target.files||b.dataTransfer.files,a.file=a.files[0],$("#confirmDocImport").attr("disabled",!1),a.allowUpload=!0})},buildCollectionLink:function(a){return"collection/"+encodeURIComponent(a.get("name"))+"/documents/1"},markFilterToggle:function(){this.restoredFilters.length>0?$("#filterCollection").addClass("activated"):$("#filterCollection").removeClass("activated")},editDocuments:function(){$("#importCollection").removeClass("activated"),$("#exportCollection").removeClass("activated"),this.markFilterToggle(),$("#markDocuments").toggleClass("activated"),this.changeEditMode(),$("#filterHeader").hide(),$("#importHeader").hide(),$("#editHeader").slideToggle(200),$("#exportHeader").hide()},filterCollection:function(){$("#importCollection").removeClass("activated"),$("#exportCollection").removeClass("activated"),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),this.markFilterToggle(),this.activeFilter=!0,$("#importHeader").hide(),$("#editHeader").hide(),$("#exportHeader").hide(),$("#filterHeader").slideToggle(200);var a;for(a in this.filters)if(this.filters.hasOwnProperty(a))return void $("#attribute_name"+a).focus()},exportCollection:function(){$("#importCollection").removeClass("activated"),$("#filterHeader").removeClass("activated"),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),$("#exportCollection").toggleClass("activated"),this.markFilterToggle(),$("#exportHeader").slideToggle(200),$("#importHeader").hide(),$("#filterHeader").hide(),$("#editHeader").hide()},importCollection:function(){this.markFilterToggle(),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),$("#importCollection").toggleClass("activated"),$("#exportCollection").removeClass("activated"),$("#importHeader").slideToggle(200),$("#filterHeader").hide(),$("#editHeader").hide(),$("#exportHeader").hide()},changeEditMode:function(a){a===!1||this.editMode===!0?($("#docPureTable .pure-table-body .pure-table-row").css("cursor","default"),$(".deleteButton").fadeIn(),$(".addButton").fadeIn(),$(".selected-row").removeClass("selected-row"),this.editMode=!1,this.tableView.setRowClick(this.clicked.bind(this))):($("#docPureTable .pure-table-body .pure-table-row").css("cursor","copy"),$(".deleteButton").fadeOut(),$(".addButton").fadeOut(),$(".selectedCount").text(0),this.editMode=!0,this.tableView.setRowClick(this.editModeClick.bind(this)))},getFilterContent:function(){var a,b,c=[];for(a in this.filters)if(this.filters.hasOwnProperty(a)){b=$("#attribute_value"+a).val();try{b=JSON.parse(b)}catch(d){b=String(b)}""!==$("#attribute_name"+a).val()&&c.push({attribute:$("#attribute_name"+a).val(),operator:$("#operator"+a).val(),value:b})}return c},sendFilter:function(){this.restoredFilters=this.getFilterContent();var a=this;this.collection.resetFilter(),this.addDocumentSwitch=!1,_.each(this.restoredFilters,function(b){void 0!==b.operator&&a.collection.addFilter(b.attribute,b.operator,b.value)}),this.collection.setToFirst(),this.collection.getDocuments(this.getDocsCallback.bind(this)),this.markFilterToggle()},restoreFilter:function(){var a=this,b=0;this.filterId=0,$("#docsSort").val(this.collection.getSort()),_.each(this.restoredFilters,function(c){0!==b&&a.addFilterItem(),void 0!==c.operator&&($("#attribute_name"+b).val(c.attribute),$("#operator"+b).val(c.operator),$("#attribute_value"+b).val(c.value)),b++,a.collection.addFilter(c.attribute,c.operator,c.value)})},addFilterItem:function(){var a=++this.filterId;$("#filterHeader").append('
    '),this.filters[a]=!0,this.checkFilterState()},filterValueKeydown:function(a){13===a.keyCode&&this.sendFilter()},checkFilterState:function(){var a=$("#filterHeader .queryline").length;if(1===a)$("#filterHeader .removeFilterItem").remove();else if(0===$("#filterHeader .queryline").first().find(".removeFilterItem").length){var b=$("#filterHeader .queryline").first().children().first().attr("id"),c=b.substr(14,b.length);$("#filterHeader .queryline").first().find(".add-filter-item").after(' ')}0===$("#filterHeader .queryline").first().find(".add-filter-item").length&&$("#filterHeader .queryline").first().find(".filterValue").after('')},removeFilterItem:function(a){var b=a.currentTarget,c=b.id.replace(/^removeFilter/,"");delete this.filters[c],delete this.restoredFilters[c],$(b.parentElement).remove(),this.checkFilterState()},removeAllFilterItems:function(){var a,b=$("#filterHeader").children().length;for(a=1;b>=a;a++)$("#removeFilter"+a).parent().remove();this.filters={0:!0},this.filterId=0},addDocumentModal:function(){var a=window.location.hash.split("/")[1],b=[],c=[],d=function(a,d){a?arangoHelper.arangoError("Error","Could not fetch collection type"):"edge"===d?(c.push(window.modalView.createTextEntry("new-edge-from-attr","_from","","document _id: document handle of the linked vertex (incoming relation)",void 0,!1,[{rule:Joi.string().required(),msg:"No _from attribute given."}])),c.push(window.modalView.createTextEntry("new-edge-to","_to","","document _id: document handle of the linked vertex (outgoing relation)",void 0,!1,[{rule:Joi.string().required(),msg:"No _to attribute given."}])),c.push(window.modalView.createTextEntry("new-edge-key-attr","_key",void 0,"the edges unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSuccessButton("Create",this.addEdge.bind(this))),window.modalView.show("modalTable.ejs","Create edge",b,c)):(c.push(window.modalView.createTextEntry("new-document-key-attr","_key",void 0,"the documents unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSuccessButton("Create",this.addDocument.bind(this))),window.modalView.show("modalTable.ejs","Create document",b,c))}.bind(this);arangoHelper.collectionApiType(a,!0,d)},addEdge:function(){var a,b=window.location.hash.split("/")[1],c=$(".modal-body #new-edge-from-attr").last().val(),d=$(".modal-body #new-edge-to").last().val(),e=$(".modal-body #new-edge-key-attr").last().val(),f=function(b,c){if(b)arangoHelper.arangoError("Error","Could not create edge");else{window.modalView.hide(),c=c._id.split("/");try{a="collection/"+c[0]+"/"+c[1],decodeURI(a)}catch(d){a="collection/"+c[0]+"/"+encodeURIComponent(c[1])}window.location.hash=a}};""!==e||void 0!==e?this.documentStore.createTypeEdge(b,c,d,e,f):this.documentStore.createTypeEdge(b,c,d,null,f)},addDocument:function(){var a,b=window.location.hash.split("/")[1],c=$(".modal-body #new-document-key-attr").last().val(),d=function(b,c){if(b)arangoHelper.arangoError("Error","Could not create document");else{window.modalView.hide(),c=c.split("/");try{a="collection/"+c[0]+"/"+c[1],decodeURI(a)}catch(d){a="collection/"+c[0]+"/"+encodeURIComponent(c[1])}window.location.hash=a}};""!==c||void 0!==c?this.documentStore.createTypeDocument(b,c,d):this.documentStore.createTypeDocument(b,null,d)},moveSelectedDocs:function(){var a=[],b=[],c=this.getSelectedDocs();0!==c.length&&(b.push(window.modalView.createTextEntry("move-documents-to","Move to","",!1,"collection-name",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}])),a.push(window.modalView.createSuccessButton("Move",this.confirmMoveSelectedDocs.bind(this))),window.modalView.show("modalTable.ejs","Move documents",a,b))},confirmMoveSelectedDocs:function(){var a=this.getSelectedDocs(),b=this,c=$(".modal-body").last().find("#move-documents-to").val(),d=function(){this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide()}.bind(this);_.each(a,function(a){b.collection.moveDocument(a,b.collection.collectionID,c,d)})},deleteSelectedDocs:function(){var a=[],b=[],c=this.getSelectedDocs();0!==c.length&&(b.push(window.modalView.createReadOnlyEntry(void 0,c.length+" documents selected","Do you want to delete all selected documents?",void 0,void 0,!1,void 0)),a.push(window.modalView.createDeleteButton("Delete",this.confirmDeleteSelectedDocs.bind(this))),window.modalView.show("modalTable.ejs","Delete documents",a,b))},confirmDeleteSelectedDocs:function(){var a=this.getSelectedDocs(),b=[],c=this;_.each(a,function(a){if("document"===c.type){var d=function(a){a?(b.push(!1),arangoHelper.arangoError("Document error","Could not delete document.")):(b.push(!0),c.collection.setTotalMinusOne(),c.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide())}.bind(c);c.documentStore.deleteDocument(c.collection.collectionID,a,d)}else if("edge"===c.type){var e=function(a){a?(b.push(!1),arangoHelper.arangoError("Edge error","Could not delete edge")):(c.collection.setTotalMinusOne(),b.push(!0),c.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide())}.bind(c);c.documentStore.deleteEdge(c.collection.collectionID,a,e)}})},getSelectedDocs:function(){var a=[];return _.each($("#docPureTable .pure-table-body .pure-table-row"),function(b){$(b).hasClass("selected-row")&&a.push($($(b).children()[1]).find(".key").text())}),a},remove:function(a){this.docid=$(a.currentTarget).parent().parent().prev().find(".key").text(),$("#confirmDeleteBtn").attr("disabled",!1),$("#docDeleteModal").modal("show")},confirmDelete:function(){$("#confirmDeleteBtn").attr("disabled",!0);var a=window.location.hash.split("/"),b=a[3];"source"!==b&&this.reallyDelete()},reallyDelete:function(){if("document"===this.type){var a=function(a){a?arangoHelper.arangoError("Error","Could not delete document"):(this.collection.setTotalMinusOne(),this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#docDeleteModal").modal("hide"))}.bind(this);this.documentStore.deleteDocument(this.collection.collectionID,this.docid,a)}else if("edge"===this.type){var b=function(a){a?arangoHelper.arangoError("Edge error","Could not delete edge"):(this.collection.setTotalMinusOne(),this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#docDeleteModal").modal("hide"))}.bind(this);this.documentStore.deleteEdge(this.collection.collectionID,this.docid,b)}},editModeClick:function(a){var b=$(a.currentTarget);b.hasClass("selected-row")?b.removeClass("selected-row"):b.addClass("selected-row");var c=this.getSelectedDocs();$(".selectedCount").text(c.length),_.each(this.editButtons,function(a){c.length>0?($(a).prop("disabled",!1),$(a).removeClass("button-neutral"),$(a).removeClass("disabled"),"#moveSelected"===a?$(a).addClass("button-success"):$(a).addClass("button-danger")):($(a).prop("disabled",!0),$(a).addClass("disabled"),$(a).addClass("button-neutral"),"#moveSelected"===a?$(a).removeClass("button-success"):$(a).removeClass("button-danger"))})},clicked:function(a){var b,c=a.currentTarget,d=$(c).attr("id").substr(4);try{b="collection/"+this.collection.collectionID+"/"+d,decodeURI(d)}catch(e){b="collection/"+this.collection.collectionID+"/"+encodeURIComponent(d)}window.location.hash=b},drawTable:function(){this.tableView.setElement($("#docPureTable")).render(),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","top"),$(".prettify").snippet("javascript",{style:"nedit",menu:!1,startText:!1,transparent:!0,showNum:!1}),this.resize()},checkCollectionState:function(){this.lastCollectionName===this.collectionName?this.activeFilter&&(this.filterCollection(),this.restoreFilter()):void 0!==this.lastCollectionName&&(this.collection.resetFilter(),this.collection.setSort(""),this.restoredFilters=[],this.activeFilter=!1)},render:function(){return $(this.el).html(this.template.render({})),2===this.type?this.type="document":3===this.type&&(this.type="edge"),this.tableView.setElement($(this.table)).drawLoading(),this.collectionContext=this.collectionsStore.getPosition(this.collection.collectionID),this.collectionName=window.location.hash.split("/")[1],this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Content"),this.checkCollectionState(),this.lastCollectionName=this.collectionName,this.uploadSetup(),$("[data-toggle=tooltip]").tooltip(),$(".upload-info").tooltip(),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","top"),this.renderPaginationElements(),this.selectActivePagesize(),this.markFilterToggle(),this.resize(),this},rerender:function(){this.collection.getDocuments(this.getDocsCallback.bind(this)),this.resize()},selectActivePagesize:function(){$("#documentSize").val(this.collection.getPageSize())},renderPaginationElements:function(){this.renderPagination();var a=$("#totalDocuments");0===a.length&&($("#documentsToolbarFL").append(''),a=$("#totalDocuments")),"document"===this.type&&a.html(numeral(this.collection.getTotal()).format("0,0")+" doc(s)"),"edge"===this.type&&a.html(numeral(this.collection.getTotal()).format("0,0")+" edge(s)")},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)}})}(),function(){"use strict";var a=function(a){var b=a.split("/");return"collection/"+encodeURIComponent(b[0])+"/"+encodeURIComponent(b[1])};window.DocumentView=Backbone.View.extend({el:"#content",colid:0,docid:0,customView:!1,defaultMode:"tree",template:templateEngine.createTemplate("documentView.ejs"),events:{"click #saveDocumentButton":"saveDocument","click #deleteDocumentButton":"deleteDocumentModal","click #confirmDeleteDocument":"deleteDocument","click #document-from":"navigateToDocument","click #document-to":"navigateToDocument","keydown #documentEditor .ace_editor":"keyPress","keyup .jsoneditor .search input":"checkSearchBox","click .jsoneditor .modes":"storeMode","click #addDocument":"addDocument"},checkSearchBox:function(a){""===$(a.currentTarget).val()&&this.editor.expandAll()},addDocument:function(){window.App.documentsView.addDocumentModal()},storeMode:function(){var a=this;$(".type-modes").on("click",function(b){a.defaultMode=$(b.currentTarget).text().toLowerCase()})},keyPress:function(a){a.ctrlKey&&13===a.keyCode?(a.preventDefault(),this.saveDocument()):a.metaKey&&13===a.keyCode&&(a.preventDefault(),this.saveDocument())},editor:0,setType:function(a){a=2===a?"document":"edge";var b=function(a,b){if(a)arangoHelper.arangoError("Error","Could not fetch data.");else{var c=b+": ";this.type=b,this.fillInfo(c),this.fillEditor()}}.bind(this);"edge"===a?this.collection.getEdge(this.colid,this.docid,b):"document"===a&&this.collection.getDocument(this.colid,this.docid,b)},deleteDocumentModal:function(){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry("doc-delete-button","Confirm delete, document id is",this.type._id,void 0,void 0,!1,/[<>&'"]/)),a.push(window.modalView.createDeleteButton("Delete",this.deleteDocument.bind(this))),window.modalView.show("modalTable.ejs","Delete Document",a,b)},deleteDocument:function(){var a=function(){if(this.customView)this.customDeleteFunction();else{var a="collection/"+encodeURIComponent(this.colid)+"/documents/1";window.modalView.hide(),window.App.navigate(a,{trigger:!0})}}.bind(this);if(this.type._from&&this.type._to){var b=function(b){b?arangoHelper.arangoError("Edge error","Could not delete edge"):a()};this.collection.deleteEdge(this.colid,this.docid,b)}else{var c=function(b){b?arangoHelper.arangoError("Error","Could not delete document"):a()};this.collection.deleteDocument(this.colid,this.docid,c)}},navigateToDocument:function(a){var b=$(a.target).attr("documentLink");b&&window.App.navigate(b,{trigger:!0})},fillInfo:function(){var b=this.collection.first(),c=b.get("_id"),d=b.get("_key"),e=b.get("_rev"),f=b.get("_from"),g=b.get("_to");if($("#document-type").css("margin-left","10px"),$("#document-type").text("_id:"),$("#document-id").css("margin-left","0"),$("#document-id").text(c),$("#document-key").text(d),$("#document-rev").text(e),f&&g){var h=a(f),i=a(g);$("#document-from").text(f),$("#document-from").attr("documentLink",h),$("#document-to").text(g),$("#document-to").attr("documentLink",i)}else $(".edge-info-container").hide()},fillEditor:function(){var a=this.removeReadonlyKeys(this.collection.first().attributes);$(".disabledBread").last().text(this.collection.first().get("_key")),this.editor.set(a),$(".ace_content").attr("font-size","11pt")},jsonContentChanged:function(){this.enableSaveButton()},resize:function(){$("#documentEditor").height($(".centralRow").height()-300)},render:function(){$(this.el).html(this.template.render({})),$("#documentEditor").height($(".centralRow").height()-300),this.disableSaveButton(),this.breadcrumb();var a=this,b=document.getElementById("documentEditor"),c={change:function(){a.jsonContentChanged()},search:!0,mode:"tree",modes:["tree","code"],iconlib:"fontawesome4"};return this.editor=new JSONEditor(b,c),this.editor.setMode(this.defaultMode),this},removeReadonlyKeys:function(a){return _.omit(a,["_key","_id","_from","_to","_rev"])},saveDocument:function(){if(void 0===$("#saveDocumentButton").attr("disabled"))if("_"===this.collection.first().attributes._id.substr(0,1)){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry("doc-save-system-button","Caution","You are modifying a system collection. Really continue?",void 0,void 0,!1,/[<>&'"]/)),a.push(window.modalView.createSuccessButton("Save",this.confirmSaveDocument.bind(this))),window.modalView.show("modalTable.ejs","Modify System Collection",a,b)}else this.confirmSaveDocument()},confirmSaveDocument:function(){window.modalView.hide(); -var a;try{a=this.editor.get()}catch(b){return this.errorConfirmation(b),void this.disableSaveButton()}if(a=JSON.stringify(a),this.type._from&&this.type._to){var c=function(a){a?arangoHelper.arangoError("Error","Could not save edge."):(this.successConfirmation(),this.disableSaveButton())}.bind(this);this.collection.saveEdge(this.colid,this.docid,this.type._from,this.type._to,a,c)}else{var d=function(a){a?arangoHelper.arangoError("Error","Could not save document."):(this.successConfirmation(),this.disableSaveButton())}.bind(this);this.collection.saveDocument(this.colid,this.docid,a,d)}},successConfirmation:function(){arangoHelper.arangoNotification("Document saved.")},errorConfirmation:function(a){arangoHelper.arangoError("Document editor: ",a)},enableSaveButton:function(){$("#saveDocumentButton").prop("disabled",!1),$("#saveDocumentButton").addClass("button-success"),$("#saveDocumentButton").removeClass("button-close")},disableSaveButton:function(){$("#saveDocumentButton").prop("disabled",!0),$("#saveDocumentButton").addClass("button-close"),$("#saveDocumentButton").removeClass("button-success")},breadcrumb:function(){var a=window.location.hash.split("/");$("#subNavigationBar .breadcrumb").html('Collection: '+a[1]+'Document: '+a[2])},escaped:function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}})}(),function(){"use strict";window.FooterView=Backbone.View.extend({el:"#footerBar",system:{},isOffline:!0,isOfflineCounter:0,firstLogin:!0,timer:15e3,lap:0,timerFunction:null,events:{"click .footer-center p":"showShortcutModal"},initialize:function(){var a=this;window.setInterval(function(){a.getVersion()},a.timer),a.getVersion(),window.VISIBLE=!0,document.addEventListener("visibilitychange",function(){window.VISIBLE=!window.VISIBLE}),$("#offlinePlaceholder button").on("click",function(){a.getVersion()}),window.setTimeout(function(){window.frontendConfig.isCluster===!0&&($(".health-state").css("cursor","pointer"),$(".health-state").on("click",function(){window.App.navigate("#nodes",{trigger:!0})}))},1e3)},template:templateEngine.createTemplate("footerView.ejs"),showServerStatus:function(a){window.App.isCluster?this.renderClusterState(a):a===!0?($("#healthStatus").removeClass("negative"),$("#healthStatus").addClass("positive"),$(".health-state").html("GOOD"),$(".health-icon").html(''),$("#offlinePlaceholder").hide()):($("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),$(".health-state").html("UNKNOWN"),$(".health-icon").html(''),$("#offlinePlaceholder").show(),this.reconnectAnimation(0))},reconnectAnimation:function(a){var b=this;0===a&&(b.lap=a,$("#offlineSeconds").text(b.timer/1e3),clearTimeout(b.timerFunction)),b.lap0?($("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),1===c?$(".health-state").html(c+" NODE ERROR"):$(".health-state").html(c+" NODES ERROR"),$(".health-icon").html('')):($("#healthStatus").removeClass("negative"),$("#healthStatus").addClass("positive"),$(".health-state").html("NODES OK"),$(".health-icon").html(''))};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a)}})}else $("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),$(".health-state").html(window.location.host+" OFFLINE"),$(".health-icon").html(''),$("#offlinePlaceholder").show(),this.reconnectAnimation(0)},showShortcutModal:function(){window.arangoHelper.hotkeysFunctions.showHotkeysModal()},getVersion:function(){var a=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,success:function(b){a.showServerStatus(!0),a.isOffline===!0&&(a.isOffline=!1,a.isOfflineCounter=0,a.firstLogin?a.firstLogin=!1:window.setTimeout(function(){a.showServerStatus(!0)},1e3),a.system.name=b.server,a.system.version=b.version,a.render())},error:function(b){401===b.status?(a.showServerStatus(!0),window.App.navigate("login",{trigger:!0})):(a.isOffline=!0,a.isOfflineCounter++,a.isOfflineCounter>=1&&a.showServerStatus(!1))}}),a.system.hasOwnProperty("database")||$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/database/current"),contentType:"application/json",processData:!1,async:!0,success:function(b){var c=b.result.name;a.system.database=c;var d=window.setInterval(function(){var b=$("#databaseNavi");b&&(window.clearTimeout(d),d=null,a.render())},50)}})},renderVersion:function(){this.system.hasOwnProperty("database")&&this.system.hasOwnProperty("name")&&$(this.el).html(this.template.render({name:this.system.name,version:this.system.version,database:this.system.database}))},render:function(){return this.system.version||this.getVersion(),$(this.el).html(this.template.render({name:this.system.name,version:this.system.version})),this}})}(),function(){"use strict";window.FoxxActiveView=Backbone.View.extend({tagName:"div",className:"tile pure-u-1-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 pure-u-xl-1-6",template:templateEngine.createTemplate("foxxActiveView.ejs"),_show:!0,events:{click:"openAppDetailView"},openAppDetailView:function(){window.App.navigate("service/"+encodeURIComponent(this.model.get("mount")),{trigger:!0})},toggle:function(a,b){switch(a){case"devel":this.model.isDevelopment()&&(this._show=b);break;case"production":this.model.isDevelopment()||this.model.isSystem()||(this._show=b);break;case"system":this.model.isSystem()&&(this._show=b)}this._show?$(this.el).show():$(this.el).hide()},render:function(){return this.model.fetchThumbnail(function(){$(this.el).html(this.template.render({model:this.model}));var a=function(){this.model.needsConfiguration()&&($(this.el).find(".warning-icons").length>0?$(this.el).find(".warning-icons").append(''):$(this.el).find("img").after(''))}.bind(this),b=function(){this.model.hasUnconfiguredDependencies()&&($(this.el).find(".warning-icons").length>0?$(this.el).find(".warning-icons").append(''):$(this.el).find("img").after(''))}.bind(this);this.model.getConfiguration(a),this.model.getDependencies(b)}.bind(this)),$(this.el)}})}(),function(){"use strict";var a={ERROR_SERVICE_DOWNLOAD_FAILED:{code:1752,message:"service download failed"}},b=templateEngine.createTemplate("applicationListView.ejs"),c=function(a){this.collection=a.collection},d=function(b){var c=this;if(b.error===!1)this.collection.fetch({success:function(){window.modalView.hide(),c.reload(),console.log(b),arangoHelper.arangoNotification("Services","Service "+b.name+" installed.")}});else{var d=b;switch(b.hasOwnProperty("responseJSON")&&(d=b.responseJSON),d.errorNum){case a.ERROR_SERVICE_DOWNLOAD_FAILED.code:arangoHelper.arangoError("Services","Unable to download application from the given repository.");break;default:arangoHelper.arangoError("Services",d.errorNum+". "+d.errorMessage)}}},e=function(){window.modalView.modalBindValidation({id:"new-app-mount",validateInput:function(){return[{rule:Joi.string().regex(/^(\/(APP[^\/]+|(?!APP)[a-zA-Z0-9_\-%]+))+$/i),msg:"May not contain /APP"},{rule:Joi.string().regex(/^(\/[a-zA-Z0-9_\-%]+)+$/),msg:"Can only contain [a-zA-Z0-9_-%]"},{rule:Joi.string().regex(/^\/([^_]|_open\/)/),msg:"Mountpoints with _ are reserved for internal use"},{rule:Joi.string().regex(/[^\/]$/),msg:"May not end with /"},{rule:Joi.string().regex(/^\//),msg:"Has to start with /"},{rule:Joi.string().required().min(2),msg:"Has to be non-empty"}]}})},f=function(){window.modalView.modalBindValidation({id:"repository",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z0-9_\-]+\/[a-zA-Z0-9_\-]+$/),msg:"No valid Github account and repository."}]}})},g=function(){window.modalView.modalBindValidation({id:"new-app-author",validateInput:function(){return[{rule:Joi.string().required().min(1),msg:"Has to be non empty."}]}}),window.modalView.modalBindValidation({id:"new-app-name",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z\-_][a-zA-Z0-9\-_]*$/),msg:"Can only contain a to z, A to Z, 0-9, '-' and '_'."}]}}),window.modalView.modalBindValidation({id:"new-app-description",validateInput:function(){return[{rule:Joi.string().required().min(1),msg:"Has to be non empty."}]}}),window.modalView.modalBindValidation({id:"new-app-license",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z0-9 \.,;\-]+$/),msg:"Has to be non empty."}]}}),window.modalView.modalTestAll()},h=function(a){window.modalView.clearValidators();var b=$("#modalButton1");switch(this._upgrade||e(),a){case"newApp":b.html("Generate"),b.prop("disabled",!1),g();break;case"appstore":b.html("Install"),b.prop("disabled",!0);break;case"github":f(),b.html("Install"),b.prop("disabled",!1);break;case"zip":b.html("Install"),b.prop("disabled",!1)}b.prop("disabled")||window.modalView.modalTestAll()||b.prop("disabled",!0)},i=function(a){var b=$(a.currentTarget).attr("href").substr(1);h.call(this,b)},j=function(a){if(h.call(this,"appstore"),window.modalView.modalTestAll()){var b,c;this._upgrade?(b=this.mount,c=$("#new-app-teardown").prop("checked")):b=window.arangoHelper.escapeHtml($("#new-app-mount").val());var e=$(a.currentTarget).attr("appId"),f=$(a.currentTarget).attr("appVersion");void 0!==c?this.collection.installFromStore({name:e,version:f},b,d.bind(this),c):this.collection.installFromStore({name:e,version:f},b,d.bind(this)),window.modalView.hide(),arangoHelper.arangoNotification("Services","Installing "+e+".")}},k=function(a,b){if(void 0===b?b=this._uploadData:this._uploadData=b,b&&window.modalView.modalTestAll()){var c,e;this._upgrade?(c=this.mount,e=$("#new-app-teardown").prop("checked")):c=window.arangoHelper.escapeHtml($("#new-app-mount").val()),void 0!==e?this.collection.installFromZip(b.filename,c,d.bind(this),e):this.collection.installFromZip(b.filename,c,d.bind(this))}},l=function(){if(window.modalView.modalTestAll()){var a,b,c,e;this._upgrade?(c=this.mount,e=$("#new-app-teardown").prop("checked")):c=window.arangoHelper.escapeHtml($("#new-app-mount").val()),a=window.arangoHelper.escapeHtml($("#repository").val()),b=window.arangoHelper.escapeHtml($("#tag").val()),""===b&&(b="master");var f={url:window.arangoHelper.escapeHtml($("#repository").val()),version:window.arangoHelper.escapeHtml($("#tag").val())};try{Joi.assert(a,Joi.string().regex(/^[a-zA-Z0-9_\-]+\/[a-zA-Z0-9_\-]+$/))}catch(g){return}void 0!==e?this.collection.installFromGithub(f,c,d.bind(this),e):this.collection.installFromGithub(f,c,d.bind(this))}},m=function(){if(window.modalView.modalTestAll()){var a,b;this._upgrade?(a=this.mount,b=$("#new-app-teardown").prop("checked")):a=window.arangoHelper.escapeHtml($("#new-app-mount").val());var c={name:window.arangoHelper.escapeHtml($("#new-app-name").val()),documentCollections:_.map($("#new-app-document-collections").select2("data"),function(a){return window.arangoHelper.escapeHtml(a.text)}),edgeCollections:_.map($("#new-app-edge-collections").select2("data"),function(a){return window.arangoHelper.escapeHtml(a.text)}),author:window.arangoHelper.escapeHtml($("#new-app-author").val()),license:window.arangoHelper.escapeHtml($("#new-app-license").val()),description:window.arangoHelper.escapeHtml($("#new-app-description").val())};void 0!==b?this.collection.generate(c,a,d.bind(this),b):this.collection.generate(c,a,d.bind(this))}},n=function(){var a=$(".modal-body .tab-pane.active").attr("id");switch(a){case"newApp":m.apply(this);break;case"github":l.apply(this);break;case"zip":k.apply(this)}},o=function(a,c){var d=[],e={"click #infoTab a":i.bind(a),"click .install-app":j.bind(a)};d.push(window.modalView.createSuccessButton("Generate",n.bind(a))),window.modalView.show("modalApplicationMount.ejs","Install Service",d,c,void 0,void 0,e),$("#new-app-document-collections").select2({tags:[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px"}),$("#new-app-edge-collections").select2({tags:[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px"});var f=function(){var a=$("#modalButton1");a.prop("disabled")||window.modalView.modalTestAll()?a.prop("disabled",!1):a.prop("disabled",!0)};$(".select2-search-field input").focusout(function(){f(),window.setTimeout(function(){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||($("#s2id_new-app-document-collections").select2("close"),$("#s2id_new-app-edge-collections").select2("close"),f()))},200)}),$(".select2-search-field input").focusin(function(){if($(".select2-drop").is(":visible")){var a=$("#modalButton1");a.prop("disabled",!0)}}),$("#upload-foxx-zip").uploadFile({url:arangoHelper.databaseUrl("/_api/upload?multipart=true"),allowedTypes:"zip",multiple:!1,onSuccess:k.bind(a)}),$.get("foxxes/fishbowl",function(a){var c=$("#appstore-content");c.html(""),_.each(_.sortBy(a,"name"),function(a){c.append(b.render(a))})}).fail(function(){var a=$("#appstore-content");a.append("Store is not available. ArangoDB is not able to connect to github.com")})};c.prototype.install=function(a){this.reload=a,this._upgrade=!1,this._uploadData=void 0,delete this.mount,o(this,!1),window.modalView.clearValidators(),e(),g()},c.prototype.upgrade=function(a,b){this.reload=b,this._upgrade=!0,this._uploadData=void 0,this.mount=a,o(this,!0),window.modalView.clearValidators(),g()},window.FoxxInstallView=c}(),function(){"use strict";window.GraphManagementView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("graphManagementView.ejs"),edgeDefintionTemplate:templateEngine.createTemplate("edgeDefinitionTable.ejs"),eCollList:[],removedECollList:[],dropdownVisible:!1,initialize:function(a){this.options=a},events:{"click #deleteGraph":"deleteGraph","click .icon_arangodb_settings2.editGraph":"editGraph","click #createGraph":"addNewGraph","keyup #graphManagementSearchInput":"search","click #graphManagementSearchSubmit":"search","click .tile-graph":"redirectToGraphViewer","click #gv2":"redirectToGraphViewer2","click #graphManagementToggle":"toggleGraphDropdown","click .css-label":"checkBoxes","change #graphSortDesc":"sorting"},toggleTab:function(a){var b=a.currentTarget.id;b=b.replace("tab-",""),$("#tab-content-create-graph .tab-pane").removeClass("active"),$("#tab-content-create-graph #"+b).addClass("active"),"exampleGraphs"===b?$("#modal-dialog .modal-footer .button-success").css("display","none"):$("#modal-dialog .modal-footer .button-success").css("display","initial")},redirectToGraphViewer:function(a){var b=$(a.currentTarget).attr("id");b=b.substr(0,b.length-5),window.location=window.location+"/"+encodeURIComponent(b)},redirectToGraphViewer2:function(a){a.preventDefault();var b=$(a.currentTarget).parent().parent().attr("id");b=b.substr(0,b.length-5),console.log(b),window.App.navigate("graph2/"+encodeURIComponent(b),{trigger:!0})},loadGraphViewer:function(a,b){var c=function(b){if(b)arangoHelper.arangoError("","");else{var c=this.collection.get(a).get("edgeDefinitions");if(!c||0===c.length)return;var d={type:"gharial",graphName:a,baseUrl:arangoHelper.databaseUrl("/")},e=$("#content").width()-75;$("#content").html("");var f=arangoHelper.calculateCenterDivHeight();this.ui=new GraphViewerUI($("#content")[0],d,e,$(".centralRow").height()-135,{nodeShaper:{label:"_key",color:{type:"attribute",key:"_key"}}},!0),$(".contentDiv").height(f)}}.bind(this);b?this.collection.fetch({cache:!1,success:function(){c()}}):c()},handleResize:function(a){this.width&&this.width===a||(this.width=a,this.ui&&this.ui.changeWidth(a))},addNewGraph:function(a){a.preventDefault(),this.createEditGraphModal()},deleteGraph:function(){var a=this,b=$("#editGraphName")[0].value;if($("#dropGraphCollections").is(":checked")){var c=function(c){c?(a.collection.remove(a.collection.get(b)),a.updateGraphManagementView(),window.modalView.hide()):(window.modalView.hide(),arangoHelper.arangoError("Graph","Could not delete Graph."))};this.collection.dropAndDeleteGraph(b,c)}else this.collection.get(b).destroy({success:function(){a.updateGraphManagementView(),window.modalView.hide()},error:function(a,b){var c=JSON.parse(b.responseText),d=c.errorMessage;arangoHelper.arangoError(d),window.modalView.hide()}})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},toggleGraphDropdown:function(){$("#graphSortDesc").attr("checked",this.collection.sortOptions.desc),$("#graphManagementToggle").toggleClass("activated"),$("#graphManagementDropdown2").slideToggle(200)},sorting:function(){$("#graphSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#graphManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},createExampleGraphs:function(a){var b=$(a.currentTarget).attr("graph-id"),c=this;$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_admin/aardvark/graph-examples/create/"+encodeURIComponent(b)),success:function(){window.modalView.hide(),c.updateGraphManagementView(),arangoHelper.arangoNotification("Example Graphs","Graph: "+b+" created.")},error:function(a){if(window.modalView.hide(),a.responseText)try{var c=JSON.parse(a.responseText);arangoHelper.arangoError("Example Graphs",c.errorMessage)}catch(d){arangoHelper.arangoError("Example Graphs","Could not create example graph: "+b)}else arangoHelper.arangoError("Example Graphs","Could not create example graph: "+b)}})},render:function(a,b){var c=this;return this.collection.fetch({cache:!1,success:function(){c.collection.sort(),$(c.el).html(c.template.render({graphs:c.collection,searchString:""})),c.dropdownVisible===!0&&($("#graphManagementDropdown2").show(),$("#graphSortDesc").attr("checked",c.collection.sortOptions.desc),$("#graphManagementToggle").toggleClass("activated"),$("#graphManagementDropdown").show()),c.events["click .tableRow"]=c.showHideDefinition.bind(c),c.events['change tr[id*="newEdgeDefinitions"]']=c.setFromAndTo.bind(c),c.events["click .graphViewer-icon-button"]=c.addRemoveDefinition.bind(c),c.events["click #graphTab a"]=c.toggleTab.bind(c),c.events["click .createExampleGraphs"]=c.createExampleGraphs.bind(c),c.events["focusout .select2-search-field input"]=function(a){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||window.setTimeout(function(){$(a.currentTarget).parent().parent().parent().select2("close")},200))},arangoHelper.setCheckboxStatus("#graphManagementDropdown")}}),a&&this.loadGraphViewer(a,b),this},setFromAndTo:function(a){a.stopPropagation();var b,c=this.calculateEdgeDefinitionMap();if(a.added){if(-1===this.eCollList.indexOf(a.added.id)&&-1!==this.removedECollList.indexOf(a.added.id))return b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$('input[id*="newEdgeDefinitions'+b+'"]').select2("val",null),void $('input[id*="newEdgeDefinitions'+b+'"]').attr("placeholder","The collection "+a.added.id+" is already used.");this.removedECollList.push(a.added.id),this.eCollList.splice(this.eCollList.indexOf(a.added.id),1)}else this.eCollList.push(a.removed.id),this.removedECollList.splice(this.removedECollList.indexOf(a.removed.id),1);c[a.val]?(b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$("#s2id_fromCollections"+b).select2("val",c[a.val].from),$("#fromCollections"+b).attr("disabled",!0),$("#s2id_toCollections"+b).select2("val",c[a.val].to),$("#toCollections"+b).attr("disabled",!0)):(b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$("#s2id_fromCollections"+b).select2("val",null),$("#fromCollections"+b).attr("disabled",!1),$("#s2id_toCollections"+b).select2("val",null),$("#toCollections"+b).attr("disabled",!1))},editGraph:function(a){a.stopPropagation(),this.collection.fetch({cache:!1}),this.graphToEdit=this.evaluateGraphName($(a.currentTarget).attr("id"),"_settings");var b=this.collection.findWhere({_key:this.graphToEdit});this.createEditGraphModal(b)},saveEditedGraph:function(){var a,b,c,d,e,f=$("#editGraphName")[0].value,g=_.pluck($("#newVertexCollections").select2("data"),"text"),h=[],i={};if(e=$("[id^=s2id_newEdgeDefinitions]").toArray(),e.forEach(function(e){if(d=$(e).attr("id"),d=d.replace("s2id_newEdgeDefinitions",""),a=_.pluck($("#s2id_newEdgeDefinitions"+d).select2("data"),"text")[0],a&&""!==a&&(b=_.pluck($("#s2id_fromCollections"+d).select2("data"),"text"),c=_.pluck($("#s2id_toCollections"+d).select2("data"),"text"),0!==b.length&&0!==c.length)){var f={collection:a,from:b,to:c};h.push(f),i[a]=f}}),0===h.length)return $("#s2id_newEdgeDefinitions0 .select2-choices").css("border-color","red"),$("#s2id_newEdgeDefinitions0").parent().parent().next().find(".select2-choices").css("border-color","red"),void $("#s2id_newEdgeDefinitions0").parent().parent().next().next().find(".select2-choices").css("border-color","red");var j=this.collection.findWhere({_key:f}),k=j.get("edgeDefinitions"),l=j.get("orphanCollections"),m=[];l.forEach(function(a){-1===g.indexOf(a)&&j.deleteVertexCollection(a)}),g.forEach(function(a){-1===l.indexOf(a)&&j.addVertexCollection(a)});var n=[],o=[],p=[];k.forEach(function(a){var b=a.collection;m.push(b);var c=i[b];void 0===c?p.push(b):JSON.stringify(c)!==JSON.stringify(a)&&o.push(b)}),h.forEach(function(a){var b=a.collection;-1===m.indexOf(b)&&n.push(b)}),n.forEach(function(a){j.addEdgeDefinition(i[a])}),o.forEach(function(a){j.modifyEdgeDefinition(i[a])}),p.forEach(function(a){j.deleteEdgeDefinition(a)}),this.updateGraphManagementView(),window.modalView.hide()},evaluateGraphName:function(a,b){var c=a.lastIndexOf(b);return a.substring(0,c)},search:function(){var a,b,c,d;a=$("#graphManagementSearchInput"),b=$("#graphManagementSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("_key").indexOf(b)}),$(this.el).html(this.template.render({graphs:d,searchString:b})),a=$("#graphManagementSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},updateGraphManagementView:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},createNewGraph:function(){var a,b,c,d,e,f=$("#createNewGraphName").val(),g=_.pluck($("#newVertexCollections").select2("data"),"text"),h=[],i=this;return f?this.collection.findWhere({_key:f})?(arangoHelper.arangoError("The graph '"+f+"' already exists."),0):(e=$("[id^=s2id_newEdgeDefinitions]").toArray(),e.forEach(function(e){d=$(e).attr("id"),d=d.replace("s2id_newEdgeDefinitions",""),a=_.pluck($("#s2id_newEdgeDefinitions"+d).select2("data"),"text")[0],a&&""!==a&&(b=_.pluck($("#s2id_fromCollections"+d).select2("data"),"text"),c=_.pluck($("#s2id_toCollections"+d).select2("data"),"text"),1!==b&&1!==c&&h.push({collection:a,from:b,to:c}))}),0===h.length?($("#s2id_newEdgeDefinitions0 .select2-choices").css("border-color","red"),$("#s2id_newEdgeDefinitions0").parent().parent().next().find(".select2-choices").css("border-color","red"),void $("#s2id_newEdgeDefinitions0").parent().parent().next().next().find(".select2-choices").css("border-color","red")):void this.collection.create({name:f,edgeDefinitions:h,orphanCollections:g},{success:function(){i.updateGraphManagementView(),window.modalView.hide()},error:function(a,b){var c=JSON.parse(b.responseText),d=c.errorMessage;d=d.replace("<",""),d=d.replace(">",""),arangoHelper.arangoError(d)}})):(arangoHelper.arangoError("A name for the graph has to be provided."),0)},createEditGraphModal:function(a){var b,c=[],d=[],e=[],f=this.options.collectionCollection.models,g=this,h="",i=[{collection:"",from:"",to:""}],j="",k=function(a,b){return a=a.toLowerCase(),b=b.toLowerCase(),b>a?-1:a>b?1:0};if(this.eCollList=[],this.removedECollList=[],f.forEach(function(a){a.get("isSystem")||("edge"===a.get("type")?g.eCollList.push(a.id):d.push(a.id))}),window.modalView.enableHotKeys=!1,this.counter=0,a?(b="Edit Graph",h=a.get("_key"),i=a.get("edgeDefinitions"),i&&0!==i.length||(i=[{collection:"",from:"",to:""}]),j=a.get("orphanCollections"),e.push(window.modalView.createReadOnlyEntry("editGraphName","Name",h,"The name to identify the graph. Has to be unique")),c.push(window.modalView.createDeleteButton("Delete",this.deleteGraph.bind(this))),c.push(window.modalView.createSuccessButton("Save",this.saveEditedGraph.bind(this)))):(b="Create Graph",e.push(window.modalView.createTextEntry("createNewGraphName","Name","","The name to identify the graph. Has to be unique.","graphName",!0)),c.push(window.modalView.createSuccessButton("Create",this.createNewGraph.bind(this)))),i.forEach(function(a){0===g.counter?(a.collection&&(g.removedECollList.push(a.collection),g.eCollList.splice(g.eCollList.indexOf(a.collection),1)),e.push(window.modalView.createSelect2Entry("newEdgeDefinitions"+g.counter,"Edge definitions",a.collection,"An edge definition defines a relation of the graph","Edge definitions",!0,!1,!0,1,g.eCollList.sort(k)))):e.push(window.modalView.createSelect2Entry("newEdgeDefinitions"+g.counter,"Edge definitions",a.collection,"An edge definition defines a relation of the graph","Edge definitions",!1,!0,!1,1,g.eCollList.sort(k))),e.push(window.modalView.createSelect2Entry("fromCollections"+g.counter,"fromCollections",a.from,"The collections that contain the start vertices of the relation.","fromCollections",!0,!1,!1,10,d.sort(k))),e.push(window.modalView.createSelect2Entry("toCollections"+g.counter,"toCollections",a.to,"The collections that contain the end vertices of the relation.","toCollections",!0,!1,!1,10,d.sort(k))),g.counter++}),e.push(window.modalView.createSelect2Entry("newVertexCollections","Vertex collections",j,"Collections that are part of a graph but not used in an edge definition","Vertex Collections",!1,!1,!1,10,d.sort(k))),window.modalView.show("modalGraphTable.ejs",b,c,e,void 0,void 0,this.events),a){$(".modal-body table").css("border-collapse","separate");var l;for($(".modal-body .spacer").remove(),l=0;l<=this.counter;l++)$("#row_fromCollections"+l).show(),$("#row_toCollections"+l).show(),$("#row_newEdgeDefinitions"+l).addClass("first"),$("#row_fromCollections"+l).addClass("middle"),$("#row_toCollections"+l).addClass("last"),$("#row_toCollections"+l).after('');$("#graphTab").hide(),$("#modal-dialog .modal-delete-confirmation").append('
    ')}},showHideDefinition:function(a){},addRemoveDefinition:function(a){var b=[],c=this.options.collectionCollection.models;c.forEach(function(a){a.get("isSystem")||b.push(a.id)}),a.stopPropagation();var d,e=$(a.currentTarget).attr("id");if(-1===e.indexOf("addAfter_newEdgeDefinitions"))-1!==e.indexOf("remove_newEdgeDefinitions")&&(d=e.split("remove_newEdgeDefinitions")[1],$("#row_newEdgeDefinitions"+d).remove(),$("#row_fromCollections"+d).remove(),$("#row_toCollections"+d).remove(),$("#spacer"+d).remove());else{this.counter++,$("#row_newVertexCollections").before(this.edgeDefintionTemplate.render({number:this.counter})),$("#newEdgeDefinitions"+this.counter).select2({tags:this.eCollList,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:1}),$("#fromCollections"+this.counter).select2({tags:b,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:10}),$("#toCollections"+this.counter).select2({tags:b,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:10}),window.modalView.undelegateEvents(),window.modalView.delegateEvents(this.events);var f;for($(".modal-body .spacer").remove(),f=0;f<=this.counter;f++)$("#row_fromCollections"+f).show(),$("#row_toCollections"+f).show(),$("#row_newEdgeDefinitions"+f).addClass("first"),$("#row_fromCollections"+f).addClass("middle"),$("#row_toCollections"+f).addClass("last"),$("#row_toCollections"+f).after('')}},calculateEdgeDefinitionMap:function(){var a={};return this.collection.models.forEach(function(b){b.get("edgeDefinitions").forEach(function(b){a[b.collection]={from:b.from,to:b.to}})}),a}})}(),function(){"use strict";window.GraphSettingsView=Backbone.View.extend({el:"#graphSettingsContent",remove:function(){return this.$el.empty().off(),this.stopListening(),this},general:{graph:{type:"divider",name:"Graph"},nodeStart:{type:"string",name:"Starting node",desc:"A valid node id. If empty, a random node will be chosen.",value:2},layout:{type:"select",name:"Layout algorithm",desc:"Different graph displaying algorithms. No overlap is very fast, force is slower and fruchtermann is the slowest. The calculation time strongly depends on your nodes and edges counts.",noverlap:{name:"No overlap",val:"noverlap"},force:{name:"Force",val:"force"},fruchtermann:{name:"Fruchtermann",val:"fruchtermann"}},renderer:{type:"select",name:"Renderer",desc:"Canvas enables editing, WebGL is only for displaying a graph but much faster.",canvas:{name:"Canvas",val:"canvas"},webgl:{name:"WebGL",val:"webgl"}},depth:{desc:"Search depth, starting from your start node.",type:"number",name:"Search depth",value:2}},specific:{nodes:{type:"divider",name:"Nodes"},nodeLabel:{type:"string",name:"Label",desc:"Node label. Please choose a valid and available node attribute.","default":"_key"},nodeLabelByCollection:{type:"select",name:"Label by coll?",desc:"Set label text by collection. If activated node label attribute will be ignored.",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"}},nodeLabelThreshold:{type:"range",name:"Label threshold",desc:"The minimum size a node must have on screen to see its label displayed. This does not affect hovering behavior.","default":"_key"},nodeColor:{type:"color",name:"Color",desc:"Default node color. RGB or HEX value.","default":"#2ecc71"},nodeColorAttribute:{type:"string",name:"Colorize attr",desc:"If an attribute is given, nodes will then be colorized by the attribute. This setting ignores default node color if set."},nodeColorByCollection:{type:"select",name:"Colorize by coll?",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should nodes be colorized by their collection? If enabled, node color and node color attribute will be ignored."},nodeSize:{type:"string",name:"Sizing attribute",desc:"Default node size. Numeric value > 0."},edges:{type:"divider",name:"Edges"},edgeLabel:{type:"string",name:"Label",desc:"Default edge label."},edgeLabelByCollection:{type:"select",name:"Label by coll?",desc:"Set label text by collection. If activated edge label attribute will be ignored.",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"}},edgeLabelThreshold:{type:"range",name:"Label threshold",desc:"The minimum size an edge must have on screen to see its label displayed. This does not affect hovering behavior.","default":"_key"},edgeColor:{type:"color",name:"Color",desc:"Default edge color. RGB or HEX value.","default":"#cccccc"},edgeColorAttribute:{type:"string",name:"Colorize attr",desc:"If an attribute is given, edges will then be colorized by the attribute. This setting ignores default edge color if set."},edgeColorByCollection:{type:"select",name:"Colorize by coll?",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should edges be colorized by their collection? If enabled, edge color and edge color attribute will be ignored." -},edgeEditable:{type:"select",name:"Editable",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should edges be editable?"},edgeType:{type:"select",name:"Type",desc:"The type of the edge",line:{name:"Line",val:"line"},arrow:{name:"Arrow",val:"arrow"},curve:{name:"Curve",val:"curve"},dotted:{name:"Dotted",val:"dotted"},dashed:{name:"Dashed",val:"dashed"},tapered:{name:"Tapered",val:"tapered"}}},template:templateEngine.createTemplate("graphSettingsView.ejs"),initialize:function(a){this.name=a.name,this.userConfig=a.userConfig,this.saveCallback=a.saveCallback},events:{"click #saveGraphSettings":"saveGraphSettings","click #restoreGraphSettings":"setDefaults","keyup #graphSettingsView input":"checkEnterKey","keyup #graphSettingsView select":"checkEnterKey",'change input[type="range"]':"saveGraphSettings",'change input[type="color"]':"checkColor","change select":"saveGraphSettings","focus #graphSettingsView input":"lastFocus","focus #graphSettingsView select":"lastFocus"},lastFocus:function(a){this.lastFocussed=a.currentTarget.id},checkEnterKey:function(a){13===a.keyCode&&this.saveGraphSettings()},getGraphSettings:function(a){var b=this,c=window.App.currentDB.toJSON().name+"_"+this.name;this.userConfig.fetch({success:function(d){b.graphConfig=d.toJSON().graphs[c],a&&b.continueRender()}})},checkColor:function(){this.saveGraphSettings(null,!0)},saveGraphSettings:function(a,b,c,d){var e=this,f=window.App.currentDB.toJSON().name+"_"+this.name,g={};if(d)g[f]=d;else{var h,i={};$("#graphSettingsView select").each(function(a,b){h=b.id,i[h.substr(2,b.id.length)]=$(b).val()}),$("#graphSettingsView input").each(function(a,b){h=b.id,i[h.substr(2,b.id.length)]=$(b).val()}),g[f]=i}c&&(g[f].nodeStart=c);var j=function(){window.App.graphViewer2?""!==b&&void 0!==b?window.App.graphViewer2.updateColors():window.App.graphViewer2.render(e.lastFocussed):arangoHelper.arangoNotification("Graph "+this.name,"Configuration saved.")}.bind(this);this.userConfig.setItem("graphs",g,j)},setDefaults:function(){var a={layout:"force",renderer:"canvas",depth:"2",nodeColor:"#2ecc71",nodeColorAttribute:"",nodeColorByCollection:"false",nodeLabelThreshold:10,edgeColor:"#cccccc",edgeColorAttribute:"",edgeColorByCollection:"false",edgeLabelThreshold:10,nodeLabel:"_key",edgeLabel:"",edgeType:"line",nodeSize:"",edgeEditable:"false",nodeLabelByCollection:"false",edgeLabelByCollection:"false",nodeStart:""};this.saveGraphSettings(null,null,null,a),this.render(),window.App.graphViewer2.render(this.lastFocussed)},toggle:function(){$(this.el).is(":visible")?this.hide():this.show()},show:function(){$(this.el).show("slide",{direction:"right"},250)},hide:function(){$(this.el).hide("slide",{direction:"right"},250)},render:function(){this.getGraphSettings(!0)},continueRender:function(){$(this.el).html(this.template.render({general:this.general,specific:this.specific})),arangoHelper.fixTooltips(".gv-tooltips","top"),this.graphConfig?(_.each(this.graphConfig,function(a,b){$("#g_"+b).val(a)}),$("#g_nodeLabelThreshold_label").text(this.graphConfig.nodeLabelThreshold),$("#g_edgeLabelThreshold_label").text(this.graphConfig.edgeLabelThreshold)):this.setDefaults()}})}(),function(){"use strict";window.GraphViewer2=Backbone.View.extend({el:"#content",remove:function(){return this.$el.empty().off(),this.stopListening(),this},template:templateEngine.createTemplate("graphViewer2.ejs"),initialize:function(a){var b=this;a.id&&(this.setElement(a.id),this.graphData=a.data,this.aqlMode=!0),this.name=a.name,this.userConfig=a.userConfig,this.documentStore=a.documentStore,this.initSigma(),void 0!==this.name&&this.collection.fetch({cache:!1,success:function(c){b.model=b.collection.findWhere({_key:a.name}).toJSON()}})},colors:{hotaru:["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],random1:["#292F36","#4ECDC4","#F7FFF7","#DD6363","#FFE66D"]},aqlMode:!1,events:{"click #downloadPNG":"downloadSVG","click #reloadGraph":"reloadGraph","click #settingsMenu":"toggleSettings","click #noGraphToggle":"toggleSettings","click #toggleForce":"toggleLayout","click #selectNodes":"toggleLasso"},cursorX:0,cursorY:0,layouting:!1,model:null,viewStates:{captureMode:!1},graphConfig:null,graphSettings:null,initSigma:function(){try{sigma.classes.graph.addMethod("neighbors",function(a){var b,c={},d=this.allNeighborsIndex[a]||{};for(b in d)c[b]=this.nodesIndex[b];return c}),sigma.classes.graph.addMethod("getNodeEdges",function(a){var b=this.edges(),c=[];return _.each(b,function(b){b.source!==a&&b.target!==a||c.push(b.id)}),c})}catch(a){}},downloadSVG:function(){var a=this;this.currentGraph.toSVG({download:!0,filename:a.name+".svg",size:1e3})},resize:function(){$("#graph-container").width($(".centralContent").width()),$("#graph-container").height($(".centralRow").height()-150)},toggleSettings:function(){this.graphSettingsView.toggle()},render:function(a){this.$el.html(this.template.render({})),$("#subNavigationBar .breadcrumb").html("Graph: "+this.name),this.resize(),this.fetchGraph(a)},renderAQL:function(a){this.$el.html(this.template.render({})),this.$el.find(".headerBar").remove();var b=$(".centralRow").height()-250;this.$el.find("#graph-container").css("height",b),this.graphData.modified=this.parseData(this.graphData.original,this.graphData.graphInfo),this.renderGraph(this.graphData.modified)},parseData:function(a,b){var c={},d={},e={nodes:[],edges:[],settings:{}};return"object"===b?(_.each(a,function(a){a.edges&&a.vertices&&(_.each(a.edges,function(a){d[a._id]={id:a._id,source:a._from,label:a._key,color:"#cccccc",target:a._to}}),_.each(a.vertices,function(a){c[a._id]={id:a._id,label:a._key,size:.3,color:"#2ecc71",x:Math.random(),y:Math.random()}}))}),_.each(c,function(a){e.nodes.push(a)}),_.each(d,function(a){e.edges.push(a)})):"array"===b&&(_.each(a,function(a){c[a._from]=null,c[a._to]=null,e.edges.push({id:a._id,source:a._from,label:a._key,color:"#cccccc",target:a._to})}),_.each(c,function(a,b){e.nodes.push({id:b,label:b,size:.3,color:"#2ecc71",x:Math.random(),y:Math.random()})})),e},rerender:function(){this.fetchGraph()},fetchGraph:function(a){var b=this;$(this.el).append('
    Fetching graph data. Please wait ...


    If it`s taking too much time to draw the graph, please go to:
    '+window.location.href+"/settings
    and adjust your settings.It is possible that the graph is too big to be handled by the browser.
    ");var c=function(){var c={};this.graphConfig&&(c=_.clone(this.graphConfig),delete c.layout,delete c.edgeType,delete c.renderer),this.setupSigma(),$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_admin/aardvark/graph/"+encodeURIComponent(this.name)),contentType:"application/json",data:c,success:function(c){$("#calcText").html("Calculating layout. Please wait ... "),b.renderGraph(c,a)},error:function(a){try{arangoHelper.arangoError("Graph",a.responseJSON.exception);var c=a.responseJSON.exception.search("1205");if(-1!==c){var d='Starting point: '+b.graphConfig.nodeStart+" is invalid";$("#calculatingGraph").html('
    Stopped.

    '+d+'. Please choose a different start node.
    ')}else $("#calculatingGraph").html("Failed to fetch graph information.")}catch(e){}}})}.bind(this);this.getGraphSettings(c)},setupSigma:function(){if(this.graphConfig&&this.graphConfig.edgeLabel){sigma.utils.pkg("sigma.settings");var a={defaultEdgeLabelColor:"#000",defaultEdgeLabelActiveColor:"#000",defaultEdgeLabelSize:10,edgeLabelSize:"fixed",edgeLabelSizePowRatio:1,edgeLabelThreshold:1};sigma.settings=sigma.utils.extend(sigma.settings||{},a),sigma.settings.drawEdgeLabels=!0}},contextState:{createEdge:!1,_from:!1,_to:!1,fromX:!1,fromY:!1},clearOldContextMenu:function(a){var b=this;$("#nodeContextMenu").remove();var c='
    ';$("#graph-container").append(c),a&&_.each(this.contextState,function(a,c){b.contextState[c]=!1});var d=document.getElementsByClassName("sigma-mouse")[0];d.removeEventListener("mousemove",b.drawLine.bind(this),!1)},trackCursorPosition:function(a){this.cursorX=a.x,this.cursorY=a.y},deleteNode:function(){var a=this,b=$("#delete-node-attr-id").text(),c=b.split("/")[0],d=b.split("/")[1];if("yes"===$("#delete-node-edges-attr").val())$.ajax({cache:!1,type:"DELETE",contentType:"application/json",url:arangoHelper.databaseUrl("/_api/gharial/"+encodeURIComponent(a.name)+"/vertex/"+encodeURIComponent(b.split("/")[0])+"/"+encodeURIComponent(b.split("/")[1])),success:function(c){a.currentGraph.graph.dropNode(b),a.currentGraph.refresh()},error:function(){arangoHelper.arangoError("Graph","Could not delete node.")}});else{var e=function(c){c?arangoHelper.arangoError("Graph","Could not delete node."):(a.currentGraph.graph.dropNode(b),a.currentGraph.refresh())};this.documentStore.deleteDocument(c,d,e)}window.modalView.hide()},deleteNodeModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry("delete-node-attr-id","Really delete node",a)),c.push(window.modalView.createSelectEntry("delete-node-edges-attr","Also delete edges?",void 0,void 0,[{value:"yes",label:"Yes"},{value:"no",label:"No"}])),b.push(window.modalView.createDeleteButton("Delete",this.deleteNode.bind(this))),window.modalView.show("modalTable.ejs","Delete node",b,c)},addNode:function(){var a=this,b=$(".modal-body #new-node-collection-attr").val(),c=$(".modal-body #new-node-key-attr").last().val(),d=function(b,c,d){b?arangoHelper.arangoError("Could not create node",d.errorMessage):(a.currentGraph.graph.addNode({id:c,label:c.split("/")[1]||"",size:a.graphConfig.nodeSize||Math.random(),color:a.graphConfig.nodeColor||"#2ecc71",x:a.cursorX,y:a.cursorY}),window.modalView.hide(),a.currentGraph.refresh())};""!==c||void 0!==c?this.documentStore.createTypeDocument(b,c,d):this.documentStore.createTypeDocument(b,null,d)},deleteEdgeModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry("delete-edge-attr-id","Really delete edge",a)),b.push(window.modalView.createDeleteButton("Delete",this.deleteEdge.bind(this))),window.modalView.show("modalTable.ejs","Delete edge",b,c)},deleteEdge:function(){var a=this,b=$("#delete-edge-attr-id").text(),c=b.split("/")[0],d=b.split("/")[1],e=function(c){c?arangoHelper.arangoError("Graph","Could not delete edge."):(a.currentGraph.graph.dropEdge(b),a.currentGraph.refresh())};this.documentStore.deleteDocument(c,d,e),window.modalView.hide()},addNodeModal:function(){if(0!==this.graphSettings.vertexCollections){var a=[],b=[],c=[];_.each(this.graphSettings.vertexCollections,function(a){c.push({label:a.name,value:a.id})}),b.push(window.modalView.createTextEntry("new-node-key-attr","_key",void 0,"The nodes unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSelectEntry("new-node-collection-attr","Collection",void 0,"Please select the destination for the new node.",c)),a.push(window.modalView.createSuccessButton("Create",this.addNode.bind(this))),window.modalView.show("modalTable.ejs","Create node",a,b)}else arangoHelper.arangoError("Graph","No valid vertex collections found.")},addEdge:function(){var a,b=this,c=b.contextState._from,d=b.contextState._to;a=""===$(".modal-body #new-edge-collection-attr").val()?$(".modal-body #new-edge-collection-attr").text():$(".modal-body #new-edge-collection-attr").val();var e=$(".modal-body #new-edge-key-attr").last().val(),f=function(a,e){a?arangoHelper.arangoError("Graph","Could not create edge."):(b.graphConfig.edgeEditable?b.currentGraph.graph.addEdge({source:c,size:1,target:d,id:e._id,color:b.graphConfig.edgeColor}):b.currentGraph.graph.addEdge({source:c,target:d,id:e._id,color:b.graphConfig.edgeColor}),this.graphConfig&&"curve"===this.graphConfig.edgeType&&sigma.canvas.edges.autoCurve(b.currentGraph),b.currentGraph.refresh()),b.clearOldContextMenu(!0),window.modalView.hide()};""!==e||void 0!==e?this.documentStore.createTypeEdge(a,c,d,e,f):this.documentStore.createTypeEdge(a,c,d,null,f)},addEdgeModal:function(a){if(0!==a){var b=[],c=[];if(c.push(window.modalView.createTextEntry("new-edge-key-attr","_key",void 0,"The edges unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),a.length>1){var d=[];_.each(a,function(a){d.push({label:a,value:a})}),c.push(window.modalView.createSelectEntry("new-edge-collection-attr","Edge collection",void 0,"Please select the destination for the new edge.",d))}else c.push(window.modalView.createReadOnlyEntry("new-edge-collection-attr","Edge collection",a[0],"The edges collection to be used."));b.push(window.modalView.createSuccessButton("Create",this.addEdge.bind(this))),window.modalView.show("modalTable.ejs","Create edge",b,c)}else arangoHelper.arangoError("Graph","No valid edge definitions found.")},updateColors:function(){var a=window.App.currentDB.toJSON().name+"_"+this.name,b=this;this.userConfig.fetch({success:function(c){b.graphConfig=c.toJSON().graphs[a],b.currentGraph.graph.nodes().forEach(function(a){a.color=b.graphConfig.nodeColor}),b.currentGraph.graph.edges().forEach(function(a){a.color=b.graphConfig.edgeColor}),b.currentGraph.refresh()}})},createContextMenu:function(a){var b=this,c=b.cursorX-50,d=b.cursorY-50;this.clearOldContextMenu();var e=function(a){var c=wheelnav,d=new c("nodeContextMenu");d.maxPercent=1,d.wheelRadius=50,d.clockwise=!1,d.colors=b.colors.hotaru,d.multiSelect=!0,d.clickModeRotate=!1,d.slicePathFunction=slicePath().DonutSlice,b.viewStates.captureMode?d.createWheel([icon.plus,icon.trash]):d.createWheel([icon.plus,""]),d.navItems[0].selected=!1,d.navItems[0].hovered=!1,d.navItems[0].navigateFunction=function(a){b.clearOldContextMenu(),b.addNodeModal()},b.viewStates.captureMode&&(d.navItems[1].navigateFunction=function(a){b.clearOldContextMenu()}),d.navItems[0].selected=!1,d.navItems[0].hovered=!1};$("#nodeContextMenu").css("position","fixed"),$("#nodeContextMenu").css("left",c),$("#nodeContextMenu").css("top",d),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),e(a)},createEdgeContextMenu:function(a,b){var c=this,d=this.cursorX-165,e=this.cursorY-120;this.clearOldContextMenu();var f=function(a,b){var d=["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],e=wheelnav,f=new e("nodeContextMenu");f.maxPercent=1,f.wheelRadius=50,f.clockwise=!1,f.colors=d,f.multiSelect=!0,f.clickModeRotate=!1,f.slicePathFunction=slicePath().DonutSlice,f.createWheel([icon.edit,icon.trash]),f.navItems[0].selected=!1,f.navItems[0].hovered=!1,f.navItems[0].navigateFunction=function(a){c.clearOldContextMenu(),c.editEdge(b)},f.navItems[1].navigateFunction=function(a){c.clearOldContextMenu(),c.deleteEdgeModal(b)},f.navItems[0].selected=!1,f.navItems[0].hovered=!1};$("#nodeContextMenu").css("left",d+115),$("#nodeContextMenu").css("top",e+72),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),f(b,a)},createNodeContextMenu:function(a,b){var c,d,e=this;_.each(b.data.node,function(a,b){"renderer"===b.substr(0,8)&&"x"===b.charAt(b.length-1)&&(c=a),"renderer"===b.substr(0,8)&&"y"===b.charAt(b.length-1)&&(d=a)}),this.clearOldContextMenu();var f=function(a,b){var f=["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],g=wheelnav,h=new g("nodeContextMenu");h.maxPercent=1,h.wheelRadius=50,h.clockwise=!1,h.colors=f,h.multiSelect=!0,h.clickModeRotate=!1,h.slicePathFunction=slicePath().DonutSlice,h.createWheel([icon.edit,icon.trash,icon.play,icon.connect]),h.navItems[0].selected=!1,h.navItems[0].hovered=!1,h.navItems[0].navigateFunction=function(a){e.clearOldContextMenu(),e.editNode(b)},h.navItems[1].navigateFunction=function(a){e.clearOldContextMenu(),e.deleteNodeModal(b)},h.navItems[2].navigateFunction=function(a){e.clearOldContextMenu(),e.setStartNode(b)},h.navItems[3].navigateFunction=function(a){e.contextState.createEdge=!0,e.contextState._from=b,e.contextState.fromX=c,e.contextState.fromY=d;var f=document.getElementsByClassName("sigma-mouse")[0];f.addEventListener("mousemove",e.drawLine.bind(this),!1),e.clearOldContextMenu()},h.navItems[0].selected=!1,h.navItems[0].hovered=!1};$("#nodeContextMenu").css("left",c+115),$("#nodeContextMenu").css("top",d+72),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),f(b,a)},clearMouseCanvas:function(){var a=document.getElementsByClassName("sigma-mouse")[0],b=a.getContext("2d");b.clearRect(0,0,$(a).width(),$(a).height())},drawLine:function(a){var b=window.App.graphViewer2.contextState;if(b.createEdge){var c=b.fromX,d=b.fromY,e=a.offsetX,f=a.offsetY,g=document.getElementsByClassName("sigma-mouse")[0],h=g.getContext("2d");h.clearRect(0,0,$(g).width(),$(g).height()),h.beginPath(),h.moveTo(c,d),h.lineTo(e,f),h.stroke()}},getGraphSettings:function(a){var b=this,c=frontendConfig.db+"_"+this.name;this.userConfig.fetch({success:function(d){b.graphConfig=d.toJSON().graphs[c],b.graphSettingsView&&b.graphSettingsView.remove(),b.graphSettingsView=new window.GraphSettingsView({name:b.name,userConfig:b.userConfig,saveCallback:b.render}),b.graphSettingsView.render(),a&&a(b.graphConfig)}})},setStartNode:function(a){this.graphConfig.nodeStart=a,this.graphSettingsView.saveGraphSettings(null,a)},editNode:function(a){var b=function(){};arangoHelper.openDocEditor(a,"doc",b)},editEdge:function(a){var b=function(){};arangoHelper.openDocEditor(a,"edge",b)},reloadGraph:function(){Backbone.history.loadUrl(Backbone.history.fragment)},getEdgeDefinitionCollections:function(a,b){var c=[];return _.each(this.model.edgeDefinitions,function(d){_.each(d.from,function(e){e===a&&_.each(d.to,function(a){a===b&&c.push(d.collection)})})}),c},initializeGraph:function(a,b){var c=this;a.refresh(),this.Sigma.plugins.Lasso=sigma.plugins.lasso;var d=new this.Sigma.plugins.Lasso(a,a.renderers[0],{strokeStyle:"black",lineWidth:1,fillWhileDrawing:!0,fillStyle:"rgba(41, 41, 41, 0.2)",cursor:"crosshair"});return d.bind("selectedNodes",function(b){var d=b.data;a.graph.nodes().forEach(function(a){a.color=c.graphConfig.nodeColor?c.graphConfig.nodeColor:"rgb(46, 204, 113)"}),d.forEach(function(a){a.color="red"}),a.refresh()}),d},renderGraph:function(a,b){var c=this;if(this.graphSettings=a.settings,0===a.edges.length){var d='No edges found for starting point: '+c.graphSettings.startVertex._id+"";return void $("#calculatingGraph").html('
    Stopped.

    '+d+'. Please choose a different start node or try to reload the graph.
    ')}var e="position: absolute; left: 25px; bottom: 45px;";this.aqlMode&&(e="position: absolute; left: 30px; margin-top: -37px;"),$(this.el).append('
    '+a.nodes.length+' nodes'+a.edges.length+" edges
    "),this.Sigma=sigma;var f="force",g="canvas";this.graphConfig&&(this.graphConfig.layout&&(f=this.graphConfig.layout),this.graphConfig.renderer&&(g=this.graphConfig.renderer,"canvas"===g&&(c.isEditable=!0)));var h={doubleClickEnabled:!1,minNodeSize:3.5,minEdgeSize:1,maxEdgeSize:4,enableEdgeHovering:!0,edgeHoverColor:"#000",defaultEdgeHoverColor:"#000",defaultEdgeType:"line",edgeHoverSizeRatio:2,edgeHoverExtremities:!0,autoRescale:!0,mouseEnabled:!0,touchEnabled:!0,nodesPowRatio:1,font:"Roboto",edgesPowRatio:1};"canvas"===g&&(h.autoCurveSortByDirection=!0),a.nodes.length>500&&(h.labelThreshold=15,h.hideEdgesOnMove=!0),this.graphConfig&&(this.graphConfig.edgeType&&(h.defaultEdgeType=this.graphConfig.edgeType,"arrow"===this.graphConfig.edgeType&&(h.minArrowSize=7)),this.graphConfig.nodeLabelThreshold&&(h.labelThreshold=this.graphConfig.nodeLabelThreshold),this.graphConfig.edgeLabelThreshold&&(h.edgeLabelThreshold=this.graphConfig.edgeLabelThreshold)),"webgl"===g&&(h.enableEdgeHovering=!1);var i=new this.Sigma({graph:a,container:"graph-container",renderer:{container:document.getElementById("graph-container"),type:g},settings:h});if(this.currentGraph=i,this.aqlMode||sigma.plugins.fullScreen({container:"graph-container",btnId:"graph-fullscreen-btn"}),"noverlap"===f){var j=i.configNoverlap({nodeMargin:.1,scaleNodes:1.05,gridSize:75,easing:"quadraticInOut",duration:1e4});j.bind("start stop interpolate",function(a){"start"===a.type,"interpolate"===a.type})}else if("fruchtermann"===f){var k=sigma.layouts.fruchtermanReingold.configure(i,{iterations:500,easing:"quadraticInOut",duration:800});k.bind("start stop interpolate",function(a){})}if(i.graph.nodes().forEach(function(a){a.originalColor=a.color}),i.graph.edges().forEach(function(a){a.originalColor=a.color}),"canvas"===g&&(this.graphConfig&&"curve"===this.graphConfig.edgeType&&sigma.canvas.edges.autoCurve(i),i.refresh(),c.aqlMode||i.bind("rightClickStage",function(a){c.createContextMenu(a),c.clearMouseCanvas()}),i.bind("overNode",function(a){if($(".nodeInfoDiv").remove(),c.contextState.createEdge===!1){var b=function(a,b){if(!a){var d={},e=0,f=!1;_.each(b,function(a,b){15>e?"string"==typeof a&&(a.length>10?d[b]=a.substr(0,15)+" ...":d[b]=a):f=!0,e++});var g='
    '+JSON.stringify(d,null,2);f?(g=g.substr(0,g.length-2),g+=" \n\n  ... \n\n } 
    "):g+="",$(c.el).append(g)}};c.documentStore.getDocument(a.data.node.id.split("/")[0],a.data.node.id.split("/")[1],b)}}),i.bind("outNode",function(a){c.contextState.createEdge===!1&&$(".nodeInfoDiv").remove()}),i.bind("clickNode",function(a){if(c.contextState.createEdge===!0){c.contextState._to=a.data.node.id;var b=c.contextState._from.split("/")[0],d=c.contextState._to.split("/")[0],e=c.getEdgeDefinitionCollections(b,d);c.addEdgeModal(e,c.contextState._from,c.contextState._to)}}),this.aqlMode||i.bind("rightClickNode",function(a){var b=a.data.node.id;c.createNodeContextMenu(b,a)}),this.graphConfig&&this.graphConfig.edgeEditable&&i.bind("rightClickEdge",function(a){var b=a.data.edge.id;c.createEdgeContextMenu(b,a)}),i.bind("doubleClickNode",function(a){var b=a.data.node.id,c=i.graph.neighbors(b);c[b]=a.data.node,i.graph.nodes().forEach(function(a){c[a.id]?a.color=a.originalColor:a.color="#eee"}),i.graph.edges().forEach(function(a){c[a.source]&&c[a.target]?a.color="rgb(64, 74, 83)":a.color="#eee"}),i.refresh()}),i.bind("doubleClickStage",function(){i.graph.nodes().forEach(function(a){a.color=a.originalColor}),i.graph.edges().forEach(function(a){a.color=a.originalColor}),i.refresh()}),i.bind("clickStage",function(){c.clearOldContextMenu(!0),c.clearMouseCanvas()})),"noverlap"===f)i.startNoverlap(),sigma.plugins.dragNodes(i,i.renderers[0]);else if("force"===f){var l="color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; bottom: 40px;";c.aqlMode&&(l="color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; margin-top: -30px;"),$(this.el).append('
    '),c.startLayout();var m=3e3;a.nodes.length>2500?m=5e3:a.nodes.length<50&&(m=500),window.setTimeout(function(){c.stopLayout()},m)}else"fruchtermann"===f?(sigma.layouts.fruchtermanReingold.start(i),sigma.plugins.dragNodes(i,i.renderers[0])):sigma.plugins.dragNodes(i,i.renderers[0]);var n=document.getElementsByClassName("sigma-mouse")[0];n.addEventListener("mousemove",c.trackCursorPosition.bind(this),!1),b&&$("#"+b).focus();var o=function(){c.graphLasso=c.initializeGraph(i,a),c.graphLasso.activate(),c.graphLasso.deactivate()};this.graphConfig?"canvas"===this.graphConfig.renderer?o():$("#selectNodes").parent().hide():"canvas"===g?o():$("#selectNodes").parent().hide(),c.graphLasso&&(window.App.listenerFunctions.graphViewer=this.keyUpFunction.bind(this)),$("#calculatingGraph").remove()},keyUpFunction:function(a){var b=this;switch(a.keyCode){case 76:a.altKey&&b.toggleLasso()}},toggleLayout:function(){this.layouting?this.stopLayout():this.startLayout()},toggleLasso:function(){this.graphLasso.isActive?($("#selectNodes").removeClass("activated"),this.graphLasso.deactivate()):($("#selectNodes").addClass("activated"),this.graphLasso.activate())},startLayout:function(){$("#toggleForce .fa").removeClass("fa-play").addClass("fa-pause"),this.layouting=!0,this.currentGraph.startForceAtlas2({worker:!0,barnesHutOptimize:!1}),sigma.plugins.dragNodes(this.currentGraph,this.currentGraph.renderers[0])},stopLayout:function(){$("#toggleForce .fa").removeClass("fa-pause").addClass("fa-play"),this.layouting=!1,this.currentGraph.stopForceAtlas2(),sigma.plugins.dragNodes(this.currentGraph,this.currentGraph.renderers[0])}})}(),function(){"use strict";window.HelpUsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("helpUsView.ejs"),render:function(){this.$el.html(this.template.render({}))}})}(),function(){"use strict";window.IndicesView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},template:templateEngine.createTemplate("indicesView.ejs"),events:{},render:function(){$(this.el).html(this.template.render({model:this.model})),this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Indices"),this.getIndex()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},getIndex:function(){var a=function(a,b){a?window.arangoHelper.arangoError("Index",b.errorMessage):this.renderIndex(b)}.bind(this);this.model.getIndex(a)},createIndex:function(){var a,b,c,d=this,e=$("#newIndexType").val(),f={};switch(e){case"Geo":a=$("#newGeoFields").val();var g=d.checkboxToValue("#newGeoJson");f={type:"geo",fields:d.stringToArray(a),geoJson:g};break;case"Persistent":a=$("#newPersistentFields").val(),b=d.checkboxToValue("#newPersistentUnique"),c=d.checkboxToValue("#newPersistentSparse"),f={type:"persistent",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Hash":a=$("#newHashFields").val(),b=d.checkboxToValue("#newHashUnique"),c=d.checkboxToValue("#newHashSparse"),f={type:"hash",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Fulltext":a=$("#newFulltextFields").val();var h=parseInt($("#newFulltextMinLength").val(),10)||0;f={type:"fulltext",fields:d.stringToArray(a),minLength:h};break;case"Skiplist":a=$("#newSkiplistFields").val(),b=d.checkboxToValue("#newSkiplistUnique"),c=d.checkboxToValue("#newSkiplistSparse"),f={type:"skiplist",fields:d.stringToArray(a),unique:b,sparse:c}}var i=function(a,b){if(a)if(b){var c=JSON.parse(b.responseText);arangoHelper.arangoError("Document error",c.errorMessage)}else arangoHelper.arangoError("Document error","Could not create index.");d.toggleNewIndexView(),d.render()};this.model.createIndex(f,i)},bindIndexEvents:function(){this.unbindIndexEvents();var a=this;$("#indexEditView #addIndex").bind("click",function(){a.toggleNewIndexView(),$("#cancelIndex").unbind("click"),$("#cancelIndex").bind("click",function(){a.toggleNewIndexView(),a.render()}),$("#createIndex").unbind("click"),$("#createIndex").bind("click",function(){a.createIndex()})}),$("#newIndexType").bind("change",function(){a.selectIndexType()}),$(".deleteIndex").bind("click",function(b){a.prepDeleteIndex(b)}),$("#infoTab a").bind("click",function(a){if($("#indexDeleteModal").remove(),"Indices"!==$(a.currentTarget).html()||$(a.currentTarget).parent().hasClass("active")||($("#newIndexView").hide(),$("#indexEditView").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-danger").hide(),$("#indexHeaderContent #modal-dialog .modal-footer .button-success").hide(),$("#indexHeaderContent #modal-dialog .modal-footer .button-notification").hide()),"General"===$(a.currentTarget).html()&&!$(a.currentTarget).parent().hasClass("active")){$("#indexHeaderContent #modal-dialog .modal-footer .button-danger").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-success").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-notification").show();var b=$(".index-button-bar2")[0];$("#cancelIndex").is(":visible")&&($("#cancelIndex").detach().appendTo(b),$("#createIndex").detach().appendTo(b))}})},prepDeleteIndex:function(a){var b=this;this.lastTarget=a,this.lastId=$(this.lastTarget.currentTarget).parent().parent().first().children().first().text(),$("#content #modal-dialog .modal-footer").after(''),$("#indexHeaderContent #indexConfirmDelete").unbind("click"),$("#indexHeaderContent #indexConfirmDelete").bind("click",function(){$("#indexHeaderContent #indexDeleteModal").remove(),b.deleteIndex()}),$("#indexHeaderContent #indexAbortDelete").unbind("click"),$("#indexHeaderContent #indexAbortDelete").bind("click",function(){$("#indexHeaderContent #indexDeleteModal").remove()})},unbindIndexEvents:function(){$("#indexHeaderContent #indexEditView #addIndex").unbind("click"),$("#indexHeaderContent #newIndexType").unbind("change"),$("#indexHeaderContent #infoTab a").unbind("click"),$("#indexHeaderContent .deleteIndex").unbind("click")},deleteIndex:function(){var a=function(a){a?(arangoHelper.arangoError("Could not delete index"),$("tr th:contains('"+this.lastId+"')").parent().children().last().html(''),this.model.set("locked",!1)):a||void 0===a||($("tr th:contains('"+this.lastId+"')").parent().remove(),this.model.set("locked",!1))}.bind(this);this.model.set("locked",!0),this.model.deleteIndex(this.lastId,a),$("tr th:contains('"+this.lastId+"')").parent().children().last().html('')},renderIndex:function(a){this.index=a;var b="collectionInfoTh modal-text";if(this.index){var c="",d="";_.each(this.index.indexes,function(a){d="primary"===a.type||"edge"===a.type?'':'',void 0!==a.fields&&(c=a.fields.join(", "));var e=a.id.indexOf("/"),f=a.id.substr(e+1,a.id.length),g=a.hasOwnProperty("selectivityEstimate")?(100*a.selectivityEstimate).toFixed(2)+"%":"n/a",h=a.hasOwnProperty("sparse")?a.sparse:"n/a";$("#collectionEditIndexTable").append(""+f+""+a.type+""+a.unique+""+h+""+g+""+c+""+d+"")})}this.bindIndexEvents()},selectIndexType:function(){$(".newIndexClass").hide();var a=$("#newIndexType").val();$("#newIndexType"+a).show()},resetIndexForms:function(){$("#indexHeader input").val("").prop("checked",!1),$("#newIndexType").val("Geo").prop("selected",!0),this.selectIndexType()},toggleNewIndexView:function(){var a=$(".index-button-bar2")[0];$("#indexEditView").is(":visible")?($("#indexEditView").hide(),$("#newIndexView").show(),$("#cancelIndex").detach().appendTo("#indexHeaderContent #modal-dialog .modal-footer"),$("#createIndex").detach().appendTo("#indexHeaderContent #modal-dialog .modal-footer")):($("#indexEditView").show(), -$("#newIndexView").hide(),$("#cancelIndex").detach().appendTo(a),$("#createIndex").detach().appendTo(a)),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","right"),this.resetIndexForms()},stringToArray:function(a){var b=[];return a.split(",").forEach(function(a){a=a.replace(/(^\s+|\s+$)/g,""),""!==a&&b.push(a)}),b},checkboxToValue:function(a){return $(a).prop("checked")}})}(),function(){"use strict";window.InfoView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},events:{},render:function(){this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Info"),this.renderInfoView()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},renderInfoView:function(){if(this.model.get("locked"))return 0;var a=function(a,b,c){if(a)arangoHelper.arangoError("Figures","Could not get revision.");else{var d=[],e={figures:c,revision:b,model:this.model};window.modalView.show("modalCollectionInfo.ejs","Collection: "+this.model.get("name"),d,e,null,null,null,null,null,"content")}}.bind(this),b=function(b,c){if(b)arangoHelper.arangoError("Figures","Could not get figures.");else{var d=c;this.model.getRevision(a,d)}}.bind(this);this.model.getFigures(b)}})}(),function(){"use strict";window.LoginView=Backbone.View.extend({el:"#content",el2:".header",el3:".footer",loggedIn:!1,loginCounter:0,events:{"keyPress #loginForm input":"keyPress","click #submitLogin":"validate","submit #dbForm":"goTo","click #logout":"logout","change #loginDatabase":"renderDBS"},template:templateEngine.createTemplate("loginView.ejs"),render:function(a){var b=this;if($(this.el).html(this.template.render({})),$(this.el2).hide(),$(this.el3).hide(),frontendConfig.authenticationEnabled&&a!==!0)window.setTimeout(function(){$("#loginUsername").focus()},300);else{var c=arangoHelper.databaseUrl("/_api/database/user");frontendConfig.authenticationEnabled===!1&&($("#logout").hide(),$(".login-window #databases").css("height","90px")),$("#loginForm").hide(),$(".login-window #databases").show(),$.ajax(c).success(function(a){$("#loginDatabase").html(""),_.each(a.result,function(a){$("#loginDatabase").append("")}),b.renderDBS()}).error(function(){console.log("could not fetch user db data")})}return $(".bodyWrapper").show(),this},clear:function(){$("#loginForm input").removeClass("form-error"),$(".wrong-credentials").hide()},keyPress:function(a){a.ctrlKey&&13===a.keyCode?(a.preventDefault(),this.validate()):a.metaKey&&13===a.keyCode&&(a.preventDefault(),this.validate())},validate:function(a){a.preventDefault(),this.clear();var b=$("#loginUsername").val(),c=$("#loginPassword").val();b&&this.collection.login(b,c,this.loginCallback.bind(this,b,c))},loginCallback:function(a,b,c){var d=this;if(c){if(0===d.loginCounter)return d.loginCounter++,void d.collection.login(a,b,this.loginCallback.bind(this,a));d.loginCounter=0,$(".wrong-credentials").show(),$("#loginDatabase").html(""),$("#loginDatabase").append("")}else{var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database","_system");frontendConfig.authenticationEnabled===!1&&(e=arangoHelper.databaseUrl("/_api/database/user")),$(".wrong-credentials").hide(),d.loggedIn=!0,$.ajax(e).success(function(a){_.each(a.result,function(b,c){"rw"!==b&&delete a.result[c]}),$("#loginForm").hide(),$(".login-window #databases").show(),$("#loginDatabase").html(""),_.each(a.result,function(a,b){$("#loginDatabase").append("")}),d.renderDBS()}).error(function(){$(".wrong-credentials").show()})}},renderDBS:function(){if(0===$("#loginDatabase").children().length)$("#dbForm").remove(),$(".login-window #databases").prepend('
    You do not have permission to a database.
    ');else{var a=$("#loginDatabase").val();$("#goToDatabase").html("Select DB: "+a),window.setTimeout(function(){$("#goToDatabase").focus()},300)}},logout:function(){this.collection.logout()},goTo:function(a){a.preventDefault();var b=$("#loginUsername").val(),c=$("#loginDatabase").val();window.App.dbSet=c;var d=function(a){a&&arangoHelper.arangoError("User","Could not fetch user settings")},e=window.location.protocol+"//"+window.location.host+frontendConfig.basePath+"/_db/"+c+"/_admin/aardvark/index.html";window.location.href=e,$(this.el2).show(),$(this.el3).show(),$(".bodyWrapper").show(),$(".navbar").show(),$("#currentUser").text(b),this.collection.loadUserSettings(d)}})}(),function(){"use strict";window.LogsView=window.PaginationView.extend({el:"#content",id:"#logContent",paginationDiv:"#logPaginationDiv",idPrefix:"logTable",fetchedAmount:!1,initialize:function(a){this.options=a,this.convertModelToJSON()},currentLoglevel:"logall",events:{"click #arangoLogTabbar button":"setActiveLoglevel","click #logTable_first":"firstPage","click #logTable_last":"lastPage"},template:templateEngine.createTemplate("logsView.ejs"),tabbar:templateEngine.createTemplate("arangoTabbar.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),tabbarElements:{id:"arangoLogTabbar",titles:[["All","logall"],["Info","loginfo"],["Error","logerror"],["Warning","logwarning"],["Debug","logdebug"]]},tableDescription:{id:"arangoLogTable",titles:["Loglevel","Date","Message"],rows:[]},convertedRows:null,setActiveLoglevel:function(a){$(".arangodb-tabbar").removeClass("arango-active-tab"),this.currentLoglevel!==a.currentTarget.id&&(this.currentLoglevel=a.currentTarget.id,this.convertModelToJSON())},initTotalAmount:function(){var a=this;this.collection=this.options[this.currentLoglevel],this.collection.fetch({data:$.param({test:!0}),success:function(){a.convertModelToJSON()}}),this.fetchedAmount=!0},invertArray:function(a){var b,c=[],d=0;for(b=a.length-1;b>=0;b--)c[d]=a[b],d++;return c},convertModelToJSON:function(){if(!this.fetchedAmount)return void this.initTotalAmount();var a,b=this,c=[];this.collection=this.options[this.currentLoglevel],this.collection.fetch({success:function(){b.collection.each(function(b){a=new Date(1e3*b.get("timestamp")),c.push([b.getLogStatus(),arangoHelper.formatDT(a),b.get("text")])}),b.tableDescription.rows=b.invertArray(c),b.render()}})},render:function(){return $(this.el).html(this.template.render({})),$(this.id).html(this.tabbar.render({content:this.tabbarElements})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#"+this.currentLoglevel).addClass("arango-active-tab"),$("#logContent").append('
    '),this.renderPagination(),this},rerender:function(){this.convertModelToJSON()}})}(),function(){"use strict";var a=function(a,b,c,d){return{type:a,title:b,callback:c,confirm:d}},b=function(a,b,c,d,e,f,g,h,i,j,k){var l={type:a,label:b};return void 0!==c&&(l.value=c),void 0!==d&&(l.info=d),void 0!==e&&(l.placeholder=e),void 0!==f&&(l.mandatory=f),void 0!==h&&(l.addDelete=h),void 0!==i&&(l.addAdd=i),void 0!==j&&(l.maxEntrySize=j),void 0!==k&&(l.tags=k),g&&(l.validateInput=function(){return g}),l};window.ModalView=Backbone.View.extend({_validators:[],_validateWatchers:[],baseTemplate:templateEngine.createTemplate("modalBase.ejs"),tableTemplate:templateEngine.createTemplate("modalTable.ejs"),el:"#modalPlaceholder",contentEl:"#modalContent",hideFooter:!1,confirm:{list:"#modal-delete-confirmation",yes:"#modal-confirm-delete",no:"#modal-abort-delete"},enabledHotkey:!1,enableHotKeys:!0,buttons:{SUCCESS:"success",NOTIFICATION:"notification",DELETE:"danger",NEUTRAL:"neutral",CLOSE:"close"},tables:{READONLY:"readonly",TEXT:"text",BLOB:"blob",PASSWORD:"password",SELECT:"select",SELECT2:"select2",CHECKBOX:"checkbox"},initialize:function(){Object.freeze(this.buttons),Object.freeze(this.tables)},createModalHotkeys:function(){$(this.el).unbind("keydown"),$(this.el).unbind("return"),$(this.el).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()}),$(".modal-body input").unbind("keydown"),$(".modal-body input").unbind("return"),$(".modal-body input",$(this.el)).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()}),$(".modal-body select").unbind("keydown"),$(".modal-body select").unbind("return"),$(".modal-body select",$(this.el)).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()})},createInitModalHotkeys:function(){var a=this;$(this.el).bind("keydown","left",function(){a.navigateThroughButtons("left")}),$(this.el).bind("keydown","right",function(){a.navigateThroughButtons("right")})},navigateThroughButtons:function(a){var b=$(".createModalDialog .modal-footer button").is(":focus");b===!1?"left"===a?$(".createModalDialog .modal-footer button").first().focus():"right"===a&&$(".createModalDialog .modal-footer button").last().focus():b===!0&&("left"===a?$(":focus").prev().focus():"right"===a&&$(":focus").next().focus())},createCloseButton:function(b,c){var d=this;return a(this.buttons.CLOSE,b,function(){d.hide(),c&&c()})},createSuccessButton:function(b,c){return a(this.buttons.SUCCESS,b,c)},createNotificationButton:function(b,c){return a(this.buttons.NOTIFICATION,b,c)},createDeleteButton:function(b,c,d){return a(this.buttons.DELETE,b,c,d)},createNeutralButton:function(b,c){return a(this.buttons.NEUTRAL,b,c)},createDisabledButton:function(b){var c=a(this.buttons.NEUTRAL,b);return c.disabled=!0,c},createReadOnlyEntry:function(a,c,d,e,f,g){var h=b(this.tables.READONLY,c,d,e,void 0,void 0,void 0,f,g);return h.id=a,h},createTextEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.TEXT,c,d,e,f,g,h);return i.id=a,i},createBlobEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.BLOB,c,d,e,f,g,h);return i.id=a,i},createSelect2Entry:function(a,c,d,e,f,g,h,i,j,k){var l=b(this.tables.SELECT2,c,d,e,f,g,void 0,h,i,j,k);return l.id=a,l},createPasswordEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.PASSWORD,c,d,e,f,g,h);return i.id=a,i},createCheckboxEntry:function(a,c,d,e,f){var g=b(this.tables.CHECKBOX,c,d,e);return g.id=a,f&&(g.checked=f),g},createSelectEntry:function(a,c,d,e,f){var g=b(this.tables.SELECT,c,null,e);return g.id=a,d&&(g.selected=d),g.options=f,g},createOptionEntry:function(a,b){return{label:a,value:b||a}},show:function(a,b,c,d,e,f,g,h,i,j){var k,l,m=this,n=!1;c=c||[],h=Boolean(h),this.clearValidators(),c.length>0?(c.forEach(function(a){a.type===m.buttons.CLOSE&&(n=!0),a.type===m.buttons.DELETE&&(l=l||a.confirm)}),n||(k=c.pop(),c.push(m.createCloseButton("Cancel")),c.push(k))):c.push(m.createCloseButton("Close")),j?($("#"+j).html(this.baseTemplate.render({title:b,buttons:c,hideFooter:this.hideFooter,confirm:l,tabBar:i})),$("#"+j+" #modal-dialog").removeClass("fade hide modal"),$("#"+j+" .modal-header").remove(),$("#"+j+" .modal-tabbar").remove(),$("#"+j+" .modal-tabbar").remove(),$("#"+j+" .button-close").remove(),0===$("#"+j+" .modal-footer").children().length&&$("#"+j+" .modal-footer").remove()):$(this.el).html(this.baseTemplate.render({title:b,buttons:c,hideFooter:this.hideFooter,confirm:l,tabBar:i})),_.each(c,function(a,b){if(!a.disabled&&a.callback){if(a.type===m.buttons.DELETE&&!h){var c="#modalButton"+b;return j&&(c="#"+j+" #modalButton"+b),void $(c).bind("click",function(){j?($("#"+j+" "+m.confirm.yes).unbind("click"),$("#"+j+" "+m.confirm.yes).bind("click",a.callback),$("#"+j+" "+m.confirm.list).css("display","block")):($(m.confirm.yes).unbind("click"),$(m.confirm.yes).bind("click",a.callback),$(m.confirm.list).css("display","block"))})}j?$("#"+j+" #modalButton"+b).bind("click",a.callback):$("#modalButton"+b).bind("click",a.callback)}}),j?$("#"+j+" "+this.confirm.no).bind("click",function(){$("#"+j+" "+m.confirm.list).css("display","none")}):$(this.confirm.no).bind("click",function(){$(m.confirm.list).css("display","none")});var o;if("string"==typeof a)o=templateEngine.createTemplate(a),j?$("#"+j+" .createModalDialog .modal-body").html(o.render({content:d,advancedContent:e,info:f})):$("#modalPlaceholder .createModalDialog .modal-body").html(o.render({content:d,advancedContent:e,info:f}));else{var p=0;_.each(a,function(a){o=templateEngine.createTemplate(a),$(".createModalDialog .modal-body .tab-content #"+i[p]).html(o.render({content:d,advancedContent:e,info:f})),p++})}$(".createModalDialog .modalTooltips").tooltip({position:{my:"left top",at:"right+55 top-1"}});var q=d||[];e&&e.content&&(q=q.concat(e.content)),_.each(q,function(a){m.modalBindValidation(a),a.type===m.tables.SELECT2&&$("#"+a.id).select2({tags:a.tags||[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:a.maxEntrySize||8})}),g&&(this.events=g,this.delegateEvents()),$("#accordion2")&&($("#accordion2 .accordion-toggle").bind("click",function(){$("#collapseOne").is(":visible")?($("#collapseOne").hide(),setTimeout(function(){$(".accordion-toggle").addClass("collapsed")},100)):($("#collapseOne").show(),setTimeout(function(){$(".accordion-toggle").removeClass("collapsed")},100))}),$("#collapseOne").hide(),setTimeout(function(){$(".accordion-toggle").addClass("collapsed")},100)),j||$("#modal-dialog").modal("show"),this.enabledHotkey===!1&&(this.createInitModalHotkeys(),this.enabledHotkey=!0),this.enableHotKeys&&this.createModalHotkeys();var r;r=j?$("#"+j+" #modal-dialog").find("input"):$("#modal-dialog").find("input"),r&&setTimeout(function(){r=j?$("#"+j+" #modal-dialog"):$("#modal-dialog"),r.length>0&&(r=r.find("input"),r.length>0&&$(r[0]).focus())},400)},modalBindValidation:function(a){var b=this;if(a.hasOwnProperty("id")&&a.hasOwnProperty("validateInput")){var c=function(){var b=$("#"+a.id),c=a.validateInput(b),d=!1;return _.each(c,function(a){var c=b.val();if(a.rule||(a={rule:a}),"function"==typeof a.rule)try{a.rule(c)}catch(e){d=a.msg||e.message}else{var f=Joi.validate(c,a.rule);f.error&&(d=a.msg||f.error.message)}return d?!1:void 0}),d?d:void 0},d=$("#"+a.id);d.on("keyup focusout",function(){var a=c(),e=d.next()[0];a?(d.addClass("invalid-input"),e?$(e).text(a):d.after('

    '+a+"

    "),$(".createModalDialog .modal-footer .button-success").prop("disabled",!0).addClass("disabled")):(d.removeClass("invalid-input"),e&&$(e).remove(),b.modalTestAll())}),this._validators.push(c),this._validateWatchers.push(d)}},modalTestAll:function(){var a=_.map(this._validators,function(a){return a()}),b=_.any(a);return b?$(".createModalDialog .modal-footer .button-success").prop("disabled",!0).addClass("disabled"):$(".createModalDialog .modal-footer .button-success").prop("disabled",!1).removeClass("disabled"),!b},clearValidators:function(){this._validators=[],_.each(this._validateWatchers,function(a){a.unbind("keyup focusout")}),this._validateWatchers=[]},hide:function(){this.clearValidators(),$("#modal-dialog").modal("hide")}})}(),function(){"use strict";window.NavigationView=Backbone.View.extend({el:"#navigationBar",subEl:"#subNavigationBar",events:{"change #arangoCollectionSelect":"navigateBySelect","click .tab":"navigateByTab","click li":"switchTab","click .arangodbLogo":"selectMenuItem","mouseenter .dropdown > *":"showDropdown","click .shortcut-icons p":"showShortcutModal","mouseleave .dropdown":"hideDropdown"},renderFirst:!0,activeSubMenu:void 0,changeDB:function(){window.location.hash="#login"},initialize:function(a){var b=this;this.userCollection=a.userCollection,this.currentDB=a.currentDB,this.dbSelectionView=new window.DBSelectionView({collection:a.database,current:this.currentDB}),this.userBarView=new window.UserBarView({userCollection:this.userCollection}),this.notificationView=new window.NotificationView({collection:a.notificationCollection}),this.statisticBarView=new window.StatisticBarView({currentDB:this.currentDB}),this.isCluster=a.isCluster,this.handleKeyboardHotkeys(),Backbone.history.on("all",function(){b.selectMenuItem()})},showShortcutModal:function(){arangoHelper.hotkeysFunctions.showHotkeysModal()},handleSelectDatabase:function(){this.dbSelectionView.render($("#dbSelect"))},template:templateEngine.createTemplate("navigationView.ejs"),templateSub:templateEngine.createTemplate("subNavigationView.ejs"),render:function(){var a=this;$(this.el).html(this.template.render({currentDB:this.currentDB,isCluster:this.isCluster})),"_system"!==this.currentDB.get("name")&&$("#dashboard").parent().remove(),$(this.subEl).html(this.templateSub.render({currentDB:this.currentDB.toJSON()})),this.dbSelectionView.render($("#dbSelect"));var b=function(a){a||this.userBarView.render()}.bind(this);return this.userCollection.whoAmI(b),this.renderFirst&&(this.renderFirst=!1,this.selectMenuItem(),$(".arangodbLogo").on("click",function(){a.selectMenuItem()}),$("#dbStatus").on("click",function(){a.changeDB()})),a.resize(),this},resize:function(){var a=$(window).height()-$(".subMenuEntries").first().height();$("#navigationBar").css("min-height",a),$("#navigationBar").css("height",a)},navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},handleKeyboardHotkeys:function(){arangoHelper.enableKeyboardHotkeys(!0)},navigateByTab:function(a){var b=a.target||a.srcElement,c=b.id,d=!1;$(b).hasClass("fa")||(""===c&&(c=$(b).attr("class")),"links"===c?(d=!0,$("#link_dropdown").slideToggle(1),a.preventDefault()):"tools"===c?(d=!0,$("#tools_dropdown").slideToggle(1),a.preventDefault()):"dbselection"===c&&(d=!0,$("#dbs_dropdown").slideToggle(1),a.preventDefault()),d||(window.App.navigate(c,{trigger:!0}),a.preventDefault()))},handleSelectNavigation:function(){var a=this;$("#arangoCollectionSelect").change(function(){a.navigateBySelect()})},subViewConfig:{documents:"collections",collection:"collections"},subMenuConfig:{cluster:[{name:"Dashboard",view:void 0,active:!0},{name:"Logs",view:void 0,disabled:!0}],collections:[{name:"",view:void 0,active:!1}],queries:[{name:"Editor",route:"query",active:!0},{name:"Running Queries",route:"queryManagement",params:{active:!0},active:void 0},{name:"Slow Query History",route:"queryManagement",params:{active:!1},active:void 0}]},renderSubMenu:function(a){var b=this;if(void 0===a&&(a=window.isCluster?"cluster":"dashboard"),this.subMenuConfig[a]){$(this.subEl+" .bottom").html("");var c="";_.each(this.subMenuConfig[a],function(a){c=a.active?"active":"",a.disabled&&(c="disabled"),$(b.subEl+" .bottom").append('"),a.disabled||$(b.subEl+" .bottom").children().last().bind("click",function(c){b.activeSubMenu=a,b.renderSubView(a,c)})})}},renderSubView:function(a,b){window.App[a.route]&&(window.App[a.route].resetState&&window.App[a.route].resetState(),window.App[a.route]()),$(this.subEl+" .bottom").children().removeClass("active"),$(b.currentTarget).addClass("active")},switchTab:function(a){var b=$(a.currentTarget).children().first().attr("id");b&&this.selectMenuItem(b+"-menu")},selectMenuItem:function(a,b){void 0===a&&(a=window.location.hash.split("/")[0],a=a.substr(1,a.length-1)),""===a?a=window.App.isCluster?"cluster":"dashboard":"cNodes"!==a&&"dNodes"!==a||(a="nodes");try{this.renderSubMenu(a.split("-")[0])}catch(c){this.renderSubMenu(a)}$(".navlist li").removeClass("active"),"string"==typeof a&&(b?$("."+this.subViewConfig[a]+"-menu").addClass("active"):a&&($("."+a).addClass("active"),$("."+a+"-menu").addClass("active"))),arangoHelper.hideArangoNotifications()},showSubDropdown:function(a){$(a.currentTarget).find(".subBarDropdown").toggle()},showDropdown:function(a){var b=a.target||a.srcElement,c=b.id;"links"===c||"link_dropdown"===c||"links"===a.currentTarget.id?$("#link_dropdown").fadeIn(1):"tools"===c||"tools_dropdown"===c||"tools"===a.currentTarget.id?$("#tools_dropdown").fadeIn(1):"dbselection"!==c&&"dbs_dropdown"!==c&&"dbselection"!==a.currentTarget.id||$("#dbs_dropdown").fadeIn(1)},hideDropdown:function(a){var b=a.target||a.srcElement;b=$(b).parent(),$("#link_dropdown").fadeOut(1),$("#tools_dropdown").fadeOut(1),$("#dbs_dropdown").fadeOut(1)}})}(),function(){"use strict";window.NodesView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodesView.ejs"),interval:5e3,knownServers:[],events:{"click #nodesContent .pure-table-body .pure-table-row":"navigateToNode"},initialize:function(a){var b=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),this.toRender=a.toRender,this.intervalFunction=window.setInterval(function(){"#cNodes"!==window.location.hash&&"#dNodes"!==window.location.hash&&"#nodes"!==window.location.hash||b.checkNodesState()},this.interval))},checkNodesState:function(){var a=function(a){_.each(a,function(a,b){_.each($(".pure-table-row"),function(c){$(c).attr("node")===b&&("GOOD"===a.Status?($(c).removeClass("noHover"),$(c).find(".state").html('')):($(c).addClass("noHover"),$(c).find(".state").html('')))})})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(b){a(b.Health)}})},navigateToNode:function(a){if("#dNodes"!==window.location.hash&&!$(a.currentTarget).hasClass("noHover")){var b=$(a.currentTarget).attr("node");window.App.navigate("#node/"+encodeURIComponent(b),{trigger:!0})}},render:function(){var a=function(){this.continueRender()}.bind(this);this.initDoneCoords?a():this.waitForCoordinators(a)},continueRender:function(){var a;a="coordinator"===this.toRender?this.coordinators.toJSON():this.dbServers.toJSON(),this.$el.html(this.template.render({coords:a,type:this.toRender})),window.arangoHelper.buildNodesSubNav(this.toRender),this.checkNodesState()},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(this.initDoneCoords=!0,a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NodesView2=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodesView2.ejs"),interval:1e4,knownServers:[],events:{"click #nodesContent .coords-nodes .pure-table-row":"navigateToNode","click #addCoord":"addCoord","click #removeCoord":"removeCoord","click #addDBs":"addDBs","click #removeDBs":"removeDBs"},initialize:function(){var a=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#nodes"===window.location.hash&&a.render(!1)},this.interval))},navigateToNode:function(a){if(!$(a.currentTarget).hasClass("noHover")){var b=$(a.currentTarget).attr("node").slice(0,-5);window.App.navigate("#node/"+encodeURIComponent(b),{trigger:!0})}},render:function(a){var b=this,c=function(a){$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",success:function(c){b.continueRender(a,c)}})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){c(a.Health)},error:function(){arangoHelper.arangoError("Cluster","Could not fetch cluster information")}}),a!==!1&&arangoHelper.buildNodesSubNav("Overview")},continueRender:function(a,b){var c={},d={},e=!1;_.each(a,function(a,b){"Coordinator"===a.Role?c[b]=a:"DBServer"===a.Role&&(d[b]=a)}),null!==b.numberOfDBServers&&null!==b.numberOfCoordinators&&(e=!0);var f=function(a){this.$el.html(this.template.render({coords:c,dbs:d,scaling:e,scaleProperties:a,plannedDBs:b.numberOfDBServers,plannedCoords:b.numberOfCoordinators})),e||($(".title").css("position","relative"),$(".title").css("top","-4px"),$(".sectionHeader .information").css("margin-top","-3px"))}.bind(this);this.renderCounts(e,f)},updatePlanned:function(a){a.numberOfCoordinators&&($("#plannedCoords").val(a.numberOfCoordinators),this.renderCounts(!0)),a.numberOfDBServers&&($("#plannedDBs").val(a.numberOfDBServers),this.renderCounts(!0))},setCoordSize:function(a){var b=this,c={numberOfCoordinators:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updatePlanned(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},setDBsSize:function(a){var b=this,c={numberOfDBServers:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updatePlanned(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},renderCounts:function(a,b){var c=function(b,c,d,e){var f=''+c+'';d&&a===!0&&(f=f+''+d+''),e&&(f=f+''+e+''),$(b).html(f),a||($(".title").css("position","relative"),$(".title").css("top","-4px"))},d=function(a){var d=0,e=0,f=0,g=0,h=0,i=0;_.each(a,function(a){"Coordinator"===a.Role?"GOOD"===a.Status?e++:d++:"DBServer"===a.Role&&("GOOD"===a.Status?g++:h++)}),$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",processData:!1,success:function(a){f=Math.abs(e+d-a.numberOfCoordinators),i=Math.abs(g+h-a.numberOfDBServers),b?b({coordsPending:f,coordsOk:e,coordsErrors:d,dbsPending:i,dbsOk:g,dbsErrors:h}):(c("#infoDBs",g,i,h),c("#infoCoords",e,f,d))}})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,success:function(a){d(a.Health)}})},addCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!0))},removeCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!1,!0))},addDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!0))},removeDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!1,!0))},readNumberFromID:function(a,b,c){var d=$(a).val(),e=!1;try{e=JSON.parse(d)}catch(f){}return b&&e++,c&&1!==e&&e--,e},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NodeView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodeView.ejs"),interval:5e3,dashboards:[],events:{},initialize:function(a){window.App.isCluster&&(this.coordinators=a.coordinators,this.dbServers=a.dbServers,this.coordname=a.coordname,this.updateServerTime())},breadcrumb:function(a){$("#subNavigationBar .breadcrumb").html("Node: "+a)},render:function(){this.$el.html(this.template.render({coords:[]}));var a=function(){this.continueRender(),this.breadcrumb(this.coordname),$(window).trigger("resize")}.bind(this);this.initCoordDone||this.waitForCoordinators(),this.initDBDone?(this.coordname=window.location.hash.split("/")[1],this.coordinator=this.coordinators.findWhere({name:this.coordname}),a()):this.waitForDBServers(a)},continueRender:function(){var a=this;this.dashboards[this.coordinator.get("name")]=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:window.App.arangoDatabase,serverToShow:{raw:this.coordinator.get("address"),isDBServer:!1,endpoint:this.coordinator.get("protocol")+"://"+this.coordinator.get("address"),target:this.coordinator.get("name")}}),this.dashboards[this.coordinator.get("name")].render(),window.setTimeout(function(){a.dashboards[a.coordinator.get("name")].resize()},500)},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(b.coordinator=b.coordinators.findWhere({name:b.coordname}),b.initCoordDone=!0,a&&a())},200)},waitForDBServers:function(a){var b=this;window.setTimeout(function(){0===b.dbServers[0].length?b.waitForDBServers(a):(b.initDBDone=!0,b.dbServer=b.dbServers[0],b.dbServer.each(function(a){"DBServer001"===a.get("name")&&(b.dbServer=a)}),a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NotificationView=Backbone.View.extend({events:{"click .navlogo #stat_hd":"toggleNotification","click .notificationItem .fa":"removeNotification","click #removeAllNotifications":"removeAllNotifications"},initialize:function(){this.collection.bind("add",this.renderNotifications.bind(this)),this.collection.bind("remove",this.renderNotifications.bind(this)),this.collection.bind("reset",this.renderNotifications.bind(this)),window.setTimeout(function(){frontendConfig.authenticationEnabled===!1&&frontendConfig.isCluster===!1&&arangoHelper.showAuthDialog()===!0&&window.arangoHelper.arangoWarning("Warning","Authentication is disabled. Do not use this setup in production mode.")},2e3)},notificationItem:templateEngine.createTemplate("notificationItem.ejs"),el:"#notificationBar",template:templateEngine.createTemplate("notificationView.ejs"),toggleNotification:function(){var a=this.collection.length;0!==a&&$("#notification_menu").toggle()},removeAllNotifications:function(){$.noty.clearQueue(),$.noty.closeAll(),this.collection.reset(),$("#notification_menu").hide()},removeNotification:function(a){var b=a.target.id;this.collection.get(b).destroy()},renderNotifications:function(a,b,c){if(c&&c.add){var d,e=this.collection.at(this.collection.length-1),f=e.get("title"),g=3e3,h=["click"];if(e.get("content")&&(f=f+": "+e.get("content")),"error"===e.get("type")?(g=!1,h=["button"],d=[{addClass:"button-danger",text:"Close",onClick:function(a){a.close()}}]):"warning"===e.get("type")&&(g=15e3,d=[{addClass:"button-warning",text:"Close",onClick:function(a){a.close()}},{addClass:"button-danger",text:"Don't show again.",onClick:function(a){a.close(),window.arangoHelper.doNotShowAgain()}}]),$.noty.clearQueue(),$.noty.closeAll(),noty({theme:"relax",text:f,template:'
    ',maxVisible:1,closeWith:["click"],type:e.get("type"),layout:"bottom",timeout:g,buttons:d,animation:{open:{height:"show"},close:{height:"hide"},easing:"swing",speed:200,closeWith:h}}),"success"===e.get("type"))return void e.destroy()}$("#stat_hd_counter").text(this.collection.length),0===this.collection.length?($("#stat_hd").removeClass("fullNotification"),$("#notification_menu").hide()):$("#stat_hd").addClass("fullNotification"),$(".innerDropdownInnerUL").html(this.notificationItem.render({notifications:this.collection})),$(".notificationInfoIcon").tooltip({position:{my:"left top",at:"right+55 top-1"}})},render:function(){return $(this.el).html(this.template.render({notifications:this.collection})),this.renderNotifications(),this.delegateEvents(),this.el}})}(),function(){"use strict";window.ProgressView=Backbone.View.extend({template:templateEngine.createTemplate("progressBase.ejs"),el:"#progressPlaceholder",el2:"#progressPlaceholderIcon",toShow:!1,lastDelay:0,action:function(){},events:{"click .progress-action button":"performAction"},performAction:function(){"function"==typeof this.action&&this.action(),window.progressView.hide()},initialize:function(){},showWithDelay:function(a,b,c,d){var e=this;e.toShow=!0,e.lastDelay=a,setTimeout(function(){e.toShow===!0&&e.show(b,c,d)},e.lastDelay)},show:function(a,b,c){$(this.el).html(this.template.render({})),$(".progress-text").text(a),c?$(".progress-action").html('"):$(".progress-action").html(''),b?this.action=b:this.action=this.hide(),$(this.el).show()},hide:function(){var a=this;a.toShow=!1,$(this.el).hide(),this.action=function(){}}})}(),function(){"use strict";window.QueryManagementView=Backbone.View.extend({el:"#content",id:"#queryManagementContent",templateActive:templateEngine.createTemplate("queryManagementViewActive.ejs"),templateSlow:templateEngine.createTemplate("queryManagementViewSlow.ejs"), -table:templateEngine.createTemplate("arangoTable.ejs"),active:!0,shouldRender:!0,timer:0,refreshRate:2e3,initialize:function(){var a=this;this.activeCollection=new window.QueryManagementActive,this.slowCollection=new window.QueryManagementSlow,this.convertModelToJSON(!0),window.setInterval(function(){"#queries"===window.location.hash&&window.VISIBLE&&a.shouldRender&&"queryManagement"===arangoHelper.getCurrentSub().route&&(a.active?$("#arangoQueryManagementTable").is(":visible")&&a.convertModelToJSON(!0):$("#arangoQueryManagementTable").is(":visible")&&a.convertModelToJSON(!1))},a.refreshRate)},events:{"click #deleteSlowQueryHistory":"deleteSlowQueryHistoryModal","click #arangoQueryManagementTable .fa-minus-circle":"deleteRunningQueryModal"},tableDescription:{id:"arangoQueryManagementTable",titles:["ID","Query String","Runtime","Started",""],rows:[],unescaped:[!1,!1,!1,!1,!0]},deleteRunningQueryModal:function(a){this.killQueryId=$(a.currentTarget).attr("data-id");var b=[],c=[];c.push(window.modalView.createReadOnlyEntry(void 0,"Running Query","Do you want to kill the running query?",void 0,void 0,!1,void 0)),b.push(window.modalView.createDeleteButton("Kill",this.killRunningQuery.bind(this))),window.modalView.show("modalTable.ejs","Kill Running Query",b,c),$(".modal-delete-confirmation strong").html("Really kill?")},killRunningQuery:function(){this.collection.killRunningQuery(this.killQueryId,this.killRunningQueryCallback.bind(this)),window.modalView.hide()},killRunningQueryCallback:function(){this.convertModelToJSON(!0),this.renderActive()},deleteSlowQueryHistoryModal:function(){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry(void 0,"Slow Query Log","Do you want to delete the slow query log entries?",void 0,void 0,!1,void 0)),a.push(window.modalView.createDeleteButton("Delete",this.deleteSlowQueryHistory.bind(this))),window.modalView.show("modalTable.ejs","Delete Slow Query Log",a,b)},deleteSlowQueryHistory:function(){this.collection.deleteSlowQueryHistory(this.slowQueryCallback.bind(this)),window.modalView.hide()},slowQueryCallback:function(){this.convertModelToJSON(!1),this.renderSlow()},render:function(){var a=arangoHelper.getCurrentSub();a.params.active?(this.active=!0,this.convertModelToJSON(!0)):(this.active=!1,this.convertModelToJSON(!1))},addEvents:function(){var a=this;$("#queryManagementContent tbody").on("mousedown",function(){clearTimeout(a.timer),a.shouldRender=!1}),$("#queryManagementContent tbody").on("mouseup",function(){a.timer=window.setTimeout(function(){a.shouldRender=!0},3e3)})},renderActive:function(){this.$el.html(this.templateActive.render({})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#activequeries").addClass("arango-active-tab"),this.addEvents()},renderSlow:function(){this.$el.html(this.templateSlow.render({})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#slowqueries").addClass("arango-active-tab"),this.addEvents()},convertModelToJSON:function(a){var b=this,c=[];a===!0?this.collection=this.activeCollection:this.collection=this.slowCollection,this.collection.fetch({success:function(){b.collection.each(function(b){var d="";a&&(d=''),c.push([b.get("id"),b.get("query"),b.get("runTime").toFixed(2)+" s",b.get("started"),d])});var d="No running queries.";a||(d="No slow queries."),0===c.length&&c.push([d,"","","",""]),b.tableDescription.rows=c,a?b.renderActive():b.renderSlow()}})}})}(),function(){"use strict";window.QueryView=Backbone.View.extend({el:"#content",bindParamId:"#bindParamEditor",myQueriesId:"#queryTable",template:templateEngine.createTemplate("queryView.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),outputDiv:"#outputEditors",outputTemplate:templateEngine.createTemplate("queryViewOutput.ejs"),outputCounter:0,allowUpload:!1,customQueries:[],queries:[],state:{lastQuery:{query:void 0,bindParam:void 0}},graphs:[],settings:{aqlWidth:void 0},currentQuery:{},initDone:!1,bindParamRegExp:/@(@?\w+\d*)/,bindParamTableObj:{},bindParamTableDesc:{id:"arangoBindParamTable",titles:["Key","Value"],rows:[]},myQueriesTableDesc:{id:"arangoMyQueriesTable",titles:["Name","Actions"],rows:[]},execPending:!1,aqlEditor:null,queryPreview:null,initialize:function(){this.refreshAQL()},allowParamToggle:!0,events:{"click #executeQuery":"executeQuery","click #explainQuery":"explainQuery","click #clearQuery":"clearQuery","click .outputEditorWrapper #downloadQueryResult":"downloadQueryResult","click .outputEditorWrapper .switchAce span":"switchAce","click .outputEditorWrapper .fa-close":"closeResult","click #toggleQueries1":"toggleQueries","click #toggleQueries2":"toggleQueries","click #saveCurrentQuery":"addAQL","click #exportQuery":"exportCustomQueries","click #importQuery":"openImportDialog","click #removeResults":"removeResults","click #querySpotlight":"showSpotlight","click #deleteQuery":"selectAndDeleteQueryFromTable","click #explQuery":"selectAndExplainQueryFromTable","keydown #arangoBindParamTable input":"updateBindParams","change #arangoBindParamTable input":"updateBindParams","click #arangoMyQueriesTable tbody tr":"showQueryPreview","dblclick #arangoMyQueriesTable tbody tr":"selectQueryFromTable","click #arangoMyQueriesTable #copyQuery":"selectQueryFromTable","click #closeQueryModal":"closeExportDialog","click #confirmQueryImport":"importCustomQueries","click #switchTypes":"toggleBindParams","click #arangoMyQueriesTable #runQuery":"selectAndRunQueryFromTable"},clearQuery:function(){this.aqlEditor.setValue("",1)},toggleBindParams:function(){this.allowParamToggle?($("#bindParamEditor").toggle(),$("#bindParamAceEditor").toggle(),"JSON"===$("#switchTypes").text()?($("#switchTypes").text("Table"),this.updateQueryTable(),this.bindParamAceEditor.setValue(JSON.stringify(this.bindParamTableObj,null," "),1),this.deselect(this.bindParamAceEditor)):($("#switchTypes").text("JSON"),this.renderBindParamTable())):arangoHelper.arangoError("Bind parameter","Could not parse bind parameter"),this.resize()},openExportDialog:function(){$("#queryImportDialog").modal("show")},closeExportDialog:function(){$("#queryImportDialog").modal("hide")},initQueryImport:function(){var a=this;a.allowUpload=!1,$("#importQueries").change(function(b){a.files=b.target.files||b.dataTransfer.files,a.file=a.files[0],a.allowUpload=!0,$("#confirmQueryImport").removeClass("disabled")})},importCustomQueries:function(){var a=this;if(this.allowUpload===!0){var b=function(){this.collection.fetch({success:function(){a.updateLocalQueries(),a.updateQueryTable(),a.resize(),a.allowUpload=!1,$("#confirmQueryImport").addClass("disabled"),$("#queryImportDialog").modal("hide")},error:function(a){arangoHelper.arangoError("Custom Queries",a.responseText)}})}.bind(this);a.collection.saveImportQueries(a.file,b.bind(this))}},removeResults:function(){$(".outputEditorWrapper").hide("fast",function(){$(".outputEditorWrapper").remove()}),$("#removeResults").hide()},getCustomQueryParameterByName:function(a){return this.collection.findWhere({name:a}).get("parameter")},getCustomQueryValueByName:function(a){var b;return a&&(b=this.collection.findWhere({name:a})),b?b=b.get("value"):_.each(this.queries,function(c){c.name===a&&(b=c.value)}),b},openImportDialog:function(){$("#queryImportDialog").modal("show")},closeImportDialog:function(){$("#queryImportDialog").modal("hide")},exportCustomQueries:function(){var a;$.ajax("whoAmI?_="+Date.now()).success(function(b){a=b.user,null!==a&&a!==!1||(a="root");var c="query/download/"+encodeURIComponent(a);arangoHelper.download(c)})},toggleQueries:function(a){a&&"toggleQueries1"===a.currentTarget.id?(this.updateQueryTable(),$("#bindParamAceEditor").hide(),$("#bindParamEditor").show(),$("#switchTypes").text("JSON"),$(".aqlEditorWrapper").first().width(.33*$(window).width()),this.queryPreview.setValue("No query selected.",1),this.deselect(this.queryPreview)):void 0===this.settings.aqlWidth?$(".aqlEditorWrapper").first().width(.33*$(window).width()):$(".aqlEditorWrapper").first().width(this.settings.aqlWidth),this.resize();var b=["aqlEditor","queryTable","previewWrapper","querySpotlight","bindParamEditor","toggleQueries1","toggleQueries2","saveCurrentQuery","querySize","executeQuery","switchTypes","explainQuery","importQuery","exportQuery"];_.each(b,function(a){$("#"+a).toggle()}),this.resize()},showQueryPreview:function(a){$("#arangoMyQueriesTable tr").removeClass("selected"),$(a.currentTarget).addClass("selected");var b=this.getQueryNameFromTable(a);this.queryPreview.setValue(this.getCustomQueryValueByName(b),1),this.deselect(this.queryPreview)},getQueryNameFromTable:function(a){var b;return $(a.currentTarget).is("tr")?b=$(a.currentTarget).children().first().text():$(a.currentTarget).is("span")&&(b=$(a.currentTarget).parent().parent().prev().text()),b},deleteQueryModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry(void 0,a,"Do you want to delete the query?",void 0,void 0,!1,void 0)),b.push(window.modalView.createDeleteButton("Delete",this.deleteAQL.bind(this,a))),window.modalView.show("modalTable.ejs","Delete Query",b,c)},selectAndDeleteQueryFromTable:function(a){var b=this.getQueryNameFromTable(a);this.deleteQueryModal(b)},selectAndExplainQueryFromTable:function(a){this.selectQueryFromTable(a,!1),this.explainQuery()},selectAndRunQueryFromTable:function(a){this.selectQueryFromTable(a,!1),this.executeQuery()},selectQueryFromTable:function(a,b){var c=this.getQueryNameFromTable(a),d=this;void 0===b&&this.toggleQueries(),this.state.lastQuery.query=this.aqlEditor.getValue(),this.state.lastQuery.bindParam=this.bindParamTableObj,this.aqlEditor.setValue(this.getCustomQueryValueByName(c),1),this.fillBindParamTable(this.getCustomQueryParameterByName(c)),this.updateBindParams(),$("#lastQuery").remove(),$("#queryContent .arangoToolbarTop .pull-left").append('Previous Query'),$("#lastQuery").hide().fadeIn(500).on("click",function(){d.aqlEditor.setValue(d.state.lastQuery.query,1),d.fillBindParamTable(d.state.lastQuery.bindParam),d.updateBindParams(),$("#lastQuery").fadeOut(500,function(){$(this).remove()})})},deleteAQL:function(a){var b=function(a){a?arangoHelper.arangoError("Query","Could not delete query."):(this.updateLocalQueries(),this.updateQueryTable(),this.resize(),window.modalView.hide())}.bind(this),c=this.collection.findWhere({name:a});this.collection.remove(c),this.collection.saveCollectionQueries(b)},switchAce:function(a){var b=$(a.currentTarget).attr("counter"),c=a.currentTarget;if(!$(c).hasClass("disabled")){_.each($(c).parent().children(),function(a){$(a).removeClass("active")});var d=$(c).attr("val");$(c).addClass("active"),$(c).text(d.charAt(0).toUpperCase()+d.slice(1)),"JSON"===d?($("#outputEditor"+b).show(),$("#sentWrapper"+b).hide(),$("#outputGraph"+b).hide(),$("#outputTable"+b).hide()):"AQL"===d?($("#sentWrapper"+b).show(),$("#outputEditor"+b).hide(),$("#outputGraph"+b).hide(),$("#outputTable"+b).hide()):"Table"===d?($("#outputTable"+b).show(),$("#outputGraph"+b).hide(),$("#outputEditor"+b).hide(),$("#sentWrapper"+b).hide()):"Graph"===d&&($("#outputGraph"+b).show(),$("#outputTable"+b).hide(),$("#outputEditor"+b).hide(),$("#sentWrapper"+b).hide()),this.deselect(ace.edit("outputEditor"+b)),this.deselect(ace.edit("sentQueryEditor"+b)),this.deselect(ace.edit("sentBindParamEditor"+b))}},downloadQueryResult:function(a){var b=$(a.currentTarget).attr("counter"),c=ace.edit("sentQueryEditor"+b),d=c.getValue();if(""!==d||void 0!==d||null!==d){var e;e=0===Object.keys(this.bindParamTableObj).length?"query/result/download/"+encodeURIComponent(btoa(JSON.stringify({query:d}))):"query/result/download/"+encodeURIComponent(btoa(JSON.stringify({query:d,bindVars:this.bindParamTableObj}))),arangoHelper.download(e)}else arangoHelper.arangoError("Query error","could not query result.")},explainQuery:function(){if(!this.verifyQueryAndParams()){this.$(this.outputDiv).prepend(this.outputTemplate.render({counter:this.outputCounter,type:"Explain"}));var a=this.outputCounter,b=ace.edit("outputEditor"+a),c=ace.edit("sentQueryEditor"+a),d=ace.edit("sentBindParamEditor"+a);c.getSession().setMode("ace/mode/aql"),c.setOption("vScrollBarAlwaysVisible",!0),c.setReadOnly(!0),this.setEditorAutoHeight(c),b.setReadOnly(!0),b.getSession().setMode("ace/mode/json"),b.setOption("vScrollBarAlwaysVisible",!0),this.setEditorAutoHeight(b),d.setValue(JSON.stringify(this.bindParamTableObj),1),d.setOption("vScrollBarAlwaysVisible",!0),d.getSession().setMode("ace/mode/json"),d.setReadOnly(!0),this.setEditorAutoHeight(d),this.fillExplain(b,c,a),this.outputCounter++}},fillExplain:function(a,b,c){b.setValue(this.aqlEditor.getValue(),1);var d=this,e=this.readQueryData();if($("#outputEditorWrapper"+c+" .queryExecutionTime").text(""),this.execPending=!1,e){var f=function(){$("#outputEditorWrapper"+c+" #spinner").remove(),$("#outputEditor"+c).css("opacity","1"),$("#outputEditorWrapper"+c+" .fa-close").show(),$("#outputEditorWrapper"+c+" .switchAce").show()};$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_admin/aardvark/query/explain/"),data:e,contentType:"application/json",processData:!1,success:function(b){b.msg.includes("errorMessage")?(d.removeOutputEditor(c),arangoHelper.arangoError("Explain",b.msg)):(a.setValue(b.msg,1),d.deselect(a),$.noty.clearQueue(),$.noty.closeAll(),d.handleResult(c)),f()},error:function(a){try{var b=JSON.parse(a.responseText);arangoHelper.arangoError("Explain",b.errorMessage)}catch(e){arangoHelper.arangoError("Explain","ERROR")}d.handleResult(c),d.removeOutputEditor(c),f()}})}},removeOutputEditor:function(a){$("#outputEditorWrapper"+a).hide(),$("#outputEditorWrapper"+a).remove(),0===$(".outputEditorWrapper").length&&$("#removeResults").hide()},getCachedQueryAfterRender:function(){var a=this.getCachedQuery(),b=this;if(null!==a&&void 0!==a&&""!==a&&(this.aqlEditor.setValue(a.query,1),this.aqlEditor.getSession().setUndoManager(new ace.UndoManager),""!==a.parameter||void 0!==a))try{b.bindParamTableObj=JSON.parse(a.parameter);var c;_.each($("#arangoBindParamTable input"),function(a){c=$(a).attr("name"),$(a).val(b.bindParamTableObj[c])}),b.setCachedQuery(b.aqlEditor.getValue(),JSON.stringify(b.bindParamTableObj))}catch(d){}},getCachedQuery:function(){if("undefined"!==Storage){var a=localStorage.getItem("cachedQuery");if(void 0!==a){var b=JSON.parse(a);this.currentQuery=b;try{this.bindParamTableObj=JSON.parse(b.parameter)}catch(c){}return b}}},setCachedQuery:function(a,b){if("undefined"!==Storage){var c={query:a,parameter:b};this.currentQuery=c,localStorage.setItem("cachedQuery",JSON.stringify(c))}},closeResult:function(a){var b=$("#"+$(a.currentTarget).attr("element")).parent();$(b).hide("fast",function(){$(b).remove(),0===$(".outputEditorWrapper").length&&$("#removeResults").hide()})},fillSelectBoxes:function(){var a=1e3,b=$("#querySize");b.empty(),[100,250,500,1e3,2500,5e3,1e4,"all"].forEach(function(c){b.append('")})},render:function(){this.$el.html(this.template.render({})),this.afterRender(),this.initDone||(this.settings.aqlWidth=$(".aqlEditorWrapper").width()),this.initDone=!0,this.renderBindParamTable(!0)},afterRender:function(){var a=this;this.initAce(),this.initTables(),this.fillSelectBoxes(),this.makeResizeable(),this.initQueryImport(),this.getCachedQueryAfterRender(),$(".inputEditorWrapper").height($(window).height()/10*5+25),window.setTimeout(function(){a.resize()},10),a.deselect(a.aqlEditor)},showSpotlight:function(a){var b,c;if(void 0!==a&&"click"!==a.type||(a="aql"),"aql"===a)b=function(a){this.aqlEditor.insert(a),$("#aqlEditor .ace_text-input").focus()}.bind(this),c=function(){$("#aqlEditor .ace_text-input").focus()};else{var d=$(":focus");b=function(a){var b=$(d).val();$(d).val(b+a),$(d).focus()},c=function(){$(d).focus()}}window.spotlightView.show(b,c,a)},resize:function(){this.resizeFunction()},resizeFunction:function(){$("#toggleQueries1").is(":visible")?(this.aqlEditor.resize(),$("#arangoBindParamTable thead").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable thead th").css("width",$("#bindParamEditor").width()/2),$("#arangoBindParamTable tr").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody").css("height",$("#aqlEditor").height()-35),$("#arangoBindParamTable tbody").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody tr").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody td").css("width",$("#bindParamEditor").width()/2)):(this.queryPreview.resize(),$("#arangoMyQueriesTable thead").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable thead th").css("width",$("#queryTable").width()/2),$("#arangoMyQueriesTable tr").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable tbody").css("height",$("#queryTable").height()-35),$("#arangoMyQueriesTable tbody").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable tbody td").css("width",$("#queryTable").width()/2))},makeResizeable:function(){var a=this;$(".aqlEditorWrapper").resizable({resize:function(){a.resizeFunction(),a.settings.aqlWidth=$(".aqlEditorWrapper").width()},handles:"e"}),$(".inputEditorWrapper").resizable({resize:function(){a.resizeFunction()},handles:"s"}),this.resizeFunction()},initTables:function(){this.$(this.bindParamId).html(this.table.render({content:this.bindParamTableDesc})),this.$(this.myQueriesId).html(this.table.render({content:this.myQueriesTableDesc}))},checkType:function(a){var b="stringtype";try{a=JSON.parse(a),b=a instanceof Array?"arraytype":typeof a+"type"}catch(c){}return b},updateBindParams:function(a){var b,c=this;if(a){b=$(a.currentTarget).attr("name"),this.bindParamTableObj[b]=arangoHelper.parseInput(a.currentTarget);var d=["arraytype","objecttype","booleantype","numbertype","stringtype"];_.each(d,function(b){$(a.currentTarget).removeClass(b)}),$(a.currentTarget).addClass(c.checkType($(a.currentTarget).val()))}else _.each($("#arangoBindParamTable input"),function(a){b=$(a).attr("name"),c.bindParamTableObj[b]=arangoHelper.parseInput(a)});this.setCachedQuery(this.aqlEditor.getValue(),JSON.stringify(this.bindParamTableObj)),a&&((a.ctrlKey||a.metaKey)&&13===a.keyCode&&(a.preventDefault(),this.executeQuery()),(a.ctrlKey||a.metaKey)&&32===a.keyCode&&(a.preventDefault(),this.showSpotlight("bind")))},parseQuery:function(a){var b=0,c=1,d=2,e=3,f=4,g=5,h=6,i=7;a+=" ";var j,k,l,m=this,n=b,o=a.length,p=[];for(k=0;o>k;++k)switch(l=a.charAt(k),n){case b:"@"===l?(n=h,j=k):"'"===l?n=c:'"'===l?n=d:"`"===l?n=e:"´"===l?n=i:"/"===l&&o>k+1&&("/"===a.charAt(k+1)?(n=f,++k):"*"===a.charAt(k+1)&&(n=g,++k));break;case f:"\r"!==l&&"\n"!==l||(n=b);break;case g:"*"===l&&o>=k+1&&"/"===a.charAt(k+1)&&(n=b,++k);break;case c:"\\"===l?++k:"'"===l&&(n=b);break;case d:"\\"===l?++k:'"'===l&&(n=b);break;case e:"`"===l&&(n=b);break;case i:"´"===l&&(n=b);break;case h:/^[@a-zA-Z0-9_]+$/.test(l)||(p.push(a.substring(j,k)),n=b,j=void 0)}var q;return _.each(p,function(a,b){q=a.match(m.bindParamRegExp),q&&(p[b]=q[1])}),{query:a,bindParams:p}},checkForNewBindParams:function(){var a=this,b=this.parseQuery(this.aqlEditor.getValue()).bindParams,c={};_.each(b,function(b){a.bindParamTableObj[b]?c[b]=a.bindParamTableObj[b]:c[b]=""}),Object.keys(b).forEach(function(b){Object.keys(a.bindParamTableObj).forEach(function(d){b===d&&(c[b]=a.bindParamTableObj[d])})}),a.bindParamTableObj=c},renderBindParamTable:function(a){$("#arangoBindParamTable tbody").html(""),a&&this.getCachedQuery();var b=0;_.each(this.bindParamTableObj,function(a,c){$("#arangoBindParamTable tbody").append(""+c+"'),b++,_.each($("#arangoBindParamTable input"),function(b){$(b).attr("name")===c&&(a instanceof Array?$(b).val(JSON.stringify(a)).addClass("arraytype"):"object"==typeof a?$(b).val(JSON.stringify(a)).addClass(typeof a+"type"):$(b).val(a).addClass(typeof a+"type"))})}),0===b&&$("#arangoBindParamTable tbody").append('No bind parameters defined.')},fillBindParamTable:function(a){_.each(a,function(a,b){_.each($("#arangoBindParamTable input"),function(c){$(c).attr("name")===b&&$(c).val(a)})})},initAce:function(){var a=this;this.aqlEditor=ace.edit("aqlEditor"),this.aqlEditor.getSession().setMode("ace/mode/aql"),this.aqlEditor.setFontSize("10pt"),this.aqlEditor.setShowPrintMargin(!1),this.bindParamAceEditor=ace.edit("bindParamAceEditor"),this.bindParamAceEditor.getSession().setMode("ace/mode/json"),this.bindParamAceEditor.setFontSize("10pt"),this.bindParamAceEditor.setShowPrintMargin(!1),this.bindParamAceEditor.getSession().on("change",function(){try{a.bindParamTableObj=JSON.parse(a.bindParamAceEditor.getValue()),a.allowParamToggle=!0,a.setCachedQuery(a.aqlEditor.getValue(),JSON.stringify(a.bindParamTableObj))}catch(b){""===a.bindParamAceEditor.getValue()?(_.each(a.bindParamTableObj,function(b,c){a.bindParamTableObj[c]=""}),a.allowParamToggle=!0):a.allowParamToggle=!1}}),this.aqlEditor.getSession().on("change",function(){a.checkForNewBindParams(),a.renderBindParamTable(),a.initDone&&a.setCachedQuery(a.aqlEditor.getValue(),JSON.stringify(a.bindParamTableObj)),a.bindParamAceEditor.setValue(JSON.stringify(a.bindParamTableObj,null," "),1),$("#aqlEditor .ace_text-input").focus(),a.resize()}),this.aqlEditor.commands.addCommand({name:"togglecomment",bindKey:{win:"Ctrl-Shift-C",linux:"Ctrl-Shift-C",mac:"Command-Shift-C"},exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEach"}),this.aqlEditor.commands.addCommand({name:"executeQuery",bindKey:{win:"Ctrl-Return",mac:"Command-Return",linux:"Ctrl-Return"},exec:function(){a.executeQuery()}}),this.aqlEditor.commands.addCommand({name:"saveQuery",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S",linux:"Ctrl-Shift-S"},exec:function(){a.addAQL()}}),this.aqlEditor.commands.addCommand({name:"explainQuery",bindKey:{win:"Ctrl-Shift-Return",mac:"Command-Shift-Return",linux:"Ctrl-Shift-Return"},exec:function(){a.explainQuery()}}),this.aqlEditor.commands.addCommand({name:"togglecomment",bindKey:{win:"Ctrl-Shift-C",linux:"Ctrl-Shift-C",mac:"Command-Shift-C"},exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEach"}),this.aqlEditor.commands.addCommand({name:"showSpotlight",bindKey:{win:"Ctrl-Space",mac:"Ctrl-Space",linux:"Ctrl-Space"},exec:function(){a.showSpotlight()}}),this.queryPreview=ace.edit("queryPreview"),this.queryPreview.getSession().setMode("ace/mode/aql"),this.queryPreview.setReadOnly(!0),this.queryPreview.setFontSize("13px"),$("#aqlEditor .ace_text-input").focus()},updateQueryTable:function(){function a(a,b){var c;return c=a.nameb.name?1:0}var b=this;this.updateLocalQueries(),this.myQueriesTableDesc.rows=this.customQueries,_.each(this.myQueriesTableDesc.rows,function(a){a.secondRow='
    ',a.hasOwnProperty("parameter")&&delete a.parameter,delete a.value}),this.myQueriesTableDesc.rows.sort(a),_.each(this.queries,function(a){a.hasOwnProperty("parameter")&&delete a.parameter,b.myQueriesTableDesc.rows.push({name:a.name,thirdRow:''})}),this.myQueriesTableDesc.unescaped=[!1,!0,!0],this.$(this.myQueriesId).html(this.table.render({content:this.myQueriesTableDesc}))},listenKey:function(a){13===a.keyCode&&"Update"===$("#modalButton1").html()&&this.saveAQL(),this.checkSaveName()},addAQL:function(){this.refreshAQL(!0),this.createCustomQueryModal(),setTimeout(function(){$("#new-query-name").focus()},500)},createCustomQueryModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("new-query-name","Name","",void 0,void 0,!1,[{rule:Joi.string().required(),msg:"No query name given."}])),a.push(window.modalView.createSuccessButton("Save",this.saveAQL.bind(this))),window.modalView.show("modalTable.ejs","Save Query",a,b,void 0,void 0,{"keyup #new-query-name":this.listenKey.bind(this)})},checkSaveName:function(){var a=$("#new-query-name").val();if("Insert Query"===a)return void $("#new-query-name").val("");var b=this.customQueries.some(function(b){return b.name===a});b?($("#modalButton1").removeClass("button-success"),$("#modalButton1").addClass("button-warning"),$("#modalButton1").text("Update")):($("#modalButton1").removeClass("button-warning"),$("#modalButton1").addClass("button-success"),$("#modalButton1").text("Save"))},saveAQL:function(a){a&&a.stopPropagation(),this.refreshAQL();var b=$("#new-query-name").val(),c=this.bindParamTableObj;if(!$("#new-query-name").hasClass("invalid-input")&&""!==b.trim()){var d=this.aqlEditor.getValue(),e=!1;if(_.each(this.customQueries,function(a){return a.name===b?(a.value=d,void(e=!0)):void 0}),e===!0)this.collection.findWhere({name:b}).set("value",d);else{if(""!==c&&void 0!==c||(c="{}"),"string"==typeof c)try{c=JSON.parse(c)}catch(f){arangoHelper.arangoError("Query","Could not parse bind parameter")}this.collection.add({name:b,parameter:c,value:d})}var g=function(a){if(a)arangoHelper.arangoError("Query","Could not save query");else{var b=this;this.collection.fetch({success:function(){b.updateLocalQueries()}})}}.bind(this);this.collection.saveCollectionQueries(g),window.modalView.hide()}},verifyQueryAndParams:function(){var a=!1;0===this.aqlEditor.getValue().length&&(arangoHelper.arangoError("Query","Your query is empty"),a=!0);var b=[];return _.each(this.bindParamTableObj,function(c,d){""===c&&(a=!0,b.push(d))}),b.length>0&&arangoHelper.arangoError("Bind Parameter",JSON.stringify(b)+" not defined."),a},executeQuery:function(){if(!this.verifyQueryAndParams()){this.$(this.outputDiv).prepend(this.outputTemplate.render({counter:this.outputCounter,type:"Query"})),$("#outputEditorWrapper"+this.outputCounter).hide(),$("#outputEditorWrapper"+this.outputCounter).show("fast");var a=this.outputCounter,b=ace.edit("outputEditor"+a),c=ace.edit("sentQueryEditor"+a),d=ace.edit("sentBindParamEditor"+a);c.getSession().setMode("ace/mode/aql"),c.setOption("vScrollBarAlwaysVisible",!0),c.setFontSize("13px"),c.setReadOnly(!0),this.setEditorAutoHeight(c),b.setFontSize("13px"),b.getSession().setMode("ace/mode/json"),b.setReadOnly(!0),b.setOption("vScrollBarAlwaysVisible",!0),b.setShowPrintMargin(!1),this.setEditorAutoHeight(b),d.setValue(JSON.stringify(this.bindParamTableObj),1),d.setOption("vScrollBarAlwaysVisible",!0),d.getSession().setMode("ace/mode/json"),d.setReadOnly(!0),this.setEditorAutoHeight(d),this.fillResult(b,c,a),this.outputCounter++}},readQueryData:function(){var a=$("#querySize"),b={query:this.aqlEditor.getValue(),id:"currentFrontendQuery"};return"all"===a.val()?b.batchSize=1e6:b.batchSize=parseInt(a.val(),10),Object.keys(this.bindParamTableObj).length>0&&(b.bindVars=this.bindParamTableObj),JSON.stringify(b)},fillResult:function(a,b,c){var d=this,e=this.readQueryData();e&&(b.setValue(d.aqlEditor.getValue(),1),$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),headers:{"x-arango-async":"store"},data:e,contentType:"application/json",processData:!1,success:function(b,e,f){f.getResponseHeader("x-arango-async-id")&&d.queryCallbackFunction(f.getResponseHeader("x-arango-async-id"),a,c),$.noty.clearQueue(),$.noty.closeAll(),d.handleResult(c)},error:function(a){try{var b=JSON.parse(a.responseText);arangoHelper.arangoError("["+b.errorNum+"]",b.errorMessage)}catch(e){arangoHelper.arangoError("Query error","ERROR")}d.handleResult(c)}}))},handleResult:function(){var a=this;window.progressView.hide(),$("#removeResults").show(),window.setTimeout(function(){a.aqlEditor.focus()},300),$(".centralRow").animate({scrollTop:$("#queryContent").height()},"fast")},setEditorAutoHeight:function(a){var b=$(".centralRow").height(),c=(b-250)/17;a.setOptions({maxLines:c,minLines:10})},deselect:function(a){var b=a.getSelection(),c=b.lead.row,d=b.lead.column;b.setSelectionRange({start:{row:c,column:d},end:{row:c,column:d}}),a.focus()},queryCallbackFunction:function(a,b,c){var d=this,e=function(a,b){$.ajax({url:arangoHelper.databaseUrl("/_api/job/"+encodeURIComponent(a)+"/cancel"),type:"PUT",success:function(){window.clearTimeout(d.checkQueryTimer),$("#outputEditorWrapper"+b).remove(),arangoHelper.arangoNotification("Query","Query canceled.")}})};$("#outputEditorWrapper"+c+" #cancelCurrentQuery").bind("click",function(){e(a,c)}),$("#outputEditorWrapper"+c+" #copy2aqlEditor").bind("click",function(){$("#toggleQueries1").is(":visible")||d.toggleQueries();var a=ace.edit("sentQueryEditor"+c).getValue(),b=JSON.parse(ace.edit("sentBindParamEditor"+c).getValue());d.aqlEditor.setValue(a,1),d.deselect(d.aqlEditor),Object.keys(b).length>0&&(d.bindParamTableObj=b,d.setCachedQuery(d.aqlEditor.getValue(),JSON.stringify(d.bindParamTableObj)),$("#bindParamEditor").is(":visible")?d.renderBindParamTable():(d.bindParamAceEditor.setValue(JSON.stringify(b),1),d.deselect(d.bindParamAceEditor))),$(".centralRow").animate({scrollTop:0},"fast"),d.resize()}),this.execPending=!1;var f=function(a){var c="";a.extra&&a.extra.warnings&&a.extra.warnings.length>0&&(c+="Warnings:\r\n\r\n",a.extra.warnings.forEach(function(a){c+="["+a.code+"], '"+a.message+"'\r\n"})),""!==c&&(c+="\r\nResult:\r\n\r\n"),b.setValue(c+JSON.stringify(a.result,void 0,2),1),b.getSession().setScrollTop(0)},g=function(a){f(a),window.progressView.hide();var e=d.analyseQuery(a.result);if(console.log("Using "+e.defaultType+" as data format."),"table"===e.defaultType){$("#outputEditorWrapper"+c+" .arangoToolbarTop").after('
    '),$("#outputTable"+c).show(),d.renderOutputTable(e,c);var g=$(".centralRow").height()-250;$(".outputEditorWrapper .tableWrapper").css("max-height",g),$("#outputEditor"+c).hide()}else"graph"===e.defaultType&&($("#outputEditorWrapper"+c+" .arangoToolbarTop").after('
    '),$("#outputGraph"+c).show(),d.renderOutputGraph(e,c),$("#outputEditor"+c).hide());$("#"+e.defaultType+"-switch").addClass("active").css("display","inline");var h=function(a,b,d){d||(d=""),$("#outputEditorWrapper"+c+" .arangoToolbarTop .pull-left").append(''+a+"")};$("#outputEditorWrapper"+c+" .pull-left #spinner").remove();var i="-";a&&a.extra&&a.extra.stats&&(i=a.extra.stats.executionTime.toFixed(3)+" s"),h(a.result.length+" elements","fa-calculator"),h(i,"fa-clock-o"),a.extra&&a.extra.stats&&(a.extra.stats.writesExecuted>0||a.extra.stats.writesIgnored>0)&&(h(a.extra.stats.writesExecuted+" writes","fa-check-circle positive"),0===a.extra.stats.writesIgnored?h(a.extra.stats.writesIgnored+" writes ignored","fa-check-circle positive","additional"):h(a.extra.stats.writesIgnored+" writes ignored","fa-exclamation-circle warning","additional")),$("#outputEditorWrapper"+c+" .switchAce").show(),$("#outputEditorWrapper"+c+" .fa-close").show(),$("#outputEditor"+c).css("opacity","1"),$("#outputEditorWrapper"+c+" #downloadQueryResult").show(),$("#outputEditorWrapper"+c+" #copy2aqlEditor").show(),$("#outputEditorWrapper"+c+" #cancelCurrentQuery").remove(),d.setEditorAutoHeight(b),d.deselect(b),a.id&&$.ajax({url:"/_api/cursor/"+encodeURIComponent(a.id),type:"DELETE"})},h=function(){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/job/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,success:function(a,b,c){201===c.status?g(a):204===c.status&&(d.checkQueryTimer=window.setTimeout(function(){h()},500))},error:function(a){var b;try{if("Gone"===a.statusText)return arangoHelper.arangoNotification("Query","Query execution aborted."),void d.removeOutputEditor(c);b=JSON.parse(a.responseText),arangoHelper.arangoError("Query",b.errorMessage), -b.errorMessage&&(null!==b.errorMessage.match(/\d+:\d+/g)?d.markPositionError(b.errorMessage.match(/'.*'/g)[0],b.errorMessage.match(/\d+:\d+/g)[0]):d.markPositionError(b.errorMessage.match(/\(\w+\)/g)[0]),d.removeOutputEditor(c))}catch(e){if(d.removeOutputEditor(c),409===b.code)return;400!==b.code&&404!==b.code&&arangoHelper.arangoNotification("Query","Successfully aborted.")}window.progressView.hide()}})};h()},analyseQuery:function(a){var b={defaultType:null,original:a,modified:null},c=!1;if(a[0])if(a[0].vertices&&a[0].edges){var d=0,e=0;_.each(a,function(a){a.edges&&(e+=a.edges.length,_.each(a.edges,function(a){a._from&&a._to&&d++}))});var f=d/e*100;f>=95&&(c=!0,b.defaultType="graph",b.graphInfo="object")}else{var g=0,h=a.length;_.each(a,function(a){a._from&&a._to&&g++});var i=g/h*100;i>=95&&(c=!0,b.defaultType="graph",b.graphInfo="array")}if(!c){var j,k=0,l=!0,m={};if(a.length<=1&&(l=!1),l){_.each(a,function(a){j=_.keys(a).length,j>k&&(k=j),_.each(a,function(a,b){m[b]?m[b]=m[b]+1:m[b]=1})});var n;_.each(m,function(b,c){n=b/a.length*100,l!==!1&&95>=n&&(l=!1)})}l&&(c=!0,b.defaultType="table")}return c||(b.defaultType="json"),b},markPositionError:function(a,b){var c;b&&(c=b.split(":")[0],a=a.substr(1,a.length-2));var d=this.aqlEditor.find(a);!d&&b&&(this.aqlEditor.selection.moveCursorToPosition({row:c,column:0}),this.aqlEditor.selection.selectLine()),window.setTimeout(function(){$(".ace_start").first().css("background","rgba(255, 129, 129, 0.7)")},100)},refreshAQL:function(){var a=this,b=function(b){b?arangoHelper.arangoError("Query","Could not reload Queries"):(a.updateLocalQueries(),a.updateQueryTable())},c=function(){a.getSystemQueries(b)};this.getAQL(c)},getSystemQueries:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:"js/arango/aqltemplates.json",contentType:"application/json",processData:!1,success:function(c){a&&a(!1),b.queries=c},error:function(){a&&a(!0),arangoHelper.arangoNotification("Query","Error while loading system templates")}})},updateLocalQueries:function(){var a=this;this.customQueries=[],this.collection.each(function(b){a.customQueries.push({name:b.get("name"),value:b.get("value"),parameter:b.get("parameter")})})},renderOutputTable:function(a,b){var c={id:"outputTableData"+b,titles:[],rows:[]},d=!0,e=[];_.each(a.original,function(a){d===!0&&(c.titles=Object.keys(a),d=!1),_.each(a,function(a){"object"==typeof a&&(a=JSON.stringify(a)),e.push(a)}),c.rows.push(e),e=[]}),$("#outputTable"+b).append(this.table.render({content:c}))},renderOutputGraph:function(a,b){this.graphViewer2=new window.GraphViewer2({name:void 0,documentStore:window.App.arangoDocumentStore,collection:new window.GraphCollection,userConfig:window.App.userConfig,id:"#outputGraph"+b,data:a}),this.graphViewer2.renderAQL()},getAQL:function(a){var b=this;this.collection.fetch({success:function(){var c=localStorage.getItem("customQueries");if(c){var d=JSON.parse(c);_.each(d,function(a){b.collection.add({value:a.value,name:a.name})});var e=function(a){a?arangoHelper.arangoError("Custom Queries","Could not import old local storage queries"):localStorage.removeItem("customQueries")};b.collection.saveCollectionQueries(e)}b.updateLocalQueries(),a&&a()}})}})}(),function(){"use strict";window.ScaleView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("scaleView.ejs"),interval:1e4,knownServers:[],events:{"click #addCoord":"addCoord","click #removeCoord":"removeCoord","click #addDBs":"addDBs","click #removeDBs":"removeDBs"},setCoordSize:function(a){var b=this,c={numberOfCoordinators:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updateTable(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},setDBsSize:function(a){var b=this,c={numberOfDBServers:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updateTable(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},addCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!0))},removeCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!1,!0))},addDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!0))},removeDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!1,!0))},readNumberFromID:function(a,b,c){var d=$(a).html(),e=!1;try{e=JSON.parse(d)}catch(f){}return b&&e++,c&&1!==e&&e--,e},initialize:function(a){var b=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#sNodes"===window.location.hash&&b.coordinators.fetch({success:function(){b.dbServers.fetch({success:function(){b.continueRender(!0)}})}})},this.interval))},render:function(){var a=this,b=function(){var b=function(){a.continueRender()};this.waitForDBServers(b)}.bind(this);this.initDoneCoords?b():this.waitForCoordinators(b),window.arangoHelper.buildNodesSubNav("scale")},continueRender:function(a){var b,c,d=this;b=this.coordinators.toJSON(),c=this.dbServers.toJSON(),this.$el.html(this.template.render({runningCoords:b.length,runningDBs:c.length,plannedCoords:void 0,plannedDBs:void 0,initialized:a})),$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",processData:!1,success:function(a){d.updateTable(a)}})},updateTable:function(a){var b='scaling in progress ',c='no scaling process active';a.numberOfCoordinators&&($("#plannedCoords").html(a.numberOfCoordinators),this.coordinators.toJSON().length===a.numberOfCoordinators?$("#statusCoords").html(c):$("#statusCoords").html(b)),a.numberOfDBServers&&($("#plannedDBs").html(a.numberOfDBServers),this.dbServers.toJSON().length===a.numberOfDBServers?$("#statusDBs").html(c):$("#statusDBs").html(b))},waitForDBServers:function(a){var b=this;0===this.dbServers.length?window.setInterval(function(){b.waitForDBServers(a)},300):a()},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(b.initDoneCoords=!0,a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.SettingsView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},events:{},render:function(){this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Settings"),this.renderSettings()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},unloadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be unloaded."):void 0===a?(this.model.set("status","unloading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","unloaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" unloaded.")}.bind(this);this.model.unloadCollection(a),window.modalView.hide()},loadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be loaded."):void 0===a?(this.model.set("status","loading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","loaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" loaded.")}.bind(this);this.model.loadCollection(a),window.modalView.hide()},truncateCollection:function(){this.model.truncateCollection(),window.modalView.hide()},deleteCollection:function(){this.model.destroy({error:function(){arangoHelper.arangoError("Could not delete collection.")},success:function(){window.App.navigate("#collections",{trigger:!0})}})},saveModifiedCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c;c=b?this.model.get("name"):$("#change-collection-name").val();var d=this.model.get("status");if("loaded"===d){var e;try{e=JSON.parse(1024*$("#change-collection-size").val()*1024)}catch(f){return arangoHelper.arangoError("Please enter a valid number"),0}var g;try{if(g=JSON.parse($("#change-index-buckets").val()),1>g||parseInt(g,10)!==Math.pow(2,Math.log2(g)))throw new Error("invalid indexBuckets value")}catch(f){return arangoHelper.arangoError("Please enter a valid number of index buckets"),0}var h=function(a){a?arangoHelper.arangoError("Collection error: "+a.responseText):(arangoHelper.arangoNotification("Collection: Successfully changed."),window.App.navigate("#cSettings/"+c,{trigger:!0}))},i=function(a){if(a)arangoHelper.arangoError("Collection error: "+a.responseText);else{var b=$("#change-collection-sync").val();this.model.changeCollection(b,e,g,h)}}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,i):i()}else if("unloaded"===d)if(this.model.get("name")!==c){var j=function(a,b){a?arangoHelper.arangoError("Collection"+b.responseText):(arangoHelper.arangoNotification("CollectionSuccessfully changed."),window.App.navigate("#cSettings/"+c,{trigger:!0}))};frontendConfig.isCluster===!1?this.model.renameCollection(c,j):j()}else window.modalView.hide()}}.bind(this);window.isCoordinator(a)},renderSettings:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c=!1;"loaded"===this.model.get("status")&&(c=!0);var d=[],e=[];b||e.push(window.modalView.createTextEntry("change-collection-name","Name",this.model.get("name"),!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}]));var f=function(){e.push(window.modalView.createReadOnlyEntry("change-collection-id","ID",this.model.get("id"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-type","Type",this.model.get("type"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-status","Status",this.model.get("status"),"")),d.push(window.modalView.createDeleteButton("Delete",this.deleteCollection.bind(this))),d.push(window.modalView.createDeleteButton("Truncate",this.truncateCollection.bind(this))),c?d.push(window.modalView.createNotificationButton("Unload",this.unloadCollection.bind(this))):d.push(window.modalView.createNotificationButton("Load",this.loadCollection.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.saveModifiedCollection.bind(this)));var a=["General","Indices"],b=["modalTable.ejs","indicesView.ejs"];window.modalView.show(b,"Modify Collection",d,e,null,null,this.events,null,a,"content"),$($("#infoTab").children()[1]).remove()}.bind(this);if(c){var g=function(a,b){if(a)arangoHelper.arangoError("Collection","Could not fetch properties");else{var c=b.journalSize/1048576,d=b.indexBuckets,g=b.waitForSync;e.push(window.modalView.createTextEntry("change-collection-size","Journal size",c,"The maximal size of a journal or datafile (in MB). Must be at least 1.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),e.push(window.modalView.createTextEntry("change-index-buckets","Index buckets",d,"The number of index buckets for this collection. Must be at least 1 and a power of 2.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[1-9][0-9]*$/),msg:"Must be a number greater than 1 and a power of 2."}])),e.push(window.modalView.createSelectEntry("change-collection-sync","Wait for sync",g,"Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}]))}f()};this.model.getProperties(g)}else f()}}.bind(this);window.isCoordinator(a)}})}(),function(){"use strict";window.ShardsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("shardsView.ejs"),interval:1e4,knownServers:[],events:{"click #shardsContent .shardLeader span":"moveShard","click #shardsContent .shardFollowers span":"moveShardFollowers","click #rebalanceShards":"rebalanceShards"},initialize:function(a){var b=this;b.dbServers=a.dbServers,clearInterval(this.intervalFunction),window.App.isCluster&&(this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#shards"===window.location.hash&&b.render(!1)},this.interval))},render:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/shardDistribution"),contentType:"application/json",processData:!1,async:!0,success:function(a){var c,d=!1;b.shardDistribution=a.results,_.each(a.results,function(a,b){c=b.substring(0,1),"_"!==c&&"error"!==b&&"code"!==b&&(d=!0)}),d?b.continueRender(a.results):arangoHelper.renderEmpty("No collections and no shards available")},error:function(a){0!==a.readyState&&arangoHelper.arangoError("Cluster","Could not fetch sharding information.")}}),a!==!1&&arangoHelper.buildNodesSubNav("Shards")},moveShardFollowers:function(a){var b=$(a.currentTarget).html();this.moveShard(a,b)},moveShard:function(a,b){var c,d,e,f,g=this,h=window.App.currentDB.get("name");d=$(a.currentTarget).parent().parent().attr("collection"),e=$(a.currentTarget).parent().parent().attr("shard"),b?(f=$(a.currentTarget).parent().parent().attr("leader"),c=b):c=$(a.currentTarget).parent().parent().attr("leader");var i=[],j=[],k={},l=[];return g.dbServers[0].each(function(a){a.get("name")!==c&&(k[a.get("name")]={value:a.get("name"),label:a.get("name")})}),_.each(g.shardDistribution[d].Plan[e].followers,function(a){delete k[a]}),b&&delete k[f],_.each(k,function(a){l.push(a)}),l=l.reverse(),0===l.length?void arangoHelper.arangoMessage("Shards","No database server for moving the shard is available."):(j.push(window.modalView.createSelectEntry("toDBServer","Destination",void 0,"Please select the target databse server. The selected database server will be the new leader of the shard.",l)),i.push(window.modalView.createSuccessButton("Move",this.confirmMoveShards.bind(this,h,d,e,c))),void window.modalView.show("modalTable.ejs","Move shard: "+e,i,j))},confirmMoveShards:function(a,b,c,d){var e=this,f=$("#toDBServer").val(),g={database:a,collection:b,shard:c,fromServer:d,toServer:f};$.ajax({type:"POST",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/moveShard"),contentType:"application/json",processData:!1,data:JSON.stringify(g),async:!0,success:function(a){a===!0&&(window.setTimeout(function(){e.render(!1)},1500),arangoHelper.arangoNotification("Shard "+c+" will be moved to "+f+"."))},error:function(){arangoHelper.arangoNotification("Shard "+c+" could not be moved to "+f+".")}}),window.modalView.hide()},rebalanceShards:function(){var a=this;$.ajax({type:"POST",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/rebalanceShards"),contentType:"application/json",processData:!1,data:JSON.stringify({}),async:!0,success:function(b){b===!0&&(window.setTimeout(function(){a.render(!1)},1500),arangoHelper.arangoNotification("Started rebalance process."))},error:function(){arangoHelper.arangoNotification("Could not start rebalance process.")}}),window.modalView.hide()},continueRender:function(a){delete a.code,delete a.error,this.$el.html(this.template.render({collections:a}))},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.ShowClusterView=Backbone.View.extend({detailEl:"#modalPlaceholder",el:"#content",defaultFrame:12e5,template:templateEngine.createTemplate("showCluster.ejs"),modal:templateEngine.createTemplate("waitModal.ejs"),detailTemplate:templateEngine.createTemplate("detailView.ejs"),events:{"change #selectDB":"updateCollections","change #selectCol":"updateShards","click .dbserver.success":"dashboard","click .coordinator.success":"dashboard"},replaceSVGs:function(){$(".svgToReplace").each(function(){var a=$(this),b=a.attr("id"),c=a.attr("src");$.get(c,function(c){var d=$(c).find("svg");d.attr("id",b).attr("class","icon").removeAttr("xmlns:a"),a.replaceWith(d)},"xml")})},updateServerTime:function(){this.serverTime=(new Date).getTime()},setShowAll:function(){this.graphShowAll=!0},resetShowAll:function(){this.graphShowAll=!1,this.renderLineChart()},initialize:function(a){this.options=a,this.interval=1e4,this.isUpdating=!1,this.timer=null,this.knownServers=[],this.graph=void 0,this.graphShowAll=!1,this.updateServerTime(),this.dygraphConfig=this.options.dygraphConfig,this.dbservers=new window.ClusterServers([],{interval:this.interval}),this.coordinators=new window.ClusterCoordinators([],{interval:this.interval}),this.documentStore=new window.ArangoDocuments,this.statisticsDescription=new window.StatisticsDescription,this.statisticsDescription.fetch({async:!1}),this.dbs=new window.ClusterDatabases([],{interval:this.interval}),this.cols=new window.ClusterCollections,this.shards=new window.ClusterShards,this.startUpdating()},listByAddress:function(a){var b={},c=this;this.dbservers.byAddress(b,function(b){c.coordinators.byAddress(b,a)})},updateCollections:function(){var a=this,b=$("#selectCol"),c=$("#selectDB").find(":selected").attr("id");if(c){var d=b.find(":selected").attr("id");b.html(""),this.cols.getList(c,function(c){_.each(_.pluck(c,"name"),function(a){b.append('")});var e=$("#"+d,b);1===e.length&&e.prop("selected",!0),a.updateShards()})}},updateShards:function(){var a=$("#selectDB").find(":selected").attr("id"),b=$("#selectCol").find(":selected").attr("id");this.shards.getList(a,b,function(a){$(".shardCounter").html("0"),_.each(a,function(a){$("#"+a.server+"Shards").html(a.shards.length)})})},updateServerStatus:function(a){var b=this,c=function(a,b,c){var d,e,f=c;f=f.replace(/\./g,"-"),f=f.replace(/\:/g,"_"),e=$("#id"+f),e.length<1||(d=e.attr("class").split(/\s+/)[1],e.attr("class",a+" "+d+" "+b),"coordinator"===a&&("success"===b?$(".button-gui",e.closest(".tile")).toggleClass("button-gui-disabled",!1):$(".button-gui",e.closest(".tile")).toggleClass("button-gui-disabled",!0)))};this.coordinators.getStatuses(c.bind(this,"coordinator"),function(){b.dbservers.getStatuses(c.bind(b,"dbserver")),a()})},updateDBDetailList:function(){var a=this,b=$("#selectDB"),c=b.find(":selected").attr("id");b.html(""),this.dbs.getList(function(d){_.each(_.pluck(d,"name"),function(a){b.append('")});var e=$("#"+c,b);1===e.length&&e.prop("selected",!0),a.updateCollections()})},rerender:function(){var a=this;this.updateServerStatus(function(){a.getServerStatistics(function(){a.updateServerTime(),a.data=a.generatePieData(),a.renderPieChart(a.data),a.renderLineChart(),a.updateDBDetailList()})})},render:function(){this.knownServers=[],delete this.hist;var a=this;this.listByAddress(function(b){1===Object.keys(b).length?a.type="testPlan":a.type="other",a.updateDBDetailList(),a.dbs.getList(function(c){$(a.el).html(a.template.render({dbs:_.pluck(c,"name"),byAddress:b,type:a.type})),$(a.el).append(a.modal.render({})),a.replaceSVGs(),a.getServerStatistics(function(){a.data=a.generatePieData(),a.renderPieChart(a.data),a.renderLineChart(),a.updateDBDetailList(),a.startUpdating()})})})},generatePieData:function(){var a=[],b=this;return this.data.forEach(function(c){a.push({key:c.get("name"),value:c.get("system").virtualSize,time:b.serverTime})}),a},addStatisticsItem:function(a,b,c,d){var e=this;e.hasOwnProperty("hist")||(e.hist={}),e.hist.hasOwnProperty(a)||(e.hist[a]=[]);var f=e.hist[a],g=f.length;if(0===g)f.push({time:b,snap:d,requests:c,requestsPerSecond:0});else{var h=f[g-1].time,i=f[g-1].requests;if(c>i){var j=b-h,k=0;j>0&&(k=(c-i)/j),f.push({time:b,snap:d,requests:c,requestsPerSecond:k})}}},getServerStatistics:function(a){var b=this,c=Math.round(b.serverTime/1e3);this.data=void 0;var d=new window.ClusterStatisticsCollection,e=this.coordinators.first();this.dbservers.forEach(function(a){if("ok"===a.get("status")){-1===b.knownServers.indexOf(a.id)&&b.knownServers.push(a.id);var c=new window.Statistics({name:a.id});c.url=e.get("protocol")+"://"+e.get("address")+"/_admin/clusterStatistics?DBserver="+a.get("name"),d.add(c)}}),this.coordinators.forEach(function(a){if("ok"===a.get("status")){-1===b.knownServers.indexOf(a.id)&&b.knownServers.push(a.id);var c=new window.Statistics({name:a.id});c.url=a.get("protocol")+"://"+a.get("address")+"/_admin/statistics",d.add(c)}});var f=d.size();this.data=[];var g=function(d){f--;var e=d.get("time"),g=d.get("name"),h=d.get("http").requestsTotal;b.addStatisticsItem(g,e,h,c),b.data.push(d),0===f&&a()},h=function(){f--,0===f&&a()};d.fetch(g,h)},renderPieChart:function(a){var b=$("#clusterGraphs svg").width(),c=$("#clusterGraphs svg").height(),d=Math.min(b,c)/2,e=this.dygraphConfig.colors,f=d3.svg.arc().outerRadius(d-20).innerRadius(0),g=d3.layout.pie().sort(function(a){return a.value}).value(function(a){return a.value});d3.select("#clusterGraphs").select("svg").remove();var h=d3.select("#clusterGraphs").append("svg").attr("class","clusterChart").append("g").attr("transform","translate("+b/2+","+(c/2-10)+")"),i=d3.svg.arc().outerRadius(d-2).innerRadius(d-2),j=h.selectAll(".arc").data(g(a)).enter().append("g").attr("class","slice");j.append("path").attr("d",f).style("fill",function(a,b){return e[b%e.length]}).style("stroke",function(a,b){return e[b%e.length]}),j.append("text").attr("transform",function(a){return"translate("+f.centroid(a)+")"}).style("text-anchor","middle").text(function(a){var b=a.data.value/1024/1024/1024;return b.toFixed(2)}),j.append("text").attr("transform",function(a){return"translate("+i.centroid(a)+")"}).style("text-anchor","middle").text(function(a){return a.data.key})},renderLineChart:function(){var a,b,c,d,e,f,g=this,h=1200,i=[],j=[],k=Math.round((new Date).getTime()/1e3)-h,l=g.knownServers,m=function(){return null};for(c=0;cf||(j.hasOwnProperty(f)?a=j[f]:(e=new Date(1e3*f),a=j[f]=[e].concat(l.map(m))),a[c+1]=b[d].requestsPerSecond);i=[],Object.keys(j).sort().forEach(function(a){i.push(j[a])});var n=this.dygraphConfig.getDefaultConfig("clusterRequestsPerSecond");n.labelsDiv=$("#lineGraphLegend")[0],n.labels=["datetime"].concat(l),g.graph=new Dygraph(document.getElementById("lineGraph"),i,n)},stopUpdating:function(){window.clearTimeout(this.timer),delete this.graph,this.isUpdating=!1},startUpdating:function(){if(!this.isUpdating){this.isUpdating=!0;var a=this;this.timer=window.setInterval(function(){a.rerender()},this.interval)}},dashboard:function(a){this.stopUpdating();var b,c,d=$(a.currentTarget),e={},f=d.attr("id");f=f.replace(/\-/g,"."),f=f.replace(/\_/g,":"),f=f.substr(2),e.raw=f,e.isDBServer=d.hasClass("dbserver"),e.isDBServer?(b=this.dbservers.findWhere({address:e.raw}),c=this.coordinators.findWhere({status:"ok"}),e.endpoint=c.get("protocol")+"://"+c.get("address")):(b=this.coordinators.findWhere({address:e.raw}),e.endpoint=b.get("protocol")+"://"+b.get("address")),e.target=encodeURIComponent(b.get("name")),window.App.serverToShow=e,window.App.dashboard()},getCurrentSize:function(a){"#"!==a.substr(0,1)&&(a="#"+a);var b,c;return $(a).attr("style",""),b=$(a).height(),c=$(a).width(),{height:b,width:c}},resize:function(){var a;this.graph&&(a=this.getCurrentSize(this.graph.maindiv_.id),this.graph.resize(a.width,a.height))}})}(),function(){"use strict";window.SpotlightView=Backbone.View.extend({template:templateEngine.createTemplate("spotlightView.ejs"),el:"#spotlightPlaceholder",displayLimit:8,typeahead:null,callbackSuccess:null,callbackCancel:null,collections:{system:[],doc:[],edge:[]},events:{"focusout #spotlight .tt-input":"hide","keyup #spotlight .typeahead":"listenKey"},aqlKeywordsArray:[],aqlBuiltinFunctionsArray:[],aqlKeywords:"for|return|filter|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|outbound|inbound|any|all|none|aggregate|like|count|shortest_path",hide:function(){this.typeahead=$("#spotlight .typeahead").typeahead("destroy"),$(this.el).hide()},listenKey:function(a){if(27===a.keyCode)this.callbackSuccess&&this.callbackCancel(),this.hide();else if(13===a.keyCode&&this.callbackSuccess){var b=$(this.typeahead).val();this.callbackSuccess(b),this.hide()}},substringMatcher:function(a){return function(b,c){var d,e;d=[],e=new RegExp(b,"i"),_.each(a,function(a){e.test(a)&&d.push(a)}),c(d)}},updateDatasets:function(){var a=this;this.collections={system:[],doc:[],edge:[]},window.App.arangoCollectionsStore.each(function(b){b.get("isSystem")?a.collections.system.push(b.get("name")):"document"===b.get("type")?a.collections.doc.push(b.get("name")):a.collections.edge.push(b.get("name"))})},stringToArray:function(){var a=this;_.each(this.aqlKeywords.split("|"),function(b){a.aqlKeywordsArray.push(b.toUpperCase())}),a.aqlKeywordsArray.push(!0),a.aqlKeywordsArray.push(!1),a.aqlKeywordsArray.push(null)},fetchKeywords:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/aql-builtin"),contentType:"application/json",success:function(c){b.stringToArray(),b.updateDatasets(),_.each(c.functions,function(a){b.aqlBuiltinFunctionsArray.push(a.name)}),a&&a()},error:function(){a&&a(),arangoHelper.arangoError("AQL","Could not fetch AQL function definition.")}})},show:function(a,b,c){var d=this;this.callbackSuccess=a,this.callbackCancel=b;var e=function(){var a=function(a,b,c){var d='

    '+a+"

    ";return b&&(d+=''),c&&(d+=''+c.toUpperCase()+""),d+="
    "};$(this.el).html(this.template.render({})),$(this.el).show(),"aql"===c?this.typeahead=$("#spotlight .typeahead").typeahead({hint:!0,highlight:!0,minLength:1},{name:"Functions",source:d.substringMatcher(d.aqlBuiltinFunctionsArray),limit:d.displayLimit,templates:{header:a("Functions","fa-code","aql")}},{name:"Keywords",source:d.substringMatcher(d.aqlKeywordsArray),limit:d.displayLimit,templates:{header:a("Keywords","fa-code","aql")}},{name:"Documents",source:d.substringMatcher(d.collections.doc),limit:d.displayLimit,templates:{header:a("Documents","fa-file-text-o","Collection")}},{name:"Edges",source:d.substringMatcher(d.collections.edge),limit:d.displayLimit,templates:{header:a("Edges","fa-share-alt","Collection")}},{name:"System",limit:d.displayLimit,source:d.substringMatcher(d.collections.system),templates:{header:a("System","fa-cogs","Collection")}}):this.typeahead=$("#spotlight .typeahead").typeahead({hint:!0,highlight:!0,minLength:1},{name:"Documents",source:d.substringMatcher(d.collections.doc),limit:d.displayLimit,templates:{header:a("Documents","fa-file-text-o","Collection")}},{name:"Edges",source:d.substringMatcher(d.collections.edge),limit:d.displayLimit,templates:{header:a("Edges","fa-share-alt","Collection")}},{name:"System",limit:d.displayLimit,source:d.substringMatcher(d.collections.system),templates:{header:a("System","fa-cogs","Collection")}}),$("#spotlight .typeahead").focus()}.bind(this);0===d.aqlBuiltinFunctionsArray.length?this.fetchKeywords(e):e()}})}(),function(){"use strict";window.StatisticBarView=Backbone.View.extend({el:"#statisticBar",events:{"change #arangoCollectionSelect":"navigateBySelect","click .tab":"navigateByTab"},template:templateEngine.createTemplate("statisticBarView.ejs"),initialize:function(a){this.currentDB=a.currentDB},replaceSVG:function(a){var b=a.attr("id"),c=a.attr("class"),d=a.attr("src");$.get(d,function(d){var e=$(d).find("svg");void 0===b&&(e=e.attr("id",b)),void 0===c&&(e=e.attr("class",c+" replaced-svg")),e=e.removeAttr("xmlns:a"),a.replaceWith(e)},"xml")},render:function(){var a=this;return $(this.el).html(this.template.render({isSystem:this.currentDB.get("isSystem")})),$("img.svg").each(function(){a.replaceSVG($(this))}),this},navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},navigateByTab:function(a){var b=a.target||a.srcElement,c=b.id;return"links"===c?($("#link_dropdown").slideToggle(200),void a.preventDefault()):"tools"===c?($("#tools_dropdown").slideToggle(200),void a.preventDefault()):(window.App.navigate(c,{trigger:!0}),void a.preventDefault())},handleSelectNavigation:function(){$("#arangoCollectionSelect").change(function(){var a=$(this).find("option:selected").val();window.App.navigate(a,{trigger:!0})})},selectMenuItem:function(a){$(".navlist li").removeClass("active"),a&&$("."+a).addClass("active")}})}(),function(){"use strict";window.SupportView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("supportView.ejs"),events:{"click .subViewNavbar .subMenuEntry":"toggleViews"},render:function(){this.$el.html(this.template.render({}))},resize:function(a){a?$(".innerContent").css("height","auto"):$(".innerContent").height($(".centralRow").height()-170)},renderSwagger:function(){var a=window.location.pathname.split("/"),b=window.location.protocol+"//"+window.location.hostname+":"+window.location.port+"/"+a[1]+"/"+a[2]+"/_admin/aardvark/api/index.html";$("#swagger").html(""),$("#swagger").append('')},toggleViews:function(a){var b=this,c=a.currentTarget.id.split("-")[0],d=["community","documentation","swagger"];_.each(d,function(a){c!==a?$("#"+a).hide():("swagger"===c?(b.renderSwagger(),$("#swagger iframe").css("height","100%"),$("#swagger iframe").css("width","100%"),$("#swagger iframe").css("margin-top","-13px"),b.resize()):b.resize(!0),$("#"+a).show())}),$(".subMenuEntries").children().removeClass("active"),$("#"+c+"-support").addClass("active")}})}(),function(){"use strict";window.TableView=Backbone.View.extend({template:templateEngine.createTemplate("tableView.ejs"),loading:templateEngine.createTemplate("loadingTableView.ejs"),initialize:function(a){this.rowClickCallback=a.rowClick},events:{"click .pure-table-body .pure-table-row":"rowClick","click .deleteButton":"removeClick"},rowClick:function(a){this.hasOwnProperty("rowClickCallback")&&this.rowClickCallback(a)},removeClick:function(a){this.hasOwnProperty("removeClickCallback")&&(this.removeClickCallback(a),a.stopPropagation())},setRowClick:function(a){this.rowClickCallback=a},setRemoveClick:function(a){this.removeClickCallback=a},render:function(){$(this.el).html(this.template.render({docs:this.collection}))},drawLoading:function(){$(this.el).html(this.loading.render({}))}})}(),function(){"use strict";window.UserBarView=Backbone.View.extend({events:{"change #userBarSelect":"navigateBySelect","click .tab":"navigateByTab","mouseenter .dropdown":"showDropdown","mouseleave .dropdown":"hideDropdown","click #userLogoutIcon":"userLogout","click #userLogout":"userLogout"},initialize:function(a){this.userCollection=a.userCollection,this.userCollection.fetch({cache:!1,async:!0}),this.userCollection.bind("change:extra",this.render.bind(this))},template:templateEngine.createTemplate("userBarView.ejs"),navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},navigateByTab:function(a){var b=a.target||a.srcElement;b=$(b).closest("a");var c=b.attr("id");return"user"===c?($("#user_dropdown").slideToggle(200),void a.preventDefault()):(window.App.navigate(c,{trigger:!0}),void a.preventDefault())},toggleUserMenu:function(){$("#userBar .subBarDropdown").toggle()},showDropdown:function(){$("#user_dropdown").fadeIn(1)},hideDropdown:function(){$("#user_dropdown").fadeOut(1)},render:function(){if(frontendConfig.authenticationEnabled!==!1){var a=this,b=function(a,b){if(a)arangoHelper.arangoErro("User","Could not fetch user.");else{var c=null,d=null,e=!1,f=null;if(b!==!1)return f=this.userCollection.findWhere({user:b}),f.set({loggedIn:!0}),d=f.get("extra").name, -c=f.get("extra").img,e=f.get("active"),c=c?"https://s.gravatar.com/avatar/"+c+"?s=80":"img/default_user.png",d||(d=""),this.$el=$("#userBar"),this.$el.html(this.template.render({img:c,name:d,username:b,active:e})),this.delegateEvents(),this.$el}}.bind(this);$("#userBar").on("click",function(){a.toggleUserMenu()}),this.userCollection.whoAmI(b)}},userLogout:function(){var a=function(a){a?arangoHelper.arangoError("User","Logout error"):this.userCollection.logout()}.bind(this);this.userCollection.whoAmI(a)}})}(),function(){"use strict";window.UserManagementView=Backbone.View.extend({el:"#content",el2:"#userManagementThumbnailsIn",template:templateEngine.createTemplate("userManagementView.ejs"),events:{"click #createUser":"createUser","click #submitCreateUser":"submitCreateUser","click #userManagementThumbnailsIn .tile":"editUser","click #submitEditUser":"submitEditUser","click #userManagementToggle":"toggleView","keyup #userManagementSearchInput":"search","click #userManagementSearchSubmit":"search","click #callEditUserPassword":"editUserPassword","click #submitEditUserPassword":"submitEditUserPassword","click #submitEditCurrentUserProfile":"submitEditCurrentUserProfile","click .css-label":"checkBoxes","change #userSortDesc":"sorting"},dropdownVisible:!1,initialize:function(){var a=this,b=function(a,b){frontendConfig.authenticationEnabled===!0&&(a||null===b?arangoHelper.arangoError("User","Could not fetch user data"):this.currentUser=this.collection.findWhere({user:b}))}.bind(this);this.collection.fetch({cache:!1,success:function(){a.collection.whoAmI(b)}})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},sorting:function(){$("#userSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#userManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},render:function(a){var b=!1;$("#userManagementDropdown").is(":visible")&&(b=!0);var c=function(){this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:""})),b===!0&&($("#userManagementDropdown2").show(),$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown").show()),a&&this.editCurrentUser(),arangoHelper.setCheckboxStatus("#userManagementDropdown")}.bind(this);return this.collection.fetch({cache:!1,success:function(){c()}}),this},search:function(){var a,b,c,d;a=$("#userManagementSearchInput"),b=$("#userManagementSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("user").indexOf(b)}),$(this.el).html(this.template.render({collection:d,searchString:b})),a=$("#userManagementSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},createUser:function(a){a.preventDefault(),this.createCreateUserModal()},submitCreateUser:function(){var a=this,b=$("#newUsername").val(),c=$("#newName").val(),d=$("#newPassword").val(),e=$("#newStatus").is(":checked");if(this.validateUserInfo(c,b,d,e)){var f={user:b,passwd:d,active:e,extra:{name:c}};this.collection.create(f,{wait:!0,error:function(a,b){arangoHelper.parseError("User",b,a)},success:function(){a.updateUserManagement(),window.modalView.hide()}})}},validateUserInfo:function(a,b,c,d){return""===b?(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1):!0},updateUserManagement:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},editUser:function(a){if("createUser"!==$(a.currentTarget).find("a").attr("id")){$(a.currentTarget).hasClass("tile")&&(a.currentTarget=$(a.currentTarget).find("img")),this.collection.fetch({cache:!1});var b=this.evaluateUserName($(a.currentTarget).attr("id"),"_edit-user");""===b&&(b=$(a.currentTarget).attr("id")),window.App.navigate("user/"+encodeURIComponent(b),{trigger:!0})}},toggleView:function(){$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown2").slideToggle(200)},createCreateUserModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("newUsername","Username","",!1,"Username",!0,[{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No username given."}])),b.push(window.modalView.createTextEntry("newName","Name","",!1,"Name",!1)),b.push(window.modalView.createPasswordEntry("newPassword","Password","",!1,"",!1)),b.push(window.modalView.createCheckboxEntry("newStatus","Active","active",!1,!0)),a.push(window.modalView.createSuccessButton("Create",this.submitCreateUser.bind(this))),window.modalView.show("modalTable.ejs","Create New User",a,b)},evaluateUserName:function(a,b){if(a){var c=a.lastIndexOf(b);return a.substring(0,c)}},updateUserProfile:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})}})}(),function(){"use strict";window.UserPermissionView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("userPermissionView.ejs"),initialize:function(a){this.username=a.username},events:{'click #userPermissionView [type="checkbox"]':"setPermission"},render:function(){var a=this;this.collection.fetch({success:function(){a.continueRender()}})},setPermission:function(a){var b=$(a.currentTarget).is(":checked"),c=$(a.currentTarget).attr("name");b?this.grantPermission(this.currentUser.get("user"),c):this.revokePermission(this.currentUser.get("user"),c)},grantPermission:function(a,b){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})})},revokePermission:function(a,b){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database/"+encodeURIComponent(b)),contentType:"application/json"})},continueRender:function(){var a=this;this.currentUser=this.collection.findWhere({user:this.username}),this.breadcrumb(),arangoHelper.buildUserSubNav(this.currentUser.get("user"),"Permissions");var b=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a.currentUser.get("user"))+"/database");"_system"===frontendConfig.db&&(b=arangoHelper.databaseUrl("/_api/user/root/database")),$.ajax({type:"GET",url:b,contentType:"application/json",success:function(b){var c=b.result;$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a.currentUser.get("user"))+"/database"),contentType:"application/json",success:function(b){var d=b.result;if(c._system){var e=[];_.each(c,function(a,b){e.push(b)}),c=e}a.finishRender(c,d)}})}})},finishRender:function(a,b){_.each(b,function(a,c){"rw"!==a&&delete b[c]}),$(this.el).html(this.template.render({allDBs:a,permissions:b}))},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("User: "+this.currentUser.get("user"))}})}(),function(){"use strict";window.UserView=Backbone.View.extend({el:"#content",initialize:function(a){this.username=a.username},render:function(){var a=this;this.collection.fetch({success:function(){a.continueRender()}})},editCurrentUser:function(){this.createEditCurrentUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("extra").img)},continueRender:function(){this.breadcrumb(),this.currentUser=this.collection.findWhere({user:this.username}),arangoHelper.buildUserSubNav(this.currentUser.get("user"),"General"),this.currentUser.get("loggedIn")?this.editCurrentUser():this.createEditUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("active"))},createEditUserPasswordModal:function(){var a=[],b=[];b.push(window.modalView.createPasswordEntry("newCurrentPassword","New Password","",!1,"new password",!1)),b.push(window.modalView.createPasswordEntry("confirmCurrentPassword","Confirm New Password","",!1,"confirm new password",!1)),a.push(window.modalView.createSuccessButton("Save",this.submitEditUserPassword.bind(this))),window.modalView.show("modalTable.ejs","Edit User Password",a,b)},createEditCurrentUserModal:function(a,b,c){var d=[],e=[];e.push(window.modalView.createReadOnlyEntry("id_username","Username",a)),e.push(window.modalView.createTextEntry("editCurrentName","Name",b,!1,"Name",!1)),e.push(window.modalView.createTextEntry("editCurrentUserProfileImg","Gravatar account (Mail)",c,"Mailaddress or its md5 representation of your gravatar account.The address will be converted into a md5 string. Only the md5 string will be stored, not the mailaddress.","myAccount(at)gravatar.com")),d.push(window.modalView.createNotificationButton("Change Password",this.editUserPassword.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.submitEditCurrentUserProfile.bind(this))),window.modalView.show("modalTable.ejs","Edit User Profile",d,e,null,null,this.events,null,null,"content")},parseImgString:function(a){return-1===a.indexOf("@")?a:CryptoJS.MD5(a).toString()},createEditUserModal:function(a,b,c){var d,e;e=[{type:window.modalView.tables.READONLY,label:"Username",value:_.escape(a)},{type:window.modalView.tables.TEXT,label:"Name",value:b,id:"editName",placeholder:"Name"},{type:window.modalView.tables.CHECKBOX,label:"Active",value:"active",checked:c,id:"editStatus"}],d=[{title:"Delete",type:window.modalView.buttons.DELETE,callback:this.submitDeleteUser.bind(this,a)},{title:"Change Password",type:window.modalView.buttons.NOTIFICATION,callback:this.createEditUserPasswordModal.bind(this,a)},{title:"Save",type:window.modalView.buttons.SUCCESS,callback:this.submitEditUser.bind(this,a)}],window.modalView.show("modalTable.ejs","Edit User",d,e,null,null,this.events,null,null,"content")},validateStatus:function(a){return""!==a},submitDeleteUser:function(a){var b=this.collection.findWhere({user:a});b.destroy({wait:!0}),window.App.navigate("#users",{trigger:!0})},submitEditCurrentUserProfile:function(){var a=$("#editCurrentName").val(),b=$("#editCurrentUserProfileImg").val();b=this.parseImgString(b);var c=function(a){a?arangoHelper.arangoError("User","Could not edit user settings"):(arangoHelper.arangoNotification("User","Changes confirmed."),this.updateUserProfile())}.bind(this);this.currentUser.setExtras(a,b,c),window.modalView.hide()},submitEditUserPassword:function(){var a=$("#newCurrentPassword").val(),b=$("#confirmCurrentPassword").val();$("#newCurrentPassword").val(""),$("#confirmCurrentPassword").val(""),$("#newCurrentPassword").closest("th").css("backgroundColor","white"),$("#confirmCurrentPassword").closest("th").css("backgroundColor","white");var c=!1;a!==b&&(arangoHelper.arangoError("User","New passwords do not match."),c=!0),c||(this.currentUser.setPassword(a),arangoHelper.arangoNotification("User","Password changed."),window.modalView.hide())},validateUsername:function(a){return""===a?(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1):a.match(/^[a-zA-Z][a-zA-Z0-9_\-]*$/)?!0:(arangoHelper.arangoError("Wrong Username","Username may only contain numbers, letters, _ and -"),!1)},editUserPassword:function(){window.modalView.hide(),this.createEditUserPasswordModal()},validateName:function(a){return""===a?!0:a.match(/^[a-zA-Z][a-zA-Z0-9_\-\ ]*$/)?!0:(arangoHelper.arangoError("Wrong Username","Username may only contain numbers, letters, _ and -"),!1)},submitEditUser:function(a){var b=$("#editName").val(),c=$("#editStatus").is(":checked");if(!this.validateStatus(c))return void $("#editStatus").closest("th").css("backgroundColor","red");if(!this.validateName(b))return void $("#editName").closest("th").css("backgroundColor","red");var d=this.collection.findWhere({user:a});d.save({extra:{name:b},active:c},{type:"PATCH",success:function(){arangoHelper.arangoNotification("User",d.get("user")+" updated.")},error:function(){arangoHelper.arangoError("User","Could not update "+d.get("user")+".")}})},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("User: "+this.username)}})}(),function(){"use strict";window.WorkMonitorView=Backbone.View.extend({el:"#content",id:"#workMonitorContent",template:templateEngine.createTemplate("workMonitorView.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),initialize:function(){},events:{},tableDescription:{id:"workMonitorTable",titles:["Type","Database","Task ID","Started","Url","User","Description","Method"],rows:[],unescaped:[!1,!1,!1,!1,!1,!1,!1,!1]},render:function(){var a=this;this.$el.html(this.template.render({})),this.collection.fetch({success:function(){a.parseTableData(),$(a.id).append(a.table.render({content:a.tableDescription}))}})},parseTableData:function(){var a=this;this.collection.each(function(b){if("AQL query"===b.get("type")){var c=b.get("parent");if(c)try{a.tableDescription.rows.push([b.get("type"),"(p) "+c.database,"(p) "+c.taskId,"(p) "+c.startTime,"(p) "+c.url,"(p) "+c.user,b.get("description"),"(p) "+c.method])}catch(d){console.log("some parse error")}}else"thread"!==b.get("type")&&a.tableDescription.rows.push([b.get("type"),b.get("database"),b.get("taskId"),b.get("startTime"),b.get("url"),b.get("user"),b.get("description"),b.get("method")])})}})}(),function(){"use strict";window.Router=Backbone.Router.extend({toUpdate:[],dbServers:[],isCluster:void 0,routes:{"":"cluster",dashboard:"dashboard",collections:"collections","new":"newCollection",login:"login","collection/:colid/documents/:pageid":"documents","cIndices/:colname":"cIndices","cSettings/:colname":"cSettings","cInfo/:colname":"cInfo","collection/:colid/:docid":"document",shell:"shell",queries:"query",workMonitor:"workMonitor",databases:"databases",settings:"databases",services:"applications","service/:mount":"applicationDetail",graphs:"graphManagement","graphs/:name":"showGraph",users:"userManagement","user/:name":"userView","user/:name/permission":"userPermissionView",userProfile:"userProfile",cluster:"cluster",nodes:"nodes",shards:"shards","node/:name":"node",logs:"logs",helpus:"helpUs","graph2/:name":"graph2","graph2/:name/settings":"graph2settings",support:"support"},execute:function(a,b){$("#subNavigationBar .breadcrumb").html(""),$("#subNavigationBar .bottom").html(""),$("#loadingScreen").hide(),$("#content").show(),a&&a.apply(this,b),this.graphViewer2&&this.graphViewer2.graphSettingsView&&this.graphViewer2.graphSettingsView.hide()},listenerFunctions:{},listener:function(a){_.each(window.App.listenerFunctions,function(b,c){b(a)})},checkUser:function(){var a=this;if("#login"!==window.location.hash){var b=function(){this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show()}.bind(this),c=function(c,d){frontendConfig.authenticationEnabled?(a.currentUser=d,c||null===d?"#login"!==window.location.hash&&this.navigate("login",{trigger:!0}):b()):b()}.bind(this);frontendConfig.authenticationEnabled?this.userCollection.whoAmI(c):(this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show())}},waitForInit:function(a,b,c){this.initFinished?(b||a(!0),b&&!c&&a(b,!0),b&&c&&a(b,c,!0)):setTimeout(function(){b||a(!1),b&&!c&&a(b,!1),b&&c&&a(b,c,!1)},350)},initFinished:!1,initialize:function(){frontendConfig.isCluster===!0&&(this.isCluster=!0),document.addEventListener("keyup",this.listener,!1),window.modalView=new window.ModalView,this.foxxList=new window.FoxxCollection,window.foxxInstallView=new window.FoxxInstallView({collection:this.foxxList}),window.progressView=new window.ProgressView;var a=this;this.userCollection=new window.ArangoUsers,this.initOnce=function(){this.initOnce=function(){};var b=function(b,c){a=this,c===!0&&a.coordinatorCollection.fetch({success:function(){a.fetchDBS()}}),b&&console.log(b)}.bind(this);window.isCoordinator(b),frontendConfig.isCluster===!1&&(this.initFinished=!0),this.arangoDatabase=new window.ArangoDatabase,this.currentDB=new window.CurrentDatabase,this.arangoCollectionsStore=new window.ArangoCollections,this.arangoDocumentStore=new window.ArangoDocument,this.coordinatorCollection=new window.ClusterCoordinators,arangoHelper.setDocumentStore(this.arangoDocumentStore),this.arangoCollectionsStore.fetch({cache:!1}),window.spotlightView=new window.SpotlightView({collection:this.arangoCollectionsStore}),this.footerView=new window.FooterView({collection:a.coordinatorCollection}),this.notificationList=new window.NotificationCollection,this.currentDB.fetch({cache:!1,success:function(){a.naviView=new window.NavigationView({database:a.arangoDatabase,currentDB:a.currentDB,notificationCollection:a.notificationList,userCollection:a.userCollection,isCluster:a.isCluster}),a.naviView.render()}}),this.queryCollection=new window.ArangoQueries,this.footerView.render(),window.checkVersion(),this.userConfig=new window.UserConfig,this.userConfig.fetch(),this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})}.bind(this),$(window).resize(function(){a.handleResize()}),$(window).scroll(function(){})},handleScroll:function(){$(window).scrollTop()>50?($(".navbar > .secondary").css("top",$(window).scrollTop()),$(".navbar > .secondary").css("position","absolute"),$(".navbar > .secondary").css("z-index","10"),$(".navbar > .secondary").css("width",$(window).width())):($(".navbar > .secondary").css("top","0"),$(".navbar > .secondary").css("position","relative"),$(".navbar > .secondary").css("width",""))},cluster:function(a){return this.checkUser(),a?this.isCluster===!1||void 0===this.isCluster?void("_system"===this.currentDB.get("name")?(this.routes[""]="dashboard",this.navigate("#dashboard",{trigger:!0})):(this.routes[""]="collections",this.navigate("#collections",{trigger:!0}))):(this.clusterView||(this.clusterView=new window.ClusterView({coordinators:this.coordinatorCollection,dbServers:this.dbServers})),void this.clusterView.render()):void this.waitForInit(this.cluster.bind(this))},node:function(a,b){return this.checkUser(),b&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodeView||(this.nodeView=new window.NodeView({coordname:a,coordinators:this.coordinatorCollection,dbServers:this.dbServers})),void this.nodeView.render()):void this.waitForInit(this.node.bind(this),a)},shards:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.shardsView||(this.shardsView=new window.ShardsView({dbServers:this.dbServers})),void this.shardsView.render()):void this.waitForInit(this.shards.bind(this))},nodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodesView=new window.NodesView2({}),void this.nodesView.render()):void this.waitForInit(this.nodes.bind(this))},cNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"coordinator"}),void this.nodesView.render()):void this.waitForInit(this.cNodes.bind(this))},dNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):0===this.dbServers.length?void this.navigate("#cNodes",{trigger:!0}):(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"dbserver"}),void this.nodesView.render()):void this.waitForInit(this.dNodes.bind(this))},sNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.scaleView=new window.ScaleView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0]}),void this.scaleView.render()):void this.waitForInit(this.sNodes.bind(this))},addAuth:function(a){var b=this.clusterPlan.get("user");if(!b)return a.abort(),void(this.isCheckingUser||this.requestAuth());var c=b.name,d=b.passwd,e=c.concat(":",d);a.setRequestHeader("Authorization","Basic "+btoa(e))},logs:function(a,b){if(this.checkUser(),!b)return void this.waitForInit(this.logs.bind(this),a);if(!this.logsView){var c=new window.ArangoLogs({upto:!0,loglevel:4}),d=new window.ArangoLogs({loglevel:4}),e=new window.ArangoLogs({loglevel:3}),f=new window.ArangoLogs({loglevel:2}),g=new window.ArangoLogs({loglevel:1});this.logsView=new window.LogsView({logall:c,logdebug:d,loginfo:e,logwarning:f,logerror:g})}this.logsView.render()},applicationDetail:function(a,b){if(this.checkUser(),!b)return void this.waitForInit(this.applicationDetail.bind(this),a);var c=function(){this.hasOwnProperty("applicationDetailView")||(this.applicationDetailView=new window.ApplicationDetailView({model:this.foxxList.get(decodeURIComponent(a))})),this.applicationDetailView.model=this.foxxList.get(decodeURIComponent(a)),this.applicationDetailView.render("swagger")}.bind(this);0===this.foxxList.length?this.foxxList.fetch({cache:!1,success:function(){c()}}):c()},login:function(){var a=function(a,b){this.loginView||(this.loginView=new window.LoginView({collection:this.userCollection})),a||null===b?this.loginView.render():this.loginView.render(!0)}.bind(this);this.userCollection.whoAmI(a)},collections:function(a){if(this.checkUser(),!a)return void this.waitForInit(this.collections.bind(this));var b=this;this.collectionsView||(this.collectionsView=new window.CollectionsView({collection:this.arangoCollectionsStore})),this.arangoCollectionsStore.fetch({cache:!1,success:function(){b.collectionsView.render()}})},cIndices:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.indicesView=new window.IndicesView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.indicesView.render()}}):void this.waitForInit(this.cIndices.bind(this),a)},cSettings:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.settingsView=new window.SettingsView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.settingsView.render()}}):void this.waitForInit(this.cSettings.bind(this),a)},cInfo:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.infoView=new window.InfoView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.infoView.render()}}):void this.waitForInit(this.cInfo.bind(this),a)},documents:function(a,b,c){return this.checkUser(),c?(this.documentsView||(this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})),this.documentsView.setCollectionId(a,b),void this.documentsView.render()):void this.waitForInit(this.documents.bind(this),a,b)},document:function(a,b,c){if(this.checkUser(),!c)return void this.waitForInit(this.document.bind(this),a,b);this.documentView||(this.documentView=new window.DocumentView({collection:this.arangoDocumentStore})),this.documentView.colid=a;var d=window.location.hash.split("/")[2],e=(d.split("%").length-1)%3;decodeURI(d)!==d&&0!==e&&(d=decodeURIComponent(d)),this.documentView.docid=d,this.documentView.render();var f=function(a,b){a?console.log("Error","Could not fetch collection type"):this.documentView.setType(b)}.bind(this);arangoHelper.collectionApiType(a,null,f)},query:function(a){return this.checkUser(),a?(this.queryView||(this.queryView=new window.QueryView({collection:this.queryCollection})),void this.queryView.render()):void this.waitForInit(this.query.bind(this))},graph2:function(a,b){return this.checkUser(),b?(this.graphViewer2&&(this.graphViewer2.graphSettingsView&&this.graphViewer2.graphSettingsView.remove(),this.graphViewer2.remove()),this.graphViewer2=new window.GraphViewer2({name:a,documentStore:this.arangoDocumentStore,collection:new window.GraphCollection,userConfig:this.userConfig}),void this.graphViewer2.render()):void this.waitForInit(this.graph2.bind(this),a)},graph2settings:function(a,b){return this.checkUser(),b?(this.graphSettingsView&&this.graphSettingsView.remove(),this.graphSettingsView=new window.GraphSettingsView({name:a,userConfig:this.userConfig}),void this.graphSettingsView.render()):void this.waitForInit(this.graph2settings.bind(this),a)},helpUs:function(a){return this.checkUser(),a?(this.testView||(this.helpUsView=new window.HelpUsView({})),void this.helpUsView.render()):void this.waitForInit(this.helpUs.bind(this))},support:function(a){return this.checkUser(),a?(this.testView||(this.supportView=new window.SupportView({})),void this.supportView.render()):void this.waitForInit(this.support.bind(this))},workMonitor:function(a){return this.checkUser(),a?(this.workMonitorCollection||(this.workMonitorCollection=new window.WorkMonitorCollection),this.workMonitorView||(this.workMonitorView=new window.WorkMonitorView({collection:this.workMonitorCollection})),void this.workMonitorView.render()):void this.waitForInit(this.workMonitor.bind(this))},queryManagement:function(a){return this.checkUser(),a?(this.queryManagementView||(this.queryManagementView=new window.QueryManagementView({collection:void 0})),void this.queryManagementView.render()):void this.waitForInit(this.queryManagement.bind(this))},databases:function(a){if(this.checkUser(),!a)return void this.waitForInit(this.databases.bind(this));var b=function(a){a?(arangoHelper.arangoError("DB","Could not get list of allowed databases"),this.navigate("#",{trigger:!0}),$("#databaseNavi").css("display","none"),$("#databaseNaviSelect").css("display","none")):(this.databaseView||(this.databaseView=new window.DatabaseView({users:this.userCollection,collection:this.arangoDatabase})),this.databaseView.render())}.bind(this);arangoHelper.databaseAllowed(b)},dashboard:function(a){return this.checkUser(),a?(void 0===this.dashboardView&&(this.dashboardView=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:this.arangoDatabase})),void this.dashboardView.render()):void this.waitForInit(this.dashboard.bind(this))},graphManagement:function(a){return this.checkUser(),a?(this.graphManagementView||(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore})),void this.graphManagementView.render()):void this.waitForInit(this.graphManagement.bind(this))},showGraph:function(a,b){return this.checkUser(),b?void(this.graphManagementView?this.graphManagementView.loadGraphViewer(a):(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render(a,!0))):void this.waitForInit(this.showGraph.bind(this),a)},applications:function(a){return this.checkUser(),a?(void 0===this.applicationsView&&(this.applicationsView=new window.ApplicationsView({collection:this.foxxList})),void this.applicationsView.reload()):void this.waitForInit(this.applications.bind(this))},handleSelectDatabase:function(a){return this.checkUser(),a?void this.naviView.handleSelectDatabase():void this.waitForInit(this.handleSelectDatabase.bind(this))},handleResize:function(){this.dashboardView&&this.dashboardView.resize(),this.graphManagementView&&this.graphManagementView.handleResize($("#content").width()),this.queryView&&this.queryView.resize(),this.naviView&&this.naviView.resize(),this.graphViewer2&&this.graphViewer2.resize(),this.documentsView&&this.documentsView.resize(),this.documentView&&this.documentView.resize()},userPermissionView:function(a,b){if(this.checkUser(),b||null===b)this.userPermissionView=new window.UserPermissionView({collection:this.userCollection,databases:this.arangoDatabase,username:a}),this.userPermissionView.render();else if(b===!1)return void this.waitForInit(this.userPermissionView.bind(this),a)},userView:function(a,b){this.checkUser(),b||null===b?(this.userView=new window.UserView({collection:this.userCollection,username:a}),this.userView.render()):b===!1&&this.waitForInit(this.userView.bind(this),a)},userManagement:function(a){return this.checkUser(),a?(this.userManagementView||(this.userManagementView=new window.UserManagementView({collection:this.userCollection})),void this.userManagementView.render()):void this.waitForInit(this.userManagement.bind(this))},userProfile:function(a){return this.checkUser(),a?(this.userManagementView||(this.userManagementView=new window.UserManagementView({collection:this.userCollection})),void this.userManagementView.render(!0)):void this.waitForInit(this.userProfile.bind(this))},fetchDBS:function(a){var b=this,c=!1;this.coordinatorCollection.each(function(a){b.dbServers.push(new window.ClusterServers([],{host:a.get("address")}))}),this.initFinished=!0,_.each(this.dbServers,function(b){b.fetch({success:function(){c===!1&&a&&(a(),c=!0)}})})},getNewRoute:function(a){return"http://"+a},registerForUpdate:function(a){this.toUpdate.push(a),a.updateUrl()}})}(),function(){"use strict";var a=function(a,b){var c=[];c.push(window.modalView.createSuccessButton("Download Page",function(){window.open("https://www.arangodb.com/download","_blank"),window.modalView.hide()}));var d=[],e=window.modalView.createReadOnlyEntry.bind(window.modalView);d.push(e("current","Current",a.toString())),b.major&&d.push(e("major","Major",b.major.version)),b.minor&&d.push(e("minor","Minor",b.minor.version)),b.bugfix&&d.push(e("bugfix","Bugfix",b.bugfix.version)),window.modalView.show("modalTable.ejs","New Version Available",c,d)};window.checkVersion=function(){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,success:function(b){var c=window.versionHelper.fromString(b.version);$(".navbar #currentVersion").html(" "+b.version.substr(0,5)+''),window.parseVersions=function(b){return _.isEmpty(b)?void $("#currentVersion").addClass("up-to-date"):($("#currentVersion").addClass("out-of-date"),void $("#currentVersion").click(function(){a(c,b)}))},$.ajax({type:"GET",async:!0,crossDomain:!0,timeout:3e3,dataType:"jsonp",url:"https://www.arangodb.com/repositories/versions.php?jsonp=parseVersions&version="+encodeURIComponent(c.toString())})}})}}(),function(){"use strict";window.hasOwnProperty("TEST_BUILD")||($(document).ajaxSend(function(a,b,c){var d=window.arangoHelper.getCurrentJwt();d&&b.setRequestHeader("Authorization","bearer "+d)}),$(document).ready(function(){window.App=new window.Router,Backbone.history.start(),window.App.handleResize()}),$(document).click(function(a){a.stopPropagation(),$(a.target).hasClass("subBarDropdown")||$(a.target).hasClass("dropdown-header")||$(a.target).hasClass("dropdown-footer")||$(a.target).hasClass("toggle")||$("#userInfo").is(":visible")&&$(".subBarDropdown").hide()}))}(); \ No newline at end of file +type:"text",id:"key"}],function(){var a=$("#"+d+"key").attr("value");b.changeTo({color:{type:"attribute",key:a}})})})},this.addControlOpticExpandColour=function(){var c="control_node_expandcolour",d=c+"_";uiComponentsHelper.createButton(a,"Expansion Colour",c,function(){modalDialogHelper.createModalDialog("Display colours for expansion",d,[{type:"text",id:"expanded"},{type:"text",id:"collapsed"}],function(){var a=$("#"+d+"expanded").attr("value"),c=$("#"+d+"collapsed").attr("value");b.changeTo({color:{type:"expand",expanded:a,collapsed:c}})})})},this.addControlOpticLabelAndColour=function(e){var f="control_node_labelandcolour",g=f+"_";uiComponentsHelper.createButton(a,"Configure Label",f,function(){modalDialogHelper.createModalChangeDialog("Change label attribute",g,[{type:"text",id:"label-attribute",text:"Vertex label attribute",value:b.getLabel()||""},{type:"decission",id:"samecolour",group:"colour",text:"Use this attribute for coloring, too",isDefault:b.getLabel()===b.getColor()},{type:"decission",id:"othercolour",group:"colour",text:"Use different attribute for coloring",isDefault:b.getLabel()!==b.getColor(),interior:[{type:"text",id:"colour-attribute",text:"Color attribute",value:b.getColor()||""}]}],function(){var a=$("#"+g+"label-attribute").attr("value"),e=$("#"+g+"colour-attribute").attr("value"),f=$("input[type='radio'][name='colour']:checked").attr("id");f===g+"samecolour"&&(e=a);var h={label:a,color:{type:"attribute",key:e}};d.applyLocalStorage(h),b.changeTo(h),void 0===c&&(c=d.createColourMappingList())})})},this.addControlOpticLabelAndColourList=function(e){var f="control_node_labelandcolourlist",g=f+"_";uiComponentsHelper.createButton(a,"Configure Label",f,function(){modalDialogHelper.createModalChangeDialog("Change label attribute",g,[{type:"extendable",id:"label",text:"Vertex label attribute",objects:b.getLabel()},{type:"decission",id:"samecolour",group:"colour",text:"Use this attribute for coloring, too",isDefault:b.getLabel()===b.getColor()},{type:"decission",id:"othercolour",group:"colour",text:"Use different attribute for coloring",isDefault:b.getLabel()!==b.getColor(),interior:[{type:"extendable",id:"colour",text:"Color attribute",objects:b.getColor()||""}]}],function(){var a=$("input[id^="+g+"label_]"),e=$("input[id^="+g+"colour_]"),f=$("input[type='radio'][name='colour']:checked").attr("id"),h=[],i=[];a.each(function(a,b){var c=$(b).val();""!==c&&h.push(c)}),e.each(function(a,b){var c=$(b).val();""!==c&&i.push(c)}),f===g+"samecolour"&&(i=h);var j={label:h,color:{type:"attribute",key:i}};d.applyLocalStorage(j),b.changeTo(j),void 0===c&&(c=d.createColourMappingList())})})},this.addAllOptics=function(){d.addControlOpticShapeNone(),d.addControlOpticShapeCircle(),d.addControlOpticShapeRect(),d.addControlOpticLabel(),d.addControlOpticSingleColour(),d.addControlOpticAttributeColour(),d.addControlOpticExpandColour()},this.addAllActions=function(){},this.addAll=function(){d.addAllOptics(),d.addAllActions()},this.createColourMappingList=function(){return void 0!==c?c:(c=document.createElement("div"),c.id="node_colour_list",e(b.getColourMapping()),b.setColourMappingListener(e),c)}}function GraphViewer(a,b,c,d,e){"use strict";if($("html").attr("xmlns:xlink","http://www.w3.org/1999/xlink"),void 0===a||void 0===a.append)throw"SVG has to be given and has to be selected using d3.select";if(void 0===b||0>=b)throw"A width greater 0 has to be given";if(void 0===c||0>=c)throw"A height greater 0 has to be given";if(void 0===d||void 0===d.type)throw"An adapter configuration has to be given";var f,g,h,i,j,k,l,m,n=this,o=[],p=[],q=function(a){if(!a)return a={},a.nodes=p,a.links=o,a.width=b,a.height=c,void(i=new ForceLayouter(a));switch(a.type.toLowerCase()){case"force":a.nodes=p,a.links=o,a.width=b,a.height=c,i=new ForceLayouter(a);break;default:throw"Sorry unknown layout type."}},r=function(a){f.setNodeLimit(a,n.start)},s=function(d){d&&(j=new ZoomManager(b,c,a,k,g,h,{},r))},t=function(a){var b=a.edgeShaper||{},c=a.nodeShaper||{},d=c.idfunc||void 0,e=a.zoom||!1;b.shape=b.shape||{type:EdgeShaper.shapes.ARROW},q(a.layouter),m=k.append("g"),h=new EdgeShaper(m,b),l=k.append("g"),g=new NodeShaper(l,c,d),i.setCombinedUpdateFunction(g,h),s(e)};switch(d.type.toLowerCase()){case"arango":d.width=b,d.height=c,f=new ArangoAdapter(p,o,this,d),f.setChildLimit(10);break;case"gharial":d.width=b,d.height=c,f=new GharialAdapter(p,o,this,d),f.setChildLimit(10);break;case"foxx":d.width=b,d.height=c,f=new FoxxAdapter(p,o,d.route,this,d);break;case"json":f=new JSONAdapter(d.path,p,o,this,b,c);break;case"preview":d.width=b,d.height=c,f=new PreviewAdapter(p,o,this,d);break;default:throw"Sorry unknown adapter type."}k=a.append("g"),t(e||{}),this.start=function(a){i.stop(),a&&(""!==$(".infoField").text()?_.each(p,function(a){_.each(f.randomNodes,function(b){a._id===b._id&&(a._expanded=!0)})}):_.each(p,function(a){a._expanded=!0})),g.drawNodes(p),h.drawEdges(o),i.start()},this.loadGraph=function(a,b){f.loadInitialNode(a,function(a){return a.errorCode?void b(a):(a._expanded=!0,n.start(),void(_.isFunction(b)&&b()))})},this.loadGraphWithRandomStart=function(a,b){f.loadRandomNode(function(b){return b.errorCode&&404===b.errorCode?void a(b):(b._expanded=!0,n.start(!0),void(_.isFunction(a)&&a()))},b)},this.loadGraphWithAdditionalNode=function(a,b,c){f.loadAdditionalNodeByAttributeValue(a,b,function(a){return a.errorCode?void c(a):(a._expanded=!0,n.start(),void(_.isFunction(c)&&c()))})},this.loadGraphWithAttributeValue=function(a,b,c){f.randomNodes=[],f.definedNodes=[],f.loadInitialNodeByAttributeValue(a,b,function(a){return a.errorCode?void c(a):(a._expanded=!0,n.start(),void(_.isFunction(c)&&c()))})},this.cleanUp=function(){g.resetColourMap(),h.resetColourMap()},this.changeWidth=function(a){i.changeWidth(a),j.changeWidth(a),f.setWidth(a)},this.dispatcherConfig={expand:{edges:o,nodes:p,startCallback:n.start,adapter:f,reshapeNodes:g.reshapeNodes},drag:{layouter:i},nodeEditor:{nodes:p,adapter:f},edgeEditor:{edges:o,adapter:f}},this.adapter=f,this.nodeShaper=g,this.edgeShaper=h,this.layouter=i,this.zoomManager=j}EdgeShaper.shapes=Object.freeze({NONE:0,ARROW:1}),NodeShaper.shapes=Object.freeze({NONE:0,CIRCLE:1,RECT:2,IMAGE:3});var modalDialogHelper=modalDialogHelper||{};!function(){"use strict";var a,b=function(a){$(document).bind("keypress.key13",function(b){b.which&&13===b.which&&$(a).click()})},c=function(){$(document).unbind("keypress.key13")},d=function(a,b,c,d,e){var f,g,h=function(){e(f)},i=modalDialogHelper.modalDivTemplate(a,b,c,h),j=document.createElement("tr"),k=document.createElement("th"),l=document.createElement("th"),m=document.createElement("th"),n=document.createElement("button"),o=1;f=function(){var a={};return _.each($("#"+c+"table tr:not(#first_row)"),function(b){var c=$(".keyCell input",b).val(),d=$(".valueCell input",b).val();a[c]=d}),a},i.appendChild(j),j.id="first_row",j.appendChild(k),k.className="keyCell",j.appendChild(l),l.className="valueCell",j.appendChild(m),m.className="actionCell",m.appendChild(n),n.id=c+"new",n.className="graphViewer-icon-button gv-icon-small add",g=function(a,b){var d,e,f,g=/^_(id|rev|key|from|to)/,h=document.createElement("tr"),j=document.createElement("th"),k=document.createElement("th"),l=document.createElement("th");g.test(b)||(i.appendChild(h),h.appendChild(k),k.className="keyCell",e=document.createElement("input"),e.type="text",e.id=c+b+"_key",e.value=b,k.appendChild(e),h.appendChild(l),l.className="valueCell",f=document.createElement("input"),f.type="text",f.id=c+b+"_value","object"==typeof a?f.value=JSON.stringify(a):f.value=a,l.appendChild(f),h.appendChild(j),j.className="actionCell",d=document.createElement("button"),d.id=c+b+"_delete",d.className="graphViewer-icon-button gv-icon-small delete",j.appendChild(d),d.onclick=function(){i.removeChild(h)})},n.onclick=function(){g("","new_"+o),o++},_.each(d,g),$("#"+c+"modal").modal("show")},e=function(a,b,c,d,e){var f=modalDialogHelper.modalDivTemplate(a,b,c,e),g=document.createElement("tr"),h=document.createElement("th"),i=document.createElement("pre");f.appendChild(g),g.appendChild(h),h.appendChild(i),i.className="gv-object-view",i.innerHTML=JSON.stringify(d,null,2),$("#"+c+"modal").modal("show")},f=function(a,b){var c=document.createElement("input");return c.type="text",c.id=a,c.value=b,c},g=function(a,b){var c=document.createElement("input");return c.type="checkbox",c.id=a,c.checked=b,c},h=function(a,b,c){var d=document.createElement("select");return d.id=a,_.each(_.sortBy(b,function(a){return a.toLowerCase()}),function(a){var b=document.createElement("option");b.value=a,b.selected=a===c,b.appendChild(document.createTextNode(a)),d.appendChild(b)}),d},i=function(a){var b=$(".decission_"+a),c=$("input[type='radio'][name='"+a+"']:checked").attr("id");b.each(function(){$(this).attr("decider")===c?$(this).css("display",""):$(this).css("display","none")})},j=function(b,c,d,e,f,g,h,j){var k=document.createElement("input"),l=b+c,m=document.createElement("label"),n=document.createElement("tbody");k.id=l,k.type="radio",k.name=d,k.className="gv-radio-button",m.className="radio",h.appendChild(m),m.appendChild(k),m.appendChild(document.createTextNode(e)),j.appendChild(n),$(n).toggleClass("decission_"+d,!0),$(n).attr("decider",l),_.each(g,function(c){a(n,b,c)}),f?k.checked=!0:k.checked=!1,m.onclick=function(a){i(d),a.stopPropagation()},i(d)},k=function(a,b,c,d,e,f){var g,h=[],i=a+b,j=1,k=document.createElement("th"),l=document.createElement("button"),m=document.createElement("input"),n=function(a){j++;var c,d=document.createElement("tr"),g=document.createElement("th"),k=document.createElement("th"),l=document.createElement("th"),m=document.createElement("input"),n=document.createElement("button");m.type="text",m.id=i+"_"+j,m.value=a||"",c=0===h.length?$(f):$(h[h.length-1]),c.after(d),d.appendChild(g),g.className="collectionTh capitalize",g.appendChild(document.createTextNode(b+" "+j+":")),d.appendChild(k),k.className="collectionTh",k.appendChild(m),n.id=i+"_"+j+"_remove",n.className="graphViewer-icon-button gv-icon-small delete",n.onclick=function(){e.removeChild(d),h.splice(h.indexOf(d),1)},l.appendChild(n),d.appendChild(l),h.push(d)};for(m.type="text",m.id=i+"_1",d.appendChild(m),k.appendChild(l),f.appendChild(k),l.onclick=function(){n()},l.id=i+"_addLine",l.className="graphViewer-icon-button gv-icon-small add","string"==typeof c&&c.length>0&&(c=[c]),c.length>0&&(m.value=c[0]),g=1;g'+c+""),a.disabled||$("#subNavigationBar .bottom").children().last().bind("click",function(){window.App.navigate(a.route,{trigger:!0})})})},buildUserSubNav:function(a,b){var c={General:{route:"#user/"+encodeURIComponent(a)},Permissions:{route:"#user/"+encodeURIComponent(a)+"/permission"}};c[b].active=!0,this.buildSubNavBar(c)},buildGraphSubNav:function(a,b){var c={Content:{route:"#graph2/"+encodeURIComponent(a)},Settings:{route:"#graph2/"+encodeURIComponent(a)+"/settings"}};c[b].active=!0,this.buildSubNavBar(c)},buildNodeSubNav:function(a,b,c){var d={Dashboard:{route:"#node/"+encodeURIComponent(a)}};d[b].active=!0,d[c].disabled=!0,this.buildSubNavBar(d)},buildNodesSubNav:function(a,b){var c={Overview:{route:"#nodes"},Shards:{route:"#shards"}};c[a].active=!0,b&&(c[b].disabled=!0),this.buildSubNavBar(c)},scaleability:void 0,buildCollectionSubNav:function(a,b){var c="#collection/"+encodeURIComponent(a),d={Content:{route:c+"/documents/1"},Indices:{route:"#cIndices/"+encodeURIComponent(a)},Info:{route:"#cInfo/"+encodeURIComponent(a)},Settings:{route:"#cSettings/"+encodeURIComponent(a)}};d[b].active=!0,this.buildSubNavBar(d)},enableKeyboardHotkeys:function(a){var b=window.arangoHelper.hotkeysFunctions;a===!0&&($(document).on("keydown",null,"j",b.scrollDown),$(document).on("keydown",null,"k",b.scrollUp))},databaseAllowed:function(a){var b=function(b,c){b?arangoHelper.arangoError("",""):$.ajax({type:"GET",cache:!1,url:this.databaseUrl("/_api/database/",c),contentType:"application/json",processData:!1,success:function(){a(!1,!0)},error:function(){a(!0,!1)}})}.bind(this);this.currentDatabase(b)},arangoNotification:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"success"})},arangoError:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"error"})},arangoWarning:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"warning"})},arangoMessage:function(a,b,c){window.App.notificationList.add({title:a,content:b,info:c,type:"message"})},hideArangoNotifications:function(){$.noty.clearQueue(),$.noty.closeAll()},openDocEditor:function(a,b,c){var d=a.split("/"),e=this,f=new window.DocumentView({collection:window.App.arangoDocumentStore});f.breadcrumb=function(){},f.colid=d[0],f.docid=d[1],f.el=".arangoFrame .innerDiv",f.render(),f.setType(b),$(".arangoFrame .headerBar").remove(),$(".arangoFrame .outerDiv").prepend(''),$(".arangoFrame .outerDiv").click(function(){e.closeDocEditor()}),$(".arangoFrame .innerDiv").click(function(a){a.stopPropagation()}),$(".fa-times").click(function(){e.closeDocEditor()}),$(".arangoFrame").show(),f.customView=!0,f.customDeleteFunction=function(){window.modalView.hide(),$(".arangoFrame").hide()},$(".arangoFrame #deleteDocumentButton").click(function(){f.deleteDocumentModal()}),$(".arangoFrame #saveDocumentButton").click(function(){f.saveDocument()}),$(".arangoFrame #deleteDocumentButton").css("display","none")},closeDocEditor:function(){$(".arangoFrame .outerDiv .fa-times").remove(),$(".arangoFrame").hide()},addAardvarkJob:function(a,b){$.ajax({cache:!1,type:"POST",url:this.databaseUrl("/_admin/aardvark/job"),data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){b&&b(!1,a)},error:function(a){b&&b(!0,a)}})},deleteAardvarkJob:function(a,b){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,success:function(a){b&&b(!1,a)},error:function(a){b&&b(!0,a)}})},deleteAllAardvarkJobs:function(a){$.ajax({cache:!1,type:"DELETE",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(b){a&&a(!1,b)},error:function(b){a&&a(!0,b)}})},getAardvarkJobs:function(a){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_admin/aardvark/job"),contentType:"application/json",processData:!1,success:function(b){a&&a(!1,b)},error:function(b){a&&a(!0,b)}})},getPendingJobs:function(a){$.ajax({cache:!1,type:"GET",url:this.databaseUrl("/_api/job/pending"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},syncAndReturnUninishedAardvarkJobs:function(a,b){var c=function(c,d){if(c)b(!0);else{var e=function(c,e){if(c)arangoHelper.arangoError("","");else{var f=[];e.length>0?_.each(d,function(b){if(b.type===a||void 0===b.type){var c=!1;_.each(e,function(a){b.id===a&&(c=!0)}),c?f.push({collection:b.collection,id:b.id,type:b.type,desc:b.desc}):window.arangoHelper.deleteAardvarkJob(b.id)}}):d.length>0&&this.deleteAllAardvarkJobs(),b(!1,f)}}.bind(this);this.getPendingJobs(e)}}.bind(this);this.getAardvarkJobs(c)},getRandomToken:function(){return Math.round((new Date).getTime())},isSystemAttribute:function(a){var b=this.systemAttributes();return b[a]},isSystemCollection:function(a){return"_"===a.name.substr(0,1)},setDocumentStore:function(a){this.arangoDocumentStore=a},collectionApiType:function(a,b,c){if(b||void 0===this.CollectionTypes[a]){var d=function(b,c,d){b?arangoHelper.arangoError("Error","Could not detect collection type"):(this.CollectionTypes[a]=c.type,3===this.CollectionTypes[a]?d(!1,"edge"):d(!1,"document"))}.bind(this);this.arangoDocumentStore.getCollectionInfo(a,d,c)}else c(!1,this.CollectionTypes[a])},collectionType:function(a){if(!a||""===a.name)return"-";var b;return b=2===a.type?"document":3===a.type?"edge":"unknown",this.isSystemCollection(a)&&(b+=" (system)"),b},formatDT:function(a){var b=function(a){return 10>a?"0"+a:a};return a.getUTCFullYear()+"-"+b(a.getUTCMonth()+1)+"-"+b(a.getUTCDate())+" "+b(a.getUTCHours())+":"+b(a.getUTCMinutes())+":"+b(a.getUTCSeconds())},escapeHtml:function(a){return String(a).replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")},backendUrl:function(a){return frontendConfig.basePath+a},databaseUrl:function(a,b){if("/_db/"===a.substr(0,5))throw new Error("Calling databaseUrl with a databased url ("+a+") doesn't make any sense");return b||(b="_system",frontendConfig.db&&(b=frontendConfig.db)),this.backendUrl("/_db/"+encodeURIComponent(b)+a)},showAuthDialog:function(){var a=!0,b=localStorage.getItem("authenticationNotification");return"false"===b&&(a=!1),a},doNotShowAgain:function(){localStorage.setItem("authenticationNotification",!1)},renderEmpty:function(a){$("#content").html('")},download:function(a,b){$.ajax(a).success(function(a,c,d){if(b)return void b(a);var e=new Blob([JSON.stringify(a)],{type:d.getResponseHeader("Content-Type")||"application/octet-stream"}),f=window.URL.createObjectURL(e),g=document.createElement("a");document.body.appendChild(g),g.style="display: none",g.href=f,g.download=d.getResponseHeader("Content-Disposition").replace(/.* filename="([^")]*)"/,"$1"),g.click(),window.URL.revokeObjectURL(f),document.body.removeChild(g)})}}}(),function(){"use strict";if(!window.hasOwnProperty("TEST_BUILD")){var a=function(){var a={};return a.createTemplate=function(a){var b=$("#"+a.replace(".","\\.")).html();return{render:function(a){var c=_.template(b);return c=c(a)}}},a};window.templateEngine=new a}}(),function(){"use strict";window.dygraphConfig={defaultFrame:12e5,zeropad:function(a){return 10>a?"0"+a:a},xAxisFormat:function(a){if(-1===a)return"";var b=new Date(a);return this.zeropad(b.getHours())+":"+this.zeropad(b.getMinutes())+":"+this.zeropad(b.getSeconds())},mergeObjects:function(a,b,c){c||(c=[]);var d,e={};return c.forEach(function(c){var d=a[c],f=b[c];void 0===d&&(d={}),void 0===f&&(f={}),e[c]=_.extend(d,f)}),d=_.extend(a,b),Object.keys(e).forEach(function(a){d[a]=e[a]}),d},mapStatToFigure:{pageFaults:["times","majorPageFaultsPerSecond","minorPageFaultsPerSecond"],systemUserTime:["times","systemTimePerSecond","userTimePerSecond"],totalTime:["times","avgQueueTime","avgRequestTime","avgIoTime"],dataTransfer:["times","bytesSentPerSecond","bytesReceivedPerSecond"],requests:["times","getsPerSecond","putsPerSecond","postsPerSecond","deletesPerSecond","patchesPerSecond","headsPerSecond","optionsPerSecond","othersPerSecond"]},colors:["rgb(95, 194, 135)","rgb(238, 190, 77)","#81ccd8","#7ca530","#3c3c3c","#aa90bd","#e1811d","#c7d4b2","#d0b2d4"],figureDependedOptions:{clusterRequestsPerSecond:{showLabelsOnHighlight:!0,title:"",header:"Cluster Requests per Second",stackedGraph:!0,div:"lineGraphLegend",labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},pageFaults:{header:"Page Faults",visibility:[!0,!1],labels:["datetime","Major Page","Minor Page"],div:"pageFaultsChart",labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},systemUserTime:{div:"systemUserTimeChart",header:"System and User Time",labels:["datetime","System Time","User Time"],stackedGraph:!0,labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}},totalTime:{div:"totalTimeChart",header:"Total Time",labels:["datetime","Queue","Computation","I/O"],labelsKMG2:!1,axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}},stackedGraph:!0},dataTransfer:{header:"Data Transfer",labels:["datetime","Bytes sent","Bytes received"],stackedGraph:!0,div:"dataTransferChart"},requests:{header:"Requests",labels:["datetime","Reads","Writes"],stackedGraph:!0,div:"requestsChart",axes:{y:{valueFormatter:function(a){return parseFloat(a.toPrecision(3))},axisLabelFormatter:function(a){return 0===a?0:parseFloat(a.toPrecision(3))}}}}},getDashBoardFigures:function(a){var b=[],c=this;return Object.keys(this.figureDependedOptions).forEach(function(d){"clusterRequestsPerSecond"!==d&&(c.figureDependedOptions[d].div||a)&&b.push(d)}),b},getDefaultConfig:function(a){var b=this,c={digitsAfterDecimal:1,drawGapPoints:!0,fillGraph:!0,fillAlpha:.85,showLabelsOnHighlight:!1,strokeWidth:0,lineWidth:0,strokeBorderWidth:0,includeZero:!0,highlightCircleSize:2.5,labelsSeparateLines:!0,strokeBorderColor:"rgba(0,0,0,0)",interactionModel:{},maxNumberWidth:10,colors:[this.colors[0]],xAxisLabelWidth:"50",rightGap:15,showRangeSelector:!1,rangeSelectorHeight:50,rangeSelectorPlotStrokeColor:"#365300",rangeSelectorPlotFillColor:"",pixelsPerLabel:50,labelsKMG2:!0,dateWindow:[(new Date).getTime()-this.defaultFrame,(new Date).getTime()],axes:{x:{valueFormatter:function(a){return b.xAxisFormat(a)}},y:{ticker:Dygraph.numericLinearTicks}}};return this.figureDependedOptions[a]&&(c=this.mergeObjects(c,this.figureDependedOptions[a],["axes"]),c.div&&c.labels&&(c.colors=this.getColors(c.labels),c.labelsDiv=document.getElementById(c.div+"Legend"),c.legend="always",c.showLabelsOnHighlight=!0)),c},getDetailChartConfig:function(a){var b=_.extend(this.getDefaultConfig(a),{showRangeSelector:!0,interactionModel:null,showLabelsOnHighlight:!0,highlightCircleSize:2.5,legend:"always",labelsDiv:"div#detailLegend.dashboard-legend-inner"});return"pageFaults"===a&&(b.visibility=[!0,!0]),b.labels||(b.labels=["datetime",b.header],b.colors=this.getColors(b.labels)),b},getColors:function(a){var b;return b=this.colors.concat([]),b.slice(0,a.length-1)}}}(),function(){"use strict";window.arangoCollectionModel=Backbone.Model.extend({idAttribute:"name",urlRoot:arangoHelper.databaseUrl("/_api/collection"),defaults:{id:"",name:"",status:"",type:"",isSystem:!1,picture:"",locked:!1,desc:void 0},getProperties:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+encodeURIComponent(this.get("id"))+"/properties"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},getFigures:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/figures"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(){a(!0)}})},getRevision:function(a,b){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/revision"),contentType:"application/json",processData:!1,success:function(c){a(!1,c,b)},error:function(){a(!0)}})},getIndex:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/index/?collection="+this.get("id")),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},createIndex:function(a,b){var c=this;$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/index?collection="+c.get("id")),headers:{"x-arango-async":"store"},data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a,d,e){e.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:e.getResponseHeader("x-arango-async-id"),type:"index",desc:"Creating Index",collection:c.get("id")}), +b(!1,a)):b(!0,a)},error:function(a){b(!0,a)}})},deleteIndex:function(a,b){var c=this;$.ajax({cache:!1,type:"DELETE",url:arangoHelper.databaseUrl("/_api/index/"+this.get("name")+"/"+encodeURIComponent(a)),headers:{"x-arango-async":"store"},success:function(a,d,e){e.getResponseHeader("x-arango-async-id")?(window.arangoHelper.addAardvarkJob({id:e.getResponseHeader("x-arango-async-id"),type:"index",desc:"Removing Index",collection:c.get("id")}),b(!1,a)):b(!0,a)},error:function(a){b(!0,a)}}),b()},truncateCollection:function(){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/truncate"),success:function(){arangoHelper.arangoNotification("Collection truncated.")},error:function(){arangoHelper.arangoError("Collection error.")}})},loadCollection:function(a){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/load"),success:function(){a(!1)},error:function(){a(!0)}}),a()},unloadCollection:function(a){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/unload?flush=true"),success:function(){a(!1)},error:function(){a(!0)}}),a()},renameCollection:function(a,b){var c=this;$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/rename"),data:JSON.stringify({name:a}),contentType:"application/json",processData:!1,success:function(){c.set("name",a),b(!1)},error:function(a){b(!0,a)}})},changeCollection:function(a,b,c,d){var e=!1;"true"===a?a=!0:"false"===a&&(a=!1);var f={waitForSync:a,journalSize:parseInt(b,10),indexBuckets:parseInt(c,10)};return $.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/collection/"+this.get("id")+"/properties"),data:JSON.stringify(f),contentType:"application/json",processData:!1,success:function(){d(!1)},error:function(a){d(!1,a)}}),e}})}(),window.DatabaseModel=Backbone.Model.extend({idAttribute:"name",initialize:function(){"use strict"},isNew:function(){"use strict";return!1},sync:function(a,b,c){"use strict";return"update"===a&&(a="create"),Backbone.sync(a,b,c)},url:arangoHelper.databaseUrl("/_api/database"),defaults:{}}),window.arangoDocumentModel=Backbone.Model.extend({initialize:function(){"use strict"},urlRoot:arangoHelper.databaseUrl("/_api/document"),defaults:{_id:"",_rev:"",_key:""},getSorted:function(){"use strict";var a=this,b=Object.keys(a.attributes).sort(function(a,b){var c=arangoHelper.isSystemAttribute(a),d=arangoHelper.isSystemAttribute(b);return c!==d?c?-1:1:b>a?-1:1}),c={};return _.each(b,function(b){c[b]=a.attributes[b]}),c}}),function(){"use strict";window.ArangoQuery=Backbone.Model.extend({urlRoot:arangoHelper.databaseUrl("/_api/user"),defaults:{name:"",type:"custom",value:""}})}(),window.Replication=Backbone.Model.extend({defaults:{state:{},server:{}},initialize:function(){}}),window.Statistics=Backbone.Model.extend({defaults:{},url:function(){"use strict";return"/_admin/statistics"}}),window.StatisticsDescription=Backbone.Model.extend({defaults:{figures:"",groups:""},url:function(){"use strict";return"/_admin/statistics-description"}}),window.Users=Backbone.Model.extend({defaults:{user:"",active:!1,extra:{}},idAttribute:"user",parse:function(a){return this.isNotNew=!0,a},isNew:function(){return!this.isNotNew},url:function(){return this.isNew()?arangoHelper.databaseUrl("/_api/user"):""!==this.get("user")?arangoHelper.databaseUrl("/_api/user/"+this.get("user")):arangoHelper.databaseUrl("/_api/user")},checkPassword:function(a,b){$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({passwd:a}),contentType:"application/json",processData:!1,success:function(a){b(!1,a)},error:function(a){b(!0,a)}})},setPassword:function(a){$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({passwd:a}),contentType:"application/json",processData:!1})},setExtras:function(a,b,c){$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+this.get("user")),data:JSON.stringify({extra:{name:a,img:b}}),contentType:"application/json",processData:!1,success:function(){c(!1)},error:function(){c(!0)}})}}),function(){"use strict";window.ClusterCoordinator=Backbone.Model.extend({defaults:{name:"",status:"ok",address:"",protocol:""},idAttribute:"name",forList:function(){return{name:this.get("name"),status:this.get("status"),url:this.get("url")}}})}(),function(){"use strict";window.ClusterServer=Backbone.Model.extend({defaults:{name:"",address:"",role:"",status:"ok"},idAttribute:"name",forList:function(){return{name:this.get("name"),address:this.get("address"),status:this.get("status")}}})}(),function(){"use strict";window.Coordinator=Backbone.Model.extend({defaults:{address:"",protocol:"",name:"",status:""}})}(),function(){"use strict";window.CurrentDatabase=Backbone.Model.extend({url:arangoHelper.databaseUrl("/_api/database/current",frontendConfig.db),parse:function(a){return a.result}})}(),function(){"use strict";var a=function(a,b,c,d,e,f){var g={contentType:"application/json",processData:!1,type:c};b=b||function(){},f=_.extend({mount:a.encodedMount()},f);var h=_.reduce(f,function(a,b,c){return a+encodeURIComponent(c)+"="+encodeURIComponent(b)+"&"},"?");g.url=arangoHelper.databaseUrl("/_admin/aardvark/foxxes"+(d?"/"+d:"")+h.slice(0,h.length-1)),void 0!==e&&(g.data=JSON.stringify(e)),$.ajax(g).then(function(a){b(null,a)},function(a){window.xhr=a,b(_.extend(a.status?new Error(a.responseJSON?a.responseJSON.errorMessage:a.responseText):new Error("Network Error"),{statusCode:a.status}))})};window.Foxx=Backbone.Model.extend({idAttribute:"mount",defaults:{author:"Unknown Author",name:"",version:"Unknown Version",description:"No description",license:"Unknown License",contributors:[],scripts:{},config:{},deps:{},git:"",system:!1,development:!1},isNew:function(){return!1},encodedMount:function(){return encodeURIComponent(this.get("mount"))},destroy:function(b,c){a(this,c,"DELETE",void 0,void 0,b)},isBroken:function(){return!1},needsAttention:function(){return this.isBroken()||this.needsConfiguration()||this.hasUnconfiguredDependencies()},needsConfiguration:function(){return _.any(this.get("config"),function(a){return void 0===a.current&&a.required!==!1})},hasUnconfiguredDependencies:function(){return _.any(this.get("deps"),function(a){return void 0===a.current&&a.definition.required!==!1})},getConfiguration:function(b){a(this,function(a,c){a||this.set("config",c),"function"==typeof b&&b(a,c)}.bind(this),"GET","config")},setConfiguration:function(b,c){a(this,c,"PATCH","config",b)},getDependencies:function(b){a(this,function(a,c){a||this.set("deps",c),"function"==typeof b&&b(a,c)}.bind(this),"GET","deps")},setDependencies:function(b,c){a(this,c,"PATCH","deps",b)},toggleDevelopment:function(b,c){a(this,function(a,d){a||this.set("development",b),"function"==typeof c&&c(a,d)}.bind(this),"PATCH","devel",b)},runScript:function(b,c,d){a(this,d,"POST","scripts/"+b,c)},runTests:function(b,c){a(this,function(a,b){"function"==typeof c&&c(a?a.responseJSON:a,b)},"POST","tests",b)},isSystem:function(){return this.get("system")},isDevelopment:function(){return this.get("development")},download:function(){a(this,function(a,b){return a?void console.error(a.responseJSON):void(window.location.href=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/download/zip?mount="+this.encodedMount()+"&nonce="+b.nonce))}.bind(this),"POST","download/nonce")},fetchThumbnail:function(a){var b=new XMLHttpRequest;b.responseType="blob",b.onload=function(){this.thumbnailUrl=URL.createObjectURL(b.response),a()}.bind(this),b.onerror=a,b.open("GET","foxxes/thumbnail?mount="+this.encodedMount()),window.arangoHelper.getCurrentJwt()&&b.setRequestHeader("Authorization","bearer "+window.arangoHelper.getCurrentJwt()),b.send()}})}(),function(){"use strict";window.Graph=Backbone.Model.extend({idAttribute:"_key",urlRoot:arangoHelper.databaseUrl("/_api/gharial"),isNew:function(){return!this.get("_id")},parse:function(a){return a.graph||a},addEdgeDefinition:function(a){$.ajax({async:!1,type:"POST",url:this.urlRoot+"/"+this.get("_key")+"/edge",data:JSON.stringify(a)})},deleteEdgeDefinition:function(a){$.ajax({async:!1,type:"DELETE",url:this.urlRoot+"/"+this.get("_key")+"/edge/"+a})},modifyEdgeDefinition:function(a){$.ajax({async:!1,type:"PUT",url:this.urlRoot+"/"+this.get("_key")+"/edge/"+a.collection,data:JSON.stringify(a)})},addVertexCollection:function(a){$.ajax({async:!1,type:"POST",url:this.urlRoot+"/"+this.get("_key")+"/vertex",data:JSON.stringify({collection:a})})},deleteVertexCollection:function(a){$.ajax({async:!1,type:"DELETE",url:this.urlRoot+"/"+this.get("_key")+"/vertex/"+a})},defaults:{name:"",edgeDefinitions:[],orphanCollections:[]}})}(),function(){"use strict";window.newArangoLog=Backbone.Model.extend({defaults:{lid:"",level:"",timestamp:"",text:"",totalAmount:""},getLogStatus:function(){switch(this.get("level")){case 1:return"Error";case 2:return"Warning";case 3:return"Info";case 4:return"Debug";default:return"Unknown"}}})}(),function(){"use strict";window.Notification=Backbone.Model.extend({defaults:{title:"",date:0,content:"",priority:"",tags:"",seen:!1}})}(),function(){"use strict";window.queryManagementModel=Backbone.Model.extend({defaults:{id:"",query:"",started:"",runTime:""}})}(),window.UserConfig=Backbone.Model.extend({defaults:{graphs:"",queries:[]},model:window.UserConfigModel,parse:function(a){return a.result},url:function(){return window.App.currentUser?this.username=window.App.currentUser:this.username="root",arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config")},setItem:function(a,b,c){var d=this;$.ajax({type:"PUT",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,data:JSON.stringify({value:b}),async:!0,success:function(){d.set(a,b),c&&c()},error:function(){arangoHelper.arangoError("User configuration","Could not update user configuration for key: "+a)}})},getItem:function(a,b){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.username)+"/config/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a)},error:function(){arangoHelper.arangoError("User configuration","Could not fetch user configuration for key: "+a)}})}}),function(){"use strict";window.workMonitorModel=Backbone.Model.extend({defaults:{name:"",number:"",status:"",type:""}})}(),function(){"use strict";window.AutomaticRetryCollection=Backbone.Collection.extend({_retryCount:0,checkRetries:function(){var a=this;return this.updateUrl(),this._retryCount>10?(window.setTimeout(function(){a._retryCount=0},1e4),window.App.clusterUnreachable(),!1):!0},successFullTry:function(){this._retryCount=0},failureTry:function(a,b,c){401===c.status?window.App.requestAuth():(window.App.clusterPlan.rotateCoordinator(),this._retryCount++,a())}})}(),function(){"use strict";window.PaginatedCollection=Backbone.Collection.extend({page:0,pagesize:10,totalAmount:0,getPage:function(){return this.page+1},setPage:function(a){return a>=this.getLastPageNumber()?void(this.page=this.getLastPageNumber()-1):1>a?void(this.page=0):void(this.page=a-1)},getLastPageNumber:function(){return Math.max(Math.ceil(this.totalAmount/this.pagesize),1)},getOffset:function(){return this.page*this.pagesize},getPageSize:function(){return this.pagesize},setPageSize:function(a){if("all"===a)this.pagesize="all";else try{a=parseInt(a,10),this.pagesize=a}catch(b){}},setToFirst:function(){this.page=0},setToLast:function(){this.setPage(this.getLastPageNumber())},setToPrev:function(){this.setPage(this.getPage()-1)},setToNext:function(){this.setPage(this.getPage()+1)},setTotal:function(a){this.totalAmount=a},getTotal:function(){return this.totalAmount},setTotalMinusOne:function(){this.totalAmount--}})}(),window.ClusterStatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics",updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(a,b){this.host=b.host,window.App.registerForUpdate(this)}}),function(){"use strict";window.ArangoCollections=Backbone.Collection.extend({url:arangoHelper.databaseUrl("/_api/collection"),model:arangoCollectionModel,searchOptions:{searchPhrase:null,includeSystem:!1,includeDocument:!0,includeEdge:!0,includeLoaded:!0,includeUnloaded:!0,sortBy:"name",sortOrder:1},translateStatus:function(a){switch(a){case 0:return"corrupted";case 1:return"new born collection";case 2:return"unloaded";case 3:return"loaded";case 4:return"unloading";case 5:return"deleted";case 6:return"loading";default:return}},translateTypePicture:function(a){var b="";switch(a){case"document":b+="fa-file-text-o";break;case"edge":b+="fa-share-alt";break;case"unknown":b+="fa-question";break;default:b+="fa-cogs"}return b},parse:function(a){var b=this;return _.each(a.result,function(a){a.isSystem=arangoHelper.isSystemCollection(a),a.type=arangoHelper.collectionType(a),a.status=b.translateStatus(a.status),a.picture=b.translateTypePicture(a.type)}),a.result},getPosition:function(a){var b,c=this.getFiltered(this.searchOptions),d=null,e=null;for(b=0;b0&&(d=c[b-1]),b0){var e,f=d.get("name").toLowerCase();for(e=0;ed?-1:1):0}),b},newCollection:function(a,b){var c={};c.name=a.collName,c.waitForSync=a.wfs,a.journalSize>0&&(c.journalSize=a.journalSize),c.isSystem=a.isSystem,c.type=parseInt(a.collType,10),a.shards&&(c.numberOfShards=a.shards,c.shardKeys=a.keys),a.replicationFactor&&(c.replicationFactor=JSON.parse(a.replicationFactor)),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/collection"),data:JSON.stringify(c),contentType:"application/json",processData:!1,success:function(a){b(!1,a)},error:function(a){b(!0,a)}})}})}(),function(){"use strict";window.ArangoDatabase=Backbone.Collection.extend({model:window.DatabaseModel,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_api/database"),comparator:function(a,b){var c=a.get("name").toLowerCase(),d=b.get("name").toLowerCase();return this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},parse:function(a){return a?_.map(a.result,function(a){return{name:a}}):void 0},initialize:function(){var a=this;this.fetch().done(function(){a.sort()})},setSortingDesc:function(a){this.sortOptions.desc=a},getDatabases:function(){var a=this;return this.fetch().done(function(){a.sort()}),this.models},getDatabasesForUser:function(a){$.ajax({type:"GET",cache:!1,url:this.url+"/user",contentType:"application/json",processData:!1,success:function(b){a(!1,b.result.sort())},error:function(){a(!0,[])}})},createDatabaseURL:function(a,b,c){var d=window.location,e=window.location.hash;b=b?"SSL"===b||"https:"===b?"https:":"http:":d.protocol,c=c||d.port;var f=b+"//"+window.location.hostname+":"+c+"/_db/"+encodeURIComponent(a)+"/_admin/aardvark/standalone.html";if(e){var g=e.split("/")[0];0===g.indexOf("#collection")&&(g="#collections"),0===g.indexOf("#service")&&(g="#services"),f+=g}return f},getCurrentDatabase:function(a){$.ajax({type:"GET",cache:!1,url:this.url+"/current",contentType:"application/json",processData:!1,success:function(b){200===b.code?a(!1,b.result.name):a(!1,b)},error:function(b){a(!0,b)}})},hasSystemAccess:function(a){var b=function(b,c){b?arangoHelper.arangoError("DB","Could not fetch databases"):a(!1,_.includes(c,"_system"))};this.getDatabasesForUser(b)}})}(),window.ArangoDocument=Backbone.Collection.extend({url:"/_api/document/",model:arangoDocumentModel,collectionInfo:{},deleteEdge:function(a,b,c){this.deleteDocument(a,b,c)},deleteDocument:function(a,b,c){$.ajax({cache:!1,type:"DELETE",contentType:"application/json",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),success:function(){c(!1)},error:function(){c(!0)}})},addDocument:function(a,b){var c=this;c.createTypeDocument(a,b)},createTypeEdge:function(a,b,c,d,e){var f;f=d?JSON.stringify({_key:d,_from:b,_to:c}):JSON.stringify({_from:b,_to:c}),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/document?collection="+encodeURIComponent(a)),data:f,contentType:"application/json",processData:!1,success:function(a){e(!1,a)},error:function(a){e(!0,a)}})},createTypeDocument:function(a,b,c,d){var e;e=b?JSON.stringify({_key:b}):JSON.stringify({});var f=arangoHelper.databaseUrl("/_api/document?collection="+encodeURIComponent(a));d&&(f+="?returnNew=true"),$.ajax({cache:!1,type:"POST",url:f,data:e,contentType:"application/json",processData:!1,success:function(a){d?c(!1,a):c(!1,a._id)},error:function(a){c(!0,a._id,a.responseJSON)}})},getCollectionInfo:function(a,b,c){var d=this;$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/collection/"+a+"?"+arangoHelper.getRandomToken()),contentType:"application/json",processData:!1,success:function(a){d.collectionInfo=a,b(!1,a,c)},error:function(a){b(!0,a,c)}})},getEdge:function(a,b,c){this.getDocument(a,b,c)},getDocument:function(a,b,c){var d=this;this.clearDocument(),$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),contentType:"application/json",processData:!1,success:function(a){d.add(a),c(!1,a,"document")},error:function(a){d.add(!0,a)}})},saveEdge:function(a,b,c,d,e,f){var g;try{g=JSON.parse(e),g._to=d,g._from=c}catch(h){arangoHelper.arangoError("Edge","Could not parsed document.")}$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b))+"#replaceEdge",data:JSON.stringify(g),contentType:"application/json",processData:!1,success:function(a){f(!1,a)},error:function(a){f(!0,a)}})},saveDocument:function(a,b,c,d){$.ajax({cache:!1,type:"PUT",url:arangoHelper.databaseUrl("/_api/document/"+encodeURIComponent(a)+"/"+encodeURIComponent(b)),data:c,contentType:"application/json",processData:!1,success:function(a){d(!1,a)},error:function(a){d(!0,a)}})},updateLocalDocument:function(a){this.clearDocument(),this.add(a)},clearDocument:function(){this.reset()}}),function(){"use strict";window.ArangoDocuments=window.PaginatedCollection.extend({collectionID:1,filters:[],checkCursorTimer:void 0,MAX_SORT:12e3,lastQuery:{},sortAttribute:"",url:arangoHelper.databaseUrl("/_api/documents"),model:window.arangoDocumentModel,loadTotal:function(a){var b=this;$.ajax({cache:!1,type:"GET",url:arangoHelper.databaseUrl("/_api/collection/"+this.collectionID+"/count"),contentType:"application/json",processData:!1,success:function(c){b.setTotal(c.count),a(!1)},error:function(){a(!0)}})},setCollection:function(a){var b=function(a){a&&arangoHelper.arangoError("Documents","Could not fetch documents count")};this.resetFilter(),this.collectionID=a,this.setPage(1),this.loadTotal(b)},setSort:function(a){this.sortAttribute=a},getSort:function(){return this.sortAttribute},addFilter:function(a,b,c){this.filters.push({attr:a,op:b,val:c})},setFiltersForQuery:function(a){if(0===this.filters.length)return"";var b=" FILTER",c="",d=_.map(this.filters,function(b,d){return"LIKE"===b.op?(c=" "+b.op+"(x.`"+b.attr+"`, @param",c+=d,c+=")"):(c="IN"===b.op||"NOT IN"===b.op?" ":" x.`",c+=b.attr,c+="IN"===b.op||"NOT IN"===b.op?" ":"` ",c+=b.op,c+="IN"===b.op||"NOT IN"===b.op?" x.@param":" @param",c+=d),a["param"+d]=b.val,c});return b+d.join(" &&")},setPagesize:function(a){this.setPageSize(a)},resetFilter:function(){this.filters=[]},moveDocument:function(a,b,c,d){var e,f,g,h,i={"@collection":b,filterid:a};e="FOR x IN @@collection",e+=" FILTER x._key == @filterid",e+=" INSERT x IN ",e+=c,f="FOR x in @@collection",f+=" FILTER x._key == @filterid",f+=" REMOVE x IN @@collection",g={query:e,bindVars:i},h={query:f,bindVars:i},window.progressView.show(),$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),data:JSON.stringify(g),contentType:"application/json",success:function(){$.ajax({cache:!1,type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),data:JSON.stringify(h),contentType:"application/json",success:function(){d&&d(),window.progressView.hide()},error:function(){window.progressView.hide(),arangoHelper.arangoError("Document error","Documents inserted, but could not be removed.")}})},error:function(){window.progressView.hide(),arangoHelper.arangoError("Document error","Could not move selected documents.")}})},getDocuments:function(a){var b,c,d,e,f=this;c={"@collection":this.collectionID,offset:this.getOffset(),count:this.getPageSize()},b='FOR x IN @@collection LET att = APPEND(SLICE(ATTRIBUTES(x), 0, 25), "_key", true)',b+=this.setFiltersForQuery(c),this.getTotal()0&&(a+=" SORT x."+this.getSort()),a+=" RETURN x",b={query:a,bindVars:c}},uploadDocuments:function(a,b){$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_api/import?type=auto&collection="+encodeURIComponent(this.collectionID)+"&createCollection=false"),data:a,processData:!1,contentType:"json",dataType:"json",complete:function(a){if(4===a.readyState&&201===a.status)b(!1);else try{var c=JSON.parse(a.responseText);if(c.errors>0){var d="At least one error occurred during upload";b(!1,d)}}catch(e){console.log(e)}}})}})}(),function(){"use strict";window.ArangoLogs=window.PaginatedCollection.extend({upto:!1,loglevel:0,totalPages:0,parse:function(a){var b=[];return _.each(a.lid,function(c,d){b.push({level:a.level[d],lid:c,text:a.text[d],timestamp:a.timestamp[d],totalAmount:a.totalAmount})}),this.totalAmount=a.totalAmount,this.totalPages=Math.ceil(this.totalAmount/this.pagesize),b},initialize:function(a){a.upto===!0&&(this.upto=!0),this.loglevel=a.loglevel},model:window.newArangoLog,url:function(){var a,b,c,d=this.totalAmount-(this.page+1)*this.pagesize;return 0>d&&this.page===this.totalPages-1?(d=0,c=this.totalAmount%this.pagesize):c=this.pagesize,0===this.totalAmount&&(c=1),a=this.upto?"upto":"level",b="/_admin/log?"+a+"="+this.loglevel+"&size="+c+"&offset="+d,arangoHelper.databaseUrl(b)}})}(),function(){"use strict";window.ArangoQueries=Backbone.Collection.extend({initialize:function(a,b){var c=this;$.ajax("whoAmI?_="+Date.now(),{async:!0}).done(function(a){this.activeUser===!1||null===this.activeUser?c.activeUser="root":c.activeUser=a.user})},url:arangoHelper.databaseUrl("/_api/user/"),model:ArangoQuery,activeUser:null,parse:function(a){var b,c=this;return this.activeUser!==!1&&null!==this.activeUser||(this.activeUser="root"),_.each(a.result,function(a){if(a.user===c.activeUser)try{a.extra.queries&&(b=a.extra.queries)}catch(d){}}),b},saveCollectionQueries:function(a){if(this.activeUser===!1||null===this.activeUser)return!1;this.activeUser!==!1&&null!==this.activeUser||(this.activeUser="root");var b=[];this.each(function(a){b.push({value:a.attributes.value,parameter:a.attributes.parameter,name:a.attributes.name})}),$.ajax({cache:!1,type:"PATCH",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(this.activeUser)),data:JSON.stringify({extra:{queries:b}}),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(){a(!0)}})},saveImportQueries:function(a,b){return 0===this.activeUser?!1:(window.progressView.show("Fetching documents..."),void $.ajax({cache:!1,type:"POST",url:"query/upload/"+encodeURIComponent(this.activeUser),data:a,contentType:"application/json",processData:!1,success:function(){window.progressView.hide(),arangoHelper.arangoNotification("Queries successfully imported."),b()},error:function(){window.progressView.hide(),arangoHelper.arangoError("Query error","queries could not be imported")}}))}})}(),window.ArangoReplication=Backbone.Collection.extend({model:window.Replication,url:"../api/user",getLogState:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/replication/logger-state"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},getApplyState:function(a){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/replication/applier-state"),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})}}),window.StatisticsCollection=Backbone.Collection.extend({model:window.Statistics,url:"/_admin/statistics"}),window.StatisticsDescriptionCollection=Backbone.Collection.extend({model:window.StatisticsDescription,url:"/_admin/statistics-description",parse:function(a){return a}}),window.ArangoUsers=Backbone.Collection.extend({model:window.Users,activeUser:null,activeUserSettings:{query:{},shell:{},testing:!0},sortOptions:{desc:!1},fetch:function(a){return window.App.currentUser&&"_system"!==window.App.currentDB.get("name")&&(this.url=frontendConfig.basePath+"/_api/user/"+encodeURIComponent(window.App.currentUser)),Backbone.Collection.prototype.fetch.call(this,a)},url:frontendConfig.basePath+"/_api/user",comparator:function(a,b){var c=a.get("user").toLowerCase(),d=b.get("user").toLowerCase();return this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},login:function(a,b,c){var d=this;$.ajax({url:arangoHelper.databaseUrl("/_open/auth"),method:"POST",data:JSON.stringify({username:a,password:b}),dataType:"json"}).success(function(a){arangoHelper.setCurrentJwt(a.jwt);var b=a.jwt.split(".");if(!b[1])throw new Error("Invalid JWT");if(!window.atob)throw new Error("base64 support missing in browser");var e=JSON.parse(atob(b[1]));d.activeUser=e.preferred_username,c(!1,d.activeUser)}).error(function(){arangoHelper.setCurrentJwt(null),d.activeUser=null,c(!0,null)})},setSortingDesc:function(a){this.sortOptions.desc=a},logout:function(){arangoHelper.setCurrentJwt(null),this.activeUser=null,this.reset(),window.App.navigate(""),window.location.reload()},setUserSettings:function(a,b){this.activeUserSettings.identifier=b},loadUserSettings:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(b.activeUser)),contentType:"application/json",processData:!1,success:function(c){b.activeUserSettings=c.extra,a(!1,c)},error:function(b){a(!0,b)}})},saveUserSettings:function(a){var b=this;$.ajax({cache:!1,type:"PUT",url:frontendConfig.basePath+"/_api/user/"+encodeURIComponent(b.activeUser),data:JSON.stringify({extra:b.activeUserSettings}),contentType:"application/json",processData:!1,success:function(b){a(!1,b)},error:function(b){a(!0,b)}})},parse:function(a){var b=[];return a.result?_.each(a.result,function(a){b.push(a)}):b.push({user:a.user,active:a.active,extra:a.extra,changePassword:a.changePassword}),b},whoAmI:function(a){return this.activeUser?void a(!1,this.activeUser):void $.ajax("whoAmI?_="+Date.now()).success(function(b){a(!1,b.user)}).error(function(){a(!0,null)})}}),function(){"use strict";window.ClusterCoordinators=window.AutomaticRetryCollection.extend({model:window.ClusterCoordinator,url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/Coordinators"),updateUrl:function(){this.url=window.App.getNewRoute("Coordinators")},initialize:function(){},statusClass:function(a){switch(a){case"ok":return"success";case"warning":return"warning";case"critical":return"danger";case"missing":return"inactive";default:return"danger"}},getStatuses:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.getStatuses.bind(c,a,b))}).done(function(){c.successFullTry(),c.forEach(function(b){a(c.statusClass(b.get("status")),b.get("address"))}),b()})}},byAddress:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.byAddress.bind(c,a,b))}).done(function(){c.successFullTry(),a=a||{},c.forEach(function(b){var c=b.get("address");c=c.split(":")[0],a[c]=a[c]||{},a[c].coords=a[c].coords||[],a[c].coords.push(b)}),b(a)})}},checkConnection:function(a){var b=this;this.checkRetries()&&this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:b.failureTry.bind(b,b.checkConnection.bind(b,a))}).done(function(){b.successFullTry(),a()})}})}(),function(){"use strict";window.ClusterServers=window.AutomaticRetryCollection.extend({model:window.ClusterServer,host:"",url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/DBServers"),updateUrl:function(){this.url=window.App.getNewRoute(this.host)+this.url},initialize:function(a,b){this.host=b.host},statusClass:function(a){switch(a){case"ok":return"success";case"warning":return"warning";case"critical":return"danger";case"missing":return"inactive";default:return"danger"}},getStatuses:function(a){if(this.checkRetries()){var b=this,c=function(){b.successFullTry(),b._retryCount=0,b.forEach(function(c){a(b.statusClass(c.get("status")),c.get("address"))})};this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:b.failureTry.bind(b,b.getStatuses.bind(b,a))}).done(c)}},byAddress:function(a,b){if(this.checkRetries()){var c=this;this.fetch({beforeSend:window.App.addAuth.bind(window.App),error:c.failureTry.bind(c,c.byAddress.bind(c,a,b))}).done(function(){c.successFullTry(),a=a||{},c.forEach(function(b){var c=b.get("address");c=c.split(":")[0],a[c]=a[c]||{},a[c].dbs=a[c].dbs||[],a[c].dbs.push(b)}),b(a)}).error(function(a){console.log("error"),console.log(a)})}},getList:function(){throw new Error("Do not use")},getOverview:function(){throw new Error("Do not use DbServer.getOverview")}})}(),function(){"use strict";window.CoordinatorCollection=Backbone.Collection.extend({model:window.Coordinator, +url:arangoHelper.databaseUrl("/_admin/aardvark/cluster/Coordinators")})}(),function(){"use strict";window.FoxxCollection=Backbone.Collection.extend({model:window.Foxx,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_admin/aardvark/foxxes"),comparator:function(a,b){var c,d;return this.sortOptions.desc===!0?(c=a.get("mount"),d=b.get("mount"),d>c?1:c>d?-1:0):(c=a.get("mount"),d=b.get("mount"),c>d?1:d>c?-1:0)},setSortingDesc:function(a){this.sortOptions.desc=a},installFromGithub:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/git?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},installFromStore:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/store?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},installFromZip:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/zip?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify({zipFile:a}),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})},generate:function(a,b,c,d){var e=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/generate?mount="+encodeURIComponent(b));void 0!==d&&(e+=d?"&replace=true":"&upgrade=true"),$.ajax({cache:!1,type:"PUT",url:e,data:JSON.stringify(a),contentType:"application/json",processData:!1,success:function(a){c(a)},error:function(a){c(a)}})}})}(),function(){"use strict";window.GraphCollection=Backbone.Collection.extend({model:window.Graph,sortOptions:{desc:!1},url:arangoHelper.databaseUrl("/_api/gharial"),dropAndDeleteGraph:function(a,b){$.ajax({type:"DELETE",url:arangoHelper.databaseUrl("/_api/gharial/")+encodeURIComponent(a)+"?dropCollections=true",contentType:"application/json",processData:!0,success:function(){b(!0)},error:function(){b(!1)}})},comparator:function(a,b){var c=a.get("_key")||"",d=b.get("_key")||"";return c=c.toLowerCase(),d=d.toLowerCase(),this.sortOptions.desc===!0?d>c?1:c>d?-1:0:c>d?1:d>c?-1:0},setSortingDesc:function(a){this.sortOptions.desc=a},parse:function(a){return a.error?void 0:a.graphs}})}(),function(){"use strict";window.NotificationCollection=Backbone.Collection.extend({model:window.Notification,url:""})}(),function(){"use strict";window.QueryManagementActive=Backbone.Collection.extend({model:window.queryManagementModel,url:function(){var a=frontendConfig.basePath+"/_api/query/current";return"_system"!==window.frontendConfig.db&&(a=arangoHelper.databaseUrl("/_api/query/current")),a},killRunningQuery:function(a,b){var c=frontendConfig.basePath+"/_api/query/"+encodeURIComponent(a);"_system"!==window.frontendConfig.db&&(c=arangoHelper.databaseUrl("/_api/query/"+encodeURIComponent(a))),$.ajax({url:c,type:"DELETE",success:function(a){b()}})}})}(),function(){"use strict";window.QueryManagementSlow=Backbone.Collection.extend({model:window.queryManagementModel,url:function(){var a=frontendConfig.basePath+"/_api/query/slow";return"_system"!==window.frontendConfig.db&&(a=arangoHelper.databaseUrl("/_api/query/slow")),a},deleteSlowQueryHistory:function(a){var b=frontendConfig.basePath+"/_api/query/slow";"_system"!==window.frontendConfig.db&&(b=arangoHelper.databaseUrl("/_api/query/slow")),$.ajax({url:b,type:"DELETE",success:function(b){a()}})}})}(),function(){"use strict";window.WorkMonitorCollection=Backbone.Collection.extend({model:window.workMonitorModel,url:"/_admin/work-monitor",parse:function(a){return a.work}})}(),function(){"use strict";window.PaginationView=Backbone.View.extend({collection:null,paginationDiv:"",idPrefix:"",rerender:function(){},jumpTo:function(a){this.collection.setPage(a),this.rerender()},firstPage:function(){this.jumpTo(1)},lastPage:function(){this.jumpTo(this.collection.getLastPageNumber())},firstDocuments:function(){this.jumpTo(1)},lastDocuments:function(){this.jumpTo(this.collection.getLastPageNumber())},prevDocuments:function(){this.jumpTo(this.collection.getPage()-1)},nextDocuments:function(){this.jumpTo(this.collection.getPage()+1)},renderPagination:function(){$(this.paginationDiv).html("");var a=this,b=this.collection.getPage(),c=this.collection.getLastPageNumber(),d=$(this.paginationDiv),e={page:b,lastPage:c,click:function(b){var c=window.location.hash.split("/");"documents"===c[2]?(e.page=b,window.location.hash=c[0]+"/"+c[1]+"/"+c[2]+"/"+b):(a.jumpTo(b),e.page=b)}};d.html(""),d.pagination(e),$(this.paginationDiv).prepend('
    '),$(this.paginationDiv).append('
    ')}})}(),function(){"use strict";window.ApplicationDetailView=Backbone.View.extend({el:"#content",divs:["#readme","#swagger","#app-info","#sideinformation","#information","#settings"],navs:["#service-info","#service-api","#service-readme","#service-settings"],template:templateEngine.createTemplate("applicationDetailView.ejs"),events:{"click .open":"openApp","click .delete":"deleteApp","click #app-deps":"showDepsDialog","click #app-switch-mode":"toggleDevelopment","click #app-scripts [data-script]":"runScript","click #app-tests":"runTests","click #app-replace":"replaceApp","click #download-app":"downloadApp","click .subMenuEntries li":"changeSubview","click #jsonLink":"toggleSwagger","mouseenter #app-scripts":"showDropdown","mouseleave #app-scripts":"hideDropdown"},resize:function(a){a?$(".innerContent").css("height","auto"):($(".innerContent").height($(".centralRow").height()-150),$("#swagger iframe").height($(".centralRow").height()-150),$("#swagger #swaggerJsonContent").height($(".centralRow").height()-150))},toggleSwagger:function(){var a=function(a){$("#jsonLink").html("JSON"),this.jsonEditor.setValue(JSON.stringify(a,null," "),1),$("#swaggerJsonContent").show(),$("#swagger iframe").hide()}.bind(this);if("Swagger"===$("#jsonLink").html()){var b=arangoHelper.databaseUrl("/_admin/aardvark/foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")));arangoHelper.download(b,a)}else $("#swaggerJsonContent").hide(),$("#swagger iframe").show(),$("#jsonLink").html("Swagger")},changeSubview:function(a){_.each(this.navs,function(a){$(a).removeClass("active")}),$(a.currentTarget).addClass("active"),_.each(this.divs,function(a){$(".headerButtonBar").hide(),$(a).hide()}),"service-readme"===a.currentTarget.id?(this.resize(!0),$("#readme").show()):"service-api"===a.currentTarget.id?(this.resize(),$("#swagger").show()):"service-info"===a.currentTarget.id?(this.resize(!0),this.render(),$("#information").show(),$("#sideinformation").show()):"service-settings"===a.currentTarget.id&&(this.resize(!0),this.showConfigDialog(),$(".headerButtonBar").show(),$("#settings").show())},downloadApp:function(){this.model.isSystem()||this.model.download()},replaceApp:function(){var a=this.model.get("mount");window.foxxInstallView.upgrade(a,function(){window.App.applicationDetail(encodeURIComponent(a))}),$(".createModalDialog .arangoHeader").html("Replace Service"),$("#infoTab").click()},updateConfig:function(){this.model.getConfiguration(function(){$("#app-warning")[this.model.needsAttention()?"show":"hide"](),$("#app-warning-config")[this.model.needsConfiguration()?"show":"hide"](),this.model.needsConfiguration()?$("#app-config").addClass("error"):$("#app-config").removeClass("error")}.bind(this))},updateDeps:function(){this.model.getDependencies(function(){$("#app-warning")[this.model.needsAttention()?"show":"hide"](),$("#app-warning-deps")[this.model.hasUnconfiguredDependencies()?"show":"hide"](),this.model.hasUnconfiguredDependencies()?$("#app-deps").addClass("error"):$("#app-deps").removeClass("error")}.bind(this))},toggleDevelopment:function(){this.model.toggleDevelopment(!this.model.isDevelopment(),function(){this.model.isDevelopment()?($(".app-switch-mode").text("Set Production"),$("#app-development-indicator").css("display","inline"),$("#app-development-path").css("display","inline")):($(".app-switch-mode").text("Set Development"),$("#app-development-indicator").css("display","none"),$("#app-development-path").css("display","none"))}.bind(this))},runScript:function(a){a.preventDefault();var b=$(a.currentTarget).attr("data-script"),c=[window.modalView.createBlobEntry("app_script_arguments","Script arguments","",null,"optional",!1,[{rule:function(a){return a&&JSON.parse(a)},msg:"Must be well-formed JSON or empty"}])],d=[window.modalView.createSuccessButton("Run script",function(){var a=$("#app_script_arguments").val();a=a&&JSON.parse(a),window.modalView.hide(),this.model.runScript(b,a,function(a,c){var d;d=a?"

    The script failed with an error"+(a.statusCode?" (HTTP "+a.statusCode+")":"")+":

    "+a.message+"
    ":c?"

    Script results:

    "+JSON.stringify(c,null,2)+"
    ":"

    The script ran successfully.

    ",window.modalView.show("modalTable.ejs",'Result of script "'+b+'"',void 0,void 0,void 0,d)})}.bind(this))];window.modalView.show("modalTable.ejs",'Run script "'+b+'" on "'+this.model.get("mount")+'"',d,c)},showSwagger:function(a){a.preventDefault(),this.render("swagger")},showReadme:function(a){a.preventDefault(),this.render("readme")},runTests:function(a){a.preventDefault();var b="

    WARNING: Running tests may result in destructive side-effects including data loss. Please make sure not to run tests on a production database.

    ";this.model.isDevelopment()&&(b+="

    WARNING: This app is running in development mode. If any of the tests access the app's HTTP API they may become non-deterministic.

    ");var c=[window.modalView.createSuccessButton("Run tests",function(){window.modalView.hide(),this.model.runTests({reporter:"suite"},function(a,b){window.modalView.show("modalTestResults.ejs","Test results",void 0,void 0,void 0,a||b)})}.bind(this))];window.modalView.show("modalTable.ejs",'Run tests for app "'+this.model.get("mount")+'"',c,void 0,void 0,b)},render:function(a){return this.resize(),this.model.fetchThumbnail(function(){var b=function(b,c){var d=this;b?arangoHelper.arangoError("DB","Could not get current database"):($(this.el).html(this.template.render({app:this.model,baseUrl:arangoHelper.databaseUrl("",c),mode:a})),d.jsonEditor=ace.edit("swaggerJsonEditor"),d.jsonEditor.setReadOnly(!0),d.jsonEditor.getSession().setMode("ace/mode/json"),$.ajax({url:this.appUrl(c),headers:{accept:"text/html,*/*;q=0.9"}}).success(function(){$(".open",this.el).prop("disabled",!1)}.bind(this)),this.updateConfig(),this.updateDeps(),"swagger"===a&&$.get("./foxxes/docs/swagger.json?mount="+encodeURIComponent(this.model.get("mount")),function(a){Object.keys(a.paths).length<1&&(d.render("readme"),$("#app-show-swagger").attr("disabled","true"))})),this.breadcrumb()}.bind(this);arangoHelper.currentDatabase(b),_.isEmpty(this.model.get("config"))&&$("#service-settings").attr("disabled",!0)}.bind(this)),$(this.el)},breadcrumb:function(){var a="Service: "+this.model.get("name")+'',b='

    Contributors:';this.model.get("contributors")&&this.model.get("contributors").length>0?_.each(this.model.get("contributors"),function(a){b+=''+a.name+""}):b+="No contributors",b+="

    ",$(".information").append(b),this.model.get("author")&&$(".information").append('

    Author:'+this.model.get("author")+"

    "),this.model.get("mount")&&$(".information").append('

    Mount:'+this.model.get("mount")+"

    "),this.model.get("development")&&this.model.get("path")&&$(".information").append('

    Path:'+this.model.get("path")+"

    "),$("#subNavigationBar .breadcrumb").html(a)},openApp:function(){var a=function(a,b){a?arangoHelper.arangoError("DB","Could not get current database"):window.open(this.appUrl(b),this.model.get("title")).focus()}.bind(this);arangoHelper.currentDatabase(a)},deleteApp:function(){var a=[window.modalView.createDeleteButton("Delete",function(){var a={teardown:$("#app_delete_run_teardown").is(":checked")};this.model.destroy(a,function(a,b){a||b.error!==!1||(window.modalView.hide(),window.App.navigate("services",{trigger:!0}))})}.bind(this))],b=[window.modalView.createCheckboxEntry("app_delete_run_teardown","Run teardown?",!0,"Should this app's teardown script be executed before removing the app?",!0)];window.modalView.show("modalTable.ejs",'Delete Foxx App mounted at "'+this.model.get("mount")+'"',a,b,void 0,"

    Are you sure? There is no way back...

    ",!0)},appUrl:function(a){return arangoHelper.databaseUrl(this.model.get("mount"),a)},applyConfig:function(){var a={};_.each(this.model.get("config"),function(b,c){var d=$("#app_config_"+c),e=d.val();if("boolean"===b.type||"bool"===b.type)return void(a[c]=d.is(":checked"));if(""===e&&b.hasOwnProperty("default"))return a[c]=b["default"],void("json"===b.type&&(a[c]=JSON.stringify(b["default"])));if("number"===b.type)a[c]=parseFloat(e);else if("integer"===b.type||"int"===b.type)a[c]=parseInt(e,10);else{if("json"!==b.type)return void(a[c]=window.arangoHelper.escapeHtml(e));a[c]=e&&JSON.stringify(JSON.parse(e))}}),this.model.setConfiguration(a,function(){this.updateConfig(),arangoHelper.arangoNotification(this.model.get("name"),"Settings applied.")}.bind(this))},showConfigDialog:function(){if(_.isEmpty(this.model.get("config")))return void $("#settings .buttons").html($("#hidden_buttons").html());var a=_.map(this.model.get("config"),function(a,b){var c=void 0===a["default"]?"":String(a["default"]),d=void 0===a.current?"":String(a.current),e="createTextEntry",f=!1,g=[];return"boolean"===a.type||"bool"===a.type?(e="createCheckboxEntry",a["default"]=a["default"]||!1,c=a["default"]||!1,d=a.current||!1):"json"===a.type?(e="createBlobEntry",c=void 0===a["default"]?"":JSON.stringify(a["default"]),d=void 0===a.current?"":a.current,g.push({rule:function(a){return a&&JSON.parse(a)},msg:"Must be well-formed JSON or empty."})):"integer"===a.type||"int"===a.type?g.push({rule:Joi.number().integer().optional().allow(""),msg:"Has to be an integer."}):"number"===a.type?g.push({rule:Joi.number().optional().allow(""),msg:"Has to be a number."}):("password"===a.type&&(e="createPasswordEntry"),g.push({rule:Joi.string().optional().allow(""),msg:"Has to be a string."})),void 0===a["default"]&&a.required!==!1&&(f=!0,g.unshift({rule:Joi.any().required(),msg:"This field is required."})),window.modalView[e]("app_config_"+b,b,d,a.description,c,f,g)}),b=[window.modalView.createSuccessButton("Apply",this.applyConfig.bind(this))];window.modalView.show("modalTable.ejs","Configuration",b,a,null,null,null,null,null,"settings"),$(".modal-footer").prepend($("#hidden_buttons").html())},applyDeps:function(){var a={};_.each(this.model.get("deps"),function(b,c){var d=$("#app_deps_"+c);a[c]=window.arangoHelper.escapeHtml(d.val())}),this.model.setDependencies(a,function(){window.modalView.hide(),this.updateDeps()}.bind(this))},showDepsDialog:function(){if(!_.isEmpty(this.model.get("deps"))){var a=_.map(this.model.get("deps"),function(a,b){var c=void 0===a.current?"":String(a.current),d="",e=a.definition.name;"*"!==a.definition.version&&(e+="@"+a.definition.version);var f=[{rule:Joi.string().optional().allow(""),msg:"Has to be a string."}];return a.definition.required&&f.push({rule:Joi.string().required(),msg:"This value is required."}),window.modalView.createTextEntry("app_deps_"+b,a.title,c,e,d,a.definition.required,f)}),b=[window.modalView.createSuccessButton("Apply",this.applyDeps.bind(this))];window.modalView.show("modalTable.ejs","Dependencies",b,a)}},showDropdown:function(){_.isEmpty(this.model.get("scripts"))||$("#scripts_dropdown").show(200)},hideDropdown:function(){$("#scripts_dropdown").hide()}})}(),function(){"use strict";window.ApplicationsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("applicationsView.ejs"),events:{"click #addApp":"createInstallModal","click #foxxToggle":"slideToggle","click #checkDevel":"toggleDevel","click #checkProduction":"toggleProduction","click #checkSystem":"toggleSystem"},fixCheckboxes:function(){this._showDevel?$("#checkDevel").attr("checked","checked"):$("#checkDevel").removeAttr("checked"),this._showSystem?$("#checkSystem").attr("checked","checked"):$("#checkSystem").removeAttr("checked"),this._showProd?$("#checkProduction").attr("checked","checked"):$("#checkProduction").removeAttr("checked"),$("#checkDevel").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),$("#checkSystem").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),$("#checkProduction").next().removeClass("fa fa-check-square-o fa-square-o").addClass("fa"),arangoHelper.setCheckboxStatus("#foxxDropdown")},toggleDevel:function(){var a=this;this._showDevel=!this._showDevel,_.each(this._installedSubViews,function(b){b.toggle("devel",a._showDevel)}),this.fixCheckboxes()},toggleProduction:function(){var a=this;this._showProd=!this._showProd,_.each(this._installedSubViews,function(b){b.toggle("production",a._showProd)}),this.fixCheckboxes()},toggleSystem:function(){this._showSystem=!this._showSystem;var a=this;_.each(this._installedSubViews,function(b){b.toggle("system",a._showSystem)}),this.fixCheckboxes()},reload:function(){var a=this;_.each(this._installedSubViews,function(a){a.undelegateEvents()}),this.collection.fetch({success:function(){a.createSubViews(),a.render()}})},createSubViews:function(){var a=this;this._installedSubViews={},a.collection.each(function(b){var c=new window.FoxxActiveView({model:b,appsView:a});a._installedSubViews[b.get("mount")]=c})},initialize:function(){this._installedSubViews={},this._showDevel=!0,this._showProd=!0,this._showSystem=!1},slideToggle:function(){$("#foxxToggle").toggleClass("activated"),$("#foxxDropdownOut").slideToggle(200)},createInstallModal:function(a){a.preventDefault(),window.foxxInstallView.install(this.reload.bind(this))},render:function(){this.collection.sort(),$(this.el).html(this.template.render({})),_.each(this._installedSubViews,function(a){$("#installedList").append(a.render())}),this.delegateEvents(),$("#checkDevel").attr("checked",this._showDevel),$("#checkProduction").attr("checked",this._showProd),$("#checkSystem").attr("checked",this._showSystem),arangoHelper.setCheckboxStatus("#foxxDropdown");var a=this;return _.each(this._installedSubViews,function(b){b.toggle("devel",a._showDevel),b.toggle("system",a._showSystem)}),arangoHelper.fixTooltips("icon_arangodb","left"),this}})}(),function(){"use strict";window.ClusterView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("clusterView.ejs"),events:{},statsEnabled:!1,historyInit:!1,initDone:!1,interval:5e3,maxValues:100,knownServers:[],chartData:{},charts:{},nvcharts:[],startHistory:{},startHistoryAccumulated:{},initialize:function(a){var b=this;window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),window.setInterval(function(){if("#cluster"===window.location.hash||""===window.location.hash||"#"===window.location.hash){var a=function(a){b.rerenderValues(a),b.rerenderGraphs(a)};b.getCoordStatHistory(a)}},this.interval))},render:function(){this.$el.html(this.template.render({})),this.initDone||(void 0!==this.coordinators.first()?this.getServerStatistics():this.waitForCoordinators(),this.initDone=!0),this.initGraphs()},waitForCoordinators:function(){var a=this;window.setTimeout(function(){a.coordinators?a.getServerStatistics():a.waitForCoordinators()},500)},updateServerTime:function(){this.serverTime=(new Date).getTime()},getServerStatistics:function(){var a=this;this.data=void 0;var b=this.coordinators.first();this.statCollectCoord=new window.ClusterStatisticsCollection([],{host:b.get("address")}),this.statCollectDBS=new window.ClusterStatisticsCollection([],{host:b.get("address")});var c=[];_.each(this.dbServers,function(a){a.each(function(a){c.push(a)})}),_.each(c,function(c){if("ok"===c.get("status")){-1===a.knownServers.indexOf(c.id)&&a.knownServers.push(c.id);var d=new window.Statistics({name:c.id});d.url=b.get("protocol")+"://"+b.get("address")+"/_admin/clusterStatistics?DBserver="+c.get("name"),a.statCollectDBS.add(d)}}),this.coordinators.forEach(function(b){if("ok"===b.get("status")){-1===a.knownServers.indexOf(b.id)&&a.knownServers.push(b.id);var c=new window.Statistics({name:b.id});c.url=b.get("protocol")+"://"+b.get("address")+"/_admin/statistics",a.statCollectCoord.add(c)}});var d=function(b){a.rerenderValues(b),a.rerenderGraphs(b)};a.getCoordStatHistory(d),a.renderNodes()},rerenderValues:function(a){var b=this;b.renderNodes(),this.renderValue("#clusterConnections",Math.round(a.clientConnectionsCurrent)),this.renderValue("#clusterConnectionsAvg",Math.round(a.clientConnections15M));var c=a.physicalMemory,d=a.residentSizeCurrent;this.renderValue("#clusterRam",[d,c])},renderValue:function(a,b,c,d){if("number"==typeof b)$(a).html(b);else if($.isArray(b)){var e=b[0],f=b[1],g=1/(f/e)*100;g>90?c=!0:g>70&&90>g&&(d=!0),$(a).html(g.toFixed(1)+" %")}else"string"==typeof b&&$(a).html(b);c?($(a).addClass("negative"),$(a).removeClass("warning"),$(a).removeClass("positive")):d?($(a).addClass("warning"),$(a).removeClass("positive"),$(a).removeClass("negative")):($(a).addClass("positive"),$(a).removeClass("negative"),$(a).removeClass("warning"))},renderNodes:function(){var a=this,b=function(a){var b=0,c=0,d=0,e=0;_.each(a,function(a){"Coordinator"===a.Role?(b++,"GOOD"!==a.Status&&c++):"DBServer"===a.Role&&(d++,"GOOD"!==a.Status&&e++)}),c>0?this.renderValue("#clusterCoordinators",b-c+"/"+b,!0):this.renderValue("#clusterCoordinators",b),e>0?this.renderValue("#clusterDBServers",d-e+"/"+d,!0):this.renderValue("#clusterDBServers",d)}.bind(this);$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a.Health)},error:function(){a.renderValue("#clusterCoordinators","N/A",!0),a.renderValue("#clusterDBServers","N/A",!0)}})},initValues:function(){var a=["#clusterNodes","#clusterRam","#clusterConnections","#clusterConnectionsAvg"];_.each(a,function(a){$(a).html('')})},graphData:{data:{sent:[],received:[]},http:[],average:[]},checkArraySizes:function(){var a=this;_.each(a.chartsOptions,function(b,c){_.each(b.options,function(b,d){b.values.length>a.maxValues-1&&a.chartsOptions[c].options[d].values.shift()})})},formatDataForGraph:function(a){var b=this;b.historyInit?(b.checkArraySizes(),b.chartsOptions[0].options[0].values.push({x:a.times[a.times.length-1],y:a.bytesSentPerSecond[a.bytesSentPerSecond.length-1]}),b.chartsOptions[0].options[1].values.push({x:a.times[a.times.length-1],y:a.bytesReceivedPerSecond[a.bytesReceivedPerSecond.length-1]}),b.chartsOptions[1].options[0].values.push({x:a.times[a.times.length-1],y:b.calcTotalHttp(a.http,a.bytesSentPerSecond.length-1)}),b.chartsOptions[2].options[0].values.push({x:a.times[a.times.length-1],y:a.avgRequestTime[a.bytesSentPerSecond.length-1]/b.coordinators.length})):(_.each(a.times,function(c,d){b.chartsOptions[0].options[0].values.push({x:c,y:a.bytesSentPerSecond[d]}),b.chartsOptions[0].options[1].values.push({x:c,y:a.bytesReceivedPerSecond[d]}),b.chartsOptions[1].options[0].values.push({x:c,y:b.calcTotalHttp(a.http,d)}),b.chartsOptions[2].options[0].values.push({x:c,y:a.avgRequestTime[d]/b.coordinators.length})}),b.historyInit=!0)},chartsOptions:[{id:"#clusterData",type:"bytes",count:2,options:[{area:!0,values:[],key:"Bytes out",color:"rgb(23,190,207)",strokeWidth:2,fillOpacity:.1},{area:!0,values:[],key:"Bytes in",color:"rgb(188, 189, 34)",strokeWidth:2,fillOpacity:.1}]},{id:"#clusterHttp",type:"bytes",options:[{area:!0,values:[],key:"Bytes",color:"rgb(0, 166, 90)",fillOpacity:.1}]},{id:"#clusterAverage",data:[],type:"seconds",options:[{area:!0,values:[],key:"Seconds",color:"rgb(243, 156, 18)",fillOpacity:.1}]}],initGraphs:function(){var a=this,b="No data...";_.each(a.chartsOptions,function(c){nv.addGraph(function(){a.charts[c.id]=nv.models.stackedAreaChart().options({useInteractiveGuideline:!0,showControls:!1,noData:b,duration:0}),a.charts[c.id].xAxis.axisLabel("").tickFormat(function(a){var b=new Date(1e3*a);return(b.getHours()<10?"0":"")+b.getHours()+":"+(b.getMinutes()<10?"0":"")+b.getMinutes()+":"+(b.getSeconds()<10?"0":"")+b.getSeconds()}).staggerLabels(!1),a.charts[c.id].yAxis.axisLabel("").tickFormat(function(a){var b;return"bytes"===c.type?null===a?"N/A":(b=parseFloat(d3.format(".2f")(a)),prettyBytes(b)):"seconds"===c.type?null===a?"N/A":b=parseFloat(d3.format(".3f")(a)):void 0});var d,e=a.returnGraphOptions(c.id);return e.length>0?_.each(e,function(a,b){c.options[b].values=a}):c.options[0].values=[],d=c.options,a.chartData[c.id]=d3.select(c.id).append("svg").datum(d).transition().duration(300).call(a.charts[c.id]).each("start",function(){window.setTimeout(function(){d3.selectAll(c.id+" *").each(function(){this.__transition__&&(this.__transition__.duration=0)})},0)}),nv.utils.windowResize(a.charts[c.id].update),a.nvcharts.push(a.charts[c.id]),a.charts[c.id]})})},returnGraphOptions:function(a){var b=[];return b="#clusterData"===a?[this.chartsOptions[0].options[0].values,this.chartsOptions[0].options[1].values]:"#clusterHttp"===a?[this.chartsOptions[1].options[0].values]:"#clusterAverage"===a?[this.chartsOptions[2].options[0].values]:[]},rerenderGraphs:function(a){if(this.statsEnabled){var b,c,d=this;this.formatDataForGraph(a),_.each(d.chartsOptions,function(a){c=d.returnGraphOptions(a.id),c.length>0?_.each(c,function(b,c){a.options[c].values=b}):a.options[0].values=[],b=a.options,b[0].values.length>0&&d.historyInit&&d.charts[a.id]&&d.charts[a.id].update()})}},calcTotalHttp:function(a,b){var c=0;return _.each(a,function(a){c+=a[b]}),c},getCoordStatHistory:function(a){$.ajax({url:"statistics/coordshort",json:!0}).success(function(b){this.statsEnabled=b.enabled,a(b.data)}.bind(this))}})}(),function(){"use strict";window.CollectionListItemView=Backbone.View.extend({tagName:"div",className:"tile pure-u-1-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 pure-u-xl-1-6",template:templateEngine.createTemplate("collectionsItemView.ejs"),initialize:function(a){this.collectionsView=a.collectionsView},events:{"click .iconSet.icon_arangodb_settings2":"createEditPropertiesModal","click .pull-left":"noop","click .icon_arangodb_settings2":"editProperties","click .spanInfo":"showProperties",click:"selectCollection"},render:function(){return this.model.get("locked")?($(this.el).addClass("locked"),$(this.el).addClass(this.model.get("lockType"))):$(this.el).removeClass("locked"),"loading"!==this.model.get("status")&&"unloading"!==this.model.get("status")||$(this.el).addClass("locked"),$(this.el).html(this.template.render({model:this.model})),$(this.el).attr("id","collection_"+this.model.get("name")),this},editProperties:function(a){return this.model.get("locked")?0:(a.stopPropagation(),void this.createEditPropertiesModal())},showProperties:function(a){return this.model.get("locked")?0:(a.stopPropagation(),void this.createInfoModal())},selectCollection:function(a){return $(a.target).hasClass("disabled")?0:this.model.get("locked")?0:"loading"===this.model.get("status")?0:void("unloaded"===this.model.get("status")?this.loadCollection():window.App.navigate("collection/"+encodeURIComponent(this.model.get("name"))+"/documents/1",{trigger:!0}))},noop:function(a){a.stopPropagation()},unloadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be unloaded."):void 0===a?(this.model.set("status","unloading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","unloaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" unloaded.")}.bind(this);this.model.unloadCollection(a),window.modalView.hide()},loadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be loaded."):void 0===a?(this.model.set("status","loading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","loaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" loaded.")}.bind(this);this.model.loadCollection(a),window.modalView.hide()},truncateCollection:function(){this.model.truncateCollection(),window.modalView.hide()},deleteCollection:function(){this.model.destroy({error:function(){arangoHelper.arangoError("Could not delete collection.")},success:function(){window.modalView.hide()}}),this.collectionsView.render()},saveModifiedCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c;c=b?this.model.get("name"):$("#change-collection-name").val();var d=this.model.get("status");if("loaded"===d){var e;try{e=JSON.parse(1024*$("#change-collection-size").val()*1024)}catch(f){return arangoHelper.arangoError("Please enter a valid number"),0}var g;try{if(g=JSON.parse($("#change-index-buckets").val()),1>g||parseInt(g,10)!==Math.pow(2,Math.log2(g)))throw new Error("invalid indexBuckets value")}catch(f){return arangoHelper.arangoError("Please enter a valid number of index buckets"),0}var h=function(a){a?arangoHelper.arangoError("Collection error: "+a.responseText):(this.collectionsView.render(),window.modalView.hide())}.bind(this),i=function(a){if(a)arangoHelper.arangoError("Collection error: "+a.responseText);else{var b=$("#change-collection-sync").val();this.model.changeCollection(b,e,g,h)}}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,i):i()}else if("unloaded"===d)if(this.model.get("name")!==c){var j=function(a,b){a?arangoHelper.arangoError("Collection error: "+b.responseText):(this.collectionsView.render(),window.modalView.hide())}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,j):j()}else window.modalView.hide()}}.bind(this);window.isCoordinator(a)},createEditPropertiesModal:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c=!1;"loaded"===this.model.get("status")&&(c=!0);var d=[],e=[];b||e.push(window.modalView.createTextEntry("change-collection-name","Name",this.model.get("name"),!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}]));var f=function(){e.push(window.modalView.createReadOnlyEntry("change-collection-id","ID",this.model.get("id"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-type","Type",this.model.get("type"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-status","Status",this.model.get("status"),"")),d.push(window.modalView.createDeleteButton("Delete",this.deleteCollection.bind(this))),d.push(window.modalView.createDeleteButton("Truncate",this.truncateCollection.bind(this))),c?d.push(window.modalView.createNotificationButton("Unload",this.unloadCollection.bind(this))):d.push(window.modalView.createNotificationButton("Load",this.loadCollection.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.saveModifiedCollection.bind(this)));var a=["General","Indices"],b=["modalTable.ejs","indicesView.ejs"];window.modalView.show(b,"Modify Collection",d,e,null,null,this.events,null,a), +"loaded"===this.model.get("status")?this.getIndex():$($("#infoTab").children()[1]).remove()}.bind(this);if(c){var g=function(a,b){if(a)arangoHelper.arangoError("Collection","Could not fetch properties");else{var c=b.journalSize/1048576,d=b.indexBuckets,g=b.waitForSync;e.push(window.modalView.createTextEntry("change-collection-size","Journal size",c,"The maximal size of a journal or datafile (in MB). Must be at least 1.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),e.push(window.modalView.createTextEntry("change-index-buckets","Index buckets",d,"The number of index buckets for this collection. Must be at least 1 and a power of 2.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[1-9][0-9]*$/),msg:"Must be a number greater than 1 and a power of 2."}])),e.push(window.modalView.createSelectEntry("change-collection-sync","Wait for sync",g,"Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}]))}f()};this.model.getProperties(g)}else f()}}.bind(this);window.isCoordinator(a)},bindIndexEvents:function(){this.unbindIndexEvents();var a=this;$("#indexEditView #addIndex").bind("click",function(){a.toggleNewIndexView(),$("#cancelIndex").unbind("click"),$("#cancelIndex").bind("click",function(){a.toggleNewIndexView()}),$("#createIndex").unbind("click"),$("#createIndex").bind("click",function(){a.createIndex()})}),$("#newIndexType").bind("change",function(){a.selectIndexType()}),$(".deleteIndex").bind("click",function(b){a.prepDeleteIndex(b)}),$("#infoTab a").bind("click",function(a){if($("#indexDeleteModal").remove(),"Indices"!==$(a.currentTarget).html()||$(a.currentTarget).parent().hasClass("active")||($("#newIndexView").hide(),$("#indexEditView").show(),$("#modal-dialog .modal-footer .button-danger").hide(),$("#modal-dialog .modal-footer .button-success").hide(),$("#modal-dialog .modal-footer .button-notification").hide()),"General"===$(a.currentTarget).html()&&!$(a.currentTarget).parent().hasClass("active")){$("#modal-dialog .modal-footer .button-danger").show(),$("#modal-dialog .modal-footer .button-success").show(),$("#modal-dialog .modal-footer .button-notification").show();var b=$(".index-button-bar2")[0];$("#cancelIndex").is(":visible")&&($("#cancelIndex").detach().appendTo(b),$("#createIndex").detach().appendTo(b))}})},unbindIndexEvents:function(){$("#indexEditView #addIndex").unbind("click"),$("#newIndexType").unbind("change"),$("#infoTab a").unbind("click"),$(".deleteIndex").unbind("click")},createInfoModal:function(){var a=function(a,b,c){if(a)arangoHelper.arangoError("Figures","Could not get revision.");else{var d=[],e={figures:c,revision:b,model:this.model};window.modalView.show("modalCollectionInfo.ejs","Collection: "+this.model.get("name"),d,e)}}.bind(this),b=function(b,c){if(b)arangoHelper.arangoError("Figures","Could not get figures.");else{var d=c;this.model.getRevision(a,d)}}.bind(this);this.model.getFigures(b)},resetIndexForms:function(){$("#indexHeader input").val("").prop("checked",!1),$("#newIndexType").val("Geo").prop("selected",!0),this.selectIndexType()},createIndex:function(){var a,b,c,d=this,e=$("#newIndexType").val(),f={};switch(e){case"Geo":a=$("#newGeoFields").val();var g=d.checkboxToValue("#newGeoJson"),h=d.checkboxToValue("#newGeoConstraint"),i=d.checkboxToValue("#newGeoIgnoreNull");f={type:"geo",fields:d.stringToArray(a),geoJson:g,constraint:h,ignoreNull:i};break;case"Hash":a=$("#newHashFields").val(),b=d.checkboxToValue("#newHashUnique"),c=d.checkboxToValue("#newHashSparse"),f={type:"hash",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Fulltext":a=$("#newFulltextFields").val();var j=parseInt($("#newFulltextMinLength").val(),10)||0;f={type:"fulltext",fields:d.stringToArray(a),minLength:j};break;case"Skiplist":a=$("#newSkiplistFields").val(),b=d.checkboxToValue("#newSkiplistUnique"),c=d.checkboxToValue("#newSkiplistSparse"),f={type:"skiplist",fields:d.stringToArray(a),unique:b,sparse:c}}var k=function(a,b){if(a)if(b){var c=JSON.parse(b.responseText);arangoHelper.arangoError("Document error",c.errorMessage)}else arangoHelper.arangoError("Document error","Could not create index.");d.refreshCollectionsView()};window.modalView.hide(),d.model.createIndex(f,k)},lastTarget:null,prepDeleteIndex:function(a){var b=this;this.lastTarget=a,this.lastId=$(this.lastTarget.currentTarget).parent().parent().first().children().first().text(),$("#modal-dialog .modal-footer").after(''),$("#indexConfirmDelete").unbind("click"),$("#indexConfirmDelete").bind("click",function(){$("#indexDeleteModal").remove(),b.deleteIndex()}),$("#indexAbortDelete").unbind("click"),$("#indexAbortDelete").bind("click",function(){$("#indexDeleteModal").remove()})},refreshCollectionsView:function(){window.App.arangoCollectionsStore.fetch({success:function(){window.App.collectionsView.render()}})},deleteIndex:function(){var a=function(a){a?(arangoHelper.arangoError("Could not delete index"),$("tr th:contains('"+this.lastId+"')").parent().children().last().html(''),this.model.set("locked",!1),this.refreshCollectionsView()):a||void 0===a||($("tr th:contains('"+this.lastId+"')").parent().remove(),this.model.set("locked",!1),this.refreshCollectionsView()),this.refreshCollectionsView()}.bind(this);this.model.set("locked",!0),this.model.deleteIndex(this.lastId,a),$("tr th:contains('"+this.lastId+"')").parent().children().last().html('')},selectIndexType:function(){$(".newIndexClass").hide();var a=$("#newIndexType").val();$("#newIndexType"+a).show()},getIndex:function(){var a=function(a,b){a?window.arangoHelper.arangoError("Index",b.errorMessage):this.renderIndex(b)}.bind(this);this.model.getIndex(a)},renderIndex:function(a){this.index=a;var b="collectionInfoTh modal-text";if(this.index){var c="",d="";_.each(this.index.indexes,function(a){d="primary"===a.type||"edge"===a.type?'':'',void 0!==a.fields&&(c=a.fields.join(", "));var e=a.id.indexOf("/"),f=a.id.substr(e+1,a.id.length),g=a.hasOwnProperty("selectivityEstimate")?(100*a.selectivityEstimate).toFixed(2)+"%":"n/a",h=a.hasOwnProperty("sparse")?a.sparse:"n/a";$("#collectionEditIndexTable").append(""+f+""+a.type+""+a.unique+""+h+""+g+""+c+""+d+"")})}this.bindIndexEvents()},toggleNewIndexView:function(){var a=$(".index-button-bar2")[0];$("#indexEditView").is(":visible")?($("#indexEditView").hide(),$("#newIndexView").show(),$("#cancelIndex").detach().appendTo("#modal-dialog .modal-footer"),$("#createIndex").detach().appendTo("#modal-dialog .modal-footer")):($("#indexEditView").show(),$("#newIndexView").hide(),$("#cancelIndex").detach().appendTo(a),$("#createIndex").detach().appendTo(a)),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","right"),this.resetIndexForms()},stringToArray:function(a){var b=[];return a.split(",").forEach(function(a){a=a.replace(/(^\s+|\s+$)/g,""),""!==a&&b.push(a)}),b},checkboxToValue:function(a){return $(a).prop("checked")}})}(),function(){"use strict";window.CollectionsView=Backbone.View.extend({el:"#content",el2:"#collectionsThumbnailsIn",searchTimeout:null,refreshRate:1e4,template:templateEngine.createTemplate("collectionsView.ejs"),refetchCollections:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.checkLockedCollections()}})},checkLockedCollections:function(){var a=function(a,b){var c=this;a?console.log("Could not check locked collections"):(this.collection.each(function(a){a.set("locked",!1)}),_.each(b,function(a){var b=c.collection.findWhere({id:a.collection});b.set("locked",!0),b.set("lockType",a.type),b.set("desc",a.desc)}),this.collection.each(function(a){a.get("locked")||($("#collection_"+a.get("name")).find(".corneredBadge").removeClass("loaded unloaded"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").addClass(a.get("status"))),a.get("locked")||"loading"===a.get("status")?($("#collection_"+a.get("name")).addClass("locked"),a.get("locked")?($("#collection_"+a.get("name")).find(".corneredBadge").removeClass("loaded unloaded"),$("#collection_"+a.get("name")).find(".corneredBadge").addClass("inProgress"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("desc"))):$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status"))):($("#collection_"+a.get("name")).removeClass("locked"),$("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").hasClass("inProgress")&&($("#collection_"+a.get("name")+" .corneredBadge").text(a.get("status")),$("#collection_"+a.get("name")+" .corneredBadge").removeClass("inProgress"),$("#collection_"+a.get("name")+" .corneredBadge").addClass("loaded")),"unloaded"===a.get("status")&&$("#collection_"+a.get("name")+" .icon_arangodb_info").addClass("disabled"))}))}.bind(this);window.arangoHelper.syncAndReturnUninishedAardvarkJobs("index",a)},initialize:function(){var a=this;window.setInterval(function(){"#collections"===window.location.hash&&window.VISIBLE&&a.refetchCollections()},a.refreshRate)},render:function(){this.checkLockedCollections();var a=!1;$("#collectionsDropdown").is(":visible")&&(a=!0),$(this.el).html(this.template.render({})),this.setFilterValues(),a===!0&&$("#collectionsDropdown2").show();var b=this.collection.searchOptions;this.collection.getFiltered(b).forEach(function(a){$("#collectionsThumbnailsIn",this.el).append(new window.CollectionListItemView({model:a,collectionsView:this}).render().el)},this),"none"===$("#collectionsDropdown2").css("display")?$("#collectionsToggle").removeClass("activated"):$("#collectionsToggle").addClass("activated");var c;arangoHelper.setCheckboxStatus("#collectionsDropdown");try{c=b.searchPhrase.length}catch(d){}return $("#searchInput").val(b.searchPhrase),$("#searchInput").focus(),$("#searchInput")[0].setSelectionRange(c,c),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","left"),this},events:{"click #createCollection":"createCollection","keydown #searchInput":"restrictToSearchPhraseKey","change #searchInput":"restrictToSearchPhrase","click #searchSubmit":"restrictToSearchPhrase","click .checkSystemCollections":"checkSystem","click #checkLoaded":"checkLoaded","click #checkUnloaded":"checkUnloaded","click #checkDocument":"checkDocument","click #checkEdge":"checkEdge","click #sortName":"sortName","click #sortType":"sortType","click #sortOrder":"sortOrder","click #collectionsToggle":"toggleView","click .css-label":"checkBoxes"},updateCollectionsView:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},toggleView:function(){$("#collectionsToggle").toggleClass("activated"),$("#collectionsDropdown2").slideToggle(200)},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},checkSystem:function(){var a=this.collection.searchOptions,b=a.includeSystem;a.includeSystem=$(".checkSystemCollections").is(":checked")===!0,b!==a.includeSystem&&this.render()},checkEdge:function(){var a=this.collection.searchOptions,b=a.includeEdge;a.includeEdge=$("#checkEdge").is(":checked")===!0,b!==a.includeEdge&&this.render()},checkDocument:function(){var a=this.collection.searchOptions,b=a.includeDocument;a.includeDocument=$("#checkDocument").is(":checked")===!0,b!==a.includeDocument&&this.render()},checkLoaded:function(){var a=this.collection.searchOptions,b=a.includeLoaded;a.includeLoaded=$("#checkLoaded").is(":checked")===!0,b!==a.includeLoaded&&this.render()},checkUnloaded:function(){var a=this.collection.searchOptions,b=a.includeUnloaded;a.includeUnloaded=$("#checkUnloaded").is(":checked")===!0,b!==a.includeUnloaded&&this.render()},sortName:function(){var a=this.collection.searchOptions,b=a.sortBy;a.sortBy=$("#sortName").is(":checked")===!0?"name":"type",b!==a.sortBy&&this.render()},sortType:function(){var a=this.collection.searchOptions,b=a.sortBy;a.sortBy=$("#sortType").is(":checked")===!0?"type":"name",b!==a.sortBy&&this.render()},sortOrder:function(){var a=this.collection.searchOptions,b=a.sortOrder;a.sortOrder=$("#sortOrder").is(":checked")===!0?-1:1,b!==a.sortOrder&&this.render()},setFilterValues:function(){var a=this.collection.searchOptions;$("#checkLoaded").attr("checked",a.includeLoaded),$("#checkUnloaded").attr("checked",a.includeUnloaded),$(".checkSystemCollections").attr("checked",a.includeSystem),$("#checkEdge").attr("checked",a.includeEdge),$("#checkDocument").attr("checked",a.includeDocument),$("#sortName").attr("checked","type"!==a.sortBy),$("#sortType").attr("checked","type"===a.sortBy),$("#sortOrder").attr("checked",1!==a.sortOrder)},search:function(){var a=this.collection.searchOptions,b=$("#searchInput").val();b!==a.searchPhrase&&(a.searchPhrase=b,this.render())},resetSearch:function(){this.searchTimeout&&(clearTimeout(this.searchTimeout),this.searchTimeout=null);var a=this.collection.searchOptions;a.searchPhrase=null},restrictToSearchPhraseKey:function(){var a=this;this.resetSearch(),a.searchTimeout=setTimeout(function(){a.search()},200)},restrictToSearchPhrase:function(){this.resetSearch(),this.search()},createCollection:function(a){a.preventDefault(),this.createNewCollectionModal()},submitCreateCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("DB","Could not check coordinator state");else{var c=$("#new-collection-name").val(),d=$("#new-collection-size").val(),e=$("#new-replication-factor").val(),f=$("#new-collection-type").val(),g=$("#new-collection-sync").val(),h=1,i=[];if(""===e&&(e=1),b){if(h=$("#new-collection-shards").val(),""===h&&(h=1),h=parseInt(h,10),1>h)return arangoHelper.arangoError("Number of shards has to be an integer value greater or equal 1"),0;i=_.pluck($("#new-collection-shardBy").select2("data"),"text"),0===i.length&&i.push("_key")}if("_"===c.substr(0,1))return arangoHelper.arangoError('No "_" allowed as first character!'),0;var j=!1,k="true"===g;if(d>0)try{d=1024*JSON.parse(d)*1024}catch(l){return arangoHelper.arangoError("Please enter a valid number"),0}if(""===c)return arangoHelper.arangoError("No collection name entered!"),0;var m=function(a,b){if(a)try{b=JSON.parse(b.responseText),arangoHelper.arangoError("Error",b.errorMessage)}catch(c){}else this.updateCollectionsView();window.modalView.hide()}.bind(this);this.collection.newCollection({collName:c,wfs:k,isSystem:j,collSize:d,replicationFactor:e,collType:f,shards:h,shardBy:i},m)}}.bind(this);window.isCoordinator(a)},createNewCollectionModal:function(){var a=function(a,b){if(a)arangoHelper.arangoError("DB","Could not check coordinator state");else{var c=[],d=[],e={},f=[];d.push(window.modalView.createTextEntry("new-collection-name","Name","",!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}])),d.push(window.modalView.createSelectEntry("new-collection-type","Type","","The type of the collection to create.",[{value:2,label:"Document"},{value:3,label:"Edge"}])),b&&(d.push(window.modalView.createTextEntry("new-collection-shards","Shards","","The number of shards to create. You cannot change this afterwards. Recommended: DBServers squared","",!0)),d.push(window.modalView.createSelect2Entry("new-collection-shardBy","shardBy","","The keys used to distribute documents on shards. Type the key and press return to add it.","_key",!1))),c.push(window.modalView.createSuccessButton("Save",this.submitCreateCollection.bind(this))),f.push(window.modalView.createTextEntry("new-collection-size","Journal size","","The maximal size of a journal or datafile (in MB). Must be at least 1.","",!1,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),window.App.isCluster&&f.push(window.modalView.createTextEntry("new-replication-factor","Replication factor","","Numeric value. Must be at least 1. Description: TODO","",!1,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),f.push(window.modalView.createSelectEntry("new-collection-sync","Wait for sync","","Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}])),e.header="Advanced",e.content=f,window.modalView.show("modalTable.ejs","New Collection",c,d,e),$("#s2id_new-collection-shardBy .select2-search-field input").on("focusout",function(a){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||window.setTimeout(function(){$(a.currentTarget).parent().parent().parent().select2("close")},200))})}}.bind(this);window.isCoordinator(a)}})}(),function(){"use strict";function a(a,b){return void 0!==a&&null!==a||(a=0),a.toFixed(b)}window.DashboardView=Backbone.View.extend({el:"#content",interval:1e4,defaultTimeFrame:12e5,defaultDetailFrame:1728e5,history:{},graphs:{},events:{"click .subViewNavbar .subMenuEntry":"toggleViews"},tendencies:{asyncPerSecondCurrent:["asyncPerSecondCurrent","asyncPerSecondPercentChange"],syncPerSecondCurrent:["syncPerSecondCurrent","syncPerSecondPercentChange"],clientConnectionsCurrent:["clientConnectionsCurrent","clientConnectionsPercentChange"],clientConnectionsAverage:["clientConnections15M","clientConnections15MPercentChange"],numberOfThreadsCurrent:["numberOfThreadsCurrent","numberOfThreadsPercentChange"],numberOfThreadsAverage:["numberOfThreads15M","numberOfThreads15MPercentChange"],virtualSizeCurrent:["virtualSizeCurrent","virtualSizePercentChange"],virtualSizeAverage:["virtualSize15M","virtualSize15MPercentChange"]},barCharts:{totalTimeDistribution:["queueTimeDistributionPercent","requestTimeDistributionPercent"],dataTransferDistribution:["bytesSentDistributionPercent","bytesReceivedDistributionPercent"]},barChartsElementNames:{queueTimeDistributionPercent:"Queue",requestTimeDistributionPercent:"Computation",bytesSentDistributionPercent:"Bytes sent",bytesReceivedDistributionPercent:"Bytes received"},getDetailFigure:function(a){var b=$(a.currentTarget).attr("id").replace(/ChartButton/g,"");return b},showDetail:function(a){var b,c=this,d=this.getDetailFigure(a);b=this.dygraphConfig.getDetailChartConfig(d),this.getHistoryStatistics(d),this.detailGraphFigure=d,window.modalView.hideFooter=!0,window.modalView.hide(),window.modalView.show("modalGraph.ejs",b.header,void 0,void 0,void 0,void 0,this.events),window.modalView.hideFooter=!1,$("#modal-dialog").on("hidden",function(){c.hidden()}),$("#modal-dialog").toggleClass("modal-chart-detail",!0),b.height=.7*$(window).height(),b.width=$(".modal-inner-detail").width(),b.labelsDiv=$(b.labelsDiv)[0],this.detailGraph=new Dygraph(document.getElementById("lineChartDetail"),this.history[this.server][d],b)},hidden:function(){this.detailGraph.destroy(),delete this.detailGraph,delete this.detailGraphFigure},getCurrentSize:function(a){"#"!==a.substr(0,1)&&(a="#"+a);var b,c;return $(a).attr("style",""),b=$(a).height(),c=$(a).width(),{height:b,width:c}},prepareDygraphs:function(){var a,b=this;this.dygraphConfig.getDashBoardFigures().forEach(function(c){a=b.dygraphConfig.getDefaultConfig(c);var d=b.getCurrentSize(a.div);a.height=d.height,a.width=d.width,b.graphs[c]=new Dygraph(document.getElementById(a.div),b.history[b.server][c]||[],a)})},initialize:function(a){this.options=a,this.dygraphConfig=a.dygraphConfig,this.d3NotInitialized=!0,this.events["click .dashboard-sub-bar-menu-sign"]=this.showDetail.bind(this),this.events["mousedown .dygraph-rangesel-zoomhandle"]=this.stopUpdating.bind(this),this.events["mouseup .dygraph-rangesel-zoomhandle"]=this.startUpdating.bind(this),this.serverInfo=a.serverToShow,this.serverInfo?this.server=this.serverInfo.target:this.server="-local-",this.history[this.server]={}},toggleViews:function(a){var b=a.currentTarget.id.split("-")[0],c=this,d=["replication","requests","system"];_.each(d,function(a){b!==a?$("#"+a).hide():($("#"+a).show(),c.resize(),$(window).resize())}),$(".subMenuEntries").children().removeClass("active"),$("#"+b+"-statistics").addClass("active"),window.setTimeout(function(){c.resize(),$(window).resize()},200)},updateCharts:function(){var a=this;return this.detailGraph?void this.updateLineChart(this.detailGraphFigure,!0):(this.prepareD3Charts(this.isUpdating),this.prepareResidentSize(this.isUpdating),this.updateTendencies(),void Object.keys(this.graphs).forEach(function(b){a.updateLineChart(b,!1)}))},updateTendencies:function(){var a=this,b=this.tendencies,c="";Object.keys(b).forEach(function(b){var d="",e=0;a.history.hasOwnProperty(a.server)&&a.history[a.server].hasOwnProperty(b)&&(e=a.history[a.server][b][1]),0>e?c="#d05448":(c="#77DB99",d="+"),a.history.hasOwnProperty(a.server)&&a.history[a.server].hasOwnProperty(b)?$("#"+b).html(a.history[a.server][b][0]+'
    '+d+e+"%"):$("#"+b).html('

    data not ready yet

    ')})},updateDateWindow:function(a,b){var c,d,e=(new Date).getTime();return b&&a.dateWindow_?(c=a.dateWindow_[0],d=e-a.dateWindow_[1]-5*this.interval>0?a.dateWindow_[1]:e,[c,d]):[e-this.defaultTimeFrame,e]},updateLineChart:function(a,b){var c=b?this.detailGraph:this.graphs[a],d={file:this.history[this.server][a],dateWindow:this.updateDateWindow(c,b)},e=0,f=[];_.each(d.file,function(a){var b=a[0].getSeconds()-a[0].getSeconds()%10;d.file[e][0].setSeconds(b),f.push(d.file[e][0]),e++});for(var g=new Date(Math.max.apply(null,f)),h=new Date(Math.min.apply(null,f)),i=new Date(h.getTime()),j=[],k=[];g>i;)i=new Date(i.setSeconds(i.getSeconds()+10)),k.push(i);_.each(k,function(a){var b=!1;_.each(d.file,function(c){Math.floor(a.getTime()/1e3)===Math.floor(c[0].getTime()/1e3)&&(b=!0)}),b===!1&&a1)){var f=0,g=0;9===c.length&&(f+=c[1],f+=c[6],f+=c[7],f+=c[8],g+=c[2],g+=c[3],g+=c[4],g+=c[5],c=[c[0],f,g]),d.history[d.server][e].unshift(c)}})},cutOffHistory:function(a,b){for(var c=this,d=c.history[c.server][a];0!==d.length&&!(d[d.length-1][0]>=b);)d.pop()},cutOffDygraphHistory:function(a){var b=this,c=new Date(a);this.dygraphConfig.getDashBoardFigures(!0).forEach(function(a){b.dygraphConfig.mapStatToFigure[a]&&b.history[b.server][a]&&b.cutOffHistory(a,c)})},mergeHistory:function(b){var c,d=this;for(c=0;c=0;--c)d.values.push({label:this.getLabel(b[a[0]].cuts,c),value:b[a[0]].values[c]}),e.values.push({label:this.getLabel(b[a[1]].cuts,c),value:b[a[1]].values[c]});return[d,e]},getLabel:function(a,b){return a[b]?0===b?"0 - "+a[b]:a[b-1]+" - "+a[b]:">"+a[b-1]},renderReplicationStatistics:function(a){$("#repl-numbers table tr:nth-child(1) > td:nth-child(2)").html(a.state.totalEvents),$("#repl-numbers table tr:nth-child(2) > td:nth-child(2)").html(a.state.totalRequests),$("#repl-numbers table tr:nth-child(3) > td:nth-child(2)").html(a.state.totalFailedConnects),a.state.lastAppliedContinuousTick?$("#repl-ticks table tr:nth-child(1) > td:nth-child(2)").html(a.state.lastAppliedContinuousTick):$("#repl-ticks table tr:nth-child(1) > td:nth-child(2)").html("no data available").addClass("no-data"),a.state.lastProcessedContinuousTick?$("#repl-ticks table tr:nth-child(2) > td:nth-child(2)").html(a.state.lastProcessedContinuousTick):$("#repl-ticks table tr:nth-child(2) > td:nth-child(2)").html("no data available").addClass("no-data"),a.state.lastAvailableContinuousTick?$("#repl-ticks table tr:nth-child(3) > td:nth-child(2)").html(a.state.lastAvailableContinuousTick):$("#repl-ticks table tr:nth-child(3) > td:nth-child(2)").html("no data available").addClass("no-data"),$("#repl-progress table tr:nth-child(1) > td:nth-child(2)").html(a.state.progress.message),$("#repl-progress table tr:nth-child(2) > td:nth-child(2)").html(a.state.progress.time),$("#repl-progress table tr:nth-child(3) > td:nth-child(2)").html(a.state.progress.failedConnects)},getReplicationStatistics:function(){var a=this;$.ajax(arangoHelper.databaseUrl("/_api/replication/applier-state"),{async:!0}).done(function(b){if(b.hasOwnProperty("state")){var c;c=b.state.running?"active":"inactive",c=''+c+"",$("#replication-chart .dashboard-sub-bar").html("Replication "+c),a.renderReplicationStatistics(b)}})},getStatistics:function(a,b){var c=this,d=arangoHelper.databaseUrl("/_admin/aardvark/statistics/short","_system"),e="?start=";e+=c.nextStart?c.nextStart:((new Date).getTime()-c.defaultTimeFrame)/1e3,"-local-"!==c.server&&(e+="&type=short&DBserver="+c.serverInfo.target,c.history.hasOwnProperty(c.server)||(c.history[c.server]={})),$.ajax(d+e,{async:!0,xhrFields:{withCredentials:!0},crossDomain:!0}).done(function(d){d.times.length>0&&(c.isUpdating=!0,c.mergeHistory(d)),c.isUpdating!==!1&&(a&&a(d.enabled,b),c.updateCharts())}).error(function(a){console.log("stat fetch req error:"+a)}),this.getReplicationStatistics()},getHistoryStatistics:function(a){var b=this,c="statistics/long",d="?filter="+this.dygraphConfig.mapStatToFigure[a].join();"-local-"!==b.server&&(c=b.server.endpoint+arangoHelper.databaseUrl("/_admin/aardvark/statistics/cluster"),d+="&type=long&DBserver="+b.server.target,b.history.hasOwnProperty(b.server)||(b.history[b.server]={}));var e=window.location.href.split("/"),f=e[0]+"//"+e[2]+"/"+e[3]+"/_system/"+e[5]+"/"+e[6]+"/";$.ajax(f+c+d,{async:!0}).done(function(c){var d;for(b.history[b.server][a]=[],d=0;d data not ready yet

    '),$("#totalTimeDistribution").prepend('

    data not ready yet

    '),$(".dashboard-bar-chart-title").append('

    data not ready yet

    '))},removeEmptyDataLabels:function(){$(".dataNotReadyYet").remove()},prepareResidentSize:function(b){var c=this,d=this.getCurrentSize("#residentSizeChartContainer"),e=c.history[c.server].residentSizeCurrent/1024/1024,f="";f=1025>e?a(e,2)+" MB":a(e/1024,2)+" GB";var g=a(100*c.history[c.server].residentSizePercent,2),h=[a(c.history[c.server].physicalMemory/1024/1024/1024,0)+" GB"];return void 0===c.history[c.server].residentSizeChart?void this.addEmptyDataLabels():(this.removeEmptyDataLabels(),void nv.addGraph(function(){var a=nv.models.multiBarHorizontalChart().x(function(a){return a.label}).y(function(a){return a.value}).width(d.width).height(d.height).margin({top:($("residentSizeChartContainer").outerHeight()-$("residentSizeChartContainer").height())/2,right:1,bottom:($("residentSizeChartContainer").outerHeight()-$("residentSizeChartContainer").height())/2,left:1}).showValues(!1).showYAxis(!1).showXAxis(!1).showLegend(!1).showControls(!1).stacked(!0);return a.yAxis.tickFormat(function(a){return a+"%"}).showMaxMin(!1),a.xAxis.showMaxMin(!1),d3.select("#residentSizeChart svg").datum(c.history[c.server].residentSizeChart).call(a),d3.select("#residentSizeChart svg").select(".nv-zeroLine").remove(),b&&(d3.select("#residentSizeChart svg").select("#total").remove(),d3.select("#residentSizeChart svg").select("#percentage").remove()),d3.select(".dashboard-bar-chart-title .percentage").html(f+" ("+g+" %)"),d3.select(".dashboard-bar-chart-title .absolut").html(h[0]),nv.utils.windowResize(a.update),a},function(){d3.selectAll("#residentSizeChart .nv-bar").on("click",function(){})}))},prepareD3Charts:function(b){var c=this,d={totalTimeDistribution:["queueTimeDistributionPercent","requestTimeDistributionPercent"],dataTransferDistribution:["bytesSentDistributionPercent","bytesReceivedDistributionPercent"]};this.d3NotInitialized&&(b=!1,this.d3NotInitialized=!1),_.each(Object.keys(d),function(b){var d=c.getCurrentSize("#"+b+"Container .dashboard-interior-chart"),e="#"+b+"Container svg";return void 0===c.history[c.server].residentSizeChart?void c.addEmptyDataLabels():(c.removeEmptyDataLabels(),void nv.addGraph(function(){var f=[0,.25,.5,.75,1],g=75,h=23,i=6;d.width<219?(f=[0,.5,1],g=72,h=21,i=5):d.width<299?(f=[0,.3334,.6667,1],g=77):d.width<379?g=87:d.width<459?g=95:d.width<539?g=100:d.width<619&&(g=105);var j=nv.models.multiBarHorizontalChart().x(function(a){return a.label}).y(function(a){return a.value}).width(d.width).height(d.height).margin({top:5,right:20,bottom:h,left:g}).showValues(!1).showYAxis(!0).showXAxis(!0).showLegend(!1).showControls(!1).forceY([0,1]);return j.yAxis.showMaxMin(!1),d3.select(".nv-y.nv-axis").selectAll("text").attr("transform","translate (0, "+i+")"),j.yAxis.tickValues(f).tickFormat(function(b){return a(100*b*100/100,0)+"%"}),d3.select(e).datum(c.history[c.server][b]).call(j),nv.utils.windowResize(j.update),j},function(){d3.selectAll(e+" .nv-bar").on("click",function(){})}))})},stopUpdating:function(){this.isUpdating=!1},startUpdating:function(){var a=this;a.timer||(a.timer=window.setInterval(function(){window.App.isCluster?window.location.hash.indexOf(a.serverInfo.target)>-1&&a.getStatistics():a.getStatistics()},a.interval))},resize:function(){if(this.isUpdating){var a,b=this; +_.each(this.graphs,function(c){a=b.getCurrentSize(c.maindiv_.id),c.resize(a.width,a.height)}),this.detailGraph&&(a=this.getCurrentSize(this.detailGraph.maindiv_.id),this.detailGraph.resize(a.width,a.height)),this.prepareD3Charts(!0),this.prepareResidentSize(!0)}},template:templateEngine.createTemplate("dashboardView.ejs"),render:function(a){var b=function(a,b){return b||$(this.el).html(this.template.render()),a&&"_system"===frontendConfig.db?(this.prepareDygraphs(),this.isUpdating&&(this.prepareD3Charts(),this.prepareResidentSize(),this.updateTendencies(),$(window).trigger("resize")),this.startUpdating(),void $(window).resize()):($(this.el).html(""),void(this.server?$(this.el).append('
    Server statistics ('+this.server+") are disabled.
    "):$(this.el).append('
    Server statistics are disabled.
    ')))}.bind(this),c=function(){$(this.el).html(""),$(".contentDiv").remove(),$(".headerBar").remove(),$(".dashboard-headerbar").remove(),$(".dashboard-row").remove(),$(this.el).append('
    You do not have permission to view this page.
    '),$(this.el).append("
    You can switch to '_system' to see the dashboard.
    ")}.bind(this);if("_system"!==frontendConfig.db)return void c();var d=function(d,e){d||(e?this.getStatistics(b,a):c())}.bind(this);void 0===window.App.currentDB.get("name")?window.setTimeout(function(){return"_system"!==window.App.currentDB.get("name")?void c():void this.options.database.hasSystemAccess(d)}.bind(this),300):this.options.database.hasSystemAccess(d)}})}(),function(){"use strict";window.DatabaseView=Backbone.View.extend({users:null,el:"#content",template:templateEngine.createTemplate("databaseView.ejs"),dropdownVisible:!1,currentDB:"",events:{"click #createDatabase":"createDatabase","click #submitCreateDatabase":"submitCreateDatabase","click .editDatabase":"editDatabase","click #userManagementView .icon":"editDatabase","click #selectDatabase":"updateDatabase","click #submitDeleteDatabase":"submitDeleteDatabase","click .contentRowInactive a":"changeDatabase","keyup #databaseSearchInput":"search","click #databaseSearchSubmit":"search","click #databaseToggle":"toggleSettingsDropdown","click .css-label":"checkBoxes","click #dbSortDesc":"sorting"},sorting:function(){$("#dbSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#databaseDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},initialize:function(){this.collection.fetch({async:!0,cache:!1})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},render:function(){var a=function(a,b){a?arangoHelper.arangoError("DB","Could not get current db properties"):(this.currentDB=b,this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:"",currentDB:this.currentDB})),this.dropdownVisible===!0&&($("#dbSortDesc").attr("checked",this.collection.sortOptions.desc),$("#databaseToggle").toggleClass("activated"),$("#databaseDropdown2").show()),arangoHelper.setCheckboxStatus("#databaseDropdown"),this.replaceSVGs())}.bind(this);return this.collection.getCurrentDatabase(a),this},toggleSettingsDropdown:function(){$("#dbSortDesc").attr("checked",this.collection.sortOptions.desc),$("#databaseToggle").toggleClass("activated"),$("#databaseDropdown2").slideToggle(200)},selectedDatabase:function(){return $("#selectDatabases").val()},handleError:function(a,b,c){return 409===a?void arangoHelper.arangoError("DB","Database "+c+" already exists."):400===a?void arangoHelper.arangoError("DB","Invalid Parameters"):403===a?void arangoHelper.arangoError("DB","Insufficent rights. Execute this from _system database"):void 0},validateDatabaseInfo:function(a,b){return""===b?(arangoHelper.arangoError("DB","You have to define an owner for the new database"),!1):""===a?(arangoHelper.arangoError("DB","You have to define a name for the new database"),!1):0===a.indexOf("_")?(arangoHelper.arangoError("DB ","Databasename should not start with _"),!1):a.match(/^[a-zA-Z][a-zA-Z0-9_\-]*$/)?!0:(arangoHelper.arangoError("DB","Databasename may only contain numbers, letters, _ and -"),!1)},createDatabase:function(a){a.preventDefault(),this.createAddDatabaseModal()},switchDatabase:function(a){if(!$(a.target).parent().hasClass("iconSet")){var b=$(a.currentTarget).find("h5").text();if(""!==b){var c=this.collection.createDatabaseURL(b);window.location.replace(c)}}},submitCreateDatabase:function(){var a=this,b=$("#newDatabaseName").val(),c=$("#newUser").val(),d={name:b};this.collection.create(d,{error:function(c,d){a.handleError(d.status,d.statusText,b)},success:function(d){"root"!==c&&$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(c)+"/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})}),$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/root/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})}),"#databases"===window.location.hash&&a.updateDatabases(),arangoHelper.arangoNotification("Database "+d.get("name")+" created.")}}),arangoHelper.arangoNotification("Database creation in progress."),window.modalView.hide()},submitDeleteDatabase:function(a){var b=this.collection.where({name:a});b[0].destroy({wait:!0,url:arangoHelper.databaseUrl("/_api/database/"+a)}),this.updateDatabases(),window.App.naviView.dbSelectionView.render($("#dbSelect")),window.modalView.hide()},changeDatabase:function(a){var b=$(a.currentTarget).attr("id"),c=this.collection.createDatabaseURL(b);window.location.replace(c)},updateDatabases:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render(),window.App.handleSelectDatabase()}})},editDatabase:function(a){var b=this.evaluateDatabaseName($(a.currentTarget).attr("id"),"_edit-database"),c=!0;b===this.currentDB&&(c=!1),this.createEditDatabaseModal(b,c)},search:function(){var a,b,c,d;a=$("#databaseSearchInput"),b=$("#databaseSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("name").indexOf(b)}),$(this.el).html(this.template.render({collection:d,searchString:b,currentDB:this.currentDB})),this.replaceSVGs(),a=$("#databaseSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},replaceSVGs:function(){$(".svgToReplace").each(function(){var a=$(this),b=a.attr("id"),c=a.attr("src");$.get(c,function(c){var d=$(c).find("svg");d.attr("id",b).attr("class","tile-icon-svg").removeAttr("xmlns:a"),a.replaceWith(d)},"xml")})},evaluateDatabaseName:function(a,b){var c=a.lastIndexOf(b);return a.substring(0,c)},createEditDatabaseModal:function(a,b){var c=[],d=[];d.push(window.modalView.createReadOnlyEntry("id_name","Name",a,"")),b?c.push(window.modalView.createDeleteButton("Delete",this.submitDeleteDatabase.bind(this,a))):c.push(window.modalView.createDisabledButton("Delete")),window.modalView.show("modalTable.ejs","Delete database",c,d)},createAddDatabaseModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("newDatabaseName","Name","",!1,"Database Name",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Database name must start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No database name given."}]));var c=[];window.App.userCollection.each(function(a){c.push({value:a.get("user"),label:a.get("user")})}),b.push(window.modalView.createSelectEntry("newUser","Username",null!==this.users?this.users.whoAmI():"root","Please define the owner of this database. This will be the only user having initial access to this database if authentication is turned on. Please note that if you specify a username different to your account you will not be able to access the database with your account after having creating it. Specifying a username is mandatory even with authentication turned off. If there is a failure you will be informed.",c)),a.push(window.modalView.createSuccessButton("Create",this.submitCreateDatabase.bind(this))),window.modalView.show("modalTable.ejs","Create Database",a,b),$("#useDefaultPassword").change(function(){"true"===$("#useDefaultPassword").val()?$("#row_newPassword").hide():$("#row_newPassword").show()}),$("#row_newPassword").hide()}})}(),function(){"use strict";window.DBSelectionView=Backbone.View.extend({template:templateEngine.createTemplate("dbSelectionView.ejs"),events:{"click .dbSelectionLink":"changeDatabase"},initialize:function(a){this.current=a.current},changeDatabase:function(a){var b=$(a.currentTarget).closest(".dbSelectionLink.tab").attr("id"),c=this.collection.createDatabaseURL(b);window.location.replace(c)},render:function(a){var b=function(b,c){b?arangoHelper.arangoError("DB","Could not fetch databases"):(this.$el=a,this.$el.html(this.template.render({list:c,current:this.current.get("name")})),this.delegateEvents())}.bind(this);return this.collection.getDatabasesForUser(b),this.el}})}(),function(){"use strict";window.DocumentsView=window.PaginationView.extend({filters:{0:!0},filterId:0,paginationDiv:"#documentsToolbarF",idPrefix:"documents",addDocumentSwitch:!0,activeFilter:!1,lastCollectionName:void 0,restoredFilters:[],editMode:!1,allowUpload:!1,el:"#content",table:"#documentsTableID",template:templateEngine.createTemplate("documentsView.ejs"),collectionContext:{prev:null,next:null},editButtons:["#deleteSelected","#moveSelected"],initialize:function(a){this.documentStore=a.documentStore,this.collectionsStore=a.collectionsStore,this.tableView=new window.TableView({el:this.table,collection:this.collection}),this.tableView.setRowClick(this.clicked.bind(this)),this.tableView.setRemoveClick(this.remove.bind(this))},resize:function(){$("#docPureTable").height($(".centralRow").height()-210),$("#docPureTable .pure-table-body").css("max-height",$("#docPureTable").height()-47)},setCollectionId:function(a,b){this.collection.setCollection(a),this.collection.setPage(b),this.page=b;var c=function(b,c){b?arangoHelper.arangoError("Error","Could not get collection properties."):(this.type=c,this.collection.getDocuments(this.getDocsCallback.bind(this)),this.collectionModel=this.collectionsStore.get(a))}.bind(this);arangoHelper.collectionApiType(a,null,c)},getDocsCallback:function(a){$("#documents_last").css("visibility","hidden"),$("#documents_first").css("visibility","hidden"),a?(window.progressView.hide(),arangoHelper.arangoError("Document error","Could not fetch requested documents.")):a&&void 0===a||(window.progressView.hide(),this.drawTable(),this.renderPaginationElements())},events:{"click #collectionPrev":"prevCollection","click #collectionNext":"nextCollection","click #filterCollection":"filterCollection","click #markDocuments":"editDocuments","click #importCollection":"importCollection","click #exportCollection":"exportCollection","click #filterSend":"sendFilter","click #addFilterItem":"addFilterItem","click .removeFilterItem":"removeFilterItem","click #deleteSelected":"deleteSelectedDocs","click #moveSelected":"moveSelectedDocs","click #addDocumentButton":"addDocumentModal","click #documents_first":"firstDocuments","click #documents_last":"lastDocuments","click #documents_prev":"prevDocuments","click #documents_next":"nextDocuments","click #confirmDeleteBtn":"confirmDelete","click .key":"nop",keyup:"returnPressedHandler","keydown .queryline input":"filterValueKeydown","click #importModal":"showImportModal","click #resetView":"resetView","click #confirmDocImport":"startUpload","click #exportDocuments":"startDownload","change #documentSize":"setPagesize","change #docsSort":"setSorting"},showSpinner:function(){$("#uploadIndicator").show()},hideSpinner:function(){$("#uploadIndicator").hide()},showImportModal:function(){$("#docImportModal").modal("show")},hideImportModal:function(){$("#docImportModal").modal("hide")},setPagesize:function(){var a=$("#documentSize").find(":selected").val();this.collection.setPagesize(a),this.collection.getDocuments(this.getDocsCallback.bind(this))},setSorting:function(){var a=$("#docsSort").val();""!==a&&void 0!==a&&null!==a||(a="_key"),this.collection.setSort(a)},returnPressedHandler:function(a){13===a.keyCode&&$(a.target).is($("#docsSort"))&&this.collection.getDocuments(this.getDocsCallback.bind(this)),13===a.keyCode&&$("#confirmDeleteBtn").attr("disabled")===!1&&this.confirmDelete()},nop:function(a){a.stopPropagation()},resetView:function(){var a=function(a){a&&arangoHelper.arangoError("Document","Could not fetch documents count")};$("input").val(""),$("select").val("=="),this.removeAllFilterItems(),$("#documentSize").val(this.collection.getPageSize()),$("#documents_last").css("visibility","visible"),$("#documents_first").css("visibility","visible"),this.addDocumentSwitch=!0,this.collection.resetFilter(),this.collection.loadTotal(a),this.restoredFilters=[],this.allowUpload=!1,this.files=void 0,this.file=void 0,$("#confirmDocImport").attr("disabled",!0),this.markFilterToggle(),this.collection.getDocuments(this.getDocsCallback.bind(this))},startDownload:function(){var a=this.collection.buildDownloadDocumentQuery();if(""!==a||void 0!==a||null!==a){var b="query/result/download/"+btoa(JSON.stringify(a));arangoHelper.download(b)}else arangoHelper.arangoError("Document error","could not download documents")},startUpload:function(){var a=function(a,b){a?(arangoHelper.arangoError("Upload",b),this.hideSpinner()):(this.hideSpinner(),this.hideImportModal(),this.resetView())}.bind(this);this.allowUpload===!0&&(this.showSpinner(),this.collection.uploadDocuments(this.file,a))},uploadSetup:function(){var a=this;$("#importDocuments").change(function(b){a.files=b.target.files||b.dataTransfer.files,a.file=a.files[0],$("#confirmDocImport").attr("disabled",!1),a.allowUpload=!0})},buildCollectionLink:function(a){return"collection/"+encodeURIComponent(a.get("name"))+"/documents/1"},markFilterToggle:function(){this.restoredFilters.length>0?$("#filterCollection").addClass("activated"):$("#filterCollection").removeClass("activated")},editDocuments:function(){$("#importCollection").removeClass("activated"),$("#exportCollection").removeClass("activated"),this.markFilterToggle(),$("#markDocuments").toggleClass("activated"),this.changeEditMode(),$("#filterHeader").hide(),$("#importHeader").hide(),$("#editHeader").slideToggle(200),$("#exportHeader").hide()},filterCollection:function(){$("#importCollection").removeClass("activated"),$("#exportCollection").removeClass("activated"),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),this.markFilterToggle(),this.activeFilter=!0,$("#importHeader").hide(),$("#editHeader").hide(),$("#exportHeader").hide(),$("#filterHeader").slideToggle(200);var a;for(a in this.filters)if(this.filters.hasOwnProperty(a))return void $("#attribute_name"+a).focus()},exportCollection:function(){$("#importCollection").removeClass("activated"),$("#filterHeader").removeClass("activated"),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),$("#exportCollection").toggleClass("activated"),this.markFilterToggle(),$("#exportHeader").slideToggle(200),$("#importHeader").hide(),$("#filterHeader").hide(),$("#editHeader").hide()},importCollection:function(){this.markFilterToggle(),$("#markDocuments").removeClass("activated"),this.changeEditMode(!1),$("#importCollection").toggleClass("activated"),$("#exportCollection").removeClass("activated"),$("#importHeader").slideToggle(200),$("#filterHeader").hide(),$("#editHeader").hide(),$("#exportHeader").hide()},changeEditMode:function(a){a===!1||this.editMode===!0?($("#docPureTable .pure-table-body .pure-table-row").css("cursor","default"),$(".deleteButton").fadeIn(),$(".addButton").fadeIn(),$(".selected-row").removeClass("selected-row"),this.editMode=!1,this.tableView.setRowClick(this.clicked.bind(this))):($("#docPureTable .pure-table-body .pure-table-row").css("cursor","copy"),$(".deleteButton").fadeOut(),$(".addButton").fadeOut(),$(".selectedCount").text(0),this.editMode=!0,this.tableView.setRowClick(this.editModeClick.bind(this)))},getFilterContent:function(){var a,b,c=[];for(a in this.filters)if(this.filters.hasOwnProperty(a)){b=$("#attribute_value"+a).val();try{b=JSON.parse(b)}catch(d){b=String(b)}""!==$("#attribute_name"+a).val()&&c.push({attribute:$("#attribute_name"+a).val(),operator:$("#operator"+a).val(),value:b})}return c},sendFilter:function(){this.restoredFilters=this.getFilterContent();var a=this;this.collection.resetFilter(),this.addDocumentSwitch=!1,_.each(this.restoredFilters,function(b){void 0!==b.operator&&a.collection.addFilter(b.attribute,b.operator,b.value)}),this.collection.setToFirst(),this.collection.getDocuments(this.getDocsCallback.bind(this)),this.markFilterToggle()},restoreFilter:function(){var a=this,b=0;this.filterId=0,$("#docsSort").val(this.collection.getSort()),_.each(this.restoredFilters,function(c){0!==b&&a.addFilterItem(),void 0!==c.operator&&($("#attribute_name"+b).val(c.attribute),$("#operator"+b).val(c.operator),$("#attribute_value"+b).val(c.value)),b++,a.collection.addFilter(c.attribute,c.operator,c.value)})},addFilterItem:function(){var a=++this.filterId;$("#filterHeader").append('
    '),this.filters[a]=!0,this.checkFilterState()},filterValueKeydown:function(a){13===a.keyCode&&this.sendFilter()},checkFilterState:function(){var a=$("#filterHeader .queryline").length;if(1===a)$("#filterHeader .removeFilterItem").remove();else if(0===$("#filterHeader .queryline").first().find(".removeFilterItem").length){var b=$("#filterHeader .queryline").first().children().first().attr("id"),c=b.substr(14,b.length);$("#filterHeader .queryline").first().find(".add-filter-item").after(' ')}0===$("#filterHeader .queryline").first().find(".add-filter-item").length&&$("#filterHeader .queryline").first().find(".filterValue").after('')},removeFilterItem:function(a){var b=a.currentTarget,c=b.id.replace(/^removeFilter/,"");delete this.filters[c],delete this.restoredFilters[c],$(b.parentElement).remove(),this.checkFilterState()},removeAllFilterItems:function(){var a,b=$("#filterHeader").children().length;for(a=1;b>=a;a++)$("#removeFilter"+a).parent().remove();this.filters={0:!0},this.filterId=0},addDocumentModal:function(){var a=window.location.hash.split("/")[1],b=[],c=[],d=function(a,d){a?arangoHelper.arangoError("Error","Could not fetch collection type"):"edge"===d?(c.push(window.modalView.createTextEntry("new-edge-from-attr","_from","","document _id: document handle of the linked vertex (incoming relation)",void 0,!1,[{rule:Joi.string().required(),msg:"No _from attribute given."}])),c.push(window.modalView.createTextEntry("new-edge-to","_to","","document _id: document handle of the linked vertex (outgoing relation)",void 0,!1,[{rule:Joi.string().required(),msg:"No _to attribute given."}])),c.push(window.modalView.createTextEntry("new-edge-key-attr","_key",void 0,"the edges unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSuccessButton("Create",this.addEdge.bind(this))),window.modalView.show("modalTable.ejs","Create edge",b,c)):(c.push(window.modalView.createTextEntry("new-document-key-attr","_key",void 0,"the documents unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSuccessButton("Create",this.addDocument.bind(this))),window.modalView.show("modalTable.ejs","Create document",b,c))}.bind(this);arangoHelper.collectionApiType(a,!0,d)},addEdge:function(){var a,b=window.location.hash.split("/")[1],c=$(".modal-body #new-edge-from-attr").last().val(),d=$(".modal-body #new-edge-to").last().val(),e=$(".modal-body #new-edge-key-attr").last().val(),f=function(b,c){if(b)arangoHelper.arangoError("Error","Could not create edge");else{window.modalView.hide(),c=c._id.split("/");try{a="collection/"+c[0]+"/"+c[1],decodeURI(a)}catch(d){a="collection/"+c[0]+"/"+encodeURIComponent(c[1])}window.location.hash=a}};""!==e||void 0!==e?this.documentStore.createTypeEdge(b,c,d,e,f):this.documentStore.createTypeEdge(b,c,d,null,f)},addDocument:function(){var a,b=window.location.hash.split("/")[1],c=$(".modal-body #new-document-key-attr").last().val(),d=function(b,c){if(b)arangoHelper.arangoError("Error","Could not create document");else{window.modalView.hide(),c=c.split("/");try{a="collection/"+c[0]+"/"+c[1],decodeURI(a)}catch(d){a="collection/"+c[0]+"/"+encodeURIComponent(c[1])}window.location.hash=a}};""!==c||void 0!==c?this.documentStore.createTypeDocument(b,c,d):this.documentStore.createTypeDocument(b,null,d)},moveSelectedDocs:function(){var a=[],b=[],c=this.getSelectedDocs();0!==c.length&&(b.push(window.modalView.createTextEntry("move-documents-to","Move to","",!1,"collection-name",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}])),a.push(window.modalView.createSuccessButton("Move",this.confirmMoveSelectedDocs.bind(this))),window.modalView.show("modalTable.ejs","Move documents",a,b))},confirmMoveSelectedDocs:function(){var a=this.getSelectedDocs(),b=this,c=$(".modal-body").last().find("#move-documents-to").val(),d=function(){this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide()}.bind(this);_.each(a,function(a){b.collection.moveDocument(a,b.collection.collectionID,c,d)})},deleteSelectedDocs:function(){var a=[],b=[],c=this.getSelectedDocs();0!==c.length&&(b.push(window.modalView.createReadOnlyEntry(void 0,c.length+" documents selected","Do you want to delete all selected documents?",void 0,void 0,!1,void 0)),a.push(window.modalView.createDeleteButton("Delete",this.confirmDeleteSelectedDocs.bind(this))),window.modalView.show("modalTable.ejs","Delete documents",a,b))},confirmDeleteSelectedDocs:function(){var a=this.getSelectedDocs(),b=[],c=this;_.each(a,function(a){if("document"===c.type){var d=function(a){a?(b.push(!1),arangoHelper.arangoError("Document error","Could not delete document.")):(b.push(!0),c.collection.setTotalMinusOne(),c.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide())}.bind(c);c.documentStore.deleteDocument(c.collection.collectionID,a,d)}else if("edge"===c.type){var e=function(a){a?(b.push(!1),arangoHelper.arangoError("Edge error","Could not delete edge")):(c.collection.setTotalMinusOne(),b.push(!0),c.collection.getDocuments(this.getDocsCallback.bind(this)),$("#markDocuments").click(),window.modalView.hide())}.bind(c);c.documentStore.deleteEdge(c.collection.collectionID,a,e)}})},getSelectedDocs:function(){var a=[];return _.each($("#docPureTable .pure-table-body .pure-table-row"),function(b){$(b).hasClass("selected-row")&&a.push($($(b).children()[1]).find(".key").text())}),a},remove:function(a){this.docid=$(a.currentTarget).parent().parent().prev().find(".key").text(),$("#confirmDeleteBtn").attr("disabled",!1),$("#docDeleteModal").modal("show")},confirmDelete:function(){$("#confirmDeleteBtn").attr("disabled",!0);var a=window.location.hash.split("/"),b=a[3];"source"!==b&&this.reallyDelete()},reallyDelete:function(){if("document"===this.type){var a=function(a){a?arangoHelper.arangoError("Error","Could not delete document"):(this.collection.setTotalMinusOne(),this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#docDeleteModal").modal("hide"))}.bind(this);this.documentStore.deleteDocument(this.collection.collectionID,this.docid,a)}else if("edge"===this.type){var b=function(a){a?arangoHelper.arangoError("Edge error","Could not delete edge"):(this.collection.setTotalMinusOne(),this.collection.getDocuments(this.getDocsCallback.bind(this)),$("#docDeleteModal").modal("hide"))}.bind(this);this.documentStore.deleteEdge(this.collection.collectionID,this.docid,b)}},editModeClick:function(a){var b=$(a.currentTarget);b.hasClass("selected-row")?b.removeClass("selected-row"):b.addClass("selected-row");var c=this.getSelectedDocs();$(".selectedCount").text(c.length),_.each(this.editButtons,function(a){c.length>0?($(a).prop("disabled",!1),$(a).removeClass("button-neutral"),$(a).removeClass("disabled"),"#moveSelected"===a?$(a).addClass("button-success"):$(a).addClass("button-danger")):($(a).prop("disabled",!0),$(a).addClass("disabled"),$(a).addClass("button-neutral"),"#moveSelected"===a?$(a).removeClass("button-success"):$(a).removeClass("button-danger"))})},clicked:function(a){var b,c=a.currentTarget,d=$(c).attr("id").substr(4);try{b="collection/"+this.collection.collectionID+"/"+d,decodeURI(d)}catch(e){b="collection/"+this.collection.collectionID+"/"+encodeURIComponent(d)}window.location.hash=b},drawTable:function(){this.tableView.setElement($("#docPureTable")).render(),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","top"),$(".prettify").snippet("javascript",{style:"nedit",menu:!1,startText:!1,transparent:!0,showNum:!1}),this.resize()},checkCollectionState:function(){this.lastCollectionName===this.collectionName?this.activeFilter&&(this.filterCollection(),this.restoreFilter()):void 0!==this.lastCollectionName&&(this.collection.resetFilter(),this.collection.setSort(""),this.restoredFilters=[],this.activeFilter=!1)},render:function(){return $(this.el).html(this.template.render({})),2===this.type?this.type="document":3===this.type&&(this.type="edge"),this.tableView.setElement($(this.table)).drawLoading(),this.collectionContext=this.collectionsStore.getPosition(this.collection.collectionID),this.collectionName=window.location.hash.split("/")[1],this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Content"),this.checkCollectionState(),this.lastCollectionName=this.collectionName,this.uploadSetup(),$("[data-toggle=tooltip]").tooltip(),$(".upload-info").tooltip(),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","top"),this.renderPaginationElements(),this.selectActivePagesize(),this.markFilterToggle(),this.resize(),this},rerender:function(){this.collection.getDocuments(this.getDocsCallback.bind(this)),this.resize()},selectActivePagesize:function(){$("#documentSize").val(this.collection.getPageSize())},renderPaginationElements:function(){this.renderPagination();var a=$("#totalDocuments");0===a.length&&($("#documentsToolbarFL").append(''),a=$("#totalDocuments")),"document"===this.type&&a.html(numeral(this.collection.getTotal()).format("0,0")+" doc(s)"),"edge"===this.type&&a.html(numeral(this.collection.getTotal()).format("0,0")+" edge(s)")},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)}})}(),function(){"use strict";var a=function(a){var b=a.split("/");return"collection/"+encodeURIComponent(b[0])+"/"+encodeURIComponent(b[1])};window.DocumentView=Backbone.View.extend({el:"#content",colid:0,docid:0,customView:!1,defaultMode:"tree",template:templateEngine.createTemplate("documentView.ejs"),events:{"click #saveDocumentButton":"saveDocument","click #deleteDocumentButton":"deleteDocumentModal","click #confirmDeleteDocument":"deleteDocument","click #document-from":"navigateToDocument","click #document-to":"navigateToDocument","keydown #documentEditor .ace_editor":"keyPress","keyup .jsoneditor .search input":"checkSearchBox","click .jsoneditor .modes":"storeMode","click #addDocument":"addDocument"},checkSearchBox:function(a){""===$(a.currentTarget).val()&&this.editor.expandAll()},initialize:function(){var a=localStorage.getItem("JSONEditorMode");a&&(this.defaultMode=a)},addDocument:function(){window.App.documentsView.addDocumentModal()},storeMode:function(){var a=this;$(".type-modes").on("click",function(b){var c=$(b.currentTarget).text().toLowerCase();localStorage.setItem("JSONEditorMode",c),a.defaultMode=c})},keyPress:function(a){a.ctrlKey&&13===a.keyCode?(a.preventDefault(),this.saveDocument()):a.metaKey&&13===a.keyCode&&(a.preventDefault(),this.saveDocument())},editor:0,setType:function(a){a=2===a?"document":"edge";var b=function(a,b){if(a)arangoHelper.arangoError("Error","Could not fetch data.");else{var c=b+": ";this.type=b,this.fillInfo(c),this.fillEditor()}}.bind(this);"edge"===a?this.collection.getEdge(this.colid,this.docid,b):"document"===a&&this.collection.getDocument(this.colid,this.docid,b)},deleteDocumentModal:function(){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry("doc-delete-button","Confirm delete, document id is",this.type._id,void 0,void 0,!1,/[<>&'"]/)),a.push(window.modalView.createDeleteButton("Delete",this.deleteDocument.bind(this))),window.modalView.show("modalTable.ejs","Delete Document",a,b)},deleteDocument:function(){var a=function(){if(this.customView)this.customDeleteFunction();else{var a="collection/"+encodeURIComponent(this.colid)+"/documents/1";window.modalView.hide(),window.App.navigate(a,{trigger:!0})}}.bind(this);if(this.type._from&&this.type._to){var b=function(b){b?arangoHelper.arangoError("Edge error","Could not delete edge"):a()};this.collection.deleteEdge(this.colid,this.docid,b)}else{var c=function(b){b?arangoHelper.arangoError("Error","Could not delete document"):a()};this.collection.deleteDocument(this.colid,this.docid,c)}},navigateToDocument:function(a){var b=$(a.target).attr("documentLink");b&&window.App.navigate(b,{trigger:!0})},fillInfo:function(){var b=this.collection.first(),c=b.get("_id"),d=b.get("_key"),e=b.get("_rev"),f=b.get("_from"),g=b.get("_to");if($("#document-type").css("margin-left","10px"),$("#document-type").text("_id:"),$("#document-id").css("margin-left","0"),$("#document-id").text(c),$("#document-key").text(d),$("#document-rev").text(e),f&&g){var h=a(f),i=a(g);$("#document-from").text(f),$("#document-from").attr("documentLink",h),$("#document-to").text(g),$("#document-to").attr("documentLink",i)}else $(".edge-info-container").hide()},fillEditor:function(){var a=this.removeReadonlyKeys(this.collection.first().attributes);$(".disabledBread").last().text(this.collection.first().get("_key")),this.editor.set(a),$(".ace_content").attr("font-size","11pt")},jsonContentChanged:function(){this.enableSaveButton()},resize:function(){$("#documentEditor").height($(".centralRow").height()-300)},render:function(){$(this.el).html(this.template.render({})),$("#documentEditor").height($(".centralRow").height()-300),this.disableSaveButton(),this.breadcrumb();var a=this,b=document.getElementById("documentEditor"),c={change:function(){a.jsonContentChanged()},search:!0,mode:"tree",modes:["tree","code"],iconlib:"fontawesome4"};return this.editor=new JSONEditor(b,c),this.editor.setMode(this.defaultMode),this},removeReadonlyKeys:function(a){return _.omit(a,["_key","_id","_from","_to","_rev"])},saveDocument:function(){if(void 0===$("#saveDocumentButton").attr("disabled"))if("_"===this.collection.first().attributes._id.substr(0,1)){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry("doc-save-system-button","Caution","You are modifying a system collection. Really continue?",void 0,void 0,!1,/[<>&'"]/)), +a.push(window.modalView.createSuccessButton("Save",this.confirmSaveDocument.bind(this))),window.modalView.show("modalTable.ejs","Modify System Collection",a,b)}else this.confirmSaveDocument()},confirmSaveDocument:function(){window.modalView.hide();var a;try{a=this.editor.get()}catch(b){return this.errorConfirmation(b),void this.disableSaveButton()}if(a=JSON.stringify(a),this.type._from&&this.type._to){var c=function(a){a?arangoHelper.arangoError("Error","Could not save edge."):(this.successConfirmation(),this.disableSaveButton())}.bind(this);this.collection.saveEdge(this.colid,this.docid,this.type._from,this.type._to,a,c)}else{var d=function(a){a?arangoHelper.arangoError("Error","Could not save document."):(this.successConfirmation(),this.disableSaveButton())}.bind(this);this.collection.saveDocument(this.colid,this.docid,a,d)}},successConfirmation:function(){arangoHelper.arangoNotification("Document saved.")},errorConfirmation:function(a){arangoHelper.arangoError("Document editor: ",a)},enableSaveButton:function(){$("#saveDocumentButton").prop("disabled",!1),$("#saveDocumentButton").addClass("button-success"),$("#saveDocumentButton").removeClass("button-close")},disableSaveButton:function(){$("#saveDocumentButton").prop("disabled",!0),$("#saveDocumentButton").addClass("button-close"),$("#saveDocumentButton").removeClass("button-success")},breadcrumb:function(){var a=window.location.hash.split("/");$("#subNavigationBar .breadcrumb").html('Collection: '+a[1]+'Document: '+a[2])},escaped:function(a){return a.replace(/&/g,"&").replace(//g,">").replace(/"/g,""").replace(/'/g,"'")}})}(),function(){"use strict";window.FooterView=Backbone.View.extend({el:"#footerBar",system:{},isOffline:!0,isOfflineCounter:0,firstLogin:!0,timer:15e3,lap:0,timerFunction:null,events:{"click .footer-center p":"showShortcutModal"},initialize:function(){var a=this;window.setInterval(function(){a.getVersion()},a.timer),a.getVersion(),window.VISIBLE=!0,document.addEventListener("visibilitychange",function(){window.VISIBLE=!window.VISIBLE}),$("#offlinePlaceholder button").on("click",function(){a.getVersion()}),window.setTimeout(function(){window.frontendConfig.isCluster===!0&&($(".health-state").css("cursor","pointer"),$(".health-state").on("click",function(){window.App.navigate("#nodes",{trigger:!0})}))},1e3)},template:templateEngine.createTemplate("footerView.ejs"),showServerStatus:function(a){window.App.isCluster?this.renderClusterState(a):a===!0?($("#healthStatus").removeClass("negative"),$("#healthStatus").addClass("positive"),$(".health-state").html("GOOD"),$(".health-icon").html(''),$("#offlinePlaceholder").hide()):($("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),$(".health-state").html("UNKNOWN"),$(".health-icon").html(''),$("#offlinePlaceholder").show(),this.reconnectAnimation(0))},reconnectAnimation:function(a){var b=this;0===a&&(b.lap=a,$("#offlineSeconds").text(b.timer/1e3),clearTimeout(b.timerFunction)),b.lap0?($("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),1===c?$(".health-state").html(c+" NODE ERROR"):$(".health-state").html(c+" NODES ERROR"),$(".health-icon").html('')):($("#healthStatus").removeClass("negative"),$("#healthStatus").addClass("positive"),$(".health-state").html("NODES OK"),$(".health-icon").html(''))};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){b(a)}})}else $("#healthStatus").removeClass("positive"),$("#healthStatus").addClass("negative"),$(".health-state").html(window.location.host+" OFFLINE"),$(".health-icon").html(''),$("#offlinePlaceholder").show(),this.reconnectAnimation(0)},showShortcutModal:function(){window.arangoHelper.hotkeysFunctions.showHotkeysModal()},getVersion:function(){var a=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,success:function(b){a.showServerStatus(!0),a.isOffline===!0&&(a.isOffline=!1,a.isOfflineCounter=0,a.firstLogin?a.firstLogin=!1:window.setTimeout(function(){a.showServerStatus(!0)},1e3),a.system.name=b.server,a.system.version=b.version,a.render())},error:function(b){401===b.status?(a.showServerStatus(!0),window.App.navigate("login",{trigger:!0})):(a.isOffline=!0,a.isOfflineCounter++,a.isOfflineCounter>=1&&a.showServerStatus(!1))}}),a.system.hasOwnProperty("database")||$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/database/current"),contentType:"application/json",processData:!1,async:!0,success:function(b){var c=b.result.name;a.system.database=c;var d=window.setInterval(function(){var b=$("#databaseNavi");b&&(window.clearTimeout(d),d=null,a.render())},50)}})},renderVersion:function(){this.system.hasOwnProperty("database")&&this.system.hasOwnProperty("name")&&$(this.el).html(this.template.render({name:this.system.name,version:this.system.version,database:this.system.database}))},render:function(){return this.system.version||this.getVersion(),$(this.el).html(this.template.render({name:this.system.name,version:this.system.version})),this}})}(),function(){"use strict";window.FoxxActiveView=Backbone.View.extend({tagName:"div",className:"tile pure-u-1-1 pure-u-sm-1-2 pure-u-md-1-3 pure-u-lg-1-4 pure-u-xl-1-6",template:templateEngine.createTemplate("foxxActiveView.ejs"),_show:!0,events:{click:"openAppDetailView"},openAppDetailView:function(){window.App.navigate("service/"+encodeURIComponent(this.model.get("mount")),{trigger:!0})},toggle:function(a,b){switch(a){case"devel":this.model.isDevelopment()&&(this._show=b);break;case"production":this.model.isDevelopment()||this.model.isSystem()||(this._show=b);break;case"system":this.model.isSystem()&&(this._show=b)}this._show?$(this.el).show():$(this.el).hide()},render:function(){return this.model.fetchThumbnail(function(){$(this.el).html(this.template.render({model:this.model}));var a=function(){this.model.needsConfiguration()&&($(this.el).find(".warning-icons").length>0?$(this.el).find(".warning-icons").append(''):$(this.el).find("img").after(''))}.bind(this),b=function(){this.model.hasUnconfiguredDependencies()&&($(this.el).find(".warning-icons").length>0?$(this.el).find(".warning-icons").append(''):$(this.el).find("img").after(''))}.bind(this);this.model.getConfiguration(a),this.model.getDependencies(b)}.bind(this)),$(this.el)}})}(),function(){"use strict";var a={ERROR_SERVICE_DOWNLOAD_FAILED:{code:1752,message:"service download failed"}},b=templateEngine.createTemplate("applicationListView.ejs"),c=function(a){this.collection=a.collection},d=function(b){var c=this;if(b.error===!1)this.collection.fetch({success:function(){window.modalView.hide(),c.reload(),console.log(b),arangoHelper.arangoNotification("Services","Service "+b.name+" installed.")}});else{var d=b;switch(b.hasOwnProperty("responseJSON")&&(d=b.responseJSON),d.errorNum){case a.ERROR_SERVICE_DOWNLOAD_FAILED.code:arangoHelper.arangoError("Services","Unable to download application from the given repository.");break;default:arangoHelper.arangoError("Services",d.errorNum+". "+d.errorMessage)}}},e=function(){window.modalView.modalBindValidation({id:"new-app-mount",validateInput:function(){return[{rule:Joi.string().regex(/^(\/(APP[^\/]+|(?!APP)[a-zA-Z0-9_\-%]+))+$/i),msg:"May not contain /APP"},{rule:Joi.string().regex(/^(\/[a-zA-Z0-9_\-%]+)+$/),msg:"Can only contain [a-zA-Z0-9_-%]"},{rule:Joi.string().regex(/^\/([^_]|_open\/)/),msg:"Mountpoints with _ are reserved for internal use"},{rule:Joi.string().regex(/[^\/]$/),msg:"May not end with /"},{rule:Joi.string().regex(/^\//),msg:"Has to start with /"},{rule:Joi.string().required().min(2),msg:"Has to be non-empty"}]}})},f=function(){window.modalView.modalBindValidation({id:"repository",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z0-9_\-]+\/[a-zA-Z0-9_\-]+$/),msg:"No valid Github account and repository."}]}})},g=function(){window.modalView.modalBindValidation({id:"new-app-author",validateInput:function(){return[{rule:Joi.string().required().min(1),msg:"Has to be non empty."}]}}),window.modalView.modalBindValidation({id:"new-app-name",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z\-_][a-zA-Z0-9\-_]*$/),msg:"Can only contain a to z, A to Z, 0-9, '-' and '_'."}]}}),window.modalView.modalBindValidation({id:"new-app-description",validateInput:function(){return[{rule:Joi.string().required().min(1),msg:"Has to be non empty."}]}}),window.modalView.modalBindValidation({id:"new-app-license",validateInput:function(){return[{rule:Joi.string().required().regex(/^[a-zA-Z0-9 \.,;\-]+$/),msg:"Has to be non empty."}]}}),window.modalView.modalTestAll()},h=function(a){window.modalView.clearValidators();var b=$("#modalButton1");switch(this._upgrade||e(),a){case"newApp":b.html("Generate"),b.prop("disabled",!1),g();break;case"appstore":b.html("Install"),b.prop("disabled",!0);break;case"github":f(),b.html("Install"),b.prop("disabled",!1);break;case"zip":b.html("Install"),b.prop("disabled",!1)}b.prop("disabled")||window.modalView.modalTestAll()||b.prop("disabled",!0)},i=function(a){var b=$(a.currentTarget).attr("href").substr(1);h.call(this,b)},j=function(a){if(h.call(this,"appstore"),window.modalView.modalTestAll()){var b,c;this._upgrade?(b=this.mount,c=$("#new-app-teardown").prop("checked")):b=window.arangoHelper.escapeHtml($("#new-app-mount").val());var e=$(a.currentTarget).attr("appId"),f=$(a.currentTarget).attr("appVersion");void 0!==c?this.collection.installFromStore({name:e,version:f},b,d.bind(this),c):this.collection.installFromStore({name:e,version:f},b,d.bind(this)),window.modalView.hide(),arangoHelper.arangoNotification("Services","Installing "+e+".")}},k=function(a,b){if(void 0===b?b=this._uploadData:this._uploadData=b,b&&window.modalView.modalTestAll()){var c,e;this._upgrade?(c=this.mount,e=$("#new-app-teardown").prop("checked")):c=window.arangoHelper.escapeHtml($("#new-app-mount").val()),void 0!==e?this.collection.installFromZip(b.filename,c,d.bind(this),e):this.collection.installFromZip(b.filename,c,d.bind(this))}},l=function(){if(window.modalView.modalTestAll()){var a,b,c,e;this._upgrade?(c=this.mount,e=$("#new-app-teardown").prop("checked")):c=window.arangoHelper.escapeHtml($("#new-app-mount").val()),a=window.arangoHelper.escapeHtml($("#repository").val()),b=window.arangoHelper.escapeHtml($("#tag").val()),""===b&&(b="master");var f={url:window.arangoHelper.escapeHtml($("#repository").val()),version:window.arangoHelper.escapeHtml($("#tag").val())};try{Joi.assert(a,Joi.string().regex(/^[a-zA-Z0-9_\-]+\/[a-zA-Z0-9_\-]+$/))}catch(g){return}void 0!==e?this.collection.installFromGithub(f,c,d.bind(this),e):this.collection.installFromGithub(f,c,d.bind(this))}},m=function(){if(window.modalView.modalTestAll()){var a,b;this._upgrade?(a=this.mount,b=$("#new-app-teardown").prop("checked")):a=window.arangoHelper.escapeHtml($("#new-app-mount").val());var c={name:window.arangoHelper.escapeHtml($("#new-app-name").val()),documentCollections:_.map($("#new-app-document-collections").select2("data"),function(a){return window.arangoHelper.escapeHtml(a.text)}),edgeCollections:_.map($("#new-app-edge-collections").select2("data"),function(a){return window.arangoHelper.escapeHtml(a.text)}),author:window.arangoHelper.escapeHtml($("#new-app-author").val()),license:window.arangoHelper.escapeHtml($("#new-app-license").val()),description:window.arangoHelper.escapeHtml($("#new-app-description").val())};void 0!==b?this.collection.generate(c,a,d.bind(this),b):this.collection.generate(c,a,d.bind(this))}},n=function(){var a=$(".modal-body .tab-pane.active").attr("id");switch(a){case"newApp":m.apply(this);break;case"github":l.apply(this);break;case"zip":k.apply(this)}},o=function(a,c){var d=[],e={"click #infoTab a":i.bind(a),"click .install-app":j.bind(a)};d.push(window.modalView.createSuccessButton("Generate",n.bind(a))),window.modalView.show("modalApplicationMount.ejs","Install Service",d,c,void 0,void 0,e),$("#new-app-document-collections").select2({tags:[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px"}),$("#new-app-edge-collections").select2({tags:[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px"});var f=function(){var a=$("#modalButton1");a.prop("disabled")||window.modalView.modalTestAll()?a.prop("disabled",!1):a.prop("disabled",!0)};$(".select2-search-field input").focusout(function(){f(),window.setTimeout(function(){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||($("#s2id_new-app-document-collections").select2("close"),$("#s2id_new-app-edge-collections").select2("close"),f()))},200)}),$(".select2-search-field input").focusin(function(){if($(".select2-drop").is(":visible")){var a=$("#modalButton1");a.prop("disabled",!0)}}),$("#upload-foxx-zip").uploadFile({url:arangoHelper.databaseUrl("/_api/upload?multipart=true"),allowedTypes:"zip",multiple:!1,onSuccess:k.bind(a)}),$.get("foxxes/fishbowl",function(a){var c=$("#appstore-content");c.html(""),_.each(_.sortBy(a,"name"),function(a){c.append(b.render(a))})}).fail(function(){var a=$("#appstore-content");a.append("Store is not available. ArangoDB is not able to connect to github.com")})};c.prototype.install=function(a){this.reload=a,this._upgrade=!1,this._uploadData=void 0,delete this.mount,o(this,!1),window.modalView.clearValidators(),e(),g()},c.prototype.upgrade=function(a,b){this.reload=b,this._upgrade=!0,this._uploadData=void 0,this.mount=a,o(this,!0),window.modalView.clearValidators(),g()},window.FoxxInstallView=c}(),function(){"use strict";window.GraphManagementView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("graphManagementView.ejs"),edgeDefintionTemplate:templateEngine.createTemplate("edgeDefinitionTable.ejs"),eCollList:[],removedECollList:[],dropdownVisible:!1,initialize:function(a){this.options=a},events:{"click #deleteGraph":"deleteGraph","click .icon_arangodb_settings2.editGraph":"editGraph","click #createGraph":"addNewGraph","keyup #graphManagementSearchInput":"search","click #graphManagementSearchSubmit":"search","click .tile-graph":"redirectToGraphViewer","click #gv2":"redirectToGraphViewer2","click #graphManagementToggle":"toggleGraphDropdown","click .css-label":"checkBoxes","change #graphSortDesc":"sorting"},toggleTab:function(a){var b=a.currentTarget.id;b=b.replace("tab-",""),$("#tab-content-create-graph .tab-pane").removeClass("active"),$("#tab-content-create-graph #"+b).addClass("active"),"exampleGraphs"===b?$("#modal-dialog .modal-footer .button-success").css("display","none"):$("#modal-dialog .modal-footer .button-success").css("display","initial")},redirectToGraphViewer:function(a){var b=$(a.currentTarget).attr("id");b=b.substr(0,b.length-5),window.location.hash=window.location.hash.substr(0,window.location.hash.length-1)+"2/"+encodeURIComponent(b)},redirectToGraphViewer2:function(a){a.preventDefault();var b=$(a.currentTarget).parent().parent().attr("id");b=b.substr(0,b.length-5),console.log(b),window.App.navigate("graph2/"+encodeURIComponent(b),{trigger:!0})},loadGraphViewer:function(a,b){var c=function(b){if(b)arangoHelper.arangoError("","");else{var c=this.collection.get(a).get("edgeDefinitions");if(!c||0===c.length)return;var d={type:"gharial",graphName:a,baseUrl:arangoHelper.databaseUrl("/")},e=$("#content").width()-75;$("#content").html("");var f=arangoHelper.calculateCenterDivHeight();this.ui=new GraphViewerUI($("#content")[0],d,e,$(".centralRow").height()-135,{nodeShaper:{label:"_key",color:{type:"attribute",key:"_key"}}},!0),$(".contentDiv").height(f)}}.bind(this);b?this.collection.fetch({cache:!1,success:function(){c()}}):c()},handleResize:function(a){this.width&&this.width===a||(this.width=a,this.ui&&this.ui.changeWidth(a))},addNewGraph:function(a){a.preventDefault(),this.createEditGraphModal()},deleteGraph:function(){var a=this,b=$("#editGraphName")[0].value;if($("#dropGraphCollections").is(":checked")){var c=function(c){c?(a.collection.remove(a.collection.get(b)),a.updateGraphManagementView(),window.modalView.hide()):(window.modalView.hide(),arangoHelper.arangoError("Graph","Could not delete Graph."))};this.collection.dropAndDeleteGraph(b,c)}else this.collection.get(b).destroy({success:function(){a.updateGraphManagementView(),window.modalView.hide()},error:function(a,b){var c=JSON.parse(b.responseText),d=c.errorMessage;arangoHelper.arangoError(d),window.modalView.hide()}})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},toggleGraphDropdown:function(){$("#graphSortDesc").attr("checked",this.collection.sortOptions.desc),$("#graphManagementToggle").toggleClass("activated"),$("#graphManagementDropdown2").slideToggle(200)},sorting:function(){$("#graphSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#graphManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},createExampleGraphs:function(a){var b=$(a.currentTarget).attr("graph-id"),c=this;$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_admin/aardvark/graph-examples/create/"+encodeURIComponent(b)),success:function(){window.modalView.hide(),c.updateGraphManagementView(),arangoHelper.arangoNotification("Example Graphs","Graph: "+b+" created.")},error:function(a){if(window.modalView.hide(),a.responseText)try{var c=JSON.parse(a.responseText);arangoHelper.arangoError("Example Graphs",c.errorMessage)}catch(d){arangoHelper.arangoError("Example Graphs","Could not create example graph: "+b)}else arangoHelper.arangoError("Example Graphs","Could not create example graph: "+b)}})},render:function(a,b){var c=this;return this.collection.fetch({cache:!1,success:function(){c.collection.sort(),$(c.el).html(c.template.render({graphs:c.collection,searchString:""})),c.dropdownVisible===!0&&($("#graphManagementDropdown2").show(),$("#graphSortDesc").attr("checked",c.collection.sortOptions.desc),$("#graphManagementToggle").toggleClass("activated"),$("#graphManagementDropdown").show()),c.events["click .tableRow"]=c.showHideDefinition.bind(c),c.events['change tr[id*="newEdgeDefinitions"]']=c.setFromAndTo.bind(c),c.events["click .graphViewer-icon-button"]=c.addRemoveDefinition.bind(c),c.events["click #graphTab a"]=c.toggleTab.bind(c),c.events["click .createExampleGraphs"]=c.createExampleGraphs.bind(c),c.events["focusout .select2-search-field input"]=function(a){$(".select2-drop").is(":visible")&&($("#select2-search-field input").is(":focus")||window.setTimeout(function(){$(a.currentTarget).parent().parent().parent().select2("close")},200))},arangoHelper.setCheckboxStatus("#graphManagementDropdown")}}),a&&this.loadGraphViewer(a,b),this},setFromAndTo:function(a){a.stopPropagation();var b,c=this.calculateEdgeDefinitionMap();if(a.added){if(-1===this.eCollList.indexOf(a.added.id)&&-1!==this.removedECollList.indexOf(a.added.id))return b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$('input[id*="newEdgeDefinitions'+b+'"]').select2("val",null),void $('input[id*="newEdgeDefinitions'+b+'"]').attr("placeholder","The collection "+a.added.id+" is already used.");this.removedECollList.push(a.added.id),this.eCollList.splice(this.eCollList.indexOf(a.added.id),1)}else this.eCollList.push(a.removed.id),this.removedECollList.splice(this.removedECollList.indexOf(a.removed.id),1);c[a.val]?(b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$("#s2id_fromCollections"+b).select2("val",c[a.val].from),$("#fromCollections"+b).attr("disabled",!0),$("#s2id_toCollections"+b).select2("val",c[a.val].to),$("#toCollections"+b).attr("disabled",!0)):(b=a.currentTarget.id.split("row_newEdgeDefinitions")[1],$("#s2id_fromCollections"+b).select2("val",null),$("#fromCollections"+b).attr("disabled",!1),$("#s2id_toCollections"+b).select2("val",null),$("#toCollections"+b).attr("disabled",!1))},editGraph:function(a){a.stopPropagation(),this.collection.fetch({cache:!1}),this.graphToEdit=this.evaluateGraphName($(a.currentTarget).attr("id"),"_settings");var b=this.collection.findWhere({_key:this.graphToEdit});this.createEditGraphModal(b)},saveEditedGraph:function(){var a,b,c,d,e,f=$("#editGraphName")[0].value,g=_.pluck($("#newVertexCollections").select2("data"),"text"),h=[],i={};if(e=$("[id^=s2id_newEdgeDefinitions]").toArray(),e.forEach(function(e){if(d=$(e).attr("id"),d=d.replace("s2id_newEdgeDefinitions",""),a=_.pluck($("#s2id_newEdgeDefinitions"+d).select2("data"),"text")[0],a&&""!==a&&(b=_.pluck($("#s2id_fromCollections"+d).select2("data"),"text"),c=_.pluck($("#s2id_toCollections"+d).select2("data"),"text"),0!==b.length&&0!==c.length)){var f={collection:a,from:b,to:c};h.push(f),i[a]=f}}),0===h.length)return $("#s2id_newEdgeDefinitions0 .select2-choices").css("border-color","red"),$("#s2id_newEdgeDefinitions0").parent().parent().next().find(".select2-choices").css("border-color","red"),void $("#s2id_newEdgeDefinitions0").parent().parent().next().next().find(".select2-choices").css("border-color","red");var j=this.collection.findWhere({_key:f}),k=j.get("edgeDefinitions"),l=j.get("orphanCollections"),m=[];l.forEach(function(a){-1===g.indexOf(a)&&j.deleteVertexCollection(a)}),g.forEach(function(a){-1===l.indexOf(a)&&j.addVertexCollection(a)});var n=[],o=[],p=[];k.forEach(function(a){var b=a.collection;m.push(b);var c=i[b];void 0===c?p.push(b):JSON.stringify(c)!==JSON.stringify(a)&&o.push(b)}),h.forEach(function(a){var b=a.collection;-1===m.indexOf(b)&&n.push(b)}),n.forEach(function(a){j.addEdgeDefinition(i[a])}),o.forEach(function(a){j.modifyEdgeDefinition(i[a])}),p.forEach(function(a){j.deleteEdgeDefinition(a)}),this.updateGraphManagementView(),window.modalView.hide()},evaluateGraphName:function(a,b){var c=a.lastIndexOf(b);return a.substring(0,c)},search:function(){var a,b,c,d;a=$("#graphManagementSearchInput"),b=$("#graphManagementSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("_key").indexOf(b)}),$(this.el).html(this.template.render({graphs:d,searchString:b})),a=$("#graphManagementSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},updateGraphManagementView:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},createNewGraph:function(){var a,b,c,d,e,f=$("#createNewGraphName").val(),g=_.pluck($("#newVertexCollections").select2("data"),"text"),h=[],i=this;return f?this.collection.findWhere({_key:f})?(arangoHelper.arangoError("The graph '"+f+"' already exists."),0):(e=$("[id^=s2id_newEdgeDefinitions]").toArray(),e.forEach(function(e){d=$(e).attr("id"),d=d.replace("s2id_newEdgeDefinitions",""),a=_.pluck($("#s2id_newEdgeDefinitions"+d).select2("data"),"text")[0],a&&""!==a&&(b=_.pluck($("#s2id_fromCollections"+d).select2("data"),"text"),c=_.pluck($("#s2id_toCollections"+d).select2("data"),"text"),1!==b&&1!==c&&h.push({collection:a,from:b,to:c}))}),0===h.length?($("#s2id_newEdgeDefinitions0 .select2-choices").css("border-color","red"),$("#s2id_newEdgeDefinitions0").parent().parent().next().find(".select2-choices").css("border-color","red"),void $("#s2id_newEdgeDefinitions0").parent().parent().next().next().find(".select2-choices").css("border-color","red")):void this.collection.create({name:f,edgeDefinitions:h,orphanCollections:g},{success:function(){i.updateGraphManagementView(),window.modalView.hide()},error:function(a,b){var c=JSON.parse(b.responseText),d=c.errorMessage;d=d.replace("<",""),d=d.replace(">",""),arangoHelper.arangoError(d)}})):(arangoHelper.arangoError("A name for the graph has to be provided."),0)},createEditGraphModal:function(a){var b,c=[],d=[],e=[],f=this.options.collectionCollection.models,g=this,h="",i=[{collection:"",from:"",to:""}],j="",k=function(a,b){return a=a.toLowerCase(),b=b.toLowerCase(),b>a?-1:a>b?1:0};if(this.eCollList=[],this.removedECollList=[],f.forEach(function(a){a.get("isSystem")||("edge"===a.get("type")?g.eCollList.push(a.id):d.push(a.id))}),window.modalView.enableHotKeys=!1,this.counter=0,a?(b="Edit Graph",h=a.get("_key"),i=a.get("edgeDefinitions"),i&&0!==i.length||(i=[{collection:"",from:"",to:""}]),j=a.get("orphanCollections"),e.push(window.modalView.createReadOnlyEntry("editGraphName","Name",h,"The name to identify the graph. Has to be unique")),c.push(window.modalView.createDeleteButton("Delete",this.deleteGraph.bind(this))),c.push(window.modalView.createSuccessButton("Save",this.saveEditedGraph.bind(this)))):(b="Create Graph",e.push(window.modalView.createTextEntry("createNewGraphName","Name","","The name to identify the graph. Has to be unique.","graphName",!0)),c.push(window.modalView.createSuccessButton("Create",this.createNewGraph.bind(this)))),i.forEach(function(a){0===g.counter?(a.collection&&(g.removedECollList.push(a.collection),g.eCollList.splice(g.eCollList.indexOf(a.collection),1)),e.push(window.modalView.createSelect2Entry("newEdgeDefinitions"+g.counter,"Edge definitions",a.collection,"An edge definition defines a relation of the graph","Edge definitions",!0,!1,!0,1,g.eCollList.sort(k)))):e.push(window.modalView.createSelect2Entry("newEdgeDefinitions"+g.counter,"Edge definitions",a.collection,"An edge definition defines a relation of the graph","Edge definitions",!1,!0,!1,1,g.eCollList.sort(k))),e.push(window.modalView.createSelect2Entry("fromCollections"+g.counter,"fromCollections",a.from,"The collections that contain the start vertices of the relation.","fromCollections",!0,!1,!1,10,d.sort(k))),e.push(window.modalView.createSelect2Entry("toCollections"+g.counter,"toCollections",a.to,"The collections that contain the end vertices of the relation.","toCollections",!0,!1,!1,10,d.sort(k))),g.counter++}),e.push(window.modalView.createSelect2Entry("newVertexCollections","Vertex collections",j,"Collections that are part of a graph but not used in an edge definition","Vertex Collections",!1,!1,!1,10,d.sort(k))),window.modalView.show("modalGraphTable.ejs",b,c,e,void 0,void 0,this.events),a){$(".modal-body table").css("border-collapse","separate");var l;for($(".modal-body .spacer").remove(),l=0;l<=this.counter;l++)$("#row_fromCollections"+l).show(),$("#row_toCollections"+l).show(),$("#row_newEdgeDefinitions"+l).addClass("first"),$("#row_fromCollections"+l).addClass("middle"),$("#row_toCollections"+l).addClass("last"),$("#row_toCollections"+l).after('');$("#graphTab").hide(),$("#modal-dialog .modal-delete-confirmation").append('
    ')}},showHideDefinition:function(a){},addRemoveDefinition:function(a){var b=[],c=this.options.collectionCollection.models;c.forEach(function(a){a.get("isSystem")||b.push(a.id)}),a.stopPropagation();var d,e=$(a.currentTarget).attr("id");if(-1===e.indexOf("addAfter_newEdgeDefinitions"))-1!==e.indexOf("remove_newEdgeDefinitions")&&(d=e.split("remove_newEdgeDefinitions")[1],$("#row_newEdgeDefinitions"+d).remove(),$("#row_fromCollections"+d).remove(),$("#row_toCollections"+d).remove(),$("#spacer"+d).remove());else{this.counter++,$("#row_newVertexCollections").before(this.edgeDefintionTemplate.render({number:this.counter})),$("#newEdgeDefinitions"+this.counter).select2({tags:this.eCollList,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:1}),$("#fromCollections"+this.counter).select2({tags:b,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:10}),$("#toCollections"+this.counter).select2({tags:b,showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:10}),window.modalView.undelegateEvents(),window.modalView.delegateEvents(this.events);var f;for($(".modal-body .spacer").remove(),f=0;f<=this.counter;f++)$("#row_fromCollections"+f).show(),$("#row_toCollections"+f).show(),$("#row_newEdgeDefinitions"+f).addClass("first"),$("#row_fromCollections"+f).addClass("middle"),$("#row_toCollections"+f).addClass("last"),$("#row_toCollections"+f).after('')}},calculateEdgeDefinitionMap:function(){var a={};return this.collection.models.forEach(function(b){b.get("edgeDefinitions").forEach(function(b){a[b.collection]={from:b.from,to:b.to}})}),a}})}(),function(){"use strict";window.GraphSettingsView=Backbone.View.extend({el:"#graphSettingsContent",remove:function(){return this.$el.empty().off(),this.stopListening(),this},general:{graph:{type:"divider",name:"Graph"},nodeStart:{type:"string",name:"Starting node",desc:"A valid node id. If empty, a random node will be chosen.",value:2},layout:{type:"select",name:"Layout algorithm",desc:"Different graph algorithms. No overlap is very fast, force is slower and fruchtermann is the slowest. The calculation time strongly depends on your nodes and edges counts.",noverlap:{name:"No overlap",val:"noverlap"},force:{name:"Force",val:"force"},fruchtermann:{name:"Fruchtermann",val:"fruchtermann"}},renderer:{type:"select",name:"Renderer",desc:"Canvas enables editing, WebGL is only for displaying a graph but much faster.",canvas:{name:"Canvas",val:"canvas"},webgl:{name:"WebGL",val:"webgl"}},depth:{desc:"Search depth, starting from your start node.",type:"number",name:"Search depth",value:2}},specific:{nodes:{type:"divider",name:"Nodes"},nodeLabel:{type:"string",name:"Label",desc:"Node label. Please choose a valid and available node attribute.","default":"_key"},nodeLabelByCollection:{type:"select",name:"Label by coll?",desc:"Set label text by collection. If activated node label attribute will be ignored.",yes:{name:"Yes",val:"true"},no:{name:"No",val:"false"}},nodeLabelThreshold:{type:"range",name:"Label threshold",desc:"The minimum size a node must have on screen to see its label displayed. This does not affect hovering behavior.","default":"_key"},nodeColor:{type:"color",name:"Color",desc:"Default node color. RGB or HEX value.","default":"#2ecc71"},nodeColorAttribute:{type:"string",name:"Colorize attr",desc:"If an attribute is given, nodes will then be colorized by the attribute. This setting ignores default node color if set."},nodeColorByCollection:{type:"select",name:"Colorize by coll?",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should nodes be colorized by their collection? If enabled, node color and node color attribute will be ignored."},nodeSize:{type:"string",name:"Sizing attribute",desc:"Default node size. Numeric value > 0."},edges:{type:"divider",name:"Edges"},edgeLabel:{type:"string",name:"Label",desc:"Default edge label."},edgeLabelByCollection:{type:"select",name:"Label by coll?",desc:"Set label text by collection. If activated edge label attribute will be ignored.",yes:{name:"Yes",val:"true"},no:{name:"No",val:"false"}},edgeLabelThreshold:{type:"range",name:"Label threshold",desc:"The minimum size an edge must have on screen to see its label displayed. This does not affect hovering behavior.","default":"_key"},edgeColor:{type:"color",name:"Color",desc:"Default edge color. RGB or HEX value.","default":"#cccccc"},edgeColorAttribute:{type:"string",name:"Colorize attr",desc:"If an attribute is given, edges will then be colorized by the attribute. This setting ignores default edge color if set." +},edgeColorByCollection:{type:"select",name:"Colorize by coll?",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should edges be colorized by their collection? If enabled, edge color and edge color attribute will be ignored."},edgeEditable:{type:"select",name:"Editable",no:{name:"No",val:"false"},yes:{name:"Yes",val:"true"},desc:"Should edges be editable?"},edgeType:{type:"select",name:"Type",desc:"The type of the edge",line:{name:"Line",val:"line"},arrow:{name:"Arrow",val:"arrow"},curve:{name:"Curve",val:"curve"},dotted:{name:"Dotted",val:"dotted"},dashed:{name:"Dashed",val:"dashed"},tapered:{name:"Tapered",val:"tapered"}}},template:templateEngine.createTemplate("graphSettingsView.ejs"),initialize:function(a){this.name=a.name,this.userConfig=a.userConfig,this.saveCallback=a.saveCallback},events:{"click #saveGraphSettings":"saveGraphSettings","click #restoreGraphSettings":"setDefaults","keyup #graphSettingsView input":"checkEnterKey","keyup #graphSettingsView select":"checkEnterKey",'change input[type="range"]':"saveGraphSettings",'change input[type="color"]':"checkColor","change select":"saveGraphSettings","focus #graphSettingsView input":"lastFocus","focus #graphSettingsView select":"lastFocus"},lastFocus:function(a){this.lastFocussed=a.currentTarget.id},checkEnterKey:function(a){13===a.keyCode&&this.saveGraphSettings()},getGraphSettings:function(a){var b=this,c=window.App.currentDB.toJSON().name+"_"+this.name;this.userConfig.fetch({success:function(d){b.graphConfig=d.toJSON().graphs[c],a&&b.continueRender()}})},checkColor:function(){this.saveGraphSettings(null,!0)},saveGraphSettings:function(a,b,c,d){var e=this,f=window.App.currentDB.toJSON().name+"_"+this.name,g={};if(d)g[f]=d;else{var h,i={};$("#graphSettingsView select").each(function(a,b){h=b.id,i[h.substr(2,b.id.length)]=$(b).val()}),$("#graphSettingsView input").each(function(a,b){h=b.id,i[h.substr(2,b.id.length)]=$(b).val()}),g[f]=i}c&&(g[f].nodeStart=c);var j=function(){window.App.graphViewer2?""!==b&&void 0!==b?window.App.graphViewer2.updateColors():window.App.graphViewer2.render(e.lastFocussed):arangoHelper.arangoNotification("Graph "+this.name,"Configuration saved.")}.bind(this);this.userConfig.setItem("graphs",g,j)},setDefaults:function(){var a={layout:"force",renderer:"canvas",depth:"2",nodeColor:"#2ecc71",nodeColorAttribute:"",nodeColorByCollection:"false",nodeLabelThreshold:10,edgeColor:"#cccccc",edgeColorAttribute:"",edgeColorByCollection:"false",edgeLabelThreshold:10,nodeLabel:"_key",edgeLabel:"",edgeType:"line",nodeSize:"",edgeEditable:"false",nodeLabelByCollection:"true",edgeLabelByCollection:"true",nodeStart:""};this.saveGraphSettings(null,null,null,a),this.render(),window.App.graphViewer2.render(this.lastFocussed)},toggle:function(){$(this.el).is(":visible")?this.hide():this.show()},show:function(){$(this.el).show("slide",{direction:"right"},250)},hide:function(){$(this.el).hide("slide",{direction:"right"},250)},render:function(){this.getGraphSettings(!0)},continueRender:function(){$(this.el).html(this.template.render({general:this.general,specific:this.specific})),arangoHelper.fixTooltips(".gv-tooltips","top"),this.graphConfig?(_.each(this.graphConfig,function(a,b){$("#g_"+b).val(a)}),$("#g_nodeLabelThreshold_label").text(this.graphConfig.nodeLabelThreshold),$("#g_edgeLabelThreshold_label").text(this.graphConfig.edgeLabelThreshold)):this.setDefaults()}})}(),function(){"use strict";window.GraphViewer2=Backbone.View.extend({el:"#content",remove:function(){return this.$el.empty().off(),this.stopListening(),this},template:templateEngine.createTemplate("graphViewer2.ejs"),initialize:function(a){var b=this;a.id&&(this.setElement(a.id),this.graphData=a.data,this.aqlMode=!0),this.name=a.name,this.userConfig=a.userConfig,this.documentStore=a.documentStore,this.initSigma(),void 0!==this.name&&this.collection.fetch({cache:!1,success:function(c){b.model=b.collection.findWhere({_key:a.name}).toJSON()}})},colors:{hotaru:["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],random1:["#292F36","#4ECDC4","#F7FFF7","#DD6363","#FFE66D"]},selectedNodes:{},aqlMode:!1,events:{"click #downloadPNG":"downloadSVG","click #reloadGraph":"reloadGraph","click #settingsMenu":"toggleSettings","click #noGraphToggle":"toggleSettings","click #toggleForce":"toggleLayout","click #selectNodes":"toggleLasso"},cursorX:0,cursorY:0,layouting:!1,model:null,viewStates:{captureMode:!1},graphConfig:null,graphSettings:null,initSigma:function(){try{sigma.classes.graph.addMethod("neighbors",function(a){var b,c={},d=this.allNeighborsIndex[a]||{};for(b in d)c[b]=this.nodesIndex[b];return c}),sigma.classes.graph.addMethod("getNodeEdges",function(a){var b=this.edges(),c=[];return _.each(b,function(b){b.source!==a&&b.target!==a||c.push(b.id)}),c})}catch(a){}},downloadSVG:function(){var a=parseInt($("#graph-container").width(),10);sigma.plugins.image(this.currentGraph,this.currentGraph.renderers[0],{download:!0,size:a,background:"white",zoom:!0})},resize:function(){$("#graph-container").width($(".centralContent").width()),$("#graph-container").height($(".centralRow").height()-150)},toggleSettings:function(){this.graphSettingsView.toggle()},render:function(a){this.$el.html(this.template.render({})),$("#subNavigationBar .breadcrumb").html("Graph: "+this.name),this.resize(),this.fetchGraph(a)},renderAQL:function(a){this.$el.html(this.template.render({})),this.$el.find(".headerBar").remove();var b=$(".centralRow").height()-250;this.$el.find("#graph-container").css("height",b),this.graphData.modified=this.parseData(this.graphData.original,this.graphData.graphInfo),this.renderGraph(this.graphData.modified)},parseData:function(a,b){var c={},d={},e={nodes:[],edges:[],settings:{}};return"object"===b?(_.each(a,function(a){a.edges&&a.vertices&&(_.each(a.edges,function(a){d[a._id]={id:a._id,source:a._from,label:a._key,color:"#cccccc",target:a._to}}),_.each(a.vertices,function(a){c[a._id]={id:a._id,label:a._key,size:.3,color:"#2ecc71",x:Math.random(),y:Math.random()}}))}),_.each(c,function(a){e.nodes.push(a)}),_.each(d,function(a){e.edges.push(a)})):"array"===b&&(_.each(a,function(a){c[a._from]=null,c[a._to]=null,e.edges.push({id:a._id,source:a._from,label:a._key,color:"#cccccc",target:a._to})}),_.each(c,function(a,b){e.nodes.push({id:b,label:b,size:.3,color:"#2ecc71",x:Math.random(),y:Math.random()})})),e},rerender:function(){this.fetchGraph()},fetchGraph:function(a){var b=this;$(this.el).append('
    Fetching graph data. Please wait ...


    If it`s taking too much time to draw the graph, please go to:
    '+window.location.href+"/settings
    and adjust your settings.It is possible that the graph is too big to be handled by the browser.
    ");var c=function(){var c={};this.graphConfig&&(c=_.clone(this.graphConfig),delete c.layout,delete c.edgeType,delete c.renderer),this.setupSigma(),$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_admin/aardvark/graph/"+encodeURIComponent(this.name)),contentType:"application/json",data:c,success:function(c){$("#calcText").html("Calculating layout. Please wait ... "),b.renderGraph(c,a)},error:function(a){try{arangoHelper.arangoError("Graph",a.responseJSON.exception);var c=a.responseJSON.exception.search("1205");if(-1!==c){var d='Starting point: '+b.graphConfig.nodeStart+" is invalid";$("#calculatingGraph").html('
    Stopped.

    '+d+'. Please choose a different start node.
    ')}else $("#calculatingGraph").html("Failed to fetch graph information.")}catch(e){}}})}.bind(this);this.getGraphSettings(c)},setupSigma:function(){if(this.graphConfig&&this.graphConfig.edgeLabel){sigma.utils.pkg("sigma.settings");var a={defaultEdgeLabelColor:"#000",defaultEdgeLabelActiveColor:"#000",defaultEdgeLabelSize:10,edgeLabelSize:"fixed",edgeLabelSizePowRatio:1,edgeLabelThreshold:1};sigma.settings=sigma.utils.extend(sigma.settings||{},a),sigma.settings.drawEdgeLabels=!0}},contextState:{createEdge:!1,_from:!1,_to:!1,fromX:!1,fromY:!1},clearOldContextMenu:function(a){var b=this;$("#nodeContextMenu").remove();var c='
    ';$("#graph-container").append(c),a&&_.each(this.contextState,function(a,c){b.contextState[c]=!1});var d=document.getElementsByClassName("sigma-mouse")[0];d.removeEventListener("mousemove",b.drawLine.bind(this),!1)},trackCursorPosition:function(a){this.cursorX=a.x,this.cursorY=a.y},deleteNode:function(a,b){var c,d,e,f=this;if(c=b?b:$("#delete-node-attr-id").text(),d=c.split("/")[0],e=c.split("/")[1],"yes"===$("#delete-node-edges-attr").val())$.ajax({cache:!1,type:"DELETE",contentType:"application/json",url:arangoHelper.databaseUrl("/_api/gharial/"+encodeURIComponent(f.name)+"/vertex/"+encodeURIComponent(c.split("/")[0])+"/"+encodeURIComponent(c.split("/")[1])),success:function(a){f.currentGraph.graph.dropNode(c),f.currentGraph.refresh()},error:function(){arangoHelper.arangoError("Graph","Could not delete node.")}});else{var g=function(a){a?arangoHelper.arangoError("Graph","Could not delete node."):(f.currentGraph.graph.dropNode(c),f.currentGraph.refresh())};this.documentStore.deleteDocument(d,e,g)}window.modalView.hide()},deleteNodes:function(){var a=this;try{var b=JSON.parse($("#delete-nodes-arr-id").text());_.each(b,function(b){a.deleteNode(null,b)})}catch(c){}},deleteNodesModal:function(){var a=[];_.each(this.selectedNodes,function(b){a.push(b)});var b=[],c=[];c.push(window.modalView.createReadOnlyEntry("delete-nodes-arr-id","Really delete nodes",JSON.stringify(a))),b.push(window.modalView.createDeleteButton("Delete",this.deleteNodes.bind(this))),window.modalView.show("modalTable.ejs","Delete nodes",b,c)},deleteNodeModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry("delete-node-attr-id","Really delete node",a)),c.push(window.modalView.createSelectEntry("delete-node-edges-attr","Also delete edges?",void 0,void 0,[{value:"yes",label:"Yes"},{value:"no",label:"No"}])),b.push(window.modalView.createDeleteButton("Delete",this.deleteNode.bind(this))),window.modalView.show("modalTable.ejs","Delete node",b,c)},addNode:function(){var a=this,b=a.addNodeX/100,c=a.addNodeY/100,d=$(".modal-body #new-node-collection-attr").val(),e=$(".modal-body #new-node-key-attr").last().val(),f=function(d,e,f){d?arangoHelper.arangoError("Could not create node",f.errorMessage):(a.currentGraph.graph.addNode({id:e,label:e.split("/")[1]||"",size:a.graphConfig.nodeSize||Math.random(),color:a.graphConfig.nodeColor||"#2ecc71",x:b,y:c}),window.modalView.hide(),a.currentGraph.refresh())};""!==e||void 0!==e?this.documentStore.createTypeDocument(d,e,f):this.documentStore.createTypeDocument(d,null,f)},deleteEdgeModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry("delete-edge-attr-id","Really delete edge",a)),b.push(window.modalView.createDeleteButton("Delete",this.deleteEdge.bind(this))),window.modalView.show("modalTable.ejs","Delete edge",b,c)},deleteEdge:function(){var a=this,b=$("#delete-edge-attr-id").text(),c=b.split("/")[0],d=b.split("/")[1],e=function(c){c?arangoHelper.arangoError("Graph","Could not delete edge."):(a.currentGraph.graph.dropEdge(b),a.currentGraph.refresh())};this.documentStore.deleteDocument(c,d,e),window.modalView.hide()},addNodeModal:function(){if(0!==this.graphSettings.vertexCollections){var a=[],b=[],c=[];_.each(this.graphSettings.vertexCollections,function(a){c.push({label:a.name,value:a.id})}),b.push(window.modalView.createTextEntry("new-node-key-attr","_key",void 0,"The nodes unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),b.push(window.modalView.createSelectEntry("new-node-collection-attr","Collection",void 0,"Please select the destination for the new node.",c)),a.push(window.modalView.createSuccessButton("Create",this.addNode.bind(this))),window.modalView.show("modalTable.ejs","Create node",a,b)}else arangoHelper.arangoError("Graph","No valid vertex collections found.")},addEdge:function(){var a,b=this,c=b.contextState._from,d=b.contextState._to;a=""===$(".modal-body #new-edge-collection-attr").val()?$(".modal-body #new-edge-collection-attr").text():$(".modal-body #new-edge-collection-attr").val();var e=$(".modal-body #new-edge-key-attr").last().val(),f=function(a,e){a?arangoHelper.arangoError("Graph","Could not create edge."):("true"===b.graphConfig.edgeEditable?b.currentGraph.graph.addEdge({source:c,size:1,target:d,id:e._id,color:b.graphConfig.edgeColor}):b.currentGraph.graph.addEdge({source:c,target:d,id:e._id,color:b.graphConfig.edgeColor}),b.graphConfig&&"curve"===b.graphConfig.edgeType&&sigma.canvas.edges.autoCurve(b.currentGraph),b.currentGraph.refresh()),b.clearOldContextMenu(!0),window.modalView.hide()};""!==e||void 0!==e?this.documentStore.createTypeEdge(a,c,d,e,f):this.documentStore.createTypeEdge(a,c,d,null,f)},addEdgeModal:function(a){if(0!==a){var b=[],c=[];if(c.push(window.modalView.createTextEntry("new-edge-key-attr","_key",void 0,"The edges unique key(optional attribute, leave empty for autogenerated key","is optional: leave empty for autogenerated key",!1,[{rule:Joi.string().allow("").optional(),msg:""}])),a.length>1){var d=[];_.each(a,function(a){d.push({label:a,value:a})}),c.push(window.modalView.createSelectEntry("new-edge-collection-attr","Edge collection",void 0,"Please select the destination for the new edge.",d))}else c.push(window.modalView.createReadOnlyEntry("new-edge-collection-attr","Edge collection",a[0],"The edges collection to be used."));b.push(window.modalView.createSuccessButton("Create",this.addEdge.bind(this))),window.modalView.show("modalTable.ejs","Create edge",b,c)}else arangoHelper.arangoError("Graph","No valid edge definitions found.")},updateColors:function(){var a=window.App.currentDB.toJSON().name+"_"+this.name,b=this;this.userConfig.fetch({success:function(c){b.graphConfig=c.toJSON().graphs[a],b.currentGraph.graph.nodes().forEach(function(a){a.color=b.graphConfig.nodeColor}),b.currentGraph.graph.edges().forEach(function(a){a.color=b.graphConfig.edgeColor}),b.currentGraph.refresh()}})},createNodesContextMenu:function(a){var b=this;if(3===a.which){var c=a.clientX-50,d=a.clientY-50;this.clearOldContextMenu();var e=function(a){var c=wheelnav,d=new c("nodeContextMenu");d.maxPercent=1,d.wheelRadius=50,d.clockwise=!1,d.colors=b.colors.hotaru,d.multiSelect=!0,d.clickModeRotate=!1,d.slicePathFunction=slicePath().DonutSlice,b.viewStates.captureMode?d.createWheel([icon.plus,icon.trash]):d.createWheel([icon.trash,icon.arrowleft2]),d.navItems[0].selected=!1,d.navItems[0].hovered=!1,d.navItems[0].navigateFunction=function(a){b.clearOldContextMenu(),b.deleteNodesModal()},d.navItems[1].navigateFunction=function(a){b.clearOldContextMenu()},d.navItems[0].selected=!1,d.navItems[0].hovered=!1};$("#nodeContextMenu").css("position","fixed"),$("#nodeContextMenu").css("left",c),$("#nodeContextMenu").css("top",d),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),e(a)}else b.clearOldContextMenu()},createContextMenu:function(a){var b=this,c=b.cursorX-50,d=b.cursorY-50;this.clearOldContextMenu();var e=function(a){var c=wheelnav,d=new c("nodeContextMenu");d.maxPercent=1,d.wheelRadius=50,d.clockwise=!1,d.colors=b.colors.hotaru,d.multiSelect=!0,d.clickModeRotate=!1,d.slicePathFunction=slicePath().DonutSlice,d.createWheel([icon.plus,icon.arrowleft2]),d.navItems[0].selected=!1,d.navItems[0].hovered=!1,d.navItems[0].navigateFunction=function(a){b.clearOldContextMenu(),b.addNodeModal()},d.navItems[1].navigateFunction=function(a){b.clearOldContextMenu()},d.navItems[0].selected=!1,d.navItems[0].hovered=!1};$("#nodeContextMenu").css("position","fixed"),$("#nodeContextMenu").css("left",c),$("#nodeContextMenu").css("top",d),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),e(a)},createEdgeContextMenu:function(a,b){var c=this,d=this.cursorX-165,e=this.cursorY-120;this.clearOldContextMenu();var f=function(a,b){var d=["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],e=wheelnav,f=new e("nodeContextMenu");f.maxPercent=1,f.wheelRadius=50,f.clockwise=!1,f.colors=d,f.multiSelect=!0,f.clickModeRotate=!1,f.slicePathFunction=slicePath().DonutSlice,f.createWheel([icon.edit,icon.trash]),f.navItems[0].selected=!1,f.navItems[0].hovered=!1,f.navItems[0].navigateFunction=function(a){c.clearOldContextMenu(),c.editEdge(b)},f.navItems[1].navigateFunction=function(a){c.clearOldContextMenu(),c.deleteEdgeModal(b)},f.navItems[0].selected=!1,f.navItems[0].hovered=!1};$("#nodeContextMenu").css("left",d+115),$("#nodeContextMenu").css("top",e+72),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),f(b,a)},createNodeContextMenu:function(a,b){var c,d,e=this;_.each(b.data.node,function(a,b){"renderer"===b.substr(0,8)&&"x"===b.charAt(b.length-1)&&(c=a),"renderer"===b.substr(0,8)&&"y"===b.charAt(b.length-1)&&(d=a)}),this.clearOldContextMenu();var f=function(a,b){var f=["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"],g=wheelnav,h=new g("nodeContextMenu");h.maxPercent=1,h.wheelRadius=50,h.clockwise=!1,h.colors=f,h.multiSelect=!0,h.clickModeRotate=!1,h.slicePathFunction=slicePath().DonutSlice,h.createWheel([icon.edit,icon.trash,icon.play,icon.connect]),h.navItems[0].selected=!1,h.navItems[0].hovered=!1,h.navItems[0].navigateFunction=function(a){e.clearOldContextMenu(),e.editNode(b)},h.navItems[1].navigateFunction=function(a){e.clearOldContextMenu(),e.deleteNodeModal(b)},h.navItems[2].navigateFunction=function(a){e.clearOldContextMenu(),e.setStartNode(b)},h.navItems[3].navigateFunction=function(a){e.contextState.createEdge=!0,e.contextState._from=b,e.contextState.fromX=c,e.contextState.fromY=d;var f=document.getElementsByClassName("sigma-mouse")[0];f.addEventListener("mousemove",e.drawLine.bind(this),!1),e.clearOldContextMenu()},h.navItems[0].selected=!1,h.navItems[0].hovered=!1};$("#nodeContextMenu").css("left",c+115),$("#nodeContextMenu").css("top",d+71),$("#nodeContextMenu").width(100),$("#nodeContextMenu").height(100),f(b,a)},clearMouseCanvas:function(){var a=document.getElementsByClassName("sigma-mouse")[0],b=a.getContext("2d");b.clearRect(0,0,$(a).width(),$(a).height())},drawLine:function(a){var b=window.App.graphViewer2.contextState;if(b.createEdge){var c=b.fromX,d=b.fromY,e=a.offsetX,f=a.offsetY,g=document.getElementsByClassName("sigma-mouse")[0],h=g.getContext("2d");h.clearRect(0,0,$(g).width(),$(g).height()),h.beginPath(),h.moveTo(c,d),h.lineTo(e,f),h.stroke()}},getGraphSettings:function(a){var b=this,c=frontendConfig.db+"_"+this.name;this.userConfig.fetch({success:function(d){b.graphConfig=d.toJSON().graphs[c],b.graphSettingsView&&b.graphSettingsView.remove(),b.graphSettingsView=new window.GraphSettingsView({name:b.name,userConfig:b.userConfig,saveCallback:b.render}),b.graphSettingsView.render(),a&&a(b.graphConfig)}})},setStartNode:function(a){this.graphConfig.nodeStart=a,this.graphSettingsView.saveGraphSettings(null,a)},editNode:function(a){var b=function(){};arangoHelper.openDocEditor(a,"doc",b)},editEdge:function(a){var b=function(){};arangoHelper.openDocEditor(a,"edge",b)},reloadGraph:function(){Backbone.history.loadUrl(Backbone.history.fragment)},getEdgeDefinitionCollections:function(a,b){var c=[];return _.each(this.model.edgeDefinitions,function(d){_.each(d.from,function(e){e===a&&_.each(d.to,function(a){a===b&&c.push(d.collection)})})}),c},initializeGraph:function(a,b){var c=this;a.refresh(),this.Sigma.plugins.Lasso=sigma.plugins.lasso;var d=new this.Sigma.plugins.Lasso(a,a.renderers[0],{strokeStyle:"black",lineWidth:1,fillWhileDrawing:!0,fillStyle:"rgba(41, 41, 41, 0.2)",cursor:"crosshair"});return d.bind("selectedNodes",function(b){var d=b.data;_.each(d,function(a,b){c.selectedNodes[b]=a.id}),a.graph.nodes().forEach(function(a){a.color=c.graphConfig.nodeColor?c.graphConfig.nodeColor:"rgb(46, 204, 113)"}),d.forEach(function(a){a.color="red"}),a.refresh()}),d},renderGraph:function(a,b){var c=this;if(this.graphSettings=a.settings,0===a.edges.length){var d='No edges found for starting point: '+c.graphSettings.startVertex._id+"";return void $("#calculatingGraph").html('
    Stopped.

    '+d+'. Please choose a different start node or try to reload the graph.
    ')}var e="position: absolute; left: 25px; bottom: 45px;";this.aqlMode&&(e="position: absolute; left: 30px; margin-top: -37px;"),$(this.el).append('
    '+a.nodes.length+' nodes'+a.edges.length+" edges
    "),this.Sigma=sigma;var f="force",g="canvas";this.graphConfig&&(this.graphConfig.layout&&(f=this.graphConfig.layout),this.graphConfig.renderer&&(g=this.graphConfig.renderer,"canvas"===g&&(c.isEditable=!0)));var h={doubleClickEnabled:!1,minNodeSize:20,minEdgeSize:1,maxEdgeSize:4,enableEdgeHovering:!0,edgeHoverColor:"#000",defaultEdgeHoverColor:"#000",defaultEdgeType:"line",edgeHoverSizeRatio:2,edgeHoverExtremities:!0,nodesPowRatio:1,autoRescale:!0,mouseEnabled:!0,touchEnabled:!0,font:"Roboto"};"canvas"===g&&(h.autoCurveSortByDirection=!0),a.nodes.length>500&&(h.labelThreshold=15,h.hideEdgesOnMove=!0),this.graphConfig&&(this.graphConfig.edgeType&&(h.defaultEdgeType=this.graphConfig.edgeType,"arrow"===this.graphConfig.edgeType&&(h.minArrowSize=7)),this.graphConfig.nodeLabelThreshold&&(h.labelThreshold=this.graphConfig.nodeLabelThreshold),this.graphConfig.edgeLabelThreshold&&(h.edgeLabelThreshold=this.graphConfig.edgeLabelThreshold)),"webgl"===g&&(h.enableEdgeHovering=!1);var i=new this.Sigma({graph:a,container:"graph-container",renderer:{container:document.getElementById("graph-container"),type:g},settings:h});if(this.currentGraph=i,this.aqlMode||sigma.plugins.fullScreen({container:"graph-container",btnId:"graph-fullscreen-btn"}),"noverlap"===f){var j=i.configNoverlap({nodeMargin:.1,scaleNodes:1.05,gridSize:75,easing:"quadraticInOut",duration:1e4});j.bind("start stop interpolate",function(a){"start"===a.type,"interpolate"===a.type})}else if("fruchtermann"===f){var k=sigma.layouts.fruchtermanReingold.configure(i,{iterations:500,easing:"quadraticInOut",duration:800});k.bind("start stop interpolate",function(a){})}if(i.graph.nodes().forEach(function(a){a.originalColor=a.color}),i.graph.edges().forEach(function(a){a.originalColor=a.color}),"canvas"===g){this.graphConfig&&"curve"===this.graphConfig.edgeType&&sigma.canvas.edges.autoCurve(i),i.refresh(),c.aqlMode||i.bind("rightClickStage",function(a){c.addNodeX=a.data.captor.x,c.addNodeY=a.data.captor.y,c.createContextMenu(a),c.clearMouseCanvas()});var l=function(a,b){if($(".nodeInfoDiv").remove(),c.contextState.createEdge===!1&&window.location.hash.indexOf("graph")>-1){var d=function(a,b){if(!a){var d="";_.each(b,function(a,b){"_key"!==b&&"_id"!==b&&"_rev"!==b&&"_from"!==b&&"_to"!==b&&(d+=''+b+"")});var e='
    '+d+"
    ";$(c.el).append(e)}};b?c.documentStore.getDocument(a.data.node.id.split("/")[0],a.data.node.id.split("/")[1],d):c.documentStore.getDocument(a.data.edge.id.split("/")[0],a.data.edge.id.split("/")[1],d)}};i.bind("overNode",function(a){l(a,!0)}),i.bind("overEdge",function(a){l(a,!1)}),i.bind("outNode",function(a){c.contextState.createEdge===!1&&$(".nodeInfoDiv").remove()}),i.bind("outEdge",function(a){c.contextState.createEdge===!1&&$(".nodeInfoDiv").remove()}),i.bind("clickNode",function(a){if(c.contextState.createEdge===!0){c.contextState._to=a.data.node.id;var b=c.contextState._from.split("/")[0],d=c.contextState._to.split("/")[0],e=c.getEdgeDefinitionCollections(b,d);c.addEdgeModal(e,c.contextState._from,c.contextState._to)}}),this.aqlMode||i.bind("rightClickNode",function(a){var b=a.data.node.id;c.createNodeContextMenu(b,a)}),this.graphConfig&&this.graphConfig.edgeEditable&&i.bind("rightClickEdge",function(a){var b=a.data.edge.id;c.createEdgeContextMenu(b,a)}),i.bind("doubleClickNode",function(a){var b=a.data.node.id,c=i.graph.neighbors(b);c[b]=a.data.node,i.graph.nodes().forEach(function(a){c[a.id]?a.color=a.originalColor:a.color="#eee"}),i.graph.edges().forEach(function(a){c[a.source]&&c[a.target]?a.color="rgb(64, 74, 83)":a.color="#eee"}),i.refresh()}),i.bind("doubleClickStage",function(){i.graph.nodes().forEach(function(a){a.color=a.originalColor}),i.graph.edges().forEach(function(a){a.color=a.originalColor}),i.refresh()}),i.bind("clickStage",function(){c.clearOldContextMenu(!0),c.clearMouseCanvas()})}if("noverlap"===f)i.startNoverlap(),sigma.plugins.dragNodes(i,i.renderers[0]);else if("force"===f){var m="color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; bottom: 40px;";c.aqlMode&&(m="color: rgb(64, 74, 83); cursor: pointer; position: absolute; right: 30px; margin-top: -30px;"),$(this.el).append('
    '),c.startLayout();var n=3e3;a.nodes.length>2500?n=5e3:a.nodes.length<50&&(n=500),window.setTimeout(function(){c.stopLayout()},n)}else"fruchtermann"===f?(sigma.layouts.fruchtermanReingold.start(i),sigma.plugins.dragNodes(i,i.renderers[0])):sigma.plugins.dragNodes(i,i.renderers[0]);var o=document.getElementsByClassName("sigma-mouse")[0];o.addEventListener("mousemove",c.trackCursorPosition.bind(this),!1),b&&$("#"+b).focus();var p=function(){c.graphLasso=c.initializeGraph(i,a),c.graphLasso.activate(),c.graphLasso.deactivate()};this.graphConfig?"canvas"===this.graphConfig.renderer?p():$("#selectNodes").parent().hide():"canvas"===g?p():$("#selectNodes").parent().hide(),c.graphLasso&&(window.App.listenerFunctions.graphViewer=this.keyUpFunction.bind(this)),$("#calculatingGraph").remove();var q=i.settings("maxNodeSize"),r=1,s=i.graph.nodes().length;100>s?r=2.5:1e3>s&&(r=.7),q*=r,i.settings("maxNodeSize",q),i.refresh()},keyUpFunction:function(a){var b=this;switch(a.keyCode){case 76:a.altKey&&b.toggleLasso()}},toggleLayout:function(){this.layouting?this.stopLayout():this.startLayout()},toggleLasso:function(){if(this.graphLasso.isActive){var a=document.getElementsByClassName("sigma-lasso")[0];a.removeEventListener("mouseup",this.createNodesContextMenu.bind(this),!1),$("#selectNodes").removeClass("activated"),this.graphLasso.deactivate(),this.selectedNodes={},this.currentGraph.graph.nodes().forEach(function(a){a.color=a.originalColor}),this.currentGraph.graph.edges().forEach(function(a){a.color=a.originalColor}),this.currentGraph.refresh()}else{$("#selectNodes").addClass("activated"),this.graphLasso.activate();var b=document.getElementsByClassName("sigma-lasso")[0];b.addEventListener("mouseup",this.createNodesContextMenu.bind(this),!1)}},startLayout:function(){$("#toggleForce .fa").removeClass("fa-play").addClass("fa-pause"),this.layouting=!0,this.currentGraph.startForceAtlas2({worker:!0,barnesHutOptimize:!1}),sigma.plugins.dragNodes(this.currentGraph,this.currentGraph.renderers[0])},stopLayout:function(){$("#toggleForce .fa").removeClass("fa-pause").addClass("fa-play"),this.layouting=!1,this.currentGraph.stopForceAtlas2(),sigma.plugins.dragNodes(this.currentGraph,this.currentGraph.renderers[0])}})}(),function(){"use strict";window.HelpUsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("helpUsView.ejs"),render:function(){this.$el.html(this.template.render({}))}})}(),function(){"use strict";window.IndicesView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},template:templateEngine.createTemplate("indicesView.ejs"),events:{},render:function(){$(this.el).html(this.template.render({model:this.model})),this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Indices"),this.getIndex()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},getIndex:function(){var a=function(a,b){a?window.arangoHelper.arangoError("Index",b.errorMessage):this.renderIndex(b)}.bind(this);this.model.getIndex(a)},createIndex:function(){var a,b,c,d=this,e=$("#newIndexType").val(),f={};switch(e){case"Geo":a=$("#newGeoFields").val();var g=d.checkboxToValue("#newGeoJson");f={type:"geo",fields:d.stringToArray(a),geoJson:g};break;case"Persistent":a=$("#newPersistentFields").val(),b=d.checkboxToValue("#newPersistentUnique"),c=d.checkboxToValue("#newPersistentSparse"),f={type:"persistent",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Hash":a=$("#newHashFields").val(),b=d.checkboxToValue("#newHashUnique"),c=d.checkboxToValue("#newHashSparse"),f={type:"hash",fields:d.stringToArray(a),unique:b,sparse:c};break;case"Fulltext":a=$("#newFulltextFields").val();var h=parseInt($("#newFulltextMinLength").val(),10)||0;f={type:"fulltext",fields:d.stringToArray(a),minLength:h};break;case"Skiplist":a=$("#newSkiplistFields").val(),b=d.checkboxToValue("#newSkiplistUnique"),c=d.checkboxToValue("#newSkiplistSparse"),f={type:"skiplist",fields:d.stringToArray(a),unique:b,sparse:c}}var i=function(a,b){if(a)if(b){var c=JSON.parse(b.responseText);arangoHelper.arangoError("Document error",c.errorMessage)}else arangoHelper.arangoError("Document error","Could not create index.");d.toggleNewIndexView(),d.render()};this.model.createIndex(f,i)},bindIndexEvents:function(){this.unbindIndexEvents();var a=this;$("#indexEditView #addIndex").bind("click",function(){a.toggleNewIndexView(),$("#cancelIndex").unbind("click"),$("#cancelIndex").bind("click",function(){a.toggleNewIndexView(),a.render()}),$("#createIndex").unbind("click"),$("#createIndex").bind("click",function(){a.createIndex()})}),$("#newIndexType").bind("change",function(){a.selectIndexType()}),$(".deleteIndex").bind("click",function(b){a.prepDeleteIndex(b)}),$("#infoTab a").bind("click",function(a){if($("#indexDeleteModal").remove(),"Indices"!==$(a.currentTarget).html()||$(a.currentTarget).parent().hasClass("active")||($("#newIndexView").hide(),$("#indexEditView").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-danger").hide(),$("#indexHeaderContent #modal-dialog .modal-footer .button-success").hide(),$("#indexHeaderContent #modal-dialog .modal-footer .button-notification").hide()),"General"===$(a.currentTarget).html()&&!$(a.currentTarget).parent().hasClass("active")){$("#indexHeaderContent #modal-dialog .modal-footer .button-danger").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-success").show(),$("#indexHeaderContent #modal-dialog .modal-footer .button-notification").show();var b=$(".index-button-bar2")[0];$("#cancelIndex").is(":visible")&&($("#cancelIndex").detach().appendTo(b),$("#createIndex").detach().appendTo(b))}})},prepDeleteIndex:function(a){var b=this;this.lastTarget=a,this.lastId=$(this.lastTarget.currentTarget).parent().parent().first().children().first().text(),$("#content #modal-dialog .modal-footer").after(''),$("#indexHeaderContent #indexConfirmDelete").unbind("click"),$("#indexHeaderContent #indexConfirmDelete").bind("click",function(){$("#indexHeaderContent #indexDeleteModal").remove(),b.deleteIndex()}),$("#indexHeaderContent #indexAbortDelete").unbind("click"), +$("#indexHeaderContent #indexAbortDelete").bind("click",function(){$("#indexHeaderContent #indexDeleteModal").remove()})},unbindIndexEvents:function(){$("#indexHeaderContent #indexEditView #addIndex").unbind("click"),$("#indexHeaderContent #newIndexType").unbind("change"),$("#indexHeaderContent #infoTab a").unbind("click"),$("#indexHeaderContent .deleteIndex").unbind("click")},deleteIndex:function(){var a=function(a){a?(arangoHelper.arangoError("Could not delete index"),$("tr th:contains('"+this.lastId+"')").parent().children().last().html(''),this.model.set("locked",!1)):a||void 0===a||($("tr th:contains('"+this.lastId+"')").parent().remove(),this.model.set("locked",!1))}.bind(this);this.model.set("locked",!0),this.model.deleteIndex(this.lastId,a),$("tr th:contains('"+this.lastId+"')").parent().children().last().html('')},renderIndex:function(a){this.index=a;var b="collectionInfoTh modal-text";if(this.index){var c="",d="";_.each(this.index.indexes,function(a){d="primary"===a.type||"edge"===a.type?'':'',void 0!==a.fields&&(c=a.fields.join(", "));var e=a.id.indexOf("/"),f=a.id.substr(e+1,a.id.length),g=a.hasOwnProperty("selectivityEstimate")?(100*a.selectivityEstimate).toFixed(2)+"%":"n/a",h=a.hasOwnProperty("sparse")?a.sparse:"n/a";$("#collectionEditIndexTable").append(""+f+""+a.type+""+a.unique+""+h+""+g+""+c+""+d+"")})}this.bindIndexEvents()},selectIndexType:function(){$(".newIndexClass").hide();var a=$("#newIndexType").val();$("#newIndexType"+a).show()},resetIndexForms:function(){$("#indexHeader input").val("").prop("checked",!1),$("#newIndexType").val("Geo").prop("selected",!0),this.selectIndexType()},toggleNewIndexView:function(){var a=$(".index-button-bar2")[0];$("#indexEditView").is(":visible")?($("#indexEditView").hide(),$("#newIndexView").show(),$("#cancelIndex").detach().appendTo("#indexHeaderContent #modal-dialog .modal-footer"),$("#createIndex").detach().appendTo("#indexHeaderContent #modal-dialog .modal-footer")):($("#indexEditView").show(),$("#newIndexView").hide(),$("#cancelIndex").detach().appendTo(a),$("#createIndex").detach().appendTo(a)),arangoHelper.fixTooltips(".icon_arangodb, .arangoicon","right"),this.resetIndexForms()},stringToArray:function(a){var b=[];return a.split(",").forEach(function(a){a=a.replace(/(^\s+|\s+$)/g,""),""!==a&&b.push(a)}),b},checkboxToValue:function(a){return $(a).prop("checked")}})}(),function(){"use strict";window.InfoView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},events:{},render:function(){this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Info"),this.renderInfoView()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},renderInfoView:function(){if(this.model.get("locked"))return 0;var a=function(a,b,c){if(a)arangoHelper.arangoError("Figures","Could not get revision.");else{var d=[],e={figures:c,revision:b,model:this.model};window.modalView.show("modalCollectionInfo.ejs","Collection: "+this.model.get("name"),d,e,null,null,null,null,null,"content")}}.bind(this),b=function(b,c){if(b)arangoHelper.arangoError("Figures","Could not get figures.");else{var d=c;this.model.getRevision(a,d)}}.bind(this);this.model.getFigures(b)}})}(),function(){"use strict";window.LoginView=Backbone.View.extend({el:"#content",el2:".header",el3:".footer",loggedIn:!1,loginCounter:0,events:{"keyPress #loginForm input":"keyPress","click #submitLogin":"validate","submit #dbForm":"goTo","click #logout":"logout","change #loginDatabase":"renderDBS"},template:templateEngine.createTemplate("loginView.ejs"),render:function(a){var b=this;if($(this.el).html(this.template.render({})),$(this.el2).hide(),$(this.el3).hide(),frontendConfig.authenticationEnabled&&a!==!0)window.setTimeout(function(){$("#loginUsername").focus()},300);else{var c=arangoHelper.databaseUrl("/_api/database/user");frontendConfig.authenticationEnabled===!1&&($("#logout").hide(),$(".login-window #databases").css("height","90px")),$("#loginForm").hide(),$(".login-window #databases").show(),$.ajax(c).success(function(a){$("#loginDatabase").html(""),_.each(a.result,function(a){$("#loginDatabase").append("")}),b.renderDBS()}).error(function(){console.log("could not fetch user db data")})}return $(".bodyWrapper").show(),this},clear:function(){$("#loginForm input").removeClass("form-error"),$(".wrong-credentials").hide()},keyPress:function(a){a.ctrlKey&&13===a.keyCode?(a.preventDefault(),this.validate()):a.metaKey&&13===a.keyCode&&(a.preventDefault(),this.validate())},validate:function(a){a.preventDefault(),this.clear();var b=$("#loginUsername").val(),c=$("#loginPassword").val();b&&this.collection.login(b,c,this.loginCallback.bind(this,b,c))},loginCallback:function(a,b,c){var d=this;if(c){if(0===d.loginCounter)return d.loginCounter++,void d.collection.login(a,b,this.loginCallback.bind(this,a));d.loginCounter=0,$(".wrong-credentials").show(),$("#loginDatabase").html(""),$("#loginDatabase").append("")}else{var e=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database","_system");frontendConfig.authenticationEnabled===!1&&(e=arangoHelper.databaseUrl("/_api/database/user")),$(".wrong-credentials").hide(),d.loggedIn=!0,$.ajax(e).success(function(a){_.each(a.result,function(b,c){"rw"!==b&&delete a.result[c]}),$("#loginForm").hide(),$(".login-window #databases").show(),$("#loginDatabase").html(""),_.each(a.result,function(a,b){$("#loginDatabase").append("")}),d.renderDBS()}).error(function(){$(".wrong-credentials").show()})}},renderDBS:function(){if(0===$("#loginDatabase").children().length)$("#dbForm").remove(),$(".login-window #databases").prepend('
    You do not have permission to a database.
    ');else{var a=$("#loginDatabase").val();$("#goToDatabase").html("Select DB: "+a),window.setTimeout(function(){$("#goToDatabase").focus()},300)}},logout:function(){this.collection.logout()},goTo:function(a){a.preventDefault();var b=$("#loginUsername").val(),c=$("#loginDatabase").val();window.App.dbSet=c;var d=function(a){a&&arangoHelper.arangoError("User","Could not fetch user settings")},e=window.location.protocol+"//"+window.location.host+frontendConfig.basePath+"/_db/"+c+"/_admin/aardvark/index.html";window.location.href=e,$(this.el2).show(),$(this.el3).show(),$(".bodyWrapper").show(),$(".navbar").show(),$("#currentUser").text(b),this.collection.loadUserSettings(d)}})}(),function(){"use strict";window.LogsView=window.PaginationView.extend({el:"#content",id:"#logContent",paginationDiv:"#logPaginationDiv",idPrefix:"logTable",fetchedAmount:!1,initialize:function(a){this.options=a,this.convertModelToJSON()},currentLoglevel:"logall",events:{"click #arangoLogTabbar button":"setActiveLoglevel","click #logTable_first":"firstPage","click #logTable_last":"lastPage"},template:templateEngine.createTemplate("logsView.ejs"),tabbar:templateEngine.createTemplate("arangoTabbar.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),tabbarElements:{id:"arangoLogTabbar",titles:[["All","logall"],["Info","loginfo"],["Error","logerror"],["Warning","logwarning"],["Debug","logdebug"]]},tableDescription:{id:"arangoLogTable",titles:["Loglevel","Date","Message"],rows:[]},convertedRows:null,setActiveLoglevel:function(a){$(".arangodb-tabbar").removeClass("arango-active-tab"),this.currentLoglevel!==a.currentTarget.id&&(this.currentLoglevel=a.currentTarget.id,this.convertModelToJSON())},initTotalAmount:function(){var a=this;this.collection=this.options[this.currentLoglevel],this.collection.fetch({data:$.param({test:!0}),success:function(){a.convertModelToJSON()}}),this.fetchedAmount=!0},invertArray:function(a){var b,c=[],d=0;for(b=a.length-1;b>=0;b--)c[d]=a[b],d++;return c},convertModelToJSON:function(){if(!this.fetchedAmount)return void this.initTotalAmount();var a,b=this,c=[];this.collection=this.options[this.currentLoglevel],this.collection.fetch({success:function(){b.collection.each(function(b){a=new Date(1e3*b.get("timestamp")),c.push([b.getLogStatus(),arangoHelper.formatDT(a),b.get("text")])}),b.tableDescription.rows=b.invertArray(c),b.render()}})},render:function(){return $(this.el).html(this.template.render({})),$(this.id).html(this.tabbar.render({content:this.tabbarElements})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#"+this.currentLoglevel).addClass("arango-active-tab"),$("#logContent").append('
    '),this.renderPagination(),this},rerender:function(){this.convertModelToJSON()}})}(),function(){"use strict";var a=function(a,b,c,d){return{type:a,title:b,callback:c,confirm:d}},b=function(a,b,c,d,e,f,g,h,i,j,k){var l={type:a,label:b};return void 0!==c&&(l.value=c),void 0!==d&&(l.info=d),void 0!==e&&(l.placeholder=e),void 0!==f&&(l.mandatory=f),void 0!==h&&(l.addDelete=h),void 0!==i&&(l.addAdd=i),void 0!==j&&(l.maxEntrySize=j),void 0!==k&&(l.tags=k),g&&(l.validateInput=function(){return g}),l};window.ModalView=Backbone.View.extend({_validators:[],_validateWatchers:[],baseTemplate:templateEngine.createTemplate("modalBase.ejs"),tableTemplate:templateEngine.createTemplate("modalTable.ejs"),el:"#modalPlaceholder",contentEl:"#modalContent",hideFooter:!1,confirm:{list:"#modal-delete-confirmation",yes:"#modal-confirm-delete",no:"#modal-abort-delete"},enabledHotkey:!1,enableHotKeys:!0,buttons:{SUCCESS:"success",NOTIFICATION:"notification",DELETE:"danger",NEUTRAL:"neutral",CLOSE:"close"},tables:{READONLY:"readonly",TEXT:"text",BLOB:"blob",PASSWORD:"password",SELECT:"select",SELECT2:"select2",CHECKBOX:"checkbox"},initialize:function(){Object.freeze(this.buttons),Object.freeze(this.tables)},createModalHotkeys:function(){$(this.el).unbind("keydown"),$(this.el).unbind("return"),$(this.el).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()}),$(".modal-body input").unbind("keydown"),$(".modal-body input").unbind("return"),$(".modal-body input",$(this.el)).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()}),$(".modal-body select").unbind("keydown"),$(".modal-body select").unbind("return"),$(".modal-body select",$(this.el)).bind("keydown","return",function(){$(".createModalDialog .modal-footer .button-success").click()})},createInitModalHotkeys:function(){var a=this;$(this.el).bind("keydown","left",function(){a.navigateThroughButtons("left")}),$(this.el).bind("keydown","right",function(){a.navigateThroughButtons("right")})},navigateThroughButtons:function(a){var b=$(".createModalDialog .modal-footer button").is(":focus");b===!1?"left"===a?$(".createModalDialog .modal-footer button").first().focus():"right"===a&&$(".createModalDialog .modal-footer button").last().focus():b===!0&&("left"===a?$(":focus").prev().focus():"right"===a&&$(":focus").next().focus())},createCloseButton:function(b,c){var d=this;return a(this.buttons.CLOSE,b,function(){d.hide(),c&&c()})},createSuccessButton:function(b,c){return a(this.buttons.SUCCESS,b,c)},createNotificationButton:function(b,c){return a(this.buttons.NOTIFICATION,b,c)},createDeleteButton:function(b,c,d){return a(this.buttons.DELETE,b,c,d)},createNeutralButton:function(b,c){return a(this.buttons.NEUTRAL,b,c)},createDisabledButton:function(b){var c=a(this.buttons.NEUTRAL,b);return c.disabled=!0,c},createReadOnlyEntry:function(a,c,d,e,f,g){var h=b(this.tables.READONLY,c,d,e,void 0,void 0,void 0,f,g);return h.id=a,h},createTextEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.TEXT,c,d,e,f,g,h);return i.id=a,i},createBlobEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.BLOB,c,d,e,f,g,h);return i.id=a,i},createSelect2Entry:function(a,c,d,e,f,g,h,i,j,k){var l=b(this.tables.SELECT2,c,d,e,f,g,void 0,h,i,j,k);return l.id=a,l},createPasswordEntry:function(a,c,d,e,f,g,h){var i=b(this.tables.PASSWORD,c,d,e,f,g,h);return i.id=a,i},createCheckboxEntry:function(a,c,d,e,f){var g=b(this.tables.CHECKBOX,c,d,e);return g.id=a,f&&(g.checked=f),g},createSelectEntry:function(a,c,d,e,f){var g=b(this.tables.SELECT,c,null,e);return g.id=a,d&&(g.selected=d),g.options=f,g},createOptionEntry:function(a,b){return{label:a,value:b||a}},show:function(a,b,c,d,e,f,g,h,i,j){var k,l,m=this,n=!1;c=c||[],h=Boolean(h),this.clearValidators(),c.length>0?(c.forEach(function(a){a.type===m.buttons.CLOSE&&(n=!0),a.type===m.buttons.DELETE&&(l=l||a.confirm)}),n||(k=c.pop(),c.push(m.createCloseButton("Cancel")),c.push(k))):c.push(m.createCloseButton("Close")),j?($("#"+j).html(this.baseTemplate.render({title:b,buttons:c,hideFooter:this.hideFooter,confirm:l,tabBar:i})),$("#"+j+" #modal-dialog").removeClass("fade hide modal"),$("#"+j+" .modal-header").remove(),$("#"+j+" .modal-tabbar").remove(),$("#"+j+" .modal-tabbar").remove(),$("#"+j+" .button-close").remove(),0===$("#"+j+" .modal-footer").children().length&&$("#"+j+" .modal-footer").remove()):$(this.el).html(this.baseTemplate.render({title:b,buttons:c,hideFooter:this.hideFooter,confirm:l,tabBar:i})),_.each(c,function(a,b){if(!a.disabled&&a.callback){if(a.type===m.buttons.DELETE&&!h){var c="#modalButton"+b;return j&&(c="#"+j+" #modalButton"+b),void $(c).bind("click",function(){j?($("#"+j+" "+m.confirm.yes).unbind("click"),$("#"+j+" "+m.confirm.yes).bind("click",a.callback),$("#"+j+" "+m.confirm.list).css("display","block")):($(m.confirm.yes).unbind("click"),$(m.confirm.yes).bind("click",a.callback),$(m.confirm.list).css("display","block"))})}j?$("#"+j+" #modalButton"+b).bind("click",a.callback):$("#modalButton"+b).bind("click",a.callback)}}),j?$("#"+j+" "+this.confirm.no).bind("click",function(){$("#"+j+" "+m.confirm.list).css("display","none")}):$(this.confirm.no).bind("click",function(){$(m.confirm.list).css("display","none")});var o;if("string"==typeof a)o=templateEngine.createTemplate(a),j?$("#"+j+" .createModalDialog .modal-body").html(o.render({content:d,advancedContent:e,info:f})):$("#modalPlaceholder .createModalDialog .modal-body").html(o.render({content:d,advancedContent:e,info:f}));else{var p=0;_.each(a,function(a){o=templateEngine.createTemplate(a),$(".createModalDialog .modal-body .tab-content #"+i[p]).html(o.render({content:d,advancedContent:e,info:f})),p++})}$(".createModalDialog .modalTooltips").tooltip({position:{my:"left top",at:"right+55 top-1"}});var q=d||[];e&&e.content&&(q=q.concat(e.content)),_.each(q,function(a){m.modalBindValidation(a),a.type===m.tables.SELECT2&&$("#"+a.id).select2({tags:a.tags||[],showSearchBox:!1,minimumResultsForSearch:-1,width:"336px",maximumSelectionSize:a.maxEntrySize||8})}),g&&(this.events=g,this.delegateEvents()),$("#accordion2")&&($("#accordion2 .accordion-toggle").bind("click",function(){$("#collapseOne").is(":visible")?($("#collapseOne").hide(),setTimeout(function(){$(".accordion-toggle").addClass("collapsed")},100)):($("#collapseOne").show(),setTimeout(function(){$(".accordion-toggle").removeClass("collapsed")},100))}),$("#collapseOne").hide(),setTimeout(function(){$(".accordion-toggle").addClass("collapsed")},100)),j||$("#modal-dialog").modal("show"),this.enabledHotkey===!1&&(this.createInitModalHotkeys(),this.enabledHotkey=!0),this.enableHotKeys&&this.createModalHotkeys();var r;r=j?$("#"+j+" #modal-dialog").find("input"):$("#modal-dialog").find("input"),r&&setTimeout(function(){r=j?$("#"+j+" #modal-dialog"):$("#modal-dialog"),r.length>0&&(r=r.find("input"),r.length>0&&$(r[0]).focus())},400)},modalBindValidation:function(a){var b=this;if(a.hasOwnProperty("id")&&a.hasOwnProperty("validateInput")){var c=function(){var b=$("#"+a.id),c=a.validateInput(b),d=!1;return _.each(c,function(a){var c=b.val();if(a.rule||(a={rule:a}),"function"==typeof a.rule)try{a.rule(c)}catch(e){d=a.msg||e.message}else{var f=Joi.validate(c,a.rule);f.error&&(d=a.msg||f.error.message)}return d?!1:void 0}),d?d:void 0},d=$("#"+a.id);d.on("keyup focusout",function(){var a=c(),e=d.next()[0];a?(d.addClass("invalid-input"),e?$(e).text(a):d.after('

    '+a+"

    "),$(".createModalDialog .modal-footer .button-success").prop("disabled",!0).addClass("disabled")):(d.removeClass("invalid-input"),e&&$(e).remove(),b.modalTestAll())}),this._validators.push(c),this._validateWatchers.push(d)}},modalTestAll:function(){var a=_.map(this._validators,function(a){return a()}),b=_.any(a);return b?$(".createModalDialog .modal-footer .button-success").prop("disabled",!0).addClass("disabled"):$(".createModalDialog .modal-footer .button-success").prop("disabled",!1).removeClass("disabled"),!b},clearValidators:function(){this._validators=[],_.each(this._validateWatchers,function(a){a.unbind("keyup focusout")}),this._validateWatchers=[]},hide:function(){this.clearValidators(),$("#modal-dialog").modal("hide")}})}(),function(){"use strict";window.NavigationView=Backbone.View.extend({el:"#navigationBar",subEl:"#subNavigationBar",events:{"change #arangoCollectionSelect":"navigateBySelect","click .tab":"navigateByTab","click li":"switchTab","click .arangodbLogo":"selectMenuItem","mouseenter .dropdown > *":"showDropdown","click .shortcut-icons p":"showShortcutModal","mouseleave .dropdown":"hideDropdown"},renderFirst:!0,activeSubMenu:void 0,changeDB:function(){window.location.hash="#login"},initialize:function(a){var b=this;this.userCollection=a.userCollection,this.currentDB=a.currentDB,this.dbSelectionView=new window.DBSelectionView({collection:a.database,current:this.currentDB}),this.userBarView=new window.UserBarView({userCollection:this.userCollection}),this.notificationView=new window.NotificationView({collection:a.notificationCollection}),this.statisticBarView=new window.StatisticBarView({currentDB:this.currentDB}),this.isCluster=a.isCluster,this.handleKeyboardHotkeys(),Backbone.history.on("all",function(){b.selectMenuItem()})},showShortcutModal:function(){arangoHelper.hotkeysFunctions.showHotkeysModal()},handleSelectDatabase:function(){this.dbSelectionView.render($("#dbSelect"))},template:templateEngine.createTemplate("navigationView.ejs"),templateSub:templateEngine.createTemplate("subNavigationView.ejs"),render:function(){var a=this;$(this.el).html(this.template.render({currentDB:this.currentDB,isCluster:this.isCluster})),"_system"!==this.currentDB.get("name")&&$("#dashboard").parent().remove(),$(this.subEl).html(this.templateSub.render({currentDB:this.currentDB.toJSON()})),this.dbSelectionView.render($("#dbSelect"));var b=function(a){a||this.userBarView.render()}.bind(this);return this.userCollection.whoAmI(b),this.renderFirst&&(this.renderFirst=!1,this.selectMenuItem(),$(".arangodbLogo").on("click",function(){a.selectMenuItem()}),$("#dbStatus").on("click",function(){a.changeDB()})),a.resize(),this},resize:function(){var a=$(window).height()-$(".subMenuEntries").first().height();$("#navigationBar").css("min-height",a),$("#navigationBar").css("height",a)},navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},handleKeyboardHotkeys:function(){arangoHelper.enableKeyboardHotkeys(!0)},navigateByTab:function(a){var b=a.target||a.srcElement,c=b.id,d=!1;$(b).hasClass("fa")||(""===c&&(c=$(b).attr("class")),"links"===c?(d=!0,$("#link_dropdown").slideToggle(1),a.preventDefault()):"tools"===c?(d=!0,$("#tools_dropdown").slideToggle(1),a.preventDefault()):"dbselection"===c&&(d=!0,$("#dbs_dropdown").slideToggle(1),a.preventDefault()),d||(window.App.navigate(c,{trigger:!0}),a.preventDefault()))},handleSelectNavigation:function(){var a=this;$("#arangoCollectionSelect").change(function(){a.navigateBySelect()})},subViewConfig:{documents:"collections",collection:"collections"},subMenuConfig:{cluster:[{name:"Dashboard",view:void 0,active:!0},{name:"Logs",view:void 0,disabled:!0}],collections:[{name:"",view:void 0,active:!1}],queries:[{name:"Editor",route:"query",active:!0},{name:"Running Queries",route:"queryManagement",params:{active:!0},active:void 0},{name:"Slow Query History",route:"queryManagement",params:{active:!1},active:void 0}]},renderSubMenu:function(a){var b=this;if(void 0===a&&(a=window.isCluster?"cluster":"dashboard"),this.subMenuConfig[a]){$(this.subEl+" .bottom").html("");var c="";_.each(this.subMenuConfig[a],function(a){c=a.active?"active":"",a.disabled&&(c="disabled"),$(b.subEl+" .bottom").append('"),a.disabled||$(b.subEl+" .bottom").children().last().bind("click",function(c){b.activeSubMenu=a,b.renderSubView(a,c)})})}},renderSubView:function(a,b){window.App[a.route]&&(window.App[a.route].resetState&&window.App[a.route].resetState(),window.App[a.route]()),$(this.subEl+" .bottom").children().removeClass("active"),$(b.currentTarget).addClass("active")},switchTab:function(a){var b=$(a.currentTarget).children().first().attr("id");b&&this.selectMenuItem(b+"-menu")},selectMenuItem:function(a,b){void 0===a&&(a=window.location.hash.split("/")[0],a=a.substr(1,a.length-1)),""===a?a=window.App.isCluster?"cluster":"dashboard":"cNodes"!==a&&"dNodes"!==a||(a="nodes");try{this.renderSubMenu(a.split("-")[0])}catch(c){this.renderSubMenu(a)}$(".navlist li").removeClass("active"),"string"==typeof a&&(b?$("."+this.subViewConfig[a]+"-menu").addClass("active"):a&&($("."+a).addClass("active"),$("."+a+"-menu").addClass("active"))),arangoHelper.hideArangoNotifications()},showSubDropdown:function(a){$(a.currentTarget).find(".subBarDropdown").toggle()},showDropdown:function(a){var b=a.target||a.srcElement,c=b.id;"links"===c||"link_dropdown"===c||"links"===a.currentTarget.id?$("#link_dropdown").fadeIn(1):"tools"===c||"tools_dropdown"===c||"tools"===a.currentTarget.id?$("#tools_dropdown").fadeIn(1):"dbselection"!==c&&"dbs_dropdown"!==c&&"dbselection"!==a.currentTarget.id||$("#dbs_dropdown").fadeIn(1)},hideDropdown:function(a){var b=a.target||a.srcElement;b=$(b).parent(),$("#link_dropdown").fadeOut(1),$("#tools_dropdown").fadeOut(1),$("#dbs_dropdown").fadeOut(1)}})}(),function(){"use strict";window.NodesView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodesView.ejs"),interval:5e3,knownServers:[],events:{"click #nodesContent .pure-table-body .pure-table-row":"navigateToNode"},initialize:function(a){var b=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),this.toRender=a.toRender,this.intervalFunction=window.setInterval(function(){"#cNodes"!==window.location.hash&&"#dNodes"!==window.location.hash&&"#nodes"!==window.location.hash||b.checkNodesState()},this.interval))},checkNodesState:function(){var a=function(a){_.each(a,function(a,b){_.each($(".pure-table-row"),function(c){$(c).attr("node")===b&&("GOOD"===a.Status?($(c).removeClass("noHover"),$(c).find(".state").html('')):($(c).addClass("noHover"),$(c).find(".state").html('')))})})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(b){a(b.Health)}})},navigateToNode:function(a){if("#dNodes"!==window.location.hash&&!$(a.currentTarget).hasClass("noHover")){var b=$(a.currentTarget).attr("node");window.App.navigate("#node/"+encodeURIComponent(b),{trigger:!0})}},render:function(){var a=function(){this.continueRender()}.bind(this);this.initDoneCoords?a():this.waitForCoordinators(a)},continueRender:function(){var a;a="coordinator"===this.toRender?this.coordinators.toJSON():this.dbServers.toJSON(),this.$el.html(this.template.render({coords:a,type:this.toRender})),window.arangoHelper.buildNodesSubNav(this.toRender),this.checkNodesState()},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(this.initDoneCoords=!0,a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NodesView2=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodesView2.ejs"),interval:1e4,knownServers:[],events:{"click #nodesContent .coords-nodes .pure-table-row":"navigateToNode","click #addCoord":"addCoord","click #removeCoord":"removeCoord","click #addDBs":"addDBs","click #removeDBs":"removeDBs"},initialize:function(){var a=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#nodes"===window.location.hash&&a.render(!1)},this.interval))},navigateToNode:function(a){if(!$(a.currentTarget).hasClass("noHover")){var b=$(a.currentTarget).attr("node").slice(0,-5);window.App.navigate("#node/"+encodeURIComponent(b),{trigger:!0})}},render:function(a){var b=this,c=function(a){$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",success:function(c){b.continueRender(a,c)}})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,async:!0,success:function(a){c(a.Health)},error:function(){arangoHelper.arangoError("Cluster","Could not fetch cluster information")}}),a!==!1&&arangoHelper.buildNodesSubNav("Overview")},continueRender:function(a,b){var c={},d={},e=!1;_.each(a,function(a,b){"Coordinator"===a.Role?c[b]=a:"DBServer"===a.Role&&(d[b]=a)}),null!==b.numberOfDBServers&&null!==b.numberOfCoordinators&&(e=!0);var f=function(a){this.$el.html(this.template.render({coords:c,dbs:d,scaling:e,scaleProperties:a,plannedDBs:b.numberOfDBServers,plannedCoords:b.numberOfCoordinators})),e||($(".title").css("position","relative"),$(".title").css("top","-4px"),$(".sectionHeader .information").css("margin-top","-3px"))}.bind(this);this.renderCounts(e,f)},updatePlanned:function(a){a.numberOfCoordinators&&($("#plannedCoords").val(a.numberOfCoordinators),this.renderCounts(!0)),a.numberOfDBServers&&($("#plannedDBs").val(a.numberOfDBServers),this.renderCounts(!0))},setCoordSize:function(a){var b=this,c={numberOfCoordinators:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updatePlanned(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},setDBsSize:function(a){var b=this,c={numberOfDBServers:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updatePlanned(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},renderCounts:function(a,b){var c=function(b,c,d,e){var f=''+c+'';d&&a===!0&&(f=f+''+d+''),e&&(f=f+''+e+''),$(b).html(f),a||($(".title").css("position","relative"),$(".title").css("top","-4px"))},d=function(a){var d=0,e=0,f=0,g=0,h=0,i=0;_.each(a,function(a){"Coordinator"===a.Role?"GOOD"===a.Status?e++:d++:"DBServer"===a.Role&&("GOOD"===a.Status?g++:h++)}),$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",processData:!1,success:function(a){f=Math.abs(e+d-a.numberOfCoordinators),i=Math.abs(g+h-a.numberOfDBServers),b?b({coordsPending:f,coordsOk:e,coordsErrors:d,dbsPending:i,dbsOk:g,dbsErrors:h}):(c("#infoDBs",g,i,h),c("#infoCoords",e,f,d))}})};$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/health"),contentType:"application/json",processData:!1,success:function(a){d(a.Health)}})},addCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!0))},removeCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!1,!0))},addDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!0))},removeDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!1,!0))},readNumberFromID:function(a,b,c){var d=$(a).val(),e=!1;try{e=JSON.parse(d)}catch(f){}return b&&e++,c&&1!==e&&e--,e},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NodeView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("nodeView.ejs"),interval:5e3,dashboards:[],events:{},initialize:function(a){window.App.isCluster&&(this.coordinators=a.coordinators,this.dbServers=a.dbServers,this.coordname=a.coordname,this.updateServerTime())},breadcrumb:function(a){$("#subNavigationBar .breadcrumb").html("Node: "+a)},render:function(){this.$el.html(this.template.render({coords:[]}));var a=function(){this.continueRender(),this.breadcrumb(this.coordname),$(window).trigger("resize")}.bind(this);this.initCoordDone||this.waitForCoordinators(),this.initDBDone?(this.coordname=window.location.hash.split("/")[1],this.coordinator=this.coordinators.findWhere({name:this.coordname}),a()):this.waitForDBServers(a)},continueRender:function(){var a=this;this.dashboards[this.coordinator.get("name")]=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:window.App.arangoDatabase,serverToShow:{raw:this.coordinator.get("address"),isDBServer:!1,endpoint:this.coordinator.get("protocol")+"://"+this.coordinator.get("address"),target:this.coordinator.get("name")}}),this.dashboards[this.coordinator.get("name")].render(),window.setTimeout(function(){a.dashboards[a.coordinator.get("name")].resize()},500)},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(b.coordinator=b.coordinators.findWhere({name:b.coordname}),b.initCoordDone=!0,a&&a())},200)},waitForDBServers:function(a){var b=this;window.setTimeout(function(){0===b.dbServers[0].length?b.waitForDBServers(a):(b.initDBDone=!0,b.dbServer=b.dbServers[0],b.dbServer.each(function(a){"DBServer001"===a.get("name")&&(b.dbServer=a)}),a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.NotificationView=Backbone.View.extend({events:{"click .navlogo #stat_hd":"toggleNotification","click .notificationItem .fa":"removeNotification","click #removeAllNotifications":"removeAllNotifications"},initialize:function(){this.collection.bind("add",this.renderNotifications.bind(this)),this.collection.bind("remove",this.renderNotifications.bind(this)),this.collection.bind("reset",this.renderNotifications.bind(this)),window.setTimeout(function(){frontendConfig.authenticationEnabled===!1&&frontendConfig.isCluster===!1&&arangoHelper.showAuthDialog()===!0&&window.arangoHelper.arangoWarning("Warning","Authentication is disabled. Do not use this setup in production mode.")},2e3)},notificationItem:templateEngine.createTemplate("notificationItem.ejs"),el:"#notificationBar",template:templateEngine.createTemplate("notificationView.ejs"),toggleNotification:function(){var a=this.collection.length;0!==a&&$("#notification_menu").toggle()},removeAllNotifications:function(){$.noty.clearQueue(),$.noty.closeAll(),this.collection.reset(),$("#notification_menu").hide()},removeNotification:function(a){var b=a.target.id;this.collection.get(b).destroy()},renderNotifications:function(a,b,c){if(c&&c.add){var d,e=this.collection.at(this.collection.length-1),f=e.get("title"),g=3e3,h=["click"];if(e.get("content")&&(f=f+": "+e.get("content")), +"error"===e.get("type")?(g=!1,h=["button"],d=[{addClass:"button-danger",text:"Close",onClick:function(a){a.close()}}]):"warning"===e.get("type")&&(g=15e3,d=[{addClass:"button-warning",text:"Close",onClick:function(a){a.close()}},{addClass:"button-danger",text:"Don't show again.",onClick:function(a){a.close(),window.arangoHelper.doNotShowAgain()}}]),$.noty.clearQueue(),$.noty.closeAll(),noty({theme:"relax",text:f,template:'
    ',maxVisible:1,closeWith:["click"],type:e.get("type"),layout:"bottom",timeout:g,buttons:d,animation:{open:{height:"show"},close:{height:"hide"},easing:"swing",speed:200,closeWith:h}}),"success"===e.get("type"))return void e.destroy()}$("#stat_hd_counter").text(this.collection.length),0===this.collection.length?($("#stat_hd").removeClass("fullNotification"),$("#notification_menu").hide()):$("#stat_hd").addClass("fullNotification"),$(".innerDropdownInnerUL").html(this.notificationItem.render({notifications:this.collection})),$(".notificationInfoIcon").tooltip({position:{my:"left top",at:"right+55 top-1"}})},render:function(){return $(this.el).html(this.template.render({notifications:this.collection})),this.renderNotifications(),this.delegateEvents(),this.el}})}(),function(){"use strict";window.ProgressView=Backbone.View.extend({template:templateEngine.createTemplate("progressBase.ejs"),el:"#progressPlaceholder",el2:"#progressPlaceholderIcon",toShow:!1,lastDelay:0,action:function(){},events:{"click .progress-action button":"performAction"},performAction:function(){"function"==typeof this.action&&this.action(),window.progressView.hide()},initialize:function(){},showWithDelay:function(a,b,c,d){var e=this;e.toShow=!0,e.lastDelay=a,setTimeout(function(){e.toShow===!0&&e.show(b,c,d)},e.lastDelay)},show:function(a,b,c){$(this.el).html(this.template.render({})),$(".progress-text").text(a),c?$(".progress-action").html('"):$(".progress-action").html(''),b?this.action=b:this.action=this.hide(),$(this.el).show()},hide:function(){var a=this;a.toShow=!1,$(this.el).hide(),this.action=function(){}}})}(),function(){"use strict";window.QueryManagementView=Backbone.View.extend({el:"#content",id:"#queryManagementContent",templateActive:templateEngine.createTemplate("queryManagementViewActive.ejs"),templateSlow:templateEngine.createTemplate("queryManagementViewSlow.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),active:!0,shouldRender:!0,timer:0,refreshRate:2e3,initialize:function(){var a=this;this.activeCollection=new window.QueryManagementActive,this.slowCollection=new window.QueryManagementSlow,this.convertModelToJSON(!0),window.setInterval(function(){"#queries"===window.location.hash&&window.VISIBLE&&a.shouldRender&&"queryManagement"===arangoHelper.getCurrentSub().route&&(a.active?$("#arangoQueryManagementTable").is(":visible")&&a.convertModelToJSON(!0):$("#arangoQueryManagementTable").is(":visible")&&a.convertModelToJSON(!1))},a.refreshRate)},events:{"click #deleteSlowQueryHistory":"deleteSlowQueryHistoryModal","click #arangoQueryManagementTable .fa-minus-circle":"deleteRunningQueryModal"},tableDescription:{id:"arangoQueryManagementTable",titles:["ID","Query String","Runtime","Started",""],rows:[],unescaped:[!1,!1,!1,!1,!0]},deleteRunningQueryModal:function(a){this.killQueryId=$(a.currentTarget).attr("data-id");var b=[],c=[];c.push(window.modalView.createReadOnlyEntry(void 0,"Running Query","Do you want to kill the running query?",void 0,void 0,!1,void 0)),b.push(window.modalView.createDeleteButton("Kill",this.killRunningQuery.bind(this))),window.modalView.show("modalTable.ejs","Kill Running Query",b,c),$(".modal-delete-confirmation strong").html("Really kill?")},killRunningQuery:function(){this.collection.killRunningQuery(this.killQueryId,this.killRunningQueryCallback.bind(this)),window.modalView.hide()},killRunningQueryCallback:function(){this.convertModelToJSON(!0),this.renderActive()},deleteSlowQueryHistoryModal:function(){var a=[],b=[];b.push(window.modalView.createReadOnlyEntry(void 0,"Slow Query Log","Do you want to delete the slow query log entries?",void 0,void 0,!1,void 0)),a.push(window.modalView.createDeleteButton("Delete",this.deleteSlowQueryHistory.bind(this))),window.modalView.show("modalTable.ejs","Delete Slow Query Log",a,b)},deleteSlowQueryHistory:function(){this.collection.deleteSlowQueryHistory(this.slowQueryCallback.bind(this)),window.modalView.hide()},slowQueryCallback:function(){this.convertModelToJSON(!1),this.renderSlow()},render:function(){var a=arangoHelper.getCurrentSub();a.params.active?(this.active=!0,this.convertModelToJSON(!0)):(this.active=!1,this.convertModelToJSON(!1))},addEvents:function(){var a=this;$("#queryManagementContent tbody").on("mousedown",function(){clearTimeout(a.timer),a.shouldRender=!1}),$("#queryManagementContent tbody").on("mouseup",function(){a.timer=window.setTimeout(function(){a.shouldRender=!0},3e3)})},renderActive:function(){this.$el.html(this.templateActive.render({})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#activequeries").addClass("arango-active-tab"),this.addEvents()},renderSlow:function(){this.$el.html(this.templateSlow.render({})),$(this.id).append(this.table.render({content:this.tableDescription})),$("#slowqueries").addClass("arango-active-tab"),this.addEvents()},convertModelToJSON:function(a){var b=this,c=[];a===!0?this.collection=this.activeCollection:this.collection=this.slowCollection,this.collection.fetch({success:function(){b.collection.each(function(b){var d="";a&&(d=''),c.push([b.get("id"),b.get("query"),b.get("runTime").toFixed(2)+" s",b.get("started"),d])});var d="No running queries.";a||(d="No slow queries."),0===c.length&&c.push([d,"","","",""]),b.tableDescription.rows=c,a?b.renderActive():b.renderSlow()}})}})}(),function(){"use strict";window.QueryView=Backbone.View.extend({el:"#content",bindParamId:"#bindParamEditor",myQueriesId:"#queryTable",template:templateEngine.createTemplate("queryView.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),outputDiv:"#outputEditors",outputTemplate:templateEngine.createTemplate("queryViewOutput.ejs"),outputCounter:0,allowUpload:!1,customQueries:[],queries:[],state:{lastQuery:{query:void 0,bindParam:void 0}},graphs:[],settings:{aqlWidth:void 0},currentQuery:{},initDone:!1,bindParamRegExp:/@(@?\w+\d*)/,bindParamTableObj:{},bindParamTableDesc:{id:"arangoBindParamTable",titles:["Key","Value"],rows:[]},myQueriesTableDesc:{id:"arangoMyQueriesTable",titles:["Name","Actions"],rows:[]},execPending:!1,aqlEditor:null,queryPreview:null,initialize:function(){this.refreshAQL()},allowParamToggle:!0,events:{"click #executeQuery":"executeQuery","click #explainQuery":"explainQuery","click #clearQuery":"clearQuery","click .outputEditorWrapper #downloadQueryResult":"downloadQueryResult","click .outputEditorWrapper .switchAce span":"switchAce","click .outputEditorWrapper .fa-close":"closeResult","click #toggleQueries1":"toggleQueries","click #toggleQueries2":"toggleQueries","click #saveCurrentQuery":"addAQL","click #exportQuery":"exportCustomQueries","click #importQuery":"openImportDialog","click #removeResults":"removeResults","click #querySpotlight":"showSpotlight","click #deleteQuery":"selectAndDeleteQueryFromTable","click #explQuery":"selectAndExplainQueryFromTable","keydown #arangoBindParamTable input":"updateBindParams","change #arangoBindParamTable input":"updateBindParams","click #arangoMyQueriesTable tbody tr":"showQueryPreview","dblclick #arangoMyQueriesTable tbody tr":"selectQueryFromTable","click #arangoMyQueriesTable #copyQuery":"selectQueryFromTable","click #closeQueryModal":"closeExportDialog","click #confirmQueryImport":"importCustomQueries","click #switchTypes":"toggleBindParams","click #arangoMyQueriesTable #runQuery":"selectAndRunQueryFromTable"},clearQuery:function(){this.aqlEditor.setValue("",1)},toggleBindParams:function(){this.allowParamToggle?($("#bindParamEditor").toggle(),$("#bindParamAceEditor").toggle(),"JSON"===$("#switchTypes").text()?($("#switchTypes").text("Table"),this.updateQueryTable(),this.bindParamAceEditor.setValue(JSON.stringify(this.bindParamTableObj,null," "),1),this.deselect(this.bindParamAceEditor)):($("#switchTypes").text("JSON"),this.renderBindParamTable())):arangoHelper.arangoError("Bind parameter","Could not parse bind parameter"),this.resize()},openExportDialog:function(){$("#queryImportDialog").modal("show")},closeExportDialog:function(){$("#queryImportDialog").modal("hide")},initQueryImport:function(){var a=this;a.allowUpload=!1,$("#importQueries").change(function(b){a.files=b.target.files||b.dataTransfer.files,a.file=a.files[0],a.allowUpload=!0,$("#confirmQueryImport").removeClass("disabled")})},importCustomQueries:function(){var a=this;if(this.allowUpload===!0){var b=function(){this.collection.fetch({success:function(){a.updateLocalQueries(),a.updateQueryTable(),a.resize(),a.allowUpload=!1,$("#confirmQueryImport").addClass("disabled"),$("#queryImportDialog").modal("hide")},error:function(a){arangoHelper.arangoError("Custom Queries",a.responseText)}})}.bind(this);a.collection.saveImportQueries(a.file,b.bind(this))}},removeResults:function(){$(".outputEditorWrapper").hide("fast",function(){$(".outputEditorWrapper").remove()}),$("#removeResults").hide()},getCustomQueryParameterByName:function(a){return this.collection.findWhere({name:a}).get("parameter")},getCustomQueryValueByName:function(a){var b;return a&&(b=this.collection.findWhere({name:a})),b?b=b.get("value"):_.each(this.queries,function(c){c.name===a&&(b=c.value)}),b},openImportDialog:function(){$("#queryImportDialog").modal("show")},closeImportDialog:function(){$("#queryImportDialog").modal("hide")},exportCustomQueries:function(){var a;$.ajax("whoAmI?_="+Date.now()).success(function(b){a=b.user,null!==a&&a!==!1||(a="root");var c="query/download/"+encodeURIComponent(a);arangoHelper.download(c)})},toggleQueries:function(a){a&&"toggleQueries1"===a.currentTarget.id?(this.updateQueryTable(),$("#bindParamAceEditor").hide(),$("#bindParamEditor").show(),$("#switchTypes").text("JSON"),$(".aqlEditorWrapper").first().width(.33*$(window).width()),this.queryPreview.setValue("No query selected.",1),this.deselect(this.queryPreview)):void 0===this.settings.aqlWidth?$(".aqlEditorWrapper").first().width(.33*$(window).width()):$(".aqlEditorWrapper").first().width(this.settings.aqlWidth),this.resize();var b=["aqlEditor","queryTable","previewWrapper","querySpotlight","bindParamEditor","toggleQueries1","toggleQueries2","saveCurrentQuery","querySize","executeQuery","switchTypes","explainQuery","importQuery","exportQuery"];_.each(b,function(a){$("#"+a).toggle()}),this.resize()},showQueryPreview:function(a){$("#arangoMyQueriesTable tr").removeClass("selected"),$(a.currentTarget).addClass("selected");var b=this.getQueryNameFromTable(a);this.queryPreview.setValue(this.getCustomQueryValueByName(b),1),this.deselect(this.queryPreview)},getQueryNameFromTable:function(a){var b;return $(a.currentTarget).is("tr")?b=$(a.currentTarget).children().first().text():$(a.currentTarget).is("span")&&(b=$(a.currentTarget).parent().parent().prev().text()),b},deleteQueryModal:function(a){var b=[],c=[];c.push(window.modalView.createReadOnlyEntry(void 0,a,"Do you want to delete the query?",void 0,void 0,!1,void 0)),b.push(window.modalView.createDeleteButton("Delete",this.deleteAQL.bind(this,a))),window.modalView.show("modalTable.ejs","Delete Query",b,c)},selectAndDeleteQueryFromTable:function(a){var b=this.getQueryNameFromTable(a);this.deleteQueryModal(b)},selectAndExplainQueryFromTable:function(a){this.selectQueryFromTable(a,!1),this.explainQuery()},selectAndRunQueryFromTable:function(a){this.selectQueryFromTable(a,!1),this.executeQuery()},selectQueryFromTable:function(a,b){var c=this.getQueryNameFromTable(a),d=this;void 0===b&&this.toggleQueries(),this.state.lastQuery.query=this.aqlEditor.getValue(),this.state.lastQuery.bindParam=this.bindParamTableObj,this.aqlEditor.setValue(this.getCustomQueryValueByName(c),1),this.fillBindParamTable(this.getCustomQueryParameterByName(c)),this.updateBindParams(),$("#lastQuery").remove(),$("#queryContent .arangoToolbarTop .pull-left").append('Previous Query'),$("#lastQuery").hide().fadeIn(500).on("click",function(){d.aqlEditor.setValue(d.state.lastQuery.query,1),d.fillBindParamTable(d.state.lastQuery.bindParam),d.updateBindParams(),$("#lastQuery").fadeOut(500,function(){$(this).remove()})})},deleteAQL:function(a){var b=function(a){a?arangoHelper.arangoError("Query","Could not delete query."):(this.updateLocalQueries(),this.updateQueryTable(),this.resize(),window.modalView.hide())}.bind(this),c=this.collection.findWhere({name:a});this.collection.remove(c),this.collection.saveCollectionQueries(b)},switchAce:function(a){var b=$(a.currentTarget).attr("counter"),c=a.currentTarget;if(!$(c).hasClass("disabled")){_.each($(c).parent().children(),function(a){$(a).removeClass("active")});var d=$(c).attr("val");$(c).addClass("active"),$(c).text(d.charAt(0).toUpperCase()+d.slice(1)),"JSON"===d?($("#outputEditor"+b).show(),$("#outputGraph"+b).hide(),$("#outputTable"+b).hide()):"Table"===d?($("#outputTable"+b).show(),$("#outputGraph"+b).hide(),$("#outputEditor"+b).hide()):"Graph"===d&&($("#outputGraph"+b).show(),$("#outputTable"+b).hide(),$("#outputEditor"+b).hide()),this.deselect(ace.edit("outputEditor"+b)),this.deselect(ace.edit("sentQueryEditor"+b)),this.deselect(ace.edit("sentBindParamEditor"+b))}},downloadQueryResult:function(a){var b=$(a.currentTarget).attr("counter"),c=ace.edit("sentQueryEditor"+b),d=c.getValue();if(""!==d||void 0!==d||null!==d){var e;e=0===Object.keys(this.bindParamTableObj).length?"query/result/download/"+encodeURIComponent(btoa(JSON.stringify({query:d}))):"query/result/download/"+encodeURIComponent(btoa(JSON.stringify({query:d,bindVars:this.bindParamTableObj}))),arangoHelper.download(e)}else arangoHelper.arangoError("Query error","could not query result.")},explainQuery:function(){if(!this.verifyQueryAndParams()){this.$(this.outputDiv).prepend(this.outputTemplate.render({counter:this.outputCounter,type:"Explain"}));var a=this.outputCounter,b=ace.edit("outputEditor"+a),c=ace.edit("sentQueryEditor"+a),d=ace.edit("sentBindParamEditor"+a);c.getSession().setMode("ace/mode/aql"),c.setOption("vScrollBarAlwaysVisible",!0),c.setReadOnly(!0),this.setEditorAutoHeight(c),b.setReadOnly(!0),b.getSession().setMode("ace/mode/json"),b.setOption("vScrollBarAlwaysVisible",!0),this.setEditorAutoHeight(b),d.setValue(JSON.stringify(this.bindParamTableObj),1),d.setOption("vScrollBarAlwaysVisible",!0),d.getSession().setMode("ace/mode/json"),d.setReadOnly(!0),this.setEditorAutoHeight(d),this.fillExplain(b,c,a),this.outputCounter++}},fillExplain:function(a,b,c){b.setValue(this.aqlEditor.getValue(),1);var d=this,e=this.readQueryData();if($("#outputEditorWrapper"+c+" .queryExecutionTime").text(""),this.execPending=!1,e){var f=function(){$("#outputEditorWrapper"+c+" #spinner").remove(),$("#outputEditor"+c).css("opacity","1"),$("#outputEditorWrapper"+c+" .fa-close").show(),$("#outputEditorWrapper"+c+" .switchAce").show()};$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_admin/aardvark/query/explain/"),data:e,contentType:"application/json",processData:!1,success:function(b){b.msg.includes("errorMessage")?(d.removeOutputEditor(c),arangoHelper.arangoError("Explain",b.msg)):(a.setValue(b.msg,1),d.deselect(a),$.noty.clearQueue(),$.noty.closeAll(),d.handleResult(c)),f()},error:function(a){try{var b=JSON.parse(a.responseText);arangoHelper.arangoError("Explain",b.errorMessage)}catch(e){arangoHelper.arangoError("Explain","ERROR")}d.handleResult(c),d.removeOutputEditor(c),f()}})}},removeOutputEditor:function(a){$("#outputEditorWrapper"+a).hide(),$("#outputEditorWrapper"+a).remove(),0===$(".outputEditorWrapper").length&&$("#removeResults").hide()},getCachedQueryAfterRender:function(){var a=this.getCachedQuery(),b=this;if(null!==a&&void 0!==a&&""!==a&&(this.aqlEditor.setValue(a.query,1),this.aqlEditor.getSession().setUndoManager(new ace.UndoManager),""!==a.parameter||void 0!==a))try{b.bindParamTableObj=JSON.parse(a.parameter);var c;_.each($("#arangoBindParamTable input"),function(a){c=$(a).attr("name"),$(a).val(b.bindParamTableObj[c])}),b.setCachedQuery(b.aqlEditor.getValue(),JSON.stringify(b.bindParamTableObj))}catch(d){}},getCachedQuery:function(){if("undefined"!==Storage){var a=localStorage.getItem("cachedQuery");if(void 0!==a){var b=JSON.parse(a);this.currentQuery=b;try{this.bindParamTableObj=JSON.parse(b.parameter)}catch(c){}return b}}},setCachedQuery:function(a,b){if("undefined"!==Storage){var c={query:a,parameter:b};this.currentQuery=c,localStorage.setItem("cachedQuery",JSON.stringify(c))}},closeResult:function(a){var b=$("#"+$(a.currentTarget).attr("element")).parent();$(b).hide("fast",function(){$(b).remove(),0===$(".outputEditorWrapper").length&&$("#removeResults").hide()})},fillSelectBoxes:function(){var a=1e3,b=$("#querySize");b.empty(),[100,250,500,1e3,2500,5e3,1e4,"all"].forEach(function(c){b.append('")})},render:function(){this.$el.html(this.template.render({})),this.afterRender(),this.initDone||(this.settings.aqlWidth=$(".aqlEditorWrapper").width()),this.initDone=!0,this.renderBindParamTable(!0)},afterRender:function(){var a=this;this.initAce(),this.initTables(),this.fillSelectBoxes(),this.makeResizeable(),this.initQueryImport(),this.getCachedQueryAfterRender(),$(".inputEditorWrapper").height($(window).height()/10*5+25),window.setTimeout(function(){a.resize()},10),a.deselect(a.aqlEditor)},showSpotlight:function(a){var b,c;if(void 0!==a&&"click"!==a.type||(a="aql"),"aql"===a)b=function(a){this.aqlEditor.insert(a),$("#aqlEditor .ace_text-input").focus()}.bind(this),c=function(){$("#aqlEditor .ace_text-input").focus()};else{var d=$(":focus");b=function(a){var b=$(d).val();$(d).val(b+a),$(d).focus()},c=function(){$(d).focus()}}window.spotlightView.show(b,c,a)},resize:function(){this.resizeFunction()},resizeFunction:function(){$("#toggleQueries1").is(":visible")?(this.aqlEditor.resize(),$("#arangoBindParamTable thead").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable thead th").css("width",$("#bindParamEditor").width()/2),$("#arangoBindParamTable tr").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody").css("height",$("#aqlEditor").height()-35),$("#arangoBindParamTable tbody").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody tr").css("width",$("#bindParamEditor").width()),$("#arangoBindParamTable tbody td").css("width",$("#bindParamEditor").width()/2)):(this.queryPreview.resize(),$("#arangoMyQueriesTable thead").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable thead th").css("width",$("#queryTable").width()/2),$("#arangoMyQueriesTable tr").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable tbody").css("height",$("#queryTable").height()-35),$("#arangoMyQueriesTable tbody").css("width",$("#queryTable").width()),$("#arangoMyQueriesTable tbody td").css("width",$("#queryTable").width()/2))},makeResizeable:function(){var a=this;$(".aqlEditorWrapper").resizable({resize:function(){a.resizeFunction(),a.settings.aqlWidth=$(".aqlEditorWrapper").width()},handles:"e"}),$(".inputEditorWrapper").resizable({resize:function(){a.resizeFunction()},handles:"s"}),this.resizeFunction()},initTables:function(){this.$(this.bindParamId).html(this.table.render({content:this.bindParamTableDesc})),this.$(this.myQueriesId).html(this.table.render({content:this.myQueriesTableDesc}))},checkType:function(a){var b="stringtype";try{a=JSON.parse(a),b=a instanceof Array?"arraytype":typeof a+"type"}catch(c){}return b},updateBindParams:function(a){var b,c=this;if(a){b=$(a.currentTarget).attr("name"),this.bindParamTableObj[b]=arangoHelper.parseInput(a.currentTarget);var d=["arraytype","objecttype","booleantype","numbertype","stringtype"];_.each(d,function(b){$(a.currentTarget).removeClass(b)}),$(a.currentTarget).addClass(c.checkType($(a.currentTarget).val()))}else _.each($("#arangoBindParamTable input"),function(a){b=$(a).attr("name"),c.bindParamTableObj[b]=arangoHelper.parseInput(a)});this.setCachedQuery(this.aqlEditor.getValue(),JSON.stringify(this.bindParamTableObj)),a&&((a.ctrlKey||a.metaKey)&&13===a.keyCode&&(a.preventDefault(),this.executeQuery()),(a.ctrlKey||a.metaKey)&&32===a.keyCode&&(a.preventDefault(),this.showSpotlight("bind")))},parseQuery:function(a){var b=0,c=1,d=2,e=3,f=4,g=5,h=6,i=7;a+=" ";var j,k,l,m=this,n=b,o=a.length,p=[];for(k=0;o>k;++k)switch(l=a.charAt(k),n){case b:"@"===l?(n=h,j=k):"'"===l?n=c:'"'===l?n=d:"`"===l?n=e:"´"===l?n=i:"/"===l&&o>k+1&&("/"===a.charAt(k+1)?(n=f,++k):"*"===a.charAt(k+1)&&(n=g,++k));break;case f:"\r"!==l&&"\n"!==l||(n=b);break;case g:"*"===l&&o>=k+1&&"/"===a.charAt(k+1)&&(n=b,++k);break;case c:"\\"===l?++k:"'"===l&&(n=b);break;case d:"\\"===l?++k:'"'===l&&(n=b);break;case e:"`"===l&&(n=b);break;case i:"´"===l&&(n=b);break;case h:/^[@a-zA-Z0-9_]+$/.test(l)||(p.push(a.substring(j,k)),n=b,j=void 0)}var q;return _.each(p,function(a,b){q=a.match(m.bindParamRegExp),q&&(p[b]=q[1])}),{query:a,bindParams:p}},checkForNewBindParams:function(){var a=this,b=this.parseQuery(this.aqlEditor.getValue()).bindParams,c={};_.each(b,function(b){a.bindParamTableObj[b]?c[b]=a.bindParamTableObj[b]:c[b]=""}),Object.keys(b).forEach(function(b){Object.keys(a.bindParamTableObj).forEach(function(d){b===d&&(c[b]=a.bindParamTableObj[d])})}),a.bindParamTableObj=c},renderBindParamTable:function(a){$("#arangoBindParamTable tbody").html(""),a&&this.getCachedQuery();var b=0;_.each(this.bindParamTableObj,function(a,c){$("#arangoBindParamTable tbody").append(""+c+"'),b++,_.each($("#arangoBindParamTable input"),function(b){$(b).attr("name")===c&&(a instanceof Array?$(b).val(JSON.stringify(a)).addClass("arraytype"):"object"==typeof a?$(b).val(JSON.stringify(a)).addClass(typeof a+"type"):$(b).val(a).addClass(typeof a+"type"))})}),0===b&&$("#arangoBindParamTable tbody").append('No bind parameters defined.')},fillBindParamTable:function(a){_.each(a,function(a,b){_.each($("#arangoBindParamTable input"),function(c){$(c).attr("name")===b&&$(c).val(a)})})},initAce:function(){var a=this;this.aqlEditor=ace.edit("aqlEditor"),this.aqlEditor.getSession().setMode("ace/mode/aql"),this.aqlEditor.setFontSize("10pt"),this.aqlEditor.setShowPrintMargin(!1),this.bindParamAceEditor=ace.edit("bindParamAceEditor"),this.bindParamAceEditor.getSession().setMode("ace/mode/json"),this.bindParamAceEditor.setFontSize("10pt"),this.bindParamAceEditor.setShowPrintMargin(!1),this.bindParamAceEditor.getSession().on("change",function(){try{a.bindParamTableObj=JSON.parse(a.bindParamAceEditor.getValue()),a.allowParamToggle=!0,a.setCachedQuery(a.aqlEditor.getValue(),JSON.stringify(a.bindParamTableObj))}catch(b){""===a.bindParamAceEditor.getValue()?(_.each(a.bindParamTableObj,function(b,c){a.bindParamTableObj[c]=""}),a.allowParamToggle=!0):a.allowParamToggle=!1}}),this.aqlEditor.getSession().on("change",function(){a.checkForNewBindParams(),a.renderBindParamTable(),a.initDone&&a.setCachedQuery(a.aqlEditor.getValue(),JSON.stringify(a.bindParamTableObj)),a.bindParamAceEditor.setValue(JSON.stringify(a.bindParamTableObj,null," "),1),$("#aqlEditor .ace_text-input").focus(),a.resize()}),this.aqlEditor.commands.addCommand({name:"togglecomment",bindKey:{win:"Ctrl-Shift-C",linux:"Ctrl-Shift-C",mac:"Command-Shift-C"},exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEach"}),this.aqlEditor.commands.addCommand({name:"executeQuery",bindKey:{win:"Ctrl-Return",mac:"Command-Return",linux:"Ctrl-Return"},exec:function(){a.executeQuery()}}),this.aqlEditor.commands.addCommand({name:"executeSelectedQuery",bindKey:{win:"Ctrl-Alt-Return",mac:"Command-Alt-Return",linux:"Ctrl-Alt-Return"},exec:function(){a.executeQuery(!0)}}),this.aqlEditor.commands.addCommand({name:"saveQuery",bindKey:{win:"Ctrl-Shift-S",mac:"Command-Shift-S",linux:"Ctrl-Shift-S"},exec:function(){a.addAQL()}}),this.aqlEditor.commands.addCommand({name:"explainQuery",bindKey:{win:"Ctrl-Shift-Return",mac:"Command-Shift-Return",linux:"Ctrl-Shift-Return"},exec:function(){a.explainQuery()}}),this.aqlEditor.commands.addCommand({name:"togglecomment",bindKey:{win:"Ctrl-Shift-C",linux:"Ctrl-Shift-C",mac:"Command-Shift-C"},exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEach"}),this.aqlEditor.commands.addCommand({name:"showSpotlight",bindKey:{win:"Ctrl-Space",mac:"Ctrl-Space",linux:"Ctrl-Space"},exec:function(){a.showSpotlight()}}),this.queryPreview=ace.edit("queryPreview"),this.queryPreview.getSession().setMode("ace/mode/aql"),this.queryPreview.setReadOnly(!0),this.queryPreview.setFontSize("13px"),$("#aqlEditor .ace_text-input").focus()},updateQueryTable:function(){function a(a,b){var c;return c=a.nameb.name?1:0}var b=this;this.updateLocalQueries(),this.myQueriesTableDesc.rows=this.customQueries,_.each(this.myQueriesTableDesc.rows,function(a){a.secondRow='
    ',a.hasOwnProperty("parameter")&&delete a.parameter,delete a.value}),this.myQueriesTableDesc.rows.sort(a),_.each(this.queries,function(a){a.hasOwnProperty("parameter")&&delete a.parameter,b.myQueriesTableDesc.rows.push({name:a.name,thirdRow:''})}),this.myQueriesTableDesc.unescaped=[!1,!0,!0],this.$(this.myQueriesId).html(this.table.render({content:this.myQueriesTableDesc}))},listenKey:function(a){13===a.keyCode&&"Update"===$("#modalButton1").html()&&this.saveAQL(),this.checkSaveName()},addAQL:function(){this.refreshAQL(!0),this.createCustomQueryModal(),setTimeout(function(){$("#new-query-name").focus()},500)},createCustomQueryModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("new-query-name","Name","",void 0,void 0,!1,[{rule:Joi.string().required(),msg:"No query name given."}])),a.push(window.modalView.createSuccessButton("Save",this.saveAQL.bind(this))),window.modalView.show("modalTable.ejs","Save Query",a,b,void 0,void 0,{"keyup #new-query-name":this.listenKey.bind(this)})},checkSaveName:function(){var a=$("#new-query-name").val();if("Insert Query"===a)return void $("#new-query-name").val("");var b=this.customQueries.some(function(b){return b.name===a});b?($("#modalButton1").removeClass("button-success"),$("#modalButton1").addClass("button-warning"),$("#modalButton1").text("Update")):($("#modalButton1").removeClass("button-warning"),$("#modalButton1").addClass("button-success"),$("#modalButton1").text("Save"))},saveAQL:function(a){a&&a.stopPropagation(),this.refreshAQL();var b=$("#new-query-name").val(),c=this.bindParamTableObj;if(!$("#new-query-name").hasClass("invalid-input")&&""!==b.trim()){var d=this.aqlEditor.getValue(),e=!1;if(_.each(this.customQueries,function(a){return a.name===b?(a.value=d,void(e=!0)):void 0}),e===!0)this.collection.findWhere({name:b}).set("value",d);else{if(""!==c&&void 0!==c||(c="{}"),"string"==typeof c)try{c=JSON.parse(c)}catch(f){arangoHelper.arangoError("Query","Could not parse bind parameter")}this.collection.add({name:b,parameter:c,value:d})}var g=function(a){if(a)arangoHelper.arangoError("Query","Could not save query");else{var b=this;this.collection.fetch({success:function(){b.updateLocalQueries()}})}}.bind(this);this.collection.saveCollectionQueries(g),window.modalView.hide()}},verifyQueryAndParams:function(){var a=!1;0===this.aqlEditor.getValue().length&&(arangoHelper.arangoError("Query","Your query is empty"),a=!0);var b=[];return _.each(this.bindParamTableObj,function(c,d){""===c&&(a=!0,b.push(d))}),b.length>0&&arangoHelper.arangoError("Bind Parameter",JSON.stringify(b)+" not defined."),a},executeQuery:function(a){if(!this.verifyQueryAndParams()){this.$(this.outputDiv).prepend(this.outputTemplate.render({counter:this.outputCounter,type:"Query"})),$("#outputEditorWrapper"+this.outputCounter).hide(),$("#outputEditorWrapper"+this.outputCounter).show("fast");var b=this.outputCounter,c=ace.edit("outputEditor"+b),d=ace.edit("sentQueryEditor"+b),e=ace.edit("sentBindParamEditor"+b);d.getSession().setMode("ace/mode/aql"),d.setOption("vScrollBarAlwaysVisible",!0),d.setFontSize("13px"),d.setReadOnly(!0),this.setEditorAutoHeight(d),c.setFontSize("13px"),c.getSession().setMode("ace/mode/json"),c.setReadOnly(!0),c.setOption("vScrollBarAlwaysVisible",!0),c.setShowPrintMargin(!1),this.setEditorAutoHeight(c),e.setValue(JSON.stringify(this.bindParamTableObj),1),e.setOption("vScrollBarAlwaysVisible",!0),e.getSession().setMode("ace/mode/json"),e.setReadOnly(!0),this.setEditorAutoHeight(e),this.fillResult(c,d,b,a),this.outputCounter++}},readQueryData:function(a){var b=$("#querySize"),c={id:"currentFrontendQuery"};return a?c.query=this.aqlEditor.getSelectedText():c.query=this.aqlEditor.getValue(),"all"===b.val()?c.batchSize=1e6:c.batchSize=parseInt(b.val(),10),Object.keys(this.bindParamTableObj).length>0&&(c.bindVars=this.bindParamTableObj),JSON.stringify(c)},fillResult:function(a,b,c,d){var e=this,f=this.readQueryData(d);f&&(b.setValue(e.aqlEditor.getValue(),1),$.ajax({type:"POST",url:arangoHelper.databaseUrl("/_api/cursor"),headers:{"x-arango-async":"store"},data:f,contentType:"application/json",processData:!1,success:function(b,d,f){f.getResponseHeader("x-arango-async-id")&&e.queryCallbackFunction(f.getResponseHeader("x-arango-async-id"),a,c),$.noty.clearQueue(),$.noty.closeAll(),e.handleResult(c)},error:function(a){try{var b=JSON.parse(a.responseText);arangoHelper.arangoError("["+b.errorNum+"]",b.errorMessage)}catch(d){arangoHelper.arangoError("Query error","ERROR")}e.handleResult(c)}}))},handleResult:function(){var a=this;window.progressView.hide(),$("#removeResults").show(),window.setTimeout(function(){a.aqlEditor.focus()},300),$(".centralRow").animate({scrollTop:$("#queryContent").height()},"fast")},setEditorAutoHeight:function(a){var b=$(".centralRow").height(),c=(b-250)/17;a.setOptions({maxLines:c,minLines:10})},deselect:function(a){var b=a.getSelection(),c=b.lead.row,d=b.lead.column;b.setSelectionRange({start:{row:c,column:d},end:{row:c,column:d}}),a.focus()},queryCallbackFunction:function(a,b,c){var d=this,e=function(a,b){$.ajax({url:arangoHelper.databaseUrl("/_api/job/"+encodeURIComponent(a)+"/cancel"),type:"PUT",success:function(){window.clearTimeout(d.checkQueryTimer),$("#outputEditorWrapper"+b).remove(),arangoHelper.arangoNotification("Query","Query canceled.")}})};$("#outputEditorWrapper"+c+" #cancelCurrentQuery").bind("click",function(){e(a,c)}),$("#outputEditorWrapper"+c+" #copy2aqlEditor").bind("click",function(){$("#toggleQueries1").is(":visible")||d.toggleQueries();var a=ace.edit("sentQueryEditor"+c).getValue(),b=JSON.parse(ace.edit("sentBindParamEditor"+c).getValue());d.aqlEditor.setValue(a,1),d.deselect(d.aqlEditor),Object.keys(b).length>0&&(d.bindParamTableObj=b,d.setCachedQuery(d.aqlEditor.getValue(),JSON.stringify(d.bindParamTableObj)),$("#bindParamEditor").is(":visible")?d.renderBindParamTable():(d.bindParamAceEditor.setValue(JSON.stringify(b),1),d.deselect(d.bindParamAceEditor))),$(".centralRow").animate({scrollTop:0},"fast"),d.resize()}),this.execPending=!1;var f=function(a){var c="";a.extra&&a.extra.warnings&&a.extra.warnings.length>0&&(c+="Warnings:\r\n\r\n", +a.extra.warnings.forEach(function(a){c+="["+a.code+"], '"+a.message+"'\r\n"})),""!==c&&(c+="\r\nResult:\r\n\r\n"),b.setValue(c+JSON.stringify(a.result,void 0,2),1),b.getSession().setScrollTop(0)},g=function(a){f(a),window.progressView.hide();var e=d.analyseQuery(a.result);if(console.log("Using "+e.defaultType+" as data format."),"table"===e.defaultType){$("#outputEditorWrapper"+c+" .arangoToolbarTop").after('
    '),$("#outputTable"+c).show(),d.renderOutputTable(e,c);var g=$(".centralRow").height()-250;$(".outputEditorWrapper .tableWrapper").css("max-height",g),$("#outputEditor"+c).hide()}else"graph"===e.defaultType&&($("#outputEditorWrapper"+c+" .arangoToolbarTop").after('
    '),$("#outputGraph"+c).show(),d.renderOutputGraph(e,c),$("#outputEditor"+c).hide());$("#"+e.defaultType+"-switch").addClass("active").css("display","inline");var h=function(a,b,d){d||(d=""),$("#outputEditorWrapper"+c+" .arangoToolbarTop .pull-left").append(''+a+"")};$("#outputEditorWrapper"+c+" .pull-left #spinner").remove();var i="-";a&&a.extra&&a.extra.stats&&(i=a.extra.stats.executionTime.toFixed(3)+" s"),h(a.result.length+" elements","fa-calculator"),h(i,"fa-clock-o"),a.extra&&a.extra.stats&&(a.extra.stats.writesExecuted>0||a.extra.stats.writesIgnored>0)&&(h(a.extra.stats.writesExecuted+" writes","fa-check-circle positive"),0===a.extra.stats.writesIgnored?h(a.extra.stats.writesIgnored+" writes ignored","fa-check-circle positive","additional"):h(a.extra.stats.writesIgnored+" writes ignored","fa-exclamation-circle warning","additional")),$("#outputEditorWrapper"+c+" .switchAce").show(),$("#outputEditorWrapper"+c+" .fa-close").show(),$("#outputEditor"+c).css("opacity","1"),$("#outputEditorWrapper"+c+" #downloadQueryResult").show(),$("#outputEditorWrapper"+c+" #copy2aqlEditor").show(),$("#outputEditorWrapper"+c+" #cancelCurrentQuery").remove(),d.setEditorAutoHeight(b),d.deselect(b),a.id&&$.ajax({url:"/_api/cursor/"+encodeURIComponent(a.id),type:"DELETE"})},h=function(){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/job/"+encodeURIComponent(a)),contentType:"application/json",processData:!1,success:function(a,b,c){201===c.status?g(a):204===c.status&&(d.checkQueryTimer=window.setTimeout(function(){h()},500))},error:function(a){var b;try{if("Gone"===a.statusText)return arangoHelper.arangoNotification("Query","Query execution aborted."),void d.removeOutputEditor(c);b=JSON.parse(a.responseText),arangoHelper.arangoError("Query",b.errorMessage),b.errorMessage&&(null!==b.errorMessage.match(/\d+:\d+/g)?d.markPositionError(b.errorMessage.match(/'.*'/g)[0],b.errorMessage.match(/\d+:\d+/g)[0]):d.markPositionError(b.errorMessage.match(/\(\w+\)/g)[0]),d.removeOutputEditor(c))}catch(e){if(d.removeOutputEditor(c),409===b.code)return;400!==b.code&&404!==b.code&&arangoHelper.arangoNotification("Query","Successfully aborted.")}window.progressView.hide()}})};h()},analyseQuery:function(a){var b={defaultType:null,original:a,modified:null},c=!1;if(a[0])if(a[0].vertices&&a[0].edges){var d=0,e=0;_.each(a,function(a){a.edges&&(e+=a.edges.length,_.each(a.edges,function(a){a._from&&a._to&&d++}))});var f=d/e*100;f>=95&&(c=!0,b.defaultType="graph",b.graphInfo="object")}else{var g=0,h=a.length;_.each(a,function(a){a._from&&a._to&&g++});var i=g/h*100;i>=95&&(c=!0,b.defaultType="graph",b.graphInfo="array")}if(!c){var j,k=0,l=!0,m={};if(a.length<=1&&(l=!1),l){_.each(a,function(a){j=_.keys(a).length,j>k&&(k=j),_.each(a,function(a,b){m[b]?m[b]=m[b]+1:m[b]=1})});var n;_.each(m,function(b,c){n=b/a.length*100,l!==!1&&95>=n&&(l=!1)})}l&&(c=!0,b.defaultType="table")}return c||(b.defaultType="json"),b},markPositionError:function(a,b){var c;b&&(c=b.split(":")[0],a=a.substr(1,a.length-2));var d=this.aqlEditor.find(a);!d&&b&&(this.aqlEditor.selection.moveCursorToPosition({row:c,column:0}),this.aqlEditor.selection.selectLine()),window.setTimeout(function(){$(".ace_start").first().css("background","rgba(255, 129, 129, 0.7)")},100)},refreshAQL:function(){var a=this,b=function(b){b?arangoHelper.arangoError("Query","Could not reload Queries"):(a.updateLocalQueries(),a.updateQueryTable())},c=function(){a.getSystemQueries(b)};this.getAQL(c)},getSystemQueries:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:"js/arango/aqltemplates.json",contentType:"application/json",processData:!1,success:function(c){a&&a(!1),b.queries=c},error:function(){a&&a(!0),arangoHelper.arangoNotification("Query","Error while loading system templates")}})},updateLocalQueries:function(){var a=this;this.customQueries=[],this.collection.each(function(b){a.customQueries.push({name:b.get("name"),value:b.get("value"),parameter:b.get("parameter")})})},renderOutputTable:function(a,b){var c={id:"outputTableData"+b,titles:[],rows:[]},d=!0,e=[];_.each(a.original,function(a){d===!0&&(c.titles=Object.keys(a),d=!1),_.each(a,function(a){"object"==typeof a&&(a=JSON.stringify(a)),e.push(a)}),c.rows.push(e),e=[]}),$("#outputTable"+b).append(this.table.render({content:c}))},renderOutputGraph:function(a,b){this.graphViewer2=new window.GraphViewer2({name:void 0,documentStore:window.App.arangoDocumentStore,collection:new window.GraphCollection,userConfig:window.App.userConfig,id:"#outputGraph"+b,data:a}),this.graphViewer2.renderAQL()},getAQL:function(a){var b=this;this.collection.fetch({success:function(){var c=localStorage.getItem("customQueries");if(c){var d=JSON.parse(c);_.each(d,function(a){b.collection.add({value:a.value,name:a.name})});var e=function(a){a?arangoHelper.arangoError("Custom Queries","Could not import old local storage queries"):localStorage.removeItem("customQueries")};b.collection.saveCollectionQueries(e)}b.updateLocalQueries(),a&&a()}})}})}(),function(){"use strict";window.ScaleView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("scaleView.ejs"),interval:1e4,knownServers:[],events:{"click #addCoord":"addCoord","click #removeCoord":"removeCoord","click #addDBs":"addDBs","click #removeDBs":"removeDBs"},setCoordSize:function(a){var b=this,c={numberOfCoordinators:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updateTable(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},setDBsSize:function(a){var b=this,c={numberOfDBServers:a};$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",data:JSON.stringify(c),success:function(){b.updateTable(c)},error:function(){arangoHelper.arangoError("Scale","Could not set coordinator size.")}})},addCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!0))},removeCoord:function(){this.setCoordSize(this.readNumberFromID("#plannedCoords",!1,!0))},addDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!0))},removeDBs:function(){this.setDBsSize(this.readNumberFromID("#plannedDBs",!1,!0))},readNumberFromID:function(a,b,c){var d=$(a).html(),e=!1;try{e=JSON.parse(d)}catch(f){}return b&&e++,c&&1!==e&&e--,e},initialize:function(a){var b=this;clearInterval(this.intervalFunction),window.App.isCluster&&(this.dbServers=a.dbServers,this.coordinators=a.coordinators,this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#sNodes"===window.location.hash&&b.coordinators.fetch({success:function(){b.dbServers.fetch({success:function(){b.continueRender(!0)}})}})},this.interval))},render:function(){var a=this,b=function(){var b=function(){a.continueRender()};this.waitForDBServers(b)}.bind(this);this.initDoneCoords?b():this.waitForCoordinators(b),window.arangoHelper.buildNodesSubNav("scale")},continueRender:function(a){var b,c,d=this;b=this.coordinators.toJSON(),c=this.dbServers.toJSON(),this.$el.html(this.template.render({runningCoords:b.length,runningDBs:c.length,plannedCoords:void 0,plannedDBs:void 0,initialized:a})),$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/numberOfServers"),contentType:"application/json",processData:!1,success:function(a){d.updateTable(a)}})},updateTable:function(a){var b='scaling in progress ',c='no scaling process active';a.numberOfCoordinators&&($("#plannedCoords").html(a.numberOfCoordinators),this.coordinators.toJSON().length===a.numberOfCoordinators?$("#statusCoords").html(c):$("#statusCoords").html(b)),a.numberOfDBServers&&($("#plannedDBs").html(a.numberOfDBServers),this.dbServers.toJSON().length===a.numberOfDBServers?$("#statusDBs").html(c):$("#statusDBs").html(b))},waitForDBServers:function(a){var b=this;0===this.dbServers.length?window.setInterval(function(){b.waitForDBServers(a)},300):a()},waitForCoordinators:function(a){var b=this;window.setTimeout(function(){0===b.coordinators.length?b.waitForCoordinators(a):(b.initDoneCoords=!0,a())},200)},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.SettingsView=Backbone.View.extend({el:"#content",initialize:function(a){this.collectionName=a.collectionName,this.model=this.collection},events:{},render:function(){this.breadcrumb(),window.arangoHelper.buildCollectionSubNav(this.collectionName,"Settings"),this.renderSettings()},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("Collection: "+this.collectionName)},unloadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be unloaded."):void 0===a?(this.model.set("status","unloading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","unloaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" unloaded.")}.bind(this);this.model.unloadCollection(a),window.modalView.hide()},loadCollection:function(){var a=function(a){a?arangoHelper.arangoError("Collection error",this.model.get("name")+" could not be loaded."):void 0===a?(this.model.set("status","loading"),this.render()):"#collections"===window.location.hash?(this.model.set("status","loaded"),this.render()):arangoHelper.arangoNotification("Collection "+this.model.get("name")+" loaded.")}.bind(this);this.model.loadCollection(a),window.modalView.hide()},truncateCollection:function(){this.model.truncateCollection(),window.modalView.hide()},deleteCollection:function(){this.model.destroy({error:function(){arangoHelper.arangoError("Could not delete collection.")},success:function(){window.App.navigate("#collections",{trigger:!0})}})},saveModifiedCollection:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c;c=b?this.model.get("name"):$("#change-collection-name").val();var d=this.model.get("status");if("loaded"===d){var e;try{e=JSON.parse(1024*$("#change-collection-size").val()*1024)}catch(f){return arangoHelper.arangoError("Please enter a valid number"),0}var g;try{if(g=JSON.parse($("#change-index-buckets").val()),1>g||parseInt(g,10)!==Math.pow(2,Math.log2(g)))throw new Error("invalid indexBuckets value")}catch(f){return arangoHelper.arangoError("Please enter a valid number of index buckets"),0}var h=function(a){a?arangoHelper.arangoError("Collection error: "+a.responseText):(arangoHelper.arangoNotification("Collection: Successfully changed."),window.App.navigate("#cSettings/"+c,{trigger:!0}))},i=function(a){if(a)arangoHelper.arangoError("Collection error: "+a.responseText);else{var b=$("#change-collection-sync").val();this.model.changeCollection(b,e,g,h)}}.bind(this);frontendConfig.isCluster===!1?this.model.renameCollection(c,i):i()}else if("unloaded"===d)if(this.model.get("name")!==c){var j=function(a,b){a?arangoHelper.arangoError("Collection"+b.responseText):(arangoHelper.arangoNotification("CollectionSuccessfully changed."),window.App.navigate("#cSettings/"+c,{trigger:!0}))};frontendConfig.isCluster===!1?this.model.renameCollection(c,j):j()}else window.modalView.hide()}}.bind(this);window.isCoordinator(a)},renderSettings:function(){var a=function(a,b){if(a)arangoHelper.arangoError("Error","Could not get coordinator info");else{var c=!1;"loaded"===this.model.get("status")&&(c=!0);var d=[],e=[];b||e.push(window.modalView.createTextEntry("change-collection-name","Name",this.model.get("name"),!1,"",!0,[{rule:Joi.string().regex(/^[a-zA-Z]/),msg:"Collection name must always start with a letter."},{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only Symbols "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No collection name given."}]));var f=function(){e.push(window.modalView.createReadOnlyEntry("change-collection-id","ID",this.model.get("id"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-type","Type",this.model.get("type"),"")),e.push(window.modalView.createReadOnlyEntry("change-collection-status","Status",this.model.get("status"),"")),d.push(window.modalView.createDeleteButton("Delete",this.deleteCollection.bind(this))),d.push(window.modalView.createDeleteButton("Truncate",this.truncateCollection.bind(this))),c?d.push(window.modalView.createNotificationButton("Unload",this.unloadCollection.bind(this))):d.push(window.modalView.createNotificationButton("Load",this.loadCollection.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.saveModifiedCollection.bind(this)));var a=["General","Indices"],b=["modalTable.ejs","indicesView.ejs"];window.modalView.show(b,"Modify Collection",d,e,null,null,this.events,null,a,"content"),$($("#infoTab").children()[1]).remove()}.bind(this);if(c){var g=function(a,b){if(a)arangoHelper.arangoError("Collection","Could not fetch properties");else{var c=b.journalSize/1048576,d=b.indexBuckets,g=b.waitForSync;e.push(window.modalView.createTextEntry("change-collection-size","Journal size",c,"The maximal size of a journal or datafile (in MB). Must be at least 1.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[0-9]*$/),msg:"Must be a number."}])),e.push(window.modalView.createTextEntry("change-index-buckets","Index buckets",d,"The number of index buckets for this collection. Must be at least 1 and a power of 2.","",!0,[{rule:Joi.string().allow("").optional().regex(/^[1-9][0-9]*$/),msg:"Must be a number greater than 1 and a power of 2."}])),e.push(window.modalView.createSelectEntry("change-collection-sync","Wait for sync",g,"Synchronize to disk before returning from a create or update of a document.",[{value:!1,label:"No"},{value:!0,label:"Yes"}]))}f()};this.model.getProperties(g)}else f()}}.bind(this);window.isCoordinator(a)}})}(),function(){"use strict";window.ShardsView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("shardsView.ejs"),interval:1e4,knownServers:[],events:{"click #shardsContent .shardLeader span":"moveShard","click #shardsContent .shardFollowers span":"moveShardFollowers","click #rebalanceShards":"rebalanceShards"},initialize:function(a){var b=this;b.dbServers=a.dbServers,clearInterval(this.intervalFunction),window.App.isCluster&&(this.updateServerTime(),this.intervalFunction=window.setInterval(function(){"#shards"===window.location.hash&&b.render(!1)},this.interval))},render:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/shardDistribution"),contentType:"application/json",processData:!1,async:!0,success:function(a){var c,d=!1;b.shardDistribution=a.results,_.each(a.results,function(a,b){c=b.substring(0,1),"_"!==c&&"error"!==b&&"code"!==b&&(d=!0)}),d?b.continueRender(a.results):arangoHelper.renderEmpty("No collections and no shards available")},error:function(a){0!==a.readyState&&arangoHelper.arangoError("Cluster","Could not fetch sharding information.")}}),a!==!1&&arangoHelper.buildNodesSubNav("Shards")},moveShardFollowers:function(a){var b=$(a.currentTarget).html();this.moveShard(a,b)},moveShard:function(a,b){var c,d,e,f,g=this,h=window.App.currentDB.get("name");d=$(a.currentTarget).parent().parent().attr("collection"),e=$(a.currentTarget).parent().parent().attr("shard"),b?(f=$(a.currentTarget).parent().parent().attr("leader"),c=b):c=$(a.currentTarget).parent().parent().attr("leader");var i=[],j=[],k={},l=[];return g.dbServers[0].each(function(a){a.get("name")!==c&&(k[a.get("name")]={value:a.get("name"),label:a.get("name")})}),_.each(g.shardDistribution[d].Plan[e].followers,function(a){delete k[a]}),b&&delete k[f],_.each(k,function(a){l.push(a)}),l=l.reverse(),0===l.length?void arangoHelper.arangoMessage("Shards","No database server for moving the shard is available."):(j.push(window.modalView.createSelectEntry("toDBServer","Destination",void 0,"Please select the target databse server. The selected database server will be the new leader of the shard.",l)),i.push(window.modalView.createSuccessButton("Move",this.confirmMoveShards.bind(this,h,d,e,c))),void window.modalView.show("modalTable.ejs","Move shard: "+e,i,j))},confirmMoveShards:function(a,b,c,d){var e=this,f=$("#toDBServer").val(),g={database:a,collection:b,shard:c,fromServer:d,toServer:f};$.ajax({type:"POST",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/moveShard"),contentType:"application/json",processData:!1,data:JSON.stringify(g),async:!0,success:function(a){a===!0&&(window.setTimeout(function(){e.render(!1)},1500),arangoHelper.arangoNotification("Shard "+c+" will be moved to "+f+"."))},error:function(){arangoHelper.arangoNotification("Shard "+c+" could not be moved to "+f+".")}}),window.modalView.hide()},rebalanceShards:function(){var a=this;$.ajax({type:"POST",cache:!1,url:arangoHelper.databaseUrl("/_admin/cluster/rebalanceShards"),contentType:"application/json",processData:!1,data:JSON.stringify({}),async:!0,success:function(b){b===!0&&(window.setTimeout(function(){a.render(!1)},1500),arangoHelper.arangoNotification("Started rebalance process."))},error:function(){arangoHelper.arangoNotification("Could not start rebalance process.")}}),window.modalView.hide()},continueRender:function(a){delete a.code,delete a.error,this.$el.html(this.template.render({collections:a}))},updateServerTime:function(){this.serverTime=(new Date).getTime()}})}(),function(){"use strict";window.ShowClusterView=Backbone.View.extend({detailEl:"#modalPlaceholder",el:"#content",defaultFrame:12e5,template:templateEngine.createTemplate("showCluster.ejs"),modal:templateEngine.createTemplate("waitModal.ejs"),detailTemplate:templateEngine.createTemplate("detailView.ejs"),events:{"change #selectDB":"updateCollections","change #selectCol":"updateShards","click .dbserver.success":"dashboard","click .coordinator.success":"dashboard"},replaceSVGs:function(){$(".svgToReplace").each(function(){var a=$(this),b=a.attr("id"),c=a.attr("src");$.get(c,function(c){var d=$(c).find("svg");d.attr("id",b).attr("class","icon").removeAttr("xmlns:a"),a.replaceWith(d)},"xml")})},updateServerTime:function(){this.serverTime=(new Date).getTime()},setShowAll:function(){this.graphShowAll=!0},resetShowAll:function(){this.graphShowAll=!1,this.renderLineChart()},initialize:function(a){this.options=a,this.interval=1e4,this.isUpdating=!1,this.timer=null,this.knownServers=[],this.graph=void 0,this.graphShowAll=!1,this.updateServerTime(),this.dygraphConfig=this.options.dygraphConfig,this.dbservers=new window.ClusterServers([],{interval:this.interval}),this.coordinators=new window.ClusterCoordinators([],{interval:this.interval}),this.documentStore=new window.ArangoDocuments,this.statisticsDescription=new window.StatisticsDescription,this.statisticsDescription.fetch({async:!1}),this.dbs=new window.ClusterDatabases([],{interval:this.interval}),this.cols=new window.ClusterCollections,this.shards=new window.ClusterShards,this.startUpdating()},listByAddress:function(a){var b={},c=this;this.dbservers.byAddress(b,function(b){c.coordinators.byAddress(b,a)})},updateCollections:function(){var a=this,b=$("#selectCol"),c=$("#selectDB").find(":selected").attr("id");if(c){var d=b.find(":selected").attr("id");b.html(""),this.cols.getList(c,function(c){_.each(_.pluck(c,"name"),function(a){b.append('")});var e=$("#"+d,b);1===e.length&&e.prop("selected",!0),a.updateShards()})}},updateShards:function(){var a=$("#selectDB").find(":selected").attr("id"),b=$("#selectCol").find(":selected").attr("id");this.shards.getList(a,b,function(a){$(".shardCounter").html("0"),_.each(a,function(a){$("#"+a.server+"Shards").html(a.shards.length)})})},updateServerStatus:function(a){var b=this,c=function(a,b,c){var d,e,f=c;f=f.replace(/\./g,"-"),f=f.replace(/\:/g,"_"),e=$("#id"+f),e.length<1||(d=e.attr("class").split(/\s+/)[1],e.attr("class",a+" "+d+" "+b),"coordinator"===a&&("success"===b?$(".button-gui",e.closest(".tile")).toggleClass("button-gui-disabled",!1):$(".button-gui",e.closest(".tile")).toggleClass("button-gui-disabled",!0)))};this.coordinators.getStatuses(c.bind(this,"coordinator"),function(){b.dbservers.getStatuses(c.bind(b,"dbserver")),a()})},updateDBDetailList:function(){var a=this,b=$("#selectDB"),c=b.find(":selected").attr("id");b.html(""),this.dbs.getList(function(d){_.each(_.pluck(d,"name"),function(a){b.append('")});var e=$("#"+c,b);1===e.length&&e.prop("selected",!0),a.updateCollections()})},rerender:function(){var a=this;this.updateServerStatus(function(){a.getServerStatistics(function(){a.updateServerTime(),a.data=a.generatePieData(),a.renderPieChart(a.data),a.renderLineChart(),a.updateDBDetailList()})})},render:function(){this.knownServers=[],delete this.hist;var a=this;this.listByAddress(function(b){1===Object.keys(b).length?a.type="testPlan":a.type="other",a.updateDBDetailList(),a.dbs.getList(function(c){$(a.el).html(a.template.render({dbs:_.pluck(c,"name"),byAddress:b,type:a.type})),$(a.el).append(a.modal.render({})),a.replaceSVGs(),a.getServerStatistics(function(){a.data=a.generatePieData(),a.renderPieChart(a.data),a.renderLineChart(),a.updateDBDetailList(),a.startUpdating()})})})},generatePieData:function(){var a=[],b=this;return this.data.forEach(function(c){a.push({key:c.get("name"),value:c.get("system").virtualSize,time:b.serverTime})}),a},addStatisticsItem:function(a,b,c,d){var e=this;e.hasOwnProperty("hist")||(e.hist={}),e.hist.hasOwnProperty(a)||(e.hist[a]=[]);var f=e.hist[a],g=f.length;if(0===g)f.push({time:b,snap:d,requests:c,requestsPerSecond:0});else{var h=f[g-1].time,i=f[g-1].requests;if(c>i){var j=b-h,k=0;j>0&&(k=(c-i)/j),f.push({time:b,snap:d,requests:c,requestsPerSecond:k})}}},getServerStatistics:function(a){var b=this,c=Math.round(b.serverTime/1e3);this.data=void 0;var d=new window.ClusterStatisticsCollection,e=this.coordinators.first();this.dbservers.forEach(function(a){if("ok"===a.get("status")){-1===b.knownServers.indexOf(a.id)&&b.knownServers.push(a.id);var c=new window.Statistics({name:a.id});c.url=e.get("protocol")+"://"+e.get("address")+"/_admin/clusterStatistics?DBserver="+a.get("name"),d.add(c)}}),this.coordinators.forEach(function(a){if("ok"===a.get("status")){-1===b.knownServers.indexOf(a.id)&&b.knownServers.push(a.id);var c=new window.Statistics({name:a.id});c.url=a.get("protocol")+"://"+a.get("address")+"/_admin/statistics",d.add(c)}});var f=d.size();this.data=[];var g=function(d){f--;var e=d.get("time"),g=d.get("name"),h=d.get("http").requestsTotal;b.addStatisticsItem(g,e,h,c),b.data.push(d),0===f&&a()},h=function(){f--,0===f&&a()};d.fetch(g,h)},renderPieChart:function(a){var b=$("#clusterGraphs svg").width(),c=$("#clusterGraphs svg").height(),d=Math.min(b,c)/2,e=this.dygraphConfig.colors,f=d3.svg.arc().outerRadius(d-20).innerRadius(0),g=d3.layout.pie().sort(function(a){return a.value}).value(function(a){return a.value});d3.select("#clusterGraphs").select("svg").remove();var h=d3.select("#clusterGraphs").append("svg").attr("class","clusterChart").append("g").attr("transform","translate("+b/2+","+(c/2-10)+")"),i=d3.svg.arc().outerRadius(d-2).innerRadius(d-2),j=h.selectAll(".arc").data(g(a)).enter().append("g").attr("class","slice");j.append("path").attr("d",f).style("fill",function(a,b){return e[b%e.length]}).style("stroke",function(a,b){return e[b%e.length]}),j.append("text").attr("transform",function(a){return"translate("+f.centroid(a)+")"}).style("text-anchor","middle").text(function(a){var b=a.data.value/1024/1024/1024;return b.toFixed(2)}),j.append("text").attr("transform",function(a){return"translate("+i.centroid(a)+")"}).style("text-anchor","middle").text(function(a){return a.data.key})},renderLineChart:function(){var a,b,c,d,e,f,g=this,h=1200,i=[],j=[],k=Math.round((new Date).getTime()/1e3)-h,l=g.knownServers,m=function(){return null};for(c=0;cf||(j.hasOwnProperty(f)?a=j[f]:(e=new Date(1e3*f),a=j[f]=[e].concat(l.map(m))),a[c+1]=b[d].requestsPerSecond);i=[],Object.keys(j).sort().forEach(function(a){i.push(j[a])});var n=this.dygraphConfig.getDefaultConfig("clusterRequestsPerSecond");n.labelsDiv=$("#lineGraphLegend")[0],n.labels=["datetime"].concat(l),g.graph=new Dygraph(document.getElementById("lineGraph"),i,n)},stopUpdating:function(){window.clearTimeout(this.timer),delete this.graph,this.isUpdating=!1},startUpdating:function(){if(!this.isUpdating){this.isUpdating=!0;var a=this;this.timer=window.setInterval(function(){a.rerender()},this.interval)}},dashboard:function(a){this.stopUpdating();var b,c,d=$(a.currentTarget),e={},f=d.attr("id");f=f.replace(/\-/g,"."),f=f.replace(/\_/g,":"),f=f.substr(2),e.raw=f,e.isDBServer=d.hasClass("dbserver"),e.isDBServer?(b=this.dbservers.findWhere({address:e.raw}),c=this.coordinators.findWhere({status:"ok"}),e.endpoint=c.get("protocol")+"://"+c.get("address")):(b=this.coordinators.findWhere({address:e.raw}),e.endpoint=b.get("protocol")+"://"+b.get("address")),e.target=encodeURIComponent(b.get("name")),window.App.serverToShow=e,window.App.dashboard()},getCurrentSize:function(a){"#"!==a.substr(0,1)&&(a="#"+a);var b,c;return $(a).attr("style",""),b=$(a).height(),c=$(a).width(),{height:b,width:c}},resize:function(){var a;this.graph&&(a=this.getCurrentSize(this.graph.maindiv_.id),this.graph.resize(a.width,a.height))}})}(),function(){"use strict";window.SpotlightView=Backbone.View.extend({template:templateEngine.createTemplate("spotlightView.ejs"),el:"#spotlightPlaceholder",displayLimit:8,typeahead:null,callbackSuccess:null,callbackCancel:null,collections:{system:[],doc:[],edge:[]},events:{"focusout #spotlight .tt-input":"hide","keyup #spotlight .typeahead":"listenKey"},aqlKeywordsArray:[],aqlBuiltinFunctionsArray:[],aqlKeywords:"for|return|filter|sort|limit|let|collect|asc|desc|in|into|insert|update|remove|replace|upsert|options|with|and|or|not|distinct|graph|outbound|inbound|any|all|none|aggregate|like|count|shortest_path",hide:function(){this.typeahead=$("#spotlight .typeahead").typeahead("destroy"),$(this.el).hide()},listenKey:function(a){if(27===a.keyCode)this.callbackSuccess&&this.callbackCancel(),this.hide();else if(13===a.keyCode&&this.callbackSuccess){var b=$(this.typeahead).val();this.callbackSuccess(b),this.hide()}},substringMatcher:function(a){return function(b,c){var d,e;d=[],e=new RegExp(b,"i"),_.each(a,function(a){e.test(a)&&d.push(a)}),c(d)}},updateDatasets:function(){var a=this;this.collections={system:[],doc:[],edge:[]},window.App.arangoCollectionsStore.each(function(b){b.get("isSystem")?a.collections.system.push(b.get("name")):"document"===b.get("type")?a.collections.doc.push(b.get("name")):a.collections.edge.push(b.get("name"))})},stringToArray:function(){var a=this;_.each(this.aqlKeywords.split("|"),function(b){a.aqlKeywordsArray.push(b.toUpperCase())}),a.aqlKeywordsArray.push(!0),a.aqlKeywordsArray.push(!1),a.aqlKeywordsArray.push(null)},fetchKeywords:function(a){var b=this;$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/aql-builtin"),contentType:"application/json",success:function(c){b.stringToArray(),b.updateDatasets(),_.each(c.functions,function(a){b.aqlBuiltinFunctionsArray.push(a.name)}),a&&a()},error:function(){a&&a(),arangoHelper.arangoError("AQL","Could not fetch AQL function definition.")}})},show:function(a,b,c){var d=this;this.callbackSuccess=a,this.callbackCancel=b;var e=function(){var a=function(a,b,c){var d='

    '+a+"

    ";return b&&(d+=''),c&&(d+=''+c.toUpperCase()+""),d+="
    "};$(this.el).html(this.template.render({})),$(this.el).show(),"aql"===c?this.typeahead=$("#spotlight .typeahead").typeahead({hint:!0,highlight:!0,minLength:1},{name:"Functions",source:d.substringMatcher(d.aqlBuiltinFunctionsArray),limit:d.displayLimit,templates:{header:a("Functions","fa-code","aql")}},{name:"Keywords",source:d.substringMatcher(d.aqlKeywordsArray),limit:d.displayLimit,templates:{header:a("Keywords","fa-code","aql")}},{name:"Documents",source:d.substringMatcher(d.collections.doc),limit:d.displayLimit,templates:{header:a("Documents","fa-file-text-o","Collection")}},{name:"Edges",source:d.substringMatcher(d.collections.edge),limit:d.displayLimit,templates:{header:a("Edges","fa-share-alt","Collection")}},{name:"System",limit:d.displayLimit,source:d.substringMatcher(d.collections.system),templates:{header:a("System","fa-cogs","Collection")}}):this.typeahead=$("#spotlight .typeahead").typeahead({hint:!0,highlight:!0,minLength:1},{name:"Documents",source:d.substringMatcher(d.collections.doc),limit:d.displayLimit,templates:{header:a("Documents","fa-file-text-o","Collection")}},{name:"Edges",source:d.substringMatcher(d.collections.edge),limit:d.displayLimit,templates:{header:a("Edges","fa-share-alt","Collection")}},{name:"System",limit:d.displayLimit,source:d.substringMatcher(d.collections.system),templates:{header:a("System","fa-cogs","Collection")}}),$("#spotlight .typeahead").focus()}.bind(this);0===d.aqlBuiltinFunctionsArray.length?this.fetchKeywords(e):e()}})}(),function(){"use strict";window.StatisticBarView=Backbone.View.extend({el:"#statisticBar",events:{"change #arangoCollectionSelect":"navigateBySelect","click .tab":"navigateByTab"},template:templateEngine.createTemplate("statisticBarView.ejs"),initialize:function(a){this.currentDB=a.currentDB},replaceSVG:function(a){var b=a.attr("id"),c=a.attr("class"),d=a.attr("src");$.get(d,function(d){var e=$(d).find("svg");void 0===b&&(e=e.attr("id",b)),void 0===c&&(e=e.attr("class",c+" replaced-svg")),e=e.removeAttr("xmlns:a"),a.replaceWith(e)},"xml")},render:function(){var a=this;return $(this.el).html(this.template.render({isSystem:this.currentDB.get("isSystem")})),$("img.svg").each(function(){a.replaceSVG($(this))}),this},navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},navigateByTab:function(a){var b=a.target||a.srcElement,c=b.id;return"links"===c?($("#link_dropdown").slideToggle(200),void a.preventDefault()):"tools"===c?($("#tools_dropdown").slideToggle(200),void a.preventDefault()):(window.App.navigate(c,{trigger:!0}),void a.preventDefault())},handleSelectNavigation:function(){$("#arangoCollectionSelect").change(function(){var a=$(this).find("option:selected").val();window.App.navigate(a,{trigger:!0})})},selectMenuItem:function(a){$(".navlist li").removeClass("active"),a&&$("."+a).addClass("active")}})}(),function(){"use strict";window.SupportView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("supportView.ejs"),events:{"click .subViewNavbar .subMenuEntry":"toggleViews"},render:function(){this.$el.html(this.template.render({}))},resize:function(a){a?$(".innerContent").css("height","auto"):$(".innerContent").height($(".centralRow").height()-170)},renderSwagger:function(){var a=window.location.pathname.split("/"),b=window.location.protocol+"//"+window.location.hostname+":"+window.location.port+"/"+a[1]+"/"+a[2]+"/_admin/aardvark/api/index.html";$("#swagger").html(""),$("#swagger").append('')}, +toggleViews:function(a){var b=this,c=a.currentTarget.id.split("-")[0],d=["community","documentation","swagger"];_.each(d,function(a){c!==a?$("#"+a).hide():("swagger"===c?(b.renderSwagger(),$("#swagger iframe").css("height","100%"),$("#swagger iframe").css("width","100%"),$("#swagger iframe").css("margin-top","-13px"),b.resize()):b.resize(!0),$("#"+a).show())}),$(".subMenuEntries").children().removeClass("active"),$("#"+c+"-support").addClass("active")}})}(),function(){"use strict";window.TableView=Backbone.View.extend({template:templateEngine.createTemplate("tableView.ejs"),loading:templateEngine.createTemplate("loadingTableView.ejs"),initialize:function(a){this.rowClickCallback=a.rowClick},events:{"click .pure-table-body .pure-table-row":"rowClick","click .deleteButton":"removeClick"},rowClick:function(a){this.hasOwnProperty("rowClickCallback")&&this.rowClickCallback(a)},removeClick:function(a){this.hasOwnProperty("removeClickCallback")&&(this.removeClickCallback(a),a.stopPropagation())},setRowClick:function(a){this.rowClickCallback=a},setRemoveClick:function(a){this.removeClickCallback=a},render:function(){$(this.el).html(this.template.render({docs:this.collection}))},drawLoading:function(){$(this.el).html(this.loading.render({}))}})}(),function(){"use strict";window.UserBarView=Backbone.View.extend({events:{"change #userBarSelect":"navigateBySelect","click .tab":"navigateByTab","mouseenter .dropdown":"showDropdown","mouseleave .dropdown":"hideDropdown","click #userLogoutIcon":"userLogout","click #userLogout":"userLogout"},initialize:function(a){this.userCollection=a.userCollection,this.userCollection.fetch({cache:!1,async:!0}),this.userCollection.bind("change:extra",this.render.bind(this))},template:templateEngine.createTemplate("userBarView.ejs"),navigateBySelect:function(){var a=$("#arangoCollectionSelect").find("option:selected").val();window.App.navigate(a,{trigger:!0})},navigateByTab:function(a){var b=a.target||a.srcElement;b=$(b).closest("a");var c=b.attr("id");return"user"===c?($("#user_dropdown").slideToggle(200),void a.preventDefault()):(window.App.navigate(c,{trigger:!0}),void a.preventDefault())},toggleUserMenu:function(){$("#userBar .subBarDropdown").toggle()},showDropdown:function(){$("#user_dropdown").fadeIn(1)},hideDropdown:function(){$("#user_dropdown").fadeOut(1)},render:function(){if(frontendConfig.authenticationEnabled!==!1){var a=this,b=function(a,b){if(a)arangoHelper.arangoErro("User","Could not fetch user.");else{var c=null,d=null,e=!1,f=null;if(b!==!1)return f=this.userCollection.findWhere({user:b}),f.set({loggedIn:!0}),d=f.get("extra").name,c=f.get("extra").img,e=f.get("active"),c=c?"https://s.gravatar.com/avatar/"+c+"?s=80":"img/default_user.png",d||(d=""),this.$el=$("#userBar"),this.$el.html(this.template.render({img:c,name:d,username:b,active:e})),this.delegateEvents(),this.$el}}.bind(this);$("#userBar").on("click",function(){a.toggleUserMenu()}),this.userCollection.whoAmI(b)}},userLogout:function(){var a=function(a){a?arangoHelper.arangoError("User","Logout error"):this.userCollection.logout()}.bind(this);this.userCollection.whoAmI(a)}})}(),function(){"use strict";window.UserManagementView=Backbone.View.extend({el:"#content",el2:"#userManagementThumbnailsIn",template:templateEngine.createTemplate("userManagementView.ejs"),events:{"click #createUser":"createUser","click #submitCreateUser":"submitCreateUser","click #userManagementThumbnailsIn .tile":"editUser","click #submitEditUser":"submitEditUser","click #userManagementToggle":"toggleView","keyup #userManagementSearchInput":"search","click #userManagementSearchSubmit":"search","click #callEditUserPassword":"editUserPassword","click #submitEditUserPassword":"submitEditUserPassword","click #submitEditCurrentUserProfile":"submitEditCurrentUserProfile","click .css-label":"checkBoxes","change #userSortDesc":"sorting"},dropdownVisible:!1,initialize:function(){var a=this,b=function(a,b){frontendConfig.authenticationEnabled===!0&&(a||null===b?arangoHelper.arangoError("User","Could not fetch user data"):this.currentUser=this.collection.findWhere({user:b}))}.bind(this);this.collection.fetch({cache:!1,success:function(){a.collection.whoAmI(b)}})},checkBoxes:function(a){var b=a.currentTarget.id;$("#"+b).click()},sorting:function(){$("#userSortDesc").is(":checked")?this.collection.setSortingDesc(!0):this.collection.setSortingDesc(!1),$("#userManagementDropdown").is(":visible")?this.dropdownVisible=!0:this.dropdownVisible=!1,this.render()},render:function(a){var b=!1;$("#userManagementDropdown").is(":visible")&&(b=!0);var c=function(){this.collection.sort(),$(this.el).html(this.template.render({collection:this.collection,searchString:""})),b===!0&&($("#userManagementDropdown2").show(),$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown").show()),a&&this.editCurrentUser(),arangoHelper.setCheckboxStatus("#userManagementDropdown")}.bind(this);return this.collection.fetch({cache:!1,success:function(){c()}}),this},search:function(){var a,b,c,d;a=$("#userManagementSearchInput"),b=$("#userManagementSearchInput").val(),d=this.collection.filter(function(a){return-1!==a.get("user").indexOf(b)}),$(this.el).html(this.template.render({collection:d,searchString:b})),a=$("#userManagementSearchInput"),c=a.val().length,a.focus(),a[0].setSelectionRange(c,c)},createUser:function(a){a.preventDefault(),this.createCreateUserModal()},submitCreateUser:function(){var a=this,b=$("#newUsername").val(),c=$("#newName").val(),d=$("#newPassword").val(),e=$("#newStatus").is(":checked");if(this.validateUserInfo(c,b,d,e)){var f={user:b,passwd:d,active:e,extra:{name:c}};this.collection.create(f,{wait:!0,error:function(a,b){arangoHelper.parseError("User",b,a)},success:function(){a.updateUserManagement(),window.modalView.hide()}})}},validateUserInfo:function(a,b,c,d){return""===b?(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1):!0},updateUserManagement:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})},editUser:function(a){if("createUser"!==$(a.currentTarget).find("a").attr("id")){$(a.currentTarget).hasClass("tile")&&(a.currentTarget=$(a.currentTarget).find("img")),this.collection.fetch({cache:!1});var b=this.evaluateUserName($(a.currentTarget).attr("id"),"_edit-user");""===b&&(b=$(a.currentTarget).attr("id")),window.App.navigate("user/"+encodeURIComponent(b),{trigger:!0})}},toggleView:function(){$("#userSortDesc").attr("checked",this.collection.sortOptions.desc),$("#userManagementToggle").toggleClass("activated"),$("#userManagementDropdown2").slideToggle(200)},createCreateUserModal:function(){var a=[],b=[];b.push(window.modalView.createTextEntry("newUsername","Username","",!1,"Username",!0,[{rule:Joi.string().regex(/^[a-zA-Z0-9\-_]*$/),msg:'Only symbols, "_" and "-" are allowed.'},{rule:Joi.string().required(),msg:"No username given."}])),b.push(window.modalView.createTextEntry("newName","Name","",!1,"Name",!1)),b.push(window.modalView.createPasswordEntry("newPassword","Password","",!1,"",!1)),b.push(window.modalView.createCheckboxEntry("newStatus","Active","active",!1,!0)),a.push(window.modalView.createSuccessButton("Create",this.submitCreateUser.bind(this))),window.modalView.show("modalTable.ejs","Create New User",a,b)},evaluateUserName:function(a,b){if(a){var c=a.lastIndexOf(b);return a.substring(0,c)}},updateUserProfile:function(){var a=this;this.collection.fetch({cache:!1,success:function(){a.render()}})}})}(),function(){"use strict";window.UserPermissionView=Backbone.View.extend({el:"#content",template:templateEngine.createTemplate("userPermissionView.ejs"),initialize:function(a){this.username=a.username},events:{'click #userPermissionView [type="checkbox"]':"setPermission"},render:function(){var a=this;this.collection.fetch({success:function(){a.continueRender()}})},setPermission:function(a){var b=$(a.currentTarget).is(":checked"),c=$(a.currentTarget).attr("name");b?this.grantPermission(this.currentUser.get("user"),c):this.revokePermission(this.currentUser.get("user"),c)},grantPermission:function(a,b){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database/"+encodeURIComponent(b)),contentType:"application/json",data:JSON.stringify({grant:"rw"})})},revokePermission:function(a,b){$.ajax({type:"PUT",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a)+"/database/"+encodeURIComponent(b)),contentType:"application/json"})},continueRender:function(){var a=this;this.currentUser=this.collection.findWhere({user:this.username}),this.breadcrumb(),arangoHelper.buildUserSubNav(this.currentUser.get("user"),"Permissions");var b=arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a.currentUser.get("user"))+"/database");"_system"===frontendConfig.db&&(b=arangoHelper.databaseUrl("/_api/user/root/database")),$.ajax({type:"GET",url:b,contentType:"application/json",success:function(b){var c=b.result;$.ajax({type:"GET",url:arangoHelper.databaseUrl("/_api/user/"+encodeURIComponent(a.currentUser.get("user"))+"/database"),contentType:"application/json",success:function(b){var d=b.result;if(c._system){var e=[];_.each(c,function(a,b){e.push(b)}),c=e}a.finishRender(c,d)}})}})},finishRender:function(a,b){_.each(b,function(a,c){"rw"!==a&&delete b[c]}),$(this.el).html(this.template.render({allDBs:a,permissions:b}))},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("User: "+this.currentUser.get("user"))}})}(),function(){"use strict";window.UserView=Backbone.View.extend({el:"#content",initialize:function(a){this.username=a.username},render:function(){var a=this;this.collection.fetch({success:function(){a.continueRender()}})},editCurrentUser:function(){this.createEditCurrentUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("extra").img)},continueRender:function(){this.breadcrumb(),this.currentUser=this.collection.findWhere({user:this.username}),arangoHelper.buildUserSubNav(this.currentUser.get("user"),"General"),this.currentUser.get("loggedIn")?this.editCurrentUser():this.createEditUserModal(this.currentUser.get("user"),this.currentUser.get("extra").name,this.currentUser.get("active"))},createEditUserPasswordModal:function(){var a=[],b=[];b.push(window.modalView.createPasswordEntry("newCurrentPassword","New Password","",!1,"new password",!1)),b.push(window.modalView.createPasswordEntry("confirmCurrentPassword","Confirm New Password","",!1,"confirm new password",!1)),a.push(window.modalView.createSuccessButton("Save",this.submitEditUserPassword.bind(this))),window.modalView.show("modalTable.ejs","Edit User Password",a,b)},createEditCurrentUserModal:function(a,b,c){var d=[],e=[];e.push(window.modalView.createReadOnlyEntry("id_username","Username",a)),e.push(window.modalView.createTextEntry("editCurrentName","Name",b,!1,"Name",!1)),e.push(window.modalView.createTextEntry("editCurrentUserProfileImg","Gravatar account (Mail)",c,"Mailaddress or its md5 representation of your gravatar account.The address will be converted into a md5 string. Only the md5 string will be stored, not the mailaddress.","myAccount(at)gravatar.com")),d.push(window.modalView.createNotificationButton("Change Password",this.editUserPassword.bind(this))),d.push(window.modalView.createSuccessButton("Save",this.submitEditCurrentUserProfile.bind(this))),window.modalView.show("modalTable.ejs","Edit User Profile",d,e,null,null,this.events,null,null,"content")},parseImgString:function(a){return-1===a.indexOf("@")?a:CryptoJS.MD5(a).toString()},createEditUserModal:function(a,b,c){var d,e;e=[{type:window.modalView.tables.READONLY,label:"Username",value:_.escape(a)},{type:window.modalView.tables.TEXT,label:"Name",value:b,id:"editName",placeholder:"Name"},{type:window.modalView.tables.CHECKBOX,label:"Active",value:"active",checked:c,id:"editStatus"}],d=[{title:"Delete",type:window.modalView.buttons.DELETE,callback:this.submitDeleteUser.bind(this,a)},{title:"Change Password",type:window.modalView.buttons.NOTIFICATION,callback:this.createEditUserPasswordModal.bind(this,a)},{title:"Save",type:window.modalView.buttons.SUCCESS,callback:this.submitEditUser.bind(this,a)}],window.modalView.show("modalTable.ejs","Edit User",d,e,null,null,this.events,null,null,"content")},validateStatus:function(a){return""!==a},submitDeleteUser:function(a){var b=this.collection.findWhere({user:a});b.destroy({wait:!0}),window.App.navigate("#users",{trigger:!0})},submitEditCurrentUserProfile:function(){var a=$("#editCurrentName").val(),b=$("#editCurrentUserProfileImg").val();b=this.parseImgString(b);var c=function(a){a?arangoHelper.arangoError("User","Could not edit user settings"):(arangoHelper.arangoNotification("User","Changes confirmed."),this.updateUserProfile())}.bind(this);this.currentUser.setExtras(a,b,c),window.modalView.hide()},submitEditUserPassword:function(){var a=$("#newCurrentPassword").val(),b=$("#confirmCurrentPassword").val();$("#newCurrentPassword").val(""),$("#confirmCurrentPassword").val(""),$("#newCurrentPassword").closest("th").css("backgroundColor","white"),$("#confirmCurrentPassword").closest("th").css("backgroundColor","white");var c=!1;a!==b&&(arangoHelper.arangoError("User","New passwords do not match."),c=!0),c||(this.currentUser.setPassword(a),arangoHelper.arangoNotification("User","Password changed."),window.modalView.hide())},validateUsername:function(a){return""===a?(arangoHelper.arangoError("You have to define an username"),$("#newUsername").closest("th").css("backgroundColor","red"),!1):a.match(/^[a-zA-Z][a-zA-Z0-9_\-]*$/)?!0:(arangoHelper.arangoError("Wrong Username","Username may only contain numbers, letters, _ and -"),!1)},editUserPassword:function(){window.modalView.hide(),this.createEditUserPasswordModal()},validateName:function(a){return""===a?!0:a.match(/^[a-zA-Z][a-zA-Z0-9_\-\ ]*$/)?!0:(arangoHelper.arangoError("Wrong Username","Username may only contain numbers, letters, _ and -"),!1)},submitEditUser:function(a){var b=$("#editName").val(),c=$("#editStatus").is(":checked");if(!this.validateStatus(c))return void $("#editStatus").closest("th").css("backgroundColor","red");if(!this.validateName(b))return void $("#editName").closest("th").css("backgroundColor","red");var d=this.collection.findWhere({user:a});d.save({extra:{name:b},active:c},{type:"PATCH",success:function(){arangoHelper.arangoNotification("User",d.get("user")+" updated.")},error:function(){arangoHelper.arangoError("User","Could not update "+d.get("user")+".")}})},breadcrumb:function(){$("#subNavigationBar .breadcrumb").html("User: "+this.username)}})}(),function(){"use strict";window.WorkMonitorView=Backbone.View.extend({el:"#content",id:"#workMonitorContent",template:templateEngine.createTemplate("workMonitorView.ejs"),table:templateEngine.createTemplate("arangoTable.ejs"),initialize:function(){},events:{},tableDescription:{id:"workMonitorTable",titles:["Type","Database","Task ID","Started","Url","User","Description","Method"],rows:[],unescaped:[!1,!1,!1,!1,!1,!1,!1,!1]},render:function(){var a=this;this.$el.html(this.template.render({})),this.collection.fetch({success:function(){a.parseTableData(),$(a.id).append(a.table.render({content:a.tableDescription}))}})},parseTableData:function(){var a=this;this.collection.each(function(b){if("AQL query"===b.get("type")){var c=b.get("parent");if(c)try{a.tableDescription.rows.push([b.get("type"),"(p) "+c.database,"(p) "+c.taskId,"(p) "+c.startTime,"(p) "+c.url,"(p) "+c.user,b.get("description"),"(p) "+c.method])}catch(d){console.log("some parse error")}}else"thread"!==b.get("type")&&a.tableDescription.rows.push([b.get("type"),b.get("database"),b.get("taskId"),b.get("startTime"),b.get("url"),b.get("user"),b.get("description"),b.get("method")])})}})}(),function(){"use strict";window.Router=Backbone.Router.extend({toUpdate:[],dbServers:[],isCluster:void 0,routes:{"":"cluster",dashboard:"dashboard",collections:"collections","new":"newCollection",login:"login","collection/:colid/documents/:pageid":"documents","cIndices/:colname":"cIndices","cSettings/:colname":"cSettings","cInfo/:colname":"cInfo","collection/:colid/:docid":"document",shell:"shell",queries:"query",workMonitor:"workMonitor",databases:"databases",settings:"databases",services:"applications","service/:mount":"applicationDetail",graphs:"graphManagement","graphs/:name":"showGraph",users:"userManagement","user/:name":"userView","user/:name/permission":"userPermissionView",userProfile:"userProfile",cluster:"cluster",nodes:"nodes",shards:"shards","node/:name":"node",logs:"logs",helpus:"helpUs","graph2/:name":"graph2","graph2/:name/settings":"graph2settings",support:"support"},execute:function(a,b){$("#subNavigationBar .breadcrumb").html(""),$("#subNavigationBar .bottom").html(""),$("#loadingScreen").hide(),$("#content").show(),a&&a.apply(this,b),this.graphViewer2&&this.graphViewer2.graphSettingsView&&this.graphViewer2.graphSettingsView.hide()},listenerFunctions:{},listener:function(a){_.each(window.App.listenerFunctions,function(b,c){b(a)})},checkUser:function(){var a=this;if("#login"!==window.location.hash){var b=function(){this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show()}.bind(this),c=function(c,d){frontendConfig.authenticationEnabled?(a.currentUser=d,c||null===d?"#login"!==window.location.hash&&this.navigate("login",{trigger:!0}):b()):b()}.bind(this);frontendConfig.authenticationEnabled?this.userCollection.whoAmI(c):(this.initOnce(),$(".bodyWrapper").show(),$(".navbar").show())}},waitForInit:function(a,b,c){this.initFinished?(b||a(!0),b&&!c&&a(b,!0),b&&c&&a(b,c,!0)):setTimeout(function(){b||a(!1),b&&!c&&a(b,!1),b&&c&&a(b,c,!1)},350)},initFinished:!1,initialize:function(){frontendConfig.isCluster===!0&&(this.isCluster=!0),document.addEventListener("keyup",this.listener,!1),window.modalView=new window.ModalView,this.foxxList=new window.FoxxCollection,window.foxxInstallView=new window.FoxxInstallView({collection:this.foxxList}),window.progressView=new window.ProgressView;var a=this;this.userCollection=new window.ArangoUsers,this.initOnce=function(){this.initOnce=function(){};var b=function(b,c){a=this,c===!0&&a.coordinatorCollection.fetch({success:function(){a.fetchDBS()}}),b&&console.log(b)}.bind(this);window.isCoordinator(b),frontendConfig.isCluster===!1&&(this.initFinished=!0),this.arangoDatabase=new window.ArangoDatabase,this.currentDB=new window.CurrentDatabase,this.arangoCollectionsStore=new window.ArangoCollections,this.arangoDocumentStore=new window.ArangoDocument,this.coordinatorCollection=new window.ClusterCoordinators,arangoHelper.setDocumentStore(this.arangoDocumentStore),this.arangoCollectionsStore.fetch({cache:!1}),window.spotlightView=new window.SpotlightView({collection:this.arangoCollectionsStore}),this.footerView=new window.FooterView({collection:a.coordinatorCollection}),this.notificationList=new window.NotificationCollection,this.currentDB.fetch({cache:!1,success:function(){a.naviView=new window.NavigationView({database:a.arangoDatabase,currentDB:a.currentDB,notificationCollection:a.notificationList,userCollection:a.userCollection,isCluster:a.isCluster}),a.naviView.render()}}),this.queryCollection=new window.ArangoQueries,this.footerView.render(),window.checkVersion(),this.userConfig=new window.UserConfig,this.userConfig.fetch(),this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})}.bind(this),$(window).resize(function(){a.handleResize()}),$(window).scroll(function(){})},handleScroll:function(){$(window).scrollTop()>50?($(".navbar > .secondary").css("top",$(window).scrollTop()),$(".navbar > .secondary").css("position","absolute"),$(".navbar > .secondary").css("z-index","10"),$(".navbar > .secondary").css("width",$(window).width())):($(".navbar > .secondary").css("top","0"),$(".navbar > .secondary").css("position","relative"),$(".navbar > .secondary").css("width",""))},cluster:function(a){return this.checkUser(),a?this.isCluster===!1||void 0===this.isCluster?void("_system"===this.currentDB.get("name")?(this.routes[""]="dashboard",this.navigate("#dashboard",{trigger:!0})):(this.routes[""]="collections",this.navigate("#collections",{trigger:!0}))):(this.clusterView||(this.clusterView=new window.ClusterView({coordinators:this.coordinatorCollection,dbServers:this.dbServers})),void this.clusterView.render()):void this.waitForInit(this.cluster.bind(this))},node:function(a,b){return this.checkUser(),b&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodeView||(this.nodeView=new window.NodeView({coordname:a,coordinators:this.coordinatorCollection,dbServers:this.dbServers})),void this.nodeView.render()):void this.waitForInit(this.node.bind(this),a)},shards:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.shardsView||(this.shardsView=new window.ShardsView({dbServers:this.dbServers})),void this.shardsView.render()):void this.waitForInit(this.shards.bind(this))},nodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodesView=new window.NodesView2({}),void this.nodesView.render()):void this.waitForInit(this.nodes.bind(this))},cNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"coordinator"}),void this.nodesView.render()):void this.waitForInit(this.cNodes.bind(this))},dNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):0===this.dbServers.length?void this.navigate("#cNodes",{trigger:!0}):(this.nodesView=new window.NodesView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0],toRender:"dbserver"}),void this.nodesView.render()):void this.waitForInit(this.dNodes.bind(this))},sNodes:function(a){return this.checkUser(),a&&void 0!==this.isCluster?this.isCluster===!1?(this.routes[""]="dashboard",void this.navigate("#dashboard",{trigger:!0})):(this.scaleView=new window.ScaleView({coordinators:this.coordinatorCollection,dbServers:this.dbServers[0]}),void this.scaleView.render()):void this.waitForInit(this.sNodes.bind(this))},addAuth:function(a){var b=this.clusterPlan.get("user");if(!b)return a.abort(),void(this.isCheckingUser||this.requestAuth());var c=b.name,d=b.passwd,e=c.concat(":",d);a.setRequestHeader("Authorization","Basic "+btoa(e))},logs:function(a,b){if(this.checkUser(),!b)return void this.waitForInit(this.logs.bind(this),a);if(!this.logsView){var c=new window.ArangoLogs({upto:!0,loglevel:4}),d=new window.ArangoLogs({loglevel:4}),e=new window.ArangoLogs({loglevel:3}),f=new window.ArangoLogs({loglevel:2}),g=new window.ArangoLogs({loglevel:1});this.logsView=new window.LogsView({logall:c,logdebug:d,loginfo:e,logwarning:f,logerror:g})}this.logsView.render()},applicationDetail:function(a,b){if(this.checkUser(),!b)return void this.waitForInit(this.applicationDetail.bind(this),a);var c=function(){this.hasOwnProperty("applicationDetailView")||(this.applicationDetailView=new window.ApplicationDetailView({model:this.foxxList.get(decodeURIComponent(a))})),this.applicationDetailView.model=this.foxxList.get(decodeURIComponent(a)),this.applicationDetailView.render("swagger")}.bind(this);0===this.foxxList.length?this.foxxList.fetch({cache:!1,success:function(){c()}}):c()},login:function(){var a=function(a,b){this.loginView||(this.loginView=new window.LoginView({collection:this.userCollection})),a||null===b?this.loginView.render():this.loginView.render(!0)}.bind(this);this.userCollection.whoAmI(a)},collections:function(a){if(this.checkUser(),!a)return void this.waitForInit(this.collections.bind(this));var b=this;this.collectionsView||(this.collectionsView=new window.CollectionsView({collection:this.arangoCollectionsStore})),this.arangoCollectionsStore.fetch({cache:!1,success:function(){b.collectionsView.render()}})},cIndices:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.indicesView=new window.IndicesView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.indicesView.render()}}):void this.waitForInit(this.cIndices.bind(this),a)},cSettings:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.settingsView=new window.SettingsView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.settingsView.render()}}):void this.waitForInit(this.cSettings.bind(this),a)},cInfo:function(a,b){var c=this;return this.checkUser(),b?void this.arangoCollectionsStore.fetch({cache:!1,success:function(){c.infoView=new window.InfoView({collectionName:a,collection:c.arangoCollectionsStore.findWhere({name:a})}),c.infoView.render()}}):void this.waitForInit(this.cInfo.bind(this),a)},documents:function(a,b,c){return this.checkUser(),c?(this.documentsView||(this.documentsView=new window.DocumentsView({collection:new window.ArangoDocuments,documentStore:this.arangoDocumentStore,collectionsStore:this.arangoCollectionsStore})),this.documentsView.setCollectionId(a,b),void this.documentsView.render()):void this.waitForInit(this.documents.bind(this),a,b)},document:function(a,b,c){if(this.checkUser(),!c)return void this.waitForInit(this.document.bind(this),a,b);this.documentView||(this.documentView=new window.DocumentView({collection:this.arangoDocumentStore})),this.documentView.colid=a;var d=window.location.hash.split("/")[2],e=(d.split("%").length-1)%3;decodeURI(d)!==d&&0!==e&&(d=decodeURIComponent(d)),this.documentView.docid=d,this.documentView.render();var f=function(a,b){a?console.log("Error","Could not fetch collection type"):this.documentView.setType(b)}.bind(this);arangoHelper.collectionApiType(a,null,f)},query:function(a){return this.checkUser(),a?(this.queryView||(this.queryView=new window.QueryView({collection:this.queryCollection})),void this.queryView.render()):void this.waitForInit(this.query.bind(this))},graph2:function(a,b){return this.checkUser(),b?(this.graphViewer2&&(this.graphViewer2.graphSettingsView&&this.graphViewer2.graphSettingsView.remove(),this.graphViewer2.remove()),this.graphViewer2=new window.GraphViewer2({name:a,documentStore:this.arangoDocumentStore,collection:new window.GraphCollection,userConfig:this.userConfig}),void this.graphViewer2.render()):void this.waitForInit(this.graph2.bind(this),a)},graph2settings:function(a,b){return this.checkUser(),b?(this.graphSettingsView&&this.graphSettingsView.remove(),this.graphSettingsView=new window.GraphSettingsView({name:a,userConfig:this.userConfig}),void this.graphSettingsView.render()):void this.waitForInit(this.graph2settings.bind(this),a)},helpUs:function(a){return this.checkUser(),a?(this.testView||(this.helpUsView=new window.HelpUsView({})),void this.helpUsView.render()):void this.waitForInit(this.helpUs.bind(this))},support:function(a){return this.checkUser(),a?(this.testView||(this.supportView=new window.SupportView({})),void this.supportView.render()):void this.waitForInit(this.support.bind(this))},workMonitor:function(a){return this.checkUser(),a?(this.workMonitorCollection||(this.workMonitorCollection=new window.WorkMonitorCollection),this.workMonitorView||(this.workMonitorView=new window.WorkMonitorView({collection:this.workMonitorCollection})),void this.workMonitorView.render()):void this.waitForInit(this.workMonitor.bind(this))},queryManagement:function(a){return this.checkUser(),a?(this.queryManagementView||(this.queryManagementView=new window.QueryManagementView({collection:void 0})),void this.queryManagementView.render()):void this.waitForInit(this.queryManagement.bind(this))},databases:function(a){if(this.checkUser(),!a)return void this.waitForInit(this.databases.bind(this));var b=function(a){a?(arangoHelper.arangoError("DB","Could not get list of allowed databases"),this.navigate("#",{trigger:!0}),$("#databaseNavi").css("display","none"),$("#databaseNaviSelect").css("display","none")):(this.databaseView||(this.databaseView=new window.DatabaseView({users:this.userCollection,collection:this.arangoDatabase})),this.databaseView.render())}.bind(this);arangoHelper.databaseAllowed(b)},dashboard:function(a){return this.checkUser(),a?(void 0===this.dashboardView&&(this.dashboardView=new window.DashboardView({dygraphConfig:window.dygraphConfig,database:this.arangoDatabase})),void this.dashboardView.render()):void this.waitForInit(this.dashboard.bind(this))},graphManagement:function(a){return this.checkUser(),a?(this.graphManagementView||(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore})),void this.graphManagementView.render()):void this.waitForInit(this.graphManagement.bind(this))},showGraph:function(a,b){return this.checkUser(),b?void(this.graphManagementView?this.graphManagementView.loadGraphViewer(a):(this.graphManagementView=new window.GraphManagementView({collection:new window.GraphCollection,collectionCollection:this.arangoCollectionsStore}),this.graphManagementView.render(a,!0))):void this.waitForInit(this.showGraph.bind(this),a)},applications:function(a){return this.checkUser(),a?(void 0===this.applicationsView&&(this.applicationsView=new window.ApplicationsView({collection:this.foxxList})),void this.applicationsView.reload()):void this.waitForInit(this.applications.bind(this))},handleSelectDatabase:function(a){return this.checkUser(),a?void this.naviView.handleSelectDatabase():void this.waitForInit(this.handleSelectDatabase.bind(this))},handleResize:function(){this.dashboardView&&this.dashboardView.resize(),this.graphManagementView&&this.graphManagementView.handleResize($("#content").width()),this.queryView&&this.queryView.resize(),this.naviView&&this.naviView.resize(),this.graphViewer2&&this.graphViewer2.resize(),this.documentsView&&this.documentsView.resize(),this.documentView&&this.documentView.resize()},userPermissionView:function(a,b){if(this.checkUser(),b||null===b)this.userPermissionView=new window.UserPermissionView({collection:this.userCollection,databases:this.arangoDatabase,username:a}),this.userPermissionView.render();else if(b===!1)return void this.waitForInit(this.userPermissionView.bind(this),a)},userView:function(a,b){this.checkUser(),b||null===b?(this.userView=new window.UserView({collection:this.userCollection,username:a}),this.userView.render()):b===!1&&this.waitForInit(this.userView.bind(this),a)},userManagement:function(a){return this.checkUser(),a?(this.userManagementView||(this.userManagementView=new window.UserManagementView({collection:this.userCollection})),void this.userManagementView.render()):void this.waitForInit(this.userManagement.bind(this))},userProfile:function(a){return this.checkUser(),a?(this.userManagementView||(this.userManagementView=new window.UserManagementView({collection:this.userCollection})),void this.userManagementView.render(!0)):void this.waitForInit(this.userProfile.bind(this))},fetchDBS:function(a){var b=this,c=!1;this.coordinatorCollection.each(function(a){b.dbServers.push(new window.ClusterServers([],{host:a.get("address")}))}),this.initFinished=!0,_.each(this.dbServers,function(b){b.fetch({success:function(){c===!1&&a&&(a(),c=!0)}})})},getNewRoute:function(a){return"http://"+a},registerForUpdate:function(a){this.toUpdate.push(a),a.updateUrl()}})}(),function(){"use strict";var a=function(a,b){var c=[];c.push(window.modalView.createSuccessButton("Download Page",function(){ +window.open("https://www.arangodb.com/download","_blank"),window.modalView.hide()}));var d=[],e=window.modalView.createReadOnlyEntry.bind(window.modalView);d.push(e("current","Current",a.toString())),b.major&&d.push(e("major","Major",b.major.version)),b.minor&&d.push(e("minor","Minor",b.minor.version)),b.bugfix&&d.push(e("bugfix","Bugfix",b.bugfix.version)),window.modalView.show("modalTable.ejs","New Version Available",c,d)};window.checkVersion=function(){$.ajax({type:"GET",cache:!1,url:arangoHelper.databaseUrl("/_api/version"),contentType:"application/json",processData:!1,async:!0,success:function(b){var c=window.versionHelper.fromString(b.version);$(".navbar #currentVersion").html(" "+b.version.substr(0,5)+''),window.parseVersions=function(b){return _.isEmpty(b)?void $("#currentVersion").addClass("up-to-date"):($("#currentVersion").addClass("out-of-date"),void $("#currentVersion").click(function(){a(c,b)}))},$.ajax({type:"GET",async:!0,crossDomain:!0,timeout:3e3,dataType:"jsonp",url:"https://www.arangodb.com/repositories/versions.php?jsonp=parseVersions&version="+encodeURIComponent(c.toString())})}})}}(),function(){"use strict";window.hasOwnProperty("TEST_BUILD")||($(document).ajaxSend(function(a,b,c){var d=window.arangoHelper.getCurrentJwt();d&&b.setRequestHeader("Authorization","bearer "+d)}),$(document).ready(function(){window.App=new window.Router,Backbone.history.start(),window.App.handleResize()}),$(document).click(function(a){a.stopPropagation(),$(a.target).hasClass("subBarDropdown")||$(a.target).hasClass("dropdown-header")||$(a.target).hasClass("dropdown-footer")||$(a.target).hasClass("toggle")||$("#userInfo").is(":visible")&&$(".subBarDropdown").hide()}))}(); \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz index 7d50fb7d05..7eece3021e 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/app.min.js.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html index 2d7db548eb..ac460975c6 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html @@ -1020,7 +1020,6 @@ if (list.length > 0) {
    <%=graphName %>
    - DEV GV2 <%});%>
    \ No newline at end of file +
    \ No newline at end of file diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz index 1dad1a7fe2..235930f5c1 100644 Binary files a/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz and b/js/apps/system/_admin/aardvark/APP/frontend/build/index-min.html.gz differ diff --git a/js/apps/system/_admin/aardvark/APP/frontend/build/libs.min.js b/js/apps/system/_admin/aardvark/APP/frontend/build/libs.min.js index 1c92a6d421..20e3ae34a7 100644 --- a/js/apps/system/_admin/aardvark/APP/frontend/build/libs.min.js +++ b/js/apps/system/_admin/aardvark/APP/frontend/build/libs.min.js @@ -37,34 +37,35 @@ this},divide:function(a){function b(a,b){var c=l(a,b);return a*c/(b*c)}return th this}),j.addMethod("kill",function(){this.nodesArray.length=0,this.edgesArray.length=0,delete this.nodesArray,delete this.edgesArray,delete this.nodesIndex,delete this.edgesIndex,delete this.inNeighborsIndex,delete this.outNeighborsIndex,delete this.allNeighborsIndex,delete this.inNeighborsCount,delete this.outNeighborsCount,delete this.allNeighborsCount}),j.addMethod("clear",function(){return this.nodesArray.length=0,this.edgesArray.length=0,b(this.nodesIndex),b(this.edgesIndex),b(this.nodesIndex),b(this.inNeighborsIndex),b(this.outNeighborsIndex),b(this.allNeighborsIndex),b(this.inNeighborsCount),b(this.outNeighborsCount),b(this.allNeighborsCount),this}),j.addMethod("read",function(a){var b,c,d;for(c=a.nodes||[],b=0,d=c.length;d>b;b++)this.addNode(c[b]);for(c=a.edges||[],b=0,d=c.length;d>b;b++)this.addEdge(c[b]);return this}),j.addMethod("nodes",function(a){if(!arguments.length)return this.nodesArray.slice(0);if(1===arguments.length&&("string"==typeof a||"number"==typeof a))return this.nodesIndex[a];if(1===arguments.length&&"[object Array]"===Object.prototype.toString.call(a)){var b,c,d=[];for(b=0,c=a.length;c>b;b++){if("string"!=typeof a[b]&&"number"!=typeof a[b])throw"nodes: Wrong arguments.";d.push(this.nodesIndex[a[b]])}return d}throw"nodes: Wrong arguments."}),j.addMethod("degree",function(a,b){if(b={"in":this.inNeighborsCount,out:this.outNeighborsCount}[b||""]||this.allNeighborsCount,"string"==typeof a||"number"==typeof a)return b[a];if("[object Array]"===Object.prototype.toString.call(a)){var c,d,e=[];for(c=0,d=a.length;d>c;c++){if("string"!=typeof a[c]&&"number"!=typeof a[c])throw"degree: Wrong arguments.";e.push(b[a[c]])}return e}throw"degree: Wrong arguments."}),j.addMethod("edges",function(a){if(!arguments.length)return this.edgesArray.slice(0);if(1===arguments.length&&("string"==typeof a||"number"==typeof a))return this.edgesIndex[a];if(1===arguments.length&&"[object Array]"===Object.prototype.toString.call(a)){var b,c,d=[];for(b=0,c=a.length;c>b;b++){if("string"!=typeof a[b]&&"number"!=typeof a[b])throw"edges: Wrong arguments.";d.push(this.edgesIndex[a[b]])}return d}throw"edges: Wrong arguments."}),"undefined"!=typeof sigma?(sigma.classes=sigma.classes||Object.create(null),sigma.classes.graph=j):"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=j),exports.graph=j):this.graph=j}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.classes"),sigma.classes.camera=function(a,b,c,d){sigma.classes.dispatcher.extend(this),Object.defineProperty(this,"graph",{value:b}),Object.defineProperty(this,"id",{value:a}),Object.defineProperty(this,"readPrefix",{value:"read_cam"+a+":"}),Object.defineProperty(this,"prefix",{value:"cam"+a+":"}),this.x=0,this.y=0,this.ratio=1,this.angle=0,this.isAnimated=!1,this.settings="object"==typeof d&&d?c.embedObject(d):c},sigma.classes.camera.prototype.goTo=function(b){if(!this.settings("enableCamera"))return this;var c,d,e=b||{},f=["x","y","ratio","angle"];for(c=0,d=f.length;d>c;c++)if(e[f[c]]!==a){if("number"!=typeof e[f[c]]||isNaN(e[f[c]]))throw'Value for "'+f[c]+'" is not a number.';this[f[c]]=e[f[c]]}return this.dispatchEvent("coordinatesUpdated"),this},sigma.classes.camera.prototype.applyView=function(b,c,d){d=d||{},c=c!==a?c:this.prefix,b=b!==a?b:this.readPrefix;var e,f,g,h=d.nodes||this.graph.nodes(),i=d.edges||this.graph.edges(),j=Math.cos(this.angle),k=Math.sin(this.angle),l=Math.pow(this.ratio,this.settings("nodesPowRatio")),m=Math.pow(this.ratio,this.settings("edgesPowRatio")),n=(d.width||0)/2,o=(d.height||0)/2;for(e=0,f=h.length;f>e;e++)g=h[e],g[c+"x"]=(((g[b+"x"]||0)-this.x)*j+((g[b+"y"]||0)-this.y)*k)/this.ratio+n,g[c+"y"]=(((g[b+"y"]||0)-this.y)*j-((g[b+"x"]||0)-this.x)*k)/this.ratio+o,g[c+"size"]=(g[b+"size"]||0)/l;for(e=0,f=i.length;f>e;e++)i[e][c+"size"]=(i[e][b+"size"]||0)/m;return this},sigma.classes.camera.prototype.graphPosition=function(a,b,c){var d=0,e=0,f=Math.cos(this.angle),g=Math.sin(this.angle);return c||(d=-(this.x*f+this.y*g)/this.ratio,e=-(this.y*f-this.x*g)/this.ratio),{x:(a*f+b*g)/this.ratio+d,y:(b*f-a*g)/this.ratio+e}},sigma.classes.camera.prototype.cameraPosition=function(a,b,c){var d=0,e=0,f=Math.cos(this.angle),g=Math.sin(this.angle);return c||(d=-(this.x*f+this.y*g)/this.ratio,e=-(this.y*f-this.x*g)/this.ratio),{x:((a-d)*f-(b-e)*g)*this.ratio,y:((b-e)*f+(a-d)*g)*this.ratio}},sigma.classes.camera.prototype.getMatrix=function(){var a=sigma.utils.matrices.scale(1/this.ratio),b=sigma.utils.matrices.rotation(this.angle),c=sigma.utils.matrices.translation(-this.x,-this.y),d=sigma.utils.matrices.multiply(c,sigma.utils.matrices.multiply(b,a));return d},sigma.classes.camera.prototype.getRectangle=function(a,b){var c=this.cameraPosition(a,0,!0),d=this.cameraPosition(0,b,!0),e=this.cameraPosition(a/2,b/2,!0),f=this.cameraPosition(a/4,0,!0).x,g=this.cameraPosition(0,b/4,!0).y;return{x1:this.x-e.x-f,y1:this.y-e.y-g,x2:this.x-e.x+f+c.x,y2:this.y-e.y-g+c.y,height:Math.sqrt(Math.pow(d.x,2)+Math.pow(d.y+2*g,2))}}}.call(this),function(a){"use strict";function b(a,b){var c=b.x+b.width/2,d=b.y+b.height/2,e=a.yd;d++)a.x2>=b[d][0].x&&a.x1<=b[d][1].x&&a.y1+a.height>=b[d][0].y&&a.y1<=b[d][2].y&&c.push(d);return c}function d(a,b){for(var c=[],d=0;4>d;d++)j.collision(a,b[d])&&c.push(d);return c}function e(a,b){var c,d,e=b.level+1,f=Math.round(b.bounds.width/2),g=Math.round(b.bounds.height/2),h=Math.round(b.bounds.x),j=Math.round(b.bounds.y);switch(a){case 0:c=h,d=j;break;case 1:c=h+f,d=j;break;case 2:c=h,d=j+g;break;case 3:c=h+f,d=j+g}return i({x:c,y:d,width:f,height:g},e,b.maxElements,b.maxLevel)}function f(b,d,g){if(g.leveli;i++)g.nodes[h[i]]===a&&(g.nodes[h[i]]=e(h[i],g)),f(b,d,g.nodes[h[i]]);else g.elements.push(b)}function g(c,d){if(d.levelg;g++)c.nodes[f[g]]!==a&&h(b,c.nodes[f[g]],d,e);else for(var j=0,k=c.elements.length;k>j;j++)e[c.elements[j].id]===a&&(e[c.elements[j].id]=c.elements[j]);return e}function i(a,b,c,d){return{level:b||0,bounds:a,corners:j.splitSquare(a),maxElements:c||20,maxLevel:d||4,elements:[],nodes:[]}}var j={pointToSquare:function(a){return{x1:a.x-a.size,y1:a.y-a.size,x2:a.x+a.size,y2:a.y-a.size,height:2*a.size}},isAxisAligned:function(a){return a.x1===a.x2||a.y1===a.y2},axisAlignedTopPoints:function(a){return a.y1===a.y2&&a.x1a.y1?{x1:a.x1-a.height,y1:a.y1,x2:a.x1,y2:a.y1,height:a.height}:a.x1===a.x2&&a.y2f;f++){var g=this.projection(b[f],a),h=this.projection(c[f],a);d.push(g.x*a.x+g.y*a.y),e.push(h.x*a.x+h.y*a.y)}var i=Math.max.apply(Math,d),j=Math.max.apply(Math,e),k=Math.min.apply(Math,d),l=Math.min.apply(Math,e);return i>=l&&j>=k},collision:function(a,b){for(var c=this.axis(a,b),d=!0,e=0;4>e;e++)d=d&&this.axisCollision(c[e],a,b);return d}},k=function(){this._geom=j,this._tree=null,this._cache={query:!1,result:!1}};k.prototype.index=function(a,b){if(!b.bounds)throw"sigma.classes.quad.index: bounds information not given.";var c=b.prefix||"";this._tree=i(b.bounds,0,b.maxElements,b.maxLevel);for(var d=0,e=a.length;e>d;d++)f(a[d],j.pointToSquare({x:a[d][c+"x"],y:a[d][c+"y"],size:a[d][c+"size"]}),this._tree);return this._cache={query:!1,result:!1},this._tree},k.prototype.point=function(a,b){return this._tree?g({x:a,y:b},this._tree)||[]:[]},k.prototype.area=function(a){var b,e,f=JSON.stringify(a);if(this._cache.query===f)return this._cache.result;j.isAxisAligned(a)?(b=c,e=j.axisAlignedTopPoints(a)):(b=d,e=j.rectangleCorners(a));var g=this._tree?h(e,this._tree,b):[],i=[];for(var k in g)i.push(g[k]);return this._cache.query=f,this._cache.result=i,i},"undefined"!=typeof this.sigma?(this.sigma.classes=this.sigma.classes||{},this.sigma.classes.quad=k):"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports.quad=k):this.quad=k}.call(this),function(a){"use strict";function b(a,b){var c=b.x+b.width/2,d=b.y+b.height/2,e=a.yd;d++)a.x2>=b[d][0].x&&a.x1<=b[d][1].x&&a.y1+a.height>=b[d][0].y&&a.y1<=b[d][2].y&&c.push(d);return c}function d(a,b){for(var c=[],d=0;4>d;d++)j.collision(a,b[d])&&c.push(d);return c}function e(a,b){var c,d,e=b.level+1,f=Math.round(b.bounds.width/2),g=Math.round(b.bounds.height/2),h=Math.round(b.bounds.x),j=Math.round(b.bounds.y);switch(a){case 0:c=h,d=j;break;case 1:c=h+f,d=j;break;case 2:c=h,d=j+g;break;case 3:c=h+f,d=j+g}return i({x:c,y:d,width:f,height:g},e,b.maxElements,b.maxLevel)}function f(b,d,g){if(g.leveli;i++)g.nodes[h[i]]===a&&(g.nodes[h[i]]=e(h[i],g)),f(b,d,g.nodes[h[i]]);else g.elements.push(b)}function g(c,d){if(d.levelg;g++)c.nodes[f[g]]!==a&&h(b,c.nodes[f[g]],d,e);else for(var j=0,k=c.elements.length;k>j;j++)e[c.elements[j].id]===a&&(e[c.elements[j].id]=c.elements[j]);return e}function i(a,b,c,d){return{level:b||0,bounds:a,corners:j.splitSquare(a),maxElements:c||40,maxLevel:d||8,elements:[],nodes:[]}}var j={pointToSquare:function(a){return{x1:a.x-a.size,y1:a.y-a.size,x2:a.x+a.size,y2:a.y-a.size,height:2*a.size}},lineToSquare:function(a){return a.y1a.y1?{x1:a.x1-a.height,y1:a.y1,x2:a.x1,y2:a.y1,height:a.height}:a.x1===a.x2&&a.y2f;f++){var g=this.projection(b[f],a),h=this.projection(c[f],a);d.push(g.x*a.x+g.y*a.y),e.push(h.x*a.x+h.y*a.y)}var i=Math.max.apply(Math,d),j=Math.max.apply(Math,e),k=Math.min.apply(Math,d),l=Math.min.apply(Math,e);return i>=l&&j>=k},collision:function(a,b){for(var c=this.axis(a,b),d=!0,e=0;4>e;e++)d=d&&this.axisCollision(c[e],a,b);return d}},k=function(){this._geom=j,this._tree=null,this._cache={query:!1,result:!1},this._enabled=!0};k.prototype.index=function(a,b){if(!this._enabled)return this._tree;if(!b.bounds)throw"sigma.classes.edgequad.index: bounds information not given.";var c,d,e,g,h,k=b.prefix||"";this._tree=i(b.bounds,0,b.maxElements,b.maxLevel);for(var l=a.edges(),m=0,n=l.length;n>m;m++)d=a.nodes(l[m].source),e=a.nodes(l[m].target),h={x1:d[k+"x"],y1:d[k+"y"],x2:e[k+"x"],y2:e[k+"y"],size:l[m][k+"size"]||0},"curve"===l[m].type||"curvedArrow"===l[m].type?d.id===e.id?(g={x:d[k+"x"],y:d[k+"y"],size:d[k+"size"]||0},f(l[m],j.selfLoopToSquare(g),this._tree)):(c=sigma.utils.getQuadraticControlPoint(h.x1,h.y1,h.x2,h.y2),f(l[m],j.quadraticCurveToSquare(h,c),this._tree)):f(l[m],j.lineToSquare(h),this._tree);return this._cache={query:!1,result:!1},this._tree},k.prototype.point=function(a,b){return this._enabled&&this._tree?g({x:a,y:b},this._tree)||[]:[]},k.prototype.area=function(a){if(!this._enabled)return[];var b,e,f=JSON.stringify(a);if(this._cache.query===f)return this._cache.result;j.isAxisAligned(a)?(b=c,e=j.axisAlignedTopPoints(a)):(b=d,e=j.rectangleCorners(a));var g=this._tree?h(e,this._tree,b):[],i=[];for(var k in g)i.push(g[k]);return this._cache.query=f,this._cache.result=i,i},"undefined"!=typeof this.sigma?(this.sigma.classes=this.sigma.classes||{},this.sigma.classes.edgequad=k):"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports.edgequad=k):this.edgequad=k}.call(this),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.captors"),sigma.captors.mouse=function(a,b,c){function d(a){var b,c,d;return y("mouseEnabled")&&(v.dispatchEvent("mousemove",sigma.utils.mouseCoords(a)),q)?(r=!0,s=!0,u&&clearTimeout(u),u=setTimeout(function(){r=!1},y("dragTimeout")),sigma.misc.animation.killAll(x),x.isMoving=!0,d=x.cameraPosition(sigma.utils.getX(a)-o,sigma.utils.getY(a)-p,!0),b=k-d.x,c=l-d.y,(b!==x.x||c!==x.y)&&(m=x.x,n=x.y,x.goTo({x:b,y:c})),a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation(),!1):void 0}function e(a){if(y("mouseEnabled")&&q){q=!1,u&&clearTimeout(u),x.isMoving=!1;var b=sigma.utils.getX(a),c=sigma.utils.getY(a);r?(sigma.misc.animation.killAll(x),sigma.misc.animation.camera(x,{x:x.x+y("mouseInertiaRatio")*(x.x-m),y:x.y+y("mouseInertiaRatio")*(x.y-n)},{easing:"quadraticOut",duration:y("mouseInertiaDuration")})):(o!==b||p!==c)&&x.goTo({x:x.x,y:x.y}),v.dispatchEvent("mouseup",sigma.utils.mouseCoords(a)),r=!1}}function f(a){if(y("mouseEnabled"))switch(k=x.x,l=x.y,m=x.x,n=x.y,o=sigma.utils.getX(a),p=sigma.utils.getY(a),s=!1,t=(new Date).getTime(),a.which){case 2:break;case 3:v.dispatchEvent("rightclick",sigma.utils.mouseCoords(a,o,p));break;default:q=!0,v.dispatchEvent("mousedown",sigma.utils.mouseCoords(a,o,p))}}function g(){y("mouseEnabled")&&v.dispatchEvent("mouseout")}function h(a){if(y("mouseEnabled")){var b=sigma.utils.mouseCoords(a);b.isDragging=(new Date).getTime()-t>100&&s,v.dispatchEvent("click",b)}return a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation(),!1}function i(a){var b,c,d;return y("mouseEnabled")?(c=1/y("doubleClickZoomingRatio"),v.dispatchEvent("doubleclick",sigma.utils.mouseCoords(a,o,p)),y("doubleClickEnabled")&&(b=x.cameraPosition(sigma.utils.getX(a)-sigma.utils.getCenter(a).x,sigma.utils.getY(a)-sigma.utils.getCenter(a).y,!0),d={duration:y("doubleClickZoomDuration")},sigma.utils.zoomTo(x,b.x,b.y,c,d)),a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation(),!1):void 0}function j(a){var b,c,d;return y("mouseEnabled")&&y("mouseWheelEnabled")?(c=sigma.utils.getDelta(a)>0?1/y("zoomingRatio"):y("zoomingRatio"),b=x.cameraPosition(sigma.utils.getX(a)-sigma.utils.getCenter(a).x,sigma.utils.getY(a)-sigma.utils.getCenter(a).y,!0),d={duration:y("mouseZoomDuration")},sigma.utils.zoomTo(x,b.x,b.y,c,d),a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation(),!1):void 0}var k,l,m,n,o,p,q,r,s,t,u,v=this,w=a,x=b,y=c;sigma.classes.dispatcher.extend(this),sigma.utils.doubleClick(w,"click",i),w.addEventListener("DOMMouseScroll",j,!1),w.addEventListener("mousewheel",j,!1),w.addEventListener("mousemove",d,!1),w.addEventListener("mousedown",f,!1),w.addEventListener("click",h,!1),w.addEventListener("mouseout",g,!1),document.addEventListener("mouseup",e,!1),this.kill=function(){sigma.utils.unbindDoubleClick(w,"click"),w.removeEventListener("DOMMouseScroll",j),w.removeEventListener("mousewheel",j),w.removeEventListener("mousemove",d),w.removeEventListener("mousedown",f),w.removeEventListener("click",h),w.removeEventListener("mouseout",g),document.removeEventListener("mouseup",e)}}}.call(this),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.captors"),sigma.captors.touch=function(a,b,c){function d(a){var b=sigma.utils.getOffset(B);return{x:a.pageX-b.left,y:a.pageY-b.top}}function e(a){if(D("touchEnabled")){var b,c,e,f,g,h;switch(E=a.touches,E.length){case 1:C.isMoving=!0,w=1,i=C.x,j=C.y,m=C.x,n=C.y,g=d(E[0]),q=g.x,r=g.y;break;case 2:return C.isMoving=!0,w=2,g=d(E[0]),h=d(E[1]),b=g.x,e=g.y,c=h.x,f=h.y,m=C.x,n=C.y,k=C.angle,l=C.ratio,i=C.x,j=C.y,q=b,r=e,s=c,t=f,u=Math.atan2(t-r,s-q),v=Math.sqrt((t-r)*(t-r)+(s-q)*(s-q)),a.preventDefault(),!1}}}function f(a){if(D("touchEnabled")){E=a.touches;var b=D("touchInertiaRatio");switch(z&&(x=!1,clearTimeout(z)),w){case 2:if(1===a.touches.length){e(a),a.preventDefault();break}case 1:C.isMoving=!1,A.dispatchEvent("stopDrag"),x&&(y=!1,sigma.misc.animation.camera(C,{x:C.x+b*(C.x-m),y:C.y+b*(C.y-n)},{easing:"quadraticOut",duration:D("touchInertiaDuration")})),x=!1,w=0}}}function g(a){if(!y&&D("touchEnabled")){var b,c,e,f,g,h,B,F,G,H,I,J,K,L,M,N,O;switch(E=a.touches,x=!0,z&&clearTimeout(z),z=setTimeout(function(){x=!1},D("dragTimeout")),w){case 1:F=d(E[0]),b=F.x,e=F.y,H=C.cameraPosition(b-q,e-r,!0),L=i-H.x,M=j-H.y,(L!==C.x||M!==C.y)&&(m=C.x,n=C.y,C.goTo({x:L,y:M}),A.dispatchEvent("mousemove",sigma.utils.mouseCoords(a,F.x,F.y)),A.dispatchEvent("drag"));break;case 2:F=d(E[0]),G=d(E[1]),b=F.x,e=F.y,c=G.x,f=G.y,I=C.cameraPosition((q+s)/2-sigma.utils.getCenter(a).x,(r+t)/2-sigma.utils.getCenter(a).y,!0),B=C.cameraPosition((b+c)/2-sigma.utils.getCenter(a).x,(e+f)/2-sigma.utils.getCenter(a).y,!0),J=Math.atan2(f-e,c-b)-u,K=Math.sqrt((f-e)*(f-e)+(c-b)*(c-b))/v,b=I.x,e=I.y,N=l/K,b*=K,e*=K,O=k-J,g=Math.cos(-J),h=Math.sin(-J),c=b*g+e*h,f=e*g-b*h,b=c,e=f,L=b-B.x+i,M=e-B.y+j,(N!==C.ratio||O!==C.angle||L!==C.x||M!==C.y)&&(m=C.x,n=C.y,o=C.angle,p=C.ratio,C.goTo({x:L,y:M,angle:O,ratio:N}),A.dispatchEvent("drag"))}return a.preventDefault(),!1}}function h(a){var b,c,e;return a.touches&&1===a.touches.length&&D("touchEnabled")?(y=!0,c=1/D("doubleClickZoomingRatio"),b=d(a.touches[0]),A.dispatchEvent("doubleclick",sigma.utils.mouseCoords(a,b.x,b.y)),D("doubleClickEnabled")&&(b=C.cameraPosition(b.x-sigma.utils.getCenter(a).x,b.y-sigma.utils.getCenter(a).y,!0),e={duration:D("doubleClickZoomDuration"),onComplete:function(){y=!1}},sigma.utils.zoomTo(C,b.x,b.y,c,e)),a.preventDefault?a.preventDefault():a.returnValue=!1,a.stopPropagation(),!1):void 0}var i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A=this,B=a,C=b,D=c,E=[];sigma.classes.dispatcher.extend(this),sigma.utils.doubleClick(B,"touchstart",h),B.addEventListener("touchstart",e,!1),B.addEventListener("touchend",f,!1),B.addEventListener("touchcancel",f,!1),B.addEventListener("touchleave",f,!1),B.addEventListener("touchmove",g,!1),this.kill=function(){sigma.utils.unbindDoubleClick(B,"touchstart"),B.addEventListener("touchstart",e),B.addEventListener("touchend",f),B.addEventListener("touchcancel",f),B.addEventListener("touchleave",f),B.addEventListener("touchmove",g)}}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";if("undefined"==typeof conrad)throw"conrad is not declared";sigma.utils.pkg("sigma.renderers"),sigma.renderers.canvas=function(a,b,c,d){if("object"!=typeof d)throw"sigma.renderers.canvas: Wrong arguments.";if(!(d.container instanceof HTMLElement))throw"Container not found.";var e,f,g,h;for(sigma.classes.dispatcher.extend(this),Object.defineProperty(this,"conradId",{value:sigma.utils.id()}),this.graph=a,this.camera=b,this.contexts={},this.domElements={},this.options=d,this.container=this.options.container,this.settings="object"==typeof d.settings&&d.settings?c.embedObjects(d.settings):c,this.nodesOnScreen=[],this.edgesOnScreen=[],this.jobs={},this.options.prefix="renderer"+this.conradId+":",this.settings("batchEdgesDrawing")?(this.initDOM("canvas","edges"),this.initDOM("canvas","scene"),this.contexts.nodes=this.contexts.scene,this.contexts.labels=this.contexts.scene):(this.initDOM("canvas","scene"),this.contexts.edges=this.contexts.scene,this.contexts.nodes=this.contexts.scene,this.contexts.labels=this.contexts.scene),this.initDOM("canvas","mouse"),this.contexts.hover=this.contexts.mouse,this.captors=[],g=this.options.captors||[sigma.captors.mouse,sigma.captors.touch],e=0,f=g.length;f>e;e++)h="function"==typeof g[e]?g[e]:sigma.captors[g[e]],this.captors.push(new h(this.domElements.mouse,this.camera,this.settings));sigma.misc.bindEvents.call(this,this.options.prefix),sigma.misc.drawHovers.call(this,this.options.prefix),this.resize(!1)},sigma.renderers.canvas.prototype.render=function(b){b=b||{};var c,d,e,f,g,h,i,j,k,l,m,n,o,p={},q=this.graph,r=this.graph.nodes,s=(this.options.prefix||"",this.settings(b,"drawEdges")),t=this.settings(b,"drawNodes"),u=this.settings(b,"drawLabels"),v=this.settings(b,"drawEdgeLabels"),w=this.settings.embedObjects(b,{prefix:this.options.prefix});this.resize(!1),this.settings(b,"hideEdgesOnMove")&&(this.camera.isAnimated||this.camera.isMoving)&&(s=!1),this.camera.applyView(a,this.options.prefix,{width:this.width,height:this.height}),this.clear();for(e in this.jobs)conrad.hasJob(e)&&conrad.killJob(e);for(this.edgesOnScreen=[],this.nodesOnScreen=this.camera.quadtree.area(this.camera.getRectangle(this.width,this.height)),c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)p[c[d].id]=c[d];if(s){for(c=q.edges(),d=0,f=c.length;f>d;d++)g=c[d],!p[g.source]&&!p[g.target]||g.hidden||r(g.source).hidden||r(g.target).hidden||this.edgesOnScreen.push(g);if(this.settings(b,"batchEdgesDrawing"))h="edges_"+this.conradId,n=w("canvasEdgesBatchSize"),l=this.edgesOnScreen,f=l.length,k=0,i=Math.min(l.length,k+n),j=function(){for(o=this.contexts.edges.globalCompositeOperation,this.contexts.edges.globalCompositeOperation="destination-over",m=sigma.canvas.edges,d=k;i>d;d++)g=l[d],(m[g.type||this.settings(b,"defaultEdgeType")]||m.def)(g,q.nodes(g.source),q.nodes(g.target),this.contexts.edges,w);if(v)for(m=sigma.canvas.edges.labels,d=k;i>d;d++)g=l[d],g.hidden||(m[g.type||this.settings(b,"defaultEdgeType")]||m.def)(g,q.nodes(g.source),q.nodes(g.target),this.contexts.labels,w);return this.contexts.edges.globalCompositeOperation=o,i===l.length?(delete this.jobs[h],!1):(k=i+1,i=Math.min(l.length,k+n),!0)},this.jobs[h]=j,conrad.addJob(h,j.bind(this));else{for(m=sigma.canvas.edges,c=this.edgesOnScreen,d=0,f=c.length;f>d;d++)g=c[d],(m[g.type||this.settings(b,"defaultEdgeType")]||m.def)(g,q.nodes(g.source),q.nodes(g.target),this.contexts.edges,w);if(v)for(m=sigma.canvas.edges.labels,c=this.edgesOnScreen,d=0,f=c.length;f>d;d++)c[d].hidden||(m[c[d].type||this.settings(b,"defaultEdgeType")]||m.def)(c[d],q.nodes(c[d].source),q.nodes(c[d].target),this.contexts.labels,w)}}if(t)for(m=sigma.canvas.nodes,c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)c[d].hidden||(m[c[d].type||this.settings(b,"defaultNodeType")]||m.def)(c[d],this.contexts.nodes,w);if(u)for(m=sigma.canvas.labels,c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)c[d].hidden||(m[c[d].type||this.settings(b,"defaultNodeType")]||m.def)(c[d],this.contexts.labels,w);return this.dispatchEvent("render"),this},sigma.renderers.canvas.prototype.initDOM=function(a,b){var c=document.createElement(a);c.style.position="absolute",c.setAttribute("class","sigma-"+b),this.domElements[b]=c,this.container.appendChild(c),"canvas"===a.toLowerCase()&&(this.contexts[b]=c.getContext("2d"))},sigma.renderers.canvas.prototype.resize=function(b,c){var d,e=this.width,f=this.height,g=sigma.utils.getPixelRatio();if(b!==a&&c!==a?(this.width=b,this.height=c):(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,b=this.width,c=this.height),e!==this.width||f!==this.height)for(d in this.domElements)this.domElements[d].style.width=b+"px",this.domElements[d].style.height=c+"px","canvas"===this.domElements[d].tagName.toLowerCase()&&(this.domElements[d].setAttribute("width",b*g+"px"),this.domElements[d].setAttribute("height",c*g+"px"),1!==g&&this.contexts[d].scale(g,g));return this},sigma.renderers.canvas.prototype.clear=function(){for(var a in this.contexts)this.contexts[a].clearRect(0,0,this.width,this.height);return this},sigma.renderers.canvas.prototype.kill=function(){for(var a,b;b=this.captors.pop();)b.kill();delete this.captors;for(a in this.domElements)this.domElements[a].parentNode.removeChild(this.domElements[a]),delete this.domElements[a],delete this.contexts[a];delete this.domElements,delete this.contexts},sigma.utils.pkg("sigma.canvas.nodes"),sigma.utils.pkg("sigma.canvas.edges"),sigma.utils.pkg("sigma.canvas.labels")}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.renderers"),sigma.renderers.webgl=function(a,b,c,d){if("object"!=typeof d)throw"sigma.renderers.webgl: Wrong arguments.";if(!(d.container instanceof HTMLElement))throw"Container not found.";var e,f,g,h;for(sigma.classes.dispatcher.extend(this),this.jobs={},Object.defineProperty(this,"conradId",{value:sigma.utils.id()}),this.graph=a,this.camera=b,this.contexts={},this.domElements={},this.options=d,this.container=this.options.container,this.settings="object"==typeof d.settings&&d.settings?c.embedObjects(d.settings):c,this.options.prefix=this.camera.readPrefix,Object.defineProperty(this,"nodePrograms",{value:{}}),Object.defineProperty(this,"edgePrograms",{value:{}}),Object.defineProperty(this,"nodeFloatArrays",{value:{}}),Object.defineProperty(this,"edgeFloatArrays",{value:{}}),Object.defineProperty(this,"edgeIndicesArrays",{value:{}}),this.settings(d,"batchEdgesDrawing")?(this.initDOM("canvas","edges",!0),this.initDOM("canvas","nodes",!0)):(this.initDOM("canvas","scene",!0),this.contexts.nodes=this.contexts.scene,this.contexts.edges=this.contexts.scene),this.initDOM("canvas","labels"),this.initDOM("canvas","mouse"),this.contexts.hover=this.contexts.mouse,this.captors=[],g=this.options.captors||[sigma.captors.mouse,sigma.captors.touch],e=0,f=g.length;f>e;e++)h="function"==typeof g[e]?g[e]:sigma.captors[g[e]],this.captors.push(new h(this.domElements.mouse,this.camera,this.settings));sigma.misc.bindEvents.call(this,this.camera.prefix),sigma.misc.drawHovers.call(this,this.camera.prefix),this.resize()},sigma.renderers.webgl.prototype.process=function(){var a,b,c,d,e,f,g=this.graph,h=sigma.utils.extend(h,this.options),i=this.settings(h,"defaultEdgeType"),j=this.settings(h,"defaultNodeType");for(d in this.nodeFloatArrays)delete this.nodeFloatArrays[d];for(d in this.edgeFloatArrays)delete this.edgeFloatArrays[d];for(d in this.edgeIndicesArrays)delete this.edgeIndicesArrays[d];for(a=g.edges(),b=0,c=a.length;c>b;b++)e=a[b].type||i,d=e&&sigma.webgl.edges[e]?e:"def",this.edgeFloatArrays[d]||(this.edgeFloatArrays[d]={edges:[]}),this.edgeFloatArrays[d].edges.push(a[b]);for(a=g.nodes(),b=0,c=a.length;c>b;b++)e=a[b].type||j,d=e&&sigma.webgl.nodes[e]?e:"def",this.nodeFloatArrays[d]||(this.nodeFloatArrays[d]={nodes:[]}),this.nodeFloatArrays[d].nodes.push(a[b]);for(d in this.edgeFloatArrays){for(f=sigma.webgl.edges[d],a=this.edgeFloatArrays[d].edges,this.edgeFloatArrays[d].array=new Float32Array(a.length*f.POINTS*f.ATTRIBUTES),b=0,c=a.length;c>b;b++)a[b].hidden||g.nodes(a[b].source).hidden||g.nodes(a[b].target).hidden||f.addEdge(a[b],g.nodes(a[b].source),g.nodes(a[b].target),this.edgeFloatArrays[d].array,b*f.POINTS*f.ATTRIBUTES,h.prefix,this.settings);"function"==typeof f.computeIndices&&(this.edgeIndicesArrays[d]=f.computeIndices(this.edgeFloatArrays[d].array))}for(d in this.nodeFloatArrays)for(f=sigma.webgl.nodes[d],a=this.nodeFloatArrays[d].nodes,this.nodeFloatArrays[d].array=new Float32Array(a.length*f.POINTS*f.ATTRIBUTES),b=0,c=a.length;c>b;b++)this.nodeFloatArrays[d].array||(this.nodeFloatArrays[d].array=new Float32Array(a.length*f.POINTS*f.ATTRIBUTES)),a[b].hidden||f.addNode(a[b],this.nodeFloatArrays[d].array,b*f.POINTS*f.ATTRIBUTES,h.prefix,this.settings);return this},sigma.renderers.webgl.prototype.render=function(b){var c,d,e,f,g,h,i=this,j=(this.graph,this.contexts.nodes),k=this.contexts.edges,l=this.camera.getMatrix(),m=sigma.utils.extend(b,this.options),n=this.settings(m,"drawLabels"),o=this.settings(m,"drawEdges"),p=this.settings(m,"drawNodes");this.resize(!1),this.settings(m,"hideEdgesOnMove")&&(this.camera.isAnimated||this.camera.isMoving)&&(o=!1),this.clear(),l=sigma.utils.matrices.multiply(l,sigma.utils.matrices.translation(this.width/2,this.height/2));for(f in this.jobs)conrad.hasJob(f)&&conrad.killJob(f);if(o)if(this.settings(m,"batchEdgesDrawing"))(function(){var a,b,c,d,e,f,g,h,i,j;c="edges_"+this.conradId,j=this.settings(m,"webglEdgesBatchSize"),a=Object.keys(this.edgeFloatArrays),a.length&&(b=0,i=sigma.webgl.edges[a[b]],e=this.edgeFloatArrays[a[b]].array,h=this.edgeIndicesArrays[a[b]],g=0,f=Math.min(g+j*i.POINTS,e.length/i.ATTRIBUTES),d=function(){return this.edgePrograms[a[b]]||(this.edgePrograms[a[b]]=i.initProgram(k)),f>g&&(k.useProgram(this.edgePrograms[a[b]]),i.render(k,this.edgePrograms[a[b]],e,{settings:this.settings,matrix:l,width:this.width,height:this.height,ratio:this.camera.ratio,scalingRatio:this.settings(m,"webglOversamplingRatio"),start:g,count:f-g,indicesData:h})),f>=e.length/i.ATTRIBUTES&&b===a.length-1?(delete this.jobs[c],!1):(f>=e.length/i.ATTRIBUTES?(b++,e=this.edgeFloatArrays[a[b]].array,i=sigma.webgl.edges[a[b]],g=0,f=Math.min(g+j*i.POINTS,e.length/i.ATTRIBUTES)):(g=f,f=Math.min(g+j*i.POINTS,e.length/i.ATTRIBUTES)),!0)},this.jobs[c]=d,conrad.addJob(c,d.bind(this))); }).call(this);else for(f in this.edgeFloatArrays)h=sigma.webgl.edges[f],this.edgePrograms[f]||(this.edgePrograms[f]=h.initProgram(k)),this.edgeFloatArrays[f]&&(k.useProgram(this.edgePrograms[f]),h.render(k,this.edgePrograms[f],this.edgeFloatArrays[f].array,{settings:this.settings,matrix:l,width:this.width,height:this.height,ratio:this.camera.ratio,scalingRatio:this.settings(m,"webglOversamplingRatio"),indicesData:this.edgeIndicesArrays[f]}));if(p){j.blendFunc(j.SRC_ALPHA,j.ONE_MINUS_SRC_ALPHA),j.enable(j.BLEND);for(f in this.nodeFloatArrays)h=sigma.webgl.nodes[f],this.nodePrograms[f]||(this.nodePrograms[f]=h.initProgram(j)),this.nodeFloatArrays[f]&&(j.useProgram(this.nodePrograms[f]),h.render(j,this.nodePrograms[f],this.nodeFloatArrays[f].array,{settings:this.settings,matrix:l,width:this.width,height:this.height,ratio:this.camera.ratio,scalingRatio:this.settings(m,"webglOversamplingRatio")}))}if(n)for(c=this.camera.quadtree.area(this.camera.getRectangle(this.width,this.height)),this.camera.applyView(a,a,{nodes:c,edges:[],width:this.width,height:this.height}),g=function(a){return i.settings({prefix:i.camera.prefix},a)},d=0,e=c.length;e>d;d++)c[d].hidden||(sigma.canvas.labels[c[d].type||this.settings(m,"defaultNodeType")]||sigma.canvas.labels.def)(c[d],this.contexts.labels,g);return this.dispatchEvent("render"),this},sigma.renderers.webgl.prototype.initDOM=function(a,b,c){var d=document.createElement(a),e=this;d.style.position="absolute",d.setAttribute("class","sigma-"+b),this.domElements[b]=d,this.container.appendChild(d),"canvas"===a.toLowerCase()&&(this.contexts[b]=d.getContext(c?"experimental-webgl":"2d",{preserveDrawingBuffer:!0}),c&&(d.addEventListener("webglcontextlost",function(a){a.preventDefault()},!1),d.addEventListener("webglcontextrestored",function(){e.render()},!1)))},sigma.renderers.webgl.prototype.resize=function(b,c){var d,e=this.width,f=this.height,g=sigma.utils.getPixelRatio();if(b!==a&&c!==a?(this.width=b,this.height=c):(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,b=this.width,c=this.height),e!==this.width||f!==this.height)for(d in this.domElements)this.domElements[d].style.width=b+"px",this.domElements[d].style.height=c+"px","canvas"===this.domElements[d].tagName.toLowerCase()&&(this.contexts[d]&&this.contexts[d].scale?(this.domElements[d].setAttribute("width",b*g+"px"),this.domElements[d].setAttribute("height",c*g+"px"),1!==g&&this.contexts[d].scale(g,g)):(this.domElements[d].setAttribute("width",b*this.settings("webglOversamplingRatio")+"px"),this.domElements[d].setAttribute("height",c*this.settings("webglOversamplingRatio")+"px")));for(d in this.contexts)this.contexts[d]&&this.contexts[d].viewport&&this.contexts[d].viewport(0,0,this.width*this.settings("webglOversamplingRatio"),this.height*this.settings("webglOversamplingRatio"));return this},sigma.renderers.webgl.prototype.clear=function(){return this.contexts.labels.clearRect(0,0,this.width,this.height),this.contexts.nodes.clear(this.contexts.nodes.COLOR_BUFFER_BIT),this.contexts.edges.clear(this.contexts.edges.COLOR_BUFFER_BIT),this},sigma.renderers.webgl.prototype.kill=function(){for(var a,b;b=this.captors.pop();)b.kill();delete this.captors;for(a in this.domElements)this.domElements[a].parentNode.removeChild(this.domElements[a]),delete this.domElements[a],delete this.contexts[a];delete this.domElements,delete this.contexts},sigma.utils.pkg("sigma.webgl.nodes"),sigma.utils.pkg("sigma.webgl.edges"),sigma.utils.pkg("sigma.canvas.labels")}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";if("undefined"==typeof conrad)throw"conrad is not declared";sigma.utils.pkg("sigma.renderers"),sigma.renderers.svg=function(a,b,c,d){if("object"!=typeof d)throw"sigma.renderers.svg: Wrong arguments.";if(!(d.container instanceof HTMLElement))throw"Container not found.";var e,f,g,h,i=this;for(sigma.classes.dispatcher.extend(this),this.graph=a,this.camera=b,this.domElements={graph:null,groups:{},nodes:{},edges:{},labels:{},hovers:{}},this.measurementCanvas=null,this.options=d,this.container=this.options.container,this.settings="object"==typeof d.settings&&d.settings?c.embedObjects(d.settings):c,this.settings("freeStyle",!!this.options.freeStyle),this.settings("xmlns","http://www.w3.org/2000/svg"),this.nodesOnScreen=[],this.edgesOnScreen=[],this.options.prefix="renderer"+sigma.utils.id()+":",this.initDOM("svg"),this.captors=[],g=this.options.captors||[sigma.captors.mouse,sigma.captors.touch],e=0,f=g.length;f>e;e++)h="function"==typeof g[e]?g[e]:sigma.captors[g[e]],this.captors.push(new h(this.domElements.graph,this.camera,this.settings));window.addEventListener("resize",function(){i.resize()}),sigma.misc.bindDOMEvents.call(this,this.domElements.graph),this.bindHovers(this.options.prefix),this.resize(!1)},sigma.renderers.svg.prototype.render=function(b){b=b||{};var c,d,e,f,g,h,i,j,k,l={},m=this.graph,n=this.graph.nodes,o=(this.options.prefix||"",this.settings(b,"drawEdges")),p=this.settings(b,"drawNodes"),q=(this.settings(b,"drawLabels"),this.settings.embedObjects(b,{prefix:this.options.prefix,forceLabels:this.options.forceLabels}));for(this.settings(b,"hideEdgesOnMove")&&(this.camera.isAnimated||this.camera.isMoving)&&(o=!1),this.camera.applyView(a,this.options.prefix,{width:this.width,height:this.height}),this.hideDOMElements(this.domElements.nodes),this.hideDOMElements(this.domElements.edges),this.hideDOMElements(this.domElements.labels),this.edgesOnScreen=[],this.nodesOnScreen=this.camera.quadtree.area(this.camera.getRectangle(this.width,this.height)),c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)l[c[d].id]=c[d];for(c=m.edges(),d=0,f=c.length;f>d;d++)g=c[d],!l[g.source]&&!l[g.target]||g.hidden||n(g.source).hidden||n(g.target).hidden||this.edgesOnScreen.push(g);if(j=sigma.svg.nodes,k=sigma.svg.labels,p)for(c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)c[d].hidden||this.domElements.nodes[c[d].id]||(e=(j[c[d].type]||j.def).create(c[d],q),this.domElements.nodes[c[d].id]=e,this.domElements.groups.nodes.appendChild(e),e=(k[c[d].type]||k.def).create(c[d],q),this.domElements.labels[c[d].id]=e,this.domElements.groups.labels.appendChild(e));if(p)for(c=this.nodesOnScreen,d=0,f=c.length;f>d;d++)c[d].hidden||((j[c[d].type]||j.def).update(c[d],this.domElements.nodes[c[d].id],q),(k[c[d].type]||k.def).update(c[d],this.domElements.labels[c[d].id],q));if(j=sigma.svg.edges,o)for(c=this.edgesOnScreen,d=0,f=c.length;f>d;d++)this.domElements.edges[c[d].id]||(h=n(c[d].source),i=n(c[d].target),e=(j[c[d].type]||j.def).create(c[d],h,i,q),this.domElements.edges[c[d].id]=e,this.domElements.groups.edges.appendChild(e));if(o)for(c=this.edgesOnScreen,d=0,f=c.length;f>d;d++)h=n(c[d].source),i=n(c[d].target),(j[c[d].type]||j.def).update(c[d],this.domElements.edges[c[d].id],h,i,q);return this.dispatchEvent("render"),this},sigma.renderers.svg.prototype.initDOM=function(a){var b,c,d,e=document.createElementNS(this.settings("xmlns"),a),f=this.settings("classPrefix");e.style.position="absolute",e.setAttribute("class",f+"-svg"),e.setAttribute("xmlns",this.settings("xmlns")),e.setAttribute("xmlns:xlink","http://www.w3.org/1999/xlink"),e.setAttribute("version","1.1");var g=document.createElement("canvas");g.setAttribute("class",f+"-measurement-canvas"),this.domElements.graph=this.container.appendChild(e);var h=["edges","nodes","labels","hovers"];for(d=0,c=h.length;c>d;d++)b=document.createElementNS(this.settings("xmlns"),"g"),b.setAttributeNS(null,"id",f+"-group-"+h[d]),b.setAttributeNS(null,"class",f+"-group"),this.domElements.groups[h[d]]=this.domElements.graph.appendChild(b);this.container.appendChild(g),this.measurementCanvas=g.getContext("2d")},sigma.renderers.svg.prototype.hideDOMElements=function(a){var b,c;for(c in a)b=a[c],sigma.svg.utils.hide(b);return this},sigma.renderers.svg.prototype.bindHovers=function(a){function b(b){var c=b.data.node,d=g.settings.embedObjects({prefix:a});if(d("enableHovering")){var h=(f[c.type]||f.def).create(c,g.domElements.nodes[c.id],g.measurementCanvas,d);g.domElements.hovers[c.id]=h,g.domElements.groups.hovers.appendChild(h),e=c}}function c(b){var c=b.data.node,d=g.settings.embedObjects({prefix:a});d("enableHovering")&&(g.domElements.groups.hovers.removeChild(g.domElements.hovers[c.id]),e=null,delete g.domElements.hovers[c.id],g.domElements.groups.nodes.appendChild(g.domElements.nodes[c.id]))}function d(){if(e){var b=g.settings.embedObjects({prefix:a});g.domElements.groups.hovers.removeChild(g.domElements.hovers[e.id]),delete g.domElements.hovers[e.id];var c=(f[e.type]||f.def).create(e,g.domElements.nodes[e.id],g.measurementCanvas,b);g.domElements.hovers[e.id]=c,g.domElements.groups.hovers.appendChild(c)}}var e,f=sigma.svg.hovers,g=this;this.bind("overNode",b),this.bind("outNode",c),this.bind("render",d)},sigma.renderers.svg.prototype.resize=function(b,c){var d=this.width,e=this.height,f=1;return b!==a&&c!==a?(this.width=b,this.height=c):(this.width=this.container.offsetWidth,this.height=this.container.offsetHeight,b=this.width,c=this.height),(d!==this.width||e!==this.height)&&(this.domElements.graph.style.width=b+"px",this.domElements.graph.style.height=c+"px","svg"===this.domElements.graph.tagName.toLowerCase()&&(this.domElements.graph.setAttribute("width",b*f),this.domElements.graph.setAttribute("height",c*f))),this},sigma.utils.pkg("sigma.svg.nodes"),sigma.utils.pkg("sigma.svg.edges"),sigma.utils.pkg("sigma.svg.labels")}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.renderers");var b,c=!!a.WebGLRenderingContext;if(c){b=document.createElement("canvas");try{c=!(!b.getContext("webgl")&&!b.getContext("experimental-webgl"))}catch(d){c=!1}}sigma.renderers.def=c?sigma.renderers.webgl:sigma.renderers.canvas}(this),function(){"use strict";sigma.utils.pkg("sigma.webgl.nodes"),sigma.webgl.nodes.def={POINTS:3,ATTRIBUTES:5,addNode:function(a,b,c,d,e){var f=sigma.utils.floatColor(a.color||e("defaultNodeColor"));b[c++]=a[d+"x"],b[c++]=a[d+"y"],b[c++]=a[d+"size"],b[c++]=f,b[c++]=0,b[c++]=a[d+"x"],b[c++]=a[d+"y"],b[c++]=a[d+"size"],b[c++]=f,b[c++]=2*Math.PI/3,b[c++]=a[d+"x"],b[c++]=a[d+"y"],b[c++]=a[d+"size"],b[c++]=f,b[c++]=4*Math.PI/3},render:function(a,b,c,d){var e,f=a.getAttribLocation(b,"a_position"),g=a.getAttribLocation(b,"a_size"),h=a.getAttribLocation(b,"a_color"),i=a.getAttribLocation(b,"a_angle"),j=a.getUniformLocation(b,"u_resolution"),k=a.getUniformLocation(b,"u_matrix"),l=a.getUniformLocation(b,"u_ratio"),m=a.getUniformLocation(b,"u_scale");e=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,e),a.bufferData(a.ARRAY_BUFFER,c,a.DYNAMIC_DRAW),a.uniform2f(j,d.width,d.height),a.uniform1f(l,1/Math.pow(d.ratio,d.settings("nodesPowRatio"))),a.uniform1f(m,d.scalingRatio),a.uniformMatrix3fv(k,!1,d.matrix),a.enableVertexAttribArray(f),a.enableVertexAttribArray(g),a.enableVertexAttribArray(h),a.enableVertexAttribArray(i),a.vertexAttribPointer(f,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(g,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,8),a.vertexAttribPointer(h,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,12),a.vertexAttribPointer(i,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,16),a.drawArrays(a.TRIANGLES,d.start||0,d.count||c.length/this.ATTRIBUTES)},initProgram:function(a){var b,c,d;return b=sigma.utils.loadShader(a,["attribute vec2 a_position;","attribute float a_size;","attribute float a_color;","attribute float a_angle;","uniform vec2 u_resolution;","uniform float u_ratio;","uniform float u_scale;","uniform mat3 u_matrix;","varying vec4 color;","varying vec2 center;","varying float radius;","void main() {","radius = a_size * u_ratio;","vec2 position = (u_matrix * vec3(a_position, 1)).xy;","center = position * u_scale;","center = vec2(center.x, u_scale * u_resolution.y - center.y);","position = position +","2.0 * radius * vec2(cos(a_angle), sin(a_angle));","position = (position / u_resolution * 2.0 - 1.0) * vec2(1, -1);","radius = radius * u_scale;","gl_Position = vec4(position, 0, 1);","float c = a_color;","color.b = mod(c, 256.0); c = floor(c / 256.0);","color.g = mod(c, 256.0); c = floor(c / 256.0);","color.r = mod(c, 256.0); c = floor(c / 256.0); color /= 255.0;","color.a = 1.0;","}"].join("\n"),a.VERTEX_SHADER),c=sigma.utils.loadShader(a,["precision mediump float;","varying vec4 color;","varying vec2 center;","varying float radius;","void main(void) {","vec4 color0 = vec4(0.0, 0.0, 0.0, 0.0);","vec2 m = gl_FragCoord.xy - center;","float diff = radius - sqrt(m.x * m.x + m.y * m.y);","if (diff > 0.0)","gl_FragColor = color;","else","gl_FragColor = color0;","}"].join("\n"),a.FRAGMENT_SHADER),d=sigma.utils.loadProgram(a,[b,c])}}}(),function(){"use strict";sigma.utils.pkg("sigma.webgl.nodes"),sigma.webgl.nodes.fast={POINTS:1,ATTRIBUTES:4,addNode:function(a,b,c,d,e){b[c++]=a[d+"x"],b[c++]=a[d+"y"],b[c++]=a[d+"size"],b[c++]=sigma.utils.floatColor(a.color||e("defaultNodeColor"))},render:function(a,b,c,d){var e,f=a.getAttribLocation(b,"a_position"),g=a.getAttribLocation(b,"a_size"),h=a.getAttribLocation(b,"a_color"),i=a.getUniformLocation(b,"u_resolution"),j=a.getUniformLocation(b,"u_matrix"),k=a.getUniformLocation(b,"u_ratio"),l=a.getUniformLocation(b,"u_scale");e=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,e),a.bufferData(a.ARRAY_BUFFER,c,a.DYNAMIC_DRAW),a.uniform2f(i,d.width,d.height),a.uniform1f(k,1/Math.pow(d.ratio,d.settings("nodesPowRatio"))),a.uniform1f(l,d.scalingRatio),a.uniformMatrix3fv(j,!1,d.matrix),a.enableVertexAttribArray(f),a.enableVertexAttribArray(g),a.enableVertexAttribArray(h),a.vertexAttribPointer(f,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(g,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,8),a.vertexAttribPointer(h,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,12),a.drawArrays(a.POINTS,d.start||0,d.count||c.length/this.ATTRIBUTES)},initProgram:function(a){var b,c,d;return b=sigma.utils.loadShader(a,["attribute vec2 a_position;","attribute float a_size;","attribute float a_color;","uniform vec2 u_resolution;","uniform float u_ratio;","uniform float u_scale;","uniform mat3 u_matrix;","varying vec4 color;","void main() {","gl_Position = vec4(","((u_matrix * vec3(a_position, 1)).xy /","u_resolution * 2.0 - 1.0) * vec2(1, -1),","0,","1",");","gl_PointSize = a_size * u_ratio * u_scale * 2.0;","float c = a_color;","color.b = mod(c, 256.0); c = floor(c / 256.0);","color.g = mod(c, 256.0); c = floor(c / 256.0);","color.r = mod(c, 256.0); c = floor(c / 256.0); color /= 255.0;","color.a = 1.0;","}"].join("\n"),a.VERTEX_SHADER),c=sigma.utils.loadShader(a,["precision mediump float;","varying vec4 color;","void main(void) {","float border = 0.01;","float radius = 0.5;","vec4 color0 = vec4(0.0, 0.0, 0.0, 0.0);","vec2 m = gl_PointCoord - vec2(0.5, 0.5);","float dist = radius - sqrt(m.x * m.x + m.y * m.y);","float t = 0.0;","if (dist > border)","t = 1.0;","else if (dist > 0.0)","t = dist / border;","gl_FragColor = mix(color0, color, t);","}"].join("\n"),a.FRAGMENT_SHADER),d=sigma.utils.loadProgram(a,[b,c])}}}(),function(){"use strict";sigma.utils.pkg("sigma.webgl.edges"),sigma.webgl.edges.def={POINTS:6,ATTRIBUTES:7,addEdge:function(a,b,c,d,e,f,g){var h=(a[f+"size"]||1)/2,i=b[f+"x"],j=b[f+"y"],k=c[f+"x"],l=c[f+"y"],m=a.color;if(!m)switch(g("edgeColor")){case"source":m=b.color||g("defaultNodeColor");break;case"target":m=c.color||g("defaultNodeColor");break;default:m=g("defaultEdgeColor")}m=sigma.utils.floatColor(m),d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=0,d[e++]=m,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=1,d[e++]=m,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=0,d[e++]=m,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=0,d[e++]=m,d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=1,d[e++]=m,d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=0,d[e++]=m},render:function(a,b,c,d){var e,f=a.getAttribLocation(b,"a_color"),g=a.getAttribLocation(b,"a_position1"),h=a.getAttribLocation(b,"a_position2"),i=a.getAttribLocation(b,"a_thickness"),j=a.getAttribLocation(b,"a_minus"),k=a.getUniformLocation(b,"u_resolution"),l=a.getUniformLocation(b,"u_matrix"),m=a.getUniformLocation(b,"u_matrixHalfPi"),n=a.getUniformLocation(b,"u_matrixHalfPiMinus"),o=a.getUniformLocation(b,"u_ratio"),p=a.getUniformLocation(b,"u_scale");e=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,e),a.bufferData(a.ARRAY_BUFFER,c,a.STATIC_DRAW),a.uniform2f(k,d.width,d.height),a.uniform1f(o,d.ratio/Math.pow(d.ratio,d.settings("edgesPowRatio"))),a.uniform1f(p,d.scalingRatio),a.uniformMatrix3fv(l,!1,d.matrix),a.uniformMatrix2fv(m,!1,sigma.utils.matrices.rotation(Math.PI/2,!0)),a.uniformMatrix2fv(n,!1,sigma.utils.matrices.rotation(-Math.PI/2,!0)),a.enableVertexAttribArray(f),a.enableVertexAttribArray(g),a.enableVertexAttribArray(h),a.enableVertexAttribArray(i),a.enableVertexAttribArray(j),a.vertexAttribPointer(g,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(h,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,8),a.vertexAttribPointer(i,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,16),a.vertexAttribPointer(j,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,20),a.vertexAttribPointer(f,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,24),a.drawArrays(a.TRIANGLES,d.start||0,d.count||c.length/this.ATTRIBUTES)},initProgram:function(a){var b,c,d;return b=sigma.utils.loadShader(a,["attribute vec2 a_position1;","attribute vec2 a_position2;","attribute float a_thickness;","attribute float a_minus;","attribute float a_color;","uniform vec2 u_resolution;","uniform float u_ratio;","uniform float u_scale;","uniform mat3 u_matrix;","uniform mat2 u_matrixHalfPi;","uniform mat2 u_matrixHalfPiMinus;","varying vec4 color;","void main() {","vec2 position = a_thickness * u_ratio *","normalize(a_position2 - a_position1);","mat2 matrix = a_minus * u_matrixHalfPiMinus +","(1.0 - a_minus) * u_matrixHalfPi;","position = matrix * position + a_position1;","gl_Position = vec4(","((u_matrix * vec3(position, 1)).xy /","u_resolution * 2.0 - 1.0) * vec2(1, -1),","0,","1",");","float c = a_color;","color.b = mod(c, 256.0); c = floor(c / 256.0);","color.g = mod(c, 256.0); c = floor(c / 256.0);","color.r = mod(c, 256.0); c = floor(c / 256.0); color /= 255.0;","color.a = 1.0;","}"].join("\n"),a.VERTEX_SHADER),c=sigma.utils.loadShader(a,["precision mediump float;","varying vec4 color;","void main(void) {","gl_FragColor = color;","}"].join("\n"),a.FRAGMENT_SHADER),d=sigma.utils.loadProgram(a,[b,c])}}}(),function(){"use strict";sigma.utils.pkg("sigma.webgl.edges"),sigma.webgl.edges.fast={POINTS:2,ATTRIBUTES:3,addEdge:function(a,b,c,d,e,f,g){var h=((a[f+"size"]||1)/2,b[f+"x"]),i=b[f+"y"],j=c[f+"x"],k=c[f+"y"],l=a.color;if(!l)switch(g("edgeColor")){case"source":l=b.color||g("defaultNodeColor");break;case"target":l=c.color||g("defaultNodeColor");break;default:l=g("defaultEdgeColor")}l=sigma.utils.floatColor(l),d[e++]=h,d[e++]=i,d[e++]=l,d[e++]=j,d[e++]=k,d[e++]=l},render:function(a,b,c,d){var e,f=a.getAttribLocation(b,"a_color"),g=a.getAttribLocation(b,"a_position"),h=a.getUniformLocation(b,"u_resolution"),i=a.getUniformLocation(b,"u_matrix");e=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,e),a.bufferData(a.ARRAY_BUFFER,c,a.DYNAMIC_DRAW),a.uniform2f(h,d.width,d.height),a.uniformMatrix3fv(i,!1,d.matrix),a.enableVertexAttribArray(g),a.enableVertexAttribArray(f),a.vertexAttribPointer(g,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(f,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,8),a.lineWidth(3),a.drawArrays(a.LINES,d.start||0,d.count||c.length/this.ATTRIBUTES)},initProgram:function(a){var b,c,d;return b=sigma.utils.loadShader(a,["attribute vec2 a_position;","attribute float a_color;","uniform vec2 u_resolution;","uniform mat3 u_matrix;","varying vec4 color;","void main() {","gl_Position = vec4(","((u_matrix * vec3(a_position, 1)).xy /","u_resolution * 2.0 - 1.0) * vec2(1, -1),","0,","1",");","float c = a_color;","color.b = mod(c, 256.0); c = floor(c / 256.0);","color.g = mod(c, 256.0); c = floor(c / 256.0);","color.r = mod(c, 256.0); c = floor(c / 256.0); color /= 255.0;","color.a = 1.0;","}"].join("\n"),a.VERTEX_SHADER),c=sigma.utils.loadShader(a,["precision mediump float;","varying vec4 color;","void main(void) {","gl_FragColor = color;","}"].join("\n"),a.FRAGMENT_SHADER),d=sigma.utils.loadProgram(a,[b,c])}}}(),function(){"use strict";sigma.utils.pkg("sigma.webgl.edges"),sigma.webgl.edges.arrow={POINTS:9,ATTRIBUTES:11,addEdge:function(a,b,c,d,e,f,g){var h=(a[f+"size"]||1)/2,i=b[f+"x"],j=b[f+"y"],k=c[f+"x"],l=c[f+"y"],m=c[f+"size"],n=a.color;if(!n)switch(g("edgeColor")){case"source":n=b.color||g("defaultNodeColor");break;case"target":n=c.color||g("defaultNodeColor");break;default:n=g("defaultEdgeColor")}n=sigma.utils.floatColor(n),d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=m,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=1,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=m,d[e++]=0,d[e++]=1,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=i,d[e++]=j,d[e++]=k,d[e++]=l,d[e++]=h,d[e++]=m,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=0,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=0,d[e++]=1,d[e++]=-1,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=0,d[e++]=1,d[e++]=0,d[e++]=n,d[e++]=k,d[e++]=l,d[e++]=i,d[e++]=j,d[e++]=h,d[e++]=m,d[e++]=1,d[e++]=0,d[e++]=1,d[e++]=1,d[e++]=n},render:function(a,b,c,d){var e,f=a.getAttribLocation(b,"a_pos1"),g=a.getAttribLocation(b,"a_pos2"),h=a.getAttribLocation(b,"a_thickness"),i=a.getAttribLocation(b,"a_tSize"),j=a.getAttribLocation(b,"a_delay"),k=a.getAttribLocation(b,"a_minus"),l=a.getAttribLocation(b,"a_head"),m=a.getAttribLocation(b,"a_headPosition"),n=a.getAttribLocation(b,"a_color"),o=a.getUniformLocation(b,"u_resolution"),p=a.getUniformLocation(b,"u_matrix"),q=a.getUniformLocation(b,"u_matrixHalfPi"),r=a.getUniformLocation(b,"u_matrixHalfPiMinus"),s=a.getUniformLocation(b,"u_ratio"),t=a.getUniformLocation(b,"u_nodeRatio"),u=a.getUniformLocation(b,"u_arrowHead"),v=a.getUniformLocation(b,"u_scale");e=a.createBuffer(),a.bindBuffer(a.ARRAY_BUFFER,e),a.bufferData(a.ARRAY_BUFFER,c,a.STATIC_DRAW),a.uniform2f(o,d.width,d.height),a.uniform1f(s,d.ratio/Math.pow(d.ratio,d.settings("edgesPowRatio"))),a.uniform1f(t,Math.pow(d.ratio,d.settings("nodesPowRatio"))/d.ratio),a.uniform1f(u,5),a.uniform1f(v,d.scalingRatio),a.uniformMatrix3fv(p,!1,d.matrix),a.uniformMatrix2fv(q,!1,sigma.utils.matrices.rotation(Math.PI/2,!0)),a.uniformMatrix2fv(r,!1,sigma.utils.matrices.rotation(-Math.PI/2,!0)),a.enableVertexAttribArray(f),a.enableVertexAttribArray(g),a.enableVertexAttribArray(h),a.enableVertexAttribArray(i),a.enableVertexAttribArray(j),a.enableVertexAttribArray(k),a.enableVertexAttribArray(l),a.enableVertexAttribArray(m),a.enableVertexAttribArray(n),a.vertexAttribPointer(f,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,0),a.vertexAttribPointer(g,2,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,8),a.vertexAttribPointer(h,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,16),a.vertexAttribPointer(i,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,20),a.vertexAttribPointer(j,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,24),a.vertexAttribPointer(k,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,28),a.vertexAttribPointer(l,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,32),a.vertexAttribPointer(m,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,36),a.vertexAttribPointer(n,1,a.FLOAT,!1,this.ATTRIBUTES*Float32Array.BYTES_PER_ELEMENT,40),a.drawArrays(a.TRIANGLES,d.start||0,d.count||c.length/this.ATTRIBUTES)},initProgram:function(a){var b,c,d;return b=sigma.utils.loadShader(a,["attribute vec2 a_pos1;","attribute vec2 a_pos2;","attribute float a_thickness;","attribute float a_tSize;","attribute float a_delay;","attribute float a_minus;","attribute float a_head;","attribute float a_headPosition;","attribute float a_color;","uniform vec2 u_resolution;","uniform float u_ratio;","uniform float u_nodeRatio;","uniform float u_arrowHead;","uniform float u_scale;","uniform mat3 u_matrix;","uniform mat2 u_matrixHalfPi;","uniform mat2 u_matrixHalfPiMinus;","varying vec4 color;","void main() {","vec2 pos = normalize(a_pos2 - a_pos1);","mat2 matrix = (1.0 - a_head) *","(","a_minus * u_matrixHalfPiMinus +","(1.0 - a_minus) * u_matrixHalfPi",") + a_head * (","a_headPosition * u_matrixHalfPiMinus * 0.6 +","(a_headPosition * a_headPosition - 1.0) * mat2(1.0)",");","pos = a_pos1 + (","(1.0 - a_head) * a_thickness * u_ratio * matrix * pos +","a_head * u_arrowHead * a_thickness * u_ratio * matrix * pos +","a_delay * pos * (","a_tSize / u_nodeRatio +","u_arrowHead * a_thickness * u_ratio",")",");","gl_Position = vec4(","((u_matrix * vec3(pos, 1)).xy /","u_resolution * 2.0 - 1.0) * vec2(1, -1),","0,","1",");","float c = a_color;","color.b = mod(c, 256.0); c = floor(c / 256.0);","color.g = mod(c, 256.0); c = floor(c / 256.0);","color.r = mod(c, 256.0); c = floor(c / 256.0); color /= 255.0;","color.a = 1.0;","}"].join("\n"),a.VERTEX_SHADER),c=sigma.utils.loadShader(a,["precision mediump float;","varying vec4 color;","void main(void) {","gl_FragColor = color;","}"].join("\n"),a.FRAGMENT_SHADER),d=sigma.utils.loadProgram(a,[b,c])}}}(),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.labels"),sigma.canvas.labels.def=function(a,b,c){var d,e=c("prefix")||"",f=a[e+"size"];f0&&(b.beginPath(),b.fillStyle="node"===c("nodeBorderColor")?a.color||c("defaultNodeColor"):c("defaultNodeBorderColor"),b.arc(a[j+"x"],a[j+"y"],k+c("borderSize"),0,2*Math.PI,!0),b.closePath(),b.fill());var m=sigma.canvas.nodes[a.type]||sigma.canvas.nodes.def;m(a,b,c),a.label&&"string"==typeof a.label&&(b.fillStyle="node"===c("labelHoverColor")?a.color||c("defaultNodeColor"):c("defaultLabelHoverColor"),b.fillText(a.label,Math.round(a[j+"x"]+k+3),Math.round(a[j+"y"]+l/3)))}}.call(this),function(){"use strict";sigma.utils.pkg("sigma.canvas.nodes"),sigma.canvas.nodes.def=function(a,b,c){var d=c("prefix")||"";b.fillStyle=a.color||c("defaultNodeColor"),b.beginPath(),b.arc(a[d+"x"],a[d+"y"],a[d+"size"],0,2*Math.PI,!0),b.closePath(),b.fill()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.def=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.strokeStyle=f,d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.curve=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor"),l={},m=b[g+"size"],n=b[g+"x"],o=b[g+"y"],p=c[g+"x"],q=c[g+"y"];if(l=b.id===c.id?sigma.utils.getSelfLoopControlPoints(n,o,m):sigma.utils.getQuadraticControlPoint(n,o,p,q),!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.strokeStyle=f,d.lineWidth=h,d.beginPath(),d.moveTo(n,o),b.id===c.id?d.bezierCurveTo(l.x1,l.y1,l.x2,l.y2,p,q):d.quadraticCurveTo(l.x,l.y,p,q),d.stroke()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.arrow=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=e("edgeColor"),i=e("defaultNodeColor"),j=e("defaultEdgeColor"),k=a[g+"size"]||1,l=c[g+"size"],m=b[g+"x"],n=b[g+"y"],o=c[g+"x"],p=c[g+"y"],q=Math.max(2.5*k,e("minArrowSize")),r=Math.sqrt(Math.pow(o-m,2)+Math.pow(p-n,2)),s=m+(o-m)*(r-q-l)/r,t=n+(p-n)*(r-q-l)/r,u=(o-m)*q/r,v=(p-n)*q/r;if(!f)switch(h){case"source":f=b.color||i;break;case"target":f=c.color||i;break;default:f=j}d.strokeStyle=f,d.lineWidth=k,d.beginPath(),d.moveTo(m,n),d.lineTo(s,t),d.stroke(),d.fillStyle=f,d.beginPath(),d.moveTo(s+u,t+v),d.lineTo(s+.6*v,t-.6*u),d.lineTo(s-.6*v,t+.6*u),d.lineTo(s+u,t+v),d.closePath(),d.fill()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.curvedArrow=function(a,b,c,d,e){var f,g,h,i,j,k=a.color,l=e("prefix")||"",m=e("edgeColor"),n=e("defaultNodeColor"),o=e("defaultEdgeColor"),p={},q=a[l+"size"]||1,r=c[l+"size"],s=b[l+"x"],t=b[l+"y"],u=c[l+"x"],v=c[l+"y"],w=Math.max(2.5*q,e("minArrowSize"));if(p=b.id===c.id?sigma.utils.getSelfLoopControlPoints(s,t,r):sigma.utils.getQuadraticControlPoint(s,t,u,v),b.id===c.id?(f=Math.sqrt(Math.pow(u-p.x1,2)+Math.pow(v-p.y1,2)),g=p.x1+(u-p.x1)*(f-w-r)/f,h=p.y1+(v-p.y1)*(f-w-r)/f,i=(u-p.x1)*w/f,j=(v-p.y1)*w/f):(f=Math.sqrt(Math.pow(u-p.x,2)+Math.pow(v-p.y,2)),g=p.x+(u-p.x)*(f-w-r)/f,h=p.y+(v-p.y)*(f-w-r)/f,i=(u-p.x)*w/f,j=(v-p.y)*w/f),!k)switch(m){case"source":k=b.color||n;break;case"target":k=c.color||n;break;default:k=o}d.strokeStyle=k,d.lineWidth=q,d.beginPath(),d.moveTo(s,t),b.id===c.id?d.bezierCurveTo(p.x2,p.y2,p.x1,p.y1,g,h):d.quadraticCurveTo(p.x,p.y,g,h),d.stroke(),d.fillStyle=k,d.beginPath(),d.moveTo(g+i,h+j),d.lineTo(g+.6*j,h-.6*i),d.lineTo(g-.6*j,h+.6*i),d.lineTo(g+i,h+j),d.closePath(),d.fill()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edgehovers"),sigma.canvas.edgehovers.def=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}f="edge"===e("edgeHoverColor")?a.hover_color||f:a.hover_color||e("defaultEdgeHoverColor")||f,h*=e("edgeHoverSizeRatio"),d.strokeStyle=f,d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edgehovers"),sigma.canvas.edgehovers.curve=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=e("edgeHoverSizeRatio")*(a[g+"size"]||1),i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor"),l={},m=b[g+"size"],n=b[g+"x"],o=b[g+"y"],p=c[g+"x"],q=c[g+"y"];if(l=b.id===c.id?sigma.utils.getSelfLoopControlPoints(n,o,m):sigma.utils.getQuadraticControlPoint(n,o,p,q),!f)switch(i){case"source": f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}f="edge"===e("edgeHoverColor")?a.hover_color||f:a.hover_color||e("defaultEdgeHoverColor")||f,d.strokeStyle=f,d.lineWidth=h,d.beginPath(),d.moveTo(n,o),b.id===c.id?d.bezierCurveTo(l.x1,l.y1,l.x2,l.y2,p,q):d.quadraticCurveTo(l.x,l.y,p,q),d.stroke()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edgehovers"),sigma.canvas.edgehovers.arrow=function(a,b,c,d,e){var f=a.color,g=e("prefix")||"",h=e("edgeColor"),i=e("defaultNodeColor"),j=e("defaultEdgeColor"),k=a[g+"size"]||1,l=c[g+"size"],m=b[g+"x"],n=b[g+"y"],o=c[g+"x"],p=c[g+"y"];k=a.hover?e("edgeHoverSizeRatio")*k:k;var q=2.5*k,r=Math.sqrt(Math.pow(o-m,2)+Math.pow(p-n,2)),s=m+(o-m)*(r-q-l)/r,t=n+(p-n)*(r-q-l)/r,u=(o-m)*q/r,v=(p-n)*q/r;if(!f)switch(h){case"source":f=b.color||i;break;case"target":f=c.color||i;break;default:f=j}f="edge"===e("edgeHoverColor")?a.hover_color||f:a.hover_color||e("defaultEdgeHoverColor")||f,d.strokeStyle=f,d.lineWidth=k,d.beginPath(),d.moveTo(m,n),d.lineTo(s,t),d.stroke(),d.fillStyle=f,d.beginPath(),d.moveTo(s+u,t+v),d.lineTo(s+.6*v,t-.6*u),d.lineTo(s-.6*v,t+.6*u),d.lineTo(s+u,t+v),d.closePath(),d.fill()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edgehovers"),sigma.canvas.edgehovers.curvedArrow=function(a,b,c,d,e){var f,g,h,i,j,k,l=a.color,m=e("prefix")||"",n=e("edgeColor"),o=e("defaultNodeColor"),p=e("defaultEdgeColor"),q={},r=e("edgeHoverSizeRatio")*(a[m+"size"]||1),s=c[m+"size"],t=b[m+"x"],u=b[m+"y"],v=c[m+"x"],w=c[m+"y"];if(q=b.id===c.id?sigma.utils.getSelfLoopControlPoints(t,u,s):sigma.utils.getQuadraticControlPoint(t,u,v,w),b.id===c.id?(f=Math.sqrt(Math.pow(v-q.x1,2)+Math.pow(w-q.y1,2)),g=2.5*r,h=q.x1+(v-q.x1)*(f-g-s)/f,i=q.y1+(w-q.y1)*(f-g-s)/f,j=(v-q.x1)*g/f,k=(w-q.y1)*g/f):(f=Math.sqrt(Math.pow(v-q.x,2)+Math.pow(w-q.y,2)),g=2.5*r,h=q.x+(v-q.x)*(f-g-s)/f,i=q.y+(w-q.y)*(f-g-s)/f,j=(v-q.x)*g/f,k=(w-q.y)*g/f),!l)switch(n){case"source":l=b.color||o;break;case"target":l=c.color||o;break;default:l=p}l="edge"===e("edgeHoverColor")?a.hover_color||l:a.hover_color||e("defaultEdgeHoverColor")||l,d.strokeStyle=l,d.lineWidth=r,d.beginPath(),d.moveTo(t,u),b.id===c.id?d.bezierCurveTo(q.x2,q.y2,q.x1,q.y1,h,i):d.quadraticCurveTo(q.x,q.y,h,i),d.stroke(),d.fillStyle=l,d.beginPath(),d.moveTo(h+j,i+k),d.lineTo(h+.6*k,i-.6*j),d.lineTo(h-.6*k,i+.6*j),d.lineTo(h+j,i+k),d.closePath(),d.fill()}}(),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.extremities"),sigma.canvas.extremities.def=function(a,b,c,d,e){(sigma.canvas.hovers[b.type]||sigma.canvas.hovers.def)(b,d,e),(sigma.canvas.hovers[c.type]||sigma.canvas.hovers.def)(c,d,e)}}.call(this),function(){"use strict";sigma.utils.pkg("sigma.svg.utils"),sigma.svg.utils={show:function(a){return a.style.display="",this},hide:function(a){return a.style.display="none",this}}}(),function(){"use strict";sigma.utils.pkg("sigma.svg.nodes"),sigma.svg.nodes.def={create:function(a,b){var c=(b("prefix")||"",document.createElementNS(b("xmlns"),"circle"));return c.setAttributeNS(null,"data-node-id",a.id),c.setAttributeNS(null,"class",b("classPrefix")+"-node"),c.setAttributeNS(null,"fill",a.color||b("defaultNodeColor")),c},update:function(a,b,c){var d=c("prefix")||"";return b.setAttributeNS(null,"cx",a[d+"x"]),b.setAttributeNS(null,"cy",a[d+"y"]),b.setAttributeNS(null,"r",a[d+"size"]),c("freeStyle")||b.setAttributeNS(null,"fill",a.color||c("defaultNodeColor")),b.style.display="",this}}}(),function(){"use strict";sigma.utils.pkg("sigma.svg.edges"),sigma.svg.edges.def={create:function(a,b,c,d){var e=a.color,f=(d("prefix")||"",d("edgeColor")),g=d("defaultNodeColor"),h=d("defaultEdgeColor");if(!e)switch(f){case"source":e=b.color||g;break;case"target":e=c.color||g;break;default:e=h}var i=document.createElementNS(d("xmlns"),"line");return i.setAttributeNS(null,"data-edge-id",a.id),i.setAttributeNS(null,"class",d("classPrefix")+"-edge"),i.setAttributeNS(null,"stroke",e),i},update:function(a,b,c,d,e){var f=e("prefix")||"";return b.setAttributeNS(null,"stroke-width",a[f+"size"]||1),b.setAttributeNS(null,"x1",c[f+"x"]),b.setAttributeNS(null,"y1",c[f+"y"]),b.setAttributeNS(null,"x2",d[f+"x"]),b.setAttributeNS(null,"y2",d[f+"y"]),b.style.display="",this}}}(),function(){"use strict";sigma.utils.pkg("sigma.svg.edges"),sigma.svg.edges.curve={create:function(a,b,c,d){var e=a.color,f=(d("prefix")||"",d("edgeColor")),g=d("defaultNodeColor"),h=d("defaultEdgeColor");if(!e)switch(f){case"source":e=b.color||g;break;case"target":e=c.color||g;break;default:e=h}var i=document.createElementNS(d("xmlns"),"path");return i.setAttributeNS(null,"data-edge-id",a.id),i.setAttributeNS(null,"class",d("classPrefix")+"-edge"),i.setAttributeNS(null,"stroke",e),i},update:function(a,b,c,d,e){var f=e("prefix")||"";b.setAttributeNS(null,"stroke-width",a[f+"size"]||1);var g=(c[f+"x"]+d[f+"x"])/2+(d[f+"y"]-c[f+"y"])/4,h=(c[f+"y"]+d[f+"y"])/2+(c[f+"x"]-d[f+"x"])/4,i="M"+c[f+"x"]+","+c[f+"y"]+" Q"+g+","+h+" "+d[f+"x"]+","+d[f+"y"];return b.setAttributeNS(null,"d",i),b.setAttributeNS(null,"fill","none"),b.style.display="",this}}}(),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.svg.labels"),sigma.svg.labels.def={create:function(a,b){var c=b("prefix")||"",d=a[c+"size"],e=document.createElementNS(b("xmlns"),"text"),f="fixed"===b("labelSize")?b("defaultLabelSize"):b("labelSizeRatio")*d,g="node"===b("labelColor")?a.color||b("defaultNodeColor"):b("defaultLabelColor");return e.setAttributeNS(null,"data-label-target",a.id),e.setAttributeNS(null,"class",b("classPrefix")+"-label"),e.setAttributeNS(null,"font-size",f),e.setAttributeNS(null,"font-family",b("font")),e.setAttributeNS(null,"fill",g),e.innerHTML=a.label,e.textContent=a.label,e},update:function(a,b,c){var d=c("prefix")||"",e=a[d+"size"],f="fixed"===c("labelSize")?c("defaultLabelSize"):c("labelSizeRatio")*e;return!c("forceLabels")&&ed;d++)if(!y[x[d]])throw new Error('The rescale setting "'+x[d]+'" is not recognized.');var z=~x.indexOf("nodePosition"),A=~x.indexOf("nodeSize"),B=~x.indexOf("edgeSize");for(j="outside"===n("scalingMode")?Math.max(v/Math.max(r-p,1),w/Math.max(s-q,1)):Math.min(v/Math.max(r-p,1),w/Math.max(s-q,1)),k=(n("rescaleIgnoreSize")?0:(n("maxNodeSize")||t)/j)+(n("sideMargin")||0),r+=k,p-=k,s+=k,q-=k,j="outside"===n("scalingMode")?Math.max(v/Math.max(r-p,1),w/Math.max(s-q,1)):Math.min(v/Math.max(r-p,1),w/Math.max(s-q,1)),n("maxNodeSize")||n("minNodeSize")?n("maxNodeSize")===n("minNodeSize")?(f=0,g=+n("maxNodeSize")):(f=(n("maxNodeSize")-n("minNodeSize"))/t,g=+n("minNodeSize")):(f=1,g=0),n("maxEdgeSize")||n("minEdgeSize")?n("maxEdgeSize")===n("minEdgeSize")?(h=0,i=+n("minEdgeSize")):(h=(n("maxEdgeSize")-n("minEdgeSize"))/u,i=+n("minEdgeSize")):(h=1,i=0),d=0,e=m.length;e>d;d++)m[d][b+"size"]=m[d][a+"size"]*(B?h:1)+(B?i:0);for(d=0,e=l.length;e>d;d++)l[d][b+"size"]=l[d][a+"size"]*(A?f:1)+(A?g:0),l[d][b+"x"]=(l[d][a+"x"]-(r+p)/2)*(z?j:1),l[d][b+"y"]=(l[d][a+"y"]-(s+q)/2)*(z?j:1)},sigma.utils.getBoundaries=function(a,b,c){var d,e,f=a.edges(),g=a.nodes(),h=-1/0,i=-1/0,j=1/0,k=1/0,l=-1/0,m=-1/0;if(c)for(d=0,e=f.length;e>d;d++)h=Math.max(f[d][b+"size"],h);for(d=0,e=g.length;e>d;d++)i=Math.max(g[d][b+"size"],i),l=Math.max(g[d][b+"x"],l),j=Math.min(g[d][b+"x"],j),m=Math.max(g[d][b+"y"],m),k=Math.min(g[d][b+"y"],k);return h=h||1,i=i||1,{weightMax:h,sizeMax:i,minX:j,minY:k,maxX:l,maxY:m}}}.call(this),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.middlewares"),sigma.middlewares.copy=function(a,b){var c,d,e;if(b+""!=a+""){for(e=this.graph.nodes(),c=0,d=e.length;d>c;c++)e[c][b+"x"]=e[c][a+"x"],e[c][b+"y"]=e[c][a+"y"],e[c][b+"size"]=e[c][a+"size"];for(e=this.graph.edges(),c=0,d=e.length;d>c;c++)e[c][b+"size"]=e[c][a+"size"]}}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.misc.animation.running");var b=function(){var a=0;return function(){return""+ ++a}}();sigma.misc.animation.camera=function(c,d,e){if(!(c instanceof sigma.classes.camera&&"object"==typeof d&&d))throw"animation.camera: Wrong arguments.";if("number"!=typeof d.x&&"number"!=typeof d.y&&"number"!=typeof d.ratio&&"number"!=typeof d.angle)throw"There must be at least one valid coordinate in the given val.";var f,g,h,i,j,k,l=e||{},m=sigma.utils.dateNow();return k={x:c.x,y:c.y,ratio:c.ratio,angle:c.angle},j=l.duration,i="function"!=typeof l.easing?sigma.utils.easings[l.easing||"quadraticInOut"]:l.easing,f=function(){var b,e=l.duration?(sigma.utils.dateNow()-m)/l.duration:1;e>=1?(c.isAnimated=!1,c.goTo({x:d.x!==a?d.x:k.x,y:d.y!==a?d.y:k.y,ratio:d.ratio!==a?d.ratio:k.ratio,angle:d.angle!==a?d.angle:k.angle}),cancelAnimationFrame(g),delete sigma.misc.animation.running[g],"function"==typeof l.onComplete&&l.onComplete()):(b=i(e),c.isAnimated=!0,c.goTo({x:d.x!==a?k.x+(d.x-k.x)*b:k.x,y:d.y!==a?k.y+(d.y-k.y)*b:k.y,ratio:d.ratio!==a?k.ratio+(d.ratio-k.ratio)*b:k.ratio,angle:d.angle!==a?k.angle+(d.angle-k.angle)*b:k.angle}),"function"==typeof l.onNewFrame&&l.onNewFrame(),h.frameId=requestAnimationFrame(f))},g=b(),h={frameId:requestAnimationFrame(f),target:c,type:"camera",options:l,fn:f},sigma.misc.animation.running[g]=h,g},sigma.misc.animation.kill=function(a){if(1!==arguments.length||"number"!=typeof a)throw"animation.kill: Wrong arguments.";var b=sigma.misc.animation.running[a];return b&&(cancelAnimationFrame(a),delete sigma.misc.animation.running[b.frameId],"camera"===b.type&&(b.target.isAnimated=!1),"function"==typeof(b.options||{}).onComplete&&b.options.onComplete()),this},sigma.misc.animation.killAll=function(a){var b,c,d=0,e="string"==typeof a?a:null,f="object"==typeof a?a:null,g=sigma.misc.animation.running;for(c in g)e&&g[c].type!==e||f&&g[c].target!==f||(b=sigma.misc.animation.running[c],cancelAnimationFrame(b.frameId),delete sigma.misc.animation.running[c],"camera"===b.type&&(b.target.isAnimated=!1),d++,"function"==typeof(b.options||{}).onComplete&&b.options.onComplete());return d},sigma.misc.animation.has=function(a){var b,c="string"==typeof a?a:null,d="object"==typeof a?a:null,e=sigma.misc.animation.running;for(b in e)if(!(c&&e[b].type!==c||d&&e[b].target!==d))return!0;return!1}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.misc"),sigma.misc.bindEvents=function(b){function c(a){a&&(h="x"in a.data?a.data.x:h,i="y"in a.data?a.data.y:i);var c,d,e,f,g,k,l,m,n=[],o=h+j.width/2,p=i+j.height/2,q=j.camera.cameraPosition(h,i),r=j.camera.quadtree.point(q.x,q.y);if(r.length)for(c=0,e=r.length;e>c;c++)if(f=r[c],g=f[b+"x"],k=f[b+"y"],l=f[b+"size"],!f.hidden&&o>g-l&&g+l>o&&p>k-l&&k+l>p&&Math.sqrt(Math.pow(o-g,2)+Math.pow(p-k,2))n[d].size){n.splice(d,0,f),m=!0;break}m||n.push(f)}return n}function d(c){function d(a,b){for(r=!1,g=0;ga[g].size){a.splice(g,0,b),r=!0;break}r||a.push(b)}if(!j.settings("enableEdgeHovering"))return[];var e=sigma.renderers.canvas&&j instanceof sigma.renderers.canvas;if(!e)throw new Error("The edge events feature is not compatible with the WebGL renderer");c&&(h="x"in c.data?c.data.x:h,i="y"in c.data?c.data.y:i);var f,g,k,l,m,n,o,p,q,r,s=j.settings("edgeHoverPrecision"),t={},u=[],v=h+j.width/2,w=i+j.height/2,x=j.camera.cameraPosition(h,i),y=[];if(e){var z=j.camera.quadtree.area(j.camera.getRectangle(j.width,j.height));for(l=z,f=0,k=l.length;k>f;f++)t[l[f].id]=l[f]}if(j.camera.edgequadtree!==a&&(y=j.camera.edgequadtree.point(x.x,x.y)),y.length)for(f=0,k=y.length;k>f;f++)m=y[f],o=j.graph.nodes(m.source),p=j.graph.nodes(m.target),n=m[b+"size"]||m["read_"+b+"size"],!m.hidden&&!o.hidden&&!p.hidden&&(!e||t[m.source]||t[m.target])&&sigma.utils.getDistance(o[b+"x"],o[b+"y"],v,w)>o[b+"size"]&&sigma.utils.getDistance(p[b+"x"],p[b+"y"],v,w)>p[b+"size"]&&("curve"==m.type||"curvedArrow"==m.type?o.id===p.id?(q=sigma.utils.getSelfLoopControlPoints(o[b+"x"],o[b+"y"],o[b+"size"]),sigma.utils.isPointOnBezierCurve(v,w,o[b+"x"],o[b+"y"],p[b+"x"],p[b+"y"],q.x1,q.y1,q.x2,q.y2,Math.max(n,s))&&d(u,m)):(q=sigma.utils.getQuadraticControlPoint(o[b+"x"],o[b+"y"],p[b+"x"],p[b+"y"]),sigma.utils.isPointOnQuadraticCurve(v,w,o[b+"x"],o[b+"y"],p[b+"x"],p[b+"y"],q.x,q.y,Math.max(n,s))&&d(u,m)):sigma.utils.isPointOnSegment(v,w,o[b+"x"],o[b+"y"],p[b+"x"],p[b+"y"],Math.max(n,s))&&d(u,m));return u}function e(a){function b(a){j.settings("eventsEnabled")&&(j.dispatchEvent("click",a.data),i=c(a),k=d(a),i.length?(j.dispatchEvent("clickNode",{node:i[0],captor:a.data}),j.dispatchEvent("clickNodes",{node:i,captor:a.data})):k.length?(j.dispatchEvent("clickEdge",{edge:k[0],captor:a.data}),j.dispatchEvent("clickEdges",{edge:k,captor:a.data})):j.dispatchEvent("clickStage",{captor:a.data}))}function e(a){j.settings("eventsEnabled")&&(j.dispatchEvent("doubleClick",a.data),i=c(a),k=d(a),i.length?(j.dispatchEvent("doubleClickNode",{node:i[0],captor:a.data}),j.dispatchEvent("doubleClickNodes",{node:i,captor:a.data})):k.length?(j.dispatchEvent("doubleClickEdge",{edge:k[0],captor:a.data}),j.dispatchEvent("doubleClickEdges",{edge:k,captor:a.data})):j.dispatchEvent("doubleClickStage",{captor:a.data}))}function f(a){j.settings("eventsEnabled")&&(j.dispatchEvent("rightClick",a.data),i=c(a),k=d(a),i.length?(j.dispatchEvent("rightClickNode",{node:i[0],captor:a.data}),j.dispatchEvent("rightClickNodes",{node:i,captor:a.data})):k.length?(j.dispatchEvent("rightClickEdge",{edge:k[0],captor:a.data}),j.dispatchEvent("rightClickEdges",{edge:k,captor:a.data})):j.dispatchEvent("rightClickStage",{captor:a.data}))}function g(a){if(j.settings("eventsEnabled")){var b,c,d,e,f=[],g=[];for(b in l)f.push(l[b]);for(l={},c=0,d=f.length;d>c;c++)j.dispatchEvent("outNode",{node:f[c],captor:a.data});for(f.length&&j.dispatchEvent("outNodes",{nodes:f,captor:a.data}),m={},c=0,e=g.length;e>c;c++)j.dispatchEvent("outEdge",{edge:g[c],captor:a.data});g.length&&j.dispatchEvent("outEdges",{edges:g,captor:a.data})}}function h(a){if(j.settings("eventsEnabled")){i=c(a),k=d(a);var b,e,f,g,h=[],n=[],o={},p=i.length,q=[],r=[],s={},t=k.length;for(b=0;p>b;b++)f=i[b],o[f.id]=f,l[f.id]||(n.push(f),l[f.id]=f);for(e in l)o[e]||(h.push(l[e]),delete l[e]);for(b=0,p=n.length;p>b;b++)j.dispatchEvent("overNode",{node:n[b],captor:a.data});for(b=0,p=h.length;p>b;b++)j.dispatchEvent("outNode",{node:h[b],captor:a.data});for(n.length&&j.dispatchEvent("overNodes",{nodes:n,captor:a.data}),h.length&&j.dispatchEvent("outNodes",{nodes:h,captor:a.data}),b=0;t>b;b++)g=k[b],s[g.id]=g,m[g.id]||(r.push(g),m[g.id]=g);for(e in m)s[e]||(q.push(m[e]),delete m[e]);for(b=0,t=r.length;t>b;b++)j.dispatchEvent("overEdge",{edge:r[b],captor:a.data});for(b=0,t=q.length;t>b;b++)j.dispatchEvent("outEdge",{edge:q[b],captor:a.data});r.length&&j.dispatchEvent("overEdges",{edges:r,captor:a.data}),q.length&&j.dispatchEvent("outEdges",{edges:q,captor:a.data})}}var i,k,l={},m={};a.bind("click",b),a.bind("mousedown",h),a.bind("mouseup",h),a.bind("mousemove",h),a.bind("mouseout",g),a.bind("doubleclick",e),a.bind("rightclick",f),j.bind("render",h)}var f,g,h,i,j=this;for(f=0,g=this.captors.length;g>f;f++)e(this.captors[f])}}.call(this),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.misc"),sigma.misc.bindDOMEvents=function(a){function b(a){this.attr=function(b){return a.getAttributeNS(null,b)},this.tag=a.tagName,this["class"]=this.attr("class"),this.id=this.attr("id"),this.isNode=function(){return!!~this["class"].indexOf(g.settings("classPrefix")+"-node")},this.isEdge=function(){return!!~this["class"].indexOf(g.settings("classPrefix")+"-edge")},this.isHover=function(){return!!~this["class"].indexOf(g.settings("classPrefix")+"-hover")}}function c(a){if(g.settings("eventsEnabled")){g.dispatchEvent("click",a);var c=new b(a.target);c.isNode()?g.dispatchEvent("clickNode",{node:h.nodes(c.attr("data-node-id"))}):g.dispatchEvent("clickStage"),a.preventDefault(),a.stopPropagation()}}function d(a){if(g.settings("eventsEnabled")){g.dispatchEvent("doubleClick",a);var c=new b(a.target);c.isNode()?g.dispatchEvent("doubleClickNode",{node:h.nodes(c.attr("data-node-id"))}):g.dispatchEvent("doubleClickStage"),a.preventDefault(),a.stopPropagation()}}function e(a){var c=a.toElement||a.target;if(g.settings("eventsEnabled")&&c){var d=new b(c);if(d.isNode())g.dispatchEvent("overNode",{node:h.nodes(d.attr("data-node-id"))});else if(d.isEdge()){var e=h.edges(d.attr("data-edge-id"));g.dispatchEvent("overEdge",{edge:e,source:h.nodes(e.source),target:h.nodes(e.target)})}}}function f(a){var c=a.fromElement||a.originalTarget;if(g.settings("eventsEnabled")){var d=new b(c);if(d.isNode())g.dispatchEvent("outNode",{node:h.nodes(d.attr("data-node-id"))});else if(d.isEdge()){var e=h.edges(d.attr("data-edge-id"));g.dispatchEvent("outEdge",{edge:e,source:h.nodes(e.source),target:h.nodes(e.target)})}}}var g=this,h=this.graph;a.addEventListener("click",c,!1),sigma.utils.doubleClick(a,"click",d),a.addEventListener("touchstart",c,!1),sigma.utils.doubleClick(a,"touchstart",d),a.addEventListener("mouseover",e,!0),a.addEventListener("mouseout",f,!0)}}.call(this),function(){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.misc"),sigma.misc.drawHovers=function(a){function b(){var b,f,g,h,i,j=c.contexts.hover.canvas,k=c.settings("defaultNodeType"),l=c.settings("defaultEdgeType"),m=sigma.canvas.hovers,n=sigma.canvas.edgehovers,o=sigma.canvas.extremities,p=c.settings.embedObjects({prefix:a});if(c.contexts.hover.clearRect(0,0,j.width,j.height),p("enableHovering")&&p("singleHover")&&Object.keys(d).length&&(h=d[Object.keys(d)[0]],(m[h.type]||m[k]||m.def)(h,c.contexts.hover,p)),p("enableHovering")&&!p("singleHover"))for(b in d)(m[d[b].type]||m[k]||m.def)(d[b],c.contexts.hover,p);if(p("enableEdgeHovering")&&p("singleHover")&&Object.keys(e).length&&(i=e[Object.keys(e)[0]],f=c.graph.nodes(i.source),g=c.graph.nodes(i.target),i.hidden||((n[i.type]||n[l]||n.def)(i,f,g,c.contexts.hover,p),p("edgeHoverExtremities")?(o[i.type]||o.def)(i,f,g,c.contexts.hover,p):((sigma.canvas.nodes[f.type]||sigma.canvas.nodes.def)(f,c.contexts.hover,p),(sigma.canvas.nodes[g.type]||sigma.canvas.nodes.def)(g,c.contexts.hover,p)))),p("enableEdgeHovering")&&!p("singleHover"))for(b in e)i=e[b],f=c.graph.nodes(i.source),g=c.graph.nodes(i.target),i.hidden||((n[i.type]||n[l]||n.def)(i,f,g,c.contexts.hover,p),p("edgeHoverExtremities")?(o[i.type]||o.def)(i,f,g,c.contexts.hover,p):((sigma.canvas.nodes[f.type]||sigma.canvas.nodes.def)(f,c.contexts.hover,p),(sigma.canvas.nodes[g.type]||sigma.canvas.nodes.def)(g,c.contexts.hover,p)))}var c=this,d={},e={};this.bind("overNode",function(a){var c=a.data.node;c.hidden||(d[c.id]=c,b())}),this.bind("outNode",function(a){delete d[a.data.node.id],b()}),this.bind("overEdge",function(a){var c=a.data.edge;c.hidden||(e[c.id]=c,b())}),this.bind("outEdge",function(a){delete e[a.data.edge.id],b()}),this.bind("render",function(){b()})}}.call(this),function(){"use strict";function a(a){if(d[a])return d[a];var b=[0,0,0];return a.match(/^#/)?(a=(a||"").replace(/^#/,""),b=3===a.length?[parseInt(a.charAt(0)+a.charAt(0),16),parseInt(a.charAt(1)+a.charAt(1),16),parseInt(a.charAt(2)+a.charAt(2),16)]:[parseInt(a.charAt(0)+a.charAt(1),16),parseInt(a.charAt(2)+a.charAt(3),16),parseInt(a.charAt(4)+a.charAt(5),16)]):a.match(/^ *rgba? *\(/)&&(a=a.match(/^ *rgba? *\( *([0-9]*) *, *([0-9]*) *, *([0-9]*) *(,.*)?\) *$/),b=[+a[1],+a[2],+a[3]]),d[a]={r:b[0],g:b[1],b:b[2]},d[a]}function b(b,c,d){b=a(b),c=a(c);var e={r:b.r*(1-d)+c.r*d,g:b.g*(1-d)+c.g*d,b:b.b*(1-d)+c.b*d};return"rgb("+[0|e.r,0|e.g,0|e.b].join(",")+")"}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins");var c=0,d={};sigma.plugins.animate=function(a,d,e){function f(){var c=(sigma.utils.dateNow()-m)/k;if(c>=1){g.forEach(function(a){for(var b in d)b in d&&(a[b]=a[d[b]])});var e,n;for(e in a.cameras)n=a.cameras[e],n.edgequadtree._enabled=!0;a.refresh(),"function"==typeof i.onComplete&&i.onComplete()}else c=l(c),g.forEach(function(a){for(var e in d)e in d&&(e.match(/color$/)?a[e]=b(h[a.id][e],a[d[e]],c):a[e]=a[d[e]]*c+h[a.id][e]*(1-c))}),a.refresh(),a.animations[j]=requestAnimationFrame(f)}var g,h,i=e||{},j=++c,k=i.duration||a.settings("animationsTime"),l="string"==typeof i.easing?sigma.utils.easings[i.easing]:"function"==typeof i.easing?i.easing:sigma.utils.easings.quadraticInOut,m=sigma.utils.dateNow();g=i.nodes&&i.nodes.length?"object"==typeof i.nodes[0]?i.nodes:a.graph.nodes(i.nodes):a.graph.nodes(),h=g.reduce(function(a,b){var c;a[b.id]={};for(c in d)c in b&&(a[b.id][c]=b[c]);return a},{}),a.animations=a.animations||Object.create({}),sigma.plugins.kill(a);var n,o;for(n in a.cameras)o=a.cameras[n],o.edgequadtree._enabled=!1;f()},sigma.plugins.kill=function(a){for(var b in a.animations||{})cancelAnimationFrame(a.animations[b]);var b,c;for(b in a.cameras)c=a.cameras[b],c.edgequadtree._enabled=!0}}.call(window),function(){"use strict";function a(a,b){function c(a){var b=window.getComputedStyle(a),c=function(a){return parseInt(b.getPropertyValue(a).replace("px",""))||0};return{left:a.getBoundingClientRect().left+c("padding-left"),top:a.getBoundingClientRect().top+c("padding-top")}}function d(a){t=!1,l.removeEventListener("mousemove",i),l.removeEventListener("mouseup",h),r.length||(p=null)}function e(a){s[a.data.node.id]||(r.push(a.data.node),s[a.data.node.id]=!0,r.length&&!t&&(p=r[r.length-1],n.addEventListener("mousedown",g)))}function f(a){var b=r.map(function(a){return a}).indexOf(a.data.node);r.splice(b,1),delete s[a.data.node.id],r.length&&!t?p=r[r.length-1]:n.removeEventListener("mousedown",g)}function g(a){t=!0;var b=k.graph.nodes().length;if(p&&b>1){n.removeEventListener("mousedown",g),l.addEventListener("mousemove",i),l.addEventListener("mouseup",h);var c,d;for(c in k.cameras)d=k.cameras[c],void 0!==d.edgequadtree&&(d.edgequadtree._enabled=!1);m.settings({mouseEnabled:!1,enableHovering:!1}),k.refresh(),j.dispatchEvent("startdrag",{node:p,captor:a,renderer:m})}}function h(a){t=!1,n.addEventListener("mousedown",g),l.removeEventListener("mousemove",i),l.removeEventListener("mouseup",h);var b,c;for(b in k.cameras)c=k.cameras[b],void 0!==c.edgequadtree&&(c.edgequadtree._enabled=!0);m.settings({mouseEnabled:!0,enableHovering:!0}),k.refresh(),u&&j.dispatchEvent("drop",{node:p,captor:a,renderer:m}),j.dispatchEvent("dragend",{node:p,captor:a,renderer:m}),u=!1,p=null}function i(a){function b(){for(var b=c(m.container),d=a.clientX-b.left,e=a.clientY-b.top,f=Math.cos(o.angle),g=Math.sin(o.angle),h=k.graph.nodes(),i=[],l=0;2>l;l++){var n=h[l],r={x:n.x*f+n.y*g,y:n.y*f-n.x*g,renX:n[q+"x"],renY:n[q+"y"]};i.push(r)}if(i[0].x===i[1].x&&i[0].y===i[1].y){var s=0===i[0].renX?1:i[0].renX,t=0===i[0].renY?1:i[0].renY;d=i[0].x/s*(d-i[0].renX)+i[0].x,e=i[0].y/t*(e-i[0].renY)+i[0].y}else{var s=(i[1].renX-i[0].renX)/(i[1].x-i[0].x),t=(i[1].renY-i[0].renY)/(i[1].y-i[0].y);i[1].x===i[0].x&&(s=t),i[1].y===i[0].y&&(t=s),d=(d-i[0].renX)/s+i[0].x,e=(e-i[0].renY)/t+i[0].y}p.x=d*f-e*g,p.y=e*f+d*g,k.refresh(),u=!0,j.dispatchEvent("drag",{node:p,captor:a,renderer:m})}if(navigator.userAgent.toLowerCase().indexOf("firefox")>-1){clearTimeout(d);var d=setTimeout(b,0)}else b()}sigma.classes.dispatcher.extend(this);var j=this,k=a,l=document.body,m=b,n=b.container.lastChild,o=b.camera,p=null,q="",r=[],s={},t=!1,u=!1;b instanceof sigma.renderers.svg&&(n=b.container.firstChild),q=b instanceof sigma.renderers.webgl?b.options.prefix.substr(5):b.options.prefix,b.bind("overNode",e),b.bind("outNode",f),b.bind("click",d),k.bind("kill",function(){j.unbindAll()}),this.unbindAll=function(){n.removeEventListener("mousedown",g),l.removeEventListener("mousemove",i),l.removeEventListener("mouseup",h),m.unbind("overNode",e),m.unbind("outNode",f)}}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins");var b={};sigma.plugins.dragNodes=function(c,d){return b[c.id]||(b[c.id]=new a(c,d)),c.bind("kill",function(){sigma.plugins.killDragNodes(c)}),b[c.id]},sigma.plugins.killDragNodes=function(c){b[c.id]instanceof a&&(b[c.id].unbindAll(),delete b[c.id])}}.call(window),function(a){"use strict";function b(){document.fullscreenElement||document.mozFullScreenElement||document.webkitFullscreenElement||document.msFullscreenElement?document.exitFullscreen?document.exitFullscreen():document.msExitFullscreen?document.msExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen&&document.webkitExitFullscreen():d.requestFullscreen?d.requestFullscreen():d.msRequestFullscreen?d.msRequestFullscreen():d.mozRequestFullScreen?d.mozRequestFullScreen():d.webkitRequestFullscreen&&d.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)}function c(a){var c=a||{};d=c.container?"object"==typeof c.container?c.container:document.getElementById(c.container):this.container,e=null,c.btnId?(e=document.getElementById(c.btnId),e.removeEventListener("click",b),e.addEventListener("click",b)):b()}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins.fullScreen");var d=null,e=null;sigma.plugins.fullScreen=c}.call(this),function(undefined){"use strict";function register(a,b,c){if(c!=undefined&&"string"!=typeof c)throw'The filter key "'+c.toString()+'" must be a string.';if(c!=undefined&&!c.length)throw"The filter key must be a non-empty string.";if("function"!=typeof a)throw'The predicate of key "'+c+'" must be a function.';if("undo"===c)throw'"undo" is a reserved key.';if(_keysIndex[c])throw'The filter "'+c+'" already exists.';c&&(_keysIndex[c]=!0),_chain.push({key:c,processor:a,predicate:b})}function unregister(a){_chain=_chain.filter(function(b){return!(b.key in a)});for(var b in a)delete _keysIndex[b]}function Filter(a){_s=a,_g=a.graph}function deepCopy(o){var copy=Object.create(null);for(var i in o)"object"==typeof o[i]&&null!==o[i]?copy[i]=deepCopy(o[i]):"function"==typeof o[i]&&null!==o[i]?eval(" copy[i] = "+o[i].toString()):copy[i]=o[i];return copy}function cloneChain(a){for(var b=a.slice(0),c=0,d=b.length;d>c;c++)b[c]=deepCopy(b[c]),"function"==typeof b[c].processor&&(b[c].processor="filter.processors."+b[c].processor.name);return b}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins"),sigma.classes.graph.hasMethod("adjacentNodes")||sigma.classes.graph.addMethod("adjacentNodes",function(a){if("string"!=typeof a)throw"adjacentNodes: the node id must be a string.";var b,c=[];for(b in this.allNeighborsIndex[a])c.push(this.nodesIndex[b]);return c}),sigma.classes.graph.hasMethod("adjacentEdges")||sigma.classes.graph.addMethod("adjacentEdges",function(a){if("string"!=typeof a)throw"adjacentEdges: the node id must be a string.";var b,c,d=this.allNeighborsIndex[a],e=[];for(c in d)for(b in d[c])e.push(d[c][b]);return e});var _g=undefined,_s=undefined,_chain=[],_keysIndex=Object.create(null),Processors={};Processors.nodes=function(a){for(var b=_g.nodes(),c=b.length,d=_g.edges(),e=d.length;c--;)b[c].hidden=!a.call(_g,b[c])||b[c].hidden;for(;e--;)(_g.nodes(d[e].source).hidden||_g.nodes(d[e].target).hidden)&&(d[e].hidden=!0)},Processors.edges=function(a){for(var b=_g.edges(),c=b.length;c--;)b[c].hidden=!a.call(_g,b[c])||b[c].hidden},Processors.neighbors=function a(b){for(var c=_g.nodes(),d=c.length,e=_g.edges(),f=e.length,a=_g.adjacentNodes(b),g=a.length,h={};g--;)h[a[g].id]=!0;for(;d--;)c[d].id===b||c[d].id in h||(c[d].hidden=!0);for(;f--;)(_g.nodes(e[f].source).hidden||_g.nodes(e[f].target).hidden)&&(e[f].hidden=!0)},Filter.prototype.nodesBy=function(a,b){return register(Processors.nodes,a,b),this},Filter.prototype.edgesBy=function(a,b){return register(Processors.edges,a,b),this},Filter.prototype.neighborsOf=function(a,b){if("string"!=typeof a)throw'The node id "'+a.toString()+'" must be a string.';if(!a.length)throw"The node id must be a non-empty string.";return register(Processors.neighbors,a,b),this},Filter.prototype.apply=function(){for(var a=0,b=_chain.length;b>a;++a)_chain[a].processor(_chain[a].predicate);return _chain[0]&&"undo"===_chain[0].key&&_chain.shift(),_s.refresh(),this},Filter.prototype.undo=function(a){function b(){for(var a=_g.nodes(),b=a.length,c=_g.edges(),d=c.length;b--;)a[b].hidden=!1;for(;d--;)c[d].hidden=!1}var c=Object.create(null),d=arguments.length;if(1===d)if("[object Array]"===Object.prototype.toString.call(a))for(var e=0,f=a.length;f>e;e++)c[a[e]]=!0;else c[a]=!0;else if(d>1)for(var e=0;d>e;e++)c[arguments[e]]=!0;else this.clear();return unregister(c),_chain.unshift({key:"undo",processor:b}),this},Filter.prototype.clear=function(){return _chain.length=0,_keysIndex=Object.create(null),this},Filter.prototype["export"]=function(){var a=cloneChain(_chain);return a},Filter.prototype["import"]=function(a){if(a===undefined)throw"Wrong arguments.";if("[object Array]"!==Object.prototype.toString.call(a))throw'The chain" must be an array.';for(var b=cloneChain(a),c=0,d=b.length;d>c;c++){if(b[c].predicate===undefined||b[c].processor===undefined)throw"Wrong arguments.";if(b[c].key!=undefined&&"string"!=typeof b[c].key)throw'The filter key "'+b[c].key.toString()+'" must be a string.';if("function"!=typeof b[c].predicate)throw'The predicate of key "'+b[c].key+'" must be a function.';if("string"!=typeof b[c].processor)throw'The processor of key "'+b[c].key+'" must be a string.';switch(b[c].processor){case"filter.processors.nodes":b[c].processor=Processors.nodes; -break;case"filter.processors.edges":b[c].processor=Processors.edges;break;case"filter.processors.neighbors":b[c].processor=Processors.neighbors;break;default:throw"Unknown processor "+b[c].processor}}return _chain=b,this};var filter=null;sigma.plugins.filter=function(a){return filter||(filter=new Filter(a)),filter}}.call(this),function(a){"use strict";function b(b,c,d){if(sigma.classes.dispatcher.extend(this),sigma.renderers.webgl&&c instanceof sigma.renderers.webgl)throw new Error("The sigma.plugins.lasso is not compatible with the WebGL renderer");this.sigmaInstance=b,this.renderer=c,this.drawingCanvas=a,this.drawingContext=a,this.drewPoints=[],this.selectedNodes=[],this.isActive=!1,this.isDrawing=!1,f=document.body,this.settings=new sigma.classes.configurable({strokeStyle:"black",lineWidth:2,fillWhileDrawing:!1,fillStyle:"rgba(200, 200, 200, 0.25)",cursor:"crosshair"},d||{})}function c(a){var b=this.drawingCanvas.getBoundingClientRect();this.isActive&&(this.isDrawing=!0,this.drewPoints=[],this.selectedNodes=[],this.sigmaInstance.refresh(),this.drewPoints.push({x:a.clientX-b.left,y:a.clientY-b.top}),this.drawingCanvas.style.cursor=this.settings("cursor"),a.stopPropagation())}function d(a){if(this.isActive&&this.isDrawing){var b=0,c=0,d=this.drawingCanvas.getBoundingClientRect();switch(a.type){case"touchmove":b=a.touches[0].clientX,c=a.touches[0].clientY;break;default:b=a.clientX,c=a.clientY}this.drewPoints.push({x:b-d.left,y:c-d.top}),this.drawingContext.lineWidth=this.settings("lineWidth"),this.drawingContext.strokeStyle=this.settings("strokeStyle"),this.drawingContext.fillStyle=this.settings("fillStyle"),this.drawingContext.lineJoin="round",this.drawingContext.lineCap="round",this.drawingContext.clearRect(0,0,this.drawingContext.canvas.width,this.drawingContext.canvas.height);var e=this.drewPoints[0],f=this.drewPoints[1],g=this.drewPoints.length,h=function(a,b){return{x:a.x+(b.x-a.x)/2,y:a.y+(b.y-a.y)/2}};this.drawingContext.beginPath(),this.drawingContext.moveTo(e.x,e.y);for(var i=1;g>i;i++){var j=h(e,f);this.drawingContext.quadraticCurveTo(e.x,e.y,j.x,j.y),e=this.drewPoints[i],f=this.drewPoints[i+1]}this.drawingContext.lineTo(e.x,e.y),this.drawingContext.stroke(),this.settings("fillWhileDrawing")&&this.drawingContext.fill(),a.stopPropagation()}}function e(a){if(this.isActive&&this.isDrawing){this.isDrawing=!1;for(var b=this.renderer.nodesOnScreen,c=b.length,d=this.renderer.options.prefix||"";c--;){var e=b[c],f=e[d+"x"],g=e[d+"y"];this.drawingContext.isPointInPath(f,g)&&!e.hidden&&this.selectedNodes.push(e)}this.dispatchEvent("selectedNodes",this.selectedNodes),this.drawingContext.clearRect(0,0,this.drawingCanvas.width,this.drawingCanvas.height),this.drawingCanvas.style.cursor=this.settings("cursor"),a.stopPropagation()}}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins");var f=a,g={};b.prototype.clear=function(){return this.deactivate(),this.sigmaInstance=a,this.renderer=a,this},b.prototype.activate=function(){return this.sigmaInstance&&!this.isActive&&(this.isActive=!0,this.renderer.domElements.lasso||(this.renderer.initDOM("canvas","lasso"),this.drawingCanvas=this.renderer.domElements.lasso,this.drawingCanvas.width=this.renderer.container.offsetWidth,this.drawingCanvas.height=this.renderer.container.offsetHeight,this.renderer.container.appendChild(this.drawingCanvas),this.drawingContext=this.drawingCanvas.getContext("2d"),this.drawingCanvas.style.cursor=this.settings("cursor")),h.apply(this)),this},b.prototype.deactivate=function(){return this.sigmaInstance&&this.isActive&&(this.isActive=!1,this.isDrawing=!1,i.apply(this),this.renderer.domElements.lasso&&(this.renderer.container.removeChild(this.renderer.domElements.lasso),delete this.renderer.domElements.lasso,this.drawingCanvas.style.cursor="",this.drawingCanvas=a,this.drawingContext=a,this.drewPoints=[])),this};var h=function(){this.drawingCanvas.addEventListener("mousedown",c.bind(this)),f.addEventListener("mousemove",d.bind(this)),f.addEventListener("mouseup",e.bind(this)),this.drawingCanvas.addEventListener("touchstart",c.bind(this)),f.addEventListener("touchmove",d.bind(this)),f.addEventListener("touchcancel",e.bind(this)),f.addEventListener("touchleave",e.bind(this)),f.addEventListener("touchend",e.bind(this))},i=function(){this.drawingCanvas.removeEventListener("mousedown",c.bind(this)),f.removeEventListener("mousemove",d.bind(this)),f.removeEventListener("mouseup",e.bind(this)),this.drawingCanvas.removeEventListener("touchstart",c.bind(this)),this.drawingCanvas.removeEventListener("touchmove",d.bind(this)),f.removeEventListener("touchcancel",e.bind(this)),f.removeEventListener("touchleave",e.bind(this)),f.removeEventListener("touchend",e.bind(this))};b.prototype.getSelectedNodes=function(){return this.selectedNodes},sigma.plugins.lasso=function(a,c,d){return g[a.id]||(g[a.id]=new b(a,c,d)),a.bind("kill",function(){g[a.id]instanceof b&&(g[a.id].clear(),delete g[a.id])}),g[a.id]}}.call(this),function(a){"use strict";function b(){var a=this;this.init=function(a,b){if(b=b||{},this.sigInst=a,this.config=sigma.utils.extend(b,c),this.easing=b.easing,this.duration=b.duration,b.nodes&&(this.nodes=b.nodes,delete b.nodes),!sigma.plugins||"undefined"==typeof sigma.plugins.animate)throw new Error("sigma.plugins.animate is not declared");this.running=!1},this.atomicGo=function(){if(!this.running||this.iterCount<1)return!1;var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=this.nodes||this.sigInst.graph.nodes(),x=w.length,y=1/0,z=-(1/0),A=1/0,B=-(1/0);for(this.iterCount--,this.running=!1,b=0;x>b;b++)c=w[b],c.dn.dx=0,c.dn.dy=0,y=Math.min(y,c.dn_x-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),z=Math.max(z,c.dn_x+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),A=Math.min(A,c.dn_y-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),B=Math.max(B,c.dn_y+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin));for(e=z-y,f=B-A,g=(y+z)/2,h=(A+B)/2,y=g-a.config.permittedExpansion*e/2,z=g+a.config.permittedExpansion*e/2,A=h-a.config.permittedExpansion*f/2,B=h+a.config.permittedExpansion*f/2,i={},j=0;jb;b++)for(c=w[b],s=c.dn_x-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),t=c.dn_x+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),u=c.dn_y-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),v=c.dn_y+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),l=Math.floor(a.config.gridSize*(s-y)/(z-y)),m=Math.floor(a.config.gridSize*(t-y)/(z-y)),n=Math.floor(a.config.gridSize*(u-A)/(B-A)),o=Math.floor(a.config.gridSize*(v-A)/(B-A)),k=l;m>=k;k++)for(j=n;o>=j;j++)i[j][k].push(c.id);for(p={},j=0;jb;b++)d=w[b],p[d.id].forEach(function(b){var c=a.sigInst.graph.nodes(b),g=c.dn_x-d.dn_x,h=c.dn_y-d.dn_y,i=Math.sqrt(g*g+h*h),j=i0?(c.dn.dx+=g/i*(1+d.dn_size),c.dn.dy+=h/i*(1+d.dn_size)):(c.dn.dx+=.01*e*(.5-Math.random()),c.dn.dy+=.01*f*(.5-Math.random())))});for(b=0;x>b;b++)c=w[b],c.fixed||(c.dn_x=c.dn_x+.1*c.dn.dx*a.config.speed,c.dn_y=c.dn_y+.1*c.dn.dy*a.config.speed);return this.running&&this.iterCount<1&&(this.running=!1),this.running},this.go=function(){for(this.iterCount=this.config.maxIterations;this.running;)this.atomicGo();this.stop()},this.start=function(){if(!this.running){var b=this.sigInst.graph.nodes(),c=this.sigInst.renderers[a.config.rendererIndex].options.prefix;this.running=!0;for(var d=0;d0;var o=Math.sqrt(this.config.area)/10,p=Math.sqrt(this.config.area/(1+m));for(b=0;m>b;b++)for(d=k[b],d.fr||(d.fr_x=d.x,d.fr_y=d.y,d.fr={dx:0,dy:0}),c=0;m>c;c++)e=k[c],d.id!=e.id&&(g=d.fr_x-e.fr_x,h=d.fr_y-e.fr_y,i=Math.sqrt(g*g+h*h)+.01,i>0&&(j=p*p/i,d.fr.dx+=g/i*j,d.fr.dy+=h/i*j));var q,r,s;for(b=0;n>b;b++)f=l[b],q=a.sigInst.graph.nodes(f.source),r=a.sigInst.graph.nodes(f.target),g=q.fr_x-r.fr_x,h=q.fr_y-r.fr_y,i=Math.sqrt(g*g+h*h)+.01,s=i*i/p,i>0&&(q.fr.dx-=g/i*s,q.fr.dy-=h/i*s,r.fr.dx+=g/i*s,r.fr.dy+=h/i*s);var t,u,v;for(b=0;m>b;b++)d=k[b],t=Math.sqrt(d.fr_x*d.fr_x+d.fr_y*d.fr_y),u=.01*p*a.config.gravity*t,d.fr.dx-=u*d.fr_x/t,d.fr.dy-=u*d.fr_y/t,d.fr.dx*=a.config.speed,d.fr.dy*=a.config.speed,d.fixed||(g=d.fr.dx,h=d.fr.dy,i=Math.sqrt(g*g+h*h),i>0&&(v=Math.min(o*a.config.speed,i),d.fr_x+=g/i*v,d.fr_y+=h/i*v));return this.running},this.go=function(){for(this.iterCount=this.config.iterations;this.running;)this.atomicGo();this.stop()},this.start=function(){if(!this.running){var b=this.sigInst.graph.nodes();this.running=!0;for(var c=0;c [class="'+b+'-node"]');for(h=0,i=n.length,g=!0;i>h;h++)d=n[h].getAttribute("fill"),c.data||n[h].removeAttribute("data-node-id"),c.classes&&(d in j||(j[d]=g?b+"-node":"c-"+l++,m+="."+j[d]+"{fill: "+d+"}"),j[d]!==b+"-node"&&n[h].setAttribute("class",n[h].getAttribute("class")+" "+j[d]),n[h].removeAttribute("fill")),g=!1;var o=a.querySelectorAll('[id="'+b+'-group-edges"] > [class="'+b+'-edge"]');for(h=0,i=o.length,g=!0;i>h;h++)d=o[h].getAttribute("stroke"),c.data||o[h].removeAttribute("data-edge-id"),c.classes&&(d in k||(k[d]=g?b+"-edge":"c-"+l++,m+="."+k[d]+"{stroke: "+d+"}"),k[d]!==b+"-edge"&&o[h].setAttribute("class",o[h].getAttribute("class")+" "+k[d]),o[h].removeAttribute("stroke")),g=!1;c.classes&&e.appendChild(document.createTextNode(m))}if("undefined"==typeof sigma)throw"sigma.renderers.snapshot: sigma not in scope.";var e=(this.URL||this.webkitURL||this,{size:"1000",width:"1000",height:"1000",margin:.05,classes:!0,labels:!0,data:!1,download:!1,filename:"graph.svg"}),f="http://www.w3.org/2000/svg";sigma.prototype.toSVG=function(a){a=a||{};var b=this.settings("classPrefix"),f=a.size||a.width||e.size,g=a.size||a.height||e.size,h=a.margin||e.margin,i=document.createElement("div");i.setAttribute("width",f),i.setAttribute("height",g),i.setAttribute("style","position:absolute; top: 0px; left:0px; width: "+f+"px; height: "+g+"px;");var j=this.settings("sideMargin");this.settings("sideMargin",h);var k=this.settings("autoRescale");this.settings("autoRescale",!0);var l=this.addCamera(),m=this.addRenderer({camera:l,container:i,type:"svg",forceLabels:!!a.labels});m.resize(f,g),this.refresh(),this.killRenderer(m),this.killCamera(l),this.settings("sideMargin",j),this.settings("autoRescale",k);var n=i.querySelector("svg");if(n.removeAttribute("style"),n.setAttribute("width",f+"px"),n.setAttribute("height",g+"px"),n.setAttribute("x","0px"),n.setAttribute("y","0px"),!a.labels){var o=n.querySelector('[id="'+b+'-group-labels"]');n.removeChild(o)}var p=n.querySelector('[id="'+b+'-group-hovers"]');n.removeChild(p),a.classes=a.classes!==!1,a.data&&!a.classes||d(n,b,a);var q=n.outerHTML;i=null;var r='\n';return r+='\n',r+=q,a.download&&c(r,a.filename||e.filename),r}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.curve=function(a,b,c,d,e){if("string"==typeof a.label){var f=e("prefix")||"",g=a[f+"size"]||1;if(!(gl?1:-1,s={},t=.5;b.id===c.id?(s=sigma.utils.getSelfLoopControlPoints(l,m,k),i=sigma.utils.getPointOnBezierCurve(t,l,m,n,o,s.x1,s.y1,s.x2,s.y2),j=Math.atan2(1,1)):(s=sigma.utils.getQuadraticControlPoint(l,m,n,o),i=sigma.utils.getPointOnQuadraticCurve(t,l,m,n,o,s.x,s.y),j=Math.atan2(q*r,p*r)),h="fixed"===e("edgeLabelSize")?e("defaultEdgeLabelSize"):e("defaultEdgeLabelSize")*g*Math.pow(g,-1/e("edgeLabelSizePowRatio")),d.save(),a.active?(d.font=[e("activeFontStyle"),h+"px",e("activeFont")||e("font")].join(" "),d.fillStyle="edge"===e("edgeActiveColor")?a.active_color||e("defaultEdgeActiveColor"):e("defaultEdgeLabelActiveColor")):(d.font=[e("fontStyle"),h+"px",e("font")].join(" "),d.fillStyle="edge"===e("edgeLabelColor")?a.color||e("defaultEdgeColor"):e("defaultEdgeLabelColor")),d.textAlign="center",d.textBaseline="alphabetic",d.translate(i.x,i.y),d.rotate(j),d.fillText(a.label,0,-g/2-3),d.restore()}}}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.curvedArrow=function(a,b,c,d,e){sigma.canvas.edges.labels.curve(a,b,c,d,e)}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.def=function(a,b,c,d,e){if("string"==typeof a.label&&b!=c){var f=e("prefix")||"",g=a[f+"size"]||1;if(!(g1||h[c].i>0?(b.cc||("arrow"===b.type||"tapered"===b.type||"arrow"===f||"tapered"===f?(b.cc_prev_type||(b.cc_prev_type=b.type),b.type="curvedArrow"):(b.cc_prev_type||(b.cc_prev_type=b.type),b.type="curve")),b.cc=a(d,h[c].n,h[c].i++,e)):b.cc&&(b.type=b.cc_prev_type,b.cc_prev_type=void 0,b.cc=void 0)})}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.tapered=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),g=e("prefix")||"",j=e("defaultNodeColor"),k=e("defaultEdgeColor"),l=b[g+"x"],m=b[g+"y"],n=c[g+"x"],o=c[g+"y"],p=sigma.utils.getDistance(l,m,n,o);if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}var q=sigma.utils.getCircleIntersection(l,m,h,n,o,p);d.save(),a.active?d.fillStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.fillStyle=f,d.globalAlpha=.65,d.beginPath(),d.moveTo(n,o),d.lineTo(q.xi,q.yi),d.lineTo(q.xi_prime,q.yi_prime),d.closePath(),d.fill(),d.restore()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.dotted=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.save(),a.active?d.strokeStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.strokeStyle=f,d.setLineDash([2]),d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke(),d.restore()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.dashed=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.save(),a.active?d.strokeStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.strokeStyle=f,d.setLineDash([8,3]),d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke(),d.restore()}}(),function(undefined){"use strict";function crush(a){var b,c,d,e=["x","y","dx","dy","old_dx","old_dy","mass","convergence","size","fixed"],f=["source","target","weight"],g=["node","centerX","centerY","size","nextSibling","firstChild","mass","massCenterX","massCenterY"];for(c=0,d=g.length;d>c;c++)b=new RegExp("rp\\(([^,]*), '"+g[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);for(c=0,d=e.length;d>c;c++)b=new RegExp("np\\(([^,]*), '"+e[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);for(c=0,d=f.length;d>c;c++)b=new RegExp("ep\\(([^,]*), '"+f[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);return a}function getWorkerFn(){var a=crush?crush(Worker.toString()):Worker.toString();return";("+a+").call(this);"}var _root=this,inWebWorker=!("document"in _root),Worker=function(a){function b(){var a,b,c={},d=arguments.length;for(a=d-1;a>=0;a--)for(b in arguments[a])c[b]=arguments[a][b];return c}function c(a){var b;for(b in a)"hasOwnProperty"in a&&!a.hasOwnProperty(b)||delete a[b];return a}function d(a,b){if(a%o.ppn!==0)throw"np: non correct ("+a+").";if(a!==parseInt(a))throw"np: non int.";if(b in p)return a+p[b];throw"ForceAtlas2.Worker - Inexistant node property given ("+b+")."}function e(a,b){if(a%o.ppe!==0)throw"ep: non correct ("+a+").";if(a!==parseInt(a))throw"ep: non int.";if(b in q)return a+q[b];throw"ForceAtlas2.Worker - Inexistant edge property given ("+b+")."}function f(a,b){if(a%o.ppr!==0)throw"rp: non correct ("+a+").";if(a!==parseInt(a))throw"rp: non int.";if(b in r)return a+r[b];throw"ForceAtlas2.Worker - Inexistant region property given ("+b+")."}function g(a,b,c){c=c||{};k=a,l=b,o.nodesLength=k.length,o.edgesLength=l.length,h(c)}function h(a){o.settings=b(a,o.settings)}function i(){var a,b,c,g,h,i,j,n,p,q,r,s,t,u,v;for(c=0;c=0)w=k[d(c,"x")]=0){if(u=Math.sqrt(Math.pow(k[d(c,"x")]-m[f(b,"massCenterX")],2)+Math.pow(k[d(c,"y")]-m[f(b,"massCenterY")],2)),2*m[f(b,"size")]/u0?(v=q*k[d(c,"mass")]*m[f(b,"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):0>u&&(v=-q*k[d(c,"mass")]*m[f(b,"mass")]/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):u>0&&(v=q*k[d(c,"mass")]*m[f(b,"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v),m[f(b,"nextSibling")]<0)break;b=m[f(b,"nextSibling")];continue}b=m[f(b,"firstChild")]}else{if(m[f(b,"node")]>=0&&m[f(b,"node")]!==c&&(r=k[d(c,"x")]-k[d(m[f(b,"node")],"x")],s=k[d(c,"y")]-k[d(m[f(b,"node")],"y")],u=Math.sqrt(r*r+s*s),o.settings.adjustSizes?u>0?(v=q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):0>u&&(v=-q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):u>0&&(v=q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v)),m[f(b,"nextSibling")]<0)break;b=m[f(b,"nextSibling")]}else for(q=o.settings.scalingRatio,g=0;gh;h+=o.ppn)r=k[d(g,"x")]-k[d(h,"x")],s=k[d(g,"y")]-k[d(h,"y")],o.settings.adjustSizes?(u=Math.sqrt(r*r+s*s)-k[d(g,"size")]-k[d(h,"size")],u>0?(v=q*k[d(g,"mass")]*k[d(h,"mass")]/u/u,k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]+=r*v,k[d(h,"dy")]+=s*v):0>u&&(v=100*q*k[d(g,"mass")]*k[d(h,"mass")],k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v)):(u=Math.sqrt(r*r+s*s),u>0&&(v=q*k[d(g,"mass")]*k[d(h,"mass")]/u/u,k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v));for(n=o.settings.gravity/o.settings.scalingRatio,q=o.settings.scalingRatio,c=0;c0&&(v=q*k[d(c,"mass")]*n):u>0&&(v=q*k[d(c,"mass")]*n/u),k[d(c,"dx")]-=r*v,k[d(c,"dy")]-=s*v;for(q=1*(o.settings.outboundAttractionDistribution?p:1),i=0;i0&&(v=-q*t*Math.log(1+u)/u/k[d(g,"mass")]):u>0&&(v=-q*t*Math.log(1+u)/u):o.settings.outboundAttractionDistribution?u>0&&(v=-q*t/k[d(g,"mass")]):u>0&&(v=-q*t)):(u=Math.sqrt(Math.pow(r,2)+Math.pow(s,2)),o.settings.linLogMode?o.settings.outboundAttractionDistribution?u>0&&(v=-q*t*Math.log(1+u)/u/k[d(g,"mass")]):u>0&&(v=-q*t*Math.log(1+u)/u):o.settings.outboundAttractionDistribution?(u=1,v=-q*t/k[d(g,"mass")]):(u=1,v=-q*t)),u>0&&(k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v);var C,D,E,F;if(o.settings.adjustSizes)for(c=0;co.maxForce&&(k[d(c,"dx")]=k[d(c,"dx")]*o.maxForce/C,k[d(c,"dy")]=k[d(c,"dy")]*o.maxForce/C),D=k[d(c,"mass")]*Math.sqrt((k[d(c,"old_dx")]-k[d(c,"dx")])*(k[d(c,"old_dx")]-k[d(c,"dx")])+(k[d(c,"old_dy")]-k[d(c,"dy")])*(k[d(c,"old_dy")]-k[d(c,"dy")])),E=Math.sqrt((k[d(c,"old_dx")]+k[d(c,"dx")])*(k[d(c,"old_dx")]+k[d(c,"dx")])+(k[d(c,"old_dy")]+k[d(c,"dy")])*(k[d(c,"old_dy")]+k[d(c,"dy")]))/2,F=.1*Math.log(1+E)/(1+Math.sqrt(D)),k[d(c,"x")]=k[d(c,"x")]+k[d(c,"dx")]*(F/o.settings.slowDown),k[d(c,"y")]=k[d(c,"y")]+k[d(c,"dy")]*(F/o.settings.slowDown));else for(c=0;cb;b++)i();n()}var k,l,m,n,o={ppn:10,ppe:3,ppr:9,maxForce:10,iterations:0,converged:!1,settings:{linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:0,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5,startingIterations:1,iterationsPerRender:1}},p={x:0,y:1,dx:2,dy:3,old_dx:4,old_dy:5,mass:6,convergence:7,size:8,fixed:9},q={source:0,target:1,weight:2},r={node:0,centerX:1,centerY:2,size:3,nextSibling:4,firstChild:5,mass:6,massCenterX:7,massCenterY:8};n="undefined"!=typeof window&&window.document?function(){var a;document.createEvent?(a=document.createEvent("Event"),a.initEvent("newCoords",!0,!1)):(a=document.createEventObject(),a.eventType="newCoords"),a.eventName="newCoords",a.data={nodes:k.buffer},requestAnimationFrame(function(){document.dispatchEvent(a)})}:function(){self.postMessage({nodes:k.buffer},[k.buffer])};var s=function(a){switch(a.data.action){case"start":g(new Float32Array(a.data.nodes),new Float32Array(a.data.edges),a.data.config),j(o.settings.startingIterations);break;case"loop":k=new Float32Array(a.data.nodes),j(o.settings.iterationsPerRender);break;case"config":h(a.data.config);break;case"kill":c(o),k=null,l=null,m=null,self.removeEventListener("message",s)}};self.addEventListener("message",s); -};if(inWebWorker)eval(getWorkerFn());else{if("undefined"==typeof sigma)throw"sigma is not declared";sigma.prototype.getForceAtlas2Worker=getWorkerFn}}.call(this),function(undefined){"use strict";function Supervisor(sigInst,options){var _this=this,workerFn=sigInst.getForceAtlas2Worker&&sigInst.getForceAtlas2Worker();if(options=options||{},_root.URL=_root.URL||_root.webkitURL,this.sigInst=sigInst,this.graph=this.sigInst.graph,this.ppn=10,this.ppe=3,this.config={},this.shouldUseWorker=options.worker===!1?!1:webWorkers,this.workerUrl=options.workerUrl,this.started=!1,this.running=!1,this.shouldUseWorker){if(this.workerUrl)this.worker=new Worker(this.workerUrl);else{var blob=this.makeBlob(workerFn);this.worker=new Worker(URL.createObjectURL(blob))}this.worker.postMessage=this.worker.webkitPostMessage||this.worker.postMessage}else eval(workerFn);this.msgName=this.worker?"message":"newCoords",this.listener=function(a){_this.nodesByteArray=new Float32Array(a.data.nodes),_this.running&&(_this.applyLayoutChanges(),_this.sendByteArrayToWorker(),_this.sigInst.refresh())},(this.worker||document).addEventListener(this.msgName,this.listener),this.graphToByteArrays(),sigInst.bind("kill",function(){sigInst.killForceAtlas2()})}if("undefined"==typeof sigma)throw"sigma is not declared";var _root=this,webWorkers="Worker"in _root;Supervisor.prototype.makeBlob=function(a){var b;try{b=new Blob([a],{type:"application/javascript"})}catch(c){_root.BlobBuilder=_root.BlobBuilder||_root.WebKitBlobBuilder||_root.MozBlobBuilder,b=new BlobBuilder,b.append(a),b=b.getBlob()}return b},Supervisor.prototype.graphToByteArrays=function(){var a,b,c,d=this.graph.nodes(),e=this.graph.edges(),f=d.length*this.ppn,g=e.length*this.ppe,h={};for(this.nodesByteArray=new Float32Array(f),this.edgesByteArray=new Float32Array(g),a=b=0,c=d.length;c>a;a++)h[d[a].id]=b,this.nodesByteArray[b]=d[a].x,this.nodesByteArray[b+1]=d[a].y,this.nodesByteArray[b+2]=0,this.nodesByteArray[b+3]=0,this.nodesByteArray[b+4]=0,this.nodesByteArray[b+5]=0,this.nodesByteArray[b+6]=1+this.graph.degree(d[a].id),this.nodesByteArray[b+7]=1,this.nodesByteArray[b+8]=d[a].size,this.nodesByteArray[b+9]=0,b+=this.ppn;for(a=b=0,c=e.length;c>a;a++)this.edgesByteArray[b]=h[e[a].source],this.edgesByteArray[b+1]=h[e[a].target],this.edgesByteArray[b+2]=e[a].weight||0,b+=this.ppe},Supervisor.prototype.applyLayoutChanges=function(){for(var a=this.graph.nodes(),b=0,c=0,d=this.nodesByteArray.length;d>c;c+=this.ppn)a[b].x=this.nodesByteArray[c],a[b].y=this.nodesByteArray[c+1],b++},Supervisor.prototype.sendByteArrayToWorker=function(a){var b={action:a||"loop",nodes:this.nodesByteArray.buffer},c=[this.nodesByteArray.buffer];"start"===a&&(b.config=this.config||{},b.edges=this.edgesByteArray.buffer,c.push(this.edgesByteArray.buffer)),this.shouldUseWorker?this.worker.postMessage(b,c):_root.postMessage(b,"*")},Supervisor.prototype.start=function(){if(!this.running){this.running=!0;var a,b;for(a in this.sigInst.cameras)b=this.sigInst.cameras[a],b.edgequadtree._enabled=!1;this.started?this.sendByteArrayToWorker():(this.sendByteArrayToWorker("start"),this.started=!0)}},Supervisor.prototype.stop=function(){if(this.running){var a,b,c;for(a in this.sigInst.cameras)b=this.sigInst.cameras[a],b.edgequadtree._enabled=!0,c=sigma.utils.getBoundaries(this.graph,b.readPrefix),b.settings("drawEdges")&&b.settings("enableEdgeHovering")&&b.edgequadtree.index(this.sigInst.graph,{prefix:b.readPrefix,bounds:{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}});this.running=!1}},Supervisor.prototype.killWorker=function(){this.worker?this.worker.terminate():(_root.postMessage({action:"kill"},"*"),document.removeEventListener(this.msgName,this.listener))},Supervisor.prototype.configure=function(a){if(this.config=a,this.started){var b={action:"config",config:this.config};this.shouldUseWorker?this.worker.postMessage(b):_root.postMessage(b,"*")}},sigma.prototype.startForceAtlas2=function(a){return this.supervisor||(this.supervisor=new Supervisor(this,a)),a&&this.supervisor.configure(a),this.supervisor.start(),this},sigma.prototype.stopForceAtlas2=function(){return this.supervisor?(this.supervisor.stop(),this):this},sigma.prototype.killForceAtlas2=function(){return this.supervisor?(this.supervisor.stop(),this.supervisor.killWorker(),this.supervisor=null,this):this},sigma.prototype.configForceAtlas2=function(a){return this.supervisor||(this.supervisor=new Supervisor(this,a)),this.supervisor.configure(a),this},sigma.prototype.isForceAtlas2Running=function(a){return!!this.supervisor&&this.supervisor.running}}.call(this),slicePath=function(){return this.NullSlice=function(a,b,c){return a.setBaseValue(b,c),{slicePathString:"",linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.NullInitSlice=function(a,b,c){return a.setBaseValue(b,c),slicePathString=[a.MoveToCenter(),a.Close()],{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:a.centerX,titlePosY:a.centerY}},this.PieSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSlice=function(a,b,c){null===c&&(c=PieSliceCustomization()),a.setBaseValue(b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveTo(a.middleAngle,c.startRadiusPercent*a.sliceRadius),a.LineTo(a.startAngle,d),a.ArcTo(e,a.endAngle,d),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.FlowerSlice=function(a,b,c){null===c&&(c=PieSliceCustomization(),c.titleRadiusPercent=.5,c.arcBaseRadiusPercent=.65,c.arcRadiusPercent=.14);var d=PieSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.PieArrowSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arrowRadiusPercent=1.1,a},this.PieArrowSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,arrowAngleStart=a.startAngle+.45*a.sliceAngle,arrowAngleEnd=a.startAngle+.55*a.sliceAngle;var d=r*c.arrowRadiusPercent;return slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,arrowAngleStart,r),a.LineTo(a.middleAngle,d),a.LineTo(arrowAngleEnd,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieArrowBasePieSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),c.arrowRadiusPercent=1;var d=PieArrowSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.DonutSliceCustomization=function(){var a=new slicePathCustomization;return a.minRadiusPercent=.37,a.maxRadiusPercent=.9,a},this.DonutSlice=function(a,b,c){return null===c&&(c=DonutSliceCustomization()),maxRadius=a.wheelRadius*b*c.maxRadiusPercent,minRadius=a.wheelRadius*b*c.minRadiusPercent,a.setBaseValue(b,c),a.titleRadius=(maxRadius+minRadius)/2,a.setTitlePos(),slicePathString=[a.MoveTo(a.startAngle,minRadius),a.LineTo(a.startAngle,maxRadius),a.ArcTo(maxRadius,a.endAngle,maxRadius),a.LineTo(a.endAngle,minRadius),a.ArcBackTo(minRadius,a.startAngle,minRadius),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.55,a.isBasePieSlice=!1,a},this.CogSlice=function(a,b,c){return null===c&&(c=CogSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,rbase=a.wheelRadius*b*.83,percentAngle0625=a.startAngle+.0625*a.sliceAngle,percentAngle1250=a.startAngle+.125*a.sliceAngle,percentAngle1875=a.startAngle+.1875*a.sliceAngle,percentAngle2500=a.startAngle+.25*a.sliceAngle,percentAngle3125=a.startAngle+.3125*a.sliceAngle,percentAngle3750=a.startAngle+.375*a.sliceAngle,percentAngle4375=a.startAngle+.4375*a.sliceAngle,percentAngle5000=a.startAngle+.5*a.sliceAngle,percentAngle5625=a.startAngle+.5625*a.sliceAngle,percentAngle6250=a.startAngle+.625*a.sliceAngle,percentAngle6875=a.startAngle+.6875*a.sliceAngle,percentAngle7500=a.startAngle+.75*a.sliceAngle,percentAngle8125=a.startAngle+.8125*a.sliceAngle,percentAngle8750=a.startAngle+.875*a.sliceAngle,percentAngle9375=a.startAngle+.9375*a.sliceAngle,percentAngle9687=a.startAngle+.96875*a.sliceAngle,c.isBasePieSlice?(r=rbase,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.ArcTo(r,percentAngle1250,r),a.ArcTo(r,percentAngle1875,r),a.ArcTo(r,percentAngle2500,r),a.ArcTo(r,percentAngle3125,r),a.ArcTo(r,percentAngle3750,r),a.ArcTo(r,percentAngle4375,r),a.ArcTo(r,percentAngle5000,r),a.ArcTo(r,percentAngle5625,r),a.ArcTo(r,percentAngle6250,r),a.ArcTo(r,percentAngle6875,r),a.ArcTo(r,percentAngle7500,r),a.ArcTo(r,percentAngle8125,r),a.ArcTo(r,percentAngle8750,r),a.ArcTo(r,percentAngle9375,r),a.ArcTo(r,percentAngle9687,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.LineTo(percentAngle0625,rbase),a.ArcTo(rbase,percentAngle1875,rbase),a.LineTo(percentAngle1875,r),a.ArcTo(r,percentAngle3125,r),a.LineTo(percentAngle3125,rbase),a.ArcTo(rbase,percentAngle4375,rbase),a.LineTo(percentAngle4375,r),a.ArcTo(r,percentAngle5625,r),a.LineTo(percentAngle5625,rbase),a.ArcTo(rbase,percentAngle6875,rbase),a.LineTo(percentAngle6875,r),a.ArcTo(r,percentAngle8125,r),a.LineTo(percentAngle8125,rbase),a.ArcTo(rbase,percentAngle9375,rbase),a.LineTo(percentAngle9375,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogBasePieSlice=function(a,b,c){null===c&&(c=CogSliceCustomization()),c.isBasePieSlice=!0;var d=CogSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.StarSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.44,a.minRadiusPercent=.5,a.isBasePieSlice=!1,a},this.StarSlice=function(a,b,c){return null===c&&(c=StarSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b,rbase=r*c.minRadiusPercent,c.isBasePieSlice?(r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,a.middleAngle,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,rbase),a.LineTo(a.middleAngle,r),a.LineTo(a.endAngle,rbase),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarBasePieSlice=function(a,b,c){null===c&&(c=StarSliceCustomization()),c.titleRadiusPercent=.6,c.isBasePieSlice=!0;var d=StarSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceCustomization=function(){var a=new slicePathCustomization;return a.menuRadius=35,a.titleRadiusPercent=.63,a.isSelectedLine=!1,a.lineBaseRadiusPercent=0,a},this.MenuSlice=function(a,b,c){null===c&&(c=MenuSliceCustomization()),a.setBaseValue(b,c),x=a.centerX,y=a.centerY;var d=a.wheelRadius*b;a.titleRadius=d*c.titleRadiusPercent,a.setTitlePos();var e=b*c.menuRadius;return.05>=b&&(e=10),middleTheta=a.middleTheta,slicePathString=[["M",a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX+e*Math.cos(middleTheta),a.titlePosY+e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["z"]],.05>=b?linePathString=[["M",x,y],["A",1,1,0,0,1,x+1,y+1]]:c.isSelectedLine?linePathString=[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/3,a.middleAngle,a.titleRadius-e)]:linePathString=[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/2,a.middleAngle,a.titleRadius-e)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.MenuSliceSelectedLine=function(a,b,c){null===c&&(c=MenuSliceCustomization()),c.isSelectedLine=!0;var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:d.linePathString,titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceWithoutLine=function(a,b,c){var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.LineSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.sliceAngle>60&&a.sliceAngle<180?(a.titleRadius=r*(180/a.sliceAngle/5),a.setTitlePos()):(a.titleRadius=.55*r,a.setTitlePos()),a.sliceAngle<180?slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.endAngle,r),a.Close()]:180===a.startAngle||0===a.startAngle||-180===a.startAngle||360===a.startAngle?slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.startAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r),a.Close()]:slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.middleAngle,r,a.startAngle,r),a.LineTo(a.middleAngle,r,a.endAngle,r),a.LineTo(a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.EyeSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.68,a},this.EyeSlice=function(a,b,c){return null===c&&(c=EyeSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b*.7,0===b&&(r=.01),startAngle=a.startAngle,endAngle=a.endAngle,180===a.sliceAngle&&(startAngle=a.startAngle+a.sliceAngle/4,endAngle=a.startAngle+a.sliceAngle-a.sliceAngle/4),slicePathString=[a.MoveTo(endAngle,r),a.ArcTo(r,startAngle,r),a.ArcTo(r,endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WheelSlice=function(a,b,c){a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,startTheta=a.startTheta,middleTheta=a.middleTheta,endTheta=a.endTheta;var d;return a.sliceAngle<120?(a.titleRadius=.57*r,d=.9):a.sliceAngle<180?(a.titleRadius=.52*r,d=.91):(a.titleRadius=.45*r,d=.873),slicePathString=[a.MoveTo(a.middleAngle,.07*r),["L",.07*r*Math.cos(middleTheta)+.87*r*Math.cos(startTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(startTheta)+y],["A",r*d,r*d,0,0,1,.07*r*Math.cos(middleTheta)+.87*r*Math.cos(endTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(endTheta)+y],a.Close()],linePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.OuterStrokeSlice=function(a,b,c){return a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,innerRadius=r/4,a.sliceAngle<120?a.titleRadius=.57*r:a.sliceAngle<180?a.titleRadius=.52*r:a.titleRadius=.45*r,linePathString=[a.MoveTo(a.startAngle,innerRadius),a.LineTo(a.startAngle,r),a.MoveTo(a.endAngle,innerRadius),a.LineTo(a.endAngle,r)],slicePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r),a.MoveTo(a.startAngle,innerRadius),a.ArcTo(innerRadius,a.endAngle,innerRadius),a.ArcBackTo(innerRadius,a.startAngle,innerRadius)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TabSlice=function(a,b,c){var d=.9*a.wheelRadius,e=360/a.sliceAngle,f=2*d/e;return x=a.centerX,y=a.centerY,itemIndex=a.itemIndex,titlePosX=x,titlePosY=itemIndex*f+y+f/2-d,slicePathString=[["M",x-f/2,itemIndex*f+y-d],["L",f/2+x,itemIndex*f+y-d],["L",f/2+x,(itemIndex+1)*f+y-d],["L",x-f/2,(itemIndex+1)*f+y-d],["z"]],{slicePathString:slicePathString,linePathString:"",titlePosX:titlePosX,titlePosY:titlePosY}},this.YinYangSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.ArcTo(r/2,a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r/2,0,0),a.Close()],titlePosX=a.getX(a.startAngle,r/2),titlePosY=a.getY(a.startAngle,r/2),{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:titlePosX,titlePosY:titlePosY}},this.WebSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.titleRadius=.55*r,a.setTitlePos(),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,1.1*r),a.MoveToCenter(),a.LineTo(a.endAngle,1.1*r),a.MoveTo(a.startAngle,.15*r),a.LineTo(a.endAngle,.15*r),a.MoveTo(a.startAngle,.35*r),a.LineTo(a.endAngle,.35*r),a.MoveTo(a.startAngle,.55*r),a.LineTo(a.endAngle,.55*r),a.MoveTo(a.startAngle,.75*r),a.LineTo(a.endAngle,.75*r),a.MoveTo(a.startAngle,.95*r),a.LineTo(a.endAngle,.95*r),a.Close()],{slicePathString:"",linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WinterSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.85,a.arcRadiusPercent=1,a},this.WinterSlice=function(a,b,c){null===c&&(c=WinterSliceCustomization()),a.setBaseValue(b,c),sliceAngle=a.sliceAngle,parallelAngle=a.startAngle+sliceAngle/4,parallelAngle2=a.startAngle+sliceAngle/4*3,borderAngle1=a.startAngle+sliceAngle/200,borderAngle2=a.startAngle+sliceAngle/2-sliceAngle/200,borderAngle3=a.startAngle+sliceAngle/2+sliceAngle/200,borderAngle4=a.startAngle+sliceAngle-sliceAngle/200;var d=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveToCenter(),a.MoveTo(parallelAngle,d/100),a.LineTo(borderAngle1,d/2),a.LineTo(parallelAngle,d-d/100),a.LineTo(borderAngle2,d/2),a.LineTo(parallelAngle,d/100),a.MoveTo(parallelAngle2,d/100),a.LineTo(borderAngle4,d/2),a.LineTo(parallelAngle2,d-d/100),a.LineTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d/100),a.Close()],linePathString=[a.MoveTo(parallelAngle,d),a.LineTo(borderAngle2,d/2),a.MoveTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TutorialSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.isMoveTo=!1,a.isLineTo=!1,a.isArcTo=!1,a.isArcBackTo=!1,a},this.TutorialSlice=function(a,b,c){return null===c&&(c=TutorialSliceCustomization()),a.setBaseValue(b,c),slicePathString=[],slicePathString.push(a.MoveToCenter()),c.isMoveTo===!0&&slicePathString.push(a.MoveTo(a.middleAngle,a.sliceRadius/4)),c.isLineTo&&slicePathString.push(a.LineTo(a.startAngle,a.sliceRadius)),c.isArcTo&&slicePathString.push(a.ArcTo(a.sliceRadius,a.middleAngle,a.sliceRadius)),c.isArcBackTo&&slicePathString.push(a.ArcBackTo(a.sliceRadius,a.endAngle,a.sliceRadius)),slicePathString.push(a.Close()),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,a.sliceRadius),a.ArcTo(a.sliceRadius,a.endAngle,a.sliceRadius),a.Close()],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this};var sliceTransform,sliceTransformCustomization,colorpalette;wheelnav=function(a,b,c,d){var e,f,g,h,i;if(this.holderId="wheel",void 0!==a&&null!==a&&(this.holderId=a),e=document.getElementById(a),!(null!==e&&void 0!==e||void 0!==b&&null!==b))return this;if(g=!0,void 0===b||null===b){for(h=[],i=0;ic&&(c=360+c),!this.clockwise&&c>0&&(c-=360)),b.currentRotateAngle-=c,d=null!=this.animatetime?this.animatetime:1500,this.animatetimeCalculated&&a!==this.currentClick&&(b.animatetime=d*(Math.abs(c)/360)),this.rotateRoundCount>0&&(this.clockwise?b.currentRotateAngle-=360*this.rotateRoundCount:b.currentRotateAngle+=360*this.rotateRoundCount,b.animatetime=d*(this.rotateRoundCount+1)));for(i=0;i0){for(this.initWheel(t),s=0;s-1||a.indexOf(" ")>-1)},this.isImageTitle=function(a){return void 0===a&&(a=this.title),null!==a&&"imgsrc:"===a.substr(0,7)},this},wheelnavTitle.prototype.getTitlePercentAttr=function(a,b,c,d){var e,f,g={};return void 0!==this.relativePath?(e=a+(this.startX-this.centerX),f=b+(this.startY-this.centerY),this.relativePath[0][1]=e,this.relativePath[0][2]=f,g={path:this.relativePath,title:this.title}):g=this.isImageTitle()?{x:a-c/2,y:b-d/2,width:c,height:d,title:this.title,src:this.title.substr(7,this.title.length)}:{x:a,y:b,title:this.title},g},wheelnavTitle.prototype.getTitleSizeTransform=function(a,b){var c="";return null!==a&&null!==b&&(c="s",this.height>this.width?(c+=(a/this.height).toString()+",",c+=(b/this.height).toString()):(c+=(a/this.width).toString()+",",c+=(b/this.width).toString())),c},wheelnav.prototype.styleWheel=function(){this.cssMode?(this.spreaderPathInAttr={"class":this.getSpreaderCssClass("in")},this.spreaderPathOutAttr={"class":this.getSpreaderCssClass("out")},this.spreaderTitleInAttr={"class":this.getSpreaderTitleCssClass("in")},this.spreaderTitleOutAttr={"class":this.getSpreaderTitleCssClass("out")},this.markerAttr={"class":this.getMarkerCssClass()}):((void 0===this.spreaderPathInAttr||null===this.spreaderPathInAttr)&&(this.spreaderPathInAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(void 0===this.spreaderPathOutAttr||null===this.spreaderPathOutAttr)&&(this.spreaderPathOutAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(void 0===this.spreaderTitleInAttr||null===this.spreaderTitleInAttr)&&(this.spreaderTitleInAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(void 0===this.spreaderTitleOutAttr||null===this.spreaderTitleOutAttr)&&(this.spreaderTitleOutAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(void 0===this.markerAttr||null===this.markerAttr)&&(this.markerAttr={stroke:"#444","stroke-width":2}))},wheelnavItem.prototype.styleNavItem=function(){this.wheelnav.cssMode?(this.slicePathAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"basic")},this.sliceHoverAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"hover")},this.sliceSelectedAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"selected")},this.titleAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"basic")},this.titleHoverAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"hover")},this.titleSelectedAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"selected")},this.linePathAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"basic")},this.lineHoverAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"hover")},this.lineSelectedAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"selected")}):(this.slicePathAttr={stroke:"#333","stroke-width":0,cursor:"pointer","fill-opacity":1},this.sliceHoverAttr={stroke:"#222","stroke-width":0,cursor:"pointer","fill-opacity":.77},this.sliceSelectedAttr={stroke:"#111","stroke-width":0,cursor:"default","fill-opacity":1},this.titleAttr={font:this.titleFont,fill:"#333",stroke:"none",cursor:"pointer"},this.titleHoverAttr={font:this.titleFont,fill:"#222",cursor:"pointer",stroke:"none"},this.titleSelectedAttr={font:this.titleFont,fill:"#fff",cursor:"default"},this.linePathAttr={stroke:"#444","stroke-width":1,cursor:"pointer"},this.lineHoverAttr={stroke:"#222","stroke-width":2,cursor:"pointer"},this.lineSelectedAttr={stroke:"#444","stroke-width":1,cursor:"default"}),this.sliceClickablePathAttr={fill:"#FFF",stroke:"#FFF","stroke-width":0,cursor:"pointer","fill-opacity":.01},this.sliceClickableHoverAttr={stroke:"#FFF","stroke-width":0,cursor:"pointer"},this.sliceClickableSelectedAttr={stroke:"#FFF","stroke-width":0,cursor:"default"}},wheelnav.prototype.getSliceCssClass=function(a,b){return"wheelnav-"+this.holderId+"-slice-"+b+"-"+a},wheelnav.prototype.getTitleCssClass=function(a,b){return"wheelnav-"+this.holderId+"-title-"+b+"-"+a},wheelnav.prototype.getLineCssClass=function(a,b){return"wheelnav-"+this.holderId+"-line-"+b+"-"+a},wheelnav.prototype.getSpreaderCssClass=function(a){return"wheelnav-"+this.holderId+"-spreader-"+a},wheelnav.prototype.getSpreaderTitleCssClass=function(a){return"wheelnav-"+this.holderId+"-spreadertitle-"+a},wheelnav.prototype.getMarkerCssClass=function(){return"wheelnav-"+this.holderId+"-marker"};var pathHelper=function(){return this.sliceRadius=0,this.startAngle=0,this.middleAngle=0,this.endAngle=0,this.sliceAngle=0,this.startTheta=0,this.middleTheta=0,this.endTheta=0,this.titlePosX=0,this.titlePosY=0,this.titleRadius=0,this.titleTheta=0,this.custom=null,this.centerX=0,this.centerY=0,this.wheelRadius=0,this.itemIndex=0,this.navItemCount=0,this.navAngle=0,this.setBaseValue=function(a,b){null===b?b=new slicePathCustomization:this.custom=b,this.sliceRadius=this.wheelRadius*a*.9,this.middleAngle=this.startAngle+this.sliceAngle/2,this.endAngle=this.startAngle+this.sliceAngle,this.startTheta=this.getTheta(this.startAngle),this.middleTheta=this.getTheta(this.middleAngle),this.endTheta=this.getTheta(this.endAngle),null!==b?(null!==b.titleRadiusPercent&&(this.titleRadius=this.sliceRadius*b.titleRadiusPercent),null!==b.titleSliceAnglePercent&&(this.titleTheta=this.getTheta(this.startAngle+this.sliceAngle*b.titleSliceAnglePercent))):(this.titleRadius=.5*this.sliceRadius,this.titleTheta=this.middleTheta),this.setTitlePos()},this.setTitlePos=function(){this.titlePosX=this.titleRadius*Math.cos(this.titleTheta)+this.centerX,this.titlePosY=this.titleRadius*Math.sin(this.titleTheta)+this.centerY},this.getX=function(a,b){return b*Math.cos(this.getTheta(a))+this.centerX},this.getY=function(a,b){return b*Math.sin(this.getTheta(a))+this.centerY},this.MoveTo=function(a,b){return["M",this.getX(a,b),this.getY(a,b)]},this.MoveToCenter=function(){return["M",this.centerX,this.centerY]},this.LineTo=function(a,b,c,d){return void 0===c&&(c=a),void 0===d&&(d=b),["L",this.getX(a,b),this.getY(c,d)]},this.ArcTo=function(a,b,c){return["A",a,a,0,0,1,this.getX(b,c),this.getY(b,c)]},this.ArcBackTo=function(a,b,c){return["A",a,a,0,0,0,this.getX(b,c),this.getY(b,c)]},this.StartSpreader=function(a,b,c){this.endAngle-this.startAngle==360?a.push(this.MoveTo(b,c)):(a.push(this.MoveToCenter()),a.push(this.LineTo(b,c)))},this.Close=function(){return["z"]},this.getTheta=function(a){return a%360*Math.PI/180},this},slicePathCustomization=function(){return this.titleRadiusPercent=.5,this.titleSliceAnglePercent=.5,this},spreaderPathCustomization=function(){return this.titleRadiusPercent=0,this.titleSliceAnglePercent=.5,this.spreaderPercent=1,this},markerPathCustomization=function(){return this.titleRadiusPercent=1,this.titleSliceAnglePercent=.5,this.markerPercent=1.05,this};slicePath=function(){return this.NullSlice=function(a,b,c){return a.setBaseValue(b,c),{slicePathString:"",linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.NullInitSlice=function(a,b,c){return a.setBaseValue(b,c),slicePathString=[a.MoveToCenter(),a.Close()],{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:a.centerX,titlePosY:a.centerY}},this.PieSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSlice=function(a,b,c){null===c&&(c=PieSliceCustomization()),a.setBaseValue(b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveTo(a.middleAngle,c.startRadiusPercent*a.sliceRadius),a.LineTo(a.startAngle,d),a.ArcTo(e,a.endAngle,d),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.FlowerSlice=function(a,b,c){null===c&&(c=PieSliceCustomization(),c.titleRadiusPercent=.5,c.arcBaseRadiusPercent=.65,c.arcRadiusPercent=.14);var d=PieSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.PieArrowSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arrowRadiusPercent=1.1,a},this.PieArrowSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,arrowAngleStart=a.startAngle+.45*a.sliceAngle, -arrowAngleEnd=a.startAngle+.55*a.sliceAngle;var d=r*c.arrowRadiusPercent;return slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,arrowAngleStart,r),a.LineTo(a.middleAngle,d),a.LineTo(arrowAngleEnd,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieArrowBasePieSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),c.arrowRadiusPercent=1;var d=PieArrowSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.DonutSliceCustomization=function(){var a=new slicePathCustomization;return a.minRadiusPercent=.37,a.maxRadiusPercent=.9,a},this.DonutSlice=function(a,b,c){return null===c&&(c=DonutSliceCustomization()),maxRadius=a.wheelRadius*b*c.maxRadiusPercent,minRadius=a.wheelRadius*b*c.minRadiusPercent,a.setBaseValue(b,c),a.titleRadius=(maxRadius+minRadius)/2,a.setTitlePos(),slicePathString=[a.MoveTo(a.startAngle,minRadius),a.LineTo(a.startAngle,maxRadius),a.ArcTo(maxRadius,a.endAngle,maxRadius),a.LineTo(a.endAngle,minRadius),a.ArcBackTo(minRadius,a.startAngle,minRadius),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.55,a.isBasePieSlice=!1,a},this.CogSlice=function(a,b,c){return null===c&&(c=CogSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,rbase=a.wheelRadius*b*.83,percentAngle0625=a.startAngle+.0625*a.sliceAngle,percentAngle1250=a.startAngle+.125*a.sliceAngle,percentAngle1875=a.startAngle+.1875*a.sliceAngle,percentAngle2500=a.startAngle+.25*a.sliceAngle,percentAngle3125=a.startAngle+.3125*a.sliceAngle,percentAngle3750=a.startAngle+.375*a.sliceAngle,percentAngle4375=a.startAngle+.4375*a.sliceAngle,percentAngle5000=a.startAngle+.5*a.sliceAngle,percentAngle5625=a.startAngle+.5625*a.sliceAngle,percentAngle6250=a.startAngle+.625*a.sliceAngle,percentAngle6875=a.startAngle+.6875*a.sliceAngle,percentAngle7500=a.startAngle+.75*a.sliceAngle,percentAngle8125=a.startAngle+.8125*a.sliceAngle,percentAngle8750=a.startAngle+.875*a.sliceAngle,percentAngle9375=a.startAngle+.9375*a.sliceAngle,percentAngle9687=a.startAngle+.96875*a.sliceAngle,c.isBasePieSlice?(r=rbase,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.ArcTo(r,percentAngle1250,r),a.ArcTo(r,percentAngle1875,r),a.ArcTo(r,percentAngle2500,r),a.ArcTo(r,percentAngle3125,r),a.ArcTo(r,percentAngle3750,r),a.ArcTo(r,percentAngle4375,r),a.ArcTo(r,percentAngle5000,r),a.ArcTo(r,percentAngle5625,r),a.ArcTo(r,percentAngle6250,r),a.ArcTo(r,percentAngle6875,r),a.ArcTo(r,percentAngle7500,r),a.ArcTo(r,percentAngle8125,r),a.ArcTo(r,percentAngle8750,r),a.ArcTo(r,percentAngle9375,r),a.ArcTo(r,percentAngle9687,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.LineTo(percentAngle0625,rbase),a.ArcTo(rbase,percentAngle1875,rbase),a.LineTo(percentAngle1875,r),a.ArcTo(r,percentAngle3125,r),a.LineTo(percentAngle3125,rbase),a.ArcTo(rbase,percentAngle4375,rbase),a.LineTo(percentAngle4375,r),a.ArcTo(r,percentAngle5625,r),a.LineTo(percentAngle5625,rbase),a.ArcTo(rbase,percentAngle6875,rbase),a.LineTo(percentAngle6875,r),a.ArcTo(r,percentAngle8125,r),a.LineTo(percentAngle8125,rbase),a.ArcTo(rbase,percentAngle9375,rbase),a.LineTo(percentAngle9375,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogBasePieSlice=function(a,b,c){null===c&&(c=CogSliceCustomization()),c.isBasePieSlice=!0;var d=CogSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.StarSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.44,a.minRadiusPercent=.5,a.isBasePieSlice=!1,a},this.StarSlice=function(a,b,c){return null===c&&(c=StarSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b,rbase=r*c.minRadiusPercent,c.isBasePieSlice?(r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,a.middleAngle,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,rbase),a.LineTo(a.middleAngle,r),a.LineTo(a.endAngle,rbase),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarBasePieSlice=function(a,b,c){null===c&&(c=StarSliceCustomization()),c.titleRadiusPercent=.6,c.isBasePieSlice=!0;var d=StarSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceCustomization=function(){var a=new slicePathCustomization;return a.menuRadius=35,a.titleRadiusPercent=.63,a.isSelectedLine=!1,a.lineBaseRadiusPercent=0,a},this.MenuSlice=function(a,b,c){var d,e;return null===c&&(c=MenuSliceCustomization()),a.setBaseValue(b,c),x=a.centerX,y=a.centerY,d=a.wheelRadius*b,a.titleRadius=d*c.titleRadiusPercent,a.setTitlePos(),e=b*c.menuRadius,.05>=b&&(e=10),middleTheta=a.middleTheta,slicePathString=[["M",a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX+e*Math.cos(middleTheta),a.titlePosY+e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["z"]],linePathString=.05>=b?[["M",x,y],["A",1,1,0,0,1,x+1,y+1]]:c.isSelectedLine?[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/3,a.middleAngle,a.titleRadius-e)]:[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/2,a.middleAngle,a.titleRadius-e)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.MenuSliceSelectedLine=function(a,b,c){null===c&&(c=MenuSliceCustomization()),c.isSelectedLine=!0;var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:d.linePathString,titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceWithoutLine=function(a,b,c){var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.LineSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.sliceAngle>60&&a.sliceAngle<180?(a.titleRadius=r*(36/a.sliceAngle),a.setTitlePos()):(a.titleRadius=.55*r,a.setTitlePos()),slicePathString=a.sliceAngle<180?[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.endAngle,r),a.Close()]:180===a.startAngle||0===a.startAngle||-180===a.startAngle||360===a.startAngle?[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.startAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r),a.Close()]:[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.middleAngle,r,a.startAngle,r),a.LineTo(a.middleAngle,r,a.endAngle,r),a.LineTo(a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.EyeSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.68,a},this.EyeSlice=function(a,b,c){return null===c&&(c=EyeSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b*.7,0===b&&(r=.01),startAngle=a.startAngle,endAngle=a.endAngle,180===a.sliceAngle&&(startAngle=a.startAngle+a.sliceAngle/4,endAngle=a.startAngle+a.sliceAngle-a.sliceAngle/4),slicePathString=[a.MoveTo(endAngle,r),a.ArcTo(r,startAngle,r),a.ArcTo(r,endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WheelSlice=function(a,b,c){a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,startTheta=a.startTheta,middleTheta=a.middleTheta,endTheta=a.endTheta;var d;return a.sliceAngle<120?(a.titleRadius=.57*r,d=.9):a.sliceAngle<180?(a.titleRadius=.52*r,d=.91):(a.titleRadius=.45*r,d=.873),slicePathString=[a.MoveTo(a.middleAngle,.07*r),["L",.07*r*Math.cos(middleTheta)+.87*r*Math.cos(startTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(startTheta)+y],["A",r*d,r*d,0,0,1,.07*r*Math.cos(middleTheta)+.87*r*Math.cos(endTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(endTheta)+y],a.Close()],linePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TabSlice=function(a){var b=.9*a.wheelRadius,c=360/a.sliceAngle,d=2*b/c;return x=a.centerX,y=a.centerY,itemIndex=a.itemIndex,titlePosX=x,titlePosY=itemIndex*d+y+d/2-b,slicePathString=[["M",x-d/2,itemIndex*d+y-b],["L",d/2+x,itemIndex*d+y-b],["L",d/2+x,(itemIndex+1)*d+y-b],["L",x-d/2,(itemIndex+1)*d+y-b],["z"]],{slicePathString:slicePathString,linePathString:"",titlePosX:titlePosX,titlePosY:titlePosY}},this.YinYangSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.ArcTo(r/2,a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r/2,0,0),a.Close()],titlePosX=a.getX(a.startAngle,r/2),titlePosY=a.getY(a.startAngle,r/2),{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:titlePosX,titlePosY:titlePosY}},this.WebSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.titleRadius=.55*r,a.setTitlePos(),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,1.1*r),a.MoveToCenter(),a.LineTo(a.endAngle,1.1*r),a.MoveTo(a.startAngle,.15*r),a.LineTo(a.endAngle,.15*r),a.MoveTo(a.startAngle,.35*r),a.LineTo(a.endAngle,.35*r),a.MoveTo(a.startAngle,.55*r),a.LineTo(a.endAngle,.55*r),a.MoveTo(a.startAngle,.75*r),a.LineTo(a.endAngle,.75*r),a.MoveTo(a.startAngle,.95*r),a.LineTo(a.endAngle,.95*r),a.Close()],{slicePathString:"",linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WinterSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.85,a.arcRadiusPercent=1,a},this.WinterSlice=function(a,b,c){null===c&&(c=WinterSliceCustomization()),a.setBaseValue(b,c),sliceAngle=a.sliceAngle,parallelAngle=a.startAngle+sliceAngle/4,parallelAngle2=a.startAngle+sliceAngle/4*3,borderAngle1=a.startAngle+sliceAngle/200,borderAngle2=a.startAngle+sliceAngle/2-sliceAngle/200,borderAngle3=a.startAngle+sliceAngle/2+sliceAngle/200,borderAngle4=a.startAngle+sliceAngle-sliceAngle/200;var d=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveToCenter(),a.MoveTo(parallelAngle,d/100),a.LineTo(borderAngle1,d/2),a.LineTo(parallelAngle,d-d/100),a.LineTo(borderAngle2,d/2),a.LineTo(parallelAngle,d/100),a.MoveTo(parallelAngle2,d/100),a.LineTo(borderAngle4,d/2),a.LineTo(parallelAngle2,d-d/100),a.LineTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d/100),a.Close()],linePathString=[a.MoveTo(parallelAngle,d),a.LineTo(borderAngle2,d/2),a.MoveTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TutorialSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.isMoveTo=!1,a.isLineTo=!1,a.isArcTo=!1,a.isArcBackTo=!1,a},this.TutorialSlice=function(a,b,c){return null===c&&(c=TutorialSliceCustomization()),a.setBaseValue(b,c),slicePathString=[],slicePathString.push(a.MoveToCenter()),c.isMoveTo===!0&&slicePathString.push(a.MoveTo(a.middleAngle,a.sliceRadius/4)),c.isLineTo&&slicePathString.push(a.LineTo(a.startAngle,a.sliceRadius)),c.isArcTo&&slicePathString.push(a.ArcTo(a.sliceRadius,a.middleAngle,a.sliceRadius)),c.isArcBackTo&&slicePathString.push(a.ArcBackTo(a.sliceRadius,a.endAngle,a.sliceRadius)),slicePathString.push(a.Close()),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,a.sliceRadius),a.ArcTo(a.sliceRadius,a.endAngle,a.sliceRadius),a.Close()],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this},sliceTransform=function(){this.startAngle=0,this.startTheta=0,this.middleTheta=0,this.endTheta=0;var a=function(a,c,d,e,f){this.startAngle=e,this.startTheta=b(startAngle),this.middleTheta=b(startAngle+f/2),this.endTheta=b(startAngle+f)},b=function(a){return a%360*Math.PI/180};return this.NullTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:""}},this.MoveMiddleTransform=function(c,d,e,f,g,h,i){var j,k,l,m;return a(c,d,e,f,g,h,i),j="t"+(e/10*Math.cos(middleTheta)).toString()+","+(e/10*Math.sin(middleTheta)).toString(),null!==h?k=b(-h):(l=f-i*g,k=b(l+g/2)),m="s1,r0,t"+(e/10*Math.cos(k)).toString()+","+(e/10*Math.sin(k)).toString(),{sliceTransformString:j,lineTransformString:j,titleTransformString:m}},this.RotateTransform=function(){var a="s1,r360";return{sliceTransformString:a,lineTransformString:a,titleTransformString:a}},this.RotateHalfTransform=function(){var a="s1,r90";return{sliceTransformString:a,lineTransformString:a,titleTransformString:a}},this.RotateTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1,r360"}},this.ScaleTransform=function(){var a="s1.2";return{sliceTransformString:a,lineTransformString:"",titleTransformString:a}},this.ScaleTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1.3"}},this.RotateScaleTransform=function(){var a="r360,s1.3";return{sliceTransformString:a,lineTransformString:"",titleTransformString:a}},this.CustomTransform=function(a,b,c,d,e,f,g,h){var i=h.scaleString+","+h.rotateString;return{sliceTransformString:i,lineTransformString:i,titleTransformString:i}},this.CustomTitleTransform=function(a,b,c,d,e,f,g,h){var i=h.scaleString+","+h.rotateString;return{sliceTransformString:"",lineTransformString:"",titleTransformString:i}},this},sliceTransformCustomization=function(){return this.scaleString="s1",this.rotateString="r0",this},spreader=function(a){var b,c;if(this.wheelnav=a,this.wheelnav.spreaderEnable){this.spreaderHelper=new pathHelper,this.spreaderHelper.centerX=this.wheelnav.centerX,this.spreaderHelper.centerY=this.wheelnav.centerY,this.spreaderHelper.navItemCount=this.wheelnav.navItemCount,this.spreaderHelper.navAngle=this.wheelnav.navAngle,this.spreaderHelper.wheelRadius=this.wheelnav.spreaderRadius,this.spreaderHelper.startAngle=this.wheelnav.spreaderStartAngle,this.spreaderHelper.sliceAngle=this.wheelnav.spreaderSliceAngle,b=this.wheelnav,this.animateeffect="bounce",this.animatetime=1500,null!==this.wheelnav.animateeffect&&(this.animateeffect=this.wheelnav.animateeffect),null!==this.wheelnav.animatetime&&(this.animatetime=this.wheelnav.animatetime),this.fontAttr=null!==this.wheelnav.spreaderTitleFont?{font:this.wheelnav.spreaderTitleFont}:{font:"100 32px Impact, Charcoal, sans-serif"},this.spreaderPathIn=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderInPercent,this.wheelnav.spreaderPathCustom),this.spreaderPathOut=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderOutPercent,this.wheelnav.spreaderPathCustom),c=this.spreaderPathOut,b.initPercentthis.wheelnav.minPercent?this.spreaderPathOut.spreaderPathString:this.spreaderPathIn.spreaderPathString,spreaderTransformAttr={path:currentPath},this.spreaderPath.animate(spreaderTransformAttr,this.animatetime,this.animateeffect);var b,c,d;this.wheelnav.currentPercent===this.wheelnav.maxPercent?(b=this.outTitle,c=this.wheelnav.spreaderTitleOutAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathOutAttr),d=this.outTitleSizeTransform):(b=this.inTitle,c=this.wheelnav.spreaderTitleInAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathInAttr),d=this.inTitleSizeTransform),wheelnavTitle().isPathTitle(b.title)?(c.path=b.path,c.transform=d):wheelnavTitle().isImageTitle(b.title)?(c.x=b.x,c.y=b.y,c.width=b.width,c.height=b.height,this.spreaderTitle.attr({src:b.src})):(offYOffset=0,"-"===b.title&&(offYOffset=3),c.x=b.x,c.y=b.y-offYOffset,null!==b.title&&this.spreaderTitle.attr({text:b.title})),this.spreaderTitle.animate(c,this.animatetime,this.animateeffect)}this.spreaderPath.toFront(),this.spreaderTitle.toFront()}},spreaderPath=function(){return this.NullSpreader=function(a,b){return null===b&&(b=new spreaderPathCustomization),a.setBaseValue(b.spreaderPercent,b),{spreaderPathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieSpreaderCustomization=function(){var a=new spreaderPathCustomization;return a.spreaderRadius=25,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSpreader=function(a,b,c){null===c&&(c=PieSpreaderCustomization()),a.setBaseValue(c.spreaderPercent*b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return spreaderPathString=[],a.StartSpreader(spreaderPathString,a.startAngle,d),spreaderPathString.push(a.ArcTo(e,a.middleAngle,d)),spreaderPathString.push(a.ArcTo(e,a.endAngle,d)),spreaderPathString.push(a.Close()),{spreaderPathString:spreaderPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarSpreaderCustomization=function(){var a=new spreaderPathCustomization;return a.minRadiusPercent=.5,a},this.StarSpreader=function(a,b,c){null===c&&(c=StarSpreaderCustomization()),a.setBaseValue(c.spreaderPercent*b,c),rbase=a.wheelRadius*c.spreaderPercent*c.minRadiusPercent*b,r=a.sliceRadius,spreaderPathString=[],sliceAngle=a.sliceAngle/a.navItemCount,baseAngle=a.navAngle,a.endAngle-a.startAngle<360&&(baseAngle=a.startAngle),a.StartSpreader(spreaderPathString,baseAngle,r);for(var d=0;d=b&&(d=11),middleTheta=a.middleTheta,markerPathString=[["M",a.titlePosX-d*Math.cos(middleTheta),a.titlePosY-d*Math.sin(middleTheta)],["A",d,d,0,0,1,a.titlePosX+d*Math.cos(middleTheta),a.titlePosY+d*Math.sin(middleTheta)],["A",d,d,0,0,1,a.titlePosX-d*Math.cos(middleTheta),a.titlePosY-d*Math.sin(middleTheta)],["z"]],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.LineMarkerCustomization=function(){var a=new markerPathCustomization;return a.arcBaseRadiusPercent=1.05,a.arcRadiusPercent=1.2,a.startRadiusPercent=0,a},this.LineMarker=function(a,b,c){null===c&&(c=LineMarkerCustomization()),a.setBaseValue(c.markerPercent*b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return markerPathString=[a.MoveTo(a.navAngle,d),a.LineTo(a.navAngle,e),a.Close()],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.DropMarkerCustomization=function(){var a=new markerPathCustomization;return a.dropBaseRadiusPercent=0,a.dropRadiusPercent=.15,a},this.DropMarker=function(a,b,c){null===c&&(c=DropMarkerCustomization()),a.setBaseValue(c.markerPercent*b,c);var d=a.sliceRadius*c.dropBaseRadiusPercent,e=a.startAngle+.2*a.sliceAngle,f=a.startAngle,g=a.startAngle+.8*a.sliceAngle,h=a.startAngle+a.sliceAngle,i=a.sliceRadius*c.dropRadiusPercent;return markerPathString=[a.MoveTo(0,i),a.ArcTo(i,180,i),a.ArcTo(i,360,i),a.MoveTo(a.navAngle,d),a.LineTo(e,i),a.LineTo(f,i),a.LineTo(a.navAngle,1.6*i),a.LineTo(h,i),a.LineTo(g,i),a.Close()],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this},colorpalette={defaultpalette:["#2D9E46","#F5BE41","#F77604","#D63C22","#006BA6","#92ADAF"],purple:["#4F346B","#623491","#9657D6","#AD74E7","#CBA3F3"],greenred:["#17B92A","#FF3D00","#17B92A","#FF3D00"],greensilver:["#1F700A","#79CC3C","#D4E178","#E6D5C3","#AC875D"],oceanfive:["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"],garden:["#648A4F","#2B2B29","#DF6126","#FFA337","#F57C85"],gamebookers:["#FF9900","#DCDCDC","#BCBCBC","#3299BB","#727272"],parrot:["#D80351","#F5D908","#00A3EE","#929292","#3F3F3F"],pisycholand:["#FF1919","#FF5E19","#FF9F19","#E4FF19","#29FF19"],makeLOVEnotWAR:["#2C0EF0","#B300FF","#6751F0","#FF006F","#8119FF"],theworldismine:["#F21D1D","#FF2167","#B521FF","#7E2AA8","#000000"],fractalloveone:["#002EFF","#00FFF7","#00FF62","#FFAA00","#FFF700"],fractallovetwo:["#FF9500","#FF0000","#FF00F3","#AA00FF","#002EFF"],fractallove:["#002EFF","#00FFF7","#00FF62","#FFAA00","#F5D908","#FF0000","#FF00F3","#AA00FF"],sprinkles:["#272523","#FFACAC","#FFD700","#00590C","#08006D"],goldenyellow:["#D8B597","#8C4006","#B6690F","#E3C57F","#FFEDBE"],hotaru:["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"]},function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={n:{}},k=function(a,d){var e,f;a=String(a);var g,h=c,j=Array.prototype.slice.call(arguments,2),l=k.listeners(a),m=0,n=[],o={},p=[],q=b;for(b=a,c=0,e=0,f=l.length;f>e;e++)"zIndex"in l[e]&&(n.push(l[e].zIndex),l[e].zIndex<0&&(o[l[e].zIndex]=l[e]));for(n.sort(i);n[m]<0;)if(g=o[n[m++]],p.push(g.apply(d,j)),c)return c=h,p;for(e=0;f>e;e++)if(g=l[e],"zIndex"in g)if(g.zIndex==n[m]){if(p.push(g.apply(d,j)),c)break; -do if(m++,g=o[n[m]],g&&p.push(g.apply(d,j)),c)break;while(g)}else o[g.zIndex]=g;else if(p.push(g.apply(d,j)),c)break;return c=h,b=q,p.length?p:null};k._events=j,k.listeners=function(a){for(var b,c,d,e,h,i,k=a.split(f),l=j,m=[l],n=[],o=0,p=k.length;p>o;o++){for(i=[],e=0,h=m.length;h>e;e++)for(l=m[e].n,c=[l[k[o]],l[g]],d=2;d--;)b=c[d],b&&(i.push(b),n=n.concat(b.f||[]));m=i}return n},k.on=function(a,b){var c,d,e,g;if(a=String(a),"function"!=typeof b)return function(){};for(c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={n:{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){var c,d,h,i,l,m,n,o,p,q;if(!a)return void(k._events=j={n:{}});for(c=a.split(f),p=[j],l=0,m=c.length;m>l;l++)for(n=0;nl;l++)for(d=p[l];d.n;){if(b){if(d.f){for(n=0,o=d.f.length;o>n;n++)if(d.f[n]==b){d.f.splice(n,1);break}d.f.length||delete d.f}for(h in d.n)if(d.n[e](h)&&d.n[h].f){for(q=d.n[h].f,n=0,o=q.length;o>n;n++)if(q[n]==b){q.splice(n,1);break}q.length||delete d.n[h].f}}else{delete d.f;for(h in d.n)d.n[e](h)&&d.n[h].f&&delete d.n[h].f}d=d.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(window||this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){var d,e;return c.is(a,"function")?H?a():b.on("raphael.DOMload",a):c.is(a,ga)?c._engine.create[Q](c,a.splice(0,3+c.is(a[0],ea))).add(a):(d=Array.prototype.slice.call(arguments,0),c.is(d[d.length-1],"function")?(e=d.pop(),H?e.call(c._engine.create[Q](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[Q](c,d))})):c._engine.create[Q](c,arguments))}function d(a){var b,c;if("function"==typeof a||Object(a)!==a)return a;b=new a.constructor;for(c in a)a[M](c)&&(b[c]=d(a[c]));return b}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function f(a,b,c){function d(){var f=Array.prototype.slice.call(arguments,0),g=f.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];return h[M](g)?(e(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[Q](b,f),c?c(h[g]):h[g])}return d}function g(){return this.hex}function h(a,b){for(var c,d=[],e=0,f=a.length;f-2*!b>e;e+=2)c=[{x:+a[e-2],y:+a[e-1]},{x:+a[e],y:+a[e+1]},{x:+a[e+2],y:+a[e+3]},{x:+a[e+4],y:+a[e+5]}],b?e?f-4==e?c[3]={x:+a[0],y:+a[1]}:f-2==e&&(c[2]={x:+a[0],y:+a[1]},c[3]={x:+a[2],y:+a[3]}):c[0]={x:+a[f-2],y:+a[f-1]}:f-4==e?c[3]=c[2]:e||(c[0]={x:+a[e],y:+a[e+1]}),d.push(["C",(-c[0].x+6*c[1].x+c[2].x)/6,(-c[0].y+6*c[1].y+c[2].y)/6,(c[1].x+6*c[2].x-c[3].x)/6,(c[1].y+6*c[2].y-c[3].y)/6,c[2].x,c[2].y]);return d}function i(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function j(a,b,c,d,e,f,g,h,j){var k;null==j&&(j=1),j=j>1?1:0>j?0:j;var l=j/2,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0;for(k=0;12>k;k++){var p=l*m[k]+l,q=i(p,a,c,e,g),r=i(p,b,d,f,h),s=q*q+r*r;o+=n[k]*$.sqrt(s)}return l*o}function k(a,b,c,d,e,f,g,h,i){if(!(0>i||j(a,b,c,d,e,f,g,h).01;)l/=2,m+=(i>n?1:-1)*l,n=j(a,b,c,d,e,f,g,h,m);return m}}function l(a,b,c,d,e,f,g,h){if(!(_(a,c)_(e,g)||_(b,d)_(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+aa(a,c).toFixed(2)||n>+_(a,c).toFixed(2)||n<+aa(e,g).toFixed(2)||n>+_(e,g).toFixed(2)||o<+aa(b,d).toFixed(2)||o>+_(b,d).toFixed(2)||o<+aa(f,h).toFixed(2)||o>+_(f,h).toFixed(2)))return{x:l,y:m}}}}function m(a,b,d){var e,f,g,h,i,k=c.bezierBBox(a),m=c.bezierBBox(b);if(!c.isBBoxIntersect(k,m))return d?0:[];var n=j.apply(0,a),o=j.apply(0,b),p=_(~~(n/5),1),q=_(~~(o/5),1),r=[],s=[],t={},u=d?0:[];for(e=0;p+1>e;e++)f=c.findDotsAtSegment.apply(c,a.concat(e/p)),r.push({x:f.x,y:f.y,t:e/p});for(e=0;q+1>e;e++)f=c.findDotsAtSegment.apply(c,b.concat(e/q)),s.push({x:f.x,y:f.y,t:e/q});for(e=0;p>e;e++)for(g=0;q>g;g++){var v=r[e],w=r[e+1],x=s[g],y=s[g+1],z=ba(w.x-v.x)<.001?"y":"x",A=ba(y.x-x.x)<.001?"y":"x",B=l(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(t[B.x.toFixed(4)]==B.y.toFixed(4))continue;t[B.x.toFixed(4)]=B.y.toFixed(4),h=v.t+ba((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),i=x.t+ba((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t),h>=0&&1.001>=h&&i>=0&&1.001>=i&&(d?u++:u.push({x:B.x,y:B.y,t1:aa(h,1),t2:aa(i,1)}))}}return u}function n(a,b,d){var e,f,g,h,i,j,k,l,n,o,p,q,r,s,t,u,v,w,x,y;for(a=c._path2curve(a),b=c._path2curve(b),p=d?0:[],q=0,r=a.length;r>q;q++)if(s=a[q],"M"==s[0])e=i=s[1],f=j=s[2];else for("C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j),t=0,u=b.length;u>t;t++)if(v=b[t],"M"==v[0])g=k=v[1],h=l=v[2];else if("C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,l,k,l],g=k,h=l),w=m(n,o,d),d)p+=w;else{for(x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}return p}function o(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function p(){return this.x+U+this.y+U+this.width+" × "+this.height}function q(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){for(var c,d,e,f,h=a,i=0;8>i;i++){if(e=g(h)-a,ba(e)h)return c;if(h>d)return d;for(;d>c;){if(e=g(h),ba(e-a)e?c=h:d=h,h=(d-c)/2+c}return h}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function r(a,b){var c,d=[],e={};if(this.ms=b,this.times=1,a){for(c in a)a[M](c)&&(e[ma(c)]=a[c],d.push(ma(c)));d.sort(ya)}this.anim=e,this.top=d[d.length-1],this.percents=d}function s(a,d,e,f,g,h){var i,j,k,l,m,n,p,r,s,t,u,v,w,x,y,z,A,B;e=ma(e);var C,D,E,F,G,H,I=a.ms,K={},L={},N={};if(f){for(j=0,k=nb.length;k>j;j++)if(i=nb[j],i.el.id==d.id&&i.anim==a){i.percent!=e?(nb.splice(j,1),E=1):D=i,d.attr(i.totalOrigin);break}}else f=+L;for(j=0,k=a.percents.length;k>j;j++){if(a.percents[j]==e||a.percents[j]>f*a.top){e=a.percents[j],G=a.percents[j-1]||0,I=I/a.top*(e-G),F=a.percents[j+1],C=a.anim[e];break}f&&d.attr(a.anim[a.percents[j]])}if(C){if(D)D.initstatus=f,D.start=new Date-D.ms*f;else{for(l in C)if(C[M](l)&&(qa[M](l)||d.paper.customAttributes[M](l)))switch(K[l]=d.attr(l),null==K[l]&&(K[l]=pa[l]),L[l]=C[l],qa[l]){case ea:N[l]=(L[l]-K[l])/I;break;case"colour":K[l]=c.getRGB(K[l]),m=c.getRGB(L[l]),N[l]={r:(m.r-K[l].r)/I,g:(m.g-K[l].g)/I,b:(m.b-K[l].b)/I};break;case"path":for(n=Ua(K[l],L[l]),p=n[1],K[l]=n[0],N[l]=[],j=0,k=K[l].length;k>j;j++)for(N[l][j]=[0],r=1,s=K[l][j].length;s>r;r++)N[l][j][r]=(p[j][r]-K[l][j][r])/I;break;case"transform":if(t=d._,u=Za(t[l],L[l]))for(K[l]=u.from,L[l]=u.to,N[l]=[],N[l].real=!0,j=0,k=K[l].length;k>j;j++)for(N[l][j]=[K[l][j][0]],r=1,s=K[l][j].length;s>r;r++)N[l][j][r]=(L[l][j][r]-K[l][j][r])/I;else v=d.matrix||new o,w={_:{transform:t.transform},getBBox:function(){return d.getBBox(1)}},K[l]=[v.a,v.b,v.c,v.d,v.e,v.f],Xa(w,L[l]),L[l]=w._.transform,N[l]=[(w.matrix.a-v.a)/I,(w.matrix.b-v.b)/I,(w.matrix.c-v.c)/I,(w.matrix.d-v.d)/I,(w.matrix.e-v.e)/I,(w.matrix.f-v.f)/I];break;case"csv":if(x=V(C[l])[W](J),y=V(K[l])[W](J),"clip-rect"==l)for(K[l]=y,N[l]=[],j=y.length;j--;)N[l][j]=(x[j]-K[l][j])/I;L[l]=x;break;default:for(x=[][R](C[l]),y=[][R](K[l]),N[l]=[],j=d.paper.customAttributes[l].length;j--;)N[l][j]=((x[j]||0)-(y[j]||0))/I}if(z=C.easing,A=c.easing_formulas[z],A||(A=V(z).match(ka),A&&5==A.length?(B=A,A=function(a){return q(a,+B[1],+B[2],+B[3],+B[4],I)}):A=Aa),H=C.start||a.start||+new Date,i={anim:a,percent:e,timestamp:H,start:H+(a.del||0),status:0,initstatus:f||0,stop:!1,ms:I,easing:A,from:K,diff:N,to:L,el:d,callback:C.callback,prev:G,next:F,repeat:h||a.times,origin:d.attr(),totalOrigin:g},nb.push(i),f&&!D&&!E&&(i.stop=!0,i.start=new Date-I*f,1==nb.length))return pb();E&&(i.start=new Date-i.ms*f),1==nb.length&&ob(pb)}b("raphael.anim.start."+d.id,d,a)}}function t(a){for(var b=0;be;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(c._g=N,c.type=N.win.SVGAngle||N.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==c.type){if(u=N.doc.createElement("div"),u.innerHTML='',v=u.firstChild,v.style.behavior="url(#default#VML)",!(v&&"object"==typeof v.adj))return c.type=T;u=null}c.svg=!(c.vml="VML"==c.type),c._Paper=P,c.fn=I=P.prototype=c.prototype,c._id=0,c._oid=0,c.is=function(a,b){return b=Z.call(b),"finite"==b?!ja[M](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||ha.call(a).slice(8,-1).toLowerCase()==b},c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+180*$.atan2(-i,-h)/da+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*da/180},c.deg=function(a){return 180*a/da%360},c.snapTo=function(a,b,d){var e,f;if(d=c.is(d,"finite")?d:10,c.is(a,ga)){for(e=a.length;e--;)if(ba(a[e]-b)<=d)return a[e]}else{if(a=+a,f=b%a,d>f)return b-f;if(f>a-d)return b-f+a}return b},w=c.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*$.random()|0,c="x"==a?b:3&b|8;return c.toString(16)}),c.setWindow=function(a){b("raphael.setWindow",c,N.win,a),N.win=a,N.doc=N.win.document,c._engine.initWin&&c._engine.initWin(N.win)};var Fa=function(a){var b,d,e,g,h;if(c.vml){b=/^\s+|\s+$/g;try{e=new ActiveXObject("htmlfile"),e.write(""),e.close(),d=e.body}catch(i){d=createPopup().document.body}g=d.createTextRange(),Fa=f(function(a){try{d.style.color=V(a).replace(b,T);var c=g.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return"none"}})}else h=N.doc.createElement("i"),h.title="Raphaël Colour Picker",h.style.display="none",N.doc.body.appendChild(h),Fa=f(function(a){return h.style.color=a,N.doc.defaultView.getComputedStyle(h,T).getPropertyValue("color")});return Fa(a)},Ga=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ha=function(){return"hsl("+[this.h,this.s,this.l]+")"},Ia=function(){return this.hex},Ja=function(a,b,d){if(null==b&&c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&c.is(a,fa)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},Ka=function(a,b,d,e){a*=255,b*=255,d*=255;var f={r:a,g:b,b:d,hex:c.rgb(a,b,d),toString:Ia};return c.is(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=Ia,a},c.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-ba(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Ka(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-ba(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Ka(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=Ja(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=_(a,b,c),g=f-aa(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6/6,e=0==g?0:g/f,{h:d,s:e,b:f,toString:Ga}},c.rgb2hsl=function(a,b,c){c=Ja(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=_(a,b,c),h=aa(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6/6,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Ha}},c._path2string=function(){return this.join(",").replace(ta,"$1")},x=c._preload=function(a,b){var c=N.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,N.doc.body.removeChild(this)},c.onerror=function(){N.doc.body.removeChild(this)},N.doc.body.appendChild(c),c.src=a},c.getRGB=f(function(a){if(!a||(a=V(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:g};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:g};sa[M](a.toLowerCase().substring(0,2))||"#"==a.charAt()||(a=Fa(a));var b,d,e,f,h,i,j=a.match(ia);return j?(j[2]&&(e=na(j[2].substring(5),16),d=na(j[2].substring(3,5),16),b=na(j[2].substring(1,3),16)),j[3]&&(e=na((h=j[3].charAt(3))+h,16),d=na((h=j[3].charAt(2))+h,16),b=na((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100)),j[5]?(i=j[5][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsb2rgb(b,d,e,f)):j[6]?(i=j[6][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsl2rgb(b,d,e,f)):(j={r:b,g:d,b:e,toString:g},j.hex="#"+(16777216|e|d<<8|b<<16).toString(16).slice(1),c.is(f,"finite")&&(j.opacity=f),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:g}},c),c.hsb=f(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=f(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=f(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){var b,d,e;return a?(b=y(a),b.arr?Ma(b.arr):(d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[],c.is(a,ga)&&c.is(a[0],ga)&&(e=Ma(a)),e.length||V(a).replace(ua,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(wa,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][R](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][R](f));else for(;f.length>=d[g]&&(e.push([b][R](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=Ma(e),e)):null},c.parseTransformString=f(function(a){if(!a)return null;var b=[];return c.is(a,ga)&&c.is(a[0],ga)&&(b=Ma(a)),b.length||V(a).replace(va,function(a,c,d){var e=[];Z.call(c);d.replace(wa,function(a,b){b&&e.push(+b)}),b.push([c][R](e))}),b.toString=c._path2string,b}),y=function(a){var b=y.ps=y.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[M](c)&&c!=a&&(b[c].sleep--,b[c].sleep||delete b[c])}),b[a]},c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=ca(j,3),l=ca(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*$.atan2(q-s,r-t)/da;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=Ta.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)},c.pathIntersection=function(a,b){return n(a,b)},c.pathIntersectionNumber=function(a,b){return n(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&n(a,[["M",b,d],["H",e.x2+10]],1)%2==1},c._removedFactory=function(a){return function(){b("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var La=c.pathBBox=function(a){var b,c,e,f=y(a);if(f.bbox)return d(f.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ua(a);var g,h=0,i=0,j=[],k=[];for(b=0,c=a.length;c>b;b++)g=a[b],"M"==g[0]?(h=g[1],i=g[2],j.push(h),k.push(i)):(e=Ta(h,i,g[1],g[2],g[3],g[4],g[5],g[6]),j=j[R](e.min.x,e.max.x),k=k[R](e.min.y,e.max.y),h=g[5],i=g[6]);var l=aa[Q](0,j),m=aa[Q](0,k),n=_[Q](0,j),o=_[Q](0,k),p=n-l,q=o-m,r={x:l,y:m,x2:n,y2:o,width:p,height:q,cx:l+p/2,cy:m+q/2};return f.bbox=d(r),r},Ma=function(a){var b=d(a);return b.toString=c._path2string,b},Na=c._pathToRelative=function(a){var b,d,e,f,g,h,i,j,k,l=y(a);if(l.rel)return Ma(l.rel);c.is(a,ga)&&c.is(a&&a[0],ga)||(a=c.parsePathString(a));var m=[],n=0,o=0,p=0,q=0,r=0;for("M"==a[0][0]&&(n=a[0][1],o=a[0][2],p=n,q=o,r++,m.push(["M",n,o])),b=r,d=a.length;d>b;b++){if(e=m[b]=[],f=a[b],f[0]!=Z.call(f[0]))switch(e[0]=Z.call(f[0]),e[0]){case"a":e[1]=f[1],e[2]=f[2],e[3]=f[3],e[4]=f[4],e[5]=f[5],e[6]=+(f[6]-n).toFixed(3),e[7]=+(f[7]-o).toFixed(3);break;case"v":e[1]=+(f[1]-o).toFixed(3);break;case"m":p=f[1],q=f[2];default:for(g=1,h=f.length;h>g;g++)e[g]=+(f[g]-(g%2?n:o)).toFixed(3)}else for(e=m[b]=[],"m"==f[0]&&(p=f[1]+n,q=f[2]+o),i=0,j=f.length;j>i;i++)m[b][i]=f[i];switch(k=m[b].length,m[b][0]){case"z":n=p,o=q;break;case"h":n+=+m[b][k-1];break;case"v":o+=+m[b][k-1];break;default:n+=+m[b][k-2],o+=+m[b][k-1]}}return m.toString=c._path2string,l.rel=Ma(m),m},Oa=c._pathToAbsolute=function(a){var b,d,e,f,g,i,j,k,l,m,n=y(a);if(n.abs)return Ma(n.abs);if(c.is(a,ga)&&c.is(a&&a[0],ga)||(a=c.parsePathString(a)),!a||!a.length)return[["M",0,0]];var o=[],p=0,q=0,r=0,s=0,t=0;for("M"==a[0][0]&&(p=+a[0][1],q=+a[0][2],r=p,s=q,t++,o[0]=["M",p,q]),b=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),f=t,g=a.length;g>f;f++){if(o.push(d=[]),e=a[f],e[0]!=oa.call(e[0]))switch(d[0]=oa.call(e[0]),d[0]){case"A":d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=+(e[6]+p),d[7]=+(e[7]+q);break;case"V":d[1]=+e[1]+q;break;case"H":d[1]=+e[1]+p;break;case"R":for(i=[p,q][R](e.slice(1)),j=2,k=i.length;k>j;j++)i[j]=+i[j]+p,i[++j]=+i[j]+q;o.pop(),o=o[R](h(i,b));break;case"M":r=+e[1]+p,s=+e[2]+q;default:for(j=1,k=e.length;k>j;j++)d[j]=+e[j]+(j%2?p:q)}else if("R"==e[0])i=[p,q][R](e.slice(1)),o.pop(),o=o[R](h(i,b)),d=["R"][R](e.slice(-2));else for(l=0,m=e.length;m>l;l++)d[l]=e[l];switch(d[0]){case"Z":p=r,q=s;break;case"H":p=d[1];break;case"V":q=d[1];break;case"M":r=d[d.length-2],s=d[d.length-1];default:p=d[d.length-2],q=d[d.length-1]}}return o.toString=c._path2string,n.abs=Ma(o),o},Pa=function(a,b,c,d){return[a,b,c,d,c,d]},Qa=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Ra=function(a,b,c,d,e,g,h,i,j,k){var l,m,n,o,p,q=120*da/180,r=da/180*(+e||0),s=[],t=f(function(a,b,c){var d=a*$.cos(c)-b*$.sin(c),e=a*$.sin(c)+b*$.cos(c);return{x:d,y:e}});if(k)C=k[0],D=k[1],A=k[2],B=k[3];else{l=t(a,b,-r),a=l.x,b=l.y,l=t(i,j,-r),i=l.x,j=l.y;var u=($.cos(da/180*e),$.sin(da/180*e),(a-i)/2),v=(b-j)/2,w=u*u/(c*c)+v*v/(d*d);w>1&&(w=$.sqrt(w),c=w*c,d=w*d);var x=c*c,y=d*d,z=(g==h?-1:1)*$.sqrt(ba((x*y-x*v*v-y*u*u)/(x*v*v+y*u*u))),A=z*c*v/d+(a+i)/2,B=z*-d*u/c+(b+j)/2,C=$.asin(((b-B)/d).toFixed(9)),D=$.asin(((j-B)/d).toFixed(9));C=A>a?da-C:C,D=A>i?da-D:D,0>C&&(C=2*da+C),0>D&&(D=2*da+D),h&&C>D&&(C-=2*da),!h&&D>C&&(D-=2*da)}if(m=D-C,ba(m)>q){var E=D,F=i,G=j;D=C+q*(h&&D>C?1:-1),i=A+c*$.cos(D),j=B+d*$.sin(D),s=Ra(i,j,c,d,e,0,h,F,G,[D,E,A,B])}m=D-C;var H=$.cos(C),I=$.sin(C),J=$.cos(D),K=$.sin(D),L=$.tan(m/4),M=4/3*c*L,N=4/3*d*L,O=[a,b],P=[a+M*I,b-N*H],Q=[i+M*K,j-N*J],S=[i,j];if(P[0]=2*O[0]-P[0],P[1]=2*O[1]-P[1],k)return[P,Q,S][R](s);for(s=[P,Q,S][R](s).join()[W](","),n=[],o=0,p=s.length;p>o;o++)n[o]=o%2?t(s[o-1],s[o],r).y:t(s[o],s[o+1],r).x;return n},Sa=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:ca(j,3)*a+3*ca(j,2)*i*c+3*j*i*i*e+ca(i,3)*g,y:ca(j,3)*b+3*ca(j,2)*i*d+3*j*i*i*f+ca(i,3)*h}},Ta=f(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+$.sqrt(k*k-4*j*l))/2/j,n=(-k-$.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return ba(m)>"1e12"&&(m=.5),ba(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Sa(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Sa(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+$.sqrt(k*k-4*j*l))/2/j,n=(-k-$.sqrt(k*k-4*j*l))/2/j,ba(m)>"1e12"&&(m=.5),ba(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Sa(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Sa(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:aa[Q](0,p),y:aa[Q](0,o)},max:{x:_[Q](0,p),y:_[Q](0,o)}}}),Ua=c._path2curve=f(function(a,b){var c,d,e=!b&&y(a);if(!b&&e.curve)return Ma(e.curve);var f=Oa(a),g=b&&Oa(b),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=function(a,b,c){var d,e;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(a[0]in{T:1,Q:1}||(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][R](Ra[Q](0,[b.x,b.y][R](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][R](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][R](Qa(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][R](Qa(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][R](Pa(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][R](Pa(b.x,b.y,a[1],b.y));break;case"V":a=["C"][R](Pa(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][R](Pa(b.x,b.y,b.X,b.Y))}return a},k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][R](c.splice(0,6)));a.splice(b,1),d=_(f.length,g&&g.length||0)}},l=function(a,b,c,e,h){a&&b&&"M"==a[h][0]&&"M"!=b[h][0]&&(b.splice(h,0,["M",e.x,e.y]),c.bx=0,c.by=0,c.x=a[h][1],c.y=a[h][2],d=_(f.length,g&&g.length||0))};for(c=0,d=_(f.length,g&&g.length||0);d>c;c++){f[c]=j(f[c],h),k(f,c),g&&(g[c]=j(g[c],i)),g&&k(g,c),l(f,g,h,i,c),l(g,f,i,h,c);var m=f[c],n=g&&g[c],o=m.length,p=g&&n.length;h.x=m[o-2],h.y=m[o-1],h.bx=ma(m[o-4])||h.x,h.by=ma(m[o-3])||h.y,i.bx=g&&(ma(n[p-4])||i.x),i.by=g&&(ma(n[p-3])||i.y),i.x=g&&n[p-2],i.y=g&&n[p-1]}return g||(e.curve=Ma(f)),g?[f,g]:f},null,Ma),Va=(c._parseDots=f(function(a){for(var b,d,e,f,g,h,i=[],j=0,k=a.length;k>j;j++){if(b={},d=a[j].match(/^([^:]*):?([\d\.]*)/),b.color=c.getRGB(d[1]),b.color.error)return null;b.color=b.color.hex,d[2]&&(b.offset=d[2]+"%"),i.push(b)}for(j=1,k=i.length-1;k>j;j++)if(!i[j].offset){for(e=ma(i[j-1].offset||0),f=0,g=j+1;k>g;g++)if(i[g].offset){f=i[g].offset;break}for(f||(f=100,g=k),f=ma(f),h=(f-e)/(g-j+1);g>j;j++)e+=h,i[j].offset=e+"%"}return i}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Wa=(c._tofront=function(a,b){b.top!==a&&(Va(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},c._toback=function(a,b){b.bottom!==a&&(Va(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},c._insertafter=function(a,b,c){Va(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},c._insertbefore=function(a,b,c){Va(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=La(a),d={_:{transform:T},getBBox:function(){return c}};return Xa(d,b),d.matrix}),Xa=(c.transformPath=function(a,b){return Ea(a,Wa(a,b))},c._extractTransform=function(a,b){var d,e;if(null==b)return a._.transform;b=V(b).replace(/\.{3}|\u2026/g,a._.transform||T);var f=c.parseTransformString(b),g=0,h=0,i=0,j=1,k=1,l=a._,m=new o;if(l.transform=f||[],f)for(d=0,e=f.length;e>d;d++){var n,p,q,r,s,t=f[d],u=t.length,v=V(t[0]).toLowerCase(),w=t[0]!=v,x=w?m.invert():0;"t"==v&&3==u?w?(n=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),m.translate(q-n,r-p)):m.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),m.rotate(t[1],s.x+s.width/2,s.y+s.height/2),g+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),m.rotate(t[1],q,r)):m.rotate(t[1],t[2],t[3]),g+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),m.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),j*=t[1],k*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),m.scale(t[1],t[2],q,r)):m.scale(t[1],t[2],t[3],t[4]),j*=t[1],k*=t[2]):"m"==v&&7==u&&m.add(t[1],t[2],t[3],t[4],t[5],t[6]),l.dirtyT=1,a.matrix=m}a.matrix=m,l.sx=j,l.sy=k,l.deg=g,l.dx=h=m.e,l.dy=i=m.f,1==j&&1==k&&!g&&l.bbox?(l.bbox.x+=+h,l.bbox.y+=+i):l.dirtyT=1}),Ya=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]}},Za=c._equaliseTransform=function(a,b){b=V(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=_(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||Ya(b[k]),g=b[k]||Ya(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=_(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,"object")?a:N.doc.getElementById(a),null!=f?f.tagName?null==b?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:b,height:d}:{container:1,x:a,y:b,width:d,height:e}:void 0},c.pathToRelative=Na,c._engine={},c.path2curve=Ua,c.matrix=function(a,b,c,d,e,f){ -return new o(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=$.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof o&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new o(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+$.cos(a).toFixed(9),f=+$.sin(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[V.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a,e,f,g={};return g.dx=this.e,g.dy=this.f,a=[[this.a,this.c],[this.b,this.d]],g.scalex=$.sqrt(b(a[0])),d(a[0]),g.shear=a[0][0]*a[1][0]+a[0][1]*a[1][1],a[1]=[a[1][0]-a[0][0]*g.shear,a[1][1]-a[0][1]*g.shear],g.scaley=$.sqrt(b(a[1])),d(a[1]),g.shear/=g.scaley,e=-a[0][1],f=a[1][1],0>f?(g.rotate=c.deg($.acos(f)),0>e&&(g.rotate=360-g.rotate)):g.rotate=c.deg($.asin(e)),g.isSimple=!(+g.shear.toFixed(9)||g.scalex.toFixed(9)!=g.scaley.toFixed(9)&&g.rotate),g.isSuperSimple=!+g.shear.toFixed(9)&&g.scalex.toFixed(9)==g.scaley.toFixed(9)&&!g.rotate,g.noRotation=!+g.shear.toFixed(9)&&!g.rotate,g},a.toTransformString=function(a){var b=a||this[W]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:T)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:T)+(b.rotate?"r"+[b.rotate,0,0]:T)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(o.prototype),z=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/),I.safari="Apple Computer, Inc."==navigator.vendor&&(z&&z[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&z&&z[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:za;var $a=function(){this.returnValue=!1},_a=function(){return this.originalEvent.preventDefault()},ab=function(){this.cancelBubble=!0},bb=function(){return this.originalEvent.stopPropagation()},cb=function(a){var b=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,c=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft;return{x:a.clientX+c,y:a.clientY+b}},db=function(){return N.doc.addEventListener?function(a,b,c,d){var e,f=function(a){var b=cb(a);return c.call(d,a,b.x,b.y)};return a.addEventListener(b,f,!1),S&&Y[b]&&(e=function(b){for(var e=cb(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;h>g;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=_a,b.stopPropagation=bb;break}return c.call(d,b,e.x,e.y)},a.addEventListener(Y[b],e,!1)),function(){return a.removeEventListener(b,f,!1),S&&Y[b]&&a.removeEventListener(Y[b],f,!1),!0}}:N.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||N.win.event;var b=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,e=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||$a,a.stopPropagation=a.stopPropagation||ab,c.call(d,a,f,g)};return a.attachEvent("on"+b,e),function(){return a.detachEvent("on"+b,e),!0}}:void 0}(),eb=[],fb=function(a){for(var c,d,e,f=a.clientX,g=a.clientY,h=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,i=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft,j=eb.length;j--;){if(c=eb[j],S&&a.touches){for(d=a.touches.length;d--;)if(e=a.touches[d],e.identifier==c.el._drag.id){f=e.clientX,g=e.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;N.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(f,g),l.style.display=o,N.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&b("raphael.drag.over."+c.el.id,c.el,k),f+=i,g+=h,b("raphael.drag.move."+c.el.id,c.move_scope||c.el,f-c.el._drag.x,g-c.el._drag.y,f,g,a)}},gb=function(a){c.unmousemove(fb).unmouseup(gb);for(var d,e=eb.length;e--;)d=eb[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);eb=[]},hb=c.el={};for(A=X.length;A--;)(function(a){c[a]=hb[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:db(this.shape||this.node||N.doc,a,b,d||this)})),this},c["un"+a]=hb["un"+a]=function(b){for(var d=this.events||[],e=d.length;e--;)d[e].name==a&&(c.is(b,"undefined")||d[e].f==b)&&(d[e].unbind(),d.splice(e,1),d.length||delete this.events);return this}})(X[A]);hb.data=function(a,d){var e,f=xa[this.id]=xa[this.id]||{};if(0==arguments.length)return f;if(1==arguments.length){if(c.is(a,"object")){for(e in a)a[M](e)&&this.data(e,a[e]);return this}return b("raphael.data.get."+this.id,this,f[a],a),f[a]}return f[a]=d,b("raphael.data.set."+this.id,this,d,a),this},hb.removeData=function(a){return null==a?xa[this.id]={}:xa[this.id]&&delete xa[this.id][a],this},hb.getData=function(){return d(xa[this.id]||{})},hb.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},hb.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},B=[],hb.drag=function(a,d,e,f,g,h){function i(i){var j,k;(i.originalEvent||i).preventDefault();var l=i.clientX,m=i.clientY,n=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,o=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft;if(this._drag.id=i.identifier,S&&i.touches)for(j=i.touches.length;j--;)if(k=i.touches[j],this._drag.id=k.identifier,k.identifier==this._drag.id){l=k.clientX,m=k.clientY;break}this._drag.x=l+o,this._drag.y=m+n,eb.length||c.mousemove(fb).mouseup(gb),eb.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+o,i.clientY+n,i)}return this._drag={},B.push({el:this,start:i}),this.mousedown(i),this},hb.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},hb.undrag=function(){for(var a=B.length;a--;)B[a].el==this&&(this.unmousedown(B[a].start),B.splice(a,1),b.unbind("raphael.drag.*."+this.id));B.length||c.unmousemove(fb).unmouseup(gb),eb=[]},I.circle=function(a,b,d){var e=c._engine.circle(this,a||0,b||0,d||0);return this.__set__&&this.__set__.push(e),e},I.rect=function(a,b,d,e,f){var g=c._engine.rect(this,a||0,b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},I.ellipse=function(a,b,d,e){var f=c._engine.ellipse(this,a||0,b||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},I.path=function(a){!a||c.is(a,fa)||c.is(a[0],ga)||(a+=T);var b=c._engine.path(c.format[Q](c,arguments),this);return this.__set__&&this.__set__.push(b),b},I.image=function(a,b,d,e,f){var g=c._engine.image(this,a||"about:blank",b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},I.text=function(a,b,d){var e=c._engine.text(this,a||0,b||0,V(d));return this.__set__&&this.__set__.push(e),e},I.set=function(a){c.is(a,"array")||(a=Array.prototype.splice.call(arguments,0,arguments.length));var b=new E(a);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},I.setStart=function(a){this.__set__=a||this.set()},I.setFinish=function(){var a=this.__set__;return delete this.__set__,a},I.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},I.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},I.top=I.bottom=null,I.raphael=c,C=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(N.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(N.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}},I.getElementByPoint=function(a,b){var c,d,e,f=this,g=f.canvas,h=N.doc.elementFromPoint(a,b);if(N.win.opera&&"svg"==h.tagName&&(c=C(g),d=g.createSVGRect(),d.x=a-c.x,d.y=b-c.y,d.width=d.height=1,e=g.getIntersectionList(d,null),e.length&&(h=e[e.length-1])),!h)return null;for(;h.parentNode&&h!=g.parentNode&&!h.raphael;)h=h.parentNode;return h==f.canvas.parentNode&&(h=g),h&&h.raphael?f.getById(h.raphaelid):null},I.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},I.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},I.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},I.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},hb.isPointInside=function(a,b){var d=this.realPath=Da[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=c.transformPath(d,this.attr("transform"))),c.isPointInsidePath(d,a,b)},hb.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=Da[this.type](this),b.bboxwt=La(this.realPath),b.bboxwt.toString=p,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=Da[this.type](this)),b.bbox=La(Ea(this.realPath,this.matrix)),b.bbox.toString=p,b.dirty=b.dirtyT=0),b.bbox)},hb.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},hb.glow=function(a){var b;if("text"==this.type)return null;a=a||{};var c={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},d=c.width/2,e=this.paper,f=e.set(),g=this.realPath||Da[this.type](this);for(g=this.matrix?Ea(g,this.matrix):g,b=1;d+1>b;b++)f.push(e.path(g).attr({stroke:c.color,fill:c.fill?c.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(c.width/d*b).toFixed(3),opacity:+(c.opacity/d).toFixed(3)}));return f.insertBefore(this).translate(c.offsetx,c.offsety)};var ib=function(a,b,d,e,f,g,h,i,l){return null==l?j(a,b,d,e,f,g,h,i):c.findDotsAtSegment(a,b,d,e,f,g,h,i,k(a,b,d,e,f,g,h,i,l))},jb=function(a,b){return function(d,e,f){var g,h;d=Ua(d);var i,j,k,l,m,n="",o={},p=0;for(g=0,h=d.length;h>g;g++){if(k=d[g],"M"==k[0])i=+k[1],j=+k[2];else{if(l=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6]),p+l>e){if(b&&!o.start){if(m=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6],e-p),n+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y],f)return n;o.start=n,n=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,k[5],k[6]].join(),p+=l,i=+k[5],j=+k[6];continue}if(!a&&!b)return m=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6],e-p),{x:m.x,y:m.y,alpha:m.alpha}}p+=l,i=+k[5],j=+k[6]}n+=k.shift()+k}return o.end=n,m=a?p:b?o:c.findDotsAtSegment(i,j,k[0],k[1],k[2],k[3],k[4],k[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha}),m}},kb=jb(1),lb=jb(),mb=jb(0,1);c.getTotalLength=kb,c.getPointAtLength=lb,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return mb(a,b).end;var d=mb(a,c,1);return b?mb(d,b).end:d},hb.getTotalLength=function(){var a=this.getPath();return a?this.node.getTotalLength?this.node.getTotalLength():kb(a):void 0},hb.getPointAtLength=function(a){var b=this.getPath();return b?lb(b,a):void 0},hb.getPath=function(){var a,b=c._getPath[this.type];return"text"!=this.type&&"set"!=this.type?(b&&(a=b(this)),a):void 0},hb.getSubpath=function(a,b){var d=this.getPath();return d?c.getSubpath(d,a,b):void 0},D=c.easing_formulas={linear:function(a){return a},"<":function(a){return ca(a,1.7)},">":function(a){return ca(a,.48)},"<>":function(a){var b=.48-a/1.04,c=$.sqrt(.1734+b*b),d=c-b,e=ca(ba(d),1/3)*(0>d?-1:1),f=-c-b,g=ca(ba(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:ca(2,-10*a)*$.sin(2*(a-.075)*da/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}},D.easeIn=D["ease-in"]=D["<"],D.easeOut=D["ease-out"]=D[">"],D.easeInOut=D["ease-in-out"]=D["<>"],D["back-in"]=D.backIn,D["back-out"]=D.backOut;var nb=[],ob=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},pb=function(){for(var a,d,e,f,g,h,i,j,k,l=+new Date,m=0;mp))if(q>p){d=r(p/q);for(e in t)if(t[M](e)){switch(qa[e]){case ea:n=+t[e]+d*q*u[e];break;case"colour":n="rgb("+[qb(la(t[e].r+d*q*u[e].r)),qb(la(t[e].g+d*q*u[e].g)),qb(la(t[e].b+d*q*u[e].b))].join(",")+")";break;case"path":for(n=[],f=0,g=t[e].length;g>f;f++){for(n[f]=[t[e][f][0]],h=1,i=t[e][f].length;i>h;h++)n[f][h]=+t[e][f][h]+d*q*u[e][f][h];n[f]=n[f].join(U)}n=n.join(U);break;case"transform":if(u[e].real)for(n=[],f=0,g=t[e].length;g>f;f++)for(n[f]=[t[e][f][0]],h=1,i=t[e][f].length;i>h;h++)n[f][h]=t[e][f][h]+d*q*u[e][f][h];else j=function(a){return+t[e][a]+d*q*u[e][a]},n=[["m",j(0),j(1),j(2),j(3),j(4),j(5)]];break;case"csv":if("clip-rect"==e)for(n=[],f=4;f--;)n[f]=+t[e][f]+d*q*u[e][f];break;default:for(k=[][R](t[e]),n=[],f=w.paper.customAttributes[e].length;f--;)n[f]=+k[f]+d*q*u[e][f]}x[e]=n}w.attr(x),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(w.id,w,a.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(a.callback,w,a.anim),w.attr(v),nb.splice(m--,1),a.repeat>1&&!a.next){for(o in v)v[M](o)&&(y[o]=a.totalOrigin[o]);a.el.attr(y),s(a.anim,a.el,a.anim.percents[0],null,a.totalOrigin,a.repeat-1)}a.next&&!a.stop&&s(a.anim,a.el,a.next,null,a.totalOrigin,a.repeat)}}c.svg&&w&&w.paper&&w.paper.safari(),nb.length&&ob(pb)},qb=function(a){return a>255?255:0>a?0:a};hb.animateWith=function(a,b,d,e,f,g){var h,i,j,k=this;if(k.removed)return g&&g.call(k),k;for(h=d instanceof r?d:c.animation(d,e,f,g),s(h,k,h.percents[0],null,k.attr()),i=0,j=nb.length;j>i;i++)if(nb[i].anim==b&&nb[i].el==a){nb[j-1].start=nb[i].start;break}return k},hb.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},r.prototype.delay=function(a){var b=new r(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},r.prototype.repeat=function(a){var b=new r(this.anim,this.ms);return b.del=this.del,b.times=$.floor(_(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof r)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g={};for(var h in a)a[M](h)&&ma(h)!=h&&ma(h)+"%"!=h&&(f=!0,g[h]=a[h]);return f?(d&&(g.easing=d),e&&(g.callback=e),new r({100:g},b)):new r(a,b)},hb.animate=function(a,b,d,e){var f,g=this;return g.removed?(e&&e.call(g),g):(f=a instanceof r?a:c.animation(a,b,d,e),s(f,g,f.percents[0],null,g.attr()),g)},hb.setTime=function(a,b){return a&&null!=b&&this.status(a,aa(b,a.ms)/a.ms),this},hb.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return s(a,this,-1,aa(b,1)),this;for(c=nb.length;c>f;f++)if(d=nb[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},hb.pause=function(a){for(var c=0;cb;b++)a[b]&&(a[b].constructor==hb.constructor||a[b].constructor==E)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},F=E.prototype,F.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],a&&(a.constructor==hb.constructor||a.constructor==E)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},F.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},F.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(G in hb)hb[M](G)&&(F[G]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][Q](c,b)})}}(G));return F.attr=function(a,b){var d,e,f,g;if(a&&c.is(a,ga)&&c.is(a[0],"object"))for(d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},F.clear=function(){for(;this.length;)this.pop()},F.splice=function(a,b){var c;a=0>a?_(this.length+a,0):a,b=_(0,aa(this.length-a,b));for(var d=[],e=[],f=[],g=2;gg;g++)e.push(this[a+g]);for(;gg?f[g]:d[g-c];for(g=this.items.length=this.length-=b-c;this[g];)delete this[g++];return new E(e)},F.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},F.animate=function(a,b,d,e){var f;(c.is(d,"function")||!d)&&(e=d||null);var g,h,i=this.items.length,j=i,k=this;if(!i)return this;for(e&&(h=function(){--i||e.call(k)}),d=c.is(d,fa)?d:h,f=c.animation(a,b,d,h),g=this.items[--j].animate(f);j--;)this.items[j]&&!this.items[j].removed&&this.items[j].animateWith(g,f,f),this.items[j]&&!this.items[j].removed||i--;return this},F.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},F.getBBox=function(){for(var a,b=[],c=[],d=[],e=[],f=this.items.length;f--;)this.items[f].removed||(a=this.items[f].getBBox(),b.push(a.x),c.push(a.y),d.push(a.x+a.width),e.push(a.y+a.height));return b=aa[Q](0,b),c=aa[Q](0,c),d=_[Q](0,d),e=_[Q](0,e),{x:b,y:c,x2:d,y2:e,width:d-b,height:e-c}},F.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},F.toString=function(){return"Raphaël‘s set"},F.glow=function(a){var b=this.paper.set();return this.forEach(function(c){var d=c.glow(a);null!=d&&d.forEach(function(a){b.push(a)})}),b},F.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){return d.isPointInside(a,b)?(c=!0,!1):void 0}),c},c.registerFont=function(a){var b,c,d,e,f,g;if(!a.face)return a;this.fonts=this.fonts||{},b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(d in a.face)a.face[M](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=na(a.face["units-per-em"],10);for(e in a.glyphs)if(a.glyphs[M](e)&&(f=a.glyphs[e],b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k))for(g in f.k)f[M](g)&&(b.glyphs[e].k[g]=f.k[g])}return a},I.getFont=function(a,b,d,e){var f,g,h,i,j,k;if(e=e||"normal",d=d||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,c.fonts){if(f=c.fonts[a],!f){g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,T)+"(\\s|$)","i");for(h in c.fonts)if(c.fonts[M](h)&&g.test(h)){f=c.fonts[h];break}}if(f)for(j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},I.print=function(a,b,d,e,f,g,h,i){var j,k,l,m;g=g||"middle",h=_(aa(h||0,1),-1),i=_(aa(i||1,3),1);var n,o=V(d)[W](T),p=0,q=0,r=T;if(c.is(e,"string")&&(e=this.getFont(e)),e){n=(f||16)/e.face["units-per-em"];var s=e.face.bbox[W](J),t=+s[0],u=s[3]-s[1],v=0,w=+s[1]+("baseline"==g?u+ +e.face.descent:u/2);for(j=0,k=o.length;k>j;j++)"\n"==o[j]?(p=0,m=0,q=0,v+=u*i):(l=q&&e.glyphs[o[j-1]]||{},m=e.glyphs[o[j]],p+=q?(l.w||e.w)+(l.k&&l.k[o[j]]||0)+e.w*h:0,q=1),m&&m.d&&(r+=c.transformPath(m.d,["t",p*n,v*n,"s",n,n,t,w,"t",(a-t)/n,(b-w)/n]))}return this.path(r).attr({fill:"#000",stroke:"none"})},I.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},K[M](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,ga)?[0][R](b):arguments;return a&&c.is(a,fa)&&d.length-1&&(a=a.replace(L,function(a,b){return null==d[++b]?T:d[b]})),a||T},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return O.was?N.win.Raphael=O.is:delete Raphael,c},c.st=F,function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){H=!0}),function(){var a,b;if(c.svg){var d="hasOwnProperty",e=String,f=parseFloat,g=parseInt,h=Math,i=h.max,j=h.abs,k=h.pow,l=/[, ]+/,m=c.eve,n="",o=" ",p="http://www.w3.org/1999/xlink",q={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},r={};c.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var s=function(a,b){var f,g;if(b){"string"==typeof a&&(a=s(a));for(f in b)b[d](f)&&("xlink:"==f.substring(0,6)?a.setAttributeNS(p,f.substring(6),e(b[f])):void 0!==a&&(g=e(b[f]),("d"!==f||"d"===f&&"M,0,0"!==g)&&a.setAttribute(f,g)))}else a=c._g.doc.createElementNS("http://www.w3.org/2000/svg",a),a.style&&(a.style.webkitTapHighlightColor="rgba(0,0,0,0)");return a},t=function(a,b){var d,g,l,m,o,p,q="linear",r=a.id+b,t=.5,u=.5,v=a.node,w=a.paper,x=v.style,y=c._g.doc.getElementById(r);if(!y){if(b=e(b).replace(c._radial_gradient,function(a,b,c){if(q="radial",b&&c){t=f(b),u=f(c);var d=2*(u>.5)-1;k(t-.5,2)+k(u-.5,2)>.25&&(u=h.sqrt(.25-k(t-.5,2))*d+.5)&&.5!=u&&(u=u.toFixed(5)-1e-5*d)}return n}),b=b.split(/\s*\-\s*/),"linear"==q){if(d=b.shift(),d=-f(d),isNaN(d))return null;g=[0,0,h.cos(c.rad(d)),h.sin(c.rad(d))],l=1/(i(j(g[2]),j(g[3]))||1),g[2]*=l,g[3]*=l,g[2]<0&&(g[0]=-g[2],g[2]=0),g[3]<0&&(g[1]=-g[3],g[3]=0)}if(m=c._parseDots(b),!m)return null;if(r=r.replace(/[\(\)\s,\xb0#]/g,"_"),a.gradient&&r!=a.gradient.id&&(w.defs.removeChild(a.gradient),delete a.gradient),!a.gradient)for(y=s(q+"Gradient",{id:r}),a.gradient=y,s(y,"radial"==q?{fx:t,fy:u}:{x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientTransform:a.matrix.invert()}),w.defs.appendChild(y),o=0,p=m.length;p>o;o++)y.appendChild(s("stop",{offset:m[o].offset?m[o].offset:o?"100%":"0%","stop-color":m[o].color||"#fff"}))}return s(v,{fill:"url(#"+r+")",opacity:1,"fill-opacity":1}),x.fill=n,x.opacity=1,x.fillOpacity=1,1},u=function(a){var b=a.getBBox(1);s(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},v=function(a,b,f){var g,h,i,j,k,l;if("path"==a.type){for(var m,o,p,t,u,v=e(b).toLowerCase().split("-"),w=a.paper,x=f?"end":"start",y=a.node,z=a.attrs,A=z["stroke-width"],B=v.length,C="classic",D=3,E=3,F=5;B--;)switch(v[B]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":C=v[B];break;case"wide":E=5;break;case"narrow":E=2;break;case"long":D=5;break;case"short":D=2}"open"==C?(D+=2,E+=2,F+=2,p=1,t=f?4:1,u={fill:"none",stroke:z.stroke}):(t=p=D/2,u={fill:z.stroke,stroke:"none"}),a._.arrows?f?(a._.arrows.endPath&&r[a._.arrows.endPath]--,a._.arrows.endMarker&&r[a._.arrows.endMarker]--):(a._.arrows.startPath&&r[a._.arrows.startPath]--,a._.arrows.startMarker&&r[a._.arrows.startMarker]--):a._.arrows={},"none"!=C?(g="raphael-marker-"+C,h="raphael-marker-"+x+C+D+E,c._g.doc.getElementById(g)?r[g]++:(w.defs.appendChild(s(s("path"),{"stroke-linecap":"round",d:q[C],id:g})),r[g]=1),i=c._g.doc.getElementById(h),i?(r[h]++,j=i.getElementsByTagName("use")[0]):(i=s(s("marker"),{id:h,markerHeight:E,markerWidth:D,orient:"auto",refX:t,refY:E/2}),j=s(s("use"),{"xlink:href":"#"+g,transform:(f?"rotate(180 "+D/2+" "+E/2+") ":n)+"scale("+D/F+","+E/F+")","stroke-width":(2/(D/F+E/F)).toFixed(4)}),i.appendChild(j),w.defs.appendChild(i),r[h]=1),s(j,u),k=p*("diamond"!=C&&"oval"!=C),f?(m=a._.arrows.startdx*A||0,o=c.getTotalLength(z.path)-k*A):(m=k*A,o=c.getTotalLength(z.path)-(a._.arrows.enddx*A||0)),u={},u["marker-"+x]="url(#"+h+")",(o||m)&&(u.d=c.getSubpath(z.path,m,o)),s(y,u),a._.arrows[x+"Path"]=g,a._.arrows[x+"Marker"]=h,a._.arrows[x+"dx"]=k,a._.arrows[x+"Type"]=C,a._.arrows[x+"String"]=b):(f?(m=a._.arrows.startdx*A||0,o=c.getTotalLength(z.path)-m):(m=0,o=c.getTotalLength(z.path)-(a._.arrows.enddx*A||0)),a._.arrows[x+"Path"]&&s(y,{d:c.getSubpath(z.path,m,o)}),delete a._.arrows[x+"Path"],delete a._.arrows[x+"Marker"],delete a._.arrows[x+"dx"],delete a._.arrows[x+"Type"],delete a._.arrows[x+"String"]);for(u in r)r[d](u)&&!r[u]&&(l=c._g.doc.getElementById(u),l&&l.parentNode.removeChild(l))}},w={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},x=function(a,b,c){if(b=w[e(b).toLowerCase()]){for(var d=a.attrs["stroke-width"]||"1",f={round:d,square:d,butt:0}[a.attrs["stroke-linecap"]||c["stroke-linecap"]]||0,g=[],h=b.length;h--;)g[h]=b[h]*d+(h%2?1:-1)*f;s(a.node,{"stroke-dasharray":g.join(",")})}},y=function(a,b){var f,h,k,m,o,q,r,w,y,z,B,C,D,E,F,G,H,I=a.node,J=a.attrs,K=I.style.visibility;I.style.visibility="hidden";for(f in b)if(b[d](f)){if(!c._availableAttrs[d](f))continue;switch(h=b[f],J[f]=h,f){case"blur":a.blur(h);break;case"title":k=I.getElementsByTagName("title"),k.length&&(k=k[0])?k.firstChild.nodeValue=h:(k=s("title"),m=c._g.doc.createTextNode(h),k.appendChild(m),I.appendChild(k));break;case"href":case"target":o=I.parentNode,"a"!=o.tagName.toLowerCase()&&(q=s("a"),o.insertBefore(q,I),q.appendChild(I),o=q),"target"==f?o.setAttributeNS(p,"show","blank"==h?"new":h):o.setAttributeNS(p,f,h);break;case"cursor":I.style.cursor=h;break;case"transform":a.transform(h);break;case"arrow-start":v(a,h);break;case"arrow-end":v(a,h,1);break;case"clip-rect":r=e(h).split(l),4==r.length&&(a.clip&&a.clip.parentNode.parentNode.removeChild(a.clip.parentNode),w=s("clipPath"),y=s("rect"),w.id=c.createUUID(),s(y,{x:r[0],y:r[1],width:r[2],height:r[3]}),w.appendChild(y),a.paper.defs.appendChild(w),s(I,{"clip-path":"url(#"+w.id+")"}),a.clip=y),h||(z=I.getAttribute("clip-path"),z&&(B=c._g.doc.getElementById(z.replace(/(^url\(#|\)$)/g,n)),B&&B.parentNode.removeChild(B),s(I,{"clip-path":n}),delete a.clip));break;case"path":"path"==a.type&&(s(I,{d:h?J.path=c._pathToAbsolute(h):"M0,0"}),a._.dirty=1,a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1)));break;case"width":if(I.setAttribute(f,h),a._.dirty=1,!J.fx)break;f="x",h=J.x;case"x":J.fx&&(h=-J.x-(J.width||0));case"rx":if("rx"==f&&"rect"==a.type)break;case"cx":I.setAttribute(f,h),a.pattern&&u(a),a._.dirty=1;break;case"height":if(I.setAttribute(f,h),a._.dirty=1,!J.fy)break;f="y",h=J.y;case"y":J.fy&&(h=-J.y-(J.height||0));case"ry":if("ry"==f&&"rect"==a.type)break;case"cy":I.setAttribute(f,h),a.pattern&&u(a),a._.dirty=1;break;case"r":"rect"==a.type?s(I,{rx:h,ry:h}):I.setAttribute(f,h),a._.dirty=1;break;case"src":"image"==a.type&&I.setAttributeNS(p,"href",h);break;case"stroke-width":(1!=a._.sx||1!=a._.sy)&&(h/=i(j(a._.sx),j(a._.sy))||1),a.paper._vbSize&&(h*=a.paper._vbSize),I.setAttribute(f,h),J["stroke-dasharray"]&&x(a,J["stroke-dasharray"],b),a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1));break;case"stroke-dasharray":x(a,h,b);break;case"fill":if(C=e(h).match(c._ISURL)){w=s("pattern"),D=s("image"),w.id=c.createUUID(),s(w,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),s(D,{x:0,y:0,"xlink:href":C[1]}),w.appendChild(D),function(b){c._preload(C[1],function(){var c=this.offsetWidth,d=this.offsetHeight;s(b,{width:c,height:d}),s(D,{width:c,height:d}),a.paper.safari()})}(w),a.paper.defs.appendChild(w),s(I,{fill:"url(#"+w.id+")"}),a.pattern=w,a.pattern&&u(a);break}if(E=c.getRGB(h),E.error){if(("circle"==a.type||"ellipse"==a.type||"r"!=e(h).charAt())&&t(a,h)){("opacity"in J||"fill-opacity"in J)&&(F=c._g.doc.getElementById(I.getAttribute("fill").replace(/^url\(#|\)$/g,n)),F&&(G=F.getElementsByTagName("stop"),s(G[G.length-1],{"stop-opacity":("opacity"in J?J.opacity:1)*("fill-opacity"in J?J["fill-opacity"]:1)}))),J.gradient=h,J.fill="none";break}}else delete b.gradient,delete J.gradient,!c.is(J.opacity,"undefined")&&c.is(b.opacity,"undefined")&&s(I,{opacity:J.opacity}),!c.is(J["fill-opacity"],"undefined")&&c.is(b["fill-opacity"],"undefined")&&s(I,{"fill-opacity":J["fill-opacity"]});E[d]("opacity")&&s(I,{"fill-opacity":E.opacity>1?E.opacity/100:E.opacity});case"stroke":E=c.getRGB(h),I.setAttribute(f,E.hex),"stroke"==f&&E[d]("opacity")&&s(I,{"stroke-opacity":E.opacity>1?E.opacity/100:E.opacity}),"stroke"==f&&a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1));break;case"gradient":("circle"==a.type||"ellipse"==a.type||"r"!=e(h).charAt())&&t(a,h);break;case"opacity":J.gradient&&!J[d]("stroke-opacity")&&s(I,{"stroke-opacity":h>1?h/100:h});case"fill-opacity":if(J.gradient){F=c._g.doc.getElementById(I.getAttribute("fill").replace(/^url\(#|\)$/g,n)),F&&(G=F.getElementsByTagName("stop"),s(G[G.length-1],{"stop-opacity":h}));break}default:"font-size"==f&&(h=g(h,10)+"px"),H=f.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()}),I.style[H]=h,a._.dirty=1,I.setAttribute(f,h)}}A(a,b),I.style.visibility=K},z=1.2,A=function(a,b){var f,h,i,j,k,l,m;if("text"==a.type&&(b[d]("text")||b[d]("font")||b[d]("font-size")||b[d]("x")||b[d]("y"))){var o=a.attrs,p=a.node,q=p.firstChild?g(c._g.doc.defaultView.getComputedStyle(p.firstChild,n).getPropertyValue("font-size"),10):10;if(b[d]("text")){for(o.text=b.text;p.firstChild;)p.removeChild(p.firstChild);for(f=e(b.text).split("\n"),h=[],j=0,k=f.length;k>j;j++)i=s("tspan"),j&&s(i,{dy:q*z,x:o.x}),i.appendChild(c._g.doc.createTextNode(f[j])),p.appendChild(i),h[j]=i}else for(h=p.getElementsByTagName("tspan"), -j=0,k=h.length;k>j;j++)j?s(h[j],{dy:q*z,x:o.x}):s(h[0],{dy:0});s(p,{x:o.x,y:o.y}),a._.dirty=1,l=a._getBBox(),m=o.y-(l.y+l.height/2),m&&c.is(m,"finite")&&s(h[0],{dy:m})}},B=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.matrix=c.matrix(),this.realPath=null,this.paper=b,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},b.bottom||(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},C=c.el;B.prototype=C,C.constructor=B,c._engine.path=function(a,b){var c,d=s("path");return b.canvas&&b.canvas.appendChild(d),c=new B(d,b),c.type="path",y(c,{fill:"none",stroke:"#000",path:a}),c},C.rotate=function(a,b,c){if(this.removed)return this;if(a=e(a).split(l),a.length-1&&(b=f(a[1]),c=f(a[2])),a=f(a[0]),null==c&&(b=c),null==b||null==c){var d=this.getBBox(1);b=d.x+d.width/2,c=d.y+d.height/2}return this.transform(this._.transform.concat([["r",a,b,c]])),this},C.scale=function(a,b,c,d){if(this.removed)return this;if(a=e(a).split(l),a.length-1&&(b=f(a[1]),c=f(a[2]),d=f(a[3])),a=f(a[0]),null==b&&(b=a),null==d&&(c=d),null==c||null==d)var g=this.getBBox(1);return c=null==c?g.x+g.width/2:c,d=null==d?g.y+g.height/2:d,this.transform(this._.transform.concat([["s",a,b,c,d]])),this},C.translate=function(a,b){return this.removed?this:(a=e(a).split(l),a.length-1&&(b=f(a[1])),a=f(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this)},C.transform=function(a){var b,e=this._;return null==a?e.transform:(c._extractTransform(this,a),this.clip&&s(this.clip,{transform:this.matrix.invert()}),this.pattern&&u(this),this.node&&s(this.node,{transform:this.matrix}),(1!=e.sx||1!=e.sy)&&(b=this.attrs[d]("stroke-width")?this.attrs["stroke-width"]:1,this.attr({"stroke-width":b})),this)},C.hide=function(){return this.removed||this.paper.safari(this.node.style.display="none"),this},C.show=function(){return this.removed||this.paper.safari(this.node.style.display=""),this},C.remove=function(){var a,b;if(!this.removed&&this.node.parentNode){a=this.paper,a.__set__&&a.__set__.exclude(this),m.unbind("raphael.*.*."+this.id),this.gradient&&a.defs.removeChild(this.gradient),c._tear(this,a),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(b in this)this[b]="function"==typeof this[b]?c._removedFactory(b):null;this.removed=!0}},C._getBBox=function(){var a,b;"none"==this.node.style.display&&(this.show(),a=!0),b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}return a&&this.hide(),b},C.attr=function(a,b){var e,f,g,h,i,j,k,n,o,p;if(this.removed)return this;if(null==a){e={};for(f in this.attrs)this.attrs[d](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==b&&c.is(a,"string")){if("fill"==a&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==a)return this._.transform;for(g=a.split(l),h={},i=0,j=g.length;j>i;i++)a=g[i],h[a]=a in this.attrs?this.attrs[a]:c.is(this.paper.customAttributes[a],"function")?this.paper.customAttributes[a].def:c._availableAttrs[a];return j-1?h:h[g[0]]}if(null==b&&c.is(a,"array")){for(h={},i=0,j=a.length;j>i;i++)h[a[i]]=this.attr(a[i]);return h}null!=b?(k={},k[a]=b):null!=a&&c.is(a,"object")&&(k=a);for(n in k)m("raphael.attr."+n+"."+this.id,this,k[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[d](n)&&k[d](n)&&c.is(this.paper.customAttributes[n],"function")){o=this.paper.customAttributes[n].apply(this,[].concat(k[n])),this.attrs[n]=k[n];for(p in o)o[d](p)&&(k[p]=o[p])}return y(this,k),this},C.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var a=this.paper;return a.top!=this&&c._tofront(this,a),this},C.toBack=function(){var a,b;return this.removed?this:(a=this.node.parentNode,null===a?this:("a"==a.tagName.toLowerCase()?a.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):a.firstChild!=this.node&&a.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper),b=this.paper,this))},C.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this},C.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;return b.parentNode.insertBefore(this.node,b),c._insertbefore(this,a,this.paper),this},C.blur=function(a){var b,d,e=this;return 0!=+a?(b=s("filter"),d=s("feGaussianBlur"),e.attrs.blur=a,b.id=c.createUUID(),s(d,{stdDeviation:+a||1.5}),b.appendChild(d),e.paper.defs.appendChild(b),e._blur=b,s(e.node,{filter:"url(#"+b.id+")"})):(e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter")),e},c._engine.circle=function(a,b,c,d){var e,f=s("circle");return a.canvas&&a.canvas.appendChild(f),e=new B(f,a),e.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},e.type="circle",s(f,e.attrs),e},c._engine.rect=function(a,b,c,d,e,f){var g,h=s("rect");return a.canvas&&a.canvas.appendChild(h),g=new B(h,a),g.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},g.type="rect",s(h,g.attrs),g},c._engine.ellipse=function(a,b,c,d,e){var f,g=s("ellipse");return a.canvas&&a.canvas.appendChild(g),f=new B(g,a),f.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},f.type="ellipse",s(g,f.attrs),f},c._engine.image=function(a,b,c,d,e,f){var g,h=s("image");return s(h,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),h.setAttributeNS(p,"href",b),a.canvas&&a.canvas.appendChild(h),g=new B(h,a),g.attrs={x:c,y:d,width:e,height:f,src:b},g.type="image",g},c._engine.text=function(a,b,d,e){var f,g=s("text");return a.canvas&&a.canvas.appendChild(g),f=new B(g,a),f.attrs={x:b,y:d,"text-anchor":"middle",text:e,font:c._availableAttrs.font,stroke:"none",fill:"#000"},f.type="text",y(f,f.attrs),f},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a,b,d,e=c._getContainer.apply(0,arguments),f=e&&e.container,g=e.x,h=e.y,i=e.width,j=e.height;if(!f)throw new Error("SVG container not found.");return a=s("svg"),b="overflow:hidden;",g=g||0,h=h||0,i=i||512,j=j||342,s(a,{height:j,version:1.1,width:i,xmlns:"http://www.w3.org/2000/svg"}),1==f?(a.style.cssText=b+"position:absolute;left:"+g+"px;top:"+h+"px",c._g.doc.body.appendChild(a),d=1):(a.style.cssText=b+"position:relative",f.firstChild?f.insertBefore(a,f.firstChild):f.appendChild(a)),f=new c._Paper,f.width=i,f.height=j,f.canvas=a,f.clear(),f._left=f._top=0,d&&(f.renderfix=function(){}),f.renderfix(),f},c._engine.setViewBox=function(a,b,c,d,e){m("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,g,h=i(c/this.width,d/this.height),j=this.top,k=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(h=1),delete this._vbSize,f="0 0 "+this.width+o+this.height):(this._vbSize=h,f=a+o+b+o+c+o+d),s(this.canvas,{viewBox:f,preserveAspectRatio:k});h&&j;)g="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":g}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b,c,d=this.canvas,e=d.style;try{a=d.getScreenCTM()||d.createSVGMatrix()}catch(f){a=d.createSVGMatrix()}b=-a.e%1,c=-a.f%1,(b||c)&&(b&&(this._left=(this._left+b)%1,e.left=this._left+"px"),c&&(this._top=(this._top+c)%1,e.top=this._top+"px"))},c.prototype.clear=function(){c.eve("raphael.clear",this);for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=s("desc")).appendChild(c._g.doc.createTextNode("Created with Raphaël "+c.version)),a.appendChild(this.desc),a.appendChild(this.defs=s("defs"))},c.prototype.remove=function(){m("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null},a=c.st;for(b in C)C[d](b)&&!a[d](b)&&(a[b]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(b))}}(),function(){var a,b,d;if(c.vml){var e="hasOwnProperty",f=String,g=parseFloat,h=Math,i=h.round,j=h.max,k=h.min,l=h.abs,m="fill",n=/[, ]+/,o=c.eve,p=" progid:DXImageTransform.Microsoft",q=" ",r="",s={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},t=/([clmz]),?([^clmz]*)/gi,u=/ progid:\S+Blur\([^\)]+\)/g,v=/-?[^,\s-]+/g,w="position:absolute;left:0;top:0;width:1px;height:1px",x=21600,y={path:1,rect:1,image:1},z={circle:1,ellipse:1},A=function(a){var b,d,e,g,h,j,k,l,m=/[ahqstv]/gi,n=c._pathToAbsolute;if(f(a).match(m)&&(n=c._path2curve),m=/[clmz]/g,n==c._pathToAbsolute&&!f(a).match(m))return f(a).replace(t,function(a,b,c){var d=[],e="m"==b.toLowerCase(),f=s[b];return c.replace(v,function(a){e&&2==d.length&&(f+=d+s["m"==b?"l":"L"],d=[]),d.push(i(a*x))}),f+d});for(d=n(a),b=[],h=0,j=d.length;j>h;h++){for(e=d[h],g=d[h][0].toLowerCase(),"z"==g&&(g="x"),k=1,l=e.length;l>k;k++)g+=i(e[k]*x)+(k!=l-1?",":r);b.push(g)}return b.join(q)},B=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{dx:e.x(b,d),dy:e.y(b,d)}},C=function(a,b,c,d,e,f){var g,h,i=a._,j=a.matrix,k=i.fillpos,n=a.node,o=n.style,p=1,r="",s=x/b,t=x/c;o.visibility="hidden",b&&c&&(n.coordsize=l(s)+q+l(t),o.rotation=f*(0>b*c?-1:1),f&&(g=B(f,d,e),d=g.dx,e=g.dy),0>b&&(r+="x"),0>c&&(r+=" y")&&(p=-1),o.flip=r,n.coordorigin=d*-s+q+e*-t,(k||i.fillsize)&&(h=n.getElementsByTagName(m),h=h&&h[0],n.removeChild(h),k&&(g=B(f,j.x(k[0],k[1]),j.y(k[0],k[1])),h.position=g.dx*p+q+g.dy*p),i.fillsize&&(h.size=i.fillsize[0]*l(b)+q+i.fillsize[1]*l(c)),n.appendChild(h)),o.visibility="visible")};c.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var D=function(a,b,c){for(var d,e=f(b).toLowerCase().split("-"),g=c?"end":"start",h=e.length,i="classic",j="medium",k="medium";h--;)switch(e[h]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":i=e[h];break;case"wide":case"narrow":k=e[h];break;case"long":case"short":j=e[h]}d=a.node.getElementsByTagName("stroke")[0],d[g+"arrow"]=i,d[g+"arrowlength"]=j,d[g+"arrowwidth"]=k},E=function(b,d){var h,l,o,p,s,t,u,v,w,B,E,G,H,I,J,K,L,M,N;b.attrs=b.attrs||{};var O=b.node,P=b.attrs,Q=O.style,R=y[b.type]&&(d.x!=P.x||d.y!=P.y||d.width!=P.width||d.height!=P.height||d.cx!=P.cx||d.cy!=P.cy||d.rx!=P.rx||d.ry!=P.ry||d.r!=P.r),S=z[b.type]&&(P.cx!=d.cx||P.cy!=d.cy||P.r!=d.r||P.rx!=d.rx||P.ry!=d.ry),T=b;for(h in d)d[e](h)&&(P[h]=d[h]);if(R&&(P.path=c._getPath[b.type](b),b._.dirty=1),d.href&&(O.href=d.href),d.title&&(O.title=d.title),d.target&&(O.target=d.target),d.cursor&&(Q.cursor=d.cursor),"blur"in d&&b.blur(d.blur),(d.path&&"path"==b.type||R)&&(O.path=A(~f(P.path).toLowerCase().indexOf("r")?c._pathToAbsolute(P.path):P.path),"image"==b.type&&(b._.fillpos=[P.x,P.y],b._.fillsize=[P.width,P.height],C(b,1,1,0,0,0))),"transform"in d&&b.transform(d.transform),S){var U=+P.cx,V=+P.cy,W=+P.rx||+P.r||0,X=+P.ry||+P.r||0;O.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",i((U-W)*x),i((V-X)*x),i((U+W)*x),i((V+X)*x),i(U*x)),b._.dirty=1}if("clip-rect"in d&&(l=f(d["clip-rect"]).split(n),4==l.length&&(l[2]=+l[2]+ +l[0],l[3]=+l[3]+ +l[1],o=O.clipRect||c._g.doc.createElement("div"),p=o.style,p.clip=c.format("rect({1}px {2}px {3}px {0}px)",l),O.clipRect||(p.position="absolute",p.top=0,p.left=0,p.width=b.paper.width+"px",p.height=b.paper.height+"px",O.parentNode.insertBefore(o,O),o.appendChild(O),O.clipRect=o)),d["clip-rect"]||O.clipRect&&(O.clipRect.style.clip="auto")),b.textpath&&(s=b.textpath.style,d.font&&(s.font=d.font),d["font-family"]&&(s.fontFamily='"'+d["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,r)+'"'),d["font-size"]&&(s.fontSize=d["font-size"]),d["font-weight"]&&(s.fontWeight=d["font-weight"]),d["font-style"]&&(s.fontStyle=d["font-style"])),"arrow-start"in d&&D(T,d["arrow-start"]),"arrow-end"in d&&D(T,d["arrow-end"],1),(null!=d.opacity||null!=d["stroke-width"]||null!=d.fill||null!=d.src||null!=d.stroke||null!=d["stroke-width"]||null!=d["stroke-opacity"]||null!=d["fill-opacity"]||null!=d["stroke-dasharray"]||null!=d["stroke-miterlimit"]||null!=d["stroke-linejoin"]||null!=d["stroke-linecap"])&&(t=O.getElementsByTagName(m),u=!1,t=t&&t[0],t||(u=t=a(m)),"image"==b.type&&d.src&&(t.src=d.src),d.fill&&(t.on=!0),(null==t.on||"none"==d.fill||null===d.fill)&&(t.on=!1),t.on&&d.fill&&(v=f(d.fill).match(c._ISURL),v?(t.parentNode==O&&O.removeChild(t),t.rotate=!0,t.src=v[1],t.type="tile",w=b.getBBox(1),t.position=w.x+q+w.y,b._.fillpos=[w.x,w.y],c._preload(v[1],function(){b._.fillsize=[this.offsetWidth,this.offsetHeight]})):(t.color=c.getRGB(d.fill).hex,t.src=r,t.type="solid",c.getRGB(d.fill).error&&(T.type in{circle:1,ellipse:1}||"r"!=f(d.fill).charAt())&&F(T,d.fill,t)&&(P.fill="none",P.gradient=d.fill,t.rotate=!1))),("fill-opacity"in d||"opacity"in d)&&(B=((+P["fill-opacity"]+1||2)-1)*((+P.opacity+1||2)-1)*((+c.getRGB(d.fill).o+1||2)-1),B=k(j(B,0),1),t.opacity=B,t.src&&(t.color="none")),O.appendChild(t),E=O.getElementsByTagName("stroke")&&O.getElementsByTagName("stroke")[0],G=!1,E||(G=E=a("stroke")),(d.stroke&&"none"!=d.stroke||d["stroke-width"]||null!=d["stroke-opacity"]||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])&&(E.on=!0),("none"==d.stroke||null===d.stroke||null==E.on||0==d.stroke||0==d["stroke-width"])&&(E.on=!1),H=c.getRGB(d.stroke),E.on&&d.stroke&&(E.color=H.hex),B=((+P["stroke-opacity"]+1||2)-1)*((+P.opacity+1||2)-1)*((+H.o+1||2)-1),I=.75*(g(d["stroke-width"])||1),B=k(j(B,0),1),null==d["stroke-width"]&&(I=P["stroke-width"]),d["stroke-width"]&&(E.weight=I),I&&1>I&&(B*=I)&&(E.weight=1),E.opacity=B,d["stroke-linejoin"]&&(E.joinstyle=d["stroke-linejoin"]||"miter"),E.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(E.endcap="butt"==d["stroke-linecap"]?"flat":"square"==d["stroke-linecap"]?"square":"round"),"stroke-dasharray"in d&&(J={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},E.dashstyle=J[e](d["stroke-dasharray"])?J[d["stroke-dasharray"]]:r),G&&O.appendChild(E)),"text"==T.type){T.paper.canvas.style.display=r;var Y=T.paper.span,Z=100,$=P.font&&P.font.match(/\d+(?:\.\d*)?(?=px)/);for((Q=Y.style,P.font&&(Q.font=P.font),P["font-family"]&&(Q.fontFamily=P["font-family"]),P["font-weight"]&&(Q.fontWeight=P["font-weight"]),P["font-style"]&&(Q.fontStyle=P["font-style"]),$=g(P["font-size"]||$&&$[0])||10,Q.fontSize=$*Z+"px",T.textpath.string&&(Y.innerHTML=f(T.textpath.string).replace(/")),K=Y.getBoundingClientRect(),T.W=P.w=(K.right-K.left)/Z,T.H=P.h=(K.bottom-K.top)/Z,T.X=P.x,T.Y=P.y+T.H/2,("x"in d||"y"in d)&&(T.path.v=c.format("m{0},{1}l{2},{1}",i(P.x*x),i(P.y*x),i(P.x*x)+1)),L=["x","y","text","font","font-family","font-weight","font-style","font-size"],M=0,N=L.length);N>M;M++)if(L[M]in d){T._.dirty=1;break}switch(P["text-anchor"]){case"start":T.textpath.style["v-text-align"]="left",T.bbx=T.W/2;break;case"end":T.textpath.style["v-text-align"]="right",T.bbx=-T.W/2;break;default:T.textpath.style["v-text-align"]="center",T.bbx=0}T.textpath.style["v-text-kern"]=!0}},F=function(a,b,d){var e,i,j,k,l;a.attrs=a.attrs||{};var m=(a.attrs,Math.pow),n="linear",o=".5 .5";if(a.attrs.gradient=b,b=f(b).replace(c._radial_gradient,function(a,b,c){return n="radial",b&&c&&(b=g(b),c=g(c),m(b-.5,2)+m(c-.5,2)>.25&&(c=h.sqrt(.25-m(b-.5,2))*(2*(c>.5)-1)+.5),o=b+q+c),r}),b=b.split(/\s*\-\s*/),"linear"==n&&(e=b.shift(),e=-g(e),isNaN(e))||(i=c._parseDots(b),!i))return null;if(a=a.shape||a.node,i.length){for(a.removeChild(d),d.on=!0,d.method="none",d.color=i[0].color,d.color2=i[i.length-1].color,j=[],k=0,l=i.length;l>k;k++)i[k].offset&&j.push(i[k].offset+q+i[k].color);d.colors=j.length?j.join():"0% "+d.color,"radial"==n?(d.type="gradientTitle",d.focus="100%",d.focussize="0 0",d.focusposition=o,d.angle=0):(d.type="gradient",d.angle=(270-e)%360),a.appendChild(d)}return 1},G=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=c.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},b.bottom||(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},H=c.el;G.prototype=H,H.constructor=G,H.transform=function(a){var b,d,e;if(null==a)return this._.transform;b=this.paper._viewBoxShift,d=b?"s"+[b.scale,b.scale]+"-1-1t"+[b.dx,b.dy]:r,b&&(e=a=f(a).replace(/\.{3}|\u2026/g,this._.transform||r)),c._extractTransform(this,d+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~f(this.attrs.fill).indexOf("-"),l=!f(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),n=this.getBBox(1),o=m.x-n.x,p=m.y-n.y;j.coordorigin=o*-x+q+p*-x,C(this,1,1,o,p,0)}else j.style.filter=r,C(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=r,i.matrix=f(h),i.offset=h.offset();return e&&(this._.transform=e),this},H.rotate=function(a,b,c){if(this.removed)return this;if(null!=a){if(a=f(a).split(n),a.length-1&&(b=g(a[1]),c=g(a[2])),a=g(a[0]),null==c&&(b=c),null==b||null==c){var d=this.getBBox(1);b=d.x+d.width/2,c=d.y+d.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,c]])),this}},H.translate=function(a,b){return this.removed?this:(a=f(a).split(n),a.length-1&&(b=g(a[1])),a=g(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this)},H.scale=function(a,b,c,d){if(this.removed)return this;if(a=f(a).split(n),a.length-1&&(b=g(a[1]),c=g(a[2]),d=g(a[3]),isNaN(c)&&(c=null),isNaN(d)&&(d=null)),a=g(a[0]),null==b&&(b=a),null==d&&(c=d),null==c||null==d)var e=this.getBBox(1);return c=null==c?e.x+e.width/2:c,d=null==d?e.y+e.height/2:d,this.transform(this._.transform.concat([["s",a,b,c,d]])),this._.dirtyT=1,this},H.hide=function(){return this.removed||(this.node.style.display="none"),this},H.show=function(){return this.removed||(this.node.style.display=r),this},H._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},H.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),c.eve.unbind("raphael.*.*."+this.id),c._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0}},H.attr=function(a,b){var d,f,g,h,i,j,k,l,p,q;if(this.removed)return this;if(null==a){d={};for(f in this.attrs)this.attrs[e](f)&&(d[f]=this.attrs[f]);return d.gradient&&"none"==d.fill&&(d.fill=d.gradient)&&delete d.gradient,d.transform=this._.transform,d}if(null==b&&c.is(a,"string")){if(a==m&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(g=a.split(n),h={},i=0,j=g.length;j>i;i++)a=g[i],h[a]=a in this.attrs?this.attrs[a]:c.is(this.paper.customAttributes[a],"function")?this.paper.customAttributes[a].def:c._availableAttrs[a];return j-1?h:h[g[0]]}if(this.attrs&&null==b&&c.is(a,"array")){for(h={},i=0,j=a.length;j>i;i++)h[a[i]]=this.attr(a[i]);return h}null!=b&&(k={},k[a]=b),null==b&&c.is(a,"object")&&(k=a);for(l in k)o("raphael.attr."+l+"."+this.id,this,k[l]);if(k){for(l in this.paper.customAttributes)if(this.paper.customAttributes[e](l)&&k[e](l)&&c.is(this.paper.customAttributes[l],"function")){p=this.paper.customAttributes[l].apply(this,[].concat(k[l])),this.attrs[l]=k[l];for(q in p)p[e](q)&&(k[q]=p[q])}k.text&&"text"==this.type&&(this.textpath.string=k.text),E(this,k)}return this},H.toFront=function(){return this.removed||this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&c._tofront(this,this.paper),this},H.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper)),this)},H.insertAfter=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this)},H.insertBefore=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),c._insertbefore(this,a,this.paper),this)},H.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(u,r),0!=+a?(this.attrs.blur=a,b.filter=d+q+p+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",i(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this},c._engine.path=function(b,c){var d,e,f,g=a("shape");return g.style.cssText=w,g.coordsize=x+q+x,g.coordorigin=c.coordorigin,d=new G(g,c),e={fill:"none",stroke:"#000"},b&&(e.path=b),d.type="path",d.path=[],d.Path=r,E(d,e),c.canvas.appendChild(g),f=a("skew"),f.on=!0,g.appendChild(f),d.skew=f,d.transform(r),d},c._engine.rect=function(a,b,d,e,f,g){var h=c._rectPath(b,d,e,f,g),i=a.path(h),j=i.attrs;return i.X=j.x=b,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},c._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",E(f,{cx:b,cy:c,rx:d,ry:e}),f},c._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",E(e,{cx:b,cy:c,r:d}),e},c._engine.image=function(a,b,d,e,f,g){var h=c._rectPath(d,e,f,g),i=a.path(h).attr({stroke:"none"}),j=i.attrs,k=i.node,l=k.getElementsByTagName(m)[0];return j.src=b,i.X=j.x=d,i.Y=j.y=e,i.W=j.width=f,i.H=j.height=g,j.path=h,i.type="image",l.parentNode==k&&k.removeChild(l),l.rotate=!0,l.src=b,l.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],k.appendChild(l),C(i,1,1,0,0,0),i},c._engine.text=function(b,d,e,g){var h,j,k,l=a("shape"),m=a("path"),n=a("textpath");return d=d||0,e=e||0,g=g||"",m.v=c.format("m{0},{1}l{2},{1}",i(d*x),i(e*x),i(d*x)+1),m.textpathok=!0,n.string=f(g),n.on=!0,l.style.cssText=w,l.coordsize=x+q+x,l.coordorigin="0 0",h=new G(l,b),j={fill:"#000",stroke:"none",font:c._availableAttrs.font,text:g},h.shape=l,h.path=m,h.textpath=n,h.type="text",h.attrs.text=f(g),h.attrs.x=d,h.attrs.y=e,h.attrs.w=1,h.attrs.h=1,E(h,j),l.appendChild(n),l.appendChild(m),b.canvas.appendChild(l),k=a("skew"),k.on=!0,l.appendChild(k),h.skew=k,h.transform(r),h},c._engine.setSize=function(a,b){var d=this.canvas.style;return this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),d.width=a,d.height=b,d.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox),this},c._engine.setViewBox=function(a,b,d,e,f){c.eve("raphael.setViewBox",this,this._viewBox,[a,b,d,e,f]);var g,h,i=this.width,k=this.height,l=1/j(d/i,e/k);return f&&(g=k/e,h=i/d,i>d*g&&(a-=(i-d*g)/2/g),k>e*h&&(b-=(k-e*h)/2/h)),this._viewBox=[a,b,d,e,!!f],this._viewBoxShift={dx:-a,dy:-b,scale:l},this.forEach(function(a){a.transform("...")}),this},c._engine.initWin=function(b){var c=b.document;c.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{c.namespaces.rvml||c.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),a=function(a){return c.createElement("')}}catch(d){a=function(a){return c.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},c._engine.initWin(c._g.win),c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,d=a.height,e=a.width,f=a.x,g=a.y;if(!b)throw new Error("VML container not found.");var h=new c._Paper,i=h.canvas=c._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*x+q+1e3*x,h.coordorigin="0 0",h.span=c._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==b?(c._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i),h.renderfix=function(){},h},c.prototype.clear=function(){c.eve("raphael.clear",this),this.canvas.innerHTML=r,this.span=c._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},c.prototype.remove=function(){c.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0},b=c.st;for(d in H)H[e](d)&&!b[e](d)&&(b[d]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(d))}}(),O.was?N.win.Raphael=c:Raphael=c,c});var icon={"?":"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z",i:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M14.757,8h2.42v2.574h-2.42V8z M18.762,23.622H16.1c-1.034,0-1.475-0.44-1.475-1.496v-6.865c0-0.33-0.176-0.484-0.484-0.484h-0.88V12.4h2.662c1.035,0,1.474,0.462,1.474,1.496v6.887c0,0.309,0.176,0.484,0.484,0.484h0.88V23.622z",$:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.255,23.88v2.047h-1.958v-2.024c-3.213-0.44-4.621-3.08-4.621-3.08l2.002-1.673c0,0,1.276,2.223,3.586,2.223c1.276,0,2.244-0.683,2.244-1.849c0-2.729-7.349-2.398-7.349-7.459c0-2.2,1.738-3.785,4.137-4.159V5.859h1.958v2.046c1.672,0.22,3.652,1.1,3.652,2.993v1.452h-2.596v-0.704c0-0.726-0.925-1.21-1.959-1.21c-1.32,0-2.288,0.66-2.288,1.584c0,2.794,7.349,2.112,7.349,7.415C21.413,21.614,19.785,23.506,17.255,23.88z",arrowleftalt:"M16,30.534c8.027,0,14.534-6.507,14.534-14.534c0-8.027-6.507-14.534-14.534-14.534C7.973,1.466,1.466,7.973,1.466,16C1.466,24.027,7.973,30.534,16,30.534zM18.335,6.276l3.536,3.538l-6.187,6.187l6.187,6.187l-3.536,3.537l-9.723-9.724L18.335,6.276z",arrowalt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM13.665,25.725l-3.536-3.539l6.187-6.187l-6.187-6.187l3.536-3.536l9.724,9.723L13.665,25.725z","!":"M26.711,14.086L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.864,26.711,14.086zM14.702,8.981c0.22-0.238,0.501-0.357,0.844-0.357s0.624,0.118,0.844,0.353c0.221,0.235,0.33,0.531,0.33,0.885c0,0.306-0.101,1.333-0.303,3.082c-0.201,1.749-0.379,3.439-0.531,5.072H15.17c-0.135-1.633-0.301-3.323-0.5-5.072c-0.198-1.749-0.298-2.776-0.298-3.082C14.372,9.513,14.482,9.22,14.702,8.981zM16.431,21.799c-0.247,0.241-0.542,0.362-0.885,0.362s-0.638-0.121-0.885-0.362c-0.248-0.241-0.372-0.533-0.372-0.876s0.124-0.638,0.372-0.885c0.247-0.248,0.542-0.372,0.885-0.372s0.638,0.124,0.885,0.372c0.248,0.247,0.372,0.542,0.372,0.885S16.679,21.558,16.431,21.799z","?2":"M26.711,14.086L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.864,26.711,14.086zM16.431,21.799c-0.248,0.241-0.543,0.362-0.885,0.362c-0.343,0-0.638-0.121-0.886-0.362c-0.247-0.241-0.371-0.533-0.371-0.876s0.124-0.638,0.371-0.885c0.248-0.248,0.543-0.372,0.886-0.372c0.342,0,0.637,0.124,0.885,0.372c0.248,0.247,0.371,0.542,0.371,0.885S16.679,21.558,16.431,21.799zM18.911,15.198c-0.721,0.716-1.712,1.147-2.972,1.294v2.027h-0.844v-3.476c0.386-0.03,0.768-0.093,1.146-0.188c0.38-0.095,0.719-0.25,1.019-0.464c0.312-0.227,0.555-0.5,0.729-0.822c0.174-0.322,0.261-0.77,0.261-1.346c0-0.918-0.194-1.623-0.582-2.113c-0.389-0.49-0.956-0.735-1.701-0.735c-0.281,0-0.527,0.042-0.738,0.124s-0.366,0.16-0.464,0.234c0.031,0.146,0.072,0.357,0.124,0.633c0.052,0.275,0.078,0.486,0.078,0.633c0,0.226-0.098,0.433-0.294,0.619c-0.195,0.187-0.479,0.28-0.853,0.28c-0.33,0-0.565-0.113-0.706-0.339s-0.211-0.489-0.211-0.789c0-0.244,0.067-0.484,0.201-0.72c0.135-0.235,0.346-0.463,0.633-0.684c0.245-0.195,0.577-0.364,0.995-0.504c0.419-0.141,0.854-0.211,1.308-0.211c0.647,0,1.223,0.103,1.724,0.308c0.502,0.205,0.914,0.479,1.238,0.822c0.337,0.355,0.586,0.755,0.748,1.198c0.162,0.444,0.243,0.926,0.243,1.446C19.994,13.558,19.633,14.482,18.911,15.198z",stopsign:"M20.833,2.625H10.167l-7.542,7.542v10.666l7.542,7.542h10.666l7.542-7.542V10.167L20.833,2.625zM23.76,17.145c-0.461,0.432-0.496-0.021-1.151,0.385c-0.655,0.404-1.067,0.844-1.067,0.844l-0.578,0.564c0,0-1.199,1.422-1.59,1.717c-0.392,0.291-0.572,0.166-0.572,0.166c-0.133,0.23-0.641,0.656-1.193,1.025c-0.549,0.371-0.99,1.354-0.99,1.354l-0.208,1.465c0,0-1.597,0.021-3.096-0.293c-1.499-0.314-2.699-0.982-2.699-0.982l0.655-1.451c0,0-0.58-2.225-0.636-3.926c-0.056-1.703,0.572-2.958,0.481-3.37c-0.09-0.412-0.438-1.109-0.523-1.569c-0.083-0.46-0.307-2.036-0.327-2.238c-0.021-0.202-0.28-2.232,0.614-2.204c0.891,0.027,0.648,1.388,0.725,2.246c0.077,0.857,1.13,3.249,1.297,3.123c0.167-0.125-0.056-2.398,0.006-2.838c0.063-0.439,0.182-2.315,0.293-2.747c0.112-0.433,0.105-1.778,0.935-1.66c0.83,0.118,0.606,1.332,0.488,1.813c-0.118,0.48,0.021,1.597,0.07,2.302c0.048,0.704,0.112,2.356,0.112,2.356l0.404-0.042c0,0,0.913-5,0.976-5.439c0.062-0.439,0.182-1.618,0.858-1.472c1.117,0.242,0.516,1.967,0.516,1.967l-0.486,5.509c0,0,0.166,0.224,0.492,0.021c0.33-0.202,1.312-3.25,1.459-3.927c0.146-0.676,0.084-2.678,1.145-2.428c1.059,0.252,0.453,2.755,0.124,4.353c-0.327,1.597-1.03,3.39-1.03,3.39l-0.433,1.631l0.376,0.852l0.412-0.092l0.898-0.717c0,0,0,0,0.614-0.461c0.613-0.46,1.764-0.495,2.044-0.355C23.453,16.154,24.221,16.713,23.76,17.145z",temp:"M17.5,19.508V8.626h-3.999v10.881c-1.404,0.727-2.375,2.178-2.375,3.869c0,2.416,1.959,4.375,4.375,4.375s4.375-1.959,4.375-4.375C19.876,21.686,18.905,20.234,17.5,19.508zM20.5,5.249c0-2.757-2.244-5-5.001-5s-4.998,2.244-4.998,5v12.726c-1.497,1.373-2.376,3.314-2.376,5.4c0,4.066,3.31,7.377,7.376,7.377s7.374-3.311,7.374-7.377c0-2.086-0.878-4.029-2.375-5.402V5.249zM20.875,23.377c0,2.963-2.41,5.373-5.375,5.373c-2.962,0-5.373-2.41-5.373-5.373c0-1.795,0.896-3.443,2.376-4.438V5.251c0-1.654,1.343-3,2.997-3s3,1.345,3,3v13.688C19.979,19.934,20.875,21.582,20.875,23.377zM22.084,8.626l4.5,2.598V6.029L22.084,8.626z",thunder:"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z", -snow:"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z",hail:"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z",rain:"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.874c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979zM9.029,26.682c0-1.115,0.021-5.425,0.021-5.432c0.002-0.409-0.247-0.779-0.628-0.932c-0.38-0.152-0.815-0.059-1.099,0.24c-0.006,0.008-1.037,1.098-2.081,2.342c-0.523,0.627-1.048,1.287-1.463,1.896c-0.399,0.648-0.753,1.066-0.811,1.885C2.971,28.355,4.324,29.711,6,29.714C7.672,29.71,9.029,28.354,9.029,26.682zM4.971,26.727c0.091-0.349,1.081-1.719,1.993-2.764c0.025-0.029,0.051-0.061,0.076-0.089c-0.005,1.124-0.01,2.294-0.01,2.808c0,0.567-0.461,1.028-1.029,1.03C5.447,27.71,4.997,27.273,4.971,26.727zM16.425,26.682c0-1.115,0.021-5.424,0.021-5.43c0.002-0.41-0.247-0.779-0.628-0.934c-0.381-0.152-0.814-0.058-1.1,0.242c-0.006,0.008-1.035,1.094-2.08,2.342c-0.522,0.623-1.047,1.285-1.463,1.894c-0.399,0.649-0.753,1.068-0.809,1.888c0,1.672,1.354,3.028,3.029,3.028C15.068,29.711,16.425,28.354,16.425,26.682zM12.365,26.729c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.03,0.05-0.06,0.075-0.089c-0.005,1.123-0.011,2.294-0.011,2.807c-0.002,0.568-0.461,1.027-1.028,1.029C12.84,27.709,12.392,27.273,12.365,26.729zM23.271,20.317c-0.38-0.153-0.816-0.06-1.099,0.24c-0.009,0.008-1.037,1.097-2.08,2.342c-0.523,0.625-1.049,1.285-1.462,1.896c-0.402,0.649-0.754,1.067-0.812,1.886c0,1.672,1.354,3.029,3.03,3.029c1.673,0,3.027-1.357,3.027-3.029c0-1.115,0.022-5.425,0.022-5.431C23.9,20.84,23.651,20.47,23.271,20.317zM21.879,26.681c-0.004,0.568-0.463,1.027-1.031,1.029c-0.553-0.002-1.002-0.438-1.028-0.982c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.028,0.05-0.059,0.074-0.088C21.883,24.998,21.879,26.167,21.879,26.681z",cloudy:"M14.378,6.781c0.41,0.988,1.938,0.346,1.524-0.648C15.708,5.667,15.515,5.2,15.32,4.734c-0.289-0.695-0.875-3.233-2.042-2.747c-1.03,0.433-0.128,1.846,0.142,2.494C13.739,5.248,14.059,6.015,14.378,6.781M20.8,7.223c1.094,0.453,1.538-1.551,1.813-2.216c0.281-0.677,1.478-2.565,0.357-3.029c-1.092-0.453-1.537,1.548-1.813,2.216C20.876,4.872,19.68,6.757,20.8,7.223M18.137,6.692c1.183,0,0.829-2.019,0.829-2.742c0-0.732,0.383-2.935-0.829-2.935c-1.183,0-0.828,2.019-0.828,2.742C17.309,4.49,16.926,6.692,18.137,6.692M23.058,8.729c0.852,0.85,2.142-0.972,2.659-1.49c0.512-0.513,2.187-1.687,1.352-2.524c-0.834-0.836-2.013,0.843-2.522,1.353C24.028,6.585,22.198,7.874,23.058,8.729M24.565,10.986c0.448,1.091,2.183-0.01,2.849-0.286c0.676-0.28,2.858-0.771,2.394-1.89c-0.455-1.091-2.181,0.008-2.849,0.285C26.281,9.377,24.102,9.866,24.565,10.986M12.036,8.742c0.752,0.75,1.932-0.415,1.17-1.173c-0.253-0.347-0.646-0.645-0.949-0.946c-0.541-0.539-2.162-2.799-3.068-1.889c-0.79,0.791,0.586,1.755,1.083,2.25C10.859,7.57,11.447,8.156,12.036,8.742M29.365,17.397c-0.768-0.317-1.534-0.635-2.302-0.952c-0.646-0.268-2.07-1.169-2.495-0.135c-0.481,1.168,2.054,1.747,2.751,2.035c0.455,0.188,0.911,0.377,1.367,0.565C29.7,19.331,30.379,17.816,29.365,17.397M29.942,12.817c-0.83,0-1.66,0-2.49,0c-0.701,0-2.357-0.288-2.355,0.83c0,1.262,2.567,0.827,3.319,0.827c0.493,0,0.986,0,1.479-0.001C30.99,14.473,31.043,12.815,29.942,12.817M24.234,18.568c-0.673-0.673-1.773,0.189-1.281,1.007c-0.295-0.264-0.614-0.499-0.961-0.69c3.894-2.866,3.328-9.006-1.021-11.107c-2.024-0.978-4.481-0.828-6.368,0.394c-0.871,0.564-1.603,1.336-2.119,2.236c-0.262,0.456-0.468,0.943-0.612,1.449c-0.074,0.258-0.131,0.521-0.172,0.786c-0.083,0.534-0.109,0.553-0.553,0.871c-0.182-0.957-1.64-0.675-2.326-0.674c-0.815,0.001-1.963-0.217-2.752,0.046c-0.867,0.289-0.652,1.615,0.263,1.613c0.324,0.052,0.701-0.001,1.028-0.001c0.904-0.001,1.809-0.002,2.713-0.003c-0.308,0.352-0.496,0.969-0.94,0.77c-0.467-0.209-0.978-0.319-1.49-0.319c-0.951,0-1.877,0.375-2.561,1.036c-0.681,0.658-1.088,1.569-1.123,2.516c-0.944,0.31-1.791,0.891-2.421,1.658c-2.756,3.354-0.265,8.554,4.058,8.554v-0.002c3.597,0,7.194,0,10.792,0c1.341,0,2.843,0.167,4.168-0.113c3.652-0.772,5.361-5.21,3.133-8.229c0.548,0.547,1.096,1.094,1.644,1.641c0.183,0.183,0.364,0.424,0.575,0.574c0.552,0.552,1.524,0.066,1.403-0.713c-0.097-0.622-1.042-1.267-1.448-1.673C25.319,19.652,24.776,19.11,24.234,18.568M18.137,8.787c4.559,0.009,6.576,5.979,2.912,8.734c-0.637-3.505-4.161-5.824-7.629-5.03C13.943,10.367,15.852,8.792,18.137,8.787M22.895,24.08c-0.633,3.346-4.149,2.879-6.68,2.879c-3.017,0-6.033,0-9.049,0c-0.767,0-1.62,0.084-2.373-0.095c-2.274-0.538-3.416-3.242-2.172-5.235c0.678-1.087,1.568-1.19,2.626-1.67c0.604-0.273,0.456-0.807,0.456-1.331c0.002-0.597,0.284-1.169,0.756-1.533c0.787-0.608,1.943-0.497,2.611,0.234c1.098,1.205,1.96-1.346,2.507-1.893c2.025-2.025,5.475-1.708,7.068,0.684c0.344,0.516,0.581,1.102,0.693,1.712c0.097,0.529-0.115,1.341,0.188,1.796c0.291,0.47,0.943,0.463,1.397,0.68c0.508,0.23,0.963,0.591,1.304,1.034C22.834,22.125,23.064,23.107,22.895,24.08M6.906,9.917c0.881,0.364,1.763,0.727,2.644,1.091c0.353,0.146,0.707,0.292,1.06,0.437c0.997,0.412,1.637-1.119,0.642-1.526C10.47,9.441,9.456,9.177,8.609,8.828c-0.354-0.146-0.707-0.292-1.06-0.437C6.554,7.98,5.912,9.505,6.906,9.917",sun:"M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z",undo:"M12.981,9.073V6.817l-12.106,6.99l12.106,6.99v-2.422c3.285-0.002,9.052,0.28,9.052,2.269c0,2.78-6.023,4.263-6.023,4.263v2.132c0,0,13.53,0.463,13.53-9.823C29.54,9.134,17.952,8.831,12.981,9.073z",detour:"M29.342,15.5l-7.556-4.363v2.614H18.75c-1.441-0.004-2.423,1.002-2.875,1.784c-0.735,1.222-1.056,2.561-1.441,3.522c-0.135,0.361-0.278,0.655-0.376,0.817c-1.626,0-0.998,0-2.768,0c-0.213-0.398-0.571-1.557-0.923-2.692c-0.237-0.676-0.5-1.381-1.013-2.071C8.878,14.43,7.89,13.726,6.75,13.75H2.812v3.499c0,0,0.358,0,1.031,0h2.741c0.008,0.013,0.018,0.028,0.029,0.046c0.291,0.401,0.634,1.663,1.031,2.888c0.218,0.623,0.455,1.262,0.92,1.897c0.417,0.614,1.319,1.293,2.383,1.293H11c2.25,0,1.249,0,3.374,0c0.696,0.01,1.371-0.286,1.809-0.657c1.439-1.338,1.608-2.886,2.13-4.127c0.218-0.608,0.453-1.115,0.605-1.314c0.006-0.01,0.012-0.018,0.018-0.025h2.85v2.614L29.342,15.5zM10.173,14.539c0.568,0.76,0.874,1.559,1.137,2.311c0.04,0.128,0.082,0.264,0.125,0.399h2.58c0.246-0.697,0.553-1.479,1.005-2.228c0.252-0.438,0.621-0.887,1.08-1.272H9.43C9.735,14.003,9.99,14.277,10.173,14.539z",merge:"M29.342,15.5l-7.556-4.363v2.613h-1.411c-0.788-0.01-1.331-0.241-2.019-0.743c-1.021-0.745-2.094-2.181-3.551-3.568C13.367,8.06,11.291,6.73,8.5,6.749H2.812v3.5H8.5c2.231,0.012,3.441,1.185,5.07,2.934c0.697,0.753,1.428,1.58,2.324,2.323c-1.396,1.165-2.412,2.516-3.484,3.501c-1.183,1.081-2.202,1.723-3.912,1.741H2.813v3.5h5.716c3.752,0.001,6.035-2.319,7.619-4.066c0.817-0.895,1.537-1.691,2.209-2.191c0.686-0.502,1.23-0.732,2.017-0.742h1.412v2.614L29.342,15.5z",split:"M21.786,20.698c-1.792-0.237-2.912-1.331-4.358-2.886c-0.697-0.751-1.428-1.577-2.324-2.319c1.396-1.165,2.411-2.519,3.483-3.503c1.01-0.92,1.901-1.519,3.199-1.688v2.574l7.556-4.363L21.786,4.15v2.652c-3.34,0.266-5.45,2.378-6.934,4.013c-0.819,0.896-1.537,1.692-2.212,2.192c-0.685,0.501-1.227,0.731-2.013,0.742c-0.001,0-0.002,0-0.003,0H2.812v3.5h0.001v0.001c0,0,0.046-0.001,0.136-0.001h7.677c0.786,0.011,1.33,0.241,2.017,0.743c1.021,0.743,2.095,2.181,3.552,3.568c1.312,1.258,3.162,2.46,5.592,2.649v2.664l7.556-4.36l-7.556-4.361V20.698z",fork:"M13.741,10.249h8.045v2.627l7.556-4.363l-7.556-4.363v2.598H9.826C11.369,7.612,12.616,8.922,13.741,10.249zM21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-1.79-1.756-3.712-4.675-5.731-7.227c-2.049-2.486-4.159-4.972-7.451-5.091h-3.5v3.5h3.5c0.656-0.027,1.683,0.486,2.879,1.683c1.788,1.753,3.712,4.674,5.731,7.226c1.921,2.331,3.907,4.639,6.863,5.016v2.702l7.556-4.362l-7.556-4.362V20.654z",fork_alt:"M21.786,12.873l7.556-4.361l-7.556-4.362v2.701c-2.929,0.374-4.905,2.64-6.809,4.952c0.545,0.703,1.08,1.418,1.604,2.127c0.192,0.26,0.383,0.514,0.573,0.77c0.802-1.043,1.584-1.999,2.341-2.74c0.884-0.885,1.673-1.393,2.291-1.588V12.873zM17.661,17.006c-1.893-2.371-3.815-5.354-6.009-7.537c-1.461-1.428-3.155-2.664-5.34-2.693h-3.5v3.5h3.5c0.971-0.119,2.845,1.333,4.712,3.771c1.895,2.371,3.815,5.354,6.011,7.537c1.326,1.297,2.847,2.426,4.751,2.645v2.646l7.556-4.363l-7.556-4.362v2.535C20.746,20.346,19.205,19.022,17.661,17.006z",exchange:"M21.786,12.876l7.556-4.363l-7.556-4.363v2.598H2.813v3.5h18.973V12.876zM10.368,18.124l-7.556,4.362l7.556,4.362V24.25h18.974v-3.501H10.368V18.124z",shuffle:"M21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-0.757-0.742-1.539-1.698-2.34-2.741c-0.191,0.256-0.382,0.51-0.574,0.77c-0.524,0.709-1.059,1.424-1.604,2.127c1.904,2.31,3.88,4.578,6.809,4.952v2.701l7.556-4.362l-7.556-4.362V20.654zM9.192,11.933c0.756,0.741,1.538,1.697,2.339,2.739c0.195-0.262,0.39-0.521,0.587-0.788c0.52-0.703,1.051-1.412,1.592-2.11c-2.032-2.463-4.133-4.907-7.396-5.025h-3.5v3.5h3.5C6.969,10.223,7.996,10.735,9.192,11.933zM21.786,10.341v2.535l7.556-4.363l-7.556-4.363v2.647c-1.904,0.219-3.425,1.348-4.751,2.644c-2.196,2.183-4.116,5.167-6.011,7.538c-1.867,2.438-3.741,3.888-4.712,3.771h-3.5v3.5h3.5c2.185-0.029,3.879-1.266,5.34-2.693c2.194-2.184,4.116-5.167,6.009-7.538C19.205,12.003,20.746,10.679,21.786,10.341z",refresh:"M24.083,15.5c-0.009,4.739-3.844,8.574-8.583,8.583c-4.741-0.009-8.577-3.844-8.585-8.583c0.008-4.741,3.844-8.577,8.585-8.585c1.913,0,3.665,0.629,5.09,1.686l-1.782,1.783l8.429,2.256l-2.26-8.427l-1.89,1.89c-2.072-1.677-4.717-2.688-7.587-2.688C8.826,3.418,3.418,8.826,3.416,15.5C3.418,22.175,8.826,27.583,15.5,27.583S27.583,22.175,27.583,15.5H24.083z",ccw:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z",acw:"M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z",contract:"M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z",expand:"M25.545,23.328,17.918,15.623,25.534,8.007,27.391,9.864,29.649,1.436,21.222,3.694,23.058,5.53,15.455,13.134,7.942,5.543,9.809,3.696,1.393,1.394,3.608,9.833,5.456,8.005,12.98,15.608,5.465,23.123,3.609,21.268,1.351,29.695,9.779,27.438,7.941,25.6,15.443,18.098,23.057,25.791,21.19,27.638,29.606,29.939,27.393,21.5z",stop:"M5.5,5.5h20v20h-20z",end:"M21.167,5.5,21.167,13.681,6.684,5.318,6.684,25.682,21.167,17.318,21.167,25.5,25.5,25.5,25.5,5.5z",start:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z",ff:"M25.5,15.5,15.2,9.552,15.2,15.153,5.5,9.552,5.5,21.447,15.2,15.847,15.2,21.447z",rw:"M5.5,15.499,15.8,21.447,15.8,15.846,25.5,21.447,25.5,9.552,15.8,15.152,15.8,9.552z",play:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z",arrowright:"M11.166,23.963L22.359,17.5c1.43-0.824,1.43-2.175,0-3L11.166,8.037c-1.429-0.826-2.598-0.15-2.598,1.5v12.926C8.568,24.113,9.737,24.789,11.166,23.963z",arrowleft:"M20.834,8.037L9.641,14.5c-1.43,0.824-1.43,2.175,0,3l11.193,6.463c1.429,0.826,2.598,0.15,2.598-1.5V9.537C23.432,7.887,22.263,7.211,20.834,8.037z",arrowup:"M23.963,20.834L17.5,9.64c-0.825-1.429-2.175-1.429-3,0L8.037,20.834c-0.825,1.429-0.15,2.598,1.5,2.598h12.926C24.113,23.432,24.788,22.263,23.963,20.834z",arrowdown:"M8.037,11.166L14.5,22.359c0.825,1.43,2.175,1.43,3,0l6.463-11.194c0.826-1.429,0.15-2.598-1.5-2.598H9.537C7.886,8.568,7.211,9.737,8.037,11.166z",arrowleft2:"M21.871,9.814 15.684,16.001 21.871,22.188 18.335,25.725 8.612,16.001 18.335,6.276z",arrowright2:"M10.129,22.186 16.316,15.999 10.129,9.812 13.665,6.276 23.389,15.999 13.665,25.725z",smile2:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,29.534C8.539,29.534,2.466,23.462,2.466,16C2.466,8.539,8.539,2.466,16,2.466c7.462,0,13.535,6.072,13.535,13.533C29.534,23.462,23.462,29.534,16,29.534zM11.104,14c0.932,0,1.688-1.483,1.688-3.312s-0.755-3.312-1.688-3.312s-1.688,1.483-1.688,3.312S10.172,14,11.104,14zM20.729,14c0.934,0,1.688-1.483,1.688-3.312s-0.756-3.312-1.688-3.312c-0.932,0-1.688,1.483-1.688,3.312S19.798,14,20.729,14zM8.143,21.189C10.458,24.243,13.148,26,16.021,26c2.969,0,5.745-1.868,8.11-5.109c-2.515,1.754-5.292,2.734-8.215,2.734C13.164,23.625,10.54,22.756,8.143,21.189z",smile:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM20.729,7.375c0.934,0,1.688,1.483,1.688,3.312S21.661,14,20.729,14c-0.932,0-1.688-1.483-1.688-3.312S19.798,7.375,20.729,7.375zM11.104,7.375c0.932,0,1.688,1.483,1.688,3.312S12.037,14,11.104,14s-1.688-1.483-1.688-3.312S10.172,7.375,11.104,7.375zM16.021,26c-2.873,0-5.563-1.757-7.879-4.811c2.397,1.564,5.021,2.436,7.774,2.436c2.923,0,5.701-0.98,8.215-2.734C21.766,24.132,18.99,26,16.021,26z",alarm:"M8.179,20.115c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366c0.479-0.275,0.643-0.888,0.367-1.367C9.27,20.004,8.658,19.84,8.179,20.115zM9.18,12.239c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,13.126,9.657,12.516,9.18,12.239zM8.625,17.043c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,18.043,8.624,17.596,8.625,17.043zM16.312,3.957V3.031h1c0.275,0,0.5-0.225,0.5-0.5v-0.5c0-0.275-0.225-0.5-0.5-0.5h-3.625c-0.275,0-0.5,0.225-0.5,0.5v0.5c0,0.275,0.225,0.5,0.5,0.5h1v0.926C7.819,4.381,2.376,10.068,2.374,17.042C2.376,24.291,8.251,30.166,15.5,30.169c7.249-0.003,13.124-5.878,13.125-13.127C28.624,10.067,23.181,4.38,16.312,3.957zM15.5,27.166C9.909,27.157,5.385,22.633,5.375,17.042C5.385,11.451,9.909,6.927,15.5,6.917c5.59,0.01,10.115,4.535,10.124,10.125C25.615,22.633,21.091,27.157,15.5,27.166zM12.062,22.998c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,23.887,12.54,23.275,12.062,22.998zM12.062,11.088c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,11.2,11.584,11.364,12.062,11.088zM22.822,13.971c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,14.083,22.344,14.247,22.822,13.971zM15.501,23.92c-0.552,0-1,0.447-1,1c0,0.552,0.448,1,1,1s1-0.448,1-1C16.501,24.367,16.053,23.92,15.501,23.92zM19.938,9.355c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,10.245,20.418,9.632,19.938,9.355zM23.378,16.042c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,16.492,23.929,16.042,23.378,16.042zM22.823,20.115c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.091,0.367,1.367c0.477,0.275,1.089,0.112,1.365-0.366C23.464,21.004,23.3,20.391,22.823,20.115zM15.501,8.167c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366l3.305-1.676c0.055,0.006,0.109,0.017,0.166,0.017c0.828,0,1.5-0.672,1.5-1.5l-0.5-7.876C16.501,8.614,16.053,8.167,15.501,8.167zM18.939,22.998c-0.479,0.276-0.643,0.888-0.366,1.367c0.275,0.477,0.888,0.642,1.366,0.365c0.478-0.276,0.642-0.889,0.366-1.365C20.028,22.886,19.417,22.723,18.939,22.998zM11.197,3.593c-0.836-1.04-2.103-1.718-3.541-1.718c-2.52,0-4.562,2.042-4.562,4.562c0,0.957,0.297,1.843,0.8,2.576C5.649,6.484,8.206,4.553,11.197,3.593zM27.106,9.014c0.503-0.733,0.8-1.619,0.8-2.576c0-2.52-2.043-4.562-4.562-4.562c-1.438,0-2.704,0.678-3.541,1.717C22.794,4.553,25.351,6.484,27.106,9.014z",clock:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z",stopwatch:"M27.216,18.533c0-3.636-1.655-6.883-4.253-9.032l0.733-0.998l0.482,0.354c0.198,0.146,0.481,0.104,0.628-0.097l0.442-0.604c0.146-0.198,0.103-0.482-0.097-0.628l-2.052-1.506c-0.199-0.146-0.481-0.103-0.628,0.097L22.03,6.724c-0.146,0.199-0.104,0.482,0.096,0.628l0.483,0.354l-0.736,1.003c-1.28-0.834-2.734-1.419-4.296-1.699c0.847-0.635,1.402-1.638,1.403-2.778h-0.002c0-1.922-1.557-3.48-3.479-3.48c-1.925,0-3.48,1.559-3.48,3.48c0,1.141,0.556,2.144,1.401,2.778c-1.549,0.277-2.99,0.857-4.265,1.68L8.424,7.684l0.484-0.353c0.198-0.145,0.245-0.428,0.098-0.628l-0.44-0.604C8.42,5.899,8.136,5.855,7.937,6.001L5.881,7.5c-0.2,0.146-0.243,0.428-0.099,0.628l0.442,0.604c0.145,0.2,0.428,0.244,0.627,0.099l0.483-0.354l0.729,0.999c-2.615,2.149-4.282,5.407-4.282,9.057c0,6.471,5.245,11.716,11.718,11.716c6.47,0,11.716-5.243,11.718-11.716H27.216zM12.918,4.231c0.002-1.425,1.155-2.58,2.582-2.582c1.426,0.002,2.579,1.157,2.581,2.582c-0.002,1.192-0.812,2.184-1.908,2.482v-1.77h0.6c0.246,0,0.449-0.203,0.449-0.449V3.746c0-0.247-0.203-0.449-0.449-0.449h-2.545c-0.247,0-0.449,0.202-0.449,0.449v0.749c0,0.246,0.202,0.449,0.449,0.449h0.599v1.77C13.729,6.415,12.919,5.424,12.918,4.231zM15.5,27.554c-4.983-0.008-9.015-4.038-9.022-9.021c0.008-4.982,4.039-9.013,9.022-9.022c4.981,0.01,9.013,4.04,9.021,9.022C24.513,23.514,20.481,27.546,15.5,27.554zM15.5,12.138c0.476,0,0.861-0.385,0.861-0.86s-0.386-0.861-0.861-0.861s-0.861,0.386-0.861,0.861S15.024,12.138,15.5,12.138zM15.5,24.927c-0.476,0-0.861,0.386-0.861,0.861s0.386,0.861,0.861,0.861s0.861-0.386,0.861-0.861S15.976,24.927,15.5,24.927zM12.618,11.818c-0.237-0.412-0.764-0.553-1.176-0.315c-0.412,0.238-0.554,0.765-0.315,1.177l2.867,6.722c0.481,0.831,1.543,1.116,2.375,0.637c0.829-0.479,1.114-1.543,0.635-2.374L12.618,11.818zM18.698,24.07c-0.412,0.237-0.555,0.765-0.316,1.176c0.237,0.412,0.764,0.554,1.176,0.315c0.413-0.238,0.553-0.765,0.316-1.176C19.635,23.974,19.108,23.832,18.698,24.07zM8.787,15.65c0.412,0.238,0.938,0.097,1.176-0.315c0.237-0.413,0.097-0.938-0.314-1.176c-0.412-0.239-0.938-0.098-1.177,0.313C8.234,14.886,8.375,15.412,8.787,15.65zM22.215,21.413c-0.412-0.236-0.938-0.096-1.176,0.316c-0.238,0.412-0.099,0.938,0.314,1.176c0.41,0.238,0.937,0.098,1.176-0.314C22.768,22.178,22.625,21.652,22.215,21.413zM9.107,18.531c-0.002-0.476-0.387-0.86-0.861-0.86c-0.477,0-0.862,0.385-0.862,0.86c0.001,0.476,0.386,0.86,0.861,0.861C8.722,19.393,9.106,19.008,9.107,18.531zM21.896,18.531c0,0.477,0.384,0.862,0.859,0.86c0.476,0.002,0.862-0.382,0.862-0.859s-0.387-0.86-0.862-0.862C22.279,17.671,21.896,18.056,21.896,18.531zM8.787,21.413c-0.412,0.238-0.554,0.765-0.316,1.176c0.239,0.412,0.765,0.553,1.177,0.316c0.413-0.239,0.553-0.765,0.315-1.178C9.725,21.317,9.198,21.176,8.787,21.413zM21.352,14.157c-0.411,0.238-0.551,0.764-0.312,1.176c0.237,0.413,0.764,0.555,1.174,0.315c0.412-0.236,0.555-0.762,0.316-1.176C22.29,14.06,21.766,13.921,21.352,14.157zM12.304,24.067c-0.413-0.235-0.939-0.096-1.176,0.315c-0.238,0.413-0.098,0.939,0.312,1.178c0.413,0.236,0.939,0.096,1.178-0.315C12.857,24.832,12.715,24.308,12.304,24.067zM18.698,12.992c0.41,0.238,0.938,0.099,1.174-0.313c0.238-0.411,0.1-0.938-0.314-1.177c-0.414-0.238-0.937-0.097-1.177,0.315C18.144,12.229,18.286,12.755,18.698,12.992z",history:"M10.666,18.292c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96C10.553,17.204,10.389,17.816,10.666,18.292zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.888,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM21.822,10.696c-0.479,0.278-0.643,0.89-0.366,1.367s0.888,0.642,1.366,0.365c0.478-0.275,0.643-0.888,0.365-1.366C22.913,10.584,22.298,10.42,21.822,10.696zM21.456,18.938c-0.274,0.479-0.112,1.092,0.367,1.367c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367C22.343,18.297,21.73,18.461,21.456,18.938zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM18.573,22.822c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365c-0.277-0.479-0.888-0.643-1.365-0.367C18.46,21.732,18.296,22.344,18.573,22.822zM18.939,9.546c0.477,0.276,1.088,0.112,1.365-0.366c0.276-0.478,0.113-1.091-0.367-1.367c-0.477-0.276-1.09-0.111-1.364,0.366C18.298,8.659,18.462,9.27,18.939,9.546zM28.703,14.364C28.074,7.072,21.654,1.67,14.364,2.295c-3.254,0.281-6.118,1.726-8.25,3.877L4.341,4.681l-1.309,7.364l7.031-2.548L8.427,8.12c1.627-1.567,3.767-2.621,6.194-2.833c5.64-0.477,10.595,3.694,11.089,9.335c0.477,5.64-3.693,10.595-9.333,11.09c-5.643,0.476-10.599-3.694-11.092-9.333c-0.102-1.204,0.019-2.373,0.31-3.478l-3.27,1.186c-0.089,0.832-0.106,1.684-0.031,2.55c0.629,7.29,7.048,12.691,14.341,12.066C23.926,28.074,29.328,21.655,28.703,14.364z",future:"M17.001,15.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.89-0.365,1.365c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17C16.329,17,17.001,16.329,17.001,15.5zM18.939,21.455c-0.479,0.277-0.644,0.889-0.366,1.367c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365C20.027,21.344,19.417,21.18,18.939,21.455zM19.938,7.813c-0.477-0.276-1.09-0.111-1.364,0.366c-0.275,0.48-0.111,1.091,0.366,1.367c0.477,0.276,1.088,0.112,1.365-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM21.823,20.305c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367c-0.48-0.275-1.093-0.111-1.367,0.365C21.182,19.416,21.344,20.029,21.823,20.305zM22.822,12.428c0.478-0.275,0.643-0.888,0.365-1.366c-0.274-0.478-0.89-0.642-1.365-0.366c-0.479,0.278-0.643,0.89-0.366,1.367S22.344,12.705,22.822,12.428zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM9.546,12.062c0.275-0.478,0.111-1.089-0.366-1.366c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366C8.658,12.704,9.269,12.541,9.546,12.062zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM9.179,20.305c0.479-0.275,0.643-0.888,0.367-1.367c-0.276-0.477-0.888-0.641-1.367-0.365c-0.478,0.277-0.642,0.889-0.365,1.367C8.089,20.418,8.703,20.58,9.179,20.305zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM28.674,14.087l-3.27-1.186c0.291,1.105,0.41,2.274,0.309,3.478c-0.492,5.639-5.449,9.809-11.091,9.333c-5.639-0.495-9.809-5.45-9.333-11.09c0.494-5.641,5.449-9.812,11.089-9.335c2.428,0.212,4.567,1.266,6.194,2.833l-1.637,1.377l7.031,2.548l-1.309-7.364l-1.771,1.492c-2.133-2.151-4.996-3.597-8.25-3.877C9.346,1.67,2.926,7.072,2.297,14.364c-0.625,7.291,4.777,13.71,12.066,14.339c7.293,0.625,13.713-4.776,14.342-12.066C28.779,15.771,28.762,14.919,28.674,14.087z", -globeAlt2:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM8.251,7.48c0.122,0.055,0.255,0.104,0.28,0.137C8.57,7.668,8.621,7.823,8.557,7.861C8.492,7.9,8.39,7.887,8.376,7.771c-0.013-0.115-0.026-0.128-0.18-0.18c-0.022-0.007-0.035-0.01-0.051-0.015C8.18,7.544,8.216,7.512,8.251,7.48zM7.733,7.974c0.031,0.087,0.113,0.125,0,0.17C7.673,8.168,7.611,8.172,7.559,8.165C7.617,8.102,7.672,8.035,7.733,7.974zM16,27.533C9.639,27.533,4.466,22.36,4.466,16c0-0.085,0.011-0.168,0.013-0.254c0.004-0.003,0.008-0.006,0.012-0.009c0.129-0.102,0.283-0.359,0.334-0.45c0.052-0.089,0.181-0.154,0.116-0.256c-0.059-0.096-0.292-0.23-0.407-0.261c0.01-0.099,0.032-0.195,0.045-0.294c0.063,0.077,0.137,0.17,0.208,0.194c0.115,0.038,0.501,0.052,0.566,0.052c0.063,0,0.334,0.014,0.386-0.064c0.051-0.077,0.09-0.077,0.154-0.077c0.064,0,0.18,0.231,0.271,0.257c0.089,0.026,0.257,0.013,0.244,0.181c-0.012,0.166,0.077,0.309,0.167,0.321c0.09,0.013,0.296-0.194,0.296-0.194s0,0.322-0.012,0.438C6.846,15.698,7,16.124,7,16.124s0.193,0.397,0.244,0.488c0.052,0.09,0.27,0.36,0.27,0.476c0,0.117,0.026,0.297,0.104,0.297s0.155-0.206,0.244-0.335c0.091-0.128,0.117-0.31,0.155-0.438c0.039-0.129,0.039-0.36,0.039-0.45c0-0.091,0.076-0.168,0.257-0.245c0.181-0.077,0.309-0.296,0.463-0.412c0.155-0.116,0.142-0.309,0.452-0.309c0.308,0,0.282,0,0.36-0.078c0.077-0.077,0.154-0.128,0.192,0.013c0.039,0.142,0.257,0.347,0.296,0.399c0.039,0.052,0.116,0.193,0.104,0.348c-0.013,0.153,0.012,0.334,0.077,0.334c0.064,0,0.193-0.219,0.193-0.219s0.283-0.192,0.27,0.014c-0.014,0.205,0.025,0.425,0.025,0.552c0,0.13,0.232,0.438,0.232,0.362c0-0.079,0.103-0.296,0.103-0.413c0-0.114,0.064-0.063,0.231,0.051c0.167,0.116,0.283,0.349,0.283,0.349s0.168,0.154,0.193,0.219c0.026,0.064,0.206-0.025,0.244-0.104c0.039-0.076,0.065-0.115,0.167-0.141c0.104-0.026,0.231-0.026,0.271-0.168c0.039-0.142,0.154-0.308,0-0.502c-0.154-0.193-0.232-0.321-0.347-0.412c-0.117-0.09-0.206-0.322-0.206-0.322s0.244-0.218,0.321-0.296c0.079-0.077,0.193-0.025,0.207,0.064c0.013,0.091-0.115,0.168-0.141,0.361c-0.026,0.192,0.154,0.257,0.206,0.192c0.051-0.065,0.18-0.219,0.18-0.257c0-0.039-0.089-0.026-0.102-0.167c-0.013-0.142,0.166-0.245,0.23-0.207c0.066,0.039,0.477-0.051,0.67-0.154s0.308-0.322,0.425-0.412c0.116-0.089,0.515-0.386,0.489-0.527c-0.026-0.142,0.012-0.334-0.09-0.515c-0.103-0.18-0.232-0.295-0.283-0.373c-0.051-0.077,0.219-0.09,0.347-0.206c0.129-0.116,0-0.219-0.064-0.206c-0.064,0.013-0.232,0.052-0.296,0.039c-0.064-0.013-0.103-0.077-0.206-0.155c-0.102-0.077,0.026-0.192,0.091-0.179c0.064,0.013,0.23-0.129,0.308-0.193c0.077-0.064,0.193-0.115,0.154-0.051c-0.038,0.064-0.128,0.296-0.026,0.309c0.104,0.013,0.348-0.193,0.388-0.18c0.038,0.013,0.102,0.18,0.064,0.257c-0.039,0.077-0.039,0.206,0.013,0.193c0.051-0.013,0.154-0.129,0.18-0.09c0.027,0.039,0.154,0.116,0.09,0.257c-0.063,0.142-0.193,0.193-0.039,0.284c0.154,0.089,0.206,0.012,0.322-0.052c0.115-0.064,0.193-0.347,0.128-0.438c-0.064-0.09-0.218-0.27-0.218-0.334c0-0.064,0.257-0.064,0.257-0.167s0.09-0.18,0.18-0.219c0.091-0.039,0.206-0.206,0.244-0.154c0.039,0.052,0.271,0.116,0.334,0.039c0.064-0.077,0.4-0.36,0.605-0.515c0.206-0.154,0.283-0.334,0.336-0.515c0.051-0.18,0.128-0.296,0.102-0.437v0c0.077,0.18,0.09,0.309,0.077,0.45c-0.013,0.142,0,0.438,0.026,0.476c0.025,0.039,0.129,0.128,0.192,0.103c0.064-0.025-0.025-0.283-0.025-0.334c0-0.052,0.09-0.129,0.142-0.142c0.052-0.013,0-0.231-0.065-0.322c-0.063-0.09-0.154-0.142-0.102-0.154c0.051-0.013,0.115-0.116,0.077-0.142c-0.039-0.025-0.014-0.116-0.103-0.09c-0.065,0.019-0.241-0.015-0.235,0.095c-0.037-0.11-0.116-0.183-0.216-0.172c-0.116,0.013-0.181,0.077-0.296,0.077s-0.025-0.18-0.077-0.18c-0.051,0-0.168,0.167-0.231,0.077c-0.064-0.09,0.18-0.206,0.373-0.27c0.192-0.064,0.514-0.438,0.644-0.451c0.128-0.013,0.45,0.026,0.733,0.013c0.283-0.013,0.373-0.129,0.463-0.064s0.283,0.142,0.399,0.129c0.116-0.014,0.064,0,0.244-0.129c0.18-0.129,0.348-0.193,0.438-0.296c0.09-0.103,0.335-0.18,0.348-0.077c0.014,0.103-0.026,0.206,0.077,0.206s0.258-0.103,0.386-0.154c0.129-0.051,0.231-0.116,0.231-0.116s-0.527,0.36-0.655,0.438c-0.129,0.077-0.438,0.129-0.567,0.283c-0.128,0.155-0.205,0.206-0.192,0.374c0.014,0.167,0.231,0.386,0.128,0.54c-0.103,0.154-0.141,0.373-0.141,0.373s0.154-0.219,0.373-0.36s0.348-0.334,0.425-0.412s0.309-0.091,0.309-0.181s0.064-0.206,0.104-0.309c0.038-0.103-0.077-0.078,0-0.206c0.076-0.129,0.064-0.232,0.45-0.232s0.257,0.026,0.566,0.013c0.309-0.013,0.424-0.167,0.72-0.245c0.296-0.077,0.527-0.128,0.618-0.089c0.09,0.038,0.232,0.012,0.141-0.078c-0.089-0.09-0.295-0.219-0.193-0.245c0.104-0.026,0.207-0.039,0.246-0.142c0.039-0.103-0.142-0.283-0.039-0.386c0.104-0.103-0.077-0.231-0.207-0.257c-0.128-0.025-0.63,0.026-0.731-0.025c-0.104-0.052-0.271-0.116-0.322-0.078c-0.052,0.039-0.168,0.245-0.168,0.245s-0.09,0.025-0.168-0.09c-0.076-0.116-0.5-0.103-0.629-0.103s-0.271,0.025-0.413,0.039c-0.141,0.013-0.219,0.052-0.322-0.039c-0.102-0.09-0.243-0.129-0.296-0.167c-0.051-0.039-0.334-0.039-0.553-0.012c-0.218,0.025-0.438,0.025-0.438,0.025s-0.104-0.039-0.257-0.129c-0.154-0.09-0.309-0.154-0.361-0.154c-0.051,0-0.449,0.064-0.539,0c-0.091-0.064-0.181-0.103-0.245-0.103s-0.115-0.103-0.038-0.103s0.437-0.103,0.437-0.103s-0.103-0.142-0.231-0.142c-0.128,0-0.359-0.064-0.424-0.064s-0.014,0.064-0.142,0.039c-0.13-0.026-0.258-0.078-0.335-0.026c-0.076,0.051-0.258,0.128-0.064,0.18c0.193,0.052,0.373,0,0.425,0.078c0.052,0.077,0,0.115,0,0.167s-0.103,0.193-0.167,0.219c-0.064,0.025-0.143-0.039-0.27,0.025c-0.129,0.064-0.451,0.013-0.49,0.052c-0.038,0.039-0.115-0.103-0.18-0.077c-0.064,0.025-0.232,0.193-0.322,0.18c-0.089-0.013-0.206-0.103-0.206-0.206s-0.038-0.232-0.077-0.258c-0.038-0.025-0.322-0.039-0.425-0.025c-0.103,0.013-0.424,0.038-0.477,0.09c-0.052,0.052-0.193,0.09-0.283,0.09s-0.167-0.09-0.36-0.116c-0.192-0.026-0.617-0.039-0.669-0.026s-0.218-0.025-0.155-0.077c0.065-0.051,0.257-0.219,0.143-0.295c-0.117-0.078-0.375-0.078-0.489-0.09c-0.117-0.013-0.232-0.039-0.413-0.013c-0.181,0.026-0.219,0.116-0.296,0.039c-0.077-0.077,0.193,0.039-0.077-0.077c-0.27-0.116-0.399-0.103-0.477-0.064c-0.077,0.039,0.013,0.025-0.192,0.103c-0.206,0.078-0.322,0.116-0.374,0.129c-0.051,0.012-0.372-0.065-0.411-0.091c-0.038-0.025-0.181,0.013-0.309,0.064S9.895,7.025,9.767,7C9.638,6.973,9.432,6.973,9.303,7.025C9.174,7.076,9.084,7.076,8.956,7.166c-0.13,0.09-0.373,0.142-0.373,0.142S8.522,7.305,8.448,7.301C10.474,5.541,13.111,4.466,16,4.466c6.361,0,11.534,5.173,11.534,11.534S22.36,27.533,16,27.533zM14.888,19.92c0,0,0.207-0.026,0.207-0.117c0-0.089-0.207-0.205-0.282-0.102c-0.078,0.102-0.219,0.205-0.207,0.296C14.625,20.138,14.888,19.92,14.888,19.92zM14.875,17.023c-0.181,0.233-0.167,0.182-0.296,0.128c-0.128-0.05-0.334,0.116-0.296,0.182c0.039,0.064,0.322-0.014,0.386,0.102c0.065,0.116,0.065,0.129,0.193,0.104c0.128-0.026,0.257-0.205,0.219-0.295C15.043,17.151,14.875,17.023,14.875,17.023zM14.837,18.245c-0.051,0-0.412,0.064-0.451,0.079c-0.039,0.013-0.27-0.025-0.27-0.025c-0.09,0.089-0.026,0.179,0.116,0.166s0.438-0.052,0.502-0.052C14.799,18.413,14.888,18.245,14.837,18.245zM14.284,14.668c-0.19,0.03-0.308,0.438-0.155,0.425C14.284,15.081,14.451,14.643,14.284,14.668zM14.734,16.959c-0.052-0.064-0.181-0.271-0.323-0.219c-0.042,0.017-0.153,0.245-0.012,0.245C14.541,16.985,14.786,17.023,14.734,16.959zM14.85,16.805c0.232-0.013,0.167-0.245-0.013-0.257C14.786,16.544,14.618,16.818,14.85,16.805zM17.591,18.928c-0.193-0.039-0.244-0.102-0.45-0.205c-0.207-0.103-0.67-0.103-0.682-0.039c-0.014,0.064,0,0-0.155-0.05c-0.153-0.054-0.271,0-0.309-0.091c-0.038-0.091-0.128-0.117-0.244-0.002c-0.097,0.097-0.142,0.104,0.078,0.143c0.218,0.039,0.283,0.039,0.192,0.141c-0.09,0.104-0.154,0.233-0.077,0.244c0.077,0.015,0.309-0.05,0.334,0c0.026,0.054-0.051,0.064,0.207,0.105c0.258,0.037,0.309,0.128,0.359,0.178c0.051,0.052,0.206,0.22,0.104,0.22c-0.104,0-0.219,0.128-0.142,0.143c0.077,0.013,0.309-0.039,0.321,0c0.014,0.037,0.143,0.283,0.271,0.271c0.129-0.013,0.206-0.244,0.27-0.31c0.065-0.064,0.322-0.104,0.349,0.012c0.026,0.116,0.104,0.233,0.257,0.311c0.154,0.076,0.335,0.154,0.348,0.089c0.013-0.064-0.077-0.309-0.181-0.346c-0.103-0.041-0.282-0.259-0.282-0.348c0-0.091-0.155-0.117-0.232-0.182C17.849,19.147,17.784,18.967,17.591,18.928zM8.042,17.023c-0.084,0.037-0.155,0.476,0,0.527c0.154,0.052,0.244-0.205,0.193-0.271C8.183,17.218,8.158,16.973,8.042,17.023zM15.429,18.117c-0.118-0.05-0.335,0.424-0.181,0.463C15.403,18.62,15.518,18.156,15.429,18.117zM15.687,13.703c0.077,0,0.18-0.051,0.18-0.193c0-0.142,0.18,0,0.27-0.013s0.141-0.103,0.18-0.206c0.005-0.013,0.008-0.021,0.009-0.027c-0.003,0.024-0.001,0.093,0.095,0.117c0.154,0.038,0.205-0.064,0.205-0.103s0.283-0.103,0.336-0.142c0.051-0.038,0.258-0.103,0.27-0.154c0.013-0.051,0-0.348,0.064-0.373c0.064-0.026,0.154-0.026,0.052-0.206c-0.104-0.181-0.104-0.348-0.232-0.271c-0.095,0.057-0.038,0.284-0.115,0.438s-0.142,0.296-0.193,0.296s-0.321,0.103-0.399,0.18c-0.076,0.077-0.45-0.064-0.501,0c-0.052,0.064-0.154,0.141-0.219,0.193c-0.065,0.051-0.245,0.013-0.207,0.167C15.518,13.562,15.609,13.703,15.687,13.703zM17.449,12.056c0.18-0.013,0.348-0.064,0.348-0.064s0.271,0.013,0.232-0.116c-0.04-0.128-0.322-0.141-0.375-0.128c-0.051,0.013-0.142-0.142-0.244-0.116c-0.096,0.023-0.128,0.155-0.128,0.193c0,0.039-0.36,0.115-0.245,0.219C17.153,12.146,17.27,12.069,17.449,12.056zM13.91,19.058c0.104,0.064,0.296-0.219,0.349-0.13c0.051,0.091-0.013,0.13,0.076,0.246c0.091,0.114,0.258,0.102,0.258,0.102s-0.013-0.309-0.155-0.387c-0.142-0.077-0.232-0.166-0.064-0.141c0.167,0.026,0.257-0.039,0.219-0.114c-0.039-0.078-0.283-0.039-0.361-0.026s-0.193-0.052-0.193-0.052c-0.077,0.024-0.063,0.089-0.09,0.219C13.923,18.902,13.807,18.992,13.91,19.058zM20.924,21.618c-0.231-0.052-0.077,0.039,0,0.154c0.077,0.116,0.232,0.176,0.258,0.05C21.193,21.759,21.155,21.67,20.924,21.618zM21.915,24.744c-0.077,0.064,0,0.091-0.219,0.22c-0.22,0.13-0.49,0.271-0.541,0.386c-0.052,0.116,0.051,0.181,0.258,0.192c0.206,0.013,0.154,0.053,0.296-0.103s0.271-0.244,0.438-0.373c0.168-0.128,0.168-0.322,0.168-0.322s-0.181-0.178-0.193-0.141C22.1,24.665,21.992,24.681,21.915,24.744zM18.504,21.618c0.014-0.116-0.219-0.116-0.334-0.207c-0.116-0.089-0.128-0.359-0.193-0.515c-0.064-0.153-0.192-0.257-0.322-0.397c-0.128-0.143-0.192-0.465-0.23-0.438c-0.039,0.025-0.154,0.399-0.064,0.515c0.09,0.116-0.039,0.348-0.103,0.503c-0.065,0.153-0.22-0.026-0.349-0.104c-0.129-0.078-0.308-0.128-0.398-0.219c-0.09-0.091,0.155-0.335,0.091-0.426c-0.065-0.09-0.412-0.013-0.45-0.013c-0.039,0-0.116-0.128-0.194-0.128c-0.077,0-0.064,0.258-0.064,0.258s-0.078-0.091-0.193-0.207c-0.117-0.115,0.012,0.077-0.103,0.193c-0.117,0.117-0.079,0.078-0.129,0.206c-0.051,0.129-0.167,0.077-0.283-0.052c-0.116-0.128-0.179-0.037-0.258,0c-0.077,0.039-0.141,0.259-0.18,0.309c-0.039,0.052-0.309,0.117-0.374,0.182c-0.064,0.062-0.09,0.27-0.09,0.322c0,0.05-0.271,0.023-0.361,0.089c-0.09,0.064-0.23,0.025-0.321,0.025c-0.09,0-0.399,0.244-0.502,0.308c-0.103,0.066-0.103,0.298-0.051,0.362c0.051,0.063,0.154,0.219,0.09,0.244c-0.064,0.026-0.104,0.206,0.051,0.359c0.154,0.155,0.103,0.194,0.115,0.271c0.014,0.077,0.078,0.104,0.181,0.232c0.102,0.128-0.181,0.231-0.219,0.31c-0.039,0.076,0.091,0.192,0.167,0.257c0.077,0.063,0.271,0.026,0.386-0.013c0.117-0.039,0.245-0.143,0.321-0.155c0.079-0.013,0.438-0.026,0.438-0.026s0.129-0.192,0.219-0.296c0.089-0.102,0.372-0.013,0.372-0.013s0.117-0.076,0.426-0.141c0.309-0.065,0.179,0.064,0.296,0.104c0.115,0.037,0.27,0.062,0.359,0.128c0.09,0.064,0,0.218-0.012,0.283c-0.014,0.064,0.219,0.038,0.23-0.026c0.014-0.064,0.077-0.128,0.207-0.205c0.128-0.078,0.025,0.114,0.076,0.231c0.052,0.116,0.129-0.157,0.129-0.026c0,0.039,0.039,0.078,0.051,0.116c0.014,0.039,0.181,0.052,0.181,0.18c0,0.13,0,0.207,0.039,0.231c0.038,0.026,0.244,0,0.335,0.155c0.089,0.154,0.154,0.013,0.205-0.052c0.052-0.064,0.231,0.026,0.283,0.078c0.052,0.05,0.193-0.104,0.387-0.155c0.192-0.051,0.167-0.039,0.219-0.115c0.051-0.078,0.09-0.283,0.205-0.438c0.115-0.153,0.271-0.424,0.271-0.631c0-0.206-0.014-0.682-0.155-0.899C18.761,21.953,18.492,21.733,18.504,21.618zM18.029,24.77c-0.065-0.013-0.207-0.062-0.207-0.062c-0.142,0.141,0.142,0.141,0.104,0.283c-0.039,0.141,0.193,0.089,0.257,0.064c0.063-0.027,0.22-0.323,0.193-0.399C18.351,24.577,18.093,24.783,18.029,24.77zM22.803,24.178c-0.052,0-0.077,0.064-0.192,0c-0.117-0.063-0.091-0.037-0.168-0.167c-0.077-0.127-0.091-0.296-0.219-0.23c-0.051,0.025,0,0.168,0.051,0.218c0.053,0.052,0.077,0.231,0.064,0.283c-0.012,0.052-0.231,0.116-0.129,0.18c0.104,0.064,0.297,0,0.271,0.078c-0.025,0.077-0.129,0.179-0.013,0.205c0.115,0.025,0.154-0.089,0.207-0.178c0.051-0.093,0.089-0.169,0.179-0.221C22.944,24.294,22.854,24.178,22.803,24.178zM22.815,21.18c0.168,0.064,0.464-0.231,0.347-0.27C23.047,20.871,22.815,21.18,22.815,21.18zM13.923,19.906c-0.029,0.115,0.193,0.167,0.206,0.039C14.141,19.816,13.949,19.803,13.923,19.906zM14.27,16.47c-0.064,0.065-0.257,0.193-0.283,0.31c-0.025,0.115,0.309-0.182,0.399-0.296c0.091-0.117,0.27-0.052,0.308-0.117c0.04-0.063,0.04-0.063,0.04-0.063s-0.142-0.025-0.257-0.063c-0.117-0.039-0.258,0.102-0.193-0.104c0.064-0.206,0.257-0.167,0.219-0.322c-0.039-0.154-0.168-0.193-0.207-0.193c-0.09,0,0.013,0.141-0.116,0.231c-0.128,0.09-0.271,0.128-0.193,0.283C14.064,16.29,14.334,16.405,14.27,16.47zM13.254,19.751c0.013-0.076-0.142-0.192-0.206-0.192c-0.065,0-0.386-0.077-0.386-0.077c-0.058,0.023-0.135,0.045-0.158,0.077c-0.007-0.011-0.022-0.024-0.049-0.039c-0.142-0.075-0.309,0-0.361-0.102c-0.05-0.104-0.127-0.104-0.179-0.039c-0.094,0.117,0.025,0.206,0.063,0.231c0.038,0.024,0.181,0.052,0.309,0.039c0.08-0.008,0.181-0.027,0.21-0.059c0.004,0.014,0.016,0.027,0.035,0.044c0.103,0.092,0.167,0.13,0.321,0.116C13.009,19.74,13.241,19.829,13.254,19.751zM12.881,18.992c0.065,0,0.193,0,0.283,0.026c0.09,0.025,0.386,0.05,0.373-0.064c-0.013-0.115-0.038-0.297,0.089-0.411c0.13-0.117,0.257-0.18,0.193-0.348c-0.063-0.167-0.193-0.271-0.103-0.349c0.09-0.076,0.192-0.102,0.192-0.166c0-0.065-0.217,0.18-0.244-0.246c-0.005-0.091-0.206,0.025-0.219,0.116c-0.012,0.091,0.142,0.167-0.103,0.167c-0.245,0-0.257,0.194-0.309,0.232c-0.052,0.039-0.103,0.051-0.207,0.076c-0.102,0.026-0.127,0.13-0.153,0.194c-0.025,0.063-0.206-0.116-0.257-0.064c-0.051,0.052-0.013,0.296,0.077,0.501C12.585,18.863,12.816,18.992,12.881,18.992zM11.979,18.928c0.065-0.077,0.038-0.192-0.063-0.18c-0.103,0.013-0.193-0.168-0.36-0.283c-0.168-0.114-0.296-0.194-0.451-0.36c-0.154-0.167-0.347-0.271-0.45-0.359c-0.104-0.091-0.257-0.13-0.322-0.116c-0.159,0.032,0.231,0.309,0.271,0.346c0.039,0.041,0.387,0.335,0.387,0.478s0.231,0.476,0.296,0.527c0.064,0.052,0.385,0.244,0.437,0.348c0.052,0.103,0.167,0.13,0.167-0.013C11.89,19.174,11.916,19.006,11.979,18.928zM11.002,17.474c0.064,0.232,0.193,0.464,0.244,0.555c0.052,0.089,0.271,0.217,0.348,0.281c0.077,0.064,0.192-0.024,0.143-0.102c-0.052-0.078-0.155-0.192-0.167-0.283c-0.013-0.091-0.078-0.233-0.181-0.387c-0.102-0.153-0.192-0.192-0.257-0.295c-0.064-0.104-0.296-0.297-0.296-0.297c-0.102,0.013-0.102,0.205-0.051,0.271C10.834,17.28,10.938,17.243,11.002,17.474z",globeAlt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM27.436,17.39c0.001,0.002,0.004,0.002,0.005,0.004c-0.022,0.187-0.054,0.37-0.085,0.554c-0.015-0.012-0.034-0.025-0.047-0.036c-0.103-0.09-0.254-0.128-0.318-0.115c-0.157,0.032,0.229,0.305,0.267,0.342c0.009,0.009,0.031,0.03,0.062,0.058c-1.029,5.312-5.709,9.338-11.319,9.338c-4.123,0-7.736-2.18-9.776-5.441c0.123-0.016,0.24-0.016,0.28-0.076c0.051-0.077,0.102-0.241,0.178-0.331c0.077-0.089,0.165-0.229,0.127-0.292c-0.039-0.064,0.101-0.344,0.088-0.419c-0.013-0.076-0.127-0.256,0.064-0.407s0.394-0.382,0.407-0.444c0.012-0.063,0.166-0.331,0.152-0.458c-0.012-0.127-0.152-0.28-0.24-0.318c-0.09-0.037-0.28-0.05-0.356-0.151c-0.077-0.103-0.292-0.203-0.368-0.178c-0.076,0.025-0.204,0.05-0.305-0.015c-0.102-0.062-0.267-0.139-0.33-0.189c-0.065-0.05-0.229-0.088-0.305-0.088c-0.077,0-0.065-0.052-0.178,0.101c-0.114,0.153,0,0.204-0.204,0.177c-0.204-0.023,0.025-0.036,0.141-0.189c0.113-0.152-0.013-0.242-0.141-0.203c-0.126,0.038-0.038,0.115-0.241,0.153c-0.203,0.036-0.203-0.09-0.076-0.115s0.355-0.139,0.355-0.19c0-0.051-0.025-0.191-0.127-0.191s-0.077-0.126-0.229-0.291c-0.092-0.101-0.196-0.164-0.299-0.204c-0.09-0.579-0.15-1.167-0.15-1.771c0-2.844,1.039-5.446,2.751-7.458c0.024-0.02,0.048-0.034,0.069-0.036c0.084-0.009,0.31-0.025,0.51-0.059c0.202-0.034,0.418-0.161,0.489-0.153c0.069,0.008,0.241,0.008,0.186-0.042C8.417,8.2,8.339,8.082,8.223,8.082S8.215,7.896,8.246,7.896c0.03,0,0.186,0.025,0.178,0.11C8.417,8.091,8.471,8.2,8.625,8.167c0.156-0.034,0.132-0.162,0.102-0.195C8.695,7.938,8.672,7.853,8.642,7.794c-0.031-0.06-0.023-0.136,0.14-0.153C8.944,7.625,9.168,7.708,9.16,7.573s0-0.28,0.046-0.356C9.253,7.142,9.354,7.09,9.299,7.065C9.246,7.04,9.176,7.099,9.121,6.972c-0.054-0.127,0.047-0.22,0.108-0.271c0.02-0.015,0.067-0.06,0.124-0.112C11.234,5.257,13.524,4.466,16,4.466c3.213,0,6.122,1.323,8.214,3.45c-0.008,0.022-0.01,0.052-0.031,0.056c-0.077,0.013-0.166,0.063-0.179-0.051c-0.013-0.114-0.013-0.331-0.102-0.203c-0.089,0.127-0.127,0.127-0.127,0.191c0,0.063,0.076,0.127,0.051,0.241C23.8,8.264,23.8,8.341,23.84,8.341c0.036,0,0.126-0.115,0.239-0.141c0.116-0.025,0.319-0.088,0.332,0.026c0.013,0.115,0.139,0.152,0.013,0.203c-0.128,0.051-0.267,0.026-0.293-0.051c-0.025-0.077-0.114-0.077-0.203-0.013c-0.088,0.063-0.279,0.292-0.279,0.292s-0.306,0.139-0.343,0.114c-0.04-0.025,0.101-0.165,0.203-0.228c0.102-0.064,0.178-0.204,0.14-0.242c-0.038-0.038-0.088-0.279-0.063-0.343c0.025-0.063,0.139-0.152,0.013-0.216c-0.127-0.063-0.217-0.14-0.318-0.178s-0.216,0.152-0.305,0.204c-0.089,0.051-0.076,0.114-0.191,0.127c-0.114,0.013-0.189,0.165,0,0.254c0.191,0.089,0.255,0.152,0.204,0.204c-0.051,0.051-0.267-0.025-0.267-0.025s-0.165-0.076-0.268-0.076c-0.101,0-0.229-0.063-0.33-0.076c-0.102-0.013-0.306-0.013-0.355,0.038c-0.051,0.051-0.179,0.203-0.28,0.152c-0.101-0.051-0.101-0.102-0.241-0.051c-0.14,0.051-0.279-0.038-0.355,0.038c-0.077,0.076-0.013,0.076-0.255,0c-0.241-0.076-0.189,0.051-0.419,0.089s-0.368-0.038-0.432,0.038c-0.064,0.077-0.153,0.217-0.19,0.127c-0.038-0.088,0.126-0.241,0.062-0.292c-0.062-0.051-0.33-0.025-0.367,0.013c-0.039,0.038-0.014,0.178,0.011,0.229c0.026,0.05,0.064,0.254-0.011,0.216c-0.077-0.038-0.064-0.166-0.141-0.152c-0.076,0.013-0.165,0.051-0.203,0.077c-0.038,0.025-0.191,0.025-0.229,0.076c-0.037,0.051,0.014,0.191-0.051,0.203c-0.063,0.013-0.114,0.064-0.254-0.025c-0.14-0.089-0.14-0.038-0.178-0.012c-0.038,0.025-0.216,0.127-0.229,0.012c-0.013-0.114,0.025-0.152-0.089-0.229c-0.115-0.076-0.026-0.076,0.127-0.025c0.152,0.05,0.343,0.075,0.622-0.013c0.28-0.089,0.395-0.127,0.28-0.178c-0.115-0.05-0.229-0.101-0.406-0.127c-0.179-0.025-0.42-0.025-0.7-0.127c-0.279-0.102-0.343-0.14-0.457-0.165c-0.115-0.026-0.813-0.14-1.132-0.089c-0.317,0.051-1.193,0.28-1.245,0.318s-0.128,0.19-0.292,0.318c-0.165,0.127-0.47,0.419-0.712,0.47c-0.241,0.051-0.521,0.254-0.521,0.305c0,0.051,0.101,0.242,0.076,0.28c-0.025,0.038,0.05,0.229,0.191,0.28c0.139,0.05,0.381,0.038,0.393-0.039c0.014-0.076,0.204-0.241,0.217-0.127c0.013,0.115,0.14,0.292,0.114,0.368c-0.025,0.077,0,0.153,0.09,0.14c0.088-0.012,0.559-0.114,0.559-0.114s0.153-0.064,0.127-0.166c-0.026-0.101,0.166-0.241,0.203-0.279c0.038-0.038,0.178-0.191,0.014-0.241c-0.167-0.051-0.293-0.064-0.115-0.216s0.292,0,0.521-0.229c0.229-0.229-0.051-0.292,0.191-0.305c0.241-0.013,0.496-0.025,0.444,0.051c-0.05,0.076-0.342,0.242-0.508,0.318c-0.166,0.077-0.14,0.216-0.076,0.292c0.063,0.076,0.09,0.254,0.204,0.229c0.113-0.025,0.254-0.114,0.38-0.101c0.128,0.012,0.383-0.013,0.42-0.013c0.039,0,0.216,0.178,0.114,0.203c-0.101,0.025-0.229,0.013-0.445,0.025c-0.215,0.013-0.456,0.013-0.456,0.051c0,0.039,0.292,0.127,0.19,0.191c-0.102,0.063-0.203-0.013-0.331-0.026c-0.127-0.012-0.203,0.166-0.241,0.267c-0.039,0.102,0.063,0.28-0.127,0.216c-0.191-0.063-0.331-0.063-0.381-0.038c-0.051,0.025-0.203,0.076-0.331,0.114c-0.126,0.038-0.076-0.063-0.242-0.063c-0.164,0-0.164,0-0.164,0l-0.103,0.013c0,0-0.101-0.063-0.114-0.165c-0.013-0.102,0.05-0.216-0.013-0.241c-0.064-0.026-0.292,0.012-0.33,0.088c-0.038,0.076-0.077,0.216-0.026,0.28c0.052,0.063,0.204,0.19,0.064,0.152c-0.14-0.038-0.317-0.051-0.419,0.026c-0.101,0.076-0.279,0.241-0.279,0.241s-0.318,0.025-0.318,0.102c0,0.077,0,0.178-0.114,0.191c-0.115,0.013-0.268,0.05-0.42,0.076c-0.153,0.025-0.139,0.088-0.317,0.102s-0.204,0.089-0.038,0.114c0.165,0.025,0.418,0.127,0.431,0.241c0.014,0.114-0.013,0.242-0.076,0.356c-0.043,0.079-0.305,0.026-0.458,0.026c-0.152,0-0.456-0.051-0.584,0c-0.127,0.051-0.102,0.305-0.064,0.419c0.039,0.114-0.012,0.178-0.063,0.216c-0.051,0.038-0.065,0.152,0,0.204c0.063,0.051,0.114,0.165,0.166,0.178c0.051,0.013,0.215-0.038,0.279,0.025c0.064,0.064,0.127,0.216,0.165,0.178c0.039-0.038,0.089-0.203,0.153-0.166c0.064,0.039,0.216-0.012,0.331-0.025s0.177-0.14,0.292-0.204c0.114-0.063,0.05-0.063,0.013-0.14c-0.038-0.076,0.114-0.165,0.204-0.254c0.088-0.089,0.253-0.013,0.292-0.115c0.038-0.102,0.051-0.279,0.151-0.267c0.103,0.013,0.243,0.076,0.331,0.076c0.089,0,0.279-0.14,0.332-0.165c0.05-0.025,0.241-0.013,0.267,0.102c0.025,0.114,0.241,0.254,0.292,0.279c0.051,0.025,0.381,0.127,0.433,0.165c0.05,0.038,0.126,0.153,0.152,0.254c0.025,0.102,0.114,0.102,0.128,0.013c0.012-0.089-0.065-0.254,0.025-0.242c0.088,0.013,0.191-0.026,0.191-0.026s-0.243-0.165-0.331-0.203c-0.088-0.038-0.255-0.114-0.331-0.241c-0.076-0.127-0.267-0.153-0.254-0.279c0.013-0.127,0.191-0.051,0.292,0.051c0.102,0.102,0.356,0.241,0.445,0.33c0.088,0.089,0.229,0.127,0.267,0.242c0.039,0.114,0.152,0.241,0.19,0.292c0.038,0.051,0.165,0.331,0.204,0.394c0.038,0.063,0.165-0.012,0.229-0.063c0.063-0.051,0.179-0.076,0.191-0.178c0.013-0.102-0.153-0.178-0.203-0.216c-0.051-0.038,0.127-0.076,0.191-0.127c0.063-0.05,0.177-0.14,0.228-0.063c0.051,0.077,0.026,0.381,0.051,0.432c0.025,0.051,0.279,0.127,0.331,0.191c0.05,0.063,0.267,0.089,0.304,0.051c0.039-0.038,0.242,0.026,0.294,0.038c0.049,0.013,0.202-0.025,0.304-0.05c0.103-0.025,0.204-0.102,0.191,0.063c-0.013,0.165-0.051,0.419-0.179,0.546c-0.127,0.127-0.076,0.191-0.202,0.191c-0.06,0-0.113,0-0.156,0.021c-0.041-0.065-0.098-0.117-0.175-0.097c-0.152,0.038-0.344,0.038-0.47,0.19c-0.128,0.153-0.178,0.165-0.204,0.114c-0.025-0.051,0.369-0.267,0.317-0.331c-0.05-0.063-0.355-0.038-0.521-0.038c-0.166,0-0.305-0.102-0.433-0.127c-0.126-0.025-0.292,0.127-0.418,0.254c-0.128,0.127-0.216,0.038-0.331,0.038c-0.115,0-0.331-0.165-0.331-0.165s-0.216-0.089-0.305-0.089c-0.088,0-0.267-0.165-0.318-0.165c-0.05,0-0.19-0.115-0.088-0.166c0.101-0.05,0.202,0.051,0.101-0.229c-0.101-0.279-0.33-0.216-0.419-0.178c-0.088,0.039-0.724,0.025-0.775,0.025c-0.051,0-0.419,0.127-0.533,0.178c-0.116,0.051-0.318,0.115-0.369,0.14c-0.051,0.025-0.318-0.051-0.433,0.013c-0.151,0.084-0.291,0.216-0.33,0.216c-0.038,0-0.153,0.089-0.229,0.28c-0.077,0.19,0.013,0.355-0.128,0.419c-0.139,0.063-0.394,0.204-0.495,0.305c-0.102,0.101-0.229,0.458-0.355,0.623c-0.127,0.165,0,0.317,0.025,0.419c0.025,0.101,0.114,0.292-0.025,0.471c-0.14,0.178-0.127,0.266-0.191,0.279c-0.063,0.013,0.063,0.063,0.088,0.19c0.025,0.128-0.114,0.255,0.128,0.369c0.241,0.113,0.355,0.217,0.418,0.367c0.064,0.153,0.382,0.407,0.382,0.407s0.229,0.205,0.344,0.293c0.114,0.089,0.152,0.038,0.177-0.05c0.025-0.09,0.178-0.104,0.355-0.104c0.178,0,0.305,0.04,0.483,0.014c0.178-0.025,0.356-0.141,0.42-0.166c0.063-0.025,0.279-0.164,0.443-0.063c0.166,0.103,0.141,0.241,0.23,0.332c0.088,0.088,0.24,0.037,0.355-0.051c0.114-0.09,0.064-0.052,0.203,0.025c0.14,0.075,0.204,0.151,0.077,0.267c-0.128,0.113-0.051,0.293-0.128,0.47c-0.076,0.178-0.063,0.203,0.077,0.278c0.14,0.076,0.394,0.548,0.47,0.638c0.077,0.088-0.025,0.342,0.064,0.495c0.089,0.151,0.178,0.254,0.077,0.331c-0.103,0.075-0.28,0.216-0.292,0.47s0.051,0.431,0.102,0.521s0.177,0.331,0.241,0.419c0.064,0.089,0.14,0.305,0.152,0.445c0.013,0.14-0.024,0.306,0.039,0.381c0.064,0.076,0.102,0.191,0.216,0.292c0.115,0.103,0.152,0.318,0.152,0.318s0.039,0.089,0.051,0.229c0.012,0.14,0.025,0.228,0.152,0.292c0.126,0.063,0.215,0.076,0.28,0.013c0.063-0.063,0.381-0.077,0.546-0.063c0.165,0.013,0.355-0.075,0.521-0.19s0.407-0.419,0.496-0.508c0.089-0.09,0.292-0.255,0.268-0.356c-0.025-0.101-0.077-0.203,0.024-0.254c0.102-0.052,0.344-0.152,0.356-0.229c0.013-0.077-0.09-0.395-0.115-0.457c-0.024-0.064,0.064-0.18,0.165-0.306c0.103-0.128,0.421-0.216,0.471-0.267c0.051-0.053,0.191-0.267,0.217-0.433c0.024-0.167-0.051-0.369,0-0.457c0.05-0.09,0.013-0.165-0.103-0.268c-0.114-0.102-0.089-0.407-0.127-0.457c-0.037-0.051-0.013-0.319,0.063-0.345c0.076-0.023,0.242-0.279,0.344-0.393c0.102-0.114,0.394-0.47,0.534-0.496c0.139-0.025,0.355-0.229,0.368-0.343c0.013-0.115,0.38-0.547,0.394-0.635c0.013-0.09,0.166-0.42,0.102-0.497c-0.062-0.076-0.559,0.115-0.622,0.141c-0.064,0.025-0.241,0.127-0.446,0.113c-0.202-0.013-0.114-0.177-0.127-0.254c-0.012-0.076-0.228-0.368-0.279-0.381c-0.051-0.012-0.203-0.166-0.267-0.317c-0.063-0.153-0.152-0.343-0.254-0.458c-0.102-0.114-0.165-0.38-0.268-0.559c-0.101-0.178-0.189-0.407-0.279-0.572c-0.021-0.041-0.045-0.079-0.067-0.117c0.118-0.029,0.289-0.082,0.31-0.009c0.024,0.088,0.165,0.279,0.19,0.419s0.165,0.089,0.178,0.216c0.014,0.128,0.14,0.433,0.19,0.47c0.052,0.038,0.28,0.242,0.318,0.318c0.038,0.076,0.089,0.178,0.127,0.369c0.038,0.19,0.076,0.444,0.179,0.482c0.102,0.038,0.444-0.064,0.508-0.102s0.482-0.242,0.635-0.255c0.153-0.012,0.179-0.115,0.368-0.152c0.191-0.038,0.331-0.177,0.458-0.28c0.127-0.101,0.28-0.355,0.33-0.444c0.052-0.088,0.179-0.152,0.115-0.253c-0.063-0.103-0.331-0.254-0.433-0.268c-0.102-0.012-0.089-0.178-0.152-0.178s-0.051,0.088-0.178,0.153c-0.127,0.063-0.255,0.19-0.344,0.165s0.026-0.089-0.113-0.203s-0.192-0.14-0.192-0.228c0-0.089-0.278-0.255-0.304-0.382c-0.026-0.127,0.19-0.305,0.254-0.19c0.063,0.114,0.115,0.292,0.279,0.368c0.165,0.076,0.318,0.204,0.395,0.229c0.076,0.025,0.267-0.14,0.33-0.114c0.063,0.024,0.191,0.253,0.306,0.292c0.113,0.038,0.495,0.051,0.559,0.051s0.33,0.013,0.381-0.063c0.051-0.076,0.089-0.076,0.153-0.076c0.062,0,0.177,0.229,0.267,0.254c0.089,0.025,0.254,0.013,0.241,0.179c-0.012,0.164,0.076,0.305,0.165,0.317c0.09,0.012,0.293-0.191,0.293-0.191s0,0.318-0.012,0.433c-0.014,0.113,0.139,0.534,0.139,0.534s0.19,0.393,0.241,0.482s0.267,0.355,0.267,0.47c0,0.115,0.025,0.293,0.103,0.293c0.076,0,0.152-0.203,0.24-0.331c0.091-0.126,0.116-0.305,0.153-0.432c0.038-0.127,0.038-0.356,0.038-0.444c0-0.09,0.075-0.166,0.255-0.242c0.178-0.076,0.304-0.292,0.456-0.407c0.153-0.115,0.141-0.305,0.446-0.305c0.305,0,0.278,0,0.355-0.077c0.076-0.076,0.151-0.127,0.19,0.013c0.038,0.14,0.254,0.343,0.292,0.394c0.038,0.052,0.114,0.191,0.103,0.344c-0.013,0.152,0.012,0.33,0.075,0.33s0.191-0.216,0.191-0.216s0.279-0.189,0.267,0.013c-0.014,0.203,0.025,0.419,0.025,0.545c0,0.053,0.042,0.135,0.088,0.21c-0.005,0.059-0.004,0.119-0.009,0.178C27.388,17.153,27.387,17.327,27.436,17.39zM20.382,12.064c0.076,0.05,0.102,0.127,0.152,0.203c0.052,0.076,0.14,0.05,0.203,0.114c0.063,0.064-0.178,0.14-0.075,0.216c0.101,0.077,0.151,0.381,0.165,0.458c0.013,0.076-0.279,0.114-0.369,0.102c-0.089-0.013-0.354-0.102-0.445-0.127c-0.089-0.026-0.139-0.343-0.025-0.331c0.116,0.013,0.141-0.025,0.267-0.139c0.128-0.115-0.189-0.166-0.278-0.191c-0.089-0.025-0.268-0.305-0.331-0.394c-0.062-0.089-0.014-0.228,0.141-0.331c0.076-0.051,0.279,0.063,0.381,0c0.101-0.063,0.203-0.14,0.241-0.165c0.039-0.025,0.293,0.038,0.33,0.114c0.039,0.076,0.191,0.191,0.141,0.229c-0.052,0.038-0.281,0.076-0.356,0c-0.075-0.077-0.255,0.012-0.268,0.152C20.242,12.115,20.307,12.013,20.382,12.064zM16.875,12.28c-0.077-0.025,0.025-0.178,0.102-0.229c0.075-0.051,0.164-0.178,0.241-0.305c0.076-0.127,0.178-0.14,0.241-0.127c0.063,0.013,0.203,0.241,0.241,0.318c0.038,0.076,0.165-0.026,0.217-0.051c0.05-0.025,0.127-0.102,0.14-0.165s0.127-0.102,0.254-0.102s0.013,0.102-0.076,0.127c-0.09,0.025-0.038,0.077,0.113,0.127c0.153,0.051,0.293,0.191,0.459,0.279c0.165,0.089,0.19,0.267,0.088,0.292c-0.101,0.025-0.406,0.051-0.521,0.038c-0.114-0.013-0.254-0.127-0.419-0.153c-0.165-0.025-0.369-0.013-0.433,0.077s-0.292,0.05-0.395,0.05c-0.102,0-0.228,0.127-0.253,0.077C16.875,12.534,16.951,12.306,16.875,12.28zM17.307,9.458c0.063-0.178,0.419,0.038,0.355,0.127C17.599,9.675,17.264,9.579,17.307,9.458zM17.802,18.584c0.063,0.102-0.14,0.431-0.254,0.407c-0.113-0.027-0.076-0.318-0.038-0.382C17.548,18.545,17.769,18.529,17.802,18.584zM13.189,12.674c0.025-0.051-0.039-0.153-0.127-0.013C13.032,12.71,13.164,12.725,13.189,12.674zM20.813,8.035c0.141,0.076,0.339,0.107,0.433,0.013c0.076-0.076,0.013-0.204-0.05-0.216c-0.064-0.013-0.104-0.115,0.062-0.203c0.165-0.089,0.343-0.204,0.534-0.229c0.19-0.025,0.622-0.038,0.774,0c0.152,0.039,0.382-0.166,0.445-0.254s-0.203-0.152-0.279-0.051c-0.077,0.102-0.444,0.076-0.521,0.051c-0.076-0.025-0.686,0.102-0.812,0.102c-0.128,0-0.179,0.152-0.356,0.229c-0.179,0.076-0.42,0.191-0.509,0.229c-0.088,0.038-0.177,0.19-0.101,0.216C20.509,7.947,20.674,7.959,20.813,8.035zM14.142,12.674c0.064-0.089-0.051-0.217-0.114-0.217c-0.12,0-0.178,0.191-0.103,0.254C14.002,12.776,14.078,12.763,14.142,12.674zM14.714,13.017c0.064,0.025,0.114,0.102,0.165,0.114c0.052,0.013,0.217,0,0.167-0.127s-0.167-0.127-0.204-0.127c-0.038,0-0.203-0.038-0.267,0C14.528,12.905,14.65,12.992,14.714,13.017zM11.308,10.958c0.101,0.013,0.217-0.063,0.305-0.101c0.088-0.038,0.216-0.114,0.216-0.229c0-0.114-0.025-0.216-0.077-0.267c-0.051-0.051-0.14-0.064-0.216-0.051c-0.115,0.02-0.127,0.14-0.203,0.14c-0.076,0-0.165,0.025-0.14,0.114s0.077,0.152,0,0.19C11.117,10.793,11.205,10.946,11.308,10.958zM11.931,10.412c0.127,0.051,0.394,0.102,0.292,0.153c-0.102,0.051-0.28,0.19-0.305,0.267s0.216,0.153,0.216,0.153s-0.077,0.089-0.013,0.114c0.063,0.025,0.102-0.089,0.203-0.089c0.101,0,0.304,0.063,0.406,0.063c0.103,0,0.267-0.14,0.254-0.229c-0.013-0.089-0.14-0.229-0.254-0.28c-0.113-0.051-0.241-0.28-0.317-0.331c-0.076-0.051,0.076-0.178-0.013-0.267c-0.09-0.089-0.153-0.076-0.255-0.14c-0.102-0.063-0.191,0.013-0.254,0.089c-0.063,0.076-0.14-0.013-0.217,0.012c-0.102,0.035-0.063,0.166-0.012,0.229C11.714,10.221,11.804,10.361,11.931,10.412zM24.729,17.198c-0.083,0.037-0.153,0.47,0,0.521c0.152,0.052,0.241-0.202,0.191-0.267C24.868,17.39,24.843,17.147,24.729,17.198zM20.114,20.464c-0.159-0.045-0.177,0.166-0.304,0.306c-0.128,0.141-0.267,0.254-0.317,0.241c-0.052-0.013-0.331,0.089-0.242,0.279c0.089,0.191,0.076,0.382-0.013,0.472c-0.089,0.088,0.076,0.342,0.052,0.482c-0.026,0.139,0.037,0.229,0.215,0.229s0.242-0.064,0.318-0.229c0.076-0.166,0.088-0.331,0.164-0.47c0.077-0.141,0.141-0.434,0.179-0.51c0.038-0.075,0.114-0.316,0.102-0.457C20.254,20.669,20.204,20.489,20.114,20.464zM10.391,8.802c-0.069-0.06-0.229-0.102-0.306-0.11c-0.076-0.008-0.152,0.06-0.321,0.06c-0.168,0-0.279,0.067-0.347,0C9.349,8.684,9.068,8.65,9.042,8.692C9.008,8.749,8.941,8.751,9.008,8.87c0.069,0.118,0.12,0.186,0.179,0.178s0.262-0.017,0.288,0.051C9.5,9.167,9.569,9.226,9.712,9.184c0.145-0.042,0.263-0.068,0.296-0.119c0.033-0.051,0.263-0.059,0.263-0.059S10.458,8.861,10.391,8.802z",globe:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z", -warning:"M29.225,23.567l-3.778-6.542c-1.139-1.972-3.002-5.2-4.141-7.172l-3.778-6.542c-1.14-1.973-3.003-1.973-4.142,0L9.609,9.853c-1.139,1.972-3.003,5.201-4.142,7.172L1.69,23.567c-1.139,1.974-0.207,3.587,2.071,3.587h23.391C29.432,27.154,30.363,25.541,29.225,23.567zM16.536,24.58h-2.241v-2.151h2.241V24.58zM16.428,20.844h-2.023l-0.201-9.204h2.407L16.428,20.844z",code:"M8.982,7.107L0.322,15.77l8.661,8.662l3.15-3.15L6.621,15.77l5.511-5.511L8.982,7.107zM21.657,7.107l-3.148,3.151l5.511,5.511l-5.511,5.511l3.148,3.15l8.662-8.662L21.657,7.107z",pensil:"M25.31,2.872l-3.384-2.127c-0.854-0.536-1.979-0.278-2.517,0.576l-1.334,2.123l6.474,4.066l1.335-2.122C26.42,4.533,26.164,3.407,25.31,2.872zM6.555,21.786l6.474,4.066L23.581,9.054l-6.477-4.067L6.555,21.786zM5.566,26.952l-0.143,3.819l3.379-1.787l3.14-1.658l-6.246-3.925L5.566,26.952z",pen:"M13.587,12.074c-0.049-0.074-0.11-0.147-0.188-0.202c-0.333-0.243-0.803-0.169-1.047,0.166c-0.244,0.336-0.167,0.805,0.167,1.048c0.303,0.22,0.708,0.167,0.966-0.091l-7.086,9.768l-2.203,7.997l6.917-4.577L26.865,4.468l-4.716-3.42l-1.52,2.096c-0.087-0.349-0.281-0.676-0.596-0.907c-0.73-0.529-1.751-0.369-2.28,0.363C14.721,6.782,16.402,7.896,13.587,12.074zM10.118,25.148L6.56,27.503l1.133-4.117L10.118,25.148zM14.309,11.861c2.183-3.225,1.975-4.099,3.843-6.962c0.309,0.212,0.664,0.287,1.012,0.269L14.309,11.861z",plus:"M25.979,12.896 19.312,12.896 19.312,6.229 12.647,6.229 12.647,12.896 5.979,12.896 5.979,19.562 12.647,19.562 12.647,26.229 19.312,26.229 19.312,19.562 25.979,19.562z",minus:"M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z",tshirt:"M20.1,4.039c-0.681,1.677-2.32,2.862-4.24,2.862c-1.921,0-3.56-1.185-4.24-2.862L1.238,8.442l2.921,6.884l3.208-1.361V28h17.099V14.015l3.093,1.312l2.922-6.884L20.1,4.039z",sticker:"M15.5,1.999c-1.042,0-1.916,0.377-2.57,1.088L2.895,13.138C2.302,13.784,1.999,14.58,1.999,15.5C1.999,22.943,8.057,29,15.5,29S29,22.943,29,15.5S22.943,1.999,15.5,1.999zM15.5,28C8.596,28,3,22.404,3,15.5c0-3.452,5.239-2.737,7.501-4.999C12.762,8.239,12.048,3,15.5,3C22.404,3,28,8.597,28,15.5S22.404,28,15.5,28z",page2:"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM22.157,6.545c0.805,0.786,1.529,1.676,2.069,2.534c-0.468-0.185-0.959-0.322-1.42-0.431c-1.015-0.228-2.008-0.32-2.625-0.357c0.003-0.133,0.004-0.283,0.004-0.446c0-0.869-0.055-2.108-0.356-3.2c-0.003-0.01-0.005-0.02-0.009-0.03C20.584,5.119,21.416,5.788,22.157,6.545zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z",page:"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z",landscape1:"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM26.914,12.314c-0.008-0.005-0.019-0.007-0.029-0.01c-1.092-0.293-2.33-0.355-3.199-0.355c-0.162,0-0.312,0.002-0.445,0.004c-0.037-0.604-0.129-1.604-0.356-2.625c-0.11-0.461-0.246-0.94-0.433-1.42c0.857,0.541,1.748,1.264,2.535,2.068C25.74,10.718,26.41,11.551,26.914,12.314zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z",landscape2:"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z",plugin:"M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z",bookmark:"M17.396,1.841L6.076,25.986l7.341-4.566l1.186,8.564l11.32-24.146L17.396,1.841zM19.131,9.234c-0.562-0.264-0.805-0.933-0.541-1.495c0.265-0.562,0.934-0.805,1.496-0.541s0.805,0.934,0.541,1.496S19.694,9.498,19.131,9.234z",hammer:"M7.831,29.354c0.685,0.353,1.62,1.178,2.344,0.876c0.475-0.195,0.753-1.301,1.048-1.883c2.221-4.376,4.635-9.353,6.392-13.611c0-0.19,0.101-0.337-0.049-0.595c0.983-1.6,1.65-3.358,2.724-5.138c0.34-0.566,0.686-1.351,1.163-1.577l0.881-0.368c1.12-0.288,1.938-0.278,2.719,0.473c0.396,0.383,0.578,1.015,0.961,1.395c0.259,0.26,1.246,0.899,1.613,0.8c0.285-0.077,0.52-0.364,0.72-0.728l0.696-1.286c0.195-0.366,0.306-0.718,0.215-0.999c-0.117-0.362-1.192-0.84-1.552-0.915c-0.528-0.113-1.154,0.081-1.692-0.041c-1.057-0.243-1.513-0.922-1.883-2.02c-2.608-1.533-6.119-2.53-10.207-1.244c-1.109,0.349-2.172,0.614-2.901,1.323c-0.146,0.412,0.143,0.494,0.446,0.489c-0.237,0.216-0.62,0.341-0.399,0.848c2.495-1.146,7.34-1.542,7.669,0.804c0.072,0.522-0.395,1.241-0.682,1.835c-0.905,1.874-2.011,3.394-2.813,5.091c-0.298,0.017-0.366,0.18-0.525,0.287c-2.604,3.8-5.451,8.541-7.9,12.794c-0.326,0.566-1.098,1.402-1.002,1.906C5.961,28.641,7.146,29,7.831,29.354z",users:"M21.053,20.8c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68h-0.34c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888C28.469,23.686,22.185,21.252,21.053,20.8zM8.583,20.628c-0.099-0.18-0.148-0.31-0.148-0.31s-0.432,0.239-0.432-0.432s0.432,0.432,0.864-2.159c0,0,1.199-0.336,0.959-3.119H9.538c0,0,0.143-0.591,0.237-1.334c-0.004-0.308,0.006-0.636,0.037-0.996l0.038-0.426c-0.021-0.492-0.107-0.939-0.312-1.226C8.818,9.619,8.53,8.947,6.947,8.467c-1.583-0.48-1.008-0.385-2.159-0.336C3.636,8.179,2.676,8.802,2.676,9.139c0,0-0.72,0.048-1.008,0.336c-0.271,0.271-0.705,1.462-0.757,1.885v0.281c0.047,0.653,0.258,2.449,0.469,2.872l-0.286,0.096c-0.239,2.783,0.959,3.119,0.959,3.119c0.432,2.591,0.864,1.488,0.864,2.159s-0.432,0.432-0.432,0.432s-0.383,1.057-1.343,1.439c-0.061,0.024-0.139,0.056-0.232,0.092v5.234h0.575c-0.029-1.278,0.077-2.927,0.746-3.594C2.587,23.135,3.754,22.551,8.583,20.628zM30.913,11.572c-0.04-0.378-0.127-0.715-0.292-0.946c-0.719-1.008-1.008-1.679-2.59-2.159c-1.584-0.48-1.008-0.385-2.16-0.336C24.72,8.179,23.76,8.802,23.76,9.139c0,0-0.719,0.048-1.008,0.336c-0.271,0.272-0.709,1.472-0.758,1.891h0.033l0.08,0.913c0.02,0.231,0.022,0.436,0.027,0.645c0.09,0.666,0.21,1.35,0.33,1.589l-0.286,0.096c-0.239,2.783,0.96,3.119,0.96,3.119c0.432,2.591,0.863,1.488,0.863,2.159s-0.432,0.432-0.432,0.432s-0.053,0.142-0.163,0.338c4.77,1.9,5.927,2.48,6.279,2.834c0.67,0.667,0.775,2.315,0.746,3.594h0.48v-5.306c-0.016-0.006-0.038-0.015-0.052-0.021c-0.959-0.383-1.343-1.439-1.343-1.439s-0.433,0.239-0.433-0.432s0.433,0.432,0.864-2.159c0,0,0.804-0.229,0.963-1.841v-1.227c-0.001-0.018-0.001-0.033-0.003-0.051h-0.289c0,0,0.215-0.89,0.292-1.861V11.572z",user:"M20.771,12.364c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888c-0.512-0.511-6.796-2.944-7.928-3.396c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68H20.771z",customer:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h12.036l0.878-3.459l-0.781-0.781l1.344-1.344l1.344,1.344l-0.781,0.781l0.879,3.459h12.035C28.977,26.709,29.039,24.332,28.523,23.813z",employee:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM22.188,26.062h-4.562v-1.25h4.562V26.062z",anonymous:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM16.618,13.693c-0.398-0.251-0.783-1.211-0.783-1.64c0-0.133,0-0.236,0-0.236c-0.105-0.106-0.574-0.096-0.67,0c0,0,0,0.104,0,0.236c0,0.429-0.385,1.389-0.783,1.64c-0.399,0.251-1.611,0.237-2.084-0.236c-0.473-0.473-0.524-1.663-0.643-1.78c-0.118-0.119-0.185-0.185-0.185-0.185l0.029-0.414c0,0,0.842-0.207,1.699-0.207s1.803,0.502,1.803,0.502c0.231-0.074,0.784-0.083,0.996,0c0,0,0.945-0.502,1.803-0.502s1.699,0.207,1.699,0.207l0.029,0.414c0,0-0.066,0.066-0.185,0.185c-0.118,0.118-0.169,1.308-0.643,1.78C18.229,13.93,17.018,13.944,16.618,13.693z",skull:"M25.947,11.14c0-5.174-3.979-9.406-10.613-9.406c-6.633,0-10.282,4.232-10.282,9.406c0,5.174,1.459,4.511,1.459,7.43c0,1.095-1.061,0.564-1.061,2.919c0,2.587,3.615,2.223,4.677,3.283c1.061,1.062,0.961,3.019,0.961,3.019s0.199,0.796,0.564,0.563c0,0,0.232,0.564,0.498,0.232c0,0,0.265,0.563,0.531,0.1c0,0,0.265,0.631,0.696,0.166c0,0,0.431,0.63,0.929,0.133c0,0,0.564,0.53,1.194,0.133c0.63,0.397,1.194-0.133,1.194-0.133c0.497,0.497,0.929-0.133,0.929-0.133c0.432,0.465,0.695-0.166,0.695-0.166c0.268,0.464,0.531-0.1,0.531-0.1c0.266,0.332,0.498-0.232,0.498-0.232c0.365,0.232,0.564-0.563,0.564-0.563s-0.1-1.957,0.961-3.019c1.062-1.061,4.676-0.696,4.676-3.283c0-2.354-1.061-1.824-1.061-2.919C24.488,15.651,25.947,16.314,25.947,11.14zM10.333,20.992c-1.783,0.285-2.59-0.215-2.785-1.492c-0.508-3.328,2.555-3.866,4.079-3.683c0.731,0.088,1.99,0.862,1.99,1.825C13.617,20.229,11.992,20.727,10.333,20.992zM16.461,25.303c-0.331,0-0.862-0.431-0.895-1.227c-0.033,0.796-0.63,1.227-0.961,1.227c-0.332,0-0.83-0.331-0.863-1.127c-0.033-0.796,1.028-4.013,1.792-4.013c0.762,0,1.824,3.217,1.791,4.013S16.794,25.303,16.461,25.303zM23.361,19.5c-0.195,1.277-1.004,1.777-2.787,1.492c-1.658-0.266-3.283-0.763-3.283-3.35c0-0.963,1.258-1.737,1.99-1.825C20.805,15.634,23.869,16.172,23.361,19.5z",mail:"M28.516,7.167H3.482l12.517,7.108L28.516,7.167zM16.74,17.303C16.51,17.434,16.255,17.5,16,17.5s-0.51-0.066-0.741-0.197L2.5,10.06v14.773h27V10.06L16.74,17.303z",picture:"M2.5,4.833v22.334h27V4.833H2.5zM25.25,25.25H6.75V6.75h18.5V25.25zM11.25,14c1.426,0,2.583-1.157,2.583-2.583c0-1.427-1.157-2.583-2.583-2.583c-1.427,0-2.583,1.157-2.583,2.583C8.667,12.843,9.823,14,11.25,14zM24.251,16.25l-4.917-4.917l-6.917,6.917L10.5,16.333l-2.752,2.752v5.165h16.503V16.25z",bubble:"M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z",codetalk:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM13.704,19.47l-2.338,2.336l-6.43-6.431l6.429-6.432l2.339,2.341l-4.091,4.091L13.704,19.47zM20.775,21.803l-2.337-2.339l4.092-4.09l-4.092-4.092l2.337-2.339l6.43,6.426L20.775,21.803z",talkq:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z",talke:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.982,21.375h-1.969v-1.889h1.969V21.375zM16.982,17.469v0.625h-1.969v-0.769c0-2.321,2.641-2.689,2.641-4.337c0-0.752-0.672-1.329-1.553-1.329c-0.912,0-1.713,0.672-1.713,0.672l-1.12-1.393c0,0,1.104-1.153,3.009-1.153c1.81,0,3.49,1.121,3.49,3.009C19.768,15.437,16.982,15.741,16.982,17.469z",home:"M27.812,16l-3.062-3.062V5.625h-2.625v4.688L16,4.188L4.188,16L7,15.933v11.942h17.875V16H27.812zM16,26.167h-5.833v-7H16V26.167zM21.667,23.167h-3.833v-4.042h3.833V23.167z",lock:"M24.875,15.334v-4.876c0-4.894-3.981-8.875-8.875-8.875s-8.875,3.981-8.875,8.875v4.876H5.042v15.083h21.916V15.334H24.875zM10.625,10.458c0-2.964,2.411-5.375,5.375-5.375s5.375,2.411,5.375,5.375v4.876h-10.75V10.458zM18.272,26.956h-4.545l1.222-3.667c-0.782-0.389-1.324-1.188-1.324-2.119c0-1.312,1.063-2.375,2.375-2.375s2.375,1.062,2.375,2.375c0,0.932-0.542,1.73-1.324,2.119L18.272,26.956z",unlock:"M24.875,15.334v-4.876c0-4.894-3.981-8.875-8.875-8.875s-8.875,3.981-8.875,8.875v0.375h3.5v-0.375c0-2.964,2.411-5.375,5.375-5.375s5.375,2.411,5.375,5.375v4.876H5.042v15.083h21.916V15.334H24.875zM18.272,26.956h-4.545l1.222-3.667c-0.782-0.389-1.324-1.188-1.324-2.119c0-1.312,1.063-2.375,2.375-2.375s2.375,1.062,2.375,2.375c0,0.932-0.542,1.73-1.324,2.119L18.272,26.956z",clip:"M23.898,6.135c-1.571-1.125-3.758-0.764-4.884,0.808l-8.832,12.331c-0.804,1.122-0.546,2.684,0.577,3.488c1.123,0.803,2.684,0.545,3.488-0.578l6.236-8.706l-0.813-0.583l-6.235,8.707h0c-0.483,0.672-1.42,0.828-2.092,0.347c-0.673-0.481-0.827-1.419-0.345-2.093h0l8.831-12.33l0.001-0.001l-0.002-0.001c0.803-1.119,2.369-1.378,3.489-0.576c1.12,0.803,1.379,2.369,0.577,3.489v-0.001l-9.68,13.516l0.001,0.001c-1.124,1.569-3.316,1.931-4.885,0.808c-1.569-1.125-1.93-3.315-0.807-4.885l7.035-9.822l-0.813-0.582l-7.035,9.822c-1.447,2.02-0.982,4.83,1.039,6.277c2.021,1.448,4.831,0.982,6.278-1.037l9.68-13.516C25.83,9.447,25.47,7.261,23.898,6.135z",star:"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375z",staroff:"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375zM22.979,26.209l-2.664-8.205l6.979-5.062h-8.627L16,4.729l-2.666,8.206H4.708l6.979,5.07l-2.666,8.203L16,21.146L22.979,26.209L22.979,26.209z",star2:"M14.615,4.928c0.487-0.986,1.284-0.986,1.771,0l2.249,4.554c0.486,0.986,1.775,1.923,2.864,2.081l5.024,0.73c1.089,0.158,1.335,0.916,0.547,1.684l-3.636,3.544c-0.788,0.769-1.28,2.283-1.095,3.368l0.859,5.004c0.186,1.085-0.459,1.553-1.433,1.041l-4.495-2.363c-0.974-0.512-2.567-0.512-3.541,0l-4.495,2.363c-0.974,0.512-1.618,0.044-1.432-1.041l0.858-5.004c0.186-1.085-0.307-2.6-1.094-3.368L3.93,13.977c-0.788-0.768-0.542-1.525,0.547-1.684l5.026-0.73c1.088-0.158,2.377-1.095,2.864-2.081L14.615,4.928z",star2off:"M26.522,12.293l-5.024-0.73c-1.089-0.158-2.378-1.095-2.864-2.081l-2.249-4.554c-0.487-0.986-1.284-0.986-1.771,0l-2.247,4.554c-0.487,0.986-1.776,1.923-2.864,2.081l-5.026,0.73c-1.088,0.158-1.334,0.916-0.547,1.684l3.637,3.544c0.788,0.769,1.28,2.283,1.094,3.368l-0.858,5.004c-0.186,1.085,0.458,1.553,1.432,1.041l4.495-2.363c0.974-0.512,2.566-0.512,3.541,0l4.495,2.363c0.974,0.512,1.618,0.044,1.433-1.041l-0.859-5.004c-0.186-1.085,0.307-2.6,1.095-3.368l3.636-3.544C27.857,13.209,27.611,12.452,26.522,12.293zM22.037,16.089c-1.266,1.232-1.966,3.394-1.67,5.137l0.514,2.984l-2.679-1.409c-0.757-0.396-1.715-0.612-2.702-0.612s-1.945,0.216-2.7,0.61l-2.679,1.409l0.511-2.982c0.297-1.743-0.404-3.905-1.671-5.137l-2.166-2.112l2.995-0.435c1.754-0.255,3.592-1.591,4.373-3.175L15.5,7.652l1.342,2.716c0.781,1.583,2.617,2.92,4.369,3.173l2.992,0.435L22.037,16.089z",star3:"M22.441,28.181c-0.419,0-0.835-0.132-1.189-0.392l-5.751-4.247L9.75,27.789c-0.354,0.26-0.771,0.392-1.189,0.392c-0.412,0-0.824-0.128-1.175-0.384c-0.707-0.511-1-1.422-0.723-2.25l2.26-6.783l-5.815-4.158c-0.71-0.509-1.009-1.416-0.74-2.246c0.268-0.826,1.037-1.382,1.904-1.382c0.004,0,0.01,0,0.014,0l7.15,0.056l2.157-6.816c0.262-0.831,1.035-1.397,1.906-1.397s1.645,0.566,1.906,1.397l2.155,6.816l7.15-0.056c0.004,0,0.01,0,0.015,0c0.867,0,1.636,0.556,1.903,1.382c0.271,0.831-0.028,1.737-0.739,2.246l-5.815,4.158l2.263,6.783c0.276,0.826-0.017,1.737-0.721,2.25C23.268,28.053,22.854,28.181,22.441,28.181L22.441,28.181z",star3off:"M28.631,12.359c-0.268-0.826-1.036-1.382-1.903-1.382h-0.015l-7.15,0.056l-2.155-6.816c-0.262-0.831-1.035-1.397-1.906-1.397s-1.645,0.566-1.906,1.397l-2.157,6.816l-7.15-0.056H4.273c-0.868,0-1.636,0.556-1.904,1.382c-0.27,0.831,0.029,1.737,0.74,2.246l5.815,4.158l-2.26,6.783c-0.276,0.828,0.017,1.739,0.723,2.25c0.351,0.256,0.763,0.384,1.175,0.384c0.418,0,0.834-0.132,1.189-0.392l5.751-4.247l5.751,4.247c0.354,0.26,0.771,0.392,1.189,0.392c0.412,0,0.826-0.128,1.177-0.384c0.704-0.513,0.997-1.424,0.721-2.25l-2.263-6.783l5.815-4.158C28.603,14.097,28.901,13.19,28.631,12.359zM19.712,17.996l2.729,8.184l-6.94-5.125L8.56,26.18l2.729-8.184l-7.019-5.018l8.627,0.066L15.5,4.82l2.603,8.225l8.627-0.066L19.712,17.996z",chat:"M15.985,5.972c-7.563,0-13.695,4.077-13.695,9.106c0,2.877,2.013,5.44,5.147,7.108c-0.446,1.479-1.336,3.117-3.056,4.566c0,0,4.015-0.266,6.851-3.143c0.163,0.04,0.332,0.07,0.497,0.107c-0.155-0.462-0.246-0.943-0.246-1.443c0-3.393,3.776-6.05,8.599-6.05c3.464,0,6.379,1.376,7.751,3.406c1.168-1.34,1.847-2.892,1.847-4.552C29.68,10.049,23.548,5.972,15.985,5.972zM27.68,22.274c0-2.79-3.401-5.053-7.599-5.053c-4.196,0-7.599,2.263-7.599,5.053c0,2.791,3.403,5.053,7.599,5.053c0.929,0,1.814-0.116,2.637-0.319c1.573,1.597,3.801,1.744,3.801,1.744c-0.954-0.804-1.447-1.713-1.695-2.534C26.562,25.293,27.68,23.871,27.68,22.274z",quote:"M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z",gear:"M26.974,16.514l3.765-1.991c-0.074-0.738-0.217-1.454-0.396-2.157l-4.182-0.579c-0.362-0.872-0.84-1.681-1.402-2.423l1.594-3.921c-0.524-0.511-1.09-0.977-1.686-1.406l-3.551,2.229c-0.833-0.438-1.73-0.77-2.672-0.984l-1.283-3.976c-0.364-0.027-0.728-0.056-1.099-0.056s-0.734,0.028-1.099,0.056l-1.271,3.941c-0.967,0.207-1.884,0.543-2.738,0.986L7.458,4.037C6.863,4.466,6.297,4.932,5.773,5.443l1.55,3.812c-0.604,0.775-1.11,1.629-1.49,2.55l-4.05,0.56c-0.178,0.703-0.322,1.418-0.395,2.157l3.635,1.923c0.041,1.013,0.209,1.994,0.506,2.918l-2.742,3.032c0.319,0.661,0.674,1.303,1.085,1.905l4.037-0.867c0.662,0.72,1.416,1.351,2.248,1.873l-0.153,4.131c0.663,0.299,1.352,0.549,2.062,0.749l2.554-3.283C15.073,26.961,15.532,27,16,27c0.507,0,1.003-0.046,1.491-0.113l2.567,3.301c0.711-0.2,1.399-0.45,2.062-0.749l-0.156-4.205c0.793-0.513,1.512-1.127,2.146-1.821l4.142,0.889c0.411-0.602,0.766-1.243,1.085-1.905l-2.831-3.131C26.778,18.391,26.93,17.467,26.974,16.514zM20.717,21.297l-1.785,1.162l-1.098-1.687c-0.571,0.22-1.186,0.353-1.834,0.353c-2.831,0-5.125-2.295-5.125-5.125c0-2.831,2.294-5.125,5.125-5.125c2.83,0,5.125,2.294,5.125,5.125c0,1.414-0.573,2.693-1.499,3.621L20.717,21.297z",smallgear:"M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z",wrench:"M26.834,14.693c1.816-2.088,2.181-4.938,1.193-7.334l-3.646,4.252l-3.594-0.699L19.596,7.45l3.637-4.242c-2.502-0.63-5.258,0.13-7.066,2.21c-1.907,2.193-2.219,5.229-1.039,7.693L5.624,24.04c-1.011,1.162-0.888,2.924,0.274,3.935c1.162,1.01,2.924,0.888,3.935-0.274l9.493-10.918C21.939,17.625,24.918,16.896,26.834,14.693z",wrench2:"M24.946,9.721l-2.872-0.768l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172l-3.476,3.478l-3.478,3.478c-2.062-0.816-4.504-0.391-6.173,1.277c-1.583,1.581-2.043,3.856-1.39,5.849l3.231-3.188l2.874,0.77l0.769,2.872l-3.239,3.197c1.998,0.665,4.288,0.207,5.876-1.384c1.678-1.678,2.1-4.133,1.271-6.202l3.463-3.464l3.464-3.463c2.069,0.828,4.523,0.406,6.202-1.272c1.592-1.589,2.049-3.878,1.384-5.876L24.946,9.721z",wrench3:"M27.839,6.775l-3.197,3.239L21.77,9.246l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172L7.42,20.344c-0.204-0.032-0.408-0.062-0.621-0.062c-2.173,0-3.933,1.759-3.933,3.933c0,2.173,1.76,3.933,3.933,3.933c2.171,0,3.931-1.76,3.933-3.933c0-0.24-0.03-0.473-0.071-0.7l9.592-9.59c2.069,0.828,4.523,0.406,6.202-1.272C28.047,11.062,28.504,8.772,27.839,6.775zM6.799,25.146c-0.517,0-0.933-0.418-0.935-0.933c0.002-0.515,0.418-0.933,0.935-0.933c0.514,0,0.932,0.418,0.932,0.933S7.313,25.146,6.799,25.146z",screwdriver:"M19.387,14.373c2.119-2.619,5.322-6.77,5.149-7.75c-0.128-0.729-0.882-1.547-1.763-2.171c-0.883-0.625-1.916-1.044-2.645-0.915c-0.98,0.173-3.786,4.603-5.521,7.49c-0.208,0.344,0.328,1.177,0.156,1.468c-0.172,0.292-1.052,0.042-1.18,0.261c-0.263,0.451-0.417,0.722-0.417,0.722s-0.553,0.823,1.163,2.163l-5.233,7.473c-0.267,0.381-1.456,0.459-1.456,0.459l-1.184,3.312l0.859,0.602l2.708-2.246c0,0-0.334-1.143-0.068-1.523l5.242-7.489c1.719,1,2.377,0.336,2.377,0.336s0.201-0.238,0.536-0.639c0.161-0.194-0.374-0.936-0.159-1.197C18.169,14.467,19.133,14.685,19.387,14.373z",hammerandscrewdriver:"M28.537,9.859c-0.473-0.259-1.127-0.252-1.609-0.523c-0.943-0.534-1.186-1.316-1.226-2.475c-2.059-2.215-5.138-4.176-9.424-4.114c-1.162,0.017-2.256-0.035-3.158,0.435c-0.258,0.354-0.004,0.516,0.288,0.599c-0.29,0.138-0.692,0.147-0.626,0.697c2.72-0.383,7.475,0.624,7.116,2.966c-0.08,0.521-0.735,1.076-1.179,1.563c-1.263,1.382-2.599,2.45-3.761,3.667l0.336,0.336c0.742-0.521,1.446-0.785,2.104-0.785c0.707,0,1.121,0.297,1.276,0.433c0.575-0.618,1.166-1.244,1.839-1.853c0.488-0.444,1.047-1.099,1.566-1.178l0.949-0.101c1.156,0.047,1.937,0.29,2.471,1.232c0.27,0.481,0.262,1.139,0.521,1.613c0.175,0.324,0.937,1.218,1.316,1.228c0.294,0.009,0.603-0.199,0.899-0.49l1.033-1.034c0.291-0.294,0.501-0.6,0.492-0.896C29.754,10.801,28.861,10.035,28.537,9.859zM13.021,15.353l-0.741-0.741c-3.139,2.643-6.52,5.738-9.531,8.589c-0.473,0.443-1.452,1.021-1.506,1.539c-0.083,0.781,0.95,1.465,1.506,2c0.556,0.533,1.212,1.602,1.994,1.51c0.509-0.043,1.095-1.029,1.544-1.502c2.255-2.374,4.664-4.976,6.883-7.509c-0.312-0.371-0.498-0.596-0.498-0.596C12.535,18.451,11.779,17.272,13.021,15.353zM20.64,15.643c-0.366-0.318-1.466,0.143-1.777-0.122c-0.311-0.266,0.171-1.259-0.061-1.455c-0.482-0.406-0.77-0.646-0.77-0.646s-0.862-0.829-2.812,0.928L7.44,6.569C7.045,6.173,7.203,4.746,7.203,4.746L3.517,2.646L2.623,3.541l2.1,3.686c0,0,1.428-0.158,1.824,0.237l7.792,7.793c-1.548,1.831-0.895,2.752-0.895,2.752s0.238,0.288,0.646,0.771c0.196,0.23,1.188-0.249,1.455,0.061c0.264,0.312-0.196,1.41,0.12,1.777c2.666,3.064,6.926,7.736,8.125,7.736c0.892,0,2.021-0.724,2.948-1.64c0.925-0.917,1.639-2.055,1.639-2.947C28.377,22.567,23.704,18.309,20.64,15.643z",magic:"M23.043,4.649l-0.404-2.312l-1.59,1.727l-2.323-0.33l1.151,2.045l-1.032,2.108l2.302-0.463l1.686,1.633l0.271-2.332l2.074-1.099L23.043,4.649zM26.217,18.198l-0.182-1.25l-0.882,0.905l-1.245-0.214l0.588,1.118l-0.588,1.118l1.245-0.214l0.882,0.905l0.182-1.25l1.133-0.56L26.217,18.198zM4.92,7.672L5.868,7.3l0.844,0.569L6.65,6.853l0.802-0.627L6.467,5.97L6.118,5.013L5.571,5.872L4.553,5.908l0.647,0.786L4.92,7.672zM10.439,10.505l1.021-1.096l1.481,0.219l-0.727-1.31l0.667-1.341l-1.47,0.287l-1.069-1.048L10.16,7.703L8.832,8.396l1.358,0.632L10.439,10.505zM17.234,12.721c-0.588-0.368-1.172-0.618-1.692-0.729c-0.492-0.089-1.039-0.149-1.425,0.374L2.562,30.788h6.68l9.669-15.416c0.303-0.576,0.012-1.041-0.283-1.447C18.303,13.508,17.822,13.09,17.234,12.721zM13.613,21.936c-0.254-0.396-0.74-0.857-1.373-1.254c-0.632-0.396-1.258-0.634-1.726-0.69l4.421-7.052c0.064-0.013,0.262-0.021,0.543,0.066c0.346,0.092,0.785,0.285,1.225,0.562c0.504,0.313,0.908,0.677,1.133,0.97c0.113,0.145,0.178,0.271,0.195,0.335c0.002,0.006,0.004,0.011,0.004,0.015L13.613,21.936z",download:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,28.792c-1.549,0-2.806-1.256-2.806-2.806s1.256-2.806,2.806-2.806c1.55,0,2.806,1.256,2.806,2.806S17.55,28.792,16,28.792zM16,21.087l-7.858-6.562h3.469V5.747h8.779v8.778h3.468L16,21.087z",view:"M16,8.286C8.454,8.286,2.5,16,2.5,16s5.954,7.715,13.5,7.715c5.771,0,13.5-7.715,13.5-7.715S21.771,8.286,16,8.286zM16,20.807c-2.649,0-4.807-2.157-4.807-4.807s2.158-4.807,4.807-4.807s4.807,2.158,4.807,4.807S18.649,20.807,16,20.807zM16,13.194c-1.549,0-2.806,1.256-2.806,2.806c0,1.55,1.256,2.806,2.806,2.806c1.55,0,2.806-1.256,2.806-2.806C18.806,14.451,17.55,13.194,16,13.194z",noview:"M11.478,17.568c-0.172-0.494-0.285-1.017-0.285-1.568c0-2.65,2.158-4.807,4.807-4.807c0.552,0,1.074,0.113,1.568,0.285l2.283-2.283C18.541,8.647,17.227,8.286,16,8.286C8.454,8.286,2.5,16,2.5,16s2.167,2.791,5.53,5.017L11.478,17.568zM23.518,11.185l-3.056,3.056c0.217,0.546,0.345,1.138,0.345,1.76c0,2.648-2.158,4.807-4.807,4.807c-0.622,0-1.213-0.128-1.76-0.345l-2.469,2.47c1.327,0.479,2.745,0.783,4.229,0.783c5.771,0,13.5-7.715,13.5-7.715S26.859,13.374,23.518,11.185zM25.542,4.917L4.855,25.604L6.27,27.02L26.956,6.332L25.542,4.917z",cloud:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h15.875c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z",cloud2:"M7.562,24.812c-3.313,0-6-2.687-6-6l0,0c0.002-2.659,1.734-4.899,4.127-5.684l0,0c0.083-2.26,1.937-4.064,4.216-4.066l0,0c0.73,0,1.415,0.19,2.01,0.517l0,0c1.266-2.105,3.57-3.516,6.208-3.517l0,0c3.947,0.002,7.157,3.155,7.248,7.079l0,0c2.362,0.804,4.062,3.034,4.064,5.671l0,0c0,3.313-2.687,6-6,6l0,0H7.562L7.562,24.812zM24.163,14.887c-0.511-0.095-0.864-0.562-0.815-1.079l0,0c0.017-0.171,0.027-0.336,0.027-0.497l0,0c-0.007-2.899-2.352-5.245-5.251-5.249l0,0c-2.249-0.002-4.162,1.418-4.911,3.41l0,0c-0.122,0.323-0.406,0.564-0.748,0.63l0,0c-0.34,0.066-0.694-0.052-0.927-0.309l0,0c-0.416-0.453-0.986-0.731-1.633-0.731l0,0c-1.225,0.002-2.216,0.993-2.22,2.218l0,0c0,0.136,0.017,0.276,0.045,0.424l0,0c0.049,0.266-0.008,0.54-0.163,0.762l0,0c-0.155,0.223-0.392,0.371-0.657,0.414l0,0c-1.9,0.313-3.352,1.949-3.35,3.931l0,0c0.004,2.209,1.792,3.995,4.001,4.001l0,0h15.874c2.209-0.006,3.994-1.792,3.999-4.001l0,0C27.438,16.854,26.024,15.231,24.163,14.887L24.163,14.887",cloudDown:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h3.404l-0.707-0.707c-0.377-0.377-0.585-0.879-0.585-1.413c0-0.533,0.208-1.035,0.585-1.412l0.556-0.557c0.4-0.399,0.937-0.628,1.471-0.628c0.027,0,0.054,0,0.08,0.002v-0.472c0-1.104,0.898-2.002,2-2.002h3.266c1.103,0,2,0.898,2,2.002v0.472c0.027-0.002,0.054-0.002,0.081-0.002c0.533,0,1.07,0.229,1.47,0.63l0.557,0.552c0.78,0.781,0.78,2.05,0,2.828l-0.706,0.707h2.403c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M21.033,20.986l-0.556-0.555c-0.39-0.389-0.964-0.45-1.276-0.137c-0.312,0.312-0.568,0.118-0.568-0.432v-1.238c0-0.55-0.451-1-1-1h-3.265c-0.55,0-1,0.45-1,1v1.238c0,0.55-0.256,0.744-0.569,0.432c-0.312-0.313-0.887-0.252-1.276,0.137l-0.556,0.555c-0.39,0.389-0.39,1.024-0.001,1.413l4.328,4.331c0.194,0.194,0.451,0.291,0.707,0.291s0.512-0.097,0.707-0.291l4.327-4.331C21.424,22.011,21.423,21.375,21.033,20.986z",cloudUp:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h2.312c-0.126-0.266-0.2-0.556-0.2-0.859c0-0.535,0.208-1.04,0.587-1.415l4.325-4.329c0.375-0.377,0.877-0.585,1.413-0.585c0.54,0,1.042,0.21,1.417,0.587l4.323,4.329c0.377,0.373,0.585,0.878,0.585,1.413c0,0.304-0.073,0.594-0.2,0.859h1.312c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M16.706,17.916c-0.193-0.195-0.45-0.291-0.706-0.291s-0.512,0.096-0.707,0.291l-4.327,4.33c-0.39,0.389-0.389,1.025,0.001,1.414l0.556,0.555c0.39,0.389,0.964,0.449,1.276,0.137s0.568-0.119,0.568,0.432v1.238c0,0.549,0.451,1,1,1h3.265c0.551,0,1-0.451,1-1v-1.238c0-0.551,0.256-0.744,0.569-0.432c0.312,0.312,0.887,0.252,1.276-0.137l0.556-0.555c0.39-0.389,0.39-1.025,0.001-1.414L16.706,17.916z", -location:"M16,3.5c-4.142,0-7.5,3.358-7.5,7.5c0,4.143,7.5,18.121,7.5,18.121S23.5,15.143,23.5,11C23.5,6.858,20.143,3.5,16,3.5z M16,14.584c-1.979,0-3.584-1.604-3.584-3.584S14.021,7.416,16,7.416S19.584,9.021,19.584,11S17.979,14.584,16,14.584z",loaction2:"M15.834,29.084 15.834,16.166 2.917,16.166 29.083,2.917z",volume0:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z",volume1:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z",volume2:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z",volume3:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z M23.28,6.746c-0.393-0.391-1.025-0.389-1.414,0.002c-0.391,0.389-0.391,1.023,0.002,1.413h-0.002c2.009,2.009,3.248,4.773,3.248,7.839c0,3.063-1.239,5.828-3.246,7.838c-0.391,0.39-0.391,1.023,0.002,1.415c0.194,0.194,0.45,0.291,0.706,0.291s0.513-0.098,0.708-0.293c2.363-2.366,3.831-5.643,3.829-9.251C27.115,12.389,25.647,9.111,23.28,6.746z",bell:"M24.264,20.958c-2.484-4.226-2.168-13.199-6.143-15.486c0.254-0.395,0.404-0.861,0.404-1.366c0-1.396-1.129-2.526-2.526-2.526c-1.396,0-2.527,1.131-2.527,2.526c0,0.505,0.151,0.973,0.406,1.367C9.905,7.76,10.221,16.732,7.736,20.958C5.585,21.523,4.25,22.311,4.25,23.18v1.125c0,1.604,3.877,2.938,9.077,3.283c-0.003,0.048-0.015,0.096-0.015,0.145c0,1.483,1.203,2.688,2.688,2.688c1.484,0,2.688-1.203,2.688-2.688c0-0.049-0.012-0.097-0.015-0.145c5.199-0.349,9.077-1.688,9.077-3.283V23.18C27.75,22.311,26.415,21.523,24.264,20.958zM14.472,4.105c0.002-0.843,0.685-1.525,1.527-1.527c0.843,0.002,1.526,0.685,1.528,1.527c-0.002,0.372-0.144,0.708-0.361,0.974c-0.359-0.096-0.745-0.15-1.166-0.15s-0.807,0.055-1.167,0.15C14.612,4.814,14.473,4.478,14.472,4.105z",mute:"M21.328,8.956c-0.605-1.545-1.4-2.809-2.572-3.484c0.254-0.395,0.404-0.861,0.404-1.366c0-1.396-1.129-2.526-2.526-2.526c-1.396,0-2.526,1.131-2.526,2.526c0,0.505,0.15,0.973,0.405,1.367C10.54,7.76,10.856,16.732,8.371,20.958c-2.151,0.565-3.486,1.353-3.486,2.222v1.125c0,0.271,0.117,0.525,0.322,0.774L21.328,8.956zM16.635,2.578c0.844,0.002,1.525,0.685,1.527,1.527c0,0.372-0.139,0.708-0.36,0.974c-0.358-0.096-0.745-0.15-1.165-0.15c-0.422,0-0.808,0.055-1.167,0.15c-0.221-0.265-0.359-0.602-0.36-0.974C15.109,3.263,15.792,2.58,16.635,2.578zM24.898,20.958c-1.125-1.914-1.678-4.802-2.312-7.602L9.065,26.878c1.395,0.338,3.061,0.587,4.896,0.71c-0.003,0.048-0.015,0.096-0.015,0.145c0,1.483,1.203,2.688,2.688,2.688c1.485,0,2.688-1.203,2.688-2.688c0-0.049-0.012-0.097-0.016-0.145c5.188-0.349,9.062-1.688,9.062-3.283V23.18C28.385,22.311,27.05,21.523,24.898,20.958zM26.677,5.021L3.615,28.083l1.415,1.416L28.091,6.436L26.677,5.021z",key:"M18.386,16.009l0.009-0.006l-0.58-0.912c1.654-2.226,1.876-5.319,0.3-7.8c-2.043-3.213-6.303-4.161-9.516-2.118c-3.212,2.042-4.163,6.302-2.12,9.517c1.528,2.402,4.3,3.537,6.944,3.102l0.424,0.669l0.206,0.045l0.779-0.447l-0.305,1.377l2.483,0.552l-0.296,1.325l1.903,0.424l-0.68,3.06l1.406,0.313l-0.424,1.906l4.135,0.918l0.758-3.392L18.386,16.009z M10.996,8.944c-0.685,0.436-1.593,0.233-2.029-0.452C8.532,7.807,8.733,6.898,9.418,6.463s1.594-0.233,2.028,0.452C11.883,7.6,11.68,8.509,10.996,8.944z",ruler:"M6.63,21.796l-5.122,5.121h25.743V1.175L6.63,21.796zM18.702,10.48c0.186-0.183,0.48-0.183,0.664,0l1.16,1.159c0.184,0.183,0.186,0.48,0.002,0.663c-0.092,0.091-0.213,0.137-0.332,0.137c-0.121,0-0.24-0.046-0.33-0.137l-1.164-1.159C18.519,10.96,18.519,10.664,18.702,10.48zM17.101,12.084c0.184-0.183,0.48-0.183,0.662,0l2.156,2.154c0.184,0.183,0.184,0.48,0.002,0.661c-0.092,0.092-0.213,0.139-0.334,0.139s-0.24-0.046-0.33-0.137l-2.156-2.154C16.917,12.564,16.917,12.267,17.101,12.084zM15.497,13.685c0.184-0.183,0.48-0.183,0.664,0l1.16,1.161c0.184,0.183,0.182,0.48-0.002,0.663c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.24-0.046-0.332-0.138l-1.16-1.16C15.314,14.166,15.314,13.868,15.497,13.685zM13.896,15.288c0.184-0.183,0.48-0.181,0.664,0.002l1.158,1.159c0.183,0.184,0.183,0.48,0,0.663c-0.092,0.092-0.212,0.138-0.332,0.138c-0.119,0-0.24-0.046-0.332-0.138l-1.158-1.161C13.713,15.767,13.713,15.471,13.896,15.288zM12.293,16.892c0.183-0.184,0.479-0.184,0.663,0l2.154,2.153c0.184,0.184,0.184,0.481,0,0.665c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-2.153-2.155C12.11,17.371,12.11,17.075,12.293,16.892zM10.302,24.515c-0.091,0.093-0.212,0.139-0.332,0.139c-0.119,0-0.238-0.045-0.33-0.137l-2.154-2.153c-0.184-0.183-0.184-0.479,0-0.663s0.479-0.184,0.662,0l2.154,2.153C10.485,24.036,10.485,24.332,10.302,24.515zM10.912,21.918c-0.093,0.093-0.214,0.139-0.333,0.139c-0.12,0-0.24-0.045-0.33-0.137l-1.162-1.161c-0.184-0.183-0.184-0.479,0-0.66c0.184-0.185,0.48-0.187,0.664-0.003l1.161,1.162C11.095,21.438,11.095,21.735,10.912,21.918zM12.513,20.316c-0.092,0.092-0.211,0.138-0.332,0.138c-0.119,0-0.239-0.046-0.331-0.138l-1.159-1.16c-0.184-0.184-0.184-0.48,0-0.664s0.48-0.182,0.663,0.002l1.159,1.161C12.696,19.838,12.696,20.135,12.513,20.316zM22.25,21.917h-8.67l8.67-8.67V21.917zM22.13,10.7c-0.09,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-1.16-1.159c-0.184-0.183-0.184-0.479,0-0.663c0.182-0.183,0.479-0.183,0.662,0l1.16,1.159C22.312,10.221,22.313,10.517,22.13,10.7zM24.726,10.092c-0.092,0.092-0.213,0.137-0.332,0.137s-0.24-0.045-0.33-0.137l-2.154-2.154c-0.184-0.183-0.184-0.481,0-0.664s0.482-0.181,0.664,0.002l2.154,2.154C24.911,9.613,24.909,9.91,24.726,10.092z",power:"M25.542,8.354c-1.47-1.766-2.896-2.617-3.025-2.695c-0.954-0.565-2.181-0.241-2.739,0.724c-0.556,0.961-0.24,2.194,0.705,2.763c0,0,0.001,0,0.002,0.001c0.001,0,0.002,0.001,0.003,0.002c0.001,0,0.003,0.001,0.004,0.001c0.102,0.062,1.124,0.729,2.08,1.925c1.003,1.261,1.933,3.017,1.937,5.438c-0.001,2.519-1.005,4.783-2.64,6.438c-1.637,1.652-3.877,2.668-6.368,2.669c-2.491-0.001-4.731-1.017-6.369-2.669c-1.635-1.654-2.639-3.919-2.64-6.438c0.005-2.499,0.995-4.292,2.035-5.558c0.517-0.625,1.043-1.098,1.425-1.401c0.191-0.152,0.346-0.263,0.445-0.329c0.049-0.034,0.085-0.058,0.104-0.069c0.005-0.004,0.009-0.006,0.012-0.008s0.004-0.002,0.004-0.002l0,0c0.946-0.567,1.262-1.802,0.705-2.763c-0.559-0.965-1.785-1.288-2.739-0.724c-0.128,0.079-1.555,0.93-3.024,2.696c-1.462,1.751-2.974,4.511-2.97,8.157C2.49,23.775,8.315,29.664,15.5,29.667c7.186-0.003,13.01-5.892,13.012-13.155C28.516,12.864,27.005,10.105,25.542,8.354zM15.5,17.523c1.105,0,2.002-0.907,2.002-2.023h-0.001V3.357c0-1.118-0.896-2.024-2.001-2.024s-2.002,0.906-2.002,2.024V15.5C13.498,16.616,14.395,17.523,15.5,17.523z",flag:"M9.5,3v10c8,0,8,4,16,4V7C17.5,7,17.5,3,9.5,3z M6.5,29h2V3h-2V29z","flag-alt":"M19.562,10.75C21.74,8.572,25.5,7,25.5,7c-8,0-8-4-16-4v10c8,0,8,4,16,4C25.5,17,21.75,14,19.562,10.75zM6.5,29h2V3h-2V29z",tag:"M14.263,2.826H7.904L2.702,8.028v6.359L18.405,30.09l11.561-11.562L14.263,2.826zM6.495,8.859c-0.619-0.619-0.619-1.622,0-2.24C7.114,6,8.117,6,8.736,6.619c0.62,0.62,0.619,1.621,0,2.241C8.117,9.479,7.114,9.479,6.495,8.859z",search:"M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",zoomout:"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM8.854,11.884v4.001l9.665-0.001v-3.999L8.854,11.884z",zoomin:"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM15.687,9.051h-4v2.833H8.854v4.001h2.833v2.833h4v-2.834h2.832v-3.999h-2.833V9.051z",cross:"M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z",check:"M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z",settings:"M16.015,12.03c-2.156,0-3.903,1.747-3.903,3.903c0,2.155,1.747,3.903,3.903,3.903c0.494,0,0.962-0.102,1.397-0.27l0.836,1.285l1.359-0.885l-0.831-1.276c0.705-0.706,1.142-1.681,1.142-2.757C19.918,13.777,18.171,12.03,16.015,12.03zM16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM26.174,20.809c-0.241,0.504-0.513,0.99-0.826,1.45L22.19,21.58c-0.481,0.526-1.029,0.994-1.634,1.385l0.119,3.202c-0.507,0.23-1.028,0.421-1.569,0.57l-1.955-2.514c-0.372,0.051-0.75,0.086-1.136,0.086c-0.356,0-0.706-0.029-1.051-0.074l-1.945,2.5c-0.541-0.151-1.065-0.342-1.57-0.569l0.117-3.146c-0.634-0.398-1.208-0.88-1.712-1.427L6.78,22.251c-0.313-0.456-0.583-0.944-0.826-1.448l2.088-2.309c-0.226-0.703-0.354-1.451-0.385-2.223l-2.768-1.464c0.055-0.563,0.165-1.107,0.301-1.643l3.084-0.427c0.29-0.702,0.675-1.352,1.135-1.942L8.227,7.894c0.399-0.389,0.83-0.744,1.283-1.07l2.663,1.672c0.65-0.337,1.349-0.593,2.085-0.75l0.968-3.001c0.278-0.021,0.555-0.042,0.837-0.042c0.282,0,0.56,0.022,0.837,0.042l0.976,3.028c0.72,0.163,1.401,0.416,2.036,0.75l2.704-1.697c0.455,0.326,0.887,0.681,1.285,1.07l-1.216,2.986c0.428,0.564,0.793,1.181,1.068,1.845l3.185,0.441c0.135,0.535,0.247,1.081,0.302,1.643l-2.867,1.516c-0.034,0.726-0.15,1.43-0.355,2.1L26.174,20.809z",settingsalt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM24.386,14.968c-1.451,1.669-3.706,2.221-5.685,1.586l-7.188,8.266c-0.766,0.88-2.099,0.97-2.979,0.205s-0.973-2.099-0.208-2.979l7.198-8.275c-0.893-1.865-0.657-4.164,0.787-5.824c1.367-1.575,3.453-2.151,5.348-1.674l-2.754,3.212l0.901,2.621l2.722,0.529l2.761-3.22C26.037,11.229,25.762,13.387,24.386,14.968z",feed:"M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z",bug:"M28.589,10.903l-5.828,1.612c-0.534-1.419-1.338-2.649-2.311-3.628l3.082-5.44c0.271-0.48,0.104-1.092-0.38-1.365c-0.479-0.271-1.09-0.102-1.36,0.377l-2.924,5.162c-0.604-0.383-1.24-0.689-1.9-0.896c-0.416-1.437-1.652-2.411-3.058-2.562c-0.001-0.004-0.002-0.008-0.003-0.012c-0.061-0.242-0.093-0.46-0.098-0.65c-0.005-0.189,0.012-0.351,0.046-0.479c0.037-0.13,0.079-0.235,0.125-0.317c0.146-0.26,0.34-0.43,0.577-0.509c0.023,0.281,0.142,0.482,0.352,0.601c0.155,0.088,0.336,0.115,0.546,0.086c0.211-0.031,0.376-0.152,0.496-0.363c0.105-0.186,0.127-0.389,0.064-0.607c-0.064-0.219-0.203-0.388-0.414-0.507c-0.154-0.087-0.314-0.131-0.482-0.129c-0.167,0.001-0.327,0.034-0.481,0.097c-0.153,0.063-0.296,0.16-0.429,0.289c-0.132,0.129-0.241,0.271-0.33,0.426c-0.132,0.234-0.216,0.496-0.25,0.783c-0.033,0.286-0.037,0.565-0.009,0.84c0.017,0.16,0.061,0.301,0.094,0.449c-0.375-0.021-0.758,0.002-1.14,0.108c-0.482,0.133-0.913,0.36-1.28,0.653c-0.052-0.172-0.098-0.344-0.18-0.518c-0.116-0.249-0.263-0.486-0.438-0.716c-0.178-0.229-0.384-0.41-0.618-0.543C9.904,3.059,9.737,2.994,9.557,2.951c-0.18-0.043-0.352-0.052-0.516-0.027s-0.318,0.08-0.463,0.164C8.432,3.172,8.318,3.293,8.23,3.445C8.111,3.656,8.08,3.873,8.136,4.092c0.058,0.221,0.181,0.384,0.367,0.49c0.21,0.119,0.415,0.138,0.611,0.056C9.31,4.556,9.451,4.439,9.539,4.283c0.119-0.21,0.118-0.443-0.007-0.695c0.244-0.055,0.497-0.008,0.757,0.141c0.081,0.045,0.171,0.115,0.27,0.208c0.097,0.092,0.193,0.222,0.286,0.388c0.094,0.166,0.179,0.368,0.251,0.608c0.013,0.044,0.023,0.098,0.035,0.146c-0.911,0.828-1.357,2.088-1.098,3.357c-0.582,0.584-1.072,1.27-1.457,2.035l-5.16-2.926c-0.48-0.271-1.092-0.102-1.364,0.377C1.781,8.404,1.95,9.016,2.43,9.289l5.441,3.082c-0.331,1.34-0.387,2.807-0.117,4.297l-5.828,1.613c-0.534,0.147-0.846,0.699-0.698,1.231c0.147,0.53,0.697,0.843,1.231,0.694l5.879-1.627c0.503,1.057,1.363,2.28,2.371,3.443l-3.194,5.639c-0.272,0.481-0.104,1.092,0.378,1.363c0.239,0.137,0.512,0.162,0.758,0.094c0.248-0.068,0.469-0.229,0.604-0.471l2.895-5.109c2.7,2.594,5.684,4.123,5.778,1.053c1.598,2.56,3.451-0.338,4.502-3.976l5.203,2.947c0.24,0.138,0.514,0.162,0.762,0.094c0.246-0.067,0.467-0.229,0.603-0.471c0.272-0.479,0.104-1.091-0.377-1.362l-5.701-3.229c0.291-1.505,0.422-2.983,0.319-4.138l5.886-1.627c0.53-0.147,0.847-0.697,0.696-1.229C29.673,11.068,29.121,10.756,28.589,10.903z",link:"M16.45,18.085l-2.47,2.471c0.054,1.023-0.297,2.062-1.078,2.846c-1.465,1.459-3.837,1.459-5.302-0.002c-1.461-1.465-1.46-3.836-0.001-5.301c0.783-0.781,1.824-1.131,2.847-1.078l2.469-2.469c-2.463-1.057-5.425-0.586-7.438,1.426c-2.634,2.637-2.636,6.907,0,9.545c2.638,2.637,6.909,2.635,9.545,0l0.001,0.002C17.033,23.511,17.506,20.548,16.45,18.085zM14.552,12.915l2.467-2.469c-0.053-1.023,0.297-2.062,1.078-2.848C19.564,6.139,21.934,6.137,23.4,7.6c1.462,1.465,1.462,3.837,0,5.301c-0.783,0.783-1.822,1.132-2.846,1.079l-2.469,2.468c2.463,1.057,5.424,0.584,7.438-1.424c2.634-2.639,2.633-6.91,0-9.546c-2.639-2.636-6.91-2.637-9.545-0.001C13.967,7.489,13.495,10.451,14.552,12.915zM18.152,10.727l-7.424,7.426c-0.585,0.584-0.587,1.535,0,2.121c0.585,0.584,1.536,0.584,2.121-0.002l7.425-7.424c0.584-0.586,0.584-1.535,0-2.121C19.687,10.141,18.736,10.142,18.152,10.727z",calendar:"M22,4.582h-2v3.335h2V4.582zM25.416,5.748H23v3.17h-4v-3.17h-6v3.168H9.002V5.748H6.583v21.555h18.833V5.748zM24.418,26.303H7.584V13.988h16.833V26.303zM12,4.582h-2v3.335h2V4.582zM19.428,23.962h1.568v-7.788h-1.277c0,0.067-0.021,0.172-0.061,0.312c-0.066,0.232-0.168,0.419-0.299,0.559c-0.193,0.204-0.443,0.34-0.75,0.408c-0.193,0.043-0.531,0.075-1.014,0.097v1.042h1.832V23.962zM13.673,22.909c-0.489,0-0.827-0.188-1.013-0.564c-0.101-0.203-0.15-0.461-0.15-0.773h-1.504c0.025,0.62,0.15,1.121,0.376,1.504c0.429,0.721,1.194,1.08,2.296,1.08c0.895,0,1.569-0.25,2.026-0.749c0.455-0.5,0.684-1.079,0.684-1.737c0-0.627-0.195-1.121-0.586-1.482c-0.261-0.24-0.461-0.36-0.602-0.36c0.187-0.071,0.365-0.206,0.537-0.403c0.272-0.314,0.408-0.701,0.408-1.16c0-0.647-0.228-1.164-0.684-1.549c-0.456-0.386-1.056-0.578-1.8-0.578c-0.4,0-0.738,0.049-1.014,0.146c-0.276,0.097-0.514,0.236-0.714,0.419c-0.269,0.258-0.465,0.539-0.591,0.843c-0.117,0.348-0.184,0.715-0.198,1.102h1.429c-0.007-0.384,0.074-0.689,0.244-0.919c0.169-0.229,0.435-0.344,0.795-0.344c0.314,0,0.559,0.094,0.731,0.279c0.174,0.187,0.26,0.428,0.26,0.726c0,0.458-0.169,0.763-0.508,0.913c-0.196,0.09-0.543,0.138-1.039,0.145v1.096c0.507,0,0.878,0.049,1.114,0.146c0.414,0.172,0.621,0.514,0.621,1.026c0,0.387-0.112,0.683-0.335,0.889C14.234,22.807,13.973,22.909,13.673,22.909z",calendar2:"M22,4.582h-2v3.335h2V4.582zM12,4.582h-2v3.335h2V4.582zM25.416,5.748H23v3.17h-4v-3.17h-6v3.168H9.002V5.748H6.583v21.555h18.833V5.748zM11.033,26.303H7.584v-3.44h3.449V26.303zM11.033,21.862H7.584v-3.434h3.449V21.862zM11.033,17.429H7.584v-3.441h3.449V17.429zM15.501,26.303h-3.468v-3.44h3.468V26.303zM15.501,21.862h-3.468v-3.434h3.468V21.862zM15.501,17.429h-3.468v-3.441h3.468V17.429zM19.97,26.303h-3.469v-3.44h3.469V26.303zM19.97,21.862h-3.469v-3.434h3.469V21.862zM19.97,17.429h-3.469v-3.441h3.469V17.429zM24.418,26.303H20.97v-3.44h3.448V26.303zM24.418,21.862H20.97v-3.434h3.448V21.862zM24.418,17.429H20.97v-3.441h3.448V17.429z",picker:"M22.221,10.853c-0.111-0.414-0.261-0.412,0.221-1.539l1.66-3.519c0.021-0.051,0.2-0.412,0.192-0.946c0.015-0.529-0.313-1.289-1.119-1.642c-1.172-0.555-1.17-0.557-2.344-1.107c-0.784-0.396-1.581-0.171-1.979,0.179c-0.42,0.333-0.584,0.7-0.609,0.75L16.58,6.545c-0.564,1.084-0.655,0.97-1.048,1.147c-0.469,0.129-1.244,0.558-1.785,1.815c-1.108,2.346-1.108,2.346-1.108,2.346l-0.276,0.586l1.17,0.553l-3.599,7.623c-0.38,0.828-0.166,1.436-0.166,2.032c0.01,0.627-0.077,1.509-0.876,3.21l-0.276,0.586l3.517,1.661l0.276-0.585c0.808-1.699,1.431-2.326,1.922-2.717c0.46-0.381,1.066-0.6,1.465-1.42l3.599-7.618l1.172,0.554l0.279-0.589c0,0,0,0,1.105-2.345C22.578,12.166,22.419,11.301,22.221,10.853zM14.623,22.83c-0.156,0.353-0.413,0.439-1.091,0.955c-0.577,0.448-1.264,1.172-2.009,2.6l-1.191-0.562c0.628-1.48,0.75-2.474,0.73-3.203c-0.031-0.851-0.128-1.104,0.045-1.449l3.599-7.621l3.517,1.662L14.623,22.83z",no:"M16,3.667C9.189,3.667,3.667,9.188,3.667,16S9.189,28.333,16,28.333c6.812,0,12.333-5.521,12.333-12.333S22.812,3.667,16,3.667zM16,6.667c1.851,0,3.572,0.548,5.024,1.48L8.147,21.024c-0.933-1.452-1.48-3.174-1.48-5.024C6.667,10.854,10.854,6.667,16,6.667zM16,25.333c-1.85,0-3.572-0.548-5.024-1.48l12.876-12.877c0.933,1.452,1.48,3.174,1.48,5.024C25.333,21.146,21.146,25.333,16,25.333z",commandline:"M2.021,9.748L2.021,9.748V9.746V9.748zM2.022,9.746l5.771,5.773l-5.772,5.771l2.122,2.123l7.894-7.895L4.143,7.623L2.022,9.746zM12.248,23.269h14.419V20.27H12.248V23.269zM16.583,17.019h10.084V14.02H16.583V17.019zM12.248,7.769v3.001h14.419V7.769H12.248z",photo:"M24.25,10.25H20.5v-1.5h-9.375v1.5h-3.75c-1.104,0-2,0.896-2,2v10.375c0,1.104,0.896,2,2,2H24.25c1.104,0,2-0.896,2-2V12.25C26.25,11.146,25.354,10.25,24.25,10.25zM15.812,23.499c-3.342,0-6.06-2.719-6.06-6.061c0-3.342,2.718-6.062,6.06-6.062s6.062,2.72,6.062,6.062C21.874,20.78,19.153,23.499,15.812,23.499zM15.812,13.375c-2.244,0-4.062,1.819-4.062,4.062c0,2.244,1.819,4.062,4.062,4.062c2.244,0,4.062-1.818,4.062-4.062C19.875,15.194,18.057,13.375,15.812,13.375z",printer:"M24.569,12.125h-2.12c-0.207-1.34-1.247-2.759-2.444-3.967c-1.277-1.24-2.654-2.234-3.784-2.37c-0.062-0.008-0.124-0.014-0.198-0.015H8.594c-0.119,0-0.235,0.047-0.319,0.132c-0.083,0.083-0.132,0.2-0.132,0.32v5.9H6.069c-1.104,0-2,0.896-2,2V23h4.074v2.079c0,0.118,0.046,0.23,0.132,0.318c0.086,0.085,0.199,0.131,0.319,0.131h13.445c0.118,0,0.232-0.046,0.318-0.131s0.138-0.199,0.138-0.318V23h4.074v-8.875C26.569,13.021,25.674,12.125,24.569,12.125zM21.589,24.626H9.043V21.5h12.546V24.626zM21.589,13.921c0-0.03,0-0.063-0.003-0.096c-0.015-0.068-0.062-0.135-0.124-0.2H9.043v-6.95h6.987v0.001c0.305-0.019,0.567,0.282,0.769,0.971c0.183,0.655,0.229,1.509,0.229,2.102c0.001,0.433-0.019,0.725-0.019,0.725l-0.037,0.478l0.48,0.005c0.002,0,1.109,0.014,2.196,0.26c1.044,0.226,1.86,0.675,1.938,1.184c0.003,0.045,0.003,0.091,0.003,0.133V13.921z","export":"M24.086,20.904c-1.805,3.113-5.163,5.212-9.023,5.219c-5.766-0.01-10.427-4.672-10.438-10.435C4.636,9.922,9.297,5.261,15.063,5.25c3.859,0.007,7.216,2.105,9.022,5.218l3.962,2.284l0.143,0.082C26.879,6.784,21.504,2.25,15.063,2.248C7.64,2.25,1.625,8.265,1.624,15.688c0.002,7.42,6.017,13.435,13.439,13.437c6.442-0.002,11.819-4.538,13.127-10.589l-0.141,0.081L24.086,20.904zM28.4,15.688l-7.15-4.129v2.297H10.275v3.661H21.25v2.297L28.4,15.688z","import":"M15.067,2.25c-5.979,0-11.035,3.91-12.778,9.309h3.213c1.602-3.705,5.271-6.301,9.565-6.309c5.764,0.01,10.428,4.674,10.437,10.437c-0.009,5.764-4.673,10.428-10.437,10.438c-4.294-0.007-7.964-2.605-9.566-6.311H2.289c1.744,5.399,6.799,9.31,12.779,9.312c7.419-0.002,13.437-6.016,13.438-13.438C28.504,8.265,22.486,2.252,15.067,2.25zM10.918,19.813l7.15-4.126l-7.15-4.129v2.297H-0.057v3.661h10.975V19.813z",run:"M17.41,20.395l-0.778-2.723c0.228-0.2,0.442-0.414,0.644-0.643l2.721,0.778c0.287-0.418,0.534-0.862,0.755-1.323l-2.025-1.96c0.097-0.288,0.181-0.581,0.241-0.883l2.729-0.684c0.02-0.252,0.039-0.505,0.039-0.763s-0.02-0.51-0.039-0.762l-2.729-0.684c-0.061-0.302-0.145-0.595-0.241-0.883l2.026-1.96c-0.222-0.46-0.469-0.905-0.756-1.323l-2.721,0.777c-0.201-0.228-0.416-0.442-0.644-0.643l0.778-2.722c-0.418-0.286-0.863-0.534-1.324-0.755l-1.96,2.026c-0.287-0.097-0.581-0.18-0.883-0.241l-0.683-2.73c-0.253-0.019-0.505-0.039-0.763-0.039s-0.51,0.02-0.762,0.039l-0.684,2.73c-0.302,0.061-0.595,0.144-0.883,0.241l-1.96-2.026C7.048,3.463,6.604,3.71,6.186,3.997l0.778,2.722C6.736,6.919,6.521,7.134,6.321,7.361L3.599,6.583C3.312,7.001,3.065,7.446,2.844,7.907l2.026,1.96c-0.096,0.288-0.18,0.581-0.241,0.883l-2.73,0.684c-0.019,0.252-0.039,0.505-0.039,0.762s0.02,0.51,0.039,0.763l2.73,0.684c0.061,0.302,0.145,0.595,0.241,0.883l-2.026,1.96c0.221,0.46,0.468,0.905,0.755,1.323l2.722-0.778c0.2,0.229,0.415,0.442,0.643,0.643l-0.778,2.723c0.418,0.286,0.863,0.533,1.323,0.755l1.96-2.026c0.288,0.097,0.581,0.181,0.883,0.241l0.684,2.729c0.252,0.02,0.505,0.039,0.763,0.039s0.51-0.02,0.763-0.039l0.683-2.729c0.302-0.061,0.596-0.145,0.883-0.241l1.96,2.026C16.547,20.928,16.992,20.681,17.41,20.395zM11.798,15.594c-1.877,0-3.399-1.522-3.399-3.399s1.522-3.398,3.399-3.398s3.398,1.521,3.398,3.398S13.675,15.594,11.798,15.594zM27.29,22.699c0.019-0.547-0.06-1.104-0.23-1.654l1.244-1.773c-0.188-0.35-0.4-0.682-0.641-0.984l-2.122,0.445c-0.428-0.364-0.915-0.648-1.436-0.851l-0.611-2.079c-0.386-0.068-0.777-0.105-1.173-0.106l-0.974,1.936c-0.279,0.054-0.558,0.128-0.832,0.233c-0.257,0.098-0.497,0.22-0.727,0.353L17.782,17.4c-0.297,0.262-0.568,0.545-0.813,0.852l0.907,1.968c-0.259,0.495-0.437,1.028-0.519,1.585l-1.891,1.06c0.019,0.388,0.076,0.776,0.164,1.165l2.104,0.519c0.231,0.524,0.541,0.993,0.916,1.393l-0.352,2.138c0.32,0.23,0.66,0.428,1.013,0.6l1.715-1.32c0.536,0.141,1.097,0.195,1.662,0.15l1.452,1.607c0.2-0.057,0.399-0.118,0.596-0.193c0.175-0.066,0.34-0.144,0.505-0.223l0.037-2.165c0.455-0.339,0.843-0.747,1.152-1.206l2.161-0.134c0.152-0.359,0.279-0.732,0.368-1.115L27.29,22.699zM23.127,24.706c-1.201,0.458-2.545-0.144-3.004-1.345s0.143-2.546,1.344-3.005c1.201-0.458,2.547,0.144,3.006,1.345C24.931,22.902,24.328,24.247,23.127,24.706z",magnet:"M20.812,19.5h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687C12.076,3.073,9.3,4.779,7.762,6.792C6.2,8.826,5.617,10.928,5.588,12.634V19.5h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V19.5L20.812,19.5zM25.814,25.579c0,0,0-2.354,0-5.079h-5.002c0,2.727,0,5.08,0,5.08l5.004-0.001H25.814zM5.588,25.58h5c0,0,0-2.354,0-5.08h-5C5.588,23.227,5.588,25.58,5.588,25.58z",nomagnet:"M10.59,17.857v-5.225c-0.027-0.376,0.303-1.789,1.099-2.748c0.819-0.979,1.849-1.748,4.014-1.778c1.704,0.026,2.699,0.508,3.447,1.189l3.539-3.539c-1.616-1.526-4.01-2.679-6.986-2.652C12.077,3.073,9.3,4.779,7.762,6.793C6.2,8.826,5.617,10.928,5.59,12.634V19.5h3.357L10.59,17.857zM5.59,20.5v2.357L7.947,20.5H5.59zM20.812,13.29v6.21h5.002v-6.866c-0.021-1.064-0.252-2.283-0.803-3.542L20.812,13.29zM25.339,4.522L4.652,25.209l1.415,1.416L26.753,5.937L25.339,4.522zM20.812,25.58h5.002c0,0,0-2.354,0-5.08h-5.002C20.812,23.227,20.812,25.58,20.812,25.58zM10.59,25.58c0,0,0-0.827,0-2.064L8.525,25.58H10.59z",reflecth:"M15.57,20.273h0.854v-1.705H15.57V20.273zM15.57,23.686h0.854V21.98H15.57V23.686zM15.57,27.096h0.854v-1.705H15.57V27.096zM15.57,29.689h0.854V28.8H15.57V29.689zM15.57,16.865h0.854V15.16H15.57V16.865zM15.57,3.225h0.854V1.52H15.57V3.225zM15.57,6.635h0.854V4.93H15.57V6.635zM15.57,10.045h0.854V8.34H15.57V10.045zM15.57,13.455h0.854V11.75H15.57V13.455zM18.41,3.327V25.46h12.015L18.41,3.327zM19.264,6.68l9.729,17.93h-9.729V6.68zM13.535,25.46V3.327L1.521,25.46H13.535z",reflectv:"M20.643,16.008v-0.854h-1.705v0.854H20.643zM24.053,16.008v-0.854h-1.705v0.854H24.053zM27.463,16.008v-0.854h-1.705v0.854H27.463zM30.059,16.008v-0.854h-0.891v0.854H30.059zM17.232,16.008v-0.854h-1.709v0.854H17.232zM3.593,16.008v-0.854H1.888v0.854H3.593zM7.003,16.008v-0.854H5.298v0.854H7.003zM10.414,16.008v-0.854H8.709v0.854H10.414zM13.824,16.008v-0.854h-1.705v0.854H13.824zM3.694,13.167h22.134V1.152L3.694,13.167zM7.048,12.314l17.929-9.729v9.729H7.048zM25.828,18.042H3.694l22.134,12.015V18.042z",resize2:"M1.999,2.332v26.499H28.5V2.332H1.999zM26.499,26.832H4V12.5h8.167V4.332h14.332V26.832zM15.631,17.649l5.468,5.469l-1.208,1.206l5.482,1.469l-1.47-5.481l-1.195,1.195l-5.467-5.466l1.209-1.208l-5.482-1.469l1.468,5.48L15.631,17.649z",rotate:"M15.5,5.27c1.914,0,3.666,0.629,5.089,1.686l-1.781,1.783l8.428,2.256l-2.26-8.427l-1.889,1.89C21.016,2.781,18.371,1.77,15.5,1.77C8.827,1.773,3.418,7.181,3.417,13.855c0.001,4.063,2.012,7.647,5.084,9.838v-4.887c-0.993-1.4-1.583-3.105-1.585-4.952C6.923,9.114,10.759,5.278,15.5,5.27zM9.5,29.23h12V12.355h-12V29.23z",connect:"M25.06,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h4.69v-3.999H25.06zM20.375,15.719c0-3.435-2.784-6.219-6.219-6.219c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h6.834c0.833,2.452,3.15,4.219,5.884,4.219C17.591,21.938,20.375,19.153,20.375,15.719z",disconnect:"M9.219,9.5c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h1.897c0.833,2.452,3.15,4.219,5.884,4.219c3.435,0,6.219-2.784,6.219-6.219S12.653,9.5,9.219,9.5zM27.685,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h2.065v-3.999H27.685z",folder:"M28.625,26.75h-26.5V8.375h1.124c1.751,0,0.748-3.125,3-3.125c3.215,0,1.912,0,5.126,0c2.251,0,1.251,3.125,3.001,3.125h14.25V26.75z",man:"M21.021,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.463,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.602,21.541,22.443,18.912,21.021,16.349zM15.808,13.757c2.362,0,4.278-1.916,4.278-4.279s-1.916-4.279-4.278-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757z",woman:"M21.022,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.104,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.579,5.192-0.351,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.167,1.213-0.167,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.464,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.603,21.541,22.444,18.912,21.022,16.349zM15.808,13.757c2.363,0,4.279-1.916,4.279-4.279s-1.916-4.279-4.279-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757zM18.731,4.974c1.235,0.455,0.492-0.725,0.492-1.531s0.762-1.792-0.492-1.391c-1.316,0.422-2.383,0.654-2.383,1.461S17.415,4.489,18.731,4.974zM15.816,4.4c0.782,0,0.345-0.396,0.345-0.884c0-0.488,0.438-0.883-0.345-0.883s-0.374,0.396-0.374,0.883C15.442,4.005,15.034,4.4,15.816,4.4zM12.884,4.974c1.316-0.484,2.383-0.654,2.383-1.461S14.2,2.474,12.884,2.052c-1.254-0.402-0.492,0.584-0.492,1.391S11.648,5.428,12.884,4.974z",speaker:"M12.558,15.254c2.362,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S10.194,15.254,12.558,15.254zM15.662,15.224c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.201,1.311,0.62,2.188,1.462,2.188c1.396,0,2.544-2.375,2.544-5.312c0-0.66-0.062-1.291-0.167-1.873c0.598,0.574,1.174,0.812,1.725,0.496c1.228-0.682,1.069-3.311-0.353-5.874C17.159,16.742,16.412,15.849,15.662,15.224zM19.821,3.711l-1.414,1.414c1.499,1.499,2.428,3.569,2.428,5.851c0,2.283-0.929,4.353-2.428,5.853l1.413,1.412c1.861-1.86,3.015-4.43,3.015-7.265C22.835,8.142,21.683,5.572,19.821,3.711zM16.288,14.707l1.413,1.414c1.318-1.318,2.135-3.138,2.135-5.145c0-2.007-0.816-3.827-2.134-5.145l-1.414,1.414c0.956,0.956,1.547,2.275,1.547,3.731S17.243,13.751,16.288,14.707zM21.941,1.59l-1.413,1.414c2.042,2.042,3.307,4.862,3.307,7.971c0,3.11-1.265,5.93-3.308,7.972l1.413,1.414c2.405-2.404,3.895-5.725,3.895-9.386C25.835,7.315,24.346,3.995,21.941,1.59z",people:"M21.066,20.667c1.227-0.682,1.068-3.311-0.354-5.874c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873C19.939,20.745,20.516,20.983,21.066,20.667zM15.5,12.201c2.361,0,4.277-1.916,4.277-4.279S17.861,3.644,15.5,3.644c-2.363,0-4.28,1.916-4.28,4.279S13.137,12.201,15.5,12.201zM24.094,14.914c1.938,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.513,1.573-3.513,3.513C20.581,13.341,22.153,14.914,24.094,14.914zM28.374,17.043c-0.502-0.907-1.116-1.641-1.732-2.154c-0.718,0.526-1.594,0.846-2.546,0.846c-0.756,0-1.459-0.207-2.076-0.55c0.496,1.093,0.803,2.2,0.861,3.19c0.093,1.516-0.381,2.641-1.329,3.165c-0.204,0.117-0.426,0.183-0.653,0.224c-0.056,0.392-0.095,0.801-0.095,1.231c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.163,1.079,0.508,1.796,1.199,1.796c1.146,0,2.09-1.95,2.09-4.361c0-0.542-0.052-1.06-0.139-1.538c0.492,0.472,0.966,0.667,1.418,0.407C29.671,21.305,29.541,19.146,28.374,17.043zM6.906,14.914c1.939,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.514,1.573-3.514,3.513C3.392,13.341,4.966,14.914,6.906,14.914zM9.441,21.536c-1.593-0.885-1.739-3.524-0.457-6.354c-0.619,0.346-1.322,0.553-2.078,0.553c-0.956,0-1.832-0.321-2.549-0.846c-0.616,0.513-1.229,1.247-1.733,2.154c-1.167,2.104-1.295,4.262-0.287,4.821c0.451,0.257,0.925,0.064,1.414-0.407c-0.086,0.479-0.136,0.996-0.136,1.538c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.165,1.079,0.509,1.796,1.201,1.796c1.146,0,2.089-1.95,2.089-4.361c0-0.432-0.04-0.841-0.097-1.233C9.874,21.721,9.651,21.656,9.441,21.536z",parent:"M14.423,12.17c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873c0.6,0.574,1.176,0.812,1.726,0.496c1.227-0.682,1.068-3.311-0.354-5.874C15.921,13.689,15.173,12.795,14.423,12.17zM11.32,12.201c2.361,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S8.957,12.201,11.32,12.201zM21.987,17.671c1.508,0,2.732-1.225,2.732-2.735c0-1.51-1.225-2.735-2.732-2.735c-1.511,0-2.736,1.225-2.736,2.735C19.251,16.446,20.477,17.671,21.987,17.671zM25.318,19.327c-0.391-0.705-0.869-1.277-1.349-1.677c-0.56,0.41-1.24,0.659-1.982,0.659c-0.744,0-1.426-0.25-1.983-0.659c-0.479,0.399-0.958,0.972-1.35,1.677c-0.909,1.638-1.009,3.318-0.224,3.754c0.351,0.2,0.721,0.05,1.101-0.317c-0.067,0.372-0.105,0.775-0.105,1.197c0,1.878,0.728,3.396,1.625,3.396c0.54,0,0.808-0.553,0.937-1.398c0.128,0.841,0.396,1.398,0.934,1.398c0.893,0,1.627-1.518,1.627-3.396c0-0.422-0.04-0.825-0.107-1.197c0.383,0.367,0.752,0.52,1.104,0.317C26.328,22.646,26.227,20.965,25.318,19.327z", -notebook:"M24.875,1.375H8c-1.033,0-1.874,0.787-1.979,1.792h1.604c1.102,0,2,0.898,2,2c0,1.102-0.898,2-2,2H6v0.999h1.625c1.104,0,2.002,0.898,2.002,2.002c0,1.104-0.898,2.001-2.002,2.001H6v0.997h1.625c1.102,0,2,0.898,2,2c0,1.104-0.898,2.004-2,2.004H6v0.994h1.625c1.102,0,2,0.898,2,2.002s-0.898,2.002-2,2.002H6v0.997h1.624c1.104,0,2.002,0.897,2.002,2.001c0,1.104-0.898,2.002-2.002,2.002H6.004C6.027,28.252,6.91,29.125,8,29.125h16.875c1.104,0,2-0.896,2-2V3.375C26.875,2.271,25.979,1.375,24.875,1.375zM25.25,8.375c0,0.552-0.447,1-1,1H14c-0.553,0-1-0.448-1-1V4c0-0.552,0.447-1,1-1h10.25c0.553,0,1,0.448,1,1V8.375zM8.625,25.166c0-0.554-0.449-1.001-1-1.001h-3.25c-0.552,0-1,0.447-1,1.001c0,0.552,0.449,1,1,1h3.25C8.176,26.166,8.625,25.718,8.625,25.166zM4.375,6.166h3.251c0.551,0,0.999-0.448,0.999-0.999c0-0.555-0.448-1-0.999-1H4.375c-0.553,0-1,0.445-1,1C3.374,5.718,3.822,6.166,4.375,6.166zM4.375,11.167h3.25c0.553,0,1-0.448,1-1s-0.448-1-1-1h-3.25c-0.553,0-1,0.448-1,1S3.822,11.167,4.375,11.167zM4.375,16.167h3.25c0.551,0,1-0.448,1-1.001s-0.448-0.999-1-0.999h-3.25c-0.553,0-1.001,0.446-1.001,0.999S3.822,16.167,4.375,16.167zM3.375,20.165c0,0.553,0.446,1.002,1,1.002h3.25c0.551,0,1-0.449,1-1.002c0-0.552-0.448-1-1-1h-3.25C3.821,19.165,3.375,19.613,3.375,20.165z",diagram:"M6.812,17.202l7.396-3.665v-2.164h-0.834c-0.414,0-0.808-0.084-1.167-0.237v1.159l-7.396,3.667v2.912h2V17.202zM26.561,18.875v-2.913l-7.396-3.666v-1.158c-0.358,0.152-0.753,0.236-1.166,0.236h-0.832l-0.001,2.164l7.396,3.666v1.672H26.561zM16.688,18.875v-7.501h-2v7.501H16.688zM27.875,19.875H23.25c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C29.875,20.771,28.979,19.875,27.875,19.875zM8.125,19.875H3.5c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C10.125,20.771,9.229,19.875,8.125,19.875zM13.375,10.375H18c1.104,0,2-0.896,2-2V3.75c0-1.104-0.896-2-2-2h-4.625c-1.104,0-2,0.896-2,2v4.625C11.375,9.479,12.271,10.375,13.375,10.375zM18,19.875h-4.625c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2H18c1.104,0,2-0.896,2-2v-4.625C20,20.771,19.104,19.875,18,19.875z",barchart:"M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z",piechart:"M15.583,15.917l1.648-10.779C16.692,5.056,16.145,5,15.583,5C9.554,5,4.666,9.888,4.666,15.917c0,6.029,4.888,10.917,10.917,10.917S26.5,21.946,26.5,15.917c0-0.256-0.021-0.507-0.038-0.759L15.583,15.917zM19.437,3.127l-1.648,10.779l10.879-0.759C28.313,8.026,24.436,3.886,19.437,3.127z",linechart:"M3.625,25.062c-0.539-0.115-0.885-0.646-0.77-1.187l0,0L6.51,6.584l2.267,9.259l1.923-5.188l3.581,3.741l3.883-13.103l2.934,11.734l1.96-1.509l5.271,11.74c0.226,0.504,0,1.095-0.505,1.321l0,0c-0.505,0.227-1.096,0-1.322-0.504l0,0l-4.23-9.428l-2.374,1.826l-1.896-7.596l-2.783,9.393l-3.754-3.924L8.386,22.66l-1.731-7.083l-1.843,8.711c-0.101,0.472-0.515,0.794-0.979,0.794l0,0C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062z",apps:"M24.359,18.424l-2.326,1.215c0.708,1.174,1.384,2.281,1.844,3.033l2.043-1.066C25.538,20.822,24.966,19.652,24.359,18.424zM19.143,14.688c0.445,0.84,1.342,2.367,2.274,3.926l2.414-1.261c-0.872-1.769-1.72-3.458-2.087-4.122c-0.896-1.621-1.982-3.108-3.454-5.417c-1.673-2.625-3.462-5.492-4.052-4.947c-1.194,0.384,1.237,4.094,1.876,5.715C16.73,10.147,17.991,12.512,19.143,14.688zM26.457,22.673l-1.961,1.022l1.982,4.598c0,0,0.811,0.684,1.92,0.213c1.104-0.469,0.81-1.706,0.81-1.706L26.457,22.673zM24.35,15.711c0.168,0.339,2.924,5.93,2.924,5.93h1.983v-5.93H24.35zM18.34,15.704h-4.726l-3.424,5.935h11.66C21.559,21.159,18.771,16.479,18.34,15.704zM3.231,21.613l3.437-5.902H2.083v5.93h1.133L3.231,21.613zM15.048,10.145c0-0.93-0.754-1.685-1.685-1.685c-0.661,0-1.231,0.381-1.507,0.936l2.976,1.572C14.97,10.725,15.048,10.444,15.048,10.145zM14.343,12.06l-3.188-1.684L9.62,13.012l3.197,1.689L14.343,12.06zM3.192,26.886l-0.384,1.108v0.299l0.298-0.128l0.725-0.896l2.997-2.354l-3.137-1.651L3.192,26.886zM9.02,14.044l-4.757,8.17l3.23,1.706l4.728-8.186L9.02,14.044z",locked:"M26.711,14.085L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.863,26.711,14.085zM8.218,16.424c-0.4-0.153-0.687-0.533-0.687-0.987s0.287-0.834,0.687-0.987V16.424zM8.969,16.424v-1.974c0.4,0.152,0.687,0.533,0.687,0.987S9.369,16.272,8.969,16.424zM13.5,19.188l1.203-3.609c-0.689-0.306-1.172-0.994-1.172-1.797c0-1.087,0.881-1.969,1.969-1.969c1.087,0,1.969,0.881,1.969,1.969c0,0.803-0.482,1.491-1.172,1.797l1.203,3.609H13.5zM22.03,16.549c-0.399-0.152-0.687-0.533-0.687-0.986s0.287-0.834,0.687-0.987V16.549zM22.781,16.549v-1.973c0.4,0.152,0.688,0.533,0.688,0.987S23.182,16.397,22.781,16.549z",ppt:"M16.604,1.914c0-0.575-0.466-1.041-1.041-1.041s-1.041,0.466-1.041,1.041v1.04h2.082V1.914zM16.604,22.717h-2.082v3.207c0,0.574-4.225,4.031-4.225,4.031l2.468-0.003l2.807-2.673l3.013,2.693l2.272-0.039l-4.254-4.011V22.717L16.604,22.717zM28.566,7.113c0.86,0,1.56-0.698,1.56-1.56c0-0.861-0.698-1.56-1.56-1.56H2.561c-0.861,0-1.56,0.699-1.56,1.56c0,0.862,0.699,1.56,1.56,1.56h1.583v12.505l-0.932-0.022c-0.861,0-1.213,0.467-1.213,1.04c0,0.576,0.352,1.041,1.213,1.041h24.597c0.86,0,1.299-0.465,1.299-1.041c0-1.094-1.299-1.04-1.299-1.04l-0.804,0.109V7.113H28.566zM11.435,17.516c-3.771,0-4.194-4.191-4.194-4.191c0-4.096,4.162-4.161,4.162-4.161v4.161h4.193C15.596,17.516,11.435,17.516,11.435,17.516zM18.716,13.388h-1.071v-1.073h1.071V13.388zM18.716,10.267h-1.071V9.194h1.071V10.267zM23.314,13.388H20.26c-0.296,0-0.535-0.24-0.535-0.536c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,13.147,23.611,13.388,23.314,13.388zM23.314,10.267H20.26c-0.296,0-0.535-0.239-0.535-0.535c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,10.027,23.611,10.267,23.314,10.267z",lab:"M22.121,24.438l-3.362-7.847c-0.329-0.769-0.599-2.081-0.599-2.917s0.513-1.521,1.14-1.521s1.141-0.513,1.141-1.14s-0.685-1.14-1.521-1.14h-6.84c-0.836,0-1.52,0.513-1.52,1.14s0.513,1.14,1.14,1.14s1.14,0.685,1.14,1.521s-0.269,2.148-0.599,2.917l-3.362,7.847C8.55,25.206,8.28,26.177,8.28,26.595s0.342,1.103,0.76,1.521s1.444,0.76,2.28,0.76h8.359c0.836,0,1.862-0.342,2.28-0.76s0.76-1.103,0.76-1.521S22.45,25.206,22.121,24.438zM16.582,7.625c0,0.599,0.484,1.083,1.083,1.083s1.083-0.484,1.083-1.083s-0.484-1.084-1.083-1.084S16.582,7.026,16.582,7.625zM13.667,7.792c0.276,0,0.5-0.224,0.5-0.5s-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5S13.391,7.792,13.667,7.792zM15.584,5.292c0.874,0,1.583-0.709,1.583-1.583c0-0.875-0.709-1.584-1.583-1.584C14.709,2.125,14,2.834,14,3.709C14,4.583,14.709,5.292,15.584,5.292z",umbrella:"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125z",dry:"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125zM7.562,6.015c0.54,0.312,1.229,0.128,1.54-0.412c0.109-0.189,0.157-0.398,0.15-0.602L9.251,3.09L7.59,4.047c-0.178,0.095-0.333,0.24-0.441,0.428C6.837,5.015,7.022,5.703,7.562,6.015zM5.572,11.717c0.109-0.19,0.158-0.398,0.151-0.602L5.721,9.203l-1.66,0.957c-0.178,0.096-0.333,0.241-0.441,0.429c-0.311,0.539-0.127,1.229,0.413,1.539C4.571,12.44,5.26,12.256,5.572,11.717zM10.523,9.355c0.539,0.312,1.229,0.126,1.541-0.412c0.109-0.189,0.156-0.398,0.15-0.603L12.214,6.43l-1.662,0.956c-0.177,0.097-0.332,0.241-0.441,0.43C9.799,8.354,9.984,9.044,10.523,9.355zM15.251,3.998c0.539,0.312,1.229,0.126,1.54-0.412c0.11-0.19,0.157-0.398,0.15-0.603L16.94,1.072l-1.661,0.956c-0.178,0.097-0.332,0.242-0.441,0.43C14.526,2.998,14.711,3.687,15.251,3.998zM19.348,8.914c0.539,0.312,1.228,0.128,1.541-0.412c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V5.988l-1.661,0.957c-0.178,0.096-0.332,0.241-0.441,0.429C18.623,7.914,18.809,8.603,19.348,8.914zM23.633,5.196c0.54,0.312,1.23,0.126,1.542-0.413c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V2.27l-1.662,0.957c-0.177,0.096-0.331,0.24-0.44,0.43C22.909,4.195,23.094,4.885,23.633,5.196zM27.528,8.51l-1.659,0.956c-0.18,0.097-0.334,0.242-0.443,0.43c-0.312,0.539-0.127,1.229,0.413,1.54c0.539,0.312,1.229,0.127,1.541-0.412c0.109-0.19,0.158-0.398,0.151-0.603L27.528,8.51z",ipad:"M25.221,1.417H6.11c-0.865,0-1.566,0.702-1.566,1.566v25.313c0,0.865,0.701,1.565,1.566,1.565h19.111c0.865,0,1.565-0.7,1.565-1.565V2.984C26.787,2.119,26.087,1.417,25.221,1.417zM15.666,29.299c-0.346,0-0.626-0.279-0.626-0.625s0.281-0.627,0.626-0.627c0.346,0,0.627,0.281,0.627,0.627S16.012,29.299,15.666,29.299zM24.376,26.855c0,0.174-0.142,0.312-0.313,0.312H7.27c-0.173,0-0.313-0.142-0.313-0.312V4.3c0-0.173,0.14-0.313,0.313-0.313h16.792c0.172,0,0.312,0.14,0.312,0.313L24.376,26.855L24.376,26.855z",iphone:"M20.755,1H10.62C9.484,1,8.562,1.921,8.562,3.058v24.385c0,1.136,0.921,2.058,2.058,2.058h10.135c1.136,0,2.058-0.922,2.058-2.058V3.058C22.812,1.921,21.891,1,20.755,1zM14.659,3.264h2.057c0.101,0,0.183,0.081,0.183,0.18c0,0.1-0.082,0.18-0.183,0.18h-2.057c-0.1,0-0.181-0.081-0.181-0.18C14.478,3.344,14.559,3.264,14.659,3.264zM13.225,3.058c0.199,0,0.359,0.162,0.359,0.36c0,0.198-0.161,0.36-0.359,0.36c-0.2,0-0.36-0.161-0.36-0.36S13.025,3.058,13.225,3.058zM15.688,28.473c-0.796,0-1.44-0.646-1.44-1.438c0-0.799,0.645-1.439,1.44-1.439s1.44,0.646,1.44,1.439S16.483,28.473,15.688,28.473zM22.041,24.355c0,0.17-0.139,0.309-0.309,0.309H9.642c-0.17,0-0.308-0.139-0.308-0.309V6.042c0-0.17,0.138-0.309,0.308-0.309h12.09c0.17,0,0.309,0.138,0.309,0.309V24.355z",jigsaw:"M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z",lamp:"M15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h5.553c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM12.75,25.498h5.5v-5.164h-5.5V25.498z",lamp_alt:"M12.75,25.498h5.5v-5.164h-5.5V25.498zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h1.271c-0.009-0.025-0.024-0.049-0.029-0.078L11.965,8.256c-0.043-0.245,0.099-0.485,0.335-0.563c0.237-0.078,0.494,0.026,0.605,0.25l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.446-0.277c0.189,0,0.362,0.107,0.446,0.277l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.448-0.277c0.189,0,0.36,0.107,0.446,0.277l0.554,1.106l0.553-1.106c0.111-0.224,0.368-0.329,0.604-0.25s0.377,0.318,0.333,0.563l-1.999,10.998c-0.005,0.029-0.02,0.053-0.029,0.078h1.356c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM17.458,10.666c-0.191,0-0.364-0.107-0.446-0.275l-0.554-1.106l-0.553,1.106c-0.086,0.168-0.257,0.275-0.446,0.275c-0.191,0-0.364-0.107-0.449-0.275l-0.553-1.106l-0.553,1.106c-0.084,0.168-0.257,0.275-0.446,0.275c-0.012,0-0.025,0-0.037-0.001l1.454,8.001h1.167l1.454-8.001C17.482,10.666,17.47,10.666,17.458,10.666z",video:"M27.188,4.875v1.094h-4.5V4.875H8.062v1.094h-4.5V4.875h-1v21.25h1v-1.094h4.5v1.094h14.625v-1.094h4.5v1.094h1.25V4.875H27.188zM8.062,23.719h-4.5v-3.125h4.5V23.719zM8.062,19.281h-4.5v-3.125h4.5V19.281zM8.062,14.844h-4.5v-3.125h4.5V14.844zM8.062,10.406h-4.5V7.281h4.5V10.406zM11.247,20.59V9.754l9.382,5.418L11.247,20.59zM27.188,23.719h-4.5v-3.125h4.5V23.719zM27.188,19.281h-4.5v-3.125h4.5V19.281zM27.188,14.844h-4.5v-3.125h4.5V14.844zM27.188,10.406h-4.5V7.281h4.5V10.406z",palm:"M14.296,27.885v-2.013c0,0-0.402-1.408-1.073-2.013c-0.671-0.604-1.274-1.274-1.409-1.61c0,0-0.268,0.135-0.737-0.335s-1.812-2.616-1.812-2.616l-0.671-0.872c0,0-0.47-0.671-1.275-1.342c-0.805-0.672-0.938-0.067-1.476-0.738s0.604-1.275,1.006-1.409c0.403-0.134,1.946,0.134,2.684,0.872c0.738,0.738,0.738,0.738,0.738,0.738l1.073,1.141l0.537,0.201l0.671-1.073l-0.269-2.281c0,0-0.604-2.55-0.737-4.764c-0.135-2.214-0.47-5.703,1.006-5.837s1.007,2.55,1.073,3.489c0.067,0.938,0.806,5.232,1.208,5.568c0.402,0.335,0.671,0.066,0.671,0.066l0.402-7.514c0,0-0.479-2.438,1.073-2.549c0.939-0.067,0.872,1.543,0.872,2.147c0,0.604,0.269,7.514,0.269,7.514l0.537,0.135c0,0,0.402-2.214,0.604-3.153s0.604-2.416,0.537-3.087c-0.067-0.671-0.135-2.348,1.006-2.348s0.872,1.812,0.939,2.415s-0.134,3.153-0.134,3.757c0,0.604-0.738,3.623-0.537,3.824s2.08-2.817,2.349-3.958c0.268-1.141,0.201-3.02,1.408-2.885c1.208,0.134,0.47,2.817,0.402,3.086c-0.066,0.269-0.671,2.349-0.872,2.952s-0.805,1.476-1.006,2.013s0.402,2.349,0,4.629c-0.402,2.281-1.61,5.166-1.61,5.166l0.604,2.08c0,0-1.744,0.671-3.824,0.805C16.443,28.221,14.296,27.885,14.296,27.885z",fave:"M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z",help:"M4.834,4.834L4.833,4.833c-5.889,5.892-5.89,15.443,0.001,21.334s15.44,5.888,21.33-0.002c5.891-5.891,5.893-15.44,0.002-21.33C20.275-1.056,10.725-1.056,4.834,4.834zM25.459,5.542c0.833,0.836,1.523,1.757,2.104,2.726l-4.08,4.08c-0.418-1.062-1.053-2.06-1.912-2.918c-0.859-0.859-1.857-1.494-2.92-1.913l4.08-4.08C23.7,4.018,24.622,4.709,25.459,5.542zM10.139,20.862c-2.958-2.968-2.959-7.758-0.001-10.725c2.966-2.957,7.756-2.957,10.725,0c2.954,2.965,2.955,7.757-0.001,10.724C17.896,23.819,13.104,23.817,10.139,20.862zM5.542,25.459c-0.833-0.837-1.524-1.759-2.105-2.728l4.081-4.081c0.418,1.063,1.055,2.06,1.914,2.919c0.858,0.859,1.855,1.494,2.917,1.913l-4.081,4.081C7.299,26.982,6.379,26.292,5.542,25.459zM8.268,3.435l4.082,4.082C11.288,7.935,10.29,8.571,9.43,9.43c-0.858,0.859-1.494,1.855-1.912,2.918L3.436,8.267c0.58-0.969,1.271-1.89,2.105-2.727C6.377,4.707,7.299,4.016,8.268,3.435zM22.732,27.563l-4.082-4.082c1.062-0.418,2.061-1.053,2.919-1.912c0.859-0.859,1.495-1.857,1.913-2.92l4.082,4.082c-0.58,0.969-1.271,1.891-2.105,2.728C24.623,26.292,23.701,26.983,22.732,27.563z",crop:"M24.303,21.707V8.275l4.48-4.421l-2.021-2.048l-4.126,4.07H8.761V2.083H5.882v3.793H1.8v2.877h4.083v15.832h15.542v4.609h2.878v-4.609H29.2v-2.878H24.303zM19.72,8.753L8.761,19.565V8.753H19.72zM10.688,21.706l10.735-10.591l0.001,10.592L10.688,21.706z",biohazard:"M26.154,13.988c-0.96-0.554-1.982-0.892-3.019-1.032c0.396-0.966,0.616-2.023,0.616-3.131c0-4.399-3.438-8.001-7.772-8.264c3.245,0.258,5.803,2.979,5.803,6.292c0,3.373-2.653,6.123-5.983,6.294v1.292c0.908,0.144,1.605,0.934,1.605,1.883c0,0.232-0.043,0.454-0.118,0.66l1.181,0.683c1.826-2.758,5.509-3.658,8.41-1.981c2.896,1.672,3.965,5.299,2.506,8.254C31.386,21.038,29.992,16.204,26.154,13.988zM4.122,16.587c2.92-1.686,6.628-0.764,8.442,2.034l1.141-0.657c-0.072-0.2-0.109-0.417-0.109-0.642c0-0.909,0.638-1.67,1.489-1.859v-1.319c-3.3-0.202-5.92-2.94-5.92-6.292c0-3.297,2.532-6.007,5.757-6.286c-4.312,0.285-7.729,3.875-7.729,8.258c0,1.078,0.206,2.106,0.581,3.05c-1.004,0.147-1.999,0.481-2.931,1.02c-3.812,2.201-5.209,6.985-3.264,10.87C0.174,21.823,1.251,18.244,4.122,16.587zM11.15,11.452c0.114,0.139,0.235,0.271,0.362,0.398c0.126,0.126,0.259,0.247,0.397,0.361c0.102,0.084,0.211,0.16,0.318,0.236c0.93-0.611,2.045-0.969,3.244-0.969c1.201,0,2.312,0.357,3.242,0.969c0.107-0.077,0.217-0.152,0.318-0.236c0.139-0.114,0.271-0.235,0.397-0.361c0.127-0.127,0.248-0.259,0.362-0.398c0.113-0.138,0.222-0.283,0.323-0.431c-1.307-0.956-2.908-1.528-4.643-1.528c-0.042,0-0.083-0.001-0.124,0c-0.019,0-0.04-0.001-0.06,0c-1.666,0.038-3.201,0.605-4.462,1.528C10.929,11.17,11.037,11.314,11.15,11.452zM9.269,16.787c-0.168-0.062-0.338-0.117-0.512-0.164c-0.173-0.047-0.348-0.083-0.525-0.113c-0.177-0.03-0.355-0.053-0.535-0.065c-0.175,1.609,0.13,3.282,0.998,4.786c0.868,1.503,2.164,2.606,3.645,3.259c0.079-0.162,0.15-0.328,0.212-0.496c0.063-0.169,0.118-0.338,0.164-0.512c0.047-0.173,0.087-0.349,0.115-0.525c0.022-0.13,0.034-0.262,0.046-0.394c-0.993-0.5-1.86-1.286-2.461-2.325c-0.6-1.04-0.847-2.182-0.783-3.294C9.512,16.889,9.392,16.833,9.269,16.787zM18.122,22.657c0.014,0.132,0.024,0.263,0.046,0.394c0.03,0.177,0.067,0.352,0.113,0.524c0.047,0.174,0.102,0.346,0.165,0.514c0.062,0.169,0.132,0.333,0.212,0.495c1.48-0.653,2.777-1.755,3.644-3.257c0.868-1.504,1.176-3.179,1.001-4.788c-0.18,0.013-0.358,0.035-0.535,0.065c-0.177,0.029-0.353,0.067-0.525,0.113s-0.345,0.101-0.513,0.163c-0.124,0.047-0.241,0.105-0.362,0.16c0.063,1.11-0.183,2.253-0.784,3.292C19.984,21.373,19.116,22.157,18.122,22.657zM20.569,27.611c-2.92-1.687-3.977-5.358-2.46-8.329l-1.192-0.689c-0.349,0.389-0.854,0.634-1.417,0.634c-0.571,0-1.086-0.254-1.436-0.653l-1.146,0.666c1.475,2.96,0.414,6.598-2.488,8.272c-2.888,1.668-6.552,0.791-8.386-1.935c2.38,3.667,7.249,4.87,11.079,2.658c0.929-0.535,1.711-1.227,2.339-2.018c0.64,0.832,1.45,1.554,2.416,2.112c3.835,2.213,8.709,1.006,11.086-2.671C27.132,28.396,23.463,29.282,20.569,27.611z",wheelchair:"M20.373,19.85c0,4.079-3.318,7.397-7.398,7.397c-4.079,0-7.398-3.318-7.398-7.397c0-2.466,1.213-4.652,3.073-5.997l-0.251-2.21c-2.875,1.609-4.825,4.684-4.825,8.207c0,5.184,4.217,9.4,9.401,9.4c4.395,0,8.093-3.031,9.117-7.111L20.37,19.73C20.37,19.771,20.373,19.81,20.373,19.85zM11.768,6.534c1.321,0,2.392-1.071,2.392-2.392c0-1.321-1.071-2.392-2.392-2.392c-1.321,0-2.392,1.071-2.392,2.392C9.375,5.463,10.446,6.534,11.768,6.534zM27.188,22.677l-5.367-7.505c-0.28-0.393-0.749-0.579-1.226-0.538c-0.035-0.003-0.071-0.006-0.106-0.006h-6.132l-0.152-1.335h4.557c0.53,0,0.96-0.429,0.96-0.959c0-0.53-0.43-0.959-0.96-0.959h-4.776l-0.25-2.192c-0.146-1.282-1.303-2.203-2.585-2.057C9.869,7.271,8.948,8.428,9.094,9.71l0.705,6.19c0.136,1.197,1.154,2.078,2.332,2.071c0.004,0,0.007,0.001,0.012,0.001h8.023l4.603,6.436c0.439,0.615,1.338,0.727,2.007,0.248C27.442,24.178,27.628,23.292,27.188,22.677z",mic:"M15.5,21.125c2.682,0,4.875-2.25,4.875-5V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25C10.625,18.875,12.818,21.125,15.5,21.125zM21.376,11v5.125c0,3.308-2.636,6-5.876,6s-5.875-2.691-5.875-6V11H6.626v5.125c0,4.443,3.194,8.132,7.372,8.861v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11H21.376z",micmute:"M10.121,18.529c-0.317-0.736-0.496-1.549-0.496-2.404V11H6.626v5.125c0,1.693,0.466,3.275,1.272,4.627L10.121,18.529zM20.375,8.276V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25c0,0.568,0.113,1.105,0.285,1.615L20.375,8.276zM21.376,12.931v3.195c0,3.308-2.636,6-5.876,6c-0.958,0-1.861-0.24-2.661-0.657l-2.179,2.179c0.995,0.659,2.123,1.128,3.338,1.34v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11h-1.068L21.376,12.931zM20.375,16.125v-2.194l-6.788,6.788c0.588,0.26,1.234,0.405,1.913,0.405C18.182,21.125,20.375,18.875,20.375,16.125zM25.542,4.522L4.855,25.209l1.415,1.416L26.956,5.937L25.542,4.522z",imac:"M28.936,2.099H2.046c-0.506,0-0.919,0.414-0.919,0.92v21.097c0,0.506,0.413,0.919,0.919,0.919h17.062v-0.003h9.828c0.506,0,0.92-0.413,0.92-0.921V3.019C29.854,2.513,29.439,2.099,28.936,2.099zM28.562,20.062c0,0.412-0.338,0.75-0.75,0.75H3.062c-0.413,0-0.75-0.338-0.75-0.75v-16c0-0.413,0.337-0.75,0.75-0.75h24.75c0.412,0,0.75,0.337,0.75,0.75V20.062zM20.518,28.4c-0.033-0.035-0.062-0.055-0.068-0.062l-0.01-0.004l-0.008-0.004c0,0-0.046-0.021-0.119-0.062c-0.108-0.056-0.283-0.144-0.445-0.237c-0.162-0.097-0.32-0.199-0.393-0.271c-0.008-0.014-0.035-0.079-0.058-0.17c-0.083-0.32-0.161-0.95-0.22-1.539h-7.5c-0.023,0.23-0.048,0.467-0.076,0.691c-0.035,0.272-0.073,0.524-0.113,0.716c-0.02,0.096-0.039,0.175-0.059,0.23c-0.009,0.025-0.018,0.05-0.024,0.062c-0.003,0.006-0.005,0.01-0.007,0.013c-0.094,0.096-0.34,0.246-0.553,0.36c-0.107,0.062-0.209,0.11-0.283,0.146c-0.074,0.037-0.119,0.062-0.119,0.062l-0.007,0.004l-0.008,0.004c-0.01,0.009-0.038,0.022-0.07,0.062c-0.031,0.037-0.067,0.103-0.067,0.185c0.002,0.002-0.004,0.037-0.006,0.088c0,0.043,0.007,0.118,0.068,0.185c0.061,0.062,0.143,0.08,0.217,0.08h9.716c0.073,0,0.153-0.021,0.215-0.08c0.062-0.063,0.068-0.142,0.068-0.185c-0.001-0.051-0.008-0.086-0.007-0.088C20.583,28.503,20.548,28.439,20.518,28.4z",pc:"M29.249,3.14h-9.188l-0.459,0.459v18.225l0.33,2.389H19.57v0.245h-0.307v-0.306h-0.611v0.244h-0.311v-0.367h-0.486v0.307h-1.104l-2.022-0.367v-0.92h0.858l0.302-1.47h2.728c0.188,0,0.339-0.152,0.339-0.339V7.828c0-0.187-0.149-0.338-0.339-0.338H1.591c-0.187,0-0.339,0.152-0.339,0.338V21.24c0,0.187,0.152,0.339,0.339,0.339h3.016l0.199,1.47h1.409l-3.4,3.4L2.11,27.951c0,0,2.941,1.102,6.678,1.102c3.737,0,9.679-0.857,10.476-0.857s4.84,0,4.84,0v-1.225l-0.137-1.068h1.744c-0.2,0.106-0.322,0.244-0.322,0.396v0.979c0,0.341,0.604,0.613,1.352,0.613c0.742,0,1.348-0.272,1.348-0.613v-0.979c0-0.339-0.604-0.611-1.348-0.611c-0.188,0-0.364,0.019-0.525,0.049v-0.17h-2.29l-0.055-0.432h5.382L29.249,3.14L29.249,3.14zM2.478,20.17V8.714h15.07V20.17H2.478z",cube:"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z",fullcube:"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM15.5,7.029l6.327,3.652L15.5,14.334l-6.326-3.652L15.5,7.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z",font:"M22.255,19.327l-1.017,0.131c-0.609,0.081-1.067,0.208-1.375,0.382c-0.521,0.293-0.779,0.76-0.779,1.398c0,0.484,0.178,0.867,0.532,1.146c0.354,0.28,0.774,0.421,1.262,0.421c0.593,0,1.164-0.138,1.72-0.412c0.938-0.453,1.4-1.188,1.4-2.229v-1.354c-0.205,0.131-0.469,0.229-0.792,0.328C22.883,19.229,22.564,19.29,22.255,19.327zM8.036,18.273h4.309l-2.113-6.063L8.036,18.273zM28.167,7.75H3.168c-0.552,0-1,0.448-1,1v16.583c0,0.553,0.448,1,1,1h24.999c0.554,0,1-0.447,1-1V8.75C29.167,8.198,28.721,7.75,28.167,7.75zM14.305,23.896l-1.433-4.109H7.488L6,23.896H4.094L9.262,10.17h2.099l4.981,13.727H14.305L14.305,23.896zM26.792,23.943c-0.263,0.074-0.461,0.121-0.599,0.141c-0.137,0.02-0.323,0.027-0.562,0.027c-0.579,0-0.999-0.204-1.261-0.615c-0.138-0.219-0.231-0.525-0.29-0.926c-0.344,0.449-0.834,0.839-1.477,1.169c-0.646,0.329-1.354,0.493-2.121,0.493c-0.928,0-1.688-0.28-2.273-0.844c-0.589-0.562-0.884-1.271-0.884-2.113c0-0.928,0.29-1.646,0.868-2.155c0.578-0.511,1.34-0.824,2.279-0.942l2.682-0.336c0.388-0.05,0.646-0.211,0.775-0.484c0.063-0.146,0.104-0.354,0.104-0.646c0-0.575-0.203-0.993-0.604-1.252c-0.408-0.26-0.99-0.389-1.748-0.389c-0.877,0-1.5,0.238-1.865,0.713c-0.205,0.263-0.34,0.654-0.399,1.174H17.85c0.031-1.237,0.438-2.097,1.199-2.582c0.77-0.484,1.659-0.726,2.674-0.726c1.176,0,2.131,0.225,2.864,0.673c0.729,0.448,1.093,1.146,1.093,2.093v5.766c0,0.176,0.035,0.313,0.106,0.422c0.071,0.104,0.223,0.156,0.452,0.156c0.076,0,0.16-0.005,0.254-0.015c0.093-0.011,0.191-0.021,0.299-0.041L26.792,23.943L26.792,23.943z",trash:"M20.826,5.75l0.396,1.188c1.54,0.575,2.589,1.44,2.589,2.626c0,2.405-4.308,3.498-8.312,3.498c-4.003,0-8.311-1.093-8.311-3.498c0-1.272,1.21-2.174,2.938-2.746l0.388-1.165c-2.443,0.648-4.327,1.876-4.327,3.91v2.264c0,1.224,0.685,2.155,1.759,2.845l0.396,9.265c0,1.381,3.274,2.5,7.312,2.5c4.038,0,7.313-1.119,7.313-2.5l0.405-9.493c0.885-0.664,1.438-1.521,1.438-2.617V9.562C24.812,7.625,23.101,6.42,20.826,5.75zM11.093,24.127c-0.476-0.286-1.022-0.846-1.166-1.237c-1.007-2.76-0.73-4.921-0.529-7.509c0.747,0.28,1.58,0.491,2.45,0.642c-0.216,2.658-0.43,4.923,0.003,7.828C11.916,24.278,11.567,24.411,11.093,24.127zM17.219,24.329c-0.019,0.445-0.691,0.856-1.517,0.856c-0.828,0-1.498-0.413-1.517-0.858c-0.126-2.996-0.032-5.322,0.068-8.039c0.418,0.022,0.835,0.037,1.246,0.037c0.543,0,1.097-0.02,1.651-0.059C17.251,18.994,17.346,21.325,17.219,24.329zM21.476,22.892c-0.143,0.392-0.69,0.95-1.165,1.235c-0.474,0.284-0.817,0.151-0.754-0.276c0.437-2.93,0.214-5.209-0.005-7.897c0.881-0.174,1.708-0.417,2.44-0.731C22.194,17.883,22.503,20.076,21.476,22.892zM11.338,9.512c0.525,0.173,1.092-0.109,1.268-0.633h-0.002l0.771-2.316h4.56l0.771,2.316c0.14,0.419,0.53,0.685,0.949,0.685c0.104,0,0.211-0.017,0.316-0.052c0.524-0.175,0.808-0.742,0.633-1.265l-1.002-3.001c-0.136-0.407-0.518-0.683-0.945-0.683h-6.002c-0.428,0-0.812,0.275-0.948,0.683l-1,2.999C10.532,8.77,10.815,9.337,11.338,9.512z",newwindow:"M5.896,5.333V21.25h23.417V5.333H5.896zM26.312,18.25H8.896V8.334h17.417V18.25L26.312,18.25zM4.896,9.542H1.687v15.917h23.417V22.25H4.896V9.542z",dockright:"M3.083,7.333v16.334h24.833V7.333H3.083z M19.333,20.668H6.083V10.332h13.25V20.668z",dockleft:"M3.084,7.333v16.334h24.832V7.333H3.084z M11.667,10.332h13.251v10.336H11.667V10.332z",dockbottom:"M3.083,7.333v16.334h24.833V7.333H3.083zM24.915,16.833H6.083v-6.501h18.833L24.915,16.833L24.915,16.833z",docktop:"M27.916,23.667V7.333H3.083v16.334H27.916zM24.915,20.668H6.083v-6.501h18.833L24.915,20.668L24.915,20.668z",pallete:"M15.653,7.25c-3.417,0-8.577,0.983-8.577,3.282c0,1.91,2.704,3.229,1.691,3.889c-1.02,0.666-2.684-1.848-4.048-1.848c-1.653,0-2.815,1.434-2.815,2.926c0,4.558,6.326,8.25,13.749,8.25c7.424,0,13.443-3.692,13.443-8.25C29.096,10.944,23.077,7.25,15.653,7.25zM10.308,13.521c0-0.645,0.887-1.166,1.98-1.166c1.093,0,1.979,0.521,1.979,1.166c0,0.644-0.886,1.166-1.979,1.166C11.195,14.687,10.308,14.164,10.308,13.521zM14.289,22.299c-1.058,0-1.914-0.68-1.914-1.518s0.856-1.518,1.914-1.518c1.057,0,1.914,0.68,1.914,1.518S15.346,22.299,14.289,22.299zM19.611,21.771c-1.057,0-1.913-0.681-1.913-1.519c0-0.84,0.856-1.521,1.913-1.521c1.059,0,1.914,0.681,1.914,1.521C21.525,21.092,20.67,21.771,19.611,21.771zM20.075,10.66c0-0.838,0.856-1.518,1.914-1.518s1.913,0.68,1.913,1.518c0,0.839-0.855,1.518-1.913,1.518C20.934,12.178,20.075,11.499,20.075,10.66zM24.275,19.482c-1.057,0-1.914-0.681-1.914-1.519s0.857-1.518,1.914-1.518c1.059,0,1.914,0.68,1.914,1.518S25.334,19.482,24.275,19.482zM25.286,15.475c-1.058,0-1.914-0.68-1.914-1.519c0-0.838,0.856-1.518,1.914-1.518c1.057,0,1.913,0.68,1.913,1.518C27.199,14.795,26.343,15.475,25.286,15.475z",cart:"M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z",glasses:"M14.075,9.531c0,0-2.705-1.438-5.158-1.438c-2.453,0-4.862,0.593-4.862,0.593L3.971,9.869c0,0,0.19,0.19,0.528,0.53c0.338,0.336,0.486,3.741,1.838,5.094c1.353,1.354,4.82,1.396,5.963,0.676c1.14-0.718,2.241-3.466,2.241-4.693c0-0.38,0-0.676,0-0.676c0.274-0.275,1.615-0.303,1.917,0c0,0,0,0.296,0,0.676c0,1.227,1.101,3.975,2.241,4.693c1.144,0.72,4.611,0.678,5.963-0.676c1.355-1.353,1.501-4.757,1.839-5.094c0.338-0.34,0.528-0.53,0.528-0.53l-0.084-1.183c0,0-2.408-0.593-4.862-0.593c-2.453,0-5.158,1.438-5.158,1.438C16.319,9.292,14.737,9.32,14.075,9.531z","package":"M17.078,22.004l-1.758-4.129l-2.007,4.752l-7.519-3.289l0.174,3.905l9.437,4.374l10.909-5.365l-0.149-4.989L17.078,22.004zM29.454,6.619L18.521,3.383l-3.006,2.671l-3.091-2.359L1.546,8.199l3.795,3.048l-3.433,5.302l10.879,4.757l2.53-5.998l2.257,5.308l11.393-5.942l-3.105-4.709L29.454,6.619zM15.277,14.579l-9.059-3.83l9.275-4.101l9.608,3.255L15.277,14.579z",book:"M25.754,4.626c-0.233-0.161-0.536-0.198-0.802-0.097L12.16,9.409c-0.557,0.213-1.253,0.316-1.968,0.316c-0.997,0.002-2.029-0.202-2.747-0.48C7.188,9.148,6.972,9.04,6.821,8.943c0.056-0.024,0.12-0.05,0.193-0.075L18.648,4.43l1.733,0.654V3.172c0-0.284-0.14-0.554-0.374-0.714c-0.233-0.161-0.538-0.198-0.802-0.097L6.414,7.241c-0.395,0.142-0.732,0.312-1.02,0.564C5.111,8.049,4.868,8.45,4.872,8.896c0,0.012,0.004,0.031,0.004,0.031v17.186c0,0.008-0.003,0.015-0.003,0.021c0,0.006,0.003,0.01,0.003,0.016v0.017h0.002c0.028,0.601,0.371,0.983,0.699,1.255c1.034,0.803,2.769,1.252,4.614,1.274c0.874,0,1.761-0.116,2.583-0.427l12.796-4.881c0.337-0.128,0.558-0.448,0.558-0.809V5.341C26.128,5.057,25.988,4.787,25.754,4.626zM5.672,11.736c0.035,0.086,0.064,0.176,0.069,0.273l0.004,0.054c0.016,0.264,0.13,0.406,0.363,0.611c0.783,0.626,2.382,1.08,4.083,1.093c0.669,0,1.326-0.083,1.931-0.264v1.791c-0.647,0.143-1.301,0.206-1.942,0.206c-1.674-0.026-3.266-0.353-4.509-1.053V11.736zM10.181,24.588c-1.674-0.028-3.266-0.354-4.508-1.055v-2.712c0.035,0.086,0.065,0.176,0.07,0.275l0.002,0.053c0.018,0.267,0.13,0.408,0.364,0.613c0.783,0.625,2.381,1.079,4.083,1.091c0.67,0,1.327-0.082,1.932-0.262v1.789C11.476,24.525,10.821,24.588,10.181,24.588z", -books:"M26.679,7.858c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183c-0.42,0.183-0.946,0.271-1.486,0.271c-0.753,0.002-1.532-0.173-2.075-0.412c-0.194-0.083-0.356-0.176-0.471-0.259c0.042-0.021,0.09-0.042,0.146-0.064l8.786-3.804l1.31,0.561V6.612c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.406-0.17-0.605-0.083l-9.66,4.183c-0.298,0.121-0.554,0.268-0.771,0.483c-0.213,0.208-0.397,0.552-0.394,0.934c0,0.01,0.003,0.027,0.003,0.027v14.73c0,0.006-0.002,0.012-0.002,0.019c0,0.005,0.002,0.007,0.002,0.012v0.015h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.073,3.484,1.093c0.66,0,1.33-0.1,1.951-0.366l9.662-4.184c0.255-0.109,0.422-0.383,0.422-0.692V8.471C26.961,8.227,26.855,7.996,26.679,7.858zM20.553,5.058c-0.017-0.221-0.108-0.429-0.271-0.556c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183C9.596,8.784,9.069,8.873,8.53,8.873C7.777,8.874,6.998,8.699,6.455,8.46C6.262,8.378,6.099,8.285,5.984,8.202C6.026,8.181,6.075,8.16,6.13,8.138l8.787-3.804l1.309,0.561V3.256c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.407-0.17-0.606-0.083l-9.66,4.183C5.379,6.864,5.124,7.011,4.907,7.227C4.693,7.435,4.51,7.779,4.513,8.161c0,0.011,0.003,0.027,0.003,0.027v14.73c0,0.006-0.001,0.013-0.001,0.019c0,0.005,0.001,0.007,0.001,0.012v0.016h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.072,3.485,1.092c0.376,0,0.754-0.045,1.126-0.122V11.544c-0.01-0.7,0.27-1.372,0.762-1.856c0.319-0.315,0.708-0.564,1.19-0.756L20.553,5.058z",icons:"M4.083,14H14V4.083H4.083V14zM17,4.083V14h9.917V4.083H17zM17,26.917h9.917v-9.918H17V26.917zM4.083,26.917H14v-9.918H4.083V26.917z",list:"M4.082,4.083v2.999h22.835V4.083H4.082zM4.082,20.306h22.835v-2.999H4.082V20.306zM4.082,13.694h22.835v-2.999H4.082V13.694zM4.082,26.917h22.835v-2.999H4.082V26.917z",db:"M15.499,23.438c-3.846,0-7.708-0.987-9.534-3.117c-0.054,0.236-0.09,0.48-0.09,0.737v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.258-0.036-0.501-0.09-0.737C23.209,22.451,19.347,23.438,15.499,23.438zM15.499,15.943c-3.846,0-7.708-0.987-9.533-3.117c-0.054,0.236-0.091,0.479-0.091,0.736v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.257-0.036-0.501-0.09-0.737C23.209,14.956,19.347,15.943,15.499,15.943zM15.5,1.066c-4.637,0-9.625,1.565-9.625,5.001v3.876c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998V6.067C25.125,2.632,20.137,1.066,15.5,1.066zM15.5,9.066c-4.211,0-7.625-1.343-7.625-3c0-1.656,3.414-3,7.625-3s7.625,1.344,7.625,3C23.125,7.724,19.711,9.066,15.5,9.066z",paper:"M28.916,8.009L15.953,1.888c-0.251-0.119-0.548-0.115-0.798,0.008c-0.25,0.125-0.433,0.357-0.491,0.629c-0.002,0.01-1.04,4.83-2.578,9.636c-0.526,1.646-1.114,3.274-1.728,4.704l1.665,0.786c2-4.643,3.584-11.052,4.181-13.614l11.264,5.316c-0.346,1.513-1.233,5.223-2.42,8.927c-0.767,2.399-1.665,4.797-2.585,6.532c-0.889,1.79-1.958,2.669-2.197,2.552c-1.419,0.03-2.418-1.262-3.09-2.918c-0.32-0.803-0.53-1.63-0.657-2.246c-0.127-0.618-0.166-1.006-0.168-1.006c-0.034-0.317-0.232-0.597-0.52-0.731l-12.962-6.12c-0.301-0.142-0.654-0.11-0.925,0.081c-0.27,0.193-0.416,0.518-0.38,0.847c0.008,0.045,0.195,1.848,0.947,3.736c0.521,1.321,1.406,2.818,2.845,3.575l12.956,6.131l0.006-0.013c0.562,0.295,1.201,0.487,1.947,0.496c1.797-0.117,2.777-1.668,3.818-3.525c3-5.69,5.32-16.602,5.338-16.642C29.512,8.615,29.302,8.19,28.916,8.009z",takeoff:"M10.27,19.267c0,0,9.375-1.981,16.074-8.681c0,0,1.395-1.339-1.338-1.339c-2.305,0-5.6,2.438-5.6,2.438l-9.137-1.42l-1.769,1.769l4.983,2.411l-3.001,2.035l-2.571-1.285L6.09,16.052C6.09,16.052,8.02,18.062,10.27,19.267zM3.251,23.106v1.998h24.498v-1.998H3.251z",landing:"M23.322,19.491c0,0,1.903,0.342,0.299-1.869c-1.353-1.866-5.261-3.104-5.261-3.104l-4.213-8.229l-2.47-0.394l0.973,5.449L9.241,10.11L8.772,7.273L7.008,6.302c0,0-0.496,2.742-0.149,5.271C6.859,11.573,13.965,17.999,23.322,19.491zM3.251,23.106v1.998h24.498v-1.998H3.251zM14,17.94c0,0.414,0.336,0.75,0.75,0.75s0.75-0.336,0.75-0.75s-0.336-0.75-0.75-0.75S14,17.526,14,17.94z",plane:"M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z",phone:"M22.065,18.53c-0.467-0.29-1.167-0.21-1.556,0.179l-3.093,3.092c-0.389,0.389-1.025,0.389-1.414,0L9.05,14.848c-0.389-0.389-0.389-1.025,0-1.414l2.913-2.912c0.389-0.389,0.447-1.075,0.131-1.524L6.792,1.485C6.476,1.036,5.863,0.948,5.433,1.29c0,0-4.134,3.281-4.134,6.295c0,12.335,10,22.334,22.334,22.334c3.015,0,5.948-5.533,5.948-5.533c0.258-0.486,0.087-1.122-0.38-1.412L22.065,18.53z",hangup:"M28.563,10.494c-7.35-7.349-19.265-7.348-26.612,0.001c-1.796,1.796-0.247,6.84-0.247,6.84c0.135,0.443,0.616,0.72,1.067,0.614l6.898-1.604c0.451-0.105,0.82-0.57,0.82-1.033l0.001-3.685c0-0.463,0.379-0.842,0.842-0.842h8.285c0.464,0,0.843,0.379,0.843,0.842l-0.001,3.471c0.001,0.462,0.375,0.907,0.83,0.986l7.635,1.316c0.456,0.08,0.873-0.232,0.926-0.692C29.851,16.708,30.359,12.29,28.563,10.494zM17.264,14.072h-3.501v4.39h-2.625l4.363,7.556l4.363-7.556h-2.6V14.072z",music:"M12.751,8.042v6.041v9.862c-0.677-0.45-1.636-0.736-2.708-0.736c-2.048,0-3.708,1.025-3.708,2.292c0,1.265,1.66,2.291,3.708,2.291s3.708-1.026,3.708-2.291V13.786l10.915-3.24v9.565c-0.678-0.45-1.635-0.736-2.708-0.736c-2.048,0-3.708,1.025-3.708,2.292c0,1.265,1.66,2.291,3.708,2.291s3.708-1.026,3.708-2.291V10.249V4.208L12.751,8.042z",roadmap:"M23.188,3.735c0-0.975-0.789-1.766-1.766-1.766s-1.766,0.791-1.766,1.766s1.766,4.267,1.766,4.267S23.188,4.71,23.188,3.735zM20.578,3.734c0-0.466,0.378-0.843,0.844-0.843c0.467,0,0.844,0.377,0.844,0.844c0,0.466-0.377,0.843-0.844,0.843C20.956,4.578,20.578,4.201,20.578,3.734zM25.281,18.496c-0.562,0-1.098,0.046-1.592,0.122L11.1,13.976c0.199-0.181,0.312-0.38,0.312-0.59c0-0.108-0.033-0.213-0.088-0.315l8.41-2.239c0.459,0.137,1.023,0.221,1.646,0.221c1.521,0,2.75-0.485,2.75-1.083c0-0.599-1.229-1.083-2.75-1.083s-2.75,0.485-2.75,1.083c0,0.069,0.021,0.137,0.054,0.202L9.896,12.2c-0.633-0.188-1.411-0.303-2.265-0.303c-2.088,0-3.781,0.667-3.781,1.49c0,0.823,1.693,1.489,3.781,1.489c0.573,0,1.11-0.054,1.597-0.144l11.99,4.866c-0.19,0.192-0.306,0.401-0.306,0.623c0,0.188,0.096,0.363,0.236,0.532L8.695,25.415c-0.158-0.005-0.316-0.011-0.477-0.011c-3.241,0-5.87,1.037-5.87,2.312c0,1.276,2.629,2.312,5.87,2.312c3.241,0,5.87-1.034,5.87-2.312c0-0.22-0.083-0.432-0.229-0.633l10.265-5.214c0.37,0.04,0.753,0.066,1.155,0.066c2.414,0,4.371-0.771,4.371-1.723C29.65,19.268,27.693,18.496,25.281,18.496z",brush:"M8.125,29.178l1.311-1.5l1.315,1.5l1.311-1.5l1.311,1.5l1.315-1.5l1.311,1.5l1.312-1.5l1.314,1.5l1.312-1.5l1.312,1.5l1.314-1.5l1.312,1.5v-8.521H8.125V29.178zM23.375,17.156c-0.354,0-5.833-0.166-5.833-2.917s0.75-8.834,0.75-8.834S18.542,2.822,16,2.822s-2.292,2.583-2.292,2.583s0.75,6.083,0.75,8.834s-5.479,2.917-5.833,2.917c-0.5,0-0.5,1.166-0.5,1.166v1.271h15.75v-1.271C23.875,18.322,23.875,17.156,23.375,17.156zM16,8.031c-0.621,0-1.125-2.191-1.125-2.812S15.379,4.094,16,4.094s1.125,0.504,1.125,1.125S16.621,8.031,16,8.031z",bucket:"M21.589,6.787c-0.25-0.152-0.504-0.301-0.76-0.445c-3.832-2.154-8.234-3.309-9.469-1.319c-1.225,2.103,2.314,5.798,6.293,8.222c0.082,0.051,0.167,0.098,0.25,0.146c5.463-0.402,9.887,0.204,9.989,1.402c0.009,0.105-0.026,0.211-0.083,0.318c0.018-0.025,0.041-0.045,0.057-0.07C29.146,12.943,25.585,9.222,21.589,6.787zM10.337,7.166l-0.722,1.52c-4.339,2.747-6.542,6.193-5.484,8.625c0.19,0.438,0.482,0.812,0.846,1.137l0.456-0.959c-0.156-0.178-0.292-0.365-0.384-0.577c-0.732-1.682,0.766-4.188,3.707-6.417l-3.323,6.994c1.492,1.689,5.748,1.748,10.276,0.154c-0.037-0.354,0.032-0.722,0.232-1.049c0.485-0.796,1.523-1.048,2.319-0.563c0.795,0.486,1.048,1.522,0.562,2.319c-0.484,0.795-1.523,1.047-2.319,0.562c-0.154-0.094-0.281-0.213-0.394-0.344c-4.354,1.559-8.372,1.643-10.553,0.314c-0.214-0.131-0.403-0.279-0.58-0.436l-0.124,0.26c-1.088,1.785,1.883,4.916,5.23,6.957c3.347,2.039,7.493,3.246,8.552,1.502l7.77-10.204c-2.48,0.384-6.154-0.963-9.272-2.864C14.014,12.197,11.131,9.546,10.337,7.166z",terminal:"M3.25,6.469v19.062h25.5V6.469H3.25zM10.345,11.513l-4.331,1.926V12.44l3.124-1.288v-0.018L6.014,9.848v-1l4.331,1.927V11.513zM16.041,14.601h-5.05v-0.882h5.05V14.601z",edit:"M27.87,7.863L23.024,4.82l-7.889,12.566l4.842,3.04L27.87,7.863zM14.395,21.25l-0.107,2.855l2.527-1.337l2.349-1.24l-4.672-2.936L14.395,21.25zM29.163,3.239l-2.532-1.591c-0.638-0.401-1.479-0.208-1.882,0.43l-0.998,1.588l4.842,3.042l0.999-1.586C29.992,4.481,29.802,3.639,29.163,3.239zM25.198,27.062c0,0.275-0.225,0.5-0.5,0.5h-19c-0.276,0-0.5-0.225-0.5-0.5v-19c0-0.276,0.224-0.5,0.5-0.5h13.244l1.884-3H5.698c-1.93,0-3.5,1.57-3.5,3.5v19c0,1.93,1.57,3.5,3.5,3.5h19c1.93,0,3.5-1.57,3.5-3.5V11.097l-3,4.776V27.062z",paint:"M25.541,5.772V2.208H3.292v8.083h22.249v-3.52c1.211,0.113,2.167,1.174,2.167,2.478v1.375c0,1.398-1.164,2.784-2.541,3.025l-7.882,1.381c-1.857,0.326-3.369,2.125-3.369,4.011v0.385c-0.742,0.366-1.292,1.507-1.292,2.865v4.5c0,1.65,0.807,3,1.792,3s1.792-1.35,1.792-3v-4.5c0-1.358-0.55-2.499-1.292-2.865v-0.385c0-1.398,1.164-2.784,2.541-3.025l7.882-1.381c1.857-0.326,3.369-2.125,3.369-4.01V9.25C28.708,7.394,27.304,5.886,25.541,5.772z",car:"M28.59,10.781h-2.242c-0.129,0-0.244,0.053-0.333,0.133c-0.716-1.143-1.457-2.058-2.032-2.633c-2-2-14-2-16,0C7.41,8.854,6.674,9.763,5.961,10.898c-0.086-0.069-0.19-0.117-0.309-0.117H3.41c-0.275,0-0.5,0.225-0.5,0.5v1.008c0,0.275,0.221,0.542,0.491,0.594l1.359,0.259c-1.174,2.619-1.866,5.877-0.778,9.14v1.938c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.584c2.298,0.219,5.551,0.459,8.812,0.459c3.232,0,6.521-0.235,8.814-0.453v1.578c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1l-0.002-1.938c1.087-3.261,0.397-6.516-0.775-9.134l1.392-0.265c0.271-0.052,0.491-0.318,0.491-0.594v-1.008C29.09,11.006,28.865,10.781,28.59,10.781zM7.107,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.108,18.906,7.107,18.906zM5.583,13.716c0.96-2.197,2.296-3.917,3.106-4.728c0.585-0.585,3.34-1.207,7.293-1.207c3.953,0,6.708,0.622,7.293,1.207c0.811,0.811,2.146,2.53,3.106,4.728c-2.133,0.236-6.286-0.31-10.399-0.31S7.716,13.952,5.583,13.716zM24.857,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S25.858,18.906,24.857,18.906z",taxi:"M28.59,10.781h-2.242c-0.129,0-0.244,0.053-0.333,0.133c-0.716-1.143-1.457-2.058-2.032-2.633c-0.575-0.575-1.979-0.984-3.732-1.229V5.03c-1.541-0.198-3.099-0.249-4.268-0.249c-1.16,0-2.703,0.05-4.233,0.245v2.022C9.98,7.292,8.562,7.702,7.982,8.281C7.41,8.854,6.674,9.763,5.961,10.898c-0.086-0.069-0.19-0.117-0.309-0.117H3.41c-0.275,0-0.5,0.225-0.5,0.5v1.008c0,0.275,0.221,0.542,0.491,0.594l1.359,0.259c-1.174,2.619-1.866,5.877-0.778,9.14v1.938c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.584c2.298,0.219,5.551,0.459,8.812,0.459c3.232,0,6.521-0.235,8.814-0.453v1.578c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1l-0.002-1.938c1.087-3.261,0.397-6.516-0.775-9.134l1.392-0.265c0.271-0.052,0.491-0.318,0.491-0.594v-1.008C29.09,11.006,28.865,10.781,28.59,10.781zM7.107,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.108,18.906,7.107,18.906zM5.583,13.716c0.96-2.197,2.296-3.917,3.106-4.728c0.585-0.585,3.34-1.207,7.293-1.207c3.953,0,6.708,0.622,7.293,1.207c0.811,0.811,2.146,2.53,3.106,4.728c-2.133,0.236-6.286-0.31-10.399-0.31S7.716,13.952,5.583,13.716zM24.857,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S25.858,18.906,24.857,18.906z",bus:"M30.171,7.314c-0.025-0.274-0.215-0.498-0.421-0.498s-0.375-0.169-0.375-0.375s-0.222-0.337-0.493-0.292L27.41,6.399C27.114,4.607,26.67,3.486,26,2.816c-2-2-18-2-20,0C5.331,3.486,4.886,4.607,4.589,6.399L3.118,6.15C2.847,6.104,2.625,6.235,2.625,6.441S2.456,6.816,2.25,6.816S1.854,7.041,1.829,7.314l-0.47,5.066c-0.025,0.274,0.179,0.498,0.454,0.498h1.062c0.275,0,0.521-0.224,0.546-0.498l0.393-4.232c0.025-0.274,0.268-0.46,0.54-0.415l0.054,0.009C4.007,11.396,4,29.684,4,29.684c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.893c4.643,0.698,12.982,0.698,17.625,0v1.889c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1c0,0-0.007-18.283-0.407-21.937l0.054-0.009c0.271-0.046,0.514,0.141,0.539,0.415l0.394,4.232c0.025,0.274,0.271,0.498,0.546,0.498h1.062c0.275,0,0.479-0.224,0.454-0.498L30.171,7.314zM7.125,23.371c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.126,23.371,7.125,23.371zM5.042,15.977C5.143,8.542,5.491,4.739,6.707,3.523C7.194,3.037,10.484,2.316,16,2.316c5.516,0,8.806,0.72,9.293,1.207c1.217,1.216,1.564,5.02,1.665,12.455c-1.175,0.473-4.904,1.025-10.958,1.025C9.951,17.004,6.222,16.452,5.042,15.977zM23.062,21.559c0-1.001,0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812s-0.812,1.812-1.812,1.812S23.062,22.56,23.062,21.559z",train:"M25.781,21.382c0.69-0.691,0.607-4.311,0.607-4.311c0-2.21-0.663-10.334-1.602-12.103c-0.94-1.768-6.19-3.26-8.787-3.26s-7.847,1.492-8.786,3.26c-0.939,1.769-1.603,9.893-1.603,12.103c0,0-0.083,3.619,0.607,4.311c0.455,0.455,2.205,1.581,3.663,2.423l-3.744,6.486h2.31l0.673-1.166h13.759l0.673,1.166h2.311l-3.744-6.486C23.576,22.963,25.326,21.837,25.781,21.382zM23.819,16.795c-0.473,0-0.856-0.384-0.856-0.856s0.384-0.856,0.856-0.856c0.474,0,0.856,0.384,0.856,0.856S24.293,16.795,23.819,16.795zM20.421,6.959h3.768c0.326,1.565,0.616,3.98,0.807,6.134h-4.574V6.959zM14.417,3.125h3.166v1.333h-3.166V3.125zM7.812,6.959h3.768v6.134H7.005C7.195,10.939,7.485,8.524,7.812,6.959zM8.181,16.795c-0.474,0-0.856-0.384-0.856-0.856s0.383-0.856,0.856-0.856c0.473,0,0.856,0.384,0.856,0.856S8.653,16.795,8.181,16.795zM9.341,15.938c0-0.473,0.384-0.856,0.856-0.856c0.474,0,0.856,0.384,0.856,0.856s-0.383,0.856-0.856,0.856C9.725,16.795,9.341,16.411,9.341,15.938zM10.275,27.125l0.99-1.715h9.469l0.99,1.715H10.275zM20.946,15.938c0-0.473,0.383-0.856,0.856-0.856c0.473,0,0.856,0.384,0.856,0.856s-0.384,0.856-0.856,0.856C21.329,16.795,20.946,16.411,20.946,15.938z",scissors:"M11.108,10.271c1.083-1.876,0.159-4.443-2.059-5.725C8.231,4.074,7.326,3.825,6.433,3.825c-1.461,0-2.721,0.673-3.373,1.801C2.515,6.57,2.452,7.703,2.884,8.814C3.287,9.85,4.081,10.751,5.12,11.35c0.817,0.473,1.722,0.723,2.616,0.723c0.673,0,1.301-0.149,1.849-0.414c0.669,0.387,1.566,0.904,2.4,1.386c1.583,0.914,0.561,3.861,5.919,6.955c5.357,3.094,11.496,1.535,11.496,1.535L10.75,10.767C10.882,10.611,11.005,10.449,11.108,10.271zM9.375,9.271c-0.506,0.878-2.033,1.055-3.255,0.347C5.474,9.245,4.986,8.702,4.749,8.09C4.541,7.555,4.556,7.035,4.792,6.626c0.293-0.509,0.892-0.801,1.64-0.801c0.543,0,1.102,0.157,1.616,0.454C9.291,6.996,9.898,8.366,9.375,9.271zM17.246,15.792c0,0.483-0.392,0.875-0.875,0.875c-0.037,0-0.068-0.017-0.104-0.021l0.667-1.511C17.121,15.296,17.246,15.526,17.246,15.792zM16.371,14.917c0.037,0,0.068,0.017,0.104,0.021l-0.666,1.51c-0.188-0.16-0.312-0.39-0.312-0.656C15.496,15.309,15.887,14.917,16.371,14.917zM29.4,10.467c0,0-6.139-1.559-11.496,1.535c-0.537,0.311-0.995,0.618-1.415,0.924l4.326,2.497L29.4,10.467zM13.171,17.097c-0.352,0.851-0.575,1.508-1.187,1.859c-0.833,0.481-1.73,0.999-2.399,1.386c-0.549-0.265-1.176-0.414-1.85-0.414c-0.894,0-1.798,0.249-2.616,0.721c-2.218,1.282-3.143,3.851-2.06,5.726c0.651,1.127,1.912,1.801,3.373,1.801c0.894,0,1.799-0.25,2.616-0.722c1.04-0.601,1.833-1.501,2.236-2.536c0.432-1.112,0.368-2.245-0.178-3.189c-0.103-0.178-0.226-0.34-0.356-0.494l3.982-2.3C14.044,18.295,13.546,17.676,13.171,17.097zM9.42,24.192c-0.238,0.612-0.725,1.155-1.371,1.528c-1.221,0.706-2.75,0.532-3.257-0.347C4.27,24.47,4.878,23.099,6.12,22.381c0.514-0.297,1.072-0.453,1.615-0.453c0.749,0,1.346,0.291,1.64,0.8C9.612,23.138,9.628,23.657,9.42,24.192z",coffee:"M7.845,9.983l2.034,17.353c0,0.977,2.741,1.769,6.121,1.769c3.381,0,6.121-0.792,6.121-1.769l2.377-17.485c-2.455,1.023-6.812,1.133-8.498,1.133C14.39,10.984,10.345,10.883,7.845,9.983zM24.13,5.752l-0.376-1.678c0-0.651-3.472-1.179-7.754-1.179S8.246,3.424,8.246,4.075L7.871,5.752C7.156,6.036,6.75,6.36,6.75,6.705v1.284c0,1.102,4.142,1.995,9.25,1.995s9.25-0.894,9.25-1.995V6.705C25.25,6.36,24.844,6.036,24.13,5.752z",filter:"M26.834,6.958c0-2.094-4.852-3.791-10.834-3.791c-5.983,0-10.833,1.697-10.833,3.791c0,0.429,0.213,0.84,0.588,1.224l8.662,15.002v4.899c0,0.414,0.709,0.75,1.583,0.75c0.875,0,1.584-0.336,1.584-0.75v-4.816l8.715-15.093h-0.045C26.625,7.792,26.834,7.384,26.834,6.958zM16,9.75c-6.363,0-9.833-1.845-9.833-2.792S9.637,4.167,16,4.167c6.363,0,9.834,1.844,9.834,2.791S22.363,9.75,16,9.75z","low-battery":"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM24.167,18.916H6.25v-5.832h17.917V18.916zM9.167,14.084H7.25v3.832h1.917V14.084z","full-battery":"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM24.167,18.916H6.25v-5.832h17.917V18.916zM23.167,14.084H7.25v3.832h15.917V14.084z",charging:"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM18.525,16.842l-6.733,3.366l3.366-3.366l-1.683-1.684l6.733-3.366l-3.366,3.366L18.525,16.842z",ticket:"M20.338,6.713c-1.002-0.468-1.434-1.658-0.967-2.658L16.578,2.75L6.21,24.948l2.793,1.305c0.468-1.001,1.658-1.434,2.659-0.966s1.434,1.657,0.966,2.658l2.793,1.305L25.789,7.052l-2.793-1.305C22.529,6.748,21.338,7.181,20.338,6.713z",checkbox:"M26,27.5H6c-0.829,0-1.5-0.672-1.5-1.5V6c0-0.829,0.671-1.5,1.5-1.5h20c0.828,0,1.5,0.671,1.5,1.5v20C27.5,26.828,26.828,27.5,26,27.5zM7.5,24.5h17v-17h-17V24.5z",checked:"M29.548,3.043c-1.081-0.859-2.651-0.679-3.513,0.401L16,16.066l-3.508-4.414c-0.859-1.081-2.431-1.26-3.513-0.401c-1.081,0.859-1.261,2.432-0.401,3.513l5.465,6.875c0.474,0.598,1.195,0.944,1.957,0.944c0.762,0,1.482-0.349,1.957-0.944L29.949,6.556C30.809,5.475,30.629,3.902,29.548,3.043zM24.5,24.5h-17v-17h12.756l2.385-3H6C5.171,4.5,4.5,5.171,4.5,6v20c0,0.828,0.671,1.5,1.5,1.5h20c0.828,0,1.5-0.672,1.5-1.5V12.851l-3,3.773V24.5z",inbox:"M24,5H8L4,19v8h24v-8L24,5zM27,26H5v-7h8.75c0,1.242,1.007,2.25,2.25,2.25c1.242,0,2.25-1.008,2.25-2.25H27V26z",crown:"M16,8.087c1.007,0,1.826-0.819,1.826-1.826c0-1.007-0.819-1.826-1.826-1.826s-1.826,0.819-1.826,1.826C14.174,7.268,14.993,8.087,16,8.087zM16,5.043c0.673,0,1.218,0.545,1.218,1.217S16.673,7.479,16,7.479s-1.217-0.545-1.217-1.218S15.327,5.043,16,5.043zM4.923,13.292c0.812,2.612,1.132,6.646,1.257,9.412c0.027-0.001,0.053-0.009,0.081-0.009h19.479c0.027,0,0.054,0.008,0.081,0.009c0.124-2.766,0.444-6.8,1.256-9.412c-0.449-0.229-0.813-0.591-1.05-1.038c-2.401,2.048-5.157,6.18-5.157,6.18s-3.026-6.058-4.305-9.812C16.383,8.667,16.196,8.696,16,8.696s-0.383-0.029-0.565-0.073c-1.278,3.754-4.305,9.812-4.305,9.812s-2.756-4.132-5.157-6.18C5.738,12.701,5.373,13.063,4.923,13.292zM5.652,11.13c0-1.007-0.819-1.826-1.826-1.826S2,10.124,2,11.13s0.819,1.826,1.826,1.826S5.652,12.137,5.652,11.13zM3.826,12.348c-0.673,0-1.217-0.545-1.217-1.217s0.544-1.217,1.217-1.217s1.217,0.545,1.217,1.217S4.499,12.348,3.826,12.348zM25.739,23.913H6.261c-1.009,0-1.826,0.818-1.826,1.826s0.817,1.826,1.826,1.826h19.479c1.008,0,1.826-0.818,1.826-1.826S26.747,23.913,25.739,23.913zM28.174,9.304c-1.007,0-1.826,0.819-1.826,1.826s0.819,1.826,1.826,1.826S30,12.137,30,11.13S29.181,9.304,28.174,9.304zM28.174,12.348c-0.673,0-1.218-0.545-1.218-1.217s0.545-1.217,1.218-1.217s1.218,0.545,1.218,1.217S28.847,12.348,28.174,12.348z",green:"M24.485,2c0,8-18,4-18,20c0,6,2,8,2,8h2c0,0-3-2-3-8c0-4,9-8,9-8s-7.981,4.328-7.981,8.436C21.239,24.431,28.288,9.606,24.485,2z",bolt:"M22.727,18.242L4.792,27.208l8.966-8.966l-4.483-4.484l17.933-8.966l-8.966,8.966L22.727,18.242z",slideshare:"M28.952,12.795c-0.956,1.062-5.073,2.409-5.604,2.409h-4.513c-0.749,0-1.877,0.147-2.408,0.484c0.061,0.054,0.122,0.108,0.181,0.163c0.408,0.379,1.362,0.913,2.206,0.913c0.397,0,0.723-0.115,1-0.354c1.178-1.007,1.79-1.125,2.145-1.125c0.421,0,0.783,0.193,0.996,0.531c0.4,0.626,0.106,1.445-0.194,2.087c-0.718,1.524-3.058,3.171-5.595,3.171c-0.002,0-0.002,0-0.004,0c-0.354,0-0.701-0.033-1.033-0.099v3.251c0,0.742,1.033,2.533,4.167,2.533s3.955-3.701,3.955-4.338v-4.512c2.23-1.169,4.512-1.805,5.604-3.895C30.882,12.05,29.907,11.733,28.952,12.795zM21.942,17.521c0.796-1.699-0.053-1.699-1.54-0.425s-3.665,0.105-4.408-0.585c-0.743-0.689-1.486-1.22-2.814-1.167c-1.328,0.053-4.46-0.161-6.267-0.585c-1.805-0.425-4.895-3-5.15-2.335c-0.266,0.69,0.211,1.168,1.168,2.335c0.955,1.169,5.075,2.778,5.075,2.778s0,3.453,0,4.886c0,1.435,2.973,3.61,4.512,3.61s2.708-1.062,2.708-1.806v-4.512C17.775,21.045,21.146,19.221,21.942,17.521zM20.342,13.73c1.744,0,3.159-1.414,3.159-3.158c0-1.745-1.415-3.159-3.159-3.159s-3.158,1.414-3.158,3.159C17.184,12.316,18.598,13.73,20.342,13.73zM12.019,13.73c1.744,0,3.158-1.414,3.158-3.158c0-1.745-1.414-3.159-3.158-3.159c-1.745,0-3.159,1.414-3.159,3.159C8.86,12.316,10.273,13.73,12.019,13.73z",twitter:"M23.295,22.567h-7.213c-2.125,0-4.103-2.215-4.103-4.736v-1.829h11.232c1.817,0,3.291-1.469,3.291-3.281c0-1.813-1.474-3.282-3.291-3.282H11.979V6.198c0-1.835-1.375-3.323-3.192-3.323c-1.816,0-3.29,1.488-3.29,3.323v11.633c0,6.23,4.685,11.274,10.476,11.274h7.211c1.818,0,3.318-1.463,3.318-3.298S25.112,22.567,23.295,22.567z",twitterbird:"M26.492,9.493c-0.771,0.343-1.602,0.574-2.473,0.678c0.89-0.533,1.562-1.376,1.893-2.382c-0.832,0.493-1.753,0.852-2.734,1.044c-0.785-0.837-1.902-1.359-3.142-1.359c-2.377,0-4.306,1.928-4.306,4.306c0,0.337,0.039,0.666,0.112,0.979c-3.578-0.18-6.75-1.894-8.874-4.499c-0.371,0.636-0.583,1.375-0.583,2.165c0,1.494,0.76,2.812,1.915,3.583c-0.706-0.022-1.37-0.216-1.95-0.538c0,0.018,0,0.036,0,0.053c0,2.086,1.484,3.829,3.454,4.222c-0.361,0.099-0.741,0.147-1.134,0.147c-0.278,0-0.547-0.023-0.81-0.076c0.548,1.711,2.138,2.955,4.022,2.99c-1.474,1.146-3.33,1.842-5.347,1.842c-0.348,0-0.69-0.021-1.027-0.062c1.905,1.225,4.168,1.938,6.6,1.938c7.919,0,12.248-6.562,12.248-12.25c0-0.187-0.002-0.372-0.01-0.557C25.186,11.115,25.915,10.356,26.492,9.493z",skype:"M28.777,18.438c0.209-0.948,0.318-1.934,0.318-2.944c0-7.578-6.144-13.722-13.724-13.722c-0.799,0-1.584,0.069-2.346,0.2C11.801,1.199,10.35,0.75,8.793,0.75c-4.395,0-7.958,3.562-7.958,7.958c0,1.47,0.399,2.845,1.094,4.024c-0.183,0.893-0.277,1.814-0.277,2.76c0,7.58,6.144,13.723,13.722,13.723c0.859,0,1.699-0.078,2.515-0.23c1.119,0.604,2.399,0.945,3.762,0.945c4.395,0,7.957-3.562,7.957-7.959C29.605,20.701,29.309,19.502,28.777,18.438zM22.412,22.051c-0.635,0.898-1.573,1.609-2.789,2.115c-1.203,0.5-2.646,0.754-4.287,0.754c-1.971,0-3.624-0.346-4.914-1.031C9.5,23.391,8.74,22.717,8.163,21.885c-0.583-0.842-0.879-1.676-0.879-2.479c0-0.503,0.192-0.939,0.573-1.296c0.375-0.354,0.857-0.532,1.432-0.532c0.471,0,0.878,0.141,1.209,0.422c0.315,0.269,0.586,0.662,0.805,1.174c0.242,0.558,0.508,1.027,0.788,1.397c0.269,0.355,0.656,0.656,1.151,0.89c0.497,0.235,1.168,0.354,1.992,0.354c1.135,0,2.064-0.241,2.764-0.721c0.684-0.465,1.016-1.025,1.016-1.711c0-0.543-0.173-0.969-0.529-1.303c-0.373-0.348-0.865-0.621-1.465-0.807c-0.623-0.195-1.47-0.404-2.518-0.623c-1.424-0.306-2.634-0.668-3.596-1.076c-0.984-0.419-1.777-1-2.357-1.727c-0.59-0.736-0.889-1.662-0.889-2.75c0-1.036,0.314-1.971,0.933-2.776c0.613-0.8,1.51-1.423,2.663-1.849c1.139-0.422,2.494-0.635,4.027-0.635c1.225,0,2.303,0.141,3.201,0.421c0.904,0.282,1.668,0.662,2.267,1.13c0.604,0.472,1.054,0.977,1.335,1.5c0.284,0.529,0.43,1.057,0.43,1.565c0,0.49-0.189,0.937-0.563,1.324c-0.375,0.391-0.851,0.589-1.408,0.589c-0.509,0-0.905-0.124-1.183-0.369c-0.258-0.227-0.523-0.58-0.819-1.09c-0.342-0.65-0.756-1.162-1.229-1.523c-0.463-0.351-1.232-0.529-2.292-0.529c-0.984,0-1.784,0.197-2.379,0.588c-0.572,0.375-0.85,0.805-0.85,1.314c0,0.312,0.09,0.574,0.273,0.799c0.195,0.238,0.471,0.447,0.818,0.621c0.36,0.182,0.732,0.326,1.104,0.429c0.382,0.106,1.021,0.263,1.899,0.466c1.11,0.238,2.131,0.506,3.034,0.793c0.913,0.293,1.703,0.654,2.348,1.072c0.656,0.429,1.178,0.979,1.547,1.635c0.369,0.658,0.558,1.471,0.558,2.416C23.371,20.119,23.049,21.148,22.412,22.051z",windows:"M20.023,17.484c-1.732-0.205-3.022-0.908-4.212-1.701l0,0l-0.559,0.279l-2.578,8.924l0,0c1.217,0.805,2.905,1.707,4.682,1.914c2.686,0.312,5.56-0.744,6.391-1.195l2.617-9.061l-0.559-0.279C25.805,16.365,23.193,17.857,20.023,17.484zM14.424,14.825c-1.267-0.87-2.578-1.652-4.375-1.816c-0.318-0.029-0.627-0.042-0.925-0.042c-3.011,0-4.948,1.347-4.948,1.347l-2.565,8.877l0,0l0.526,0.281c0.981-0.476,2.78-1.145,5.09-0.984c1.665,0.113,2.92,0.781,4.117,1.531l0.507-0.26l0,0L14.424,14.825zM10.201,12.094c1.664,0.114,2.921,0.78,4.117,1.533l0.509-0.26l0,0L17.4,4.431c-1.27-0.87-2.579-1.653-4.377-1.816c-0.318-0.029-0.626-0.042-0.924-0.042C9.088,2.573,7.15,3.92,7.15,3.92l-2.566,8.878L5.11,13.08C6.092,12.604,7.891,11.936,10.201,12.094zM28.779,5.971L28.779,5.971c0,0.001-2.609,1.492-5.779,1.119c-1.734-0.204-3.023-0.907-4.213-1.701L18.227,5.67l-2.576,8.923l0,0c1.215,0.803,2.906,1.709,4.68,1.915c2.687,0.312,5.558-0.745,6.392-1.197l2.615-9.059L28.779,5.971z",apple:"M24.32,10.85c-1.743,1.233-2.615,2.719-2.615,4.455c0,2.079,1.078,3.673,3.232,4.786c-0.578,1.677-1.416,3.134-2.514,4.375c-1.097,1.241-2.098,1.862-3.004,1.862c-0.427,0-1.009-0.143-1.748-0.423l-0.354-0.138c-0.725-0.281-1.363-0.423-1.92-0.423c-0.525,0-1.1,0.11-1.725,0.331l-0.445,0.16l-0.56,0.229c-0.441,0.176-0.888,0.264-1.337,0.264c-1.059,0-2.228-0.872-3.507-2.616c-1.843-2.498-2.764-5.221-2.764-8.167c0-2.095,0.574-3.781,1.725-5.061c1.149-1.279,2.673-1.92,4.568-1.92c0.709,0,1.371,0.13,1.988,0.389l0.423,0.172l0.445,0.183c0.396,0.167,0.716,0.251,0.959,0.251c0.312,0,0.659-0.072,1.04-0.217l0.582-0.229l0.435-0.16c0.693-0.251,1.459-0.377,2.297-0.377C21.512,8.576,23.109,9.334,24.32,10.85zM19.615,3.287c0.021,0.267,0.033,0.473,0.033,0.617c0,1.317-0.479,2.473-1.438,3.467s-2.075,1.49-3.347,1.49c-0.038-0.297-0.058-0.51-0.058-0.639c0-1.12,0.445-2.171,1.337-3.153c0.891-0.982,1.922-1.558,3.096-1.725C19.32,3.329,19.447,3.311,19.615,3.287z",linux:"M11.791,25.229c1.027-0.104,1.162-1.191,0.68-1.666c-0.398-0.392-2.598-2.022-3.171-2.664C9.033,20.6,8.673,20.454,8.52,20.12c-0.352-0.771-0.598-1.869-0.151-2.658c0.081-0.144,0.133-0.078,0.071,0.22c-0.351,1.684,0.746,3.059,0.986,2.354c0.167-0.487,0.013-1.358,0.102-2.051c0.158-1.226,1.273-3.577,1.763-3.712c-0.755-1.398,0.886-2.494,0.866-3.723c-0.014-0.798,0.701,0.982,1.419,1.359c0.802,0.422,1.684-0.794,2.936-1.41c0.354-0.176,0.809-0.376,0.776-0.524c-0.146-0.718-1.644,0.886-2.979,0.939c-0.61,0.024-0.837-0.12-1.072-0.347c-0.712-0.689,0.073-0.115,1.132-0.307c0.471-0.085,0.629-0.163,1.128-0.365c0.5-0.201,1.069-0.5,1.636-0.654c0.395-0.106,0.361-0.402,0.208-0.491c-0.088-0.051-0.219-0.046-0.321,0.133c-0.244,0.419-1.383,0.661-1.74,0.771c-0.457,0.14-0.962,0.271-1.634,0.243c-1.021-0.042-0.782-0.509-1.513-0.928c-0.213-0.122-0.156-0.444,0.129-0.729c0.148-0.148,0.557-0.232,0.76-0.572c0.028-0.047,0.289-0.32,0.494-0.461c0.07-0.049,0.076-1.295-0.562-1.32c-0.543-0.021-0.697,0.398-0.675,0.818c0.022,0.419,0.245,0.765,0.393,0.764c0.285-0.004,0.019,0.311-0.138,0.361c-0.237,0.078-0.562-0.934-0.525-1.418c0.039-0.506,0.303-1.4,0.942-1.383c0.576,0.016,0.993,0.737,0.973,1.983c-0.003,0.211,0.935-0.101,1.247,0.229c0.224,0.236-0.767-2.207,1.438-2.375c0.582,0.111,1.14,0.305,1.371,1.641c-0.086,0.139,0.146,1.07-0.215,1.182c-0.438,0.135-0.707-0.02-0.453-0.438c0.172-0.418,0.004-1.483-0.882-1.42c-0.887,0.064-0.769,1.637-0.526,1.668c0.243,0.031,0.854,0.465,1.282,0.549c1.401,0.271,0.371,1.075,0.555,2.048c0.205,1.099,0.929,0.809,1.578,3.717c0.137,0.177,0.676,0.345,1.199,2.579c0.473,2.011-0.195,3.473,0.938,3.353c0.256-0.026,0.629-0.1,0.792-0.668c0.425-1.489-0.213-3.263-0.855-4.46c-0.375-0.698-0.729-1.174-0.916-1.337c0.738,0.436,1.683,1.829,1.898,2.862c0.286,1.358,0.49,1.934,0.059,3.37c0.25,0.125,0.871,0.39,0.871,0.685c-0.647-0.53-2.629-0.625-2.68,0.646c-0.338,0.008-0.594,0.034-0.811,0.293c-0.797,0.944-0.059,2.842-0.139,3.859c-0.07,0.896-0.318,1.783-0.46,2.683c-0.474-0.019-0.428-0.364-0.274-0.852c0.135-0.431,0.351-0.968,0.365-1.484c0.012-0.467-0.039-0.759-0.156-0.831c-0.118-0.072-0.303,0.074-0.559,0.485c-0.543,0.875-1.722,1.261-2.821,1.397c-1.099,0.138-2.123,0.028-2.664-0.578c-0.186-0.207-0.492,0.058-0.529,0.111c-0.049,0.074,0.18,0.219,0.352,0.533c0.251,0.461,0.49,1.159-0.105,1.479C12.83,26.314,12.316,26.221,11.791,25.229L11.791,25.229zM11.398,25.188c0.395,0.621,1.783,3.232-0.652,3.571c-0.814,0.114-2.125-0.474-3.396-0.784c-1.142-0.279-2.301-0.444-2.949-0.627c-0.391-0.108-0.554-0.25-0.588-0.414c-0.091-0.434,0.474-1.041,0.503-1.555c0.028-0.514-0.188-0.779-0.364-1.199c-0.177-0.42-0.224-0.734-0.081-0.914c0.109-0.141,0.334-0.199,0.698-0.164c0.462,0.047,1.02-0.049,1.319-0.23c0.505-0.309,0.742-0.939,0.516-1.699c0,0.744-0.244,1.025-0.855,1.366c-0.577,0.319-1.467,0.062-1.875,0.416c-0.492,0.427,0.175,1.528,0.12,2.338c-0.042,0.622-0.69,1.322-0.401,1.946c0.291,0.627,1.648,0.695,3.064,0.99c2.012,0.422,3.184,1.153,4.113,1.188c1.356,0.05,1.564-1.342,3.693-1.36c0.621-0.033,1.229-0.052,1.835-0.06c0.688-0.009,1.375-0.003,2.079,0.014c1.417,0.034,0.931,0.773,1.851,1.246c0.774,0.397,2.17,0.241,2.504-0.077c0.451-0.431,1.662-1.467,2.592-1.935c1.156-0.583,3.876-1.588,1.902-2.812c-0.461-0.285-1.547-0.588-1.639-2.676c-0.412,0.366-0.365,2.312,0.784,2.697c1.283,0.431,2.085,1.152-0.301,1.969c-1.58,0.54-1.849,0.706-3.099,1.747c-1.267,1.054-3.145,0.636-2.815-1.582c0.171-1.155,0.269-2.11-0.019-3.114c-0.142-0.49-0.211-1.119-0.114-1.562c0.187-0.858,0.651-1.117,1.106-0.293c0.285,0.519,0.385,1.122,1.408,1.171c1.607,0.077,1.926-1.553,2.439-1.627c0.343-0.05,0.686-1.02,0.425-2.589c-0.28-1.681-1.269-4.332-2.536-5.677c-1.053-1.118-1.717-2.098-2.135-3.497c-0.352-1.175-0.547-2.318-0.475-3.412c0.094-1.417-0.691-3.389-1.943-4.316c-0.782-0.581-2.011-0.893-3.122-0.88c-0.623,0.007-1.21,0.099-1.661,0.343c-1.855,1.008-2.113,2.445-2.086,4.088c0.025,1.543,0.078,3.303,0.254,4.977c-0.208,0.77-1.288,2.227-1.979,3.114C8.59,14.233,8.121,16.01,7.52,17.561c-0.321,0.828-0.862,1.2-0.908,2.265C6.6,20.122,6.61,20.891,6.894,20.672C7.98,19.829,9.343,21.95,11.398,25.188L11.398,25.188zM17.044,2.953c-0.06,0.176-0.3,0.321-0.146,0.443c0.152,0.123,0.24-0.171,0.549-0.281c0.08-0.028,0.449,0.012,0.519-0.164c0.03-0.077-0.19-0.164-0.321-0.291c-0.133-0.125-0.262-0.236-0.386-0.229C16.938,2.451,17.096,2.798,17.044,2.953L17.044,2.953zM18.934,9.35c0.115-0.121,0.174,0.207,0.483,0.402c0.244,0.154,0.481,0.04,0.545,0.354c0.044,0.225-0.097,0.467-0.284,0.436C19.35,10.486,18.596,9.705,18.934,9.35L18.934,9.35zM13.832,7.375c-0.508-0.037-0.543,0.33-0.375,0.324C13.629,7.693,13.523,7.408,13.832,7.375L13.832,7.375zM12.96,6.436c0.06-0.013,0.146,0.09,0.119,0.233c-0.037,0.199-0.021,0.324,0.117,0.325c0.022,0,0.048-0.005,0.056-0.057c0.066-0.396-0.14-0.688-0.225-0.711C12.834,6.178,12.857,6.458,12.96,6.436L12.96,6.436zM16.663,6.268c0.129,0.039,0.253,0.262,0.28,0.504c0.002,0.021,0.168-0.035,0.17-0.088c0.011-0.389-0.321-0.571-0.408-0.562C16.506,6.139,16.562,6.238,16.663,6.268L16.663,6.268zM14.765,7.423c0.463-0.214,0.625,0.118,0.465,0.171C15.066,7.648,15.065,7.345,14.765,7.423L14.765,7.423zM9.178,15.304c-0.219-0.026,0.063-0.19,0.184-0.397c0.131-0.227,0.105-0.511,0.244-0.469s0.061,0.2-0.033,0.461C9.491,15.121,9.258,15.313,9.178,15.304L9.178,15.304z",nodejs:"M4.783,4.458L2.59,3.196C2.553,3.174,2.511,3.163,2.469,3.161H2.447C2.405,3.163,2.363,3.174,2.326,3.196L0.133,4.458C0.051,4.505,0,4.593,0,4.688l0.005,3.398c0,0.047,0.024,0.092,0.066,0.114c0.041,0.024,0.091,0.024,0.132,0l1.303-0.746c0.083-0.049,0.132-0.136,0.132-0.229V5.637c0-0.095,0.05-0.183,0.132-0.229l0.555-0.32c0.041-0.023,0.086-0.035,0.132-0.035c0.045,0,0.092,0.012,0.132,0.035l0.555,0.32c0.082,0.047,0.133,0.135,0.133,0.229v1.588c0,0.094,0.051,0.182,0.132,0.229l1.303,0.746c0.041,0.024,0.092,0.024,0.132,0c0.041-0.022,0.066-0.067,0.066-0.114l0.004-3.398C4.915,4.593,4.865,4.505,4.783,4.458zM17.93,0.745l-1.305-0.729c-0.042-0.023-0.091-0.022-0.132,0.001c-0.041,0.024-0.065,0.067-0.065,0.114v3.365c0,0.033-0.018,0.064-0.046,0.081s-0.064,0.017-0.093,0l-0.549-0.316c-0.082-0.047-0.183-0.047-0.265,0l-2.193,1.266c-0.082,0.047-0.133,0.135-0.133,0.229V7.29c0,0.095,0.051,0.182,0.132,0.229l2.194,1.267c0.082,0.048,0.183,0.048,0.265,0l2.194-1.267c0.082-0.048,0.133-0.135,0.133-0.229V0.977C18.066,0.88,18.014,0.792,17.93,0.745zM16.421,6.458c0,0.023-0.013,0.045-0.033,0.057l-0.753,0.435c-0.021,0.012-0.045,0.012-0.066,0l-0.753-0.435c-0.021-0.012-0.033-0.034-0.033-0.057v-0.87c0-0.023,0.013-0.045,0.033-0.058l0.753-0.435c0.021-0.012,0.045-0.012,0.066,0l0.753,0.435c0.021,0.012,0.033,0.034,0.033,0.058V6.458zM24.473,4.493l-2.18-1.266c-0.082-0.047-0.183-0.048-0.265,0l-2.193,1.266c-0.082,0.047-0.132,0.135-0.132,0.229v2.532c0,0.096,0.051,0.184,0.133,0.23l2.18,1.242c0.08,0.045,0.179,0.046,0.26,0.001l1.318-0.732c0.042-0.023,0.067-0.067,0.068-0.115c0-0.048-0.025-0.092-0.066-0.116l-2.207-1.266c-0.041-0.023-0.066-0.067-0.066-0.115V5.59c0-0.047,0.025-0.091,0.065-0.115l0.688-0.396c0.041-0.024,0.091-0.024,0.132,0l0.688,0.396c0.041,0.023,0.066,0.067,0.066,0.115v0.625c0,0.047,0.025,0.091,0.066,0.114c0.041,0.024,0.092,0.024,0.132,0l1.314-0.764c0.081-0.047,0.132-0.135,0.132-0.229V4.722C24.605,4.628,24.555,4.541,24.473,4.493zM11.363,4.48L9.169,3.214c-0.082-0.047-0.183-0.047-0.265,0L6.711,4.48C6.629,4.527,6.579,4.615,6.579,4.709v2.534c0,0.095,0.051,0.182,0.133,0.229l2.193,1.267c0.082,0.048,0.183,0.048,0.265,0l2.193-1.267c0.082-0.048,0.132-0.135,0.132-0.229V4.709C11.495,4.615,11.445,4.527,11.363,4.48zM31.019,4.382L28.95,3.187c-0.13-0.074-0.304-0.074-0.435,0l-2.068,1.195c-0.135,0.077-0.218,0.222-0.218,0.377v2.386c0,0.156,0.083,0.301,0.218,0.378l0.542,0.312c0.263,0.13,0.356,0.13,0.477,0.13c0.389,0,0.612-0.236,0.612-0.646V4.962c0-0.033-0.027-0.06-0.06-0.06h-0.263c-0.033,0-0.061,0.026-0.061,0.06v2.356c0,0.182-0.188,0.363-0.495,0.209l-0.566-0.326c-0.021-0.012-0.033-0.033-0.033-0.057V4.759c0-0.023,0.013-0.045,0.033-0.057l2.067-1.193c0.019-0.011,0.044-0.011,0.063,0l2.067,1.193c0.02,0.012,0.032,0.034,0.032,0.057v2.386c0,0.023-0.013,0.046-0.032,0.057l-2.068,1.193c-0.018,0.012-0.045,0.012-0.063,0l-0.53-0.314c-0.017-0.01-0.036-0.013-0.052-0.004c-0.146,0.083-0.175,0.094-0.312,0.143c-0.034,0.012-0.084,0.031,0.019,0.09l0.691,0.408c0.065,0.038,0.141,0.059,0.217,0.059s0.151-0.021,0.218-0.059l2.068-1.194c0.134-0.078,0.217-0.222,0.217-0.378V4.759C31.235,4.604,31.152,4.459,31.019,4.382zM29.371,6.768c-0.548,0-0.668-0.138-0.708-0.41c-0.005-0.029-0.029-0.051-0.06-0.051h-0.268c-0.033,0-0.06,0.026-0.06,0.06c0,0.349,0.189,0.765,1.095,0.765c0.655,0,1.031-0.259,1.031-0.709c0-0.447-0.302-0.566-0.938-0.65c-0.643-0.085-0.708-0.128-0.708-0.279c0-0.125,0.056-0.29,0.531-0.29c0.425,0,0.581,0.091,0.646,0.378c0.006,0.027,0.03,0.047,0.059,0.047h0.269c0.017,0,0.032-0.007,0.044-0.019c0.011-0.013,0.017-0.029,0.016-0.046c-0.042-0.493-0.37-0.723-1.032-0.723c-0.59,0-0.941,0.249-0.941,0.666c0,0.453,0.35,0.578,0.916,0.634c0.677,0.066,0.729,0.166,0.729,0.298C29.992,6.669,29.807,6.768,29.371,6.768zM22.128,5.446l-0.42,0.243c-0.016,0.009-0.025,0.026-0.025,0.044v0.486c0,0.019,0.01,0.035,0.025,0.044l0.42,0.243c0.016,0.009,0.035,0.009,0.052,0l0.421-0.243c0.016-0.009,0.025-0.025,0.025-0.044V5.733c0-0.018-0.01-0.035-0.025-0.044L22.18,5.446C22.163,5.438,22.144,5.438,22.128,5.446z", -jquery:"M10.322,23.041C4.579,18.723,2.777,11.07,5.494,4.583c-0.254,0.291-0.502,0.59-0.739,0.904c-5.177,6.887-4.008,16.505,2.613,21.482c6.62,4.979,16.184,3.432,21.362-3.455c0.237-0.314,0.454-0.635,0.663-0.959C23.915,26.963,16.064,27.357,10.322,23.041zM13.662,18.598c4.765,3.582,11.604,2.564,15.567-2.198c-3.609,2.641-9.09,2.475-13.361-0.736S9.916,7.231,11.451,3.03C7.976,8.161,8.897,15.015,13.662,18.598zM18.642,11.976c3.254,2.447,8.146,1.438,10.967-2.242c-2.604,1.921-6.341,1.955-9.157-0.164c-2.819-2.118-3.826-5.718-2.701-8.754C14.998,4.549,15.387,9.528,18.642,11.976z",sencha:"M18.265,22.734c1.365,0.662,2.309,2.062,2.309,3.682c0,1.566-0.881,2.928-2.176,3.615l1.922-0.98c3.16-1.58,5.332-4.846,5.332-8.617c0-3.719-2.109-6.945-5.195-8.547l-6.272-3.144c-1.366-0.662-2.308-2.062-2.308-3.682c0-1.567,0.881-2.928,2.175-3.614L12.13,2.428c-3.161,1.578-5.332,4.843-5.332,8.616c0,3.718,2.108,6.944,5.195,8.546L18.265,22.734z",vim:"M25.012,10.44l4.571-4.645c0.11-0.113,0.173-0.264,0.173-0.423V3.134c0-0.159-0.064-0.314-0.177-0.427l-0.604-0.602c-0.111-0.112-0.261-0.176-0.42-0.177l-9.646-0.086C18.71,1.84,18.523,1.935,18.41,2.099L17.807,2.96c-0.033,0.047-0.059,0.099-0.076,0.154l-2.144-2.156l0,0l-1.646,1.666l-0.447-0.497c-0.112-0.125-0.27-0.197-0.438-0.199L3.324,1.756c-0.163-0.003-0.322,0.06-0.437,0.176L2.284,2.535C2.171,2.647,2.107,2.803,2.107,2.962v2.325c0,0.164,0.066,0.32,0.183,0.434l0.657,0.635C3.056,6.461,3.2,6.521,3.352,6.525l0.285,0.007l0.007,6.512l-2.527,2.557l2.533,2.533l0.008,8.084c0,0.159,0.065,0.314,0.177,0.427l0.861,0.861c0.112,0.111,0.268,0.176,0.427,0.176h2.67c0.161,0,0.317-0.064,0.43-0.181l2.378-2.417l4.9,4.9l14.47-14.558L25.012,10.44zM9.747,24.232l-2.208,2.242H5.372l-0.509-0.509L4.856,19.34l-0.008-7.515L4.842,5.943c0-0.328-0.261-0.594-0.588-0.603L3.617,5.326L3.313,5.031v-1.82l0.245-0.245l9.215,0.163l0.319,0.354l0.126,0.141v1.419l-0.352,0.362H12.26c-0.331,0-0.6,0.266-0.603,0.597l-0.076,7.203c-0.002,0.244,0.141,0.463,0.365,0.56c0.224,0.096,0.482,0.049,0.657-0.12l7.495-7.235c0.174-0.171,0.23-0.432,0.139-0.66c-0.09-0.228-0.312-0.377-0.56-0.377h-0.479l-0.296-0.379V3.496l0.312-0.445l9.083,0.081l0.252,0.252v1.743l-4.388,4.458L9.747,24.232z",inkscape:"M20.402,17.626c0.84-0.772,2.468-0.381,5.979-1.853c1.716-0.72,1.572-1.265,1.566-1.928c-0.001-0.014,0-0.027,0-0.041h-0.005c-0.012-0.667-0.291-1.332-0.846-1.845L17.049,2.684c-0.566-0.522-1.304-0.782-2.042-0.782V1.898c-0.738,0-1.475,0.261-2.04,0.783l-10.05,9.276c-0.554,0.512-0.832,1.176-0.843,1.844H2.07c0,0,0.003,0.011,0.004,0.011c0,0.012-0.004,0.024-0.004,0.034h0.017c0.193,0.676,5.164,1.536,5.718,2.049c0.838,0.774-3.211,1.339-2.374,2.114c0.838,0.773,5.062,1.496,5.898,2.271c0.838,0.771-1.711,1.596-0.874,2.366c0.837,0.773,3.651-0.191,3.142,1.822c1.13,1.045,3.49,0.547,5.071-0.498c0.837-0.771-1.607-0.703-0.77-1.477c0.836-0.774,2.949-0.777,4.73-2.627C21.913,18.838,19.566,18.398,20.402,17.626zM10.973,16.868l-0.42-0.504c1.497,0.358,3.162,0.827,4.498,0.837l0.058,0.554C13.964,17.646,11.544,17.137,10.973,16.868zM18.161,8.58l-1.396-0.74L14.53,9.594l-1.067-3.192l-1.177,2.545L8.998,9.25l0.036-1.352c0-0.324,1.895-2.596,3.05-3.136l2.112-1.401c0.312-0.186,0.53-0.261,0.727-0.257c0.327,0.011,0.593,0.239,1.112,0.55l4.748,3.25c0.357,0.215,0.619,0.522,0.626,0.898l-2.813-1.254L18.161,8.58zM26.434,19.594c-0.313-0.07-1.688-0.691-2.035,0.165c0.968,0.981,2.645,2.181,3.316,1.482C28.391,20.543,27.102,19.745,26.434,19.594zM4.663,21.566c-0.315,0.074-1.842,0.115-1.719,1.021c1.351,0.451,3.438,0.792,3.684-0.113C6.873,21.566,5.33,21.414,4.663,21.566zM17.877,26.396c-0.232,0.209-1.53,0.953-0.929,1.681c1.413-0.236,3.403-0.914,3.12-1.812C19.786,25.369,18.37,25.953,17.877,26.396z",aumade:"M14.513,24.52c-0.131-0.217-0.14-0.481-0.022-0.711l1.987-3.844l0,0c0.186-0.357,0.625-0.497,0.981-0.312c0.357,0.188,0.498,0.625,0.312,0.982l-1.801,3.48l2.228,3.699h12.269l-14.8-25.631L6.433,18.178c0.434,0.242,0.909,0.479,1.391,0.654c0.571,0.211,1.148,0.342,1.658,0.342c0.276,0,0.579-0.078,0.916-0.238c0.337-0.158,0.7-0.396,1.073-0.688c0.749-0.582,1.527-1.354,2.334-2.021c0.539-0.442,1.091-0.844,1.706-1.099c0.352-0.145,0.729-0.239,1.128-0.239c0.622,0,1.174,0.214,1.622,0.5c0.449,0.287,0.813,0.646,1.11,0.995c0.59,0.697,0.902,1.359,0.924,1.394l0,0c0.18,0.361,0.021,0.801-0.341,0.977c-0.356,0.176-0.798,0.021-0.978-0.34c0-0.002-0.002-0.004-0.004-0.007c-0.002-0.011-0.008-0.021-0.018-0.034c-0.018-0.033-0.043-0.082-0.078-0.146c-0.07-0.125-0.179-0.305-0.312-0.496c-0.271-0.391-0.668-0.845-1.092-1.104c-0.281-0.178-0.561-0.272-0.844-0.272c-0.216,0-0.479,0.069-0.788,0.229c-0.309,0.153-0.653,0.396-1.016,0.688c-0.727,0.584-1.511,1.362-2.351,2.033c-0.562,0.445-1.15,0.853-1.809,1.103c-0.375,0.143-0.776,0.229-1.195,0.229c-0.749,0-1.48-0.181-2.164-0.433c-0.58-0.219-1.125-0.482-1.613-0.764L0.86,27.816h15.63L14.513,24.52zM18.214,22.242c0.222-0.557,0.537-1.217,0.963-1.848c0.427-0.627,0.957-1.232,1.646-1.646c0.379-0.229,0.812-0.391,1.282-0.438l-0.604-0.934l0,0c-0.22-0.339-0.123-0.789,0.215-1.009c0.341-0.219,0.789-0.123,1.013,0.216l1.545,2.391c0.184,0.274,0.147,0.646-0.075,0.893c-0.228,0.247-0.591,0.305-0.886,0.145c-0.354-0.191-0.646-0.258-0.901-0.258c-0.291,0-0.562,0.084-0.845,0.25c-0.277,0.164-0.562,0.414-0.813,0.719c-0.519,0.607-0.937,1.422-1.185,2.055c-0.111,0.285-0.387,0.466-0.678,0.466c-0.092,0-0.183-0.021-0.271-0.056C18.249,23.039,18.064,22.615,18.214,22.242z",firefox:"M28.4,22.469c0.479-0.964,0.851-1.991,1.095-3.066c0.953-3.661,0.666-6.854,0.666-6.854l-0.327,2.104c0,0-0.469-3.896-1.044-5.353c-0.881-2.231-1.273-2.214-1.274-2.21c0.542,1.379,0.494,2.169,0.483,2.288c-0.01-0.016-0.019-0.032-0.027-0.047c-0.131-0.324-0.797-1.819-2.225-2.878c-2.502-2.481-5.943-4.014-9.745-4.015c-4.056,0-7.705,1.745-10.238,4.525C5.444,6.5,5.183,5.938,5.159,5.317c0,0-0.002,0.002-0.006,0.005c0-0.011-0.003-0.021-0.003-0.031c0,0-1.61,1.247-1.436,4.612c-0.299,0.574-0.56,1.172-0.777,1.791c-0.375,0.817-0.75,2.004-1.059,3.746c0,0,0.133-0.422,0.399-0.988c-0.064,0.482-0.103,0.971-0.116,1.467c-0.09,0.845-0.118,1.865-0.039,3.088c0,0,0.032-0.406,0.136-1.021c0.834,6.854,6.667,12.165,13.743,12.165l0,0c1.86,0,3.636-0.37,5.256-1.036C24.938,27.771,27.116,25.196,28.4,22.469zM16.002,3.356c2.446,0,4.73,0.68,6.68,1.86c-2.274-0.528-3.433-0.261-3.423-0.248c0.013,0.015,3.384,0.589,3.981,1.411c0,0-1.431,0-2.856,0.41c-0.065,0.019,5.242,0.663,6.327,5.966c0,0-0.582-1.213-1.301-1.42c0.473,1.439,0.351,4.17-0.1,5.528c-0.058,0.174-0.118-0.755-1.004-1.155c0.284,2.037-0.018,5.268-1.432,6.158c-0.109,0.07,0.887-3.189,0.201-1.93c-4.093,6.276-8.959,2.539-10.934,1.208c1.585,0.388,3.267,0.108,4.242-0.559c0.982-0.672,1.564-1.162,2.087-1.047c0.522,0.117,0.87-0.407,0.464-0.872c-0.405-0.466-1.392-1.105-2.725-0.757c-0.94,0.247-2.107,1.287-3.886,0.233c-1.518-0.899-1.507-1.63-1.507-2.095c0-0.366,0.257-0.88,0.734-1.028c0.58,0.062,1.044,0.214,1.537,0.466c0.005-0.135,0.006-0.315-0.001-0.519c0.039-0.077,0.015-0.311-0.047-0.596c-0.036-0.287-0.097-0.582-0.19-0.851c0.01-0.002,0.017-0.007,0.021-0.021c0.076-0.344,2.147-1.544,2.299-1.659c0.153-0.114,0.55-0.378,0.506-1.183c-0.015-0.265-0.058-0.294-2.232-0.286c-0.917,0.003-1.425-0.894-1.589-1.245c0.222-1.231,0.863-2.11,1.919-2.704c0.02-0.011,0.015-0.021-0.008-0.027c0.219-0.127-2.524-0.006-3.76,1.604C9.674,8.045,9.219,7.95,8.71,7.95c-0.638,0-1.139,0.07-1.603,0.187c-0.05,0.013-0.122,0.011-0.208-0.001C6.769,8.04,6.575,7.88,6.365,7.672c0.161-0.18,0.324-0.356,0.495-0.526C9.201,4.804,12.43,3.357,16.002,3.356z",ie:"M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z",ie9:"M27.751,17.887c0.054-0.434,0.081-0.876,0.081-1.324c0-1.744-0.413-3.393-1.146-4.854c1.133-2.885,1.155-5.369-0.201-6.777c-1.756-1.822-5.391-1.406-9.433,0.721c-0.069-0.001-0.138-0.003-0.206-0.003c-6.069,0-10.988,4.888-10.988,10.917c0,0.183,0.005,0.354,0.014,0.529c-2.688,4.071-3.491,7.967-1.688,9.838c1.557,1.613,4.691,1.344,8.2-0.392c1.363,0.604,2.873,0.938,4.462,0.938c4.793,0,8.867-3.049,10.369-7.299H21.26c-0.814,1.483-2.438,2.504-4.307,2.504c-2.688,0-4.867-2.104-4.867-4.688c0-0.036,0.002-0.071,0.003-0.106h15.662V17.887zM26.337,6.099c0.903,0.937,0.806,2.684-0.087,4.818c-1.27-2.083-3.221-3.71-5.546-4.576C23.244,5.217,25.324,5.047,26.337,6.099zM16.917,10.372c2.522,0,4.585,1.991,4.748,4.509h-9.496C12.333,12.363,14.396,10.372,16.917,10.372zM5.687,26.501c-1.103-1.146-0.712-3.502,0.799-6.298c0.907,2.546,2.736,4.658,5.09,5.938C8.92,27.368,6.733,27.587,5.687,26.501z",opera:"M15.954,2.046c-7.489,0-12.872,5.432-12.872,13.581c0,7.25,5.234,13.835,12.873,13.835c7.712,0,12.974-6.583,12.974-13.835C28.929,7.413,23.375,2.046,15.954,2.046zM15.952,26.548L15.952,26.548c-2.289,0-3.49-1.611-4.121-3.796c-0.284-1.037-0.458-2.185-0.563-3.341c-0.114-1.374-0.129-2.773-0.129-4.028c0-0.993,0.018-1.979,0.074-2.926c0.124-1.728,0.386-3.431,0.89-4.833c0.694-1.718,1.871-2.822,3.849-2.822c2.5,0,3.763,1.782,4.385,4.322c0.429,1.894,0.56,4.124,0.56,6.274c0,2.299-0.103,5.153-0.763,7.442C19.473,24.979,18.242,26.548,15.952,26.548z",chrome:"M15.318,7.677c0.071-0.029,0.148-0.046,0.229-0.046h11.949c-2.533-3.915-6.938-6.506-11.949-6.506c-5.017,0-9.428,2.598-11.959,6.522l4.291,7.431C8.018,11.041,11.274,7.796,15.318,7.677zM28.196,8.84h-8.579c2.165,1.357,3.605,3.763,3.605,6.506c0,1.321-0.334,2.564-0.921,3.649c-0.012,0.071-0.035,0.142-0.073,0.209l-5.973,10.347c7.526-0.368,13.514-6.587,13.514-14.205C29.77,13.002,29.201,10.791,28.196,8.84zM15.547,23.022c-2.761,0-5.181-1.458-6.533-3.646c-0.058-0.046-0.109-0.103-0.149-0.171L2.89,8.855c-1,1.946-1.565,4.153-1.565,6.492c0,7.624,5.999,13.846,13.534,14.205l4.287-7.425C18.073,22.698,16.848,23.022,15.547,23.022zM9.08,15.347c0,1.788,0.723,3.401,1.894,4.573c1.172,1.172,2.785,1.895,4.573,1.895c1.788,0,3.401-0.723,4.573-1.895s1.895-2.785,1.895-4.573c0-1.788-0.723-3.4-1.895-4.573c-1.172-1.171-2.785-1.894-4.573-1.894c-1.788,0-3.401,0.723-4.573,1.894C9.803,11.946,9.081,13.559,9.08,15.347z",safari:"M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-0.104-0.06-0.198-0.112-0.283c0.381-0.308,0.625-0.778,0.625-1.306c0-0.927-0.751-1.678-1.678-1.678s-1.678,0.751-1.678,1.678c0,0.745,0.485,1.376,1.157,1.595c-0.021,0.105-0.021,0.216,0,0.328l0.033,0.167C7.645,6.95,3.712,11.804,3.712,17.578c0,6.871,5.571,12.441,12.442,12.441c6.871,0,12.441-5.57,12.441-12.441C28.596,10.706,23.025,5.135,16.154,5.135zM16.369,8.1c4.455,0,8.183,3.116,9.123,7.287l-0.576,0.234c-0.148-0.681-0.755-1.191-1.48-1.191c-0.837,0-1.516,0.679-1.516,1.516c0,0.075,0.008,0.148,0.018,0.221l-2.771-0.028c-0.054-0.115-0.114-0.226-0.182-0.333l3.399-5.11l0.055-0.083l-4.766,4.059c-0.352-0.157-0.74-0.248-1.148-0.256l0.086-0.018l-1.177-2.585c0.64-0.177,1.111-0.763,1.111-1.459c0-0.837-0.678-1.515-1.516-1.515c-0.075,0-0.147,0.007-0.219,0.018l0.058-0.634C15.357,8.141,15.858,8.1,16.369,8.1zM12.146,3.455c0-0.727,0.591-1.318,1.318-1.318c0.727,0,1.318,0.591,1.318,1.318c0,0.425-0.203,0.802-0.516,1.043c-0.183-0.123-0.413-0.176-0.647-0.13c-0.226,0.045-0.413,0.174-0.535,0.349C12.542,4.553,12.146,4.049,12.146,3.455zM7.017,17.452c0-4.443,3.098-8.163,7.252-9.116l0.297,0.573c-0.61,0.196-1.051,0.768-1.051,1.442c0,0.837,0.678,1.516,1.515,1.516c0.068,0,0.135-0.006,0.2-0.015l-0.058,2.845l0.052-0.011c-0.442,0.204-0.824,0.513-1.116,0.895l0.093-0.147l-1.574-0.603l1.172,1.239l0.026-0.042c-0.19,0.371-0.306,0.788-0.324,1.229l-0.003-0.016l-2.623,1.209c-0.199-0.604-0.767-1.041-1.438-1.041c-0.837,0-1.516,0.678-1.516,1.516c0,0.064,0.005,0.128,0.013,0.191l-0.783-0.076C7.063,18.524,7.017,17.994,7.017,17.452zM16.369,26.805c-4.429,0-8.138-3.078-9.106-7.211l0.691-0.353c0.146,0.686,0.753,1.2,1.482,1.2c0.837,0,1.515-0.679,1.515-1.516c0-0.105-0.011-0.207-0.031-0.307l2.858,0.03c0.045,0.095,0.096,0.187,0.15,0.276l-3.45,5.277l0.227-0.195l4.529-3.92c0.336,0.153,0.705,0.248,1.094,0.266l-0.019,0.004l1.226,2.627c-0.655,0.166-1.142,0.76-1.142,1.468c0,0.837,0.678,1.515,1.516,1.515c0.076,0,0.151-0.007,0.225-0.018l0.004,0.688C17.566,26.746,16.975,26.805,16.369,26.805zM18.662,26.521l-0.389-0.6c0.661-0.164,1.152-0.759,1.152-1.47c0-0.837-0.68-1.516-1.516-1.516c-0.066,0-0.13,0.005-0.193,0.014v-2.86l-0.025,0.004c0.409-0.185,0.77-0.459,1.055-0.798l1.516,0.659l-1.104-1.304c0.158-0.335,0.256-0.704,0.278-1.095l2.552-1.164c0.19,0.618,0.766,1.068,1.447,1.068c0.838,0,1.516-0.679,1.516-1.516c0-0.069-0.006-0.137-0.016-0.204l0.65,0.12c0.089,0.517,0.136,1.049,0.136,1.591C25.722,21.826,22.719,25.499,18.662,26.521z",linkedin:"M27.25,3.125h-22c-1.104,0-2,0.896-2,2v22c0,1.104,0.896,2,2,2h22c1.104,0,2-0.896,2-2v-22C29.25,4.021,28.354,3.125,27.25,3.125zM11.219,26.781h-4v-14h4V26.781zM9.219,11.281c-1.383,0-2.5-1.119-2.5-2.5s1.117-2.5,2.5-2.5s2.5,1.119,2.5,2.5S10.602,11.281,9.219,11.281zM25.219,26.781h-4v-8.5c0-0.4-0.403-1.055-0.687-1.213c-0.375-0.211-1.261-0.229-1.665-0.034l-1.648,0.793v8.954h-4v-14h4v0.614c1.583-0.723,3.78-0.652,5.27,0.184c1.582,0.886,2.73,2.864,2.73,4.702V26.781z",flickr:"M21.77,8.895c-2.379,0-4.479,1.174-5.77,2.969c-1.289-1.795-3.39-2.969-5.77-2.969c-3.924,0-7.105,3.181-7.105,7.105c0,3.924,3.181,7.105,7.105,7.105c2.379,0,4.48-1.175,5.77-2.97c1.29,1.795,3.391,2.97,5.77,2.97c3.925,0,7.105-3.182,7.105-7.105C28.875,12.075,25.694,8.895,21.77,8.895zM21.769,21.822c-3.211,0-5.821-2.61-5.821-5.821c0-3.213,2.61-5.824,5.821-5.824c3.213,0,5.824,2.611,5.824,5.824C27.593,19.212,24.981,21.822,21.769,21.822z",github:"M28.436,15.099c-1.201-0.202-2.451-0.335-3.466-0.371l-0.179-0.006c0.041-0.09,0.072-0.151,0.082-0.16c0.022-0.018,0.04-0.094,0.042-0.168c0-0.041,0.018-0.174,0.046-0.35c0.275,0.01,0.64,0.018,1.038,0.021c1.537,0.012,3.145,0.136,4.248,0.331c0.657,0.116,0.874,0.112,0.389-0.006c-0.491-0.119-1.947-0.294-3.107-0.37c-0.779-0.053-1.896-0.073-2.554-0.062c0.019-0.114,0.041-0.241,0.064-0.371c0.093-0.503,0.124-1.009,0.126-2.016c0.002-1.562-0.082-1.992-0.591-3.025c-0.207-0.422-0.441-0.78-0.724-1.104c0.247-0.729,0.241-1.858-0.015-2.848c-0.211-0.812-0.285-0.864-1.021-0.708C22.19,4.019,21.69,4.2,21.049,4.523c-0.303,0.153-0.721,0.391-1.024,0.578c-0.79-0.278-1.607-0.462-2.479-0.561c-0.884-0.1-3.051-0.044-3.82,0.098c-0.752,0.139-1.429,0.309-2.042,0.511c-0.306-0.189-0.75-0.444-1.067-0.604C9.973,4.221,9.473,4.041,8.847,3.908c-0.734-0.157-0.81-0.104-1.02,0.708c-0.26,1.003-0.262,2.151-0.005,2.878C7.852,7.577,7.87,7.636,7.877,7.682c-1.042,1.312-1.382,2.78-1.156,4.829c0.059,0.534,0.15,1.024,0.277,1.473c-0.665-0.004-1.611,0.02-2.294,0.064c-1.162,0.077-2.618,0.25-3.109,0.369c-0.484,0.118-0.269,0.122,0.389,0.007c1.103-0.194,2.712-0.32,4.248-0.331c0.29-0.001,0.561-0.007,0.794-0.013c0.07,0.237,0.15,0.463,0.241,0.678L7.26,14.759c-1.015,0.035-2.264,0.168-3.465,0.37c-0.901,0.151-2.231,0.453-2.386,0.54c-0.163,0.091-0.03,0.071,0.668-0.106c1.273-0.322,2.928-0.569,4.978-0.741l0.229-0.02c0.44,1.022,1.118,1.802,2.076,2.41c0.586,0.373,1.525,0.756,1.998,0.816c0.13,0.016,0.508,0.094,0.84,0.172c0.333,0.078,0.984,0.195,1.446,0.262h0.011c-0.009,0.006-0.017,0.01-0.025,0.016c-0.56,0.291-0.924,0.744-1.169,1.457c-0.11,0.033-0.247,0.078-0.395,0.129c-0.529,0.18-0.735,0.217-1.271,0.221c-0.556,0.004-0.688-0.02-1.02-0.176c-0.483-0.225-0.933-0.639-1.233-1.133c-0.501-0.826-1.367-1.41-2.089-1.41c-0.617,0-0.734,0.25-0.288,0.615c0.672,0.549,1.174,1.109,1.38,1.537c0.116,0.24,0.294,0.611,0.397,0.824c0.109,0.227,0.342,0.535,0.564,0.748c0.522,0.498,1.026,0.736,1.778,0.848c0.504,0.074,0.628,0.074,1.223-0.002c0.287-0.035,0.529-0.076,0.746-0.127c0,0.244,0,0.525,0,0.855c0,1.766-0.021,2.334-0.091,2.5c-0.132,0.316-0.428,0.641-0.716,0.787c-0.287,0.146-0.376,0.307-0.255,0.455c0.067,0.08,0.196,0.094,0.629,0.066c0.822-0.051,1.403-0.355,1.699-0.891c0.095-0.172,0.117-0.518,0.147-2.318c0.032-1.953,0.046-2.141,0.173-2.42c0.077-0.166,0.188-0.346,0.25-0.395c0.104-0.086,0.111,0.084,0.111,2.42c-0.001,2.578-0.027,2.889-0.285,3.385c-0.058,0.113-0.168,0.26-0.245,0.33c-0.135,0.123-0.192,0.438-0.098,0.533c0.155,0.154,0.932-0.088,1.356-0.422c0.722-0.572,0.808-1.045,0.814-4.461l0.003-2.004l0.219,0.021l0.219,0.02l0.036,2.621c0.041,2.951,0.047,2.994,0.549,3.564c0.285,0.322,0.572,0.5,1.039,0.639c0.625,0.188,0.813-0.102,0.393-0.605c-0.457-0.547-0.479-0.756-0.454-3.994c0.017-2.076,0.017-2.076,0.151-1.955c0.282,0.256,0.336,0.676,0.336,2.623c0,2.418,0.069,2.648,0.923,3.07c0.399,0.195,0.511,0.219,1.022,0.221c0.544,0.002,0.577-0.006,0.597-0.148c0.017-0.115-0.05-0.193-0.304-0.348c-0.333-0.205-0.564-0.467-0.709-0.797c-0.055-0.127-0.092-0.959-0.117-2.672c-0.036-2.393-0.044-2.502-0.193-2.877c-0.201-0.504-0.508-0.902-0.897-1.166c-0.101-0.066-0.202-0.121-0.333-0.162c0.161-0.016,0.317-0.033,0.468-0.055c1.572-0.209,2.403-0.383,3.07-0.641c1.411-0.543,2.365-1.445,2.882-2.724c0.046-0.114,0.092-0.222,0.131-0.309l0.398,0.033c2.051,0.173,3.706,0.42,4.979,0.743c0.698,0.177,0.831,0.198,0.668,0.105C30.666,15.551,29.336,15.25,28.436,15.099zM22.422,15.068c-0.233,0.512-0.883,1.17-1.408,1.428c-0.518,0.256-1.33,0.451-2.25,0.544c-0.629,0.064-4.137,0.083-4.716,0.026c-1.917-0.188-2.991-0.557-3.783-1.296c-0.75-0.702-1.1-1.655-1.039-2.828c0.039-0.734,0.216-1.195,0.679-1.755c0.421-0.51,0.864-0.825,1.386-0.985c0.437-0.134,1.778-0.146,3.581-0.03c0.797,0.051,1.456,0.051,2.252,0c1.886-0.119,3.145-0.106,3.61,0.038c0.731,0.226,1.397,0.834,1.797,1.644c0.18,0.362,0.215,0.516,0.241,1.075C22.808,13.699,22.675,14.517,22.422,15.068zM12.912,11.762c-1.073-0.188-1.686,1.649-0.863,2.587c0.391,0.445,0.738,0.518,1.172,0.248c0.402-0.251,0.62-0.72,0.62-1.328C13.841,12.458,13.472,11.862,12.912,11.762zM19.425,11.872c-1.073-0.188-1.687,1.647-0.864,2.586c0.392,0.445,0.738,0.519,1.173,0.247c0.401-0.25,0.62-0.72,0.62-1.328C20.354,12.569,19.985,11.971,19.425,11.872zM16.539,15.484c-0.023,0.074-0.135,0.184-0.248,0.243c-0.286,0.147-0.492,0.096-0.794-0.179c-0.187-0.169-0.272-0.258-0.329-0.081c-0.053,0.164,0.28,0.493,0.537,0.594c0.236,0.094,0.405,0.097,0.661-0.01c0.254-0.106,0.476-0.391,0.476-0.576C16.842,15.303,16.595,15.311,16.539,15.484zM16.222,14.909c0.163-0.144,0.2-0.44,0.044-0.597s-0.473-0.133-0.597,0.043c-0.144,0.206-0.067,0.363,0.036,0.53C15.865,15.009,16.08,15.034,16.222,14.909z",githubalt:"M23.356,17.485c-0.004,0.007-0.007,0.013-0.01,0.021l0.162,0.005c0.107,0.004,0.218,0.01,0.33,0.016c-0.046-0.004-0.09-0.009-0.136-0.013L23.356,17.485zM15.5,1.249C7.629,1.25,1.25,7.629,1.249,15.5C1.25,23.371,7.629,29.75,15.5,29.751c7.871-0.001,14.25-6.38,14.251-14.251C29.75,7.629,23.371,1.25,15.5,1.249zM3.771,17.093c0.849-0.092,1.833-0.148,2.791-0.156c0.262,0,0.507-0.006,0.717-0.012c0.063,0.213,0.136,0.419,0.219,0.613H7.492c-0.918,0.031-2.047,0.152-3.134,0.335c-0.138,0.023-0.288,0.051-0.441,0.08C3.857,17.67,3.81,17.383,3.771,17.093zM12.196,22.224c-0.1,0.028-0.224,0.07-0.357,0.117c-0.479,0.169-0.665,0.206-1.15,0.206c-0.502,0.015-0.621-0.019-0.921-0.17C9.33,22.171,8.923,21.8,8.651,21.353c-0.453-0.746-1.236-1.275-1.889-1.275c-0.559,0-0.664,0.227-0.261,0.557c0.608,0.496,1.062,0.998,1.248,1.385c0.105,0.215,0.266,0.546,0.358,0.744c0.099,0.206,0.311,0.474,0.511,0.676c0.472,0.441,0.928,0.659,1.608,0.772c0.455,0.06,0.567,0.06,1.105-0.004c0.26-0.03,0.479-0.067,0.675-0.118v0.771c0,1.049-0.008,1.628-0.031,1.945c-1.852-0.576-3.507-1.595-4.848-2.934c-1.576-1.578-2.706-3.592-3.195-5.848c0.952-0.176,2.073-0.32,3.373-0.43l0.208-0.018c0.398,0.925,1.011,1.631,1.876,2.179c0.53,0.337,1.38,0.685,1.808,0.733c0.118,0.02,0.46,0.09,0.76,0.16c0.302,0.066,0.89,0.172,1.309,0.236h0.009c-0.007,0.018-0.014,0.02-0.022,0.02C12.747,21.169,12.418,21.579,12.196,22.224zM13.732,27.207c-0.168-0.025-0.335-0.056-0.5-0.087c0.024-0.286,0.038-0.785,0.054-1.723c0.028-1.767,0.041-1.94,0.156-2.189c0.069-0.15,0.17-0.32,0.226-0.357c0.095-0.078,0.101,0.076,0.101,2.188C13.769,26.143,13.763,26.786,13.732,27.207zM15.5,27.339c-0.148,0-0.296-0.006-0.443-0.012c0.086-0.562,0.104-1.428,0.106-2.871l0.003-1.82l0.197,0.019l0.199,0.02l0.032,2.365c0.017,1.21,0.027,1.878,0.075,2.296C15.613,27.335,15.558,27.339,15.5,27.339zM17.006,27.24c-0.039-0.485-0.037-1.243-0.027-2.553c0.019-1.866,0.019-1.866,0.131-1.769c0.246,0.246,0.305,0.623,0.305,2.373c0,0.928,0.011,1.497,0.082,1.876C17.334,27.196,17.17,27.22,17.006,27.24zM27.089,17.927c-0.155-0.029-0.307-0.057-0.446-0.08c-0.96-0.162-1.953-0.275-2.804-0.32c1.25,0.108,2.327,0.248,3.246,0.418c-0.479,2.289-1.618,4.33-3.214,5.928c-1.402,1.4-3.15,2.448-5.106,3.008c-0.034-0.335-0.058-1.048-0.066-2.212c-0.03-2.167-0.039-2.263-0.17-2.602c-0.181-0.458-0.47-0.811-0.811-1.055c-0.094-0.057-0.181-0.103-0.301-0.14c0.145-0.02,0.282-0.021,0.427-0.057c1.418-0.188,2.168-0.357,2.772-0.584c1.263-0.492,2.129-1.301,2.606-2.468c0.044-0.103,0.088-0.2,0.123-0.279l0.011,0.001c0.032-0.07,0.057-0.118,0.064-0.125c0.02-0.017,0.036-0.085,0.038-0.151c0-0.037,0.017-0.157,0.041-0.317c0.249,0.01,0.58,0.018,0.938,0.02c0.959,0.008,1.945,0.064,2.794,0.156C27.194,17.356,27.148,17.644,27.089,17.927zM25.823,16.87c-0.697-0.049-1.715-0.064-2.311-0.057c0.02-0.103,0.037-0.218,0.059-0.336c0.083-0.454,0.111-0.912,0.113-1.823c0.002-1.413-0.074-1.801-0.534-2.735c-0.188-0.381-0.399-0.705-0.655-0.998c0.225-0.659,0.207-1.68-0.02-2.575c-0.19-0.734-0.258-0.781-0.924-0.64c-0.563,0.12-1.016,0.283-1.598,0.576c-0.274,0.138-0.652,0.354-0.923,0.522c-0.715-0.251-1.451-0.419-2.242-0.508c-0.799-0.092-2.759-0.04-3.454,0.089c-0.681,0.126-1.293,0.28-1.848,0.462c-0.276-0.171-0.678-0.4-0.964-0.547C9.944,8.008,9.491,7.846,8.925,7.727c-0.664-0.144-0.732-0.095-0.922,0.64c-0.235,0.907-0.237,1.945-0.004,2.603c0.026,0.075,0.043,0.129,0.05,0.17c-0.942,1.187-1.25,2.515-1.046,4.367c0.053,0.482,0.136,0.926,0.251,1.333c-0.602-0.004-1.457,0.018-2.074,0.057c-0.454,0.031-0.957,0.076-1.418,0.129c-0.063-0.5-0.101-1.008-0.101-1.524c0-3.273,1.323-6.225,3.468-8.372c2.146-2.144,5.099-3.467,8.371-3.467c3.273,0,6.226,1.323,8.371,3.467c2.145,2.147,3.468,5.099,3.468,8.372c0,0.508-0.036,1.008-0.098,1.499C26.78,16.946,26.276,16.899,25.823,16.87z",raphael:"M27.777,18.941c0.584-0.881,0.896-1.914,0.896-2.998c0-1.457-0.567-2.826-1.598-3.854l-6.91-6.911l-0.003,0.002c-0.985-0.988-2.35-1.6-3.851-1.6c-1.502,0-2.864,0.612-3.85,1.6H12.46l-6.911,6.911c-1.031,1.029-1.598,2.398-1.598,3.854c0,1.457,0.567,2.826,1.598,3.854l6.231,6.229c0.25,0.281,0.512,0.544,0.789,0.785c1.016,0.961,2.338,1.49,3.743,1.49c1.456,0,2.825-0.565,3.854-1.598l6.723-6.725c0.021-0.019,0.034-0.032,0.051-0.051l0.14-0.138c0.26-0.26,0.487-0.54,0.688-0.838c0.004-0.008,0.01-0.015,0.014-0.021L27.777,18.941zM26.658,15.946c0,0.678-0.197,1.326-0.561,1.879c-0.222,0.298-0.447,0.559-0.684,0.784L25.4,18.625c-1.105,1.052-2.354,1.35-3.414,1.35c-0.584,0-1.109-0.09-1.523-0.195c-2.422-0.608-5.056-2.692-6.261-5.732c0.649,0.274,1.362,0.426,2.11,0.426c2.811,0,5.129-2.141,5.415-4.877l3.924,3.925C26.301,14.167,26.658,15.029,26.658,15.946zM16.312,5.6c1.89,0,3.426,1.538,3.426,3.427c0,1.89-1.536,3.427-3.426,3.427c-1.889,0-3.426-1.537-3.426-3.427C12.886,7.138,14.423,5.6,16.312,5.6zM6.974,18.375c-0.649-0.648-1.007-1.512-1.007-2.429c0-0.917,0.357-1.78,1.007-2.428l2.655-2.656c-0.693,2.359-0.991,4.842-0.831,7.221c0.057,0.854,0.175,1.677,0.345,2.46L6.974,18.375zM11.514,11.592c0.583,4.562,4.195,9.066,8.455,10.143c0.693,0.179,1.375,0.265,2.033,0.265c0.01,0,0.02,0,0.027,0l-3.289,3.289c-0.648,0.646-1.512,1.006-2.428,1.006c-0.638,0-1.248-0.177-1.779-0.5l0.001-0.002c-0.209-0.142-0.408-0.295-0.603-0.461c-0.015-0.019-0.031-0.026-0.046-0.043l-0.665-0.664c-1.367-1.567-2.227-3.903-2.412-6.671C10.669,15.856,10.921,13.673,11.514,11.592z",graphael:"M28.833,15.709c0-1.477-0.574-2.862-1.617-3.904l-7.002-7.001l-0.003,0.002c-1.027-1.03-2.445-1.62-3.9-1.62c-1.455,0-2.871,0.59-3.9,1.621l-0.002-0.002l-7,7C4.376,12.836,3.79,14.25,3.79,15.709s0.586,2.873,1.619,3.902l6.312,6.312c0.253,0.285,0.519,0.556,0.8,0.8c1.049,0.989,2.463,1.534,3.908,1.51c1.417-0.021,2.783-0.604,3.785-1.604l6.812-6.812c0.021-0.021,0.035-0.029,0.062-0.062l0.143-0.146c0.271-0.271,0.484-0.562,0.725-0.86l-0.012-0.002C28.516,17.85,28.833,16.805,28.833,15.709zM18.77,25.17c-1.121,1.119-2.917,1.336-4.271,0.514l0.002-0.002c-0.213-0.145-0.414-0.303-0.61-0.471c-0.016-0.016-7.04-7.041-7.04-7.041c-1.34-1.34-1.342-3.584,0-4.92l7-6.998c1.121-1.121,2.908-1.338,4.259-0.512v0.002c0.213,0.141,0.414,0.299,0.604,0.467c0.021,0.016,7.053,7.043,7.053,7.043c0.396,0.388,0.655,0.852,0.818,1.348l-2.607,0.006c-0.537-3.754-3.769-6.641-7.667-6.641c-4.277,0-7.744,3.468-7.745,7.746c0.001,4.277,3.468,7.744,7.745,7.744c3.917,0,7.156-2.91,7.668-6.688l2.638-0.021c-0.16,0.521-0.441,1.02-0.849,1.412L18.77,25.17zM16.312,16.789c0.002,0,0.002,0,0.004,0l5.476-0.02c-0.5,2.562-2.76,4.518-5.48,4.521c-3.084-0.004-5.578-2.5-5.584-5.582c0.006-3.084,2.5-5.58,5.584-5.584c2.708,0.004,4.959,1.929,5.472,4.484l-5.476,0.018c-0.596,0.002-1.078,0.488-1.076,1.084C15.233,16.308,15.715,16.789,16.312,16.789z",svg:"M31.274,15.989c0-2.473-2.005-4.478-4.478-4.478l0,0c0.81-0.811,1.312-1.93,1.312-3.167c0-2.474-2.005-4.479-4.479-4.479c-1.236,0-2.356,0.501-3.167,1.312c0-2.473-2.005-4.478-4.478-4.478c-2.474,0-4.479,2.005-4.479,4.478c-0.811-0.81-1.93-1.312-3.167-1.312c-2.474,0-4.479,2.005-4.479,4.479c0,1.236,0.501,2.356,1.312,3.166c-2.474,0-4.479,2.005-4.479,4.479c0,2.474,2.005,4.479,4.479,4.479c-0.811,0.81-1.312,1.93-1.312,3.167c0,2.473,2.005,4.478,4.479,4.478c1.236,0,2.356-0.501,3.167-1.312c0,2.473,2.005,4.479,4.479,4.479c2.473,0,4.478-2.006,4.478-4.479l0,0c0.811,0.811,1.931,1.312,3.167,1.312c2.474,0,4.478-2.005,4.478-4.478c0-1.237-0.501-2.357-1.312-3.168c0.001,0,0.001,0,0.001,0C29.27,20.467,31.274,18.463,31.274,15.989zM23.583,21.211c0.016,0,0.031-0.001,0.047-0.001c1.339,0,2.424,1.085,2.424,2.425c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-0.017,0.001-0.031,0.001-0.047l-3.541-3.542v5.009c0.457,0.44,0.743,1.06,0.743,1.746c0,1.339-1.086,2.424-2.424,2.424c-1.339,0-2.425-1.085-2.425-2.424c0-0.687,0.286-1.306,0.743-1.746v-5.009l-3.541,3.542c0,0.016,0.001,0.031,0.001,0.047c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-1.34,1.085-2.425,2.424-2.425c0.015,0,0.031,0.001,0.046,0.001l3.542-3.541H6.919c-0.44,0.458-1.06,0.743-1.746,0.743c-1.339,0-2.424-1.085-2.424-2.424s1.085-2.424,2.424-2.424c0.686,0,1.305,0.285,1.746,0.744h5.008l-3.542-3.542c-0.015,0-0.031,0.001-0.046,0.001c-1.339,0-2.424-1.085-2.424-2.424S7.001,5.92,8.34,5.92s2.424,1.085,2.424,2.424c0,0.015-0.001,0.031-0.001,0.046l3.541,3.542V6.924c-0.457-0.441-0.743-1.06-0.743-1.746c0-1.339,1.086-2.425,2.425-2.425c1.338,0,2.424,1.085,2.424,2.425c0,0.686-0.286,1.305-0.743,1.746v5.008l3.541-3.542c0-0.015-0.001-0.031-0.001-0.046c0-1.339,1.085-2.424,2.424-2.424s2.424,1.085,2.424,2.424c0,1.339-1.085,2.424-2.424,2.424c-0.016,0-0.031-0.001-0.047-0.001l-3.541,3.542h5.008c0.441-0.458,1.061-0.744,1.747-0.744c1.338,0,2.423,1.085,2.423,2.424s-1.085,2.424-2.423,2.424c-0.687,0-1.306-0.285-1.747-0.743h-5.008L23.583,21.211z",usb:"M15.5,1.667L13.745,4.74h1.252v15.709L11.8,17.391c-0.205-0.26-0.351-0.601-0.358-0.952c0-1.417-0.001-2.258-0.001-2.568c0.592-0.21,1.02-0.774,1.02-1.444c0-0.849-0.682-1.538-1.521-1.538c-0.84,0-1.521,0.689-1.521,1.538c0,0.67,0.427,1.234,1.019,1.444l-0.001,2.539c0,0.688,0.373,1.409,0.812,1.868c-0.013-0.013-0.027-0.025,0,0c0.011,0.01,3.392,3.245,3.392,3.245c0.205,0.26,0.35,0.6,0.357,0.951v1.776c-1.161,0.236-2.036,1.272-2.036,2.517c0,1.418,1.137,2.566,2.539,2.566c1.403,0,2.54-1.148,2.54-2.566c0-1.244-0.875-2.28-2.038-2.517v-1.746c0-0.005,0-0.009,0-0.014v-3.861c0.008-0.35,0.152-0.689,0.358-0.949c0,0,3.38-3.234,3.392-3.245c0.027-0.026,0.012-0.013,0,0c0.438-0.459,0.811-1.181,0.811-1.869V10.12h1.02V7.046h-3.041v3.075h1.018c0,0-0.002,0.644-0.002,2.476c-0.008,0.351-0.152,0.692-0.357,0.952l-3.198,3.06V4.74h1.254L15.5,1.667z",ethernet:"M22.5,8.5v3.168l3.832,3.832L22.5,19.332V22.5l7-7L22.5,8.5zM8.5,22.5v-3.168L4.667,15.5L8.5,11.668V8.5l-7,7L8.5,22.5zM15.5,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681c0.927,0,1.68-0.754,1.68-1.681C17.18,14.852,16.427,14.101,15.5,14.101zM10.46,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681s1.68-0.754,1.68-1.681C12.14,14.852,11.388,14.101,10.46,14.101zM20.541,14.101c-0.928,0-1.682,0.751-1.682,1.68c0,0.927,0.754,1.681,1.682,1.681s1.68-0.754,1.68-1.681C22.221,14.852,21.469,14.101,20.541,14.101z",js:"M1,1v30h30V1H1zM17.326,24.398c0,2.92-1.712,4.248-4.209,4.248c-2.255,0-3.564-1.168-4.229-2.576l0,0l0,0l0,0l2.296-1.391c0.443,0.777,0.846,1.442,1.812,1.442c0.926,0,1.511-0.354,1.511-1.771V14.77h2.819V24.398zM23.992,28.646c-2.618,0-4.311-1.248-5.135-2.879l2.295-1.328c0.604,0.979,1.39,1.711,2.779,1.711c1.168,0,1.904-0.584,1.904-1.396c0-0.966-0.766-1.311-2.054-1.865L23.08,22.58c-2.034-0.865-3.383-1.953-3.383-4.249c0-2.114,1.604-3.726,4.128-3.726c1.792,0,3.081,0.625,4.008,2.254l-2.19,1.406c-0.479-0.861-1.006-1.209-1.812-1.209c-0.825,0-1.353,0.521-1.353,1.209c0,0.852,0.521,1.188,1.729,1.711l0.704,0.309c2.396,1.021,3.746,2.07,3.746,4.43C28.664,27.259,26.671,28.646,23.992,28.646z",dribbble:"M16,1.667C8.084,1.667,1.667,8.084,1.667,16S8.084,30.333,16,30.333S30.333,23.916,30.333,16S23.916,1.667,16,1.667zM25.534,8.232c1.7,2.084,2.731,4.732,2.767,7.618c-3.232-0.656-6.14-0.783-8.777-0.38c-0.362-0.825-0.738-1.631-1.125-2.412C22.43,11.542,24.497,9.781,25.534,8.232zM23.955,6.624c-0.877,1.658-3.191,3.232-6.564,4.476c-1.533-2.86-3.115-5.299-4.388-7.033c0.96-0.241,1.964-0.37,2.997-0.37C19.031,3.696,21.809,4.8,23.955,6.624zM10.846,4.831c1.09,1.441,2.751,3.91,4.415,6.967c-3.687,1.073-8.032,1.677-11.282,1.585C4.806,9.581,7.395,6.431,10.846,4.831zM3.696,16c0-0.147,0.006-0.293,0.011-0.439c0.312,0.013,0.632,0.019,0.96,0.019c3.464,0,7.754-0.646,11.484-1.765c0.048-0.015,0.093-0.029,0.14-0.044c0.354,0.704,0.697,1.431,1.033,2.175c-0.516,0.146-1.022,0.314-1.518,0.507c-3.547,1.375-6.512,3.895-9.031,7.678C4.861,21.96,3.696,19.114,3.696,16zM8.388,25.656c2.31-3.574,5.002-5.924,8.209-7.167c0.516-0.2,1.049-0.369,1.594-0.513c1.205,2.996,2.166,6.205,2.559,9.373c-1.462,0.613-3.066,0.953-4.749,0.953C13.128,28.305,10.484,27.312,8.388,25.656zM22.802,26.246c-0.446-2.939-1.321-5.895-2.413-8.686c2.316-0.279,4.881-0.117,7.742,0.485C27.557,21.46,25.574,24.398,22.802,26.246z","500px":"M24.902,13.033c-2.57,0-4.65,2.998-4.65,2.998s-2.141-2.998-4.772-2.998c-2.63,0-3.793,2.691-3.793,2.691s-1.04-2.141-3.365-2.141c-2.095,0-2.351,0.842-2.381,1.009l0.424-2.783h5.077v-2.08H4.529l-1.392,6.865l2.432,0.049c0,0,0.917-1.346,1.896-1.346s1.958,0.917,1.958,2.264c0,1.348-1.04,2.555-2.019,2.555s-1.958-1.023-1.958-1.76H3v0.308c0,2.08,1.835,3.608,4.344,3.608c2.508,0,4.343-1.896,4.343-2.691c0,0,0.795,2.691,3.916,2.691c3.122,0,4.588-2.691,4.588-2.691s2.142,2.691,4.711,2.691c2.568,0,4.099-2.143,4.099-4.771C29,14.868,27.104,13.033,24.902,13.033zM15.511,19.578c-1.285,0-1.958-1.284-1.958-1.957s0.428-1.958,1.896-1.958c1.469,0,2.998,1.958,2.998,1.958S16.795,19.578,15.511,19.578zM24.779,19.578c-1.285,0-2.938-1.957-2.938-1.957s1.531-1.958,2.998-1.958c1.47,0,1.896,1.285,1.896,1.958S26.064,19.578,24.779,19.578z",instagram:"M16,9.904c-3.366,0-6.096,2.729-6.096,6.096c0,3.366,2.729,6.096,6.096,6.096s6.096-2.729,6.096-6.096S19.366,9.904,16,9.904zM16,20.48c-2.475,0-4.48-2.006-4.48-4.48c0-2.474,2.006-4.48,4.48-4.48c2.475,0,4.48,2.006,4.48,4.48C20.48,18.475,18.475,20.48,16,20.48zM24.576,2.321H7.423c-2.848,0-5.156,2.309-5.156,5.157v17.043c0,2.849,2.309,5.155,5.156,5.155h17.153c2.849,0,5.156-2.309,5.156-5.155V7.479C29.732,4.63,27.425,2.321,24.576,2.321zM22.236,5.394c0-0.605,0.49-1.097,1.097-1.097h3.219c0.605,0,1.097,0.491,1.097,1.097v3.219c0,0.605-0.489,1.097-1.097,1.097h-3.219c-0.604,0-1.097-0.491-1.097-1.097V5.394zM28.637,24.521c0,2.237-1.82,4.06-4.061,4.06H7.423c-2.238,0-4.06-1.82-4.06-4.06V10.879H4.19c0.102-0.5,0.544-0.877,1.075-0.877h3.438c0.53,0,0.974,0.377,1.074,0.877h1.498c1.242-1.146,2.9-1.847,4.724-1.847s3.481,0.701,4.724,1.847h7.912v13.643H28.637L28.637,24.521z", -android:"M6.13,11.126c-0.894,0-1.624,0.731-1.624,1.624v6.496c0,0.895,0.73,1.624,1.624,1.624c0.893,0,1.624-0.729,1.624-1.624V12.75C7.754,11.856,7.023,11.126,6.13,11.126zM19.516,4.96l1.32-2.035c0.074-0.113,0.042-0.264-0.07-0.338c-0.113-0.074-0.266-0.041-0.34,0.072l-1.367,2.106c-0.93-0.36-1.966-0.561-3.059-0.561c-1.094,0-2.13,0.201-3.058,0.561l-1.368-2.106c-0.073-0.113-0.225-0.145-0.338-0.072c-0.113,0.074-0.145,0.225-0.072,0.338l1.321,2.035c-2.186,1.009-3.674,2.928-3.717,5.138h14.464C23.189,7.888,21.702,5.969,19.516,4.96zM12.898,8.062c-0.459,0-0.832-0.373-0.832-0.832s0.373-0.832,0.832-0.832c0.46,0,0.832,0.373,0.832,0.832S13.358,8.062,12.898,8.062zM19.102,8.062c-0.459,0-0.832-0.373-0.832-0.832s0.373-0.832,0.832-0.832s0.832,0.373,0.832,0.832S19.561,8.062,19.102,8.062zM25.87,11.126c-0.894,0-1.624,0.731-1.624,1.624v6.496c0,0.895,0.73,1.624,1.624,1.624s1.624-0.729,1.624-1.624V12.75C27.494,11.856,26.764,11.126,25.87,11.126zM8.756,22.904c0,0.723,0.591,1.312,1.314,1.312h1.363v3.61c0,0.896,0.731,1.624,1.625,1.624c0.893,0,1.624-0.729,1.624-1.624v-3.611h2.636v3.61c0,0.896,0.729,1.624,1.625,1.624c0.894,0,1.623-0.729,1.623-1.624v-3.61h1.363c0.723,0,1.312-0.591,1.312-1.312V11.07H8.756V22.904z",iOS:"M4.065,21.797h2.236v-8.784H4.065V21.797zM5.184,9.352c-0.739,0-1.245,0.523-1.245,1.208c0,0.667,0.487,1.19,1.227,1.19c0.775,0,1.263-0.523,1.263-1.19C6.41,9.875,5.941,9.352,5.184,9.352zM13.915,9.442c-3.427,0-5.771,2.633-5.771,6.367c0,3.571,2.164,6.186,5.591,6.186c3.355,0,5.826-2.326,5.826-6.402C19.561,12.13,17.468,9.442,13.915,9.442zM13.86,20.21c-2.128,0-3.373-1.966-3.373-4.437c0-2.507,1.172-4.545,3.373-4.545c2.218,0,3.354,2.164,3.354,4.455C17.215,18.227,16.007,20.21,13.86,20.21zM25.695,14.727c-1.622-0.631-2.326-1.064-2.326-2.002c0-0.703,0.613-1.461,2.021-1.461c1.137,0,1.979,0.343,2.416,0.577l0.541-1.785c-0.643-0.325-1.604-0.613-2.933-0.613c-2.633,0-4.293,1.515-4.293,3.499c0,1.75,1.278,2.813,3.282,3.535c1.552,0.559,2.162,1.1,2.162,2.02c0,0.992-0.797,1.659-2.227,1.659c-1.137,0-2.219-0.36-2.938-0.775l-0.484,1.84c0.668,0.396,2.002,0.758,3.28,0.758c3.14,0,4.616-1.688,4.616-3.644C28.835,16.585,27.807,15.521,25.695,14.727z",hp:"M29.936,14.968c-0.178-2.385-0.967-4.726-2.301-6.714c-1.307-1.954-3.107-3.585-5.203-4.657c-1.617-0.853-3.414-1.353-5.229-1.514c-0.412-0.087-0.824,0.006-1.238,0.009c-0.981,2.81-2,5.606-2.989,8.413c0.72,0.013,1.439-0.011,2.158,0.011c0.525,0.021,1.076,0.241,1.366,0.701c0.333,0.519,0.312,1.185,0.104,1.748c-0.978,2.751-1.958,5.5-2.938,8.253c-0.863,0.013-1.727-0.001-2.59,0.007c-0.121-0.002-0.245,0.012-0.36-0.033c1.096-3.021,2.167-6.06,3.249-9.083c-0.516-0.008-1.031,0.003-1.546-0.006c-0.08,0.165-0.136,0.339-0.195,0.513C11.23,15.41,10.227,18.204,9.237,21c-0.047,0.066-0.035,0.229-0.147,0.229c-0.822,0.004-1.645-0.004-2.467,0.002c-0.148-0.002-0.299,0.021-0.443-0.021c2.255-6.256,4.46-12.532,6.716-18.789c-4.407,0.943-8.2,4.242-9.838,8.431c-0.672,1.659-0.965,3.45-1.002,5.233c0.046,0.854,0.106,1.715,0.273,2.562c0.53,2.812,1.964,5.438,4.028,7.408c1.713,1.655,3.863,2.854,6.17,3.452c2.247-6.276,4.479-12.562,6.717-18.851c0.021-0.045,0.064-0.137,0.09-0.183c1.381,0.014,2.766,0.002,4.146,0.006c0.453,0.008,0.918-0.042,1.354,0.095c0.506,0.137,0.979,0.502,1.141,1.018c0.109,0.407,0.029,0.841-0.105,1.229c-0.887,2.574-1.812,5.125-2.729,7.695c-0.229,0.67-0.904,1.09-1.599,1.107c-1.076,0.021-2.147-0.012-3.229,0.014c-0.983,2.762-1.962,5.521-2.945,8.272c0.256,0.104,0.528,0.021,0.794,0.036c0.399,0.027,0.802-0.043,1.198-0.065c2.625-0.239,5.173-1.26,7.242-2.885c1.664-1.304,3.024-2.979,3.953-4.875c0.812-1.64,1.269-3.438,1.396-5.244C29.889,16.234,29.906,15.599,29.936,14.968zM20.422,20.031c0.916-2.659,1.889-5.297,2.818-7.951c-0.398-0.008-0.799,0.002-1.197-0.005c-0.115,0.017-0.268-0.042-0.354,0.055c-0.943,2.636-1.879,5.276-2.822,7.912C19.385,20.045,19.906,20.066,20.422,20.031z",gplus:"M9.208,22.73c-0.292-0.396-0.552-0.795-0.779-1.23c-0.267-0.423-0.399-0.934-0.399-1.527c0-0.354,0.05-0.654,0.152-0.893c0.089-0.251,0.171-0.482,0.248-0.693c-0.459,0.053-0.893,0.078-1.3,0.078c-1.927-0.023-3.444-0.568-4.55-1.636v7.21c0.989-0.453,2.013-0.771,3.073-0.955C7.078,22.874,8.264,22.756,9.208,22.73zM10.311,23.872c-0.257-0.026-0.56-0.039-0.908-0.039c-0.207-0.026-0.734,0-1.584,0.079c-0.837,0.117-1.693,0.309-2.568,0.57c-0.206,0.08-0.496,0.197-0.869,0.354c-0.374,0.171-0.753,0.414-1.139,0.729c-0.247,0.229-0.468,0.479-0.664,0.771v1.104c0,1.026,0.838,1.865,1.869,1.865h10.188c0-0.021,0.002-0.051,0.002-0.068c0-1.021-0.335-1.922-1.004-2.688C12.924,25.812,11.817,24.925,10.311,23.872zM6.751,16.594c0.656,0.514,1.404,0.771,2.247,0.771c1.065-0.039,1.952-0.422,2.662-1.146c0.342-0.514,0.562-1.041,0.66-1.581c0.059-0.54,0.088-0.995,0.088-1.364c0-1.594-0.408-3.202-1.224-4.822c-0.382-0.777-0.886-1.41-1.51-1.897C9.037,6.094,8.304,5.85,7.476,5.824C6.38,5.848,5.468,6.289,4.742,7.146C4.129,8.042,3.837,9.043,3.863,10.15c0,1.463,0.428,2.985,1.284,4.566C5.562,15.453,6.097,16.079,6.751,16.594zM27.553,2.707H4.447c-1.031,0-1.869,0.838-1.869,1.869v2.507c0.118-0.125,0.24-0.25,0.367-0.372c1.15-0.947,2.345-1.565,3.584-1.855c1.227-0.25,2.376-0.375,3.45-0.375h8.087l-2.5,1.458h-2.494c0.254,0.158,0.54,0.388,0.857,0.69c0.304,0.315,0.603,0.703,0.895,1.164c0.279,0.434,0.527,0.946,0.743,1.538c0.177,0.592,0.267,1.282,0.267,2.071c-0.024,1.447-0.343,2.604-0.958,3.472c-0.302,0.421-0.621,0.809-0.958,1.164c-0.374,0.354-0.771,0.718-1.193,1.085c-0.241,0.25-0.464,0.533-0.669,0.848c-0.241,0.329-0.361,0.711-0.361,1.146c0,0.421,0.124,0.769,0.371,1.046c0.21,0.264,0.414,0.493,0.612,0.688l1.372,1.125c0.853,0.688,1.6,1.467,2.243,2.31c0.604,0.854,0.921,1.972,0.943,3.354c0,0.562-0.071,1.106-0.223,1.646H27.54c1.03,0,1.869-0.838,1.869-1.87V4.576C29.422,3.545,28.584,2.707,27.553,2.707zM29.023,10.953h-4.244v4.244h-2.057v-4.244H18.48V8.897h4.242V4.654h2.057v4.243h4.244V10.953z",facebook:"M25.566,2.433H6.433c-2.2,0-4,1.8-4,4v19.135c0,2.199,1.8,4,4,4h19.135c2.199,0,4-1.801,4-4V6.433C29.566,4.232,27.768,2.433,25.566,2.433zM25.309,16.916h-3.218v11.65h-4.819v-11.65h-2.409V12.9h2.409v-2.411c0-3.275,1.359-5.224,5.229-5.224h3.218v4.016h-2.011c-1.504,0-1.604,0.562-1.604,1.608L22.091,12.9h3.644L25.309,16.916z",fitocracy:"M16,10.001c1.93,0,3.5-1.57,3.5-3.5C19.5,4.57,17.93,3,16,3c-1.93,0-3.5,1.57-3.5,3.501C12.5,8.431,14.07,10.001,16,10.001zM23.884,7.772c0,0-2.067-1.923-2.521-0.05c-0.59,2.442-2.745,4.279-5.363,4.279s-4.774-1.837-5.364-4.279c-0.452-1.873-2.52,0.05-2.52,0.05c-2.569,2.213-4.199,5.486-4.199,9.145C3.917,23.59,9.326,29,16,29s12.083-5.41,12.083-12.083C28.083,13.259,26.453,9.986,23.884,7.772zM14.96,16.274l0.807-1.635l0.807,1.635l1.805,0.263l-1.306,1.271l0.309,1.797l-1.614-0.854l-1.614,0.854l0.309-1.797l-1.306-1.271L14.96,16.274zM7.838,21.912c-0.896-1.457-1.421-3.164-1.421-4.995c0-1.832,0.525-3.538,1.42-4.995c1.909,0.862,3.247,2.765,3.247,4.995C11.084,19.146,9.746,21.05,7.838,21.912zM16,26.5c-1.832,0-3.538-0.525-4.995-1.421c0.862-1.908,2.765-3.246,4.995-3.246c2.23,0,4.133,1.338,4.995,3.246C19.538,25.975,17.832,26.5,16,26.5zM24.162,21.912c-1.908-0.862-3.246-2.766-3.246-4.995c0-2.23,1.338-4.133,3.247-4.995c0.896,1.457,1.42,3.164,1.42,4.995S25.059,20.455,24.162,21.912z",opensource:"M15.5,1.125c-8.222,0-14.911,6.689-14.911,14.911c0,6.262,3.88,11.634,9.362,13.839l3.639-9.076c-1.888-0.758-3.222-2.604-3.222-4.763c0-2.834,2.297-5.132,5.131-5.132s5.131,2.298,5.131,5.132c0,2.157-1.334,4.005-3.222,4.763l3.64,9.076c5.479-2.206,9.361-7.578,9.361-13.839C30.41,7.814,23.721,1.125,15.5,1.125z"};!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.JSONEditor=b():a.JSONEditor=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(a,b,c){if(!(this instanceof d))throw new Error('JSONEditor constructor called without "new".');var e=g.getInternetExplorerVersion();if(-1!=e&&9>e)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(a,b,c)}var e=c(1),f=c(2),g=c(3);d.modes={},d.prototype._create=function(a,b,c){this.container=a,this.options=b||{},this.json=c||{};var d=this.options.mode||"tree";this.setMode(d)},d.prototype._delete=function(){},d.prototype.set=function(a){this.json=a},d.prototype.get=function(){return this.json},d.prototype.setText=function(a){this.json=g.parse(a)},d.prototype.getText=function(){return JSON.stringify(this.json)},d.prototype.setName=function(a){this.options||(this.options={}),this.options.name=a},d.prototype.getName=function(){return this.options&&this.options.name},d.prototype.setMode=function(a){var b,c,e=this.container,f=g.extend({},this.options);f.mode=a;var h=d.modes[a];if(!h)throw new Error('Unknown mode "'+f.mode+'"');try{var i="text"==h.data;if(c=this.getName(),b=this[i?"getText":"get"](),this._delete(),g.clear(this),g.extend(this,h.mixin),this.create(e,f),this.setName(c),this[i?"setText":"set"](b),"function"==typeof h.load)try{h.load.call(this)}catch(j){}}catch(j){this._onError(j)}},d.prototype._onError=function(a){if("function"==typeof this.onError&&(g.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(a)),!this.options||"function"!=typeof this.options.error)throw a;this.options.error(a)},d.registerMode=function(a){var b,c;if(g.isArray(a))for(b=0;ba&&c.scrollTop>0?this.autoScrollStep=(d+g-a)/3:a>f-g&&e+c.scrollTop3?(c.scrollTop+=e/3,d.animateCallback=b,d.animateTimeout=setTimeout(h,50)):(b&&b(!0),c.scrollTop=g,delete d.animateTimeout,delete d.animateCallback)};h()}else b&&b(!1)},j._createFrame=function(){function a(a){b._onEvent(a)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var b=this;this.frame.onclick=function(b){var c=b.target;a(b),"BUTTON"==c.nodeName&&b.preventDefault()},this.frame.oninput=a,this.frame.onchange=a,this.frame.onkeydown=a,this.frame.onkeyup=a,this.frame.oncut=a,this.frame.onpaste=a,this.frame.onmousedown=a,this.frame.onmouseup=a,this.frame.onmouseover=a,this.frame.onmouseout=a,i.addEventListener(this.frame,"focus",a,!0),i.addEventListener(this.frame,"blur",a,!0),this.frame.onfocusin=a,this.frame.onfocusout=a,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var c=document.createElement("button");c.className="expand-all",c.title="Expand all fields",c.onclick=function(){b.expandAll()},this.menu.appendChild(c);var d=document.createElement("button");if(d.title="Collapse all fields",d.className="collapse-all",d.onclick=function(){b.collapseAll()},this.menu.appendChild(d),this.history){var e=document.createElement("button");e.className="undo separator",e.title="Undo last action (Ctrl+Z)",e.onclick=function(){b._onUndo()},this.menu.appendChild(e),this.dom.undo=e;var g=document.createElement("button");g.className="redo",g.title="Redo (Ctrl+Shift+Z)",g.onclick=function(){b._onRedo()},this.menu.appendChild(g),this.dom.redo=g,this.history.onChange=function(){e.disabled=!b.history.canUndo(),g.disabled=!b.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var j=h.create(this,this.options.modes,this.options.mode);this.menu.appendChild(j),this.dom.modeBox=j}this.options.search&&(this.searchBox=new f(this,this.menu))},j._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},j._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},j._onEvent=function(a){var b=a.target;"keydown"==a.type&&this._onKeyDown(a),"focus"==a.type&&(l=b);var c=g.getNodeFromTarget(b);c&&c.onEvent(a)},j._onKeyDown=function(a){var b=a.which||a.keyCode,c=a.ctrlKey,d=a.shiftKey,e=!1;if(9==b&&setTimeout(function(){i.selectContentEditable(l)},0),this.searchBox)if(c&&70==b)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),e=!0;else if(114==b||c&&71==b){var f=!0;d?this.searchBox.previous(f):this.searchBox.next(f),e=!0}this.history&&(c&&!d&&90==b?(this._onUndo(),e=!0):c&&d&&90==b&&(this._onRedo(),e=!0)),e&&(a.preventDefault(),a.stopPropagation())},j._createTable=function(){var a=document.createElement("div");a.className="outer",this.contentOuter=a,this.content=document.createElement("div"),this.content.className="tree",a.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var b;this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&(b=document.createElement("col"),b.width="24px",this.colgroupContent.appendChild(b)),b=document.createElement("col"),b.width="24px",this.colgroupContent.appendChild(b),b=document.createElement("col"),this.colgroupContent.appendChild(b),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(a)},a.exports=[{mode:"tree",mixin:j,data:"json"},{mode:"view",mixin:j,data:"json"},{mode:"form",mixin:j,data:"json"}]},function(a,b,c){var d;try{d=c(9)}catch(e){}var f=c(8),g=c(3),h={};h.create=function(a,b){b=b||{},this.options=b,b.indentation?this.indentation=Number(b.indentation):this.indentation=2;var c=b.ace?b.ace:d;this.mode="code"==b.mode?"code":"text","code"==this.mode&&"undefined"==typeof c&&(this.mode="text",g.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor")),this.theme=b.theme||"ace/theme/jsoneditor";var e=this;this.container=a,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=a.clientWidth,this.height=a.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(a){a.preventDefault()},this.frame.onkeydown=function(a){e._onKeyDown(a)},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var h=document.createElement("button");h.className="format",h.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(h),h.onclick=function(){try{e.format()}catch(a){e._onError(a)}};var i=document.createElement("button");if(i.className="compact",i.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(i),i.onclick=function(){try{e.compact()}catch(a){e._onError(a)}},this.options&&this.options.modes&&this.options.modes.length){var j=f.create(this,this.options.modes,this.options.mode);this.menu.appendChild(j),this.dom.modeBox=j}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var k=c.edit(this.editorDom);k.setTheme(this.theme),k.setShowPrintMargin(!1),k.setFontSize(13),k.getSession().setMode("ace/mode/json"),k.getSession().setTabSize(this.indentation),k.getSession().setUseSoftTabs(!0),k.getSession().setUseWrapMode(!0),this.editor=k;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),b.change&&k.on("change",function(){b.change()})}else{var m=document.createElement("textarea");m.className="text",m.spellcheck=!1,this.content.appendChild(m),this.textarea=m,b.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){b.change()}:this.textarea.onchange=function(){b.change()})}},h._onKeyDown=function(a){var b=a.which||a.keyCode,c=!1;220==b&&a.ctrlKey&&(a.shiftKey?this.compact():this.format(),c=!0),c&&(a.preventDefault(),a.stopPropagation())},h._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},h._onError=function(a){if("function"==typeof this.onError&&(g.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(a)),!this.options||"function"!=typeof this.options.error)throw a;this.options.error(a)},h.compact=function(){var a=this.get(),b=JSON.stringify(a);this.setText(b)},h.format=function(){var a=this.get(),b=JSON.stringify(a,null,this.indentation);this.setText(b)},h.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},h.resize=function(){if(this.editor){var a=!1;this.editor.resize(a)}},h.set=function(a){this.setText(JSON.stringify(a,null,this.indentation))},h.get=function(){var a,b=this.getText();try{a=g.parse(b)}catch(c){b=g.sanitize(b),a=g.parse(b)}return a},h.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},h.setText=function(a){this.textarea&&(this.textarea.value=a),this.editor&&this.editor.setValue(a,-1)},a.exports=[{mode:"text",mixin:h,data:"text",load:h.format},{mode:"code",mixin:h,data:"text",load:h.format}]},function(a,b,c){var d=c(12);b.parse=function(a){try{return JSON.parse(a)}catch(c){throw b.validate(a),c}},b.sanitize=function(a){function b(){return a.charAt(j)}function c(){return a.charAt(j+1)}function d(){return a.charAt(j-1)}function e(){for(var b=j-1;b>=0;){var c=a.charAt(b);if("{"===c)return!0;if(" "!==c&&"\n"!==c&&"\r"!==c)return!1;b--}return!1}function f(){for(j+=2;jd;d++){var f=c[d];f.style&&f.removeAttribute("style");var g=f.attributes;if(g)for(var h=g.length-1;h>=0;h--){var i=g[h];i.specified===!0&&f.removeAttribute(i.name)}b.stripFormatting(f)}},b.setEndOfContentEditable=function(a){var b,c;document.createRange&&(b=document.createRange(),b.selectNodeContents(a),b.collapse(!1),c=window.getSelection(),c.removeAllRanges(),c.addRange(b))},b.selectContentEditable=function(a){if(a&&"DIV"==a.nodeName){var b,c;window.getSelection&&document.createRange&&(c=document.createRange(),c.selectNodeContents(a),b=window.getSelection(),b.removeAllRanges(),b.addRange(c))}},b.getSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount)return a.getRangeAt(0)}return null},b.setSelection=function(a){if(a&&window.getSelection){var b=window.getSelection();b.removeAllRanges(),b.addRange(a)}},b.getSelectionOffset=function(){var a=b.getSelection();return a&&"startOffset"in a&&"endOffset"in a&&a.startContainer&&a.startContainer==a.endContainer?{startOffset:a.startOffset,endOffset:a.endOffset,container:a.startContainer.parentNode}:null},b.setSelectionOffset=function(a){if(document.createRange&&window.getSelection){var c=window.getSelection();if(c){var d=document.createRange();d.setStart(a.container.firstChild,a.startOffset),d.setEnd(a.container.firstChild,a.endOffset),b.setSelection(d)}}},b.getInnerText=function(a,c){var d=void 0==c;if(d&&(c={text:"",flush:function(){var a=this.text;return this.text="",a},set:function(a){this.text=a}}),a.nodeValue)return c.flush()+a.nodeValue;if(a.hasChildNodes()){for(var e=a.childNodes,f="",g=0,h=e.length;h>g;g++){var i=e[g];if("DIV"==i.nodeName||"P"==i.nodeName){var j=e[g-1],k=j?j.nodeName:void 0;k&&"DIV"!=k&&"P"!=k&&"BR"!=k&&(f+="\n",c.flush()),f+=b.getInnerText(i,c),c.set("\n")}else"BR"==i.nodeName?(f+=c.flush(),c.set("\n")):f+=b.getInnerText(i,c)}return f}return"P"==a.nodeName&&-1!=b.getInternetExplorerVersion()?c.flush():""},b.getInternetExplorerVersion=function(){if(-1==f){var a=-1;if("Microsoft Internet Explorer"==navigator.appName){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=c.exec(b)&&(a=parseFloat(RegExp.$1))}f=a}return f},b.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var f=-1;b.addEventListener=function(a,c,d,e){if(a.addEventListener)return void 0===e&&(e=!1),"mousewheel"===c&&b.isFirefox()&&(c="DOMMouseScroll"),a.addEventListener(c,d,e),d;if(a.attachEvent){var f=function(){return d.call(a,window.event)};return a.attachEvent("on"+c,f),f}},b.removeEventListener=function(a,c,d,e){a.removeEventListener?(void 0===e&&(e=!1),"mousewheel"===c&&b.isFirefox()&&(c="DOMMouseScroll"),a.removeEventListener(c,d,e)):a.detachEvent&&a.detachEvent("on"+c,d)}},function(a,b,c){function d(){this.locked=!1}d.prototype.highlight=function(a){this.locked||(this.node!=a&&(this.node&&this.node.setHighlight(!1),this.node=a,this.node.setHighlight(!0)),this._cancelUnhighlight())},d.prototype.unhighlight=function(){if(!this.locked){var a=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){a.node.setHighlight(!1),a.node=void 0,a.unhighlightTimer=void 0},0))}},d.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},d.prototype.lock=function(){this.locked=!0},d.prototype.unlock=function(){this.locked=!1},a.exports=d},function(a,b,c){function d(a){this.editor=a,this.clear(),this.actions={editField:{undo:function(a){a.node.updateField(a.oldValue)},redo:function(a){a.node.updateField(a.newValue)}},editValue:{undo:function(a){a.node.updateValue(a.oldValue)},redo:function(a){a.node.updateValue(a.newValue)}},appendNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.appendChild(a.node)}},insertBeforeNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.insertBefore(a.node,a.beforeNode)}},insertAfterNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.insertAfter(a.node,a.afterNode)}},removeNode:{undo:function(a){var b=a.parent,c=b.childs[a.index]||b.append;b.insertBefore(a.node,c)},redo:function(a){a.parent.removeChild(a.node)}},duplicateNode:{undo:function(a){a.parent.removeChild(a.clone)},redo:function(a){a.parent.insertAfter(a.clone,a.node)}},changeType:{undo:function(a){a.node.changeType(a.oldType)},redo:function(a){a.node.changeType(a.newType)}},moveNode:{undo:function(a){a.startParent.moveTo(a.node,a.startIndex)},redo:function(a){a.endParent.moveTo(a.node,a.endIndex)}},sort:{undo:function(a){var b=a.node;b.hideChilds(),b.sort=a.oldSort,b.childs=a.oldChilds,b.showChilds()},redo:function(a){var b=a.node;b.hideChilds(),b.sort=a.newSort,b.childs=a.newChilds,b.showChilds()}}}}var e=c(3);d.prototype.onChange=function(){},d.prototype.add=function(a,b){this.index++,this.history[this.index]={action:a,params:b,timestamp:new Date},this.index=0},d.prototype.canRedo=function(){return this.indexthis.results.length-1&&(b=0),this._setActiveResult(b,a)}},d.prototype.previous=function(a){if(void 0!=this.results){var b=this.results.length-1,c=void 0!=this.resultIndex?this.resultIndex-1:b;0>c&&(c=b),this._setActiveResult(c,a)}},d.prototype._setActiveResult=function(a,b){if(this.activeResult){var c=this.activeResult.node,d=this.activeResult.elem;"field"==d?delete c.searchFieldActive:delete c.searchValueActive,c.updateDom()}if(!this.results||!this.results[a])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=a;var e=this.results[this.resultIndex].node,f=this.results[this.resultIndex].elem;"field"==f?e.searchFieldActive=!0:e.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],e.updateDom(),e.scrollTo(function(){b&&e.focus(f)})},d.prototype._clearDelay=function(){ -void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},d.prototype._onDelayedSearch=function(a){this._clearDelay();var b=this;this.timeout=setTimeout(function(a){b._onSearch(a)},this.delay)},d.prototype._onSearch=function(a,b){this._clearDelay();var c=this.dom.search.value,d=c.length>0?c:void 0;if(d!=this.lastText||b)if(this.lastText=d,this.results=this.editor.search(d),this._setActiveResult(void 0),void 0!=d){var e=this.results.length;switch(e){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=e+" results"}}else this.dom.results.innerHTML=""},d.prototype._onKeyDown=function(a){var b=a.which;27==b?(this.dom.search.value="",this._onSearch(a),a.preventDefault(),a.stopPropagation()):13==b&&(a.ctrlKey?this._onSearch(a,!0):a.shiftKey?this.previous():this.next(),a.preventDefault(),a.stopPropagation())},d.prototype._onKeyUp=function(a){var b=a.keyCode;27!=b&&13!=b&&this._onDelayedSearch(a)},a.exports=d},function(a,b,c){function d(a,b){this.editor=a,this.dom={},this.expanded=!1,b&&b instanceof Object?(this.setField(b.field,b.fieldEditable),this.setValue(b.value,b.type)):(this.setField(""),this.setValue(null))}var e=c(10),f=c(11),g=c(3);d.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"===this.editor.options.mode&&"function"==typeof this.editor.options.editable)){var a=this.editor.options.editable({field:this.field,value:this.value,path:this.path()});"boolean"==typeof a?(this.editable.field=a,this.editable.value=a):("boolean"==typeof a.field&&(this.editable.field=a.field),"boolean"==typeof a.value&&(this.editable.value=a.value))}},d.prototype.path=function(){for(var a=this,b=[];a;){var c=void 0!=a.field?a.field:a.index;void 0!==c&&b.unshift(c),a=a.parent}return b},d.prototype.setParent=function(a){this.parent=a},d.prototype.setField=function(a,b){this.field=a,this.fieldEditable=b===!0},d.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},d.prototype.setValue=function(a,b){var c,e,f=this.childs;if(f)for(;f.length;)this.removeChild(f[0]);if(this.type=this._getType(a),b&&b!=this.type){if("string"!=b||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+b+'"');this.type=b}if("array"==this.type){this.childs=[];for(var g=0,h=a.length;h>g;g++)c=a[g],void 0===c||c instanceof Function||(e=new d(this.editor,{value:c}),this.appendChild(e));this.value=""}else if("object"==this.type){this.childs=[];for(var i in a)a.hasOwnProperty(i)&&(c=a[i],void 0===c||c instanceof Function||(e=new d(this.editor,{field:i,value:c}),this.appendChild(e)));this.value=""}else this.childs=void 0,this.value=a},d.prototype.getValue=function(){if("array"==this.type){var a=[];return this.childs.forEach(function(b){a.push(b.getValue())}),a}if("object"==this.type){var b={};return this.childs.forEach(function(a){b[a.getField()]=a.getValue()}),b}return void 0===this.value&&this._getDomValue(),this.value},d.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},d.prototype.clone=function(){var a=new d(this.editor);if(a.type=this.type,a.field=this.field,a.fieldInnerText=this.fieldInnerText,a.fieldEditable=this.fieldEditable,a.value=this.value,a.valueInnerText=this.valueInnerText,a.expanded=this.expanded,this.childs){var b=[];this.childs.forEach(function(c){var d=c.clone();d.setParent(a),b.push(d)}),a.childs=b}else a.childs=void 0;return a},d.prototype.expand=function(a){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),a!==!1&&this.childs.forEach(function(b){b.expand(a)}))},d.prototype.collapse=function(a){this.childs&&(this.hideChilds(),a!==!1&&this.childs.forEach(function(b){b.collapse(a)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},d.prototype.showChilds=function(){var a=this.childs;if(a&&this.expanded){var b=this.dom.tr,c=b?b.parentNode:void 0;if(c){var d=this.getAppend(),e=b.nextSibling;e?c.insertBefore(d,e):c.appendChild(d),this.childs.forEach(function(a){c.insertBefore(a.getDom(),d),a.showChilds()})}}},d.prototype.hide=function(){var a=this.dom.tr,b=a?a.parentNode:void 0;b&&b.removeChild(a),this.hideChilds()},d.prototype.hideChilds=function(){var a=this.childs;if(a&&this.expanded){var b=this.getAppend();b.parentNode&&b.parentNode.removeChild(b),this.childs.forEach(function(a){a.hide()})}},d.prototype.appendChild=function(a){if(this._hasChilds()){if(a.setParent(this),a.fieldEditable="object"==this.type,"array"==this.type&&(a.index=this.childs.length),this.childs.push(a),this.expanded){var b=a.getDom(),c=this.getAppend(),d=c?c.parentNode:void 0;c&&d&&d.insertBefore(b,c),a.showChilds()}this.updateDom({updateIndexes:!0}),a.updateDom({recurse:!0})}},d.prototype.moveBefore=function(a,b){if(this._hasChilds()){var c=this.dom.tr?this.dom.tr.parentNode:void 0;if(c){var d=document.createElement("tr");d.style.height=c.clientHeight+"px",c.appendChild(d)}a.parent&&a.parent.removeChild(a),b instanceof h?this.appendChild(a):this.insertBefore(a,b),c&&c.removeChild(d)}},d.prototype.moveTo=function(a,b){if(a.parent==this){var c=this.childs.indexOf(a);b>c&&b++}var d=this.childs[b]||this.append;this.moveBefore(a,d)},d.prototype.insertBefore=function(a,b){if(this._hasChilds()){if(b==this.append)a.setParent(this),a.fieldEditable="object"==this.type,this.childs.push(a);else{var c=this.childs.indexOf(b);if(-1==c)throw new Error("Node not found");a.setParent(this),a.fieldEditable="object"==this.type,this.childs.splice(c,0,a)}if(this.expanded){var d=a.getDom(),e=b.getDom(),f=e?e.parentNode:void 0;e&&f&&f.insertBefore(d,e),a.showChilds()}this.updateDom({updateIndexes:!0}),a.updateDom({recurse:!0})}},d.prototype.insertAfter=function(a,b){if(this._hasChilds()){var c=this.childs.indexOf(b),d=this.childs[c+1];d?this.insertBefore(a,d):this.appendChild(a)}},d.prototype.search=function(a){var b,c=[],d=a?a.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var e=String(this.field).toLowerCase();b=e.indexOf(d),-1!=b&&(this.searchField=!0,c.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var f=[];this.childs.forEach(function(b){f=f.concat(b.search(a))}),c=c.concat(f)}if(void 0!=d){var g=!1;0==f.length?this.collapse(g):this.expand(g)}}else{if(void 0!=this.value){var h=String(this.value).toLowerCase();b=h.indexOf(d),-1!=b&&(this.searchValue=!0,c.push({node:this,elem:"value"}))}this._updateDomValue()}return c},d.prototype.scrollTo=function(a){if(!this.dom.tr||!this.dom.tr.parentNode)for(var b=this.parent,c=!1;b;)b.expand(c),b=b.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,a)},d.focusElement=void 0,d.prototype.focus=function(a){if(d.focusElement=a,this.dom.tr&&this.dom.tr.parentNode){var b=this.dom;switch(a){case"drag":b.drag?b.drag.focus():b.menu.focus();break;case"menu":b.menu.focus();break;case"expand":this._hasChilds()?b.expand.focus():b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):b.menu.focus();break;case"field":b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):this._hasChilds()?b.expand.focus():b.menu.focus();break;case"value":default:b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):this._hasChilds()?b.expand.focus():b.menu.focus()}}},d.select=function(a){setTimeout(function(){g.selectContentEditable(a)},0)},d.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},d.prototype._duplicate=function(a){var b=a.clone();return this.insertAfter(b,a),b},d.prototype.containsNode=function(a){if(this==a)return!0;var b=this.childs;if(b)for(var c=0,d=b.length;d>c;c++)if(b[c].containsNode(a))return!0;return!1},d.prototype._move=function(a,b){if(a!=b){if(a.containsNode(this))throw new Error("Cannot move a field into a child of itself");a.parent&&a.parent.removeChild(a);var c=a.clone();a.clearDom(),b?this.insertBefore(c,b):this.appendChild(c)}},d.prototype.removeChild=function(a){if(this.childs){var b=this.childs.indexOf(a);if(-1!=b){a.hide(),delete a.searchField,delete a.searchValue;var c=this.childs.splice(b,1)[0];return this.updateDom({updateIndexes:!0}),c}}},d.prototype._remove=function(a){this.removeChild(a)},d.prototype.changeType=function(a){var b=this.type;if(b!=a){if("string"!=a&&"auto"!=a||"string"!=b&&"auto"!=b){var c,d=this.dom.tr?this.dom.tr.parentNode:void 0;c=this.expanded?this.getAppend():this.getDom();var e=c&&c.parentNode?c.nextSibling:void 0;this.hide(),this.clearDom(),this.type=a,"object"==a?(this.childs||(this.childs=[]),this.childs.forEach(function(a,b){a.clearDom(),delete a.index,a.fieldEditable=!0,void 0==a.field&&(a.field="")}),("string"==b||"auto"==b)&&(this.expanded=!0)):"array"==a?(this.childs||(this.childs=[]),this.childs.forEach(function(a,b){a.clearDom(),a.fieldEditable=!1,a.index=b}),("string"==b||"auto"==b)&&(this.expanded=!0)):this.expanded=!1,d&&(e?d.insertBefore(this.getDom(),e):d.appendChild(this.getDom())),this.showChilds()}else this.type=a;("auto"==a||"string"==a)&&("string"==a?this.value=String(this.value):this.value=this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},d.prototype._getDomValue=function(a){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=g.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var b;if("string"==this.type)b=this._unescapeHTML(this.valueInnerText);else{var c=this._unescapeHTML(this.valueInnerText);b=this._stringCast(c)}if(b!==this.value){var d=this.value;this.value=b,this.editor._onAction("editValue",{node:this,oldValue:d,newValue:b,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(e){if(this.value=void 0,a!==!0)throw e}},d.prototype._updateDomValue=function(){var a=this.dom.value;if(a){var b=this.value,c="auto"==this.type?g.type(b):this.type,d="string"==c&&g.isUrl(b),e="";e=d&&!this.editable.value?"":"string"==c?"green":"number"==c?"red":"boolean"==c?"darkorange":this._hasChilds()?"":null===b?"#004ED0":"black",a.style.color=e;var f=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(f?g.addClassName(a,"empty"):g.removeClassName(a,"empty"),d?g.addClassName(a,"url"):g.removeClassName(a,"url"),"array"==c||"object"==c){var h=this.childs?this.childs.length:0;a.title=this.type+" containing "+h+" items"}else"string"==c&&g.isUrl(b)?this.editable.value&&(a.title="Ctrl+Click or Ctrl+Enter to open url in new window"):a.title="";this.searchValueActive?g.addClassName(a,"highlight-active"):g.removeClassName(a,"highlight-active"),this.searchValue?g.addClassName(a,"highlight"):g.removeClassName(a,"highlight"),g.stripFormatting(a)}},d.prototype._updateDomField=function(){var a=this.dom.field;if(a){var b=""==String(this.field)&&"array"!=this.parent.type;b?g.addClassName(a,"empty"):g.removeClassName(a,"empty"),this.searchFieldActive?g.addClassName(a,"highlight-active"):g.removeClassName(a,"highlight-active"),this.searchField?g.addClassName(a,"highlight"):g.removeClassName(a,"highlight"),g.stripFormatting(a)}},d.prototype._getDomField=function(a){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=g.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var b=this._unescapeHTML(this.fieldInnerText);if(b!==this.field){var c=this.field;this.field=b,this.editor._onAction("editField",{node:this,oldValue:c,newValue:b,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(d){if(this.field=void 0,a!==!0)throw d}},d.prototype.clearDom=function(){this.dom={}},d.prototype.getDom=function(){var a=this.dom;if(a.tr)return a.tr;if(this._updateEditability(),a.tr=document.createElement("tr"),a.tr.node=this,"tree"===this.editor.options.mode){var b=document.createElement("td");if(this.editable.field&&this.parent){var c=document.createElement("button");a.drag=c,c.className="dragarea",c.title="Drag to move this field (Alt+Shift+Arrows)",b.appendChild(c)}a.tr.appendChild(b);var d=document.createElement("td"),e=document.createElement("button");a.menu=e,e.className="contextmenu",e.title="Click to open the actions menu (Ctrl+M)",d.appendChild(a.menu),a.tr.appendChild(d)}var f=document.createElement("td");return a.tr.appendChild(f),a.tree=this._createDomTree(),f.appendChild(a.tree),this.updateDom({updateIndexes:!0}),a.tr},d.prototype._onDragStart=function(a){var b=this;this.mousemove||(this.mousemove=g.addEventListener(document,"mousemove",function(a){b._onDrag(a)})),this.mouseup||(this.mouseup=g.addEventListener(document,"mouseup",function(a){b._onDragEnd(a)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:a.pageX,level:this.getLevel()},document.body.style.cursor="move",a.preventDefault()},d.prototype._onDrag=function(a){var b,c,e,f,i,j,k,l,m,n,o,p,q,r,s=a.pageY,t=a.pageX,u=!1;if(b=this.dom.tr,m=g.getAbsoluteTop(b),p=b.offsetHeight,m>s){c=b;do c=c.previousSibling,k=d.getNodeFromTarget(c),n=c?g.getAbsoluteTop(c):0;while(c&&n>s);k&&!k.parent&&(k=void 0),k||(j=b.parentNode.firstChild,c=j?j.nextSibling:void 0,k=d.getNodeFromTarget(c),k==this&&(k=void 0)),k&&(c=k.dom.tr,n=c?g.getAbsoluteTop(c):0,s>n+p&&(k=void 0)),k&&(k.parent.moveBefore(this,k),u=!0)}else if(i=this.expanded&&this.append?this.append.getDom():this.dom.tr,f=i?i.nextSibling:void 0){o=g.getAbsoluteTop(f),e=f;do l=d.getNodeFromTarget(e),e&&(q=e.nextSibling?g.getAbsoluteTop(e.nextSibling):0,r=e?q-o:0,1==l.parent.childs.length&&l.parent.childs[0]==this&&(m+=23)),e=e.nextSibling;while(e&&s>m+r);if(l&&l.parent){var v=t-this.drag.mouseX,w=Math.round(v/24/2),x=this.drag.level+w,y=l.getLevel();for(c=l.dom.tr.previousSibling;x>y&&c;){if(k=d.getNodeFromTarget(c),k==this||k._isChildOf(this));else{if(!(k instanceof h))break;var z=k.parent.childs;if(!(z.length>1||1==z.length&&z[0]!=this))break;l=d.getNodeFromTarget(c),y=l.getLevel()}c=c.previousSibling}i.nextSibling!=l.dom.tr&&(l.parent.moveBefore(this,l),u=!0)}}u&&(this.drag.mouseX=t,this.drag.level=this.getLevel()),this.editor.startAutoScroll(s),a.preventDefault()},d.prototype._onDragEnd=function(a){var b={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(b.startParent!=b.endParent||b.startIndex!=b.endIndex)&&this.editor._onAction("moveNode",b),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(g.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(g.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),a.preventDefault()},d.prototype._isChildOf=function(a){for(var b=this.parent;b;){if(b==a)return!0;b=b.parent}return!1},d.prototype._createDomField=function(){return document.createElement("div")},d.prototype.setHighlight=function(a){this.dom.tr&&(this.dom.tr.className=a?"highlight":"",this.append&&this.append.setHighlight(a),this.childs&&this.childs.forEach(function(b){b.setHighlight(a)}))},d.prototype.updateValue=function(a){this.value=a,this.updateDom()},d.prototype.updateField=function(a){this.field=a,this.updateDom()},d.prototype.updateDom=function(a){var b=this.dom.tree;b&&(b.style.marginLeft=24*this.getLevel()+"px");var c=this.dom.field;if(c){this.fieldEditable?(c.contentEditable=this.editable.field,c.spellcheck=!1,c.className="field"):c.className="readonly";var d;d=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",c.innerHTML=this._escapeHTML(d)}var e=this.dom.value;if(e){var f=this.childs?this.childs.length:0;"array"==this.type?e.innerHTML="["+f+"]":"object"==this.type?e.innerHTML="{"+f+"}":e.innerHTML=this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),a&&a.updateIndexes===!0&&this._updateDomIndexes(),a&&a.recurse===!0&&this.childs&&this.childs.forEach(function(b){b.updateDom(a)}),this.append&&this.append.updateDom()},d.prototype._updateDomIndexes=function(){var a=this.dom.value,b=this.childs;a&&b&&("array"==this.type?b.forEach(function(a,b){a.index=b;var c=a.dom.field;c&&(c.innerHTML=b)}):"object"==this.type&&b.forEach(function(a){void 0!=a.index&&(delete a.index,void 0==a.field&&(a.field=""))}))},d.prototype._createDomValue=function(){var a;return"array"==this.type?(a=document.createElement("div"),a.className="readonly",a.innerHTML="[...]"):"object"==this.type?(a=document.createElement("div"),a.className="readonly",a.innerHTML="{...}"):!this.editable.value&&g.isUrl(this.value)?(a=document.createElement("a"),a.className="value",a.href=this.value,a.target="_blank",a.innerHTML=this._escapeHTML(this.value)):(a=document.createElement("div"),a.contentEditable=this.editable.value,a.spellcheck=!1,a.className="value",a.innerHTML=this._escapeHTML(this.value)),a},d.prototype._createDomExpandButton=function(){var a=document.createElement("button");return this._hasChilds()?(a.className=this.expanded?"expanded":"collapsed",a.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(a.className="invisible",a.title=""),a},d.prototype._createDomTree=function(){var a=this.dom,b=document.createElement("table"),c=document.createElement("tbody");b.style.borderCollapse="collapse",b.className="values",b.appendChild(c);var d=document.createElement("tr");c.appendChild(d);var e=document.createElement("td");e.className="tree",d.appendChild(e),a.expand=this._createDomExpandButton(),e.appendChild(a.expand),a.tdExpand=e;var f=document.createElement("td");f.className="tree",d.appendChild(f),a.field=this._createDomField(),f.appendChild(a.field),a.tdField=f;var g=document.createElement("td");g.className="tree",d.appendChild(g),"object"!=this.type&&"array"!=this.type&&(g.appendChild(document.createTextNode(":")),g.className="separator"),a.tdSeparator=g;var h=document.createElement("td");return h.className="tree",d.appendChild(h),a.value=this._createDomValue(),h.appendChild(a.value),a.tdValue=h,b},d.prototype.onEvent=function(a){var b,c=a.type,d=a.target||a.srcElement,e=this.dom,f=this,h=this._hasChilds();if((d==e.drag||d==e.menu)&&("mouseover"==c?this.editor.highlighter.highlight(this):"mouseout"==c&&this.editor.highlighter.unhighlight()),"mousedown"==c&&d==e.drag&&this._onDragStart(a),"click"==c&&d==e.menu){var i=f.editor.highlighter;i.highlight(f),i.lock(),g.addClassName(e.menu,"selected"),this.showContextMenu(e.menu,function(){g.removeClassName(e.menu,"selected"),i.unlock(),i.unhighlight()})}if("click"==c&&d==e.expand&&h){var j=a.ctrlKey;this._onExpand(j)}var k=e.value;if(d==k)switch(c){case"focus":b=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(k.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":(a.ctrlKey||!this.editable.value)&&g.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){f._getDomValue(!0),f._updateDomValue()},1)}var l=e.field;if(d==l)switch(c){case"focus":b=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(l.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){f._getDomField(!0),f._updateDomField()},1)}var m=e.tree;if(d==m.parentNode)switch(c){case"click":var n=void 0!=a.offsetX?a.offsetX<24*(this.getLevel()+1):a.pageXd[c]?b:a[c]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),c=JSON.stringify(b);return c.substring(1,c.length-1)},d.prototype._unescapeHTML=function(a){var b='"'+this._escapeJSON(a)+'"',c=g.parse(b);return c.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},d.prototype._escapeJSON=function(a){for(var b="",c=0,d=a.length;d>c;){var e=a.charAt(c);"\n"==e?b+="\\n":"\\"==e?(b+=e,c++,e=a.charAt(c),-1=='"\\/bfnrtu'.indexOf(e)&&(b+="\\"),b+=e):b+='"'==e?'\\"':e,c++}return b};var h=f(d);a.exports=d},function(a,b,c){function d(a,b,c){function d(b){a.setMode(b);var c=a.dom&&a.dom.modeBox;c&&c.focus()}for(var f={code:{text:"Code",title:"Switch to code highlighter",click:function(){d("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){d("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){d("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){d("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){d("view")}}},g=[],h=0;h',h.appendChild(l),e.submenuTitle&&(l.title=e.submenuTitle),k=l}else{var m=document.createElement("div");m.className="expand",i.appendChild(m),k=i}k.onclick=function(){d._onExpandItem(g),k.focus()};var n=[];g.subItems=n;var o=document.createElement("ul");g.ul=o,o.className="menu",o.style.height="0",h.appendChild(o),c(o,n,e.submenu)}else i.innerHTML='
    '+e.text;b.push(g)}})}this.dom={};var d=this,e=this.dom;this.anchor=void 0,this.items=a,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=b?b.close:void 0;var f=document.createElement("div");f.className="jsoneditor-contextmenu",e.menu=f;var g=document.createElement("ul");g.className="menu",f.appendChild(g),e.list=g,e.items=[];var h=document.createElement("button");e.focusButton=h;var i=document.createElement("li");i.style.overflow="hidden",i.style.height="0",i.appendChild(h),g.appendChild(i),c(g,this.dom.items,a),this.maxHeight=0,a.forEach(function(b){var c=24*(a.length+(b.submenu?b.submenu.length:0));d.maxHeight=Math.max(d.maxHeight,c)})}var e=c(3);d.prototype._getVisibleButtons=function(){var a=[],b=this;return this.dom.items.forEach(function(c){a.push(c.button),c.buttonExpand&&a.push(c.buttonExpand),c.subItems&&c==b.expandedItem&&c.subItems.forEach(function(b){a.push(b.button),b.buttonExpand&&a.push(b.buttonExpand)})}),a},d.visibleMenu=void 0,d.prototype.show=function(a){this.hide();var b=window.innerHeight,c=window.pageYOffset||document.scrollTop||0,f=b+c,g=a.offsetHeight,h=this.maxHeight,i=e.getAbsoluteLeft(a),j=e.getAbsoluteTop(a);f>j+g+h?(this.dom.menu.style.left=i+"px",this.dom.menu.style.top=j+g+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=i+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=b-j+"px"),document.body.appendChild(this.dom.menu);var k=this,l=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(a){var b=a.target;b==l||k._isChildOf(b,l)||(k.hide(),a.stopPropagation(),a.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(a){a.stopPropagation(),a.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(a){k._onKeyDown(a)}),this.selection=e.getSelection(),this.anchor=a,setTimeout(function(){k.dom.focusButton.focus()},0),d.visibleMenu&&d.visibleMenu.hide(),d.visibleMenu=this},d.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var a in this.eventListeners)if(this.eventListeners.hasOwnProperty(a)){var b=this.eventListeners[a];b&&e.removeEventListener(document,a,b),delete this.eventListeners[a]}d.visibleMenu==this&&(d.visibleMenu=void 0)},d.prototype._onExpandItem=function(a){var b=this,c=a==this.expandedItem,d=this.expandedItem;if(d&&(d.ul.style.height="0",d.ul.style.padding="",setTimeout(function(){b.expandedItem!=d&&(d.ul.style.display="",e.removeClassName(d.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!c){var f=a.ul;f.style.display="block",f.clientHeight,setTimeout(function(){b.expandedItem==a&&(f.style.height=24*f.childNodes.length+"px",f.style.padding="5px 10px")},0),e.addClassName(f.parentNode,"selected"),this.expandedItem=a}},d.prototype._onKeyDown=function(a){var b,c,d,f,g=a.target,h=a.which,i=!1;27==h?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),i=!0):9==h?a.shiftKey?(b=this._getVisibleButtons(),c=b.indexOf(g),0==c&&(b[b.length-1].focus(),i=!0)):(b=this._getVisibleButtons(),c=b.indexOf(g),c==b.length-1&&(b[0].focus(),i=!0)):37==h?("expand"==g.className&&(b=this._getVisibleButtons(),c=b.indexOf(g),d=b[c-1],d&&d.focus()),i=!0):38==h?(b=this._getVisibleButtons(),c=b.indexOf(g),d=b[c-1],d&&"expand"==d.className&&(d=b[c-2]),d||(d=b[b.length-1]),d&&d.focus(),i=!0):39==h?(b=this._getVisibleButtons(),c=b.indexOf(g),f=b[c+1],f&&"expand"==f.className&&f.focus(),i=!0):40==h&&(b=this._getVisibleButtons(),c=b.indexOf(g),f=b[c+1],f&&"expand"==f.className&&(f=b[c+2]),f||(f=b[0]),f&&(f.focus(),i=!0),i=!0),i&&(a.stopPropagation(),a.preventDefault())},d.prototype._isChildOf=function(a,b){for(var c=a.parentNode;c;){if(c==b)return!0;c=c.parentNode}return!1},a.exports=d},function(a,b,c){function d(a){function b(a){this.editor=a,this.dom={}}return b.prototype=new a,b.prototype.getDom=function(){var a=this.dom;if(a.tr)return a.tr;this._updateEditability();var b=document.createElement("tr");if(b.node=this,a.tr=b,this.editable.field){a.tdDrag=document.createElement("td");var c=document.createElement("td");a.tdMenu=c;var d=document.createElement("button");d.className="contextmenu",d.title="Click to open the actions menu (Ctrl+M)",a.menu=d,c.appendChild(a.menu)}var e=document.createElement("td"),f=document.createElement("div");return f.innerHTML="(empty)",f.className="readonly",e.appendChild(f),a.td=e,a.text=f,this.updateDom(),b},b.prototype.updateDom=function(){var a=this.dom,b=a.td;b&&(b.style.paddingLeft=24*this.getLevel()+26+"px");var c=a.text;c&&(c.innerHTML="(empty "+this.parent.type+")");var d=a.tr;this.isVisible()?a.tr.firstChild||(a.tdDrag&&d.appendChild(a.tdDrag),a.tdMenu&&d.appendChild(a.tdMenu),d.appendChild(b)):a.tr.firstChild&&(a.tdDrag&&d.removeChild(a.tdDrag),a.tdMenu&&d.removeChild(a.tdMenu),d.removeChild(b))},b.prototype.isVisible=function(){return 0==this.parent.childs.length},b.prototype.showContextMenu=function(b,c){var d=this,e=a.TYPE_TITLES,g=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){d._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:e.auto,click:function(){d._onAppend("","","auto")}},{text:"Array",className:"type-array",title:e.array,click:function(){d._onAppend("",[])}},{text:"Object",className:"type-object",title:e.object,click:function(){d._onAppend("",{})}},{text:"String",className:"type-string",title:e.string,click:function(){d._onAppend("","","string")}}]}],h=new f(g,{close:c});h.show(b)},b.prototype.onEvent=function(a){var b=a.type,c=a.target||a.srcElement,d=this.dom,f=d.menu;if(c==f&&("mouseover"==b?this.editor.highlighter.highlight(this.parent):"mouseout"==b&&this.editor.highlighter.unhighlight()),"click"==b&&c==d.menu){var g=this.editor.highlighter;g.highlight(this.parent),g.lock(),e.addClassName(d.menu,"selected"),this.showContextMenu(d.menu,function(){e.removeClassName(d.menu,"selected"),g.unlock(),g.unhighlight()})}"keydown"==b&&this.onKeyDown(a)},b}var e=c(3),f=c(10);a.exports=d},function(a,b,c){var d=function(){var a={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:this.$=a.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\x0B").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(a);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=f[h-1];case 13:this.$={};break;case 14:this.$=f[h-1];break;case 15:this.$=[f[h-2],f[h]];break;case 16:this.$={},this.$[f[h][0]]=f[h][1];break;case 17:this.$=f[h-2],f[h-2][f[h][0]]=f[h][1];break;case 18:this.$=[];break;case 19:this.$=f[h-1];break;case 20:this.$=[f[h]];break;case 21:this.$=f[h-2],f[h-2].push(f[h])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(a){e.length=e.length-2*a,f.length=f.length-a,g.length=g.length-a}function c(){var a;return a=d.lexer.lex()||1,"number"!=typeof a&&(a=d.symbols_[a]||a),a}var d=this,e=[0],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=2,n=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var o=this.lexer.yylloc;g.push(o),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,q,r,s,t,u,v,w,x,y={};;){if(r=e[e.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(null==p&&(p=c()),s=h[r]&&h[r][p]),"undefined"==typeof s||!s.length||!s[0]){if(!l){x=[];for(u in h[r])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var z="";z=this.lexer.showPosition?"Parse error on line "+(j+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(z,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:o,expected:x})}if(3==l){if(p==n)throw new Error(z||"Parsing halted.");k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,p=c()}for(;!(m.toString()in h[r]);){if(0==r)throw new Error(z||"Parsing halted.");b(1),r=e[e.length-1]}q=p,p=m,r=e[e.length-1],s=h[r]&&h[r][m],l=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:e.push(p),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),e.push(s[1]),p=null,q?(p=q,q=null):(k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[s[1]][1],y.$=f[f.length-v],y._$={first_line:g[g.length-(v||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(v||1)].first_column,last_column:g[g.length-1].last_column},t=this.performAction.call(y,i,k,j,this.yy,s[1],f,g),"undefined"!=typeof t)return t;v&&(e=e.slice(0,-1*v*2),f=f.slice(0,-1*v),g=g.slice(0,-1*v)),e.push(this.productions_[s[1]][0]),f.push(y.$),g.push(y._$),w=h[e[e.length-2]][e[e.length-1]],e.push(w);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parseError)throw new Error(a);this.yy.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},less:function(a){this._input=this.match.slice(a)+this._input},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/\n.*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 6;case 2:return b.yytext=b.yytext.substr(1,b.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},a}();return a.lexer=b,a}();b.parser=d,b.parse=d.parse.bind(d)},function(a,b,c){ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!1,b.cssClass="ace-jsoneditor",b.cssText='.ace-jsoneditor .ace_gutter { background: #ebebeb; color: #333 } .ace-jsoneditor.ace_editor { font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif; line-height: 1.3; } .ace-jsoneditor .ace_print-margin { width: 1px; background: #e8e8e8 } .ace-jsoneditor .ace_scroller { background-color: #FFFFFF } .ace-jsoneditor .ace_text-layer { color: gray } .ace-jsoneditor .ace_variable { color: #1a1a1a } .ace-jsoneditor .ace_cursor { border-left: 2px solid #000000 } .ace-jsoneditor .ace_overwrite-cursors .ace_cursor { border-left: 0px; border-bottom: 1px solid #000000 } .ace-jsoneditor .ace_marker-layer .ace_selection { background: #D5DDF6 } .ace-jsoneditor.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #FFFFFF; border-radius: 2px } .ace-jsoneditor .ace_marker-layer .ace_step { background: rgb(255, 255, 0) } .ace-jsoneditor .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF } .ace-jsoneditor .ace_marker-layer .ace_active-line { background: #FFFBD1 } .ace-jsoneditor .ace_gutter-active-line { background-color : #dcdcdc } .ace-jsoneditor .ace_marker-layer .ace_selected-word { border: 1px solid #D5DDF6 } .ace-jsoneditor .ace_invisible { color: #BFBFBF } .ace-jsoneditor .ace_keyword, .ace-jsoneditor .ace_meta, .ace-jsoneditor .ace_support.ace_constant.ace_property-value { color: #AF956F } .ace-jsoneditor .ace_keyword.ace_operator { color: #484848 } .ace-jsoneditor .ace_keyword.ace_other.ace_unit { color: #96DC5F } .ace-jsoneditor .ace_constant.ace_language { color: darkorange } .ace-jsoneditor .ace_constant.ace_numeric { color: red } .ace-jsoneditor .ace_constant.ace_character.ace_entity { color: #BF78CC } .ace-jsoneditor .ace_invalid { color: #FFFFFF; background-color: #FF002A; } .ace-jsoneditor .ace_fold { background-color: #AF956F; border-color: #000000 } .ace-jsoneditor .ace_storage, .ace-jsoneditor .ace_support.ace_class, .ace-jsoneditor .ace_support.ace_function, .ace-jsoneditor .ace_support.ace_other, .ace-jsoneditor .ace_support.ace_type { color: #C52727 } .ace-jsoneditor .ace_string { color: green } .ace-jsoneditor .ace_comment { color: #BCC8BA } .ace-jsoneditor .ace_entity.ace_name.ace_tag, .ace-jsoneditor .ace_entity.ace_other.ace_attribute-name { color: #606060 } .ace-jsoneditor .ace_markup.ace_underline { text-decoration: underline } .ace-jsoneditor .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y }';var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)})},function(a,b,c){!function(){function a(a){var b=function(a,b){return e("",a,b)},f=c;a&&(c[a]||(c[a]={}),f=c[a]),f.define&&f.define.packaged||(d.original=f.define,f.define=d,f.define.packaged=!0),f.acequire&&f.acequire.packaged||(e.original=f.acequire,f.acequire=b,f.acequire.packaged=!0)}var b="ace",c=function(){return this}();if(b||"undefined"==typeof acequirejs){var d=function(a,b,c){return"string"!=typeof a?void(d.original?d.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(c=b),d.modules||(d.modules={},d.payloads={}),d.payloads[a]=c,void(d.modules[a]=null))},e=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var d=[],f=0,h=b.length;h>f;++f){var i=g(a,b[f]);if(!i&&e.original)return e.original.apply(window,arguments);d.push(i)}c&&c.apply(null,d)}else{if("string"==typeof b){var j=g(a,b);return!j&&e.original?e.original.apply(window,arguments):(c&&c(),j)}if(e.original)return e.original.apply(window,arguments)}},f=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return f(a,c[0])+"!"+f(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&e!=b;){var e=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},g=function(a,b){b=f(a,b);var c=d.modules[b];if(!c){if(c=d.payloads[b],"function"==typeof c){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return e(b,a,c)},j=c(i,g,h);g=j||h.exports,d.modules[b]=g,delete d.payloads[b]}c=d.modules[b]=g||c}return c};a(b)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(a,b,c){"use strict";function d(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function e(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d1&&e(i,"")>-1&&(c=RegExp(this.source,f.replace.call(d(this),"g","")),f.replace.call(a.slice(i.index),c,function(){for(var a=1;ai.index&&this.lastIndex--}return i},h||(RegExp.prototype.test=function(a){var b=f.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(a,b,c){function d(){}function e(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function f(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var c=o.call(arguments,1),e=function(){if(this instanceof e){var d=b.apply(this,c.concat(o.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(o.call(arguments)))};return b.prototype&&(d.prototype=b.prototype,e.prototype=new d,d.prototype=null),e});var g,h,i,j,k,l=Function.prototype.call,m=Array.prototype,n=Object.prototype,o=m.slice,p=l.bind(n.toString),q=l.bind(n.hasOwnProperty);if((k=q(n,"__defineGetter__"))&&(g=l.bind(n.__defineGetter__),h=l.bind(n.__defineSetter__),i=l.bind(n.__lookupGetter__),j=l.bind(n.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var b,c=[];return c.splice.apply(c,a(20)),c.splice.apply(c,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length,b+1==c.length?!0:void 0}()){var r=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?r.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(o.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=o.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),h=a+g,i=h+f-g,j=c-h,k=c-g;if(h>i)for(var l=0;j>l;++l)this[i+l]=this[h+l];else if(i>h)for(l=j;l--;)this[i+l]=this[h+l];if(f&&a===k)this.length=k,this.push.apply(this,e);else for(this.length=k+f,l=0;f>l;++l)this[a+l]=e[l]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==p(a)});var s=Object("a"),t="a"!=s[0]||!(0 in s);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError;for(;++e>>0,e=Array(d),f=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=K(this),d=t&&"[object String]"==p(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=t&&"[object String]"==p(this)?this.split(""):K(this),c=b.length>>>0;if(!c)return-1;var d=0;for(arguments.length>1&&(d=f(arguments[1])),d=d>=0?d:Math.max(0,c+d);c>d;d++)if(d in b&&b[d]===a)return d;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=t&&"[object String]"==p(this)?this.split(""):K(this),c=b.length>>>0;if(!c)return-1;var d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d=d>=0?d:c-Math.abs(d);d>=0;d--)if(d in b&&a===b[d])return d;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:n)}),!Object.getOwnPropertyDescriptor){var u="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(u+a);if(q(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},k){var f=a.__proto__;a.__proto__=n;var d=i(a,b),e=j(a,b);if(a.__proto__=f,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var v;v=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=v();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var w=e({}),x="undefined"==typeof document||e(document.createElement("div"));if(!w||!x)var y=Object.defineProperty}if(!Object.defineProperty||y){var z="Property description must be an object: ",A="Object.defineProperty called on non-object: ",B="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(A+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(z+c);if(y)try{return y.call(Object,a,b,c)}catch(d){}if(q(c,"value"))if(k&&(i(a,b)||j(a,b))){var e=a.__proto__;a.__proto__=n,delete a[b],a[b]=c.value,a.__proto__=e}else a[b]=c.value;else{if(!k)throw new TypeError(B);q(c,"get")&&g(a,b,c.get),q(c,"set")&&h(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)q(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(C){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";q(a,b);)b+="?";a[b]=!0;var c=q(a,b);return delete a[b],c}),!Object.keys){var D=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],F=E.length;for(var G in{toString:null})D=!1;Object.keys=function L(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var L=[];for(var b in a)q(a,b)&&L.push(b);if(D)for(var c=0,d=F;d>c;c++){var e=E[c];q(a,e)&&L.push(e)}return L}}Date.now||(Date.now=function(){return(new Date).getTime()});var H=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||H.trim()){H="["+H+"]";var I=new RegExp("^"+H+H+"*"),J=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(I,"").replace(J,"")}}var K=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a,b,c){"use strict";a("./regexp"),a("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(a,b,c){"use strict";if("undefined"!=typeof document){var d="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=(a.className||"").split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c,d=0;if(b=b||document,b.createStyleSheet&&(c=b.styleSheets)){for(;d=0?(e.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]:(e.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((e.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(e.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(e.split(" Chrome/")[1])||void 0,b.isAIR=e.indexOf("AdobeAIR")>=0,b.isIPad=e.indexOf("iPad")>=0,b.isTouchPad=e.indexOf("TouchPad")>=0,b.isChromeOS=e.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b,c){"use strict";function d(a,b,c){var d=g(b);if(!f.isMac&&h){if((h[91]||h[92])&&(d|=8),h.altGr){if(3==(3&d))return;h.altGr=0}if(18===c||17===c){var j="location"in b?b.location:b.keyLocation;if(17===c&&1===j)i=b.timeStamp;else if(18===c&&3===d&&2===j){var k=-i;i=b.timeStamp,k+=i,3>k&&(h.altGr=!0)}}}if(c in e.MODIFIER_KEYS){switch(e.MODIFIER_KEYS[c]){case"Alt":d=2;break;case"Shift":d=4;break;case"Ctrl":d=1;break;default:d=8}c=-1}if(8&d&&(91===c||93===c)&&(c=-1),!d&&13===c){var j="location"in b?b.location:b.keyLocation;if(3===j&&(a(b,d,-c),b.defaultPrevented))return}if(f.isChromeOS&&8&d){if(a(b,d,c),b.defaultPrevented)return;d&=-9}return d||c in e.FUNCTION_KEYS||c in e.PRINTABLE_KEYS?a(b,d,c):!1}var e=a("./keys"),f=a("./useragent");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):void(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c))},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||f.isMac&&a.ctrlKey&&!a.altKey&&!a.shiftKey?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}return b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0),e},b.addMouseWheelListener=function(a,c){"onmousewheel"in a?b.addListener(a,"mousewheel",function(a){var b=8;void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/b,a.wheelY=-a.wheelDeltaY/b):(a.wheelX=0,a.wheelY=-a.wheelDelta/b),c(a)}):"onwheel"in a?b.addListener(a,"wheel",function(a){var b=.35;switch(a.deltaMode){case a.DOM_DELTA_PIXEL:a.wheelX=a.deltaX*b||0,a.wheelY=a.deltaY*b||0;break;case a.DOM_DELTA_LINE:case a.DOM_DELTA_PAGE:a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0)}c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,e){var g,h,i,j=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!==b.getButton(a)?j=0:a.detail>1?(j++,j>4&&(j=1)):j=1,f.isIE){var l=Math.abs(a.clientX-g)>5||Math.abs(a.clientY-h)>5;(!i||l)&&(j=1),i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),1==j&&(g=a.clientX,h=a.clientY)}if(a._clicks=j,d[e]("mousedown",a),j>4)j=0;else if(j>1)return d[e](k[j],a)}),f.isOldIE&&b.addListener(a,"dblclick",function(a){j=2,i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),d[e]("mousedown",a),d[e](k[j],a)})};var g=!f.isMac||!f.isOpera||"KeyboardEvent"in window?function(a){return 0|(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0)}:function(a){return 0|(a.metaKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.ctrlKey?8:0)};b.getModifierString=function(a){return e.KEY_MODS[g(a)]};var h=null,i=0;if(b.addCommandKeyListener=function(a,c){var e=b.addListener;if(f.isOldGecko||f.isOpera&&!("KeyboardEvent"in window)){var g=null;e(a,"keydown",function(a){g=a.keyCode}),e(a,"keypress",function(a){return d(c,a,g)})}else{var i=null;e(a,"keydown",function(a){h[a.keyCode]=!0;var b=d(c,a,a.keyCode);return i=a.defaultPrevented,b}),e(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),e(a,"keyup",function(a){h[a.keyCode]=null}),h||(h=Object.create(null),e(window,"focus",function(a){h=Object.create(null)}))}},window.postMessage&&!f.isOldIE){var j=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+j;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(a){setTimeout(a,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(a,b,c){"use strict";b.last=function(a){return a[a.length-1]},b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)a[c]&&"object"==typeof a[c]?b[c]=this.copyObject(a[c]):b[c]=a[c];return b},b.deepCopy=function(a){if("object"!=typeof a||!a)return a;var c=a.constructor;if(c===RegExp)return a;var d=c();for(var e in a)"object"==typeof a[e]?d[e]=b.deepCopy(a[e]):d[e]=a[e];return d},b.arrayToMap=function(a){for(var b={},c=0;cc?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}var g=(a("../lib/dom"),a("../lib/event"),a("../lib/useragent"),0);(function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&d.selection.moveToPosition(c),void d.textInput.onContextMenu(a.domEvent)}return this.mousedownEvent.time=Date.now(),!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(this.captureMouse(a),this.startSelect(c,a.domEvent._clicks>1),a.preventDefault()):(this.setState("focusWait"),void this.captureMouse(a))},this.startSelect=function(a,b){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var c=this.editor;this.mousedownEvent.getShiftKey()?c.selection.selectToPosition(a):b||c.selection.moveToPosition(a),b||this.select(),c.renderer.scroller.setCapture&&c.renderer.scroller.setCapture(),c.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var e=f(this.$clickSelection,c);c=e.cursor,a=e.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),e=c.selection[a](d.row,d.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(e.start),h=this.$clickSelection.comparePoint(e.end);if(-1==g&&0>=h)b=this.$clickSelection.end,(e.end.row!=d.row||e.end.column!=d.column)&&(d=e.start);else if(1==h&&g>=0)b=this.$clickSelection.start,(e.start.row!=d.row||e.start.column!=d.column)&&(d=e.end);else if(-1==g&&1==h)d=e.end,b=e.start;else{var i=f(this.$clickSelection,d);d=i.cursor,b=i.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(a>g||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines");var d=c.getSelectionRange();d.isMultiLine()&&d.contains(b.row,b.column)?(this.$clickSelection=c.selection.getLineRange(d.start.row),this.$clickSelection.end=c.selection.getLineRange(d.end.row).end):this.$clickSelection=c.selection.getLineRange(b.row),this.select()},this.onQuadClick=function(a){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}).call(d.prototype),b.DefaultHandlers=d}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(a,b,c){"use strict";function d(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}var e=(a("./lib/oop"),a("./lib/dom"));(function(){this.$init=function(){return this.$element=e.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(a){e.setInnerText(this.getElement(),a)},this.setHtml=function(a){this.getElement().innerHTML=a},this.setPosition=function(a,b){this.getElement().style.left=a+"px",this.getElement().style.top=b+"px"},this.setClassName=function(a){e.addCssClass(this.getElement(),a)},this.show=function(a,b,c){null!=a&&this.setText(a),null!=b&&null!=c&&this.setPosition(b,c),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(d.prototype),b.Tooltip=d}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(a,b,c){"use strict";function d(a){function b(){var b=l.getDocumentPosition().row,e=i.$annotations[b];if(!e)return c();var f=g.session.getLength();if(b==f){var h=g.renderer.pixelToScreenCoordinates(0,l.y).row,k=l.$pos;if(h>g.session.documentToScreenRow(k.row,k.column))return c()}if(m!=e)if(m=e.text.join("
    "),j.setHtml(m),j.show(),g.on("mousewheel",c),a.$tooltipFollowsMouse)d(l);else{var n=i.$cells[g.session.documentToScreenRow(b,0)].element,o=n.getBoundingClientRect(),p=j.getElement().style;p.left=o.right+"px",p.top=o.bottom+"px"}}function c(){k&&(k=clearTimeout(k)),m&&(j.hide(),m=null,g.removeEventListener("mousewheel",c))}function d(a){j.setPosition(a.x,a.y)}var g=a.editor,i=g.renderer.$gutterLayer,j=new e(g.container);a.editor.setDefaultHandler("guttermousedown",function(b){if(g.isFocused()&&0==b.getButton()){var c=i.getRegion(b);if("foldWidgets"!=c){var d=b.getDocumentPosition().row,e=g.session.selection;if(b.getShiftKey())e.selectTo(d,0);else{if(2==b.domEvent.detail)return g.selectAll(),b.preventDefault();a.$clickSelection=g.selection.getLineRange(d)}return a.setState("selectByLines"),a.captureMouse(b),b.preventDefault()}}});var k,l,m;a.editor.setDefaultHandler("guttermousemove",function(e){var g=e.domEvent.target||e.domEvent.srcElement;return f.hasCssClass(g,"ace_fold-widget")?c():(m&&a.$tooltipFollowsMouse&&d(e),l=e,void(k||(k=setTimeout(function(){k=null,l&&!a.isMousePressed?b():c()},50))))}),h.addListener(g.renderer.$gutter,"mouseout",function(a){l=null,m&&!k&&(k=setTimeout(function(){k=null,c()},50))}),g.on("changeSession",c)}function e(a){i.call(this,a)}var f=a("../lib/dom"),g=a("../lib/oop"),h=a("../lib/event"),i=a("../tooltip").Tooltip;g.inherits(e,i),function(){this.setPosition=function(a,b){var c=window.innerWidth||document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight,e=this.getWidth(),f=this.getHeight();a+=15,b+=15,a+e>c&&(a-=a+e-c),b+f>d&&(b-=20+f),i.prototype.setPosition.call(this,a,b)}}.call(e.prototype),b.GutterHandler=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return d.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=e.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(f.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b,c){"use strict";function d(a){function b(a,b){var c=Date.now(),d=!b||a.row!=b.row,f=!b||a.column!=b.column;if(!C||d||f)q.$blockScrolling+=1,q.moveCursorToPosition(a),q.$blockScrolling-=1,C=c,D={x:u,y:v};else{var g=e(D.x,D.y,u,v);g>k?C=null:c-C>=j&&(q.renderer.scrollCursorIntoView(),C=null)}}function c(a,b){var c=Date.now(),d=q.renderer.layerConfig.lineHeight,e=q.renderer.layerConfig.characterWidth,f=q.renderer.scroller.getBoundingClientRect(),g={x:{left:u-f.left,right:f.right-u},y:{top:v-f.top,bottom:f.bottom-v}},h=Math.min(g.x.left,g.x.right),j=Math.min(g.y.top,g.y.bottom),k={row:a.row,column:a.column};2>=h/e&&(k.column+=g.x.left=j/d&&(k.row+=g.y.top=i&&q.renderer.scrollCursorIntoView(k):B=c:B=null}function d(){var a=y;y=q.renderer.screenToTextCoordinates(u,v),b(y,a),c(y,a)}function l(){x=q.selection.toOrientedRange(),t=q.session.addMarker(x,"ace_selection",q.getSelectionStyle()),q.clearSelection(),q.isFocused()&&q.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),d(),w=setInterval(d,20),F=0,g.addListener(document,"mousemove",n)}function m(){clearInterval(w),q.session.removeMarker(t),t=null,q.$blockScrolling+=1,q.selection.fromOrientedRange(x),q.$blockScrolling-=1,q.isFocused()&&!A&&q.renderer.$cursorLayer.setBlinking(!q.getReadOnly()),x=null,y=null,F=0,B=null,C=null,g.removeListener(document,"mousemove",n)}function n(){null==G&&(G=setTimeout(function(){null!=G&&t&&m()},20))}function o(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function p(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=h.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var f="none";return d&&b.indexOf(e)>=0?f="copy":c.indexOf(e)>=0?f="move":b.indexOf(e)>=0&&(f="copy"),f}var q=a.editor,r=f.createElement("img");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h.isOpera&&(r.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(b){a[b]=this[b]},this),q.addEventListener("mousedown",this.onMouseDown.bind(a));var t,u,v,w,x,y,z,A,B,C,D,E=q.container,F=0;this.onDragStart=function(a){if(this.cancelDrag||!E.draggable){var b=this;return setTimeout(function(){b.startSelect(),b.captureMouse(a)},0),a.preventDefault()}x=q.getSelectionRange();var c=a.dataTransfer;c.effectAllowed=q.getReadOnly()?"copy":"copyMove",h.isOpera&&(q.container.appendChild(r),r.scrollTop=0),c.setDragImage&&c.setDragImage(r,0,0),h.isOpera&&q.container.removeChild(r),c.clearData(),c.setData("Text",q.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(a){if(E.draggable=!1,A=!1,this.setState(null),!q.getReadOnly()){var b=a.dataTransfer.dropEffect;z||"move"!=b||q.session.remove(q.getSelectionRange()),q.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(u=a.clientX,v=a.clientY,t||l(),F++,a.dataTransfer.dropEffect=z=p(a),g.preventDefault(a)):void 0},this.onDragOver=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(u=a.clientX,v=a.clientY,t||(l(),F++),null!==G&&(G=null),a.dataTransfer.dropEffect=z=p(a),g.preventDefault(a)):void 0},this.onDragLeave=function(a){return F--,0>=F&&t?(m(),z=null,g.preventDefault(a)):void 0},this.onDrop=function(a){if(y){var b=a.dataTransfer;if(A)switch(z){case"move":x=x.contains(y.row,y.column)?{start:y,end:y}:q.moveText(x,y);break;case"copy":x=q.moveText(x,y,!0)}else{var c=b.getData("Text");x={start:y,end:q.session.insert(y,c)},q.focus(),z=null}return m(),g.preventDefault(a)}},g.addListener(E,"dragstart",this.onDragStart.bind(a)),g.addListener(E,"dragend",this.onDragEnd.bind(a)),g.addListener(E,"dragenter",this.onDragEnter.bind(a)),g.addListener(E,"dragover",this.onDragOver.bind(a)),g.addListener(E,"dragleave",this.onDragLeave.bind(a)),g.addListener(E,"drop",this.onDrop.bind(a));var G=null}function e(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var f=a("../lib/dom"),g=a("../lib/event"),h=a("../lib/useragent"),i=200,j=200,k=5;(function(){this.dragWait=function(){var a=Date.now()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()), -this.selectEnd()},this.dragReadyEnd=function(a){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor,b=a.container;b.draggable=!0,a.renderer.$cursorLayer.setBlinking(!1),a.setStyle("ace_dragging");var c=h.isWin?"default":"move";a.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(a){var b=this.editor.container;if(h.isIE&&"dragReady"==this.state){var c=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&b.dragDrop()}if("dragWait"===this.state){var c=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(b.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){if(a.editor.inMultiSelectMode&&(a.getAccelKey()||a.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),b.getDragDelay()){if(h.isWebKit){this.cancelDrag=!0;var g=b.container;g.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(d.prototype),b.DragdropHandler=d}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var c=d.getDocumentHead(),e=document.createElement("script");e.src=a,c.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}},b.qualifyURL=function(a){var b=document.createElement("a");return b.href=a,b.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(a,b,c){"use strict";var d={},e=function(){this.propagationStopped=!0},f=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(c.length||d){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=e),b.preventDefault||(b.preventDefault=f),c=c.slice();for(var g=0;gr;r++){var t=q[r];0===t.name.indexOf("data-ace-")&&(g[f(t.name.replace(/^data-ace-/,""))]=t.value)}var u=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);u&&(h=u[1])}}h&&(g.base=g.base||h,g.packaged=!0),g.basePath=g.base,g.workerPath=g.workerPath||g.base,g.modePath=g.modePath||g.base,g.themePath=g.themePath||g.base,delete g.base;for(var v in g)"undefined"!=typeof g[v]&&b.set(v,g[v])}function f(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var g=a("./lib/lang"),h=a("./lib/oop"),i=a("./lib/net"),j=a("./lib/event_emitter").EventEmitter,k=function(){return this}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!l.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return l[a]},b.set=function(a,b){if(!l.hasOwnProperty(a))throw new Error("Unknown config key: "+a);l[a]=b},b.all=function(){return g.copyObject(l)},h.implement(b,j),b.moduleUrl=function(a,b){if(l.$moduleUrls[a])return l.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("worker"==b&&"-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=l[b+"Path"];return null==g?g=l.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return l.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,f;Array.isArray(c)&&(f=c[0],c=c[1]);try{e=a(c)}catch(g){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var h=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?void i.loadScript(b.moduleUrl(c,f),h):h()}},e(!0),b.init=e;var m={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'));if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'))}},n={};b.defineOptions=function(a,b,c){return a.$options||(n[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),h.implement(a,m),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value)})},b.setDefaultValue=function(a,c,d){var e=n[a]||(n[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=a("./default_handlers").DefaultHandlers,g=a("./default_gutter_handler").GutterHandler,h=a("./mouse_event").MouseEvent,i=a("./dragdrop_handler").DragdropHandler,j=a("../config"),k=function(a){var b=this;this.editor=a,new f(this),new g(this),new i(this);var c=function(b){!a.isFocused()&&a.textInput&&a.textInput.moveToMouse(b),a.focus()},h=a.renderer.getMouseEventTarget();d.addListener(h,"click",this.onMouseEvent.bind(this,"click")),d.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove")),d.addMultiMouseDownListener(h,[400,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(d.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),d.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),e.isIE&&(d.addListener(a.renderer.scrollBarV.element,"mousedown",c),d.addListener(a.renderer.scrollBarH.element,"mousemove",c))),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var j=a.renderer.$gutter;d.addListener(j,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),d.addListener(j,"click",this.onMouseEvent.bind(this,"gutterclick")),d.addListener(j,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),d.addListener(j,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),d.addListener(h,"mousedown",c),d.addListener(j,"mousedown",function(b){return a.focus(),d.preventDefault(b)}),a.on("mousemove",function(c){if(!b.state&&!b.$dragDelay&&b.$dragEnabled){var d=a.renderer.screenToTextCoordinates(c.x,c.y),e=a.session.selection.getRange(),f=a.renderer;f.setCursorStyle(!e.isEmpty()&&e.insideStart(d.row,d.column)?"default":"")}})};(function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new h(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new h(b,this.editor))},this.onMouseWheel=function(a,b){var c=new h(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var c=this.editor.renderer;c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=null);var f=this,g=function(a){if(a){if(e.isWebKit&&!a.which&&f.releaseMouse)return f.releaseMouse();f.x=a.clientX,f.y=a.clientY,b&&b(a),f.mouseEvent=new h(a,f.editor),f.$mouseMoved=!0}},i=function(a){clearInterval(k),j(),f[f.state+"End"]&&f[f.state+"End"](a),f.state="",null==c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=!0,c.$moveTextAreaToCursor()),f.isMousePressed=!1,f.$onCaptureMouseMove=f.releaseMouse=null,a&&f.onMouseEvent("mouseup",a)},j=function(){f[f.state]&&f[f.state](),f.$mouseMoved=!1};if(e.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){i(a)});f.$onCaptureMouseMove=g,f.releaseMouse=d.capture(this.editor.container,g,i);var k=setInterval(j,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var a=function(b){b&&b.domEvent&&"contextmenu"!=b.domEvent.type||(this.editor.off("nativecontextmenu",a),b&&b.domEvent&&d.stopEvent(b.domEvent))}.bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)}}).call(k.prototype),j.defineOptions(k.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:e.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),b.MouseHandler=k}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(a,b,c){"use strict";function d(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){d=g.start.row;var h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=d}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=a("../lib/event"),f=function(a){this.$editor=a,this.$data={editor:a},this.$handlers=[],this.setDefaultHandler(a.commands)};(function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0)},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){"function"!=typeof a||a.handleKeyboard||(a.handleKeyboard=a);var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var a=this.$data,b=a.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(b,a)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(a,b,c,d){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,d),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,d),g&&d&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&e.stopEvent(d),g))););return g},this.onCommandKey=function(a,b,c){var e=d.keyCodeToString(c);this.$callKeyboardHandlers(b,e,c,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}).call(f.prototype),b.KeyBinding=f}),ace.define("ace/range",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b){return a.row-b.row||a.column-b.column},e=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?!this.isEnd(a,b)&&!this.isStart(a,b):!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?!this.isEnd(a,b):!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?!this.isStart(a,b):!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:bthis.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.rowb)var d={row:b+1,column:0};else if(this.start.rowb.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.moveTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var c,d="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(d);return e?(d=e.start.row,c=e.end.row):c=d,b===!0?new g(d,0,c,this.session.getLine(c).length):new g(d,0,c+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(0===b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column-c,b.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a,b=this.lead.row,c=this.lead.column,d=this.doc.getLine(b),e=d.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(b,c,1);return f?void this.moveCursorTo(f.end.row,f.end.column):((a=this.session.nonTokenRe.exec(e))&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=d.substring(c)),c>=d.length?(this.moveCursorTo(b,d.length),this.moveCursorRight(),void(b=c?(this.moveCursorTo(b,0),this.moveCursorLeft(),void(b>0&&this.moveCursorWordLeft())):((f=this.session.tokenRe.exec(g))&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(b,c))},this.$shortWordEndIndex=function(a){var b,c,d=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))d=this.session.tokenRe.lastIndex;else{for(;(c=a[d])&&e.test(c);)d++;if(1>d)for(f.lastIndex=0;(c=a[d])&&!f.test(c);)if(f.lastIndex=0,d++,e.test(c)){if(d>2){d--;break}for(;(c=a[d])&&e.test(c);)d++;if(d>2)break}}return f.lastIndex=0,d},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var d=this.session.getLine(b).substring(0,c);if(0===c){do b--,d=this.doc.getLine(b);while(b>0&&/^\s*$/.test(d));c=d.length,/\s+$/.test(d)||(d="")}var f=e.stringReverse(d),g=this.$shortWordEndIndex(f);return this.moveCursorTo(b,c-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);0!==a&&0===b&&d.row===this.lead.row&&d.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[d.row]&&d.row++,this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.getRangeOfMovements=function(a){var b=this.getCursor();try{a.call(null,this);var c=this.getCursor();return g.fromPoints(b,c)}catch(d){return g.fromPoints(b,b)}finally{this.moveCursorToPosition(b)}},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=g.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}).call(h.prototype),b.Selection=h}),ace.define("ace/tokenizer",["require","exports","module"],function(a,b,c){"use strict";var d=2e3,e=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i1?j.onMatch=this.$applyToken:j.onMatch=j.token),l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null)}}d.length||(f[0]=0,d.push("$")),h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};(function(){this.$setMaxTokenCount=function(a){d=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var c=b.slice(0);b=c[0],"#tmp"===b&&(c.shift(),b=c.shift())}else var c=[];var e=b||"start",f=this.states[e];f||(e="start",f=this.states[e]);var g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l=0,m={type:null,value:""};i=h.exec(a);){var n=g.defaultToken,o=null,p=i[0],q=h.lastIndex;if(q-p.length>k){var r=a.substring(k,q-p.length);m.type==n?m.value+=r:(m.type&&j.push(m),m={type:n,value:r})}for(var s=0;sd){for(l>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:b,line:a});k1&&c[0]!==e&&c.unshift("#tmp",e),{tokens:j,state:c.length?c:e}},this.reportError=function(a,b){var c=new Error(a);c.data=b,"object"==typeof console&&console.error&&console.error(c),setTimeout(function(){throw c})}}).call(e.prototype),b.Tokenizer=e}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b,c){"use strict";var d=a("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}).call(d.prototype),b.TokenIterator=d}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b,c){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=a("../lib/lang"),i=a("../token_iterator").TokenIterator,j=a("../range").Range,k=function(){this.HighlightRules=e,this.$behaviour=new f};(function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new d(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="", -this.toggleCommentLines=function(a,b,c,d){function e(a){for(var b=c;d>=b;b++)a(f.getLine(b),b)}var f=b.doc,g=!0,i=!0,j=1/0,k=b.getTabSize(),l=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var m=this.lineCommentStart.map(h.escapeRegExp).join("|"),n=this.lineCommentStart[0];else var m=h.escapeRegExp(this.lineCommentStart),n=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),l=b.getUseSoftTabs();var o=function(a,b){var c=a.match(m);if(c){var d=c[1].length,e=c[0].length;s(a,d,e)||" "!=c[0][e-1]||e--,f.removeInLine(b,d,e)}},p=n+" ",q=function(a,b){(!g||/\S/.test(a))&&(s(a,j,j)?f.insertInLine({row:b,column:j},p):f.insertInLine({row:b,column:j},n))},r=function(a,b){return m.test(a)},s=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(d%k!=0)return!1;for(var d=0;" "==a.charAt(c++);)d++;return k>2?d%k!=k-1:d%k==0}}else{if(!this.blockComment)return!1;var n=this.blockComment.start,t=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+h.escapeRegExp(n)+")"),u=new RegExp("(?:"+h.escapeRegExp(t)+")\\s*$"),q=function(a,b){r(a,b)||(!g||/\S/.test(a))&&(f.insertInLine({row:b,column:a.length},t),f.insertInLine({row:b,column:j},n))},o=function(a,b){var c;(c=a.match(u))&&f.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(m))&&f.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(m.test(a))return!0;for(var d=b.getTokens(c),e=0;ec&&(j=c),i&&!r(a,b)&&(i=!1)):v>a.length&&(v=a.length)}),j==1/0&&(j=v,g=!1,i=!1),l&&j%k!=0&&(j=Math.floor(j/k)*k),e(i?o:q)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f,g,h=new i(b,d.row,d.column),k=h.getCurrentToken(),l=(b.selection,b.selection.toOrientedRange());if(k&&/comment/.test(k.type)){for(var m,n;k&&/comment/.test(k.type);){var o=k.value.indexOf(e.start);if(-1!=o){var p=h.getCurrentTokenRow(),q=h.getCurrentTokenColumn()+o;m=new j(p,q,p,q+e.start.length);break}k=h.stepBackward()}for(var h=new i(b,d.row,d.column),k=h.getCurrentToken();k&&/comment/.test(k.type);){var o=k.value.indexOf(e.end);if(-1!=o){var p=h.getCurrentTokenRow(),q=h.getCurrentTokenColumn()+o;n=new j(p,q,p,q+e.end.length);break}k=h.stepForward()}n&&b.remove(n),m&&(b.remove(m),f=m.start.row,g=-e.start.length)}else g=e.start.length,f=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);l.start.row==f&&(l.start.column+=g),l.end.row==f&&(l.end.column+=g),b.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1},this.autoOutdent=function(a,b,c){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;bf;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(a,b,c,d){var e=this.$keywordList||this.$createKeywordList();return e.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(k.prototype),b.Mode=k}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};(function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if((c.start.row!=c.end.row||c.start.row==this.row)&&!(c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}).call(f.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=a("./anchor").Anchor,h=function(a){this.$lines=[],0===a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};(function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},0==="aaa".split(/a/).length?this.$split=function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};for(;b.length>61440;){var c=this._insertLines(a,b.slice(0,61440));b=b.slice(61440),a=c.row}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var e=new f(a,0,a+b.length,0),g={action:"insertLines",range:e,lines:b};return this._signal("change",{data:g}),e.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};return this._signal("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};return this._signal("change",{data:e}),d},this.remove=function(a){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this._removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._signal("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new f(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._signal("change",{data:e}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._signal("change",{data:g})},this.replace=function(a,b){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}).call(h.prototype),b.Document=h}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=function(a,b){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(c.running){for(var a=new Date,b=c.currentLine,d=-1,e=c.doc;c.lines[b];)b++;var f=b,g=e.getLength(),h=0;for(c.running=!1;g>b;){c.$tokenizeRow(b),d=b;do b++;while(c.lines[b]);if(h++,h%5===0&&new Date-a>20){c.running=setTimeout(c.$worker,20);break}}c.currentLine=b,d>=f&&c.fireUpdateEvent(f,d)}}};(function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._signal("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}).call(f.prototype),b.BackgroundTokenizer=f}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b,c){"use strict";var d=a("./lib/lang"),e=(a("./lib/oop"),a("./range").Range),f=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,c,f){if(this.regExp)for(var g=f.firstRow,h=f.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=d.getMatchOffsets(c.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new e(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(c),this.clazz,f)}}}).call(f.prototype),b.SearchHighlight=f}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b,c){"use strict";function d(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new e(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var e=a("../range").Range;(function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d,e,f,g=0,h=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;ja)return{row:d.start.row,column:d.start.column+a};if(a-=d.placeholder.length,0>a)return d.start;b=d.end.column}return{row:this.end.row,column:this.end.column+a}}}).call(d.prototype),b.FoldLine=d}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("./range").Range,e=d.comparePoints,f=function(){this.ranges=[]};(function(){this.comparePoints=e,this.pointIndex=function(a,b,c){for(var d=this.ranges,f=c||0;f0)){var i=e(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return e(a.start,b.start)});for(var c,d=b[0],f=1;fg||(0!=g||c.isEmpty()||d.isEmpty())&&(e(c.end,d.end)<0&&(c.end.row=d.end.row,c.end.column=d.end.column),b.splice(f,1),a.push(d),d=c,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.rowd&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.rowe)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}).call(f.prototype),b.RangeList=f}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b,c){"use strict";function d(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function e(a,b){d(a.start,b),d(a.end,b)}function f(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function g(a,b){f(a.start,b),f(a.end,b)}var h=(a("../range").Range,a("../range_list").RangeList),i=a("../lib/oop"),j=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};i.inherits(j,h),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new j(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);e(a,this.start);for(var b=a.start.row,c=a.start.column,d=0,f=-1;d=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c,d=this.$foldData,e=!1;a instanceof g?c=a:(c=new g(b,a),c.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(c.range);var h=c.start.row,i=c.start.column,j=c.end.row,k=c.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(c);l&&!l.range.isStart(h,i)&&this.removeFold(l),m&&!m.range.isEnd(j,k)&&this.removeFold(m);var n=this.getFoldsInRange(c.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){c.addSubFold(a)}));for(var o=0;o0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,d;if(null==a?(c=new e(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new e(a,0,a,this.getLine(a).length):"row"in a?e.fromPoints(a,a):a,d=this.getFoldsInRangeList(c),b)this.removeFolds(d);else for(var f=d;f.length;)this.expandFolds(f),f=this.getFoldsInRangeList(c);return d.length?d:void 0},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row),null==e&&(e=0),null==b&&(b=a.end.row),null==c&&(c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new f(a,c)})},this.toggleFold=function(a){var b,c,d=this.selection,e=d.getRange();if(e.isEmpty()){var f=e.start;if(b=this.getFoldAt(f.row,f.column))return void this.expandFold(b);(c=this.findMatchingBracket(f))?1==e.comparePoint(c)?e.end=c:(e.start=c,e.start.column++,e.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==e.comparePoint(c)?e.end=c:e.start=c,e.start.column++):e=this.getCommentFoldRange(f.row,f.column)||e}else{var g=this.getFoldsInRange(e);if(a&&g.length)return void this.expandFolds(g);1==g.length&&(b=g[0])}if(b||(b=this.getFoldAt(e.start.row,e.start.column)),b&&b.range.toString()==e.toString())return void this.expandFold(b);var h="...";if(!e.isMultiLine()){if(h=this.getTextRange(e),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,e)},this.getCommentFoldRange=function(a,b,c){var d=new h(this,a,b),f=d.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var g=new e,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=d.stepBackward();while(f&&i.test(f.type));d.stepForward()}if(g.start.row=d.getCurrentTokenRow(),g.start.column=d.getCurrentTokenColumn()+2,d=new h(this,a,b),-1!=c){do f=d.stepForward();while(f&&i.test(f.type));f=d.stepBackward()}else f=d.getCurrentToken();return g.end.row=d.getCurrentTokenRow(),g.end.column=d.getCurrentTokenColumn()+f.value.length-2,g}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;if(d){b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e);if(f&&f.isMultiLine()&&f.end.row<=b&&f.start.row>=a){e=f.end.row;try{var g=this.addFold("...",f);g&&(g.collapseChildren=c)}catch(h){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var d,e=a-1;e>=0;){ -var f=c[e];if(null==f&&(f=c[e]=this.getFoldWidget(e)),"start"==f){var g=this.getFoldWidgetRange(e);if(d||(d=g),g&&g.end.row>=a)break}e--}return{range:-1!==e&&g,firstRange:d}},this.onFoldWidgetClick=function(a,b){b=b.domEvent;var c={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey},d=this.$toggleFoldWidget(a,c);if(!d){var e=b.target||b.srcElement;e&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,b){if(this.getFoldWidget){var c=this.getFoldWidget(a),d=this.getLine(a),e="end"===c?-1:1,f=this.getFoldAt(a,-1===e?0:d.length,e);if(f)return void(b.children||b.all?this.removeFold(f):this.expandFold(f));var g=this.getFoldWidgetRange(a,!0);if(g&&!g.isMultiLine()&&(f=this.getFoldAt(g.start.row,g.start.column,1),f&&g.isEqual(f.range)))return void this.removeFold(f);if(b.siblings){var h=this.getParentFoldRangeData(a);if(h.range)var i=h.range.start.row+1,j=h.range.end.row;this.foldAll(i,j,b.all?1e4:0)}else b.children?(j=g?g.end.row:this.getLength(),this.foldAll(a+1,g.end.row,b.all?1e4:0)):g&&(b.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(a){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var c=this.$toggleFoldWidget(b,{});if(!c){var d=this.getParentFoldRangeData(b,!0);if(c=d.range||d.firstRange){b=c.start.row;var e=this.getFoldAt(b,this.getLine(b).length,1);e?this.removeFold(e):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var e=a("../range").Range,f=a("./fold_line").FoldLine,g=a("./fold").Fold,h=a("../token_iterator").TokenIterator;b.Folding=d}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b,c){"use strict";function d(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var b,c=this.getLine(a.row),d=!0,e=c.charAt(a.column-1),g=e&&e.match(/([\(\[\{])|([\)\]\}])/);if(g||(e=c.charAt(a.column),a={row:a.row,column:a.column+1},g=e&&e.match(/([\(\[\{])|([\)\]\}])/),d=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;b=f.fromPoints(a,h),d||(b.end.column++,b.start.column--),b.cursor=b.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;b=f.fromPoints(h,a),d||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var d=this.$brackets[a],f=1,g=new e(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==d){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var d=this.$brackets[a],f=1,g=new e(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==d){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var e=a("../token_iterator").TokenIterator,f=a("../range").Range;b.BracketMatch=d}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./config"),g=a("./lib/event_emitter").EventEmitter,h=a("./selection").Selection,i=a("./mode/text").Mode,j=a("./range").Range,k=a("./document").Document,l=a("./background_tokenizer").BackgroundTokenizer,m=a("./search_highlight").SearchHighlight,n=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new k(a)),this.setDocument(a),this.selection=new h(this),f.resetOptions(this),this.setMode(b),f._signal("session",this)};(function(){function a(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}d.implement(this,g),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],void(this.$screenRowCache=[]);var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(b),this._signal("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var c,d=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=d.length-1,e=this.getLine(a).length;else for(var f=0;f=b));f++);return(c=d[f])?(c.index=f,c.start=e-c.value.length,c):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=e.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;ga&&(a=b.screenWidth)}),this.lineWidgetWidth=a},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;da.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var i=a.start,k=f.start,g=k.row-i.row,h=k.column-i.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==i.row&&(a.start.column+=h),a.end.row==i.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new j(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&" "==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new j(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b,c=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,b=a.data.lines?a.data.lines.length:f-e):b=f-e,this.$updating=!0,0!=b)if(-1!=d.indexOf("remove")){this[c?"$wrapData":"$rowLengthCache"].splice(e,b);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-b);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l=h.row&&k.shiftRow(-b)}f=e}else{var n=Array(b);n.unshift(e,0);var o=c?this.$wrapData:this.$rowLengthCache;o.splice.apply(o,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k&&(k.shiftRow(b),k.addRemoveChars(f,0,h.column-g.column))):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(b)),l=j.indexOf(k)+1}for(l;l=e&&k.shiftRow(b)}}else{b=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),b=-b);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,b)}return c&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,c?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b,c){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var c,d,e=this.doc.getAllLines(),f=this.getTabSize(),g=this.$wrapData,i=this.$wrapLimit,j=a;for(b=Math.min(b,e.length-1);b>=j;)d=this.getFoldLine(j,d),d?(c=[],d.walk(function(a,b,d,f){var g;if(null!=a){g=this.$getDisplayTokens(a,c.length),g[0]=h;for(var i=1;ib;){var l=g+b;if(a[l-1]>=o&&a[l]>=o)d(l);else if(a[l]!=h&&a[l]!=k){for(var m=Math.max(l-(j?10:b-(b>>2)),g-1);l>m&&a[l]m&&a[l]m&&a[l]==n;)l--}else for(;l>m&&a[l]m?d(++l):(l=g+b,a[l]==c&&l--,d(l))}else{for(l;l!=g-1&&a[l]!=h;l--);if(l>g){d(l);continue}for(l=g+b;lj;j++)g.push(q)}else 32==i?g.push(o):i>39&&48>i||i>57&&64>i?g.push(n):i>=4352&&a(i)?g.push(b,c):g.push(b)}return g},this.$getStringScreenWidth=function(b,c,d){if(0==c)return[0,0];null==c&&(c=1/0),d=d||0;var e,f;for(f=0;f=4352&&a(e)?2:1,!(d>c));f++);return[d,f]},this.lineWidgets=null,this.getRowLength=function(a){if(this.lineWidgets)var b=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0;else b=0;return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.getRowLineCount=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,d,e=0,f=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],e=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(e),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(e),!(g+h>a||e>=m));)g+=h,e++,e>o&&(e=n.end.row+1,n=this.getNextFoldLine(e,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(e),this.$screenRowCache.push(g));if(n&&n.start.row<=e)c=this.getFoldDisplayLine(n),e=n.start.row;else{if(a>=g+h||e>m)return{row:m,column:this.getLine(m).length};c=this.getLine(e),n=null}if(this.$useWrapMode){var p=this.$wrapData[e];if(p){var q=Math.floor(a-g);d=p[q],q>0&&p.length&&(f=p[q-1]||p[p.length-1],c=c.substring(f))}}return f+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&f>=d&&(f=d-1),n?n.idxToPosition(f):{row:e,column:f}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){var p=this.$wrapData[e];if(p){for(var q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var c=this.$wrapData.length,d=0,e=0,b=this.$foldData[e++],f=b?b.start.row:1/0;c>d;){var g=this.$wrapData[d];a+=g?g.length+1:1,d++,d>f&&(d=b.end.row+1,b=this.$foldData[e++],f=b?b.start.row:1/0)}else{a=this.getLength();for(var h=this.$foldData,e=0;e=l;l++){for(var m=0;j>m;m++)if(-1==e[l+m].search(h[m]))continue a;var n=e[l],o=e[l+j-1],p=n.length-n.match(h[0])[0].length,q=o.match(h[j-1])[0].length;i&&i.end.row===l&&i.end.column>p||(g.push(i=new f(l,p,l+j-1,q)),j>2&&(l=l+j-2))}}else for(var r=0;rr&&g[r].start.columnr&&g[m].end.column>v&&g[m].end.row==c.end.row;)m--;for(g=g.slice(r,m+1),r=0,m=g.length;m>r;r++)g[r].start.row+=c.start.row,g[r].end.row+=c.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];g&&g.toLowerCase()!=g?b[f]=b[f].toUpperCase():b[f]=b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var c=this.$assembleRegExp(b);if(!c)return!1;var e,g=this,h=b.backwards;if(b.$isMultiLine)var i=c.length,j=function(b,d,g){var h=b.search(c[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(d+j),-1==b.search(c[j]))return;var k=b.match(c[i-1])[0].length,l=new f(d,h,d+i-1,k);return 1==c.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):g&&(l.start.column+=g), -e(l)?!0:void 0}};else if(h)var j=function(a,b,f){for(var g=d.getMatchOffsets(a,c),h=g.length-1;h>=0;h--)if(e(g[h],b,f))return!0};else var j=function(a,b,f){for(var g=d.getMatchOffsets(a,c),h=0;h=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}).call(g.prototype),b.Search=g}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b,c){"use strict";function d(a,b){this.platform=b||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(a),this.$singleCommand=!0}function e(a,b){d.call(this,a,b),this.$singleCommand=!1}var f=a("../lib/keys"),g=a("../lib/useragent"),h=f.KEY_MODS;e.prototype=d.prototype,function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a,b){var c=a&&("string"==typeof a?a:a.name);a=this.commands[c],b||delete this.commands[c];var d=this.commandKeyBinding;for(var e in d){var f=d[e];if(f==a)delete d[e];else if(Array.isArray(f)){var g=f.indexOf(a);-1!=g&&(f.splice(g,1),1==f.length&&(d[e]=f[0]))}}},this.bindKey=function(a,b,c){return"object"==typeof a&&(a=a[this.platform]),a?"function"==typeof b?this.addCommand({exec:b,bindKey:a,name:b.name||a}):void a.split("|").forEach(function(a){var d="";if(-1!=a.indexOf(" ")){var e=a.split(/\s+/);a=e.pop(),e.forEach(function(a){var b=this.parseKeys(a),c=h[b.hashId]+b.key;d+=(d?" ":"")+c,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var f=this.parseKeys(a),g=h[f.hashId]+f.key;this._addCommandToBinding(d+g,b,c)},this):void 0},this._addCommandToBinding=function(a,b,c){var d,e=this.commandKeyBinding;b?!e[a]||this.$singleCommand?e[a]=b:(Array.isArray(e[a])?-1!=(d=e[a].indexOf(b))&&e[a].splice(d,1):e[a]=[e[a]],c||b.isDefault?e[a].unshift(b):e[a].push(b)):delete e[a]},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),"object"==typeof c&&(c.name||(c.name=b),this.addCommand(c))}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){this.bindKey(a.bindKey,a)},this.parseKeys=function(a){var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),d=f[c];if(f.FUNCTION_KEYS[d])c=f.FUNCTION_KEYS[d].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var e=0,g=b.length;g--;){var h=f.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;e|=h}return{key:c,hashId:e}},this.findKeyCommand=function(a,b){var c=h[a]+b;return this.commandKeyBinding[c]},this.handleKeyboard=function(a,b,c,d){var e=h[b]+c,f=this.commandKeyBinding[e];return a.$keyChain&&(a.$keyChain+=" "+e,f=this.commandKeyBinding[a.$keyChain]||f),!f||"chainKeys"!=f&&"chainKeys"!=f[f.length-1]?(a.$keyChain&&d>0&&(a.$keyChain=""),{command:f}):(a.$keyChain=a.$keyChain||e,{command:"null"})}}.call(d.prototype),b.HashHandler=d,b.MultiHashHandler=e}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../keyboard/hash_handler").MultiHashHandler,f=a("../lib/event_emitter").EventEmitter,g=function(a,b){e.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};d.inherits(g,e),function(){d.implement(this,f),this.exec=function(a,b,c){if(Array.isArray(a)){for(var d=a.length;d--;)if(this.exec(a[d],b,c))return!0;return!1}if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var e={editor:b,command:a,args:c};return e.returnValue=this._emit("exec",e),this._signal("afterExec",e),e.returnValue!==!1},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(g.prototype),b.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(a,b,c){"use strict";function d(a,b){return{win:a,mac:b}}var e=a("../lib/lang"),f=a("../config"),g=a("../range").Range;b.commands=[{name:"showSettingsMenu",bindKey:d("Ctrl-,","Command-,"),exec:function(a){f.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:d("Alt-E","Ctrl-E"),exec:function(a){f.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:d("Alt-Shift-E","Ctrl-Shift-E"),exec:function(a){f.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:d("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:d(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:d("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:d("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:d("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:d("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:d("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:d("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:d("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:d("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:d("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:d("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:d("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:d("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",bindKey:d("Ctrl-F","Command-F"),exec:function(a){f.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:d("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:d("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:d("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup",bindKey:d("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:d("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:d("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:d("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:d("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:d("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:d("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:d("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:d("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:d("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:d("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:d("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:d("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:d("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:d("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:d("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:d("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:d(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:d("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:d(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:d("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:d("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:d("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:d("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:d("Ctrl-P","Ctrl-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:d("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"passKeysToBrowser",bindKey:d("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:d("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:d("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:d("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:d("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:d("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:d("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:d("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:d("Ctrl-H","Command-Option-F"),exec:function(a){f.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:d("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:d("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:d("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:d("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:d("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:d("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:d("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:d("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:d("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?void a.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:d("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:d("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:d("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:d("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:d("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:d("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:d("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:d("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(a,b){a.insert(e.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:d(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:d("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:d("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:d("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:d("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var b=a.selection.getRange();b.start.column=b.end.column=0,b.end.row++,a.selection.setRange(b,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:d(null,null),exec:function(a){for(var b=a.selection.isBackwards(),c=b?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),d=b?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),f=a.session.doc.getLine(c.row).length,h=a.session.doc.getTextRange(a.selection.getRange()),i=h.replace(/\n\s*/," ").length,j=a.session.doc.getLine(c.row),k=c.row+1;k<=d.row+1;k++){var l=e.stringTrimLeft(e.stringTrimRight(a.session.doc.getLine(k)));0!==l.length&&(l=" "+l),j+=l}d.row+10?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+i)):(f=a.session.doc.getLine(c.row).length>f?f+1:f,a.selection.moveCursorTo(c.row,f))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:d(null,null),exec:function(a){var b=a.session.doc.getLength()-1,c=a.session.doc.getLine(b).length,d=a.selection.rangeList.ranges,e=[];d.length<1&&(d=[a.selection.getRange()]);for(var f=0;f=d.lastRow||c.end.row<=d.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==b.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=this.$mergeableCommands,d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a,b){if(a&&"string"==typeof a){this.$keybindingId=a;var c=this;r.loadModule(["keybinding",a],function(d){c.$keybindingId==a&&c.keyBinding.setKeyboardHandler(d&&d.handler),b&&b()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a),b&&b()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){var b=this.session;if(b){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,a?(this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(a)),this._signal("changeSession",{session:a,oldSession:b}),b&&b._signal("changeEditor",{oldEditor:this}),a&&a._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a,b){this.renderer.setTheme(a,b)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||e.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=b.findMatchingBracket(a.getCursorPosition());if(c)var d=new n(c.row,c.column,c.row,c.column+1);else if(b.$mode.getMatching)var d=b.$mode.getMatching(a.session);d&&(b.$bracketHighlight=b.addMarker(d,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=a.getCursorPosition(),d=new s(a.session,c.row,c.column),e=d.getCurrentToken();if(!e||-1===e.type.indexOf("tag-name"))return b.removeMarker(b.$tagHighlight),void(b.$tagHighlight=null);var f=e.value,g=0,h=d.stepBackward();if("<"==h.value){do h=e,e=d.stepForward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=0)}else{do e=h,h=d.stepBackward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=g);d.stepForward()}if(!e)return b.removeMarker(b.$tagHighlight),void(b.$tagHighlight=null);var i=d.getCurrentTokenRow(),j=d.getCurrentTokenColumn(),k=new n(i,j,i,j+e.value.length);b.$tagHighlight&&0!==k.compareRange(b.$backMarkers[b.$tagHighlight].range)&&(b.removeMarker(b.$tagHighlight),b.$tagHighlight=null),k&&!b.$tagHighlight&&(b.$tagHighlight=b.addMarker(k,"ace_bracket","text"))}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(a){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",a))},this.onBlur=function(a){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",a))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var b,c=a.data,d=c.range;b=d.start.row==d.end.row&&"insertLines"!=c.action&&"removeLines"!=c.action?d.end.row:1/0, -this.renderer.updateLines(d.start.row,b,this.session.$useWrapMode),this._signal("change",a),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var a,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(a=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(a=!1)),b.$highlightLineMarker&&!a)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&a){var c=new n(a.row,a.column,a.row,1/0);c.id=b.addMarker(c,"ace_active-line","screenLine"),b.$highlightLineMarker=c}else a&&(b.$highlightLineMarker.start.row=a.row,b.$highlightLineMarker.end.row=a.row,b.$highlightLineMarker.start.column=a.column,b._signal("changeBackMarker"))},this.onSelectionChange=function(a){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}var e=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(e),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){if(!this.$readOnly){var b={text:a};this._signal("paste",b),this.insert(b.text,!0)}},this.execCommand=function(a,b){return this.commands.exec(a,this,b)},this.insert=function(a,b){var c=this.session,d=c.getMode(),e=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var f=d.transformAction(c.getState(e.row),"insertion",this,c,a);f&&(a!==f.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=f.text)}if(" "==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var g=new n.fromPoints(e,e);g.end.column+=a.length,this.session.remove(g)}}else{var g=this.getSelectionRange();e=this.session.remove(g),this.clearSelection()}if("\n"==a||"\r\n"==a){var h=c.getLine(e.row);if(e.column>h.search(/\S|$/)){var i=h.substr(e.column).search(/\S|$/);c.doc.removeInLine(e.row,e.column,e.column+i)}}this.clearSelection();var j=e.column,k=c.getState(e.row),h=c.getLine(e.row),l=d.checkOutdent(k,h,a);if(c.insert(e,a),f&&f.selection&&this.selection.setSelectionRange(2==f.selection.length?new n(e.row,j+f.selection[0],e.row,j+f.selection[1]):new n(e.row+f.selection[0],f.selection[1],e.row+f.selection[2],f.selection[3])),c.getDocument().isNewLine(a)){var m=d.getNextLineIndent(k,h.slice(0,e.column),c.getTabString());c.insert({row:e.row+1,column:0},m)}l&&d.autoOutdent(k,c,e.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);if(0===b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var c,d,e=this.session.getLine(a.row);bb.toLowerCase()?1:0});for(var d=new n(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new n(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new n(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var a,b=this.$getSelectedRows();a=0===b.first||b.last+1=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(a.start.row),last:this.session.getRowFoldEnd(a.end.row)}},this.onCompositionStart=function(a){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):b===!1&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a,b){var c=this.getCursorPosition(),d=new s(this.session,c.row,c.column),e=d.getCurrentToken(),f=e||d.stepForward();if(f){var g,h,i=!1,j={},k=c.column-f.start,l={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(f.value.match(/[{}()\[\]]/g)){for(;k=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,c){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&d.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,c),f):(b.backwards?e.start=e.end:e.end=e.start,void this.selection.setRange(e))},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),b!==!1&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(a){if(a){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&(c.isFocused()||c.searchBox&&c.searchBox.isFocused())){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.topwindow.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(a)),b.isBlinking=!this.$readOnly&&"wide"!=a,e.setCssClass(b.element,"ace_slim-cursors",/slim/.test(a)))}}).call(t.prototype),r.defineOptions(t.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(a){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(a){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(a){this.setAutoScrollEditorIntoView(a)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),b.Editor=t}),ace.define("ace/undomanager",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.reset()};(function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(this.dirtyCounter--,b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(d.prototype),b.UndoManager=d}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/lang"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){e.implement(this,g),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a&&a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b=0;bg&&(p=f.end.row+1,f=b.getNextFoldLine(p,f),g=f?f.start.row:1/0),p>e){for(;this.$cells.length>o+1;)n=this.$cells.pop(),this.element.removeChild(n.element);break}n=this.$cells[++o],n||(n={element:null,textNode:null,foldWidget:null},n.element=d.createElement("div"),n.textNode=document.createTextNode(""),n.element.appendChild(n.textNode),this.element.appendChild(n.element),this.$cells[o]=n);var q="ace_gutter-cell ";i[p]&&(q+=i[p]),j[p]&&(q+=j[p]),this.$annotations[p]&&(q+=this.$annotations[p].className),n.element.className!=q&&(n.element.className=q);var r=b.getRowLength(p)*a.lineHeight+"px";if(r!=n.element.style.height&&(n.element.style.height=r),h){var s=h[p];null==s&&(s=h[p]=b.getFoldWidget(p))}if(s){n.foldWidget||(n.foldWidget=d.createElement("span"),n.element.appendChild(n.foldWidget));var q="ace_fold-widget ace_"+s;q+="start"==s&&p==g&&pc.right-b.right?"foldWidgets":void 0}}).call(h.prototype),b.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c];if(d.range){var e=d.range.clipRows(a.firstRow,a.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),d.renderer){var f=this.$getTop(e.start.row,a),g=this.$padding+e.start.column*a.characterWidth;d.renderer(b,e,g,f,a)}else"fullLine"==d.type?this.drawFullLineMarker(b,e,d.clazz,a):"screenLine"==d.type?this.drawScreenLineMarker(b,e,d.clazz,a):e.isMultiLine()?"text"==d.type?this.drawTextMarker(b,e,d.clazz,a):this.drawMultiLineMarker(b,e,d.clazz,a):this.drawSingleLineMarker(b,e,d.clazz+" ace_start",a)}else d.update(b,this,this.session,a)}this.element.innerHTML=b.join("")}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e,f){var g=b.start.row,h=new d(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,c+" ace_start",e,1,f),g=b.end.row,h=new d(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,c,e,0,f),g=b.start.row+1;g"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("
    "),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("
    "))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("
    ")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("
    ")},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("
    ")}}).call(f.prototype),b.Marker=f}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=(a("../lib/useragent"),a("../lib/event_emitter").EventEmitter),h=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){d.implement(this,g),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var a="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=a?(this.EOL_CHAR=a,!0):void 0},this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(a){this._signal("changeCharacterSize",a)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(a){this.session=a,a&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)b.push(this.showInvisibles?""+this.TAB_CHAR+f.stringRepeat(" ",c-1)+"":f.stringRepeat(" ",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide",e="",g="";if(this.showInvisibles){d+=" ace_invisible",e=" ace_invisible_space",g=" ace_invisible_tab";var h=f.stringRepeat(this.SPACE_CHAR,this.tabSize),i=this.TAB_CHAR+f.stringRepeat(" ",this.tabSize-1)}else var h=f.stringRepeat(" ",this.tabSize),i=h;this.$tabStrings[" "]=""+h+"",this.$tabStrings[" "]=""+i+""}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var d=Math.max(b,a.firstRow),e=Math.min(c,a.lastRow),f=this.element.childNodes,g=0,h=a.firstRow;d>h;h++){var i=this.session.getFoldLine(h);if(i){if(i.containsRow(d)){d=i.start.row;break}h=i.end.row}g++}for(var h=d,i=this.session.getNextFoldLine(h),j=i?i.start.row:1/0;h>j&&(h=i.end.row+1,i=this.session.getNextFoldLine(h,i),j=i?i.start.row:1/0),!(h>e);){var k=f[g++];if(k){var l=[];this.$renderLine(l,h,!this.$useLineGroups(),h==j?i:!1),k.style.height=a.lineHeight*this.session.getRowLength(h)+"px",k.innerHTML=l.join("")}h++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRowb.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var d=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),!(f>c);){var i=e.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",d.appendChild(i),i.style.height=a.lineHeight*this.session.getRowLength(f)+"px";else for(;i.firstChild;)d.appendChild(i.firstChild);f++}return d},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,d=a.lastRow,e=c,f=this.session.getNextFoldLine(e),g=f?f.start.row:1/0;e>g&&(e=f.end.row+1,f=this.session.getNextFoldLine(e,f),g=f?f.start.row:1/0),!(e>d);)this.$useLineGroups()&&b.push("
    "),this.$renderLine(b,e,!1,e==g?f:!1),this.$useLineGroups()&&b.push("
    "),e++;this.element.innerHTML=b.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g,h){if(c)return e.showInvisibles?""+f.stringRepeat(e.SPACE_CHAR,a.length)+"":f.stringRepeat(" ",a.length);if("&"==a)return"&";if("<"==a)return"<";if(" "==a){var i=e.session.getScreenTabSize(b+g);return b+=i-1,e.$tabStrings[i]}if(" "==a){var j=e.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k=e.showInvisibles?e.SPACE_CHAR:"";return b+=1,""+k+""}return d?""+e.SPACE_CHAR+"":(b+=1,""+a+"")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("",i,"")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(f.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):" "==b[0]?(a.push(f.stringRepeat(this.$tabStrings[" "],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("","
    "),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),c||a.push("
    ")},this.$getFoldLineTokens=function(a,b){function c(a,b,c){for(var d=0,f=0;f+a[d].value.lengthc-b&&(g=g.substring(0,c-b)),e.push({type:a[d].type,value:g}),f=b+g.length,d+=1}for(;c>f&&dc?{type:a[d].type,value:g.substring(0,c-f)}:a[d]),f+=g.length,d+=1}}var d=this.session,e=[],f=d.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?e.push({type:"fold",value:a}):(i&&(f=d.getTokens(b)),f.length&&c(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),e},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(h.prototype),b.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),void 0===d&&(d="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),e.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.visibility=a?"":"hidden"},this.$updateOpacity=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.opacity=a?"":"0"},this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a==this.smoothBlinking||d||(this.smoothBlinking=a,e.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.$updateCursors=(a?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var a=e.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,e.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,e.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&e.removeCssClass(this.element,"ace_smooth-blinking"),a(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){e.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),b()},this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<0)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?e.addCssClass(this.element,"ace_overwrite-cursors"):e.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(f.prototype),b.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=e.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,f.addListener(this.element,"scroll",this.onScroll.bind(this)),f.addListener(this.element,"mousedown",f.preventDefault)};(function(){d.implement(this,g),this.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a}}).call(h.prototype);var i=function(a,b){h.call(this,a),this.scrollTop=0,b.$scrollbarWidth=this.width=e.scrollbarWidth(a.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};d.inherits(i,h),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)}}.call(i.prototype);var j=function(a,b){h.call(this,a),this.scrollLeft=0,this.height=b.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};d.inherits(j,h),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollWidth=function(a){this.inner.style.width=a+"px"},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}.call(j.prototype),b.ScrollBar=i,b.ScrollBarV=i,b.ScrollBarH=j,b.VScrollBar=i,b.HScrollBar=j}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("./lib/event"),e=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};(function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending&&this.changes){this.pending=!0;var b=this;d.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}).call(e.prototype),b.RenderLoop=e}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=a("../lib/useragent"),h=a("../lib/event_emitter").EventEmitter,i=0,j=b.FontMetrics=function(a,b){this.el=e.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=e.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=e.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),i||this.$testFractionalRect(),this.$measureNode.innerHTML=f.stringRepeat("X",i),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){d.implement(this,h),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var a=e.createElement("div");this.$setMeasureNodeStyles(a.style),a.style.width="0.2px",document.documentElement.appendChild(a);var b=a.getBoundingClientRect().width;i=b>0&&1>b?50:100,a.parentNode.removeChild(a)},this.$setMeasureNodeStyles=function(a,b){a.width=a.height="auto",a.left=a.top="-100px",a.visibility="hidden",a.position="fixed",a.whiteSpace="pre",g.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=b?"hidden":"visible"},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===i){var a=null;try{a=this.$measureNode.getBoundingClientRect()}catch(b){a={width:0,height:0}}var c={height:a.height,width:a.width/i}}else var c={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/i};return 0===c.width||0===c.height?null:c},this.$measureCharWidth=function(a){this.$main.innerHTML=f.stringRepeat(a,i);var b=this.$main.getBoundingClientRect();return b.width/i},this.getCharacterWidth=function(a){var b=this.charSizes[a];return void 0===b&&(this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),b},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(j.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./config"),g=a("./lib/useragent"),h=a("./layer/gutter").Gutter,i=a("./layer/marker").Marker,j=a("./layer/text").Text,k=a("./layer/cursor").Cursor,l=a("./scrollbar").HScrollBar,m=a("./scrollbar").VScrollBar,n=a("./renderloop").RenderLoop,o=a("./layer/font_metrics").FontMetrics,p=a("./lib/event_emitter").EventEmitter,q='.ace_editor { position: relative; overflow: hidden; font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace; direction: ltr; } .ace_scroller { position: absolute; overflow: hidden; top: 0; bottom: 0; background-color: inherit; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; cursor: text; } .ace_content { position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; min-width: 100%; } .ace_dragging .ace_scroller:before{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; content: \'\'; background: rgba(250, 250, 250, 0.01); z-index: 1000; } .ace_dragging.ace_dark .ace_scroller:before{ background: rgba(0, 0, 0, 0.01); } .ace_selecting, .ace_selecting * { cursor: text !important; } .ace_gutter { position: absolute; overflow : hidden; width: auto; top: 0; bottom: 0; left: 0; cursor: default; z-index: 4; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } .ace_gutter-active-line { position: absolute; left: 0; right: 0; } .ace_scroller.ace_scroll-left { box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; } .ace_gutter-cell { padding-left: 19px; padding-right: 6px; background-repeat: no-repeat; } .ace_gutter-cell.ace_error { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_warning { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); background-position: 2px center; } .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); background-position: 2px center; } .ace_dark .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); } .ace_scrollbar { position: absolute; right: 0; bottom: 0; z-index: 6; } .ace_scrollbar-inner { position: absolute; cursor: text; left: 0; top: 0; } .ace_scrollbar-v{ overflow-x: hidden; overflow-y: scroll; top: 0; } .ace_scrollbar-h { overflow-x: scroll; overflow-y: hidden; left: 0; } .ace_print-margin { position: absolute; height: 100%; } .ace_text-input { position: absolute; z-index: 0; width: 0.5em; height: 1em; opacity: 0; background: transparent; -moz-appearance: none; appearance: none; border: none; resize: none; outline: none; overflow: hidden; font: inherit; padding: 0 1px; margin: 0 -1px; text-indent: -1em; -ms-user-select: text; -moz-user-select: text; -webkit-user-select: text; user-select: text; } .ace_text-input.ace_composition { background: inherit; color: inherit; z-index: 1000; opacity: 1; text-indent: 0; } .ace_layer { z-index: 1; position: absolute; overflow: hidden; white-space: pre; height: 100%; width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; pointer-events: none; } .ace_gutter-layer { position: relative; width: auto; text-align: right; pointer-events: auto; } .ace_text-layer { font: inherit !important; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; border-left: 2px solid } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_smooth-blinking .ace_cursor { -webkit-transition: opacity 0.18s; transition: opacity 0.18s; } .ace_editor.ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ace_line .ace_fold { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #FFF; background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1)); background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1)); border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; cursor: default; white-space: pre; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; } .ace_folding-enabled > .ace_gutter-cell { padding-right: 13px; } .ace_fold-widget { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { -webkit-transition: opacity 0.4s ease 0.05s; transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { -webkit-transition: opacity 0.05s ease 0.05s; transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } ';e.importCssString(q,"ace_editor");var r=function(a,b){var c=this;this.container=a||e.createElement("div"),this.$keepTextAreaAtCursor=!g.isOldIE,e.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content", -this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.$cursorLayer=new k(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(a){c.updateCharacterSize(),c.onResize(!0,c.gutterWidth,c.$size.width,c.$size.height),c._signal("changeCharacterSize",a)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),f.resetOptions(this),f._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=a,a&&this.scrollMargin.top&&a.getScrollTop()<=0&&a.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),a&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(a,b,c){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f|this.$changes,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){d-=this.$extraHeight||0;var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e|=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",e|=this.CHANGE_SCROLL),c&&(a||f.width!=c)&&(e|=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),f.$dirty=!c||!d,e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=e.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=e.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c+=this.gutterWidth,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.left=Math.min(c,this.$size.scrollerWidth-e)+"px",this.textarea.style.top=Math.min(b,this.$size.height-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,e.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-e.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){var a=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(a-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>a-b&&(a=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(a+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(a,b){if(this.$changes&&(a|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!a&&!b)return void(this.$changes|=a);if(this.$size.$dirty)return this.$changes|=a,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var c=this.layerConfig;if(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL){if(a|=this.$computeLayerConfig(),c.firstRow!=this.layerConfig.firstRow&&c.firstRowScreen==this.layerConfig.firstRowScreen){var d=this.scrollTop+(c.firstRow-this.layerConfig.firstRow)*this.lineHeight;d>0&&(this.scrollTop=d,a|=this.CHANGE_SCROLL,a|=this.$computeLayerConfig())}c=this.layerConfig,this.$updateScrollBarV(),a&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-c.offset+"px",this.content.style.marginTop=-c.offset+"px",this.content.style.width=c.width+2*this.$padding+"px",this.content.style.height=c.minHeight+"px"}return a&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):a&this.CHANGE_SCROLL?(a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(c):this.$textLayer.scrollLines(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(a&this.CHANGE_TEXT?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(c):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(c),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(c),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(c),void this._signal("afterRender"))},this.$autosize=function(){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a))+this.scrollMargin.v+(this.$extraHeight||0),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size,c=b.height<=2*this.lineHeight,d=this.session.getScreenLength(),e=d*this.lineHeight,f=this.scrollTop%this.lineHeight,g=b.scrollerHeight+this.lineHeight,h=this.$getLongestLine(),i=!c&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-h-2*this.$padding<0),j=this.$horizScroll!==i;j&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var k=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;e+=k,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,e-b.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,h+2*this.$padding-b.scrollerWidth+this.scrollMargin.right)));var l=!c&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-e+k<0||this.scrollTop),m=this.$vScroll!==l;m&&(this.$vScroll=l,this.scrollBarV.setVisible(l));var n,o,p=Math.ceil(g/this.lineHeight)-1,q=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),r=q+p,s=this.lineHeight;q=a.screenToDocumentRow(q,0);var t=a.getFoldLine(q);t&&(q=t.start.row),n=a.documentToScreenRow(q,0),o=a.getRowLength(q)*s,r=Math.min(a.screenToDocumentRow(r,0),a.getLength()-1),g=b.scrollerHeight+a.getRowLength(r)*s+o,f=this.scrollTop-n*s;var u=0;return this.layerConfig.width!=h&&(u=this.CHANGE_H_SCROLL),(j||m)&&(u=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),m&&(h=this.$getLongestLine())),this.layerConfig={width:h,padding:this.$padding,firstRow:q,firstRowScreen:n,lastRow:r,lineHeight:s,characterWidth:this.characterWidth,minHeight:g,maxHeight:e,offset:f,gutterOffset:Math.max(0,Math.ceil((f+b.height-b.scrollerHeight)/s)),height:this.$size.scrollerHeight},u},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||bf?(b&&(f-=b*this.$size.scrollerHeight),0===f&&(f=-this.scrollMargin.top),this.session.setScrollTop(f)):i+this.$size.scrollerHeight-he?(ec;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),d.session.$scrollTop=c,this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=(b+this.scrollTop-c.top)/this.lineHeight;return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){e.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){e.removeCssClass(this.container,"ace_focus")},this.showComposition=function(a){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,e.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(a){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(e.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function c(c){if(d.$themeId!=a)return b&&b();if(c.cssClass){e.importCssString(c.cssText,c.cssClass,d.container.ownerDocument),d.theme&&e.removeCssClass(d.container,d.theme.cssClass);var f="padding"in c?c.padding:"padding"in(d.theme||{})?4:d.$padding;d.$padding&&f!=d.$padding&&d.setPadding(f),d.$theme=c.cssClass,d.theme=c,e.addCssClass(d.container,c.cssClass),e.setCssClass(d.container,"ace_dark",c.isDark),d.$size&&(d.$size.width=0,d.$updateSizeAsync()),d._dispatchEvent("themeLoaded",{theme:c}),b&&b()}}var d=this;if(this.$themeId=a,d._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)c(a);else{var g=a||this.$options.theme.initialValue;f.loadModule(["theme",g],c)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(a,b){e.setCssClass(this.container,a,b!==!1)},this.unsetStyle=function(a){e.removeCssClass(this.container,a)},this.setCursorStyle=function(a){this.scroller.style.cursor!=a&&(this.scroller.style.cursor=a)},this.setMouseCursor=function(a){this.scroller.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(r.prototype),f.defineOptions(r.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){e.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},showLineNumbers:{set:function(a){this.$gutterLayer.setShowLineNumbers(a),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=e.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(a){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(a){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(a){this.updateFull()}},minLines:{set:function(a){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(a){this.setTheme(a)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),b.VirtualRenderer=r}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,b,d){"use strict";var e=a("../lib/oop"),f=a("../lib/net"),g=a("../lib/event_emitter").EventEmitter,h=a("../config"),i=function(b,d,e,f){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),h.get("packaged")||!a.toUrl)f=f||h.moduleUrl(d.id,"worker");else{var g=this.$normalizePath;f=f||g(a.toUrl("ace/worker/worker.js",null,"_"));var i={};b.forEach(function(b){i[b]=g(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var j=d.src,k=c(19),l=new k([j],{type:"application/javascript"}),m=(window.URL||window.webkitURL).createObjectURL(l);this.$worker=new Worker(m)}catch(n){if(!(n instanceof window.DOMException))throw n;var l=this.$workerBlob(f),o=window.URL||window.webkitURL,p=o.createObjectURL(l);this.$worker=new Worker(p),o.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:i,module:d.id,classname:e}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){e.implement(this,g),this.onMessage=function(a){var b=a.data;switch(b.type){case"event":this._signal(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id]);break;case"error":this.reportError(b.data);break;case"log":window.console&&console.log&&console.log.apply(console,b.data)}},this.reportError=function(a){window.console&&console.error&&console.error(a)},this.$normalizePath=function(a){return f.qualifyURL(a)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))},this.$workerBlob=function(a){var b="importScripts('"+f.qualifyURL(a)+"');";try{return new Blob([b],{type:"application/javascript"})}catch(c){var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,e=new d;return e.append(b),e.getBlob("application/javascript")}}}).call(i.prototype);var j=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var d=null,e=!1,f=Object.create(g),i=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){i.messageBuffer.push(a),d&&(e?setTimeout(j):j())},this.setEmitSync=function(a){e=a};var j=function(){var a=i.messageBuffer.shift();a.command?d[a.command].apply(d,a.args):a.event&&f._signal(a.event,a.data)};f.postMessage=function(a){i.onMessage({data:a})},f.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},f.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},h.loadModule(["worker",b],function(a){for(d=new a[c](f);i.messageBuffer.length;)j()})};j.prototype=i.prototype,b.UIWorkerClient=j,b.WorkerClient=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b,c){"use strict";var d=a("./range").Range,e=a("./lib/event_emitter").EventEmitter,f=a("./lib/oop"),g=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){f.implement(this,e),this.setup=function(){var a=this,b=this.doc,c=this.session,e=this.$pos;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=b.createAnchor(e.row,e.column),this.markerId=c.addMarker(new d(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){c.removeMarker(a.markerId),a.markerId=c.addMarker(new d(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),c.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new d(c.row,c.column,c.row,c.column+b.length),b.othersClass,null,!1),c.on("change",function(e){a.removeMarker(c.markerId),c.markerId=a.addMarker(new d(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a=this.pos.column&&c.start.column<=this.pos.column+this.length+1){var f=c.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={ -row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;ac;c++)a.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(g.prototype),b.PlaceHolder=g}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b,c){function d(a,b){return a.row==b.row&&a.column==b.column}function e(a){var b=a.domEvent,c=b.altKey,e=b.shiftKey,h=b.ctrlKey,i=a.getAccelKey(),j=a.getButton();if(h&&g.isMac&&(j=b.button),a.editor.inMultiSelectMode&&2==j)return void a.editor.textInput.onContextMenu(a.domEvent);if(!h&&!c&&!i)return void(0===j&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode());if(0===j){var k,l=a.editor,m=l.selection,n=l.inMultiSelectMode,o=a.getDocumentPosition(),p=m.getCursor(),q=a.inSelection()||m.isEmpty()&&d(o,p),r=a.x,s=a.y,t=function(a){r=a.clientX,s=a.clientY},u=l.session,v=l.renderer.pixelToScreenCoordinates(r,s),w=v;if(l.$mouseHandler.$enableJumpToDef)h&&c||i&&c?k="add":c&&(k="block");else if(i&&!c){if(k="add",!n&&e)return}else c&&(k="block");if(k&&g.isMac&&b.ctrlKey&&l.$mouseHandler.cancelContextMenu(),"add"==k){if(!n&&q)return;if(!n){var x=m.toOrientedRange();l.addSelectionMarker(x)}var y=m.rangeList.rangeAtPoint(o);l.$blockScrolling++,l.inVirtualSelectionMode=!0,e&&(y=null,x=m.ranges[0],l.removeSelectionMarker(x)),l.once("mouseup",function(){var a=m.toOrientedRange();y&&a.isEmpty()&&d(y.cursor,a.cursor)?m.substractPoint(a.cursor):(e?m.substractPoint(x.cursor):x&&(l.removeSelectionMarker(x),m.addRange(x)),m.addRange(a)),l.$blockScrolling--,l.inVirtualSelectionMode=!1})}else if("block"==k){a.stop(),l.inVirtualSelectionMode=!0;var z,A=[],B=function(){var a=l.renderer.pixelToScreenCoordinates(r,s),b=u.screenToDocumentPosition(a.row,a.column);d(w,a)&&d(b,m.lead)||(w=a,l.selection.moveToPosition(b),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(A),A=m.rectangularRangeBlock(w,v),l.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=l.$mouseHandler.$clickSelection.clone()),A.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers())};n&&!i?m.toSingleRange():!n&&i&&(z=m.toOrientedRange(),l.addSelectionMarker(z)),e?v=u.documentToScreenPosition(m.lead):m.moveToPosition(o),w={row:-1,column:-1};var C=function(a){clearInterval(E),l.removeSelectionMarkers(A),A.length||(A=[m.toOrientedRange()]),l.$blockScrolling++,z&&(l.removeSelectionMarker(z),m.toSingleRange(z));for(var b=0;b1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._signal("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:a}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)},this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=i.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),e=c.start.row,f=c.end.row;if(e==f){if(d)var g=c.end,h=c.start;else var g=c.start,h=c.end;return this.addRange(i.fromPoints(h,h)),void this.addRange(i.fromPoints(g,g))}var j=[],k=this.getLineRange(e,!0);k.start.column=c.start.column,j.push(k);for(var l=e+1;f>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(f,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=i.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),e=this.session.documentToScreenPosition(this.selectionAnchor),f=this.rectangularRangeBlock(d,e);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var d=[],f=a.columng&&(g=0),0>k&&(k=0),k==l&&(c=!0);for(var m=k;l>=m;m++){var n=i.fromPoints(this.session.screenToDocumentPosition(m,g),this.session.screenToDocumentPosition(m,h));if(n.isEmpty()){if(o&&e(n.end,o))break;var o=n.end}n.cursor=f?n.start:n.end,d.push(n)}if(j&&d.reverse(),!c){for(var p=d.length-1;d[p].isEmpty()&&p>0;)p--;if(p>0)for(var q=0;d[q].isEmpty();)q++;for(var r=p;r>=q;r--)d[r].isEmpty()&&d.splice(r,1)}return d}}.call(j.prototype);var r=a("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(a){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(a){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var d,e=c&&c.keepOrder,f=1==c||c&&c.$byLines,g=this.session,h=this.selection,i=h.rangeList,k=(e?h:i).ranges;if(!k.length)return a.exec?a.exec(this,b||{}):a(this,b||{});var l=h._eventRegistry;h._eventRegistry={};var m=new j(g);this.inVirtualSelectionMode=!0;for(var n=k.length;n--;){if(f)for(;n>0&&k[n].start.row==k[n-1].end.row;)n--;m.fromOrientedRange(k[n]),m.index=n,this.selection=g.selection=m;var o=a.exec?a.exec(this,b||{}):a(this,b||{});d||void 0===o||(d=o),m.toOrientedRange(k[n])}m.detach(),this.selection=g.selection=h,this.inVirtualSelectionMode=!1,h._eventRegistry=l,h.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;dd.length||c.length<2||!c[1])return this.commands.exec("insertstring",this,a);for(var e=d.length;e--;){var f=d[e];f.isEmpty()||this.session.remove(f),this.session.insert(f.start,c[e])}}},this.findAll=function(a,b,c){if(b=b||{},b.needle=a||b.needle,void 0==b.needle){var d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();b.needle=this.session.getTextRange(d)}this.$search.set(b);var e=this.$search.findAll(this.session);if(!e.length)return 0;this.$blockScrolling+=1;var f=this.multiSelect;c||f.toSingleRange(e[0]);for(var g=e.length;g--;)f.addRange(e[g],!0);return d&&f.rangeList.rangeAtPoint(d.start)&&f.addRange(d,!0),this.$blockScrolling-=1,e.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,e=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(e.column=this.selection.$desiredColumn);var f=this.session.screenToDocumentPosition(e.row+a,e.column);if(c.isEmpty())var g=f;else var h=this.session.documentToScreenPosition(d?c.end:c.start),g=this.session.screenToDocumentPosition(h.row+a,h.column);if(d){var j=i.fromPoints(f,g);j.cursor=j.start}else{var j=i.fromPoints(g,f);j.cursor=j.end}if(j.desiredColumn=e.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b,c){var e=this.session,f=e.multiSelect,g=f.toOrientedRange();if(!g.isEmpty()||(g=e.getWordRange(g.start.row,g.start.column),g.cursor=-1==a?g.start:g.end,this.multiSelect.addRange(g),!c)){var h=e.getTextRange(g),i=d(e,h,a);i&&(i.cursor=-1==a?i.start:i.end,this.$blockScrolling+=1,this.session.unfold(i),this.multiSelect.addRange(i),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),b&&this.multiSelect.substractPoint(g.cursor)}},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges,d=-1,e=c.filter(function(a){return a.cursor.row==d?!0:void(d=a.cursor.row)});if(c.length&&e.length!=c.length-1){e.forEach(function(a){b.substractPoint(a.cursor)});var f=0,g=1/0,h=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>f&&(f=c.column),g>e&&(g=e),e});c.forEach(function(b,c){var d=b.cursor,e=f-d.column,j=h[c]-g;e>j?a.insert(d,m.stringRepeat(" ",e-j)):a.remove(new i(d.row,d.column,d.row,d.column-e+j)),b.start.column=b.end.column=f,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var j=this.selection.getRange(),k=j.start.row,l=j.end.row,n=k==l;if(n){var o,p=this.session.getLength();do o=this.session.getLine(l);while(/[=:]/.test(o)&&++l0);0>k&&(k=0),l>=p&&(l=p-1)}var q=this.session.doc.removeLines(k,l);q=this.$reAlignText(q,n),this.session.doc.insert({row:k,column:0},q.join("\n")+"\n"),n||(j.start.column=0,j.end.column=q[q.length-1].length),this.selection.setRange(j)}},this.$reAlignText=function(a,b){function c(a){return m.stringRepeat(" ",a)}function d(a){return a[2]?c(g)+a[2]+c(h-a[2].length+i)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function e(a){return a[2]?c(g+h-a[2].length)+a[2]+c(i," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function f(a){return a[2]?c(g)+a[2]+c(i)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var g,h,i,j=!0,k=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==g?(g=b[1].length,h=b[2].length,i=b[3].length,b):(g+h+i!=b[1].length+b[2].length+b[3].length&&(k=!1),g!=b[1].length&&(j=!1),g>b[1].length&&(g=b[1].length),hb[3].length&&(i=b[3].length),b):[a]}).map(b?d:j?k?e:d:f)}}).call(r.prototype),b.onSessionChange=function(a){var b=a.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.off("addRange",this.$onAddRange),c.multiSelect.off("removeRange",this.$onRemoveRange),c.multiSelect.off("multiSelect",this.$onMultiSelect),c.multiSelect.off("singleSelect",this.$onSingleSelect),c.multiSelect.lead.off("change",this.$checkMultiselectChange),c.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=f,a("./config").defineOptions(r.prototype,"editor",{enableMultiselect:{set:function(a){f(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",k)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",k))},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=c||f.length,i=a.getLength(),j=b,k=b;++b=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new d(j,h,k,m)}}},this.openingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=a.getFoldWidget(h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),d.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e},h=a.$findOpeningBracket(b,g);return h?(h.column++,g.column--,d.fromPoints(h,g)):void 0}}).call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter { background: #f0f0f0; color: #333; } .ace-tm .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-tm .ace_fold { background-color: #6B72E6; } .ace-tm { background-color: #FFFFFF; color: black; } .ace-tm .ace_cursor { color: black; } .ace-tm .ace_invisible { color: rgb(191, 191, 191); } .ace-tm .ace_storage, .ace-tm .ace_keyword { color: blue; } .ace-tm .ace_constant { color: rgb(197, 6, 11); } .ace-tm .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-tm .ace_constant.ace_language { color: rgb(88, 92, 246); } .ace-tm .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-tm .ace_invalid { background-color: rgba(255, 0, 0, 0.1); color: red; } .ace-tm .ace_support.ace_function { color: rgb(60, 76, 114); } .ace-tm .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-tm .ace_support.ace_type, .ace-tm .ace_support.ace_class { color: rgb(109, 121, 222); } .ace-tm .ace_keyword.ace_operator { color: rgb(104, 118, 135); } .ace-tm .ace_string { color: rgb(3, 106, 7); } .ace-tm .ace_comment { color: rgb(76, 136, 107); } .ace-tm .ace_comment.ace_doc { color: rgb(0, 102, 255); } .ace-tm .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191); } .ace-tm .ace_constant.ace_numeric { color: rgb(0, 0, 205); } .ace-tm .ace_variable { color: rgb(49, 132, 149); } .ace-tm .ace_xml-pe { color: rgb(104, 104, 91); } .ace-tm .ace_entity.ace_name.ace_function { color: #0000A2; } .ace-tm .ace_heading { color: rgb(12, 7, 255); } .ace-tm .ace_list { color:rgb(185, 6, 144); } .ace-tm .ace_meta.ace_tag { color:rgb(0, 22, 142); } .ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0) } .ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-tm.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px white; border-radius: 2px; } .ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-tm .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-tm .ace_gutter-active-line { background-color : #dcdcdc; } .ace-tm .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-tm .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } ';var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(a,b,c){"use strict";function d(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var e=(a("./lib/oop"),a("./lib/dom"));a("./range").Range,function(){this.getRowLength=function(a){var b;return b=this.lineWidgets?this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:0,this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(b){b&&b.rowCount&&(a+=b.rowCount)}),a},this.$onChangeEditor=function(a){this.attach(a.editor)},this.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(a){var b=this.editor;if(b){this.editor=null,b.widgetManager=null,b.renderer.off("beforeRender",this.measureWidgets),b.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},this.updateOnChange=function(a){var b=this.session.lineWidgets;if(b){var c=a.data,d=c.range,e=d.start.row,f=d.end.row-e;if(0===f);else if("removeText"==c.action||"removeLines"==c.action){var g=b.splice(e+1,f);g.forEach(function(a){a&&this.removeLineWidget(a)},this),this.$updateRows()}else{var h=new Array(f);h.unshift(e,0),b.splice.apply(b,h),this.$updateRows()}}},this.$updateRows=function(){var a=this.session.lineWidgets;if(a){var b=!0;a.forEach(function(a,c){a&&(b=!1,a.row=c)}),b&&(this.session.lineWidgets=null)}},this.addLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[a.row]=a;var b=this.editor.renderer;return a.html&&!a.el&&(a.el=e.createElement("div"),a.el.innerHTML=a.html),a.el&&(e.addCssClass(a.el,"ace_lineWidgetContainer"),a.el.style.position="absolute",a.el.style.zIndex=5,b.container.appendChild(a.el),a._inDocument=!0),a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight||(a.pixelHeight=a.el.offsetHeight),null==a.rowCount&&(a.rowCount=a.pixelHeight/b.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,b),a},this.removeLineWidget=function(a){if(a._inDocument=!1,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(b){}this.session.lineWidgets&&(this.session.lineWidgets[a.row]=void 0),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},this.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(a,b){var c=this.session._changedWidgets,d=b.layerConfig;if(c&&c.length){for(var e=1/0,f=0;fh&&(h=0)),g.rowCount!=h&&(g.rowCount=h,g.row0&&!d[e];)e--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,b.$cursorLayer.config=c;for(var g=e;f>=g;g++){var h=d[g];if(h&&h.el){h._inDocument||(h._inDocument=!0,b.container.appendChild(h.el));var i=b.$cursorLayer.getPixelPosition({row:g,column:0},!0).top;h.coverLine||(i+=c.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=i-c.offset+"px";var j=h.coverGutter?0:b.gutterWidth;h.fixedWidth||(j-=b.scrollLeft),h.el.style.left=j+"px",h.fixedWidth?h.el.style.right=b.scrollBar.getWidth()+"px":h.el.style.right=""}}}}}.call(d.prototype),b.LineWidgets=d}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(a,b,c){"use strict";function d(a,b,c){for(var d=0,e=a.length-1;e>=d;){var f=d+e>>1,g=c(b,a[f]);if(g>0)d=f+1;else{if(!(0>g))return f;e=f-1}}return-(d+1)}function e(a,b,c){var e=a.getAnnotations().sort(h.comparePoints);if(e.length){var f=d(e,{row:b,column:-1},h.comparePoints);0>f&&(f=-f-1),f>=e.length-1?f=c>0?0:e.length-1:0===f&&0>c&&(f=e.length-1);var g=e[f];if(g&&c){if(g.row===b){do g=e[f+=c];while(g&&g.row===b);if(!g)return e.slice()}var i=[];b=g.row;do i[0>c?"unshift":"push"](g),g=e[f+=c];while(g&&g.row==b);return i.length&&i}}}var f=a("../line_widgets").LineWidgets,g=a("../lib/dom"),h=a("../range").Range;b.showErrorMarker=function(a,b){var c=a.session;c.widgetManager||(c.widgetManager=new f(c),c.widgetManager.attach(a));var d=a.getCursorPosition(),h=d.row,i=c.lineWidgets&&c.lineWidgets[h];i?i.destroy():h-=b;var j,k=e(c,h,b);if(k){var l=k[0];d.column=(l.pos&&"number"!=typeof l.column?l.pos.sc:l.column)||0,d.row=l.row,j=a.renderer.$gutterLayer.$annotations[d.row]}else{if(i)return;j={text:["Looks good!"],className:"ace_ok"}}a.session.unfold(d.row),a.selection.moveToPosition(d);var m={row:d.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div")},n=m.el.appendChild(g.createElement("div")),o=m.el.appendChild(g.createElement("div"));o.className="error_widget_arrow "+j.className;var p=a.renderer.$cursorLayer.getPixelPosition(d).left;o.style.left=p+a.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",n.className="error_widget "+j.className,n.innerHTML=j.text.join("
    "),n.appendChild(g.createElement("div"));var q=function(a,b,c){return 0!==b||"esc"!==c&&"return"!==c?void 0:(m.destroy(),{command:"null"})};m.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(q),c.widgetManager.removeLineWidget(m), -a.off("changeSelection",m.destroy),a.off("changeSession",m.destroy),a.off("mouseup",m.destroy),a.off("change",m.destroy))},a.keyBinding.addKeyboardHandler(q),a.on("changeSelection",m.destroy),a.on("changeSession",m.destroy),a.on("mouseup",m.destroy),a.on("change",m.destroy),a.session.widgetManager.addLineWidget(m),m.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight})},g.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; } ","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(a,b,c){"use strict";a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./multi_select"),a("./mode/folding/fold_mode"),a("./theme/textmate"),a("./ext/error_marker"),b.config=a("./config"),b.acequire=a,b.edit=function(a){if("string"==typeof a){var c=a;if(a=document.getElementById(c),!a)throw new Error("ace.edit can't find div #"+c)}if(a&&a.env&&a.env.editor instanceof f)return a.env.editor;var g="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;g=h.value,a=d.createElement("pre"),h.parentNode.replaceChild(a,h)}else g=d.getInnerText(a),a.innerHTML="";var j=b.createEditSession(g),k=new f(new i(a));k.setSession(j);var l={document:j,editor:k,onResize:k.resize.bind(k,null)};return h&&(l.textarea=h),e.addListener(window,"resize",l.onResize),k.on("destroy",function(){e.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),k.container.env=k.env=l,k},b.createEditSession=function(a,b){var c=new g(a,b);return c.setUndoManager(new h),c},b.EditSession=g,b.UndoManager=h}),function(){ace.acequire(["ace/ace"],function(a){a&&a.config.init(!0),window.ace||(window.ace=a);for(var b in a)a.hasOwnProperty(b)&&(window.ace[b]=a[b])})}(),a.exports=window.ace.acequire("ace/ace")},function(a,b,c){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};d.inherits(f,e),b.JsonHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(a,b,c){"use strict";var d,e=a("../../lib/oop"),f=a("../behaviour").Behaviour,g=a("../../token_iterator").TokenIterator,h=a("../../lib/lang"),i=["text","paren.rparen","punctuation.operator"],j=["text","paren.rparen","punctuation.operator","comment"],k={},l=function(a){var b=-1;return a.multiSelect&&(b=a.selection.index,k.rangeCount!=a.multiSelect.rangeCount&&(k={rangeCount:a.multiSelect.rangeCount})),k[b]?d=k[b]:void(d=k[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},m=function(){this.add("braces","insertion",function(a,b,c,e,f){var g=c.getCursorPosition(),i=e.doc.getLine(g.row);if("{"==f){l(c);var j=c.getSelectionRange(),k=e.doc.getTextRange(j);if(""!==k&&"{"!==k&&c.getWrapBehavioursEnabled())return{text:"{"+k+"}",selection:!1};if(m.isSaneInsertion(c,e))return/[\]\}\)]/.test(i[g.column])||c.inMultiSelectMode?(m.recordAutoInsert(c,e,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(c,e,"{"),{text:"{",selection:[1,1]})}else if("}"==f){l(c);var n=i.substring(g.column,g.column+1);if("}"==n){var o=e.$findOpeningBracket("}",{column:g.column+1,row:g.row});if(null!==o&&m.isAutoInsertedClosing(g,i,f))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==f||"\r\n"==f){l(c);var p="";m.isMaybeInsertedClosing(g,i)&&(p=h.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var n=i.substring(g.column,g.column+1);if("}"===n){var q=e.findMatchingBracket({row:g.row,column:g.column+1},"}");if(!q)return null;var r=this.$getIndent(e.getLine(q.row))}else{if(!p)return void m.clearMaybeInsertedClosing();var r=this.$getIndent(i)}var s=r+e.getTabString();return{text:"\n"+s+"\n"+r+p,selection:[1,s.length,1,s.length]}}m.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(a,b,c,e,f){var g=e.doc.getTextRange(f);if(!f.isMultiLine()&&"{"==g){l(c);var h=e.doc.getLine(f.start.row),i=h.substring(f.end.column,f.end.column+1);if("}"==i)return f.end.column++,f;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(a,b,c,d,e){if("("==e){l(c);var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(""!==g&&c.getWrapBehavioursEnabled())return{text:"("+g+")",selection:!1};if(m.isSaneInsertion(c,d))return m.recordAutoInsert(c,d,")"),{text:"()",selection:[1,1]}}else if(")"==e){l(c);var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(")"==j){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(null!==k&&m.isAutoInsertedClosing(h,i,e))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&"("==f){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(")"==h)return e.end.column++,e}}),this.add("brackets","insertion",function(a,b,c,d,e){if("["==e){l(c);var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(""!==g&&c.getWrapBehavioursEnabled())return{text:"["+g+"]",selection:!1};if(m.isSaneInsertion(c,d))return m.recordAutoInsert(c,d,"]"),{text:"[]",selection:[1,1]}}else if("]"==e){l(c);var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if("]"==j){var k=d.$findOpeningBracket("]",{column:h.column+1,row:h.row});if(null!==k&&m.isAutoInsertedClosing(h,i,e))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&"["==f){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if("]"==h)return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if('"'==e||"'"==e){l(c);var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(""!==h&&"'"!==h&&'"'!=h&&c.getWrapBehavioursEnabled())return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if("\\"==k)return null;for(var n,o=d.getTokens(g.start.row),p=0,q=-1,r=0;rq&&(q=n.value.indexOf(f)),!(n.value.length+p>g.start.column));r++)p+=o[r].value.length;if(!n||0>q&&"comment"!==n.type&&("string"!==n.type||g.start.column!==n.value.length+p-1&&n.value.lastIndexOf(f)===n.value.length-1)){if(!m.isSaneInsertion(c,d))return;return{text:f+f,selection:[1,1]}}if(n&&"string"===n.type){var s=j.substring(i.column,i.column+1);if(s==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&('"'==f||"'"==f)){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==f)return e.end.column++,e}})};m.isSaneInsertion=function(a,b){var c=a.getCursorPosition(),d=new g(b,c.row,c.column);if(!this.$matchTokenType(d.getCurrentToken()||"text",i)){var e=new g(b,c.row,c.column+1);if(!this.$matchTokenType(e.getCurrentToken()||"text",i))return!1}return d.stepForward(),d.getCurrentTokenRow()!==c.row||this.$matchTokenType(d.getCurrentToken()||"text",j)},m.$matchTokenType=function(a,b){return b.indexOf(a.type||a)>-1},m.recordAutoInsert=function(a,b,c){var e=a.getCursorPosition(),f=b.doc.getLine(e.row);this.isAutoInsertedClosing(e,f,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=e.row,d.autoInsertedLineEnd=c+f.substr(e.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(a,b,c){var e=a.getCursorPosition(),f=b.doc.getLine(e.row);this.isMaybeInsertedClosing(e,f)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=e.row,d.maybeInsertedLineStart=f.substr(0,e.column)+c,d.maybeInsertedLineEnd=f.substr(e.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(a,b,c){return d.autoInsertedBrackets>0&&a.row===d.autoInsertedRow&&c===d.autoInsertedLineEnd[0]&&b.substr(a.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(a,b){return d.maybeInsertedBrackets>0&&a.row===d.maybeInsertedRow&&b.substr(a.column)===d.maybeInsertedLineEnd&&b.substr(0,a.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},e.inherits(m,f),b.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c,d){var e=a.getLine(c),f=e.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length,1);return h&&!h.isMultiLine()&&(d?h=this.getSectionRange(a,c):"all"!=b&&(h=null)),h}if("markbegin"!==b){var f=e.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;return f[1]?this.closingBracketBlock(a,f[1],c,g):a.getCommentFoldRange(c,g,-1)}}},this.getSectionRange=function(a,b){var c=a.getLine(b),d=c.search(/\S/),f=b,g=c.length;b+=1;for(var h=b,i=a.getLength();++bj)break;var k=this.getFoldWidgetRange(a,"all",b);if(k){if(k.start.row<=f)break;if(k.isMultiLine())b=k.end.row;else if(d==j)break}h=b}}return new e(f,g,h,a.getLine(h).length)}}.call(g.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(a,b,d){"use strict";var e=a("../lib/oop"),f=a("./text").Mode,g=a("./json_highlight_rules").JsonHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=a("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=g,this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};e.inherits(l,f),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b);if("start"==a){var e=b.match(/^.*[\{\(\[]\s*$/);e&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new k(["ace"],c(17),"JsonWorker");return b.attachToDocument(a.getDocument()),b.on("error",function(b){a.setAnnotations([b.data])}),b.on("ok",function(){a.clearAnnotations()}),b},this.$id="ace/mode/json"}.call(l.prototype),b.Mode=l})},function(a,b,c){ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/lang"),f=a("../lib/event"),g=" .ace_search { background-color: #ddd; border: 1px solid #cbcbcb; border-top: 0 none; max-width: 325px; overflow: hidden; margin: 0; padding: 4px; padding-right: 6px; padding-bottom: 0; position: absolute; top: 0px; z-index: 99; white-space: normal; } .ace_search.left { border-left: 0 none; border-radius: 0px 0px 5px 0px; left: 0; } .ace_search.right { border-radius: 0px 0px 0px 5px; border-right: 0 none; right: 0; } .ace_search_form, .ace_replace_form { border-radius: 3px; border: 1px solid #cbcbcb; float: left; margin-bottom: 4px; overflow: hidden; } .ace_search_form.ace_nomatch { outline: 1px solid red; } .ace_search_field { background-color: white; border-right: 1px solid #cbcbcb; border: 0 none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; height: 22px; outline: 0; padding: 0 7px; width: 214px; margin: 0; } .ace_searchbtn, .ace_replacebtn { background: #fff; border: 0 none; border-left: 1px solid #dcdcdc; cursor: pointer; float: left; height: 22px; margin: 0; padding: 0; position: relative; } .ace_searchbtn:last-child, .ace_replacebtn:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } .ace_searchbtn:disabled { background: none; cursor: default; } .ace_searchbtn { background-position: 50% 50%; background-repeat: no-repeat; width: 27px; } .ace_searchbtn.prev { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); } .ace_searchbtn.next { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); } .ace_searchbtn_close { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0; border-radius: 50%; border: 0 none; color: #656565; cursor: pointer; float: right; font: 16px/16px Arial; height: 14px; margin: 5px 1px 9px 5px; padding: 0; text-align: center; width: 14px; } .ace_searchbtn_close:hover { background-color: #656565; background-position: 50% 100%; color: white; } .ace_replacebtn.prev { width: 54px } .ace_replacebtn.next { width: 27px } .ace_button { margin-left: 2px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; opacity: 0.7; border: 1px solid rgba(100,100,100,0.23); padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; color: black; } .ace_button:hover { background-color: #eee; opacity:1; } .ace_button:active { background-color: #ddd; } .ace_button.checked { border-color: #3399ff; opacity:1; } .ace_search_options{ margin-bottom: 3px; text-align: right; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; }",h=a("../keyboard/hash_handler").HashHandler,i=a("../lib/keys");d.importCssString(g,"ace_searchbox");var j=''.replace(/>\s+/g,">"),k=function(a,b,c){var e=d.createElement("div");e.innerHTML=j,this.element=e.firstChild,this.$init(),this.setEditor(a)};(function(){this.setEditor=function(a){a.searchBox=this,a.container.appendChild(this.element),this.editor=a},this.$initElements=function(a){this.searchBox=a.querySelector(".ace_search_form"),this.replaceBox=a.querySelector(".ace_replace_form"),this.searchOptions=a.querySelector(".ace_search_options"),this.regExpOption=a.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=a.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=a.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var a=this.element;this.$initElements(a);var b=this;f.addListener(a,"mousedown",function(a){setTimeout(function(){b.activeInput.focus()},0),f.stopPropagation(a)}),f.addListener(a,"click",function(a){var c=a.target||a.srcElement,d=c.getAttribute("action");d&&b[d]?b[d]():b.$searchBarKb.commands[d]&&b.$searchBarKb.commands[d].exec(b),f.stopPropagation(a)}),f.addCommandKeyListener(a,function(a,c,d){var e=i.keyCodeToString(d),g=b.$searchBarKb.findKeyCommand(c,e);g&&g.exec&&(g.exec(b),f.stopEvent(a))}),this.$onChange=e.delayedCall(function(){b.find(!1,!1)}),f.addListener(this.searchInput,"input",function(){b.$onChange.schedule(20)}),f.addListener(this.searchInput,"focus",function(){b.activeInput=b.searchInput,b.searchInput.value&&b.highlight()}),f.addListener(this.replaceInput,"focus",function(){b.activeInput=b.replaceInput,b.searchInput.value&&b.highlight()})},this.$closeSearchBarKb=new h([{bindKey:"Esc",name:"closeSearchBar",exec:function(a){a.searchBox.hide()}}]),this.$searchBarKb=new h,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(a){var b=a.isReplace=!a.isReplace;a.replaceBox.style.display=b?"":"none",a[b?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(a){a.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(a){a.findPrev()},esc:function(a){setTimeout(function(){a.hide()})},Return:function(a){a.activeInput==a.replaceInput&&a.replace(),a.findNext()},"Shift-Return":function(a){a.activeInput==a.replaceInput&&a.replace(),a.findPrev()},"Alt-Return":function(a){a.activeInput==a.replaceInput&&a.replaceAll(),a.findAll()},Tab:function(a){(a.activeInput==a.replaceInput?a.searchInput:a.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(a){a.regExpOption.checked=!a.regExpOption.checked,a.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(a){a.caseSensitiveOption.checked=!a.caseSensitiveOption.checked,a.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(a){a.wholeWordOption.checked=!a.wholeWordOption.checked,a.$syncOptions()}}]),this.$syncOptions=function(){d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(a){this.editor.session.highlight(a||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(a,b){var c=this.editor.find(this.searchInput.value,{skipCurrent:a,backwards:b,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),e=!c&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var a=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),b=!a&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(a,b){this.element.style.display="",this.replaceBox.style.display=b?"":"none",this.isReplace=b,a&&(this.searchInput.value=a),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var a=document.activeElement;return a==this.searchInput||a==this.replaceInput}}).call(k.prototype),b.SearchBox=k,b.Search=function(a,b){var c=a.searchBox||new k(a);c.show(a.session.getTextRange(),b)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(a,b,c){a.exports.id="ace/mode/json_worker",a.exports.src='"no use strict";(function(window){if(void 0===window.window||!window.document){window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console,window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;var chunks=id.split("/");if(!window.acequire.tlns)return console.log("unable to load "+id);chunks[0]=window.acequire.tlns[chunks[0]]||chunks[0];var path=chunks.join("/")+".js";return window.acequire.id=id,importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},window.initBaseUrls=function initBaseUrls(topLevelNamespaces){acequire.tlns=topLevelNamespaces},window.initSender=function initSender(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.command){if(!main[msg.command])throw Error("Unknown command:"+msg.command);main[msg.command].apply(main,msg.args)}else if(msg.init){initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}else msg.event&&sender&&sender._signal(msg.event,msg.data)}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var delta=e.data,range=delta.range;if(!(range.start.row==range.end.row&&range.start.row!=this.row||range.start.row>this.row||range.start.row==this.row&&range.start.column>this.column)){var row=this.row,column=this.column,start=range.start,end=range.end;"insertText"===delta.action?start.row===row&&column>=start.column?start.column===column&&this.$insertRight||(start.row===end.row?column+=end.column-start.column:(column-=start.column,row+=end.row-start.row)):start.row!==end.row&&row>start.row&&(row+=end.row-start.row):"insertLines"===delta.action?start.row===row&&0===column&&this.$insertRight||row>=start.row&&(row+=end.row-start.row):"removeText"===delta.action?start.row===row&&column>start.column?column=end.column>=column?start.column:Math.max(0,column-(end.column-start.column)):start.row!==end.row&&row>start.row?(end.row===row&&(column=Math.max(0,column-end.column)+start.column),row-=end.row-start.row):end.row===row&&(row-=end.row-start.row,column=Math.max(0,column-end.column)+start.column):"removeLines"==delta.action&&row>=start.row&&(row>=end.row?row-=end.row-start.row:(row=start.row,column=0)),this.setPosition(row,column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(text){this.$lines=[],0===text.length?this.$lines=[""]:Array.isArray(text)?this._insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.getLine(range.start.row).substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row,range.end.row);lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;return range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this._insertLines(position.row,lines),position=this.insertInLine(position,lastLine||"")),position},this.insertLines=function(row,lines){return row>=this.getLength()?this.insert({row:row,column:0},"\\n"+lines.join("\\n")):this._insertLines(Math.max(row,0),lines)},this._insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};for(;lines.length>61440;){var end=this._insertLines(row,lines.slice(0,61440));lines=lines.slice(61440),row=end.row}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:"insertLines",range:range,lines:lines};return this._signal("change",{data:delta}),range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:"insertText",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._signal("change",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:"insertText",range:Range.fromPoints(position,end),text:text};return this._signal("change",{data:delta}),end},this.remove=function(range){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),range.start=this.$clipPosition(range.start),range.end=this.$clipPosition(range.end),range.isEmpty())return range.start;var firstRow=range.start.row,lastRow=range.end.row;if(range.isMultiLine()){var firstFullRow=0==range.start.column?firstRow:firstRow+1,lastFullRow=lastRow-1;range.end.column>0&&this.removeInLine(lastRow,0,range.end.column),lastFullRow>=firstFullRow&&this._removeLines(firstFullRow,lastFullRow),firstFullRow!=firstRow&&(this.removeInLine(firstRow,range.start.column,this.getLine(firstRow).length),this.removeNewLine(range.start.row))}else this.removeInLine(firstRow,range.start.column,range.end.column);return range.start},this.removeInLine=function(row,startColumn,endColumn){if(startColumn!=endColumn){var range=new Range(row,startColumn,row,endColumn),line=this.getLine(row),removed=line.substring(startColumn,endColumn),newLine=line.substring(0,startColumn)+line.substring(endColumn,line.length);this.$lines.splice(row,1,newLine);var delta={action:"removeText",range:range,text:removed};return this._signal("change",{data:delta}),range.start}},this.removeLines=function(firstRow,lastRow){return 0>firstRow||lastRow>=this.getLength()?this.remove(new Range(firstRow,0,lastRow+1,0)):this._removeLines(firstRow,lastRow)},this._removeLines=function(firstRow,lastRow){var range=new Range(firstRow,0,lastRow+1,0),removed=this.$lines.splice(firstRow,lastRow-firstRow+1),delta={action:"removeLines",range:range,nl:this.getNewLineCharacter(),lines:removed};return this._signal("change",{data:delta}),removed},this.removeNewLine=function(row){var firstLine=this.getLine(row),secondLine=this.getLine(row+1),range=new Range(row,firstLine.length,row+1,0),line=firstLine+secondLine;this.$lines.splice(row,2,line);var delta={action:"removeText",range:range,text:this.getNewLineCharacter()};this._signal("change",{data:delta})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0==text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;if(this.remove(range),text)var end=this.insert(range.start,text);else end=range.start;return end},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this.insertLines(range.start.row,delta.lines):"insertText"==delta.action?this.insert(range.start,delta.text):"removeLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"removeText"==delta.action&&this.remove(range)}},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"insertText"==delta.action?this.remove(range):"removeLines"==delta.action?this._insertLines(range.start.row,delta.lines):"removeText"==delta.action&&this.insert(range.start,delta.text)}},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function(obj){if("object"!=typeof obj||!obj)return obj;var cons=obj.constructor;if(cons===RegExp)return obj;var copy=cons();for(var key in obj)copy[key]="object"==typeof obj[key]?exports.deepCopy(obj[key]):obj[key];return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue();try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);return this.sender.emit("error",{row:pos.row,column:pos.column,text:e.message,type:"error"}),void 0}this.sender.emit("ok")}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;\nfor(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=" \\n\x0B\\f\\r   ᠎              \\u2028\\u2029";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'; +break;case"filter.processors.edges":b[c].processor=Processors.edges;break;case"filter.processors.neighbors":b[c].processor=Processors.neighbors;break;default:throw"Unknown processor "+b[c].processor}}return _chain=b,this};var filter=null;sigma.plugins.filter=function(a){return filter||(filter=new Filter(a)),filter}}.call(this),function(a){"use strict";function b(b,c,d){if(sigma.classes.dispatcher.extend(this),sigma.renderers.webgl&&c instanceof sigma.renderers.webgl)throw new Error("The sigma.plugins.lasso is not compatible with the WebGL renderer");this.sigmaInstance=b,this.renderer=c,this.drawingCanvas=a,this.drawingContext=a,this.drewPoints=[],this.selectedNodes=[],this.isActive=!1,this.isDrawing=!1,f=document.body,this.settings=new sigma.classes.configurable({strokeStyle:"black",lineWidth:2,fillWhileDrawing:!1,fillStyle:"rgba(200, 200, 200, 0.25)",cursor:"crosshair"},d||{})}function c(a){var b=this.drawingCanvas.getBoundingClientRect();this.isActive&&(this.isDrawing=!0,this.drewPoints=[],this.selectedNodes=[],this.sigmaInstance.refresh(),this.drewPoints.push({x:a.clientX-b.left,y:a.clientY-b.top}),this.drawingCanvas.style.cursor=this.settings("cursor"),a.stopPropagation())}function d(a){if(this.isActive&&this.isDrawing){var b=0,c=0,d=this.drawingCanvas.getBoundingClientRect();switch(a.type){case"touchmove":b=a.touches[0].clientX,c=a.touches[0].clientY;break;default:b=a.clientX,c=a.clientY}this.drewPoints.push({x:b-d.left,y:c-d.top}),this.drawingContext.lineWidth=this.settings("lineWidth"),this.drawingContext.strokeStyle=this.settings("strokeStyle"),this.drawingContext.fillStyle=this.settings("fillStyle"),this.drawingContext.lineJoin="round",this.drawingContext.lineCap="round",this.drawingContext.clearRect(0,0,this.drawingContext.canvas.width,this.drawingContext.canvas.height);var e=this.drewPoints[0],f=this.drewPoints[1],g=this.drewPoints.length,h=function(a,b){return{x:a.x+(b.x-a.x)/2,y:a.y+(b.y-a.y)/2}};this.drawingContext.beginPath(),this.drawingContext.moveTo(e.x,e.y);for(var i=1;g>i;i++){var j=h(e,f);this.drawingContext.quadraticCurveTo(e.x,e.y,j.x,j.y),e=this.drewPoints[i],f=this.drewPoints[i+1]}this.drawingContext.lineTo(e.x,e.y),this.drawingContext.stroke(),this.settings("fillWhileDrawing")&&this.drawingContext.fill(),a.stopPropagation()}}function e(a){if(this.isActive&&this.isDrawing){this.isDrawing=!1;for(var b=this.renderer.nodesOnScreen,c=b.length,d=this.renderer.options.prefix||"";c--;){var e=b[c],f=e[d+"x"],g=e[d+"y"];this.drawingContext.isPointInPath(f,g)&&!e.hidden&&this.selectedNodes.push(e)}this.dispatchEvent("selectedNodes",this.selectedNodes),this.drawingContext.clearRect(0,0,this.drawingCanvas.width,this.drawingCanvas.height),this.drawingCanvas.style.cursor=this.settings("cursor"),a.stopPropagation()}}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins");var f=a,g={};b.prototype.clear=function(){return this.deactivate(),this.sigmaInstance=a,this.renderer=a,this},b.prototype.activate=function(){return this.sigmaInstance&&!this.isActive&&(this.isActive=!0,this.renderer.domElements.lasso||(this.renderer.initDOM("canvas","lasso"),this.drawingCanvas=this.renderer.domElements.lasso,this.drawingCanvas.width=this.renderer.container.offsetWidth,this.drawingCanvas.height=this.renderer.container.offsetHeight,this.renderer.container.appendChild(this.drawingCanvas),this.drawingContext=this.drawingCanvas.getContext("2d"),this.drawingCanvas.style.cursor=this.settings("cursor")),h.apply(this)),this},b.prototype.deactivate=function(){return this.sigmaInstance&&this.isActive&&(this.isActive=!1,this.isDrawing=!1,i.apply(this),this.renderer.domElements.lasso&&(this.renderer.container.removeChild(this.renderer.domElements.lasso),delete this.renderer.domElements.lasso,this.drawingCanvas.style.cursor="",this.drawingCanvas=a,this.drawingContext=a,this.drewPoints=[])),this};var h=function(){this.drawingCanvas.addEventListener("mousedown",c.bind(this)),f.addEventListener("mousemove",d.bind(this)),f.addEventListener("mouseup",e.bind(this)),this.drawingCanvas.addEventListener("touchstart",c.bind(this)),f.addEventListener("touchmove",d.bind(this)),f.addEventListener("touchcancel",e.bind(this)),f.addEventListener("touchleave",e.bind(this)),f.addEventListener("touchend",e.bind(this))},i=function(){this.drawingCanvas.removeEventListener("mousedown",c.bind(this)),f.removeEventListener("mousemove",d.bind(this)),f.removeEventListener("mouseup",e.bind(this)),this.drawingCanvas.removeEventListener("touchstart",c.bind(this)),this.drawingCanvas.removeEventListener("touchmove",d.bind(this)),f.removeEventListener("touchcancel",e.bind(this)),f.removeEventListener("touchleave",e.bind(this)),f.removeEventListener("touchend",e.bind(this))};b.prototype.getSelectedNodes=function(){return this.selectedNodes},sigma.plugins.lasso=function(a,c,d){return g[a.id]||(g[a.id]=new b(a,c,d)),a.bind("kill",function(){g[a.id]instanceof b&&(g[a.id].clear(),delete g[a.id])}),g[a.id]}}.call(this),function(a){"use strict";function b(){var a=this;this.init=function(a,b){if(b=b||{},this.sigInst=a,this.config=sigma.utils.extend(b,c),this.easing=b.easing,this.duration=b.duration,b.nodes&&(this.nodes=b.nodes,delete b.nodes),!sigma.plugins||"undefined"==typeof sigma.plugins.animate)throw new Error("sigma.plugins.animate is not declared");this.running=!1},this.atomicGo=function(){if(!this.running||this.iterCount<1)return!1;var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w=this.nodes||this.sigInst.graph.nodes(),x=w.length,y=1/0,z=-(1/0),A=1/0,B=-(1/0);for(this.iterCount--,this.running=!1,b=0;x>b;b++)c=w[b],c.dn.dx=0,c.dn.dy=0,y=Math.min(y,c.dn_x-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),z=Math.max(z,c.dn_x+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),A=Math.min(A,c.dn_y-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin)),B=Math.max(B,c.dn_y+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin));for(e=z-y,f=B-A,g=(y+z)/2,h=(A+B)/2,y=g-a.config.permittedExpansion*e/2,z=g+a.config.permittedExpansion*e/2,A=h-a.config.permittedExpansion*f/2,B=h+a.config.permittedExpansion*f/2,i={},j=0;jb;b++)for(c=w[b],s=c.dn_x-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),t=c.dn_x+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),u=c.dn_y-(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),v=c.dn_y+(c.dn_size*a.config.scaleNodes+a.config.nodeMargin),l=Math.floor(a.config.gridSize*(s-y)/(z-y)),m=Math.floor(a.config.gridSize*(t-y)/(z-y)),n=Math.floor(a.config.gridSize*(u-A)/(B-A)),o=Math.floor(a.config.gridSize*(v-A)/(B-A)),k=l;m>=k;k++)for(j=n;o>=j;j++)i[j][k].push(c.id);for(p={},j=0;jb;b++)d=w[b],p[d.id].forEach(function(b){var c=a.sigInst.graph.nodes(b),g=c.dn_x-d.dn_x,h=c.dn_y-d.dn_y,i=Math.sqrt(g*g+h*h),j=i0?(c.dn.dx+=g/i*(1+d.dn_size),c.dn.dy+=h/i*(1+d.dn_size)):(c.dn.dx+=.01*e*(.5-Math.random()),c.dn.dy+=.01*f*(.5-Math.random())))});for(b=0;x>b;b++)c=w[b],c.fixed||(c.dn_x=c.dn_x+.1*c.dn.dx*a.config.speed,c.dn_y=c.dn_y+.1*c.dn.dy*a.config.speed);return this.running&&this.iterCount<1&&(this.running=!1),this.running},this.go=function(){for(this.iterCount=this.config.maxIterations;this.running;)this.atomicGo();this.stop()},this.start=function(){if(!this.running){var b=this.sigInst.graph.nodes(),c=this.sigInst.renderers[a.config.rendererIndex].options.prefix;this.running=!0;for(var d=0;d0;var o=Math.sqrt(this.config.area)/10,p=Math.sqrt(this.config.area/(1+m));for(b=0;m>b;b++)for(d=k[b],d.fr||(d.fr_x=d.x,d.fr_y=d.y,d.fr={dx:0,dy:0}),c=0;m>c;c++)e=k[c],d.id!=e.id&&(g=d.fr_x-e.fr_x,h=d.fr_y-e.fr_y,i=Math.sqrt(g*g+h*h)+.01,i>0&&(j=p*p/i,d.fr.dx+=g/i*j,d.fr.dy+=h/i*j));var q,r,s;for(b=0;n>b;b++)f=l[b],q=a.sigInst.graph.nodes(f.source),r=a.sigInst.graph.nodes(f.target),g=q.fr_x-r.fr_x,h=q.fr_y-r.fr_y,i=Math.sqrt(g*g+h*h)+.01,s=i*i/p,i>0&&(q.fr.dx-=g/i*s,q.fr.dy-=h/i*s,r.fr.dx+=g/i*s,r.fr.dy+=h/i*s);var t,u,v;for(b=0;m>b;b++)d=k[b],t=Math.sqrt(d.fr_x*d.fr_x+d.fr_y*d.fr_y),u=.01*p*a.config.gravity*t,d.fr.dx-=u*d.fr_x/t,d.fr.dy-=u*d.fr_y/t,d.fr.dx*=a.config.speed,d.fr.dy*=a.config.speed,d.fixed||(g=d.fr.dx,h=d.fr.dy,i=Math.sqrt(g*g+h*h),i>0&&(v=Math.min(o*a.config.speed,i),d.fr_x+=g/i*v,d.fr_y+=h/i*v));return this.running},this.go=function(){for(this.iterCount=this.config.iterations;this.running;)this.atomicGo();this.stop()},this.start=function(){if(!this.running){var b=this.sigInst.graph.nodes();this.running=!0;for(var c=0;ch;++h)g[h]=e.charCodeAt(h);return new Blob([g],{type:d})}function c(a,c,d){if(d=d||"graph."+c,navigator.msSaveOrOpenBlob)navigator.msSaveOrOpenBlob(b(a),d);else if(navigator.msSaveBlob)navigator.msSaveBlob(b(a),d);else{var e=document.createElement("a");e.setAttribute("href",a),e.setAttribute("download",d),document.body.appendChild(e),e.click(),document.body.removeChild(e)}}function d(a,b,c){var d=Math.min(c/a,c/b);return{width:a*d,height:b*d}}function e(a,b,c){var d;return d=sigma.utils.getBoundaries(a.graph,b.camera.readPrefix),d.minX/=c.zoomRatio,d.minY/=c.zoomRatio,d.maxX/=c.zoomRatio,d.maxY/=c.zoomRatio,d}function f(a,b,c){var f,g=c.margin||0,h={width:b.width,height:b.height};return c.clips||c.size?c.size&&c.size>=1&&(h=d(b.width,b.height,c.size)):(f=e(a,b,c),h={width:f.maxX-f.minX+2*f.sizeMax,height:f.maxY-f.minY+2*f.sizeMax}),h.width+=g,h.height+=g,h}function g(a,b,d){if(d=d||{},d.format&&!(d.format in i))throw Error('sigma.renderers.image: unsupported format "'+d.format+'".');var e=f(a,b,d),g=a.settings("batchEdgesDrawing");g&&a.settings("batchEdgesDrawing",!1),d.clip||this.clone(a,d,e);var h=this.draw(b,d,e);a.settings("batchEdgesDrawing",g);var j=h.toDataURL(i[d.format||"png"]);return d.download&&c(j,d.format||"png",d.filename),j}if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.plugins");var h,i,j,k;h=["scene","edges","nodes","labels"],i={png:"image/png",jpg:"image/jpeg",gif:"image/gif",tiff:"image/tiff"},g.prototype.clone=function(a,b,c){b.tmpContainer=b.tmpContainer||"image-container";var d=sigma.utils.getPixelRatio(),e=a.settings("webglOversamplingRatio"),f=document.getElementById(b.tmpContainer);f||(f=document.createElement("div"),f.id=b.tmpContainer,document.body.appendChild(f)),f.setAttribute("style","width:"+Math.round(c.width/d)+"px;height:"+Math.round(c.height/d)+"px;");var g=a.addRenderer({container:document.getElementById(b.tmpContainer),type:"canvas",settings:{batchEdgesDrawing:!0,drawLabels:!!b.labels}});g.camera.ratio=b.zoomRatio>0?b.zoomRatio:1,b.size||(g.camera.ratio*=d);var i=g instanceof sigma.renderers.webgl,l=!1,m=[];j=document.createElement("canvas"),k=j.getContext("2d"),a.refresh(),h.forEach(function(a){if(g.contexts[a]&&(b.labels!==!1||"labels"!==a)){var d=g.domElements[a]||g.domElements.scene,f=g.contexts[a];l||(j.width=c.width,j.height=c.height,i&&f instanceof WebGLRenderingContext&&(j.width/=e,j.height/=e),l=!0),f instanceof WebGLRenderingContext?k.drawImage(d,0,0,d.width/e,d.height/e):k.drawImage(d,0,0),~m.indexOf(f)||m.push(f)}}),m=[],a.killRenderer(g),f.parentNode.removeChild(f)},g.prototype.draw=function(a,b,c){var e=a instanceof sigma.renderers.webgl,f=!1,g=[],i=document.createElement("canvas"),k=i.getContext("2d");return h.forEach(function(h){if(a.contexts[h]&&(b.labels!==!1||"labels"!==h)){var l=a.domElements[h]||a.domElements.scene,m=a.contexts[h];if(!~g.indexOf(m)){if(!f){var n,o;if(b.clip){var p=!b.size||b.size<1?window.innerWidth:b.size;n=l.width,o=l.height,c=d(n,o,p)}else n=j.width,o=j.height;if(i.width=c.width,i.height=c.height,!e&&!m instanceof WebGLRenderingContext){var q=s.settings("webglOversamplingRatio");i.width*=q,i.height*=q}f=!0,b.background&&(k.rect(0,0,i.width,i.height),k.fillStyle=b.background,k.fill())}k.drawImage(b.clip?l:j,0,0,i.width,i.height),g.push(m)}}}),g=[],i};var l=null;sigma.plugins.image=function(a,b,c){return sigma.plugins.killImage(),l||(l=new g(a,b,c)),l},sigma.plugins.killImage=function(){l instanceof g&&(l=null,j=null,k=null)}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.curve=function(a,b,c,d,e){if("string"==typeof a.label){var f=e("prefix")||"",g=a[f+"size"]||1;if(!(gl?1:-1,s={},t=.5;b.id===c.id?(s=sigma.utils.getSelfLoopControlPoints(l,m,k),i=sigma.utils.getPointOnBezierCurve(t,l,m,n,o,s.x1,s.y1,s.x2,s.y2),j=Math.atan2(1,1)):(s=sigma.utils.getQuadraticControlPoint(l,m,n,o),i=sigma.utils.getPointOnQuadraticCurve(t,l,m,n,o,s.x,s.y),j=Math.atan2(q*r,p*r)),h="fixed"===e("edgeLabelSize")?e("defaultEdgeLabelSize"):e("defaultEdgeLabelSize")*g*Math.pow(g,-1/e("edgeLabelSizePowRatio")),d.save(),a.active?(d.font=[e("activeFontStyle"),h+"px",e("activeFont")||e("font")].join(" "),d.fillStyle="edge"===e("edgeActiveColor")?a.active_color||e("defaultEdgeActiveColor"):e("defaultEdgeLabelActiveColor")):(d.font=[e("fontStyle"),h+"px",e("font")].join(" "),d.fillStyle="edge"===e("edgeLabelColor")?a.color||e("defaultEdgeColor"):e("defaultEdgeLabelColor")),d.textAlign="center",d.textBaseline="alphabetic",d.translate(i.x,i.y),d.rotate(j),d.fillText(a.label,0,-g/2-3),d.restore()}}}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.curvedArrow=function(a,b,c,d,e){sigma.canvas.edges.labels.curve(a,b,c,d,e)}}.call(this),function(a){"use strict";if("undefined"==typeof sigma)throw"sigma is not declared";sigma.utils.pkg("sigma.canvas.edges.labels"),sigma.canvas.edges.labels.def=function(a,b,c,d,e){if("string"==typeof a.label&&b!=c){var f=e("prefix")||"",g=a[f+"size"]||1;if(!(g1||h[c].i>0?(b.cc||("arrow"===b.type||"tapered"===b.type||"arrow"===f||"tapered"===f?(b.cc_prev_type||(b.cc_prev_type=b.type),b.type="curvedArrow"):(b.cc_prev_type||(b.cc_prev_type=b.type),b.type="curve")),b.cc=a(d,h[c].n,h[c].i++,e)):b.cc&&(b.type=b.cc_prev_type,b.cc_prev_type=void 0,b.cc=void 0)})}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.tapered=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),g=e("prefix")||"",j=e("defaultNodeColor"),k=e("defaultEdgeColor"),l=b[g+"x"],m=b[g+"y"],n=c[g+"x"],o=c[g+"y"],p=sigma.utils.getDistance(l,m,n,o);if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}var q=sigma.utils.getCircleIntersection(l,m,h,n,o,p);d.save(),a.active?d.fillStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.fillStyle=f,d.globalAlpha=.65,d.beginPath(),d.moveTo(n,o),d.lineTo(q.xi,q.yi),d.lineTo(q.xi_prime,q.yi_prime),d.closePath(),d.fill(),d.restore()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.dotted=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.save(),a.active?d.strokeStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.strokeStyle=f,d.setLineDash([2]),d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke(),d.restore()}}(),function(){"use strict";sigma.utils.pkg("sigma.canvas.edges"),sigma.canvas.edges.dashed=function(a,b,c,d,e){var f=a.active?a.active_color||e("defaultEdgeActiveColor"):a.color,g=e("prefix")||"",h=a[g+"size"]||1,i=e("edgeColor"),j=e("defaultNodeColor"),k=e("defaultEdgeColor");if(!f)switch(i){case"source":f=b.color||j;break;case"target":f=c.color||j;break;default:f=k}d.save(),a.active?d.strokeStyle="edge"===e("edgeActiveColor")?f||k:e("defaultEdgeActiveColor"):d.strokeStyle=f,d.setLineDash([8,3]),d.lineWidth=h,d.beginPath(),d.moveTo(b[g+"x"],b[g+"y"]),d.lineTo(c[g+"x"],c[g+"y"]),d.stroke(),d.restore()}}(),function(undefined){"use strict";function crush(a){var b,c,d,e=["x","y","dx","dy","old_dx","old_dy","mass","convergence","size","fixed"],f=["source","target","weight"],g=["node","centerX","centerY","size","nextSibling","firstChild","mass","massCenterX","massCenterY"];for(c=0,d=g.length;d>c;c++)b=new RegExp("rp\\(([^,]*), '"+g[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);for(c=0,d=e.length;d>c;c++)b=new RegExp("np\\(([^,]*), '"+e[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);for(c=0,d=f.length;d>c;c++)b=new RegExp("ep\\(([^,]*), '"+f[c]+"'\\)","g"),a=a.replace(b,0===c?"$1":"$1 + "+c);return a}function getWorkerFn(){var a=crush?crush(Worker.toString()):Worker.toString();return";("+a+").call(this);"}var _root=this,inWebWorker=!("document"in _root),Worker=function(a){function b(){var a,b,c={},d=arguments.length;for(a=d-1;a>=0;a--)for(b in arguments[a])c[b]=arguments[a][b];return c}function c(a){var b;for(b in a)"hasOwnProperty"in a&&!a.hasOwnProperty(b)||delete a[b];return a}function d(a,b){if(a%o.ppn!==0)throw"np: non correct ("+a+").";if(a!==parseInt(a))throw"np: non int.";if(b in p)return a+p[b];throw"ForceAtlas2.Worker - Inexistant node property given ("+b+")."}function e(a,b){if(a%o.ppe!==0)throw"ep: non correct ("+a+").";if(a!==parseInt(a))throw"ep: non int.";if(b in q)return a+q[b];throw"ForceAtlas2.Worker - Inexistant edge property given ("+b+")."}function f(a,b){if(a%o.ppr!==0)throw"rp: non correct ("+a+").";if(a!==parseInt(a))throw"rp: non int.";if(b in r)return a+r[b];throw"ForceAtlas2.Worker - Inexistant region property given ("+b+")."}function g(a,b,c){c=c||{};k=a,l=b,o.nodesLength=k.length,o.edgesLength=l.length,h(c)}function h(a){o.settings=b(a,o.settings)}function i(){var a,b,c,g,h,i,j,n,p,q,r,s,t,u,v;for(c=0;c=0)w=k[d(c,"x")]=0){if(u=Math.sqrt(Math.pow(k[d(c,"x")]-m[f(b,"massCenterX")],2)+Math.pow(k[d(c,"y")]-m[f(b,"massCenterY")],2)),2*m[f(b,"size")]/u0?(v=q*k[d(c,"mass")]*m[f(b,"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):0>u&&(v=-q*k[d(c,"mass")]*m[f(b,"mass")]/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):u>0&&(v=q*k[d(c,"mass")]*m[f(b,"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v),m[f(b,"nextSibling")]<0)break;b=m[f(b,"nextSibling")];continue}b=m[f(b,"firstChild")]}else{if(m[f(b,"node")]>=0&&m[f(b,"node")]!==c&&(r=k[d(c,"x")]-k[d(m[f(b,"node")],"x")],s=k[d(c,"y")]-k[d(m[f(b,"node")],"y")],u=Math.sqrt(r*r+s*s),o.settings.adjustSizes?u>0?(v=q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):0>u&&(v=-q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v):u>0&&(v=q*k[d(c,"mass")]*k[d(m[f(b,"node")],"mass")]/u/u,k[d(c,"dx")]+=r*v,k[d(c,"dy")]+=s*v)),m[f(b,"nextSibling")]<0)break;b=m[f(b,"nextSibling")]}else for(q=o.settings.scalingRatio,g=0;gh;h+=o.ppn)r=k[d(g,"x")]-k[d(h,"x")],s=k[d(g,"y")]-k[d(h,"y")],o.settings.adjustSizes?(u=Math.sqrt(r*r+s*s)-k[d(g,"size")]-k[d(h,"size")],u>0?(v=q*k[d(g,"mass")]*k[d(h,"mass")]/u/u,k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]+=r*v,k[d(h,"dy")]+=s*v):0>u&&(v=100*q*k[d(g,"mass")]*k[d(h,"mass")],k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v)):(u=Math.sqrt(r*r+s*s),u>0&&(v=q*k[d(g,"mass")]*k[d(h,"mass")]/u/u,k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v));for(n=o.settings.gravity/o.settings.scalingRatio,q=o.settings.scalingRatio,c=0;c0&&(v=q*k[d(c,"mass")]*n):u>0&&(v=q*k[d(c,"mass")]*n/u),k[d(c,"dx")]-=r*v,k[d(c,"dy")]-=s*v;for(q=1*(o.settings.outboundAttractionDistribution?p:1),i=0;i0&&(v=-q*t*Math.log(1+u)/u/k[d(g,"mass")]):u>0&&(v=-q*t*Math.log(1+u)/u):o.settings.outboundAttractionDistribution?u>0&&(v=-q*t/k[d(g,"mass")]):u>0&&(v=-q*t)):(u=Math.sqrt(Math.pow(r,2)+Math.pow(s,2)),o.settings.linLogMode?o.settings.outboundAttractionDistribution?u>0&&(v=-q*t*Math.log(1+u)/u/k[d(g,"mass")]):u>0&&(v=-q*t*Math.log(1+u)/u):o.settings.outboundAttractionDistribution?(u=1,v=-q*t/k[d(g,"mass")]):(u=1,v=-q*t)),u>0&&(k[d(g,"dx")]+=r*v,k[d(g,"dy")]+=s*v,k[d(h,"dx")]-=r*v,k[d(h,"dy")]-=s*v);var C,D,E,F;if(o.settings.adjustSizes)for(c=0;co.maxForce&&(k[d(c,"dx")]=k[d(c,"dx")]*o.maxForce/C,k[d(c,"dy")]=k[d(c,"dy")]*o.maxForce/C),D=k[d(c,"mass")]*Math.sqrt((k[d(c,"old_dx")]-k[d(c,"dx")])*(k[d(c,"old_dx")]-k[d(c,"dx")])+(k[d(c,"old_dy")]-k[d(c,"dy")])*(k[d(c,"old_dy")]-k[d(c,"dy")])),E=Math.sqrt((k[d(c,"old_dx")]+k[d(c,"dx")])*(k[d(c,"old_dx")]+k[d(c,"dx")])+(k[d(c,"old_dy")]+k[d(c,"dy")])*(k[d(c,"old_dy")]+k[d(c,"dy")]))/2,F=.1*Math.log(1+E)/(1+Math.sqrt(D)),k[d(c,"x")]=k[d(c,"x")]+k[d(c,"dx")]*(F/o.settings.slowDown),k[d(c,"y")]=k[d(c,"y")]+k[d(c,"dy")]*(F/o.settings.slowDown));else for(c=0;cb;b++)i();n()}var k,l,m,n,o={ppn:10,ppe:3,ppr:9,maxForce:10,iterations:0,converged:!1,settings:{linLogMode:!1,outboundAttractionDistribution:!1,adjustSizes:!1,edgeWeightInfluence:0,scalingRatio:1,strongGravityMode:!1,gravity:1,slowDown:1,barnesHutOptimize:!1,barnesHutTheta:.5,startingIterations:1,iterationsPerRender:1}},p={x:0,y:1,dx:2,dy:3,old_dx:4,old_dy:5,mass:6,convergence:7,size:8,fixed:9},q={source:0,target:1,weight:2},r={node:0,centerX:1,centerY:2,size:3,nextSibling:4,firstChild:5,mass:6,massCenterX:7,massCenterY:8};n="undefined"!=typeof window&&window.document?function(){var a;document.createEvent?(a=document.createEvent("Event"),a.initEvent("newCoords",!0,!1)):(a=document.createEventObject(), +a.eventType="newCoords"),a.eventName="newCoords",a.data={nodes:k.buffer},requestAnimationFrame(function(){document.dispatchEvent(a)})}:function(){self.postMessage({nodes:k.buffer},[k.buffer])};var s=function(a){switch(a.data.action){case"start":g(new Float32Array(a.data.nodes),new Float32Array(a.data.edges),a.data.config),j(o.settings.startingIterations);break;case"loop":k=new Float32Array(a.data.nodes),j(o.settings.iterationsPerRender);break;case"config":h(a.data.config);break;case"kill":c(o),k=null,l=null,m=null,self.removeEventListener("message",s)}};self.addEventListener("message",s)};if(inWebWorker)eval(getWorkerFn());else{if("undefined"==typeof sigma)throw"sigma is not declared";sigma.prototype.getForceAtlas2Worker=getWorkerFn}}.call(this),function(undefined){"use strict";function Supervisor(sigInst,options){var _this=this,workerFn=sigInst.getForceAtlas2Worker&&sigInst.getForceAtlas2Worker();if(options=options||{},_root.URL=_root.URL||_root.webkitURL,this.sigInst=sigInst,this.graph=this.sigInst.graph,this.ppn=10,this.ppe=3,this.config={},this.shouldUseWorker=options.worker===!1?!1:webWorkers,this.workerUrl=options.workerUrl,this.started=!1,this.running=!1,this.shouldUseWorker){if(this.workerUrl)this.worker=new Worker(this.workerUrl);else{var blob=this.makeBlob(workerFn);this.worker=new Worker(URL.createObjectURL(blob))}this.worker.postMessage=this.worker.webkitPostMessage||this.worker.postMessage}else eval(workerFn);this.msgName=this.worker?"message":"newCoords",this.listener=function(a){_this.nodesByteArray=new Float32Array(a.data.nodes),_this.running&&(_this.applyLayoutChanges(),_this.sendByteArrayToWorker(),_this.sigInst.refresh())},(this.worker||document).addEventListener(this.msgName,this.listener),this.graphToByteArrays(),sigInst.bind("kill",function(){sigInst.killForceAtlas2()})}if("undefined"==typeof sigma)throw"sigma is not declared";var _root=this,webWorkers="Worker"in _root;Supervisor.prototype.makeBlob=function(a){var b;try{b=new Blob([a],{type:"application/javascript"})}catch(c){_root.BlobBuilder=_root.BlobBuilder||_root.WebKitBlobBuilder||_root.MozBlobBuilder,b=new BlobBuilder,b.append(a),b=b.getBlob()}return b},Supervisor.prototype.graphToByteArrays=function(){var a,b,c,d=this.graph.nodes(),e=this.graph.edges(),f=d.length*this.ppn,g=e.length*this.ppe,h={};for(this.nodesByteArray=new Float32Array(f),this.edgesByteArray=new Float32Array(g),a=b=0,c=d.length;c>a;a++)h[d[a].id]=b,this.nodesByteArray[b]=d[a].x,this.nodesByteArray[b+1]=d[a].y,this.nodesByteArray[b+2]=0,this.nodesByteArray[b+3]=0,this.nodesByteArray[b+4]=0,this.nodesByteArray[b+5]=0,this.nodesByteArray[b+6]=1+this.graph.degree(d[a].id),this.nodesByteArray[b+7]=1,this.nodesByteArray[b+8]=d[a].size,this.nodesByteArray[b+9]=0,b+=this.ppn;for(a=b=0,c=e.length;c>a;a++)this.edgesByteArray[b]=h[e[a].source],this.edgesByteArray[b+1]=h[e[a].target],this.edgesByteArray[b+2]=e[a].weight||0,b+=this.ppe},Supervisor.prototype.applyLayoutChanges=function(){for(var a=this.graph.nodes(),b=0,c=0,d=this.nodesByteArray.length;d>c;c+=this.ppn)a[b].x=this.nodesByteArray[c],a[b].y=this.nodesByteArray[c+1],b++},Supervisor.prototype.sendByteArrayToWorker=function(a){var b={action:a||"loop",nodes:this.nodesByteArray.buffer},c=[this.nodesByteArray.buffer];"start"===a&&(b.config=this.config||{},b.edges=this.edgesByteArray.buffer,c.push(this.edgesByteArray.buffer)),this.shouldUseWorker?this.worker.postMessage(b,c):_root.postMessage(b,"*")},Supervisor.prototype.start=function(){if(!this.running){this.running=!0;var a,b;for(a in this.sigInst.cameras)b=this.sigInst.cameras[a],b.edgequadtree._enabled=!1;this.started?this.sendByteArrayToWorker():(this.sendByteArrayToWorker("start"),this.started=!0)}},Supervisor.prototype.stop=function(){if(this.running){var a,b,c;for(a in this.sigInst.cameras)b=this.sigInst.cameras[a],b.edgequadtree._enabled=!0,c=sigma.utils.getBoundaries(this.graph,b.readPrefix),b.settings("drawEdges")&&b.settings("enableEdgeHovering")&&b.edgequadtree.index(this.sigInst.graph,{prefix:b.readPrefix,bounds:{x:c.minX,y:c.minY,width:c.maxX-c.minX,height:c.maxY-c.minY}});this.running=!1}},Supervisor.prototype.killWorker=function(){this.worker?this.worker.terminate():(_root.postMessage({action:"kill"},"*"),document.removeEventListener(this.msgName,this.listener))},Supervisor.prototype.configure=function(a){if(this.config=a,this.started){var b={action:"config",config:this.config};this.shouldUseWorker?this.worker.postMessage(b):_root.postMessage(b,"*")}},sigma.prototype.startForceAtlas2=function(a){return this.supervisor||(this.supervisor=new Supervisor(this,a)),a&&this.supervisor.configure(a),this.supervisor.start(),this},sigma.prototype.stopForceAtlas2=function(){return this.supervisor?(this.supervisor.stop(),this):this},sigma.prototype.killForceAtlas2=function(){return this.supervisor?(this.supervisor.stop(),this.supervisor.killWorker(),this.supervisor=null,this):this},sigma.prototype.configForceAtlas2=function(a){return this.supervisor||(this.supervisor=new Supervisor(this,a)),this.supervisor.configure(a),this},sigma.prototype.isForceAtlas2Running=function(a){return!!this.supervisor&&this.supervisor.running}}.call(this),slicePath=function(){return this.NullSlice=function(a,b,c){return a.setBaseValue(b,c),{slicePathString:"",linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.NullInitSlice=function(a,b,c){return a.setBaseValue(b,c),slicePathString=[a.MoveToCenter(),a.Close()],{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:a.centerX,titlePosY:a.centerY}},this.PieSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSlice=function(a,b,c){null===c&&(c=PieSliceCustomization()),a.setBaseValue(b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveTo(a.middleAngle,c.startRadiusPercent*a.sliceRadius),a.LineTo(a.startAngle,d),a.ArcTo(e,a.endAngle,d),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.FlowerSlice=function(a,b,c){null===c&&(c=PieSliceCustomization(),c.titleRadiusPercent=.5,c.arcBaseRadiusPercent=.65,c.arcRadiusPercent=.14);var d=PieSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.PieArrowSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arrowRadiusPercent=1.1,a},this.PieArrowSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,arrowAngleStart=a.startAngle+.45*a.sliceAngle,arrowAngleEnd=a.startAngle+.55*a.sliceAngle;var d=r*c.arrowRadiusPercent;return slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,arrowAngleStart,r),a.LineTo(a.middleAngle,d),a.LineTo(arrowAngleEnd,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieArrowBasePieSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),c.arrowRadiusPercent=1;var d=PieArrowSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.DonutSliceCustomization=function(){var a=new slicePathCustomization;return a.minRadiusPercent=.37,a.maxRadiusPercent=.9,a},this.DonutSlice=function(a,b,c){return null===c&&(c=DonutSliceCustomization()),maxRadius=a.wheelRadius*b*c.maxRadiusPercent,minRadius=a.wheelRadius*b*c.minRadiusPercent,a.setBaseValue(b,c),a.titleRadius=(maxRadius+minRadius)/2,a.setTitlePos(),slicePathString=[a.MoveTo(a.startAngle,minRadius),a.LineTo(a.startAngle,maxRadius),a.ArcTo(maxRadius,a.endAngle,maxRadius),a.LineTo(a.endAngle,minRadius),a.ArcBackTo(minRadius,a.startAngle,minRadius),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.55,a.isBasePieSlice=!1,a},this.CogSlice=function(a,b,c){return null===c&&(c=CogSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,rbase=a.wheelRadius*b*.83,percentAngle0625=a.startAngle+.0625*a.sliceAngle,percentAngle1250=a.startAngle+.125*a.sliceAngle,percentAngle1875=a.startAngle+.1875*a.sliceAngle,percentAngle2500=a.startAngle+.25*a.sliceAngle,percentAngle3125=a.startAngle+.3125*a.sliceAngle,percentAngle3750=a.startAngle+.375*a.sliceAngle,percentAngle4375=a.startAngle+.4375*a.sliceAngle,percentAngle5000=a.startAngle+.5*a.sliceAngle,percentAngle5625=a.startAngle+.5625*a.sliceAngle,percentAngle6250=a.startAngle+.625*a.sliceAngle,percentAngle6875=a.startAngle+.6875*a.sliceAngle,percentAngle7500=a.startAngle+.75*a.sliceAngle,percentAngle8125=a.startAngle+.8125*a.sliceAngle,percentAngle8750=a.startAngle+.875*a.sliceAngle,percentAngle9375=a.startAngle+.9375*a.sliceAngle,percentAngle9687=a.startAngle+.96875*a.sliceAngle,c.isBasePieSlice?(r=rbase,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.ArcTo(r,percentAngle1250,r),a.ArcTo(r,percentAngle1875,r),a.ArcTo(r,percentAngle2500,r),a.ArcTo(r,percentAngle3125,r),a.ArcTo(r,percentAngle3750,r),a.ArcTo(r,percentAngle4375,r),a.ArcTo(r,percentAngle5000,r),a.ArcTo(r,percentAngle5625,r),a.ArcTo(r,percentAngle6250,r),a.ArcTo(r,percentAngle6875,r),a.ArcTo(r,percentAngle7500,r),a.ArcTo(r,percentAngle8125,r),a.ArcTo(r,percentAngle8750,r),a.ArcTo(r,percentAngle9375,r),a.ArcTo(r,percentAngle9687,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.LineTo(percentAngle0625,rbase),a.ArcTo(rbase,percentAngle1875,rbase),a.LineTo(percentAngle1875,r),a.ArcTo(r,percentAngle3125,r),a.LineTo(percentAngle3125,rbase),a.ArcTo(rbase,percentAngle4375,rbase),a.LineTo(percentAngle4375,r),a.ArcTo(r,percentAngle5625,r),a.LineTo(percentAngle5625,rbase),a.ArcTo(rbase,percentAngle6875,rbase),a.LineTo(percentAngle6875,r),a.ArcTo(r,percentAngle8125,r),a.LineTo(percentAngle8125,rbase),a.ArcTo(rbase,percentAngle9375,rbase),a.LineTo(percentAngle9375,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogBasePieSlice=function(a,b,c){null===c&&(c=CogSliceCustomization()),c.isBasePieSlice=!0;var d=CogSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.StarSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.44,a.minRadiusPercent=.5,a.isBasePieSlice=!1,a},this.StarSlice=function(a,b,c){return null===c&&(c=StarSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b,rbase=r*c.minRadiusPercent,c.isBasePieSlice?(r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,a.middleAngle,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,rbase),a.LineTo(a.middleAngle,r),a.LineTo(a.endAngle,rbase),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarBasePieSlice=function(a,b,c){null===c&&(c=StarSliceCustomization()),c.titleRadiusPercent=.6,c.isBasePieSlice=!0;var d=StarSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceCustomization=function(){var a=new slicePathCustomization;return a.menuRadius=35,a.titleRadiusPercent=.63,a.isSelectedLine=!1,a.lineBaseRadiusPercent=0,a},this.MenuSlice=function(a,b,c){null===c&&(c=MenuSliceCustomization()),a.setBaseValue(b,c),x=a.centerX,y=a.centerY;var d=a.wheelRadius*b;a.titleRadius=d*c.titleRadiusPercent,a.setTitlePos();var e=b*c.menuRadius;return.05>=b&&(e=10),middleTheta=a.middleTheta,slicePathString=[["M",a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX+e*Math.cos(middleTheta),a.titlePosY+e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["z"]],.05>=b?linePathString=[["M",x,y],["A",1,1,0,0,1,x+1,y+1]]:c.isSelectedLine?linePathString=[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/3,a.middleAngle,a.titleRadius-e)]:linePathString=[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/2,a.middleAngle,a.titleRadius-e)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.MenuSliceSelectedLine=function(a,b,c){null===c&&(c=MenuSliceCustomization()),c.isSelectedLine=!0;var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:d.linePathString,titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceWithoutLine=function(a,b,c){var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.LineSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.sliceAngle>60&&a.sliceAngle<180?(a.titleRadius=r*(180/a.sliceAngle/5),a.setTitlePos()):(a.titleRadius=.55*r,a.setTitlePos()),a.sliceAngle<180?slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.endAngle,r),a.Close()]:180===a.startAngle||0===a.startAngle||-180===a.startAngle||360===a.startAngle?slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.startAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r),a.Close()]:slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.middleAngle,r,a.startAngle,r),a.LineTo(a.middleAngle,r,a.endAngle,r),a.LineTo(a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.EyeSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.68,a},this.EyeSlice=function(a,b,c){return null===c&&(c=EyeSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b*.7,0===b&&(r=.01),startAngle=a.startAngle,endAngle=a.endAngle,180===a.sliceAngle&&(startAngle=a.startAngle+a.sliceAngle/4,endAngle=a.startAngle+a.sliceAngle-a.sliceAngle/4),slicePathString=[a.MoveTo(endAngle,r),a.ArcTo(r,startAngle,r),a.ArcTo(r,endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WheelSlice=function(a,b,c){a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,startTheta=a.startTheta,middleTheta=a.middleTheta,endTheta=a.endTheta;var d;return a.sliceAngle<120?(a.titleRadius=.57*r,d=.9):a.sliceAngle<180?(a.titleRadius=.52*r,d=.91):(a.titleRadius=.45*r,d=.873),slicePathString=[a.MoveTo(a.middleAngle,.07*r),["L",.07*r*Math.cos(middleTheta)+.87*r*Math.cos(startTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(startTheta)+y],["A",r*d,r*d,0,0,1,.07*r*Math.cos(middleTheta)+.87*r*Math.cos(endTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(endTheta)+y],a.Close()],linePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.OuterStrokeSlice=function(a,b,c){return a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,innerRadius=r/4,a.sliceAngle<120?a.titleRadius=.57*r:a.sliceAngle<180?a.titleRadius=.52*r:a.titleRadius=.45*r,linePathString=[a.MoveTo(a.startAngle,innerRadius),a.LineTo(a.startAngle,r),a.MoveTo(a.endAngle,innerRadius),a.LineTo(a.endAngle,r)],slicePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r),a.MoveTo(a.startAngle,innerRadius),a.ArcTo(innerRadius,a.endAngle,innerRadius),a.ArcBackTo(innerRadius,a.startAngle,innerRadius)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TabSlice=function(a,b,c){var d=.9*a.wheelRadius,e=360/a.sliceAngle,f=2*d/e;return x=a.centerX,y=a.centerY,itemIndex=a.itemIndex,titlePosX=x,titlePosY=itemIndex*f+y+f/2-d,slicePathString=[["M",x-f/2,itemIndex*f+y-d],["L",f/2+x,itemIndex*f+y-d],["L",f/2+x,(itemIndex+1)*f+y-d],["L",x-f/2,(itemIndex+1)*f+y-d],["z"]],{slicePathString:slicePathString,linePathString:"",titlePosX:titlePosX,titlePosY:titlePosY}},this.YinYangSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.ArcTo(r/2,a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r/2,0,0),a.Close()],titlePosX=a.getX(a.startAngle,r/2),titlePosY=a.getY(a.startAngle,r/2),{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:titlePosX,titlePosY:titlePosY}},this.WebSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.titleRadius=.55*r,a.setTitlePos(),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,1.1*r),a.MoveToCenter(),a.LineTo(a.endAngle,1.1*r),a.MoveTo(a.startAngle,.15*r),a.LineTo(a.endAngle,.15*r),a.MoveTo(a.startAngle,.35*r),a.LineTo(a.endAngle,.35*r),a.MoveTo(a.startAngle,.55*r),a.LineTo(a.endAngle,.55*r),a.MoveTo(a.startAngle,.75*r),a.LineTo(a.endAngle,.75*r),a.MoveTo(a.startAngle,.95*r),a.LineTo(a.endAngle,.95*r),a.Close()],{slicePathString:"",linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WinterSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.85,a.arcRadiusPercent=1,a},this.WinterSlice=function(a,b,c){null===c&&(c=WinterSliceCustomization()),a.setBaseValue(b,c),sliceAngle=a.sliceAngle,parallelAngle=a.startAngle+sliceAngle/4,parallelAngle2=a.startAngle+sliceAngle/4*3,borderAngle1=a.startAngle+sliceAngle/200,borderAngle2=a.startAngle+sliceAngle/2-sliceAngle/200,borderAngle3=a.startAngle+sliceAngle/2+sliceAngle/200,borderAngle4=a.startAngle+sliceAngle-sliceAngle/200;var d=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveToCenter(),a.MoveTo(parallelAngle,d/100),a.LineTo(borderAngle1,d/2),a.LineTo(parallelAngle,d-d/100),a.LineTo(borderAngle2,d/2),a.LineTo(parallelAngle,d/100),a.MoveTo(parallelAngle2,d/100),a.LineTo(borderAngle4,d/2),a.LineTo(parallelAngle2,d-d/100),a.LineTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d/100),a.Close()],linePathString=[a.MoveTo(parallelAngle,d),a.LineTo(borderAngle2,d/2),a.MoveTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TutorialSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.isMoveTo=!1,a.isLineTo=!1,a.isArcTo=!1,a.isArcBackTo=!1,a},this.TutorialSlice=function(a,b,c){return null===c&&(c=TutorialSliceCustomization()),a.setBaseValue(b,c),slicePathString=[],slicePathString.push(a.MoveToCenter()),c.isMoveTo===!0&&slicePathString.push(a.MoveTo(a.middleAngle,a.sliceRadius/4)),c.isLineTo&&slicePathString.push(a.LineTo(a.startAngle,a.sliceRadius)),c.isArcTo&&slicePathString.push(a.ArcTo(a.sliceRadius,a.middleAngle,a.sliceRadius)),c.isArcBackTo&&slicePathString.push(a.ArcBackTo(a.sliceRadius,a.endAngle,a.sliceRadius)),slicePathString.push(a.Close()),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,a.sliceRadius),a.ArcTo(a.sliceRadius,a.endAngle,a.sliceRadius),a.Close()],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this};var sliceTransform,sliceTransformCustomization,colorpalette;wheelnav=function(a,b,c,d){var e,f,g,h,i;if(this.holderId="wheel",void 0!==a&&null!==a&&(this.holderId=a),e=document.getElementById(a),!(null!==e&&void 0!==e||void 0!==b&&null!==b))return this;if(g=!0,void 0===b||null===b){for(h=[],i=0;ic&&(c=360+c),!this.clockwise&&c>0&&(c-=360)),b.currentRotateAngle-=c,d=null!=this.animatetime?this.animatetime:1500,this.animatetimeCalculated&&a!==this.currentClick&&(b.animatetime=d*(Math.abs(c)/360)),this.rotateRoundCount>0&&(this.clockwise?b.currentRotateAngle-=360*this.rotateRoundCount:b.currentRotateAngle+=360*this.rotateRoundCount,b.animatetime=d*(this.rotateRoundCount+1)));for(i=0;i0){for(this.initWheel(t),s=0;s-1||a.indexOf(" ")>-1)},this.isImageTitle=function(a){return void 0===a&&(a=this.title),null!==a&&"imgsrc:"===a.substr(0,7)},this},wheelnavTitle.prototype.getTitlePercentAttr=function(a,b,c,d){var e,f,g={};return void 0!==this.relativePath?(e=a+(this.startX-this.centerX),f=b+(this.startY-this.centerY),this.relativePath[0][1]=e,this.relativePath[0][2]=f,g={path:this.relativePath,title:this.title}):g=this.isImageTitle()?{x:a-c/2,y:b-d/2,width:c,height:d,title:this.title,src:this.title.substr(7,this.title.length)}:{x:a,y:b,title:this.title},g},wheelnavTitle.prototype.getTitleSizeTransform=function(a,b){var c="";return null!==a&&null!==b&&(c="s",this.height>this.width?(c+=(a/this.height).toString()+",",c+=(b/this.height).toString()):(c+=(a/this.width).toString()+",",c+=(b/this.width).toString())),c},wheelnav.prototype.styleWheel=function(){this.cssMode?(this.spreaderPathInAttr={"class":this.getSpreaderCssClass("in")},this.spreaderPathOutAttr={"class":this.getSpreaderCssClass("out")},this.spreaderTitleInAttr={"class":this.getSpreaderTitleCssClass("in")},this.spreaderTitleOutAttr={"class":this.getSpreaderTitleCssClass("out")},this.markerAttr={"class":this.getMarkerCssClass()}):((void 0===this.spreaderPathInAttr||null===this.spreaderPathInAttr)&&(this.spreaderPathInAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(void 0===this.spreaderPathOutAttr||null===this.spreaderPathOutAttr)&&(this.spreaderPathOutAttr={fill:"#444",stroke:"#444","stroke-width":2,cursor:"pointer"}),(void 0===this.spreaderTitleInAttr||null===this.spreaderTitleInAttr)&&(this.spreaderTitleInAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(void 0===this.spreaderTitleOutAttr||null===this.spreaderTitleOutAttr)&&(this.spreaderTitleOutAttr={fill:"#eee",stroke:"#444",cursor:"pointer"}),(void 0===this.markerAttr||null===this.markerAttr)&&(this.markerAttr={stroke:"#444","stroke-width":2}))},wheelnavItem.prototype.styleNavItem=function(){this.wheelnav.cssMode?(this.slicePathAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"basic")},this.sliceHoverAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"hover")},this.sliceSelectedAttr={"class":this.wheelnav.getSliceCssClass(this.wheelItemIndex,"selected")},this.titleAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"basic")},this.titleHoverAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"hover")},this.titleSelectedAttr={"class":this.wheelnav.getTitleCssClass(this.wheelItemIndex,"selected")},this.linePathAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"basic")},this.lineHoverAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"hover")},this.lineSelectedAttr={"class":this.wheelnav.getLineCssClass(this.wheelItemIndex,"selected")}):(this.slicePathAttr={stroke:"#333","stroke-width":0,cursor:"pointer","fill-opacity":1},this.sliceHoverAttr={stroke:"#222","stroke-width":0,cursor:"pointer","fill-opacity":.77},this.sliceSelectedAttr={stroke:"#111","stroke-width":0,cursor:"default","fill-opacity":1},this.titleAttr={font:this.titleFont,fill:"#333",stroke:"none",cursor:"pointer"},this.titleHoverAttr={font:this.titleFont,fill:"#222",cursor:"pointer",stroke:"none"},this.titleSelectedAttr={font:this.titleFont,fill:"#fff",cursor:"default"},this.linePathAttr={stroke:"#444","stroke-width":1,cursor:"pointer"},this.lineHoverAttr={stroke:"#222","stroke-width":2,cursor:"pointer"},this.lineSelectedAttr={stroke:"#444","stroke-width":1,cursor:"default"}),this.sliceClickablePathAttr={fill:"#FFF",stroke:"#FFF","stroke-width":0,cursor:"pointer","fill-opacity":.01},this.sliceClickableHoverAttr={stroke:"#FFF","stroke-width":0,cursor:"pointer"},this.sliceClickableSelectedAttr={stroke:"#FFF","stroke-width":0,cursor:"default"}},wheelnav.prototype.getSliceCssClass=function(a,b){return"wheelnav-"+this.holderId+"-slice-"+b+"-"+a},wheelnav.prototype.getTitleCssClass=function(a,b){return"wheelnav-"+this.holderId+"-title-"+b+"-"+a},wheelnav.prototype.getLineCssClass=function(a,b){return"wheelnav-"+this.holderId+"-line-"+b+"-"+a},wheelnav.prototype.getSpreaderCssClass=function(a){return"wheelnav-"+this.holderId+"-spreader-"+a},wheelnav.prototype.getSpreaderTitleCssClass=function(a){return"wheelnav-"+this.holderId+"-spreadertitle-"+a},wheelnav.prototype.getMarkerCssClass=function(){return"wheelnav-"+this.holderId+"-marker"};var pathHelper=function(){return this.sliceRadius=0,this.startAngle=0,this.middleAngle=0,this.endAngle=0,this.sliceAngle=0,this.startTheta=0,this.middleTheta=0,this.endTheta=0,this.titlePosX=0,this.titlePosY=0,this.titleRadius=0,this.titleTheta=0,this.custom=null,this.centerX=0,this.centerY=0,this.wheelRadius=0,this.itemIndex=0,this.navItemCount=0,this.navAngle=0,this.setBaseValue=function(a,b){null===b?b=new slicePathCustomization:this.custom=b,this.sliceRadius=this.wheelRadius*a*.9,this.middleAngle=this.startAngle+this.sliceAngle/2,this.endAngle=this.startAngle+this.sliceAngle,this.startTheta=this.getTheta(this.startAngle),this.middleTheta=this.getTheta(this.middleAngle),this.endTheta=this.getTheta(this.endAngle),null!==b?(null!==b.titleRadiusPercent&&(this.titleRadius=this.sliceRadius*b.titleRadiusPercent),null!==b.titleSliceAnglePercent&&(this.titleTheta=this.getTheta(this.startAngle+this.sliceAngle*b.titleSliceAnglePercent))):(this.titleRadius=.5*this.sliceRadius,this.titleTheta=this.middleTheta),this.setTitlePos()},this.setTitlePos=function(){this.titlePosX=this.titleRadius*Math.cos(this.titleTheta)+this.centerX,this.titlePosY=this.titleRadius*Math.sin(this.titleTheta)+this.centerY},this.getX=function(a,b){return b*Math.cos(this.getTheta(a))+this.centerX},this.getY=function(a,b){return b*Math.sin(this.getTheta(a))+this.centerY},this.MoveTo=function(a,b){return["M",this.getX(a,b),this.getY(a,b)]},this.MoveToCenter=function(){return["M",this.centerX,this.centerY]},this.LineTo=function(a,b,c,d){return void 0===c&&(c=a),void 0===d&&(d=b),["L",this.getX(a,b),this.getY(c,d)]},this.ArcTo=function(a,b,c){return["A",a,a,0,0,1,this.getX(b,c),this.getY(b,c)]},this.ArcBackTo=function(a,b,c){return["A",a,a,0,0,0,this.getX(b,c),this.getY(b,c)]},this.StartSpreader=function(a,b,c){this.endAngle-this.startAngle==360?a.push(this.MoveTo(b,c)):(a.push(this.MoveToCenter()),a.push(this.LineTo(b,c)))},this.Close=function(){return["z"]},this.getTheta=function(a){return a%360*Math.PI/180},this},slicePathCustomization=function(){return this.titleRadiusPercent=.5,this.titleSliceAnglePercent=.5,this},spreaderPathCustomization=function(){return this.titleRadiusPercent=0,this.titleSliceAnglePercent=.5,this.spreaderPercent=1,this},markerPathCustomization=function(){return this.titleRadiusPercent=1,this.titleSliceAnglePercent=.5,this.markerPercent=1.05,this};slicePath=function(){return this.NullSlice=function(a,b,c){return a.setBaseValue(b,c),{slicePathString:"",linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.NullInitSlice=function(a,b,c){return a.setBaseValue(b,c),slicePathString=[a.MoveToCenter(),a.Close()],{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:a.centerX,titlePosY:a.centerY}},this.PieSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSlice=function(a,b,c){null===c&&(c=PieSliceCustomization()), +a.setBaseValue(b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveTo(a.middleAngle,c.startRadiusPercent*a.sliceRadius),a.LineTo(a.startAngle,d),a.ArcTo(e,a.endAngle,d),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.FlowerSlice=function(a,b,c){null===c&&(c=PieSliceCustomization(),c.titleRadiusPercent=.5,c.arcBaseRadiusPercent=.65,c.arcRadiusPercent=.14);var d=PieSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.PieArrowSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.arrowRadiusPercent=1.1,a},this.PieArrowSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,arrowAngleStart=a.startAngle+.45*a.sliceAngle,arrowAngleEnd=a.startAngle+.55*a.sliceAngle;var d=r*c.arrowRadiusPercent;return slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,arrowAngleStart,r),a.LineTo(a.middleAngle,d),a.LineTo(arrowAngleEnd,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieArrowBasePieSlice=function(a,b,c){null===c&&(c=PieArrowSliceCustomization()),c.arrowRadiusPercent=1;var d=PieArrowSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.DonutSliceCustomization=function(){var a=new slicePathCustomization;return a.minRadiusPercent=.37,a.maxRadiusPercent=.9,a},this.DonutSlice=function(a,b,c){return null===c&&(c=DonutSliceCustomization()),maxRadius=a.wheelRadius*b*c.maxRadiusPercent,minRadius=a.wheelRadius*b*c.minRadiusPercent,a.setBaseValue(b,c),a.titleRadius=(maxRadius+minRadius)/2,a.setTitlePos(),slicePathString=[a.MoveTo(a.startAngle,minRadius),a.LineTo(a.startAngle,maxRadius),a.ArcTo(maxRadius,a.endAngle,maxRadius),a.LineTo(a.endAngle,minRadius),a.ArcBackTo(minRadius,a.startAngle,minRadius),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.55,a.isBasePieSlice=!1,a},this.CogSlice=function(a,b,c){return null===c&&(c=CogSliceCustomization()),a.setBaseValue(b,c),r=a.sliceRadius,rbase=a.wheelRadius*b*.83,percentAngle0625=a.startAngle+.0625*a.sliceAngle,percentAngle1250=a.startAngle+.125*a.sliceAngle,percentAngle1875=a.startAngle+.1875*a.sliceAngle,percentAngle2500=a.startAngle+.25*a.sliceAngle,percentAngle3125=a.startAngle+.3125*a.sliceAngle,percentAngle3750=a.startAngle+.375*a.sliceAngle,percentAngle4375=a.startAngle+.4375*a.sliceAngle,percentAngle5000=a.startAngle+.5*a.sliceAngle,percentAngle5625=a.startAngle+.5625*a.sliceAngle,percentAngle6250=a.startAngle+.625*a.sliceAngle,percentAngle6875=a.startAngle+.6875*a.sliceAngle,percentAngle7500=a.startAngle+.75*a.sliceAngle,percentAngle8125=a.startAngle+.8125*a.sliceAngle,percentAngle8750=a.startAngle+.875*a.sliceAngle,percentAngle9375=a.startAngle+.9375*a.sliceAngle,percentAngle9687=a.startAngle+.96875*a.sliceAngle,c.isBasePieSlice?(r=rbase,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.ArcTo(r,percentAngle1250,r),a.ArcTo(r,percentAngle1875,r),a.ArcTo(r,percentAngle2500,r),a.ArcTo(r,percentAngle3125,r),a.ArcTo(r,percentAngle3750,r),a.ArcTo(r,percentAngle4375,r),a.ArcTo(r,percentAngle5000,r),a.ArcTo(r,percentAngle5625,r),a.ArcTo(r,percentAngle6250,r),a.ArcTo(r,percentAngle6875,r),a.ArcTo(r,percentAngle7500,r),a.ArcTo(r,percentAngle8125,r),a.ArcTo(r,percentAngle8750,r),a.ArcTo(r,percentAngle9375,r),a.ArcTo(r,percentAngle9687,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,percentAngle0625,r),a.LineTo(percentAngle0625,rbase),a.ArcTo(rbase,percentAngle1875,rbase),a.LineTo(percentAngle1875,r),a.ArcTo(r,percentAngle3125,r),a.LineTo(percentAngle3125,rbase),a.ArcTo(rbase,percentAngle4375,rbase),a.LineTo(percentAngle4375,r),a.ArcTo(r,percentAngle5625,r),a.LineTo(percentAngle5625,rbase),a.ArcTo(rbase,percentAngle6875,rbase),a.LineTo(percentAngle6875,r),a.ArcTo(r,percentAngle8125,r),a.LineTo(percentAngle8125,rbase),a.ArcTo(rbase,percentAngle9375,rbase),a.LineTo(percentAngle9375,r),a.ArcTo(r,a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.CogBasePieSlice=function(a,b,c){null===c&&(c=CogSliceCustomization()),c.isBasePieSlice=!0;var d=CogSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.StarSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.44,a.minRadiusPercent=.5,a.isBasePieSlice=!1,a},this.StarSlice=function(a,b,c){return null===c&&(c=StarSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b,rbase=r*c.minRadiusPercent,c.isBasePieSlice?(r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.ArcTo(r,a.middleAngle,r),a.ArcTo(r,a.endAngle,r),a.Close()]):slicePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,rbase),a.LineTo(a.middleAngle,r),a.LineTo(a.endAngle,rbase),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarBasePieSlice=function(a,b,c){null===c&&(c=StarSliceCustomization()),c.titleRadiusPercent=.6,c.isBasePieSlice=!0;var d=StarSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceCustomization=function(){var a=new slicePathCustomization;return a.menuRadius=35,a.titleRadiusPercent=.63,a.isSelectedLine=!1,a.lineBaseRadiusPercent=0,a},this.MenuSlice=function(a,b,c){var d,e;return null===c&&(c=MenuSliceCustomization()),a.setBaseValue(b,c),x=a.centerX,y=a.centerY,d=a.wheelRadius*b,a.titleRadius=d*c.titleRadiusPercent,a.setTitlePos(),e=b*c.menuRadius,.05>=b&&(e=10),middleTheta=a.middleTheta,slicePathString=[["M",a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX+e*Math.cos(middleTheta),a.titlePosY+e*Math.sin(middleTheta)],["A",e,e,0,0,1,a.titlePosX-e*Math.cos(middleTheta),a.titlePosY-e*Math.sin(middleTheta)],["z"]],linePathString=.05>=b?[["M",x,y],["A",1,1,0,0,1,x+1,y+1]]:c.isSelectedLine?[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/3,a.middleAngle,a.titleRadius-e)]:[a.MoveTo(a.middleAngle,c.lineBaseRadiusPercent*d),a.ArcTo(d/2,a.middleAngle,a.titleRadius-e)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.MenuSliceSelectedLine=function(a,b,c){null===c&&(c=MenuSliceCustomization()),c.isSelectedLine=!0;var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:d.linePathString,titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.MenuSliceWithoutLine=function(a,b,c){var d=MenuSlice(a,b,c);return{slicePathString:d.slicePathString,linePathString:"",titlePosX:d.titlePosX,titlePosY:d.titlePosY}},this.LineSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.sliceAngle>60&&a.sliceAngle<180?(a.titleRadius=r*(36/a.sliceAngle),a.setTitlePos()):(a.titleRadius=.55*r,a.setTitlePos()),slicePathString=a.sliceAngle<180?[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.endAngle,r),a.Close()]:180===a.startAngle||0===a.startAngle||-180===a.startAngle||360===a.startAngle?[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.startAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r,a.middleAngle,r),a.LineTo(a.endAngle,r),a.Close()]:[a.MoveToCenter(),a.LineTo(a.startAngle,r),a.LineTo(a.middleAngle,r,a.startAngle,r),a.LineTo(a.middleAngle,r,a.endAngle,r),a.LineTo(a.endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.EyeSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.68,a},this.EyeSlice=function(a,b,c){return null===c&&(c=EyeSliceCustomization()),a.setBaseValue(b,c),r=a.wheelRadius*b*.7,0===b&&(r=.01),startAngle=a.startAngle,endAngle=a.endAngle,180===a.sliceAngle&&(startAngle=a.startAngle+a.sliceAngle/4,endAngle=a.startAngle+a.sliceAngle-a.sliceAngle/4),slicePathString=[a.MoveTo(endAngle,r),a.ArcTo(r,startAngle,r),a.ArcTo(r,endAngle,r),a.Close()],{slicePathString:slicePathString,linePathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WheelSlice=function(a,b,c){a.setBaseValue(b,c),x=a.centerX,y=a.centerY,r=a.sliceRadius,startTheta=a.startTheta,middleTheta=a.middleTheta,endTheta=a.endTheta;var d;return a.sliceAngle<120?(a.titleRadius=.57*r,d=.9):a.sliceAngle<180?(a.titleRadius=.52*r,d=.91):(a.titleRadius=.45*r,d=.873),slicePathString=[a.MoveTo(a.middleAngle,.07*r),["L",.07*r*Math.cos(middleTheta)+.87*r*Math.cos(startTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(startTheta)+y],["A",r*d,r*d,0,0,1,.07*r*Math.cos(middleTheta)+.87*r*Math.cos(endTheta)+x,.07*r*Math.sin(middleTheta)+.87*r*Math.sin(endTheta)+y],a.Close()],linePathString=[a.MoveTo(a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r,a.startAngle,r)],a.setTitlePos(),{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TabSlice=function(a){var b=.9*a.wheelRadius,c=360/a.sliceAngle,d=2*b/c;return x=a.centerX,y=a.centerY,itemIndex=a.itemIndex,titlePosX=x,titlePosY=itemIndex*d+y+d/2-b,slicePathString=[["M",x-d/2,itemIndex*d+y-b],["L",d/2+x,itemIndex*d+y-b],["L",d/2+x,(itemIndex+1)*d+y-b],["L",x-d/2,(itemIndex+1)*d+y-b],["z"]],{slicePathString:slicePathString,linePathString:"",titlePosX:titlePosX,titlePosY:titlePosY}},this.YinYangSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,slicePathString=[a.MoveToCenter(),a.ArcTo(r/2,a.startAngle,r),a.ArcTo(r,a.endAngle,r),a.ArcBackTo(r/2,0,0),a.Close()],titlePosX=a.getX(a.startAngle,r/2),titlePosY=a.getY(a.startAngle,r/2),{slicePathString:slicePathString,linePathString:slicePathString,titlePosX:titlePosX,titlePosY:titlePosY}},this.WebSlice=function(a,b,c){return a.setBaseValue(b,c),r=a.sliceRadius,a.titleRadius=.55*r,a.setTitlePos(),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,1.1*r),a.MoveToCenter(),a.LineTo(a.endAngle,1.1*r),a.MoveTo(a.startAngle,.15*r),a.LineTo(a.endAngle,.15*r),a.MoveTo(a.startAngle,.35*r),a.LineTo(a.endAngle,.35*r),a.MoveTo(a.startAngle,.55*r),a.LineTo(a.endAngle,.55*r),a.MoveTo(a.startAngle,.75*r),a.LineTo(a.endAngle,.75*r),a.MoveTo(a.startAngle,.95*r),a.LineTo(a.endAngle,.95*r),a.Close()],{slicePathString:"",linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.WinterSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.85,a.arcRadiusPercent=1,a},this.WinterSlice=function(a,b,c){null===c&&(c=WinterSliceCustomization()),a.setBaseValue(b,c),sliceAngle=a.sliceAngle,parallelAngle=a.startAngle+sliceAngle/4,parallelAngle2=a.startAngle+sliceAngle/4*3,borderAngle1=a.startAngle+sliceAngle/200,borderAngle2=a.startAngle+sliceAngle/2-sliceAngle/200,borderAngle3=a.startAngle+sliceAngle/2+sliceAngle/200,borderAngle4=a.startAngle+sliceAngle-sliceAngle/200;var d=a.sliceRadius*c.arcRadiusPercent;return slicePathString=[a.MoveToCenter(),a.MoveTo(parallelAngle,d/100),a.LineTo(borderAngle1,d/2),a.LineTo(parallelAngle,d-d/100),a.LineTo(borderAngle2,d/2),a.LineTo(parallelAngle,d/100),a.MoveTo(parallelAngle2,d/100),a.LineTo(borderAngle4,d/2),a.LineTo(parallelAngle2,d-d/100),a.LineTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d/100),a.Close()],linePathString=[a.MoveTo(parallelAngle,d),a.LineTo(borderAngle2,d/2),a.MoveTo(borderAngle3,d/2),a.LineTo(parallelAngle2,d)],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.TutorialSliceCustomization=function(){var a=new slicePathCustomization;return a.titleRadiusPercent=.6,a.isMoveTo=!1,a.isLineTo=!1,a.isArcTo=!1,a.isArcBackTo=!1,a},this.TutorialSlice=function(a,b,c){return null===c&&(c=TutorialSliceCustomization()),a.setBaseValue(b,c),slicePathString=[],slicePathString.push(a.MoveToCenter()),c.isMoveTo===!0&&slicePathString.push(a.MoveTo(a.middleAngle,a.sliceRadius/4)),c.isLineTo&&slicePathString.push(a.LineTo(a.startAngle,a.sliceRadius)),c.isArcTo&&slicePathString.push(a.ArcTo(a.sliceRadius,a.middleAngle,a.sliceRadius)),c.isArcBackTo&&slicePathString.push(a.ArcBackTo(a.sliceRadius,a.endAngle,a.sliceRadius)),slicePathString.push(a.Close()),linePathString=[a.MoveToCenter(),a.LineTo(a.startAngle,a.sliceRadius),a.ArcTo(a.sliceRadius,a.endAngle,a.sliceRadius),a.Close()],{slicePathString:slicePathString,linePathString:linePathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this},sliceTransform=function(){this.startAngle=0,this.startTheta=0,this.middleTheta=0,this.endTheta=0;var a=function(a,c,d,e,f){this.startAngle=e,this.startTheta=b(startAngle),this.middleTheta=b(startAngle+f/2),this.endTheta=b(startAngle+f)},b=function(a){return a%360*Math.PI/180};return this.NullTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:""}},this.MoveMiddleTransform=function(c,d,e,f,g,h,i){var j,k,l,m;return a(c,d,e,f,g,h,i),j="t"+(e/10*Math.cos(middleTheta)).toString()+","+(e/10*Math.sin(middleTheta)).toString(),null!==h?k=b(-h):(l=f-i*g,k=b(l+g/2)),m="s1,r0,t"+(e/10*Math.cos(k)).toString()+","+(e/10*Math.sin(k)).toString(),{sliceTransformString:j,lineTransformString:j,titleTransformString:m}},this.RotateTransform=function(){var a="s1,r360";return{sliceTransformString:a,lineTransformString:a,titleTransformString:a}},this.RotateHalfTransform=function(){var a="s1,r90";return{sliceTransformString:a,lineTransformString:a,titleTransformString:a}},this.RotateTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1,r360"}},this.ScaleTransform=function(){var a="s1.2";return{sliceTransformString:a,lineTransformString:"",titleTransformString:a}},this.ScaleTitleTransform=function(){return{sliceTransformString:"",lineTransformString:"",titleTransformString:"s1.3"}},this.RotateScaleTransform=function(){var a="r360,s1.3";return{sliceTransformString:a,lineTransformString:"",titleTransformString:a}},this.CustomTransform=function(a,b,c,d,e,f,g,h){var i=h.scaleString+","+h.rotateString;return{sliceTransformString:i,lineTransformString:i,titleTransformString:i}},this.CustomTitleTransform=function(a,b,c,d,e,f,g,h){var i=h.scaleString+","+h.rotateString;return{sliceTransformString:"",lineTransformString:"",titleTransformString:i}},this},sliceTransformCustomization=function(){return this.scaleString="s1",this.rotateString="r0",this},spreader=function(a){var b,c;if(this.wheelnav=a,this.wheelnav.spreaderEnable){this.spreaderHelper=new pathHelper,this.spreaderHelper.centerX=this.wheelnav.centerX,this.spreaderHelper.centerY=this.wheelnav.centerY,this.spreaderHelper.navItemCount=this.wheelnav.navItemCount,this.spreaderHelper.navAngle=this.wheelnav.navAngle,this.spreaderHelper.wheelRadius=this.wheelnav.spreaderRadius,this.spreaderHelper.startAngle=this.wheelnav.spreaderStartAngle,this.spreaderHelper.sliceAngle=this.wheelnav.spreaderSliceAngle,b=this.wheelnav,this.animateeffect="bounce",this.animatetime=1500,null!==this.wheelnav.animateeffect&&(this.animateeffect=this.wheelnav.animateeffect),null!==this.wheelnav.animatetime&&(this.animatetime=this.wheelnav.animatetime),this.fontAttr=null!==this.wheelnav.spreaderTitleFont?{font:this.wheelnav.spreaderTitleFont}:{font:"100 32px Impact, Charcoal, sans-serif"},this.spreaderPathIn=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderInPercent,this.wheelnav.spreaderPathCustom),this.spreaderPathOut=this.wheelnav.spreaderPathFunction(this.spreaderHelper,this.wheelnav.spreaderOutPercent,this.wheelnav.spreaderPathCustom),c=this.spreaderPathOut,b.initPercentthis.wheelnav.minPercent?this.spreaderPathOut.spreaderPathString:this.spreaderPathIn.spreaderPathString,spreaderTransformAttr={path:currentPath},this.spreaderPath.animate(spreaderTransformAttr,this.animatetime,this.animateeffect);var b,c,d;this.wheelnav.currentPercent===this.wheelnav.maxPercent?(b=this.outTitle,c=this.wheelnav.spreaderTitleOutAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathOutAttr),d=this.outTitleSizeTransform):(b=this.inTitle,c=this.wheelnav.spreaderTitleInAttr,this.spreaderPath.attr(this.wheelnav.spreaderPathInAttr),d=this.inTitleSizeTransform),wheelnavTitle().isPathTitle(b.title)?(c.path=b.path,c.transform=d):wheelnavTitle().isImageTitle(b.title)?(c.x=b.x,c.y=b.y,c.width=b.width,c.height=b.height,this.spreaderTitle.attr({src:b.src})):(offYOffset=0,"-"===b.title&&(offYOffset=3),c.x=b.x,c.y=b.y-offYOffset,null!==b.title&&this.spreaderTitle.attr({text:b.title})),this.spreaderTitle.animate(c,this.animatetime,this.animateeffect)}this.spreaderPath.toFront(),this.spreaderTitle.toFront()}},spreaderPath=function(){return this.NullSpreader=function(a,b){return null===b&&(b=new spreaderPathCustomization),a.setBaseValue(b.spreaderPercent,b),{spreaderPathString:"",titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.PieSpreaderCustomization=function(){var a=new spreaderPathCustomization;return a.spreaderRadius=25,a.arcBaseRadiusPercent=1,a.arcRadiusPercent=1,a.startRadiusPercent=0,a},this.PieSpreader=function(a,b,c){null===c&&(c=PieSpreaderCustomization()),a.setBaseValue(c.spreaderPercent*b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return spreaderPathString=[],a.StartSpreader(spreaderPathString,a.startAngle,d),spreaderPathString.push(a.ArcTo(e,a.middleAngle,d)),spreaderPathString.push(a.ArcTo(e,a.endAngle,d)),spreaderPathString.push(a.Close()),{spreaderPathString:spreaderPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.StarSpreaderCustomization=function(){var a=new spreaderPathCustomization;return a.minRadiusPercent=.5,a},this.StarSpreader=function(a,b,c){null===c&&(c=StarSpreaderCustomization()),a.setBaseValue(c.spreaderPercent*b,c),rbase=a.wheelRadius*c.spreaderPercent*c.minRadiusPercent*b,r=a.sliceRadius,spreaderPathString=[],sliceAngle=a.sliceAngle/a.navItemCount,baseAngle=a.navAngle,a.endAngle-a.startAngle<360&&(baseAngle=a.startAngle),a.StartSpreader(spreaderPathString,baseAngle,r);for(var d=0;d=b&&(d=11),middleTheta=a.middleTheta,markerPathString=[["M",a.titlePosX-d*Math.cos(middleTheta),a.titlePosY-d*Math.sin(middleTheta)],["A",d,d,0,0,1,a.titlePosX+d*Math.cos(middleTheta),a.titlePosY+d*Math.sin(middleTheta)],["A",d,d,0,0,1,a.titlePosX-d*Math.cos(middleTheta),a.titlePosY-d*Math.sin(middleTheta)],["z"]],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.LineMarkerCustomization=function(){var a=new markerPathCustomization;return a.arcBaseRadiusPercent=1.05,a.arcRadiusPercent=1.2,a.startRadiusPercent=0,a},this.LineMarker=function(a,b,c){null===c&&(c=LineMarkerCustomization()),a.setBaseValue(c.markerPercent*b,c);var d=a.sliceRadius*c.arcBaseRadiusPercent,e=a.sliceRadius*c.arcRadiusPercent;return markerPathString=[a.MoveTo(a.navAngle,d),a.LineTo(a.navAngle,e),a.Close()],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this.DropMarkerCustomization=function(){var a=new markerPathCustomization;return a.dropBaseRadiusPercent=0,a.dropRadiusPercent=.15,a},this.DropMarker=function(a,b,c){null===c&&(c=DropMarkerCustomization()),a.setBaseValue(c.markerPercent*b,c);var d=a.sliceRadius*c.dropBaseRadiusPercent,e=a.startAngle+.2*a.sliceAngle,f=a.startAngle,g=a.startAngle+.8*a.sliceAngle,h=a.startAngle+a.sliceAngle,i=a.sliceRadius*c.dropRadiusPercent;return markerPathString=[a.MoveTo(0,i),a.ArcTo(i,180,i),a.ArcTo(i,360,i),a.MoveTo(a.navAngle,d),a.LineTo(e,i),a.LineTo(f,i),a.LineTo(a.navAngle,1.6*i),a.LineTo(h,i),a.LineTo(g,i),a.Close()],{markerPathString:markerPathString,titlePosX:a.titlePosX,titlePosY:a.titlePosY}},this},colorpalette={defaultpalette:["#2D9E46","#F5BE41","#F77604","#D63C22","#006BA6","#92ADAF"],purple:["#4F346B","#623491","#9657D6","#AD74E7","#CBA3F3"],greenred:["#17B92A","#FF3D00","#17B92A","#FF3D00"],greensilver:["#1F700A","#79CC3C","#D4E178","#E6D5C3","#AC875D"],oceanfive:["#00A0B0","#6A4A3C","#CC333F","#EB6841","#EDC951"],garden:["#648A4F","#2B2B29","#DF6126","#FFA337","#F57C85"],gamebookers:["#FF9900","#DCDCDC","#BCBCBC","#3299BB","#727272"],parrot:["#D80351","#F5D908","#00A3EE","#929292","#3F3F3F"],pisycholand:["#FF1919","#FF5E19","#FF9F19","#E4FF19","#29FF19"],makeLOVEnotWAR:["#2C0EF0","#B300FF","#6751F0","#FF006F","#8119FF"],theworldismine:["#F21D1D","#FF2167","#B521FF","#7E2AA8","#000000"],fractalloveone:["#002EFF","#00FFF7","#00FF62","#FFAA00","#FFF700"], +fractallovetwo:["#FF9500","#FF0000","#FF00F3","#AA00FF","#002EFF"],fractallove:["#002EFF","#00FFF7","#00FF62","#FFAA00","#F5D908","#FF0000","#FF00F3","#AA00FF"],sprinkles:["#272523","#FFACAC","#FFD700","#00590C","#08006D"],goldenyellow:["#D8B597","#8C4006","#B6690F","#E3C57F","#FFEDBE"],hotaru:["#364C4A","#497C7F","#92C5C0","#858168","#CCBCA5"]},function(a){var b,c,d="0.4.2",e="hasOwnProperty",f=/[\.\/]/,g="*",h=function(){},i=function(a,b){return a-b},j={n:{}},k=function(a,d){var e,f;a=String(a);var g,h=c,j=Array.prototype.slice.call(arguments,2),l=k.listeners(a),m=0,n=[],o={},p=[],q=b;for(b=a,c=0,e=0,f=l.length;f>e;e++)"zIndex"in l[e]&&(n.push(l[e].zIndex),l[e].zIndex<0&&(o[l[e].zIndex]=l[e]));for(n.sort(i);n[m]<0;)if(g=o[n[m++]],p.push(g.apply(d,j)),c)return c=h,p;for(e=0;f>e;e++)if(g=l[e],"zIndex"in g)if(g.zIndex==n[m]){if(p.push(g.apply(d,j)),c)break;do if(m++,g=o[n[m]],g&&p.push(g.apply(d,j)),c)break;while(g)}else o[g.zIndex]=g;else if(p.push(g.apply(d,j)),c)break;return c=h,b=q,p.length?p:null};k._events=j,k.listeners=function(a){for(var b,c,d,e,h,i,k=a.split(f),l=j,m=[l],n=[],o=0,p=k.length;p>o;o++){for(i=[],e=0,h=m.length;h>e;e++)for(l=m[e].n,c=[l[k[o]],l[g]],d=2;d--;)b=c[d],b&&(i.push(b),n=n.concat(b.f||[]));m=i}return n},k.on=function(a,b){var c,d,e,g;if(a=String(a),"function"!=typeof b)return function(){};for(c=a.split(f),d=j,e=0,g=c.length;g>e;e++)d=d.n,d=d.hasOwnProperty(c[e])&&d[c[e]]||(d[c[e]]={n:{}});for(d.f=d.f||[],e=0,g=d.f.length;g>e;e++)if(d.f[e]==b)return h;return d.f.push(b),function(a){+a==+a&&(b.zIndex=+a)}},k.f=function(a){var b=[].slice.call(arguments,1);return function(){k.apply(null,[a,null].concat(b).concat([].slice.call(arguments,0)))}},k.stop=function(){c=1},k.nt=function(a){return a?new RegExp("(?:\\.|\\/|^)"+a+"(?:\\.|\\/|$)").test(b):b},k.nts=function(){return b.split(f)},k.off=k.unbind=function(a,b){var c,d,h,i,l,m,n,o,p,q;if(!a)return void(k._events=j={n:{}});for(c=a.split(f),p=[j],l=0,m=c.length;m>l;l++)for(n=0;nl;l++)for(d=p[l];d.n;){if(b){if(d.f){for(n=0,o=d.f.length;o>n;n++)if(d.f[n]==b){d.f.splice(n,1);break}d.f.length||delete d.f}for(h in d.n)if(d.n[e](h)&&d.n[h].f){for(q=d.n[h].f,n=0,o=q.length;o>n;n++)if(q[n]==b){q.splice(n,1);break}q.length||delete d.n[h].f}}else{delete d.f;for(h in d.n)d.n[e](h)&&d.n[h].f&&delete d.n[h].f}d=d.n}},k.once=function(a,b){var c=function(){return k.unbind(a,c),b.apply(this,arguments)};return k.on(a,c)},k.version=d,k.toString=function(){return"You are running Eve "+d},"undefined"!=typeof module&&module.exports?module.exports=k:"undefined"!=typeof define?define("eve",[],function(){return k}):a.eve=k}(window||this),function(a,b){"function"==typeof define&&define.amd?define(["eve"],function(c){return b(a,c)}):b(a,a.eve)}(this,function(a,b){function c(a){var d,e;return c.is(a,"function")?H?a():b.on("raphael.DOMload",a):c.is(a,ga)?c._engine.create[Q](c,a.splice(0,3+c.is(a[0],ea))).add(a):(d=Array.prototype.slice.call(arguments,0),c.is(d[d.length-1],"function")?(e=d.pop(),H?e.call(c._engine.create[Q](c,d)):b.on("raphael.DOMload",function(){e.call(c._engine.create[Q](c,d))})):c._engine.create[Q](c,arguments))}function d(a){var b,c;if("function"==typeof a||Object(a)!==a)return a;b=new a.constructor;for(c in a)a[M](c)&&(b[c]=d(a[c]));return b}function e(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return a.push(a.splice(c,1)[0])}function f(a,b,c){function d(){var f=Array.prototype.slice.call(arguments,0),g=f.join("␀"),h=d.cache=d.cache||{},i=d.count=d.count||[];return h[M](g)?(e(i,g),c?c(h[g]):h[g]):(i.length>=1e3&&delete h[i.shift()],i.push(g),h[g]=a[Q](b,f),c?c(h[g]):h[g])}return d}function g(){return this.hex}function h(a,b){for(var c,d=[],e=0,f=a.length;f-2*!b>e;e+=2)c=[{x:+a[e-2],y:+a[e-1]},{x:+a[e],y:+a[e+1]},{x:+a[e+2],y:+a[e+3]},{x:+a[e+4],y:+a[e+5]}],b?e?f-4==e?c[3]={x:+a[0],y:+a[1]}:f-2==e&&(c[2]={x:+a[0],y:+a[1]},c[3]={x:+a[2],y:+a[3]}):c[0]={x:+a[f-2],y:+a[f-1]}:f-4==e?c[3]=c[2]:e||(c[0]={x:+a[e],y:+a[e+1]}),d.push(["C",(-c[0].x+6*c[1].x+c[2].x)/6,(-c[0].y+6*c[1].y+c[2].y)/6,(c[1].x+6*c[2].x-c[3].x)/6,(c[1].y+6*c[2].y-c[3].y)/6,c[2].x,c[2].y]);return d}function i(a,b,c,d,e){var f=-3*b+9*c-9*d+3*e,g=a*f+6*b-12*c+6*d;return a*g-3*b+3*c}function j(a,b,c,d,e,f,g,h,j){var k;null==j&&(j=1),j=j>1?1:0>j?0:j;var l=j/2,m=[-.1252,.1252,-.3678,.3678,-.5873,.5873,-.7699,.7699,-.9041,.9041,-.9816,.9816],n=[.2491,.2491,.2335,.2335,.2032,.2032,.1601,.1601,.1069,.1069,.0472,.0472],o=0;for(k=0;12>k;k++){var p=l*m[k]+l,q=i(p,a,c,e,g),r=i(p,b,d,f,h),s=q*q+r*r;o+=n[k]*$.sqrt(s)}return l*o}function k(a,b,c,d,e,f,g,h,i){if(!(0>i||j(a,b,c,d,e,f,g,h).01;)l/=2,m+=(i>n?1:-1)*l,n=j(a,b,c,d,e,f,g,h,m);return m}}function l(a,b,c,d,e,f,g,h){if(!(_(a,c)_(e,g)||_(b,d)_(f,h))){var i=(a*d-b*c)*(e-g)-(a-c)*(e*h-f*g),j=(a*d-b*c)*(f-h)-(b-d)*(e*h-f*g),k=(a-c)*(f-h)-(b-d)*(e-g);if(k){var l=i/k,m=j/k,n=+l.toFixed(2),o=+m.toFixed(2);if(!(n<+aa(a,c).toFixed(2)||n>+_(a,c).toFixed(2)||n<+aa(e,g).toFixed(2)||n>+_(e,g).toFixed(2)||o<+aa(b,d).toFixed(2)||o>+_(b,d).toFixed(2)||o<+aa(f,h).toFixed(2)||o>+_(f,h).toFixed(2)))return{x:l,y:m}}}}function m(a,b,d){var e,f,g,h,i,k=c.bezierBBox(a),m=c.bezierBBox(b);if(!c.isBBoxIntersect(k,m))return d?0:[];var n=j.apply(0,a),o=j.apply(0,b),p=_(~~(n/5),1),q=_(~~(o/5),1),r=[],s=[],t={},u=d?0:[];for(e=0;p+1>e;e++)f=c.findDotsAtSegment.apply(c,a.concat(e/p)),r.push({x:f.x,y:f.y,t:e/p});for(e=0;q+1>e;e++)f=c.findDotsAtSegment.apply(c,b.concat(e/q)),s.push({x:f.x,y:f.y,t:e/q});for(e=0;p>e;e++)for(g=0;q>g;g++){var v=r[e],w=r[e+1],x=s[g],y=s[g+1],z=ba(w.x-v.x)<.001?"y":"x",A=ba(y.x-x.x)<.001?"y":"x",B=l(v.x,v.y,w.x,w.y,x.x,x.y,y.x,y.y);if(B){if(t[B.x.toFixed(4)]==B.y.toFixed(4))continue;t[B.x.toFixed(4)]=B.y.toFixed(4),h=v.t+ba((B[z]-v[z])/(w[z]-v[z]))*(w.t-v.t),i=x.t+ba((B[A]-x[A])/(y[A]-x[A]))*(y.t-x.t),h>=0&&1.001>=h&&i>=0&&1.001>=i&&(d?u++:u.push({x:B.x,y:B.y,t1:aa(h,1),t2:aa(i,1)}))}}return u}function n(a,b,d){var e,f,g,h,i,j,k,l,n,o,p,q,r,s,t,u,v,w,x,y;for(a=c._path2curve(a),b=c._path2curve(b),p=d?0:[],q=0,r=a.length;r>q;q++)if(s=a[q],"M"==s[0])e=i=s[1],f=j=s[2];else for("C"==s[0]?(n=[e,f].concat(s.slice(1)),e=n[6],f=n[7]):(n=[e,f,e,f,i,j,i,j],e=i,f=j),t=0,u=b.length;u>t;t++)if(v=b[t],"M"==v[0])g=k=v[1],h=l=v[2];else if("C"==v[0]?(o=[g,h].concat(v.slice(1)),g=o[6],h=o[7]):(o=[g,h,g,h,k,l,k,l],g=k,h=l),w=m(n,o,d),d)p+=w;else{for(x=0,y=w.length;y>x;x++)w[x].segment1=q,w[x].segment2=t,w[x].bez1=n,w[x].bez2=o;p=p.concat(w)}return p}function o(a,b,c,d,e,f){null!=a?(this.a=+a,this.b=+b,this.c=+c,this.d=+d,this.e=+e,this.f=+f):(this.a=1,this.b=0,this.c=0,this.d=1,this.e=0,this.f=0)}function p(){return this.x+U+this.y+U+this.width+" × "+this.height}function q(a,b,c,d,e,f){function g(a){return((l*a+k)*a+j)*a}function h(a,b){var c=i(a,b);return((o*c+n)*c+m)*c}function i(a,b){for(var c,d,e,f,h=a,i=0;8>i;i++){if(e=g(h)-a,ba(e)h)return c;if(h>d)return d;for(;d>c;){if(e=g(h),ba(e-a)e?c=h:d=h,h=(d-c)/2+c}return h}var j=3*b,k=3*(d-b)-j,l=1-j-k,m=3*c,n=3*(e-c)-m,o=1-m-n;return h(a,1/(200*f))}function r(a,b){var c,d=[],e={};if(this.ms=b,this.times=1,a){for(c in a)a[M](c)&&(e[ma(c)]=a[c],d.push(ma(c)));d.sort(ya)}this.anim=e,this.top=d[d.length-1],this.percents=d}function s(a,d,e,f,g,h){var i,j,k,l,m,n,p,r,s,t,u,v,w,x,y,z,A,B;e=ma(e);var C,D,E,F,G,H,I=a.ms,K={},L={},N={};if(f){for(j=0,k=nb.length;k>j;j++)if(i=nb[j],i.el.id==d.id&&i.anim==a){i.percent!=e?(nb.splice(j,1),E=1):D=i,d.attr(i.totalOrigin);break}}else f=+L;for(j=0,k=a.percents.length;k>j;j++){if(a.percents[j]==e||a.percents[j]>f*a.top){e=a.percents[j],G=a.percents[j-1]||0,I=I/a.top*(e-G),F=a.percents[j+1],C=a.anim[e];break}f&&d.attr(a.anim[a.percents[j]])}if(C){if(D)D.initstatus=f,D.start=new Date-D.ms*f;else{for(l in C)if(C[M](l)&&(qa[M](l)||d.paper.customAttributes[M](l)))switch(K[l]=d.attr(l),null==K[l]&&(K[l]=pa[l]),L[l]=C[l],qa[l]){case ea:N[l]=(L[l]-K[l])/I;break;case"colour":K[l]=c.getRGB(K[l]),m=c.getRGB(L[l]),N[l]={r:(m.r-K[l].r)/I,g:(m.g-K[l].g)/I,b:(m.b-K[l].b)/I};break;case"path":for(n=Ua(K[l],L[l]),p=n[1],K[l]=n[0],N[l]=[],j=0,k=K[l].length;k>j;j++)for(N[l][j]=[0],r=1,s=K[l][j].length;s>r;r++)N[l][j][r]=(p[j][r]-K[l][j][r])/I;break;case"transform":if(t=d._,u=Za(t[l],L[l]))for(K[l]=u.from,L[l]=u.to,N[l]=[],N[l].real=!0,j=0,k=K[l].length;k>j;j++)for(N[l][j]=[K[l][j][0]],r=1,s=K[l][j].length;s>r;r++)N[l][j][r]=(L[l][j][r]-K[l][j][r])/I;else v=d.matrix||new o,w={_:{transform:t.transform},getBBox:function(){return d.getBBox(1)}},K[l]=[v.a,v.b,v.c,v.d,v.e,v.f],Xa(w,L[l]),L[l]=w._.transform,N[l]=[(w.matrix.a-v.a)/I,(w.matrix.b-v.b)/I,(w.matrix.c-v.c)/I,(w.matrix.d-v.d)/I,(w.matrix.e-v.e)/I,(w.matrix.f-v.f)/I];break;case"csv":if(x=V(C[l])[W](J),y=V(K[l])[W](J),"clip-rect"==l)for(K[l]=y,N[l]=[],j=y.length;j--;)N[l][j]=(x[j]-K[l][j])/I;L[l]=x;break;default:for(x=[][R](C[l]),y=[][R](K[l]),N[l]=[],j=d.paper.customAttributes[l].length;j--;)N[l][j]=((x[j]||0)-(y[j]||0))/I}if(z=C.easing,A=c.easing_formulas[z],A||(A=V(z).match(ka),A&&5==A.length?(B=A,A=function(a){return q(a,+B[1],+B[2],+B[3],+B[4],I)}):A=Aa),H=C.start||a.start||+new Date,i={anim:a,percent:e,timestamp:H,start:H+(a.del||0),status:0,initstatus:f||0,stop:!1,ms:I,easing:A,from:K,diff:N,to:L,el:d,callback:C.callback,prev:G,next:F,repeat:h||a.times,origin:d.attr(),totalOrigin:g},nb.push(i),f&&!D&&!E&&(i.stop=!0,i.start=new Date-I*f,1==nb.length))return pb();E&&(i.start=new Date-i.ms*f),1==nb.length&&ob(pb)}b("raphael.anim.start."+d.id,d,a)}}function t(a){for(var b=0;be;e++)for(i=a[e],f=1,h=i.length;h>f;f+=2)c=b.x(i[f],i[f+1]),d=b.y(i[f],i[f+1]),i[f]=c,i[f+1]=d;return a};if(c._g=N,c.type=N.win.SVGAngle||N.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure","1.1")?"SVG":"VML","VML"==c.type){if(u=N.doc.createElement("div"),u.innerHTML='',v=u.firstChild,v.style.behavior="url(#default#VML)",!(v&&"object"==typeof v.adj))return c.type=T;u=null}c.svg=!(c.vml="VML"==c.type),c._Paper=P,c.fn=I=P.prototype=c.prototype,c._id=0,c._oid=0,c.is=function(a,b){return b=Z.call(b),"finite"==b?!ja[M](+a):"array"==b?a instanceof Array:"null"==b&&null===a||b==typeof a&&null!==a||"object"==b&&a===Object(a)||"array"==b&&Array.isArray&&Array.isArray(a)||ha.call(a).slice(8,-1).toLowerCase()==b},c.angle=function(a,b,d,e,f,g){if(null==f){var h=a-d,i=b-e;return h||i?(180+180*$.atan2(-i,-h)/da+360)%360:0}return c.angle(a,b,f,g)-c.angle(d,e,f,g)},c.rad=function(a){return a%360*da/180},c.deg=function(a){return 180*a/da%360},c.snapTo=function(a,b,d){var e,f;if(d=c.is(d,"finite")?d:10,c.is(a,ga)){for(e=a.length;e--;)if(ba(a[e]-b)<=d)return a[e]}else{if(a=+a,f=b%a,d>f)return b-f;if(f>a-d)return b-f+a}return b},w=c.createUUID=function(a,b){return function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(a,b).toUpperCase()}}(/[xy]/g,function(a){var b=16*$.random()|0,c="x"==a?b:3&b|8;return c.toString(16)}),c.setWindow=function(a){b("raphael.setWindow",c,N.win,a),N.win=a,N.doc=N.win.document,c._engine.initWin&&c._engine.initWin(N.win)};var Fa=function(a){var b,d,e,g,h;if(c.vml){b=/^\s+|\s+$/g;try{e=new ActiveXObject("htmlfile"),e.write(""),e.close(),d=e.body}catch(i){d=createPopup().document.body}g=d.createTextRange(),Fa=f(function(a){try{d.style.color=V(a).replace(b,T);var c=g.queryCommandValue("ForeColor");return c=(255&c)<<16|65280&c|(16711680&c)>>>16,"#"+("000000"+c.toString(16)).slice(-6)}catch(e){return"none"}})}else h=N.doc.createElement("i"),h.title="Raphaël Colour Picker",h.style.display="none",N.doc.body.appendChild(h),Fa=f(function(a){return h.style.color=a,N.doc.defaultView.getComputedStyle(h,T).getPropertyValue("color")});return Fa(a)},Ga=function(){return"hsb("+[this.h,this.s,this.b]+")"},Ha=function(){return"hsl("+[this.h,this.s,this.l]+")"},Ia=function(){return this.hex},Ja=function(a,b,d){if(null==b&&c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a&&(d=a.b,b=a.g,a=a.r),null==b&&c.is(a,fa)){var e=c.getRGB(a);a=e.r,b=e.g,d=e.b}return(a>1||b>1||d>1)&&(a/=255,b/=255,d/=255),[a,b,d]},Ka=function(a,b,d,e){a*=255,b*=255,d*=255;var f={r:a,g:b,b:d,hex:c.rgb(a,b,d),toString:Ia};return c.is(e,"finite")&&(f.opacity=e),f};c.color=function(a){var b;return c.is(a,"object")&&"h"in a&&"s"in a&&"b"in a?(b=c.hsb2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):c.is(a,"object")&&"h"in a&&"s"in a&&"l"in a?(b=c.hsl2rgb(a),a.r=b.r,a.g=b.g,a.b=b.b,a.hex=b.hex):(c.is(a,"string")&&(a=c.getRGB(a)),c.is(a,"object")&&"r"in a&&"g"in a&&"b"in a?(b=c.rgb2hsl(a),a.h=b.h,a.s=b.s,a.l=b.l,b=c.rgb2hsb(a),a.v=b.b):(a={hex:"none"},a.r=a.g=a.b=a.h=a.s=a.v=a.l=-1)),a.toString=Ia,a},c.hsb2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"b"in a&&(c=a.b,b=a.s,a=a.h,d=a.o),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-ba(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Ka(e,f,g,d)},c.hsl2rgb=function(a,b,c,d){this.is(a,"object")&&"h"in a&&"s"in a&&"l"in a&&(c=a.l,b=a.s,a=a.h),(a>1||b>1||c>1)&&(a/=360,b/=100,c/=100),a*=360;var e,f,g,h,i;return a=a%360/60,i=2*b*(.5>c?c:1-c),h=i*(1-ba(a%2-1)),e=f=g=c-i/2,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],Ka(e,f,g,d)},c.rgb2hsb=function(a,b,c){c=Ja(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g;return f=_(a,b,c),g=f-aa(a,b,c),d=0==g?null:f==a?(b-c)/g:f==b?(c-a)/g+2:(a-b)/g+4,d=(d+360)%6/6,e=0==g?0:g/f,{h:d,s:e,b:f,toString:Ga}},c.rgb2hsl=function(a,b,c){c=Ja(a,b,c),a=c[0],b=c[1],c=c[2];var d,e,f,g,h,i;return g=_(a,b,c),h=aa(a,b,c),i=g-h,d=0==i?null:g==a?(b-c)/i:g==b?(c-a)/i+2:(a-b)/i+4,d=(d+360)%6/6,f=(g+h)/2,e=0==i?0:.5>f?i/(2*f):i/(2-2*f),{h:d,s:e,l:f,toString:Ha}},c._path2string=function(){return this.join(",").replace(ta,"$1")},x=c._preload=function(a,b){var c=N.doc.createElement("img");c.style.cssText="position:absolute;left:-9999em;top:-9999em",c.onload=function(){b.call(this),this.onload=null,N.doc.body.removeChild(this)},c.onerror=function(){N.doc.body.removeChild(this)},N.doc.body.appendChild(c),c.src=a},c.getRGB=f(function(a){if(!a||(a=V(a)).indexOf("-")+1)return{r:-1,g:-1,b:-1,hex:"none",error:1,toString:g};if("none"==a)return{r:-1,g:-1,b:-1,hex:"none",toString:g};sa[M](a.toLowerCase().substring(0,2))||"#"==a.charAt()||(a=Fa(a));var b,d,e,f,h,i,j=a.match(ia);return j?(j[2]&&(e=na(j[2].substring(5),16),d=na(j[2].substring(3,5),16),b=na(j[2].substring(1,3),16)),j[3]&&(e=na((h=j[3].charAt(3))+h,16),d=na((h=j[3].charAt(2))+h,16),b=na((h=j[3].charAt(1))+h,16)),j[4]&&(i=j[4][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),"rgba"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100)),j[5]?(i=j[5][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsba"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsb2rgb(b,d,e,f)):j[6]?(i=j[6][W](ra),b=ma(i[0]),"%"==i[0].slice(-1)&&(b*=2.55),d=ma(i[1]),"%"==i[1].slice(-1)&&(d*=2.55),e=ma(i[2]),"%"==i[2].slice(-1)&&(e*=2.55),("deg"==i[0].slice(-3)||"°"==i[0].slice(-1))&&(b/=360),"hsla"==j[1].toLowerCase().slice(0,4)&&(f=ma(i[3])),i[3]&&"%"==i[3].slice(-1)&&(f/=100),c.hsl2rgb(b,d,e,f)):(j={r:b,g:d,b:e,toString:g},j.hex="#"+(16777216|e|d<<8|b<<16).toString(16).slice(1),c.is(f,"finite")&&(j.opacity=f),j)):{r:-1,g:-1,b:-1,hex:"none",error:1,toString:g}},c),c.hsb=f(function(a,b,d){return c.hsb2rgb(a,b,d).hex}),c.hsl=f(function(a,b,d){return c.hsl2rgb(a,b,d).hex}),c.rgb=f(function(a,b,c){return"#"+(16777216|c|b<<8|a<<16).toString(16).slice(1)}),c.getColor=function(a){var b=this.getColor.start=this.getColor.start||{h:0,s:1,b:a||.75},c=this.hsb2rgb(b.h,b.s,b.b);return b.h+=.075,b.h>1&&(b.h=0,b.s-=.2,b.s<=0&&(this.getColor.start={h:0,s:1,b:b.b})),c.hex},c.getColor.reset=function(){delete this.start},c.parsePathString=function(a){var b,d,e;return a?(b=y(a),b.arr?Ma(b.arr):(d={a:7,c:6,h:1,l:2,m:2,r:4,q:4,s:4,t:2,v:1,z:0},e=[],c.is(a,ga)&&c.is(a[0],ga)&&(e=Ma(a)),e.length||V(a).replace(ua,function(a,b,c){var f=[],g=b.toLowerCase();if(c.replace(wa,function(a,b){b&&f.push(+b)}),"m"==g&&f.length>2&&(e.push([b][R](f.splice(0,2))),g="l",b="m"==b?"l":"L"),"r"==g)e.push([b][R](f));else for(;f.length>=d[g]&&(e.push([b][R](f.splice(0,d[g]))),d[g]););}),e.toString=c._path2string,b.arr=Ma(e),e)):null},c.parseTransformString=f(function(a){if(!a)return null;var b=[];return c.is(a,ga)&&c.is(a[0],ga)&&(b=Ma(a)),b.length||V(a).replace(va,function(a,c,d){var e=[];Z.call(c);d.replace(wa,function(a,b){b&&e.push(+b)}),b.push([c][R](e))}),b.toString=c._path2string,b}),y=function(a){var b=y.ps=y.ps||{};return b[a]?b[a].sleep=100:b[a]={sleep:100},setTimeout(function(){for(var c in b)b[M](c)&&c!=a&&(b[c].sleep--,b[c].sleep||delete b[c])}),b[a]},c.findDotsAtSegment=function(a,b,c,d,e,f,g,h,i){var j=1-i,k=ca(j,3),l=ca(j,2),m=i*i,n=m*i,o=k*a+3*l*i*c+3*j*i*i*e+n*g,p=k*b+3*l*i*d+3*j*i*i*f+n*h,q=a+2*i*(c-a)+m*(e-2*c+a),r=b+2*i*(d-b)+m*(f-2*d+b),s=c+2*i*(e-c)+m*(g-2*e+c),t=d+2*i*(f-d)+m*(h-2*f+d),u=j*a+i*c,v=j*b+i*d,w=j*e+i*g,x=j*f+i*h,y=90-180*$.atan2(q-s,r-t)/da;return(q>s||t>r)&&(y+=180),{x:o,y:p,m:{x:q,y:r},n:{x:s,y:t},start:{x:u,y:v},end:{x:w,y:x},alpha:y}},c.bezierBBox=function(a,b,d,e,f,g,h,i){c.is(a,"array")||(a=[a,b,d,e,f,g,h,i]);var j=Ta.apply(null,a);return{x:j.min.x,y:j.min.y,x2:j.max.x,y2:j.max.y,width:j.max.x-j.min.x,height:j.max.y-j.min.y}},c.isPointInsideBBox=function(a,b,c){return b>=a.x&&b<=a.x2&&c>=a.y&&c<=a.y2},c.isBBoxIntersect=function(a,b){var d=c.isPointInsideBBox;return d(b,a.x,a.y)||d(b,a.x2,a.y)||d(b,a.x,a.y2)||d(b,a.x2,a.y2)||d(a,b.x,b.y)||d(a,b.x2,b.y)||d(a,b.x,b.y2)||d(a,b.x2,b.y2)||(a.xb.x||b.xa.x)&&(a.yb.y||b.ya.y)},c.pathIntersection=function(a,b){return n(a,b)},c.pathIntersectionNumber=function(a,b){return n(a,b,1)},c.isPointInsidePath=function(a,b,d){var e=c.pathBBox(a);return c.isPointInsideBBox(e,b,d)&&n(a,[["M",b,d],["H",e.x2+10]],1)%2==1},c._removedFactory=function(a){return function(){b("raphael.log",null,"Raphaël: you are calling to method “"+a+"” of removed object",a)}};var La=c.pathBBox=function(a){var b,c,e,f=y(a);if(f.bbox)return d(f.bbox);if(!a)return{x:0,y:0,width:0,height:0,x2:0,y2:0};a=Ua(a);var g,h=0,i=0,j=[],k=[];for(b=0,c=a.length;c>b;b++)g=a[b],"M"==g[0]?(h=g[1],i=g[2],j.push(h),k.push(i)):(e=Ta(h,i,g[1],g[2],g[3],g[4],g[5],g[6]),j=j[R](e.min.x,e.max.x),k=k[R](e.min.y,e.max.y),h=g[5],i=g[6]);var l=aa[Q](0,j),m=aa[Q](0,k),n=_[Q](0,j),o=_[Q](0,k),p=n-l,q=o-m,r={x:l,y:m,x2:n,y2:o,width:p,height:q,cx:l+p/2,cy:m+q/2};return f.bbox=d(r),r},Ma=function(a){var b=d(a);return b.toString=c._path2string,b},Na=c._pathToRelative=function(a){var b,d,e,f,g,h,i,j,k,l=y(a);if(l.rel)return Ma(l.rel);c.is(a,ga)&&c.is(a&&a[0],ga)||(a=c.parsePathString(a));var m=[],n=0,o=0,p=0,q=0,r=0;for("M"==a[0][0]&&(n=a[0][1],o=a[0][2],p=n,q=o,r++,m.push(["M",n,o])),b=r,d=a.length;d>b;b++){if(e=m[b]=[],f=a[b],f[0]!=Z.call(f[0]))switch(e[0]=Z.call(f[0]),e[0]){case"a":e[1]=f[1],e[2]=f[2],e[3]=f[3],e[4]=f[4],e[5]=f[5],e[6]=+(f[6]-n).toFixed(3),e[7]=+(f[7]-o).toFixed(3);break;case"v":e[1]=+(f[1]-o).toFixed(3);break;case"m":p=f[1],q=f[2];default:for(g=1,h=f.length;h>g;g++)e[g]=+(f[g]-(g%2?n:o)).toFixed(3)}else for(e=m[b]=[],"m"==f[0]&&(p=f[1]+n,q=f[2]+o),i=0,j=f.length;j>i;i++)m[b][i]=f[i];switch(k=m[b].length,m[b][0]){case"z":n=p,o=q;break;case"h":n+=+m[b][k-1];break;case"v":o+=+m[b][k-1];break;default:n+=+m[b][k-2],o+=+m[b][k-1]}}return m.toString=c._path2string,l.rel=Ma(m),m},Oa=c._pathToAbsolute=function(a){var b,d,e,f,g,i,j,k,l,m,n=y(a);if(n.abs)return Ma(n.abs);if(c.is(a,ga)&&c.is(a&&a[0],ga)||(a=c.parsePathString(a)),!a||!a.length)return[["M",0,0]];var o=[],p=0,q=0,r=0,s=0,t=0;for("M"==a[0][0]&&(p=+a[0][1],q=+a[0][2],r=p,s=q,t++,o[0]=["M",p,q]),b=3==a.length&&"M"==a[0][0]&&"R"==a[1][0].toUpperCase()&&"Z"==a[2][0].toUpperCase(),f=t,g=a.length;g>f;f++){if(o.push(d=[]),e=a[f],e[0]!=oa.call(e[0]))switch(d[0]=oa.call(e[0]),d[0]){case"A":d[1]=e[1],d[2]=e[2],d[3]=e[3],d[4]=e[4],d[5]=e[5],d[6]=+(e[6]+p),d[7]=+(e[7]+q);break;case"V":d[1]=+e[1]+q;break;case"H":d[1]=+e[1]+p;break;case"R":for(i=[p,q][R](e.slice(1)),j=2,k=i.length;k>j;j++)i[j]=+i[j]+p,i[++j]=+i[j]+q;o.pop(),o=o[R](h(i,b));break;case"M":r=+e[1]+p,s=+e[2]+q;default:for(j=1,k=e.length;k>j;j++)d[j]=+e[j]+(j%2?p:q)}else if("R"==e[0])i=[p,q][R](e.slice(1)),o.pop(),o=o[R](h(i,b)),d=["R"][R](e.slice(-2));else for(l=0,m=e.length;m>l;l++)d[l]=e[l];switch(d[0]){case"Z":p=r,q=s;break;case"H":p=d[1];break;case"V":q=d[1];break;case"M":r=d[d.length-2],s=d[d.length-1];default:p=d[d.length-2],q=d[d.length-1]}}return o.toString=c._path2string,n.abs=Ma(o),o},Pa=function(a,b,c,d){return[a,b,c,d,c,d]},Qa=function(a,b,c,d,e,f){var g=1/3,h=2/3;return[g*a+h*c,g*b+h*d,g*e+h*c,g*f+h*d,e,f]},Ra=function(a,b,c,d,e,g,h,i,j,k){var l,m,n,o,p,q=120*da/180,r=da/180*(+e||0),s=[],t=f(function(a,b,c){var d=a*$.cos(c)-b*$.sin(c),e=a*$.sin(c)+b*$.cos(c);return{x:d,y:e}});if(k)C=k[0],D=k[1],A=k[2],B=k[3];else{l=t(a,b,-r),a=l.x,b=l.y,l=t(i,j,-r),i=l.x,j=l.y;var u=($.cos(da/180*e),$.sin(da/180*e),(a-i)/2),v=(b-j)/2,w=u*u/(c*c)+v*v/(d*d);w>1&&(w=$.sqrt(w),c=w*c,d=w*d);var x=c*c,y=d*d,z=(g==h?-1:1)*$.sqrt(ba((x*y-x*v*v-y*u*u)/(x*v*v+y*u*u))),A=z*c*v/d+(a+i)/2,B=z*-d*u/c+(b+j)/2,C=$.asin(((b-B)/d).toFixed(9)),D=$.asin(((j-B)/d).toFixed(9));C=A>a?da-C:C,D=A>i?da-D:D,0>C&&(C=2*da+C),0>D&&(D=2*da+D),h&&C>D&&(C-=2*da),!h&&D>C&&(D-=2*da)}if(m=D-C,ba(m)>q){var E=D,F=i,G=j;D=C+q*(h&&D>C?1:-1),i=A+c*$.cos(D),j=B+d*$.sin(D),s=Ra(i,j,c,d,e,0,h,F,G,[D,E,A,B])}m=D-C;var H=$.cos(C),I=$.sin(C),J=$.cos(D),K=$.sin(D),L=$.tan(m/4),M=4/3*c*L,N=4/3*d*L,O=[a,b],P=[a+M*I,b-N*H],Q=[i+M*K,j-N*J],S=[i,j];if(P[0]=2*O[0]-P[0],P[1]=2*O[1]-P[1],k)return[P,Q,S][R](s);for(s=[P,Q,S][R](s).join()[W](","),n=[],o=0,p=s.length;p>o;o++)n[o]=o%2?t(s[o-1],s[o],r).y:t(s[o],s[o+1],r).x;return n},Sa=function(a,b,c,d,e,f,g,h,i){var j=1-i;return{x:ca(j,3)*a+3*ca(j,2)*i*c+3*j*i*i*e+ca(i,3)*g,y:ca(j,3)*b+3*ca(j,2)*i*d+3*j*i*i*f+ca(i,3)*h}},Ta=f(function(a,b,c,d,e,f,g,h){var i,j=e-2*c+a-(g-2*e+c),k=2*(c-a)-2*(e-c),l=a-c,m=(-k+$.sqrt(k*k-4*j*l))/2/j,n=(-k-$.sqrt(k*k-4*j*l))/2/j,o=[b,h],p=[a,g];return ba(m)>"1e12"&&(m=.5),ba(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Sa(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Sa(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),j=f-2*d+b-(h-2*f+d),k=2*(d-b)-2*(f-d),l=b-d,m=(-k+$.sqrt(k*k-4*j*l))/2/j,n=(-k-$.sqrt(k*k-4*j*l))/2/j,ba(m)>"1e12"&&(m=.5),ba(n)>"1e12"&&(n=.5),m>0&&1>m&&(i=Sa(a,b,c,d,e,f,g,h,m),p.push(i.x),o.push(i.y)),n>0&&1>n&&(i=Sa(a,b,c,d,e,f,g,h,n),p.push(i.x),o.push(i.y)),{min:{x:aa[Q](0,p),y:aa[Q](0,o)},max:{x:_[Q](0,p),y:_[Q](0,o)}}}),Ua=c._path2curve=f(function(a,b){var c,d,e=!b&&y(a);if(!b&&e.curve)return Ma(e.curve);var f=Oa(a),g=b&&Oa(b),h={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},i={x:0,y:0,bx:0,by:0,X:0,Y:0,qx:null,qy:null},j=function(a,b,c){var d,e;if(!a)return["C",b.x,b.y,b.x,b.y,b.x,b.y];switch(a[0]in{T:1,Q:1}||(b.qx=b.qy=null),a[0]){case"M":b.X=a[1],b.Y=a[2];break;case"A":a=["C"][R](Ra[Q](0,[b.x,b.y][R](a.slice(1))));break;case"S":"C"==c||"S"==c?(d=2*b.x-b.bx,e=2*b.y-b.by):(d=b.x,e=b.y),a=["C",d,e][R](a.slice(1));break;case"T":"Q"==c||"T"==c?(b.qx=2*b.x-b.qx,b.qy=2*b.y-b.qy):(b.qx=b.x,b.qy=b.y),a=["C"][R](Qa(b.x,b.y,b.qx,b.qy,a[1],a[2]));break;case"Q":b.qx=a[1],b.qy=a[2],a=["C"][R](Qa(b.x,b.y,a[1],a[2],a[3],a[4]));break;case"L":a=["C"][R](Pa(b.x,b.y,a[1],a[2]));break;case"H":a=["C"][R](Pa(b.x,b.y,a[1],b.y));break;case"V":a=["C"][R](Pa(b.x,b.y,b.x,a[1]));break;case"Z":a=["C"][R](Pa(b.x,b.y,b.X,b.Y))}return a},k=function(a,b){if(a[b].length>7){a[b].shift();for(var c=a[b];c.length;)a.splice(b++,0,["C"][R](c.splice(0,6)));a.splice(b,1),d=_(f.length,g&&g.length||0)}},l=function(a,b,c,e,h){a&&b&&"M"==a[h][0]&&"M"!=b[h][0]&&(b.splice(h,0,["M",e.x,e.y]),c.bx=0,c.by=0,c.x=a[h][1],c.y=a[h][2],d=_(f.length,g&&g.length||0))};for(c=0,d=_(f.length,g&&g.length||0);d>c;c++){f[c]=j(f[c],h),k(f,c),g&&(g[c]=j(g[c],i)),g&&k(g,c),l(f,g,h,i,c),l(g,f,i,h,c);var m=f[c],n=g&&g[c],o=m.length,p=g&&n.length;h.x=m[o-2],h.y=m[o-1],h.bx=ma(m[o-4])||h.x,h.by=ma(m[o-3])||h.y,i.bx=g&&(ma(n[p-4])||i.x),i.by=g&&(ma(n[p-3])||i.y),i.x=g&&n[p-2],i.y=g&&n[p-1]}return g||(e.curve=Ma(f)),g?[f,g]:f},null,Ma),Va=(c._parseDots=f(function(a){for(var b,d,e,f,g,h,i=[],j=0,k=a.length;k>j;j++){if(b={},d=a[j].match(/^([^:]*):?([\d\.]*)/),b.color=c.getRGB(d[1]),b.color.error)return null;b.color=b.color.hex,d[2]&&(b.offset=d[2]+"%"),i.push(b)}for(j=1,k=i.length-1;k>j;j++)if(!i[j].offset){for(e=ma(i[j-1].offset||0),f=0,g=j+1;k>g;g++)if(i[g].offset){f=i[g].offset;break}for(f||(f=100,g=k),f=ma(f),h=(f-e)/(g-j+1);g>j;j++)e+=h,i[j].offset=e+"%"}return i}),c._tear=function(a,b){a==b.top&&(b.top=a.prev),a==b.bottom&&(b.bottom=a.next),a.next&&(a.next.prev=a.prev),a.prev&&(a.prev.next=a.next)}),Wa=(c._tofront=function(a,b){b.top!==a&&(Va(a,b),a.next=null,a.prev=b.top,b.top.next=a,b.top=a)},c._toback=function(a,b){b.bottom!==a&&(Va(a,b),a.next=b.bottom,a.prev=null,b.bottom.prev=a,b.bottom=a)},c._insertafter=function(a,b,c){Va(a,c),b==c.top&&(c.top=a),b.next&&(b.next.prev=a),a.next=b.next,a.prev=b,b.next=a},c._insertbefore=function(a,b,c){Va(a,c),b==c.bottom&&(c.bottom=a),b.prev&&(b.prev.next=a),a.prev=b.prev,b.prev=a,a.next=b},c.toMatrix=function(a,b){var c=La(a),d={_:{transform:T},getBBox:function(){return c}};return Xa(d,b),d.matrix}),Xa=(c.transformPath=function(a,b){return Ea(a,Wa(a,b))},c._extractTransform=function(a,b){var d,e;if(null==b)return a._.transform;b=V(b).replace(/\.{3}|\u2026/g,a._.transform||T);var f=c.parseTransformString(b),g=0,h=0,i=0,j=1,k=1,l=a._,m=new o;if(l.transform=f||[],f)for(d=0,e=f.length;e>d;d++){var n,p,q,r,s,t=f[d],u=t.length,v=V(t[0]).toLowerCase(),w=t[0]!=v,x=w?m.invert():0;"t"==v&&3==u?w?(n=x.x(0,0),p=x.y(0,0),q=x.x(t[1],t[2]),r=x.y(t[1],t[2]),m.translate(q-n,r-p)):m.translate(t[1],t[2]):"r"==v?2==u?(s=s||a.getBBox(1),m.rotate(t[1],s.x+s.width/2,s.y+s.height/2),g+=t[1]):4==u&&(w?(q=x.x(t[2],t[3]),r=x.y(t[2],t[3]),m.rotate(t[1],q,r)):m.rotate(t[1],t[2],t[3]),g+=t[1]):"s"==v?2==u||3==u?(s=s||a.getBBox(1),m.scale(t[1],t[u-1],s.x+s.width/2,s.y+s.height/2),j*=t[1],k*=t[u-1]):5==u&&(w?(q=x.x(t[3],t[4]),r=x.y(t[3],t[4]),m.scale(t[1],t[2],q,r)):m.scale(t[1],t[2],t[3],t[4]),j*=t[1],k*=t[2]):"m"==v&&7==u&&m.add(t[1],t[2],t[3],t[4],t[5],t[6]),l.dirtyT=1,a.matrix=m}a.matrix=m,l.sx=j,l.sy=k,l.deg=g,l.dx=h=m.e,l.dy=i=m.f,1==j&&1==k&&!g&&l.bbox?(l.bbox.x+=+h,l.bbox.y+=+i):l.dirtyT=1}),Ya=function(a){var b=a[0];switch(b.toLowerCase()){case"t":return[b,0,0];case"m":return[b,1,0,0,1,0,0];case"r":return 4==a.length?[b,0,a[2],a[3]]:[b,0];case"s":return 5==a.length?[b,1,1,a[3],a[4]]:3==a.length?[b,1,1]:[b,1]; +}},Za=c._equaliseTransform=function(a,b){b=V(b).replace(/\.{3}|\u2026/g,a),a=c.parseTransformString(a)||[],b=c.parseTransformString(b)||[];for(var d,e,f,g,h=_(a.length,b.length),i=[],j=[],k=0;h>k;k++){if(f=a[k]||Ya(b[k]),g=b[k]||Ya(f),f[0]!=g[0]||"r"==f[0].toLowerCase()&&(f[2]!=g[2]||f[3]!=g[3])||"s"==f[0].toLowerCase()&&(f[3]!=g[3]||f[4]!=g[4]))return;for(i[k]=[],j[k]=[],d=0,e=_(f.length,g.length);e>d;d++)d in f&&(i[k][d]=f[d]),d in g&&(j[k][d]=g[d])}return{from:i,to:j}};c._getContainer=function(a,b,d,e){var f;return f=null!=e||c.is(a,"object")?a:N.doc.getElementById(a),null!=f?f.tagName?null==b?{container:f,width:f.style.pixelWidth||f.offsetWidth,height:f.style.pixelHeight||f.offsetHeight}:{container:f,width:b,height:d}:{container:1,x:a,y:b,width:d,height:e}:void 0},c.pathToRelative=Na,c._engine={},c.path2curve=Ua,c.matrix=function(a,b,c,d,e,f){return new o(a,b,c,d,e,f)},function(a){function b(a){return a[0]*a[0]+a[1]*a[1]}function d(a){var c=$.sqrt(b(a));a[0]&&(a[0]/=c),a[1]&&(a[1]/=c)}a.add=function(a,b,c,d,e,f){var g,h,i,j,k=[[],[],[]],l=[[this.a,this.c,this.e],[this.b,this.d,this.f],[0,0,1]],m=[[a,c,e],[b,d,f],[0,0,1]];for(a&&a instanceof o&&(m=[[a.a,a.c,a.e],[a.b,a.d,a.f],[0,0,1]]),g=0;3>g;g++)for(h=0;3>h;h++){for(j=0,i=0;3>i;i++)j+=l[g][i]*m[i][h];k[g][h]=j}this.a=k[0][0],this.b=k[1][0],this.c=k[0][1],this.d=k[1][1],this.e=k[0][2],this.f=k[1][2]},a.invert=function(){var a=this,b=a.a*a.d-a.b*a.c;return new o(a.d/b,-a.b/b,-a.c/b,a.a/b,(a.c*a.f-a.d*a.e)/b,(a.b*a.e-a.a*a.f)/b)},a.clone=function(){return new o(this.a,this.b,this.c,this.d,this.e,this.f)},a.translate=function(a,b){this.add(1,0,0,1,a,b)},a.scale=function(a,b,c,d){null==b&&(b=a),(c||d)&&this.add(1,0,0,1,c,d),this.add(a,0,0,b,0,0),(c||d)&&this.add(1,0,0,1,-c,-d)},a.rotate=function(a,b,d){a=c.rad(a),b=b||0,d=d||0;var e=+$.cos(a).toFixed(9),f=+$.sin(a).toFixed(9);this.add(e,f,-f,e,b,d),this.add(1,0,0,1,-b,-d)},a.x=function(a,b){return a*this.a+b*this.c+this.e},a.y=function(a,b){return a*this.b+b*this.d+this.f},a.get=function(a){return+this[V.fromCharCode(97+a)].toFixed(4)},a.toString=function(){return c.svg?"matrix("+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)].join()+")":[this.get(0),this.get(2),this.get(1),this.get(3),0,0].join()},a.toFilter=function(){return"progid:DXImageTransform.Microsoft.Matrix(M11="+this.get(0)+", M12="+this.get(2)+", M21="+this.get(1)+", M22="+this.get(3)+", Dx="+this.get(4)+", Dy="+this.get(5)+", sizingmethod='auto expand')"},a.offset=function(){return[this.e.toFixed(4),this.f.toFixed(4)]},a.split=function(){var a,e,f,g={};return g.dx=this.e,g.dy=this.f,a=[[this.a,this.c],[this.b,this.d]],g.scalex=$.sqrt(b(a[0])),d(a[0]),g.shear=a[0][0]*a[1][0]+a[0][1]*a[1][1],a[1]=[a[1][0]-a[0][0]*g.shear,a[1][1]-a[0][1]*g.shear],g.scaley=$.sqrt(b(a[1])),d(a[1]),g.shear/=g.scaley,e=-a[0][1],f=a[1][1],0>f?(g.rotate=c.deg($.acos(f)),0>e&&(g.rotate=360-g.rotate)):g.rotate=c.deg($.asin(e)),g.isSimple=!(+g.shear.toFixed(9)||g.scalex.toFixed(9)!=g.scaley.toFixed(9)&&g.rotate),g.isSuperSimple=!+g.shear.toFixed(9)&&g.scalex.toFixed(9)==g.scaley.toFixed(9)&&!g.rotate,g.noRotation=!+g.shear.toFixed(9)&&!g.rotate,g},a.toTransformString=function(a){var b=a||this[W]();return b.isSimple?(b.scalex=+b.scalex.toFixed(4),b.scaley=+b.scaley.toFixed(4),b.rotate=+b.rotate.toFixed(4),(b.dx||b.dy?"t"+[b.dx,b.dy]:T)+(1!=b.scalex||1!=b.scaley?"s"+[b.scalex,b.scaley,0,0]:T)+(b.rotate?"r"+[b.rotate,0,0]:T)):"m"+[this.get(0),this.get(1),this.get(2),this.get(3),this.get(4),this.get(5)]}}(o.prototype),z=navigator.userAgent.match(/Version\/(.*?)\s/)||navigator.userAgent.match(/Chrome\/(\d+)/),I.safari="Apple Computer, Inc."==navigator.vendor&&(z&&z[1]<4||"iP"==navigator.platform.slice(0,2))||"Google Inc."==navigator.vendor&&z&&z[1]<8?function(){var a=this.rect(-99,-99,this.width+99,this.height+99).attr({stroke:"none"});setTimeout(function(){a.remove()})}:za;var $a=function(){this.returnValue=!1},_a=function(){return this.originalEvent.preventDefault()},ab=function(){this.cancelBubble=!0},bb=function(){return this.originalEvent.stopPropagation()},cb=function(a){var b=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,c=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft;return{x:a.clientX+c,y:a.clientY+b}},db=function(){return N.doc.addEventListener?function(a,b,c,d){var e,f=function(a){var b=cb(a);return c.call(d,a,b.x,b.y)};return a.addEventListener(b,f,!1),S&&Y[b]&&(e=function(b){for(var e=cb(b),f=b,g=0,h=b.targetTouches&&b.targetTouches.length;h>g;g++)if(b.targetTouches[g].target==a){b=b.targetTouches[g],b.originalEvent=f,b.preventDefault=_a,b.stopPropagation=bb;break}return c.call(d,b,e.x,e.y)},a.addEventListener(Y[b],e,!1)),function(){return a.removeEventListener(b,f,!1),S&&Y[b]&&a.removeEventListener(Y[b],f,!1),!0}}:N.doc.attachEvent?function(a,b,c,d){var e=function(a){a=a||N.win.event;var b=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,e=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft,f=a.clientX+e,g=a.clientY+b;return a.preventDefault=a.preventDefault||$a,a.stopPropagation=a.stopPropagation||ab,c.call(d,a,f,g)};return a.attachEvent("on"+b,e),function(){return a.detachEvent("on"+b,e),!0}}:void 0}(),eb=[],fb=function(a){for(var c,d,e,f=a.clientX,g=a.clientY,h=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,i=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft,j=eb.length;j--;){if(c=eb[j],S&&a.touches){for(d=a.touches.length;d--;)if(e=a.touches[d],e.identifier==c.el._drag.id){f=e.clientX,g=e.clientY,(a.originalEvent?a.originalEvent:a).preventDefault();break}}else a.preventDefault();var k,l=c.el.node,m=l.nextSibling,n=l.parentNode,o=l.style.display;N.win.opera&&n.removeChild(l),l.style.display="none",k=c.el.paper.getElementByPoint(f,g),l.style.display=o,N.win.opera&&(m?n.insertBefore(l,m):n.appendChild(l)),k&&b("raphael.drag.over."+c.el.id,c.el,k),f+=i,g+=h,b("raphael.drag.move."+c.el.id,c.move_scope||c.el,f-c.el._drag.x,g-c.el._drag.y,f,g,a)}},gb=function(a){c.unmousemove(fb).unmouseup(gb);for(var d,e=eb.length;e--;)d=eb[e],d.el._drag={},b("raphael.drag.end."+d.el.id,d.end_scope||d.start_scope||d.move_scope||d.el,a);eb=[]},hb=c.el={};for(A=X.length;A--;)(function(a){c[a]=hb[a]=function(b,d){return c.is(b,"function")&&(this.events=this.events||[],this.events.push({name:a,f:b,unbind:db(this.shape||this.node||N.doc,a,b,d||this)})),this},c["un"+a]=hb["un"+a]=function(b){for(var d=this.events||[],e=d.length;e--;)d[e].name==a&&(c.is(b,"undefined")||d[e].f==b)&&(d[e].unbind(),d.splice(e,1),d.length||delete this.events);return this}})(X[A]);hb.data=function(a,d){var e,f=xa[this.id]=xa[this.id]||{};if(0==arguments.length)return f;if(1==arguments.length){if(c.is(a,"object")){for(e in a)a[M](e)&&this.data(e,a[e]);return this}return b("raphael.data.get."+this.id,this,f[a],a),f[a]}return f[a]=d,b("raphael.data.set."+this.id,this,d,a),this},hb.removeData=function(a){return null==a?xa[this.id]={}:xa[this.id]&&delete xa[this.id][a],this},hb.getData=function(){return d(xa[this.id]||{})},hb.hover=function(a,b,c,d){return this.mouseover(a,c).mouseout(b,d||c)},hb.unhover=function(a,b){return this.unmouseover(a).unmouseout(b)},B=[],hb.drag=function(a,d,e,f,g,h){function i(i){var j,k;(i.originalEvent||i).preventDefault();var l=i.clientX,m=i.clientY,n=N.doc.documentElement.scrollTop||N.doc.body.scrollTop,o=N.doc.documentElement.scrollLeft||N.doc.body.scrollLeft;if(this._drag.id=i.identifier,S&&i.touches)for(j=i.touches.length;j--;)if(k=i.touches[j],this._drag.id=k.identifier,k.identifier==this._drag.id){l=k.clientX,m=k.clientY;break}this._drag.x=l+o,this._drag.y=m+n,eb.length||c.mousemove(fb).mouseup(gb),eb.push({el:this,move_scope:f,start_scope:g,end_scope:h}),d&&b.on("raphael.drag.start."+this.id,d),a&&b.on("raphael.drag.move."+this.id,a),e&&b.on("raphael.drag.end."+this.id,e),b("raphael.drag.start."+this.id,g||f||this,i.clientX+o,i.clientY+n,i)}return this._drag={},B.push({el:this,start:i}),this.mousedown(i),this},hb.onDragOver=function(a){a?b.on("raphael.drag.over."+this.id,a):b.unbind("raphael.drag.over."+this.id)},hb.undrag=function(){for(var a=B.length;a--;)B[a].el==this&&(this.unmousedown(B[a].start),B.splice(a,1),b.unbind("raphael.drag.*."+this.id));B.length||c.unmousemove(fb).unmouseup(gb),eb=[]},I.circle=function(a,b,d){var e=c._engine.circle(this,a||0,b||0,d||0);return this.__set__&&this.__set__.push(e),e},I.rect=function(a,b,d,e,f){var g=c._engine.rect(this,a||0,b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},I.ellipse=function(a,b,d,e){var f=c._engine.ellipse(this,a||0,b||0,d||0,e||0);return this.__set__&&this.__set__.push(f),f},I.path=function(a){!a||c.is(a,fa)||c.is(a[0],ga)||(a+=T);var b=c._engine.path(c.format[Q](c,arguments),this);return this.__set__&&this.__set__.push(b),b},I.image=function(a,b,d,e,f){var g=c._engine.image(this,a||"about:blank",b||0,d||0,e||0,f||0);return this.__set__&&this.__set__.push(g),g},I.text=function(a,b,d){var e=c._engine.text(this,a||0,b||0,V(d));return this.__set__&&this.__set__.push(e),e},I.set=function(a){c.is(a,"array")||(a=Array.prototype.splice.call(arguments,0,arguments.length));var b=new E(a);return this.__set__&&this.__set__.push(b),b.paper=this,b.type="set",b},I.setStart=function(a){this.__set__=a||this.set()},I.setFinish=function(){var a=this.__set__;return delete this.__set__,a},I.setSize=function(a,b){return c._engine.setSize.call(this,a,b)},I.setViewBox=function(a,b,d,e,f){return c._engine.setViewBox.call(this,a,b,d,e,f)},I.top=I.bottom=null,I.raphael=c,C=function(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.body,e=c.documentElement,f=e.clientTop||d.clientTop||0,g=e.clientLeft||d.clientLeft||0,h=b.top+(N.win.pageYOffset||e.scrollTop||d.scrollTop)-f,i=b.left+(N.win.pageXOffset||e.scrollLeft||d.scrollLeft)-g;return{y:h,x:i}},I.getElementByPoint=function(a,b){var c,d,e,f=this,g=f.canvas,h=N.doc.elementFromPoint(a,b);if(N.win.opera&&"svg"==h.tagName&&(c=C(g),d=g.createSVGRect(),d.x=a-c.x,d.y=b-c.y,d.width=d.height=1,e=g.getIntersectionList(d,null),e.length&&(h=e[e.length-1])),!h)return null;for(;h.parentNode&&h!=g.parentNode&&!h.raphael;)h=h.parentNode;return h==f.canvas.parentNode&&(h=g),h&&h.raphael?f.getById(h.raphaelid):null},I.getElementsByBBox=function(a){var b=this.set();return this.forEach(function(d){c.isBBoxIntersect(d.getBBox(),a)&&b.push(d)}),b},I.getById=function(a){for(var b=this.bottom;b;){if(b.id==a)return b;b=b.next}return null},I.forEach=function(a,b){for(var c=this.bottom;c;){if(a.call(b,c)===!1)return this;c=c.next}return this},I.getElementsByPoint=function(a,b){var c=this.set();return this.forEach(function(d){d.isPointInside(a,b)&&c.push(d)}),c},hb.isPointInside=function(a,b){var d=this.realPath=Da[this.type](this);return this.attr("transform")&&this.attr("transform").length&&(d=c.transformPath(d,this.attr("transform"))),c.isPointInsidePath(d,a,b)},hb.getBBox=function(a){if(this.removed)return{};var b=this._;return a?((b.dirty||!b.bboxwt)&&(this.realPath=Da[this.type](this),b.bboxwt=La(this.realPath),b.bboxwt.toString=p,b.dirty=0),b.bboxwt):((b.dirty||b.dirtyT||!b.bbox)&&((b.dirty||!this.realPath)&&(b.bboxwt=0,this.realPath=Da[this.type](this)),b.bbox=La(Ea(this.realPath,this.matrix)),b.bbox.toString=p,b.dirty=b.dirtyT=0),b.bbox)},hb.clone=function(){if(this.removed)return null;var a=this.paper[this.type]().attr(this.attr());return this.__set__&&this.__set__.push(a),a},hb.glow=function(a){var b;if("text"==this.type)return null;a=a||{};var c={width:(a.width||10)+(+this.attr("stroke-width")||1),fill:a.fill||!1,opacity:a.opacity||.5,offsetx:a.offsetx||0,offsety:a.offsety||0,color:a.color||"#000"},d=c.width/2,e=this.paper,f=e.set(),g=this.realPath||Da[this.type](this);for(g=this.matrix?Ea(g,this.matrix):g,b=1;d+1>b;b++)f.push(e.path(g).attr({stroke:c.color,fill:c.fill?c.color:"none","stroke-linejoin":"round","stroke-linecap":"round","stroke-width":+(c.width/d*b).toFixed(3),opacity:+(c.opacity/d).toFixed(3)}));return f.insertBefore(this).translate(c.offsetx,c.offsety)};var ib=function(a,b,d,e,f,g,h,i,l){return null==l?j(a,b,d,e,f,g,h,i):c.findDotsAtSegment(a,b,d,e,f,g,h,i,k(a,b,d,e,f,g,h,i,l))},jb=function(a,b){return function(d,e,f){var g,h;d=Ua(d);var i,j,k,l,m,n="",o={},p=0;for(g=0,h=d.length;h>g;g++){if(k=d[g],"M"==k[0])i=+k[1],j=+k[2];else{if(l=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6]),p+l>e){if(b&&!o.start){if(m=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6],e-p),n+=["C"+m.start.x,m.start.y,m.m.x,m.m.y,m.x,m.y],f)return n;o.start=n,n=["M"+m.x,m.y+"C"+m.n.x,m.n.y,m.end.x,m.end.y,k[5],k[6]].join(),p+=l,i=+k[5],j=+k[6];continue}if(!a&&!b)return m=ib(i,j,k[1],k[2],k[3],k[4],k[5],k[6],e-p),{x:m.x,y:m.y,alpha:m.alpha}}p+=l,i=+k[5],j=+k[6]}n+=k.shift()+k}return o.end=n,m=a?p:b?o:c.findDotsAtSegment(i,j,k[0],k[1],k[2],k[3],k[4],k[5],1),m.alpha&&(m={x:m.x,y:m.y,alpha:m.alpha}),m}},kb=jb(1),lb=jb(),mb=jb(0,1);c.getTotalLength=kb,c.getPointAtLength=lb,c.getSubpath=function(a,b,c){if(this.getTotalLength(a)-c<1e-6)return mb(a,b).end;var d=mb(a,c,1);return b?mb(d,b).end:d},hb.getTotalLength=function(){var a=this.getPath();return a?this.node.getTotalLength?this.node.getTotalLength():kb(a):void 0},hb.getPointAtLength=function(a){var b=this.getPath();return b?lb(b,a):void 0},hb.getPath=function(){var a,b=c._getPath[this.type];return"text"!=this.type&&"set"!=this.type?(b&&(a=b(this)),a):void 0},hb.getSubpath=function(a,b){var d=this.getPath();return d?c.getSubpath(d,a,b):void 0},D=c.easing_formulas={linear:function(a){return a},"<":function(a){return ca(a,1.7)},">":function(a){return ca(a,.48)},"<>":function(a){var b=.48-a/1.04,c=$.sqrt(.1734+b*b),d=c-b,e=ca(ba(d),1/3)*(0>d?-1:1),f=-c-b,g=ca(ba(f),1/3)*(0>f?-1:1),h=e+g+.5;return 3*(1-h)*h*h+h*h*h},backIn:function(a){var b=1.70158;return a*a*((b+1)*a-b)},backOut:function(a){a-=1;var b=1.70158;return a*a*((b+1)*a+b)+1},elastic:function(a){return a==!!a?a:ca(2,-10*a)*$.sin(2*(a-.075)*da/.3)+1},bounce:function(a){var b,c=7.5625,d=2.75;return 1/d>a?b=c*a*a:2/d>a?(a-=1.5/d,b=c*a*a+.75):2.5/d>a?(a-=2.25/d,b=c*a*a+.9375):(a-=2.625/d,b=c*a*a+.984375),b}},D.easeIn=D["ease-in"]=D["<"],D.easeOut=D["ease-out"]=D[">"],D.easeInOut=D["ease-in-out"]=D["<>"],D["back-in"]=D.backIn,D["back-out"]=D.backOut;var nb=[],ob=a.requestAnimationFrame||a.webkitRequestAnimationFrame||a.mozRequestAnimationFrame||a.oRequestAnimationFrame||a.msRequestAnimationFrame||function(a){setTimeout(a,16)},pb=function(){for(var a,d,e,f,g,h,i,j,k,l=+new Date,m=0;mp))if(q>p){d=r(p/q);for(e in t)if(t[M](e)){switch(qa[e]){case ea:n=+t[e]+d*q*u[e];break;case"colour":n="rgb("+[qb(la(t[e].r+d*q*u[e].r)),qb(la(t[e].g+d*q*u[e].g)),qb(la(t[e].b+d*q*u[e].b))].join(",")+")";break;case"path":for(n=[],f=0,g=t[e].length;g>f;f++){for(n[f]=[t[e][f][0]],h=1,i=t[e][f].length;i>h;h++)n[f][h]=+t[e][f][h]+d*q*u[e][f][h];n[f]=n[f].join(U)}n=n.join(U);break;case"transform":if(u[e].real)for(n=[],f=0,g=t[e].length;g>f;f++)for(n[f]=[t[e][f][0]],h=1,i=t[e][f].length;i>h;h++)n[f][h]=t[e][f][h]+d*q*u[e][f][h];else j=function(a){return+t[e][a]+d*q*u[e][a]},n=[["m",j(0),j(1),j(2),j(3),j(4),j(5)]];break;case"csv":if("clip-rect"==e)for(n=[],f=4;f--;)n[f]=+t[e][f]+d*q*u[e][f];break;default:for(k=[][R](t[e]),n=[],f=w.paper.customAttributes[e].length;f--;)n[f]=+k[f]+d*q*u[e][f]}x[e]=n}w.attr(x),function(a,c,d){setTimeout(function(){b("raphael.anim.frame."+a,c,d)})}(w.id,w,a.anim)}else{if(function(a,d,e){setTimeout(function(){b("raphael.anim.frame."+d.id,d,e),b("raphael.anim.finish."+d.id,d,e),c.is(a,"function")&&a.call(d)})}(a.callback,w,a.anim),w.attr(v),nb.splice(m--,1),a.repeat>1&&!a.next){for(o in v)v[M](o)&&(y[o]=a.totalOrigin[o]);a.el.attr(y),s(a.anim,a.el,a.anim.percents[0],null,a.totalOrigin,a.repeat-1)}a.next&&!a.stop&&s(a.anim,a.el,a.next,null,a.totalOrigin,a.repeat)}}c.svg&&w&&w.paper&&w.paper.safari(),nb.length&&ob(pb)},qb=function(a){return a>255?255:0>a?0:a};hb.animateWith=function(a,b,d,e,f,g){var h,i,j,k=this;if(k.removed)return g&&g.call(k),k;for(h=d instanceof r?d:c.animation(d,e,f,g),s(h,k,h.percents[0],null,k.attr()),i=0,j=nb.length;j>i;i++)if(nb[i].anim==b&&nb[i].el==a){nb[j-1].start=nb[i].start;break}return k},hb.onAnimation=function(a){return a?b.on("raphael.anim.frame."+this.id,a):b.unbind("raphael.anim.frame."+this.id),this},r.prototype.delay=function(a){var b=new r(this.anim,this.ms);return b.times=this.times,b.del=+a||0,b},r.prototype.repeat=function(a){var b=new r(this.anim,this.ms);return b.del=this.del,b.times=$.floor(_(a,0))||1,b},c.animation=function(a,b,d,e){if(a instanceof r)return a;(c.is(d,"function")||!d)&&(e=e||d||null,d=null),a=Object(a),b=+b||0;var f,g={};for(var h in a)a[M](h)&&ma(h)!=h&&ma(h)+"%"!=h&&(f=!0,g[h]=a[h]);return f?(d&&(g.easing=d),e&&(g.callback=e),new r({100:g},b)):new r(a,b)},hb.animate=function(a,b,d,e){var f,g=this;return g.removed?(e&&e.call(g),g):(f=a instanceof r?a:c.animation(a,b,d,e),s(f,g,f.percents[0],null,g.attr()),g)},hb.setTime=function(a,b){return a&&null!=b&&this.status(a,aa(b,a.ms)/a.ms),this},hb.status=function(a,b){var c,d,e=[],f=0;if(null!=b)return s(a,this,-1,aa(b,1)),this;for(c=nb.length;c>f;f++)if(d=nb[f],d.el.id==this.id&&(!a||d.anim==a)){if(a)return d.status;e.push({anim:d.anim,status:d.status})}return a?0:e},hb.pause=function(a){for(var c=0;cb;b++)a[b]&&(a[b].constructor==hb.constructor||a[b].constructor==E)&&(this[this.items.length]=this.items[this.items.length]=a[b],this.length++)},F=E.prototype,F.push=function(){for(var a,b,c=0,d=arguments.length;d>c;c++)a=arguments[c],a&&(a.constructor==hb.constructor||a.constructor==E)&&(b=this.items.length,this[b]=this.items[b]=a,this.length++);return this},F.pop=function(){return this.length&&delete this[this.length--],this.items.pop()},F.forEach=function(a,b){for(var c=0,d=this.items.length;d>c;c++)if(a.call(b,this.items[c],c)===!1)return this;return this};for(G in hb)hb[M](G)&&(F[G]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a][Q](c,b)})}}(G));return F.attr=function(a,b){var d,e,f,g;if(a&&c.is(a,ga)&&c.is(a[0],"object"))for(d=0,e=a.length;e>d;d++)this.items[d].attr(a[d]);else for(f=0,g=this.items.length;g>f;f++)this.items[f].attr(a,b);return this},F.clear=function(){for(;this.length;)this.pop()},F.splice=function(a,b){var c;a=0>a?_(this.length+a,0):a,b=_(0,aa(this.length-a,b));for(var d=[],e=[],f=[],g=2;gg;g++)e.push(this[a+g]);for(;gg?f[g]:d[g-c];for(g=this.items.length=this.length-=b-c;this[g];)delete this[g++];return new E(e)},F.exclude=function(a){for(var b=0,c=this.length;c>b;b++)if(this[b]==a)return this.splice(b,1),!0},F.animate=function(a,b,d,e){var f;(c.is(d,"function")||!d)&&(e=d||null);var g,h,i=this.items.length,j=i,k=this;if(!i)return this;for(e&&(h=function(){--i||e.call(k)}),d=c.is(d,fa)?d:h,f=c.animation(a,b,d,h),g=this.items[--j].animate(f);j--;)this.items[j]&&!this.items[j].removed&&this.items[j].animateWith(g,f,f),this.items[j]&&!this.items[j].removed||i--;return this},F.insertAfter=function(a){for(var b=this.items.length;b--;)this.items[b].insertAfter(a);return this},F.getBBox=function(){for(var a,b=[],c=[],d=[],e=[],f=this.items.length;f--;)this.items[f].removed||(a=this.items[f].getBBox(),b.push(a.x),c.push(a.y),d.push(a.x+a.width),e.push(a.y+a.height));return b=aa[Q](0,b),c=aa[Q](0,c),d=_[Q](0,d),e=_[Q](0,e),{x:b,y:c,x2:d,y2:e,width:d-b,height:e-c}},F.clone=function(a){a=this.paper.set();for(var b=0,c=this.items.length;c>b;b++)a.push(this.items[b].clone());return a},F.toString=function(){return"Raphaël‘s set"},F.glow=function(a){var b=this.paper.set();return this.forEach(function(c){var d=c.glow(a);null!=d&&d.forEach(function(a){b.push(a)})}),b},F.isPointInside=function(a,b){var c=!1;return this.forEach(function(d){return d.isPointInside(a,b)?(c=!0,!1):void 0}),c},c.registerFont=function(a){var b,c,d,e,f,g;if(!a.face)return a;this.fonts=this.fonts||{},b={w:a.w,face:{},glyphs:{}},c=a.face["font-family"];for(d in a.face)a.face[M](d)&&(b.face[d]=a.face[d]);if(this.fonts[c]?this.fonts[c].push(b):this.fonts[c]=[b],!a.svg){b.face["units-per-em"]=na(a.face["units-per-em"],10);for(e in a.glyphs)if(a.glyphs[M](e)&&(f=a.glyphs[e],b.glyphs[e]={w:f.w,k:{},d:f.d&&"M"+f.d.replace(/[mlcxtrv]/g,function(a){return{l:"L",c:"C",x:"z",t:"m",r:"l",v:"c"}[a]||"M"})+"z"},f.k))for(g in f.k)f[M](g)&&(b.glyphs[e].k[g]=f.k[g])}return a},I.getFont=function(a,b,d,e){var f,g,h,i,j,k;if(e=e||"normal",d=d||"normal",b=+b||{normal:400,bold:700,lighter:300,bolder:800}[b]||400,c.fonts){if(f=c.fonts[a],!f){g=new RegExp("(^|\\s)"+a.replace(/[^\w\d\s+!~.:_-]/g,T)+"(\\s|$)","i");for(h in c.fonts)if(c.fonts[M](h)&&g.test(h)){f=c.fonts[h];break}}if(f)for(j=0,k=f.length;k>j&&(i=f[j],i.face["font-weight"]!=b||i.face["font-style"]!=d&&i.face["font-style"]||i.face["font-stretch"]!=e);j++);return i}},I.print=function(a,b,d,e,f,g,h,i){var j,k,l,m;g=g||"middle",h=_(aa(h||0,1),-1),i=_(aa(i||1,3),1);var n,o=V(d)[W](T),p=0,q=0,r=T;if(c.is(e,"string")&&(e=this.getFont(e)),e){n=(f||16)/e.face["units-per-em"];var s=e.face.bbox[W](J),t=+s[0],u=s[3]-s[1],v=0,w=+s[1]+("baseline"==g?u+ +e.face.descent:u/2);for(j=0,k=o.length;k>j;j++)"\n"==o[j]?(p=0,m=0,q=0,v+=u*i):(l=q&&e.glyphs[o[j-1]]||{},m=e.glyphs[o[j]],p+=q?(l.w||e.w)+(l.k&&l.k[o[j]]||0)+e.w*h:0,q=1),m&&m.d&&(r+=c.transformPath(m.d,["t",p*n,v*n,"s",n,n,t,w,"t",(a-t)/n,(b-w)/n]))}return this.path(r).attr({fill:"#000",stroke:"none"})},I.add=function(a){if(c.is(a,"array"))for(var b,d=this.set(),e=0,f=a.length;f>e;e++)b=a[e]||{},K[M](b.type)&&d.push(this[b.type]().attr(b));return d},c.format=function(a,b){var d=c.is(b,ga)?[0][R](b):arguments;return a&&c.is(a,fa)&&d.length-1&&(a=a.replace(L,function(a,b){return null==d[++b]?T:d[b]})),a||T},c.fullfill=function(){var a=/\{([^\}]+)\}/g,b=/(?:(?:^|\.)(.+?)(?=\[|\.|$|\()|\[('|")(.+?)\2\])(\(\))?/g,c=function(a,c,d){var e=d;return c.replace(b,function(a,b,c,d,f){b=b||d,e&&(b in e&&(e=e[b]),"function"==typeof e&&f&&(e=e()))}),e=(null==e||e==d?a:e)+""};return function(b,d){return String(b).replace(a,function(a,b){return c(a,b,d)})}}(),c.ninja=function(){return O.was?N.win.Raphael=O.is:delete Raphael,c},c.st=F,function(a,b,d){function e(){/in/.test(a.readyState)?setTimeout(e,9):c.eve("raphael.DOMload")}null==a.readyState&&a.addEventListener&&(a.addEventListener(b,d=function(){a.removeEventListener(b,d,!1),a.readyState="complete"},!1),a.readyState="loading"),e()}(document,"DOMContentLoaded"),b.on("raphael.DOMload",function(){H=!0}),function(){var a,b;if(c.svg){var d="hasOwnProperty",e=String,f=parseFloat,g=parseInt,h=Math,i=h.max,j=h.abs,k=h.pow,l=/[, ]+/,m=c.eve,n="",o=" ",p="http://www.w3.org/1999/xlink",q={block:"M5,0 0,2.5 5,5z",classic:"M5,0 0,2.5 5,5 3.5,3 3.5,2z",diamond:"M2.5,0 5,2.5 2.5,5 0,2.5z",open:"M6,1 1,3.5 6,6",oval:"M2.5,0A2.5,2.5,0,0,1,2.5,5 2.5,2.5,0,0,1,2.5,0z"},r={};c.toString=function(){return"Your browser supports SVG.\nYou are running Raphaël "+this.version};var s=function(a,b){var f,g;if(b){"string"==typeof a&&(a=s(a));for(f in b)b[d](f)&&("xlink:"==f.substring(0,6)?a.setAttributeNS(p,f.substring(6),e(b[f])):void 0!==a&&(g=e(b[f]),("d"!==f||"d"===f&&"M,0,0"!==g)&&a.setAttribute(f,g)))}else a=c._g.doc.createElementNS("http://www.w3.org/2000/svg",a),a.style&&(a.style.webkitTapHighlightColor="rgba(0,0,0,0)");return a},t=function(a,b){var d,g,l,m,o,p,q="linear",r=a.id+b,t=.5,u=.5,v=a.node,w=a.paper,x=v.style,y=c._g.doc.getElementById(r);if(!y){if(b=e(b).replace(c._radial_gradient,function(a,b,c){if(q="radial",b&&c){t=f(b),u=f(c);var d=2*(u>.5)-1;k(t-.5,2)+k(u-.5,2)>.25&&(u=h.sqrt(.25-k(t-.5,2))*d+.5)&&.5!=u&&(u=u.toFixed(5)-1e-5*d)}return n}),b=b.split(/\s*\-\s*/),"linear"==q){if(d=b.shift(),d=-f(d),isNaN(d))return null;g=[0,0,h.cos(c.rad(d)),h.sin(c.rad(d))],l=1/(i(j(g[2]),j(g[3]))||1),g[2]*=l,g[3]*=l,g[2]<0&&(g[0]=-g[2],g[2]=0),g[3]<0&&(g[1]=-g[3],g[3]=0)}if(m=c._parseDots(b),!m)return null;if(r=r.replace(/[\(\)\s,\xb0#]/g,"_"),a.gradient&&r!=a.gradient.id&&(w.defs.removeChild(a.gradient),delete a.gradient),!a.gradient)for(y=s(q+"Gradient",{id:r}),a.gradient=y,s(y,"radial"==q?{fx:t,fy:u}:{x1:g[0],y1:g[1],x2:g[2],y2:g[3],gradientTransform:a.matrix.invert()}),w.defs.appendChild(y),o=0,p=m.length;p>o;o++)y.appendChild(s("stop",{offset:m[o].offset?m[o].offset:o?"100%":"0%","stop-color":m[o].color||"#fff"}))}return s(v,{fill:"url(#"+r+")",opacity:1,"fill-opacity":1}),x.fill=n,x.opacity=1,x.fillOpacity=1,1},u=function(a){var b=a.getBBox(1);s(a.pattern,{patternTransform:a.matrix.invert()+" translate("+b.x+","+b.y+")"})},v=function(a,b,f){var g,h,i,j,k,l;if("path"==a.type){for(var m,o,p,t,u,v=e(b).toLowerCase().split("-"),w=a.paper,x=f?"end":"start",y=a.node,z=a.attrs,A=z["stroke-width"],B=v.length,C="classic",D=3,E=3,F=5;B--;)switch(v[B]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":C=v[B];break;case"wide":E=5;break;case"narrow":E=2;break;case"long":D=5;break;case"short":D=2}"open"==C?(D+=2,E+=2,F+=2,p=1,t=f?4:1,u={fill:"none",stroke:z.stroke}):(t=p=D/2,u={fill:z.stroke,stroke:"none"}),a._.arrows?f?(a._.arrows.endPath&&r[a._.arrows.endPath]--,a._.arrows.endMarker&&r[a._.arrows.endMarker]--):(a._.arrows.startPath&&r[a._.arrows.startPath]--,a._.arrows.startMarker&&r[a._.arrows.startMarker]--):a._.arrows={},"none"!=C?(g="raphael-marker-"+C,h="raphael-marker-"+x+C+D+E,c._g.doc.getElementById(g)?r[g]++:(w.defs.appendChild(s(s("path"),{"stroke-linecap":"round",d:q[C],id:g})),r[g]=1),i=c._g.doc.getElementById(h),i?(r[h]++,j=i.getElementsByTagName("use")[0]):(i=s(s("marker"),{id:h,markerHeight:E,markerWidth:D,orient:"auto",refX:t,refY:E/2}),j=s(s("use"),{"xlink:href":"#"+g,transform:(f?"rotate(180 "+D/2+" "+E/2+") ":n)+"scale("+D/F+","+E/F+")","stroke-width":(2/(D/F+E/F)).toFixed(4)}),i.appendChild(j),w.defs.appendChild(i),r[h]=1),s(j,u),k=p*("diamond"!=C&&"oval"!=C),f?(m=a._.arrows.startdx*A||0,o=c.getTotalLength(z.path)-k*A):(m=k*A,o=c.getTotalLength(z.path)-(a._.arrows.enddx*A||0)),u={},u["marker-"+x]="url(#"+h+")",(o||m)&&(u.d=c.getSubpath(z.path,m,o)),s(y,u),a._.arrows[x+"Path"]=g,a._.arrows[x+"Marker"]=h,a._.arrows[x+"dx"]=k,a._.arrows[x+"Type"]=C,a._.arrows[x+"String"]=b):(f?(m=a._.arrows.startdx*A||0,o=c.getTotalLength(z.path)-m):(m=0,o=c.getTotalLength(z.path)-(a._.arrows.enddx*A||0)),a._.arrows[x+"Path"]&&s(y,{d:c.getSubpath(z.path,m,o)}),delete a._.arrows[x+"Path"],delete a._.arrows[x+"Marker"],delete a._.arrows[x+"dx"],delete a._.arrows[x+"Type"],delete a._.arrows[x+"String"]);for(u in r)r[d](u)&&!r[u]&&(l=c._g.doc.getElementById(u),l&&l.parentNode.removeChild(l))}},w={"":[0],none:[0],"-":[3,1],".":[1,1],"-.":[3,1,1,1],"-..":[3,1,1,1,1,1],". ":[1,3],"- ":[4,3],"--":[8,3],"- .":[4,3,1,3],"--.":[8,3,1,3],"--..":[8,3,1,3,1,3]},x=function(a,b,c){if(b=w[e(b).toLowerCase()]){for(var d=a.attrs["stroke-width"]||"1",f={round:d,square:d,butt:0}[a.attrs["stroke-linecap"]||c["stroke-linecap"]]||0,g=[],h=b.length;h--;)g[h]=b[h]*d+(h%2?1:-1)*f;s(a.node,{"stroke-dasharray":g.join(",")})}},y=function(a,b){var f,h,k,m,o,q,r,w,y,z,B,C,D,E,F,G,H,I=a.node,J=a.attrs,K=I.style.visibility;I.style.visibility="hidden";for(f in b)if(b[d](f)){if(!c._availableAttrs[d](f))continue;switch(h=b[f],J[f]=h,f){case"blur":a.blur(h);break;case"title":k=I.getElementsByTagName("title"),k.length&&(k=k[0])?k.firstChild.nodeValue=h:(k=s("title"),m=c._g.doc.createTextNode(h),k.appendChild(m),I.appendChild(k));break;case"href":case"target":o=I.parentNode,"a"!=o.tagName.toLowerCase()&&(q=s("a"),o.insertBefore(q,I),q.appendChild(I),o=q),"target"==f?o.setAttributeNS(p,"show","blank"==h?"new":h):o.setAttributeNS(p,f,h);break;case"cursor":I.style.cursor=h;break;case"transform":a.transform(h);break;case"arrow-start":v(a,h);break;case"arrow-end":v(a,h,1);break;case"clip-rect":r=e(h).split(l),4==r.length&&(a.clip&&a.clip.parentNode.parentNode.removeChild(a.clip.parentNode),w=s("clipPath"),y=s("rect"),w.id=c.createUUID(),s(y,{x:r[0],y:r[1],width:r[2],height:r[3]}),w.appendChild(y),a.paper.defs.appendChild(w),s(I,{"clip-path":"url(#"+w.id+")"}),a.clip=y),h||(z=I.getAttribute("clip-path"),z&&(B=c._g.doc.getElementById(z.replace(/(^url\(#|\)$)/g,n)),B&&B.parentNode.removeChild(B),s(I,{"clip-path":n}),delete a.clip));break;case"path":"path"==a.type&&(s(I,{d:h?J.path=c._pathToAbsolute(h):"M0,0"}),a._.dirty=1,a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1)));break;case"width":if(I.setAttribute(f,h),a._.dirty=1,!J.fx)break;f="x",h=J.x;case"x":J.fx&&(h=-J.x-(J.width||0));case"rx":if("rx"==f&&"rect"==a.type)break;case"cx":I.setAttribute(f,h),a.pattern&&u(a),a._.dirty=1;break;case"height":if(I.setAttribute(f,h),a._.dirty=1,!J.fy)break;f="y",h=J.y;case"y":J.fy&&(h=-J.y-(J.height||0));case"ry":if("ry"==f&&"rect"==a.type)break;case"cy":I.setAttribute(f,h),a.pattern&&u(a),a._.dirty=1;break;case"r":"rect"==a.type?s(I,{rx:h,ry:h}):I.setAttribute(f,h),a._.dirty=1;break;case"src":"image"==a.type&&I.setAttributeNS(p,"href",h);break;case"stroke-width":(1!=a._.sx||1!=a._.sy)&&(h/=i(j(a._.sx),j(a._.sy))||1),a.paper._vbSize&&(h*=a.paper._vbSize),I.setAttribute(f,h),J["stroke-dasharray"]&&x(a,J["stroke-dasharray"],b),a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1));break;case"stroke-dasharray":x(a,h,b);break;case"fill":if(C=e(h).match(c._ISURL)){w=s("pattern"),D=s("image"),w.id=c.createUUID(),s(w,{x:0,y:0,patternUnits:"userSpaceOnUse",height:1,width:1}),s(D,{x:0,y:0,"xlink:href":C[1]}),w.appendChild(D),function(b){c._preload(C[1],function(){var c=this.offsetWidth,d=this.offsetHeight;s(b,{width:c,height:d}),s(D,{width:c,height:d}),a.paper.safari()})}(w),a.paper.defs.appendChild(w),s(I,{fill:"url(#"+w.id+")"}),a.pattern=w,a.pattern&&u(a);break}if(E=c.getRGB(h),E.error){if(("circle"==a.type||"ellipse"==a.type||"r"!=e(h).charAt())&&t(a,h)){("opacity"in J||"fill-opacity"in J)&&(F=c._g.doc.getElementById(I.getAttribute("fill").replace(/^url\(#|\)$/g,n)),F&&(G=F.getElementsByTagName("stop"),s(G[G.length-1],{"stop-opacity":("opacity"in J?J.opacity:1)*("fill-opacity"in J?J["fill-opacity"]:1)}))),J.gradient=h,J.fill="none";break}}else delete b.gradient,delete J.gradient,!c.is(J.opacity,"undefined")&&c.is(b.opacity,"undefined")&&s(I,{opacity:J.opacity}),!c.is(J["fill-opacity"],"undefined")&&c.is(b["fill-opacity"],"undefined")&&s(I,{"fill-opacity":J["fill-opacity"]});E[d]("opacity")&&s(I,{"fill-opacity":E.opacity>1?E.opacity/100:E.opacity});case"stroke":E=c.getRGB(h),I.setAttribute(f,E.hex),"stroke"==f&&E[d]("opacity")&&s(I,{"stroke-opacity":E.opacity>1?E.opacity/100:E.opacity}),"stroke"==f&&a._.arrows&&("startString"in a._.arrows&&v(a,a._.arrows.startString),"endString"in a._.arrows&&v(a,a._.arrows.endString,1));break;case"gradient":("circle"==a.type||"ellipse"==a.type||"r"!=e(h).charAt())&&t(a,h);break;case"opacity":J.gradient&&!J[d]("stroke-opacity")&&s(I,{"stroke-opacity":h>1?h/100:h});case"fill-opacity":if(J.gradient){F=c._g.doc.getElementById(I.getAttribute("fill").replace(/^url\(#|\)$/g,n)), +F&&(G=F.getElementsByTagName("stop"),s(G[G.length-1],{"stop-opacity":h}));break}default:"font-size"==f&&(h=g(h,10)+"px"),H=f.replace(/(\-.)/g,function(a){return a.substring(1).toUpperCase()}),I.style[H]=h,a._.dirty=1,I.setAttribute(f,h)}}A(a,b),I.style.visibility=K},z=1.2,A=function(a,b){var f,h,i,j,k,l,m;if("text"==a.type&&(b[d]("text")||b[d]("font")||b[d]("font-size")||b[d]("x")||b[d]("y"))){var o=a.attrs,p=a.node,q=p.firstChild?g(c._g.doc.defaultView.getComputedStyle(p.firstChild,n).getPropertyValue("font-size"),10):10;if(b[d]("text")){for(o.text=b.text;p.firstChild;)p.removeChild(p.firstChild);for(f=e(b.text).split("\n"),h=[],j=0,k=f.length;k>j;j++)i=s("tspan"),j&&s(i,{dy:q*z,x:o.x}),i.appendChild(c._g.doc.createTextNode(f[j])),p.appendChild(i),h[j]=i}else for(h=p.getElementsByTagName("tspan"),j=0,k=h.length;k>j;j++)j?s(h[j],{dy:q*z,x:o.x}):s(h[0],{dy:0});s(p,{x:o.x,y:o.y}),a._.dirty=1,l=a._getBBox(),m=o.y-(l.y+l.height/2),m&&c.is(m,"finite")&&s(h[0],{dy:m})}},B=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.matrix=c.matrix(),this.realPath=null,this.paper=b,this.attrs=this.attrs||{},this._={transform:[],sx:1,sy:1,deg:0,dx:0,dy:0,dirty:1},b.bottom||(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},C=c.el;B.prototype=C,C.constructor=B,c._engine.path=function(a,b){var c,d=s("path");return b.canvas&&b.canvas.appendChild(d),c=new B(d,b),c.type="path",y(c,{fill:"none",stroke:"#000",path:a}),c},C.rotate=function(a,b,c){if(this.removed)return this;if(a=e(a).split(l),a.length-1&&(b=f(a[1]),c=f(a[2])),a=f(a[0]),null==c&&(b=c),null==b||null==c){var d=this.getBBox(1);b=d.x+d.width/2,c=d.y+d.height/2}return this.transform(this._.transform.concat([["r",a,b,c]])),this},C.scale=function(a,b,c,d){if(this.removed)return this;if(a=e(a).split(l),a.length-1&&(b=f(a[1]),c=f(a[2]),d=f(a[3])),a=f(a[0]),null==b&&(b=a),null==d&&(c=d),null==c||null==d)var g=this.getBBox(1);return c=null==c?g.x+g.width/2:c,d=null==d?g.y+g.height/2:d,this.transform(this._.transform.concat([["s",a,b,c,d]])),this},C.translate=function(a,b){return this.removed?this:(a=e(a).split(l),a.length-1&&(b=f(a[1])),a=f(a[0])||0,b=+b||0,this.transform(this._.transform.concat([["t",a,b]])),this)},C.transform=function(a){var b,e=this._;return null==a?e.transform:(c._extractTransform(this,a),this.clip&&s(this.clip,{transform:this.matrix.invert()}),this.pattern&&u(this),this.node&&s(this.node,{transform:this.matrix}),(1!=e.sx||1!=e.sy)&&(b=this.attrs[d]("stroke-width")?this.attrs["stroke-width"]:1,this.attr({"stroke-width":b})),this)},C.hide=function(){return this.removed||this.paper.safari(this.node.style.display="none"),this},C.show=function(){return this.removed||this.paper.safari(this.node.style.display=""),this},C.remove=function(){var a,b;if(!this.removed&&this.node.parentNode){a=this.paper,a.__set__&&a.__set__.exclude(this),m.unbind("raphael.*.*."+this.id),this.gradient&&a.defs.removeChild(this.gradient),c._tear(this,a),"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.removeChild(this.node.parentNode):this.node.parentNode.removeChild(this.node);for(b in this)this[b]="function"==typeof this[b]?c._removedFactory(b):null;this.removed=!0}},C._getBBox=function(){var a,b;"none"==this.node.style.display&&(this.show(),a=!0),b={};try{b=this.node.getBBox()}catch(c){}finally{b=b||{}}return a&&this.hide(),b},C.attr=function(a,b){var e,f,g,h,i,j,k,n,o,p;if(this.removed)return this;if(null==a){e={};for(f in this.attrs)this.attrs[d](f)&&(e[f]=this.attrs[f]);return e.gradient&&"none"==e.fill&&(e.fill=e.gradient)&&delete e.gradient,e.transform=this._.transform,e}if(null==b&&c.is(a,"string")){if("fill"==a&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;if("transform"==a)return this._.transform;for(g=a.split(l),h={},i=0,j=g.length;j>i;i++)a=g[i],h[a]=a in this.attrs?this.attrs[a]:c.is(this.paper.customAttributes[a],"function")?this.paper.customAttributes[a].def:c._availableAttrs[a];return j-1?h:h[g[0]]}if(null==b&&c.is(a,"array")){for(h={},i=0,j=a.length;j>i;i++)h[a[i]]=this.attr(a[i]);return h}null!=b?(k={},k[a]=b):null!=a&&c.is(a,"object")&&(k=a);for(n in k)m("raphael.attr."+n+"."+this.id,this,k[n]);for(n in this.paper.customAttributes)if(this.paper.customAttributes[d](n)&&k[d](n)&&c.is(this.paper.customAttributes[n],"function")){o=this.paper.customAttributes[n].apply(this,[].concat(k[n])),this.attrs[n]=k[n];for(p in o)o[d](p)&&(k[p]=o[p])}return y(this,k),this},C.toFront=function(){if(this.removed)return this;"a"==this.node.parentNode.tagName.toLowerCase()?this.node.parentNode.parentNode.appendChild(this.node.parentNode):this.node.parentNode.appendChild(this.node);var a=this.paper;return a.top!=this&&c._tofront(this,a),this},C.toBack=function(){var a,b;return this.removed?this:(a=this.node.parentNode,null===a?this:("a"==a.tagName.toLowerCase()?a.parentNode.insertBefore(this.node.parentNode,this.node.parentNode.parentNode.firstChild):a.firstChild!=this.node&&a.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper),b=this.paper,this))},C.insertAfter=function(a){if(this.removed)return this;var b=a.node||a[a.length-1].node;return b.nextSibling?b.parentNode.insertBefore(this.node,b.nextSibling):b.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this},C.insertBefore=function(a){if(this.removed)return this;var b=a.node||a[0].node;return b.parentNode.insertBefore(this.node,b),c._insertbefore(this,a,this.paper),this},C.blur=function(a){var b,d,e=this;return 0!=+a?(b=s("filter"),d=s("feGaussianBlur"),e.attrs.blur=a,b.id=c.createUUID(),s(d,{stdDeviation:+a||1.5}),b.appendChild(d),e.paper.defs.appendChild(b),e._blur=b,s(e.node,{filter:"url(#"+b.id+")"})):(e._blur&&(e._blur.parentNode.removeChild(e._blur),delete e._blur,delete e.attrs.blur),e.node.removeAttribute("filter")),e},c._engine.circle=function(a,b,c,d){var e,f=s("circle");return a.canvas&&a.canvas.appendChild(f),e=new B(f,a),e.attrs={cx:b,cy:c,r:d,fill:"none",stroke:"#000"},e.type="circle",s(f,e.attrs),e},c._engine.rect=function(a,b,c,d,e,f){var g,h=s("rect");return a.canvas&&a.canvas.appendChild(h),g=new B(h,a),g.attrs={x:b,y:c,width:d,height:e,r:f||0,rx:f||0,ry:f||0,fill:"none",stroke:"#000"},g.type="rect",s(h,g.attrs),g},c._engine.ellipse=function(a,b,c,d,e){var f,g=s("ellipse");return a.canvas&&a.canvas.appendChild(g),f=new B(g,a),f.attrs={cx:b,cy:c,rx:d,ry:e,fill:"none",stroke:"#000"},f.type="ellipse",s(g,f.attrs),f},c._engine.image=function(a,b,c,d,e,f){var g,h=s("image");return s(h,{x:c,y:d,width:e,height:f,preserveAspectRatio:"none"}),h.setAttributeNS(p,"href",b),a.canvas&&a.canvas.appendChild(h),g=new B(h,a),g.attrs={x:c,y:d,width:e,height:f,src:b},g.type="image",g},c._engine.text=function(a,b,d,e){var f,g=s("text");return a.canvas&&a.canvas.appendChild(g),f=new B(g,a),f.attrs={x:b,y:d,"text-anchor":"middle",text:e,font:c._availableAttrs.font,stroke:"none",fill:"#000"},f.type="text",y(f,f.attrs),f},c._engine.setSize=function(a,b){return this.width=a||this.width,this.height=b||this.height,this.canvas.setAttribute("width",this.width),this.canvas.setAttribute("height",this.height),this._viewBox&&this.setViewBox.apply(this,this._viewBox),this},c._engine.create=function(){var a,b,d,e=c._getContainer.apply(0,arguments),f=e&&e.container,g=e.x,h=e.y,i=e.width,j=e.height;if(!f)throw new Error("SVG container not found.");return a=s("svg"),b="overflow:hidden;",g=g||0,h=h||0,i=i||512,j=j||342,s(a,{height:j,version:1.1,width:i,xmlns:"http://www.w3.org/2000/svg"}),1==f?(a.style.cssText=b+"position:absolute;left:"+g+"px;top:"+h+"px",c._g.doc.body.appendChild(a),d=1):(a.style.cssText=b+"position:relative",f.firstChild?f.insertBefore(a,f.firstChild):f.appendChild(a)),f=new c._Paper,f.width=i,f.height=j,f.canvas=a,f.clear(),f._left=f._top=0,d&&(f.renderfix=function(){}),f.renderfix(),f},c._engine.setViewBox=function(a,b,c,d,e){m("raphael.setViewBox",this,this._viewBox,[a,b,c,d,e]);var f,g,h=i(c/this.width,d/this.height),j=this.top,k=e?"xMidYMid meet":"xMinYMin";for(null==a?(this._vbSize&&(h=1),delete this._vbSize,f="0 0 "+this.width+o+this.height):(this._vbSize=h,f=a+o+b+o+c+o+d),s(this.canvas,{viewBox:f,preserveAspectRatio:k});h&&j;)g="stroke-width"in j.attrs?j.attrs["stroke-width"]:1,j.attr({"stroke-width":g}),j._.dirty=1,j._.dirtyT=1,j=j.prev;return this._viewBox=[a,b,c,d,!!e],this},c.prototype.renderfix=function(){var a,b,c,d=this.canvas,e=d.style;try{a=d.getScreenCTM()||d.createSVGMatrix()}catch(f){a=d.createSVGMatrix()}b=-a.e%1,c=-a.f%1,(b||c)&&(b&&(this._left=(this._left+b)%1,e.left=this._left+"px"),c&&(this._top=(this._top+c)%1,e.top=this._top+"px"))},c.prototype.clear=function(){c.eve("raphael.clear",this);for(var a=this.canvas;a.firstChild;)a.removeChild(a.firstChild);this.bottom=this.top=null,(this.desc=s("desc")).appendChild(c._g.doc.createTextNode("Created with Raphaël "+c.version)),a.appendChild(this.desc),a.appendChild(this.defs=s("defs"))},c.prototype.remove=function(){m("raphael.remove",this),this.canvas.parentNode&&this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null},a=c.st;for(b in C)C[d](b)&&!a[d](b)&&(a[b]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(b))}}(),function(){var a,b,d;if(c.vml){var e="hasOwnProperty",f=String,g=parseFloat,h=Math,i=h.round,j=h.max,k=h.min,l=h.abs,m="fill",n=/[, ]+/,o=c.eve,p=" progid:DXImageTransform.Microsoft",q=" ",r="",s={M:"m",L:"l",C:"c",Z:"x",m:"t",l:"r",c:"v",z:"x"},t=/([clmz]),?([^clmz]*)/gi,u=/ progid:\S+Blur\([^\)]+\)/g,v=/-?[^,\s-]+/g,w="position:absolute;left:0;top:0;width:1px;height:1px",x=21600,y={path:1,rect:1,image:1},z={circle:1,ellipse:1},A=function(a){var b,d,e,g,h,j,k,l,m=/[ahqstv]/gi,n=c._pathToAbsolute;if(f(a).match(m)&&(n=c._path2curve),m=/[clmz]/g,n==c._pathToAbsolute&&!f(a).match(m))return f(a).replace(t,function(a,b,c){var d=[],e="m"==b.toLowerCase(),f=s[b];return c.replace(v,function(a){e&&2==d.length&&(f+=d+s["m"==b?"l":"L"],d=[]),d.push(i(a*x))}),f+d});for(d=n(a),b=[],h=0,j=d.length;j>h;h++){for(e=d[h],g=d[h][0].toLowerCase(),"z"==g&&(g="x"),k=1,l=e.length;l>k;k++)g+=i(e[k]*x)+(k!=l-1?",":r);b.push(g)}return b.join(q)},B=function(a,b,d){var e=c.matrix();return e.rotate(-a,.5,.5),{dx:e.x(b,d),dy:e.y(b,d)}},C=function(a,b,c,d,e,f){var g,h,i=a._,j=a.matrix,k=i.fillpos,n=a.node,o=n.style,p=1,r="",s=x/b,t=x/c;o.visibility="hidden",b&&c&&(n.coordsize=l(s)+q+l(t),o.rotation=f*(0>b*c?-1:1),f&&(g=B(f,d,e),d=g.dx,e=g.dy),0>b&&(r+="x"),0>c&&(r+=" y")&&(p=-1),o.flip=r,n.coordorigin=d*-s+q+e*-t,(k||i.fillsize)&&(h=n.getElementsByTagName(m),h=h&&h[0],n.removeChild(h),k&&(g=B(f,j.x(k[0],k[1]),j.y(k[0],k[1])),h.position=g.dx*p+q+g.dy*p),i.fillsize&&(h.size=i.fillsize[0]*l(b)+q+i.fillsize[1]*l(c)),n.appendChild(h)),o.visibility="visible")};c.toString=function(){return"Your browser doesn’t support SVG. Falling down to VML.\nYou are running Raphaël "+this.version};var D=function(a,b,c){for(var d,e=f(b).toLowerCase().split("-"),g=c?"end":"start",h=e.length,i="classic",j="medium",k="medium";h--;)switch(e[h]){case"block":case"classic":case"oval":case"diamond":case"open":case"none":i=e[h];break;case"wide":case"narrow":k=e[h];break;case"long":case"short":j=e[h]}d=a.node.getElementsByTagName("stroke")[0],d[g+"arrow"]=i,d[g+"arrowlength"]=j,d[g+"arrowwidth"]=k},E=function(b,d){var h,l,o,p,s,t,u,v,w,B,E,G,H,I,J,K,L,M,N;b.attrs=b.attrs||{};var O=b.node,P=b.attrs,Q=O.style,R=y[b.type]&&(d.x!=P.x||d.y!=P.y||d.width!=P.width||d.height!=P.height||d.cx!=P.cx||d.cy!=P.cy||d.rx!=P.rx||d.ry!=P.ry||d.r!=P.r),S=z[b.type]&&(P.cx!=d.cx||P.cy!=d.cy||P.r!=d.r||P.rx!=d.rx||P.ry!=d.ry),T=b;for(h in d)d[e](h)&&(P[h]=d[h]);if(R&&(P.path=c._getPath[b.type](b),b._.dirty=1),d.href&&(O.href=d.href),d.title&&(O.title=d.title),d.target&&(O.target=d.target),d.cursor&&(Q.cursor=d.cursor),"blur"in d&&b.blur(d.blur),(d.path&&"path"==b.type||R)&&(O.path=A(~f(P.path).toLowerCase().indexOf("r")?c._pathToAbsolute(P.path):P.path),"image"==b.type&&(b._.fillpos=[P.x,P.y],b._.fillsize=[P.width,P.height],C(b,1,1,0,0,0))),"transform"in d&&b.transform(d.transform),S){var U=+P.cx,V=+P.cy,W=+P.rx||+P.r||0,X=+P.ry||+P.r||0;O.path=c.format("ar{0},{1},{2},{3},{4},{1},{4},{1}x",i((U-W)*x),i((V-X)*x),i((U+W)*x),i((V+X)*x),i(U*x)),b._.dirty=1}if("clip-rect"in d&&(l=f(d["clip-rect"]).split(n),4==l.length&&(l[2]=+l[2]+ +l[0],l[3]=+l[3]+ +l[1],o=O.clipRect||c._g.doc.createElement("div"),p=o.style,p.clip=c.format("rect({1}px {2}px {3}px {0}px)",l),O.clipRect||(p.position="absolute",p.top=0,p.left=0,p.width=b.paper.width+"px",p.height=b.paper.height+"px",O.parentNode.insertBefore(o,O),o.appendChild(O),O.clipRect=o)),d["clip-rect"]||O.clipRect&&(O.clipRect.style.clip="auto")),b.textpath&&(s=b.textpath.style,d.font&&(s.font=d.font),d["font-family"]&&(s.fontFamily='"'+d["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g,r)+'"'),d["font-size"]&&(s.fontSize=d["font-size"]),d["font-weight"]&&(s.fontWeight=d["font-weight"]),d["font-style"]&&(s.fontStyle=d["font-style"])),"arrow-start"in d&&D(T,d["arrow-start"]),"arrow-end"in d&&D(T,d["arrow-end"],1),(null!=d.opacity||null!=d["stroke-width"]||null!=d.fill||null!=d.src||null!=d.stroke||null!=d["stroke-width"]||null!=d["stroke-opacity"]||null!=d["fill-opacity"]||null!=d["stroke-dasharray"]||null!=d["stroke-miterlimit"]||null!=d["stroke-linejoin"]||null!=d["stroke-linecap"])&&(t=O.getElementsByTagName(m),u=!1,t=t&&t[0],t||(u=t=a(m)),"image"==b.type&&d.src&&(t.src=d.src),d.fill&&(t.on=!0),(null==t.on||"none"==d.fill||null===d.fill)&&(t.on=!1),t.on&&d.fill&&(v=f(d.fill).match(c._ISURL),v?(t.parentNode==O&&O.removeChild(t),t.rotate=!0,t.src=v[1],t.type="tile",w=b.getBBox(1),t.position=w.x+q+w.y,b._.fillpos=[w.x,w.y],c._preload(v[1],function(){b._.fillsize=[this.offsetWidth,this.offsetHeight]})):(t.color=c.getRGB(d.fill).hex,t.src=r,t.type="solid",c.getRGB(d.fill).error&&(T.type in{circle:1,ellipse:1}||"r"!=f(d.fill).charAt())&&F(T,d.fill,t)&&(P.fill="none",P.gradient=d.fill,t.rotate=!1))),("fill-opacity"in d||"opacity"in d)&&(B=((+P["fill-opacity"]+1||2)-1)*((+P.opacity+1||2)-1)*((+c.getRGB(d.fill).o+1||2)-1),B=k(j(B,0),1),t.opacity=B,t.src&&(t.color="none")),O.appendChild(t),E=O.getElementsByTagName("stroke")&&O.getElementsByTagName("stroke")[0],G=!1,E||(G=E=a("stroke")),(d.stroke&&"none"!=d.stroke||d["stroke-width"]||null!=d["stroke-opacity"]||d["stroke-dasharray"]||d["stroke-miterlimit"]||d["stroke-linejoin"]||d["stroke-linecap"])&&(E.on=!0),("none"==d.stroke||null===d.stroke||null==E.on||0==d.stroke||0==d["stroke-width"])&&(E.on=!1),H=c.getRGB(d.stroke),E.on&&d.stroke&&(E.color=H.hex),B=((+P["stroke-opacity"]+1||2)-1)*((+P.opacity+1||2)-1)*((+H.o+1||2)-1),I=.75*(g(d["stroke-width"])||1),B=k(j(B,0),1),null==d["stroke-width"]&&(I=P["stroke-width"]),d["stroke-width"]&&(E.weight=I),I&&1>I&&(B*=I)&&(E.weight=1),E.opacity=B,d["stroke-linejoin"]&&(E.joinstyle=d["stroke-linejoin"]||"miter"),E.miterlimit=d["stroke-miterlimit"]||8,d["stroke-linecap"]&&(E.endcap="butt"==d["stroke-linecap"]?"flat":"square"==d["stroke-linecap"]?"square":"round"),"stroke-dasharray"in d&&(J={"-":"shortdash",".":"shortdot","-.":"shortdashdot","-..":"shortdashdotdot",". ":"dot","- ":"dash","--":"longdash","- .":"dashdot","--.":"longdashdot","--..":"longdashdotdot"},E.dashstyle=J[e](d["stroke-dasharray"])?J[d["stroke-dasharray"]]:r),G&&O.appendChild(E)),"text"==T.type){T.paper.canvas.style.display=r;var Y=T.paper.span,Z=100,$=P.font&&P.font.match(/\d+(?:\.\d*)?(?=px)/);for((Q=Y.style,P.font&&(Q.font=P.font),P["font-family"]&&(Q.fontFamily=P["font-family"]),P["font-weight"]&&(Q.fontWeight=P["font-weight"]),P["font-style"]&&(Q.fontStyle=P["font-style"]),$=g(P["font-size"]||$&&$[0])||10,Q.fontSize=$*Z+"px",T.textpath.string&&(Y.innerHTML=f(T.textpath.string).replace(/")),K=Y.getBoundingClientRect(),T.W=P.w=(K.right-K.left)/Z,T.H=P.h=(K.bottom-K.top)/Z,T.X=P.x,T.Y=P.y+T.H/2,("x"in d||"y"in d)&&(T.path.v=c.format("m{0},{1}l{2},{1}",i(P.x*x),i(P.y*x),i(P.x*x)+1)),L=["x","y","text","font","font-family","font-weight","font-style","font-size"],M=0,N=L.length);N>M;M++)if(L[M]in d){T._.dirty=1;break}switch(P["text-anchor"]){case"start":T.textpath.style["v-text-align"]="left",T.bbx=T.W/2;break;case"end":T.textpath.style["v-text-align"]="right",T.bbx=-T.W/2;break;default:T.textpath.style["v-text-align"]="center",T.bbx=0}T.textpath.style["v-text-kern"]=!0}},F=function(a,b,d){var e,i,j,k,l;a.attrs=a.attrs||{};var m=(a.attrs,Math.pow),n="linear",o=".5 .5";if(a.attrs.gradient=b,b=f(b).replace(c._radial_gradient,function(a,b,c){return n="radial",b&&c&&(b=g(b),c=g(c),m(b-.5,2)+m(c-.5,2)>.25&&(c=h.sqrt(.25-m(b-.5,2))*(2*(c>.5)-1)+.5),o=b+q+c),r}),b=b.split(/\s*\-\s*/),"linear"==n&&(e=b.shift(),e=-g(e),isNaN(e))||(i=c._parseDots(b),!i))return null;if(a=a.shape||a.node,i.length){for(a.removeChild(d),d.on=!0,d.method="none",d.color=i[0].color,d.color2=i[i.length-1].color,j=[],k=0,l=i.length;l>k;k++)i[k].offset&&j.push(i[k].offset+q+i[k].color);d.colors=j.length?j.join():"0% "+d.color,"radial"==n?(d.type="gradientTitle",d.focus="100%",d.focussize="0 0",d.focusposition=o,d.angle=0):(d.type="gradient",d.angle=(270-e)%360),a.appendChild(d)}return 1},G=function(a,b){this[0]=this.node=a,a.raphael=!0,this.id=c._oid++,a.raphaelid=this.id,this.X=0,this.Y=0,this.attrs={},this.paper=b,this.matrix=c.matrix(),this._={transform:[],sx:1,sy:1,dx:0,dy:0,deg:0,dirty:1,dirtyT:1},b.bottom||(b.bottom=this),this.prev=b.top,b.top&&(b.top.next=this),b.top=this,this.next=null},H=c.el;G.prototype=H,H.constructor=G,H.transform=function(a){var b,d,e;if(null==a)return this._.transform;b=this.paper._viewBoxShift,d=b?"s"+[b.scale,b.scale]+"-1-1t"+[b.dx,b.dy]:r,b&&(e=a=f(a).replace(/\.{3}|\u2026/g,this._.transform||r)),c._extractTransform(this,d+a);var g,h=this.matrix.clone(),i=this.skew,j=this.node,k=~f(this.attrs.fill).indexOf("-"),l=!f(this.attrs.fill).indexOf("url(");if(h.translate(1,1),l||k||"image"==this.type)if(i.matrix="1 0 0 1",i.offset="0 0",g=h.split(),k&&g.noRotation||!g.isSimple){j.style.filter=h.toFilter();var m=this.getBBox(),n=this.getBBox(1),o=m.x-n.x,p=m.y-n.y;j.coordorigin=o*-x+q+p*-x,C(this,1,1,o,p,0)}else j.style.filter=r,C(this,g.scalex,g.scaley,g.dx,g.dy,g.rotate);else j.style.filter=r,i.matrix=f(h),i.offset=h.offset();return e&&(this._.transform=e),this},H.rotate=function(a,b,c){if(this.removed)return this;if(null!=a){if(a=f(a).split(n),a.length-1&&(b=g(a[1]),c=g(a[2])),a=g(a[0]),null==c&&(b=c),null==b||null==c){var d=this.getBBox(1);b=d.x+d.width/2,c=d.y+d.height/2}return this._.dirtyT=1,this.transform(this._.transform.concat([["r",a,b,c]])),this}},H.translate=function(a,b){return this.removed?this:(a=f(a).split(n),a.length-1&&(b=g(a[1])),a=g(a[0])||0,b=+b||0,this._.bbox&&(this._.bbox.x+=a,this._.bbox.y+=b),this.transform(this._.transform.concat([["t",a,b]])),this)},H.scale=function(a,b,c,d){if(this.removed)return this;if(a=f(a).split(n),a.length-1&&(b=g(a[1]),c=g(a[2]),d=g(a[3]),isNaN(c)&&(c=null),isNaN(d)&&(d=null)),a=g(a[0]),null==b&&(b=a),null==d&&(c=d),null==c||null==d)var e=this.getBBox(1);return c=null==c?e.x+e.width/2:c,d=null==d?e.y+e.height/2:d,this.transform(this._.transform.concat([["s",a,b,c,d]])),this._.dirtyT=1,this},H.hide=function(){return this.removed||(this.node.style.display="none"),this},H.show=function(){return this.removed||(this.node.style.display=r),this},H._getBBox=function(){return this.removed?{}:{x:this.X+(this.bbx||0)-this.W/2,y:this.Y-this.H,width:this.W,height:this.H}},H.remove=function(){if(!this.removed&&this.node.parentNode){this.paper.__set__&&this.paper.__set__.exclude(this),c.eve.unbind("raphael.*.*."+this.id),c._tear(this,this.paper),this.node.parentNode.removeChild(this.node),this.shape&&this.shape.parentNode.removeChild(this.shape);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;this.removed=!0}},H.attr=function(a,b){var d,f,g,h,i,j,k,l,p,q;if(this.removed)return this;if(null==a){d={};for(f in this.attrs)this.attrs[e](f)&&(d[f]=this.attrs[f]);return d.gradient&&"none"==d.fill&&(d.fill=d.gradient)&&delete d.gradient,d.transform=this._.transform,d}if(null==b&&c.is(a,"string")){if(a==m&&"none"==this.attrs.fill&&this.attrs.gradient)return this.attrs.gradient;for(g=a.split(n),h={},i=0,j=g.length;j>i;i++)a=g[i],h[a]=a in this.attrs?this.attrs[a]:c.is(this.paper.customAttributes[a],"function")?this.paper.customAttributes[a].def:c._availableAttrs[a];return j-1?h:h[g[0]]}if(this.attrs&&null==b&&c.is(a,"array")){for(h={},i=0,j=a.length;j>i;i++)h[a[i]]=this.attr(a[i]);return h}null!=b&&(k={},k[a]=b),null==b&&c.is(a,"object")&&(k=a);for(l in k)o("raphael.attr."+l+"."+this.id,this,k[l]);if(k){for(l in this.paper.customAttributes)if(this.paper.customAttributes[e](l)&&k[e](l)&&c.is(this.paper.customAttributes[l],"function")){p=this.paper.customAttributes[l].apply(this,[].concat(k[l])),this.attrs[l]=k[l];for(q in p)p[e](q)&&(k[q]=p[q])}k.text&&"text"==this.type&&(this.textpath.string=k.text),E(this,k)}return this},H.toFront=function(){return this.removed||this.node.parentNode.appendChild(this.node),this.paper&&this.paper.top!=this&&c._tofront(this,this.paper),this},H.toBack=function(){return this.removed?this:(this.node.parentNode.firstChild!=this.node&&(this.node.parentNode.insertBefore(this.node,this.node.parentNode.firstChild),c._toback(this,this.paper)),this)},H.insertAfter=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[a.length-1]),a.node.nextSibling?a.node.parentNode.insertBefore(this.node,a.node.nextSibling):a.node.parentNode.appendChild(this.node),c._insertafter(this,a,this.paper),this)},H.insertBefore=function(a){return this.removed?this:(a.constructor==c.st.constructor&&(a=a[0]),a.node.parentNode.insertBefore(this.node,a.node),c._insertbefore(this,a,this.paper),this)},H.blur=function(a){var b=this.node.runtimeStyle,d=b.filter;return d=d.replace(u,r),0!=+a?(this.attrs.blur=a,b.filter=d+q+p+".Blur(pixelradius="+(+a||1.5)+")",b.margin=c.format("-{0}px 0 0 -{0}px",i(+a||1.5))):(b.filter=d,b.margin=0,delete this.attrs.blur),this},c._engine.path=function(b,c){var d,e,f,g=a("shape");return g.style.cssText=w,g.coordsize=x+q+x,g.coordorigin=c.coordorigin,d=new G(g,c),e={fill:"none",stroke:"#000"},b&&(e.path=b),d.type="path",d.path=[],d.Path=r,E(d,e),c.canvas.appendChild(g),f=a("skew"),f.on=!0,g.appendChild(f),d.skew=f,d.transform(r),d},c._engine.rect=function(a,b,d,e,f,g){var h=c._rectPath(b,d,e,f,g),i=a.path(h),j=i.attrs;return i.X=j.x=b,i.Y=j.y=d,i.W=j.width=e,i.H=j.height=f,j.r=g,j.path=h,i.type="rect",i},c._engine.ellipse=function(a,b,c,d,e){var f=a.path();f.attrs;return f.X=b-d,f.Y=c-e,f.W=2*d,f.H=2*e,f.type="ellipse",E(f,{cx:b,cy:c,rx:d,ry:e}),f},c._engine.circle=function(a,b,c,d){var e=a.path();e.attrs;return e.X=b-d,e.Y=c-d,e.W=e.H=2*d,e.type="circle",E(e,{cx:b,cy:c,r:d}),e},c._engine.image=function(a,b,d,e,f,g){var h=c._rectPath(d,e,f,g),i=a.path(h).attr({stroke:"none"}),j=i.attrs,k=i.node,l=k.getElementsByTagName(m)[0];return j.src=b,i.X=j.x=d,i.Y=j.y=e,i.W=j.width=f,i.H=j.height=g,j.path=h,i.type="image",l.parentNode==k&&k.removeChild(l),l.rotate=!0,l.src=b,l.type="tile",i._.fillpos=[d,e],i._.fillsize=[f,g],k.appendChild(l),C(i,1,1,0,0,0),i},c._engine.text=function(b,d,e,g){var h,j,k,l=a("shape"),m=a("path"),n=a("textpath");return d=d||0,e=e||0,g=g||"",m.v=c.format("m{0},{1}l{2},{1}",i(d*x),i(e*x),i(d*x)+1),m.textpathok=!0,n.string=f(g),n.on=!0,l.style.cssText=w,l.coordsize=x+q+x,l.coordorigin="0 0",h=new G(l,b),j={fill:"#000",stroke:"none",font:c._availableAttrs.font,text:g},h.shape=l,h.path=m,h.textpath=n,h.type="text",h.attrs.text=f(g),h.attrs.x=d,h.attrs.y=e,h.attrs.w=1,h.attrs.h=1,E(h,j),l.appendChild(n),l.appendChild(m),b.canvas.appendChild(l),k=a("skew"),k.on=!0,l.appendChild(k),h.skew=k,h.transform(r),h},c._engine.setSize=function(a,b){var d=this.canvas.style;return this.width=a,this.height=b,a==+a&&(a+="px"),b==+b&&(b+="px"),d.width=a,d.height=b,d.clip="rect(0 "+a+" "+b+" 0)",this._viewBox&&c._engine.setViewBox.apply(this,this._viewBox),this},c._engine.setViewBox=function(a,b,d,e,f){c.eve("raphael.setViewBox",this,this._viewBox,[a,b,d,e,f]);var g,h,i=this.width,k=this.height,l=1/j(d/i,e/k);return f&&(g=k/e,h=i/d,i>d*g&&(a-=(i-d*g)/2/g),k>e*h&&(b-=(k-e*h)/2/h)),this._viewBox=[a,b,d,e,!!f],this._viewBoxShift={dx:-a,dy:-b,scale:l},this.forEach(function(a){a.transform("...")}),this},c._engine.initWin=function(b){var c=b.document;c.createStyleSheet().addRule(".rvml","behavior:url(#default#VML)");try{c.namespaces.rvml||c.namespaces.add("rvml","urn:schemas-microsoft-com:vml"),a=function(a){return c.createElement("')}}catch(d){a=function(a){return c.createElement("<"+a+' xmlns="urn:schemas-microsoft.com:vml" class="rvml">')}}},c._engine.initWin(c._g.win),c._engine.create=function(){var a=c._getContainer.apply(0,arguments),b=a.container,d=a.height,e=a.width,f=a.x,g=a.y;if(!b)throw new Error("VML container not found.");var h=new c._Paper,i=h.canvas=c._g.doc.createElement("div"),j=i.style;return f=f||0,g=g||0,e=e||512,d=d||342,h.width=e,h.height=d,e==+e&&(e+="px"),d==+d&&(d+="px"),h.coordsize=1e3*x+q+1e3*x,h.coordorigin="0 0",h.span=c._g.doc.createElement("span"),h.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;",i.appendChild(h.span),j.cssText=c.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden",e,d),1==b?(c._g.doc.body.appendChild(i),j.left=f+"px",j.top=g+"px",j.position="absolute"):b.firstChild?b.insertBefore(i,b.firstChild):b.appendChild(i),h.renderfix=function(){},h},c.prototype.clear=function(){c.eve("raphael.clear",this),this.canvas.innerHTML=r,this.span=c._g.doc.createElement("span"),this.span.style.cssText="position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;",this.canvas.appendChild(this.span),this.bottom=this.top=null},c.prototype.remove=function(){c.eve("raphael.remove",this),this.canvas.parentNode.removeChild(this.canvas);for(var a in this)this[a]="function"==typeof this[a]?c._removedFactory(a):null;return!0},b=c.st;for(d in H)H[e](d)&&!b[e](d)&&(b[d]=function(a){return function(){var b=arguments;return this.forEach(function(c){c[a].apply(c,b)})}}(d))}}(),O.was?N.win.Raphael=c:Raphael=c,c});var icon={"?":"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.328,24.371h-2.707v-2.596h2.707V24.371zM17.328,19.003v0.858h-2.707v-1.057c0-3.19,3.63-3.696,3.63-5.963c0-1.034-0.924-1.826-2.134-1.826c-1.254,0-2.354,0.924-2.354,0.924l-1.541-1.915c0,0,1.519-1.584,4.137-1.584c2.487,0,4.796,1.54,4.796,4.136C21.156,16.208,17.328,16.627,17.328,19.003z",i:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M14.757,8h2.42v2.574h-2.42V8z M18.762,23.622H16.1c-1.034,0-1.475-0.44-1.475-1.496v-6.865c0-0.33-0.176-0.484-0.484-0.484h-0.88V12.4h2.662c1.035,0,1.474,0.462,1.474,1.496v6.887c0,0.309,0.176,0.484,0.484,0.484h0.88V23.622z",$:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466z M17.255,23.88v2.047h-1.958v-2.024c-3.213-0.44-4.621-3.08-4.621-3.08l2.002-1.673c0,0,1.276,2.223,3.586,2.223c1.276,0,2.244-0.683,2.244-1.849c0-2.729-7.349-2.398-7.349-7.459c0-2.2,1.738-3.785,4.137-4.159V5.859h1.958v2.046c1.672,0.22,3.652,1.1,3.652,2.993v1.452h-2.596v-0.704c0-0.726-0.925-1.21-1.959-1.21c-1.32,0-2.288,0.66-2.288,1.584c0,2.794,7.349,2.112,7.349,7.415C21.413,21.614,19.785,23.506,17.255,23.88z",arrowleftalt:"M16,30.534c8.027,0,14.534-6.507,14.534-14.534c0-8.027-6.507-14.534-14.534-14.534C7.973,1.466,1.466,7.973,1.466,16C1.466,24.027,7.973,30.534,16,30.534zM18.335,6.276l3.536,3.538l-6.187,6.187l6.187,6.187l-3.536,3.537l-9.723-9.724L18.335,6.276z",arrowalt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM13.665,25.725l-3.536-3.539l6.187-6.187l-6.187-6.187l3.536-3.536l9.724,9.723L13.665,25.725z","!":"M26.711,14.086L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.864,26.711,14.086zM14.702,8.981c0.22-0.238,0.501-0.357,0.844-0.357s0.624,0.118,0.844,0.353c0.221,0.235,0.33,0.531,0.33,0.885c0,0.306-0.101,1.333-0.303,3.082c-0.201,1.749-0.379,3.439-0.531,5.072H15.17c-0.135-1.633-0.301-3.323-0.5-5.072c-0.198-1.749-0.298-2.776-0.298-3.082C14.372,9.513,14.482,9.22,14.702,8.981zM16.431,21.799c-0.247,0.241-0.542,0.362-0.885,0.362s-0.638-0.121-0.885-0.362c-0.248-0.241-0.372-0.533-0.372-0.876s0.124-0.638,0.372-0.885c0.247-0.248,0.542-0.372,0.885-0.372s0.638,0.124,0.885,0.372c0.248,0.247,0.372,0.542,0.372,0.885S16.679,21.558,16.431,21.799z","?2":"M26.711,14.086L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.864,26.711,14.086zM16.431,21.799c-0.248,0.241-0.543,0.362-0.885,0.362c-0.343,0-0.638-0.121-0.886-0.362c-0.247-0.241-0.371-0.533-0.371-0.876s0.124-0.638,0.371-0.885c0.248-0.248,0.543-0.372,0.886-0.372c0.342,0,0.637,0.124,0.885,0.372c0.248,0.247,0.371,0.542,0.371,0.885S16.679,21.558,16.431,21.799zM18.911,15.198c-0.721,0.716-1.712,1.147-2.972,1.294v2.027h-0.844v-3.476c0.386-0.03,0.768-0.093,1.146-0.188c0.38-0.095,0.719-0.25,1.019-0.464c0.312-0.227,0.555-0.5,0.729-0.822c0.174-0.322,0.261-0.77,0.261-1.346c0-0.918-0.194-1.623-0.582-2.113c-0.389-0.49-0.956-0.735-1.701-0.735c-0.281,0-0.527,0.042-0.738,0.124s-0.366,0.16-0.464,0.234c0.031,0.146,0.072,0.357,0.124,0.633c0.052,0.275,0.078,0.486,0.078,0.633c0,0.226-0.098,0.433-0.294,0.619c-0.195,0.187-0.479,0.28-0.853,0.28c-0.33,0-0.565-0.113-0.706-0.339s-0.211-0.489-0.211-0.789c0-0.244,0.067-0.484,0.201-0.72c0.135-0.235,0.346-0.463,0.633-0.684c0.245-0.195,0.577-0.364,0.995-0.504c0.419-0.141,0.854-0.211,1.308-0.211c0.647,0,1.223,0.103,1.724,0.308c0.502,0.205,0.914,0.479,1.238,0.822c0.337,0.355,0.586,0.755,0.748,1.198c0.162,0.444,0.243,0.926,0.243,1.446C19.994,13.558,19.633,14.482,18.911,15.198z",stopsign:"M20.833,2.625H10.167l-7.542,7.542v10.666l7.542,7.542h10.666l7.542-7.542V10.167L20.833,2.625zM23.76,17.145c-0.461,0.432-0.496-0.021-1.151,0.385c-0.655,0.404-1.067,0.844-1.067,0.844l-0.578,0.564c0,0-1.199,1.422-1.59,1.717c-0.392,0.291-0.572,0.166-0.572,0.166c-0.133,0.23-0.641,0.656-1.193,1.025c-0.549,0.371-0.99,1.354-0.99,1.354l-0.208,1.465c0,0-1.597,0.021-3.096-0.293c-1.499-0.314-2.699-0.982-2.699-0.982l0.655-1.451c0,0-0.58-2.225-0.636-3.926c-0.056-1.703,0.572-2.958,0.481-3.37c-0.09-0.412-0.438-1.109-0.523-1.569c-0.083-0.46-0.307-2.036-0.327-2.238c-0.021-0.202-0.28-2.232,0.614-2.204c0.891,0.027,0.648,1.388,0.725,2.246c0.077,0.857,1.13,3.249,1.297,3.123c0.167-0.125-0.056-2.398,0.006-2.838c0.063-0.439,0.182-2.315,0.293-2.747c0.112-0.433,0.105-1.778,0.935-1.66c0.83,0.118,0.606,1.332,0.488,1.813c-0.118,0.48,0.021,1.597,0.07,2.302c0.048,0.704,0.112,2.356,0.112,2.356l0.404-0.042c0,0,0.913-5,0.976-5.439c0.062-0.439,0.182-1.618,0.858-1.472c1.117,0.242,0.516,1.967,0.516,1.967l-0.486,5.509c0,0,0.166,0.224,0.492,0.021c0.33-0.202,1.312-3.25,1.459-3.927c0.146-0.676,0.084-2.678,1.145-2.428c1.059,0.252,0.453,2.755,0.124,4.353c-0.327,1.597-1.03,3.39-1.03,3.39l-0.433,1.631l0.376,0.852l0.412-0.092l0.898-0.717c0,0,0,0,0.614-0.461c0.613-0.46,1.764-0.495,2.044-0.355C23.453,16.154,24.221,16.713,23.76,17.145z",temp:"M17.5,19.508V8.626h-3.999v10.881c-1.404,0.727-2.375,2.178-2.375,3.869c0,2.416,1.959,4.375,4.375,4.375s4.375-1.959,4.375-4.375C19.876,21.686,18.905,20.234,17.5,19.508zM20.5,5.249c0-2.757-2.244-5-5.001-5s-4.998,2.244-4.998,5v12.726c-1.497,1.373-2.376,3.314-2.376,5.4c0,4.066,3.31,7.377,7.376,7.377s7.374-3.311,7.374-7.377c0-2.086-0.878-4.029-2.375-5.402V5.249zM20.875,23.377c0,2.963-2.41,5.373-5.375,5.373c-2.962,0-5.373-2.41-5.373-5.373c0-1.795,0.896-3.443,2.376-4.438V5.251c0-1.654,1.343-3,2.997-3s3,1.345,3,3v13.688C19.979,19.934,20.875,21.582,20.875,23.377zM22.084,8.626l4.5,2.598V6.029L22.084,8.626z", +thunder:"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h5.271l-2.166,3.398l1.977-0.411L10,30.875l9.138-10.102L17,21l2.167-2.023h4.269c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979z",snow:"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM16.667,24.09l1.119-1.119c0.389-0.391,0.389-1.025,0-1.416c-0.392-0.391-1.025-0.391-1.415,0l-1.119,1.119l-1.119-1.119c-0.391-0.391-1.025-0.391-1.415,0c-0.391,0.391-0.391,1.025,0,1.416l1.118,1.117l-1.12,1.121c-0.389,0.393-0.389,1.021,0,1.414c0.195,0.188,0.451,0.293,0.707,0.293c0.256,0,0.512-0.104,0.708-0.293l1.12-1.119l1.12,1.119c0.195,0.188,0.451,0.293,0.708,0.293c0.256,0,0.512-0.104,0.707-0.293c0.391-0.396,0.391-1.021,0-1.414L16.667,24.09zM25.119,21.817c-0.393-0.392-1.025-0.392-1.415,0l-1.12,1.121l-1.12-1.121c-0.391-0.392-1.022-0.392-1.414,0c-0.39,0.392-0.39,1.022,0,1.416l1.119,1.119l-1.119,1.119c-0.39,0.391-0.39,1.022,0,1.413c0.195,0.195,0.451,0.294,0.707,0.294c0.257,0,0.513-0.099,0.707-0.294l1.12-1.118l1.12,1.118c0.194,0.195,0.45,0.294,0.707,0.294c0.256,0,0.513-0.099,0.708-0.294c0.389-0.391,0.389-1.022,0-1.413l-1.12-1.119l1.12-1.119C25.507,22.842,25.507,22.209,25.119,21.817zM9.334,23.953l1.119-1.119c0.389-0.394,0.389-1.021,0-1.414c-0.391-0.394-1.025-0.394-1.415,0l-1.119,1.119l-1.12-1.121c-0.391-0.39-1.023-0.39-1.415,0c-0.391,0.396-0.391,1.024,0,1.418l1.119,1.117l-1.12,1.118c-0.391,0.394-0.391,1.025,0,1.414c0.196,0.195,0.452,0.293,0.708,0.293c0.256,0,0.511-0.098,0.707-0.293l1.12-1.119l1.121,1.121c0.195,0.195,0.451,0.293,0.707,0.293s0.513-0.098,0.708-0.293c0.389-0.391,0.389-1.022,0-1.416L9.334,23.953z",hail:"M25.372,6.912c-0.093-3.925-3.302-7.078-7.248-7.08c-2.638,0.002-4.942,1.412-6.208,3.518c-0.595-0.327-1.28-0.518-2.01-0.518C7.627,2.834,5.773,4.639,5.69,6.898c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.875c3.312,0,6-2.688,6-6C29.434,9.944,27.732,7.715,25.372,6.912zM23.436,16.584H7.562c-2.209-0.006-3.997-1.793-4.001-4c-0.002-1.983,1.45-3.619,3.35-3.933c0.265-0.043,0.502-0.19,0.657-0.414C7.723,8.015,7.78,7.74,7.731,7.475C7.703,7.326,7.686,7.187,7.686,7.051c0.004-1.225,0.995-2.217,2.22-2.219c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.31c0.342-0.066,0.626-0.308,0.748-0.631c0.749-1.992,2.662-3.412,4.911-3.41c2.898,0.004,5.244,2.351,5.251,5.25c0,0.16-0.009,0.325-0.026,0.496c-0.05,0.518,0.305,0.984,0.814,1.079c1.859,0.345,3.273,1.966,3.271,3.923C27.43,14.791,25.645,16.578,23.436,16.584zM11.503,23.709c-0.784-0.002-1.418-0.636-1.418-1.416c0-0.785,0.634-1.416,1.418-1.418c0.78,0.002,1.413,0.633,1.416,1.418C12.917,23.073,12.284,23.707,11.503,23.709zM19.002,23.709c-0.783-0.002-1.418-0.636-1.418-1.416c0-0.785,0.635-1.416,1.418-1.418c0.779,0.002,1.414,0.633,1.414,1.418C20.417,23.073,19.784,23.707,19.002,23.709zM7.503,28.771c-0.783-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.415,0.635,1.415,1.416C8.917,28.135,8.284,28.77,7.503,28.771zM15.001,28.771c-0.782-0.002-1.417-0.637-1.417-1.418s0.634-1.414,1.417-1.416c0.78,0.002,1.413,0.635,1.415,1.416C16.415,28.135,15.784,28.77,15.001,28.771zM22.5,28.771c-0.782-0.002-1.416-0.634-1.416-1.416c0-0.785,0.634-1.418,1.416-1.42c0.781,0.002,1.414,0.635,1.418,1.42C23.915,28.138,23.282,28.77,22.5,28.771z",rain:"M25.371,7.306c-0.092-3.924-3.301-7.077-7.248-7.079c-2.638,0.001-4.942,1.412-6.208,3.517c-0.595-0.327-1.28-0.517-2.01-0.517C7.626,3.229,5.772,5.033,5.689,7.293c-2.393,0.786-4.125,3.025-4.127,5.686c0,3.312,2.687,6,6,6v-0.002h15.874c3.312,0,6-2.688,6-6C29.434,10.34,27.732,8.11,25.371,7.306zM23.436,16.979H7.561c-2.209-0.006-3.997-1.792-4.001-4.001c-0.002-1.982,1.45-3.618,3.35-3.931c0.265-0.043,0.502-0.191,0.657-0.414C7.722,8.41,7.779,8.136,7.73,7.87C7.702,7.722,7.685,7.582,7.685,7.446C7.689,6.221,8.68,5.23,9.905,5.228c0.647,0,1.217,0.278,1.633,0.731c0.233,0.257,0.587,0.375,0.927,0.309c0.342-0.066,0.626-0.307,0.748-0.63c0.749-1.992,2.662-3.412,4.911-3.41c2.899,0.004,5.244,2.35,5.251,5.249c0,0.161-0.009,0.326-0.027,0.497c-0.049,0.517,0.305,0.984,0.815,1.079c1.86,0.344,3.274,1.966,3.271,3.923C27.43,15.186,25.645,16.973,23.436,16.979zM9.029,26.682c0-1.115,0.021-5.425,0.021-5.432c0.002-0.409-0.247-0.779-0.628-0.932c-0.38-0.152-0.815-0.059-1.099,0.24c-0.006,0.008-1.037,1.098-2.081,2.342c-0.523,0.627-1.048,1.287-1.463,1.896c-0.399,0.648-0.753,1.066-0.811,1.885C2.971,28.355,4.324,29.711,6,29.714C7.672,29.71,9.029,28.354,9.029,26.682zM4.971,26.727c0.091-0.349,1.081-1.719,1.993-2.764c0.025-0.029,0.051-0.061,0.076-0.089c-0.005,1.124-0.01,2.294-0.01,2.808c0,0.567-0.461,1.028-1.029,1.03C5.447,27.71,4.997,27.273,4.971,26.727zM16.425,26.682c0-1.115,0.021-5.424,0.021-5.43c0.002-0.41-0.247-0.779-0.628-0.934c-0.381-0.152-0.814-0.058-1.1,0.242c-0.006,0.008-1.035,1.094-2.08,2.342c-0.522,0.623-1.047,1.285-1.463,1.894c-0.399,0.649-0.753,1.068-0.809,1.888c0,1.672,1.354,3.028,3.029,3.028C15.068,29.711,16.425,28.354,16.425,26.682zM12.365,26.729c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.03,0.05-0.06,0.075-0.089c-0.005,1.123-0.011,2.294-0.011,2.807c-0.002,0.568-0.461,1.027-1.028,1.029C12.84,27.709,12.392,27.273,12.365,26.729zM23.271,20.317c-0.38-0.153-0.816-0.06-1.099,0.24c-0.009,0.008-1.037,1.097-2.08,2.342c-0.523,0.625-1.049,1.285-1.462,1.896c-0.402,0.649-0.754,1.067-0.812,1.886c0,1.672,1.354,3.029,3.03,3.029c1.673,0,3.027-1.357,3.027-3.029c0-1.115,0.022-5.425,0.022-5.431C23.9,20.84,23.651,20.47,23.271,20.317zM21.879,26.681c-0.004,0.568-0.463,1.027-1.031,1.029c-0.553-0.002-1.002-0.438-1.028-0.982c0.092-0.349,1.081-1.72,1.993-2.765c0.025-0.028,0.05-0.059,0.074-0.088C21.883,24.998,21.879,26.167,21.879,26.681z",cloudy:"M14.378,6.781c0.41,0.988,1.938,0.346,1.524-0.648C15.708,5.667,15.515,5.2,15.32,4.734c-0.289-0.695-0.875-3.233-2.042-2.747c-1.03,0.433-0.128,1.846,0.142,2.494C13.739,5.248,14.059,6.015,14.378,6.781M20.8,7.223c1.094,0.453,1.538-1.551,1.813-2.216c0.281-0.677,1.478-2.565,0.357-3.029c-1.092-0.453-1.537,1.548-1.813,2.216C20.876,4.872,19.68,6.757,20.8,7.223M18.137,6.692c1.183,0,0.829-2.019,0.829-2.742c0-0.732,0.383-2.935-0.829-2.935c-1.183,0-0.828,2.019-0.828,2.742C17.309,4.49,16.926,6.692,18.137,6.692M23.058,8.729c0.852,0.85,2.142-0.972,2.659-1.49c0.512-0.513,2.187-1.687,1.352-2.524c-0.834-0.836-2.013,0.843-2.522,1.353C24.028,6.585,22.198,7.874,23.058,8.729M24.565,10.986c0.448,1.091,2.183-0.01,2.849-0.286c0.676-0.28,2.858-0.771,2.394-1.89c-0.455-1.091-2.181,0.008-2.849,0.285C26.281,9.377,24.102,9.866,24.565,10.986M12.036,8.742c0.752,0.75,1.932-0.415,1.17-1.173c-0.253-0.347-0.646-0.645-0.949-0.946c-0.541-0.539-2.162-2.799-3.068-1.889c-0.79,0.791,0.586,1.755,1.083,2.25C10.859,7.57,11.447,8.156,12.036,8.742M29.365,17.397c-0.768-0.317-1.534-0.635-2.302-0.952c-0.646-0.268-2.07-1.169-2.495-0.135c-0.481,1.168,2.054,1.747,2.751,2.035c0.455,0.188,0.911,0.377,1.367,0.565C29.7,19.331,30.379,17.816,29.365,17.397M29.942,12.817c-0.83,0-1.66,0-2.49,0c-0.701,0-2.357-0.288-2.355,0.83c0,1.262,2.567,0.827,3.319,0.827c0.493,0,0.986,0,1.479-0.001C30.99,14.473,31.043,12.815,29.942,12.817M24.234,18.568c-0.673-0.673-1.773,0.189-1.281,1.007c-0.295-0.264-0.614-0.499-0.961-0.69c3.894-2.866,3.328-9.006-1.021-11.107c-2.024-0.978-4.481-0.828-6.368,0.394c-0.871,0.564-1.603,1.336-2.119,2.236c-0.262,0.456-0.468,0.943-0.612,1.449c-0.074,0.258-0.131,0.521-0.172,0.786c-0.083,0.534-0.109,0.553-0.553,0.871c-0.182-0.957-1.64-0.675-2.326-0.674c-0.815,0.001-1.963-0.217-2.752,0.046c-0.867,0.289-0.652,1.615,0.263,1.613c0.324,0.052,0.701-0.001,1.028-0.001c0.904-0.001,1.809-0.002,2.713-0.003c-0.308,0.352-0.496,0.969-0.94,0.77c-0.467-0.209-0.978-0.319-1.49-0.319c-0.951,0-1.877,0.375-2.561,1.036c-0.681,0.658-1.088,1.569-1.123,2.516c-0.944,0.31-1.791,0.891-2.421,1.658c-2.756,3.354-0.265,8.554,4.058,8.554v-0.002c3.597,0,7.194,0,10.792,0c1.341,0,2.843,0.167,4.168-0.113c3.652-0.772,5.361-5.21,3.133-8.229c0.548,0.547,1.096,1.094,1.644,1.641c0.183,0.183,0.364,0.424,0.575,0.574c0.552,0.552,1.524,0.066,1.403-0.713c-0.097-0.622-1.042-1.267-1.448-1.673C25.319,19.652,24.776,19.11,24.234,18.568M18.137,8.787c4.559,0.009,6.576,5.979,2.912,8.734c-0.637-3.505-4.161-5.824-7.629-5.03C13.943,10.367,15.852,8.792,18.137,8.787M22.895,24.08c-0.633,3.346-4.149,2.879-6.68,2.879c-3.017,0-6.033,0-9.049,0c-0.767,0-1.62,0.084-2.373-0.095c-2.274-0.538-3.416-3.242-2.172-5.235c0.678-1.087,1.568-1.19,2.626-1.67c0.604-0.273,0.456-0.807,0.456-1.331c0.002-0.597,0.284-1.169,0.756-1.533c0.787-0.608,1.943-0.497,2.611,0.234c1.098,1.205,1.96-1.346,2.507-1.893c2.025-2.025,5.475-1.708,7.068,0.684c0.344,0.516,0.581,1.102,0.693,1.712c0.097,0.529-0.115,1.341,0.188,1.796c0.291,0.47,0.943,0.463,1.397,0.68c0.508,0.23,0.963,0.591,1.304,1.034C22.834,22.125,23.064,23.107,22.895,24.08M6.906,9.917c0.881,0.364,1.763,0.727,2.644,1.091c0.353,0.146,0.707,0.292,1.06,0.437c0.997,0.412,1.637-1.119,0.642-1.526C10.47,9.441,9.456,9.177,8.609,8.828c-0.354-0.146-0.707-0.292-1.06-0.437C6.554,7.98,5.912,9.505,6.906,9.917",sun:"M15.502,7.504c-4.35,0-7.873,3.523-7.873,7.873c0,4.347,3.523,7.872,7.873,7.872c4.346,0,7.871-3.525,7.871-7.872C23.374,11.027,19.85,7.504,15.502,7.504zM15.502,21.25c-3.244-0.008-5.866-2.63-5.874-5.872c0.007-3.243,2.63-5.866,5.874-5.874c3.242,0.008,5.864,2.631,5.871,5.874C21.366,18.62,18.744,21.242,15.502,21.25zM15.502,6.977c0.553,0,1-0.448,1-1.001V1.125c-0.002-0.553-0.448-1-1-1c-0.553,0-1.001,0.449-1,1.002v4.85C14.502,6.528,14.949,6.977,15.502,6.977zM18.715,7.615c0.125,0.053,0.255,0.076,0.382,0.077c0.394,0,0.765-0.233,0.925-0.618l1.856-4.483c0.21-0.511-0.031-1.095-0.541-1.306c-0.511-0.211-1.096,0.031-1.308,0.541L18.174,6.31C17.963,6.82,18.205,7.405,18.715,7.615zM21.44,9.436c0.195,0.194,0.451,0.293,0.707,0.293s0.512-0.098,0.707-0.293l3.43-3.433c0.391-0.39,0.39-1.023,0-1.415c-0.392-0.39-1.025-0.39-1.415,0.002L21.44,8.021C21.049,8.412,21.049,9.045,21.44,9.436zM23.263,12.16c0.158,0.385,0.531,0.617,0.923,0.617c0.127,0,0.257-0.025,0.383-0.078l4.48-1.857c0.511-0.211,0.753-0.797,0.541-1.307s-0.796-0.752-1.307-0.54l-4.481,1.857C23.292,11.064,23.051,11.65,23.263,12.16zM29.752,14.371l-4.851,0.001c-0.552,0-1,0.448-0.998,1.001c0,0.553,0.447,0.999,0.998,0.999l4.852-0.002c0.553,0,0.999-0.449,0.999-1C30.752,14.817,30.304,14.369,29.752,14.371zM29.054,19.899l-4.482-1.854c-0.512-0.212-1.097,0.03-1.307,0.541c-0.211,0.511,0.031,1.096,0.541,1.308l4.482,1.854c0.126,0.051,0.256,0.075,0.383,0.075c0.393,0,0.765-0.232,0.925-0.617C29.806,20.695,29.563,20.109,29.054,19.899zM22.86,21.312c-0.391-0.391-1.023-0.391-1.414,0.001c-0.391,0.39-0.39,1.022,0,1.413l3.434,3.429c0.195,0.195,0.45,0.293,0.706,0.293s0.513-0.098,0.708-0.293c0.391-0.392,0.389-1.025,0-1.415L22.86,21.312zM20.029,23.675c-0.211-0.511-0.796-0.752-1.307-0.541c-0.51,0.212-0.752,0.797-0.54,1.308l1.86,4.48c0.159,0.385,0.531,0.617,0.925,0.617c0.128,0,0.258-0.024,0.383-0.076c0.511-0.211,0.752-0.797,0.54-1.309L20.029,23.675zM15.512,23.778c-0.553,0-1,0.448-1,1l0.004,4.851c0,0.553,0.449,0.999,1,0.999c0.553,0,1-0.448,0.998-1l-0.003-4.852C16.511,24.226,16.062,23.777,15.512,23.778zM12.296,23.142c-0.51-0.21-1.094,0.031-1.306,0.543l-1.852,4.483c-0.21,0.511,0.033,1.096,0.543,1.307c0.125,0.052,0.254,0.076,0.382,0.076c0.392,0,0.765-0.234,0.924-0.619l1.853-4.485C13.051,23.937,12.807,23.353,12.296,23.142zM9.57,21.325c-0.392-0.391-1.025-0.389-1.415,0.002L4.729,24.76c-0.391,0.392-0.389,1.023,0.002,1.415c0.195,0.194,0.45,0.292,0.706,0.292c0.257,0,0.513-0.098,0.708-0.293l3.427-3.434C9.961,22.349,9.961,21.716,9.57,21.325zM7.746,18.604c-0.213-0.509-0.797-0.751-1.307-0.54L1.96,19.925c-0.511,0.212-0.752,0.798-0.54,1.308c0.16,0.385,0.531,0.616,0.924,0.616c0.127,0,0.258-0.024,0.383-0.076l4.479-1.861C7.715,19.698,7.957,19.113,7.746,18.604zM7.1,15.392c0-0.553-0.447-0.999-1-0.999l-4.851,0.006c-0.553,0-1.001,0.448-0.999,1.001c0.001,0.551,0.449,1,1,0.998l4.852-0.006C6.654,16.392,7.102,15.942,7.1,15.392zM1.944,10.869l4.485,1.85c0.125,0.053,0.254,0.076,0.381,0.076c0.393,0,0.766-0.232,0.925-0.618c0.212-0.511-0.032-1.097-0.544-1.306L2.708,9.021c-0.511-0.21-1.095,0.032-1.306,0.542C1.19,10.074,1.435,10.657,1.944,10.869zM8.137,9.451c0.195,0.193,0.449,0.291,0.705,0.291s0.513-0.098,0.709-0.295c0.391-0.389,0.389-1.023-0.004-1.414L6.113,4.609C5.723,4.219,5.088,4.221,4.699,4.612c-0.391,0.39-0.389,1.024,0.002,1.414L8.137,9.451zM10.964,7.084c0.16,0.384,0.532,0.615,0.923,0.615c0.128,0,0.258-0.025,0.384-0.077c0.51-0.212,0.753-0.798,0.54-1.307l-1.864-4.479c-0.212-0.51-0.798-0.751-1.308-0.539C9.129,1.51,8.888,2.096,9.1,2.605L10.964,7.084z",undo:"M12.981,9.073V6.817l-12.106,6.99l12.106,6.99v-2.422c3.285-0.002,9.052,0.28,9.052,2.269c0,2.78-6.023,4.263-6.023,4.263v2.132c0,0,13.53,0.463,13.53-9.823C29.54,9.134,17.952,8.831,12.981,9.073z",detour:"M29.342,15.5l-7.556-4.363v2.614H18.75c-1.441-0.004-2.423,1.002-2.875,1.784c-0.735,1.222-1.056,2.561-1.441,3.522c-0.135,0.361-0.278,0.655-0.376,0.817c-1.626,0-0.998,0-2.768,0c-0.213-0.398-0.571-1.557-0.923-2.692c-0.237-0.676-0.5-1.381-1.013-2.071C8.878,14.43,7.89,13.726,6.75,13.75H2.812v3.499c0,0,0.358,0,1.031,0h2.741c0.008,0.013,0.018,0.028,0.029,0.046c0.291,0.401,0.634,1.663,1.031,2.888c0.218,0.623,0.455,1.262,0.92,1.897c0.417,0.614,1.319,1.293,2.383,1.293H11c2.25,0,1.249,0,3.374,0c0.696,0.01,1.371-0.286,1.809-0.657c1.439-1.338,1.608-2.886,2.13-4.127c0.218-0.608,0.453-1.115,0.605-1.314c0.006-0.01,0.012-0.018,0.018-0.025h2.85v2.614L29.342,15.5zM10.173,14.539c0.568,0.76,0.874,1.559,1.137,2.311c0.04,0.128,0.082,0.264,0.125,0.399h2.58c0.246-0.697,0.553-1.479,1.005-2.228c0.252-0.438,0.621-0.887,1.08-1.272H9.43C9.735,14.003,9.99,14.277,10.173,14.539z",merge:"M29.342,15.5l-7.556-4.363v2.613h-1.411c-0.788-0.01-1.331-0.241-2.019-0.743c-1.021-0.745-2.094-2.181-3.551-3.568C13.367,8.06,11.291,6.73,8.5,6.749H2.812v3.5H8.5c2.231,0.012,3.441,1.185,5.07,2.934c0.697,0.753,1.428,1.58,2.324,2.323c-1.396,1.165-2.412,2.516-3.484,3.501c-1.183,1.081-2.202,1.723-3.912,1.741H2.813v3.5h5.716c3.752,0.001,6.035-2.319,7.619-4.066c0.817-0.895,1.537-1.691,2.209-2.191c0.686-0.502,1.23-0.732,2.017-0.742h1.412v2.614L29.342,15.5z",split:"M21.786,20.698c-1.792-0.237-2.912-1.331-4.358-2.886c-0.697-0.751-1.428-1.577-2.324-2.319c1.396-1.165,2.411-2.519,3.483-3.503c1.01-0.92,1.901-1.519,3.199-1.688v2.574l7.556-4.363L21.786,4.15v2.652c-3.34,0.266-5.45,2.378-6.934,4.013c-0.819,0.896-1.537,1.692-2.212,2.192c-0.685,0.501-1.227,0.731-2.013,0.742c-0.001,0-0.002,0-0.003,0H2.812v3.5h0.001v0.001c0,0,0.046-0.001,0.136-0.001h7.677c0.786,0.011,1.33,0.241,2.017,0.743c1.021,0.743,2.095,2.181,3.552,3.568c1.312,1.258,3.162,2.46,5.592,2.649v2.664l7.556-4.36l-7.556-4.361V20.698z",fork:"M13.741,10.249h8.045v2.627l7.556-4.363l-7.556-4.363v2.598H9.826C11.369,7.612,12.616,8.922,13.741,10.249zM21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-1.79-1.756-3.712-4.675-5.731-7.227c-2.049-2.486-4.159-4.972-7.451-5.091h-3.5v3.5h3.5c0.656-0.027,1.683,0.486,2.879,1.683c1.788,1.753,3.712,4.674,5.731,7.226c1.921,2.331,3.907,4.639,6.863,5.016v2.702l7.556-4.362l-7.556-4.362V20.654z",fork_alt:"M21.786,12.873l7.556-4.361l-7.556-4.362v2.701c-2.929,0.374-4.905,2.64-6.809,4.952c0.545,0.703,1.08,1.418,1.604,2.127c0.192,0.26,0.383,0.514,0.573,0.77c0.802-1.043,1.584-1.999,2.341-2.74c0.884-0.885,1.673-1.393,2.291-1.588V12.873zM17.661,17.006c-1.893-2.371-3.815-5.354-6.009-7.537c-1.461-1.428-3.155-2.664-5.34-2.693h-3.5v3.5h3.5c0.971-0.119,2.845,1.333,4.712,3.771c1.895,2.371,3.815,5.354,6.011,7.537c1.326,1.297,2.847,2.426,4.751,2.645v2.646l7.556-4.363l-7.556-4.362v2.535C20.746,20.346,19.205,19.022,17.661,17.006z",exchange:"M21.786,12.876l7.556-4.363l-7.556-4.363v2.598H2.813v3.5h18.973V12.876zM10.368,18.124l-7.556,4.362l7.556,4.362V24.25h18.974v-3.501H10.368V18.124z",shuffle:"M21.786,20.654c-0.618-0.195-1.407-0.703-2.291-1.587c-0.757-0.742-1.539-1.698-2.34-2.741c-0.191,0.256-0.382,0.51-0.574,0.77c-0.524,0.709-1.059,1.424-1.604,2.127c1.904,2.31,3.88,4.578,6.809,4.952v2.701l7.556-4.362l-7.556-4.362V20.654zM9.192,11.933c0.756,0.741,1.538,1.697,2.339,2.739c0.195-0.262,0.39-0.521,0.587-0.788c0.52-0.703,1.051-1.412,1.592-2.11c-2.032-2.463-4.133-4.907-7.396-5.025h-3.5v3.5h3.5C6.969,10.223,7.996,10.735,9.192,11.933zM21.786,10.341v2.535l7.556-4.363l-7.556-4.363v2.647c-1.904,0.219-3.425,1.348-4.751,2.644c-2.196,2.183-4.116,5.167-6.011,7.538c-1.867,2.438-3.741,3.888-4.712,3.771h-3.5v3.5h3.5c2.185-0.029,3.879-1.266,5.34-2.693c2.194-2.184,4.116-5.167,6.009-7.538C19.205,12.003,20.746,10.679,21.786,10.341z",refresh:"M24.083,15.5c-0.009,4.739-3.844,8.574-8.583,8.583c-4.741-0.009-8.577-3.844-8.585-8.583c0.008-4.741,3.844-8.577,8.585-8.585c1.913,0,3.665,0.629,5.09,1.686l-1.782,1.783l8.429,2.256l-2.26-8.427l-1.89,1.89c-2.072-1.677-4.717-2.688-7.587-2.688C8.826,3.418,3.418,8.826,3.416,15.5C3.418,22.175,8.826,27.583,15.5,27.583S27.583,22.175,27.583,15.5H24.083z",ccw:"M24.249,15.499c-0.009,4.832-3.918,8.741-8.75,8.75c-2.515,0-4.768-1.064-6.365-2.763l2.068-1.442l-7.901-3.703l0.744,8.694l2.193-1.529c2.244,2.594,5.562,4.242,9.26,4.242c6.767,0,12.249-5.482,12.249-12.249H24.249zM15.499,6.75c2.516,0,4.769,1.065,6.367,2.764l-2.068,1.443l7.901,3.701l-0.746-8.693l-2.192,1.529c-2.245-2.594-5.562-4.245-9.262-4.245C8.734,3.25,3.25,8.734,3.249,15.499H6.75C6.758,10.668,10.668,6.758,15.499,6.75z",acw:"M19.275,3.849l1.695,8.56l1.875-1.642c2.311,3.59,1.72,8.415-1.584,11.317c-2.24,1.96-5.186,2.57-7.875,1.908l-0.84,3.396c3.75,0.931,7.891,0.066,11.02-2.672c4.768-4.173,5.521-11.219,1.94-16.279l2.028-1.775L19.275,3.849zM8.154,20.232c-2.312-3.589-1.721-8.416,1.582-11.317c2.239-1.959,5.186-2.572,7.875-1.909l0.842-3.398c-3.752-0.93-7.893-0.067-11.022,2.672c-4.765,4.174-5.519,11.223-1.939,16.283l-2.026,1.772l8.26,2.812l-1.693-8.559L8.154,20.232z",contract:"M25.083,18.895l-8.428-2.259l2.258,8.428l1.838-1.837l7.053,7.053l2.476-2.476l-7.053-7.053L25.083,18.895zM5.542,11.731l8.428,2.258l-2.258-8.428L9.874,7.398L3.196,0.72L0.72,3.196l6.678,6.678L5.542,11.731zM7.589,20.935l-6.87,6.869l2.476,2.476l6.869-6.869l1.858,1.857l2.258-8.428l-8.428,2.258L7.589,20.935zM23.412,10.064l6.867-6.87l-2.476-2.476l-6.868,6.869l-1.856-1.856l-2.258,8.428l8.428-2.259L23.412,10.064z",expand:"M25.545,23.328,17.918,15.623,25.534,8.007,27.391,9.864,29.649,1.436,21.222,3.694,23.058,5.53,15.455,13.134,7.942,5.543,9.809,3.696,1.393,1.394,3.608,9.833,5.456,8.005,12.98,15.608,5.465,23.123,3.609,21.268,1.351,29.695,9.779,27.438,7.941,25.6,15.443,18.098,23.057,25.791,21.19,27.638,29.606,29.939,27.393,21.5z",stop:"M5.5,5.5h20v20h-20z",end:"M21.167,5.5,21.167,13.681,6.684,5.318,6.684,25.682,21.167,17.318,21.167,25.5,25.5,25.5,25.5,5.5z",start:"M24.316,5.318,9.833,13.682,9.833,5.5,5.5,5.5,5.5,25.5,9.833,25.5,9.833,17.318,24.316,25.682z",ff:"M25.5,15.5,15.2,9.552,15.2,15.153,5.5,9.552,5.5,21.447,15.2,15.847,15.2,21.447z",rw:"M5.5,15.499,15.8,21.447,15.8,15.846,25.5,21.447,25.5,9.552,15.8,15.152,15.8,9.552z",play:"M6.684,25.682L24.316,15.5L6.684,5.318V25.682z",arrowright:"M11.166,23.963L22.359,17.5c1.43-0.824,1.43-2.175,0-3L11.166,8.037c-1.429-0.826-2.598-0.15-2.598,1.5v12.926C8.568,24.113,9.737,24.789,11.166,23.963z",arrowleft:"M20.834,8.037L9.641,14.5c-1.43,0.824-1.43,2.175,0,3l11.193,6.463c1.429,0.826,2.598,0.15,2.598-1.5V9.537C23.432,7.887,22.263,7.211,20.834,8.037z",arrowup:"M23.963,20.834L17.5,9.64c-0.825-1.429-2.175-1.429-3,0L8.037,20.834c-0.825,1.429-0.15,2.598,1.5,2.598h12.926C24.113,23.432,24.788,22.263,23.963,20.834z",arrowdown:"M8.037,11.166L14.5,22.359c0.825,1.43,2.175,1.43,3,0l6.463-11.194c0.826-1.429,0.15-2.598-1.5-2.598H9.537C7.886,8.568,7.211,9.737,8.037,11.166z",arrowleft2:"M21.871,9.814 15.684,16.001 21.871,22.188 18.335,25.725 8.612,16.001 18.335,6.276z",arrowright2:"M10.129,22.186 16.316,15.999 10.129,9.812 13.665,6.276 23.389,15.999 13.665,25.725z",smile2:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,29.534C8.539,29.534,2.466,23.462,2.466,16C2.466,8.539,8.539,2.466,16,2.466c7.462,0,13.535,6.072,13.535,13.533C29.534,23.462,23.462,29.534,16,29.534zM11.104,14c0.932,0,1.688-1.483,1.688-3.312s-0.755-3.312-1.688-3.312s-1.688,1.483-1.688,3.312S10.172,14,11.104,14zM20.729,14c0.934,0,1.688-1.483,1.688-3.312s-0.756-3.312-1.688-3.312c-0.932,0-1.688,1.483-1.688,3.312S19.798,14,20.729,14zM8.143,21.189C10.458,24.243,13.148,26,16.021,26c2.969,0,5.745-1.868,8.11-5.109c-2.515,1.754-5.292,2.734-8.215,2.734C13.164,23.625,10.54,22.756,8.143,21.189z",smile:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM20.729,7.375c0.934,0,1.688,1.483,1.688,3.312S21.661,14,20.729,14c-0.932,0-1.688-1.483-1.688-3.312S19.798,7.375,20.729,7.375zM11.104,7.375c0.932,0,1.688,1.483,1.688,3.312S12.037,14,11.104,14s-1.688-1.483-1.688-3.312S10.172,7.375,11.104,7.375zM16.021,26c-2.873,0-5.563-1.757-7.879-4.811c2.397,1.564,5.021,2.436,7.774,2.436c2.923,0,5.701-0.98,8.215-2.734C21.766,24.132,18.99,26,16.021,26z",alarm:"M8.179,20.115c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366c0.479-0.275,0.643-0.888,0.367-1.367C9.27,20.004,8.658,19.84,8.179,20.115zM9.18,12.239c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,13.126,9.657,12.516,9.18,12.239zM8.625,17.043c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,18.043,8.624,17.596,8.625,17.043zM16.312,3.957V3.031h1c0.275,0,0.5-0.225,0.5-0.5v-0.5c0-0.275-0.225-0.5-0.5-0.5h-3.625c-0.275,0-0.5,0.225-0.5,0.5v0.5c0,0.275,0.225,0.5,0.5,0.5h1v0.926C7.819,4.381,2.376,10.068,2.374,17.042C2.376,24.291,8.251,30.166,15.5,30.169c7.249-0.003,13.124-5.878,13.125-13.127C28.624,10.067,23.181,4.38,16.312,3.957zM15.5,27.166C9.909,27.157,5.385,22.633,5.375,17.042C5.385,11.451,9.909,6.927,15.5,6.917c5.59,0.01,10.115,4.535,10.124,10.125C25.615,22.633,21.091,27.157,15.5,27.166zM12.062,22.998c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,23.887,12.54,23.275,12.062,22.998zM12.062,11.088c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,11.2,11.584,11.364,12.062,11.088zM22.822,13.971c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,14.083,22.344,14.247,22.822,13.971zM15.501,23.92c-0.552,0-1,0.447-1,1c0,0.552,0.448,1,1,1s1-0.448,1-1C16.501,24.367,16.053,23.92,15.501,23.92zM19.938,9.355c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,10.245,20.418,9.632,19.938,9.355zM23.378,16.042c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,16.492,23.929,16.042,23.378,16.042zM22.823,20.115c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.091,0.367,1.367c0.477,0.275,1.089,0.112,1.365-0.366C23.464,21.004,23.3,20.391,22.823,20.115zM15.501,8.167c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.366c0.275,0.479,0.889,0.642,1.365,0.366l3.305-1.676c0.055,0.006,0.109,0.017,0.166,0.017c0.828,0,1.5-0.672,1.5-1.5l-0.5-7.876C16.501,8.614,16.053,8.167,15.501,8.167zM18.939,22.998c-0.479,0.276-0.643,0.888-0.366,1.367c0.275,0.477,0.888,0.642,1.366,0.365c0.478-0.276,0.642-0.889,0.366-1.365C20.028,22.886,19.417,22.723,18.939,22.998zM11.197,3.593c-0.836-1.04-2.103-1.718-3.541-1.718c-2.52,0-4.562,2.042-4.562,4.562c0,0.957,0.297,1.843,0.8,2.576C5.649,6.484,8.206,4.553,11.197,3.593zM27.106,9.014c0.503-0.733,0.8-1.619,0.8-2.576c0-2.52-2.043-4.562-4.562-4.562c-1.438,0-2.704,0.678-3.541,1.717C22.794,4.553,25.351,6.484,27.106,9.014z",clock:"M15.5,2.374C8.251,2.375,2.376,8.251,2.374,15.5C2.376,22.748,8.251,28.623,15.5,28.627c7.249-0.004,13.124-5.879,13.125-13.127C28.624,8.251,22.749,2.375,15.5,2.374zM15.5,25.623C9.909,25.615,5.385,21.09,5.375,15.5C5.385,9.909,9.909,5.384,15.5,5.374c5.59,0.01,10.115,4.535,10.124,10.125C25.615,21.09,21.091,25.615,15.5,25.623zM8.625,15.5c-0.001-0.552-0.448-0.999-1.001-1c-0.553,0-1,0.448-1,1c0,0.553,0.449,1,1,1C8.176,16.5,8.624,16.053,8.625,15.5zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.887,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM22.822,12.428c0.478-0.275,0.643-0.888,0.366-1.366c-0.275-0.478-0.89-0.642-1.366-0.366c-0.479,0.278-0.642,0.89-0.366,1.367C21.732,12.54,22.344,12.705,22.822,12.428zM12.062,21.455c-0.478-0.275-1.089-0.111-1.366,0.367c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.277,1.091,0.111,1.365-0.365C12.704,22.344,12.54,21.732,12.062,21.455zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM22.823,18.572c-0.48-0.275-1.092-0.111-1.367,0.365c-0.275,0.479-0.112,1.092,0.367,1.367c0.477,0.275,1.089,0.113,1.365-0.365C23.464,19.461,23.3,18.848,22.823,18.572zM19.938,7.813c-0.477-0.276-1.091-0.111-1.365,0.366c-0.275,0.48-0.111,1.091,0.366,1.367s1.089,0.112,1.366-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM23.378,14.5c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1c0.551,0,1-0.447,1-1C24.378,14.949,23.929,14.5,23.378,14.5zM15.501,6.624c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.889-0.365,1.365c0.275,0.479,0.889,0.643,1.365,0.367l3.305-1.676C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876C16.501,7.072,16.053,6.624,15.501,6.624zM15.501,22.377c-0.552,0-1,0.447-1,1s0.448,1,1,1s1-0.447,1-1S16.053,22.377,15.501,22.377zM18.939,21.455c-0.479,0.277-0.643,0.889-0.366,1.367c0.275,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.889,0.366-1.365C20.028,21.344,19.417,21.18,18.939,21.455z",stopwatch:"M27.216,18.533c0-3.636-1.655-6.883-4.253-9.032l0.733-0.998l0.482,0.354c0.198,0.146,0.481,0.104,0.628-0.097l0.442-0.604c0.146-0.198,0.103-0.482-0.097-0.628l-2.052-1.506c-0.199-0.146-0.481-0.103-0.628,0.097L22.03,6.724c-0.146,0.199-0.104,0.482,0.096,0.628l0.483,0.354l-0.736,1.003c-1.28-0.834-2.734-1.419-4.296-1.699c0.847-0.635,1.402-1.638,1.403-2.778h-0.002c0-1.922-1.557-3.48-3.479-3.48c-1.925,0-3.48,1.559-3.48,3.48c0,1.141,0.556,2.144,1.401,2.778c-1.549,0.277-2.99,0.857-4.265,1.68L8.424,7.684l0.484-0.353c0.198-0.145,0.245-0.428,0.098-0.628l-0.44-0.604C8.42,5.899,8.136,5.855,7.937,6.001L5.881,7.5c-0.2,0.146-0.243,0.428-0.099,0.628l0.442,0.604c0.145,0.2,0.428,0.244,0.627,0.099l0.483-0.354l0.729,0.999c-2.615,2.149-4.282,5.407-4.282,9.057c0,6.471,5.245,11.716,11.718,11.716c6.47,0,11.716-5.243,11.718-11.716H27.216zM12.918,4.231c0.002-1.425,1.155-2.58,2.582-2.582c1.426,0.002,2.579,1.157,2.581,2.582c-0.002,1.192-0.812,2.184-1.908,2.482v-1.77h0.6c0.246,0,0.449-0.203,0.449-0.449V3.746c0-0.247-0.203-0.449-0.449-0.449h-2.545c-0.247,0-0.449,0.202-0.449,0.449v0.749c0,0.246,0.202,0.449,0.449,0.449h0.599v1.77C13.729,6.415,12.919,5.424,12.918,4.231zM15.5,27.554c-4.983-0.008-9.015-4.038-9.022-9.021c0.008-4.982,4.039-9.013,9.022-9.022c4.981,0.01,9.013,4.04,9.021,9.022C24.513,23.514,20.481,27.546,15.5,27.554zM15.5,12.138c0.476,0,0.861-0.385,0.861-0.86s-0.386-0.861-0.861-0.861s-0.861,0.386-0.861,0.861S15.024,12.138,15.5,12.138zM15.5,24.927c-0.476,0-0.861,0.386-0.861,0.861s0.386,0.861,0.861,0.861s0.861-0.386,0.861-0.861S15.976,24.927,15.5,24.927zM12.618,11.818c-0.237-0.412-0.764-0.553-1.176-0.315c-0.412,0.238-0.554,0.765-0.315,1.177l2.867,6.722c0.481,0.831,1.543,1.116,2.375,0.637c0.829-0.479,1.114-1.543,0.635-2.374L12.618,11.818zM18.698,24.07c-0.412,0.237-0.555,0.765-0.316,1.176c0.237,0.412,0.764,0.554,1.176,0.315c0.413-0.238,0.553-0.765,0.316-1.176C19.635,23.974,19.108,23.832,18.698,24.07zM8.787,15.65c0.412,0.238,0.938,0.097,1.176-0.315c0.237-0.413,0.097-0.938-0.314-1.176c-0.412-0.239-0.938-0.098-1.177,0.313C8.234,14.886,8.375,15.412,8.787,15.65zM22.215,21.413c-0.412-0.236-0.938-0.096-1.176,0.316c-0.238,0.412-0.099,0.938,0.314,1.176c0.41,0.238,0.937,0.098,1.176-0.314C22.768,22.178,22.625,21.652,22.215,21.413zM9.107,18.531c-0.002-0.476-0.387-0.86-0.861-0.86c-0.477,0-0.862,0.385-0.862,0.86c0.001,0.476,0.386,0.86,0.861,0.861C8.722,19.393,9.106,19.008,9.107,18.531zM21.896,18.531c0,0.477,0.384,0.862,0.859,0.86c0.476,0.002,0.862-0.382,0.862-0.859s-0.387-0.86-0.862-0.862C22.279,17.671,21.896,18.056,21.896,18.531zM8.787,21.413c-0.412,0.238-0.554,0.765-0.316,1.176c0.239,0.412,0.765,0.553,1.177,0.316c0.413-0.239,0.553-0.765,0.315-1.178C9.725,21.317,9.198,21.176,8.787,21.413zM21.352,14.157c-0.411,0.238-0.551,0.764-0.312,1.176c0.237,0.413,0.764,0.555,1.174,0.315c0.412-0.236,0.555-0.762,0.316-1.176C22.29,14.06,21.766,13.921,21.352,14.157zM12.304,24.067c-0.413-0.235-0.939-0.096-1.176,0.315c-0.238,0.413-0.098,0.939,0.312,1.178c0.413,0.236,0.939,0.096,1.178-0.315C12.857,24.832,12.715,24.308,12.304,24.067zM18.698,12.992c0.41,0.238,0.938,0.099,1.174-0.313c0.238-0.411,0.1-0.938-0.314-1.177c-0.414-0.238-0.937-0.097-1.177,0.315C18.144,12.229,18.286,12.755,18.698,12.992z",history:"M10.666,18.292c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17c0.828,0,1.5-0.671,1.5-1.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96C10.553,17.204,10.389,17.816,10.666,18.292zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM8.179,18.572c-0.478,0.277-0.642,0.889-0.365,1.367c0.275,0.479,0.889,0.641,1.365,0.365c0.479-0.275,0.643-0.888,0.367-1.367C9.27,18.461,8.658,18.297,8.179,18.572zM9.18,10.696c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366c0.479,0.276,1.09,0.113,1.367-0.366C9.821,11.584,9.657,10.973,9.18,10.696zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM21.822,10.696c-0.479,0.278-0.643,0.89-0.366,1.367s0.888,0.642,1.366,0.365c0.478-0.275,0.643-0.888,0.365-1.366C22.913,10.584,22.298,10.42,21.822,10.696zM21.456,18.938c-0.274,0.479-0.112,1.092,0.367,1.367c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367C22.343,18.297,21.73,18.461,21.456,18.938zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM18.573,22.822c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365c-0.277-0.479-0.888-0.643-1.365-0.367C18.46,21.732,18.296,22.344,18.573,22.822zM18.939,9.546c0.477,0.276,1.088,0.112,1.365-0.366c0.276-0.478,0.113-1.091-0.367-1.367c-0.477-0.276-1.09-0.111-1.364,0.366C18.298,8.659,18.462,9.27,18.939,9.546zM28.703,14.364C28.074,7.072,21.654,1.67,14.364,2.295c-3.254,0.281-6.118,1.726-8.25,3.877L4.341,4.681l-1.309,7.364l7.031-2.548L8.427,8.12c1.627-1.567,3.767-2.621,6.194-2.833c5.64-0.477,10.595,3.694,11.089,9.335c0.477,5.64-3.693,10.595-9.333,11.09c-5.643,0.476-10.599-3.694-11.092-9.333c-0.102-1.204,0.019-2.373,0.31-3.478l-3.27,1.186c-0.089,0.832-0.106,1.684-0.031,2.55c0.629,7.29,7.048,12.691,14.341,12.066C23.926,28.074,29.328,21.655,28.703,14.364z", +future:"M17.001,15.5l-0.5-7.876c0-0.552-0.448-1-1-1c-0.552,0-1,0.448-1,1l-0.466,7.343l-3.004,1.96c-0.478,0.277-0.642,0.89-0.365,1.365c0.275,0.479,0.889,0.644,1.365,0.367l3.305-1.677C15.39,16.99,15.444,17,15.501,17C16.329,17,17.001,16.329,17.001,15.5zM18.939,21.455c-0.479,0.277-0.644,0.889-0.366,1.367c0.274,0.477,0.888,0.643,1.366,0.365c0.478-0.275,0.642-0.89,0.365-1.365C20.027,21.344,19.417,21.18,18.939,21.455zM19.938,7.813c-0.477-0.276-1.09-0.111-1.364,0.366c-0.275,0.48-0.111,1.091,0.366,1.367c0.477,0.276,1.088,0.112,1.365-0.366C20.581,8.702,20.418,8.089,19.938,7.813zM21.823,20.305c0.477,0.274,1.089,0.112,1.364-0.365c0.276-0.479,0.112-1.092-0.364-1.367c-0.48-0.275-1.093-0.111-1.367,0.365C21.182,19.416,21.344,20.029,21.823,20.305zM22.822,12.428c0.478-0.275,0.643-0.888,0.365-1.366c-0.274-0.478-0.89-0.642-1.365-0.366c-0.479,0.278-0.643,0.89-0.366,1.367S22.344,12.705,22.822,12.428zM24.378,15.5c0-0.551-0.448-1-1-1c-0.554,0.002-1.001,0.45-1.001,1c0.001,0.552,0.448,1,1.001,1C23.93,16.5,24.378,16.053,24.378,15.5zM9.546,12.062c0.275-0.478,0.111-1.089-0.366-1.366c-0.479-0.276-1.09-0.112-1.366,0.366s-0.111,1.09,0.365,1.366C8.658,12.704,9.269,12.541,9.546,12.062zM6.624,15.5c0,0.553,0.449,1,1,1c0.552,0,1-0.447,1.001-1c-0.001-0.552-0.448-0.999-1.001-1C7.071,14.5,6.624,14.948,6.624,15.5zM9.179,20.305c0.479-0.275,0.643-0.888,0.367-1.367c-0.276-0.477-0.888-0.641-1.367-0.365c-0.478,0.277-0.642,0.889-0.365,1.367C8.089,20.418,8.703,20.58,9.179,20.305zM12.062,9.545c0.479-0.276,0.642-0.888,0.366-1.366c-0.276-0.478-0.888-0.642-1.366-0.366s-0.642,0.888-0.366,1.366C10.973,9.658,11.584,9.822,12.062,9.545zM14.501,23.377c0,0.553,0.448,1,1,1c0.552,0,1-0.447,1-1s-0.448-1-1-1C14.949,22.377,14.501,22.824,14.501,23.377zM10.696,21.822c-0.275,0.479-0.111,1.09,0.366,1.365c0.478,0.276,1.091,0.11,1.365-0.365c0.277-0.479,0.113-1.09-0.365-1.367C11.584,21.18,10.973,21.344,10.696,21.822zM28.674,14.087l-3.27-1.186c0.291,1.105,0.41,2.274,0.309,3.478c-0.492,5.639-5.449,9.809-11.091,9.333c-5.639-0.495-9.809-5.45-9.333-11.09c0.494-5.641,5.449-9.812,11.089-9.335c2.428,0.212,4.567,1.266,6.194,2.833l-1.637,1.377l7.031,2.548l-1.309-7.364l-1.771,1.492c-2.133-2.151-4.996-3.597-8.25-3.877C9.346,1.67,2.926,7.072,2.297,14.364c-0.625,7.291,4.777,13.71,12.066,14.339c7.293,0.625,13.713-4.776,14.342-12.066C28.779,15.771,28.762,14.919,28.674,14.087z",globeAlt2:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM8.251,7.48c0.122,0.055,0.255,0.104,0.28,0.137C8.57,7.668,8.621,7.823,8.557,7.861C8.492,7.9,8.39,7.887,8.376,7.771c-0.013-0.115-0.026-0.128-0.18-0.18c-0.022-0.007-0.035-0.01-0.051-0.015C8.18,7.544,8.216,7.512,8.251,7.48zM7.733,7.974c0.031,0.087,0.113,0.125,0,0.17C7.673,8.168,7.611,8.172,7.559,8.165C7.617,8.102,7.672,8.035,7.733,7.974zM16,27.533C9.639,27.533,4.466,22.36,4.466,16c0-0.085,0.011-0.168,0.013-0.254c0.004-0.003,0.008-0.006,0.012-0.009c0.129-0.102,0.283-0.359,0.334-0.45c0.052-0.089,0.181-0.154,0.116-0.256c-0.059-0.096-0.292-0.23-0.407-0.261c0.01-0.099,0.032-0.195,0.045-0.294c0.063,0.077,0.137,0.17,0.208,0.194c0.115,0.038,0.501,0.052,0.566,0.052c0.063,0,0.334,0.014,0.386-0.064c0.051-0.077,0.09-0.077,0.154-0.077c0.064,0,0.18,0.231,0.271,0.257c0.089,0.026,0.257,0.013,0.244,0.181c-0.012,0.166,0.077,0.309,0.167,0.321c0.09,0.013,0.296-0.194,0.296-0.194s0,0.322-0.012,0.438C6.846,15.698,7,16.124,7,16.124s0.193,0.397,0.244,0.488c0.052,0.09,0.27,0.36,0.27,0.476c0,0.117,0.026,0.297,0.104,0.297s0.155-0.206,0.244-0.335c0.091-0.128,0.117-0.31,0.155-0.438c0.039-0.129,0.039-0.36,0.039-0.45c0-0.091,0.076-0.168,0.257-0.245c0.181-0.077,0.309-0.296,0.463-0.412c0.155-0.116,0.142-0.309,0.452-0.309c0.308,0,0.282,0,0.36-0.078c0.077-0.077,0.154-0.128,0.192,0.013c0.039,0.142,0.257,0.347,0.296,0.399c0.039,0.052,0.116,0.193,0.104,0.348c-0.013,0.153,0.012,0.334,0.077,0.334c0.064,0,0.193-0.219,0.193-0.219s0.283-0.192,0.27,0.014c-0.014,0.205,0.025,0.425,0.025,0.552c0,0.13,0.232,0.438,0.232,0.362c0-0.079,0.103-0.296,0.103-0.413c0-0.114,0.064-0.063,0.231,0.051c0.167,0.116,0.283,0.349,0.283,0.349s0.168,0.154,0.193,0.219c0.026,0.064,0.206-0.025,0.244-0.104c0.039-0.076,0.065-0.115,0.167-0.141c0.104-0.026,0.231-0.026,0.271-0.168c0.039-0.142,0.154-0.308,0-0.502c-0.154-0.193-0.232-0.321-0.347-0.412c-0.117-0.09-0.206-0.322-0.206-0.322s0.244-0.218,0.321-0.296c0.079-0.077,0.193-0.025,0.207,0.064c0.013,0.091-0.115,0.168-0.141,0.361c-0.026,0.192,0.154,0.257,0.206,0.192c0.051-0.065,0.18-0.219,0.18-0.257c0-0.039-0.089-0.026-0.102-0.167c-0.013-0.142,0.166-0.245,0.23-0.207c0.066,0.039,0.477-0.051,0.67-0.154s0.308-0.322,0.425-0.412c0.116-0.089,0.515-0.386,0.489-0.527c-0.026-0.142,0.012-0.334-0.09-0.515c-0.103-0.18-0.232-0.295-0.283-0.373c-0.051-0.077,0.219-0.09,0.347-0.206c0.129-0.116,0-0.219-0.064-0.206c-0.064,0.013-0.232,0.052-0.296,0.039c-0.064-0.013-0.103-0.077-0.206-0.155c-0.102-0.077,0.026-0.192,0.091-0.179c0.064,0.013,0.23-0.129,0.308-0.193c0.077-0.064,0.193-0.115,0.154-0.051c-0.038,0.064-0.128,0.296-0.026,0.309c0.104,0.013,0.348-0.193,0.388-0.18c0.038,0.013,0.102,0.18,0.064,0.257c-0.039,0.077-0.039,0.206,0.013,0.193c0.051-0.013,0.154-0.129,0.18-0.09c0.027,0.039,0.154,0.116,0.09,0.257c-0.063,0.142-0.193,0.193-0.039,0.284c0.154,0.089,0.206,0.012,0.322-0.052c0.115-0.064,0.193-0.347,0.128-0.438c-0.064-0.09-0.218-0.27-0.218-0.334c0-0.064,0.257-0.064,0.257-0.167s0.09-0.18,0.18-0.219c0.091-0.039,0.206-0.206,0.244-0.154c0.039,0.052,0.271,0.116,0.334,0.039c0.064-0.077,0.4-0.36,0.605-0.515c0.206-0.154,0.283-0.334,0.336-0.515c0.051-0.18,0.128-0.296,0.102-0.437v0c0.077,0.18,0.09,0.309,0.077,0.45c-0.013,0.142,0,0.438,0.026,0.476c0.025,0.039,0.129,0.128,0.192,0.103c0.064-0.025-0.025-0.283-0.025-0.334c0-0.052,0.09-0.129,0.142-0.142c0.052-0.013,0-0.231-0.065-0.322c-0.063-0.09-0.154-0.142-0.102-0.154c0.051-0.013,0.115-0.116,0.077-0.142c-0.039-0.025-0.014-0.116-0.103-0.09c-0.065,0.019-0.241-0.015-0.235,0.095c-0.037-0.11-0.116-0.183-0.216-0.172c-0.116,0.013-0.181,0.077-0.296,0.077s-0.025-0.18-0.077-0.18c-0.051,0-0.168,0.167-0.231,0.077c-0.064-0.09,0.18-0.206,0.373-0.27c0.192-0.064,0.514-0.438,0.644-0.451c0.128-0.013,0.45,0.026,0.733,0.013c0.283-0.013,0.373-0.129,0.463-0.064s0.283,0.142,0.399,0.129c0.116-0.014,0.064,0,0.244-0.129c0.18-0.129,0.348-0.193,0.438-0.296c0.09-0.103,0.335-0.18,0.348-0.077c0.014,0.103-0.026,0.206,0.077,0.206s0.258-0.103,0.386-0.154c0.129-0.051,0.231-0.116,0.231-0.116s-0.527,0.36-0.655,0.438c-0.129,0.077-0.438,0.129-0.567,0.283c-0.128,0.155-0.205,0.206-0.192,0.374c0.014,0.167,0.231,0.386,0.128,0.54c-0.103,0.154-0.141,0.373-0.141,0.373s0.154-0.219,0.373-0.36s0.348-0.334,0.425-0.412s0.309-0.091,0.309-0.181s0.064-0.206,0.104-0.309c0.038-0.103-0.077-0.078,0-0.206c0.076-0.129,0.064-0.232,0.45-0.232s0.257,0.026,0.566,0.013c0.309-0.013,0.424-0.167,0.72-0.245c0.296-0.077,0.527-0.128,0.618-0.089c0.09,0.038,0.232,0.012,0.141-0.078c-0.089-0.09-0.295-0.219-0.193-0.245c0.104-0.026,0.207-0.039,0.246-0.142c0.039-0.103-0.142-0.283-0.039-0.386c0.104-0.103-0.077-0.231-0.207-0.257c-0.128-0.025-0.63,0.026-0.731-0.025c-0.104-0.052-0.271-0.116-0.322-0.078c-0.052,0.039-0.168,0.245-0.168,0.245s-0.09,0.025-0.168-0.09c-0.076-0.116-0.5-0.103-0.629-0.103s-0.271,0.025-0.413,0.039c-0.141,0.013-0.219,0.052-0.322-0.039c-0.102-0.09-0.243-0.129-0.296-0.167c-0.051-0.039-0.334-0.039-0.553-0.012c-0.218,0.025-0.438,0.025-0.438,0.025s-0.104-0.039-0.257-0.129c-0.154-0.09-0.309-0.154-0.361-0.154c-0.051,0-0.449,0.064-0.539,0c-0.091-0.064-0.181-0.103-0.245-0.103s-0.115-0.103-0.038-0.103s0.437-0.103,0.437-0.103s-0.103-0.142-0.231-0.142c-0.128,0-0.359-0.064-0.424-0.064s-0.014,0.064-0.142,0.039c-0.13-0.026-0.258-0.078-0.335-0.026c-0.076,0.051-0.258,0.128-0.064,0.18c0.193,0.052,0.373,0,0.425,0.078c0.052,0.077,0,0.115,0,0.167s-0.103,0.193-0.167,0.219c-0.064,0.025-0.143-0.039-0.27,0.025c-0.129,0.064-0.451,0.013-0.49,0.052c-0.038,0.039-0.115-0.103-0.18-0.077c-0.064,0.025-0.232,0.193-0.322,0.18c-0.089-0.013-0.206-0.103-0.206-0.206s-0.038-0.232-0.077-0.258c-0.038-0.025-0.322-0.039-0.425-0.025c-0.103,0.013-0.424,0.038-0.477,0.09c-0.052,0.052-0.193,0.09-0.283,0.09s-0.167-0.09-0.36-0.116c-0.192-0.026-0.617-0.039-0.669-0.026s-0.218-0.025-0.155-0.077c0.065-0.051,0.257-0.219,0.143-0.295c-0.117-0.078-0.375-0.078-0.489-0.09c-0.117-0.013-0.232-0.039-0.413-0.013c-0.181,0.026-0.219,0.116-0.296,0.039c-0.077-0.077,0.193,0.039-0.077-0.077c-0.27-0.116-0.399-0.103-0.477-0.064c-0.077,0.039,0.013,0.025-0.192,0.103c-0.206,0.078-0.322,0.116-0.374,0.129c-0.051,0.012-0.372-0.065-0.411-0.091c-0.038-0.025-0.181,0.013-0.309,0.064S9.895,7.025,9.767,7C9.638,6.973,9.432,6.973,9.303,7.025C9.174,7.076,9.084,7.076,8.956,7.166c-0.13,0.09-0.373,0.142-0.373,0.142S8.522,7.305,8.448,7.301C10.474,5.541,13.111,4.466,16,4.466c6.361,0,11.534,5.173,11.534,11.534S22.36,27.533,16,27.533zM14.888,19.92c0,0,0.207-0.026,0.207-0.117c0-0.089-0.207-0.205-0.282-0.102c-0.078,0.102-0.219,0.205-0.207,0.296C14.625,20.138,14.888,19.92,14.888,19.92zM14.875,17.023c-0.181,0.233-0.167,0.182-0.296,0.128c-0.128-0.05-0.334,0.116-0.296,0.182c0.039,0.064,0.322-0.014,0.386,0.102c0.065,0.116,0.065,0.129,0.193,0.104c0.128-0.026,0.257-0.205,0.219-0.295C15.043,17.151,14.875,17.023,14.875,17.023zM14.837,18.245c-0.051,0-0.412,0.064-0.451,0.079c-0.039,0.013-0.27-0.025-0.27-0.025c-0.09,0.089-0.026,0.179,0.116,0.166s0.438-0.052,0.502-0.052C14.799,18.413,14.888,18.245,14.837,18.245zM14.284,14.668c-0.19,0.03-0.308,0.438-0.155,0.425C14.284,15.081,14.451,14.643,14.284,14.668zM14.734,16.959c-0.052-0.064-0.181-0.271-0.323-0.219c-0.042,0.017-0.153,0.245-0.012,0.245C14.541,16.985,14.786,17.023,14.734,16.959zM14.85,16.805c0.232-0.013,0.167-0.245-0.013-0.257C14.786,16.544,14.618,16.818,14.85,16.805zM17.591,18.928c-0.193-0.039-0.244-0.102-0.45-0.205c-0.207-0.103-0.67-0.103-0.682-0.039c-0.014,0.064,0,0-0.155-0.05c-0.153-0.054-0.271,0-0.309-0.091c-0.038-0.091-0.128-0.117-0.244-0.002c-0.097,0.097-0.142,0.104,0.078,0.143c0.218,0.039,0.283,0.039,0.192,0.141c-0.09,0.104-0.154,0.233-0.077,0.244c0.077,0.015,0.309-0.05,0.334,0c0.026,0.054-0.051,0.064,0.207,0.105c0.258,0.037,0.309,0.128,0.359,0.178c0.051,0.052,0.206,0.22,0.104,0.22c-0.104,0-0.219,0.128-0.142,0.143c0.077,0.013,0.309-0.039,0.321,0c0.014,0.037,0.143,0.283,0.271,0.271c0.129-0.013,0.206-0.244,0.27-0.31c0.065-0.064,0.322-0.104,0.349,0.012c0.026,0.116,0.104,0.233,0.257,0.311c0.154,0.076,0.335,0.154,0.348,0.089c0.013-0.064-0.077-0.309-0.181-0.346c-0.103-0.041-0.282-0.259-0.282-0.348c0-0.091-0.155-0.117-0.232-0.182C17.849,19.147,17.784,18.967,17.591,18.928zM8.042,17.023c-0.084,0.037-0.155,0.476,0,0.527c0.154,0.052,0.244-0.205,0.193-0.271C8.183,17.218,8.158,16.973,8.042,17.023zM15.429,18.117c-0.118-0.05-0.335,0.424-0.181,0.463C15.403,18.62,15.518,18.156,15.429,18.117zM15.687,13.703c0.077,0,0.18-0.051,0.18-0.193c0-0.142,0.18,0,0.27-0.013s0.141-0.103,0.18-0.206c0.005-0.013,0.008-0.021,0.009-0.027c-0.003,0.024-0.001,0.093,0.095,0.117c0.154,0.038,0.205-0.064,0.205-0.103s0.283-0.103,0.336-0.142c0.051-0.038,0.258-0.103,0.27-0.154c0.013-0.051,0-0.348,0.064-0.373c0.064-0.026,0.154-0.026,0.052-0.206c-0.104-0.181-0.104-0.348-0.232-0.271c-0.095,0.057-0.038,0.284-0.115,0.438s-0.142,0.296-0.193,0.296s-0.321,0.103-0.399,0.18c-0.076,0.077-0.45-0.064-0.501,0c-0.052,0.064-0.154,0.141-0.219,0.193c-0.065,0.051-0.245,0.013-0.207,0.167C15.518,13.562,15.609,13.703,15.687,13.703zM17.449,12.056c0.18-0.013,0.348-0.064,0.348-0.064s0.271,0.013,0.232-0.116c-0.04-0.128-0.322-0.141-0.375-0.128c-0.051,0.013-0.142-0.142-0.244-0.116c-0.096,0.023-0.128,0.155-0.128,0.193c0,0.039-0.36,0.115-0.245,0.219C17.153,12.146,17.27,12.069,17.449,12.056zM13.91,19.058c0.104,0.064,0.296-0.219,0.349-0.13c0.051,0.091-0.013,0.13,0.076,0.246c0.091,0.114,0.258,0.102,0.258,0.102s-0.013-0.309-0.155-0.387c-0.142-0.077-0.232-0.166-0.064-0.141c0.167,0.026,0.257-0.039,0.219-0.114c-0.039-0.078-0.283-0.039-0.361-0.026s-0.193-0.052-0.193-0.052c-0.077,0.024-0.063,0.089-0.09,0.219C13.923,18.902,13.807,18.992,13.91,19.058zM20.924,21.618c-0.231-0.052-0.077,0.039,0,0.154c0.077,0.116,0.232,0.176,0.258,0.05C21.193,21.759,21.155,21.67,20.924,21.618zM21.915,24.744c-0.077,0.064,0,0.091-0.219,0.22c-0.22,0.13-0.49,0.271-0.541,0.386c-0.052,0.116,0.051,0.181,0.258,0.192c0.206,0.013,0.154,0.053,0.296-0.103s0.271-0.244,0.438-0.373c0.168-0.128,0.168-0.322,0.168-0.322s-0.181-0.178-0.193-0.141C22.1,24.665,21.992,24.681,21.915,24.744zM18.504,21.618c0.014-0.116-0.219-0.116-0.334-0.207c-0.116-0.089-0.128-0.359-0.193-0.515c-0.064-0.153-0.192-0.257-0.322-0.397c-0.128-0.143-0.192-0.465-0.23-0.438c-0.039,0.025-0.154,0.399-0.064,0.515c0.09,0.116-0.039,0.348-0.103,0.503c-0.065,0.153-0.22-0.026-0.349-0.104c-0.129-0.078-0.308-0.128-0.398-0.219c-0.09-0.091,0.155-0.335,0.091-0.426c-0.065-0.09-0.412-0.013-0.45-0.013c-0.039,0-0.116-0.128-0.194-0.128c-0.077,0-0.064,0.258-0.064,0.258s-0.078-0.091-0.193-0.207c-0.117-0.115,0.012,0.077-0.103,0.193c-0.117,0.117-0.079,0.078-0.129,0.206c-0.051,0.129-0.167,0.077-0.283-0.052c-0.116-0.128-0.179-0.037-0.258,0c-0.077,0.039-0.141,0.259-0.18,0.309c-0.039,0.052-0.309,0.117-0.374,0.182c-0.064,0.062-0.09,0.27-0.09,0.322c0,0.05-0.271,0.023-0.361,0.089c-0.09,0.064-0.23,0.025-0.321,0.025c-0.09,0-0.399,0.244-0.502,0.308c-0.103,0.066-0.103,0.298-0.051,0.362c0.051,0.063,0.154,0.219,0.09,0.244c-0.064,0.026-0.104,0.206,0.051,0.359c0.154,0.155,0.103,0.194,0.115,0.271c0.014,0.077,0.078,0.104,0.181,0.232c0.102,0.128-0.181,0.231-0.219,0.31c-0.039,0.076,0.091,0.192,0.167,0.257c0.077,0.063,0.271,0.026,0.386-0.013c0.117-0.039,0.245-0.143,0.321-0.155c0.079-0.013,0.438-0.026,0.438-0.026s0.129-0.192,0.219-0.296c0.089-0.102,0.372-0.013,0.372-0.013s0.117-0.076,0.426-0.141c0.309-0.065,0.179,0.064,0.296,0.104c0.115,0.037,0.27,0.062,0.359,0.128c0.09,0.064,0,0.218-0.012,0.283c-0.014,0.064,0.219,0.038,0.23-0.026c0.014-0.064,0.077-0.128,0.207-0.205c0.128-0.078,0.025,0.114,0.076,0.231c0.052,0.116,0.129-0.157,0.129-0.026c0,0.039,0.039,0.078,0.051,0.116c0.014,0.039,0.181,0.052,0.181,0.18c0,0.13,0,0.207,0.039,0.231c0.038,0.026,0.244,0,0.335,0.155c0.089,0.154,0.154,0.013,0.205-0.052c0.052-0.064,0.231,0.026,0.283,0.078c0.052,0.05,0.193-0.104,0.387-0.155c0.192-0.051,0.167-0.039,0.219-0.115c0.051-0.078,0.09-0.283,0.205-0.438c0.115-0.153,0.271-0.424,0.271-0.631c0-0.206-0.014-0.682-0.155-0.899C18.761,21.953,18.492,21.733,18.504,21.618zM18.029,24.77c-0.065-0.013-0.207-0.062-0.207-0.062c-0.142,0.141,0.142,0.141,0.104,0.283c-0.039,0.141,0.193,0.089,0.257,0.064c0.063-0.027,0.22-0.323,0.193-0.399C18.351,24.577,18.093,24.783,18.029,24.77zM22.803,24.178c-0.052,0-0.077,0.064-0.192,0c-0.117-0.063-0.091-0.037-0.168-0.167c-0.077-0.127-0.091-0.296-0.219-0.23c-0.051,0.025,0,0.168,0.051,0.218c0.053,0.052,0.077,0.231,0.064,0.283c-0.012,0.052-0.231,0.116-0.129,0.18c0.104,0.064,0.297,0,0.271,0.078c-0.025,0.077-0.129,0.179-0.013,0.205c0.115,0.025,0.154-0.089,0.207-0.178c0.051-0.093,0.089-0.169,0.179-0.221C22.944,24.294,22.854,24.178,22.803,24.178zM22.815,21.18c0.168,0.064,0.464-0.231,0.347-0.27C23.047,20.871,22.815,21.18,22.815,21.18zM13.923,19.906c-0.029,0.115,0.193,0.167,0.206,0.039C14.141,19.816,13.949,19.803,13.923,19.906zM14.27,16.47c-0.064,0.065-0.257,0.193-0.283,0.31c-0.025,0.115,0.309-0.182,0.399-0.296c0.091-0.117,0.27-0.052,0.308-0.117c0.04-0.063,0.04-0.063,0.04-0.063s-0.142-0.025-0.257-0.063c-0.117-0.039-0.258,0.102-0.193-0.104c0.064-0.206,0.257-0.167,0.219-0.322c-0.039-0.154-0.168-0.193-0.207-0.193c-0.09,0,0.013,0.141-0.116,0.231c-0.128,0.09-0.271,0.128-0.193,0.283C14.064,16.29,14.334,16.405,14.27,16.47zM13.254,19.751c0.013-0.076-0.142-0.192-0.206-0.192c-0.065,0-0.386-0.077-0.386-0.077c-0.058,0.023-0.135,0.045-0.158,0.077c-0.007-0.011-0.022-0.024-0.049-0.039c-0.142-0.075-0.309,0-0.361-0.102c-0.05-0.104-0.127-0.104-0.179-0.039c-0.094,0.117,0.025,0.206,0.063,0.231c0.038,0.024,0.181,0.052,0.309,0.039c0.08-0.008,0.181-0.027,0.21-0.059c0.004,0.014,0.016,0.027,0.035,0.044c0.103,0.092,0.167,0.13,0.321,0.116C13.009,19.74,13.241,19.829,13.254,19.751zM12.881,18.992c0.065,0,0.193,0,0.283,0.026c0.09,0.025,0.386,0.05,0.373-0.064c-0.013-0.115-0.038-0.297,0.089-0.411c0.13-0.117,0.257-0.18,0.193-0.348c-0.063-0.167-0.193-0.271-0.103-0.349c0.09-0.076,0.192-0.102,0.192-0.166c0-0.065-0.217,0.18-0.244-0.246c-0.005-0.091-0.206,0.025-0.219,0.116c-0.012,0.091,0.142,0.167-0.103,0.167c-0.245,0-0.257,0.194-0.309,0.232c-0.052,0.039-0.103,0.051-0.207,0.076c-0.102,0.026-0.127,0.13-0.153,0.194c-0.025,0.063-0.206-0.116-0.257-0.064c-0.051,0.052-0.013,0.296,0.077,0.501C12.585,18.863,12.816,18.992,12.881,18.992zM11.979,18.928c0.065-0.077,0.038-0.192-0.063-0.18c-0.103,0.013-0.193-0.168-0.36-0.283c-0.168-0.114-0.296-0.194-0.451-0.36c-0.154-0.167-0.347-0.271-0.45-0.359c-0.104-0.091-0.257-0.13-0.322-0.116c-0.159,0.032,0.231,0.309,0.271,0.346c0.039,0.041,0.387,0.335,0.387,0.478s0.231,0.476,0.296,0.527c0.064,0.052,0.385,0.244,0.437,0.348c0.052,0.103,0.167,0.13,0.167-0.013C11.89,19.174,11.916,19.006,11.979,18.928zM11.002,17.474c0.064,0.232,0.193,0.464,0.244,0.555c0.052,0.089,0.271,0.217,0.348,0.281c0.077,0.064,0.192-0.024,0.143-0.102c-0.052-0.078-0.155-0.192-0.167-0.283c-0.013-0.091-0.078-0.233-0.181-0.387c-0.102-0.153-0.192-0.192-0.257-0.295c-0.064-0.104-0.296-0.297-0.296-0.297c-0.102,0.013-0.102,0.205-0.051,0.271C10.834,17.28,10.938,17.243,11.002,17.474z",globeAlt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM27.436,17.39c0.001,0.002,0.004,0.002,0.005,0.004c-0.022,0.187-0.054,0.37-0.085,0.554c-0.015-0.012-0.034-0.025-0.047-0.036c-0.103-0.09-0.254-0.128-0.318-0.115c-0.157,0.032,0.229,0.305,0.267,0.342c0.009,0.009,0.031,0.03,0.062,0.058c-1.029,5.312-5.709,9.338-11.319,9.338c-4.123,0-7.736-2.18-9.776-5.441c0.123-0.016,0.24-0.016,0.28-0.076c0.051-0.077,0.102-0.241,0.178-0.331c0.077-0.089,0.165-0.229,0.127-0.292c-0.039-0.064,0.101-0.344,0.088-0.419c-0.013-0.076-0.127-0.256,0.064-0.407s0.394-0.382,0.407-0.444c0.012-0.063,0.166-0.331,0.152-0.458c-0.012-0.127-0.152-0.28-0.24-0.318c-0.09-0.037-0.28-0.05-0.356-0.151c-0.077-0.103-0.292-0.203-0.368-0.178c-0.076,0.025-0.204,0.05-0.305-0.015c-0.102-0.062-0.267-0.139-0.33-0.189c-0.065-0.05-0.229-0.088-0.305-0.088c-0.077,0-0.065-0.052-0.178,0.101c-0.114,0.153,0,0.204-0.204,0.177c-0.204-0.023,0.025-0.036,0.141-0.189c0.113-0.152-0.013-0.242-0.141-0.203c-0.126,0.038-0.038,0.115-0.241,0.153c-0.203,0.036-0.203-0.09-0.076-0.115s0.355-0.139,0.355-0.19c0-0.051-0.025-0.191-0.127-0.191s-0.077-0.126-0.229-0.291c-0.092-0.101-0.196-0.164-0.299-0.204c-0.09-0.579-0.15-1.167-0.15-1.771c0-2.844,1.039-5.446,2.751-7.458c0.024-0.02,0.048-0.034,0.069-0.036c0.084-0.009,0.31-0.025,0.51-0.059c0.202-0.034,0.418-0.161,0.489-0.153c0.069,0.008,0.241,0.008,0.186-0.042C8.417,8.2,8.339,8.082,8.223,8.082S8.215,7.896,8.246,7.896c0.03,0,0.186,0.025,0.178,0.11C8.417,8.091,8.471,8.2,8.625,8.167c0.156-0.034,0.132-0.162,0.102-0.195C8.695,7.938,8.672,7.853,8.642,7.794c-0.031-0.06-0.023-0.136,0.14-0.153C8.944,7.625,9.168,7.708,9.16,7.573s0-0.28,0.046-0.356C9.253,7.142,9.354,7.09,9.299,7.065C9.246,7.04,9.176,7.099,9.121,6.972c-0.054-0.127,0.047-0.22,0.108-0.271c0.02-0.015,0.067-0.06,0.124-0.112C11.234,5.257,13.524,4.466,16,4.466c3.213,0,6.122,1.323,8.214,3.45c-0.008,0.022-0.01,0.052-0.031,0.056c-0.077,0.013-0.166,0.063-0.179-0.051c-0.013-0.114-0.013-0.331-0.102-0.203c-0.089,0.127-0.127,0.127-0.127,0.191c0,0.063,0.076,0.127,0.051,0.241C23.8,8.264,23.8,8.341,23.84,8.341c0.036,0,0.126-0.115,0.239-0.141c0.116-0.025,0.319-0.088,0.332,0.026c0.013,0.115,0.139,0.152,0.013,0.203c-0.128,0.051-0.267,0.026-0.293-0.051c-0.025-0.077-0.114-0.077-0.203-0.013c-0.088,0.063-0.279,0.292-0.279,0.292s-0.306,0.139-0.343,0.114c-0.04-0.025,0.101-0.165,0.203-0.228c0.102-0.064,0.178-0.204,0.14-0.242c-0.038-0.038-0.088-0.279-0.063-0.343c0.025-0.063,0.139-0.152,0.013-0.216c-0.127-0.063-0.217-0.14-0.318-0.178s-0.216,0.152-0.305,0.204c-0.089,0.051-0.076,0.114-0.191,0.127c-0.114,0.013-0.189,0.165,0,0.254c0.191,0.089,0.255,0.152,0.204,0.204c-0.051,0.051-0.267-0.025-0.267-0.025s-0.165-0.076-0.268-0.076c-0.101,0-0.229-0.063-0.33-0.076c-0.102-0.013-0.306-0.013-0.355,0.038c-0.051,0.051-0.179,0.203-0.28,0.152c-0.101-0.051-0.101-0.102-0.241-0.051c-0.14,0.051-0.279-0.038-0.355,0.038c-0.077,0.076-0.013,0.076-0.255,0c-0.241-0.076-0.189,0.051-0.419,0.089s-0.368-0.038-0.432,0.038c-0.064,0.077-0.153,0.217-0.19,0.127c-0.038-0.088,0.126-0.241,0.062-0.292c-0.062-0.051-0.33-0.025-0.367,0.013c-0.039,0.038-0.014,0.178,0.011,0.229c0.026,0.05,0.064,0.254-0.011,0.216c-0.077-0.038-0.064-0.166-0.141-0.152c-0.076,0.013-0.165,0.051-0.203,0.077c-0.038,0.025-0.191,0.025-0.229,0.076c-0.037,0.051,0.014,0.191-0.051,0.203c-0.063,0.013-0.114,0.064-0.254-0.025c-0.14-0.089-0.14-0.038-0.178-0.012c-0.038,0.025-0.216,0.127-0.229,0.012c-0.013-0.114,0.025-0.152-0.089-0.229c-0.115-0.076-0.026-0.076,0.127-0.025c0.152,0.05,0.343,0.075,0.622-0.013c0.28-0.089,0.395-0.127,0.28-0.178c-0.115-0.05-0.229-0.101-0.406-0.127c-0.179-0.025-0.42-0.025-0.7-0.127c-0.279-0.102-0.343-0.14-0.457-0.165c-0.115-0.026-0.813-0.14-1.132-0.089c-0.317,0.051-1.193,0.28-1.245,0.318s-0.128,0.19-0.292,0.318c-0.165,0.127-0.47,0.419-0.712,0.47c-0.241,0.051-0.521,0.254-0.521,0.305c0,0.051,0.101,0.242,0.076,0.28c-0.025,0.038,0.05,0.229,0.191,0.28c0.139,0.05,0.381,0.038,0.393-0.039c0.014-0.076,0.204-0.241,0.217-0.127c0.013,0.115,0.14,0.292,0.114,0.368c-0.025,0.077,0,0.153,0.09,0.14c0.088-0.012,0.559-0.114,0.559-0.114s0.153-0.064,0.127-0.166c-0.026-0.101,0.166-0.241,0.203-0.279c0.038-0.038,0.178-0.191,0.014-0.241c-0.167-0.051-0.293-0.064-0.115-0.216s0.292,0,0.521-0.229c0.229-0.229-0.051-0.292,0.191-0.305c0.241-0.013,0.496-0.025,0.444,0.051c-0.05,0.076-0.342,0.242-0.508,0.318c-0.166,0.077-0.14,0.216-0.076,0.292c0.063,0.076,0.09,0.254,0.204,0.229c0.113-0.025,0.254-0.114,0.38-0.101c0.128,0.012,0.383-0.013,0.42-0.013c0.039,0,0.216,0.178,0.114,0.203c-0.101,0.025-0.229,0.013-0.445,0.025c-0.215,0.013-0.456,0.013-0.456,0.051c0,0.039,0.292,0.127,0.19,0.191c-0.102,0.063-0.203-0.013-0.331-0.026c-0.127-0.012-0.203,0.166-0.241,0.267c-0.039,0.102,0.063,0.28-0.127,0.216c-0.191-0.063-0.331-0.063-0.381-0.038c-0.051,0.025-0.203,0.076-0.331,0.114c-0.126,0.038-0.076-0.063-0.242-0.063c-0.164,0-0.164,0-0.164,0l-0.103,0.013c0,0-0.101-0.063-0.114-0.165c-0.013-0.102,0.05-0.216-0.013-0.241c-0.064-0.026-0.292,0.012-0.33,0.088c-0.038,0.076-0.077,0.216-0.026,0.28c0.052,0.063,0.204,0.19,0.064,0.152c-0.14-0.038-0.317-0.051-0.419,0.026c-0.101,0.076-0.279,0.241-0.279,0.241s-0.318,0.025-0.318,0.102c0,0.077,0,0.178-0.114,0.191c-0.115,0.013-0.268,0.05-0.42,0.076c-0.153,0.025-0.139,0.088-0.317,0.102s-0.204,0.089-0.038,0.114c0.165,0.025,0.418,0.127,0.431,0.241c0.014,0.114-0.013,0.242-0.076,0.356c-0.043,0.079-0.305,0.026-0.458,0.026c-0.152,0-0.456-0.051-0.584,0c-0.127,0.051-0.102,0.305-0.064,0.419c0.039,0.114-0.012,0.178-0.063,0.216c-0.051,0.038-0.065,0.152,0,0.204c0.063,0.051,0.114,0.165,0.166,0.178c0.051,0.013,0.215-0.038,0.279,0.025c0.064,0.064,0.127,0.216,0.165,0.178c0.039-0.038,0.089-0.203,0.153-0.166c0.064,0.039,0.216-0.012,0.331-0.025s0.177-0.14,0.292-0.204c0.114-0.063,0.05-0.063,0.013-0.14c-0.038-0.076,0.114-0.165,0.204-0.254c0.088-0.089,0.253-0.013,0.292-0.115c0.038-0.102,0.051-0.279,0.151-0.267c0.103,0.013,0.243,0.076,0.331,0.076c0.089,0,0.279-0.14,0.332-0.165c0.05-0.025,0.241-0.013,0.267,0.102c0.025,0.114,0.241,0.254,0.292,0.279c0.051,0.025,0.381,0.127,0.433,0.165c0.05,0.038,0.126,0.153,0.152,0.254c0.025,0.102,0.114,0.102,0.128,0.013c0.012-0.089-0.065-0.254,0.025-0.242c0.088,0.013,0.191-0.026,0.191-0.026s-0.243-0.165-0.331-0.203c-0.088-0.038-0.255-0.114-0.331-0.241c-0.076-0.127-0.267-0.153-0.254-0.279c0.013-0.127,0.191-0.051,0.292,0.051c0.102,0.102,0.356,0.241,0.445,0.33c0.088,0.089,0.229,0.127,0.267,0.242c0.039,0.114,0.152,0.241,0.19,0.292c0.038,0.051,0.165,0.331,0.204,0.394c0.038,0.063,0.165-0.012,0.229-0.063c0.063-0.051,0.179-0.076,0.191-0.178c0.013-0.102-0.153-0.178-0.203-0.216c-0.051-0.038,0.127-0.076,0.191-0.127c0.063-0.05,0.177-0.14,0.228-0.063c0.051,0.077,0.026,0.381,0.051,0.432c0.025,0.051,0.279,0.127,0.331,0.191c0.05,0.063,0.267,0.089,0.304,0.051c0.039-0.038,0.242,0.026,0.294,0.038c0.049,0.013,0.202-0.025,0.304-0.05c0.103-0.025,0.204-0.102,0.191,0.063c-0.013,0.165-0.051,0.419-0.179,0.546c-0.127,0.127-0.076,0.191-0.202,0.191c-0.06,0-0.113,0-0.156,0.021c-0.041-0.065-0.098-0.117-0.175-0.097c-0.152,0.038-0.344,0.038-0.47,0.19c-0.128,0.153-0.178,0.165-0.204,0.114c-0.025-0.051,0.369-0.267,0.317-0.331c-0.05-0.063-0.355-0.038-0.521-0.038c-0.166,0-0.305-0.102-0.433-0.127c-0.126-0.025-0.292,0.127-0.418,0.254c-0.128,0.127-0.216,0.038-0.331,0.038c-0.115,0-0.331-0.165-0.331-0.165s-0.216-0.089-0.305-0.089c-0.088,0-0.267-0.165-0.318-0.165c-0.05,0-0.19-0.115-0.088-0.166c0.101-0.05,0.202,0.051,0.101-0.229c-0.101-0.279-0.33-0.216-0.419-0.178c-0.088,0.039-0.724,0.025-0.775,0.025c-0.051,0-0.419,0.127-0.533,0.178c-0.116,0.051-0.318,0.115-0.369,0.14c-0.051,0.025-0.318-0.051-0.433,0.013c-0.151,0.084-0.291,0.216-0.33,0.216c-0.038,0-0.153,0.089-0.229,0.28c-0.077,0.19,0.013,0.355-0.128,0.419c-0.139,0.063-0.394,0.204-0.495,0.305c-0.102,0.101-0.229,0.458-0.355,0.623c-0.127,0.165,0,0.317,0.025,0.419c0.025,0.101,0.114,0.292-0.025,0.471c-0.14,0.178-0.127,0.266-0.191,0.279c-0.063,0.013,0.063,0.063,0.088,0.19c0.025,0.128-0.114,0.255,0.128,0.369c0.241,0.113,0.355,0.217,0.418,0.367c0.064,0.153,0.382,0.407,0.382,0.407s0.229,0.205,0.344,0.293c0.114,0.089,0.152,0.038,0.177-0.05c0.025-0.09,0.178-0.104,0.355-0.104c0.178,0,0.305,0.04,0.483,0.014c0.178-0.025,0.356-0.141,0.42-0.166c0.063-0.025,0.279-0.164,0.443-0.063c0.166,0.103,0.141,0.241,0.23,0.332c0.088,0.088,0.24,0.037,0.355-0.051c0.114-0.09,0.064-0.052,0.203,0.025c0.14,0.075,0.204,0.151,0.077,0.267c-0.128,0.113-0.051,0.293-0.128,0.47c-0.076,0.178-0.063,0.203,0.077,0.278c0.14,0.076,0.394,0.548,0.47,0.638c0.077,0.088-0.025,0.342,0.064,0.495c0.089,0.151,0.178,0.254,0.077,0.331c-0.103,0.075-0.28,0.216-0.292,0.47s0.051,0.431,0.102,0.521s0.177,0.331,0.241,0.419c0.064,0.089,0.14,0.305,0.152,0.445c0.013,0.14-0.024,0.306,0.039,0.381c0.064,0.076,0.102,0.191,0.216,0.292c0.115,0.103,0.152,0.318,0.152,0.318s0.039,0.089,0.051,0.229c0.012,0.14,0.025,0.228,0.152,0.292c0.126,0.063,0.215,0.076,0.28,0.013c0.063-0.063,0.381-0.077,0.546-0.063c0.165,0.013,0.355-0.075,0.521-0.19s0.407-0.419,0.496-0.508c0.089-0.09,0.292-0.255,0.268-0.356c-0.025-0.101-0.077-0.203,0.024-0.254c0.102-0.052,0.344-0.152,0.356-0.229c0.013-0.077-0.09-0.395-0.115-0.457c-0.024-0.064,0.064-0.18,0.165-0.306c0.103-0.128,0.421-0.216,0.471-0.267c0.051-0.053,0.191-0.267,0.217-0.433c0.024-0.167-0.051-0.369,0-0.457c0.05-0.09,0.013-0.165-0.103-0.268c-0.114-0.102-0.089-0.407-0.127-0.457c-0.037-0.051-0.013-0.319,0.063-0.345c0.076-0.023,0.242-0.279,0.344-0.393c0.102-0.114,0.394-0.47,0.534-0.496c0.139-0.025,0.355-0.229,0.368-0.343c0.013-0.115,0.38-0.547,0.394-0.635c0.013-0.09,0.166-0.42,0.102-0.497c-0.062-0.076-0.559,0.115-0.622,0.141c-0.064,0.025-0.241,0.127-0.446,0.113c-0.202-0.013-0.114-0.177-0.127-0.254c-0.012-0.076-0.228-0.368-0.279-0.381c-0.051-0.012-0.203-0.166-0.267-0.317c-0.063-0.153-0.152-0.343-0.254-0.458c-0.102-0.114-0.165-0.38-0.268-0.559c-0.101-0.178-0.189-0.407-0.279-0.572c-0.021-0.041-0.045-0.079-0.067-0.117c0.118-0.029,0.289-0.082,0.31-0.009c0.024,0.088,0.165,0.279,0.19,0.419s0.165,0.089,0.178,0.216c0.014,0.128,0.14,0.433,0.19,0.47c0.052,0.038,0.28,0.242,0.318,0.318c0.038,0.076,0.089,0.178,0.127,0.369c0.038,0.19,0.076,0.444,0.179,0.482c0.102,0.038,0.444-0.064,0.508-0.102s0.482-0.242,0.635-0.255c0.153-0.012,0.179-0.115,0.368-0.152c0.191-0.038,0.331-0.177,0.458-0.28c0.127-0.101,0.28-0.355,0.33-0.444c0.052-0.088,0.179-0.152,0.115-0.253c-0.063-0.103-0.331-0.254-0.433-0.268c-0.102-0.012-0.089-0.178-0.152-0.178s-0.051,0.088-0.178,0.153c-0.127,0.063-0.255,0.19-0.344,0.165s0.026-0.089-0.113-0.203s-0.192-0.14-0.192-0.228c0-0.089-0.278-0.255-0.304-0.382c-0.026-0.127,0.19-0.305,0.254-0.19c0.063,0.114,0.115,0.292,0.279,0.368c0.165,0.076,0.318,0.204,0.395,0.229c0.076,0.025,0.267-0.14,0.33-0.114c0.063,0.024,0.191,0.253,0.306,0.292c0.113,0.038,0.495,0.051,0.559,0.051s0.33,0.013,0.381-0.063c0.051-0.076,0.089-0.076,0.153-0.076c0.062,0,0.177,0.229,0.267,0.254c0.089,0.025,0.254,0.013,0.241,0.179c-0.012,0.164,0.076,0.305,0.165,0.317c0.09,0.012,0.293-0.191,0.293-0.191s0,0.318-0.012,0.433c-0.014,0.113,0.139,0.534,0.139,0.534s0.19,0.393,0.241,0.482s0.267,0.355,0.267,0.47c0,0.115,0.025,0.293,0.103,0.293c0.076,0,0.152-0.203,0.24-0.331c0.091-0.126,0.116-0.305,0.153-0.432c0.038-0.127,0.038-0.356,0.038-0.444c0-0.09,0.075-0.166,0.255-0.242c0.178-0.076,0.304-0.292,0.456-0.407c0.153-0.115,0.141-0.305,0.446-0.305c0.305,0,0.278,0,0.355-0.077c0.076-0.076,0.151-0.127,0.19,0.013c0.038,0.14,0.254,0.343,0.292,0.394c0.038,0.052,0.114,0.191,0.103,0.344c-0.013,0.152,0.012,0.33,0.075,0.33s0.191-0.216,0.191-0.216s0.279-0.189,0.267,0.013c-0.014,0.203,0.025,0.419,0.025,0.545c0,0.053,0.042,0.135,0.088,0.21c-0.005,0.059-0.004,0.119-0.009,0.178C27.388,17.153,27.387,17.327,27.436,17.39zM20.382,12.064c0.076,0.05,0.102,0.127,0.152,0.203c0.052,0.076,0.14,0.05,0.203,0.114c0.063,0.064-0.178,0.14-0.075,0.216c0.101,0.077,0.151,0.381,0.165,0.458c0.013,0.076-0.279,0.114-0.369,0.102c-0.089-0.013-0.354-0.102-0.445-0.127c-0.089-0.026-0.139-0.343-0.025-0.331c0.116,0.013,0.141-0.025,0.267-0.139c0.128-0.115-0.189-0.166-0.278-0.191c-0.089-0.025-0.268-0.305-0.331-0.394c-0.062-0.089-0.014-0.228,0.141-0.331c0.076-0.051,0.279,0.063,0.381,0c0.101-0.063,0.203-0.14,0.241-0.165c0.039-0.025,0.293,0.038,0.33,0.114c0.039,0.076,0.191,0.191,0.141,0.229c-0.052,0.038-0.281,0.076-0.356,0c-0.075-0.077-0.255,0.012-0.268,0.152C20.242,12.115,20.307,12.013,20.382,12.064zM16.875,12.28c-0.077-0.025,0.025-0.178,0.102-0.229c0.075-0.051,0.164-0.178,0.241-0.305c0.076-0.127,0.178-0.14,0.241-0.127c0.063,0.013,0.203,0.241,0.241,0.318c0.038,0.076,0.165-0.026,0.217-0.051c0.05-0.025,0.127-0.102,0.14-0.165s0.127-0.102,0.254-0.102s0.013,0.102-0.076,0.127c-0.09,0.025-0.038,0.077,0.113,0.127c0.153,0.051,0.293,0.191,0.459,0.279c0.165,0.089,0.19,0.267,0.088,0.292c-0.101,0.025-0.406,0.051-0.521,0.038c-0.114-0.013-0.254-0.127-0.419-0.153c-0.165-0.025-0.369-0.013-0.433,0.077s-0.292,0.05-0.395,0.05c-0.102,0-0.228,0.127-0.253,0.077C16.875,12.534,16.951,12.306,16.875,12.28zM17.307,9.458c0.063-0.178,0.419,0.038,0.355,0.127C17.599,9.675,17.264,9.579,17.307,9.458zM17.802,18.584c0.063,0.102-0.14,0.431-0.254,0.407c-0.113-0.027-0.076-0.318-0.038-0.382C17.548,18.545,17.769,18.529,17.802,18.584zM13.189,12.674c0.025-0.051-0.039-0.153-0.127-0.013C13.032,12.71,13.164,12.725,13.189,12.674zM20.813,8.035c0.141,0.076,0.339,0.107,0.433,0.013c0.076-0.076,0.013-0.204-0.05-0.216c-0.064-0.013-0.104-0.115,0.062-0.203c0.165-0.089,0.343-0.204,0.534-0.229c0.19-0.025,0.622-0.038,0.774,0c0.152,0.039,0.382-0.166,0.445-0.254s-0.203-0.152-0.279-0.051c-0.077,0.102-0.444,0.076-0.521,0.051c-0.076-0.025-0.686,0.102-0.812,0.102c-0.128,0-0.179,0.152-0.356,0.229c-0.179,0.076-0.42,0.191-0.509,0.229c-0.088,0.038-0.177,0.19-0.101,0.216C20.509,7.947,20.674,7.959,20.813,8.035zM14.142,12.674c0.064-0.089-0.051-0.217-0.114-0.217c-0.12,0-0.178,0.191-0.103,0.254C14.002,12.776,14.078,12.763,14.142,12.674zM14.714,13.017c0.064,0.025,0.114,0.102,0.165,0.114c0.052,0.013,0.217,0,0.167-0.127s-0.167-0.127-0.204-0.127c-0.038,0-0.203-0.038-0.267,0C14.528,12.905,14.65,12.992,14.714,13.017zM11.308,10.958c0.101,0.013,0.217-0.063,0.305-0.101c0.088-0.038,0.216-0.114,0.216-0.229c0-0.114-0.025-0.216-0.077-0.267c-0.051-0.051-0.14-0.064-0.216-0.051c-0.115,0.02-0.127,0.14-0.203,0.14c-0.076,0-0.165,0.025-0.14,0.114s0.077,0.152,0,0.19C11.117,10.793,11.205,10.946,11.308,10.958zM11.931,10.412c0.127,0.051,0.394,0.102,0.292,0.153c-0.102,0.051-0.28,0.19-0.305,0.267s0.216,0.153,0.216,0.153s-0.077,0.089-0.013,0.114c0.063,0.025,0.102-0.089,0.203-0.089c0.101,0,0.304,0.063,0.406,0.063c0.103,0,0.267-0.14,0.254-0.229c-0.013-0.089-0.14-0.229-0.254-0.28c-0.113-0.051-0.241-0.28-0.317-0.331c-0.076-0.051,0.076-0.178-0.013-0.267c-0.09-0.089-0.153-0.076-0.255-0.14c-0.102-0.063-0.191,0.013-0.254,0.089c-0.063,0.076-0.14-0.013-0.217,0.012c-0.102,0.035-0.063,0.166-0.012,0.229C11.714,10.221,11.804,10.361,11.931,10.412zM24.729,17.198c-0.083,0.037-0.153,0.47,0,0.521c0.152,0.052,0.241-0.202,0.191-0.267C24.868,17.39,24.843,17.147,24.729,17.198zM20.114,20.464c-0.159-0.045-0.177,0.166-0.304,0.306c-0.128,0.141-0.267,0.254-0.317,0.241c-0.052-0.013-0.331,0.089-0.242,0.279c0.089,0.191,0.076,0.382-0.013,0.472c-0.089,0.088,0.076,0.342,0.052,0.482c-0.026,0.139,0.037,0.229,0.215,0.229s0.242-0.064,0.318-0.229c0.076-0.166,0.088-0.331,0.164-0.47c0.077-0.141,0.141-0.434,0.179-0.51c0.038-0.075,0.114-0.316,0.102-0.457C20.254,20.669,20.204,20.489,20.114,20.464zM10.391,8.802c-0.069-0.06-0.229-0.102-0.306-0.11c-0.076-0.008-0.152,0.06-0.321,0.06c-0.168,0-0.279,0.067-0.347,0C9.349,8.684,9.068,8.65,9.042,8.692C9.008,8.749,8.941,8.751,9.008,8.87c0.069,0.118,0.12,0.186,0.179,0.178s0.262-0.017,0.288,0.051C9.5,9.167,9.569,9.226,9.712,9.184c0.145-0.042,0.263-0.068,0.296-0.119c0.033-0.051,0.263-0.059,0.263-0.059S10.458,8.861,10.391,8.802z", +globe:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM19.158,23.269c-0.079,0.064-0.183,0.13-0.105,0.207c0.078,0.078-0.09,0.131-0.09,0.17s0.104,0.246,0.052,0.336c-0.052,0.092-0.091,0.223-0.13,0.301c-0.039,0.077-0.131,0.155-0.104,0.272c0.025,0.116-0.104,0.077-0.104,0.194c0,0.116,0.116,0.065,0.09,0.208c-0.025,0.144-0.09,0.183-0.09,0.285c0,0.104,0.064,0.247,0.064,0.286s-0.064,0.17-0.155,0.272c-0.092,0.104-0.155,0.17-0.144,0.233c0.014,0.065,0.104,0.144,0.091,0.184c-0.013,0.037-0.129,0.168-0.116,0.259c0.014,0.09,0.129,0.053,0.155,0.116c0.026,0.065-0.155,0.118-0.078,0.183c0.078,0.064,0.183,0.051,0.156,0.208c-0.019,0.112,0.064,0.163,0.126,0.198c-0.891,0.221-1.818,0.352-2.777,0.352C9.639,27.533,4.466,22.36,4.466,16c0-2.073,0.557-4.015,1.518-5.697c0.079-0.042,0.137-0.069,0.171-0.062c0.065,0.013,0.079,0.104,0.183,0.13c0.104,0.026,0.195-0.078,0.26-0.117c0.064-0.039,0.116-0.195,0.051-0.182c-0.065,0.013-0.234,0-0.234,0s0.183-0.104,0.183-0.169s0.025-0.169,0.129-0.208C6.83,9.655,6.83,9.681,6.765,9.837C6.7,9.993,6.896,9.928,6.973,9.863s0.13-0.013,0.272-0.104c0.143-0.091,0.143-0.143,0.221-0.143c0.078,0,0.221,0.143,0.299,0.091c0.077-0.052,0.299,0.065,0.429,0.065c0.129,0,0.545,0.169,0.624,0.169c0.078,0,0.312,0.09,0.325,0.259c0.013,0.169,0.09,0.156,0.168,0.156s0.26,0.065,0.26,0.13c0,0.065-0.052,0.325,0.078,0.39c0.129,0.064,0.247,0.169,0.299,0.143c0.052-0.026,0-0.233-0.064-0.26c-0.065-0.026-0.027-0.117-0.052-0.169c-0.026-0.051,0.078-0.051,0.117,0.039c0.039,0.091,0.143,0.26,0.208,0.26c0.064,0,0.208,0.156,0.168,0.247c-0.039,0.091,0.039,0.221,0.156,0.221c0.116,0,0.26,0.182,0.312,0.195c0.052,0.013,0.117,0.078,0.117,0.117c0,0.04,0.065,0.26,0.065,0.351c0,0.09-0.04,0.454-0.053,0.597s0.104,0.39,0.234,0.52c0.129,0.13,0.246,0.377,0.324,0.429c0.079,0.052,0.13,0.195,0.247,0.182c0.117-0.013,0.195,0.078,0.299,0.26c0.104,0.182,0.208,0.48,0.286,0.506c0.078,0.026,0.208,0.117,0.142,0.182c-0.064,0.064-0.168,0.208-0.051,0.208c0.117,0,0.156-0.065,0.247,0.053c0.09,0.116,0.208,0.181,0.194,0.26c-0.013,0.077,0.104,0.103,0.156,0.116c0.052,0.013,0.169,0.247,0.286,0.143c0.117-0.104-0.155-0.259-0.234-0.326c-0.078-0.064,0-0.207-0.182-0.35c-0.182-0.143-0.156-0.247-0.286-0.351c-0.13-0.104-0.233-0.195-0.104-0.286c0.13-0.091,0.143,0.091,0.195,0.208c0.052,0.116,0.324,0.351,0.441,0.454c0.117,0.104,0.326,0.468,0.39,0.468s0.247,0.208,0.247,0.208s0.103,0.168,0.064,0.22c-0.039,0.052,0.053,0.247,0.144,0.299c0.09,0.052,0.455,0.22,0.507,0.247c0.052,0.027,0.155,0.221,0.299,0.221c0.142,0,0.247,0.014,0.286,0.053c0.039,0.038,0.155,0.194,0.234,0.104c0.078-0.092,0.09-0.131,0.208-0.131c0.117,0,0.168,0.091,0.233,0.156c0.065,0.065,0.247,0.235,0.338,0.222c0.091-0.013,0.208,0.104,0.273,0.064s0.169,0.025,0.22,0.052c0.054,0.026,0.234,0.118,0.222,0.272c-0.013,0.157,0.103,0.195,0.182,0.234c0.078,0.039,0.182,0.13,0.248,0.195c0.064,0.063,0.206,0.077,0.246,0.116c0.039,0.039,0.065,0.117,0.182,0.052c0.116-0.064,0.092-0.181,0.092-0.181s0.129-0.026,0.194,0.026c0.064,0.05,0.104,0.22,0.144,0.246c0.038,0.026,0.115,0.221,0.063,0.362c-0.051,0.145-0.038,0.286-0.091,0.286c-0.052,0-0.116,0.17-0.195,0.209c-0.076,0.039-0.285,0.221-0.272,0.286c0.013,0.063,0.131,0.258,0.104,0.35c-0.025,0.091-0.194,0.195-0.154,0.338c0.038,0.144,0.312,0.183,0.323,0.312c0.014,0.131,0.209,0.417,0.235,0.546c0.025,0.13,0.246,0.272,0.246,0.453c0,0.184,0.312,0.3,0.377,0.312c0.063,0.013,0.182,0.131,0.272,0.17s0.169,0.116,0.233,0.221s0.053,0.261,0.053,0.299c0,0.039-0.039,0.44-0.078,0.674C19.145,23.021,19.235,23.203,19.158,23.269zM10.766,11.188c0.039,0.013,0.117,0.091,0.156,0.091c0.04,0,0.234,0.156,0.286,0.208c0.053,0.052,0.053,0.195-0.013,0.208s-0.104-0.143-0.117-0.208c-0.013-0.065-0.143-0.065-0.208-0.104C10.805,11.344,10.66,11.152,10.766,11.188zM27.51,16.41c-0.144,0.182-0.13,0.272-0.195,0.286c-0.064,0.013,0.065,0.065,0.09,0.194c0.022,0.112-0.065,0.224,0.063,0.327c-0.486,4.619-3.71,8.434-8.016,9.787c-0.007-0.011-0.019-0.025-0.021-0.034c-0.027-0.078-0.027-0.233,0.064-0.285c0.091-0.053,0.312-0.233,0.363-0.272c0.052-0.04,0.13-0.221,0.091-0.247c-0.038-0.026-0.232,0-0.26-0.039c-0.026-0.039-0.026-0.092,0.104-0.182c0.13-0.091,0.195-0.222,0.247-0.26c0.052-0.039,0.155-0.117,0.195-0.209c0.038-0.09-0.041-0.039-0.118-0.039s-0.117-0.142-0.117-0.207s0.195,0.026,0.339,0.052c0.143,0.024,0.077-0.065,0.064-0.142c-0.013-0.078,0.026-0.209,0.105-0.17c0.076,0.039,0.479-0.013,0.531-0.026c0.052-0.013,0.194-0.246,0.246-0.312c0.053-0.065,0.064-0.129,0-0.168c-0.065-0.04-0.143-0.184-0.168-0.221c-0.026-0.041-0.039-0.274-0.013-0.34c0.025-0.063,0,0.377,0.181,0.43c0.183,0.052,0.286,0.078,0.455-0.078c0.169-0.155,0.298-0.26,0.312-0.363c0.013-0.104,0.052-0.209,0.117-0.246c0.065-0.039,0.104,0.103,0.182-0.065c0.078-0.17,0.156-0.157,0.234-0.299c0.077-0.144-0.13-0.325,0.024-0.43c0.157-0.103,0.43-0.233,0.43-0.233s0.078-0.039,0.234-0.078c0.155-0.038,0.324-0.014,0.376-0.09c0.052-0.079,0.104-0.247,0.182-0.338c0.079-0.092,0.169-0.234,0.13-0.299c-0.039-0.065,0.104-0.352,0.091-0.429c-0.013-0.078-0.13-0.261,0.065-0.416s0.402-0.391,0.416-0.454c0.012-0.065,0.169-0.338,0.154-0.469c-0.012-0.129-0.154-0.285-0.245-0.325c-0.092-0.037-0.286-0.05-0.364-0.154s-0.299-0.208-0.377-0.182c-0.077,0.026-0.208,0.051-0.312-0.015c-0.104-0.063-0.272-0.143-0.337-0.194c-0.066-0.051-0.234-0.09-0.312-0.09s-0.065-0.053-0.182,0.103c-0.117,0.157,0,0.209-0.208,0.182c-0.209-0.024,0.025-0.038,0.144-0.194c0.115-0.155-0.014-0.247-0.144-0.207c-0.13,0.039-0.039,0.117-0.247,0.156c-0.207,0.038-0.207-0.092-0.077-0.117c0.13-0.026,0.363-0.143,0.363-0.194c0-0.053-0.026-0.196-0.13-0.196s-0.078-0.129-0.233-0.297c-0.156-0.17-0.351-0.274-0.508-0.249c-0.154,0.026-0.272,0.065-0.35-0.076c-0.078-0.144-0.169-0.17-0.222-0.247c-0.051-0.078-0.182,0-0.221-0.039s-0.039-0.039-0.039-0.039s-0.169,0.039-0.077-0.078c0.09-0.117,0.129-0.338,0.09-0.325c-0.038,0.013-0.104,0.196-0.168,0.183c-0.064-0.013-0.014-0.04-0.144-0.117c-0.13-0.078-0.337-0.013-0.337,0.052c0,0.065-0.065,0.117-0.065,0.117s-0.039-0.038-0.078-0.117c-0.039-0.078-0.221-0.091-0.312-0.013c-0.09,0.078-0.142-0.196-0.207-0.196s-0.194,0.065-0.26,0.184c-0.064,0.116-0.038,0.285-0.092,0.272c-0.05-0.013-0.063-0.233-0.05-0.312c0.012-0.079,0.155-0.208,0.05-0.234c-0.103-0.026-0.259,0.13-0.323,0.143c-0.065,0.013-0.195,0.104-0.273,0.209c-0.077,0.103-0.116,0.168-0.195,0.207c-0.077,0.039-0.193,0-0.167-0.039c0.025-0.039-0.222-0.181-0.261-0.13c-0.04,0.052-0.155,0.091-0.272,0.144c-0.117,0.052-0.222-0.065-0.247-0.117s-0.079-0.064-0.091-0.234c-0.013-0.168,0.027-0.351,0.065-0.454c0.038-0.104-0.195-0.312-0.286-0.3c-0.091,0.015-0.182,0.105-0.272,0.091c-0.092-0.012-0.052-0.038-0.195-0.038c-0.143,0-0.026-0.025,0-0.143c0.025-0.116-0.052-0.273,0.092-0.377c0.142-0.104,0.091-0.351,0-0.363c-0.092-0.014-0.261,0.039-0.377,0.026c-0.116-0.014-0.208,0.091-0.169,0.207c0.039,0.117-0.065,0.195-0.104,0.183c-0.039-0.013-0.09-0.078-0.234,0.026c-0.142,0.103-0.194,0.064-0.337-0.052c-0.143-0.118-0.299-0.234-0.325-0.416c-0.026-0.182-0.04-0.364,0.013-0.468c0.051-0.104,0.051-0.285-0.026-0.312c-0.078-0.025,0.09-0.155,0.181-0.181c0.092-0.026,0.234-0.143,0.26-0.195c0.026-0.052,0.156-0.04,0.298-0.04c0.143,0,0.169,0,0.312,0.078c0.143,0.078,0.169-0.039,0.169-0.078c0-0.039,0.052-0.117,0.208-0.104c0.156,0.013,0.376-0.052,0.416-0.013s0.116,0.195,0.194,0.143c0.079-0.051,0.104-0.143,0.131,0.014c0.025,0.155,0.09,0.39,0.208,0.429c0.116,0.039,0.052,0.194,0.168,0.207c0.115,0.013,0.17-0.246,0.131-0.337c-0.04-0.09-0.118-0.363-0.183-0.428c-0.064-0.065-0.064-0.234,0.064-0.286c0.13-0.052,0.442-0.312,0.532-0.389c0.092-0.079,0.338-0.144,0.261-0.248c-0.078-0.104-0.104-0.168-0.104-0.247s0.078-0.052,0.117,0s0.194-0.078,0.155-0.143c-0.038-0.064-0.026-0.155,0.065-0.143c0.091,0.013,0.116-0.065,0.078-0.117c-0.039-0.052,0.091-0.117,0.182-0.091c0.092,0.026,0.325-0.013,0.364-0.065c0.038-0.052-0.078-0.104-0.078-0.208c0-0.104,0.155-0.195,0.247-0.208c0.091-0.013,0.207,0,0.221-0.039c0.012-0.039,0.143-0.143,0.155-0.052c0.014,0.091,0,0.247,0.104,0.247c0.104,0,0.232-0.117,0.272-0.129c0.038-0.013,0.286-0.065,0.338-0.078c0.052-0.013,0.363-0.039,0.325-0.13c-0.039-0.09-0.078-0.181-0.118-0.22c-0.039-0.039-0.077,0.013-0.13,0.078c-0.051,0.065-0.143,0.065-0.168,0.013c-0.026-0.051,0.012-0.207-0.078-0.156c-0.092,0.052-0.104,0.104-0.157,0.078c-0.052-0.026-0.103-0.117-0.103-0.117s0.129-0.064,0.038-0.182c-0.09-0.117-0.221-0.091-0.35-0.025c-0.13,0.064-0.118,0.051-0.273,0.09s-0.234,0.078-0.234,0.078s0.209-0.129,0.299-0.208c0.091-0.078,0.209-0.117,0.286-0.195c0.078-0.078,0.285,0.039,0.285,0.039s0.105-0.104,0.105-0.039s-0.027,0.234,0.051,0.234c0.079,0,0.299-0.104,0.21-0.131c-0.093-0.026,0.129,0,0.219-0.065c0.092-0.065,0.194-0.065,0.247-0.09c0.052-0.026,0.092-0.143,0.182-0.143c0.092,0,0.13,0.117,0,0.195s-0.143,0.273-0.208,0.325c-0.064,0.052-0.026,0.117,0.078,0.104c0.104-0.013,0.194,0.013,0.286-0.013s0.143,0.026,0.168,0.065c0.026,0.039,0.104-0.039,0.104-0.039s0.169-0.039,0.221,0.026c0.053,0.064,0.092-0.039,0.053-0.104c-0.039-0.064-0.092-0.129-0.13-0.208c-0.039-0.078-0.091-0.104-0.194-0.078c-0.104,0.026-0.13-0.026-0.195-0.064c-0.065-0.04-0.118,0.052-0.065-0.04c0.053-0.09,0.078-0.117,0.117-0.195c0.039-0.078,0.209-0.221,0.039-0.259c-0.169-0.04-0.222-0.065-0.247-0.143c-0.026-0.078-0.221-0.221-0.272-0.221c-0.053,0-0.233,0-0.247-0.065c-0.013-0.065-0.143-0.208-0.208-0.273c-0.064-0.065-0.312-0.351-0.351-0.377c-0.039-0.026-0.091-0.013-0.208,0.143c-0.116,0.157-0.22,0.183-0.312,0.144c-0.091-0.039-0.104-0.026-0.193-0.13c-0.093-0.104,0.09-0.117,0.051-0.182c-0.04-0.064-0.247-0.091-0.377-0.104c-0.13-0.013-0.221-0.156-0.416-0.169c-0.194-0.013-0.428,0.026-0.493,0.026c-0.064,0-0.064,0.091-0.09,0.234c-0.027,0.143,0.09,0.182-0.027,0.208c-0.116,0.026-0.169,0.039-0.052,0.091c0.117,0.052,0.273,0.26,0.273,0.26s0,0.117-0.092,0.182c-0.09,0.065-0.182,0.13-0.233,0.053c-0.053-0.079-0.195-0.065-0.155,0.013c0.038,0.078,0.116,0.117,0.116,0.195c0,0.077,0.117,0.272,0.039,0.337c-0.078,0.065-0.168,0.014-0.233,0.026s-0.131-0.104-0.078-0.13c0.051-0.026-0.014-0.221-0.014-0.221s-0.155,0.221-0.143,0.104c0.014-0.117-0.064-0.13-0.064-0.221c0-0.091-0.079-0.13-0.194-0.104c-0.118,0.026-0.26-0.04-0.482-0.079c-0.22-0.039-0.311-0.064-0.493-0.156c-0.182-0.091-0.247-0.026-0.338-0.013c-0.091,0.013-0.052-0.182-0.169-0.207c-0.116-0.027-0.181,0.025-0.207-0.144c-0.026-0.168,0.039-0.208,0.324-0.39c0.286-0.182,0.247-0.26,0.468-0.286c0.22-0.026,0.325,0.026,0.325-0.039s0.052-0.325,0.052-0.195S16.95,9.109,16.832,9.2c-0.116,0.091-0.052,0.104,0.04,0.104c0.091,0,0.259-0.091,0.259-0.091s0.208-0.091,0.26-0.013c0.053,0.078,0.053,0.156,0.144,0.156s0.285-0.104,0.116-0.195c-0.168-0.091-0.272-0.078-0.376-0.182s-0.078-0.065-0.195-0.039c-0.116,0.026-0.116-0.039-0.156-0.039s-0.104,0.026-0.13-0.026c-0.025-0.052,0.014-0.065,0.145-0.065c0.129,0,0.285,0.039,0.285,0.039s0.155-0.052,0.194-0.065c0.039-0.013,0.247-0.039,0.208-0.155c-0.04-0.117-0.169-0.117-0.208-0.156s0.078-0.09,0.143-0.117c0.065-0.026,0.247,0,0.247,0s0.117,0.013,0.117-0.039S17.897,8.2,17.976,8.239s0,0.156,0.117,0.13c0.116-0.026,0.143,0,0.207,0.039c0.065,0.039-0.013,0.195-0.077,0.221c-0.065,0.025-0.169,0.077-0.026,0.09c0.144,0.014,0.246,0.014,0.246,0.014s0.092-0.091,0.131-0.169c0.038-0.078,0.104-0.026,0.155,0c0.052,0.025,0.247,0.065,0.065,0.117c-0.183,0.052-0.221,0.117-0.26,0.182c-0.038,0.065-0.053,0.104-0.221,0.065c-0.17-0.039-0.26-0.026-0.299,0.039c-0.039,0.064-0.013,0.273,0.053,0.247c0.063-0.026,0.129-0.026,0.207-0.052c0.078-0.026,0.39,0.026,0.467,0.013c0.078-0.013,0.209,0.13,0.248,0.104c0.039-0.026,0.117,0.052,0.194,0.104c0.078,0.052,0.052-0.117,0.194-0.013c0.144,0.104,0.065,0.104,0.144,0.104c0.076,0,0.246,0.013,0.246,0.013s0.014-0.129,0.144-0.104c0.13,0.026,0.245,0.169,0.232,0.064c-0.012-0.103,0.013-0.181-0.09-0.259c-0.104-0.078-0.272-0.13-0.299-0.169c-0.026-0.039-0.052-0.091-0.013-0.117c0.039-0.025,0.221,0.013,0.324,0.079c0.104,0.065,0.195,0.13,0.273,0.078c0.077-0.052,0.17-0.078,0.208-0.117c0.038-0.04,0.13-0.156,0.13-0.156s-0.391-0.051-0.441-0.117c-0.053-0.065-0.235-0.156-0.287-0.156s-0.194,0.091-0.246-0.039s-0.052-0.286-0.105-0.299c-0.05-0.013-0.597-0.091-0.674-0.13c-0.078-0.039-0.39-0.13-0.507-0.195s-0.286-0.156-0.389-0.156c-0.104,0-0.533,0.052-0.611,0.039c-0.078-0.013-0.312,0.026-0.403,0.039c-0.091,0.013,0.117,0.182-0.077,0.221c-0.195,0.039-0.169,0.065-0.13-0.13c0.038-0.195-0.131-0.247-0.299-0.169c-0.169,0.078-0.442,0.13-0.377,0.221c0.065,0.091-0.012,0.157,0.117,0.247c0.13,0.091,0.183,0.117,0.35,0.104c0.17-0.013,0.339,0.025,0.339,0.025s0,0.157-0.064,0.182c-0.065,0.026-0.169,0.026-0.196,0.104c-0.025,0.078-0.155,0.117-0.155,0.078s0.065-0.169-0.026-0.234c-0.09-0.065-0.117-0.078-0.221-0.013c-0.104,0.065-0.116,0.091-0.169-0.013C16.053,8.291,15.897,8.2,15.897,8.2s-0.104-0.129-0.182-0.194c-0.077-0.065-0.22-0.052-0.234,0.013c-0.013,0.064,0.026,0.129,0.078,0.247c0.052,0.117,0.104,0.337,0.013,0.351c-0.091,0.013-0.104,0.026-0.195,0.052c-0.091,0.026-0.13-0.039-0.13-0.143s-0.04-0.195-0.013-0.234c0.026-0.039-0.104,0.027-0.234,0c-0.13-0.025-0.233,0.052-0.104,0.092c0.13,0.039,0.157,0.194,0.039,0.233c-0.117,0.039-0.559,0-0.702,0s-0.35,0.039-0.39-0.039c-0.039-0.078,0.118-0.129,0.208-0.129c0.091,0,0.363,0.012,0.467-0.13c0.104-0.143-0.13-0.169-0.233-0.169c-0.104,0-0.183-0.039-0.299-0.155c-0.118-0.117,0.078-0.195,0.052-0.247c-0.026-0.052-0.156-0.014-0.272-0.014c-0.117,0-0.299-0.09-0.299,0.014c0,0.104,0.143,0.402,0.052,0.337c-0.091-0.064-0.078-0.156-0.143-0.234c-0.065-0.078-0.168-0.065-0.299-0.052c-0.129,0.013-0.35,0.052-0.415,0.039c-0.064-0.013-0.013-0.013-0.156-0.078c-0.142-0.065-0.208-0.052-0.312-0.117C12.091,7.576,12.182,7.551,12,7.538c-0.181-0.013-0.168,0.09-0.35,0.065c-0.182-0.026-0.234,0.013-0.416,0c-0.182-0.013-0.272-0.026-0.299,0.065c-0.025,0.091-0.078,0.247-0.156,0.247c-0.077,0-0.169,0.091,0.078,0.104c0.247,0.013,0.105,0.129,0.325,0.117c0.221-0.013,0.416-0.013,0.468-0.117c0.052-0.104,0.091-0.104,0.117-0.065c0.025,0.039,0.22,0.272,0.22,0.272s0.131,0.104,0.183,0.13c0.051,0.026-0.052,0.143-0.156,0.078c-0.104-0.065-0.299-0.051-0.377-0.116c-0.078-0.065-0.429-0.065-0.52-0.052c-0.09,0.013-0.247-0.039-0.299-0.039c-0.051,0-0.221,0.13-0.221,0.13S10.532,8.252,10.494,8.2c-0.039-0.052-0.104,0.052-0.156,0.065c-0.052,0.013-0.208-0.104-0.364-0.052C9.818,8.265,9.87,8.317,9.649,8.304s-0.272-0.052-0.35-0.039C9.22,8.278,9.22,8.278,9.22,8.278S9.233,8.33,9.143,8.382C9.052,8.434,8.986,8.499,8.921,8.421C8.857,8.343,8.818,8.343,8.779,8.33c-0.04-0.013-0.118-0.078-0.286-0.04C8.324,8.33,8.064,8.239,8.013,8.239c-0.04,0-0.313-0.015-0.491-0.033c2.109-2.292,5.124-3.74,8.478-3.74c2.128,0,4.117,0.589,5.83,1.598c-0.117,0.072-0.319,0.06-0.388,0.023c-0.078-0.043-0.158-0.078-0.475-0.061c-0.317,0.018-0.665,0.122-0.595,0.226c0.072,0.104-0.142,0.165-0.197,0.113c-0.055-0.052-0.309,0.06-0.293,0.165c0.016,0.104-0.039,0.225-0.175,0.199c-0.134-0.027-0.229,0.06-0.237,0.146c-0.007,0.087-0.309,0.147-0.332,0.147c-0.024,0-0.412-0.008-0.27,0.095c0.097,0.069,0.15,0.027,0.27,0.052c0.119,0.026,0.214,0.217,0.277,0.243c0.062,0.026,0.15,0,0.189-0.052c0.04-0.052,0.095-0.234,0.095-0.234s0,0.173,0.097,0.208c0.095,0.035,0.331-0.026,0.395-0.017c0.064,0.008,0.437,0.061,0.538,0.112c0.104,0.052,0.356,0.087,0.428,0.199c0.071,0.113,0.08,0.503,0.119,0.546c0.04,0.043,0.174-0.139,0.205-0.182c0.031-0.044,0.198-0.018,0.254,0.042c0.056,0.061,0.182,0.208,0.175,0.269C21.9,8.365,21.877,8.459,21.83,8.425c-0.048-0.034-0.127-0.025-0.096-0.095c0.032-0.069,0.048-0.217-0.015-0.217c-0.064,0-0.119,0-0.119,0s-0.12-0.035-0.199,0.095s-0.015,0.26,0.04,0.26s0.184,0,0.184,0.034c0,0.035-0.136,0.139-0.128,0.2c0.009,0.061,0.11,0.268,0.144,0.312c0.031,0.043,0.197,0.086,0.244,0.096c0.049,0.008-0.111,0.017-0.07,0.077c0.04,0.061,0.102,0.208,0.189,0.243c0.087,0.035,0.333,0.19,0.363,0.26c0.032,0.069,0.222-0.052,0.262-0.061c0.04-0.008,0.032,0.182,0.143,0.191c0.11,0.008,0.15-0.018,0.245-0.096s0.072-0.182,0.079-0.26c0.009-0.078,0-0.138,0.104-0.113c0.104,0.026,0.158-0.018,0.15-0.104c-0.008-0.087-0.095-0.191,0.07-0.217c0.167-0.026,0.254-0.138,0.357-0.138c0.103,0,0.389,0.043,0.419,0c0.032-0.043,0.167-0.243,0.254-0.251c0.067-0.007,0.224-0.021,0.385-0.042c1.582,1.885,2.561,4.284,2.673,6.905c-0.118,0.159-0.012,0.305,0.021,0.408c0.001,0.03,0.005,0.058,0.005,0.088c0,0.136-0.016,0.269-0.021,0.404C27.512,16.406,27.512,16.408,27.51,16.41zM17.794,12.084c-0.064,0.013-0.169-0.052-0.169-0.143s-0.091,0.169-0.04,0.247c0.053,0.078-0.104,0.169-0.155,0.169s-0.091-0.116-0.078-0.233c0.014-0.117-0.077-0.221-0.221-0.208c-0.143,0.014-0.208,0.13-0.259,0.169c-0.053,0.039-0.053,0.259-0.04,0.312s0.013,0.235-0.116,0.221c-0.118-0.013-0.092-0.233-0.079-0.312c0.014-0.078-0.039-0.273,0.014-0.376c0.053-0.104,0.207-0.143,0.312-0.156s0.324,0.065,0.363,0.052c0.04-0.014,0.222-0.014,0.312,0C17.729,11.837,17.858,12.071,17.794,12.084zM18.027,12.123c0.04,0.026,0.311-0.039,0.364,0.026c0.051,0.065-0.054,0.078-0.183,0.13c-0.129,0.052-0.169,0.039-0.221,0.104s-0.221,0.09-0.299,0.168c-0.078,0.079-0.217,0.125-0.246,0.065c-0.04-0.078,0.013-0.039,0.025-0.078c0.013-0.039,0.245-0.129,0.245-0.129S17.988,12.097,18.027,12.123zM16.988,11.668c-0.038,0.013-0.182-0.026-0.3-0.026c-0.116,0-0.091-0.078-0.143-0.064c-0.051,0.013-0.168,0.039-0.247,0.078c-0.078,0.039-0.208,0.03-0.208-0.04c0-0.104,0.052-0.078,0.221-0.143c0.169-0.065,0.352-0.247,0.429-0.169c0.078,0.078,0.221,0.169,0.312,0.182C17.144,11.5,17.026,11.655,16.988,11.668zM15.659,7.637c-0.079,0.026-0.347,0.139-0.321,0.199c0.01,0.023,0.078,0.069,0.19,0.052c0.113-0.018,0.276-0.035,0.355-0.043c0.078-0.009,0.095-0.139,0.009-0.147C15.805,7.689,15.736,7.611,15.659,7.637zM14.698,7.741c-0.061,0.026-0.243-0.043-0.338,0.018c-0.061,0.038-0.026,0.164,0.07,0.172c0.095,0.009,0.259-0.06,0.276-0.008c0.018,0.052,0.078,0.286,0.234,0.208c0.156-0.078,0.147-0.147,0.19-0.156c0.043-0.009-0.008-0.199-0.078-0.243C14.983,7.689,14.758,7.715,14.698,7.741zM14.385,7.005c0.017,0.044-0.008,0.078,0.113,0.095c0.121,0.018,0.173,0.035,0.243,0.035c0.069,0,0.042-0.113-0.018-0.19c-0.061-0.078-0.043-0.069-0.199-0.113c-0.156-0.043-0.312-0.043-0.416-0.035c-0.104,0.009-0.217-0.017-0.243,0.104c-0.013,0.062,0.07,0.112,0.174,0.112S14.368,6.962,14.385,7.005zM14.611,7.481c0.043,0.095,0.043,0.051,0.165,0.061C14.896,7.551,14.991,7.421,15,7.378c0.009-0.044-0.061-0.13-0.225-0.113c-0.165,0.017-0.667-0.026-0.736,0.034c-0.066,0.058,0,0.233-0.026,0.251c-0.026,0.017,0.009,0.095,0.077,0.078c0.069-0.017,0.104-0.182,0.157-0.182C14.299,7.447,14.568,7.386,14.611,7.481zM12.982,7.126c0.052,0.043,0.183,0.008,0.173-0.035c-0.008-0.043,0.053-0.217-0.051-0.225C13,6.858,12.854,6.962,12.697,7.014c-0.101,0.033-0.078,0.13-0.009,0.13S12.931,7.083,12.982,7.126zM13.72,7.282c-0.087,0.043-0.114,0.069-0.191,0.052c-0.078-0.017-0.078-0.156-0.217-0.13c-0.138,0.026-0.164,0.104-0.207,0.139s-0.139,0.061-0.173,0.043c-0.034-0.017-0.234-0.129-0.234-0.129s-0.416-0.018-0.433-0.07c-0.017-0.052-0.086-0.138-0.277-0.121s-0.52,0.13-0.572,0.13c-0.052,0,0.062,0.104-0.009,0.104c-0.069,0-0.155-0.008-0.181,0.069c-0.018,0.053,0.078,0.052,0.189,0.052c0.112,0,0.295,0,0.347-0.026c0.052-0.026,0.312-0.087,0.303-0.009c-0.009,0.079,0.104,0.199,0.164,0.182c0.061-0.017,0.183-0.13,0.243-0.086c0.061,0.043,0.07,0.146,0.13,0.173c0.061,0.025,0.226,0.025,0.304,0c0.077-0.027,0.294-0.027,0.389-0.009c0.095,0.018,0.373,0.069,0.399,0.018c0.026-0.053,0.104-0.061,0.112-0.113s0.051-0.216,0.051-0.216S13.806,7.239,13.72,7.282zM18.105,16.239c-0.119,0.021-0.091,0.252,0.052,0.21C18.3,16.407,18.223,16.217,18.105,16.239zM19.235,15.929c-0.104-0.026-0.221,0-0.299,0.013c-0.078,0.013-0.299,0.208-0.299,0.208s0.143,0.026,0.233,0.026c0.092,0,0.144,0.051,0.221,0.09c0.078,0.04,0.221-0.052,0.272-0.052c0.053,0,0.118,0.156,0.131-0.013C19.508,16.032,19.339,15.955,19.235,15.929zM15.616,7.507c-0.043-0.104-0.259-0.139-0.304-0.035C15.274,7.563,15.659,7.611,15.616,7.507zM18.093,15.292c0.143-0.026,0.064-0.144-0.053-0.13C17.922,15.175,17.949,15.318,18.093,15.292zM19.82,16.095c-0.119,0.022-0.092,0.253,0.051,0.211C20.015,16.264,19.937,16.074,19.82,16.095zM18.247,15.708c-0.09,0.013-0.285-0.09-0.389-0.182c-0.104-0.091-0.299-0.091-0.377-0.091c-0.077,0-0.39,0.091-0.39,0.091c-0.013,0.13,0.117,0.091,0.273,0.091s0.429-0.026,0.479,0.039c0.053,0.064,0.286,0.168,0.352,0.221c0.064,0.052,0.272,0.065,0.285,0.013S18.338,15.695,18.247,15.708zM16.698,7.412c-0.13-0.009-0.295-0.009-0.399,0c-0.104,0.008-0.182-0.069-0.26-0.113c-0.077-0.043-0.251-0.182-0.354-0.199c-0.104-0.017-0.086-0.017-0.303-0.069c-0.11-0.027-0.294-0.061-0.294-0.086c0-0.026-0.052,0.121,0.043,0.165c0.095,0.043,0.251,0.121,0.363,0.164c0.114,0.043,0.329,0.052,0.399,0.139c0.069,0.086,0.303,0.156,0.303,0.156l0.277,0.026c0,0,0.191-0.043,0.39-0.026c0.199,0.017,0.493,0.043,0.659,0.035c0.163-0.008,0.189-0.061,0.208-0.095c0.016-0.035-0.304-0.104-0.383-0.095C17.271,7.42,16.827,7.42,16.698,7.412zM17.182,9.404c-0.034,0.039,0.157,0.095,0.191,0.043C17.407,9.396,17.271,9.309,17.182,9.404zM17.764,9.585c0.086-0.035,0.043-0.139-0.079-0.104C17.547,9.521,17.676,9.62,17.764,9.585z",warning:"M29.225,23.567l-3.778-6.542c-1.139-1.972-3.002-5.2-4.141-7.172l-3.778-6.542c-1.14-1.973-3.003-1.973-4.142,0L9.609,9.853c-1.139,1.972-3.003,5.201-4.142,7.172L1.69,23.567c-1.139,1.974-0.207,3.587,2.071,3.587h23.391C29.432,27.154,30.363,25.541,29.225,23.567zM16.536,24.58h-2.241v-2.151h2.241V24.58zM16.428,20.844h-2.023l-0.201-9.204h2.407L16.428,20.844z",code:"M8.982,7.107L0.322,15.77l8.661,8.662l3.15-3.15L6.621,15.77l5.511-5.511L8.982,7.107zM21.657,7.107l-3.148,3.151l5.511,5.511l-5.511,5.511l3.148,3.15l8.662-8.662L21.657,7.107z",pensil:"M25.31,2.872l-3.384-2.127c-0.854-0.536-1.979-0.278-2.517,0.576l-1.334,2.123l6.474,4.066l1.335-2.122C26.42,4.533,26.164,3.407,25.31,2.872zM6.555,21.786l6.474,4.066L23.581,9.054l-6.477-4.067L6.555,21.786zM5.566,26.952l-0.143,3.819l3.379-1.787l3.14-1.658l-6.246-3.925L5.566,26.952z",pen:"M13.587,12.074c-0.049-0.074-0.11-0.147-0.188-0.202c-0.333-0.243-0.803-0.169-1.047,0.166c-0.244,0.336-0.167,0.805,0.167,1.048c0.303,0.22,0.708,0.167,0.966-0.091l-7.086,9.768l-2.203,7.997l6.917-4.577L26.865,4.468l-4.716-3.42l-1.52,2.096c-0.087-0.349-0.281-0.676-0.596-0.907c-0.73-0.529-1.751-0.369-2.28,0.363C14.721,6.782,16.402,7.896,13.587,12.074zM10.118,25.148L6.56,27.503l1.133-4.117L10.118,25.148zM14.309,11.861c2.183-3.225,1.975-4.099,3.843-6.962c0.309,0.212,0.664,0.287,1.012,0.269L14.309,11.861z",plus:"M25.979,12.896 19.312,12.896 19.312,6.229 12.647,6.229 12.647,12.896 5.979,12.896 5.979,19.562 12.647,19.562 12.647,26.229 19.312,26.229 19.312,19.562 25.979,19.562z",minus:"M25.979,12.896,5.979,12.896,5.979,19.562,25.979,19.562z",tshirt:"M20.1,4.039c-0.681,1.677-2.32,2.862-4.24,2.862c-1.921,0-3.56-1.185-4.24-2.862L1.238,8.442l2.921,6.884l3.208-1.361V28h17.099V14.015l3.093,1.312l2.922-6.884L20.1,4.039z",sticker:"M15.5,1.999c-1.042,0-1.916,0.377-2.57,1.088L2.895,13.138C2.302,13.784,1.999,14.58,1.999,15.5C1.999,22.943,8.057,29,15.5,29S29,22.943,29,15.5S22.943,1.999,15.5,1.999zM15.5,28C8.596,28,3,22.404,3,15.5c0-3.452,5.239-2.737,7.501-4.999C12.762,8.239,12.048,3,15.5,3C22.404,3,28,8.597,28,15.5S22.404,28,15.5,28z",page2:"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM22.157,6.545c0.805,0.786,1.529,1.676,2.069,2.534c-0.468-0.185-0.959-0.322-1.42-0.431c-1.015-0.228-2.008-0.32-2.625-0.357c0.003-0.133,0.004-0.283,0.004-0.446c0-0.869-0.055-2.108-0.356-3.2c-0.003-0.01-0.005-0.02-0.009-0.03C20.584,5.119,21.416,5.788,22.157,6.545zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z",page:"M23.024,5.673c-1.744-1.694-3.625-3.051-5.168-3.236c-0.084-0.012-0.171-0.019-0.263-0.021H7.438c-0.162,0-0.322,0.063-0.436,0.18C6.889,2.71,6.822,2.87,6.822,3.033v25.75c0,0.162,0.063,0.317,0.18,0.435c0.117,0.116,0.271,0.179,0.436,0.179h18.364c0.162,0,0.317-0.062,0.434-0.179c0.117-0.117,0.182-0.272,0.182-0.435V11.648C26.382,9.659,24.824,7.49,23.024,5.673zM25.184,28.164H8.052V3.646h9.542v0.002c0.416-0.025,0.775,0.386,1.05,1.326c0.25,0.895,0.313,2.062,0.312,2.871c0.002,0.593-0.027,0.991-0.027,0.991l-0.049,0.652l0.656,0.007c0.003,0,1.516,0.018,3,0.355c1.426,0.308,2.541,0.922,2.645,1.617c0.004,0.062,0.005,0.124,0.004,0.182V28.164z",landscape1:"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM26.914,12.314c-0.008-0.005-0.019-0.007-0.029-0.01c-1.092-0.293-2.33-0.355-3.199-0.355c-0.162,0-0.312,0.002-0.445,0.004c-0.037-0.604-0.129-1.604-0.356-2.625c-0.11-0.461-0.246-0.94-0.433-1.42c0.857,0.541,1.748,1.264,2.535,2.068C25.74,10.718,26.41,11.551,26.914,12.314zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z",landscape2:"M19.883,5.71H2.746c-0.163,0-0.319,0.071-0.435,0.188c-0.118,0.117-0.18,0.272-0.18,0.435v18.364c0,0.164,0.063,0.318,0.18,0.436c0.123,0.117,0.287,0.18,0.435,0.18h25.75c0.164,0,0.324-0.066,0.438-0.18c0.118-0.114,0.182-0.273,0.182-0.436V14.551c-0.002-0.102-0.01-0.188-0.021-0.271c-0.186-1.543-1.543-3.424-3.236-5.168C24.039,7.31,21.869,5.753,19.883,5.71zM3.365,6.947h16.517c0.058,0,0.12,0,0.183,0.004c0.694,0.105,1.307,1.221,1.616,2.646c0.335,1.484,0.354,2.997,0.354,3l0.007,0.656l0.651-0.051c0,0,0.398-0.027,0.99-0.025c0.809,0,1.977,0.062,2.871,0.312c0.939,0.275,1.352,0.635,1.326,1.051h0.002v9.542H3.365V6.951V6.947z",plugin:"M26.33,15.836l-3.893-1.545l3.136-7.9c0.28-0.705-0.064-1.505-0.771-1.785c-0.707-0.28-1.506,0.065-1.785,0.771l-3.136,7.9l-4.88-1.937l3.135-7.9c0.281-0.706-0.064-1.506-0.77-1.786c-0.706-0.279-1.506,0.065-1.785,0.771l-3.136,7.9L8.554,8.781l-1.614,4.066l2.15,0.854l-2.537,6.391c-0.61,1.54,0.143,3.283,1.683,3.895l1.626,0.646L8.985,26.84c-0.407,1.025,0.095,2.188,1.122,2.596l0.93,0.369c1.026,0.408,2.188-0.095,2.596-1.121l0.877-2.207l1.858,0.737c1.54,0.611,3.284-0.142,3.896-1.682l2.535-6.391l1.918,0.761L26.33,15.836z",bookmark:"M17.396,1.841L6.076,25.986l7.341-4.566l1.186,8.564l11.32-24.146L17.396,1.841zM19.131,9.234c-0.562-0.264-0.805-0.933-0.541-1.495c0.265-0.562,0.934-0.805,1.496-0.541s0.805,0.934,0.541,1.496S19.694,9.498,19.131,9.234z",hammer:"M7.831,29.354c0.685,0.353,1.62,1.178,2.344,0.876c0.475-0.195,0.753-1.301,1.048-1.883c2.221-4.376,4.635-9.353,6.392-13.611c0-0.19,0.101-0.337-0.049-0.595c0.983-1.6,1.65-3.358,2.724-5.138c0.34-0.566,0.686-1.351,1.163-1.577l0.881-0.368c1.12-0.288,1.938-0.278,2.719,0.473c0.396,0.383,0.578,1.015,0.961,1.395c0.259,0.26,1.246,0.899,1.613,0.8c0.285-0.077,0.52-0.364,0.72-0.728l0.696-1.286c0.195-0.366,0.306-0.718,0.215-0.999c-0.117-0.362-1.192-0.84-1.552-0.915c-0.528-0.113-1.154,0.081-1.692-0.041c-1.057-0.243-1.513-0.922-1.883-2.02c-2.608-1.533-6.119-2.53-10.207-1.244c-1.109,0.349-2.172,0.614-2.901,1.323c-0.146,0.412,0.143,0.494,0.446,0.489c-0.237,0.216-0.62,0.341-0.399,0.848c2.495-1.146,7.34-1.542,7.669,0.804c0.072,0.522-0.395,1.241-0.682,1.835c-0.905,1.874-2.011,3.394-2.813,5.091c-0.298,0.017-0.366,0.18-0.525,0.287c-2.604,3.8-5.451,8.541-7.9,12.794c-0.326,0.566-1.098,1.402-1.002,1.906C5.961,28.641,7.146,29,7.831,29.354z",users:"M21.053,20.8c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68h-0.34c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888C28.469,23.686,22.185,21.252,21.053,20.8zM8.583,20.628c-0.099-0.18-0.148-0.31-0.148-0.31s-0.432,0.239-0.432-0.432s0.432,0.432,0.864-2.159c0,0,1.199-0.336,0.959-3.119H9.538c0,0,0.143-0.591,0.237-1.334c-0.004-0.308,0.006-0.636,0.037-0.996l0.038-0.426c-0.021-0.492-0.107-0.939-0.312-1.226C8.818,9.619,8.53,8.947,6.947,8.467c-1.583-0.48-1.008-0.385-2.159-0.336C3.636,8.179,2.676,8.802,2.676,9.139c0,0-0.72,0.048-1.008,0.336c-0.271,0.271-0.705,1.462-0.757,1.885v0.281c0.047,0.653,0.258,2.449,0.469,2.872l-0.286,0.096c-0.239,2.783,0.959,3.119,0.959,3.119c0.432,2.591,0.864,1.488,0.864,2.159s-0.432,0.432-0.432,0.432s-0.383,1.057-1.343,1.439c-0.061,0.024-0.139,0.056-0.232,0.092v5.234h0.575c-0.029-1.278,0.077-2.927,0.746-3.594C2.587,23.135,3.754,22.551,8.583,20.628zM30.913,11.572c-0.04-0.378-0.127-0.715-0.292-0.946c-0.719-1.008-1.008-1.679-2.59-2.159c-1.584-0.48-1.008-0.385-2.16-0.336C24.72,8.179,23.76,8.802,23.76,9.139c0,0-0.719,0.048-1.008,0.336c-0.271,0.272-0.709,1.472-0.758,1.891h0.033l0.08,0.913c0.02,0.231,0.022,0.436,0.027,0.645c0.09,0.666,0.21,1.35,0.33,1.589l-0.286,0.096c-0.239,2.783,0.96,3.119,0.96,3.119c0.432,2.591,0.863,1.488,0.863,2.159s-0.432,0.432-0.432,0.432s-0.053,0.142-0.163,0.338c4.77,1.9,5.927,2.48,6.279,2.834c0.67,0.667,0.775,2.315,0.746,3.594h0.48v-5.306c-0.016-0.006-0.038-0.015-0.052-0.021c-0.959-0.383-1.343-1.439-1.343-1.439s-0.433,0.239-0.433-0.432s0.433,0.432,0.864-2.159c0,0,0.804-0.229,0.963-1.841v-1.227c-0.001-0.018-0.001-0.033-0.003-0.051h-0.289c0,0,0.215-0.89,0.292-1.861V11.572z",user:"M20.771,12.364c0,0,0.849-3.51,0-4.699c-0.85-1.189-1.189-1.981-3.058-2.548s-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.792-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.321s0.283,3.058,0.566,3.624l-0.337,0.113c-0.283,3.283,1.132,3.68,1.132,3.68c0.509,3.058,1.019,1.756,1.019,2.548s-0.51,0.51-0.51,0.51s-0.452,1.245-1.584,1.698c-1.132,0.452-7.416,2.886-7.927,3.396c-0.511,0.511-0.453,2.888-0.453,2.888h26.947c0,0,0.059-2.377-0.452-2.888c-0.512-0.511-6.796-2.944-7.928-3.396c-1.132-0.453-1.584-1.698-1.584-1.698s-0.51,0.282-0.51-0.51s0.51,0.51,1.02-2.548c0,0,1.414-0.397,1.132-3.68H20.771z",customer:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h12.036l0.878-3.459l-0.781-0.781l1.344-1.344l1.344,1.344l-0.781,0.781l0.879,3.459h12.035C28.977,26.709,29.039,24.332,28.523,23.813z",employee:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM22.188,26.062h-4.562v-1.25h4.562V26.062z",anonymous:"M28.523,23.813c-0.518-0.51-6.795-2.938-7.934-3.396c-1.132-0.451-1.584-1.697-1.584-1.697s-0.51,0.282-0.51-0.51c0-0.793,0.51,0.51,1.021-2.548c0,0,1.414-0.397,1.133-3.68l-0.338,0.001c0,0,0.85-3.511,0-4.699c-0.854-1.188-1.188-1.981-3.062-2.548c-1.869-0.567-1.188-0.454-2.547-0.396c-1.359,0.057-2.492,0.793-2.492,1.188c0,0-0.849,0.057-1.188,0.397c-0.34,0.34-0.906,1.924-0.906,2.32s0.283,3.059,0.566,3.624l-0.337,0.112c-0.283,3.283,1.132,3.681,1.132,3.681c0.509,3.058,1.019,1.755,1.019,2.548c0,0.792-0.51,0.51-0.51,0.51s-0.452,1.246-1.584,1.697c-1.132,0.453-7.416,2.887-7.927,3.396c-0.511,0.521-0.453,2.896-0.453,2.896h26.954C28.977,26.709,29.039,24.332,28.523,23.813zM16.618,13.693c-0.398-0.251-0.783-1.211-0.783-1.64c0-0.133,0-0.236,0-0.236c-0.105-0.106-0.574-0.096-0.67,0c0,0,0,0.104,0,0.236c0,0.429-0.385,1.389-0.783,1.64c-0.399,0.251-1.611,0.237-2.084-0.236c-0.473-0.473-0.524-1.663-0.643-1.78c-0.118-0.119-0.185-0.185-0.185-0.185l0.029-0.414c0,0,0.842-0.207,1.699-0.207s1.803,0.502,1.803,0.502c0.231-0.074,0.784-0.083,0.996,0c0,0,0.945-0.502,1.803-0.502s1.699,0.207,1.699,0.207l0.029,0.414c0,0-0.066,0.066-0.185,0.185c-0.118,0.118-0.169,1.308-0.643,1.78C18.229,13.93,17.018,13.944,16.618,13.693z", +skull:"M25.947,11.14c0-5.174-3.979-9.406-10.613-9.406c-6.633,0-10.282,4.232-10.282,9.406c0,5.174,1.459,4.511,1.459,7.43c0,1.095-1.061,0.564-1.061,2.919c0,2.587,3.615,2.223,4.677,3.283c1.061,1.062,0.961,3.019,0.961,3.019s0.199,0.796,0.564,0.563c0,0,0.232,0.564,0.498,0.232c0,0,0.265,0.563,0.531,0.1c0,0,0.265,0.631,0.696,0.166c0,0,0.431,0.63,0.929,0.133c0,0,0.564,0.53,1.194,0.133c0.63,0.397,1.194-0.133,1.194-0.133c0.497,0.497,0.929-0.133,0.929-0.133c0.432,0.465,0.695-0.166,0.695-0.166c0.268,0.464,0.531-0.1,0.531-0.1c0.266,0.332,0.498-0.232,0.498-0.232c0.365,0.232,0.564-0.563,0.564-0.563s-0.1-1.957,0.961-3.019c1.062-1.061,4.676-0.696,4.676-3.283c0-2.354-1.061-1.824-1.061-2.919C24.488,15.651,25.947,16.314,25.947,11.14zM10.333,20.992c-1.783,0.285-2.59-0.215-2.785-1.492c-0.508-3.328,2.555-3.866,4.079-3.683c0.731,0.088,1.99,0.862,1.99,1.825C13.617,20.229,11.992,20.727,10.333,20.992zM16.461,25.303c-0.331,0-0.862-0.431-0.895-1.227c-0.033,0.796-0.63,1.227-0.961,1.227c-0.332,0-0.83-0.331-0.863-1.127c-0.033-0.796,1.028-4.013,1.792-4.013c0.762,0,1.824,3.217,1.791,4.013S16.794,25.303,16.461,25.303zM23.361,19.5c-0.195,1.277-1.004,1.777-2.787,1.492c-1.658-0.266-3.283-0.763-3.283-3.35c0-0.963,1.258-1.737,1.99-1.825C20.805,15.634,23.869,16.172,23.361,19.5z",mail:"M28.516,7.167H3.482l12.517,7.108L28.516,7.167zM16.74,17.303C16.51,17.434,16.255,17.5,16,17.5s-0.51-0.066-0.741-0.197L2.5,10.06v14.773h27V10.06L16.74,17.303z",picture:"M2.5,4.833v22.334h27V4.833H2.5zM25.25,25.25H6.75V6.75h18.5V25.25zM11.25,14c1.426,0,2.583-1.157,2.583-2.583c0-1.427-1.157-2.583-2.583-2.583c-1.427,0-2.583,1.157-2.583,2.583C8.667,12.843,9.823,14,11.25,14zM24.251,16.25l-4.917-4.917l-6.917,6.917L10.5,16.333l-2.752,2.752v5.165h16.503V16.25z",bubble:"M16,5.333c-7.732,0-14,4.701-14,10.5c0,1.982,0.741,3.833,2.016,5.414L2,25.667l5.613-1.441c2.339,1.317,5.237,2.107,8.387,2.107c7.732,0,14-4.701,14-10.5C30,10.034,23.732,5.333,16,5.333z",codetalk:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM13.704,19.47l-2.338,2.336l-6.43-6.431l6.429-6.432l2.339,2.341l-4.091,4.091L13.704,19.47zM20.775,21.803l-2.337-2.339l4.092-4.09l-4.092-4.092l2.337-2.339l6.43,6.426L20.775,21.803z",talkq:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z",talke:"M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.982,21.375h-1.969v-1.889h1.969V21.375zM16.982,17.469v0.625h-1.969v-0.769c0-2.321,2.641-2.689,2.641-4.337c0-0.752-0.672-1.329-1.553-1.329c-0.912,0-1.713,0.672-1.713,0.672l-1.12-1.393c0,0,1.104-1.153,3.009-1.153c1.81,0,3.49,1.121,3.49,3.009C19.768,15.437,16.982,15.741,16.982,17.469z",home:"M27.812,16l-3.062-3.062V5.625h-2.625v4.688L16,4.188L4.188,16L7,15.933v11.942h17.875V16H27.812zM16,26.167h-5.833v-7H16V26.167zM21.667,23.167h-3.833v-4.042h3.833V23.167z",lock:"M24.875,15.334v-4.876c0-4.894-3.981-8.875-8.875-8.875s-8.875,3.981-8.875,8.875v4.876H5.042v15.083h21.916V15.334H24.875zM10.625,10.458c0-2.964,2.411-5.375,5.375-5.375s5.375,2.411,5.375,5.375v4.876h-10.75V10.458zM18.272,26.956h-4.545l1.222-3.667c-0.782-0.389-1.324-1.188-1.324-2.119c0-1.312,1.063-2.375,2.375-2.375s2.375,1.062,2.375,2.375c0,0.932-0.542,1.73-1.324,2.119L18.272,26.956z",unlock:"M24.875,15.334v-4.876c0-4.894-3.981-8.875-8.875-8.875s-8.875,3.981-8.875,8.875v0.375h3.5v-0.375c0-2.964,2.411-5.375,5.375-5.375s5.375,2.411,5.375,5.375v4.876H5.042v15.083h21.916V15.334H24.875zM18.272,26.956h-4.545l1.222-3.667c-0.782-0.389-1.324-1.188-1.324-2.119c0-1.312,1.063-2.375,2.375-2.375s2.375,1.062,2.375,2.375c0,0.932-0.542,1.73-1.324,2.119L18.272,26.956z",clip:"M23.898,6.135c-1.571-1.125-3.758-0.764-4.884,0.808l-8.832,12.331c-0.804,1.122-0.546,2.684,0.577,3.488c1.123,0.803,2.684,0.545,3.488-0.578l6.236-8.706l-0.813-0.583l-6.235,8.707h0c-0.483,0.672-1.42,0.828-2.092,0.347c-0.673-0.481-0.827-1.419-0.345-2.093h0l8.831-12.33l0.001-0.001l-0.002-0.001c0.803-1.119,2.369-1.378,3.489-0.576c1.12,0.803,1.379,2.369,0.577,3.489v-0.001l-9.68,13.516l0.001,0.001c-1.124,1.569-3.316,1.931-4.885,0.808c-1.569-1.125-1.93-3.315-0.807-4.885l7.035-9.822l-0.813-0.582l-7.035,9.822c-1.447,2.02-0.982,4.83,1.039,6.277c2.021,1.448,4.831,0.982,6.278-1.037l9.68-13.516C25.83,9.447,25.47,7.261,23.898,6.135z",star:"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375z",staroff:"M16,22.375L7.116,28.83l3.396-10.438l-8.883-6.458l10.979,0.002L16.002,1.5l3.391,10.434h10.981l-8.886,6.457l3.396,10.439L16,22.375L16,22.375zM22.979,26.209l-2.664-8.205l6.979-5.062h-8.627L16,4.729l-2.666,8.206H4.708l6.979,5.07l-2.666,8.203L16,21.146L22.979,26.209L22.979,26.209z",star2:"M14.615,4.928c0.487-0.986,1.284-0.986,1.771,0l2.249,4.554c0.486,0.986,1.775,1.923,2.864,2.081l5.024,0.73c1.089,0.158,1.335,0.916,0.547,1.684l-3.636,3.544c-0.788,0.769-1.28,2.283-1.095,3.368l0.859,5.004c0.186,1.085-0.459,1.553-1.433,1.041l-4.495-2.363c-0.974-0.512-2.567-0.512-3.541,0l-4.495,2.363c-0.974,0.512-1.618,0.044-1.432-1.041l0.858-5.004c0.186-1.085-0.307-2.6-1.094-3.368L3.93,13.977c-0.788-0.768-0.542-1.525,0.547-1.684l5.026-0.73c1.088-0.158,2.377-1.095,2.864-2.081L14.615,4.928z",star2off:"M26.522,12.293l-5.024-0.73c-1.089-0.158-2.378-1.095-2.864-2.081l-2.249-4.554c-0.487-0.986-1.284-0.986-1.771,0l-2.247,4.554c-0.487,0.986-1.776,1.923-2.864,2.081l-5.026,0.73c-1.088,0.158-1.334,0.916-0.547,1.684l3.637,3.544c0.788,0.769,1.28,2.283,1.094,3.368l-0.858,5.004c-0.186,1.085,0.458,1.553,1.432,1.041l4.495-2.363c0.974-0.512,2.566-0.512,3.541,0l4.495,2.363c0.974,0.512,1.618,0.044,1.433-1.041l-0.859-5.004c-0.186-1.085,0.307-2.6,1.095-3.368l3.636-3.544C27.857,13.209,27.611,12.452,26.522,12.293zM22.037,16.089c-1.266,1.232-1.966,3.394-1.67,5.137l0.514,2.984l-2.679-1.409c-0.757-0.396-1.715-0.612-2.702-0.612s-1.945,0.216-2.7,0.61l-2.679,1.409l0.511-2.982c0.297-1.743-0.404-3.905-1.671-5.137l-2.166-2.112l2.995-0.435c1.754-0.255,3.592-1.591,4.373-3.175L15.5,7.652l1.342,2.716c0.781,1.583,2.617,2.92,4.369,3.173l2.992,0.435L22.037,16.089z",star3:"M22.441,28.181c-0.419,0-0.835-0.132-1.189-0.392l-5.751-4.247L9.75,27.789c-0.354,0.26-0.771,0.392-1.189,0.392c-0.412,0-0.824-0.128-1.175-0.384c-0.707-0.511-1-1.422-0.723-2.25l2.26-6.783l-5.815-4.158c-0.71-0.509-1.009-1.416-0.74-2.246c0.268-0.826,1.037-1.382,1.904-1.382c0.004,0,0.01,0,0.014,0l7.15,0.056l2.157-6.816c0.262-0.831,1.035-1.397,1.906-1.397s1.645,0.566,1.906,1.397l2.155,6.816l7.15-0.056c0.004,0,0.01,0,0.015,0c0.867,0,1.636,0.556,1.903,1.382c0.271,0.831-0.028,1.737-0.739,2.246l-5.815,4.158l2.263,6.783c0.276,0.826-0.017,1.737-0.721,2.25C23.268,28.053,22.854,28.181,22.441,28.181L22.441,28.181z",star3off:"M28.631,12.359c-0.268-0.826-1.036-1.382-1.903-1.382h-0.015l-7.15,0.056l-2.155-6.816c-0.262-0.831-1.035-1.397-1.906-1.397s-1.645,0.566-1.906,1.397l-2.157,6.816l-7.15-0.056H4.273c-0.868,0-1.636,0.556-1.904,1.382c-0.27,0.831,0.029,1.737,0.74,2.246l5.815,4.158l-2.26,6.783c-0.276,0.828,0.017,1.739,0.723,2.25c0.351,0.256,0.763,0.384,1.175,0.384c0.418,0,0.834-0.132,1.189-0.392l5.751-4.247l5.751,4.247c0.354,0.26,0.771,0.392,1.189,0.392c0.412,0,0.826-0.128,1.177-0.384c0.704-0.513,0.997-1.424,0.721-2.25l-2.263-6.783l5.815-4.158C28.603,14.097,28.901,13.19,28.631,12.359zM19.712,17.996l2.729,8.184l-6.94-5.125L8.56,26.18l2.729-8.184l-7.019-5.018l8.627,0.066L15.5,4.82l2.603,8.225l8.627-0.066L19.712,17.996z",chat:"M15.985,5.972c-7.563,0-13.695,4.077-13.695,9.106c0,2.877,2.013,5.44,5.147,7.108c-0.446,1.479-1.336,3.117-3.056,4.566c0,0,4.015-0.266,6.851-3.143c0.163,0.04,0.332,0.07,0.497,0.107c-0.155-0.462-0.246-0.943-0.246-1.443c0-3.393,3.776-6.05,8.599-6.05c3.464,0,6.379,1.376,7.751,3.406c1.168-1.34,1.847-2.892,1.847-4.552C29.68,10.049,23.548,5.972,15.985,5.972zM27.68,22.274c0-2.79-3.401-5.053-7.599-5.053c-4.196,0-7.599,2.263-7.599,5.053c0,2.791,3.403,5.053,7.599,5.053c0.929,0,1.814-0.116,2.637-0.319c1.573,1.597,3.801,1.744,3.801,1.744c-0.954-0.804-1.447-1.713-1.695-2.534C26.562,25.293,27.68,23.871,27.68,22.274z",quote:"M14.505,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.128,0,2.07,0.411,2.826,1.229c0.756,0.82,1.134,1.832,1.134,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.259,0.443-4.327,1.332-6.203c0.888-1.875,2.243-3.57,4.067-5.085c1.824-1.514,2.988-2.272,3.492-2.272c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L14.505,5.873zM27.465,5.873c-3.937,2.52-5.904,5.556-5.904,9.108c0,1.104,0.192,1.656,0.576,1.656l0.396-0.107c0.312-0.12,0.563-0.18,0.756-0.18c1.104,0,2.04,0.411,2.808,1.229c0.769,0.82,1.152,1.832,1.152,3.037c0,1.157-0.408,2.14-1.224,2.947c-0.816,0.807-1.801,1.211-2.952,1.211c-1.608,0-2.935-0.661-3.979-1.984c-1.044-1.321-1.565-2.98-1.565-4.977c0-2.284,0.449-4.369,1.35-6.256c0.9-1.887,2.256-3.577,4.068-5.067c1.812-1.49,2.97-2.236,3.474-2.236c0.336,0,0.612,0.162,0.828,0.486c0.216,0.324,0.324,0.606,0.324,0.846L27.465,5.873z",gear:"M26.974,16.514l3.765-1.991c-0.074-0.738-0.217-1.454-0.396-2.157l-4.182-0.579c-0.362-0.872-0.84-1.681-1.402-2.423l1.594-3.921c-0.524-0.511-1.09-0.977-1.686-1.406l-3.551,2.229c-0.833-0.438-1.73-0.77-2.672-0.984l-1.283-3.976c-0.364-0.027-0.728-0.056-1.099-0.056s-0.734,0.028-1.099,0.056l-1.271,3.941c-0.967,0.207-1.884,0.543-2.738,0.986L7.458,4.037C6.863,4.466,6.297,4.932,5.773,5.443l1.55,3.812c-0.604,0.775-1.11,1.629-1.49,2.55l-4.05,0.56c-0.178,0.703-0.322,1.418-0.395,2.157l3.635,1.923c0.041,1.013,0.209,1.994,0.506,2.918l-2.742,3.032c0.319,0.661,0.674,1.303,1.085,1.905l4.037-0.867c0.662,0.72,1.416,1.351,2.248,1.873l-0.153,4.131c0.663,0.299,1.352,0.549,2.062,0.749l2.554-3.283C15.073,26.961,15.532,27,16,27c0.507,0,1.003-0.046,1.491-0.113l2.567,3.301c0.711-0.2,1.399-0.45,2.062-0.749l-0.156-4.205c0.793-0.513,1.512-1.127,2.146-1.821l4.142,0.889c0.411-0.602,0.766-1.243,1.085-1.905l-2.831-3.131C26.778,18.391,26.93,17.467,26.974,16.514zM20.717,21.297l-1.785,1.162l-1.098-1.687c-0.571,0.22-1.186,0.353-1.834,0.353c-2.831,0-5.125-2.295-5.125-5.125c0-2.831,2.294-5.125,5.125-5.125c2.83,0,5.125,2.294,5.125,5.125c0,1.414-0.573,2.693-1.499,3.621L20.717,21.297z",smallgear:"M31.229,17.736c0.064-0.571,0.104-1.148,0.104-1.736s-0.04-1.166-0.104-1.737l-4.377-1.557c-0.218-0.716-0.504-1.401-0.851-2.05l1.993-4.192c-0.725-0.91-1.549-1.734-2.458-2.459l-4.193,1.994c-0.647-0.347-1.334-0.632-2.049-0.849l-1.558-4.378C17.165,0.708,16.588,0.667,16,0.667s-1.166,0.041-1.737,0.105L12.707,5.15c-0.716,0.217-1.401,0.502-2.05,0.849L6.464,4.005C5.554,4.73,4.73,5.554,4.005,6.464l1.994,4.192c-0.347,0.648-0.632,1.334-0.849,2.05l-4.378,1.557C0.708,14.834,0.667,15.412,0.667,16s0.041,1.165,0.105,1.736l4.378,1.558c0.217,0.715,0.502,1.401,0.849,2.049l-1.994,4.193c0.725,0.909,1.549,1.733,2.459,2.458l4.192-1.993c0.648,0.347,1.334,0.633,2.05,0.851l1.557,4.377c0.571,0.064,1.148,0.104,1.737,0.104c0.588,0,1.165-0.04,1.736-0.104l1.558-4.377c0.715-0.218,1.399-0.504,2.049-0.851l4.193,1.993c0.909-0.725,1.733-1.549,2.458-2.458l-1.993-4.193c0.347-0.647,0.633-1.334,0.851-2.049L31.229,17.736zM16,20.871c-2.69,0-4.872-2.182-4.872-4.871c0-2.69,2.182-4.872,4.872-4.872c2.689,0,4.871,2.182,4.871,4.872C20.871,18.689,18.689,20.871,16,20.871z",wrench:"M26.834,14.693c1.816-2.088,2.181-4.938,1.193-7.334l-3.646,4.252l-3.594-0.699L19.596,7.45l3.637-4.242c-2.502-0.63-5.258,0.13-7.066,2.21c-1.907,2.193-2.219,5.229-1.039,7.693L5.624,24.04c-1.011,1.162-0.888,2.924,0.274,3.935c1.162,1.01,2.924,0.888,3.935-0.274l9.493-10.918C21.939,17.625,24.918,16.896,26.834,14.693z",wrench2:"M24.946,9.721l-2.872-0.768l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172l-3.476,3.478l-3.478,3.478c-2.062-0.816-4.504-0.391-6.173,1.277c-1.583,1.581-2.043,3.856-1.39,5.849l3.231-3.188l2.874,0.77l0.769,2.872l-3.239,3.197c1.998,0.665,4.288,0.207,5.876-1.384c1.678-1.678,2.1-4.133,1.271-6.202l3.463-3.464l3.464-3.463c2.069,0.828,4.523,0.406,6.202-1.272c1.592-1.589,2.049-3.878,1.384-5.876L24.946,9.721z",wrench3:"M27.839,6.775l-3.197,3.239L21.77,9.246l-0.771-2.874l3.188-3.231c-1.992-0.653-4.268-0.192-5.848,1.391c-1.668,1.668-2.095,4.111-1.279,6.172L7.42,20.344c-0.204-0.032-0.408-0.062-0.621-0.062c-2.173,0-3.933,1.759-3.933,3.933c0,2.173,1.76,3.933,3.933,3.933c2.171,0,3.931-1.76,3.933-3.933c0-0.24-0.03-0.473-0.071-0.7l9.592-9.59c2.069,0.828,4.523,0.406,6.202-1.272C28.047,11.062,28.504,8.772,27.839,6.775zM6.799,25.146c-0.517,0-0.933-0.418-0.935-0.933c0.002-0.515,0.418-0.933,0.935-0.933c0.514,0,0.932,0.418,0.932,0.933S7.313,25.146,6.799,25.146z",screwdriver:"M19.387,14.373c2.119-2.619,5.322-6.77,5.149-7.75c-0.128-0.729-0.882-1.547-1.763-2.171c-0.883-0.625-1.916-1.044-2.645-0.915c-0.98,0.173-3.786,4.603-5.521,7.49c-0.208,0.344,0.328,1.177,0.156,1.468c-0.172,0.292-1.052,0.042-1.18,0.261c-0.263,0.451-0.417,0.722-0.417,0.722s-0.553,0.823,1.163,2.163l-5.233,7.473c-0.267,0.381-1.456,0.459-1.456,0.459l-1.184,3.312l0.859,0.602l2.708-2.246c0,0-0.334-1.143-0.068-1.523l5.242-7.489c1.719,1,2.377,0.336,2.377,0.336s0.201-0.238,0.536-0.639c0.161-0.194-0.374-0.936-0.159-1.197C18.169,14.467,19.133,14.685,19.387,14.373z",hammerandscrewdriver:"M28.537,9.859c-0.473-0.259-1.127-0.252-1.609-0.523c-0.943-0.534-1.186-1.316-1.226-2.475c-2.059-2.215-5.138-4.176-9.424-4.114c-1.162,0.017-2.256-0.035-3.158,0.435c-0.258,0.354-0.004,0.516,0.288,0.599c-0.29,0.138-0.692,0.147-0.626,0.697c2.72-0.383,7.475,0.624,7.116,2.966c-0.08,0.521-0.735,1.076-1.179,1.563c-1.263,1.382-2.599,2.45-3.761,3.667l0.336,0.336c0.742-0.521,1.446-0.785,2.104-0.785c0.707,0,1.121,0.297,1.276,0.433c0.575-0.618,1.166-1.244,1.839-1.853c0.488-0.444,1.047-1.099,1.566-1.178l0.949-0.101c1.156,0.047,1.937,0.29,2.471,1.232c0.27,0.481,0.262,1.139,0.521,1.613c0.175,0.324,0.937,1.218,1.316,1.228c0.294,0.009,0.603-0.199,0.899-0.49l1.033-1.034c0.291-0.294,0.501-0.6,0.492-0.896C29.754,10.801,28.861,10.035,28.537,9.859zM13.021,15.353l-0.741-0.741c-3.139,2.643-6.52,5.738-9.531,8.589c-0.473,0.443-1.452,1.021-1.506,1.539c-0.083,0.781,0.95,1.465,1.506,2c0.556,0.533,1.212,1.602,1.994,1.51c0.509-0.043,1.095-1.029,1.544-1.502c2.255-2.374,4.664-4.976,6.883-7.509c-0.312-0.371-0.498-0.596-0.498-0.596C12.535,18.451,11.779,17.272,13.021,15.353zM20.64,15.643c-0.366-0.318-1.466,0.143-1.777-0.122c-0.311-0.266,0.171-1.259-0.061-1.455c-0.482-0.406-0.77-0.646-0.77-0.646s-0.862-0.829-2.812,0.928L7.44,6.569C7.045,6.173,7.203,4.746,7.203,4.746L3.517,2.646L2.623,3.541l2.1,3.686c0,0,1.428-0.158,1.824,0.237l7.792,7.793c-1.548,1.831-0.895,2.752-0.895,2.752s0.238,0.288,0.646,0.771c0.196,0.23,1.188-0.249,1.455,0.061c0.264,0.312-0.196,1.41,0.12,1.777c2.666,3.064,6.926,7.736,8.125,7.736c0.892,0,2.021-0.724,2.948-1.64c0.925-0.917,1.639-2.055,1.639-2.947C28.377,22.567,23.704,18.309,20.64,15.643z",magic:"M23.043,4.649l-0.404-2.312l-1.59,1.727l-2.323-0.33l1.151,2.045l-1.032,2.108l2.302-0.463l1.686,1.633l0.271-2.332l2.074-1.099L23.043,4.649zM26.217,18.198l-0.182-1.25l-0.882,0.905l-1.245-0.214l0.588,1.118l-0.588,1.118l1.245-0.214l0.882,0.905l0.182-1.25l1.133-0.56L26.217,18.198zM4.92,7.672L5.868,7.3l0.844,0.569L6.65,6.853l0.802-0.627L6.467,5.97L6.118,5.013L5.571,5.872L4.553,5.908l0.647,0.786L4.92,7.672zM10.439,10.505l1.021-1.096l1.481,0.219l-0.727-1.31l0.667-1.341l-1.47,0.287l-1.069-1.048L10.16,7.703L8.832,8.396l1.358,0.632L10.439,10.505zM17.234,12.721c-0.588-0.368-1.172-0.618-1.692-0.729c-0.492-0.089-1.039-0.149-1.425,0.374L2.562,30.788h6.68l9.669-15.416c0.303-0.576,0.012-1.041-0.283-1.447C18.303,13.508,17.822,13.09,17.234,12.721zM13.613,21.936c-0.254-0.396-0.74-0.857-1.373-1.254c-0.632-0.396-1.258-0.634-1.726-0.69l4.421-7.052c0.064-0.013,0.262-0.021,0.543,0.066c0.346,0.092,0.785,0.285,1.225,0.562c0.504,0.313,0.908,0.677,1.133,0.97c0.113,0.145,0.178,0.271,0.195,0.335c0.002,0.006,0.004,0.011,0.004,0.015L13.613,21.936z",download:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM16,28.792c-1.549,0-2.806-1.256-2.806-2.806s1.256-2.806,2.806-2.806c1.55,0,2.806,1.256,2.806,2.806S17.55,28.792,16,28.792zM16,21.087l-7.858-6.562h3.469V5.747h8.779v8.778h3.468L16,21.087z",view:"M16,8.286C8.454,8.286,2.5,16,2.5,16s5.954,7.715,13.5,7.715c5.771,0,13.5-7.715,13.5-7.715S21.771,8.286,16,8.286zM16,20.807c-2.649,0-4.807-2.157-4.807-4.807s2.158-4.807,4.807-4.807s4.807,2.158,4.807,4.807S18.649,20.807,16,20.807zM16,13.194c-1.549,0-2.806,1.256-2.806,2.806c0,1.55,1.256,2.806,2.806,2.806c1.55,0,2.806-1.256,2.806-2.806C18.806,14.451,17.55,13.194,16,13.194z",noview:"M11.478,17.568c-0.172-0.494-0.285-1.017-0.285-1.568c0-2.65,2.158-4.807,4.807-4.807c0.552,0,1.074,0.113,1.568,0.285l2.283-2.283C18.541,8.647,17.227,8.286,16,8.286C8.454,8.286,2.5,16,2.5,16s2.167,2.791,5.53,5.017L11.478,17.568zM23.518,11.185l-3.056,3.056c0.217,0.546,0.345,1.138,0.345,1.76c0,2.648-2.158,4.807-4.807,4.807c-0.622,0-1.213-0.128-1.76-0.345l-2.469,2.47c1.327,0.479,2.745,0.783,4.229,0.783c5.771,0,13.5-7.715,13.5-7.715S26.859,13.374,23.518,11.185zM25.542,4.917L4.855,25.604L6.27,27.02L26.956,6.332L25.542,4.917z",cloud:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h15.875c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z",cloud2:"M7.562,24.812c-3.313,0-6-2.687-6-6l0,0c0.002-2.659,1.734-4.899,4.127-5.684l0,0c0.083-2.26,1.937-4.064,4.216-4.066l0,0c0.73,0,1.415,0.19,2.01,0.517l0,0c1.266-2.105,3.57-3.516,6.208-3.517l0,0c3.947,0.002,7.157,3.155,7.248,7.079l0,0c2.362,0.804,4.062,3.034,4.064,5.671l0,0c0,3.313-2.687,6-6,6l0,0H7.562L7.562,24.812zM24.163,14.887c-0.511-0.095-0.864-0.562-0.815-1.079l0,0c0.017-0.171,0.027-0.336,0.027-0.497l0,0c-0.007-2.899-2.352-5.245-5.251-5.249l0,0c-2.249-0.002-4.162,1.418-4.911,3.41l0,0c-0.122,0.323-0.406,0.564-0.748,0.63l0,0c-0.34,0.066-0.694-0.052-0.927-0.309l0,0c-0.416-0.453-0.986-0.731-1.633-0.731l0,0c-1.225,0.002-2.216,0.993-2.22,2.218l0,0c0,0.136,0.017,0.276,0.045,0.424l0,0c0.049,0.266-0.008,0.54-0.163,0.762l0,0c-0.155,0.223-0.392,0.371-0.657,0.414l0,0c-1.9,0.313-3.352,1.949-3.35,3.931l0,0c0.004,2.209,1.792,3.995,4.001,4.001l0,0h15.874c2.209-0.006,3.994-1.792,3.999-4.001l0,0C27.438,16.854,26.024,15.231,24.163,14.887L24.163,14.887",cloudDown:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h3.404l-0.707-0.707c-0.377-0.377-0.585-0.879-0.585-1.413c0-0.533,0.208-1.035,0.585-1.412l0.556-0.557c0.4-0.399,0.937-0.628,1.471-0.628c0.027,0,0.054,0,0.08,0.002v-0.472c0-1.104,0.898-2.002,2-2.002h3.266c1.103,0,2,0.898,2,2.002v0.472c0.027-0.002,0.054-0.002,0.081-0.002c0.533,0,1.07,0.229,1.47,0.63l0.557,0.552c0.78,0.781,0.78,2.05,0,2.828l-0.706,0.707h2.403c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M21.033,20.986l-0.556-0.555c-0.39-0.389-0.964-0.45-1.276-0.137c-0.312,0.312-0.568,0.118-0.568-0.432v-1.238c0-0.55-0.451-1-1-1h-3.265c-0.55,0-1,0.45-1,1v1.238c0,0.55-0.256,0.744-0.569,0.432c-0.312-0.313-0.887-0.252-1.276,0.137l-0.556,0.555c-0.39,0.389-0.39,1.024-0.001,1.413l4.328,4.331c0.194,0.194,0.451,0.291,0.707,0.291s0.512-0.097,0.707-0.291l4.327-4.331C21.424,22.011,21.423,21.375,21.033,20.986z",cloudUp:"M24.345,13.904c0.019-0.195,0.03-0.392,0.03-0.591c0-3.452-2.798-6.25-6.25-6.25c-2.679,0-4.958,1.689-5.847,4.059c-0.589-0.646-1.429-1.059-2.372-1.059c-1.778,0-3.219,1.441-3.219,3.219c0,0.21,0.023,0.415,0.062,0.613c-2.372,0.391-4.187,2.436-4.187,4.918c0,2.762,2.239,5,5,5h2.312c-0.126-0.266-0.2-0.556-0.2-0.859c0-0.535,0.208-1.04,0.587-1.415l4.325-4.329c0.375-0.377,0.877-0.585,1.413-0.585c0.54,0,1.042,0.21,1.417,0.587l4.323,4.329c0.377,0.373,0.585,0.878,0.585,1.413c0,0.304-0.073,0.594-0.2,0.859h1.312c2.762,0,5-2.238,5-5C28.438,16.362,26.672,14.332,24.345,13.904z M16.706,17.916c-0.193-0.195-0.45-0.291-0.706-0.291s-0.512,0.096-0.707,0.291l-4.327,4.33c-0.39,0.389-0.389,1.025,0.001,1.414l0.556,0.555c0.39,0.389,0.964,0.449,1.276,0.137s0.568-0.119,0.568,0.432v1.238c0,0.549,0.451,1,1,1h3.265c0.551,0,1-0.451,1-1v-1.238c0-0.551,0.256-0.744,0.569-0.432c0.312,0.312,0.887,0.252,1.276-0.137l0.556-0.555c0.39-0.389,0.39-1.025,0.001-1.414L16.706,17.916z",location:"M16,3.5c-4.142,0-7.5,3.358-7.5,7.5c0,4.143,7.5,18.121,7.5,18.121S23.5,15.143,23.5,11C23.5,6.858,20.143,3.5,16,3.5z M16,14.584c-1.979,0-3.584-1.604-3.584-3.584S14.021,7.416,16,7.416S19.584,9.021,19.584,11S17.979,14.584,16,14.584z",loaction2:"M15.834,29.084 15.834,16.166 2.917,16.166 29.083,2.917z",volume0:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z",volume1:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z",volume2:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z",volume3:"M4.998,12.127v7.896h4.495l6.729,5.526l0.004-18.948l-6.73,5.526H4.998z M18.806,11.219c-0.393-0.389-1.024-0.389-1.415,0.002c-0.39,0.391-0.39,1.024,0.002,1.416v-0.002c0.863,0.864,1.395,2.049,1.395,3.366c0,1.316-0.531,2.497-1.393,3.361c-0.394,0.389-0.394,1.022-0.002,1.415c0.195,0.195,0.451,0.293,0.707,0.293c0.257,0,0.513-0.098,0.708-0.293c1.222-1.22,1.98-2.915,1.979-4.776C20.788,14.136,20.027,12.439,18.806,11.219z M21.101,8.925c-0.393-0.391-1.024-0.391-1.413,0c-0.392,0.391-0.392,1.025,0,1.414c1.45,1.451,2.344,3.447,2.344,5.661c0,2.212-0.894,4.207-2.342,5.659c-0.392,0.39-0.392,1.023,0,1.414c0.195,0.195,0.451,0.293,0.708,0.293c0.256,0,0.512-0.098,0.707-0.293c1.808-1.809,2.929-4.315,2.927-7.073C24.033,13.24,22.912,10.732,21.101,8.925z M23.28,6.746c-0.393-0.391-1.025-0.389-1.414,0.002c-0.391,0.389-0.391,1.023,0.002,1.413h-0.002c2.009,2.009,3.248,4.773,3.248,7.839c0,3.063-1.239,5.828-3.246,7.838c-0.391,0.39-0.391,1.023,0.002,1.415c0.194,0.194,0.45,0.291,0.706,0.291s0.513-0.098,0.708-0.293c2.363-2.366,3.831-5.643,3.829-9.251C27.115,12.389,25.647,9.111,23.28,6.746z",bell:"M24.264,20.958c-2.484-4.226-2.168-13.199-6.143-15.486c0.254-0.395,0.404-0.861,0.404-1.366c0-1.396-1.129-2.526-2.526-2.526c-1.396,0-2.527,1.131-2.527,2.526c0,0.505,0.151,0.973,0.406,1.367C9.905,7.76,10.221,16.732,7.736,20.958C5.585,21.523,4.25,22.311,4.25,23.18v1.125c0,1.604,3.877,2.938,9.077,3.283c-0.003,0.048-0.015,0.096-0.015,0.145c0,1.483,1.203,2.688,2.688,2.688c1.484,0,2.688-1.203,2.688-2.688c0-0.049-0.012-0.097-0.015-0.145c5.199-0.349,9.077-1.688,9.077-3.283V23.18C27.75,22.311,26.415,21.523,24.264,20.958zM14.472,4.105c0.002-0.843,0.685-1.525,1.527-1.527c0.843,0.002,1.526,0.685,1.528,1.527c-0.002,0.372-0.144,0.708-0.361,0.974c-0.359-0.096-0.745-0.15-1.166-0.15s-0.807,0.055-1.167,0.15C14.612,4.814,14.473,4.478,14.472,4.105z",mute:"M21.328,8.956c-0.605-1.545-1.4-2.809-2.572-3.484c0.254-0.395,0.404-0.861,0.404-1.366c0-1.396-1.129-2.526-2.526-2.526c-1.396,0-2.526,1.131-2.526,2.526c0,0.505,0.15,0.973,0.405,1.367C10.54,7.76,10.856,16.732,8.371,20.958c-2.151,0.565-3.486,1.353-3.486,2.222v1.125c0,0.271,0.117,0.525,0.322,0.774L21.328,8.956zM16.635,2.578c0.844,0.002,1.525,0.685,1.527,1.527c0,0.372-0.139,0.708-0.36,0.974c-0.358-0.096-0.745-0.15-1.165-0.15c-0.422,0-0.808,0.055-1.167,0.15c-0.221-0.265-0.359-0.602-0.36-0.974C15.109,3.263,15.792,2.58,16.635,2.578zM24.898,20.958c-1.125-1.914-1.678-4.802-2.312-7.602L9.065,26.878c1.395,0.338,3.061,0.587,4.896,0.71c-0.003,0.048-0.015,0.096-0.015,0.145c0,1.483,1.203,2.688,2.688,2.688c1.485,0,2.688-1.203,2.688-2.688c0-0.049-0.012-0.097-0.016-0.145c5.188-0.349,9.062-1.688,9.062-3.283V23.18C28.385,22.311,27.05,21.523,24.898,20.958zM26.677,5.021L3.615,28.083l1.415,1.416L28.091,6.436L26.677,5.021z",key:"M18.386,16.009l0.009-0.006l-0.58-0.912c1.654-2.226,1.876-5.319,0.3-7.8c-2.043-3.213-6.303-4.161-9.516-2.118c-3.212,2.042-4.163,6.302-2.12,9.517c1.528,2.402,4.3,3.537,6.944,3.102l0.424,0.669l0.206,0.045l0.779-0.447l-0.305,1.377l2.483,0.552l-0.296,1.325l1.903,0.424l-0.68,3.06l1.406,0.313l-0.424,1.906l4.135,0.918l0.758-3.392L18.386,16.009z M10.996,8.944c-0.685,0.436-1.593,0.233-2.029-0.452C8.532,7.807,8.733,6.898,9.418,6.463s1.594-0.233,2.028,0.452C11.883,7.6,11.68,8.509,10.996,8.944z",ruler:"M6.63,21.796l-5.122,5.121h25.743V1.175L6.63,21.796zM18.702,10.48c0.186-0.183,0.48-0.183,0.664,0l1.16,1.159c0.184,0.183,0.186,0.48,0.002,0.663c-0.092,0.091-0.213,0.137-0.332,0.137c-0.121,0-0.24-0.046-0.33-0.137l-1.164-1.159C18.519,10.96,18.519,10.664,18.702,10.48zM17.101,12.084c0.184-0.183,0.48-0.183,0.662,0l2.156,2.154c0.184,0.183,0.184,0.48,0.002,0.661c-0.092,0.092-0.213,0.139-0.334,0.139s-0.24-0.046-0.33-0.137l-2.156-2.154C16.917,12.564,16.917,12.267,17.101,12.084zM15.497,13.685c0.184-0.183,0.48-0.183,0.664,0l1.16,1.161c0.184,0.183,0.182,0.48-0.002,0.663c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.24-0.046-0.332-0.138l-1.16-1.16C15.314,14.166,15.314,13.868,15.497,13.685zM13.896,15.288c0.184-0.183,0.48-0.181,0.664,0.002l1.158,1.159c0.183,0.184,0.183,0.48,0,0.663c-0.092,0.092-0.212,0.138-0.332,0.138c-0.119,0-0.24-0.046-0.332-0.138l-1.158-1.161C13.713,15.767,13.713,15.471,13.896,15.288zM12.293,16.892c0.183-0.184,0.479-0.184,0.663,0l2.154,2.153c0.184,0.184,0.184,0.481,0,0.665c-0.092,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-2.153-2.155C12.11,17.371,12.11,17.075,12.293,16.892zM10.302,24.515c-0.091,0.093-0.212,0.139-0.332,0.139c-0.119,0-0.238-0.045-0.33-0.137l-2.154-2.153c-0.184-0.183-0.184-0.479,0-0.663s0.479-0.184,0.662,0l2.154,2.153C10.485,24.036,10.485,24.332,10.302,24.515zM10.912,21.918c-0.093,0.093-0.214,0.139-0.333,0.139c-0.12,0-0.24-0.045-0.33-0.137l-1.162-1.161c-0.184-0.183-0.184-0.479,0-0.66c0.184-0.185,0.48-0.187,0.664-0.003l1.161,1.162C11.095,21.438,11.095,21.735,10.912,21.918zM12.513,20.316c-0.092,0.092-0.211,0.138-0.332,0.138c-0.119,0-0.239-0.046-0.331-0.138l-1.159-1.16c-0.184-0.184-0.184-0.48,0-0.664s0.48-0.182,0.663,0.002l1.159,1.161C12.696,19.838,12.696,20.135,12.513,20.316zM22.25,21.917h-8.67l8.67-8.67V21.917zM22.13,10.7c-0.09,0.092-0.211,0.138-0.33,0.138c-0.121,0-0.242-0.046-0.334-0.138l-1.16-1.159c-0.184-0.183-0.184-0.479,0-0.663c0.182-0.183,0.479-0.183,0.662,0l1.16,1.159C22.312,10.221,22.313,10.517,22.13,10.7zM24.726,10.092c-0.092,0.092-0.213,0.137-0.332,0.137s-0.24-0.045-0.33-0.137l-2.154-2.154c-0.184-0.183-0.184-0.481,0-0.664s0.482-0.181,0.664,0.002l2.154,2.154C24.911,9.613,24.909,9.91,24.726,10.092z",power:"M25.542,8.354c-1.47-1.766-2.896-2.617-3.025-2.695c-0.954-0.565-2.181-0.241-2.739,0.724c-0.556,0.961-0.24,2.194,0.705,2.763c0,0,0.001,0,0.002,0.001c0.001,0,0.002,0.001,0.003,0.002c0.001,0,0.003,0.001,0.004,0.001c0.102,0.062,1.124,0.729,2.08,1.925c1.003,1.261,1.933,3.017,1.937,5.438c-0.001,2.519-1.005,4.783-2.64,6.438c-1.637,1.652-3.877,2.668-6.368,2.669c-2.491-0.001-4.731-1.017-6.369-2.669c-1.635-1.654-2.639-3.919-2.64-6.438c0.005-2.499,0.995-4.292,2.035-5.558c0.517-0.625,1.043-1.098,1.425-1.401c0.191-0.152,0.346-0.263,0.445-0.329c0.049-0.034,0.085-0.058,0.104-0.069c0.005-0.004,0.009-0.006,0.012-0.008s0.004-0.002,0.004-0.002l0,0c0.946-0.567,1.262-1.802,0.705-2.763c-0.559-0.965-1.785-1.288-2.739-0.724c-0.128,0.079-1.555,0.93-3.024,2.696c-1.462,1.751-2.974,4.511-2.97,8.157C2.49,23.775,8.315,29.664,15.5,29.667c7.186-0.003,13.01-5.892,13.012-13.155C28.516,12.864,27.005,10.105,25.542,8.354zM15.5,17.523c1.105,0,2.002-0.907,2.002-2.023h-0.001V3.357c0-1.118-0.896-2.024-2.001-2.024s-2.002,0.906-2.002,2.024V15.5C13.498,16.616,14.395,17.523,15.5,17.523z",flag:"M9.5,3v10c8,0,8,4,16,4V7C17.5,7,17.5,3,9.5,3z M6.5,29h2V3h-2V29z","flag-alt":"M19.562,10.75C21.74,8.572,25.5,7,25.5,7c-8,0-8-4-16-4v10c8,0,8,4,16,4C25.5,17,21.75,14,19.562,10.75zM6.5,29h2V3h-2V29z",tag:"M14.263,2.826H7.904L2.702,8.028v6.359L18.405,30.09l11.561-11.562L14.263,2.826zM6.495,8.859c-0.619-0.619-0.619-1.622,0-2.24C7.114,6,8.117,6,8.736,6.619c0.62,0.62,0.619,1.621,0,2.241C8.117,9.479,7.114,9.479,6.495,8.859z",search:"M29.772,26.433l-7.126-7.126c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127L29.772,26.433zM7.203,13.885c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486c-0.007,3.58-2.905,6.476-6.484,6.484C10.106,20.361,7.209,17.465,7.203,13.885z",zoomout:"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM8.854,11.884v4.001l9.665-0.001v-3.999L8.854,11.884z",zoomin:"M22.646,19.307c0.96-1.583,1.523-3.435,1.524-5.421C24.169,8.093,19.478,3.401,13.688,3.399C7.897,3.401,3.204,8.093,3.204,13.885c0,5.789,4.693,10.481,10.484,10.481c1.987,0,3.839-0.563,5.422-1.523l7.128,7.127l3.535-3.537L22.646,19.307zM13.688,20.369c-3.582-0.008-6.478-2.904-6.484-6.484c0.006-3.582,2.903-6.478,6.484-6.486c3.579,0.008,6.478,2.904,6.484,6.486C20.165,17.465,17.267,20.361,13.688,20.369zM15.687,9.051h-4v2.833H8.854v4.001h2.833v2.833h4v-2.834h2.832v-3.999h-2.833V9.051z",cross:"M24.778,21.419 19.276,15.917 24.777,10.415 21.949,7.585 16.447,13.087 10.945,7.585 8.117,10.415 13.618,15.917 8.116,21.419 10.946,24.248 16.447,18.746 21.948,24.248z",check:"M2.379,14.729 5.208,11.899 12.958,19.648 25.877,6.733 28.707,9.561 12.958,25.308z",settings:"M16.015,12.03c-2.156,0-3.903,1.747-3.903,3.903c0,2.155,1.747,3.903,3.903,3.903c0.494,0,0.962-0.102,1.397-0.27l0.836,1.285l1.359-0.885l-0.831-1.276c0.705-0.706,1.142-1.681,1.142-2.757C19.918,13.777,18.171,12.03,16.015,12.03zM16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM26.174,20.809c-0.241,0.504-0.513,0.99-0.826,1.45L22.19,21.58c-0.481,0.526-1.029,0.994-1.634,1.385l0.119,3.202c-0.507,0.23-1.028,0.421-1.569,0.57l-1.955-2.514c-0.372,0.051-0.75,0.086-1.136,0.086c-0.356,0-0.706-0.029-1.051-0.074l-1.945,2.5c-0.541-0.151-1.065-0.342-1.57-0.569l0.117-3.146c-0.634-0.398-1.208-0.88-1.712-1.427L6.78,22.251c-0.313-0.456-0.583-0.944-0.826-1.448l2.088-2.309c-0.226-0.703-0.354-1.451-0.385-2.223l-2.768-1.464c0.055-0.563,0.165-1.107,0.301-1.643l3.084-0.427c0.29-0.702,0.675-1.352,1.135-1.942L8.227,7.894c0.399-0.389,0.83-0.744,1.283-1.07l2.663,1.672c0.65-0.337,1.349-0.593,2.085-0.75l0.968-3.001c0.278-0.021,0.555-0.042,0.837-0.042c0.282,0,0.56,0.022,0.837,0.042l0.976,3.028c0.72,0.163,1.401,0.416,2.036,0.75l2.704-1.697c0.455,0.326,0.887,0.681,1.285,1.07l-1.216,2.986c0.428,0.564,0.793,1.181,1.068,1.845l3.185,0.441c0.135,0.535,0.247,1.081,0.302,1.643l-2.867,1.516c-0.034,0.726-0.15,1.43-0.355,2.1L26.174,20.809z", +settingsalt:"M16,1.466C7.973,1.466,1.466,7.973,1.466,16c0,8.027,6.507,14.534,14.534,14.534c8.027,0,14.534-6.507,14.534-14.534C30.534,7.973,24.027,1.466,16,1.466zM24.386,14.968c-1.451,1.669-3.706,2.221-5.685,1.586l-7.188,8.266c-0.766,0.88-2.099,0.97-2.979,0.205s-0.973-2.099-0.208-2.979l7.198-8.275c-0.893-1.865-0.657-4.164,0.787-5.824c1.367-1.575,3.453-2.151,5.348-1.674l-2.754,3.212l0.901,2.621l2.722,0.529l2.761-3.22C26.037,11.229,25.762,13.387,24.386,14.968z",feed:"M4.135,16.762c3.078,0,5.972,1.205,8.146,3.391c2.179,2.187,3.377,5.101,3.377,8.202h4.745c0-9.008-7.299-16.335-16.269-16.335V16.762zM4.141,8.354c10.973,0,19.898,8.975,19.898,20.006h4.743c0-13.646-11.054-24.749-24.642-24.749V8.354zM10.701,25.045c0,1.815-1.471,3.287-3.285,3.287s-3.285-1.472-3.285-3.287c0-1.813,1.471-3.285,3.285-3.285S10.701,23.231,10.701,25.045z",bug:"M28.589,10.903l-5.828,1.612c-0.534-1.419-1.338-2.649-2.311-3.628l3.082-5.44c0.271-0.48,0.104-1.092-0.38-1.365c-0.479-0.271-1.09-0.102-1.36,0.377l-2.924,5.162c-0.604-0.383-1.24-0.689-1.9-0.896c-0.416-1.437-1.652-2.411-3.058-2.562c-0.001-0.004-0.002-0.008-0.003-0.012c-0.061-0.242-0.093-0.46-0.098-0.65c-0.005-0.189,0.012-0.351,0.046-0.479c0.037-0.13,0.079-0.235,0.125-0.317c0.146-0.26,0.34-0.43,0.577-0.509c0.023,0.281,0.142,0.482,0.352,0.601c0.155,0.088,0.336,0.115,0.546,0.086c0.211-0.031,0.376-0.152,0.496-0.363c0.105-0.186,0.127-0.389,0.064-0.607c-0.064-0.219-0.203-0.388-0.414-0.507c-0.154-0.087-0.314-0.131-0.482-0.129c-0.167,0.001-0.327,0.034-0.481,0.097c-0.153,0.063-0.296,0.16-0.429,0.289c-0.132,0.129-0.241,0.271-0.33,0.426c-0.132,0.234-0.216,0.496-0.25,0.783c-0.033,0.286-0.037,0.565-0.009,0.84c0.017,0.16,0.061,0.301,0.094,0.449c-0.375-0.021-0.758,0.002-1.14,0.108c-0.482,0.133-0.913,0.36-1.28,0.653c-0.052-0.172-0.098-0.344-0.18-0.518c-0.116-0.249-0.263-0.486-0.438-0.716c-0.178-0.229-0.384-0.41-0.618-0.543C9.904,3.059,9.737,2.994,9.557,2.951c-0.18-0.043-0.352-0.052-0.516-0.027s-0.318,0.08-0.463,0.164C8.432,3.172,8.318,3.293,8.23,3.445C8.111,3.656,8.08,3.873,8.136,4.092c0.058,0.221,0.181,0.384,0.367,0.49c0.21,0.119,0.415,0.138,0.611,0.056C9.31,4.556,9.451,4.439,9.539,4.283c0.119-0.21,0.118-0.443-0.007-0.695c0.244-0.055,0.497-0.008,0.757,0.141c0.081,0.045,0.171,0.115,0.27,0.208c0.097,0.092,0.193,0.222,0.286,0.388c0.094,0.166,0.179,0.368,0.251,0.608c0.013,0.044,0.023,0.098,0.035,0.146c-0.911,0.828-1.357,2.088-1.098,3.357c-0.582,0.584-1.072,1.27-1.457,2.035l-5.16-2.926c-0.48-0.271-1.092-0.102-1.364,0.377C1.781,8.404,1.95,9.016,2.43,9.289l5.441,3.082c-0.331,1.34-0.387,2.807-0.117,4.297l-5.828,1.613c-0.534,0.147-0.846,0.699-0.698,1.231c0.147,0.53,0.697,0.843,1.231,0.694l5.879-1.627c0.503,1.057,1.363,2.28,2.371,3.443l-3.194,5.639c-0.272,0.481-0.104,1.092,0.378,1.363c0.239,0.137,0.512,0.162,0.758,0.094c0.248-0.068,0.469-0.229,0.604-0.471l2.895-5.109c2.7,2.594,5.684,4.123,5.778,1.053c1.598,2.56,3.451-0.338,4.502-3.976l5.203,2.947c0.24,0.138,0.514,0.162,0.762,0.094c0.246-0.067,0.467-0.229,0.603-0.471c0.272-0.479,0.104-1.091-0.377-1.362l-5.701-3.229c0.291-1.505,0.422-2.983,0.319-4.138l5.886-1.627c0.53-0.147,0.847-0.697,0.696-1.229C29.673,11.068,29.121,10.756,28.589,10.903z",link:"M16.45,18.085l-2.47,2.471c0.054,1.023-0.297,2.062-1.078,2.846c-1.465,1.459-3.837,1.459-5.302-0.002c-1.461-1.465-1.46-3.836-0.001-5.301c0.783-0.781,1.824-1.131,2.847-1.078l2.469-2.469c-2.463-1.057-5.425-0.586-7.438,1.426c-2.634,2.637-2.636,6.907,0,9.545c2.638,2.637,6.909,2.635,9.545,0l0.001,0.002C17.033,23.511,17.506,20.548,16.45,18.085zM14.552,12.915l2.467-2.469c-0.053-1.023,0.297-2.062,1.078-2.848C19.564,6.139,21.934,6.137,23.4,7.6c1.462,1.465,1.462,3.837,0,5.301c-0.783,0.783-1.822,1.132-2.846,1.079l-2.469,2.468c2.463,1.057,5.424,0.584,7.438-1.424c2.634-2.639,2.633-6.91,0-9.546c-2.639-2.636-6.91-2.637-9.545-0.001C13.967,7.489,13.495,10.451,14.552,12.915zM18.152,10.727l-7.424,7.426c-0.585,0.584-0.587,1.535,0,2.121c0.585,0.584,1.536,0.584,2.121-0.002l7.425-7.424c0.584-0.586,0.584-1.535,0-2.121C19.687,10.141,18.736,10.142,18.152,10.727z",calendar:"M22,4.582h-2v3.335h2V4.582zM25.416,5.748H23v3.17h-4v-3.17h-6v3.168H9.002V5.748H6.583v21.555h18.833V5.748zM24.418,26.303H7.584V13.988h16.833V26.303zM12,4.582h-2v3.335h2V4.582zM19.428,23.962h1.568v-7.788h-1.277c0,0.067-0.021,0.172-0.061,0.312c-0.066,0.232-0.168,0.419-0.299,0.559c-0.193,0.204-0.443,0.34-0.75,0.408c-0.193,0.043-0.531,0.075-1.014,0.097v1.042h1.832V23.962zM13.673,22.909c-0.489,0-0.827-0.188-1.013-0.564c-0.101-0.203-0.15-0.461-0.15-0.773h-1.504c0.025,0.62,0.15,1.121,0.376,1.504c0.429,0.721,1.194,1.08,2.296,1.08c0.895,0,1.569-0.25,2.026-0.749c0.455-0.5,0.684-1.079,0.684-1.737c0-0.627-0.195-1.121-0.586-1.482c-0.261-0.24-0.461-0.36-0.602-0.36c0.187-0.071,0.365-0.206,0.537-0.403c0.272-0.314,0.408-0.701,0.408-1.16c0-0.647-0.228-1.164-0.684-1.549c-0.456-0.386-1.056-0.578-1.8-0.578c-0.4,0-0.738,0.049-1.014,0.146c-0.276,0.097-0.514,0.236-0.714,0.419c-0.269,0.258-0.465,0.539-0.591,0.843c-0.117,0.348-0.184,0.715-0.198,1.102h1.429c-0.007-0.384,0.074-0.689,0.244-0.919c0.169-0.229,0.435-0.344,0.795-0.344c0.314,0,0.559,0.094,0.731,0.279c0.174,0.187,0.26,0.428,0.26,0.726c0,0.458-0.169,0.763-0.508,0.913c-0.196,0.09-0.543,0.138-1.039,0.145v1.096c0.507,0,0.878,0.049,1.114,0.146c0.414,0.172,0.621,0.514,0.621,1.026c0,0.387-0.112,0.683-0.335,0.889C14.234,22.807,13.973,22.909,13.673,22.909z",calendar2:"M22,4.582h-2v3.335h2V4.582zM12,4.582h-2v3.335h2V4.582zM25.416,5.748H23v3.17h-4v-3.17h-6v3.168H9.002V5.748H6.583v21.555h18.833V5.748zM11.033,26.303H7.584v-3.44h3.449V26.303zM11.033,21.862H7.584v-3.434h3.449V21.862zM11.033,17.429H7.584v-3.441h3.449V17.429zM15.501,26.303h-3.468v-3.44h3.468V26.303zM15.501,21.862h-3.468v-3.434h3.468V21.862zM15.501,17.429h-3.468v-3.441h3.468V17.429zM19.97,26.303h-3.469v-3.44h3.469V26.303zM19.97,21.862h-3.469v-3.434h3.469V21.862zM19.97,17.429h-3.469v-3.441h3.469V17.429zM24.418,26.303H20.97v-3.44h3.448V26.303zM24.418,21.862H20.97v-3.434h3.448V21.862zM24.418,17.429H20.97v-3.441h3.448V17.429z",picker:"M22.221,10.853c-0.111-0.414-0.261-0.412,0.221-1.539l1.66-3.519c0.021-0.051,0.2-0.412,0.192-0.946c0.015-0.529-0.313-1.289-1.119-1.642c-1.172-0.555-1.17-0.557-2.344-1.107c-0.784-0.396-1.581-0.171-1.979,0.179c-0.42,0.333-0.584,0.7-0.609,0.75L16.58,6.545c-0.564,1.084-0.655,0.97-1.048,1.147c-0.469,0.129-1.244,0.558-1.785,1.815c-1.108,2.346-1.108,2.346-1.108,2.346l-0.276,0.586l1.17,0.553l-3.599,7.623c-0.38,0.828-0.166,1.436-0.166,2.032c0.01,0.627-0.077,1.509-0.876,3.21l-0.276,0.586l3.517,1.661l0.276-0.585c0.808-1.699,1.431-2.326,1.922-2.717c0.46-0.381,1.066-0.6,1.465-1.42l3.599-7.618l1.172,0.554l0.279-0.589c0,0,0,0,1.105-2.345C22.578,12.166,22.419,11.301,22.221,10.853zM14.623,22.83c-0.156,0.353-0.413,0.439-1.091,0.955c-0.577,0.448-1.264,1.172-2.009,2.6l-1.191-0.562c0.628-1.48,0.75-2.474,0.73-3.203c-0.031-0.851-0.128-1.104,0.045-1.449l3.599-7.621l3.517,1.662L14.623,22.83z",no:"M16,3.667C9.189,3.667,3.667,9.188,3.667,16S9.189,28.333,16,28.333c6.812,0,12.333-5.521,12.333-12.333S22.812,3.667,16,3.667zM16,6.667c1.851,0,3.572,0.548,5.024,1.48L8.147,21.024c-0.933-1.452-1.48-3.174-1.48-5.024C6.667,10.854,10.854,6.667,16,6.667zM16,25.333c-1.85,0-3.572-0.548-5.024-1.48l12.876-12.877c0.933,1.452,1.48,3.174,1.48,5.024C25.333,21.146,21.146,25.333,16,25.333z",commandline:"M2.021,9.748L2.021,9.748V9.746V9.748zM2.022,9.746l5.771,5.773l-5.772,5.771l2.122,2.123l7.894-7.895L4.143,7.623L2.022,9.746zM12.248,23.269h14.419V20.27H12.248V23.269zM16.583,17.019h10.084V14.02H16.583V17.019zM12.248,7.769v3.001h14.419V7.769H12.248z",photo:"M24.25,10.25H20.5v-1.5h-9.375v1.5h-3.75c-1.104,0-2,0.896-2,2v10.375c0,1.104,0.896,2,2,2H24.25c1.104,0,2-0.896,2-2V12.25C26.25,11.146,25.354,10.25,24.25,10.25zM15.812,23.499c-3.342,0-6.06-2.719-6.06-6.061c0-3.342,2.718-6.062,6.06-6.062s6.062,2.72,6.062,6.062C21.874,20.78,19.153,23.499,15.812,23.499zM15.812,13.375c-2.244,0-4.062,1.819-4.062,4.062c0,2.244,1.819,4.062,4.062,4.062c2.244,0,4.062-1.818,4.062-4.062C19.875,15.194,18.057,13.375,15.812,13.375z",printer:"M24.569,12.125h-2.12c-0.207-1.34-1.247-2.759-2.444-3.967c-1.277-1.24-2.654-2.234-3.784-2.37c-0.062-0.008-0.124-0.014-0.198-0.015H8.594c-0.119,0-0.235,0.047-0.319,0.132c-0.083,0.083-0.132,0.2-0.132,0.32v5.9H6.069c-1.104,0-2,0.896-2,2V23h4.074v2.079c0,0.118,0.046,0.23,0.132,0.318c0.086,0.085,0.199,0.131,0.319,0.131h13.445c0.118,0,0.232-0.046,0.318-0.131s0.138-0.199,0.138-0.318V23h4.074v-8.875C26.569,13.021,25.674,12.125,24.569,12.125zM21.589,24.626H9.043V21.5h12.546V24.626zM21.589,13.921c0-0.03,0-0.063-0.003-0.096c-0.015-0.068-0.062-0.135-0.124-0.2H9.043v-6.95h6.987v0.001c0.305-0.019,0.567,0.282,0.769,0.971c0.183,0.655,0.229,1.509,0.229,2.102c0.001,0.433-0.019,0.725-0.019,0.725l-0.037,0.478l0.48,0.005c0.002,0,1.109,0.014,2.196,0.26c1.044,0.226,1.86,0.675,1.938,1.184c0.003,0.045,0.003,0.091,0.003,0.133V13.921z","export":"M24.086,20.904c-1.805,3.113-5.163,5.212-9.023,5.219c-5.766-0.01-10.427-4.672-10.438-10.435C4.636,9.922,9.297,5.261,15.063,5.25c3.859,0.007,7.216,2.105,9.022,5.218l3.962,2.284l0.143,0.082C26.879,6.784,21.504,2.25,15.063,2.248C7.64,2.25,1.625,8.265,1.624,15.688c0.002,7.42,6.017,13.435,13.439,13.437c6.442-0.002,11.819-4.538,13.127-10.589l-0.141,0.081L24.086,20.904zM28.4,15.688l-7.15-4.129v2.297H10.275v3.661H21.25v2.297L28.4,15.688z","import":"M15.067,2.25c-5.979,0-11.035,3.91-12.778,9.309h3.213c1.602-3.705,5.271-6.301,9.565-6.309c5.764,0.01,10.428,4.674,10.437,10.437c-0.009,5.764-4.673,10.428-10.437,10.438c-4.294-0.007-7.964-2.605-9.566-6.311H2.289c1.744,5.399,6.799,9.31,12.779,9.312c7.419-0.002,13.437-6.016,13.438-13.438C28.504,8.265,22.486,2.252,15.067,2.25zM10.918,19.813l7.15-4.126l-7.15-4.129v2.297H-0.057v3.661h10.975V19.813z",run:"M17.41,20.395l-0.778-2.723c0.228-0.2,0.442-0.414,0.644-0.643l2.721,0.778c0.287-0.418,0.534-0.862,0.755-1.323l-2.025-1.96c0.097-0.288,0.181-0.581,0.241-0.883l2.729-0.684c0.02-0.252,0.039-0.505,0.039-0.763s-0.02-0.51-0.039-0.762l-2.729-0.684c-0.061-0.302-0.145-0.595-0.241-0.883l2.026-1.96c-0.222-0.46-0.469-0.905-0.756-1.323l-2.721,0.777c-0.201-0.228-0.416-0.442-0.644-0.643l0.778-2.722c-0.418-0.286-0.863-0.534-1.324-0.755l-1.96,2.026c-0.287-0.097-0.581-0.18-0.883-0.241l-0.683-2.73c-0.253-0.019-0.505-0.039-0.763-0.039s-0.51,0.02-0.762,0.039l-0.684,2.73c-0.302,0.061-0.595,0.144-0.883,0.241l-1.96-2.026C7.048,3.463,6.604,3.71,6.186,3.997l0.778,2.722C6.736,6.919,6.521,7.134,6.321,7.361L3.599,6.583C3.312,7.001,3.065,7.446,2.844,7.907l2.026,1.96c-0.096,0.288-0.18,0.581-0.241,0.883l-2.73,0.684c-0.019,0.252-0.039,0.505-0.039,0.762s0.02,0.51,0.039,0.763l2.73,0.684c0.061,0.302,0.145,0.595,0.241,0.883l-2.026,1.96c0.221,0.46,0.468,0.905,0.755,1.323l2.722-0.778c0.2,0.229,0.415,0.442,0.643,0.643l-0.778,2.723c0.418,0.286,0.863,0.533,1.323,0.755l1.96-2.026c0.288,0.097,0.581,0.181,0.883,0.241l0.684,2.729c0.252,0.02,0.505,0.039,0.763,0.039s0.51-0.02,0.763-0.039l0.683-2.729c0.302-0.061,0.596-0.145,0.883-0.241l1.96,2.026C16.547,20.928,16.992,20.681,17.41,20.395zM11.798,15.594c-1.877,0-3.399-1.522-3.399-3.399s1.522-3.398,3.399-3.398s3.398,1.521,3.398,3.398S13.675,15.594,11.798,15.594zM27.29,22.699c0.019-0.547-0.06-1.104-0.23-1.654l1.244-1.773c-0.188-0.35-0.4-0.682-0.641-0.984l-2.122,0.445c-0.428-0.364-0.915-0.648-1.436-0.851l-0.611-2.079c-0.386-0.068-0.777-0.105-1.173-0.106l-0.974,1.936c-0.279,0.054-0.558,0.128-0.832,0.233c-0.257,0.098-0.497,0.22-0.727,0.353L17.782,17.4c-0.297,0.262-0.568,0.545-0.813,0.852l0.907,1.968c-0.259,0.495-0.437,1.028-0.519,1.585l-1.891,1.06c0.019,0.388,0.076,0.776,0.164,1.165l2.104,0.519c0.231,0.524,0.541,0.993,0.916,1.393l-0.352,2.138c0.32,0.23,0.66,0.428,1.013,0.6l1.715-1.32c0.536,0.141,1.097,0.195,1.662,0.15l1.452,1.607c0.2-0.057,0.399-0.118,0.596-0.193c0.175-0.066,0.34-0.144,0.505-0.223l0.037-2.165c0.455-0.339,0.843-0.747,1.152-1.206l2.161-0.134c0.152-0.359,0.279-0.732,0.368-1.115L27.29,22.699zM23.127,24.706c-1.201,0.458-2.545-0.144-3.004-1.345s0.143-2.546,1.344-3.005c1.201-0.458,2.547,0.144,3.006,1.345C24.931,22.902,24.328,24.247,23.127,24.706z",magnet:"M20.812,19.5h5.002v-6.867c-0.028-1.706-0.61-3.807-2.172-5.841c-1.539-2.014-4.315-3.72-7.939-3.687C12.076,3.073,9.3,4.779,7.762,6.792C6.2,8.826,5.617,10.928,5.588,12.634V19.5h5v-6.866c-0.027-0.377,0.303-1.789,1.099-2.748c0.819-0.979,1.848-1.747,4.014-1.778c2.165,0.032,3.195,0.799,4.013,1.778c0.798,0.959,1.126,2.372,1.099,2.748V19.5L20.812,19.5zM25.814,25.579c0,0,0-2.354,0-5.079h-5.002c0,2.727,0,5.08,0,5.08l5.004-0.001H25.814zM5.588,25.58h5c0,0,0-2.354,0-5.08h-5C5.588,23.227,5.588,25.58,5.588,25.58z",nomagnet:"M10.59,17.857v-5.225c-0.027-0.376,0.303-1.789,1.099-2.748c0.819-0.979,1.849-1.748,4.014-1.778c1.704,0.026,2.699,0.508,3.447,1.189l3.539-3.539c-1.616-1.526-4.01-2.679-6.986-2.652C12.077,3.073,9.3,4.779,7.762,6.793C6.2,8.826,5.617,10.928,5.59,12.634V19.5h3.357L10.59,17.857zM5.59,20.5v2.357L7.947,20.5H5.59zM20.812,13.29v6.21h5.002v-6.866c-0.021-1.064-0.252-2.283-0.803-3.542L20.812,13.29zM25.339,4.522L4.652,25.209l1.415,1.416L26.753,5.937L25.339,4.522zM20.812,25.58h5.002c0,0,0-2.354,0-5.08h-5.002C20.812,23.227,20.812,25.58,20.812,25.58zM10.59,25.58c0,0,0-0.827,0-2.064L8.525,25.58H10.59z",reflecth:"M15.57,20.273h0.854v-1.705H15.57V20.273zM15.57,23.686h0.854V21.98H15.57V23.686zM15.57,27.096h0.854v-1.705H15.57V27.096zM15.57,29.689h0.854V28.8H15.57V29.689zM15.57,16.865h0.854V15.16H15.57V16.865zM15.57,3.225h0.854V1.52H15.57V3.225zM15.57,6.635h0.854V4.93H15.57V6.635zM15.57,10.045h0.854V8.34H15.57V10.045zM15.57,13.455h0.854V11.75H15.57V13.455zM18.41,3.327V25.46h12.015L18.41,3.327zM19.264,6.68l9.729,17.93h-9.729V6.68zM13.535,25.46V3.327L1.521,25.46H13.535z",reflectv:"M20.643,16.008v-0.854h-1.705v0.854H20.643zM24.053,16.008v-0.854h-1.705v0.854H24.053zM27.463,16.008v-0.854h-1.705v0.854H27.463zM30.059,16.008v-0.854h-0.891v0.854H30.059zM17.232,16.008v-0.854h-1.709v0.854H17.232zM3.593,16.008v-0.854H1.888v0.854H3.593zM7.003,16.008v-0.854H5.298v0.854H7.003zM10.414,16.008v-0.854H8.709v0.854H10.414zM13.824,16.008v-0.854h-1.705v0.854H13.824zM3.694,13.167h22.134V1.152L3.694,13.167zM7.048,12.314l17.929-9.729v9.729H7.048zM25.828,18.042H3.694l22.134,12.015V18.042z",resize2:"M1.999,2.332v26.499H28.5V2.332H1.999zM26.499,26.832H4V12.5h8.167V4.332h14.332V26.832zM15.631,17.649l5.468,5.469l-1.208,1.206l5.482,1.469l-1.47-5.481l-1.195,1.195l-5.467-5.466l1.209-1.208l-5.482-1.469l1.468,5.48L15.631,17.649z",rotate:"M15.5,5.27c1.914,0,3.666,0.629,5.089,1.686l-1.781,1.783l8.428,2.256l-2.26-8.427l-1.889,1.89C21.016,2.781,18.371,1.77,15.5,1.77C8.827,1.773,3.418,7.181,3.417,13.855c0.001,4.063,2.012,7.647,5.084,9.838v-4.887c-0.993-1.4-1.583-3.105-1.585-4.952C6.923,9.114,10.759,5.278,15.5,5.27zM9.5,29.23h12V12.355h-12V29.23z",connect:"M25.06,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h4.69v-3.999H25.06zM20.375,15.719c0-3.435-2.784-6.219-6.219-6.219c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h6.834c0.833,2.452,3.15,4.219,5.884,4.219C17.591,21.938,20.375,19.153,20.375,15.719z",disconnect:"M9.219,9.5c-2.733,0-5.05,1.766-5.884,4.218H1.438v4.001h1.897c0.833,2.452,3.15,4.219,5.884,4.219c3.435,0,6.219-2.784,6.219-6.219S12.653,9.5,9.219,9.5zM27.685,13.719c-0.944-5.172-5.461-9.094-10.903-9.094v4c3.917,0.006,7.085,3.176,7.094,7.094c-0.009,3.917-3.177,7.085-7.094,7.093v4.002c5.442-0.004,9.959-3.926,10.903-9.096h2.065v-3.999H27.685z",folder:"M28.625,26.75h-26.5V8.375h1.124c1.751,0,0.748-3.125,3-3.125c3.215,0,1.912,0,5.126,0c2.251,0,1.251,3.125,3.001,3.125h14.25V26.75z",man:"M21.021,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.463,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.602,21.541,22.443,18.912,21.021,16.349zM15.808,13.757c2.362,0,4.278-1.916,4.278-4.279s-1.916-4.279-4.278-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757z",woman:"M21.022,16.349c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.104,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.579,5.192-0.351,5.874c0.55,0.307,1.127,0.078,1.723-0.496c-0.105,0.582-0.167,1.213-0.167,1.873c0,2.932,1.139,5.307,2.543,5.307c0.846,0,1.265-0.865,1.466-2.189c0.201,1.324,0.62,2.189,1.464,2.189c1.406,0,2.545-2.375,2.545-5.307c0-0.66-0.061-1.291-0.168-1.873c0.598,0.574,1.174,0.803,1.725,0.496C22.603,21.541,22.444,18.912,21.022,16.349zM15.808,13.757c2.363,0,4.279-1.916,4.279-4.279s-1.916-4.279-4.279-4.279c-2.363,0-4.28,1.916-4.28,4.279S13.445,13.757,15.808,13.757zM18.731,4.974c1.235,0.455,0.492-0.725,0.492-1.531s0.762-1.792-0.492-1.391c-1.316,0.422-2.383,0.654-2.383,1.461S17.415,4.489,18.731,4.974zM15.816,4.4c0.782,0,0.345-0.396,0.345-0.884c0-0.488,0.438-0.883-0.345-0.883s-0.374,0.396-0.374,0.883C15.442,4.005,15.034,4.4,15.816,4.4zM12.884,4.974c1.316-0.484,2.383-0.654,2.383-1.461S14.2,2.474,12.884,2.052c-1.254-0.402-0.492,0.584-0.492,1.391S11.648,5.428,12.884,4.974z",speaker:"M12.558,15.254c2.362,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S10.194,15.254,12.558,15.254zM15.662,15.224c-0.875,0.641-1.941,1.031-3.103,1.031c-1.164,0-2.231-0.391-3.105-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.55,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.201,1.311,0.62,2.188,1.462,2.188c1.396,0,2.544-2.375,2.544-5.312c0-0.66-0.062-1.291-0.167-1.873c0.598,0.574,1.174,0.812,1.725,0.496c1.228-0.682,1.069-3.311-0.353-5.874C17.159,16.742,16.412,15.849,15.662,15.224zM19.821,3.711l-1.414,1.414c1.499,1.499,2.428,3.569,2.428,5.851c0,2.283-0.929,4.353-2.428,5.853l1.413,1.412c1.861-1.86,3.015-4.43,3.015-7.265C22.835,8.142,21.683,5.572,19.821,3.711zM16.288,14.707l1.413,1.414c1.318-1.318,2.135-3.138,2.135-5.145c0-2.007-0.816-3.827-2.134-5.145l-1.414,1.414c0.956,0.956,1.547,2.275,1.547,3.731S17.243,13.751,16.288,14.707zM21.941,1.59l-1.413,1.414c2.042,2.042,3.307,4.862,3.307,7.971c0,3.11-1.265,5.93-3.308,7.972l1.413,1.414c2.405-2.404,3.895-5.725,3.895-9.386C25.835,7.315,24.346,3.995,21.941,1.59z",people:"M21.066,20.667c1.227-0.682,1.068-3.311-0.354-5.874c-0.611-1.104-1.359-1.998-2.109-2.623c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873C19.939,20.745,20.516,20.983,21.066,20.667zM15.5,12.201c2.361,0,4.277-1.916,4.277-4.279S17.861,3.644,15.5,3.644c-2.363,0-4.28,1.916-4.28,4.279S13.137,12.201,15.5,12.201zM24.094,14.914c1.938,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.513,1.573-3.513,3.513C20.581,13.341,22.153,14.914,24.094,14.914zM28.374,17.043c-0.502-0.907-1.116-1.641-1.732-2.154c-0.718,0.526-1.594,0.846-2.546,0.846c-0.756,0-1.459-0.207-2.076-0.55c0.496,1.093,0.803,2.2,0.861,3.19c0.093,1.516-0.381,2.641-1.329,3.165c-0.204,0.117-0.426,0.183-0.653,0.224c-0.056,0.392-0.095,0.801-0.095,1.231c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.163,1.079,0.508,1.796,1.199,1.796c1.146,0,2.09-1.95,2.09-4.361c0-0.542-0.052-1.06-0.139-1.538c0.492,0.472,0.966,0.667,1.418,0.407C29.671,21.305,29.541,19.146,28.374,17.043zM6.906,14.914c1.939,0,3.512-1.573,3.512-3.513c0-1.939-1.573-3.513-3.512-3.513c-1.94,0-3.514,1.573-3.514,3.513C3.392,13.341,4.966,14.914,6.906,14.914zM9.441,21.536c-1.593-0.885-1.739-3.524-0.457-6.354c-0.619,0.346-1.322,0.553-2.078,0.553c-0.956,0-1.832-0.321-2.549-0.846c-0.616,0.513-1.229,1.247-1.733,2.154c-1.167,2.104-1.295,4.262-0.287,4.821c0.451,0.257,0.925,0.064,1.414-0.407c-0.086,0.479-0.136,0.996-0.136,1.538c0,2.412,0.935,4.361,2.088,4.361c0.694,0,1.039-0.71,1.204-1.796c0.165,1.079,0.509,1.796,1.201,1.796c1.146,0,2.089-1.95,2.089-4.361c0-0.432-0.04-0.841-0.097-1.233C9.874,21.721,9.651,21.656,9.441,21.536z",parent:"M14.423,12.17c-0.875,0.641-1.941,1.031-3.102,1.031c-1.164,0-2.231-0.391-3.104-1.031c-0.75,0.625-1.498,1.519-2.111,2.623c-1.422,2.563-1.578,5.192-0.35,5.874c0.549,0.312,1.127,0.078,1.723-0.496c-0.105,0.582-0.166,1.213-0.166,1.873c0,2.938,1.139,5.312,2.543,5.312c0.846,0,1.265-0.865,1.466-2.188c0.2,1.314,0.62,2.188,1.461,2.188c1.396,0,2.545-2.375,2.545-5.312c0-0.66-0.062-1.291-0.168-1.873c0.6,0.574,1.176,0.812,1.726,0.496c1.227-0.682,1.068-3.311-0.354-5.874C15.921,13.689,15.173,12.795,14.423,12.17zM11.32,12.201c2.361,0,4.277-1.916,4.277-4.279s-1.916-4.279-4.277-4.279c-2.363,0-4.28,1.916-4.28,4.279S8.957,12.201,11.32,12.201zM21.987,17.671c1.508,0,2.732-1.225,2.732-2.735c0-1.51-1.225-2.735-2.732-2.735c-1.511,0-2.736,1.225-2.736,2.735C19.251,16.446,20.477,17.671,21.987,17.671zM25.318,19.327c-0.391-0.705-0.869-1.277-1.349-1.677c-0.56,0.41-1.24,0.659-1.982,0.659c-0.744,0-1.426-0.25-1.983-0.659c-0.479,0.399-0.958,0.972-1.35,1.677c-0.909,1.638-1.009,3.318-0.224,3.754c0.351,0.2,0.721,0.05,1.101-0.317c-0.067,0.372-0.105,0.775-0.105,1.197c0,1.878,0.728,3.396,1.625,3.396c0.54,0,0.808-0.553,0.937-1.398c0.128,0.841,0.396,1.398,0.934,1.398c0.893,0,1.627-1.518,1.627-3.396c0-0.422-0.04-0.825-0.107-1.197c0.383,0.367,0.752,0.52,1.104,0.317C26.328,22.646,26.227,20.965,25.318,19.327z",notebook:"M24.875,1.375H8c-1.033,0-1.874,0.787-1.979,1.792h1.604c1.102,0,2,0.898,2,2c0,1.102-0.898,2-2,2H6v0.999h1.625c1.104,0,2.002,0.898,2.002,2.002c0,1.104-0.898,2.001-2.002,2.001H6v0.997h1.625c1.102,0,2,0.898,2,2c0,1.104-0.898,2.004-2,2.004H6v0.994h1.625c1.102,0,2,0.898,2,2.002s-0.898,2.002-2,2.002H6v0.997h1.624c1.104,0,2.002,0.897,2.002,2.001c0,1.104-0.898,2.002-2.002,2.002H6.004C6.027,28.252,6.91,29.125,8,29.125h16.875c1.104,0,2-0.896,2-2V3.375C26.875,2.271,25.979,1.375,24.875,1.375zM25.25,8.375c0,0.552-0.447,1-1,1H14c-0.553,0-1-0.448-1-1V4c0-0.552,0.447-1,1-1h10.25c0.553,0,1,0.448,1,1V8.375zM8.625,25.166c0-0.554-0.449-1.001-1-1.001h-3.25c-0.552,0-1,0.447-1,1.001c0,0.552,0.449,1,1,1h3.25C8.176,26.166,8.625,25.718,8.625,25.166zM4.375,6.166h3.251c0.551,0,0.999-0.448,0.999-0.999c0-0.555-0.448-1-0.999-1H4.375c-0.553,0-1,0.445-1,1C3.374,5.718,3.822,6.166,4.375,6.166zM4.375,11.167h3.25c0.553,0,1-0.448,1-1s-0.448-1-1-1h-3.25c-0.553,0-1,0.448-1,1S3.822,11.167,4.375,11.167zM4.375,16.167h3.25c0.551,0,1-0.448,1-1.001s-0.448-0.999-1-0.999h-3.25c-0.553,0-1.001,0.446-1.001,0.999S3.822,16.167,4.375,16.167zM3.375,20.165c0,0.553,0.446,1.002,1,1.002h3.25c0.551,0,1-0.449,1-1.002c0-0.552-0.448-1-1-1h-3.25C3.821,19.165,3.375,19.613,3.375,20.165z",diagram:"M6.812,17.202l7.396-3.665v-2.164h-0.834c-0.414,0-0.808-0.084-1.167-0.237v1.159l-7.396,3.667v2.912h2V17.202zM26.561,18.875v-2.913l-7.396-3.666v-1.158c-0.358,0.152-0.753,0.236-1.166,0.236h-0.832l-0.001,2.164l7.396,3.666v1.672H26.561zM16.688,18.875v-7.501h-2v7.501H16.688zM27.875,19.875H23.25c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C29.875,20.771,28.979,19.875,27.875,19.875zM8.125,19.875H3.5c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2h4.625c1.104,0,2-0.896,2-2v-4.625C10.125,20.771,9.229,19.875,8.125,19.875zM13.375,10.375H18c1.104,0,2-0.896,2-2V3.75c0-1.104-0.896-2-2-2h-4.625c-1.104,0-2,0.896-2,2v4.625C11.375,9.479,12.271,10.375,13.375,10.375zM18,19.875h-4.625c-1.104,0-2,0.896-2,2V26.5c0,1.104,0.896,2,2,2H18c1.104,0,2-0.896,2-2v-4.625C20,20.771,19.104,19.875,18,19.875z",barchart:"M21.25,8.375V28h6.5V8.375H21.25zM12.25,28h6.5V4.125h-6.5V28zM3.25,28h6.5V12.625h-6.5V28z",piechart:"M15.583,15.917l1.648-10.779C16.692,5.056,16.145,5,15.583,5C9.554,5,4.666,9.888,4.666,15.917c0,6.029,4.888,10.917,10.917,10.917S26.5,21.946,26.5,15.917c0-0.256-0.021-0.507-0.038-0.759L15.583,15.917zM19.437,3.127l-1.648,10.779l10.879-0.759C28.313,8.026,24.436,3.886,19.437,3.127z",linechart:"M3.625,25.062c-0.539-0.115-0.885-0.646-0.77-1.187l0,0L6.51,6.584l2.267,9.259l1.923-5.188l3.581,3.741l3.883-13.103l2.934,11.734l1.96-1.509l5.271,11.74c0.226,0.504,0,1.095-0.505,1.321l0,0c-0.505,0.227-1.096,0-1.322-0.504l0,0l-4.23-9.428l-2.374,1.826l-1.896-7.596l-2.783,9.393l-3.754-3.924L8.386,22.66l-1.731-7.083l-1.843,8.711c-0.101,0.472-0.515,0.794-0.979,0.794l0,0C3.765,25.083,3.695,25.076,3.625,25.062L3.625,25.062z",apps:"M24.359,18.424l-2.326,1.215c0.708,1.174,1.384,2.281,1.844,3.033l2.043-1.066C25.538,20.822,24.966,19.652,24.359,18.424zM19.143,14.688c0.445,0.84,1.342,2.367,2.274,3.926l2.414-1.261c-0.872-1.769-1.72-3.458-2.087-4.122c-0.896-1.621-1.982-3.108-3.454-5.417c-1.673-2.625-3.462-5.492-4.052-4.947c-1.194,0.384,1.237,4.094,1.876,5.715C16.73,10.147,17.991,12.512,19.143,14.688zM26.457,22.673l-1.961,1.022l1.982,4.598c0,0,0.811,0.684,1.92,0.213c1.104-0.469,0.81-1.706,0.81-1.706L26.457,22.673zM24.35,15.711c0.168,0.339,2.924,5.93,2.924,5.93h1.983v-5.93H24.35zM18.34,15.704h-4.726l-3.424,5.935h11.66C21.559,21.159,18.771,16.479,18.34,15.704zM3.231,21.613l3.437-5.902H2.083v5.93h1.133L3.231,21.613zM15.048,10.145c0-0.93-0.754-1.685-1.685-1.685c-0.661,0-1.231,0.381-1.507,0.936l2.976,1.572C14.97,10.725,15.048,10.444,15.048,10.145zM14.343,12.06l-3.188-1.684L9.62,13.012l3.197,1.689L14.343,12.06zM3.192,26.886l-0.384,1.108v0.299l0.298-0.128l0.725-0.896l2.997-2.354l-3.137-1.651L3.192,26.886zM9.02,14.044l-4.757,8.17l3.23,1.706l4.728-8.186L9.02,14.044z",locked:"M26.711,14.085L16.914,4.29c-0.778-0.778-2.051-0.778-2.829,0L4.29,14.086c-0.778,0.778-0.778,2.05,0,2.829l9.796,9.796c0.778,0.777,2.051,0.777,2.829,0l9.797-9.797C27.488,16.136,27.488,14.863,26.711,14.085zM8.218,16.424c-0.4-0.153-0.687-0.533-0.687-0.987s0.287-0.834,0.687-0.987V16.424zM8.969,16.424v-1.974c0.4,0.152,0.687,0.533,0.687,0.987S9.369,16.272,8.969,16.424zM13.5,19.188l1.203-3.609c-0.689-0.306-1.172-0.994-1.172-1.797c0-1.087,0.881-1.969,1.969-1.969c1.087,0,1.969,0.881,1.969,1.969c0,0.803-0.482,1.491-1.172,1.797l1.203,3.609H13.5zM22.03,16.549c-0.399-0.152-0.687-0.533-0.687-0.986s0.287-0.834,0.687-0.987V16.549zM22.781,16.549v-1.973c0.4,0.152,0.688,0.533,0.688,0.987S23.182,16.397,22.781,16.549z",ppt:"M16.604,1.914c0-0.575-0.466-1.041-1.041-1.041s-1.041,0.466-1.041,1.041v1.04h2.082V1.914zM16.604,22.717h-2.082v3.207c0,0.574-4.225,4.031-4.225,4.031l2.468-0.003l2.807-2.673l3.013,2.693l2.272-0.039l-4.254-4.011V22.717L16.604,22.717zM28.566,7.113c0.86,0,1.56-0.698,1.56-1.56c0-0.861-0.698-1.56-1.56-1.56H2.561c-0.861,0-1.56,0.699-1.56,1.56c0,0.862,0.699,1.56,1.56,1.56h1.583v12.505l-0.932-0.022c-0.861,0-1.213,0.467-1.213,1.04c0,0.576,0.352,1.041,1.213,1.041h24.597c0.86,0,1.299-0.465,1.299-1.041c0-1.094-1.299-1.04-1.299-1.04l-0.804,0.109V7.113H28.566zM11.435,17.516c-3.771,0-4.194-4.191-4.194-4.191c0-4.096,4.162-4.161,4.162-4.161v4.161h4.193C15.596,17.516,11.435,17.516,11.435,17.516zM18.716,13.388h-1.071v-1.073h1.071V13.388zM18.716,10.267h-1.071V9.194h1.071V10.267zM23.314,13.388H20.26c-0.296,0-0.535-0.24-0.535-0.536c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,13.147,23.611,13.388,23.314,13.388zM23.314,10.267H20.26c-0.296,0-0.535-0.239-0.535-0.535c0-0.297,0.239-0.537,0.535-0.537h3.057c0.297,0,0.535,0.24,0.535,0.537C23.852,10.027,23.611,10.267,23.314,10.267z",lab:"M22.121,24.438l-3.362-7.847c-0.329-0.769-0.599-2.081-0.599-2.917s0.513-1.521,1.14-1.521s1.141-0.513,1.141-1.14s-0.685-1.14-1.521-1.14h-6.84c-0.836,0-1.52,0.513-1.52,1.14s0.513,1.14,1.14,1.14s1.14,0.685,1.14,1.521s-0.269,2.148-0.599,2.917l-3.362,7.847C8.55,25.206,8.28,26.177,8.28,26.595s0.342,1.103,0.76,1.521s1.444,0.76,2.28,0.76h8.359c0.836,0,1.862-0.342,2.28-0.76s0.76-1.103,0.76-1.521S22.45,25.206,22.121,24.438zM16.582,7.625c0,0.599,0.484,1.083,1.083,1.083s1.083-0.484,1.083-1.083s-0.484-1.084-1.083-1.084S16.582,7.026,16.582,7.625zM13.667,7.792c0.276,0,0.5-0.224,0.5-0.5s-0.224-0.5-0.5-0.5s-0.5,0.224-0.5,0.5S13.391,7.792,13.667,7.792zM15.584,5.292c0.874,0,1.583-0.709,1.583-1.583c0-0.875-0.709-1.584-1.583-1.584C14.709,2.125,14,2.834,14,3.709C14,4.583,14.709,5.292,15.584,5.292z",umbrella:"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125z",dry:"M14.784,26.991c0,1.238-1.329,1.696-1.835,1.696c-0.504,0-1.536-0.413-1.65-1.812c0-0.354-0.288-0.642-0.644-0.642c-0.354,0-0.641,0.287-0.641,0.642c0.045,1.056,0.756,3.052,2.935,3.052c2.432,0,3.166-1.882,3.166-3.144v-8.176l-1.328-0.024C14.787,18.584,14.784,25.889,14.784,26.991zM15.584,9.804c-6.807,0-11.084,4.859-11.587,8.326c0.636-0.913,1.694-1.51,2.89-1.51c1.197,0,2.22,0.582,2.855,1.495c0.638-0.904,1.69-1.495,2.88-1.495c1.2,0,2.26,0.6,2.896,1.517c0.635-0.917,1.83-1.517,3.03-1.517c1.19,0,2.241,0.591,2.879,1.495c0.636-0.913,1.659-1.495,2.855-1.495c1.197,0,2.254,0.597,2.89,1.51C26.669,14.663,22.393,9.804,15.584,9.804zM14.733,7.125v2.081h1.323V7.125c0-0.365-0.296-0.661-0.661-0.661C15.029,6.464,14.733,6.76,14.733,7.125zM7.562,6.015c0.54,0.312,1.229,0.128,1.54-0.412c0.109-0.189,0.157-0.398,0.15-0.602L9.251,3.09L7.59,4.047c-0.178,0.095-0.333,0.24-0.441,0.428C6.837,5.015,7.022,5.703,7.562,6.015zM5.572,11.717c0.109-0.19,0.158-0.398,0.151-0.602L5.721,9.203l-1.66,0.957c-0.178,0.096-0.333,0.241-0.441,0.429c-0.311,0.539-0.127,1.229,0.413,1.539C4.571,12.44,5.26,12.256,5.572,11.717zM10.523,9.355c0.539,0.312,1.229,0.126,1.541-0.412c0.109-0.189,0.156-0.398,0.15-0.603L12.214,6.43l-1.662,0.956c-0.177,0.097-0.332,0.241-0.441,0.43C9.799,8.354,9.984,9.044,10.523,9.355zM15.251,3.998c0.539,0.312,1.229,0.126,1.54-0.412c0.11-0.19,0.157-0.398,0.15-0.603L16.94,1.072l-1.661,0.956c-0.178,0.097-0.332,0.242-0.441,0.43C14.526,2.998,14.711,3.687,15.251,3.998zM19.348,8.914c0.539,0.312,1.228,0.128,1.541-0.412c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V5.988l-1.661,0.957c-0.178,0.096-0.332,0.241-0.441,0.429C18.623,7.914,18.809,8.603,19.348,8.914zM23.633,5.196c0.54,0.312,1.23,0.126,1.542-0.413c0.109-0.189,0.156-0.398,0.149-0.602h-0.001V2.27l-1.662,0.957c-0.177,0.096-0.331,0.24-0.44,0.43C22.909,4.195,23.094,4.885,23.633,5.196zM27.528,8.51l-1.659,0.956c-0.18,0.097-0.334,0.242-0.443,0.43c-0.312,0.539-0.127,1.229,0.413,1.54c0.539,0.312,1.229,0.127,1.541-0.412c0.109-0.19,0.158-0.398,0.151-0.603L27.528,8.51z",ipad:"M25.221,1.417H6.11c-0.865,0-1.566,0.702-1.566,1.566v25.313c0,0.865,0.701,1.565,1.566,1.565h19.111c0.865,0,1.565-0.7,1.565-1.565V2.984C26.787,2.119,26.087,1.417,25.221,1.417zM15.666,29.299c-0.346,0-0.626-0.279-0.626-0.625s0.281-0.627,0.626-0.627c0.346,0,0.627,0.281,0.627,0.627S16.012,29.299,15.666,29.299zM24.376,26.855c0,0.174-0.142,0.312-0.313,0.312H7.27c-0.173,0-0.313-0.142-0.313-0.312V4.3c0-0.173,0.14-0.313,0.313-0.313h16.792c0.172,0,0.312,0.14,0.312,0.313L24.376,26.855L24.376,26.855z",iphone:"M20.755,1H10.62C9.484,1,8.562,1.921,8.562,3.058v24.385c0,1.136,0.921,2.058,2.058,2.058h10.135c1.136,0,2.058-0.922,2.058-2.058V3.058C22.812,1.921,21.891,1,20.755,1zM14.659,3.264h2.057c0.101,0,0.183,0.081,0.183,0.18c0,0.1-0.082,0.18-0.183,0.18h-2.057c-0.1,0-0.181-0.081-0.181-0.18C14.478,3.344,14.559,3.264,14.659,3.264zM13.225,3.058c0.199,0,0.359,0.162,0.359,0.36c0,0.198-0.161,0.36-0.359,0.36c-0.2,0-0.36-0.161-0.36-0.36S13.025,3.058,13.225,3.058zM15.688,28.473c-0.796,0-1.44-0.646-1.44-1.438c0-0.799,0.645-1.439,1.44-1.439s1.44,0.646,1.44,1.439S16.483,28.473,15.688,28.473zM22.041,24.355c0,0.17-0.139,0.309-0.309,0.309H9.642c-0.17,0-0.308-0.139-0.308-0.309V6.042c0-0.17,0.138-0.309,0.308-0.309h12.09c0.17,0,0.309,0.138,0.309,0.309V24.355z", +jigsaw:"M3.739,13.619c0,0,3.516-4.669,5.592-3.642c2.077,1.027-0.414,2.795,1.598,3.719c2.011,0.924,5.048-0.229,4.376-2.899c-0.672-2.67-1.866-0.776-2.798-2.208c-0.934-1.432,4.586-4.59,4.586-4.59s3.361,6.651,4.316,4.911c1.157-2.105,3.193-4.265,5.305-1.025c0,0,1.814,2.412,0.246,3.434s-2.917,0.443-3.506,1.553c-0.586,1.112,3.784,4.093,3.784,4.093s-2.987,4.81-4.926,3.548c-1.939-1.262,0.356-3.364-2.599-3.989c-1.288-0.23-3.438,0.538-3.818,2.34c-0.13,2.709,1.604,2.016,2.797,3.475c1.191,1.457-4.484,4.522-4.484,4.522s-1.584-3.923-3.811-4.657c-2.227-0.735-0.893,2.135-2.917,2.531c-2.024,0.396-4.816-2.399-3.46-4.789c1.358-2.391,3.275-0.044,3.441-1.951C7.629,16.087,3.739,13.619,3.739,13.619z",lamp:"M15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h5.553c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM12.75,25.498h5.5v-5.164h-5.5V25.498z",lamp_alt:"M12.75,25.498h5.5v-5.164h-5.5V25.498zM15.5,28.166c1.894,0,2.483-1.027,2.667-1.666h-5.334C13.017,27.139,13.606,28.166,15.5,28.166zM15.5,2.833c-3.866,0-7,3.134-7,7c0,3.859,3.945,4.937,4.223,9.499h1.271c-0.009-0.025-0.024-0.049-0.029-0.078L11.965,8.256c-0.043-0.245,0.099-0.485,0.335-0.563c0.237-0.078,0.494,0.026,0.605,0.25l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.446-0.277c0.189,0,0.362,0.107,0.446,0.277l0.553,1.106l0.553-1.106c0.084-0.17,0.257-0.277,0.448-0.277c0.189,0,0.36,0.107,0.446,0.277l0.554,1.106l0.553-1.106c0.111-0.224,0.368-0.329,0.604-0.25s0.377,0.318,0.333,0.563l-1.999,10.998c-0.005,0.029-0.02,0.053-0.029,0.078h1.356c0.278-4.562,4.224-5.639,4.224-9.499C22.5,5.968,19.366,2.833,15.5,2.833zM17.458,10.666c-0.191,0-0.364-0.107-0.446-0.275l-0.554-1.106l-0.553,1.106c-0.086,0.168-0.257,0.275-0.446,0.275c-0.191,0-0.364-0.107-0.449-0.275l-0.553-1.106l-0.553,1.106c-0.084,0.168-0.257,0.275-0.446,0.275c-0.012,0-0.025,0-0.037-0.001l1.454,8.001h1.167l1.454-8.001C17.482,10.666,17.47,10.666,17.458,10.666z",video:"M27.188,4.875v1.094h-4.5V4.875H8.062v1.094h-4.5V4.875h-1v21.25h1v-1.094h4.5v1.094h14.625v-1.094h4.5v1.094h1.25V4.875H27.188zM8.062,23.719h-4.5v-3.125h4.5V23.719zM8.062,19.281h-4.5v-3.125h4.5V19.281zM8.062,14.844h-4.5v-3.125h4.5V14.844zM8.062,10.406h-4.5V7.281h4.5V10.406zM11.247,20.59V9.754l9.382,5.418L11.247,20.59zM27.188,23.719h-4.5v-3.125h4.5V23.719zM27.188,19.281h-4.5v-3.125h4.5V19.281zM27.188,14.844h-4.5v-3.125h4.5V14.844zM27.188,10.406h-4.5V7.281h4.5V10.406z",palm:"M14.296,27.885v-2.013c0,0-0.402-1.408-1.073-2.013c-0.671-0.604-1.274-1.274-1.409-1.61c0,0-0.268,0.135-0.737-0.335s-1.812-2.616-1.812-2.616l-0.671-0.872c0,0-0.47-0.671-1.275-1.342c-0.805-0.672-0.938-0.067-1.476-0.738s0.604-1.275,1.006-1.409c0.403-0.134,1.946,0.134,2.684,0.872c0.738,0.738,0.738,0.738,0.738,0.738l1.073,1.141l0.537,0.201l0.671-1.073l-0.269-2.281c0,0-0.604-2.55-0.737-4.764c-0.135-2.214-0.47-5.703,1.006-5.837s1.007,2.55,1.073,3.489c0.067,0.938,0.806,5.232,1.208,5.568c0.402,0.335,0.671,0.066,0.671,0.066l0.402-7.514c0,0-0.479-2.438,1.073-2.549c0.939-0.067,0.872,1.543,0.872,2.147c0,0.604,0.269,7.514,0.269,7.514l0.537,0.135c0,0,0.402-2.214,0.604-3.153s0.604-2.416,0.537-3.087c-0.067-0.671-0.135-2.348,1.006-2.348s0.872,1.812,0.939,2.415s-0.134,3.153-0.134,3.757c0,0.604-0.738,3.623-0.537,3.824s2.08-2.817,2.349-3.958c0.268-1.141,0.201-3.02,1.408-2.885c1.208,0.134,0.47,2.817,0.402,3.086c-0.066,0.269-0.671,2.349-0.872,2.952s-0.805,1.476-1.006,2.013s0.402,2.349,0,4.629c-0.402,2.281-1.61,5.166-1.61,5.166l0.604,2.08c0,0-1.744,0.671-3.824,0.805C16.443,28.221,14.296,27.885,14.296,27.885z",fave:"M24.132,7.971c-2.203-2.205-5.916-2.098-8.25,0.235L15.5,8.588l-0.382-0.382c-2.334-2.333-6.047-2.44-8.25-0.235c-2.204,2.203-2.098,5.916,0.235,8.249l8.396,8.396l8.396-8.396C26.229,13.887,26.336,10.174,24.132,7.971z",help:"M4.834,4.834L4.833,4.833c-5.889,5.892-5.89,15.443,0.001,21.334s15.44,5.888,21.33-0.002c5.891-5.891,5.893-15.44,0.002-21.33C20.275-1.056,10.725-1.056,4.834,4.834zM25.459,5.542c0.833,0.836,1.523,1.757,2.104,2.726l-4.08,4.08c-0.418-1.062-1.053-2.06-1.912-2.918c-0.859-0.859-1.857-1.494-2.92-1.913l4.08-4.08C23.7,4.018,24.622,4.709,25.459,5.542zM10.139,20.862c-2.958-2.968-2.959-7.758-0.001-10.725c2.966-2.957,7.756-2.957,10.725,0c2.954,2.965,2.955,7.757-0.001,10.724C17.896,23.819,13.104,23.817,10.139,20.862zM5.542,25.459c-0.833-0.837-1.524-1.759-2.105-2.728l4.081-4.081c0.418,1.063,1.055,2.06,1.914,2.919c0.858,0.859,1.855,1.494,2.917,1.913l-4.081,4.081C7.299,26.982,6.379,26.292,5.542,25.459zM8.268,3.435l4.082,4.082C11.288,7.935,10.29,8.571,9.43,9.43c-0.858,0.859-1.494,1.855-1.912,2.918L3.436,8.267c0.58-0.969,1.271-1.89,2.105-2.727C6.377,4.707,7.299,4.016,8.268,3.435zM22.732,27.563l-4.082-4.082c1.062-0.418,2.061-1.053,2.919-1.912c0.859-0.859,1.495-1.857,1.913-2.92l4.082,4.082c-0.58,0.969-1.271,1.891-2.105,2.728C24.623,26.292,23.701,26.983,22.732,27.563z",crop:"M24.303,21.707V8.275l4.48-4.421l-2.021-2.048l-4.126,4.07H8.761V2.083H5.882v3.793H1.8v2.877h4.083v15.832h15.542v4.609h2.878v-4.609H29.2v-2.878H24.303zM19.72,8.753L8.761,19.565V8.753H19.72zM10.688,21.706l10.735-10.591l0.001,10.592L10.688,21.706z",biohazard:"M26.154,13.988c-0.96-0.554-1.982-0.892-3.019-1.032c0.396-0.966,0.616-2.023,0.616-3.131c0-4.399-3.438-8.001-7.772-8.264c3.245,0.258,5.803,2.979,5.803,6.292c0,3.373-2.653,6.123-5.983,6.294v1.292c0.908,0.144,1.605,0.934,1.605,1.883c0,0.232-0.043,0.454-0.118,0.66l1.181,0.683c1.826-2.758,5.509-3.658,8.41-1.981c2.896,1.672,3.965,5.299,2.506,8.254C31.386,21.038,29.992,16.204,26.154,13.988zM4.122,16.587c2.92-1.686,6.628-0.764,8.442,2.034l1.141-0.657c-0.072-0.2-0.109-0.417-0.109-0.642c0-0.909,0.638-1.67,1.489-1.859v-1.319c-3.3-0.202-5.92-2.94-5.92-6.292c0-3.297,2.532-6.007,5.757-6.286c-4.312,0.285-7.729,3.875-7.729,8.258c0,1.078,0.206,2.106,0.581,3.05c-1.004,0.147-1.999,0.481-2.931,1.02c-3.812,2.201-5.209,6.985-3.264,10.87C0.174,21.823,1.251,18.244,4.122,16.587zM11.15,11.452c0.114,0.139,0.235,0.271,0.362,0.398c0.126,0.126,0.259,0.247,0.397,0.361c0.102,0.084,0.211,0.16,0.318,0.236c0.93-0.611,2.045-0.969,3.244-0.969c1.201,0,2.312,0.357,3.242,0.969c0.107-0.077,0.217-0.152,0.318-0.236c0.139-0.114,0.271-0.235,0.397-0.361c0.127-0.127,0.248-0.259,0.362-0.398c0.113-0.138,0.222-0.283,0.323-0.431c-1.307-0.956-2.908-1.528-4.643-1.528c-0.042,0-0.083-0.001-0.124,0c-0.019,0-0.04-0.001-0.06,0c-1.666,0.038-3.201,0.605-4.462,1.528C10.929,11.17,11.037,11.314,11.15,11.452zM9.269,16.787c-0.168-0.062-0.338-0.117-0.512-0.164c-0.173-0.047-0.348-0.083-0.525-0.113c-0.177-0.03-0.355-0.053-0.535-0.065c-0.175,1.609,0.13,3.282,0.998,4.786c0.868,1.503,2.164,2.606,3.645,3.259c0.079-0.162,0.15-0.328,0.212-0.496c0.063-0.169,0.118-0.338,0.164-0.512c0.047-0.173,0.087-0.349,0.115-0.525c0.022-0.13,0.034-0.262,0.046-0.394c-0.993-0.5-1.86-1.286-2.461-2.325c-0.6-1.04-0.847-2.182-0.783-3.294C9.512,16.889,9.392,16.833,9.269,16.787zM18.122,22.657c0.014,0.132,0.024,0.263,0.046,0.394c0.03,0.177,0.067,0.352,0.113,0.524c0.047,0.174,0.102,0.346,0.165,0.514c0.062,0.169,0.132,0.333,0.212,0.495c1.48-0.653,2.777-1.755,3.644-3.257c0.868-1.504,1.176-3.179,1.001-4.788c-0.18,0.013-0.358,0.035-0.535,0.065c-0.177,0.029-0.353,0.067-0.525,0.113s-0.345,0.101-0.513,0.163c-0.124,0.047-0.241,0.105-0.362,0.16c0.063,1.11-0.183,2.253-0.784,3.292C19.984,21.373,19.116,22.157,18.122,22.657zM20.569,27.611c-2.92-1.687-3.977-5.358-2.46-8.329l-1.192-0.689c-0.349,0.389-0.854,0.634-1.417,0.634c-0.571,0-1.086-0.254-1.436-0.653l-1.146,0.666c1.475,2.96,0.414,6.598-2.488,8.272c-2.888,1.668-6.552,0.791-8.386-1.935c2.38,3.667,7.249,4.87,11.079,2.658c0.929-0.535,1.711-1.227,2.339-2.018c0.64,0.832,1.45,1.554,2.416,2.112c3.835,2.213,8.709,1.006,11.086-2.671C27.132,28.396,23.463,29.282,20.569,27.611z",wheelchair:"M20.373,19.85c0,4.079-3.318,7.397-7.398,7.397c-4.079,0-7.398-3.318-7.398-7.397c0-2.466,1.213-4.652,3.073-5.997l-0.251-2.21c-2.875,1.609-4.825,4.684-4.825,8.207c0,5.184,4.217,9.4,9.401,9.4c4.395,0,8.093-3.031,9.117-7.111L20.37,19.73C20.37,19.771,20.373,19.81,20.373,19.85zM11.768,6.534c1.321,0,2.392-1.071,2.392-2.392c0-1.321-1.071-2.392-2.392-2.392c-1.321,0-2.392,1.071-2.392,2.392C9.375,5.463,10.446,6.534,11.768,6.534zM27.188,22.677l-5.367-7.505c-0.28-0.393-0.749-0.579-1.226-0.538c-0.035-0.003-0.071-0.006-0.106-0.006h-6.132l-0.152-1.335h4.557c0.53,0,0.96-0.429,0.96-0.959c0-0.53-0.43-0.959-0.96-0.959h-4.776l-0.25-2.192c-0.146-1.282-1.303-2.203-2.585-2.057C9.869,7.271,8.948,8.428,9.094,9.71l0.705,6.19c0.136,1.197,1.154,2.078,2.332,2.071c0.004,0,0.007,0.001,0.012,0.001h8.023l4.603,6.436c0.439,0.615,1.338,0.727,2.007,0.248C27.442,24.178,27.628,23.292,27.188,22.677z",mic:"M15.5,21.125c2.682,0,4.875-2.25,4.875-5V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25C10.625,18.875,12.818,21.125,15.5,21.125zM21.376,11v5.125c0,3.308-2.636,6-5.876,6s-5.875-2.691-5.875-6V11H6.626v5.125c0,4.443,3.194,8.132,7.372,8.861v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11H21.376z",micmute:"M10.121,18.529c-0.317-0.736-0.496-1.549-0.496-2.404V11H6.626v5.125c0,1.693,0.466,3.275,1.272,4.627L10.121,18.529zM20.375,8.276V5.875c0-2.75-2.193-5-4.875-5s-4.875,2.25-4.875,5v10.25c0,0.568,0.113,1.105,0.285,1.615L20.375,8.276zM21.376,12.931v3.195c0,3.308-2.636,6-5.876,6c-0.958,0-1.861-0.24-2.661-0.657l-2.179,2.179c0.995,0.659,2.123,1.128,3.338,1.34v2.139h-3.372v3h9.749v-3h-3.376v-2.139c4.181-0.727,7.375-4.418,7.375-8.861V11h-1.068L21.376,12.931zM20.375,16.125v-2.194l-6.788,6.788c0.588,0.26,1.234,0.405,1.913,0.405C18.182,21.125,20.375,18.875,20.375,16.125zM25.542,4.522L4.855,25.209l1.415,1.416L26.956,5.937L25.542,4.522z",imac:"M28.936,2.099H2.046c-0.506,0-0.919,0.414-0.919,0.92v21.097c0,0.506,0.413,0.919,0.919,0.919h17.062v-0.003h9.828c0.506,0,0.92-0.413,0.92-0.921V3.019C29.854,2.513,29.439,2.099,28.936,2.099zM28.562,20.062c0,0.412-0.338,0.75-0.75,0.75H3.062c-0.413,0-0.75-0.338-0.75-0.75v-16c0-0.413,0.337-0.75,0.75-0.75h24.75c0.412,0,0.75,0.337,0.75,0.75V20.062zM20.518,28.4c-0.033-0.035-0.062-0.055-0.068-0.062l-0.01-0.004l-0.008-0.004c0,0-0.046-0.021-0.119-0.062c-0.108-0.056-0.283-0.144-0.445-0.237c-0.162-0.097-0.32-0.199-0.393-0.271c-0.008-0.014-0.035-0.079-0.058-0.17c-0.083-0.32-0.161-0.95-0.22-1.539h-7.5c-0.023,0.23-0.048,0.467-0.076,0.691c-0.035,0.272-0.073,0.524-0.113,0.716c-0.02,0.096-0.039,0.175-0.059,0.23c-0.009,0.025-0.018,0.05-0.024,0.062c-0.003,0.006-0.005,0.01-0.007,0.013c-0.094,0.096-0.34,0.246-0.553,0.36c-0.107,0.062-0.209,0.11-0.283,0.146c-0.074,0.037-0.119,0.062-0.119,0.062l-0.007,0.004l-0.008,0.004c-0.01,0.009-0.038,0.022-0.07,0.062c-0.031,0.037-0.067,0.103-0.067,0.185c0.002,0.002-0.004,0.037-0.006,0.088c0,0.043,0.007,0.118,0.068,0.185c0.061,0.062,0.143,0.08,0.217,0.08h9.716c0.073,0,0.153-0.021,0.215-0.08c0.062-0.063,0.068-0.142,0.068-0.185c-0.001-0.051-0.008-0.086-0.007-0.088C20.583,28.503,20.548,28.439,20.518,28.4z",pc:"M29.249,3.14h-9.188l-0.459,0.459v18.225l0.33,2.389H19.57v0.245h-0.307v-0.306h-0.611v0.244h-0.311v-0.367h-0.486v0.307h-1.104l-2.022-0.367v-0.92h0.858l0.302-1.47h2.728c0.188,0,0.339-0.152,0.339-0.339V7.828c0-0.187-0.149-0.338-0.339-0.338H1.591c-0.187,0-0.339,0.152-0.339,0.338V21.24c0,0.187,0.152,0.339,0.339,0.339h3.016l0.199,1.47h1.409l-3.4,3.4L2.11,27.951c0,0,2.941,1.102,6.678,1.102c3.737,0,9.679-0.857,10.476-0.857s4.84,0,4.84,0v-1.225l-0.137-1.068h1.744c-0.2,0.106-0.322,0.244-0.322,0.396v0.979c0,0.341,0.604,0.613,1.352,0.613c0.742,0,1.348-0.272,1.348-0.613v-0.979c0-0.339-0.604-0.611-1.348-0.611c-0.188,0-0.364,0.019-0.525,0.049v-0.17h-2.29l-0.055-0.432h5.382L29.249,3.14L29.249,3.14zM2.478,20.17V8.714h15.07V20.17H2.478z",cube:"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z",fullcube:"M15.5,3.029l-10.8,6.235L4.7,21.735L15.5,27.971l10.8-6.235V9.265L15.5,3.029zM15.5,7.029l6.327,3.652L15.5,14.334l-6.326-3.652L15.5,7.029zM24.988,10.599L16,15.789v10.378c0,0.275-0.225,0.5-0.5,0.5s-0.5-0.225-0.5-0.5V15.786l-8.987-5.188c-0.239-0.138-0.321-0.444-0.183-0.683c0.138-0.238,0.444-0.321,0.683-0.183l8.988,5.189l8.988-5.189c0.238-0.138,0.545-0.055,0.684,0.184C25.309,10.155,25.227,10.461,24.988,10.599z",font:"M22.255,19.327l-1.017,0.131c-0.609,0.081-1.067,0.208-1.375,0.382c-0.521,0.293-0.779,0.76-0.779,1.398c0,0.484,0.178,0.867,0.532,1.146c0.354,0.28,0.774,0.421,1.262,0.421c0.593,0,1.164-0.138,1.72-0.412c0.938-0.453,1.4-1.188,1.4-2.229v-1.354c-0.205,0.131-0.469,0.229-0.792,0.328C22.883,19.229,22.564,19.29,22.255,19.327zM8.036,18.273h4.309l-2.113-6.063L8.036,18.273zM28.167,7.75H3.168c-0.552,0-1,0.448-1,1v16.583c0,0.553,0.448,1,1,1h24.999c0.554,0,1-0.447,1-1V8.75C29.167,8.198,28.721,7.75,28.167,7.75zM14.305,23.896l-1.433-4.109H7.488L6,23.896H4.094L9.262,10.17h2.099l4.981,13.727H14.305L14.305,23.896zM26.792,23.943c-0.263,0.074-0.461,0.121-0.599,0.141c-0.137,0.02-0.323,0.027-0.562,0.027c-0.579,0-0.999-0.204-1.261-0.615c-0.138-0.219-0.231-0.525-0.29-0.926c-0.344,0.449-0.834,0.839-1.477,1.169c-0.646,0.329-1.354,0.493-2.121,0.493c-0.928,0-1.688-0.28-2.273-0.844c-0.589-0.562-0.884-1.271-0.884-2.113c0-0.928,0.29-1.646,0.868-2.155c0.578-0.511,1.34-0.824,2.279-0.942l2.682-0.336c0.388-0.05,0.646-0.211,0.775-0.484c0.063-0.146,0.104-0.354,0.104-0.646c0-0.575-0.203-0.993-0.604-1.252c-0.408-0.26-0.99-0.389-1.748-0.389c-0.877,0-1.5,0.238-1.865,0.713c-0.205,0.263-0.34,0.654-0.399,1.174H17.85c0.031-1.237,0.438-2.097,1.199-2.582c0.77-0.484,1.659-0.726,2.674-0.726c1.176,0,2.131,0.225,2.864,0.673c0.729,0.448,1.093,1.146,1.093,2.093v5.766c0,0.176,0.035,0.313,0.106,0.422c0.071,0.104,0.223,0.156,0.452,0.156c0.076,0,0.16-0.005,0.254-0.015c0.093-0.011,0.191-0.021,0.299-0.041L26.792,23.943L26.792,23.943z",trash:"M20.826,5.75l0.396,1.188c1.54,0.575,2.589,1.44,2.589,2.626c0,2.405-4.308,3.498-8.312,3.498c-4.003,0-8.311-1.093-8.311-3.498c0-1.272,1.21-2.174,2.938-2.746l0.388-1.165c-2.443,0.648-4.327,1.876-4.327,3.91v2.264c0,1.224,0.685,2.155,1.759,2.845l0.396,9.265c0,1.381,3.274,2.5,7.312,2.5c4.038,0,7.313-1.119,7.313-2.5l0.405-9.493c0.885-0.664,1.438-1.521,1.438-2.617V9.562C24.812,7.625,23.101,6.42,20.826,5.75zM11.093,24.127c-0.476-0.286-1.022-0.846-1.166-1.237c-1.007-2.76-0.73-4.921-0.529-7.509c0.747,0.28,1.58,0.491,2.45,0.642c-0.216,2.658-0.43,4.923,0.003,7.828C11.916,24.278,11.567,24.411,11.093,24.127zM17.219,24.329c-0.019,0.445-0.691,0.856-1.517,0.856c-0.828,0-1.498-0.413-1.517-0.858c-0.126-2.996-0.032-5.322,0.068-8.039c0.418,0.022,0.835,0.037,1.246,0.037c0.543,0,1.097-0.02,1.651-0.059C17.251,18.994,17.346,21.325,17.219,24.329zM21.476,22.892c-0.143,0.392-0.69,0.95-1.165,1.235c-0.474,0.284-0.817,0.151-0.754-0.276c0.437-2.93,0.214-5.209-0.005-7.897c0.881-0.174,1.708-0.417,2.44-0.731C22.194,17.883,22.503,20.076,21.476,22.892zM11.338,9.512c0.525,0.173,1.092-0.109,1.268-0.633h-0.002l0.771-2.316h4.56l0.771,2.316c0.14,0.419,0.53,0.685,0.949,0.685c0.104,0,0.211-0.017,0.316-0.052c0.524-0.175,0.808-0.742,0.633-1.265l-1.002-3.001c-0.136-0.407-0.518-0.683-0.945-0.683h-6.002c-0.428,0-0.812,0.275-0.948,0.683l-1,2.999C10.532,8.77,10.815,9.337,11.338,9.512z",newwindow:"M5.896,5.333V21.25h23.417V5.333H5.896zM26.312,18.25H8.896V8.334h17.417V18.25L26.312,18.25zM4.896,9.542H1.687v15.917h23.417V22.25H4.896V9.542z",dockright:"M3.083,7.333v16.334h24.833V7.333H3.083z M19.333,20.668H6.083V10.332h13.25V20.668z",dockleft:"M3.084,7.333v16.334h24.832V7.333H3.084z M11.667,10.332h13.251v10.336H11.667V10.332z",dockbottom:"M3.083,7.333v16.334h24.833V7.333H3.083zM24.915,16.833H6.083v-6.501h18.833L24.915,16.833L24.915,16.833z",docktop:"M27.916,23.667V7.333H3.083v16.334H27.916zM24.915,20.668H6.083v-6.501h18.833L24.915,20.668L24.915,20.668z",pallete:"M15.653,7.25c-3.417,0-8.577,0.983-8.577,3.282c0,1.91,2.704,3.229,1.691,3.889c-1.02,0.666-2.684-1.848-4.048-1.848c-1.653,0-2.815,1.434-2.815,2.926c0,4.558,6.326,8.25,13.749,8.25c7.424,0,13.443-3.692,13.443-8.25C29.096,10.944,23.077,7.25,15.653,7.25zM10.308,13.521c0-0.645,0.887-1.166,1.98-1.166c1.093,0,1.979,0.521,1.979,1.166c0,0.644-0.886,1.166-1.979,1.166C11.195,14.687,10.308,14.164,10.308,13.521zM14.289,22.299c-1.058,0-1.914-0.68-1.914-1.518s0.856-1.518,1.914-1.518c1.057,0,1.914,0.68,1.914,1.518S15.346,22.299,14.289,22.299zM19.611,21.771c-1.057,0-1.913-0.681-1.913-1.519c0-0.84,0.856-1.521,1.913-1.521c1.059,0,1.914,0.681,1.914,1.521C21.525,21.092,20.67,21.771,19.611,21.771zM20.075,10.66c0-0.838,0.856-1.518,1.914-1.518s1.913,0.68,1.913,1.518c0,0.839-0.855,1.518-1.913,1.518C20.934,12.178,20.075,11.499,20.075,10.66zM24.275,19.482c-1.057,0-1.914-0.681-1.914-1.519s0.857-1.518,1.914-1.518c1.059,0,1.914,0.68,1.914,1.518S25.334,19.482,24.275,19.482zM25.286,15.475c-1.058,0-1.914-0.68-1.914-1.519c0-0.838,0.856-1.518,1.914-1.518c1.057,0,1.913,0.68,1.913,1.518C27.199,14.795,26.343,15.475,25.286,15.475z",cart:"M29.02,11.754L8.416,9.473L7.16,4.716C7.071,4.389,6.772,4.158,6.433,4.158H3.341C3.114,3.866,2.775,3.667,2.377,3.667c-0.686,0-1.242,0.556-1.242,1.242c0,0.686,0.556,1.242,1.242,1.242c0.399,0,0.738-0.201,0.965-0.493h2.512l5.23,19.8c-0.548,0.589-0.891,1.373-0.891,2.242c0,1.821,1.473,3.293,3.293,3.293c1.82,0,3.294-1.472,3.297-3.293c0-0.257-0.036-0.504-0.093-0.743h5.533c-0.056,0.239-0.092,0.486-0.092,0.743c0,1.821,1.475,3.293,3.295,3.293s3.295-1.472,3.295-3.293c0-1.82-1.473-3.295-3.295-3.297c-0.951,0.001-1.801,0.409-2.402,1.053h-7.136c-0.601-0.644-1.451-1.052-2.402-1.053c-0.379,0-0.738,0.078-1.077,0.196l-0.181-0.685H26.81c1.157-0.027,2.138-0.83,2.391-1.959l1.574-7.799c0.028-0.145,0.041-0.282,0.039-0.414C30.823,12.733,30.051,11.86,29.02,11.754zM25.428,27.994c-0.163,0-0.295-0.132-0.297-0.295c0.002-0.165,0.134-0.297,0.297-0.297s0.295,0.132,0.297,0.297C25.723,27.862,25.591,27.994,25.428,27.994zM27.208,20.499l0.948-0.948l-0.318,1.578L27.208,20.499zM12.755,11.463l1.036,1.036l-1.292,1.292l-1.292-1.292l1.087-1.087L12.755,11.463zM17.253,11.961l0.538,0.538l-1.292,1.292l-1.292-1.292l0.688-0.688L17.253,11.961zM9.631,14.075l0.868-0.868l1.292,1.292l-1.292,1.292l-0.564-0.564L9.631,14.075zM9.335,12.956l-0.328-1.24L9.792,12.5L9.335,12.956zM21.791,16.499l-1.292,1.292l-1.292-1.292l1.292-1.292L21.791,16.499zM21.207,14.5l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,14.5zM18.5,15.791l-1.293-1.292l1.292-1.292l1.292,1.292L18.5,15.791zM17.791,16.499L16.5,17.791l-1.292-1.292l1.292-1.292L17.791,16.499zM14.499,15.791l-1.292-1.292l1.292-1.292l1.292,1.292L14.499,15.791zM13.791,16.499l-1.292,1.291l-1.292-1.291l1.292-1.292L13.791,16.499zM10.499,17.207l1.292,1.292l-0.785,0.784l-0.54-2.044L10.499,17.207zM11.302,20.404l1.197-1.197l1.292,1.292L12.5,21.791l-1.131-1.13L11.302,20.404zM13.208,18.499l1.291-1.292l1.292,1.292L14.5,19.791L13.208,18.499zM16.5,19.207l1.292,1.292L16.5,21.79l-1.292-1.291L16.5,19.207zM17.208,18.499l1.292-1.292l1.291,1.292L18.5,19.79L17.208,18.499zM20.499,19.207l1.292,1.292L20.5,21.79l-1.292-1.292L20.499,19.207zM21.207,18.499l1.292-1.292l1.292,1.292l-1.292,1.292L21.207,18.499zM23.207,16.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,16.499zM25.207,14.499l1.292-1.292L27.79,14.5l-1.291,1.292L25.207,14.499zM24.499,13.792l-1.156-1.156l2.082,0.23L24.499,13.792zM21.791,12.5l-1.292,1.292L19.207,12.5l0.29-0.29l2.253,0.25L21.791,12.5zM14.5,11.791l-0.152-0.152l0.273,0.03L14.5,11.791zM10.5,11.792l-0.65-0.65l1.171,0.129L10.5,11.792zM14.5,21.207l1.205,1.205h-2.409L14.5,21.207zM18.499,21.207l1.206,1.206h-2.412L18.499,21.207zM22.499,21.207l1.208,1.207l-2.414-0.001L22.499,21.207zM23.207,20.499l1.292-1.292l1.292,1.292l-1.292,1.292L23.207,20.499zM25.207,18.499l1.292-1.291l1.291,1.291l-1.291,1.292L25.207,18.499zM28.499,17.791l-1.291-1.292l1.291-1.291l0.444,0.444l-0.429,2.124L28.499,17.791zM29.001,13.289l-0.502,0.502l-0.658-0.658l1.016,0.112C28.911,13.253,28.956,13.271,29.001,13.289zM13.487,27.994c-0.161,0-0.295-0.132-0.295-0.295c0-0.165,0.134-0.297,0.295-0.297c0.163,0,0.296,0.132,0.296,0.297C13.783,27.862,13.651,27.994,13.487,27.994zM26.81,22.414h-1.517l1.207-1.207l0.93,0.93C27.243,22.306,27.007,22.428,26.81,22.414z",glasses:"M14.075,9.531c0,0-2.705-1.438-5.158-1.438c-2.453,0-4.862,0.593-4.862,0.593L3.971,9.869c0,0,0.19,0.19,0.528,0.53c0.338,0.336,0.486,3.741,1.838,5.094c1.353,1.354,4.82,1.396,5.963,0.676c1.14-0.718,2.241-3.466,2.241-4.693c0-0.38,0-0.676,0-0.676c0.274-0.275,1.615-0.303,1.917,0c0,0,0,0.296,0,0.676c0,1.227,1.101,3.975,2.241,4.693c1.144,0.72,4.611,0.678,5.963-0.676c1.355-1.353,1.501-4.757,1.839-5.094c0.338-0.34,0.528-0.53,0.528-0.53l-0.084-1.183c0,0-2.408-0.593-4.862-0.593c-2.453,0-5.158,1.438-5.158,1.438C16.319,9.292,14.737,9.32,14.075,9.531z","package":"M17.078,22.004l-1.758-4.129l-2.007,4.752l-7.519-3.289l0.174,3.905l9.437,4.374l10.909-5.365l-0.149-4.989L17.078,22.004zM29.454,6.619L18.521,3.383l-3.006,2.671l-3.091-2.359L1.546,8.199l3.795,3.048l-3.433,5.302l10.879,4.757l2.53-5.998l2.257,5.308l11.393-5.942l-3.105-4.709L29.454,6.619zM15.277,14.579l-9.059-3.83l9.275-4.101l9.608,3.255L15.277,14.579z",book:"M25.754,4.626c-0.233-0.161-0.536-0.198-0.802-0.097L12.16,9.409c-0.557,0.213-1.253,0.316-1.968,0.316c-0.997,0.002-2.029-0.202-2.747-0.48C7.188,9.148,6.972,9.04,6.821,8.943c0.056-0.024,0.12-0.05,0.193-0.075L18.648,4.43l1.733,0.654V3.172c0-0.284-0.14-0.554-0.374-0.714c-0.233-0.161-0.538-0.198-0.802-0.097L6.414,7.241c-0.395,0.142-0.732,0.312-1.02,0.564C5.111,8.049,4.868,8.45,4.872,8.896c0,0.012,0.004,0.031,0.004,0.031v17.186c0,0.008-0.003,0.015-0.003,0.021c0,0.006,0.003,0.01,0.003,0.016v0.017h0.002c0.028,0.601,0.371,0.983,0.699,1.255c1.034,0.803,2.769,1.252,4.614,1.274c0.874,0,1.761-0.116,2.583-0.427l12.796-4.881c0.337-0.128,0.558-0.448,0.558-0.809V5.341C26.128,5.057,25.988,4.787,25.754,4.626zM5.672,11.736c0.035,0.086,0.064,0.176,0.069,0.273l0.004,0.054c0.016,0.264,0.13,0.406,0.363,0.611c0.783,0.626,2.382,1.08,4.083,1.093c0.669,0,1.326-0.083,1.931-0.264v1.791c-0.647,0.143-1.301,0.206-1.942,0.206c-1.674-0.026-3.266-0.353-4.509-1.053V11.736zM10.181,24.588c-1.674-0.028-3.266-0.354-4.508-1.055v-2.712c0.035,0.086,0.065,0.176,0.07,0.275l0.002,0.053c0.018,0.267,0.13,0.408,0.364,0.613c0.783,0.625,2.381,1.079,4.083,1.091c0.67,0,1.327-0.082,1.932-0.262v1.789C11.476,24.525,10.821,24.588,10.181,24.588z",books:"M26.679,7.858c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183c-0.42,0.183-0.946,0.271-1.486,0.271c-0.753,0.002-1.532-0.173-2.075-0.412c-0.194-0.083-0.356-0.176-0.471-0.259c0.042-0.021,0.09-0.042,0.146-0.064l8.786-3.804l1.31,0.561V6.612c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.406-0.17-0.605-0.083l-9.66,4.183c-0.298,0.121-0.554,0.268-0.771,0.483c-0.213,0.208-0.397,0.552-0.394,0.934c0,0.01,0.003,0.027,0.003,0.027v14.73c0,0.006-0.002,0.012-0.002,0.019c0,0.005,0.002,0.007,0.002,0.012v0.015h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.073,3.484,1.093c0.66,0,1.33-0.1,1.951-0.366l9.662-4.184c0.255-0.109,0.422-0.383,0.422-0.692V8.471C26.961,8.227,26.855,7.996,26.679,7.858zM20.553,5.058c-0.017-0.221-0.108-0.429-0.271-0.556c-0.176-0.138-0.404-0.17-0.606-0.083l-9.66,4.183C9.596,8.784,9.069,8.873,8.53,8.873C7.777,8.874,6.998,8.699,6.455,8.46C6.262,8.378,6.099,8.285,5.984,8.202C6.026,8.181,6.075,8.16,6.13,8.138l8.787-3.804l1.309,0.561V3.256c0-0.244-0.106-0.475-0.283-0.612c-0.176-0.138-0.407-0.17-0.606-0.083l-9.66,4.183C5.379,6.864,5.124,7.011,4.907,7.227C4.693,7.435,4.51,7.779,4.513,8.161c0,0.011,0.003,0.027,0.003,0.027v14.73c0,0.006-0.001,0.013-0.001,0.019c0,0.005,0.001,0.007,0.001,0.012v0.016h0.002c0.021,0.515,0.28,0.843,0.528,1.075c0.781,0.688,2.091,1.072,3.485,1.092c0.376,0,0.754-0.045,1.126-0.122V11.544c-0.01-0.7,0.27-1.372,0.762-1.856c0.319-0.315,0.708-0.564,1.19-0.756L20.553,5.058z",icons:"M4.083,14H14V4.083H4.083V14zM17,4.083V14h9.917V4.083H17zM17,26.917h9.917v-9.918H17V26.917zM4.083,26.917H14v-9.918H4.083V26.917z",list:"M4.082,4.083v2.999h22.835V4.083H4.082zM4.082,20.306h22.835v-2.999H4.082V20.306zM4.082,13.694h22.835v-2.999H4.082V13.694zM4.082,26.917h22.835v-2.999H4.082V26.917z",db:"M15.499,23.438c-3.846,0-7.708-0.987-9.534-3.117c-0.054,0.236-0.09,0.48-0.09,0.737v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.258-0.036-0.501-0.09-0.737C23.209,22.451,19.347,23.438,15.499,23.438zM15.499,15.943c-3.846,0-7.708-0.987-9.533-3.117c-0.054,0.236-0.091,0.479-0.091,0.736v3.877c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998v-3.877c0-0.257-0.036-0.501-0.09-0.737C23.209,14.956,19.347,15.943,15.499,15.943zM15.5,1.066c-4.637,0-9.625,1.565-9.625,5.001v3.876c0,3.435,4.988,4.998,9.625,4.998s9.625-1.563,9.625-4.998V6.067C25.125,2.632,20.137,1.066,15.5,1.066zM15.5,9.066c-4.211,0-7.625-1.343-7.625-3c0-1.656,3.414-3,7.625-3s7.625,1.344,7.625,3C23.125,7.724,19.711,9.066,15.5,9.066z",paper:"M28.916,8.009L15.953,1.888c-0.251-0.119-0.548-0.115-0.798,0.008c-0.25,0.125-0.433,0.357-0.491,0.629c-0.002,0.01-1.04,4.83-2.578,9.636c-0.526,1.646-1.114,3.274-1.728,4.704l1.665,0.786c2-4.643,3.584-11.052,4.181-13.614l11.264,5.316c-0.346,1.513-1.233,5.223-2.42,8.927c-0.767,2.399-1.665,4.797-2.585,6.532c-0.889,1.79-1.958,2.669-2.197,2.552c-1.419,0.03-2.418-1.262-3.09-2.918c-0.32-0.803-0.53-1.63-0.657-2.246c-0.127-0.618-0.166-1.006-0.168-1.006c-0.034-0.317-0.232-0.597-0.52-0.731l-12.962-6.12c-0.301-0.142-0.654-0.11-0.925,0.081c-0.27,0.193-0.416,0.518-0.38,0.847c0.008,0.045,0.195,1.848,0.947,3.736c0.521,1.321,1.406,2.818,2.845,3.575l12.956,6.131l0.006-0.013c0.562,0.295,1.201,0.487,1.947,0.496c1.797-0.117,2.777-1.668,3.818-3.525c3-5.69,5.32-16.602,5.338-16.642C29.512,8.615,29.302,8.19,28.916,8.009z",takeoff:"M10.27,19.267c0,0,9.375-1.981,16.074-8.681c0,0,1.395-1.339-1.338-1.339c-2.305,0-5.6,2.438-5.6,2.438l-9.137-1.42l-1.769,1.769l4.983,2.411l-3.001,2.035l-2.571-1.285L6.09,16.052C6.09,16.052,8.02,18.062,10.27,19.267zM3.251,23.106v1.998h24.498v-1.998H3.251z",landing:"M23.322,19.491c0,0,1.903,0.342,0.299-1.869c-1.353-1.866-5.261-3.104-5.261-3.104l-4.213-8.229l-2.47-0.394l0.973,5.449L9.241,10.11L8.772,7.273L7.008,6.302c0,0-0.496,2.742-0.149,5.271C6.859,11.573,13.965,17.999,23.322,19.491zM3.251,23.106v1.998h24.498v-1.998H3.251zM14,17.94c0,0.414,0.336,0.75,0.75,0.75s0.75-0.336,0.75-0.75s-0.336-0.75-0.75-0.75S14,17.526,14,17.94z",plane:"M19.671,8.11l-2.777,2.777l-3.837-0.861c0.362-0.505,0.916-1.683,0.464-2.135c-0.518-0.517-1.979,0.278-2.305,0.604l-0.913,0.913L7.614,8.804l-2.021,2.021l2.232,1.061l-0.082,0.082l1.701,1.701l0.688-0.687l3.164,1.504L9.571,18.21H6.413l-1.137,1.138l3.6,0.948l1.83,1.83l0.947,3.598l1.137-1.137V21.43l3.725-3.725l1.504,3.164l-0.687,0.687l1.702,1.701l0.081-0.081l1.062,2.231l2.02-2.02l-0.604-2.689l0.912-0.912c0.326-0.326,1.121-1.789,0.604-2.306c-0.452-0.452-1.63,0.101-2.135,0.464l-0.861-3.838l2.777-2.777c0.947-0.947,3.599-4.862,2.62-5.839C24.533,4.512,20.618,7.163,19.671,8.11z",phone:"M22.065,18.53c-0.467-0.29-1.167-0.21-1.556,0.179l-3.093,3.092c-0.389,0.389-1.025,0.389-1.414,0L9.05,14.848c-0.389-0.389-0.389-1.025,0-1.414l2.913-2.912c0.389-0.389,0.447-1.075,0.131-1.524L6.792,1.485C6.476,1.036,5.863,0.948,5.433,1.29c0,0-4.134,3.281-4.134,6.295c0,12.335,10,22.334,22.334,22.334c3.015,0,5.948-5.533,5.948-5.533c0.258-0.486,0.087-1.122-0.38-1.412L22.065,18.53z",hangup:"M28.563,10.494c-7.35-7.349-19.265-7.348-26.612,0.001c-1.796,1.796-0.247,6.84-0.247,6.84c0.135,0.443,0.616,0.72,1.067,0.614l6.898-1.604c0.451-0.105,0.82-0.57,0.82-1.033l0.001-3.685c0-0.463,0.379-0.842,0.842-0.842h8.285c0.464,0,0.843,0.379,0.843,0.842l-0.001,3.471c0.001,0.462,0.375,0.907,0.83,0.986l7.635,1.316c0.456,0.08,0.873-0.232,0.926-0.692C29.851,16.708,30.359,12.29,28.563,10.494zM17.264,14.072h-3.501v4.39h-2.625l4.363,7.556l4.363-7.556h-2.6V14.072z",music:"M12.751,8.042v6.041v9.862c-0.677-0.45-1.636-0.736-2.708-0.736c-2.048,0-3.708,1.025-3.708,2.292c0,1.265,1.66,2.291,3.708,2.291s3.708-1.026,3.708-2.291V13.786l10.915-3.24v9.565c-0.678-0.45-1.635-0.736-2.708-0.736c-2.048,0-3.708,1.025-3.708,2.292c0,1.265,1.66,2.291,3.708,2.291s3.708-1.026,3.708-2.291V10.249V4.208L12.751,8.042z",roadmap:"M23.188,3.735c0-0.975-0.789-1.766-1.766-1.766s-1.766,0.791-1.766,1.766s1.766,4.267,1.766,4.267S23.188,4.71,23.188,3.735zM20.578,3.734c0-0.466,0.378-0.843,0.844-0.843c0.467,0,0.844,0.377,0.844,0.844c0,0.466-0.377,0.843-0.844,0.843C20.956,4.578,20.578,4.201,20.578,3.734zM25.281,18.496c-0.562,0-1.098,0.046-1.592,0.122L11.1,13.976c0.199-0.181,0.312-0.38,0.312-0.59c0-0.108-0.033-0.213-0.088-0.315l8.41-2.239c0.459,0.137,1.023,0.221,1.646,0.221c1.521,0,2.75-0.485,2.75-1.083c0-0.599-1.229-1.083-2.75-1.083s-2.75,0.485-2.75,1.083c0,0.069,0.021,0.137,0.054,0.202L9.896,12.2c-0.633-0.188-1.411-0.303-2.265-0.303c-2.088,0-3.781,0.667-3.781,1.49c0,0.823,1.693,1.489,3.781,1.489c0.573,0,1.11-0.054,1.597-0.144l11.99,4.866c-0.19,0.192-0.306,0.401-0.306,0.623c0,0.188,0.096,0.363,0.236,0.532L8.695,25.415c-0.158-0.005-0.316-0.011-0.477-0.011c-3.241,0-5.87,1.037-5.87,2.312c0,1.276,2.629,2.312,5.87,2.312c3.241,0,5.87-1.034,5.87-2.312c0-0.22-0.083-0.432-0.229-0.633l10.265-5.214c0.37,0.04,0.753,0.066,1.155,0.066c2.414,0,4.371-0.771,4.371-1.723C29.65,19.268,27.693,18.496,25.281,18.496z",brush:"M8.125,29.178l1.311-1.5l1.315,1.5l1.311-1.5l1.311,1.5l1.315-1.5l1.311,1.5l1.312-1.5l1.314,1.5l1.312-1.5l1.312,1.5l1.314-1.5l1.312,1.5v-8.521H8.125V29.178zM23.375,17.156c-0.354,0-5.833-0.166-5.833-2.917s0.75-8.834,0.75-8.834S18.542,2.822,16,2.822s-2.292,2.583-2.292,2.583s0.75,6.083,0.75,8.834s-5.479,2.917-5.833,2.917c-0.5,0-0.5,1.166-0.5,1.166v1.271h15.75v-1.271C23.875,18.322,23.875,17.156,23.375,17.156zM16,8.031c-0.621,0-1.125-2.191-1.125-2.812S15.379,4.094,16,4.094s1.125,0.504,1.125,1.125S16.621,8.031,16,8.031z",bucket:"M21.589,6.787c-0.25-0.152-0.504-0.301-0.76-0.445c-3.832-2.154-8.234-3.309-9.469-1.319c-1.225,2.103,2.314,5.798,6.293,8.222c0.082,0.051,0.167,0.098,0.25,0.146c5.463-0.402,9.887,0.204,9.989,1.402c0.009,0.105-0.026,0.211-0.083,0.318c0.018-0.025,0.041-0.045,0.057-0.07C29.146,12.943,25.585,9.222,21.589,6.787zM10.337,7.166l-0.722,1.52c-4.339,2.747-6.542,6.193-5.484,8.625c0.19,0.438,0.482,0.812,0.846,1.137l0.456-0.959c-0.156-0.178-0.292-0.365-0.384-0.577c-0.732-1.682,0.766-4.188,3.707-6.417l-3.323,6.994c1.492,1.689,5.748,1.748,10.276,0.154c-0.037-0.354,0.032-0.722,0.232-1.049c0.485-0.796,1.523-1.048,2.319-0.563c0.795,0.486,1.048,1.522,0.562,2.319c-0.484,0.795-1.523,1.047-2.319,0.562c-0.154-0.094-0.281-0.213-0.394-0.344c-4.354,1.559-8.372,1.643-10.553,0.314c-0.214-0.131-0.403-0.279-0.58-0.436l-0.124,0.26c-1.088,1.785,1.883,4.916,5.23,6.957c3.347,2.039,7.493,3.246,8.552,1.502l7.77-10.204c-2.48,0.384-6.154-0.963-9.272-2.864C14.014,12.197,11.131,9.546,10.337,7.166z",terminal:"M3.25,6.469v19.062h25.5V6.469H3.25zM10.345,11.513l-4.331,1.926V12.44l3.124-1.288v-0.018L6.014,9.848v-1l4.331,1.927V11.513zM16.041,14.601h-5.05v-0.882h5.05V14.601z",edit:"M27.87,7.863L23.024,4.82l-7.889,12.566l4.842,3.04L27.87,7.863zM14.395,21.25l-0.107,2.855l2.527-1.337l2.349-1.24l-4.672-2.936L14.395,21.25zM29.163,3.239l-2.532-1.591c-0.638-0.401-1.479-0.208-1.882,0.43l-0.998,1.588l4.842,3.042l0.999-1.586C29.992,4.481,29.802,3.639,29.163,3.239zM25.198,27.062c0,0.275-0.225,0.5-0.5,0.5h-19c-0.276,0-0.5-0.225-0.5-0.5v-19c0-0.276,0.224-0.5,0.5-0.5h13.244l1.884-3H5.698c-1.93,0-3.5,1.57-3.5,3.5v19c0,1.93,1.57,3.5,3.5,3.5h19c1.93,0,3.5-1.57,3.5-3.5V11.097l-3,4.776V27.062z",paint:"M25.541,5.772V2.208H3.292v8.083h22.249v-3.52c1.211,0.113,2.167,1.174,2.167,2.478v1.375c0,1.398-1.164,2.784-2.541,3.025l-7.882,1.381c-1.857,0.326-3.369,2.125-3.369,4.011v0.385c-0.742,0.366-1.292,1.507-1.292,2.865v4.5c0,1.65,0.807,3,1.792,3s1.792-1.35,1.792-3v-4.5c0-1.358-0.55-2.499-1.292-2.865v-0.385c0-1.398,1.164-2.784,2.541-3.025l7.882-1.381c1.857-0.326,3.369-2.125,3.369-4.01V9.25C28.708,7.394,27.304,5.886,25.541,5.772z",car:"M28.59,10.781h-2.242c-0.129,0-0.244,0.053-0.333,0.133c-0.716-1.143-1.457-2.058-2.032-2.633c-2-2-14-2-16,0C7.41,8.854,6.674,9.763,5.961,10.898c-0.086-0.069-0.19-0.117-0.309-0.117H3.41c-0.275,0-0.5,0.225-0.5,0.5v1.008c0,0.275,0.221,0.542,0.491,0.594l1.359,0.259c-1.174,2.619-1.866,5.877-0.778,9.14v1.938c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.584c2.298,0.219,5.551,0.459,8.812,0.459c3.232,0,6.521-0.235,8.814-0.453v1.578c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1l-0.002-1.938c1.087-3.261,0.397-6.516-0.775-9.134l1.392-0.265c0.271-0.052,0.491-0.318,0.491-0.594v-1.008C29.09,11.006,28.865,10.781,28.59,10.781zM7.107,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.108,18.906,7.107,18.906zM5.583,13.716c0.96-2.197,2.296-3.917,3.106-4.728c0.585-0.585,3.34-1.207,7.293-1.207c3.953,0,6.708,0.622,7.293,1.207c0.811,0.811,2.146,2.53,3.106,4.728c-2.133,0.236-6.286-0.31-10.399-0.31S7.716,13.952,5.583,13.716zM24.857,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S25.858,18.906,24.857,18.906z", +taxi:"M28.59,10.781h-2.242c-0.129,0-0.244,0.053-0.333,0.133c-0.716-1.143-1.457-2.058-2.032-2.633c-0.575-0.575-1.979-0.984-3.732-1.229V5.03c-1.541-0.198-3.099-0.249-4.268-0.249c-1.16,0-2.703,0.05-4.233,0.245v2.022C9.98,7.292,8.562,7.702,7.982,8.281C7.41,8.854,6.674,9.763,5.961,10.898c-0.086-0.069-0.19-0.117-0.309-0.117H3.41c-0.275,0-0.5,0.225-0.5,0.5v1.008c0,0.275,0.221,0.542,0.491,0.594l1.359,0.259c-1.174,2.619-1.866,5.877-0.778,9.14v1.938c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.584c2.298,0.219,5.551,0.459,8.812,0.459c3.232,0,6.521-0.235,8.814-0.453v1.578c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1l-0.002-1.938c1.087-3.261,0.397-6.516-0.775-9.134l1.392-0.265c0.271-0.052,0.491-0.318,0.491-0.594v-1.008C29.09,11.006,28.865,10.781,28.59,10.781zM7.107,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.108,18.906,7.107,18.906zM5.583,13.716c0.96-2.197,2.296-3.917,3.106-4.728c0.585-0.585,3.34-1.207,7.293-1.207c3.953,0,6.708,0.622,7.293,1.207c0.811,0.811,2.146,2.53,3.106,4.728c-2.133,0.236-6.286-0.31-10.399-0.31S7.716,13.952,5.583,13.716zM24.857,18.906c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S25.858,18.906,24.857,18.906z",bus:"M30.171,7.314c-0.025-0.274-0.215-0.498-0.421-0.498s-0.375-0.169-0.375-0.375s-0.222-0.337-0.493-0.292L27.41,6.399C27.114,4.607,26.67,3.486,26,2.816c-2-2-18-2-20,0C5.331,3.486,4.886,4.607,4.589,6.399L3.118,6.15C2.847,6.104,2.625,6.235,2.625,6.441S2.456,6.816,2.25,6.816S1.854,7.041,1.829,7.314l-0.47,5.066c-0.025,0.274,0.179,0.498,0.454,0.498h1.062c0.275,0,0.521-0.224,0.546-0.498l0.393-4.232c0.025-0.274,0.268-0.46,0.54-0.415l0.054,0.009C4.007,11.396,4,29.684,4,29.684c0,0.553,0.14,1,0.313,1h2.562c0.173,0,0.313-0.447,0.313-1v-1.893c4.643,0.698,12.982,0.698,17.625,0v1.889c0,0.553,0.141,1,0.312,1h2.562c0.172,0,0.312-0.447,0.312-1c0,0-0.007-18.283-0.407-21.937l0.054-0.009c0.271-0.046,0.514,0.141,0.539,0.415l0.394,4.232c0.025,0.274,0.271,0.498,0.546,0.498h1.062c0.275,0,0.479-0.224,0.454-0.498L30.171,7.314zM7.125,23.371c-1.001,0-1.812-0.812-1.812-1.812s0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812S8.126,23.371,7.125,23.371zM5.042,15.977C5.143,8.542,5.491,4.739,6.707,3.523C7.194,3.037,10.484,2.316,16,2.316c5.516,0,8.806,0.72,9.293,1.207c1.217,1.216,1.564,5.02,1.665,12.455c-1.175,0.473-4.904,1.025-10.958,1.025C9.951,17.004,6.222,16.452,5.042,15.977zM23.062,21.559c0-1.001,0.812-1.812,1.812-1.812s1.812,0.812,1.812,1.812s-0.812,1.812-1.812,1.812S23.062,22.56,23.062,21.559z",train:"M25.781,21.382c0.69-0.691,0.607-4.311,0.607-4.311c0-2.21-0.663-10.334-1.602-12.103c-0.94-1.768-6.19-3.26-8.787-3.26s-7.847,1.492-8.786,3.26c-0.939,1.769-1.603,9.893-1.603,12.103c0,0-0.083,3.619,0.607,4.311c0.455,0.455,2.205,1.581,3.663,2.423l-3.744,6.486h2.31l0.673-1.166h13.759l0.673,1.166h2.311l-3.744-6.486C23.576,22.963,25.326,21.837,25.781,21.382zM23.819,16.795c-0.473,0-0.856-0.384-0.856-0.856s0.384-0.856,0.856-0.856c0.474,0,0.856,0.384,0.856,0.856S24.293,16.795,23.819,16.795zM20.421,6.959h3.768c0.326,1.565,0.616,3.98,0.807,6.134h-4.574V6.959zM14.417,3.125h3.166v1.333h-3.166V3.125zM7.812,6.959h3.768v6.134H7.005C7.195,10.939,7.485,8.524,7.812,6.959zM8.181,16.795c-0.474,0-0.856-0.384-0.856-0.856s0.383-0.856,0.856-0.856c0.473,0,0.856,0.384,0.856,0.856S8.653,16.795,8.181,16.795zM9.341,15.938c0-0.473,0.384-0.856,0.856-0.856c0.474,0,0.856,0.384,0.856,0.856s-0.383,0.856-0.856,0.856C9.725,16.795,9.341,16.411,9.341,15.938zM10.275,27.125l0.99-1.715h9.469l0.99,1.715H10.275zM20.946,15.938c0-0.473,0.383-0.856,0.856-0.856c0.473,0,0.856,0.384,0.856,0.856s-0.384,0.856-0.856,0.856C21.329,16.795,20.946,16.411,20.946,15.938z",scissors:"M11.108,10.271c1.083-1.876,0.159-4.443-2.059-5.725C8.231,4.074,7.326,3.825,6.433,3.825c-1.461,0-2.721,0.673-3.373,1.801C2.515,6.57,2.452,7.703,2.884,8.814C3.287,9.85,4.081,10.751,5.12,11.35c0.817,0.473,1.722,0.723,2.616,0.723c0.673,0,1.301-0.149,1.849-0.414c0.669,0.387,1.566,0.904,2.4,1.386c1.583,0.914,0.561,3.861,5.919,6.955c5.357,3.094,11.496,1.535,11.496,1.535L10.75,10.767C10.882,10.611,11.005,10.449,11.108,10.271zM9.375,9.271c-0.506,0.878-2.033,1.055-3.255,0.347C5.474,9.245,4.986,8.702,4.749,8.09C4.541,7.555,4.556,7.035,4.792,6.626c0.293-0.509,0.892-0.801,1.64-0.801c0.543,0,1.102,0.157,1.616,0.454C9.291,6.996,9.898,8.366,9.375,9.271zM17.246,15.792c0,0.483-0.392,0.875-0.875,0.875c-0.037,0-0.068-0.017-0.104-0.021l0.667-1.511C17.121,15.296,17.246,15.526,17.246,15.792zM16.371,14.917c0.037,0,0.068,0.017,0.104,0.021l-0.666,1.51c-0.188-0.16-0.312-0.39-0.312-0.656C15.496,15.309,15.887,14.917,16.371,14.917zM29.4,10.467c0,0-6.139-1.559-11.496,1.535c-0.537,0.311-0.995,0.618-1.415,0.924l4.326,2.497L29.4,10.467zM13.171,17.097c-0.352,0.851-0.575,1.508-1.187,1.859c-0.833,0.481-1.73,0.999-2.399,1.386c-0.549-0.265-1.176-0.414-1.85-0.414c-0.894,0-1.798,0.249-2.616,0.721c-2.218,1.282-3.143,3.851-2.06,5.726c0.651,1.127,1.912,1.801,3.373,1.801c0.894,0,1.799-0.25,2.616-0.722c1.04-0.601,1.833-1.501,2.236-2.536c0.432-1.112,0.368-2.245-0.178-3.189c-0.103-0.178-0.226-0.34-0.356-0.494l3.982-2.3C14.044,18.295,13.546,17.676,13.171,17.097zM9.42,24.192c-0.238,0.612-0.725,1.155-1.371,1.528c-1.221,0.706-2.75,0.532-3.257-0.347C4.27,24.47,4.878,23.099,6.12,22.381c0.514-0.297,1.072-0.453,1.615-0.453c0.749,0,1.346,0.291,1.64,0.8C9.612,23.138,9.628,23.657,9.42,24.192z",coffee:"M7.845,9.983l2.034,17.353c0,0.977,2.741,1.769,6.121,1.769c3.381,0,6.121-0.792,6.121-1.769l2.377-17.485c-2.455,1.023-6.812,1.133-8.498,1.133C14.39,10.984,10.345,10.883,7.845,9.983zM24.13,5.752l-0.376-1.678c0-0.651-3.472-1.179-7.754-1.179S8.246,3.424,8.246,4.075L7.871,5.752C7.156,6.036,6.75,6.36,6.75,6.705v1.284c0,1.102,4.142,1.995,9.25,1.995s9.25-0.894,9.25-1.995V6.705C25.25,6.36,24.844,6.036,24.13,5.752z",filter:"M26.834,6.958c0-2.094-4.852-3.791-10.834-3.791c-5.983,0-10.833,1.697-10.833,3.791c0,0.429,0.213,0.84,0.588,1.224l8.662,15.002v4.899c0,0.414,0.709,0.75,1.583,0.75c0.875,0,1.584-0.336,1.584-0.75v-4.816l8.715-15.093h-0.045C26.625,7.792,26.834,7.384,26.834,6.958zM16,9.75c-6.363,0-9.833-1.845-9.833-2.792S9.637,4.167,16,4.167c6.363,0,9.834,1.844,9.834,2.791S22.363,9.75,16,9.75z","low-battery":"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM24.167,18.916H6.25v-5.832h17.917V18.916zM9.167,14.084H7.25v3.832h1.917V14.084z","full-battery":"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM24.167,18.916H6.25v-5.832h17.917V18.916zM23.167,14.084H7.25v3.832h15.917V14.084z",charging:"M27.271,13.501h-1.104v-1.417c0-0.553-0.447-1-1-1H5.25c-0.552,0-1,0.447-1,1v7.832c0,0.553,0.448,1,1,1h19.917c0.553,0,1-0.447,1-1v-1.417h1.104c0.265,0,0.479-0.447,0.479-1v-2.998C27.75,13.948,27.536,13.501,27.271,13.501zM18.525,16.842l-6.733,3.366l3.366-3.366l-1.683-1.684l6.733-3.366l-3.366,3.366L18.525,16.842z",ticket:"M20.338,6.713c-1.002-0.468-1.434-1.658-0.967-2.658L16.578,2.75L6.21,24.948l2.793,1.305c0.468-1.001,1.658-1.434,2.659-0.966s1.434,1.657,0.966,2.658l2.793,1.305L25.789,7.052l-2.793-1.305C22.529,6.748,21.338,7.181,20.338,6.713z",checkbox:"M26,27.5H6c-0.829,0-1.5-0.672-1.5-1.5V6c0-0.829,0.671-1.5,1.5-1.5h20c0.828,0,1.5,0.671,1.5,1.5v20C27.5,26.828,26.828,27.5,26,27.5zM7.5,24.5h17v-17h-17V24.5z",checked:"M29.548,3.043c-1.081-0.859-2.651-0.679-3.513,0.401L16,16.066l-3.508-4.414c-0.859-1.081-2.431-1.26-3.513-0.401c-1.081,0.859-1.261,2.432-0.401,3.513l5.465,6.875c0.474,0.598,1.195,0.944,1.957,0.944c0.762,0,1.482-0.349,1.957-0.944L29.949,6.556C30.809,5.475,30.629,3.902,29.548,3.043zM24.5,24.5h-17v-17h12.756l2.385-3H6C5.171,4.5,4.5,5.171,4.5,6v20c0,0.828,0.671,1.5,1.5,1.5h20c0.828,0,1.5-0.672,1.5-1.5V12.851l-3,3.773V24.5z",inbox:"M24,5H8L4,19v8h24v-8L24,5zM27,26H5v-7h8.75c0,1.242,1.007,2.25,2.25,2.25c1.242,0,2.25-1.008,2.25-2.25H27V26z",crown:"M16,8.087c1.007,0,1.826-0.819,1.826-1.826c0-1.007-0.819-1.826-1.826-1.826s-1.826,0.819-1.826,1.826C14.174,7.268,14.993,8.087,16,8.087zM16,5.043c0.673,0,1.218,0.545,1.218,1.217S16.673,7.479,16,7.479s-1.217-0.545-1.217-1.218S15.327,5.043,16,5.043zM4.923,13.292c0.812,2.612,1.132,6.646,1.257,9.412c0.027-0.001,0.053-0.009,0.081-0.009h19.479c0.027,0,0.054,0.008,0.081,0.009c0.124-2.766,0.444-6.8,1.256-9.412c-0.449-0.229-0.813-0.591-1.05-1.038c-2.401,2.048-5.157,6.18-5.157,6.18s-3.026-6.058-4.305-9.812C16.383,8.667,16.196,8.696,16,8.696s-0.383-0.029-0.565-0.073c-1.278,3.754-4.305,9.812-4.305,9.812s-2.756-4.132-5.157-6.18C5.738,12.701,5.373,13.063,4.923,13.292zM5.652,11.13c0-1.007-0.819-1.826-1.826-1.826S2,10.124,2,11.13s0.819,1.826,1.826,1.826S5.652,12.137,5.652,11.13zM3.826,12.348c-0.673,0-1.217-0.545-1.217-1.217s0.544-1.217,1.217-1.217s1.217,0.545,1.217,1.217S4.499,12.348,3.826,12.348zM25.739,23.913H6.261c-1.009,0-1.826,0.818-1.826,1.826s0.817,1.826,1.826,1.826h19.479c1.008,0,1.826-0.818,1.826-1.826S26.747,23.913,25.739,23.913zM28.174,9.304c-1.007,0-1.826,0.819-1.826,1.826s0.819,1.826,1.826,1.826S30,12.137,30,11.13S29.181,9.304,28.174,9.304zM28.174,12.348c-0.673,0-1.218-0.545-1.218-1.217s0.545-1.217,1.218-1.217s1.218,0.545,1.218,1.217S28.847,12.348,28.174,12.348z",green:"M24.485,2c0,8-18,4-18,20c0,6,2,8,2,8h2c0,0-3-2-3-8c0-4,9-8,9-8s-7.981,4.328-7.981,8.436C21.239,24.431,28.288,9.606,24.485,2z",bolt:"M22.727,18.242L4.792,27.208l8.966-8.966l-4.483-4.484l17.933-8.966l-8.966,8.966L22.727,18.242z",slideshare:"M28.952,12.795c-0.956,1.062-5.073,2.409-5.604,2.409h-4.513c-0.749,0-1.877,0.147-2.408,0.484c0.061,0.054,0.122,0.108,0.181,0.163c0.408,0.379,1.362,0.913,2.206,0.913c0.397,0,0.723-0.115,1-0.354c1.178-1.007,1.79-1.125,2.145-1.125c0.421,0,0.783,0.193,0.996,0.531c0.4,0.626,0.106,1.445-0.194,2.087c-0.718,1.524-3.058,3.171-5.595,3.171c-0.002,0-0.002,0-0.004,0c-0.354,0-0.701-0.033-1.033-0.099v3.251c0,0.742,1.033,2.533,4.167,2.533s3.955-3.701,3.955-4.338v-4.512c2.23-1.169,4.512-1.805,5.604-3.895C30.882,12.05,29.907,11.733,28.952,12.795zM21.942,17.521c0.796-1.699-0.053-1.699-1.54-0.425s-3.665,0.105-4.408-0.585c-0.743-0.689-1.486-1.22-2.814-1.167c-1.328,0.053-4.46-0.161-6.267-0.585c-1.805-0.425-4.895-3-5.15-2.335c-0.266,0.69,0.211,1.168,1.168,2.335c0.955,1.169,5.075,2.778,5.075,2.778s0,3.453,0,4.886c0,1.435,2.973,3.61,4.512,3.61s2.708-1.062,2.708-1.806v-4.512C17.775,21.045,21.146,19.221,21.942,17.521zM20.342,13.73c1.744,0,3.159-1.414,3.159-3.158c0-1.745-1.415-3.159-3.159-3.159s-3.158,1.414-3.158,3.159C17.184,12.316,18.598,13.73,20.342,13.73zM12.019,13.73c1.744,0,3.158-1.414,3.158-3.158c0-1.745-1.414-3.159-3.158-3.159c-1.745,0-3.159,1.414-3.159,3.159C8.86,12.316,10.273,13.73,12.019,13.73z",twitter:"M23.295,22.567h-7.213c-2.125,0-4.103-2.215-4.103-4.736v-1.829h11.232c1.817,0,3.291-1.469,3.291-3.281c0-1.813-1.474-3.282-3.291-3.282H11.979V6.198c0-1.835-1.375-3.323-3.192-3.323c-1.816,0-3.29,1.488-3.29,3.323v11.633c0,6.23,4.685,11.274,10.476,11.274h7.211c1.818,0,3.318-1.463,3.318-3.298S25.112,22.567,23.295,22.567z",twitterbird:"M26.492,9.493c-0.771,0.343-1.602,0.574-2.473,0.678c0.89-0.533,1.562-1.376,1.893-2.382c-0.832,0.493-1.753,0.852-2.734,1.044c-0.785-0.837-1.902-1.359-3.142-1.359c-2.377,0-4.306,1.928-4.306,4.306c0,0.337,0.039,0.666,0.112,0.979c-3.578-0.18-6.75-1.894-8.874-4.499c-0.371,0.636-0.583,1.375-0.583,2.165c0,1.494,0.76,2.812,1.915,3.583c-0.706-0.022-1.37-0.216-1.95-0.538c0,0.018,0,0.036,0,0.053c0,2.086,1.484,3.829,3.454,4.222c-0.361,0.099-0.741,0.147-1.134,0.147c-0.278,0-0.547-0.023-0.81-0.076c0.548,1.711,2.138,2.955,4.022,2.99c-1.474,1.146-3.33,1.842-5.347,1.842c-0.348,0-0.69-0.021-1.027-0.062c1.905,1.225,4.168,1.938,6.6,1.938c7.919,0,12.248-6.562,12.248-12.25c0-0.187-0.002-0.372-0.01-0.557C25.186,11.115,25.915,10.356,26.492,9.493z",skype:"M28.777,18.438c0.209-0.948,0.318-1.934,0.318-2.944c0-7.578-6.144-13.722-13.724-13.722c-0.799,0-1.584,0.069-2.346,0.2C11.801,1.199,10.35,0.75,8.793,0.75c-4.395,0-7.958,3.562-7.958,7.958c0,1.47,0.399,2.845,1.094,4.024c-0.183,0.893-0.277,1.814-0.277,2.76c0,7.58,6.144,13.723,13.722,13.723c0.859,0,1.699-0.078,2.515-0.23c1.119,0.604,2.399,0.945,3.762,0.945c4.395,0,7.957-3.562,7.957-7.959C29.605,20.701,29.309,19.502,28.777,18.438zM22.412,22.051c-0.635,0.898-1.573,1.609-2.789,2.115c-1.203,0.5-2.646,0.754-4.287,0.754c-1.971,0-3.624-0.346-4.914-1.031C9.5,23.391,8.74,22.717,8.163,21.885c-0.583-0.842-0.879-1.676-0.879-2.479c0-0.503,0.192-0.939,0.573-1.296c0.375-0.354,0.857-0.532,1.432-0.532c0.471,0,0.878,0.141,1.209,0.422c0.315,0.269,0.586,0.662,0.805,1.174c0.242,0.558,0.508,1.027,0.788,1.397c0.269,0.355,0.656,0.656,1.151,0.89c0.497,0.235,1.168,0.354,1.992,0.354c1.135,0,2.064-0.241,2.764-0.721c0.684-0.465,1.016-1.025,1.016-1.711c0-0.543-0.173-0.969-0.529-1.303c-0.373-0.348-0.865-0.621-1.465-0.807c-0.623-0.195-1.47-0.404-2.518-0.623c-1.424-0.306-2.634-0.668-3.596-1.076c-0.984-0.419-1.777-1-2.357-1.727c-0.59-0.736-0.889-1.662-0.889-2.75c0-1.036,0.314-1.971,0.933-2.776c0.613-0.8,1.51-1.423,2.663-1.849c1.139-0.422,2.494-0.635,4.027-0.635c1.225,0,2.303,0.141,3.201,0.421c0.904,0.282,1.668,0.662,2.267,1.13c0.604,0.472,1.054,0.977,1.335,1.5c0.284,0.529,0.43,1.057,0.43,1.565c0,0.49-0.189,0.937-0.563,1.324c-0.375,0.391-0.851,0.589-1.408,0.589c-0.509,0-0.905-0.124-1.183-0.369c-0.258-0.227-0.523-0.58-0.819-1.09c-0.342-0.65-0.756-1.162-1.229-1.523c-0.463-0.351-1.232-0.529-2.292-0.529c-0.984,0-1.784,0.197-2.379,0.588c-0.572,0.375-0.85,0.805-0.85,1.314c0,0.312,0.09,0.574,0.273,0.799c0.195,0.238,0.471,0.447,0.818,0.621c0.36,0.182,0.732,0.326,1.104,0.429c0.382,0.106,1.021,0.263,1.899,0.466c1.11,0.238,2.131,0.506,3.034,0.793c0.913,0.293,1.703,0.654,2.348,1.072c0.656,0.429,1.178,0.979,1.547,1.635c0.369,0.658,0.558,1.471,0.558,2.416C23.371,20.119,23.049,21.148,22.412,22.051z",windows:"M20.023,17.484c-1.732-0.205-3.022-0.908-4.212-1.701l0,0l-0.559,0.279l-2.578,8.924l0,0c1.217,0.805,2.905,1.707,4.682,1.914c2.686,0.312,5.56-0.744,6.391-1.195l2.617-9.061l-0.559-0.279C25.805,16.365,23.193,17.857,20.023,17.484zM14.424,14.825c-1.267-0.87-2.578-1.652-4.375-1.816c-0.318-0.029-0.627-0.042-0.925-0.042c-3.011,0-4.948,1.347-4.948,1.347l-2.565,8.877l0,0l0.526,0.281c0.981-0.476,2.78-1.145,5.09-0.984c1.665,0.113,2.92,0.781,4.117,1.531l0.507-0.26l0,0L14.424,14.825zM10.201,12.094c1.664,0.114,2.921,0.78,4.117,1.533l0.509-0.26l0,0L17.4,4.431c-1.27-0.87-2.579-1.653-4.377-1.816c-0.318-0.029-0.626-0.042-0.924-0.042C9.088,2.573,7.15,3.92,7.15,3.92l-2.566,8.878L5.11,13.08C6.092,12.604,7.891,11.936,10.201,12.094zM28.779,5.971L28.779,5.971c0,0.001-2.609,1.492-5.779,1.119c-1.734-0.204-3.023-0.907-4.213-1.701L18.227,5.67l-2.576,8.923l0,0c1.215,0.803,2.906,1.709,4.68,1.915c2.687,0.312,5.558-0.745,6.392-1.197l2.615-9.059L28.779,5.971z",apple:"M24.32,10.85c-1.743,1.233-2.615,2.719-2.615,4.455c0,2.079,1.078,3.673,3.232,4.786c-0.578,1.677-1.416,3.134-2.514,4.375c-1.097,1.241-2.098,1.862-3.004,1.862c-0.427,0-1.009-0.143-1.748-0.423l-0.354-0.138c-0.725-0.281-1.363-0.423-1.92-0.423c-0.525,0-1.1,0.11-1.725,0.331l-0.445,0.16l-0.56,0.229c-0.441,0.176-0.888,0.264-1.337,0.264c-1.059,0-2.228-0.872-3.507-2.616c-1.843-2.498-2.764-5.221-2.764-8.167c0-2.095,0.574-3.781,1.725-5.061c1.149-1.279,2.673-1.92,4.568-1.92c0.709,0,1.371,0.13,1.988,0.389l0.423,0.172l0.445,0.183c0.396,0.167,0.716,0.251,0.959,0.251c0.312,0,0.659-0.072,1.04-0.217l0.582-0.229l0.435-0.16c0.693-0.251,1.459-0.377,2.297-0.377C21.512,8.576,23.109,9.334,24.32,10.85zM19.615,3.287c0.021,0.267,0.033,0.473,0.033,0.617c0,1.317-0.479,2.473-1.438,3.467s-2.075,1.49-3.347,1.49c-0.038-0.297-0.058-0.51-0.058-0.639c0-1.12,0.445-2.171,1.337-3.153c0.891-0.982,1.922-1.558,3.096-1.725C19.32,3.329,19.447,3.311,19.615,3.287z",linux:"M11.791,25.229c1.027-0.104,1.162-1.191,0.68-1.666c-0.398-0.392-2.598-2.022-3.171-2.664C9.033,20.6,8.673,20.454,8.52,20.12c-0.352-0.771-0.598-1.869-0.151-2.658c0.081-0.144,0.133-0.078,0.071,0.22c-0.351,1.684,0.746,3.059,0.986,2.354c0.167-0.487,0.013-1.358,0.102-2.051c0.158-1.226,1.273-3.577,1.763-3.712c-0.755-1.398,0.886-2.494,0.866-3.723c-0.014-0.798,0.701,0.982,1.419,1.359c0.802,0.422,1.684-0.794,2.936-1.41c0.354-0.176,0.809-0.376,0.776-0.524c-0.146-0.718-1.644,0.886-2.979,0.939c-0.61,0.024-0.837-0.12-1.072-0.347c-0.712-0.689,0.073-0.115,1.132-0.307c0.471-0.085,0.629-0.163,1.128-0.365c0.5-0.201,1.069-0.5,1.636-0.654c0.395-0.106,0.361-0.402,0.208-0.491c-0.088-0.051-0.219-0.046-0.321,0.133c-0.244,0.419-1.383,0.661-1.74,0.771c-0.457,0.14-0.962,0.271-1.634,0.243c-1.021-0.042-0.782-0.509-1.513-0.928c-0.213-0.122-0.156-0.444,0.129-0.729c0.148-0.148,0.557-0.232,0.76-0.572c0.028-0.047,0.289-0.32,0.494-0.461c0.07-0.049,0.076-1.295-0.562-1.32c-0.543-0.021-0.697,0.398-0.675,0.818c0.022,0.419,0.245,0.765,0.393,0.764c0.285-0.004,0.019,0.311-0.138,0.361c-0.237,0.078-0.562-0.934-0.525-1.418c0.039-0.506,0.303-1.4,0.942-1.383c0.576,0.016,0.993,0.737,0.973,1.983c-0.003,0.211,0.935-0.101,1.247,0.229c0.224,0.236-0.767-2.207,1.438-2.375c0.582,0.111,1.14,0.305,1.371,1.641c-0.086,0.139,0.146,1.07-0.215,1.182c-0.438,0.135-0.707-0.02-0.453-0.438c0.172-0.418,0.004-1.483-0.882-1.42c-0.887,0.064-0.769,1.637-0.526,1.668c0.243,0.031,0.854,0.465,1.282,0.549c1.401,0.271,0.371,1.075,0.555,2.048c0.205,1.099,0.929,0.809,1.578,3.717c0.137,0.177,0.676,0.345,1.199,2.579c0.473,2.011-0.195,3.473,0.938,3.353c0.256-0.026,0.629-0.1,0.792-0.668c0.425-1.489-0.213-3.263-0.855-4.46c-0.375-0.698-0.729-1.174-0.916-1.337c0.738,0.436,1.683,1.829,1.898,2.862c0.286,1.358,0.49,1.934,0.059,3.37c0.25,0.125,0.871,0.39,0.871,0.685c-0.647-0.53-2.629-0.625-2.68,0.646c-0.338,0.008-0.594,0.034-0.811,0.293c-0.797,0.944-0.059,2.842-0.139,3.859c-0.07,0.896-0.318,1.783-0.46,2.683c-0.474-0.019-0.428-0.364-0.274-0.852c0.135-0.431,0.351-0.968,0.365-1.484c0.012-0.467-0.039-0.759-0.156-0.831c-0.118-0.072-0.303,0.074-0.559,0.485c-0.543,0.875-1.722,1.261-2.821,1.397c-1.099,0.138-2.123,0.028-2.664-0.578c-0.186-0.207-0.492,0.058-0.529,0.111c-0.049,0.074,0.18,0.219,0.352,0.533c0.251,0.461,0.49,1.159-0.105,1.479C12.83,26.314,12.316,26.221,11.791,25.229L11.791,25.229zM11.398,25.188c0.395,0.621,1.783,3.232-0.652,3.571c-0.814,0.114-2.125-0.474-3.396-0.784c-1.142-0.279-2.301-0.444-2.949-0.627c-0.391-0.108-0.554-0.25-0.588-0.414c-0.091-0.434,0.474-1.041,0.503-1.555c0.028-0.514-0.188-0.779-0.364-1.199c-0.177-0.42-0.224-0.734-0.081-0.914c0.109-0.141,0.334-0.199,0.698-0.164c0.462,0.047,1.02-0.049,1.319-0.23c0.505-0.309,0.742-0.939,0.516-1.699c0,0.744-0.244,1.025-0.855,1.366c-0.577,0.319-1.467,0.062-1.875,0.416c-0.492,0.427,0.175,1.528,0.12,2.338c-0.042,0.622-0.69,1.322-0.401,1.946c0.291,0.627,1.648,0.695,3.064,0.99c2.012,0.422,3.184,1.153,4.113,1.188c1.356,0.05,1.564-1.342,3.693-1.36c0.621-0.033,1.229-0.052,1.835-0.06c0.688-0.009,1.375-0.003,2.079,0.014c1.417,0.034,0.931,0.773,1.851,1.246c0.774,0.397,2.17,0.241,2.504-0.077c0.451-0.431,1.662-1.467,2.592-1.935c1.156-0.583,3.876-1.588,1.902-2.812c-0.461-0.285-1.547-0.588-1.639-2.676c-0.412,0.366-0.365,2.312,0.784,2.697c1.283,0.431,2.085,1.152-0.301,1.969c-1.58,0.54-1.849,0.706-3.099,1.747c-1.267,1.054-3.145,0.636-2.815-1.582c0.171-1.155,0.269-2.11-0.019-3.114c-0.142-0.49-0.211-1.119-0.114-1.562c0.187-0.858,0.651-1.117,1.106-0.293c0.285,0.519,0.385,1.122,1.408,1.171c1.607,0.077,1.926-1.553,2.439-1.627c0.343-0.05,0.686-1.02,0.425-2.589c-0.28-1.681-1.269-4.332-2.536-5.677c-1.053-1.118-1.717-2.098-2.135-3.497c-0.352-1.175-0.547-2.318-0.475-3.412c0.094-1.417-0.691-3.389-1.943-4.316c-0.782-0.581-2.011-0.893-3.122-0.88c-0.623,0.007-1.21,0.099-1.661,0.343c-1.855,1.008-2.113,2.445-2.086,4.088c0.025,1.543,0.078,3.303,0.254,4.977c-0.208,0.77-1.288,2.227-1.979,3.114C8.59,14.233,8.121,16.01,7.52,17.561c-0.321,0.828-0.862,1.2-0.908,2.265C6.6,20.122,6.61,20.891,6.894,20.672C7.98,19.829,9.343,21.95,11.398,25.188L11.398,25.188zM17.044,2.953c-0.06,0.176-0.3,0.321-0.146,0.443c0.152,0.123,0.24-0.171,0.549-0.281c0.08-0.028,0.449,0.012,0.519-0.164c0.03-0.077-0.19-0.164-0.321-0.291c-0.133-0.125-0.262-0.236-0.386-0.229C16.938,2.451,17.096,2.798,17.044,2.953L17.044,2.953zM18.934,9.35c0.115-0.121,0.174,0.207,0.483,0.402c0.244,0.154,0.481,0.04,0.545,0.354c0.044,0.225-0.097,0.467-0.284,0.436C19.35,10.486,18.596,9.705,18.934,9.35L18.934,9.35zM13.832,7.375c-0.508-0.037-0.543,0.33-0.375,0.324C13.629,7.693,13.523,7.408,13.832,7.375L13.832,7.375zM12.96,6.436c0.06-0.013,0.146,0.09,0.119,0.233c-0.037,0.199-0.021,0.324,0.117,0.325c0.022,0,0.048-0.005,0.056-0.057c0.066-0.396-0.14-0.688-0.225-0.711C12.834,6.178,12.857,6.458,12.96,6.436L12.96,6.436zM16.663,6.268c0.129,0.039,0.253,0.262,0.28,0.504c0.002,0.021,0.168-0.035,0.17-0.088c0.011-0.389-0.321-0.571-0.408-0.562C16.506,6.139,16.562,6.238,16.663,6.268L16.663,6.268zM14.765,7.423c0.463-0.214,0.625,0.118,0.465,0.171C15.066,7.648,15.065,7.345,14.765,7.423L14.765,7.423zM9.178,15.304c-0.219-0.026,0.063-0.19,0.184-0.397c0.131-0.227,0.105-0.511,0.244-0.469s0.061,0.2-0.033,0.461C9.491,15.121,9.258,15.313,9.178,15.304L9.178,15.304z",nodejs:"M4.783,4.458L2.59,3.196C2.553,3.174,2.511,3.163,2.469,3.161H2.447C2.405,3.163,2.363,3.174,2.326,3.196L0.133,4.458C0.051,4.505,0,4.593,0,4.688l0.005,3.398c0,0.047,0.024,0.092,0.066,0.114c0.041,0.024,0.091,0.024,0.132,0l1.303-0.746c0.083-0.049,0.132-0.136,0.132-0.229V5.637c0-0.095,0.05-0.183,0.132-0.229l0.555-0.32c0.041-0.023,0.086-0.035,0.132-0.035c0.045,0,0.092,0.012,0.132,0.035l0.555,0.32c0.082,0.047,0.133,0.135,0.133,0.229v1.588c0,0.094,0.051,0.182,0.132,0.229l1.303,0.746c0.041,0.024,0.092,0.024,0.132,0c0.041-0.022,0.066-0.067,0.066-0.114l0.004-3.398C4.915,4.593,4.865,4.505,4.783,4.458zM17.93,0.745l-1.305-0.729c-0.042-0.023-0.091-0.022-0.132,0.001c-0.041,0.024-0.065,0.067-0.065,0.114v3.365c0,0.033-0.018,0.064-0.046,0.081s-0.064,0.017-0.093,0l-0.549-0.316c-0.082-0.047-0.183-0.047-0.265,0l-2.193,1.266c-0.082,0.047-0.133,0.135-0.133,0.229V7.29c0,0.095,0.051,0.182,0.132,0.229l2.194,1.267c0.082,0.048,0.183,0.048,0.265,0l2.194-1.267c0.082-0.048,0.133-0.135,0.133-0.229V0.977C18.066,0.88,18.014,0.792,17.93,0.745zM16.421,6.458c0,0.023-0.013,0.045-0.033,0.057l-0.753,0.435c-0.021,0.012-0.045,0.012-0.066,0l-0.753-0.435c-0.021-0.012-0.033-0.034-0.033-0.057v-0.87c0-0.023,0.013-0.045,0.033-0.058l0.753-0.435c0.021-0.012,0.045-0.012,0.066,0l0.753,0.435c0.021,0.012,0.033,0.034,0.033,0.058V6.458zM24.473,4.493l-2.18-1.266c-0.082-0.047-0.183-0.048-0.265,0l-2.193,1.266c-0.082,0.047-0.132,0.135-0.132,0.229v2.532c0,0.096,0.051,0.184,0.133,0.23l2.18,1.242c0.08,0.045,0.179,0.046,0.26,0.001l1.318-0.732c0.042-0.023,0.067-0.067,0.068-0.115c0-0.048-0.025-0.092-0.066-0.116l-2.207-1.266c-0.041-0.023-0.066-0.067-0.066-0.115V5.59c0-0.047,0.025-0.091,0.065-0.115l0.688-0.396c0.041-0.024,0.091-0.024,0.132,0l0.688,0.396c0.041,0.023,0.066,0.067,0.066,0.115v0.625c0,0.047,0.025,0.091,0.066,0.114c0.041,0.024,0.092,0.024,0.132,0l1.314-0.764c0.081-0.047,0.132-0.135,0.132-0.229V4.722C24.605,4.628,24.555,4.541,24.473,4.493zM11.363,4.48L9.169,3.214c-0.082-0.047-0.183-0.047-0.265,0L6.711,4.48C6.629,4.527,6.579,4.615,6.579,4.709v2.534c0,0.095,0.051,0.182,0.133,0.229l2.193,1.267c0.082,0.048,0.183,0.048,0.265,0l2.193-1.267c0.082-0.048,0.132-0.135,0.132-0.229V4.709C11.495,4.615,11.445,4.527,11.363,4.48zM31.019,4.382L28.95,3.187c-0.13-0.074-0.304-0.074-0.435,0l-2.068,1.195c-0.135,0.077-0.218,0.222-0.218,0.377v2.386c0,0.156,0.083,0.301,0.218,0.378l0.542,0.312c0.263,0.13,0.356,0.13,0.477,0.13c0.389,0,0.612-0.236,0.612-0.646V4.962c0-0.033-0.027-0.06-0.06-0.06h-0.263c-0.033,0-0.061,0.026-0.061,0.06v2.356c0,0.182-0.188,0.363-0.495,0.209l-0.566-0.326c-0.021-0.012-0.033-0.033-0.033-0.057V4.759c0-0.023,0.013-0.045,0.033-0.057l2.067-1.193c0.019-0.011,0.044-0.011,0.063,0l2.067,1.193c0.02,0.012,0.032,0.034,0.032,0.057v2.386c0,0.023-0.013,0.046-0.032,0.057l-2.068,1.193c-0.018,0.012-0.045,0.012-0.063,0l-0.53-0.314c-0.017-0.01-0.036-0.013-0.052-0.004c-0.146,0.083-0.175,0.094-0.312,0.143c-0.034,0.012-0.084,0.031,0.019,0.09l0.691,0.408c0.065,0.038,0.141,0.059,0.217,0.059s0.151-0.021,0.218-0.059l2.068-1.194c0.134-0.078,0.217-0.222,0.217-0.378V4.759C31.235,4.604,31.152,4.459,31.019,4.382zM29.371,6.768c-0.548,0-0.668-0.138-0.708-0.41c-0.005-0.029-0.029-0.051-0.06-0.051h-0.268c-0.033,0-0.06,0.026-0.06,0.06c0,0.349,0.189,0.765,1.095,0.765c0.655,0,1.031-0.259,1.031-0.709c0-0.447-0.302-0.566-0.938-0.65c-0.643-0.085-0.708-0.128-0.708-0.279c0-0.125,0.056-0.29,0.531-0.29c0.425,0,0.581,0.091,0.646,0.378c0.006,0.027,0.03,0.047,0.059,0.047h0.269c0.017,0,0.032-0.007,0.044-0.019c0.011-0.013,0.017-0.029,0.016-0.046c-0.042-0.493-0.37-0.723-1.032-0.723c-0.59,0-0.941,0.249-0.941,0.666c0,0.453,0.35,0.578,0.916,0.634c0.677,0.066,0.729,0.166,0.729,0.298C29.992,6.669,29.807,6.768,29.371,6.768zM22.128,5.446l-0.42,0.243c-0.016,0.009-0.025,0.026-0.025,0.044v0.486c0,0.019,0.01,0.035,0.025,0.044l0.42,0.243c0.016,0.009,0.035,0.009,0.052,0l0.421-0.243c0.016-0.009,0.025-0.025,0.025-0.044V5.733c0-0.018-0.01-0.035-0.025-0.044L22.18,5.446C22.163,5.438,22.144,5.438,22.128,5.446z",jquery:"M10.322,23.041C4.579,18.723,2.777,11.07,5.494,4.583c-0.254,0.291-0.502,0.59-0.739,0.904c-5.177,6.887-4.008,16.505,2.613,21.482c6.62,4.979,16.184,3.432,21.362-3.455c0.237-0.314,0.454-0.635,0.663-0.959C23.915,26.963,16.064,27.357,10.322,23.041zM13.662,18.598c4.765,3.582,11.604,2.564,15.567-2.198c-3.609,2.641-9.09,2.475-13.361-0.736S9.916,7.231,11.451,3.03C7.976,8.161,8.897,15.015,13.662,18.598zM18.642,11.976c3.254,2.447,8.146,1.438,10.967-2.242c-2.604,1.921-6.341,1.955-9.157-0.164c-2.819-2.118-3.826-5.718-2.701-8.754C14.998,4.549,15.387,9.528,18.642,11.976z",sencha:"M18.265,22.734c1.365,0.662,2.309,2.062,2.309,3.682c0,1.566-0.881,2.928-2.176,3.615l1.922-0.98c3.16-1.58,5.332-4.846,5.332-8.617c0-3.719-2.109-6.945-5.195-8.547l-6.272-3.144c-1.366-0.662-2.308-2.062-2.308-3.682c0-1.567,0.881-2.928,2.175-3.614L12.13,2.428c-3.161,1.578-5.332,4.843-5.332,8.616c0,3.718,2.108,6.944,5.195,8.546L18.265,22.734z",vim:"M25.012,10.44l4.571-4.645c0.11-0.113,0.173-0.264,0.173-0.423V3.134c0-0.159-0.064-0.314-0.177-0.427l-0.604-0.602c-0.111-0.112-0.261-0.176-0.42-0.177l-9.646-0.086C18.71,1.84,18.523,1.935,18.41,2.099L17.807,2.96c-0.033,0.047-0.059,0.099-0.076,0.154l-2.144-2.156l0,0l-1.646,1.666l-0.447-0.497c-0.112-0.125-0.27-0.197-0.438-0.199L3.324,1.756c-0.163-0.003-0.322,0.06-0.437,0.176L2.284,2.535C2.171,2.647,2.107,2.803,2.107,2.962v2.325c0,0.164,0.066,0.32,0.183,0.434l0.657,0.635C3.056,6.461,3.2,6.521,3.352,6.525l0.285,0.007l0.007,6.512l-2.527,2.557l2.533,2.533l0.008,8.084c0,0.159,0.065,0.314,0.177,0.427l0.861,0.861c0.112,0.111,0.268,0.176,0.427,0.176h2.67c0.161,0,0.317-0.064,0.43-0.181l2.378-2.417l4.9,4.9l14.47-14.558L25.012,10.44zM9.747,24.232l-2.208,2.242H5.372l-0.509-0.509L4.856,19.34l-0.008-7.515L4.842,5.943c0-0.328-0.261-0.594-0.588-0.603L3.617,5.326L3.313,5.031v-1.82l0.245-0.245l9.215,0.163l0.319,0.354l0.126,0.141v1.419l-0.352,0.362H12.26c-0.331,0-0.6,0.266-0.603,0.597l-0.076,7.203c-0.002,0.244,0.141,0.463,0.365,0.56c0.224,0.096,0.482,0.049,0.657-0.12l7.495-7.235c0.174-0.171,0.23-0.432,0.139-0.66c-0.09-0.228-0.312-0.377-0.56-0.377h-0.479l-0.296-0.379V3.496l0.312-0.445l9.083,0.081l0.252,0.252v1.743l-4.388,4.458L9.747,24.232z",inkscape:"M20.402,17.626c0.84-0.772,2.468-0.381,5.979-1.853c1.716-0.72,1.572-1.265,1.566-1.928c-0.001-0.014,0-0.027,0-0.041h-0.005c-0.012-0.667-0.291-1.332-0.846-1.845L17.049,2.684c-0.566-0.522-1.304-0.782-2.042-0.782V1.898c-0.738,0-1.475,0.261-2.04,0.783l-10.05,9.276c-0.554,0.512-0.832,1.176-0.843,1.844H2.07c0,0,0.003,0.011,0.004,0.011c0,0.012-0.004,0.024-0.004,0.034h0.017c0.193,0.676,5.164,1.536,5.718,2.049c0.838,0.774-3.211,1.339-2.374,2.114c0.838,0.773,5.062,1.496,5.898,2.271c0.838,0.771-1.711,1.596-0.874,2.366c0.837,0.773,3.651-0.191,3.142,1.822c1.13,1.045,3.49,0.547,5.071-0.498c0.837-0.771-1.607-0.703-0.77-1.477c0.836-0.774,2.949-0.777,4.73-2.627C21.913,18.838,19.566,18.398,20.402,17.626zM10.973,16.868l-0.42-0.504c1.497,0.358,3.162,0.827,4.498,0.837l0.058,0.554C13.964,17.646,11.544,17.137,10.973,16.868zM18.161,8.58l-1.396-0.74L14.53,9.594l-1.067-3.192l-1.177,2.545L8.998,9.25l0.036-1.352c0-0.324,1.895-2.596,3.05-3.136l2.112-1.401c0.312-0.186,0.53-0.261,0.727-0.257c0.327,0.011,0.593,0.239,1.112,0.55l4.748,3.25c0.357,0.215,0.619,0.522,0.626,0.898l-2.813-1.254L18.161,8.58zM26.434,19.594c-0.313-0.07-1.688-0.691-2.035,0.165c0.968,0.981,2.645,2.181,3.316,1.482C28.391,20.543,27.102,19.745,26.434,19.594zM4.663,21.566c-0.315,0.074-1.842,0.115-1.719,1.021c1.351,0.451,3.438,0.792,3.684-0.113C6.873,21.566,5.33,21.414,4.663,21.566zM17.877,26.396c-0.232,0.209-1.53,0.953-0.929,1.681c1.413-0.236,3.403-0.914,3.12-1.812C19.786,25.369,18.37,25.953,17.877,26.396z",aumade:"M14.513,24.52c-0.131-0.217-0.14-0.481-0.022-0.711l1.987-3.844l0,0c0.186-0.357,0.625-0.497,0.981-0.312c0.357,0.188,0.498,0.625,0.312,0.982l-1.801,3.48l2.228,3.699h12.269l-14.8-25.631L6.433,18.178c0.434,0.242,0.909,0.479,1.391,0.654c0.571,0.211,1.148,0.342,1.658,0.342c0.276,0,0.579-0.078,0.916-0.238c0.337-0.158,0.7-0.396,1.073-0.688c0.749-0.582,1.527-1.354,2.334-2.021c0.539-0.442,1.091-0.844,1.706-1.099c0.352-0.145,0.729-0.239,1.128-0.239c0.622,0,1.174,0.214,1.622,0.5c0.449,0.287,0.813,0.646,1.11,0.995c0.59,0.697,0.902,1.359,0.924,1.394l0,0c0.18,0.361,0.021,0.801-0.341,0.977c-0.356,0.176-0.798,0.021-0.978-0.34c0-0.002-0.002-0.004-0.004-0.007c-0.002-0.011-0.008-0.021-0.018-0.034c-0.018-0.033-0.043-0.082-0.078-0.146c-0.07-0.125-0.179-0.305-0.312-0.496c-0.271-0.391-0.668-0.845-1.092-1.104c-0.281-0.178-0.561-0.272-0.844-0.272c-0.216,0-0.479,0.069-0.788,0.229c-0.309,0.153-0.653,0.396-1.016,0.688c-0.727,0.584-1.511,1.362-2.351,2.033c-0.562,0.445-1.15,0.853-1.809,1.103c-0.375,0.143-0.776,0.229-1.195,0.229c-0.749,0-1.48-0.181-2.164-0.433c-0.58-0.219-1.125-0.482-1.613-0.764L0.86,27.816h15.63L14.513,24.52zM18.214,22.242c0.222-0.557,0.537-1.217,0.963-1.848c0.427-0.627,0.957-1.232,1.646-1.646c0.379-0.229,0.812-0.391,1.282-0.438l-0.604-0.934l0,0c-0.22-0.339-0.123-0.789,0.215-1.009c0.341-0.219,0.789-0.123,1.013,0.216l1.545,2.391c0.184,0.274,0.147,0.646-0.075,0.893c-0.228,0.247-0.591,0.305-0.886,0.145c-0.354-0.191-0.646-0.258-0.901-0.258c-0.291,0-0.562,0.084-0.845,0.25c-0.277,0.164-0.562,0.414-0.813,0.719c-0.519,0.607-0.937,1.422-1.185,2.055c-0.111,0.285-0.387,0.466-0.678,0.466c-0.092,0-0.183-0.021-0.271-0.056C18.249,23.039,18.064,22.615,18.214,22.242z",firefox:"M28.4,22.469c0.479-0.964,0.851-1.991,1.095-3.066c0.953-3.661,0.666-6.854,0.666-6.854l-0.327,2.104c0,0-0.469-3.896-1.044-5.353c-0.881-2.231-1.273-2.214-1.274-2.21c0.542,1.379,0.494,2.169,0.483,2.288c-0.01-0.016-0.019-0.032-0.027-0.047c-0.131-0.324-0.797-1.819-2.225-2.878c-2.502-2.481-5.943-4.014-9.745-4.015c-4.056,0-7.705,1.745-10.238,4.525C5.444,6.5,5.183,5.938,5.159,5.317c0,0-0.002,0.002-0.006,0.005c0-0.011-0.003-0.021-0.003-0.031c0,0-1.61,1.247-1.436,4.612c-0.299,0.574-0.56,1.172-0.777,1.791c-0.375,0.817-0.75,2.004-1.059,3.746c0,0,0.133-0.422,0.399-0.988c-0.064,0.482-0.103,0.971-0.116,1.467c-0.09,0.845-0.118,1.865-0.039,3.088c0,0,0.032-0.406,0.136-1.021c0.834,6.854,6.667,12.165,13.743,12.165l0,0c1.86,0,3.636-0.37,5.256-1.036C24.938,27.771,27.116,25.196,28.4,22.469zM16.002,3.356c2.446,0,4.73,0.68,6.68,1.86c-2.274-0.528-3.433-0.261-3.423-0.248c0.013,0.015,3.384,0.589,3.981,1.411c0,0-1.431,0-2.856,0.41c-0.065,0.019,5.242,0.663,6.327,5.966c0,0-0.582-1.213-1.301-1.42c0.473,1.439,0.351,4.17-0.1,5.528c-0.058,0.174-0.118-0.755-1.004-1.155c0.284,2.037-0.018,5.268-1.432,6.158c-0.109,0.07,0.887-3.189,0.201-1.93c-4.093,6.276-8.959,2.539-10.934,1.208c1.585,0.388,3.267,0.108,4.242-0.559c0.982-0.672,1.564-1.162,2.087-1.047c0.522,0.117,0.87-0.407,0.464-0.872c-0.405-0.466-1.392-1.105-2.725-0.757c-0.94,0.247-2.107,1.287-3.886,0.233c-1.518-0.899-1.507-1.63-1.507-2.095c0-0.366,0.257-0.88,0.734-1.028c0.58,0.062,1.044,0.214,1.537,0.466c0.005-0.135,0.006-0.315-0.001-0.519c0.039-0.077,0.015-0.311-0.047-0.596c-0.036-0.287-0.097-0.582-0.19-0.851c0.01-0.002,0.017-0.007,0.021-0.021c0.076-0.344,2.147-1.544,2.299-1.659c0.153-0.114,0.55-0.378,0.506-1.183c-0.015-0.265-0.058-0.294-2.232-0.286c-0.917,0.003-1.425-0.894-1.589-1.245c0.222-1.231,0.863-2.11,1.919-2.704c0.02-0.011,0.015-0.021-0.008-0.027c0.219-0.127-2.524-0.006-3.76,1.604C9.674,8.045,9.219,7.95,8.71,7.95c-0.638,0-1.139,0.07-1.603,0.187c-0.05,0.013-0.122,0.011-0.208-0.001C6.769,8.04,6.575,7.88,6.365,7.672c0.161-0.18,0.324-0.356,0.495-0.526C9.201,4.804,12.43,3.357,16.002,3.356z", +ie:"M27.998,2.266c-2.12-1.91-6.925,0.382-9.575,1.93c-0.76-0.12-1.557-0.185-2.388-0.185c-3.349,0-6.052,0.985-8.106,2.843c-2.336,2.139-3.631,4.94-3.631,8.177c0,0.028,0.001,0.056,0.001,0.084c3.287-5.15,8.342-7.79,9.682-8.487c0.212-0.099,0.338,0.155,0.141,0.253c-0.015,0.042-0.015,0,0,0c-2.254,1.35-6.434,5.259-9.146,10.886l-0.003-0.007c-1.717,3.547-3.167,8.529-0.267,10.358c2.197,1.382,6.13-0.248,9.295-2.318c0.764,0.108,1.567,0.165,2.415,0.165c5.84,0,9.937-3.223,11.399-7.924l-8.022-0.014c-0.337,1.661-1.464,2.548-3.223,2.548c-2.21,0-3.729-1.211-3.828-4.012l15.228-0.014c0.028-0.578-0.042-0.985-0.042-1.436c0-5.251-3.143-9.355-8.255-10.663c2.081-1.294,5.974-3.209,7.848-1.681c1.407,1.14,0.633,3.533,0.295,4.518c-0.056,0.254,0.24,0.296,0.296,0.057C28.814,5.573,29.026,3.194,27.998,2.266zM13.272,25.676c-2.469,1.475-5.873,2.539-7.539,1.289c-1.243-0.935-0.696-3.468,0.398-5.938c0.664,0.992,1.495,1.886,2.473,2.63C9.926,24.651,11.479,25.324,13.272,25.676zM12.714,13.046c0.042-2.435,1.787-3.49,3.617-3.49c1.928,0,3.49,1.112,3.49,3.49H12.714z",ie9:"M27.751,17.887c0.054-0.434,0.081-0.876,0.081-1.324c0-1.744-0.413-3.393-1.146-4.854c1.133-2.885,1.155-5.369-0.201-6.777c-1.756-1.822-5.391-1.406-9.433,0.721c-0.069-0.001-0.138-0.003-0.206-0.003c-6.069,0-10.988,4.888-10.988,10.917c0,0.183,0.005,0.354,0.014,0.529c-2.688,4.071-3.491,7.967-1.688,9.838c1.557,1.613,4.691,1.344,8.2-0.392c1.363,0.604,2.873,0.938,4.462,0.938c4.793,0,8.867-3.049,10.369-7.299H21.26c-0.814,1.483-2.438,2.504-4.307,2.504c-2.688,0-4.867-2.104-4.867-4.688c0-0.036,0.002-0.071,0.003-0.106h15.662V17.887zM26.337,6.099c0.903,0.937,0.806,2.684-0.087,4.818c-1.27-2.083-3.221-3.71-5.546-4.576C23.244,5.217,25.324,5.047,26.337,6.099zM16.917,10.372c2.522,0,4.585,1.991,4.748,4.509h-9.496C12.333,12.363,14.396,10.372,16.917,10.372zM5.687,26.501c-1.103-1.146-0.712-3.502,0.799-6.298c0.907,2.546,2.736,4.658,5.09,5.938C8.92,27.368,6.733,27.587,5.687,26.501z",opera:"M15.954,2.046c-7.489,0-12.872,5.432-12.872,13.581c0,7.25,5.234,13.835,12.873,13.835c7.712,0,12.974-6.583,12.974-13.835C28.929,7.413,23.375,2.046,15.954,2.046zM15.952,26.548L15.952,26.548c-2.289,0-3.49-1.611-4.121-3.796c-0.284-1.037-0.458-2.185-0.563-3.341c-0.114-1.374-0.129-2.773-0.129-4.028c0-0.993,0.018-1.979,0.074-2.926c0.124-1.728,0.386-3.431,0.89-4.833c0.694-1.718,1.871-2.822,3.849-2.822c2.5,0,3.763,1.782,4.385,4.322c0.429,1.894,0.56,4.124,0.56,6.274c0,2.299-0.103,5.153-0.763,7.442C19.473,24.979,18.242,26.548,15.952,26.548z",chrome:"M15.318,7.677c0.071-0.029,0.148-0.046,0.229-0.046h11.949c-2.533-3.915-6.938-6.506-11.949-6.506c-5.017,0-9.428,2.598-11.959,6.522l4.291,7.431C8.018,11.041,11.274,7.796,15.318,7.677zM28.196,8.84h-8.579c2.165,1.357,3.605,3.763,3.605,6.506c0,1.321-0.334,2.564-0.921,3.649c-0.012,0.071-0.035,0.142-0.073,0.209l-5.973,10.347c7.526-0.368,13.514-6.587,13.514-14.205C29.77,13.002,29.201,10.791,28.196,8.84zM15.547,23.022c-2.761,0-5.181-1.458-6.533-3.646c-0.058-0.046-0.109-0.103-0.149-0.171L2.89,8.855c-1,1.946-1.565,4.153-1.565,6.492c0,7.624,5.999,13.846,13.534,14.205l4.287-7.425C18.073,22.698,16.848,23.022,15.547,23.022zM9.08,15.347c0,1.788,0.723,3.401,1.894,4.573c1.172,1.172,2.785,1.895,4.573,1.895c1.788,0,3.401-0.723,4.573-1.895s1.895-2.785,1.895-4.573c0-1.788-0.723-3.4-1.895-4.573c-1.172-1.171-2.785-1.894-4.573-1.894c-1.788,0-3.401,0.723-4.573,1.894C9.803,11.946,9.081,13.559,9.08,15.347z",safari:"M16.154,5.135c-0.504,0-1,0.031-1.488,0.089l-0.036-0.18c-0.021-0.104-0.06-0.198-0.112-0.283c0.381-0.308,0.625-0.778,0.625-1.306c0-0.927-0.751-1.678-1.678-1.678s-1.678,0.751-1.678,1.678c0,0.745,0.485,1.376,1.157,1.595c-0.021,0.105-0.021,0.216,0,0.328l0.033,0.167C7.645,6.95,3.712,11.804,3.712,17.578c0,6.871,5.571,12.441,12.442,12.441c6.871,0,12.441-5.57,12.441-12.441C28.596,10.706,23.025,5.135,16.154,5.135zM16.369,8.1c4.455,0,8.183,3.116,9.123,7.287l-0.576,0.234c-0.148-0.681-0.755-1.191-1.48-1.191c-0.837,0-1.516,0.679-1.516,1.516c0,0.075,0.008,0.148,0.018,0.221l-2.771-0.028c-0.054-0.115-0.114-0.226-0.182-0.333l3.399-5.11l0.055-0.083l-4.766,4.059c-0.352-0.157-0.74-0.248-1.148-0.256l0.086-0.018l-1.177-2.585c0.64-0.177,1.111-0.763,1.111-1.459c0-0.837-0.678-1.515-1.516-1.515c-0.075,0-0.147,0.007-0.219,0.018l0.058-0.634C15.357,8.141,15.858,8.1,16.369,8.1zM12.146,3.455c0-0.727,0.591-1.318,1.318-1.318c0.727,0,1.318,0.591,1.318,1.318c0,0.425-0.203,0.802-0.516,1.043c-0.183-0.123-0.413-0.176-0.647-0.13c-0.226,0.045-0.413,0.174-0.535,0.349C12.542,4.553,12.146,4.049,12.146,3.455zM7.017,17.452c0-4.443,3.098-8.163,7.252-9.116l0.297,0.573c-0.61,0.196-1.051,0.768-1.051,1.442c0,0.837,0.678,1.516,1.515,1.516c0.068,0,0.135-0.006,0.2-0.015l-0.058,2.845l0.052-0.011c-0.442,0.204-0.824,0.513-1.116,0.895l0.093-0.147l-1.574-0.603l1.172,1.239l0.026-0.042c-0.19,0.371-0.306,0.788-0.324,1.229l-0.003-0.016l-2.623,1.209c-0.199-0.604-0.767-1.041-1.438-1.041c-0.837,0-1.516,0.678-1.516,1.516c0,0.064,0.005,0.128,0.013,0.191l-0.783-0.076C7.063,18.524,7.017,17.994,7.017,17.452zM16.369,26.805c-4.429,0-8.138-3.078-9.106-7.211l0.691-0.353c0.146,0.686,0.753,1.2,1.482,1.2c0.837,0,1.515-0.679,1.515-1.516c0-0.105-0.011-0.207-0.031-0.307l2.858,0.03c0.045,0.095,0.096,0.187,0.15,0.276l-3.45,5.277l0.227-0.195l4.529-3.92c0.336,0.153,0.705,0.248,1.094,0.266l-0.019,0.004l1.226,2.627c-0.655,0.166-1.142,0.76-1.142,1.468c0,0.837,0.678,1.515,1.516,1.515c0.076,0,0.151-0.007,0.225-0.018l0.004,0.688C17.566,26.746,16.975,26.805,16.369,26.805zM18.662,26.521l-0.389-0.6c0.661-0.164,1.152-0.759,1.152-1.47c0-0.837-0.68-1.516-1.516-1.516c-0.066,0-0.13,0.005-0.193,0.014v-2.86l-0.025,0.004c0.409-0.185,0.77-0.459,1.055-0.798l1.516,0.659l-1.104-1.304c0.158-0.335,0.256-0.704,0.278-1.095l2.552-1.164c0.19,0.618,0.766,1.068,1.447,1.068c0.838,0,1.516-0.679,1.516-1.516c0-0.069-0.006-0.137-0.016-0.204l0.65,0.12c0.089,0.517,0.136,1.049,0.136,1.591C25.722,21.826,22.719,25.499,18.662,26.521z",linkedin:"M27.25,3.125h-22c-1.104,0-2,0.896-2,2v22c0,1.104,0.896,2,2,2h22c1.104,0,2-0.896,2-2v-22C29.25,4.021,28.354,3.125,27.25,3.125zM11.219,26.781h-4v-14h4V26.781zM9.219,11.281c-1.383,0-2.5-1.119-2.5-2.5s1.117-2.5,2.5-2.5s2.5,1.119,2.5,2.5S10.602,11.281,9.219,11.281zM25.219,26.781h-4v-8.5c0-0.4-0.403-1.055-0.687-1.213c-0.375-0.211-1.261-0.229-1.665-0.034l-1.648,0.793v8.954h-4v-14h4v0.614c1.583-0.723,3.78-0.652,5.27,0.184c1.582,0.886,2.73,2.864,2.73,4.702V26.781z",flickr:"M21.77,8.895c-2.379,0-4.479,1.174-5.77,2.969c-1.289-1.795-3.39-2.969-5.77-2.969c-3.924,0-7.105,3.181-7.105,7.105c0,3.924,3.181,7.105,7.105,7.105c2.379,0,4.48-1.175,5.77-2.97c1.29,1.795,3.391,2.97,5.77,2.97c3.925,0,7.105-3.182,7.105-7.105C28.875,12.075,25.694,8.895,21.77,8.895zM21.769,21.822c-3.211,0-5.821-2.61-5.821-5.821c0-3.213,2.61-5.824,5.821-5.824c3.213,0,5.824,2.611,5.824,5.824C27.593,19.212,24.981,21.822,21.769,21.822z",github:"M28.436,15.099c-1.201-0.202-2.451-0.335-3.466-0.371l-0.179-0.006c0.041-0.09,0.072-0.151,0.082-0.16c0.022-0.018,0.04-0.094,0.042-0.168c0-0.041,0.018-0.174,0.046-0.35c0.275,0.01,0.64,0.018,1.038,0.021c1.537,0.012,3.145,0.136,4.248,0.331c0.657,0.116,0.874,0.112,0.389-0.006c-0.491-0.119-1.947-0.294-3.107-0.37c-0.779-0.053-1.896-0.073-2.554-0.062c0.019-0.114,0.041-0.241,0.064-0.371c0.093-0.503,0.124-1.009,0.126-2.016c0.002-1.562-0.082-1.992-0.591-3.025c-0.207-0.422-0.441-0.78-0.724-1.104c0.247-0.729,0.241-1.858-0.015-2.848c-0.211-0.812-0.285-0.864-1.021-0.708C22.19,4.019,21.69,4.2,21.049,4.523c-0.303,0.153-0.721,0.391-1.024,0.578c-0.79-0.278-1.607-0.462-2.479-0.561c-0.884-0.1-3.051-0.044-3.82,0.098c-0.752,0.139-1.429,0.309-2.042,0.511c-0.306-0.189-0.75-0.444-1.067-0.604C9.973,4.221,9.473,4.041,8.847,3.908c-0.734-0.157-0.81-0.104-1.02,0.708c-0.26,1.003-0.262,2.151-0.005,2.878C7.852,7.577,7.87,7.636,7.877,7.682c-1.042,1.312-1.382,2.78-1.156,4.829c0.059,0.534,0.15,1.024,0.277,1.473c-0.665-0.004-1.611,0.02-2.294,0.064c-1.162,0.077-2.618,0.25-3.109,0.369c-0.484,0.118-0.269,0.122,0.389,0.007c1.103-0.194,2.712-0.32,4.248-0.331c0.29-0.001,0.561-0.007,0.794-0.013c0.07,0.237,0.15,0.463,0.241,0.678L7.26,14.759c-1.015,0.035-2.264,0.168-3.465,0.37c-0.901,0.151-2.231,0.453-2.386,0.54c-0.163,0.091-0.03,0.071,0.668-0.106c1.273-0.322,2.928-0.569,4.978-0.741l0.229-0.02c0.44,1.022,1.118,1.802,2.076,2.41c0.586,0.373,1.525,0.756,1.998,0.816c0.13,0.016,0.508,0.094,0.84,0.172c0.333,0.078,0.984,0.195,1.446,0.262h0.011c-0.009,0.006-0.017,0.01-0.025,0.016c-0.56,0.291-0.924,0.744-1.169,1.457c-0.11,0.033-0.247,0.078-0.395,0.129c-0.529,0.18-0.735,0.217-1.271,0.221c-0.556,0.004-0.688-0.02-1.02-0.176c-0.483-0.225-0.933-0.639-1.233-1.133c-0.501-0.826-1.367-1.41-2.089-1.41c-0.617,0-0.734,0.25-0.288,0.615c0.672,0.549,1.174,1.109,1.38,1.537c0.116,0.24,0.294,0.611,0.397,0.824c0.109,0.227,0.342,0.535,0.564,0.748c0.522,0.498,1.026,0.736,1.778,0.848c0.504,0.074,0.628,0.074,1.223-0.002c0.287-0.035,0.529-0.076,0.746-0.127c0,0.244,0,0.525,0,0.855c0,1.766-0.021,2.334-0.091,2.5c-0.132,0.316-0.428,0.641-0.716,0.787c-0.287,0.146-0.376,0.307-0.255,0.455c0.067,0.08,0.196,0.094,0.629,0.066c0.822-0.051,1.403-0.355,1.699-0.891c0.095-0.172,0.117-0.518,0.147-2.318c0.032-1.953,0.046-2.141,0.173-2.42c0.077-0.166,0.188-0.346,0.25-0.395c0.104-0.086,0.111,0.084,0.111,2.42c-0.001,2.578-0.027,2.889-0.285,3.385c-0.058,0.113-0.168,0.26-0.245,0.33c-0.135,0.123-0.192,0.438-0.098,0.533c0.155,0.154,0.932-0.088,1.356-0.422c0.722-0.572,0.808-1.045,0.814-4.461l0.003-2.004l0.219,0.021l0.219,0.02l0.036,2.621c0.041,2.951,0.047,2.994,0.549,3.564c0.285,0.322,0.572,0.5,1.039,0.639c0.625,0.188,0.813-0.102,0.393-0.605c-0.457-0.547-0.479-0.756-0.454-3.994c0.017-2.076,0.017-2.076,0.151-1.955c0.282,0.256,0.336,0.676,0.336,2.623c0,2.418,0.069,2.648,0.923,3.07c0.399,0.195,0.511,0.219,1.022,0.221c0.544,0.002,0.577-0.006,0.597-0.148c0.017-0.115-0.05-0.193-0.304-0.348c-0.333-0.205-0.564-0.467-0.709-0.797c-0.055-0.127-0.092-0.959-0.117-2.672c-0.036-2.393-0.044-2.502-0.193-2.877c-0.201-0.504-0.508-0.902-0.897-1.166c-0.101-0.066-0.202-0.121-0.333-0.162c0.161-0.016,0.317-0.033,0.468-0.055c1.572-0.209,2.403-0.383,3.07-0.641c1.411-0.543,2.365-1.445,2.882-2.724c0.046-0.114,0.092-0.222,0.131-0.309l0.398,0.033c2.051,0.173,3.706,0.42,4.979,0.743c0.698,0.177,0.831,0.198,0.668,0.105C30.666,15.551,29.336,15.25,28.436,15.099zM22.422,15.068c-0.233,0.512-0.883,1.17-1.408,1.428c-0.518,0.256-1.33,0.451-2.25,0.544c-0.629,0.064-4.137,0.083-4.716,0.026c-1.917-0.188-2.991-0.557-3.783-1.296c-0.75-0.702-1.1-1.655-1.039-2.828c0.039-0.734,0.216-1.195,0.679-1.755c0.421-0.51,0.864-0.825,1.386-0.985c0.437-0.134,1.778-0.146,3.581-0.03c0.797,0.051,1.456,0.051,2.252,0c1.886-0.119,3.145-0.106,3.61,0.038c0.731,0.226,1.397,0.834,1.797,1.644c0.18,0.362,0.215,0.516,0.241,1.075C22.808,13.699,22.675,14.517,22.422,15.068zM12.912,11.762c-1.073-0.188-1.686,1.649-0.863,2.587c0.391,0.445,0.738,0.518,1.172,0.248c0.402-0.251,0.62-0.72,0.62-1.328C13.841,12.458,13.472,11.862,12.912,11.762zM19.425,11.872c-1.073-0.188-1.687,1.647-0.864,2.586c0.392,0.445,0.738,0.519,1.173,0.247c0.401-0.25,0.62-0.72,0.62-1.328C20.354,12.569,19.985,11.971,19.425,11.872zM16.539,15.484c-0.023,0.074-0.135,0.184-0.248,0.243c-0.286,0.147-0.492,0.096-0.794-0.179c-0.187-0.169-0.272-0.258-0.329-0.081c-0.053,0.164,0.28,0.493,0.537,0.594c0.236,0.094,0.405,0.097,0.661-0.01c0.254-0.106,0.476-0.391,0.476-0.576C16.842,15.303,16.595,15.311,16.539,15.484zM16.222,14.909c0.163-0.144,0.2-0.44,0.044-0.597s-0.473-0.133-0.597,0.043c-0.144,0.206-0.067,0.363,0.036,0.53C15.865,15.009,16.08,15.034,16.222,14.909z",githubalt:"M23.356,17.485c-0.004,0.007-0.007,0.013-0.01,0.021l0.162,0.005c0.107,0.004,0.218,0.01,0.33,0.016c-0.046-0.004-0.09-0.009-0.136-0.013L23.356,17.485zM15.5,1.249C7.629,1.25,1.25,7.629,1.249,15.5C1.25,23.371,7.629,29.75,15.5,29.751c7.871-0.001,14.25-6.38,14.251-14.251C29.75,7.629,23.371,1.25,15.5,1.249zM3.771,17.093c0.849-0.092,1.833-0.148,2.791-0.156c0.262,0,0.507-0.006,0.717-0.012c0.063,0.213,0.136,0.419,0.219,0.613H7.492c-0.918,0.031-2.047,0.152-3.134,0.335c-0.138,0.023-0.288,0.051-0.441,0.08C3.857,17.67,3.81,17.383,3.771,17.093zM12.196,22.224c-0.1,0.028-0.224,0.07-0.357,0.117c-0.479,0.169-0.665,0.206-1.15,0.206c-0.502,0.015-0.621-0.019-0.921-0.17C9.33,22.171,8.923,21.8,8.651,21.353c-0.453-0.746-1.236-1.275-1.889-1.275c-0.559,0-0.664,0.227-0.261,0.557c0.608,0.496,1.062,0.998,1.248,1.385c0.105,0.215,0.266,0.546,0.358,0.744c0.099,0.206,0.311,0.474,0.511,0.676c0.472,0.441,0.928,0.659,1.608,0.772c0.455,0.06,0.567,0.06,1.105-0.004c0.26-0.03,0.479-0.067,0.675-0.118v0.771c0,1.049-0.008,1.628-0.031,1.945c-1.852-0.576-3.507-1.595-4.848-2.934c-1.576-1.578-2.706-3.592-3.195-5.848c0.952-0.176,2.073-0.32,3.373-0.43l0.208-0.018c0.398,0.925,1.011,1.631,1.876,2.179c0.53,0.337,1.38,0.685,1.808,0.733c0.118,0.02,0.46,0.09,0.76,0.16c0.302,0.066,0.89,0.172,1.309,0.236h0.009c-0.007,0.018-0.014,0.02-0.022,0.02C12.747,21.169,12.418,21.579,12.196,22.224zM13.732,27.207c-0.168-0.025-0.335-0.056-0.5-0.087c0.024-0.286,0.038-0.785,0.054-1.723c0.028-1.767,0.041-1.94,0.156-2.189c0.069-0.15,0.17-0.32,0.226-0.357c0.095-0.078,0.101,0.076,0.101,2.188C13.769,26.143,13.763,26.786,13.732,27.207zM15.5,27.339c-0.148,0-0.296-0.006-0.443-0.012c0.086-0.562,0.104-1.428,0.106-2.871l0.003-1.82l0.197,0.019l0.199,0.02l0.032,2.365c0.017,1.21,0.027,1.878,0.075,2.296C15.613,27.335,15.558,27.339,15.5,27.339zM17.006,27.24c-0.039-0.485-0.037-1.243-0.027-2.553c0.019-1.866,0.019-1.866,0.131-1.769c0.246,0.246,0.305,0.623,0.305,2.373c0,0.928,0.011,1.497,0.082,1.876C17.334,27.196,17.17,27.22,17.006,27.24zM27.089,17.927c-0.155-0.029-0.307-0.057-0.446-0.08c-0.96-0.162-1.953-0.275-2.804-0.32c1.25,0.108,2.327,0.248,3.246,0.418c-0.479,2.289-1.618,4.33-3.214,5.928c-1.402,1.4-3.15,2.448-5.106,3.008c-0.034-0.335-0.058-1.048-0.066-2.212c-0.03-2.167-0.039-2.263-0.17-2.602c-0.181-0.458-0.47-0.811-0.811-1.055c-0.094-0.057-0.181-0.103-0.301-0.14c0.145-0.02,0.282-0.021,0.427-0.057c1.418-0.188,2.168-0.357,2.772-0.584c1.263-0.492,2.129-1.301,2.606-2.468c0.044-0.103,0.088-0.2,0.123-0.279l0.011,0.001c0.032-0.07,0.057-0.118,0.064-0.125c0.02-0.017,0.036-0.085,0.038-0.151c0-0.037,0.017-0.157,0.041-0.317c0.249,0.01,0.58,0.018,0.938,0.02c0.959,0.008,1.945,0.064,2.794,0.156C27.194,17.356,27.148,17.644,27.089,17.927zM25.823,16.87c-0.697-0.049-1.715-0.064-2.311-0.057c0.02-0.103,0.037-0.218,0.059-0.336c0.083-0.454,0.111-0.912,0.113-1.823c0.002-1.413-0.074-1.801-0.534-2.735c-0.188-0.381-0.399-0.705-0.655-0.998c0.225-0.659,0.207-1.68-0.02-2.575c-0.19-0.734-0.258-0.781-0.924-0.64c-0.563,0.12-1.016,0.283-1.598,0.576c-0.274,0.138-0.652,0.354-0.923,0.522c-0.715-0.251-1.451-0.419-2.242-0.508c-0.799-0.092-2.759-0.04-3.454,0.089c-0.681,0.126-1.293,0.28-1.848,0.462c-0.276-0.171-0.678-0.4-0.964-0.547C9.944,8.008,9.491,7.846,8.925,7.727c-0.664-0.144-0.732-0.095-0.922,0.64c-0.235,0.907-0.237,1.945-0.004,2.603c0.026,0.075,0.043,0.129,0.05,0.17c-0.942,1.187-1.25,2.515-1.046,4.367c0.053,0.482,0.136,0.926,0.251,1.333c-0.602-0.004-1.457,0.018-2.074,0.057c-0.454,0.031-0.957,0.076-1.418,0.129c-0.063-0.5-0.101-1.008-0.101-1.524c0-3.273,1.323-6.225,3.468-8.372c2.146-2.144,5.099-3.467,8.371-3.467c3.273,0,6.226,1.323,8.371,3.467c2.145,2.147,3.468,5.099,3.468,8.372c0,0.508-0.036,1.008-0.098,1.499C26.78,16.946,26.276,16.899,25.823,16.87z",raphael:"M27.777,18.941c0.584-0.881,0.896-1.914,0.896-2.998c0-1.457-0.567-2.826-1.598-3.854l-6.91-6.911l-0.003,0.002c-0.985-0.988-2.35-1.6-3.851-1.6c-1.502,0-2.864,0.612-3.85,1.6H12.46l-6.911,6.911c-1.031,1.029-1.598,2.398-1.598,3.854c0,1.457,0.567,2.826,1.598,3.854l6.231,6.229c0.25,0.281,0.512,0.544,0.789,0.785c1.016,0.961,2.338,1.49,3.743,1.49c1.456,0,2.825-0.565,3.854-1.598l6.723-6.725c0.021-0.019,0.034-0.032,0.051-0.051l0.14-0.138c0.26-0.26,0.487-0.54,0.688-0.838c0.004-0.008,0.01-0.015,0.014-0.021L27.777,18.941zM26.658,15.946c0,0.678-0.197,1.326-0.561,1.879c-0.222,0.298-0.447,0.559-0.684,0.784L25.4,18.625c-1.105,1.052-2.354,1.35-3.414,1.35c-0.584,0-1.109-0.09-1.523-0.195c-2.422-0.608-5.056-2.692-6.261-5.732c0.649,0.274,1.362,0.426,2.11,0.426c2.811,0,5.129-2.141,5.415-4.877l3.924,3.925C26.301,14.167,26.658,15.029,26.658,15.946zM16.312,5.6c1.89,0,3.426,1.538,3.426,3.427c0,1.89-1.536,3.427-3.426,3.427c-1.889,0-3.426-1.537-3.426-3.427C12.886,7.138,14.423,5.6,16.312,5.6zM6.974,18.375c-0.649-0.648-1.007-1.512-1.007-2.429c0-0.917,0.357-1.78,1.007-2.428l2.655-2.656c-0.693,2.359-0.991,4.842-0.831,7.221c0.057,0.854,0.175,1.677,0.345,2.46L6.974,18.375zM11.514,11.592c0.583,4.562,4.195,9.066,8.455,10.143c0.693,0.179,1.375,0.265,2.033,0.265c0.01,0,0.02,0,0.027,0l-3.289,3.289c-0.648,0.646-1.512,1.006-2.428,1.006c-0.638,0-1.248-0.177-1.779-0.5l0.001-0.002c-0.209-0.142-0.408-0.295-0.603-0.461c-0.015-0.019-0.031-0.026-0.046-0.043l-0.665-0.664c-1.367-1.567-2.227-3.903-2.412-6.671C10.669,15.856,10.921,13.673,11.514,11.592z",graphael:"M28.833,15.709c0-1.477-0.574-2.862-1.617-3.904l-7.002-7.001l-0.003,0.002c-1.027-1.03-2.445-1.62-3.9-1.62c-1.455,0-2.871,0.59-3.9,1.621l-0.002-0.002l-7,7C4.376,12.836,3.79,14.25,3.79,15.709s0.586,2.873,1.619,3.902l6.312,6.312c0.253,0.285,0.519,0.556,0.8,0.8c1.049,0.989,2.463,1.534,3.908,1.51c1.417-0.021,2.783-0.604,3.785-1.604l6.812-6.812c0.021-0.021,0.035-0.029,0.062-0.062l0.143-0.146c0.271-0.271,0.484-0.562,0.725-0.86l-0.012-0.002C28.516,17.85,28.833,16.805,28.833,15.709zM18.77,25.17c-1.121,1.119-2.917,1.336-4.271,0.514l0.002-0.002c-0.213-0.145-0.414-0.303-0.61-0.471c-0.016-0.016-7.04-7.041-7.04-7.041c-1.34-1.34-1.342-3.584,0-4.92l7-6.998c1.121-1.121,2.908-1.338,4.259-0.512v0.002c0.213,0.141,0.414,0.299,0.604,0.467c0.021,0.016,7.053,7.043,7.053,7.043c0.396,0.388,0.655,0.852,0.818,1.348l-2.607,0.006c-0.537-3.754-3.769-6.641-7.667-6.641c-4.277,0-7.744,3.468-7.745,7.746c0.001,4.277,3.468,7.744,7.745,7.744c3.917,0,7.156-2.91,7.668-6.688l2.638-0.021c-0.16,0.521-0.441,1.02-0.849,1.412L18.77,25.17zM16.312,16.789c0.002,0,0.002,0,0.004,0l5.476-0.02c-0.5,2.562-2.76,4.518-5.48,4.521c-3.084-0.004-5.578-2.5-5.584-5.582c0.006-3.084,2.5-5.58,5.584-5.584c2.708,0.004,4.959,1.929,5.472,4.484l-5.476,0.018c-0.596,0.002-1.078,0.488-1.076,1.084C15.233,16.308,15.715,16.789,16.312,16.789z",svg:"M31.274,15.989c0-2.473-2.005-4.478-4.478-4.478l0,0c0.81-0.811,1.312-1.93,1.312-3.167c0-2.474-2.005-4.479-4.479-4.479c-1.236,0-2.356,0.501-3.167,1.312c0-2.473-2.005-4.478-4.478-4.478c-2.474,0-4.479,2.005-4.479,4.478c-0.811-0.81-1.93-1.312-3.167-1.312c-2.474,0-4.479,2.005-4.479,4.479c0,1.236,0.501,2.356,1.312,3.166c-2.474,0-4.479,2.005-4.479,4.479c0,2.474,2.005,4.479,4.479,4.479c-0.811,0.81-1.312,1.93-1.312,3.167c0,2.473,2.005,4.478,4.479,4.478c1.236,0,2.356-0.501,3.167-1.312c0,2.473,2.005,4.479,4.479,4.479c2.473,0,4.478-2.006,4.478-4.479l0,0c0.811,0.811,1.931,1.312,3.167,1.312c2.474,0,4.478-2.005,4.478-4.478c0-1.237-0.501-2.357-1.312-3.168c0.001,0,0.001,0,0.001,0C29.27,20.467,31.274,18.463,31.274,15.989zM23.583,21.211c0.016,0,0.031-0.001,0.047-0.001c1.339,0,2.424,1.085,2.424,2.425c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-0.017,0.001-0.031,0.001-0.047l-3.541-3.542v5.009c0.457,0.44,0.743,1.06,0.743,1.746c0,1.339-1.086,2.424-2.424,2.424c-1.339,0-2.425-1.085-2.425-2.424c0-0.687,0.286-1.306,0.743-1.746v-5.009l-3.541,3.542c0,0.016,0.001,0.031,0.001,0.047c0,1.338-1.085,2.424-2.424,2.424s-2.424-1.086-2.424-2.424c0-1.34,1.085-2.425,2.424-2.425c0.015,0,0.031,0.001,0.046,0.001l3.542-3.541H6.919c-0.44,0.458-1.06,0.743-1.746,0.743c-1.339,0-2.424-1.085-2.424-2.424s1.085-2.424,2.424-2.424c0.686,0,1.305,0.285,1.746,0.744h5.008l-3.542-3.542c-0.015,0-0.031,0.001-0.046,0.001c-1.339,0-2.424-1.085-2.424-2.424S7.001,5.92,8.34,5.92s2.424,1.085,2.424,2.424c0,0.015-0.001,0.031-0.001,0.046l3.541,3.542V6.924c-0.457-0.441-0.743-1.06-0.743-1.746c0-1.339,1.086-2.425,2.425-2.425c1.338,0,2.424,1.085,2.424,2.425c0,0.686-0.286,1.305-0.743,1.746v5.008l3.541-3.542c0-0.015-0.001-0.031-0.001-0.046c0-1.339,1.085-2.424,2.424-2.424s2.424,1.085,2.424,2.424c0,1.339-1.085,2.424-2.424,2.424c-0.016,0-0.031-0.001-0.047-0.001l-3.541,3.542h5.008c0.441-0.458,1.061-0.744,1.747-0.744c1.338,0,2.423,1.085,2.423,2.424s-1.085,2.424-2.423,2.424c-0.687,0-1.306-0.285-1.747-0.743h-5.008L23.583,21.211z",usb:"M15.5,1.667L13.745,4.74h1.252v15.709L11.8,17.391c-0.205-0.26-0.351-0.601-0.358-0.952c0-1.417-0.001-2.258-0.001-2.568c0.592-0.21,1.02-0.774,1.02-1.444c0-0.849-0.682-1.538-1.521-1.538c-0.84,0-1.521,0.689-1.521,1.538c0,0.67,0.427,1.234,1.019,1.444l-0.001,2.539c0,0.688,0.373,1.409,0.812,1.868c-0.013-0.013-0.027-0.025,0,0c0.011,0.01,3.392,3.245,3.392,3.245c0.205,0.26,0.35,0.6,0.357,0.951v1.776c-1.161,0.236-2.036,1.272-2.036,2.517c0,1.418,1.137,2.566,2.539,2.566c1.403,0,2.54-1.148,2.54-2.566c0-1.244-0.875-2.28-2.038-2.517v-1.746c0-0.005,0-0.009,0-0.014v-3.861c0.008-0.35,0.152-0.689,0.358-0.949c0,0,3.38-3.234,3.392-3.245c0.027-0.026,0.012-0.013,0,0c0.438-0.459,0.811-1.181,0.811-1.869V10.12h1.02V7.046h-3.041v3.075h1.018c0,0-0.002,0.644-0.002,2.476c-0.008,0.351-0.152,0.692-0.357,0.952l-3.198,3.06V4.74h1.254L15.5,1.667z",ethernet:"M22.5,8.5v3.168l3.832,3.832L22.5,19.332V22.5l7-7L22.5,8.5zM8.5,22.5v-3.168L4.667,15.5L8.5,11.668V8.5l-7,7L8.5,22.5zM15.5,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681c0.927,0,1.68-0.754,1.68-1.681C17.18,14.852,16.427,14.101,15.5,14.101zM10.46,14.101c-0.928,0-1.68,0.751-1.68,1.68c0,0.927,0.752,1.681,1.68,1.681s1.68-0.754,1.68-1.681C12.14,14.852,11.388,14.101,10.46,14.101zM20.541,14.101c-0.928,0-1.682,0.751-1.682,1.68c0,0.927,0.754,1.681,1.682,1.681s1.68-0.754,1.68-1.681C22.221,14.852,21.469,14.101,20.541,14.101z",js:"M1,1v30h30V1H1zM17.326,24.398c0,2.92-1.712,4.248-4.209,4.248c-2.255,0-3.564-1.168-4.229-2.576l0,0l0,0l0,0l2.296-1.391c0.443,0.777,0.846,1.442,1.812,1.442c0.926,0,1.511-0.354,1.511-1.771V14.77h2.819V24.398zM23.992,28.646c-2.618,0-4.311-1.248-5.135-2.879l2.295-1.328c0.604,0.979,1.39,1.711,2.779,1.711c1.168,0,1.904-0.584,1.904-1.396c0-0.966-0.766-1.311-2.054-1.865L23.08,22.58c-2.034-0.865-3.383-1.953-3.383-4.249c0-2.114,1.604-3.726,4.128-3.726c1.792,0,3.081,0.625,4.008,2.254l-2.19,1.406c-0.479-0.861-1.006-1.209-1.812-1.209c-0.825,0-1.353,0.521-1.353,1.209c0,0.852,0.521,1.188,1.729,1.711l0.704,0.309c2.396,1.021,3.746,2.07,3.746,4.43C28.664,27.259,26.671,28.646,23.992,28.646z",dribbble:"M16,1.667C8.084,1.667,1.667,8.084,1.667,16S8.084,30.333,16,30.333S30.333,23.916,30.333,16S23.916,1.667,16,1.667zM25.534,8.232c1.7,2.084,2.731,4.732,2.767,7.618c-3.232-0.656-6.14-0.783-8.777-0.38c-0.362-0.825-0.738-1.631-1.125-2.412C22.43,11.542,24.497,9.781,25.534,8.232zM23.955,6.624c-0.877,1.658-3.191,3.232-6.564,4.476c-1.533-2.86-3.115-5.299-4.388-7.033c0.96-0.241,1.964-0.37,2.997-0.37C19.031,3.696,21.809,4.8,23.955,6.624zM10.846,4.831c1.09,1.441,2.751,3.91,4.415,6.967c-3.687,1.073-8.032,1.677-11.282,1.585C4.806,9.581,7.395,6.431,10.846,4.831zM3.696,16c0-0.147,0.006-0.293,0.011-0.439c0.312,0.013,0.632,0.019,0.96,0.019c3.464,0,7.754-0.646,11.484-1.765c0.048-0.015,0.093-0.029,0.14-0.044c0.354,0.704,0.697,1.431,1.033,2.175c-0.516,0.146-1.022,0.314-1.518,0.507c-3.547,1.375-6.512,3.895-9.031,7.678C4.861,21.96,3.696,19.114,3.696,16zM8.388,25.656c2.31-3.574,5.002-5.924,8.209-7.167c0.516-0.2,1.049-0.369,1.594-0.513c1.205,2.996,2.166,6.205,2.559,9.373c-1.462,0.613-3.066,0.953-4.749,0.953C13.128,28.305,10.484,27.312,8.388,25.656zM22.802,26.246c-0.446-2.939-1.321-5.895-2.413-8.686c2.316-0.279,4.881-0.117,7.742,0.485C27.557,21.46,25.574,24.398,22.802,26.246z","500px":"M24.902,13.033c-2.57,0-4.65,2.998-4.65,2.998s-2.141-2.998-4.772-2.998c-2.63,0-3.793,2.691-3.793,2.691s-1.04-2.141-3.365-2.141c-2.095,0-2.351,0.842-2.381,1.009l0.424-2.783h5.077v-2.08H4.529l-1.392,6.865l2.432,0.049c0,0,0.917-1.346,1.896-1.346s1.958,0.917,1.958,2.264c0,1.348-1.04,2.555-2.019,2.555s-1.958-1.023-1.958-1.76H3v0.308c0,2.08,1.835,3.608,4.344,3.608c2.508,0,4.343-1.896,4.343-2.691c0,0,0.795,2.691,3.916,2.691c3.122,0,4.588-2.691,4.588-2.691s2.142,2.691,4.711,2.691c2.568,0,4.099-2.143,4.099-4.771C29,14.868,27.104,13.033,24.902,13.033zM15.511,19.578c-1.285,0-1.958-1.284-1.958-1.957s0.428-1.958,1.896-1.958c1.469,0,2.998,1.958,2.998,1.958S16.795,19.578,15.511,19.578zM24.779,19.578c-1.285,0-2.938-1.957-2.938-1.957s1.531-1.958,2.998-1.958c1.47,0,1.896,1.285,1.896,1.958S26.064,19.578,24.779,19.578z",instagram:"M16,9.904c-3.366,0-6.096,2.729-6.096,6.096c0,3.366,2.729,6.096,6.096,6.096s6.096-2.729,6.096-6.096S19.366,9.904,16,9.904zM16,20.48c-2.475,0-4.48-2.006-4.48-4.48c0-2.474,2.006-4.48,4.48-4.48c2.475,0,4.48,2.006,4.48,4.48C20.48,18.475,18.475,20.48,16,20.48zM24.576,2.321H7.423c-2.848,0-5.156,2.309-5.156,5.157v17.043c0,2.849,2.309,5.155,5.156,5.155h17.153c2.849,0,5.156-2.309,5.156-5.155V7.479C29.732,4.63,27.425,2.321,24.576,2.321zM22.236,5.394c0-0.605,0.49-1.097,1.097-1.097h3.219c0.605,0,1.097,0.491,1.097,1.097v3.219c0,0.605-0.489,1.097-1.097,1.097h-3.219c-0.604,0-1.097-0.491-1.097-1.097V5.394zM28.637,24.521c0,2.237-1.82,4.06-4.061,4.06H7.423c-2.238,0-4.06-1.82-4.06-4.06V10.879H4.19c0.102-0.5,0.544-0.877,1.075-0.877h3.438c0.53,0,0.974,0.377,1.074,0.877h1.498c1.242-1.146,2.9-1.847,4.724-1.847s3.481,0.701,4.724,1.847h7.912v13.643H28.637L28.637,24.521z",android:"M6.13,11.126c-0.894,0-1.624,0.731-1.624,1.624v6.496c0,0.895,0.73,1.624,1.624,1.624c0.893,0,1.624-0.729,1.624-1.624V12.75C7.754,11.856,7.023,11.126,6.13,11.126zM19.516,4.96l1.32-2.035c0.074-0.113,0.042-0.264-0.07-0.338c-0.113-0.074-0.266-0.041-0.34,0.072l-1.367,2.106c-0.93-0.36-1.966-0.561-3.059-0.561c-1.094,0-2.13,0.201-3.058,0.561l-1.368-2.106c-0.073-0.113-0.225-0.145-0.338-0.072c-0.113,0.074-0.145,0.225-0.072,0.338l1.321,2.035c-2.186,1.009-3.674,2.928-3.717,5.138h14.464C23.189,7.888,21.702,5.969,19.516,4.96zM12.898,8.062c-0.459,0-0.832-0.373-0.832-0.832s0.373-0.832,0.832-0.832c0.46,0,0.832,0.373,0.832,0.832S13.358,8.062,12.898,8.062zM19.102,8.062c-0.459,0-0.832-0.373-0.832-0.832s0.373-0.832,0.832-0.832s0.832,0.373,0.832,0.832S19.561,8.062,19.102,8.062zM25.87,11.126c-0.894,0-1.624,0.731-1.624,1.624v6.496c0,0.895,0.73,1.624,1.624,1.624s1.624-0.729,1.624-1.624V12.75C27.494,11.856,26.764,11.126,25.87,11.126zM8.756,22.904c0,0.723,0.591,1.312,1.314,1.312h1.363v3.61c0,0.896,0.731,1.624,1.625,1.624c0.893,0,1.624-0.729,1.624-1.624v-3.611h2.636v3.61c0,0.896,0.729,1.624,1.625,1.624c0.894,0,1.623-0.729,1.623-1.624v-3.61h1.363c0.723,0,1.312-0.591,1.312-1.312V11.07H8.756V22.904z",iOS:"M4.065,21.797h2.236v-8.784H4.065V21.797zM5.184,9.352c-0.739,0-1.245,0.523-1.245,1.208c0,0.667,0.487,1.19,1.227,1.19c0.775,0,1.263-0.523,1.263-1.19C6.41,9.875,5.941,9.352,5.184,9.352zM13.915,9.442c-3.427,0-5.771,2.633-5.771,6.367c0,3.571,2.164,6.186,5.591,6.186c3.355,0,5.826-2.326,5.826-6.402C19.561,12.13,17.468,9.442,13.915,9.442zM13.86,20.21c-2.128,0-3.373-1.966-3.373-4.437c0-2.507,1.172-4.545,3.373-4.545c2.218,0,3.354,2.164,3.354,4.455C17.215,18.227,16.007,20.21,13.86,20.21zM25.695,14.727c-1.622-0.631-2.326-1.064-2.326-2.002c0-0.703,0.613-1.461,2.021-1.461c1.137,0,1.979,0.343,2.416,0.577l0.541-1.785c-0.643-0.325-1.604-0.613-2.933-0.613c-2.633,0-4.293,1.515-4.293,3.499c0,1.75,1.278,2.813,3.282,3.535c1.552,0.559,2.162,1.1,2.162,2.02c0,0.992-0.797,1.659-2.227,1.659c-1.137,0-2.219-0.36-2.938-0.775l-0.484,1.84c0.668,0.396,2.002,0.758,3.28,0.758c3.14,0,4.616-1.688,4.616-3.644C28.835,16.585,27.807,15.521,25.695,14.727z",hp:"M29.936,14.968c-0.178-2.385-0.967-4.726-2.301-6.714c-1.307-1.954-3.107-3.585-5.203-4.657c-1.617-0.853-3.414-1.353-5.229-1.514c-0.412-0.087-0.824,0.006-1.238,0.009c-0.981,2.81-2,5.606-2.989,8.413c0.72,0.013,1.439-0.011,2.158,0.011c0.525,0.021,1.076,0.241,1.366,0.701c0.333,0.519,0.312,1.185,0.104,1.748c-0.978,2.751-1.958,5.5-2.938,8.253c-0.863,0.013-1.727-0.001-2.59,0.007c-0.121-0.002-0.245,0.012-0.36-0.033c1.096-3.021,2.167-6.06,3.249-9.083c-0.516-0.008-1.031,0.003-1.546-0.006c-0.08,0.165-0.136,0.339-0.195,0.513C11.23,15.41,10.227,18.204,9.237,21c-0.047,0.066-0.035,0.229-0.147,0.229c-0.822,0.004-1.645-0.004-2.467,0.002c-0.148-0.002-0.299,0.021-0.443-0.021c2.255-6.256,4.46-12.532,6.716-18.789c-4.407,0.943-8.2,4.242-9.838,8.431c-0.672,1.659-0.965,3.45-1.002,5.233c0.046,0.854,0.106,1.715,0.273,2.562c0.53,2.812,1.964,5.438,4.028,7.408c1.713,1.655,3.863,2.854,6.17,3.452c2.247-6.276,4.479-12.562,6.717-18.851c0.021-0.045,0.064-0.137,0.09-0.183c1.381,0.014,2.766,0.002,4.146,0.006c0.453,0.008,0.918-0.042,1.354,0.095c0.506,0.137,0.979,0.502,1.141,1.018c0.109,0.407,0.029,0.841-0.105,1.229c-0.887,2.574-1.812,5.125-2.729,7.695c-0.229,0.67-0.904,1.09-1.599,1.107c-1.076,0.021-2.147-0.012-3.229,0.014c-0.983,2.762-1.962,5.521-2.945,8.272c0.256,0.104,0.528,0.021,0.794,0.036c0.399,0.027,0.802-0.043,1.198-0.065c2.625-0.239,5.173-1.26,7.242-2.885c1.664-1.304,3.024-2.979,3.953-4.875c0.812-1.64,1.269-3.438,1.396-5.244C29.889,16.234,29.906,15.599,29.936,14.968zM20.422,20.031c0.916-2.659,1.889-5.297,2.818-7.951c-0.398-0.008-0.799,0.002-1.197-0.005c-0.115,0.017-0.268-0.042-0.354,0.055c-0.943,2.636-1.879,5.276-2.822,7.912C19.385,20.045,19.906,20.066,20.422,20.031z",gplus:"M9.208,22.73c-0.292-0.396-0.552-0.795-0.779-1.23c-0.267-0.423-0.399-0.934-0.399-1.527c0-0.354,0.05-0.654,0.152-0.893c0.089-0.251,0.171-0.482,0.248-0.693c-0.459,0.053-0.893,0.078-1.3,0.078c-1.927-0.023-3.444-0.568-4.55-1.636v7.21c0.989-0.453,2.013-0.771,3.073-0.955C7.078,22.874,8.264,22.756,9.208,22.73zM10.311,23.872c-0.257-0.026-0.56-0.039-0.908-0.039c-0.207-0.026-0.734,0-1.584,0.079c-0.837,0.117-1.693,0.309-2.568,0.57c-0.206,0.08-0.496,0.197-0.869,0.354c-0.374,0.171-0.753,0.414-1.139,0.729c-0.247,0.229-0.468,0.479-0.664,0.771v1.104c0,1.026,0.838,1.865,1.869,1.865h10.188c0-0.021,0.002-0.051,0.002-0.068c0-1.021-0.335-1.922-1.004-2.688C12.924,25.812,11.817,24.925,10.311,23.872zM6.751,16.594c0.656,0.514,1.404,0.771,2.247,0.771c1.065-0.039,1.952-0.422,2.662-1.146c0.342-0.514,0.562-1.041,0.66-1.581c0.059-0.54,0.088-0.995,0.088-1.364c0-1.594-0.408-3.202-1.224-4.822c-0.382-0.777-0.886-1.41-1.51-1.897C9.037,6.094,8.304,5.85,7.476,5.824C6.38,5.848,5.468,6.289,4.742,7.146C4.129,8.042,3.837,9.043,3.863,10.15c0,1.463,0.428,2.985,1.284,4.566C5.562,15.453,6.097,16.079,6.751,16.594zM27.553,2.707H4.447c-1.031,0-1.869,0.838-1.869,1.869v2.507c0.118-0.125,0.24-0.25,0.367-0.372c1.15-0.947,2.345-1.565,3.584-1.855c1.227-0.25,2.376-0.375,3.45-0.375h8.087l-2.5,1.458h-2.494c0.254,0.158,0.54,0.388,0.857,0.69c0.304,0.315,0.603,0.703,0.895,1.164c0.279,0.434,0.527,0.946,0.743,1.538c0.177,0.592,0.267,1.282,0.267,2.071c-0.024,1.447-0.343,2.604-0.958,3.472c-0.302,0.421-0.621,0.809-0.958,1.164c-0.374,0.354-0.771,0.718-1.193,1.085c-0.241,0.25-0.464,0.533-0.669,0.848c-0.241,0.329-0.361,0.711-0.361,1.146c0,0.421,0.124,0.769,0.371,1.046c0.21,0.264,0.414,0.493,0.612,0.688l1.372,1.125c0.853,0.688,1.6,1.467,2.243,2.31c0.604,0.854,0.921,1.972,0.943,3.354c0,0.562-0.071,1.106-0.223,1.646H27.54c1.03,0,1.869-0.838,1.869-1.87V4.576C29.422,3.545,28.584,2.707,27.553,2.707zM29.023,10.953h-4.244v4.244h-2.057v-4.244H18.48V8.897h4.242V4.654h2.057v4.243h4.244V10.953z",facebook:"M25.566,2.433H6.433c-2.2,0-4,1.8-4,4v19.135c0,2.199,1.8,4,4,4h19.135c2.199,0,4-1.801,4-4V6.433C29.566,4.232,27.768,2.433,25.566,2.433zM25.309,16.916h-3.218v11.65h-4.819v-11.65h-2.409V12.9h2.409v-2.411c0-3.275,1.359-5.224,5.229-5.224h3.218v4.016h-2.011c-1.504,0-1.604,0.562-1.604,1.608L22.091,12.9h3.644L25.309,16.916z",fitocracy:"M16,10.001c1.93,0,3.5-1.57,3.5-3.5C19.5,4.57,17.93,3,16,3c-1.93,0-3.5,1.57-3.5,3.501C12.5,8.431,14.07,10.001,16,10.001zM23.884,7.772c0,0-2.067-1.923-2.521-0.05c-0.59,2.442-2.745,4.279-5.363,4.279s-4.774-1.837-5.364-4.279c-0.452-1.873-2.52,0.05-2.52,0.05c-2.569,2.213-4.199,5.486-4.199,9.145C3.917,23.59,9.326,29,16,29s12.083-5.41,12.083-12.083C28.083,13.259,26.453,9.986,23.884,7.772zM14.96,16.274l0.807-1.635l0.807,1.635l1.805,0.263l-1.306,1.271l0.309,1.797l-1.614-0.854l-1.614,0.854l0.309-1.797l-1.306-1.271L14.96,16.274zM7.838,21.912c-0.896-1.457-1.421-3.164-1.421-4.995c0-1.832,0.525-3.538,1.42-4.995c1.909,0.862,3.247,2.765,3.247,4.995C11.084,19.146,9.746,21.05,7.838,21.912zM16,26.5c-1.832,0-3.538-0.525-4.995-1.421c0.862-1.908,2.765-3.246,4.995-3.246c2.23,0,4.133,1.338,4.995,3.246C19.538,25.975,17.832,26.5,16,26.5zM24.162,21.912c-1.908-0.862-3.246-2.766-3.246-4.995c0-2.23,1.338-4.133,3.247-4.995c0.896,1.457,1.42,3.164,1.42,4.995S25.059,20.455,24.162,21.912z",opensource:"M15.5,1.125c-8.222,0-14.911,6.689-14.911,14.911c0,6.262,3.88,11.634,9.362,13.839l3.639-9.076c-1.888-0.758-3.222-2.604-3.222-4.763c0-2.834,2.297-5.132,5.131-5.132s5.131,2.298,5.131,5.132c0,2.157-1.334,4.005-3.222,4.763l3.64,9.076c5.479-2.206,9.361-7.578,9.361-13.839C30.41,7.814,23.721,1.125,15.5,1.125z" +};!function(a,b){"object"==typeof exports&&"object"==typeof module?module.exports=b():"function"==typeof define&&define.amd?define(b):"object"==typeof exports?exports.JSONEditor=b():a.JSONEditor=b()}(this,function(){return function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={exports:{},id:d,loaded:!1};return a[d].call(e.exports,e,e.exports,b),e.loaded=!0,e.exports}var c={};return b.m=a,b.c=c,b.p="",b(0)}([function(a,b,c){function d(a,b,c){if(!(this instanceof d))throw new Error('JSONEditor constructor called without "new".');var e=g.getInternetExplorerVersion();if(-1!=e&&9>e)throw new Error("Unsupported browser, IE9 or newer required. Please install the newest version of your browser.");arguments.length&&this._create(a,b,c)}var e=c(1),f=c(2),g=c(3);d.modes={},d.prototype._create=function(a,b,c){this.container=a,this.options=b||{},this.json=c||{};var d=this.options.mode||"tree";this.setMode(d)},d.prototype._delete=function(){},d.prototype.set=function(a){this.json=a},d.prototype.get=function(){return this.json},d.prototype.setText=function(a){this.json=g.parse(a)},d.prototype.getText=function(){return JSON.stringify(this.json)},d.prototype.setName=function(a){this.options||(this.options={}),this.options.name=a},d.prototype.getName=function(){return this.options&&this.options.name},d.prototype.setMode=function(a){var b,c,e=this.container,f=g.extend({},this.options);f.mode=a;var h=d.modes[a];if(!h)throw new Error('Unknown mode "'+f.mode+'"');try{var i="text"==h.data;if(c=this.getName(),b=this[i?"getText":"get"](),this._delete(),g.clear(this),g.extend(this,h.mixin),this.create(e,f),this.setName(c),this[i?"setText":"set"](b),"function"==typeof h.load)try{h.load.call(this)}catch(j){}}catch(j){this._onError(j)}},d.prototype._onError=function(a){if("function"==typeof this.onError&&(g.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(a)),!this.options||"function"!=typeof this.options.error)throw a;this.options.error(a)},d.registerMode=function(a){var b,c;if(g.isArray(a))for(b=0;ba&&c.scrollTop>0?this.autoScrollStep=(d+g-a)/3:a>f-g&&e+c.scrollTop3?(c.scrollTop+=e/3,d.animateCallback=b,d.animateTimeout=setTimeout(h,50)):(b&&b(!0),c.scrollTop=g,delete d.animateTimeout,delete d.animateCallback)};h()}else b&&b(!1)},j._createFrame=function(){function a(a){b._onEvent(a)}this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.container.appendChild(this.frame);var b=this;this.frame.onclick=function(b){var c=b.target;a(b),"BUTTON"==c.nodeName&&b.preventDefault()},this.frame.oninput=a,this.frame.onchange=a,this.frame.onkeydown=a,this.frame.onkeyup=a,this.frame.oncut=a,this.frame.onpaste=a,this.frame.onmousedown=a,this.frame.onmouseup=a,this.frame.onmouseover=a,this.frame.onmouseout=a,i.addEventListener(this.frame,"focus",a,!0),i.addEventListener(this.frame,"blur",a,!0),this.frame.onfocusin=a,this.frame.onfocusout=a,this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var c=document.createElement("button");c.className="expand-all",c.title="Expand all fields",c.onclick=function(){b.expandAll()},this.menu.appendChild(c);var d=document.createElement("button");if(d.title="Collapse all fields",d.className="collapse-all",d.onclick=function(){b.collapseAll()},this.menu.appendChild(d),this.history){var e=document.createElement("button");e.className="undo separator",e.title="Undo last action (Ctrl+Z)",e.onclick=function(){b._onUndo()},this.menu.appendChild(e),this.dom.undo=e;var g=document.createElement("button");g.className="redo",g.title="Redo (Ctrl+Shift+Z)",g.onclick=function(){b._onRedo()},this.menu.appendChild(g),this.dom.redo=g,this.history.onChange=function(){e.disabled=!b.history.canUndo(),g.disabled=!b.history.canRedo()},this.history.onChange()}if(this.options&&this.options.modes&&this.options.modes.length){var j=h.create(this,this.options.modes,this.options.mode);this.menu.appendChild(j),this.dom.modeBox=j}this.options.search&&(this.searchBox=new f(this,this.menu))},j._onUndo=function(){this.history&&(this.history.undo(),this.options.change&&this.options.change())},j._onRedo=function(){this.history&&(this.history.redo(),this.options.change&&this.options.change())},j._onEvent=function(a){var b=a.target;"keydown"==a.type&&this._onKeyDown(a),"focus"==a.type&&(l=b);var c=g.getNodeFromTarget(b);c&&c.onEvent(a)},j._onKeyDown=function(a){var b=a.which||a.keyCode,c=a.ctrlKey,d=a.shiftKey,e=!1;if(9==b&&setTimeout(function(){i.selectContentEditable(l)},0),this.searchBox)if(c&&70==b)this.searchBox.dom.search.focus(),this.searchBox.dom.search.select(),e=!0;else if(114==b||c&&71==b){var f=!0;d?this.searchBox.previous(f):this.searchBox.next(f),e=!0}this.history&&(c&&!d&&90==b?(this._onUndo(),e=!0):c&&d&&90==b&&(this._onRedo(),e=!0)),e&&(a.preventDefault(),a.stopPropagation())},j._createTable=function(){var a=document.createElement("div");a.className="outer",this.contentOuter=a,this.content=document.createElement("div"),this.content.className="tree",a.appendChild(this.content),this.table=document.createElement("table"),this.table.className="tree",this.content.appendChild(this.table);var b;this.colgroupContent=document.createElement("colgroup"),"tree"===this.options.mode&&(b=document.createElement("col"),b.width="24px",this.colgroupContent.appendChild(b)),b=document.createElement("col"),b.width="24px",this.colgroupContent.appendChild(b),b=document.createElement("col"),this.colgroupContent.appendChild(b),this.table.appendChild(this.colgroupContent),this.tbody=document.createElement("tbody"),this.table.appendChild(this.tbody),this.frame.appendChild(a)},a.exports=[{mode:"tree",mixin:j,data:"json"},{mode:"view",mixin:j,data:"json"},{mode:"form",mixin:j,data:"json"}]},function(a,b,c){var d;try{d=c(9)}catch(e){}var f=c(8),g=c(3),h={};h.create=function(a,b){b=b||{},this.options=b,b.indentation?this.indentation=Number(b.indentation):this.indentation=2;var c=b.ace?b.ace:d;this.mode="code"==b.mode?"code":"text","code"==this.mode&&"undefined"==typeof c&&(this.mode="text",g.log("WARNING: Cannot load code editor, Ace library not loaded. Falling back to plain text editor")),this.theme=b.theme||"ace/theme/jsoneditor";var e=this;this.container=a,this.dom={},this.editor=void 0,this.textarea=void 0,this.width=a.clientWidth,this.height=a.clientHeight,this.frame=document.createElement("div"),this.frame.className="jsoneditor",this.frame.onclick=function(a){a.preventDefault()},this.frame.onkeydown=function(a){e._onKeyDown(a)},this.menu=document.createElement("div"),this.menu.className="menu",this.frame.appendChild(this.menu);var h=document.createElement("button");h.className="format",h.title="Format JSON data, with proper indentation and line feeds (Ctrl+\\)",this.menu.appendChild(h),h.onclick=function(){try{e.format()}catch(a){e._onError(a)}};var i=document.createElement("button");if(i.className="compact",i.title="Compact JSON data, remove all whitespaces (Ctrl+Shift+\\)",this.menu.appendChild(i),i.onclick=function(){try{e.compact()}catch(a){e._onError(a)}},this.options&&this.options.modes&&this.options.modes.length){var j=f.create(this,this.options.modes,this.options.mode);this.menu.appendChild(j),this.dom.modeBox=j}if(this.content=document.createElement("div"),this.content.className="outer",this.frame.appendChild(this.content),this.container.appendChild(this.frame),"code"==this.mode){this.editorDom=document.createElement("div"),this.editorDom.style.height="100%",this.editorDom.style.width="100%",this.content.appendChild(this.editorDom);var k=c.edit(this.editorDom);k.setTheme(this.theme),k.setShowPrintMargin(!1),k.setFontSize(13),k.getSession().setMode("ace/mode/json"),k.getSession().setTabSize(this.indentation),k.getSession().setUseSoftTabs(!0),k.getSession().setUseWrapMode(!0),this.editor=k;var l=document.createElement("a");l.appendChild(document.createTextNode("powered by ace")),l.href="http://ace.ajax.org",l.target="_blank",l.className="poweredBy",l.onclick=function(){window.open(l.href,l.target)},this.menu.appendChild(l),b.change&&k.on("change",function(){b.change()})}else{var m=document.createElement("textarea");m.className="text",m.spellcheck=!1,this.content.appendChild(m),this.textarea=m,b.change&&(null===this.textarea.oninput?this.textarea.oninput=function(){b.change()}:this.textarea.onchange=function(){b.change()})}},h._onKeyDown=function(a){var b=a.which||a.keyCode,c=!1;220==b&&a.ctrlKey&&(a.shiftKey?this.compact():this.format(),c=!0),c&&(a.preventDefault(),a.stopPropagation())},h._delete=function(){this.frame&&this.container&&this.frame.parentNode==this.container&&this.container.removeChild(this.frame)},h._onError=function(a){if("function"==typeof this.onError&&(g.log("WARNING: JSONEditor.onError is deprecated. Use options.error instead."),this.onError(a)),!this.options||"function"!=typeof this.options.error)throw a;this.options.error(a)},h.compact=function(){var a=this.get(),b=JSON.stringify(a);this.setText(b)},h.format=function(){var a=this.get(),b=JSON.stringify(a,null,this.indentation);this.setText(b)},h.focus=function(){this.textarea&&this.textarea.focus(),this.editor&&this.editor.focus()},h.resize=function(){if(this.editor){var a=!1;this.editor.resize(a)}},h.set=function(a){this.setText(JSON.stringify(a,null,this.indentation))},h.get=function(){var a,b=this.getText();try{a=g.parse(b)}catch(c){b=g.sanitize(b),a=g.parse(b)}return a},h.getText=function(){return this.textarea?this.textarea.value:this.editor?this.editor.getValue():""},h.setText=function(a){this.textarea&&(this.textarea.value=a),this.editor&&this.editor.setValue(a,-1)},a.exports=[{mode:"text",mixin:h,data:"text",load:h.format},{mode:"code",mixin:h,data:"text",load:h.format}]},function(a,b,c){var d=c(12);b.parse=function(a){try{return JSON.parse(a)}catch(c){throw b.validate(a),c}},b.sanitize=function(a){function b(){return a.charAt(j)}function c(){return a.charAt(j+1)}function d(){return a.charAt(j-1)}function e(){for(var b=j-1;b>=0;){var c=a.charAt(b);if("{"===c)return!0;if(" "!==c&&"\n"!==c&&"\r"!==c)return!1;b--}return!1}function f(){for(j+=2;jd;d++){var f=c[d];f.style&&f.removeAttribute("style");var g=f.attributes;if(g)for(var h=g.length-1;h>=0;h--){var i=g[h];i.specified===!0&&f.removeAttribute(i.name)}b.stripFormatting(f)}},b.setEndOfContentEditable=function(a){var b,c;document.createRange&&(b=document.createRange(),b.selectNodeContents(a),b.collapse(!1),c=window.getSelection(),c.removeAllRanges(),c.addRange(b))},b.selectContentEditable=function(a){if(a&&"DIV"==a.nodeName){var b,c;window.getSelection&&document.createRange&&(c=document.createRange(),c.selectNodeContents(a),b=window.getSelection(),b.removeAllRanges(),b.addRange(c))}},b.getSelection=function(){if(window.getSelection){var a=window.getSelection();if(a.getRangeAt&&a.rangeCount)return a.getRangeAt(0)}return null},b.setSelection=function(a){if(a&&window.getSelection){var b=window.getSelection();b.removeAllRanges(),b.addRange(a)}},b.getSelectionOffset=function(){var a=b.getSelection();return a&&"startOffset"in a&&"endOffset"in a&&a.startContainer&&a.startContainer==a.endContainer?{startOffset:a.startOffset,endOffset:a.endOffset,container:a.startContainer.parentNode}:null},b.setSelectionOffset=function(a){if(document.createRange&&window.getSelection){var c=window.getSelection();if(c){var d=document.createRange();d.setStart(a.container.firstChild,a.startOffset),d.setEnd(a.container.firstChild,a.endOffset),b.setSelection(d)}}},b.getInnerText=function(a,c){var d=void 0==c;if(d&&(c={text:"",flush:function(){var a=this.text;return this.text="",a},set:function(a){this.text=a}}),a.nodeValue)return c.flush()+a.nodeValue;if(a.hasChildNodes()){for(var e=a.childNodes,f="",g=0,h=e.length;h>g;g++){var i=e[g];if("DIV"==i.nodeName||"P"==i.nodeName){var j=e[g-1],k=j?j.nodeName:void 0;k&&"DIV"!=k&&"P"!=k&&"BR"!=k&&(f+="\n",c.flush()),f+=b.getInnerText(i,c),c.set("\n")}else"BR"==i.nodeName?(f+=c.flush(),c.set("\n")):f+=b.getInnerText(i,c)}return f}return"P"==a.nodeName&&-1!=b.getInternetExplorerVersion()?c.flush():""},b.getInternetExplorerVersion=function(){if(-1==f){var a=-1;if("Microsoft Internet Explorer"==navigator.appName){var b=navigator.userAgent,c=new RegExp("MSIE ([0-9]{1,}[.0-9]{0,})");null!=c.exec(b)&&(a=parseFloat(RegExp.$1))}f=a}return f},b.isFirefox=function(){return-1!=navigator.userAgent.indexOf("Firefox")};var f=-1;b.addEventListener=function(a,c,d,e){if(a.addEventListener)return void 0===e&&(e=!1),"mousewheel"===c&&b.isFirefox()&&(c="DOMMouseScroll"),a.addEventListener(c,d,e),d;if(a.attachEvent){var f=function(){return d.call(a,window.event)};return a.attachEvent("on"+c,f),f}},b.removeEventListener=function(a,c,d,e){a.removeEventListener?(void 0===e&&(e=!1),"mousewheel"===c&&b.isFirefox()&&(c="DOMMouseScroll"),a.removeEventListener(c,d,e)):a.detachEvent&&a.detachEvent("on"+c,d)}},function(a,b,c){function d(){this.locked=!1}d.prototype.highlight=function(a){this.locked||(this.node!=a&&(this.node&&this.node.setHighlight(!1),this.node=a,this.node.setHighlight(!0)),this._cancelUnhighlight())},d.prototype.unhighlight=function(){if(!this.locked){var a=this;this.node&&(this._cancelUnhighlight(),this.unhighlightTimer=setTimeout(function(){a.node.setHighlight(!1),a.node=void 0,a.unhighlightTimer=void 0},0))}},d.prototype._cancelUnhighlight=function(){this.unhighlightTimer&&(clearTimeout(this.unhighlightTimer),this.unhighlightTimer=void 0)},d.prototype.lock=function(){this.locked=!0},d.prototype.unlock=function(){this.locked=!1},a.exports=d},function(a,b,c){function d(a){this.editor=a,this.clear(),this.actions={editField:{undo:function(a){a.node.updateField(a.oldValue)},redo:function(a){a.node.updateField(a.newValue)}},editValue:{undo:function(a){a.node.updateValue(a.oldValue)},redo:function(a){a.node.updateValue(a.newValue)}},appendNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.appendChild(a.node)}},insertBeforeNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.insertBefore(a.node,a.beforeNode)}},insertAfterNode:{undo:function(a){a.parent.removeChild(a.node)},redo:function(a){a.parent.insertAfter(a.node,a.afterNode)}},removeNode:{undo:function(a){var b=a.parent,c=b.childs[a.index]||b.append;b.insertBefore(a.node,c)},redo:function(a){a.parent.removeChild(a.node)}},duplicateNode:{undo:function(a){a.parent.removeChild(a.clone)},redo:function(a){a.parent.insertAfter(a.clone,a.node)}},changeType:{undo:function(a){a.node.changeType(a.oldType)},redo:function(a){a.node.changeType(a.newType)}},moveNode:{undo:function(a){a.startParent.moveTo(a.node,a.startIndex)},redo:function(a){a.endParent.moveTo(a.node,a.endIndex)}},sort:{undo:function(a){var b=a.node;b.hideChilds(),b.sort=a.oldSort,b.childs=a.oldChilds,b.showChilds()},redo:function(a){var b=a.node;b.hideChilds(),b.sort=a.newSort,b.childs=a.newChilds,b.showChilds()}}}}var e=c(3);d.prototype.onChange=function(){},d.prototype.add=function(a,b){this.index++,this.history[this.index]={action:a,params:b,timestamp:new Date},this.index=0},d.prototype.canRedo=function(){return this.indexthis.results.length-1&&(b=0),this._setActiveResult(b,a)}},d.prototype.previous=function(a){if(void 0!=this.results){var b=this.results.length-1,c=void 0!=this.resultIndex?this.resultIndex-1:b;0>c&&(c=b),this._setActiveResult(c,a)}},d.prototype._setActiveResult=function(a,b){if(this.activeResult){var c=this.activeResult.node,d=this.activeResult.elem;"field"==d?delete c.searchFieldActive:delete c.searchValueActive,c.updateDom()}if(!this.results||!this.results[a])return this.resultIndex=void 0,void(this.activeResult=void 0);this.resultIndex=a;var e=this.results[this.resultIndex].node,f=this.results[this.resultIndex].elem;"field"==f?e.searchFieldActive=!0:e.searchValueActive=!0,this.activeResult=this.results[this.resultIndex],e.updateDom(),e.scrollTo(function(){b&&e.focus(f)})},d.prototype._clearDelay=function(){void 0!=this.timeout&&(clearTimeout(this.timeout),delete this.timeout)},d.prototype._onDelayedSearch=function(a){this._clearDelay();var b=this;this.timeout=setTimeout(function(a){b._onSearch(a)},this.delay)},d.prototype._onSearch=function(a,b){this._clearDelay();var c=this.dom.search.value,d=c.length>0?c:void 0;if(d!=this.lastText||b)if(this.lastText=d,this.results=this.editor.search(d),this._setActiveResult(void 0),void 0!=d){var e=this.results.length;switch(e){case 0:this.dom.results.innerHTML="no results";break;case 1:this.dom.results.innerHTML="1 result";break;default:this.dom.results.innerHTML=e+" results"}}else this.dom.results.innerHTML=""},d.prototype._onKeyDown=function(a){var b=a.which;27==b?(this.dom.search.value="",this._onSearch(a),a.preventDefault(),a.stopPropagation()):13==b&&(a.ctrlKey?this._onSearch(a,!0):a.shiftKey?this.previous():this.next(),a.preventDefault(),a.stopPropagation())},d.prototype._onKeyUp=function(a){var b=a.keyCode;27!=b&&13!=b&&this._onDelayedSearch(a)},a.exports=d},function(a,b,c){function d(a,b){this.editor=a,this.dom={},this.expanded=!1,b&&b instanceof Object?(this.setField(b.field,b.fieldEditable),this.setValue(b.value,b.type)):(this.setField(""),this.setValue(null))}var e=c(10),f=c(11),g=c(3);d.prototype._updateEditability=function(){if(this.editable={field:!0,value:!0},this.editor&&(this.editable.field="tree"===this.editor.options.mode,this.editable.value="view"!==this.editor.options.mode,"tree"===this.editor.options.mode&&"function"==typeof this.editor.options.editable)){var a=this.editor.options.editable({field:this.field,value:this.value,path:this.path()});"boolean"==typeof a?(this.editable.field=a,this.editable.value=a):("boolean"==typeof a.field&&(this.editable.field=a.field),"boolean"==typeof a.value&&(this.editable.value=a.value))}},d.prototype.path=function(){for(var a=this,b=[];a;){var c=void 0!=a.field?a.field:a.index;void 0!==c&&b.unshift(c),a=a.parent}return b},d.prototype.setParent=function(a){this.parent=a},d.prototype.setField=function(a,b){this.field=a,this.fieldEditable=b===!0},d.prototype.getField=function(){return void 0===this.field&&this._getDomField(),this.field},d.prototype.setValue=function(a,b){var c,e,f=this.childs;if(f)for(;f.length;)this.removeChild(f[0]);if(this.type=this._getType(a),b&&b!=this.type){if("string"!=b||"auto"!=this.type)throw new Error('Type mismatch: cannot cast value of type "'+this.type+' to the specified type "'+b+'"');this.type=b}if("array"==this.type){this.childs=[];for(var g=0,h=a.length;h>g;g++)c=a[g],void 0===c||c instanceof Function||(e=new d(this.editor,{value:c}),this.appendChild(e));this.value=""}else if("object"==this.type){this.childs=[];for(var i in a)a.hasOwnProperty(i)&&(c=a[i],void 0===c||c instanceof Function||(e=new d(this.editor,{field:i,value:c}),this.appendChild(e)));this.value=""}else this.childs=void 0,this.value=a},d.prototype.getValue=function(){if("array"==this.type){var a=[];return this.childs.forEach(function(b){a.push(b.getValue())}),a}if("object"==this.type){var b={};return this.childs.forEach(function(a){b[a.getField()]=a.getValue()}),b}return void 0===this.value&&this._getDomValue(),this.value},d.prototype.getLevel=function(){return this.parent?this.parent.getLevel()+1:0},d.prototype.clone=function(){var a=new d(this.editor);if(a.type=this.type,a.field=this.field,a.fieldInnerText=this.fieldInnerText,a.fieldEditable=this.fieldEditable,a.value=this.value,a.valueInnerText=this.valueInnerText,a.expanded=this.expanded,this.childs){var b=[];this.childs.forEach(function(c){var d=c.clone();d.setParent(a),b.push(d)}),a.childs=b}else a.childs=void 0;return a},d.prototype.expand=function(a){this.childs&&(this.expanded=!0,this.dom.expand&&(this.dom.expand.className="expanded"),this.showChilds(),a!==!1&&this.childs.forEach(function(b){b.expand(a)}))},d.prototype.collapse=function(a){this.childs&&(this.hideChilds(),a!==!1&&this.childs.forEach(function(b){b.collapse(a)}),this.dom.expand&&(this.dom.expand.className="collapsed"),this.expanded=!1)},d.prototype.showChilds=function(){var a=this.childs;if(a&&this.expanded){var b=this.dom.tr,c=b?b.parentNode:void 0;if(c){var d=this.getAppend(),e=b.nextSibling;e?c.insertBefore(d,e):c.appendChild(d),this.childs.forEach(function(a){c.insertBefore(a.getDom(),d),a.showChilds()})}}},d.prototype.hide=function(){var a=this.dom.tr,b=a?a.parentNode:void 0;b&&b.removeChild(a),this.hideChilds()},d.prototype.hideChilds=function(){var a=this.childs;if(a&&this.expanded){var b=this.getAppend();b.parentNode&&b.parentNode.removeChild(b),this.childs.forEach(function(a){a.hide()})}},d.prototype.appendChild=function(a){if(this._hasChilds()){if(a.setParent(this),a.fieldEditable="object"==this.type,"array"==this.type&&(a.index=this.childs.length),this.childs.push(a),this.expanded){var b=a.getDom(),c=this.getAppend(),d=c?c.parentNode:void 0;c&&d&&d.insertBefore(b,c),a.showChilds()}this.updateDom({updateIndexes:!0}),a.updateDom({recurse:!0})}},d.prototype.moveBefore=function(a,b){if(this._hasChilds()){var c=this.dom.tr?this.dom.tr.parentNode:void 0;if(c){var d=document.createElement("tr");d.style.height=c.clientHeight+"px",c.appendChild(d)}a.parent&&a.parent.removeChild(a),b instanceof h?this.appendChild(a):this.insertBefore(a,b),c&&c.removeChild(d)}},d.prototype.moveTo=function(a,b){if(a.parent==this){var c=this.childs.indexOf(a);b>c&&b++}var d=this.childs[b]||this.append;this.moveBefore(a,d)},d.prototype.insertBefore=function(a,b){if(this._hasChilds()){if(b==this.append)a.setParent(this),a.fieldEditable="object"==this.type,this.childs.push(a);else{var c=this.childs.indexOf(b);if(-1==c)throw new Error("Node not found");a.setParent(this),a.fieldEditable="object"==this.type,this.childs.splice(c,0,a)}if(this.expanded){var d=a.getDom(),e=b.getDom(),f=e?e.parentNode:void 0;e&&f&&f.insertBefore(d,e),a.showChilds()}this.updateDom({updateIndexes:!0}),a.updateDom({recurse:!0})}},d.prototype.insertAfter=function(a,b){if(this._hasChilds()){var c=this.childs.indexOf(b),d=this.childs[c+1];d?this.insertBefore(a,d):this.appendChild(a)}},d.prototype.search=function(a){var b,c=[],d=a?a.toLowerCase():void 0;if(delete this.searchField,delete this.searchValue,void 0!=this.field){var e=String(this.field).toLowerCase();b=e.indexOf(d),-1!=b&&(this.searchField=!0,c.push({node:this,elem:"field"})),this._updateDomField()}if(this._hasChilds()){if(this.childs){var f=[];this.childs.forEach(function(b){f=f.concat(b.search(a))}),c=c.concat(f)}if(void 0!=d){var g=!1;0==f.length?this.collapse(g):this.expand(g)}}else{if(void 0!=this.value){var h=String(this.value).toLowerCase();b=h.indexOf(d),-1!=b&&(this.searchValue=!0,c.push({node:this,elem:"value"}))}this._updateDomValue()}return c},d.prototype.scrollTo=function(a){if(!this.dom.tr||!this.dom.tr.parentNode)for(var b=this.parent,c=!1;b;)b.expand(c),b=b.parent;this.dom.tr&&this.dom.tr.parentNode&&this.editor.scrollTo(this.dom.tr.offsetTop,a)},d.focusElement=void 0,d.prototype.focus=function(a){if(d.focusElement=a,this.dom.tr&&this.dom.tr.parentNode){var b=this.dom;switch(a){case"drag":b.drag?b.drag.focus():b.menu.focus();break;case"menu":b.menu.focus();break;case"expand":this._hasChilds()?b.expand.focus():b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):b.menu.focus(); +break;case"field":b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):this._hasChilds()?b.expand.focus():b.menu.focus();break;case"value":default:b.value&&!this._hasChilds()?(b.value.focus(),g.selectContentEditable(b.value)):b.field&&this.fieldEditable?(b.field.focus(),g.selectContentEditable(b.field)):this._hasChilds()?b.expand.focus():b.menu.focus()}}},d.select=function(a){setTimeout(function(){g.selectContentEditable(a)},0)},d.prototype.blur=function(){this._getDomValue(!1),this._getDomField(!1)},d.prototype._duplicate=function(a){var b=a.clone();return this.insertAfter(b,a),b},d.prototype.containsNode=function(a){if(this==a)return!0;var b=this.childs;if(b)for(var c=0,d=b.length;d>c;c++)if(b[c].containsNode(a))return!0;return!1},d.prototype._move=function(a,b){if(a!=b){if(a.containsNode(this))throw new Error("Cannot move a field into a child of itself");a.parent&&a.parent.removeChild(a);var c=a.clone();a.clearDom(),b?this.insertBefore(c,b):this.appendChild(c)}},d.prototype.removeChild=function(a){if(this.childs){var b=this.childs.indexOf(a);if(-1!=b){a.hide(),delete a.searchField,delete a.searchValue;var c=this.childs.splice(b,1)[0];return this.updateDom({updateIndexes:!0}),c}}},d.prototype._remove=function(a){this.removeChild(a)},d.prototype.changeType=function(a){var b=this.type;if(b!=a){if("string"!=a&&"auto"!=a||"string"!=b&&"auto"!=b){var c,d=this.dom.tr?this.dom.tr.parentNode:void 0;c=this.expanded?this.getAppend():this.getDom();var e=c&&c.parentNode?c.nextSibling:void 0;this.hide(),this.clearDom(),this.type=a,"object"==a?(this.childs||(this.childs=[]),this.childs.forEach(function(a,b){a.clearDom(),delete a.index,a.fieldEditable=!0,void 0==a.field&&(a.field="")}),("string"==b||"auto"==b)&&(this.expanded=!0)):"array"==a?(this.childs||(this.childs=[]),this.childs.forEach(function(a,b){a.clearDom(),a.fieldEditable=!1,a.index=b}),("string"==b||"auto"==b)&&(this.expanded=!0)):this.expanded=!1,d&&(e?d.insertBefore(this.getDom(),e):d.appendChild(this.getDom())),this.showChilds()}else this.type=a;("auto"==a||"string"==a)&&("string"==a?this.value=String(this.value):this.value=this._stringCast(String(this.value)),this.focus()),this.updateDom({updateIndexes:!0})}},d.prototype._getDomValue=function(a){if(this.dom.value&&"array"!=this.type&&"object"!=this.type&&(this.valueInnerText=g.getInnerText(this.dom.value)),void 0!=this.valueInnerText)try{var b;if("string"==this.type)b=this._unescapeHTML(this.valueInnerText);else{var c=this._unescapeHTML(this.valueInnerText);b=this._stringCast(c)}if(b!==this.value){var d=this.value;this.value=b,this.editor._onAction("editValue",{node:this,oldValue:d,newValue:b,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(e){if(this.value=void 0,a!==!0)throw e}},d.prototype._updateDomValue=function(){var a=this.dom.value;if(a){var b=this.value,c="auto"==this.type?g.type(b):this.type,d="string"==c&&g.isUrl(b),e="";e=d&&!this.editable.value?"":"string"==c?"green":"number"==c?"red":"boolean"==c?"darkorange":this._hasChilds()?"":null===b?"#004ED0":"black",a.style.color=e;var f=""==String(this.value)&&"array"!=this.type&&"object"!=this.type;if(f?g.addClassName(a,"empty"):g.removeClassName(a,"empty"),d?g.addClassName(a,"url"):g.removeClassName(a,"url"),"array"==c||"object"==c){var h=this.childs?this.childs.length:0;a.title=this.type+" containing "+h+" items"}else"string"==c&&g.isUrl(b)?this.editable.value&&(a.title="Ctrl+Click or Ctrl+Enter to open url in new window"):a.title="";this.searchValueActive?g.addClassName(a,"highlight-active"):g.removeClassName(a,"highlight-active"),this.searchValue?g.addClassName(a,"highlight"):g.removeClassName(a,"highlight"),g.stripFormatting(a)}},d.prototype._updateDomField=function(){var a=this.dom.field;if(a){var b=""==String(this.field)&&"array"!=this.parent.type;b?g.addClassName(a,"empty"):g.removeClassName(a,"empty"),this.searchFieldActive?g.addClassName(a,"highlight-active"):g.removeClassName(a,"highlight-active"),this.searchField?g.addClassName(a,"highlight"):g.removeClassName(a,"highlight"),g.stripFormatting(a)}},d.prototype._getDomField=function(a){if(this.dom.field&&this.fieldEditable&&(this.fieldInnerText=g.getInnerText(this.dom.field)),void 0!=this.fieldInnerText)try{var b=this._unescapeHTML(this.fieldInnerText);if(b!==this.field){var c=this.field;this.field=b,this.editor._onAction("editField",{node:this,oldValue:c,newValue:b,oldSelection:this.editor.selection,newSelection:this.editor.getSelection()})}}catch(d){if(this.field=void 0,a!==!0)throw d}},d.prototype.clearDom=function(){this.dom={}},d.prototype.getDom=function(){var a=this.dom;if(a.tr)return a.tr;if(this._updateEditability(),a.tr=document.createElement("tr"),a.tr.node=this,"tree"===this.editor.options.mode){var b=document.createElement("td");if(this.editable.field&&this.parent){var c=document.createElement("button");a.drag=c,c.className="dragarea",c.title="Drag to move this field (Alt+Shift+Arrows)",b.appendChild(c)}a.tr.appendChild(b);var d=document.createElement("td"),e=document.createElement("button");a.menu=e,e.className="contextmenu",e.title="Click to open the actions menu (Ctrl+M)",d.appendChild(a.menu),a.tr.appendChild(d)}var f=document.createElement("td");return a.tr.appendChild(f),a.tree=this._createDomTree(),f.appendChild(a.tree),this.updateDom({updateIndexes:!0}),a.tr},d.prototype._onDragStart=function(a){var b=this;this.mousemove||(this.mousemove=g.addEventListener(document,"mousemove",function(a){b._onDrag(a)})),this.mouseup||(this.mouseup=g.addEventListener(document,"mouseup",function(a){b._onDragEnd(a)})),this.editor.highlighter.lock(),this.drag={oldCursor:document.body.style.cursor,startParent:this.parent,startIndex:this.parent.childs.indexOf(this),mouseX:a.pageX,level:this.getLevel()},document.body.style.cursor="move",a.preventDefault()},d.prototype._onDrag=function(a){var b,c,e,f,i,j,k,l,m,n,o,p,q,r,s=a.pageY,t=a.pageX,u=!1;if(b=this.dom.tr,m=g.getAbsoluteTop(b),p=b.offsetHeight,m>s){c=b;do c=c.previousSibling,k=d.getNodeFromTarget(c),n=c?g.getAbsoluteTop(c):0;while(c&&n>s);k&&!k.parent&&(k=void 0),k||(j=b.parentNode.firstChild,c=j?j.nextSibling:void 0,k=d.getNodeFromTarget(c),k==this&&(k=void 0)),k&&(c=k.dom.tr,n=c?g.getAbsoluteTop(c):0,s>n+p&&(k=void 0)),k&&(k.parent.moveBefore(this,k),u=!0)}else if(i=this.expanded&&this.append?this.append.getDom():this.dom.tr,f=i?i.nextSibling:void 0){o=g.getAbsoluteTop(f),e=f;do l=d.getNodeFromTarget(e),e&&(q=e.nextSibling?g.getAbsoluteTop(e.nextSibling):0,r=e?q-o:0,1==l.parent.childs.length&&l.parent.childs[0]==this&&(m+=23)),e=e.nextSibling;while(e&&s>m+r);if(l&&l.parent){var v=t-this.drag.mouseX,w=Math.round(v/24/2),x=this.drag.level+w,y=l.getLevel();for(c=l.dom.tr.previousSibling;x>y&&c;){if(k=d.getNodeFromTarget(c),k==this||k._isChildOf(this));else{if(!(k instanceof h))break;var z=k.parent.childs;if(!(z.length>1||1==z.length&&z[0]!=this))break;l=d.getNodeFromTarget(c),y=l.getLevel()}c=c.previousSibling}i.nextSibling!=l.dom.tr&&(l.parent.moveBefore(this,l),u=!0)}}u&&(this.drag.mouseX=t,this.drag.level=this.getLevel()),this.editor.startAutoScroll(s),a.preventDefault()},d.prototype._onDragEnd=function(a){var b={node:this,startParent:this.drag.startParent,startIndex:this.drag.startIndex,endParent:this.parent,endIndex:this.parent.childs.indexOf(this)};(b.startParent!=b.endParent||b.startIndex!=b.endIndex)&&this.editor._onAction("moveNode",b),document.body.style.cursor=this.drag.oldCursor,this.editor.highlighter.unlock(),delete this.drag,this.mousemove&&(g.removeEventListener(document,"mousemove",this.mousemove),delete this.mousemove),this.mouseup&&(g.removeEventListener(document,"mouseup",this.mouseup),delete this.mouseup),this.editor.stopAutoScroll(),a.preventDefault()},d.prototype._isChildOf=function(a){for(var b=this.parent;b;){if(b==a)return!0;b=b.parent}return!1},d.prototype._createDomField=function(){return document.createElement("div")},d.prototype.setHighlight=function(a){this.dom.tr&&(this.dom.tr.className=a?"highlight":"",this.append&&this.append.setHighlight(a),this.childs&&this.childs.forEach(function(b){b.setHighlight(a)}))},d.prototype.updateValue=function(a){this.value=a,this.updateDom()},d.prototype.updateField=function(a){this.field=a,this.updateDom()},d.prototype.updateDom=function(a){var b=this.dom.tree;b&&(b.style.marginLeft=24*this.getLevel()+"px");var c=this.dom.field;if(c){this.fieldEditable?(c.contentEditable=this.editable.field,c.spellcheck=!1,c.className="field"):c.className="readonly";var d;d=void 0!=this.index?this.index:void 0!=this.field?this.field:this._hasChilds()?this.type:"",c.innerHTML=this._escapeHTML(d)}var e=this.dom.value;if(e){var f=this.childs?this.childs.length:0;"array"==this.type?e.innerHTML="["+f+"]":"object"==this.type?e.innerHTML="{"+f+"}":e.innerHTML=this._escapeHTML(this.value)}this._updateDomField(),this._updateDomValue(),a&&a.updateIndexes===!0&&this._updateDomIndexes(),a&&a.recurse===!0&&this.childs&&this.childs.forEach(function(b){b.updateDom(a)}),this.append&&this.append.updateDom()},d.prototype._updateDomIndexes=function(){var a=this.dom.value,b=this.childs;a&&b&&("array"==this.type?b.forEach(function(a,b){a.index=b;var c=a.dom.field;c&&(c.innerHTML=b)}):"object"==this.type&&b.forEach(function(a){void 0!=a.index&&(delete a.index,void 0==a.field&&(a.field=""))}))},d.prototype._createDomValue=function(){var a;return"array"==this.type?(a=document.createElement("div"),a.className="readonly",a.innerHTML="[...]"):"object"==this.type?(a=document.createElement("div"),a.className="readonly",a.innerHTML="{...}"):!this.editable.value&&g.isUrl(this.value)?(a=document.createElement("a"),a.className="value",a.href=this.value,a.target="_blank",a.innerHTML=this._escapeHTML(this.value)):(a=document.createElement("div"),a.contentEditable=this.editable.value,a.spellcheck=!1,a.className="value",a.innerHTML=this._escapeHTML(this.value)),a},d.prototype._createDomExpandButton=function(){var a=document.createElement("button");return this._hasChilds()?(a.className=this.expanded?"expanded":"collapsed",a.title="Click to expand/collapse this field (Ctrl+E). \nCtrl+Click to expand/collapse including all childs."):(a.className="invisible",a.title=""),a},d.prototype._createDomTree=function(){var a=this.dom,b=document.createElement("table"),c=document.createElement("tbody");b.style.borderCollapse="collapse",b.className="values",b.appendChild(c);var d=document.createElement("tr");c.appendChild(d);var e=document.createElement("td");e.className="tree",d.appendChild(e),a.expand=this._createDomExpandButton(),e.appendChild(a.expand),a.tdExpand=e;var f=document.createElement("td");f.className="tree",d.appendChild(f),a.field=this._createDomField(),f.appendChild(a.field),a.tdField=f;var g=document.createElement("td");g.className="tree",d.appendChild(g),"object"!=this.type&&"array"!=this.type&&(g.appendChild(document.createTextNode(":")),g.className="separator"),a.tdSeparator=g;var h=document.createElement("td");return h.className="tree",d.appendChild(h),a.value=this._createDomValue(),h.appendChild(a.value),a.tdValue=h,b},d.prototype.onEvent=function(a){var b,c=a.type,d=a.target||a.srcElement,e=this.dom,f=this,h=this._hasChilds();if((d==e.drag||d==e.menu)&&("mouseover"==c?this.editor.highlighter.highlight(this):"mouseout"==c&&this.editor.highlighter.unhighlight()),"mousedown"==c&&d==e.drag&&this._onDragStart(a),"click"==c&&d==e.menu){var i=f.editor.highlighter;i.highlight(f),i.lock(),g.addClassName(e.menu,"selected"),this.showContextMenu(e.menu,function(){g.removeClassName(e.menu,"selected"),i.unlock(),i.unhighlight()})}if("click"==c&&d==e.expand&&h){var j=a.ctrlKey;this._onExpand(j)}var k=e.value;if(d==k)switch(c){case"focus":b=this;break;case"blur":case"change":this._getDomValue(!0),this._updateDomValue(),this.value&&(k.innerHTML=this._escapeHTML(this.value));break;case"input":this._getDomValue(!0),this._updateDomValue();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"click":(a.ctrlKey||!this.editable.value)&&g.isUrl(this.value)&&window.open(this.value,"_blank");break;case"keyup":this._getDomValue(!0),this._updateDomValue();break;case"cut":case"paste":setTimeout(function(){f._getDomValue(!0),f._updateDomValue()},1)}var l=e.field;if(d==l)switch(c){case"focus":b=this;break;case"blur":case"change":this._getDomField(!0),this._updateDomField(),this.field&&(l.innerHTML=this._escapeHTML(this.field));break;case"input":this._getDomField(!0),this._updateDomField();break;case"keydown":case"mousedown":this.editor.selection=this.editor.getSelection();break;case"keyup":this._getDomField(!0),this._updateDomField();break;case"cut":case"paste":setTimeout(function(){f._getDomField(!0),f._updateDomField()},1)}var m=e.tree;if(d==m.parentNode)switch(c){case"click":var n=void 0!=a.offsetX?a.offsetX<24*(this.getLevel()+1):a.pageXd[c]?b:a[c]/g,">").replace(/ /g,"  ").replace(/^ /," ").replace(/ $/," "),c=JSON.stringify(b);return c.substring(1,c.length-1)},d.prototype._unescapeHTML=function(a){var b='"'+this._escapeJSON(a)+'"',c=g.parse(b);return c.replace(/</g,"<").replace(/>/g,">").replace(/ |\u00A0/g," ")},d.prototype._escapeJSON=function(a){for(var b="",c=0,d=a.length;d>c;){var e=a.charAt(c);"\n"==e?b+="\\n":"\\"==e?(b+=e,c++,e=a.charAt(c),-1=='"\\/bfnrtu'.indexOf(e)&&(b+="\\"),b+=e):b+='"'==e?'\\"':e,c++}return b};var h=f(d);a.exports=d},function(a,b,c){function d(a,b,c){function d(b){a.setMode(b);var c=a.dom&&a.dom.modeBox;c&&c.focus()}for(var f={code:{text:"Code",title:"Switch to code highlighter",click:function(){d("code")}},form:{text:"Form",title:"Switch to form editor",click:function(){d("form")}},text:{text:"Text",title:"Switch to plain text editor",click:function(){d("text")}},tree:{text:"Tree",title:"Switch to tree editor",click:function(){d("tree")}},view:{text:"View",title:"Switch to tree view",click:function(){d("view")}}},g=[],h=0;h',h.appendChild(l),e.submenuTitle&&(l.title=e.submenuTitle),k=l}else{var m=document.createElement("div");m.className="expand",i.appendChild(m),k=i}k.onclick=function(){d._onExpandItem(g),k.focus()};var n=[];g.subItems=n;var o=document.createElement("ul");g.ul=o,o.className="menu",o.style.height="0",h.appendChild(o),c(o,n,e.submenu)}else i.innerHTML='
    '+e.text;b.push(g)}})}this.dom={};var d=this,e=this.dom;this.anchor=void 0,this.items=a,this.eventListeners={},this.selection=void 0,this.visibleSubmenu=void 0,this.onClose=b?b.close:void 0;var f=document.createElement("div");f.className="jsoneditor-contextmenu",e.menu=f;var g=document.createElement("ul");g.className="menu",f.appendChild(g),e.list=g,e.items=[];var h=document.createElement("button");e.focusButton=h;var i=document.createElement("li");i.style.overflow="hidden",i.style.height="0",i.appendChild(h),g.appendChild(i),c(g,this.dom.items,a),this.maxHeight=0,a.forEach(function(b){var c=24*(a.length+(b.submenu?b.submenu.length:0));d.maxHeight=Math.max(d.maxHeight,c)})}var e=c(3);d.prototype._getVisibleButtons=function(){var a=[],b=this;return this.dom.items.forEach(function(c){a.push(c.button),c.buttonExpand&&a.push(c.buttonExpand),c.subItems&&c==b.expandedItem&&c.subItems.forEach(function(b){a.push(b.button),b.buttonExpand&&a.push(b.buttonExpand)})}),a},d.visibleMenu=void 0,d.prototype.show=function(a){this.hide();var b=window.innerHeight,c=window.pageYOffset||document.scrollTop||0,f=b+c,g=a.offsetHeight,h=this.maxHeight,i=e.getAbsoluteLeft(a),j=e.getAbsoluteTop(a);f>j+g+h?(this.dom.menu.style.left=i+"px",this.dom.menu.style.top=j+g+"px",this.dom.menu.style.bottom=""):(this.dom.menu.style.left=i+"px",this.dom.menu.style.top="",this.dom.menu.style.bottom=b-j+"px"),document.body.appendChild(this.dom.menu);var k=this,l=this.dom.list;this.eventListeners.mousedown=e.addEventListener(document,"mousedown",function(a){var b=a.target;b==l||k._isChildOf(b,l)||(k.hide(),a.stopPropagation(),a.preventDefault())}),this.eventListeners.mousewheel=e.addEventListener(document,"mousewheel",function(a){a.stopPropagation(),a.preventDefault()}),this.eventListeners.keydown=e.addEventListener(document,"keydown",function(a){k._onKeyDown(a)}),this.selection=e.getSelection(),this.anchor=a,setTimeout(function(){k.dom.focusButton.focus()},0),d.visibleMenu&&d.visibleMenu.hide(),d.visibleMenu=this},d.prototype.hide=function(){this.dom.menu.parentNode&&(this.dom.menu.parentNode.removeChild(this.dom.menu),this.onClose&&this.onClose());for(var a in this.eventListeners)if(this.eventListeners.hasOwnProperty(a)){var b=this.eventListeners[a];b&&e.removeEventListener(document,a,b),delete this.eventListeners[a]}d.visibleMenu==this&&(d.visibleMenu=void 0)},d.prototype._onExpandItem=function(a){var b=this,c=a==this.expandedItem,d=this.expandedItem;if(d&&(d.ul.style.height="0",d.ul.style.padding="",setTimeout(function(){b.expandedItem!=d&&(d.ul.style.display="",e.removeClassName(d.ul.parentNode,"selected"))},300),this.expandedItem=void 0),!c){var f=a.ul;f.style.display="block",f.clientHeight,setTimeout(function(){b.expandedItem==a&&(f.style.height=24*f.childNodes.length+"px",f.style.padding="5px 10px")},0),e.addClassName(f.parentNode,"selected"),this.expandedItem=a}},d.prototype._onKeyDown=function(a){var b,c,d,f,g=a.target,h=a.which,i=!1;27==h?(this.selection&&e.setSelection(this.selection),this.anchor&&this.anchor.focus(),this.hide(),i=!0):9==h?a.shiftKey?(b=this._getVisibleButtons(),c=b.indexOf(g),0==c&&(b[b.length-1].focus(),i=!0)):(b=this._getVisibleButtons(),c=b.indexOf(g),c==b.length-1&&(b[0].focus(),i=!0)):37==h?("expand"==g.className&&(b=this._getVisibleButtons(),c=b.indexOf(g),d=b[c-1],d&&d.focus()),i=!0):38==h?(b=this._getVisibleButtons(),c=b.indexOf(g),d=b[c-1],d&&"expand"==d.className&&(d=b[c-2]),d||(d=b[b.length-1]),d&&d.focus(),i=!0):39==h?(b=this._getVisibleButtons(),c=b.indexOf(g),f=b[c+1],f&&"expand"==f.className&&f.focus(),i=!0):40==h&&(b=this._getVisibleButtons(),c=b.indexOf(g),f=b[c+1],f&&"expand"==f.className&&(f=b[c+2]),f||(f=b[0]),f&&(f.focus(),i=!0),i=!0),i&&(a.stopPropagation(),a.preventDefault())},d.prototype._isChildOf=function(a,b){for(var c=a.parentNode;c;){if(c==b)return!0;c=c.parentNode}return!1},a.exports=d},function(a,b,c){function d(a){function b(a){this.editor=a,this.dom={}}return b.prototype=new a,b.prototype.getDom=function(){var a=this.dom;if(a.tr)return a.tr;this._updateEditability();var b=document.createElement("tr");if(b.node=this,a.tr=b,this.editable.field){a.tdDrag=document.createElement("td");var c=document.createElement("td");a.tdMenu=c;var d=document.createElement("button");d.className="contextmenu",d.title="Click to open the actions menu (Ctrl+M)",a.menu=d,c.appendChild(a.menu)}var e=document.createElement("td"),f=document.createElement("div");return f.innerHTML="(empty)",f.className="readonly",e.appendChild(f),a.td=e,a.text=f,this.updateDom(),b},b.prototype.updateDom=function(){var a=this.dom,b=a.td;b&&(b.style.paddingLeft=24*this.getLevel()+26+"px");var c=a.text;c&&(c.innerHTML="(empty "+this.parent.type+")");var d=a.tr;this.isVisible()?a.tr.firstChild||(a.tdDrag&&d.appendChild(a.tdDrag),a.tdMenu&&d.appendChild(a.tdMenu),d.appendChild(b)):a.tr.firstChild&&(a.tdDrag&&d.removeChild(a.tdDrag),a.tdMenu&&d.removeChild(a.tdMenu),d.removeChild(b))},b.prototype.isVisible=function(){return 0==this.parent.childs.length},b.prototype.showContextMenu=function(b,c){var d=this,e=a.TYPE_TITLES,g=[{text:"Append",title:"Append a new field with type 'auto' (Ctrl+Shift+Ins)",submenuTitle:"Select the type of the field to be appended",className:"insert",click:function(){d._onAppend("","","auto")},submenu:[{text:"Auto",className:"type-auto",title:e.auto,click:function(){d._onAppend("","","auto")}},{text:"Array",className:"type-array",title:e.array,click:function(){d._onAppend("",[])}},{text:"Object",className:"type-object",title:e.object,click:function(){d._onAppend("",{})}},{text:"String",className:"type-string",title:e.string,click:function(){d._onAppend("","","string")}}]}],h=new f(g,{close:c});h.show(b)},b.prototype.onEvent=function(a){var b=a.type,c=a.target||a.srcElement,d=this.dom,f=d.menu;if(c==f&&("mouseover"==b?this.editor.highlighter.highlight(this.parent):"mouseout"==b&&this.editor.highlighter.unhighlight()), +"click"==b&&c==d.menu){var g=this.editor.highlighter;g.highlight(this.parent),g.lock(),e.addClassName(d.menu,"selected"),this.showContextMenu(d.menu,function(){e.removeClassName(d.menu,"selected"),g.unlock(),g.unhighlight()})}"keydown"==b&&this.onKeyDown(a)},b}var e=c(3),f=c(10);a.exports=d},function(a,b,c){var d=function(){var a={trace:function(){},yy:{},symbols_:{error:2,JSONString:3,STRING:4,JSONNumber:5,NUMBER:6,JSONNullLiteral:7,NULL:8,JSONBooleanLiteral:9,TRUE:10,FALSE:11,JSONText:12,JSONValue:13,EOF:14,JSONObject:15,JSONArray:16,"{":17,"}":18,JSONMemberList:19,JSONMember:20,":":21,",":22,"[":23,"]":24,JSONElementList:25,$accept:0,$end:1},terminals_:{2:"error",4:"STRING",6:"NUMBER",8:"NULL",10:"TRUE",11:"FALSE",14:"EOF",17:"{",18:"}",21:":",22:",",23:"[",24:"]"},productions_:[0,[3,1],[5,1],[7,1],[9,1],[9,1],[12,2],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[15,2],[15,3],[20,3],[19,1],[19,3],[16,2],[16,3],[25,1],[25,3]],performAction:function(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:this.$=a.replace(/\\(\\|")/g,"$1").replace(/\\n/g,"\n").replace(/\\r/g,"\r").replace(/\\t/g," ").replace(/\\v/g,"\x0B").replace(/\\f/g,"\f").replace(/\\b/g,"\b");break;case 2:this.$=Number(a);break;case 3:this.$=null;break;case 4:this.$=!0;break;case 5:this.$=!1;break;case 6:return this.$=f[h-1];case 13:this.$={};break;case 14:this.$=f[h-1];break;case 15:this.$=[f[h-2],f[h]];break;case 16:this.$={},this.$[f[h][0]]=f[h][1];break;case 17:this.$=f[h-2],f[h-2][f[h][0]]=f[h][1];break;case 18:this.$=[];break;case 19:this.$=f[h-1];break;case 20:this.$=[f[h]];break;case 21:this.$=f[h-2],f[h-2].push(f[h])}},table:[{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],12:1,13:2,15:7,16:8,17:[1,14],23:[1,15]},{1:[3]},{14:[1,16]},{14:[2,7],18:[2,7],22:[2,7],24:[2,7]},{14:[2,8],18:[2,8],22:[2,8],24:[2,8]},{14:[2,9],18:[2,9],22:[2,9],24:[2,9]},{14:[2,10],18:[2,10],22:[2,10],24:[2,10]},{14:[2,11],18:[2,11],22:[2,11],24:[2,11]},{14:[2,12],18:[2,12],22:[2,12],24:[2,12]},{14:[2,3],18:[2,3],22:[2,3],24:[2,3]},{14:[2,4],18:[2,4],22:[2,4],24:[2,4]},{14:[2,5],18:[2,5],22:[2,5],24:[2,5]},{14:[2,1],18:[2,1],21:[2,1],22:[2,1],24:[2,1]},{14:[2,2],18:[2,2],22:[2,2],24:[2,2]},{3:20,4:[1,12],18:[1,17],19:18,20:19},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:23,15:7,16:8,17:[1,14],23:[1,15],24:[1,21],25:22},{1:[2,6]},{14:[2,13],18:[2,13],22:[2,13],24:[2,13]},{18:[1,24],22:[1,25]},{18:[2,16],22:[2,16]},{21:[1,26]},{14:[2,18],18:[2,18],22:[2,18],24:[2,18]},{22:[1,28],24:[1,27]},{22:[2,20],24:[2,20]},{14:[2,14],18:[2,14],22:[2,14],24:[2,14]},{3:20,4:[1,12],20:29},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:30,15:7,16:8,17:[1,14],23:[1,15]},{14:[2,19],18:[2,19],22:[2,19],24:[2,19]},{3:5,4:[1,12],5:6,6:[1,13],7:3,8:[1,9],9:4,10:[1,10],11:[1,11],13:31,15:7,16:8,17:[1,14],23:[1,15]},{18:[2,17],22:[2,17]},{18:[2,15],22:[2,15]},{22:[2,21],24:[2,21]}],defaultActions:{16:[2,6]},parseError:function(a,b){throw new Error(a)},parse:function(a){function b(a){e.length=e.length-2*a,f.length=f.length-a,g.length=g.length-a}function c(){var a;return a=d.lexer.lex()||1,"number"!=typeof a&&(a=d.symbols_[a]||a),a}var d=this,e=[0],f=[null],g=[],h=this.table,i="",j=0,k=0,l=0,m=2,n=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var o=this.lexer.yylloc;g.push(o),"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var p,q,r,s,t,u,v,w,x,y={};;){if(r=e[e.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(null==p&&(p=c()),s=h[r]&&h[r][p]),"undefined"==typeof s||!s.length||!s[0]){if(!l){x=[];for(u in h[r])this.terminals_[u]&&u>2&&x.push("'"+this.terminals_[u]+"'");var z="";z=this.lexer.showPosition?"Parse error on line "+(j+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+this.terminals_[p]+"'":"Parse error on line "+(j+1)+": Unexpected "+(1==p?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(z,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:o,expected:x})}if(3==l){if(p==n)throw new Error(z||"Parsing halted.");k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,p=c()}for(;!(m.toString()in h[r]);){if(0==r)throw new Error(z||"Parsing halted.");b(1),r=e[e.length-1]}q=p,p=m,r=e[e.length-1],s=h[r]&&h[r][m],l=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:e.push(p),f.push(this.lexer.yytext),g.push(this.lexer.yylloc),e.push(s[1]),p=null,q?(p=q,q=null):(k=this.lexer.yyleng,i=this.lexer.yytext,j=this.lexer.yylineno,o=this.lexer.yylloc,l>0&&l--);break;case 2:if(v=this.productions_[s[1]][1],y.$=f[f.length-v],y._$={first_line:g[g.length-(v||1)].first_line,last_line:g[g.length-1].last_line,first_column:g[g.length-(v||1)].first_column,last_column:g[g.length-1].last_column},t=this.performAction.call(y,i,k,j,this.yy,s[1],f,g),"undefined"!=typeof t)return t;v&&(e=e.slice(0,-1*v*2),f=f.slice(0,-1*v),g=g.slice(0,-1*v)),e.push(this.productions_[s[1]][0]),f.push(y.$),g.push(y._$),w=h[e[e.length-2]][e[e.length-1]],e.push(w);break;case 3:return!0}}return!0}},b=function(){var a={EOF:1,parseError:function(a,b){if(!this.yy.parseError)throw new Error(a);this.yy.parseError(a,b)},setInput:function(a){return this._input=a,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.match+=a,this.matched+=a;var b=a.match(/\n/);return b&&this.yylineno++,this._input=this._input.slice(1),a},unput:function(a){return this._input=a+this._input,this},more:function(){return this._more=!0,this},less:function(a){this._input=this.match.slice(a)+this._input},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,b,c,d,e;this._more||(this.yytext="",this.match="");for(var f=this._currentRules(),g=0;gb[0].length)||(b=c,d=g,this.options.flex));g++);return b?(e=b[0].match(/\n.*/g),e&&(this.yylineno+=e.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:e?e[e.length-1].length-1:this.yylloc.last_column+b[0].length},this.yytext+=b[0],this.match+=b[0],this.yyleng=this.yytext.length,this._more=!1,this._input=this._input.slice(b[0].length),this.matched+=b[0],a=this.performAction.call(this,this.yy,this,f[d],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),a?a:void 0):""===this._input?this.EOF:void this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var a=this.next();return"undefined"!=typeof a?a:this.lex()},begin:function(a){this.conditionStack.push(a)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(a){this.begin(a)}};return a.options={},a.performAction=function(a,b,c,d){switch(c){case 0:break;case 1:return 6;case 2:return b.yytext=b.yytext.substr(1,b.yyleng-2),4;case 3:return 17;case 4:return 18;case 5:return 23;case 6:return 24;case 7:return 22;case 8:return 21;case 9:return 10;case 10:return 11;case 11:return 8;case 12:return 14;case 13:return"INVALID"}},a.rules=[/^(?:\s+)/,/^(?:(-?([0-9]|[1-9][0-9]+))(\.[0-9]+)?([eE][-+]?[0-9]+)?\b)/,/^(?:"(?:\\[\\"bfnrt\/]|\\u[a-fA-F0-9]{4}|[^\\\0-\x09\x0a-\x1f"])*")/,/^(?:\{)/,/^(?:\})/,/^(?:\[)/,/^(?:\])/,/^(?:,)/,/^(?::)/,/^(?:true\b)/,/^(?:false\b)/,/^(?:null\b)/,/^(?:$)/,/^(?:.)/],a.conditions={INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13],inclusive:!0}},a}();return a.lexer=b,a}();b.parser=d,b.parse=d.parse.bind(d)},function(a,b,c){ace.define("ace/theme/jsoneditor",["require","exports","module","ace/lib/dom"],function(a,b,c){b.isDark=!1,b.cssClass="ace-jsoneditor",b.cssText='.ace-jsoneditor .ace_gutter { background: #ebebeb; color: #333 } .ace-jsoneditor.ace_editor { font-family: droid sans mono, consolas, monospace, courier new, courier, sans-serif; line-height: 1.3; } .ace-jsoneditor .ace_print-margin { width: 1px; background: #e8e8e8 } .ace-jsoneditor .ace_scroller { background-color: #FFFFFF } .ace-jsoneditor .ace_text-layer { color: gray } .ace-jsoneditor .ace_variable { color: #1a1a1a } .ace-jsoneditor .ace_cursor { border-left: 2px solid #000000 } .ace-jsoneditor .ace_overwrite-cursors .ace_cursor { border-left: 0px; border-bottom: 1px solid #000000 } .ace-jsoneditor .ace_marker-layer .ace_selection { background: #D5DDF6 } .ace-jsoneditor.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px #FFFFFF; border-radius: 2px } .ace-jsoneditor .ace_marker-layer .ace_step { background: rgb(255, 255, 0) } .ace-jsoneditor .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid #BFBFBF } .ace-jsoneditor .ace_marker-layer .ace_active-line { background: #FFFBD1 } .ace-jsoneditor .ace_gutter-active-line { background-color : #dcdcdc } .ace-jsoneditor .ace_marker-layer .ace_selected-word { border: 1px solid #D5DDF6 } .ace-jsoneditor .ace_invisible { color: #BFBFBF } .ace-jsoneditor .ace_keyword, .ace-jsoneditor .ace_meta, .ace-jsoneditor .ace_support.ace_constant.ace_property-value { color: #AF956F } .ace-jsoneditor .ace_keyword.ace_operator { color: #484848 } .ace-jsoneditor .ace_keyword.ace_other.ace_unit { color: #96DC5F } .ace-jsoneditor .ace_constant.ace_language { color: darkorange } .ace-jsoneditor .ace_constant.ace_numeric { color: red } .ace-jsoneditor .ace_constant.ace_character.ace_entity { color: #BF78CC } .ace-jsoneditor .ace_invalid { color: #FFFFFF; background-color: #FF002A; } .ace-jsoneditor .ace_fold { background-color: #AF956F; border-color: #000000 } .ace-jsoneditor .ace_storage, .ace-jsoneditor .ace_support.ace_class, .ace-jsoneditor .ace_support.ace_function, .ace-jsoneditor .ace_support.ace_other, .ace-jsoneditor .ace_support.ace_type { color: #C52727 } .ace-jsoneditor .ace_string { color: green } .ace-jsoneditor .ace_comment { color: #BCC8BA } .ace-jsoneditor .ace_entity.ace_name.ace_tag, .ace-jsoneditor .ace_entity.ace_other.ace_attribute-name { color: #606060 } .ace-jsoneditor .ace_markup.ace_underline { text-decoration: underline } .ace-jsoneditor .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y }';var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)})},function(a,b,c){!function(){function a(a){var b=function(a,b){return e("",a,b)},f=c;a&&(c[a]||(c[a]={}),f=c[a]),f.define&&f.define.packaged||(d.original=f.define,f.define=d,f.define.packaged=!0),f.acequire&&f.acequire.packaged||(e.original=f.acequire,f.acequire=b,f.acequire.packaged=!0)}var b="ace",c=function(){return this}();if(b||"undefined"==typeof acequirejs){var d=function(a,b,c){return"string"!=typeof a?void(d.original?d.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace())):(2==arguments.length&&(c=b),d.modules||(d.modules={},d.payloads={}),d.payloads[a]=c,void(d.modules[a]=null))},e=function(a,b,c){if("[object Array]"===Object.prototype.toString.call(b)){for(var d=[],f=0,h=b.length;h>f;++f){var i=g(a,b[f]);if(!i&&e.original)return e.original.apply(window,arguments);d.push(i)}c&&c.apply(null,d)}else{if("string"==typeof b){var j=g(a,b);return!j&&e.original?e.original.apply(window,arguments):(c&&c(),j)}if(e.original)return e.original.apply(window,arguments)}},f=function(a,b){if(-1!==b.indexOf("!")){var c=b.split("!");return f(a,c[0])+"!"+f(a,c[1])}if("."==b.charAt(0)){var d=a.split("/").slice(0,-1).join("/");for(b=d+"/"+b;-1!==b.indexOf(".")&&e!=b;){var e=b;b=b.replace(/\/\.\//,"/").replace(/[^\/]+\/\.\.\//,"")}}return b},g=function(a,b){b=f(a,b);var c=d.modules[b];if(!c){if(c=d.payloads[b],"function"==typeof c){var g={},h={id:b,uri:"",exports:g,packaged:!0},i=function(a,c){return e(b,a,c)},j=c(i,g,h);g=j||h.exports,d.modules[b]=g,delete d.payloads[b]}c=d.modules[b]=g||c}return c};a(b)}}(),ace.define("ace/lib/regexp",["require","exports","module"],function(a,b,c){"use strict";function d(a){return(a.global?"g":"")+(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.extended?"x":"")+(a.sticky?"y":"")}function e(a,b,c){if(Array.prototype.indexOf)return a.indexOf(b,c);for(var d=c||0;d1&&e(i,"")>-1&&(c=RegExp(this.source,f.replace.call(d(this),"g","")),f.replace.call(a.slice(i.index),c,function(){for(var a=1;ai.index&&this.lastIndex--}return i},h||(RegExp.prototype.test=function(a){var b=f.exec.call(this,a);return b&&this.global&&!b[0].length&&this.lastIndex>b.index&&this.lastIndex--,!!b}))}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(a,b,c){function d(){}function e(a){try{return Object.defineProperty(a,"sentinel",{}),"sentinel"in a}catch(b){}}function f(a){return a=+a,a!==a?a=0:0!==a&&a!==1/0&&a!==-(1/0)&&(a=(a>0||-1)*Math.floor(Math.abs(a))),a}Function.prototype.bind||(Function.prototype.bind=function(a){var b=this;if("function"!=typeof b)throw new TypeError("Function.prototype.bind called on incompatible "+b);var c=o.call(arguments,1),e=function(){if(this instanceof e){var d=b.apply(this,c.concat(o.call(arguments)));return Object(d)===d?d:this}return b.apply(a,c.concat(o.call(arguments)))};return b.prototype&&(d.prototype=b.prototype,e.prototype=new d,d.prototype=null),e});var g,h,i,j,k,l=Function.prototype.call,m=Array.prototype,n=Object.prototype,o=m.slice,p=l.bind(n.toString),q=l.bind(n.hasOwnProperty);if((k=q(n,"__defineGetter__"))&&(g=l.bind(n.__defineGetter__),h=l.bind(n.__defineSetter__),i=l.bind(n.__lookupGetter__),j=l.bind(n.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function a(a){var b=new Array(a+2);return b[0]=b[1]=0,b}var b,c=[];return c.splice.apply(c,a(20)),c.splice.apply(c,a(26)),b=c.length,c.splice(5,0,"XXX"),b+1==c.length,b+1==c.length?!0:void 0}()){var r=Array.prototype.splice;Array.prototype.splice=function(a,b){return arguments.length?r.apply(this,[void 0===a?0:a,void 0===b?this.length-a:b].concat(o.call(arguments,2))):[]}}else Array.prototype.splice=function(a,b){var c=this.length;a>0?a>c&&(a=c):void 0==a?a=0:0>a&&(a=Math.max(c+a,0)),c>a+b||(b=c-a);var d=this.slice(a,a+b),e=o.call(arguments,2),f=e.length;if(a===c)f&&this.push.apply(this,e);else{var g=Math.min(b,c-a),h=a+g,i=h+f-g,j=c-h,k=c-g;if(h>i)for(var l=0;j>l;++l)this[i+l]=this[h+l];else if(i>h)for(l=j;l--;)this[i+l]=this[h+l];if(f&&a===k)this.length=k,this.push.apply(this,e);else for(this.length=k+f,l=0;f>l;++l)this[a+l]=e[l]}return d};Array.isArray||(Array.isArray=function(a){return"[object Array]"==p(a)});var s=Object("a"),t="a"!=s[0]||!(0 in s);if(Array.prototype.forEach||(Array.prototype.forEach=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=arguments[1],e=-1,f=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError;for(;++e>>0,e=Array(d),f=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var g=0;d>g;g++)g in c&&(e[g]=a.call(f,c[g],g,b));return e}),Array.prototype.filter||(Array.prototype.filter=function(a){var b,c=K(this),d=t&&"[object String]"==p(this)?this.split(""):c,e=d.length>>>0,f=[],g=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var h=0;e>h;h++)h in d&&(b=d[h],a.call(g,b,h,c)&&f.push(b));return f}),Array.prototype.every||(Array.prototype.every=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&!a.call(e,c[f],f,b))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0,e=arguments[1];if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");for(var f=0;d>f;f++)if(f in c&&a.call(e,c[f],f,b))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var e,f=0;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f++];break}if(++f>=d)throw new TypeError("reduce of empty array with no initial value")}for(;d>f;f++)f in c&&(e=a.call(void 0,e,c[f],f,b));return e}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(a){var b=K(this),c=t&&"[object String]"==p(this)?this.split(""):b,d=c.length>>>0;if("[object Function]"!=p(a))throw new TypeError(a+" is not a function");if(!d&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var e,f=d-1;if(arguments.length>=2)e=arguments[1];else for(;;){if(f in c){e=c[f--];break}if(--f<0)throw new TypeError("reduceRight of empty array with no initial value")}do f in this&&(e=a.call(void 0,e,c[f],f,b));while(f--);return e}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(a){var b=t&&"[object String]"==p(this)?this.split(""):K(this),c=b.length>>>0;if(!c)return-1;var d=0;for(arguments.length>1&&(d=f(arguments[1])),d=d>=0?d:Math.max(0,c+d);c>d;d++)if(d in b&&b[d]===a)return d;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(a){var b=t&&"[object String]"==p(this)?this.split(""):K(this),c=b.length>>>0;if(!c)return-1;var d=c-1;for(arguments.length>1&&(d=Math.min(d,f(arguments[1]))),d=d>=0?d:c-Math.abs(d);d>=0;d--)if(d in b&&a===b[d])return d;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||(a.constructor?a.constructor.prototype:n)}),!Object.getOwnPropertyDescriptor){var u="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(u+a);if(q(a,b)){var c,d,e;if(c={enumerable:!0,configurable:!0},k){var f=a.__proto__;a.__proto__=n;var d=i(a,b),e=j(a,b);if(a.__proto__=f,d||e)return d&&(c.get=d),e&&(c.set=e),c}return c.value=a[b],c}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),!Object.create){var v;v=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var a={};for(var b in a)a[b]=null;return a.constructor=a.hasOwnProperty=a.propertyIsEnumerable=a.isPrototypeOf=a.toLocaleString=a.toString=a.valueOf=a.__proto__=null,a},Object.create=function(a,b){var c;if(null===a)c=v();else{if("object"!=typeof a)throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}return void 0!==b&&Object.defineProperties(c,b),c}}if(Object.defineProperty){var w=e({}),x="undefined"==typeof document||e(document.createElement("div"));if(!w||!x)var y=Object.defineProperty}if(!Object.defineProperty||y){var z="Property description must be an object: ",A="Object.defineProperty called on non-object: ",B="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError(A+a);if("object"!=typeof c&&"function"!=typeof c||null===c)throw new TypeError(z+c);if(y)try{return y.call(Object,a,b,c)}catch(d){}if(q(c,"value"))if(k&&(i(a,b)||j(a,b))){var e=a.__proto__;a.__proto__=n,delete a[b],a[b]=c.value,a.__proto__=e}else a[b]=c.value;else{if(!k)throw new TypeError(B);q(c,"get")&&g(a,b,c.get),q(c,"set")&&h(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)q(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(C){Object.freeze=function(a){return function(b){return"function"==typeof b?b:a(b)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){if(Object(a)===a)throw new TypeError;for(var b="";q(a,b);)b+="?";a[b]=!0;var c=q(a,b);return delete a[b],c}),!Object.keys){var D=!0,E=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],F=E.length;for(var G in{toString:null})D=!1;Object.keys=function L(a){if("object"!=typeof a&&"function"!=typeof a||null===a)throw new TypeError("Object.keys called on a non-object");var L=[];for(var b in a)q(a,b)&&L.push(b);if(D)for(var c=0,d=F;d>c;c++){var e=E[c];q(a,e)&&L.push(e)}return L}}Date.now||(Date.now=function(){return(new Date).getTime()});var H=" \n\x0B\f\r   ᠎              \u2028\u2029\ufeff";if(!String.prototype.trim||H.trim()){H="["+H+"]";var I=new RegExp("^"+H+H+"*"),J=new RegExp(H+H+"*$");String.prototype.trim=function(){return String(this).replace(I,"").replace(J,"")}}var K=function(a){if(null==a)throw new TypeError("can't convert "+a+" to object");return Object(a)}}),ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"],function(a,b,c){"use strict";a("./regexp"),a("./es5-shim")}),ace.define("ace/lib/dom",["require","exports","module"],function(a,b,c){"use strict";if("undefined"!=typeof document){var d="http://www.w3.org/1999/xhtml";b.getDocumentHead=function(a){return a||(a=document),a.head||a.getElementsByTagName("head")[0]||a.documentElement},b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.hasCssClass=function(a,b){var c=(a.className||"").split(/\s+/g);return-1!==c.indexOf(b)},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){for(var c=a.className.split(/\s+/g);;){var d=c.indexOf(b);if(-1==d)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){for(var c=a.className.split(/\s+/g),d=!0;;){var e=c.indexOf(b);if(-1==e)break;d=!1,c.splice(e,1)}return d&&c.push(b),a.className=c.join(" "),d},b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.hasCssString=function(a,b){var c,d=0;if(b=b||document,b.createStyleSheet&&(c=b.styleSheets)){for(;d=0?(e.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]:(e.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]),b.isOldIE=b.isIE&&b.isIE<9,b.isGecko=b.isMozilla=(window.Controllers||window.controllers)&&"Gecko"===window.navigator.product,b.isOldGecko=b.isGecko&&parseInt((e.match(/rv\:(\d+)/)||[])[1],10)<4,b.isOpera=window.opera&&"[object Opera]"==Object.prototype.toString.call(window.opera),b.isWebKit=parseFloat(e.split("WebKit/")[1])||void 0,b.isChrome=parseFloat(e.split(" Chrome/")[1])||void 0,b.isAIR=e.indexOf("AdobeAIR")>=0,b.isIPad=e.indexOf("iPad")>=0,b.isTouchPad=e.indexOf("TouchPad")>=0,b.isChromeOS=e.indexOf(" CrOS ")>=0}}),ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b,c){"use strict";function d(a,b,c){var d=g(b);if(!f.isMac&&h){if((h[91]||h[92])&&(d|=8),h.altGr){if(3==(3&d))return;h.altGr=0}if(18===c||17===c){var j="location"in b?b.location:b.keyLocation;if(17===c&&1===j)i=b.timeStamp;else if(18===c&&3===d&&2===j){var k=-i;i=b.timeStamp,k+=i,3>k&&(h.altGr=!0)}}}if(c in e.MODIFIER_KEYS){switch(e.MODIFIER_KEYS[c]){case"Alt":d=2;break;case"Shift":d=4;break;case"Ctrl":d=1;break;default:d=8}c=-1}if(8&d&&(91===c||93===c)&&(c=-1),!d&&13===c){var j="location"in b?b.location:b.keyLocation;if(3===j&&(a(b,d,-c),b.defaultPrevented))return}if(f.isChromeOS&&8&d){if(a(b,d,c),b.defaultPrevented)return;d&=-9}return d||c in e.FUNCTION_KEYS||c in e.PRINTABLE_KEYS?a(b,d,c):!1}var e=a("./keys"),f=a("./useragent");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c.call(a,window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){return a.removeEventListener?a.removeEventListener(b,c,!1):void(a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c))},b.stopEvent=function(a){return b.stopPropagation(a),b.preventDefault(a),!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getButton=function(a){return"dblclick"==a.type?0:"contextmenu"==a.type||f.isMac&&a.ctrlKey&&!a.altKey&&!a.shiftKey?2:a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},b.capture=function(a,c,d){function e(a){c&&c(a),d&&d(a),b.removeListener(document,"mousemove",c,!0),b.removeListener(document,"mouseup",e,!0),b.removeListener(document,"dragstart",e,!0)}return b.addListener(document,"mousemove",c,!0),b.addListener(document,"mouseup",e,!0),b.addListener(document,"dragstart",e,!0),e},b.addMouseWheelListener=function(a,c){"onmousewheel"in a?b.addListener(a,"mousewheel",function(a){var b=8;void 0!==a.wheelDeltaX?(a.wheelX=-a.wheelDeltaX/b,a.wheelY=-a.wheelDeltaY/b):(a.wheelX=0,a.wheelY=-a.wheelDelta/b),c(a)}):"onwheel"in a?b.addListener(a,"wheel",function(a){var b=.35;switch(a.deltaMode){case a.DOM_DELTA_PIXEL:a.wheelX=a.deltaX*b||0, +a.wheelY=a.deltaY*b||0;break;case a.DOM_DELTA_LINE:case a.DOM_DELTA_PAGE:a.wheelX=5*(a.deltaX||0),a.wheelY=5*(a.deltaY||0)}c(a)}):b.addListener(a,"DOMMouseScroll",function(a){a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=5*(a.detail||0),a.wheelY=0):(a.wheelX=0,a.wheelY=5*(a.detail||0)),c(a)})},b.addMultiMouseDownListener=function(a,c,d,e){var g,h,i,j=0,k={2:"dblclick",3:"tripleclick",4:"quadclick"};b.addListener(a,"mousedown",function(a){if(0!==b.getButton(a)?j=0:a.detail>1?(j++,j>4&&(j=1)):j=1,f.isIE){var l=Math.abs(a.clientX-g)>5||Math.abs(a.clientY-h)>5;(!i||l)&&(j=1),i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),1==j&&(g=a.clientX,h=a.clientY)}if(a._clicks=j,d[e]("mousedown",a),j>4)j=0;else if(j>1)return d[e](k[j],a)}),f.isOldIE&&b.addListener(a,"dblclick",function(a){j=2,i&&clearTimeout(i),i=setTimeout(function(){i=null},c[j-1]||600),d[e]("mousedown",a),d[e](k[j],a)})};var g=!f.isMac||!f.isOpera||"KeyboardEvent"in window?function(a){return 0|(a.ctrlKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.metaKey?8:0)}:function(a){return 0|(a.metaKey?1:0)|(a.altKey?2:0)|(a.shiftKey?4:0)|(a.ctrlKey?8:0)};b.getModifierString=function(a){return e.KEY_MODS[g(a)]};var h=null,i=0;if(b.addCommandKeyListener=function(a,c){var e=b.addListener;if(f.isOldGecko||f.isOpera&&!("KeyboardEvent"in window)){var g=null;e(a,"keydown",function(a){g=a.keyCode}),e(a,"keypress",function(a){return d(c,a,g)})}else{var i=null;e(a,"keydown",function(a){h[a.keyCode]=!0;var b=d(c,a,a.keyCode);return i=a.defaultPrevented,b}),e(a,"keypress",function(a){i&&(a.ctrlKey||a.altKey||a.shiftKey||a.metaKey)&&(b.stopEvent(a),i=null)}),e(a,"keyup",function(a){h[a.keyCode]=null}),h||(h=Object.create(null),e(window,"focus",function(a){h=Object.create(null)}))}},window.postMessage&&!f.isOldIE){var j=1;b.nextTick=function(a,c){c=c||window;var d="zero-timeout-message-"+j;b.addListener(c,"message",function e(f){f.data==d&&(b.stopPropagation(f),b.removeListener(c,"message",e),a())}),c.postMessage(d,"*")}}b.nextFrame=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame||window.oRequestAnimationFrame,b.nextFrame?b.nextFrame=b.nextFrame.bind(window):b.nextFrame=function(a){setTimeout(a,17)}}),ace.define("ace/lib/lang",["require","exports","module"],function(a,b,c){"use strict";b.last=function(a){return a[a.length-1]},b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){for(var c="";b>0;)1&b&&(c+=a),(b>>=1)&&(a+=a);return c};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){for(var b=[],c=0,d=a.length;d>c;c++)a[c]&&"object"==typeof a[c]?b[c]=this.copyObject(a[c]):b[c]=a[c];return b},b.deepCopy=function(a){if("object"!=typeof a||!a)return a;var c=a.constructor;if(c===RegExp)return a;var d=c();for(var e in a)"object"==typeof a[e]?d[e]=b.deepCopy(a[e]):d[e]=a[e];return d},b.arrayToMap=function(a){for(var b={},c=0;cc?{cursor:a.start,anchor:a.end}:{cursor:a.end,anchor:a.start}}var g=(a("../lib/dom"),a("../lib/event"),a("../lib/useragent"),0);(function(){this.onMouseDown=function(a){var b=a.inSelection(),c=a.getDocumentPosition();this.mousedownEvent=a;var d=this.editor,e=a.getButton();if(0!==e){var f=d.getSelectionRange(),g=f.isEmpty();return g&&d.selection.moveToPosition(c),void d.textInput.onContextMenu(a.domEvent)}return this.mousedownEvent.time=Date.now(),!b||d.isFocused()||(d.focus(),!this.$focusTimout||this.$clickSelection||d.inMultiSelectMode)?(this.captureMouse(a),this.startSelect(c,a.domEvent._clicks>1),a.preventDefault()):(this.setState("focusWait"),void this.captureMouse(a))},this.startSelect=function(a,b){a=a||this.editor.renderer.screenToTextCoordinates(this.x,this.y);var c=this.editor;this.mousedownEvent.getShiftKey()?c.selection.selectToPosition(a):b||c.selection.moveToPosition(a),b||this.select(),c.renderer.scroller.setCapture&&c.renderer.scroller.setCapture(),c.setStyle("ace_selecting"),this.setState("select")},this.select=function(){var a,b=this.editor,c=b.renderer.screenToTextCoordinates(this.x,this.y);if(this.$clickSelection){var d=this.$clickSelection.comparePoint(c);if(-1==d)a=this.$clickSelection.end;else if(1==d)a=this.$clickSelection.start;else{var e=f(this.$clickSelection,c);c=e.cursor,a=e.anchor}b.selection.setSelectionAnchor(a.row,a.column)}b.selection.selectToPosition(c),b.renderer.scrollCursorIntoView()},this.extendSelectionBy=function(a){var b,c=this.editor,d=c.renderer.screenToTextCoordinates(this.x,this.y),e=c.selection[a](d.row,d.column);if(this.$clickSelection){var g=this.$clickSelection.comparePoint(e.start),h=this.$clickSelection.comparePoint(e.end);if(-1==g&&0>=h)b=this.$clickSelection.end,(e.end.row!=d.row||e.end.column!=d.column)&&(d=e.start);else if(1==h&&g>=0)b=this.$clickSelection.start,(e.start.row!=d.row||e.start.column!=d.column)&&(d=e.end);else if(-1==g&&1==h)d=e.end,b=e.start;else{var i=f(this.$clickSelection,d);d=i.cursor,b=i.anchor}c.selection.setSelectionAnchor(b.row,b.column)}c.selection.selectToPosition(d),c.renderer.scrollCursorIntoView()},this.selectEnd=this.selectAllEnd=this.selectByWordsEnd=this.selectByLinesEnd=function(){this.$clickSelection=null,this.editor.unsetStyle("ace_selecting"),this.editor.renderer.scroller.releaseCapture&&this.editor.renderer.scroller.releaseCapture()},this.focusWait=function(){var a=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y),b=Date.now();(a>g||b-this.mousedownEvent.time>this.$focusTimout)&&this.startSelect(this.mousedownEvent.getDocumentPosition())},this.onDoubleClick=function(a){var b=a.getDocumentPosition(),c=this.editor,d=c.session,e=d.getBracketRange(b);e?(e.isEmpty()&&(e.start.column--,e.end.column++),this.setState("select")):(e=c.selection.getWordRange(b.row,b.column),this.setState("selectByWords")),this.$clickSelection=e,this.select()},this.onTripleClick=function(a){var b=a.getDocumentPosition(),c=this.editor;this.setState("selectByLines");var d=c.getSelectionRange();d.isMultiLine()&&d.contains(b.row,b.column)?(this.$clickSelection=c.selection.getLineRange(d.start.row),this.$clickSelection.end=c.selection.getLineRange(d.end.row).end):this.$clickSelection=c.selection.getLineRange(b.row),this.select()},this.onQuadClick=function(a){var b=this.editor;b.selectAll(),this.$clickSelection=b.getSelectionRange(),this.setState("selectAll")},this.onMouseWheel=function(a){if(!a.getAccelKey()){a.getShiftKey()&&a.wheelY&&!a.wheelX&&(a.wheelX=a.wheelY,a.wheelY=0);var b=a.domEvent.timeStamp,c=b-(this.$lastScrollTime||0),d=this.editor,e=d.renderer.isScrollableBy(a.wheelX*a.speed,a.wheelY*a.speed);return e||200>c?(this.$lastScrollTime=b,d.renderer.scrollBy(a.wheelX*a.speed,a.wheelY*a.speed),a.stop()):void 0}}}).call(d.prototype),b.DefaultHandlers=d}),ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"],function(a,b,c){"use strict";function d(a){this.isOpen=!1,this.$element=null,this.$parentNode=a}var e=(a("./lib/oop"),a("./lib/dom"));(function(){this.$init=function(){return this.$element=e.createElement("div"),this.$element.className="ace_tooltip",this.$element.style.display="none",this.$parentNode.appendChild(this.$element),this.$element},this.getElement=function(){return this.$element||this.$init()},this.setText=function(a){e.setInnerText(this.getElement(),a)},this.setHtml=function(a){this.getElement().innerHTML=a},this.setPosition=function(a,b){this.getElement().style.left=a+"px",this.getElement().style.top=b+"px"},this.setClassName=function(a){e.addCssClass(this.getElement(),a)},this.show=function(a,b,c){null!=a&&this.setText(a),null!=b&&null!=c&&this.setPosition(b,c),this.isOpen||(this.getElement().style.display="block",this.isOpen=!0)},this.hide=function(){this.isOpen&&(this.getElement().style.display="none",this.isOpen=!1)},this.getHeight=function(){return this.getElement().offsetHeight},this.getWidth=function(){return this.getElement().offsetWidth}}).call(d.prototype),b.Tooltip=d}),ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"],function(a,b,c){"use strict";function d(a){function b(){var b=l.getDocumentPosition().row,e=i.$annotations[b];if(!e)return c();var f=g.session.getLength();if(b==f){var h=g.renderer.pixelToScreenCoordinates(0,l.y).row,k=l.$pos;if(h>g.session.documentToScreenRow(k.row,k.column))return c()}if(m!=e)if(m=e.text.join("
    "),j.setHtml(m),j.show(),g.on("mousewheel",c),a.$tooltipFollowsMouse)d(l);else{var n=i.$cells[g.session.documentToScreenRow(b,0)].element,o=n.getBoundingClientRect(),p=j.getElement().style;p.left=o.right+"px",p.top=o.bottom+"px"}}function c(){k&&(k=clearTimeout(k)),m&&(j.hide(),m=null,g.removeEventListener("mousewheel",c))}function d(a){j.setPosition(a.x,a.y)}var g=a.editor,i=g.renderer.$gutterLayer,j=new e(g.container);a.editor.setDefaultHandler("guttermousedown",function(b){if(g.isFocused()&&0==b.getButton()){var c=i.getRegion(b);if("foldWidgets"!=c){var d=b.getDocumentPosition().row,e=g.session.selection;if(b.getShiftKey())e.selectTo(d,0);else{if(2==b.domEvent.detail)return g.selectAll(),b.preventDefault();a.$clickSelection=g.selection.getLineRange(d)}return a.setState("selectByLines"),a.captureMouse(b),b.preventDefault()}}});var k,l,m;a.editor.setDefaultHandler("guttermousemove",function(e){var g=e.domEvent.target||e.domEvent.srcElement;return f.hasCssClass(g,"ace_fold-widget")?c():(m&&a.$tooltipFollowsMouse&&d(e),l=e,void(k||(k=setTimeout(function(){k=null,l&&!a.isMousePressed?b():c()},50))))}),h.addListener(g.renderer.$gutter,"mouseout",function(a){l=null,m&&!k&&(k=setTimeout(function(){k=null,c()},50))}),g.on("changeSession",c)}function e(a){i.call(this,a)}var f=a("../lib/dom"),g=a("../lib/oop"),h=a("../lib/event"),i=a("../tooltip").Tooltip;g.inherits(e,i),function(){this.setPosition=function(a,b){var c=window.innerWidth||document.documentElement.clientWidth,d=window.innerHeight||document.documentElement.clientHeight,e=this.getWidth(),f=this.getHeight();a+=15,b+=15,a+e>c&&(a-=a+e-c),b+f>d&&(b-=20+f),i.prototype.setPosition.call(this,a,b)}}.call(e.prototype),b.GutterHandler=d}),ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=b.MouseEvent=function(a,b){this.domEvent=a,this.editor=b,this.x=this.clientX=a.clientX,this.y=this.clientY=a.clientY,this.$pos=null,this.$inSelection=null,this.propagationStopped=!1,this.defaultPrevented=!1};(function(){this.stopPropagation=function(){d.stopPropagation(this.domEvent),this.propagationStopped=!0},this.preventDefault=function(){d.preventDefault(this.domEvent),this.defaultPrevented=!0},this.stop=function(){this.stopPropagation(),this.preventDefault()},this.getDocumentPosition=function(){return this.$pos?this.$pos:(this.$pos=this.editor.renderer.screenToTextCoordinates(this.clientX,this.clientY),this.$pos)},this.inSelection=function(){if(null!==this.$inSelection)return this.$inSelection;var a=this.editor,b=a.getSelectionRange();if(b.isEmpty())this.$inSelection=!1;else{var c=this.getDocumentPosition();this.$inSelection=b.contains(c.row,c.column)}return this.$inSelection},this.getButton=function(){return d.getButton(this.domEvent)},this.getShiftKey=function(){return this.domEvent.shiftKey},this.getAccelKey=e.isMac?function(){return this.domEvent.metaKey}:function(){return this.domEvent.ctrlKey}}).call(f.prototype)}),ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"],function(a,b,c){"use strict";function d(a){function b(a,b){var c=Date.now(),d=!b||a.row!=b.row,f=!b||a.column!=b.column;if(!C||d||f)q.$blockScrolling+=1,q.moveCursorToPosition(a),q.$blockScrolling-=1,C=c,D={x:u,y:v};else{var g=e(D.x,D.y,u,v);g>k?C=null:c-C>=j&&(q.renderer.scrollCursorIntoView(),C=null)}}function c(a,b){var c=Date.now(),d=q.renderer.layerConfig.lineHeight,e=q.renderer.layerConfig.characterWidth,f=q.renderer.scroller.getBoundingClientRect(),g={x:{left:u-f.left,right:f.right-u},y:{top:v-f.top,bottom:f.bottom-v}},h=Math.min(g.x.left,g.x.right),j=Math.min(g.y.top,g.y.bottom),k={row:a.row,column:a.column};2>=h/e&&(k.column+=g.x.left=j/d&&(k.row+=g.y.top=i&&q.renderer.scrollCursorIntoView(k):B=c:B=null}function d(){var a=y;y=q.renderer.screenToTextCoordinates(u,v),b(y,a),c(y,a)}function l(){x=q.selection.toOrientedRange(),t=q.session.addMarker(x,"ace_selection",q.getSelectionStyle()),q.clearSelection(),q.isFocused()&&q.renderer.$cursorLayer.setBlinking(!1),clearInterval(w),d(),w=setInterval(d,20),F=0,g.addListener(document,"mousemove",n)}function m(){clearInterval(w),q.session.removeMarker(t),t=null,q.$blockScrolling+=1,q.selection.fromOrientedRange(x),q.$blockScrolling-=1,q.isFocused()&&!A&&q.renderer.$cursorLayer.setBlinking(!q.getReadOnly()),x=null,y=null,F=0,B=null,C=null,g.removeListener(document,"mousemove",n)}function n(){null==G&&(G=setTimeout(function(){null!=G&&t&&m()},20))}function o(a){var b=a.types;return!b||Array.prototype.some.call(b,function(a){return"text/plain"==a||"Text"==a})}function p(a){var b=["copy","copymove","all","uninitialized"],c=["move","copymove","linkmove","all","uninitialized"],d=h.isMac?a.altKey:a.ctrlKey,e="uninitialized";try{e=a.dataTransfer.effectAllowed.toLowerCase()}catch(a){}var f="none";return d&&b.indexOf(e)>=0?f="copy":c.indexOf(e)>=0?f="move":b.indexOf(e)>=0&&(f="copy"),f}var q=a.editor,r=f.createElement("img");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",h.isOpera&&(r.style.cssText="width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;");var s=["dragWait","dragWaitEnd","startDrag","dragReadyEnd","onMouseDrag"];s.forEach(function(b){a[b]=this[b]},this),q.addEventListener("mousedown",this.onMouseDown.bind(a));var t,u,v,w,x,y,z,A,B,C,D,E=q.container,F=0;this.onDragStart=function(a){if(this.cancelDrag||!E.draggable){var b=this;return setTimeout(function(){b.startSelect(),b.captureMouse(a)},0),a.preventDefault()}x=q.getSelectionRange();var c=a.dataTransfer;c.effectAllowed=q.getReadOnly()?"copy":"copyMove",h.isOpera&&(q.container.appendChild(r),r.scrollTop=0),c.setDragImage&&c.setDragImage(r,0,0),h.isOpera&&q.container.removeChild(r),c.clearData(),c.setData("Text",q.session.getTextRange()),A=!0,this.setState("drag")},this.onDragEnd=function(a){if(E.draggable=!1,A=!1,this.setState(null),!q.getReadOnly()){var b=a.dataTransfer.dropEffect;z||"move"!=b||q.session.remove(q.getSelectionRange()),q.renderer.$cursorLayer.setBlinking(!0)}this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle("")},this.onDragEnter=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(u=a.clientX,v=a.clientY,t||l(),F++,a.dataTransfer.dropEffect=z=p(a),g.preventDefault(a)):void 0},this.onDragOver=function(a){return!q.getReadOnly()&&o(a.dataTransfer)?(u=a.clientX,v=a.clientY,t||(l(),F++),null!==G&&(G=null),a.dataTransfer.dropEffect=z=p(a),g.preventDefault(a)):void 0},this.onDragLeave=function(a){return F--,0>=F&&t?(m(),z=null,g.preventDefault(a)):void 0},this.onDrop=function(a){if(y){var b=a.dataTransfer;if(A)switch(z){case"move":x=x.contains(y.row,y.column)?{start:y,end:y}:q.moveText(x,y);break;case"copy":x=q.moveText(x,y,!0)}else{var c=b.getData("Text");x={start:y,end:q.session.insert(y,c)},q.focus(),z=null}return m(),g.preventDefault(a)}},g.addListener(E,"dragstart",this.onDragStart.bind(a)),g.addListener(E,"dragend",this.onDragEnd.bind(a)),g.addListener(E,"dragenter",this.onDragEnter.bind(a)),g.addListener(E,"dragover",this.onDragOver.bind(a)),g.addListener(E,"dragleave",this.onDragLeave.bind(a)),g.addListener(E,"drop",this.onDrop.bind(a));var G=null}function e(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))}var f=a("../lib/dom"),g=a("../lib/event"),h=a("../lib/useragent"),i=200,j=200,k=5;(function(){this.dragWait=function(){var a=Date.now()-this.mousedownEvent.time;a>this.editor.getDragDelay()&&this.startDrag()},this.dragWaitEnd=function(){var a=this.editor.container;a.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()),this.selectEnd()},this.dragReadyEnd=function(a){this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()),this.editor.unsetStyle("ace_dragging"),this.editor.renderer.setCursorStyle(""),this.dragWaitEnd()},this.startDrag=function(){this.cancelDrag=!1;var a=this.editor,b=a.container;b.draggable=!0,a.renderer.$cursorLayer.setBlinking(!1),a.setStyle("ace_dragging");var c=h.isWin?"default":"move";a.renderer.setCursorStyle(c),this.setState("dragReady")},this.onMouseDrag=function(a){var b=this.editor.container;if(h.isIE&&"dragReady"==this.state){var c=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>3&&b.dragDrop()}if("dragWait"===this.state){var c=e(this.mousedownEvent.x,this.mousedownEvent.y,this.x,this.y);c>0&&(b.draggable=!1,this.startSelect(this.mousedownEvent.getDocumentPosition()))}},this.onMouseDown=function(a){if(this.$dragEnabled){this.mousedownEvent=a;var b=this.editor,c=a.inSelection(),d=a.getButton(),e=a.domEvent.detail||1;if(1===e&&0===d&&c){if(a.editor.inMultiSelectMode&&(a.getAccelKey()||a.getShiftKey()))return;this.mousedownEvent.time=Date.now();var f=a.domEvent.target||a.domEvent.srcElement;if("unselectable"in f&&(f.unselectable="on"),b.getDragDelay()){if(h.isWebKit){this.cancelDrag=!0;var g=b.container;g.draggable=!0}this.setState("dragWait")}else this.startDrag();this.captureMouse(a,this.onMouseDrag.bind(this)),a.defaultPrevented=!0}}}}).call(d.prototype),b.DragdropHandler=d}),ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d=a("./dom");b.get=function(a,b){var c=new XMLHttpRequest;c.open("GET",a,!0),c.onreadystatechange=function(){4===c.readyState&&b(c.responseText)},c.send(null)},b.loadScript=function(a,b){var c=d.getDocumentHead(),e=document.createElement("script");e.src=a,c.appendChild(e),e.onload=e.onreadystatechange=function(a,c){(c||!e.readyState||"loaded"==e.readyState||"complete"==e.readyState)&&(e=e.onload=e.onreadystatechange=null,c||b())}},b.qualifyURL=function(a){var b=document.createElement("a");return b.href=a,b.href}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(a,b,c){"use strict";var d={},e=function(){this.propagationStopped=!0},f=function(){this.defaultPrevented=!0};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var c=this._eventRegistry[a]||[],d=this._defaultHandlers[a];if(c.length||d){"object"==typeof b&&b||(b={}),b.type||(b.type=a),b.stopPropagation||(b.stopPropagation=e),b.preventDefault||(b.preventDefault=f),c=c.slice();for(var g=0;gr;r++){var t=q[r];0===t.name.indexOf("data-ace-")&&(g[f(t.name.replace(/^data-ace-/,""))]=t.value)}var u=p.match(/^(.*)\/ace(\-\w+)?\.js(\?|$)/);u&&(h=u[1])}}h&&(g.base=g.base||h,g.packaged=!0),g.basePath=g.base,g.workerPath=g.workerPath||g.base,g.modePath=g.modePath||g.base,g.themePath=g.themePath||g.base,delete g.base;for(var v in g)"undefined"!=typeof g[v]&&b.set(v,g[v])}function f(a){return a.replace(/-(.)/g,function(a,b){return b.toUpperCase()})}var g=a("./lib/lang"),h=a("./lib/oop"),i=a("./lib/net"),j=a("./lib/event_emitter").EventEmitter,k=function(){return this}(),l={packaged:!1,workerPath:null,modePath:null,themePath:null,basePath:"",suffix:".js",$moduleUrls:{}};b.get=function(a){if(!l.hasOwnProperty(a))throw new Error("Unknown config key: "+a);return l[a]},b.set=function(a,b){if(!l.hasOwnProperty(a))throw new Error("Unknown config key: "+a);l[a]=b},b.all=function(){return g.copyObject(l)},h.implement(b,j),b.moduleUrl=function(a,b){if(l.$moduleUrls[a])return l.$moduleUrls[a];var c=a.split("/");b=b||c[c.length-2]||"";var d="snippets"==b?"/":"-",e=c[c.length-1];if("worker"==b&&"-"==d){var f=new RegExp("^"+b+"[\\-_]|[\\-_]"+b+"$","g");e=e.replace(f,"")}(!e||e==b)&&c.length>1&&(e=c[c.length-2]);var g=l[b+"Path"];return null==g?g=l.basePath:"/"==d&&(b=d=""),g&&"/"!=g.slice(-1)&&(g+="/"),g+b+d+e+this.get("suffix")},b.setModuleUrl=function(a,b){return l.$moduleUrls[a]=b},b.$loading={},b.loadModule=function(c,d){var e,f;Array.isArray(c)&&(f=c[0],c=c[1]);try{e=a(c)}catch(g){}if(e&&!b.$loading[c])return d&&d(e);if(b.$loading[c]||(b.$loading[c]=[]),b.$loading[c].push(d),!(b.$loading[c].length>1)){var h=function(){a([c],function(a){b._emit("load.module",{name:c,module:a});var d=b.$loading[c];b.$loading[c]=null,d.forEach(function(b){b&&b(a)})})};return b.get("packaged")?void i.loadScript(b.moduleUrl(c,f),h):h()}},e(!0),b.init=e;var m={setOptions:function(a){Object.keys(a).forEach(function(b){this.setOption(b,a[b])},this)},getOptions:function(a){var b={};return a?Array.isArray(a)||(b=a,a=Object.keys(b)):a=Object.keys(this.$options),a.forEach(function(a){b[a]=this.getOption(a)},this),b},setOption:function(a,b){if(this["$"+a]!==b){var c=this.$options[a];if(!c)return void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'));if(c.forwardTo)return this[c.forwardTo]&&this[c.forwardTo].setOption(a,b);c.handlesSet||(this["$"+a]=b),c&&c.set&&c.set.call(this,b)}},getOption:function(a){var b=this.$options[a];return b?b.forwardTo?this[b.forwardTo]&&this[b.forwardTo].getOption(a):b&&b.get?b.get.call(this):this["$"+a]:void("undefined"!=typeof console&&console.warn&&console.warn('misspelled option "'+a+'"'))}},n={};b.defineOptions=function(a,b,c){return a.$options||(n[b]=a.$options={}),Object.keys(c).forEach(function(b){var d=c[b];"string"==typeof d&&(d={forwardTo:d}),d.name||(d.name=b),a.$options[d.name]=d,"initialValue"in d&&(a["$"+d.name]=d.initialValue)}),h.implement(a,m),this},b.resetOptions=function(a){Object.keys(a.$options).forEach(function(b){var c=a.$options[b];"value"in c&&a.setOption(b,c.value); +})},b.setDefaultValue=function(a,c,d){var e=n[a]||(n[a]={});e[c]&&(e.forwardTo?b.setDefaultValue(e.forwardTo,c,d):e[c].value=d)},b.setDefaultValues=function(a,c){Object.keys(c).forEach(function(d){b.setDefaultValue(a,d,c[d])})}}),ace.define("ace/mouse/mouse_handler",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/mouse/default_handlers","ace/mouse/default_gutter_handler","ace/mouse/mouse_event","ace/mouse/dragdrop_handler","ace/config"],function(a,b,c){"use strict";var d=a("../lib/event"),e=a("../lib/useragent"),f=a("./default_handlers").DefaultHandlers,g=a("./default_gutter_handler").GutterHandler,h=a("./mouse_event").MouseEvent,i=a("./dragdrop_handler").DragdropHandler,j=a("../config"),k=function(a){var b=this;this.editor=a,new f(this),new g(this),new i(this);var c=function(b){!a.isFocused()&&a.textInput&&a.textInput.moveToMouse(b),a.focus()},h=a.renderer.getMouseEventTarget();d.addListener(h,"click",this.onMouseEvent.bind(this,"click")),d.addListener(h,"mousemove",this.onMouseMove.bind(this,"mousemove")),d.addMultiMouseDownListener(h,[400,300,250],this,"onMouseEvent"),a.renderer.scrollBarV&&(d.addMultiMouseDownListener(a.renderer.scrollBarV.inner,[400,300,250],this,"onMouseEvent"),d.addMultiMouseDownListener(a.renderer.scrollBarH.inner,[400,300,250],this,"onMouseEvent"),e.isIE&&(d.addListener(a.renderer.scrollBarV.element,"mousedown",c),d.addListener(a.renderer.scrollBarH.element,"mousemove",c))),d.addMouseWheelListener(a.container,this.onMouseWheel.bind(this,"mousewheel"));var j=a.renderer.$gutter;d.addListener(j,"mousedown",this.onMouseEvent.bind(this,"guttermousedown")),d.addListener(j,"click",this.onMouseEvent.bind(this,"gutterclick")),d.addListener(j,"dblclick",this.onMouseEvent.bind(this,"gutterdblclick")),d.addListener(j,"mousemove",this.onMouseEvent.bind(this,"guttermousemove")),d.addListener(h,"mousedown",c),d.addListener(j,"mousedown",function(b){return a.focus(),d.preventDefault(b)}),a.on("mousemove",function(c){if(!b.state&&!b.$dragDelay&&b.$dragEnabled){var d=a.renderer.screenToTextCoordinates(c.x,c.y),e=a.session.selection.getRange(),f=a.renderer;f.setCursorStyle(!e.isEmpty()&&e.insideStart(d.row,d.column)?"default":"")}})};(function(){this.onMouseEvent=function(a,b){this.editor._emit(a,new h(b,this.editor))},this.onMouseMove=function(a,b){var c=this.editor._eventRegistry&&this.editor._eventRegistry.mousemove;c&&c.length&&this.editor._emit(a,new h(b,this.editor))},this.onMouseWheel=function(a,b){var c=new h(b,this.editor);c.speed=2*this.$scrollSpeed,c.wheelX=b.wheelX,c.wheelY=b.wheelY,this.editor._emit(a,c)},this.setState=function(a){this.state=a},this.captureMouse=function(a,b){this.x=a.x,this.y=a.y,this.isMousePressed=!0;var c=this.editor.renderer;c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=null);var f=this,g=function(a){if(a){if(e.isWebKit&&!a.which&&f.releaseMouse)return f.releaseMouse();f.x=a.clientX,f.y=a.clientY,b&&b(a),f.mouseEvent=new h(a,f.editor),f.$mouseMoved=!0}},i=function(a){clearInterval(k),j(),f[f.state+"End"]&&f[f.state+"End"](a),f.state="",null==c.$keepTextAreaAtCursor&&(c.$keepTextAreaAtCursor=!0,c.$moveTextAreaToCursor()),f.isMousePressed=!1,f.$onCaptureMouseMove=f.releaseMouse=null,a&&f.onMouseEvent("mouseup",a)},j=function(){f[f.state]&&f[f.state](),f.$mouseMoved=!1};if(e.isOldIE&&"dblclick"==a.domEvent.type)return setTimeout(function(){i(a)});f.$onCaptureMouseMove=g,f.releaseMouse=d.capture(this.editor.container,g,i);var k=setInterval(j,20)},this.releaseMouse=null,this.cancelContextMenu=function(){var a=function(b){b&&b.domEvent&&"contextmenu"!=b.domEvent.type||(this.editor.off("nativecontextmenu",a),b&&b.domEvent&&d.stopEvent(b.domEvent))}.bind(this);setTimeout(a,10),this.editor.on("nativecontextmenu",a)}}).call(k.prototype),j.defineOptions(k.prototype,"mouseHandler",{scrollSpeed:{initialValue:2},dragDelay:{initialValue:e.isMac?150:0},dragEnabled:{initialValue:!0},focusTimout:{initialValue:0},tooltipFollowsMouse:{initialValue:!0}}),b.MouseHandler=k}),ace.define("ace/mouse/fold_handler",["require","exports","module"],function(a,b,c){"use strict";function d(a){a.on("click",function(b){var c=b.getDocumentPosition(),d=a.session,e=d.getFoldAt(c.row,c.column,1);e&&(b.getAccelKey()?d.removeFold(e):d.expandFold(e),b.stop())}),a.on("gutterclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session;e.foldWidgets&&e.foldWidgets[d]&&a.session.onFoldWidgetClick(d,b),a.isFocused()||a.focus(),b.stop()}}),a.on("gutterdblclick",function(b){var c=a.renderer.$gutterLayer.getRegion(b);if("foldWidgets"==c){var d=b.getDocumentPosition().row,e=a.session,f=e.getParentFoldRangeData(d,!0),g=f.range||f.firstRange;if(g){d=g.start.row;var h=e.getFoldAt(d,e.getLine(d).length,1);h?e.removeFold(h):(e.addFold("...",g),a.renderer.scrollCursorIntoView({row:g.start.row,column:0}))}b.stop()}})}b.FoldHandler=d}),ace.define("ace/keyboard/keybinding",["require","exports","module","ace/lib/keys","ace/lib/event"],function(a,b,c){"use strict";var d=a("../lib/keys"),e=a("../lib/event"),f=function(a){this.$editor=a,this.$data={editor:a},this.$handlers=[],this.setDefaultHandler(a.commands)};(function(){this.setDefaultHandler=function(a){this.removeKeyboardHandler(this.$defaultHandler),this.$defaultHandler=a,this.addKeyboardHandler(a,0)},this.setKeyboardHandler=function(a){var b=this.$handlers;if(b[b.length-1]!=a){for(;b[b.length-1]&&b[b.length-1]!=this.$defaultHandler;)this.removeKeyboardHandler(b[b.length-1]);this.addKeyboardHandler(a,1)}},this.addKeyboardHandler=function(a,b){if(a){"function"!=typeof a||a.handleKeyboard||(a.handleKeyboard=a);var c=this.$handlers.indexOf(a);-1!=c&&this.$handlers.splice(c,1),void 0==b?this.$handlers.push(a):this.$handlers.splice(b,0,a),-1==c&&a.attach&&a.attach(this.$editor)}},this.removeKeyboardHandler=function(a){var b=this.$handlers.indexOf(a);return-1==b?!1:(this.$handlers.splice(b,1),a.detach&&a.detach(this.$editor),!0)},this.getKeyboardHandler=function(){return this.$handlers[this.$handlers.length-1]},this.getStatusText=function(){var a=this.$data,b=a.editor;return this.$handlers.map(function(c){return c.getStatusText&&c.getStatusText(b,a)||""}).filter(Boolean).join(" ")},this.$callKeyboardHandlers=function(a,b,c,d){for(var f,g=!1,h=this.$editor.commands,i=this.$handlers.length;i--&&(f=this.$handlers[i].handleKeyboard(this.$data,a,b,c,d),!(f&&f.command&&(g="null"==f.command?!0:h.exec(f.command,this.$editor,f.args,d),g&&d&&-1!=a&&1!=f.passEvent&&1!=f.command.passEvent&&e.stopEvent(d),g))););return g},this.onCommandKey=function(a,b,c){var e=d.keyCodeToString(c);this.$callKeyboardHandlers(b,e,c,a)},this.onTextInput=function(a){var b=this.$callKeyboardHandlers(-1,a);b||this.$editor.commands.exec("insertstring",this.$editor,a)}}).call(f.prototype),b.KeyBinding=f}),ace.define("ace/range",["require","exports","module"],function(a,b,c){"use strict";var d=function(a,b){return a.row-b.row||a.column-b.column},e=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.isEqual=function(a){return this.start.row===a.start.row&&this.end.row===a.end.row&&this.start.column===a.start.column&&this.end.column===a.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return 0==this.compare(a,b)},this.compareRange=function(a){var b,c=a.end,d=a.start;return b=this.compare(c.row,c.column),1==b?(b=this.compare(d.row,d.column),1==b?2:0==b?1:0):-1==b?-2:(b=this.compare(d.row,d.column),-1==b?-1:1==b?42:0)},this.comparePoint=function(a){return this.compare(a.row,a.column)},this.containsRange=function(a){return 0==this.comparePoint(a.start)&&0==this.comparePoint(a.end)},this.intersects=function(a){var b=this.compareRange(a);return-1==b||0==b||1==b},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){"object"==typeof a?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){"object"==typeof a?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){return 0==this.compare(a,b)?!this.isEnd(a,b)&&!this.isStart(a,b):!1},this.insideStart=function(a,b){return 0==this.compare(a,b)?!this.isEnd(a,b):!1},this.insideEnd=function(a,b){return 0==this.compare(a,b)?!this.isStart(a,b):!1},this.compare=function(a,b){return this.isMultiLine()||a!==this.start.row?athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0:bthis.end.column?1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};else if(this.end.rowb)var d={row:b+1,column:0};else if(this.start.rowb.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.anchor,b=this.lead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._emit("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(0,0),this.moveCursorTo(a,this.doc.getLine(a).length)},this.setRange=this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.getRange().isEmpty()&&(this.$isEmpty=!0),this.$desiredColumn=null},this.$moveSelection=function(a){var b=this.lead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.moveTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.moveToPosition=function(a){this.clearSelection(),this.moveCursorToPosition(a)},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.getWordRange=function(a,b){if("undefined"==typeof b){var c=a||this.lead;a=c.row,b=c.column}return this.session.getWordRange(a,b)},this.selectWord=function(){this.setSelectionRange(this.getWordRange())},this.selectAWord=function(){var a=this.getCursor(),b=this.session.getAWordRange(a.row,a.column);this.setSelectionRange(b)},this.getLineRange=function(a,b){var c,d="number"==typeof a?a:this.lead.row,e=this.session.getFoldLine(d);return e?(d=e.start.row,c=e.end.row):c=d,b===!0?new g(d,0,c,this.session.getLine(c).length):new g(d,0,c+1,0)},this.selectLine=function(){this.setSelectionRange(this.getLineRange())},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,-1))this.moveCursorTo(a.start.row,a.start.column);else if(0===b.column)b.row>0&&this.moveCursorTo(b.row-1,this.doc.getLine(b.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(b)&&this.doc.getLine(b.row).slice(b.column-c,b.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a,b=this.lead.getPosition();if(a=this.session.getFoldAt(b.row,b.column,1))this.moveCursorTo(a.end.row,a.end.column);else if(this.lead.column==this.doc.getLine(this.lead.row).length)this.lead.row0&&(b.column=d)}}this.moveCursorTo(b.row,b.column)},this.moveCursorFileEnd=function(){var a=this.doc.getLength()-1,b=this.doc.getLine(a).length;this.moveCursorTo(a,b)},this.moveCursorFileStart=function(){this.moveCursorTo(0,0)},this.moveCursorLongWordRight=function(){var a,b=this.lead.row,c=this.lead.column,d=this.doc.getLine(b),e=d.substring(c);this.session.nonTokenRe.lastIndex=0,this.session.tokenRe.lastIndex=0;var f=this.session.getFoldAt(b,c,1);return f?void this.moveCursorTo(f.end.row,f.end.column):((a=this.session.nonTokenRe.exec(e))&&(c+=this.session.nonTokenRe.lastIndex,this.session.nonTokenRe.lastIndex=0,e=d.substring(c)),c>=d.length?(this.moveCursorTo(b,d.length),this.moveCursorRight(),void(b=c?(this.moveCursorTo(b,0),this.moveCursorLeft(),void(b>0&&this.moveCursorWordLeft())):((f=this.session.tokenRe.exec(g))&&(c-=this.session.tokenRe.lastIndex,this.session.tokenRe.lastIndex=0),void this.moveCursorTo(b,c))},this.$shortWordEndIndex=function(a){var b,c,d=0,e=/\s/,f=this.session.tokenRe;if(f.lastIndex=0,b=this.session.tokenRe.exec(a))d=this.session.tokenRe.lastIndex;else{for(;(c=a[d])&&e.test(c);)d++;if(1>d)for(f.lastIndex=0;(c=a[d])&&!f.test(c);)if(f.lastIndex=0,d++,e.test(c)){if(d>2){d--;break}for(;(c=a[d])&&e.test(c);)d++;if(d>2)break}}return f.lastIndex=0,d},this.moveCursorShortWordRight=function(){var a=this.lead.row,b=this.lead.column,c=this.doc.getLine(a),d=c.substring(b),e=this.session.getFoldAt(a,b,1);if(e)return this.moveCursorTo(e.end.row,e.end.column);if(b==c.length){var f=this.doc.getLength();do a++,d=this.doc.getLine(a);while(f>a&&/^\s*$/.test(d));/^\s+/.test(d)||(d=""),b=0}var g=this.$shortWordEndIndex(d);this.moveCursorTo(a,b+g)},this.moveCursorShortWordLeft=function(){var a,b=this.lead.row,c=this.lead.column;if(a=this.session.getFoldAt(b,c,-1))return this.moveCursorTo(a.start.row,a.start.column);var d=this.session.getLine(b).substring(0,c);if(0===c){do b--,d=this.doc.getLine(b);while(b>0&&/^\s*$/.test(d));c=d.length,/\s+$/.test(d)||(d="")}var f=e.stringReverse(d),g=this.$shortWordEndIndex(f);return this.moveCursorTo(b,c-g)},this.moveCursorWordRight=function(){this.session.$selectLongWords?this.moveCursorLongWordRight():this.moveCursorShortWordRight()},this.moveCursorWordLeft=function(){this.session.$selectLongWords?this.moveCursorLongWordLeft():this.moveCursorShortWordLeft()},this.moveCursorBy=function(a,b){var c=this.session.documentToScreenPosition(this.lead.row,this.lead.column);0===b&&(this.$desiredColumn?c.column=this.$desiredColumn:this.$desiredColumn=c.column);var d=this.session.screenToDocumentPosition(c.row+a,c.column);0!==a&&0===b&&d.row===this.lead.row&&d.column===this.lead.column&&this.session.lineWidgets&&this.session.lineWidgets[d.row]&&d.row++,this.moveCursorTo(d.row,d.column+b,0===b)},this.moveCursorToPosition=function(a){this.moveCursorTo(a.row,a.column)},this.moveCursorTo=function(a,b,c){var d=this.session.getFoldAt(a,b,1);d&&(a=d.start.row,b=d.start.column),this.$keepDesiredColumnOnChange=!0,this.lead.setPosition(a,b),this.$keepDesiredColumnOnChange=!1,c||(this.$desiredColumn=null)},this.moveCursorToScreen=function(a,b,c){var d=this.session.screenToDocumentPosition(a,b);this.moveCursorTo(d.row,d.column,c)},this.detach=function(){this.lead.detach(),this.anchor.detach(),this.session=this.doc=null},this.fromOrientedRange=function(a){this.setSelectionRange(a,a.cursor==a.start),this.$desiredColumn=a.desiredColumn||this.$desiredColumn},this.toOrientedRange=function(a){var b=this.getRange();return a?(a.start.column=b.start.column,a.start.row=b.start.row,a.end.column=b.end.column,a.end.row=b.end.row):a=b,a.cursor=this.isBackwards()?a.start:a.end,a.desiredColumn=this.$desiredColumn,a},this.getRangeOfMovements=function(a){var b=this.getCursor();try{a.call(null,this);var c=this.getCursor();return g.fromPoints(b,c)}catch(d){return g.fromPoints(b,b)}finally{this.moveCursorToPosition(b)}},this.toJSON=function(){if(this.rangeCount)var a=this.ranges.map(function(a){var b=a.clone();return b.isBackwards=a.cursor==a.start,b});else{var a=this.getRange();a.isBackwards=this.isBackwards()}return a},this.fromJSON=function(a){if(void 0==a.start){if(this.rangeList){this.toSingleRange(a[0]);for(var b=a.length;b--;){var c=g.fromPoints(a[b].start,a[b].end);a.isBackwards&&(c.cursor=c.start),this.addRange(c,!0)}return}a=a[0]}this.rangeList&&this.toSingleRange(a),this.setSelectionRange(a,a.isBackwards)},this.isEqual=function(a){if((a.length||this.rangeCount)&&a.length!=this.rangeCount)return!1;if(!a.length||!this.ranges)return this.getRange().isEqual(a);for(var b=this.ranges.length;b--;)if(!this.ranges[b].isEqual(a[b]))return!1;return!0}}).call(h.prototype),b.Selection=h}),ace.define("ace/tokenizer",["require","exports","module"],function(a,b,c){"use strict";var d=2e3,e=function(a){this.states=a,this.regExps={},this.matchMappings={};for(var b in this.states){for(var c=this.states[b],d=[],e=0,f=this.matchMappings[b]={defaultToken:"text"},g="g",h=[],i=0;i1?j.onMatch=this.$applyToken:j.onMatch=j.token),l>1&&(/\\\d/.test(j.regex)?k=j.regex.replace(/\\([0-9]+)/g,function(a,b){return"\\"+(parseInt(b,10)+e+1)}):(l=1,k=this.removeCapturingGroups(j.regex)),j.splitRegex||"string"==typeof j.token||h.push(j)),f[e]=i,e+=l,d.push(k),j.onMatch||(j.onMatch=null)}}d.length||(f[0]=0,d.push("$")),h.forEach(function(a){a.splitRegex=this.createSplitterRegexp(a.regex,g)},this),this.regExps[b]=new RegExp("("+d.join(")|(")+")|($)",g)}};(function(){this.$setMaxTokenCount=function(a){d=0|a},this.$applyToken=function(a){var b=this.splitRegex.exec(a).slice(1),c=this.token.apply(this,b);if("string"==typeof c)return[{type:c,value:a}];for(var d=[],e=0,f=c.length;f>e;e++)b[e]&&(d[d.length]={type:c[e],value:b[e]});return d},this.$arrayTokens=function(a){if(!a)return[];var b=this.splitRegex.exec(a);if(!b)return"text";for(var c=[],d=this.tokenArray,e=0,f=d.length;f>e;e++)b[e+1]&&(c[c.length]={type:d[e],value:b[e+1]});return c},this.removeCapturingGroups=function(a){var b=a.replace(/\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g,function(a,b){return b?"(?:":a});return b},this.createSplitterRegexp=function(a,b){if(-1!=a.indexOf("(?=")){var c=0,d=!1,e={};a.replace(/(\\.)|(\((?:\?[=!])?)|(\))|([\[\]])/g,function(a,b,f,g,h,i){return d?d="]"!=h:h?d=!0:g?(c==e.stack&&(e.end=i+1,e.stack=-1),c--):f&&(c++,1!=f.length&&(e.stack=c,e.start=i)),a}),null!=e.end&&/^\)*$/.test(a.substr(e.end))&&(a=a.substring(0,e.start)+a.substr(e.end))}return new RegExp(a,(b||"").replace("g",""))},this.getLineTokens=function(a,b){if(b&&"string"!=typeof b){var c=b.slice(0);b=c[0],"#tmp"===b&&(c.shift(),b=c.shift())}else var c=[];var e=b||"start",f=this.states[e];f||(e="start",f=this.states[e]);var g=this.matchMappings[e],h=this.regExps[e];h.lastIndex=0;for(var i,j=[],k=0,l=0,m={type:null,value:""};i=h.exec(a);){var n=g.defaultToken,o=null,p=i[0],q=h.lastIndex;if(q-p.length>k){var r=a.substring(k,q-p.length);m.type==n?m.value+=r:(m.type&&j.push(m),m={type:n,value:r})}for(var s=0;sd){for(l>2*a.length&&this.reportError("infinite loop with in ace tokenizer",{startState:b,line:a});k1&&c[0]!==e&&c.unshift("#tmp",e),{tokens:j,state:c.length?c:e}},this.reportError=function(a,b){var c=new Error(a);c.data=b,"object"==typeof console&&console.error&&console.error(c),setTimeout(function(){throw c})}}).call(e.prototype),b.Tokenizer=e}),ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"],function(a,b,c){"use strict";var d=a("../lib/lang"),e=function(){this.$rules={start:[{token:"empty_line",regex:"^$"},{defaultToken:"text"}]}};(function(){this.addRules=function(a,b){if(b)for(var c in a){for(var d=a[c],e=0;e=this.$rowTokens.length;){if(this.$row+=1,a||(a=this.$session.getLength()),this.$row>=a)return this.$row=a-1,null;this.$rowTokens=this.$session.getTokens(this.$row),this.$tokenIndex=0}return this.$rowTokens[this.$tokenIndex]},this.getCurrentToken=function(){return this.$rowTokens[this.$tokenIndex]},this.getCurrentTokenRow=function(){return this.$row},this.getCurrentTokenColumn=function(){var a=this.$rowTokens,b=this.$tokenIndex,c=a[b].start;if(void 0!==c)return c;for(c=0;b>0;)b-=1,c+=a[b].value.length;return c}}).call(d.prototype),b.TokenIterator=d}),ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"],function(a,b,c){"use strict";var d=a("../tokenizer").Tokenizer,e=a("./text_highlight_rules").TextHighlightRules,f=a("./behaviour").Behaviour,g=a("../unicode"),h=a("../lib/lang"),i=a("../token_iterator").TokenIterator,j=a("../range").Range,k=function(){this.HighlightRules=e,this.$behaviour=new f};(function(){this.tokenRe=new RegExp("^["+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]+","g"),this.nonTokenRe=new RegExp("^(?:[^"+g.packages.L+g.packages.Mn+g.packages.Mc+g.packages.Nd+g.packages.Pc+"\\$_]|\\s])+","g"),this.getTokenizer=function(){return this.$tokenizer||(this.$highlightRules=this.$highlightRules||new this.HighlightRules,this.$tokenizer=new d(this.$highlightRules.getRules())),this.$tokenizer},this.lineCommentStart="",this.blockComment="",this.toggleCommentLines=function(a,b,c,d){function e(a){for(var b=c;d>=b;b++)a(f.getLine(b),b)}var f=b.doc,g=!0,i=!0,j=1/0,k=b.getTabSize(),l=!1;if(this.lineCommentStart){if(Array.isArray(this.lineCommentStart))var m=this.lineCommentStart.map(h.escapeRegExp).join("|"),n=this.lineCommentStart[0];else var m=h.escapeRegExp(this.lineCommentStart),n=this.lineCommentStart;m=new RegExp("^(\\s*)(?:"+m+") ?"),l=b.getUseSoftTabs();var o=function(a,b){var c=a.match(m);if(c){var d=c[1].length,e=c[0].length;s(a,d,e)||" "!=c[0][e-1]||e--,f.removeInLine(b,d,e)}},p=n+" ",q=function(a,b){(!g||/\S/.test(a))&&(s(a,j,j)?f.insertInLine({row:b,column:j},p):f.insertInLine({row:b,column:j},n))},r=function(a,b){return m.test(a)},s=function(a,b,c){for(var d=0;b--&&" "==a.charAt(b);)d++;if(d%k!=0)return!1;for(var d=0;" "==a.charAt(c++);)d++;return k>2?d%k!=k-1:d%k==0}}else{if(!this.blockComment)return!1;var n=this.blockComment.start,t=this.blockComment.end,m=new RegExp("^(\\s*)(?:"+h.escapeRegExp(n)+")"),u=new RegExp("(?:"+h.escapeRegExp(t)+")\\s*$"),q=function(a,b){r(a,b)||(!g||/\S/.test(a))&&(f.insertInLine({row:b,column:a.length},t),f.insertInLine({row:b,column:j},n))},o=function(a,b){var c;(c=a.match(u))&&f.removeInLine(b,a.length-c[0].length,a.length),(c=a.match(m))&&f.removeInLine(b,c[1].length,c[0].length)},r=function(a,c){if(m.test(a))return!0;for(var d=b.getTokens(c),e=0;ec&&(j=c),i&&!r(a,b)&&(i=!1)):v>a.length&&(v=a.length)}),j==1/0&&(j=v,g=!1,i=!1),l&&j%k!=0&&(j=Math.floor(j/k)*k),e(i?o:q)},this.toggleBlockComment=function(a,b,c,d){var e=this.blockComment;if(e){!e.start&&e[0]&&(e=e[0]);var f,g,h=new i(b,d.row,d.column),k=h.getCurrentToken(),l=(b.selection,b.selection.toOrientedRange());if(k&&/comment/.test(k.type)){for(var m,n;k&&/comment/.test(k.type);){var o=k.value.indexOf(e.start);if(-1!=o){var p=h.getCurrentTokenRow(),q=h.getCurrentTokenColumn()+o;m=new j(p,q,p,q+e.start.length);break}k=h.stepBackward()}for(var h=new i(b,d.row,d.column),k=h.getCurrentToken();k&&/comment/.test(k.type);){var o=k.value.indexOf(e.end);if(-1!=o){var p=h.getCurrentTokenRow(),q=h.getCurrentTokenColumn()+o;n=new j(p,q,p,q+e.end.length);break}k=h.stepForward()}n&&b.remove(n),m&&(b.remove(m),f=m.start.row,g=-e.start.length)}else g=e.start.length,f=c.start.row,b.insert(c.end,e.end),b.insert(c.start,e.start);l.start.row==f&&(l.start.column+=g),l.end.row==f&&(l.end.column+=g),b.selection.fromOrientedRange(l)}},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1},this.autoOutdent=function(a,b,c){},this.$getIndent=function(a){return a.match(/^\s*/)[0]},this.createWorker=function(a){return null},this.createModeDelegates=function(a){this.$embeds=[],this.$modes={};for(var b in a)a[b]&&(this.$embeds.push(b),this.$modes[b]=new a[b]);for(var c=["toggleBlockComment","toggleCommentLines","getNextLineIndent","checkOutdent","autoOutdent","transformAction","getCompletions"],b=0;bf;f++)if("string"==typeof e[f].token)/keyword|support|storage/.test(e[f].token)&&c.push(e[f].regex);else if("object"==typeof e[f].token)for(var h=0,i=e[f].token.length;i>h;h++)if(/keyword|support|storage/.test(e[f].token[h])){var d=e[f].regex.match(/\(.+?\)/g)[h];c.push(d.substr(1,d.length-2))}this.completionKeywords=c}return a?c.concat(this.$keywordList||[]):this.$keywordList},this.$createKeywordList=function(){return this.$highlightRules||this.getTokenizer(),this.$keywordList=this.$highlightRules.$keywordList||[]},this.getCompletions=function(a,b,c,d){var e=this.$keywordList||this.$createKeywordList();return e.map(function(a){return{name:a,value:a,score:0,meta:"keyword"}})},this.$id="ace/mode/text"}).call(k.prototype),b.Mode=k}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.$onChange=this.onChange.bind(this),this.attach(a),"undefined"==typeof c?this.setPosition(b.row,b.column):this.setPosition(b,c)};(function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(a){var b=a.data,c=b.range;if((c.start.row!=c.end.row||c.start.row==this.row)&&!(c.start.row>this.row||c.start.row==this.row&&c.start.column>this.column)){var d=this.row,e=this.column,f=c.start,g=c.end;"insertText"===b.action?f.row===d&&f.column<=e?f.column===e&&this.$insertRight||(f.row===g.row?e+=g.column-f.column:(e-=f.column,d+=g.row-f.row)):f.row!==g.row&&f.row=e?f.column:Math.max(0,e-(g.column-f.column)):f.row!==g.row&&f.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):0>a?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),0>b&&(c.column=0),c}}).call(f.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=a("./range").Range,g=a("./anchor").Anchor,h=function(a){this.$lines=[],0===a.length?this.$lines=[""]:Array.isArray(a)?this._insertLines(0,a):this.insert({row:0,column:0},a)};(function(){d.implement(this,e),this.setValue=function(a){var b=this.getLength();this.remove(new f(0,0,b,this.getLine(b-1).length)),this.insert({row:0,column:0},a)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(a,b){return new g(this,a,b)},0==="aaa".split(/a/).length?this.$split=function(a){return a.replace(/\r\n|\r/g,"\n").split("\n")}:this.$split=function(a){return a.split(/\r\n|\r|\n/)},this.$detectNewLine=function(a){var b=a.match(/^.*?(\r\n|\r|\n)/m);this.$autoNewLine=b?b[1]:"\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\r\n";case"unix":return"\n";default:return this.$autoNewLine||"\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(a){this.$newLineMode!==a&&(this.$newLineMode=a,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(a){return"\r\n"==a||"\r"==a||"\n"==a},this.getLine=function(a){return this.$lines[a]||""},this.getLines=function(a,b){return this.$lines.slice(a,b+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(a){if(a.start.row==a.end.row)return this.getLine(a.start.row).substring(a.start.column,a.end.column);var b=this.getLines(a.start.row,a.end.row);b[0]=(b[0]||"").substring(a.start.column);var c=b.length-1;return a.end.row-a.start.row==c&&(b[c]=b[c].substring(0,a.end.column)),b.join(this.getNewLineCharacter())},this.$clipPosition=function(a){var b=this.getLength();return a.row>=b?(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length):a.row<0&&(a.row=0),a},this.insert=function(a,b){if(!b||0===b.length)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=0==c.length?null:c.splice(c.length-1,1)[0];return a=this.insertInLine(a,d),null!==e&&(a=this.insertNewLine(a),a=this._insertLines(a.row,c),a=this.insertInLine(a,e||"")),a},this.insertLines=function(a,b){return a>=this.getLength()?this.insert({row:a,column:0},"\n"+b.join("\n")):this._insertLines(Math.max(a,0),b)},this._insertLines=function(a,b){if(0==b.length)return{row:a,column:0};for(;b.length>61440;){var c=this._insertLines(a,b.slice(0,61440));b=b.slice(61440),a=c.row}var d=[a,0];d.push.apply(d,b),this.$lines.splice.apply(this.$lines,d);var e=new f(a,0,a+b.length,0),g={action:"insertLines",range:e,lines:b};return this._signal("change",{data:g}),e.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length)); +var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};return this._signal("change",{data:d}),c},this.insertInLine=function(a,b){if(0==b.length)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};return this._signal("change",{data:e}),d},this.remove=function(a){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end),a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=0==a.start.column?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this._removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};return this._signal("change",{data:i}),d.start}},this.removeLines=function(a,b){return 0>a||b>=this.getLength()?this.remove(new f(a,0,b+1,0)):this._removeLines(a,b)},this._removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};return this._signal("change",{data:e}),d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._signal("change",{data:g})},this.replace=function(a,b){if(a instanceof f||(a=f.fromPoints(a.start,a.end)),0==b.length&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;if(this.remove(a),b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);"insertLines"==c.action?this._removeLines(d.start.row,d.end.row-1):"insertText"==c.action?this.remove(d):"removeLines"==c.action?this._insertLines(d.start.row,c.lines):"removeText"==c.action&&this.insert(d.start,c.text)}},this.indexToPosition=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=b||0,f=c.length;f>e;e++)if(a-=c[e].length+d,0>a)return{row:e,column:a+c[e].length+d};return{row:f-1,column:c[f-1].length}},this.positionToIndex=function(a,b){for(var c=this.$lines||this.getAllLines(),d=this.getNewLineCharacter().length,e=0,f=Math.min(a.row,c.length),g=b||0;f>g;++g)e+=c[g].length+d;return e+a.column}}).call(h.prototype),b.Document=h}),ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/event_emitter").EventEmitter,f=function(a,b){this.running=!1,this.lines=[],this.states=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(c.running){for(var a=new Date,b=c.currentLine,d=-1,e=c.doc;c.lines[b];)b++;var f=b,g=e.getLength(),h=0;for(c.running=!1;g>b;){c.$tokenizeRow(b),d=b;do b++;while(c.lines[b]);if(h++,h%5===0&&new Date-a>20){c.running=setTimeout(c.$worker,20);break}}c.currentLine=b,d>=f&&c.fireUpdateEvent(f,d)}}};(function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.states=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.states=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._signal("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.states.splice(this.currentLine,this.states.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.scheduleStart=function(){this.running||(this.running=setTimeout(this.$worker,700))},this.$updateOnChange=function(a){var b=a.range,c=b.start.row,d=b.end.row-c;if(0===d)this.lines[c]=null;else if("removeText"==a.action||"removeLines"==a.action)this.lines.splice(c,d+1,null),this.states.splice(c,d+1,null);else{var e=Array(d+1);e.unshift(c,1),this.lines.splice.apply(this.lines,e),this.states.splice.apply(this.states,e)}this.currentLine=Math.min(c,this.currentLine,this.doc.getLength()),this.stop()},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a){return this.lines[a]||this.$tokenizeRow(a)},this.getState=function(a){return this.currentLine==a&&this.$tokenizeRow(a),this.states[a]||"start"},this.$tokenizeRow=function(a){var b=this.doc.getLine(a),c=this.states[a-1],d=this.tokenizer.getLineTokens(b,c,a);return this.states[a]+""!=d.state+""?(this.states[a]=d.state,this.lines[a+1]=null,this.currentLine>a+1&&(this.currentLine=a+1)):this.currentLine==a&&(this.currentLine=a+1),this.lines[a]=d.tokens}}).call(f.prototype),b.BackgroundTokenizer=f}),ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"],function(a,b,c){"use strict";var d=a("./lib/lang"),e=(a("./lib/oop"),a("./range").Range),f=function(a,b,c){this.setRegexp(a),this.clazz=b,this.type=c||"text"};(function(){this.MAX_RANGES=500,this.setRegexp=function(a){this.regExp+""!=a+""&&(this.regExp=a,this.cache=[])},this.update=function(a,b,c,f){if(this.regExp)for(var g=f.firstRow,h=f.lastRow,i=g;h>=i;i++){var j=this.cache[i];null==j&&(j=d.getMatchOffsets(c.getLine(i),this.regExp),j.length>this.MAX_RANGES&&(j=j.slice(0,this.MAX_RANGES)),j=j.map(function(a){return new e(i,a.offset,i,a.offset+a.length)}),this.cache[i]=j.length?j:"");for(var k=j.length;k--;)b.drawSingleLineMarker(a,j[k].toScreenRange(c),this.clazz,f)}}}).call(f.prototype),b.SearchHighlight=f}),ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"],function(a,b,c){"use strict";function d(a,b){this.foldData=a,Array.isArray(b)?this.folds=b:b=this.folds=[b];var c=b[b.length-1];this.range=new e(b[0].start.row,b[0].start.column,c.end.row,c.end.column),this.start=this.range.start,this.end=this.range.end,this.folds.forEach(function(a){a.setFoldLine(this)},this)}var e=a("../range").Range;(function(){this.shiftRow=function(a){this.start.row+=a,this.end.row+=a,this.folds.forEach(function(b){b.start.row+=a,b.end.row+=a})},this.addFold=function(a){if(a.sameRow){if(a.start.rowthis.endRow)throw new Error("Can't add a fold to this FoldLine as it has no connection");this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else{if(a.end.row!=this.start.row)throw new Error("Trying to add fold to FoldRow that doesn't have a matching row");this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column}a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d,e,f,g=0,h=this.folds,i=!0;null==b&&(b=this.end.row,c=this.end.column);for(var j=0;ja)return{row:d.start.row,column:d.start.column+a};if(a-=d.placeholder.length,0>a)return d.start;b=d.end.column}return{row:this.end.row,column:this.end.column+a}}}).call(d.prototype),b.FoldLine=d}),ace.define("ace/range_list",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("./range").Range,e=d.comparePoints,f=function(){this.ranges=[]};(function(){this.comparePoints=e,this.pointIndex=function(a,b,c){for(var d=this.ranges,f=c||0;f0)){var i=e(a,g.start);return 0===h?b&&0!==i?-f-2:f:i>0||0===i&&!b?f:-f-1}}return-f-1},this.add=function(a){var b=!a.isEmpty(),c=this.pointIndex(a.start,b);0>c&&(c=-c-1);var d=this.pointIndex(a.end,b,c);return 0>d?d=-d-1:d++,this.ranges.splice(c,d-c,a)},this.addList=function(a){for(var b=[],c=a.length;c--;)b.push.call(b,this.add(a[c]));return b},this.substractPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges.splice(b,1):void 0},this.merge=function(){var a=[],b=this.ranges;b=b.sort(function(a,b){return e(a.start,b.start)});for(var c,d=b[0],f=1;fg||(0!=g||c.isEmpty()||d.isEmpty())&&(e(c.end,d.end)<0&&(c.end.row=d.end.row,c.end.column=d.end.column),b.splice(f,1),a.push(d),d=c,f--)}return this.ranges=b,a},this.contains=function(a,b){return this.pointIndex({row:a,column:b})>=0},this.containsPoint=function(a){return this.pointIndex(a)>=0},this.rangeAtPoint=function(a){var b=this.pointIndex(a);return b>=0?this.ranges[b]:void 0},this.clipRows=function(a,b){var c=this.ranges;if(c[0].start.row>b||c[c.length-1].start.rowd&&(d=-d-1);var e=this.pointIndex({row:b,column:0},d);0>e&&(e=-e-1);for(var f=[],g=d;e>g;g++)f.push(c[g]);return f},this.removeAll=function(){return this.ranges.splice(0,this.ranges.length)},this.attach=function(a){this.session&&this.detach(),this.session=a,this.onChange=this.$onChange.bind(this),this.session.on("change",this.onChange)},this.detach=function(){this.session&&(this.session.removeListener("change",this.onChange),this.session=null)},this.$onChange=function(a){var b=a.data.range;if("i"==a.data.action[0])var c=b.start,d=b.end;else var d=b.start,c=b.end;for(var e=c.row,f=d.row,g=f-e,h=-c.column+d.column,i=this.ranges,j=0,k=i.length;k>j;j++){var l=i[j];if(!(l.end.rowe)break;if(l.start.row==e&&l.start.column>=c.column&&(l.start.column==c.column&&this.$insertRight||(l.start.column+=h,l.start.row+=g)),l.end.row==e&&l.end.column>=c.column){if(l.end.column==c.column&&this.$insertRight)continue;l.end.column==c.column&&h>0&&k-1>j&&l.end.column>l.start.column&&l.end.column==i[j+1].start.column&&(l.end.column-=h),l.end.column+=h,l.end.row+=g}}}if(0!=g&&k>j)for(;k>j;j++){var l=i[j];l.start.row+=g,l.end.row+=g}}}).call(f.prototype),b.RangeList=f}),ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"],function(a,b,c){"use strict";function d(a,b){a.row-=b.row,0==a.row&&(a.column-=b.column)}function e(a,b){d(a.start,b),d(a.end,b)}function f(a,b){0==a.row&&(a.column+=b.column),a.row+=b.row}function g(a,b){f(a.start,b),f(a.end,b)}var h=(a("../range").Range,a("../range_list").RangeList),i=a("../lib/oop"),j=b.Fold=function(a,b){this.foldLine=null,this.placeholder=b,this.range=a,this.start=a.start,this.end=a.end,this.sameRow=a.start.row==a.end.row,this.subFolds=this.ranges=[]};i.inherits(j,h),function(){this.toString=function(){return'"'+this.placeholder+'" '+this.range.toString()},this.setFoldLine=function(a){this.foldLine=a,this.subFolds.forEach(function(b){b.setFoldLine(a)})},this.clone=function(){var a=this.range.clone(),b=new j(a,this.placeholder);return this.subFolds.forEach(function(a){b.subFolds.push(a.clone())}),b.collapseChildren=this.collapseChildren,b},this.addSubFold=function(a){if(!this.range.isEqual(a)){if(!this.range.containsRange(a))throw new Error("A fold can't intersect already existing fold"+a.range+this.range);e(a,this.start);for(var b=a.start.row,c=a.start.column,d=0,f=-1;d=a)return e;if(e.end.row>a)return null}return null},this.getNextFoldLine=function(a,b){var c=this.$foldData,d=0;for(b&&(d=c.indexOf(b)),-1==d&&(d=0),d;d=a)return e}return null},this.getFoldedRowCount=function(a,b){for(var c=this.$foldData,d=b-a+1,e=0;e=b){b>h&&(h>=a?d-=b-h:d=0);break}g>=a&&(d-=h>=a?g-h:g-a+1)}return d},this.$addFoldLine=function(a){return this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row}),a},this.addFold=function(a,b){var c,d=this.$foldData,e=!1;a instanceof g?c=a:(c=new g(b,a),c.collapseChildren=b.collapseChildren),this.$clipRangeToDocument(c.range);var h=c.start.row,i=c.start.column,j=c.end.row,k=c.end.column;if(!(j>h||h==j&&k-2>=i))throw new Error("The range has to be at least 2 characters width");var l=this.getFoldAt(h,i,1),m=this.getFoldAt(j,k,-1);if(l&&m==l)return l.addSubFold(c);l&&!l.range.isStart(h,i)&&this.removeFold(l),m&&!m.range.isEnd(j,k)&&this.removeFold(m);var n=this.getFoldsInRange(c.range);n.length>0&&(this.removeFolds(n),n.forEach(function(a){c.addSubFold(a)}));for(var o=0;o0&&this.foldAll(a.start.row+1,a.end.row,a.collapseChildren-1),a.subFolds=[]},this.expandFolds=function(a){a.forEach(function(a){this.expandFold(a)},this)},this.unfold=function(a,b){var c,d;if(null==a?(c=new e(0,0,this.getLength(),0),b=!0):c="number"==typeof a?new e(a,0,a,this.getLine(a).length):"row"in a?e.fromPoints(a,a):a,d=this.getFoldsInRangeList(c),b)this.removeFolds(d);else for(var f=d;f.length;)this.expandFolds(f),f=this.getFoldsInRangeList(c);return d.length?d:void 0},this.isRowFolded=function(a,b){return!!this.getFoldLine(a,b)},this.getRowFoldEnd=function(a,b){var c=this.getFoldLine(a,b);return c?c.end.row:a},this.getRowFoldStart=function(a,b){var c=this.getFoldLine(a,b);return c?c.start.row:a},this.getFoldDisplayLine=function(a,b,c,d,e){null==d&&(d=a.start.row),null==e&&(e=0),null==b&&(b=a.end.row),null==c&&(c=this.getLine(b).length);var f=this.doc,g="";return a.walk(function(a,b,c,h){if(!(d>b)){if(b==d){if(e>c)return;h=Math.max(e,h)}g+=null!=a?a:f.getLine(b).substring(h,c)}},b,c),g},this.getDisplayLine=function(a,b,c,d){var e=this.getFoldLine(a);if(e)return this.getFoldDisplayLine(e,a,b,c,d);var f;return f=this.doc.getLine(a),f.substring(d||0,b||f.length)},this.$cloneFoldData=function(){var a=[];return a=this.$foldData.map(function(b){var c=b.folds.map(function(a){return a.clone()});return new f(a,c)})},this.toggleFold=function(a){var b,c,d=this.selection,e=d.getRange();if(e.isEmpty()){var f=e.start;if(b=this.getFoldAt(f.row,f.column))return void this.expandFold(b);(c=this.findMatchingBracket(f))?1==e.comparePoint(c)?e.end=c:(e.start=c,e.start.column++,e.end.column--):(c=this.findMatchingBracket({row:f.row,column:f.column+1}))?(1==e.comparePoint(c)?e.end=c:e.start=c,e.start.column++):e=this.getCommentFoldRange(f.row,f.column)||e}else{var g=this.getFoldsInRange(e);if(a&&g.length)return void this.expandFolds(g);1==g.length&&(b=g[0])}if(b||(b=this.getFoldAt(e.start.row,e.start.column)),b&&b.range.toString()==e.toString())return void this.expandFold(b);var h="...";if(!e.isMultiLine()){if(h=this.getTextRange(e),h.length<4)return;h=h.trim().substring(0,2)+".."}this.addFold(h,e)},this.getCommentFoldRange=function(a,b,c){var d=new h(this,a,b),f=d.getCurrentToken();if(f&&/^comment|string/.test(f.type)){var g=new e,i=new RegExp(f.type.replace(/\..*/,"\\."));if(1!=c){do f=d.stepBackward();while(f&&i.test(f.type));d.stepForward()}if(g.start.row=d.getCurrentTokenRow(),g.start.column=d.getCurrentTokenColumn()+2,d=new h(this,a,b),-1!=c){do f=d.stepForward();while(f&&i.test(f.type));f=d.stepBackward()}else f=d.getCurrentToken();return g.end.row=d.getCurrentTokenRow(),g.end.column=d.getCurrentTokenColumn()+f.value.length-2,g}},this.foldAll=function(a,b,c){void 0==c&&(c=1e5);var d=this.foldWidgets;if(d){b=b||this.getLength(),a=a||0;for(var e=a;b>e;e++)if(null==d[e]&&(d[e]=this.getFoldWidget(e)),"start"==d[e]){var f=this.getFoldWidgetRange(e);if(f&&f.isMultiLine()&&f.end.row<=b&&f.start.row>=a){e=f.end.row;try{var g=this.addFold("...",f);g&&(g.collapseChildren=c)}catch(h){}}}}},this.$foldStyles={manual:1,markbegin:1,markbeginend:1},this.$foldStyle="markbegin",this.setFoldStyle=function(a){if(!this.$foldStyles[a])throw new Error("invalid fold style: "+a+"["+Object.keys(this.$foldStyles).join(", ")+"]");if(this.$foldStyle!=a){this.$foldStyle=a,"manual"==a&&this.unfold();var b=this.$foldMode;this.$setFolding(null),this.$setFolding(b)}},this.$setFolding=function(a){if(this.$foldMode!=a){if(this.$foldMode=a,this.removeListener("change",this.$updateFoldWidgets),this._emit("changeAnnotation"),!a||"manual"==this.$foldStyle)return void(this.foldWidgets=null);this.foldWidgets=[],this.getFoldWidget=a.getFoldWidget.bind(a,this,this.$foldStyle),this.getFoldWidgetRange=a.getFoldWidgetRange.bind(a,this,this.$foldStyle),this.$updateFoldWidgets=this.updateFoldWidgets.bind(this),this.on("change",this.$updateFoldWidgets)}},this.getParentFoldRangeData=function(a,b){var c=this.foldWidgets;if(!c||b&&c[a])return{};for(var d,e=a-1;e>=0;){var f=c[e];if(null==f&&(f=c[e]=this.getFoldWidget(e)),"start"==f){var g=this.getFoldWidgetRange(e);if(d||(d=g),g&&g.end.row>=a)break}e--}return{range:-1!==e&&g,firstRange:d}},this.onFoldWidgetClick=function(a,b){b=b.domEvent;var c={children:b.shiftKey,all:b.ctrlKey||b.metaKey,siblings:b.altKey},d=this.$toggleFoldWidget(a,c);if(!d){var e=b.target||b.srcElement;e&&/ace_fold-widget/.test(e.className)&&(e.className+=" ace_invalid")}},this.$toggleFoldWidget=function(a,b){if(this.getFoldWidget){var c=this.getFoldWidget(a),d=this.getLine(a),e="end"===c?-1:1,f=this.getFoldAt(a,-1===e?0:d.length,e);if(f)return void(b.children||b.all?this.removeFold(f):this.expandFold(f));var g=this.getFoldWidgetRange(a,!0);if(g&&!g.isMultiLine()&&(f=this.getFoldAt(g.start.row,g.start.column,1),f&&g.isEqual(f.range)))return void this.removeFold(f);if(b.siblings){var h=this.getParentFoldRangeData(a);if(h.range)var i=h.range.start.row+1,j=h.range.end.row;this.foldAll(i,j,b.all?1e4:0)}else b.children?(j=g?g.end.row:this.getLength(),this.foldAll(a+1,g.end.row,b.all?1e4:0)):g&&(b.all&&(g.collapseChildren=1e4),this.addFold("...",g));return g}},this.toggleFoldWidget=function(a){var b=this.selection.getCursor().row;b=this.getRowFoldStart(b);var c=this.$toggleFoldWidget(b,{});if(!c){var d=this.getParentFoldRangeData(b,!0);if(c=d.range||d.firstRange){b=c.start.row;var e=this.getFoldAt(b,this.getLine(b).length,1);e?this.removeFold(e):this.addFold("...",c)}}},this.updateFoldWidgets=function(a){var b=a.data,c=b.range,d=c.start.row,e=c.end.row-d;if(0===e)this.foldWidgets[d]=null;else if("removeText"==b.action||"removeLines"==b.action)this.foldWidgets.splice(d,e+1,null);else{var f=Array(e+1);f.unshift(d,1),this.foldWidgets.splice.apply(this.foldWidgets,f)}}}var e=a("../range").Range,f=a("./fold_line").FoldLine,g=a("./fold").Fold,h=a("../token_iterator").TokenIterator;b.Folding=d}),ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"],function(a,b,c){"use strict";function d(){this.findMatchingBracket=function(a,b){if(0==a.column)return null;var c=b||this.getLine(a.row).charAt(a.column-1);if(""==c)return null;var d=c.match(/([\(\[\{])|([\)\]\}])/);return d?d[1]?this.$findClosingBracket(d[1],a):this.$findOpeningBracket(d[2],a):null},this.getBracketRange=function(a){var b,c=this.getLine(a.row),d=!0,e=c.charAt(a.column-1),g=e&&e.match(/([\(\[\{])|([\)\]\}])/);if(g||(e=c.charAt(a.column),a={row:a.row,column:a.column+1},g=e&&e.match(/([\(\[\{])|([\)\]\}])/),d=!1),!g)return null;if(g[1]){var h=this.$findClosingBracket(g[1],a);if(!h)return null;b=f.fromPoints(a,h),d||(b.end.column++,b.start.column--),b.cursor=b.end}else{var h=this.$findOpeningBracket(g[2],a);if(!h)return null;b=f.fromPoints(h,a),d||(b.start.column++,b.end.column--),b.cursor=b.start}return b},this.$brackets={")":"(","(":")","]":"[","[":"]","{":"}","}":"{"},this.$findOpeningBracket=function(a,b,c){var d=this.$brackets[a],f=1,g=new e(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("rparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var i=b.column-g.getCurrentTokenColumn()-2,j=h.value;;){for(;i>=0;){var k=j.charAt(i);if(k==d){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else k==a&&(f+=1);i-=1}do h=g.stepBackward();while(h&&!c.test(h.type));if(null==h)break;j=h.value,i=j.length-1}return null}},this.$findClosingBracket=function(a,b,c){var d=this.$brackets[a],f=1,g=new e(this,b.row,b.column),h=g.getCurrentToken();if(h||(h=g.stepForward()),h){c||(c=new RegExp("(\\.?"+h.type.replace(".","\\.").replace("lparen",".paren").replace(/\b(?:end|start|begin)\b/,"")+")+"));for(var i=b.column-g.getCurrentTokenColumn();;){for(var j=h.value,k=j.length;k>i;){var l=j.charAt(i);if(l==d){if(f-=1,0==f)return{row:g.getCurrentTokenRow(),column:i+g.getCurrentTokenColumn()}}else l==a&&(f+=1);i+=1}do h=g.stepForward();while(h&&!c.test(h.type));if(null==h)break;i=0}return null}}}var e=a("../token_iterator").TokenIterator,f=a("../range").Range;b.BracketMatch=d}),ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/lang"),f=a("./config"),g=a("./lib/event_emitter").EventEmitter,h=a("./selection").Selection,i=a("./mode/text").Mode,j=a("./range").Range,k=a("./document").Document,l=a("./background_tokenizer").BackgroundTokenizer,m=a("./search_highlight").SearchHighlight,n=function(a,b){this.$breakpoints=[],this.$decorations=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$undoSelect=!0,this.$foldData=[],this.$foldData.toString=function(){return this.join("\n")},this.on("changeFold",this.onChangeFold.bind(this)),this.$onChange=this.onChange.bind(this),"object"==typeof a&&a.getLine||(a=new k(a)),this.setDocument(a),this.selection=new h(this),f.resetOptions(this),this.setMode(b),f._signal("session",this)};(function(){function a(a){return 4352>a?!1:a>=4352&&4447>=a||a>=4515&&4519>=a||a>=4602&&4607>=a||a>=9001&&9002>=a||a>=11904&&11929>=a||a>=11931&&12019>=a||a>=12032&&12245>=a||a>=12272&&12283>=a||a>=12288&&12350>=a||a>=12353&&12438>=a||a>=12441&&12543>=a||a>=12549&&12589>=a||a>=12593&&12686>=a||a>=12688&&12730>=a||a>=12736&&12771>=a||a>=12784&&12830>=a||a>=12832&&12871>=a||a>=12880&&13054>=a||a>=13056&&19903>=a||a>=19968&&42124>=a||a>=42128&&42182>=a||a>=43360&&43388>=a||a>=44032&&55203>=a||a>=55216&&55238>=a||a>=55243&&55291>=a||a>=63744&&64255>=a||a>=65040&&65049>=a||a>=65072&&65106>=a||a>=65108&&65126>=a||a>=65128&&65131>=a||a>=65281&&65376>=a||a>=65504&&65510>=a}d.implement(this,g),this.setDocument=function(a){this.doc&&this.doc.removeListener("change",this.$onChange),this.doc=a,a.on("change",this.$onChange),this.bgTokenizer&&this.bgTokenizer.setDocument(this.getDocument()),this.resetCaches()},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(!a)return this.$docRowCache=[],void(this.$screenRowCache=[]);var b=this.$docRowCache.length,c=this.$getRowCacheIndex(this.$docRowCache,a)+1;b>c&&(this.$docRowCache.splice(c,b),this.$screenRowCache.splice(c,b))},this.$getRowCacheIndex=function(a,b){for(var c=0,d=a.length-1;d>=c;){var e=c+d>>1,f=a[e];if(b>f)c=e+1;else{if(!(f>b))return e;d=e-1}}return c-1},this.resetCaches=function(){this.$modified=!0,this.$wrapData=[],this.$rowLengthCache=[],this.$resetRowCache(0),this.bgTokenizer&&this.bgTokenizer.start(0)},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);this.$fromUndo||!this.$undoManager||b.ignore||(this.$deltasDoc.push(b),c&&0!=c.length&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer&&this.bgTokenizer.$updateOnChange(b),this._signal("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveTo(0,0),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.setUndoManager(this.$undoManager),this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a){return this.bgTokenizer.getTokens(a)},this.getTokenAt=function(a,b){var c,d=this.bgTokenizer.getTokens(a),e=0;if(null==b)f=d.length-1,e=this.getLine(a).length;else for(var f=0;f=b));f++);return(c=d[f])?(c.index=f,c.start=e-c.value.length,c):null},this.setUndoManager=function(a){if(this.$undoManager=a,this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel(),a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b],merge:b.mergeUndoDeltas}),b.mergeUndoDeltas=!1,b.$deltas=[]},this.$informUndoManager=e.delayedCall(this.$syncInformUndoManager)}},this.markUndoGroup=function(){this.$syncInformUndoManager&&this.$syncInformUndoManager()},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):" "},this.setUseSoftTabs=function(a){this.setOption("useSoftTabs",a)},this.getUseSoftTabs=function(){return this.$useSoftTabs&&!this.$mode.$indentWithTabs},this.setTabSize=function(a){this.setOption("tabSize",a)},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize===0},this.$overwrite=!1,this.setOverwrite=function(a){this.setOption("overwrite",a)},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.addGutterDecoration=function(a,b){this.$decorations[a]||(this.$decorations[a]=""),this.$decorations[a]+=" "+b,this._signal("changeBreakpoint",{})},this.removeGutterDecoration=function(a,b){this.$decorations[a]=(this.$decorations[a]||"").replace(" "+b,""),this._signal("changeBreakpoint",{})},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[]; +for(var b=0;b0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe)),d)var e=this.tokenRe;else if(/^\s+$/.test(c.slice(b-1,b+1)))var e=/\s/;else var e=this.nonTokenRe;var f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}for(var g=b;ga&&(a=b.screenWidth)}),this.lineWidgetWidth=a},this.$computeWidth=function(a){if(this.$modified||a){if(this.$modified=!1,this.$useWrapMode)return this.screenWidth=this.$wrapLimit;for(var b=this.doc.getAllLines(),c=this.$rowLengthCache,d=0,e=0,f=this.$foldData[e],g=f?f.start.row:1/0,h=b.length,i=0;h>i;i++){if(i>g){if(i=f.end.row+1,i>=h)break;f=this.$foldData[e++],g=f?f.start.row:1/0}null==c[i]&&(c[i]=this.$getStringScreenWidth(b[i])[0]),c[i]>d&&(d=c[i])}this.screenWidth=d}},this.getLine=function(a){return this.doc.getLine(a)},this.getLines=function(a,b){return this.doc.getLines(a,b)},this.getLength=function(){return this.doc.getLength()},this.getTextRange=function(a){return this.doc.getTextRange(a||this.selection.getRange())},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=a.length-1;-1!=d;d--){var e=a[d];"doc"==e.group?(this.doc.revertDeltas(e.deltas),c=this.$getUndoSelection(e.deltas,!0,c)):e.deltas.forEach(function(a){this.addFolds(a.folds)},this)}return this.$fromUndo=!1,c&&this.$undoSelect&&!b&&this.selection.setSelectionRange(c),c}},this.redoChanges=function(a,b){if(a.length){this.$fromUndo=!0;for(var c=null,d=0;da.end.column&&(f.start.column+=h),f.end.row==a.end.row&&f.end.column>a.end.column&&(f.end.column+=h)),g&&f.start.row>=a.end.row&&(f.start.row+=g,f.end.row+=g)}if(f.end=this.insert(f.start,d),e.length){var i=a.start,k=f.start,g=k.row-i.row,h=k.column-i.column;this.addFolds(e.map(function(a){return a=a.clone(),a.start.row==i.row&&(a.start.column+=h),a.end.row==i.row&&(a.end.column+=h),a.start.row+=g,a.end.row+=g,a}))}return f},this.indentRows=function(a,b,c){c=c.replace(/\t/g,this.getTabString());for(var d=a;b>=d;d++)this.insert({row:d,column:0},c)},this.outdentRows=function(a){for(var b=a.collapseRows(),c=new j(0,0,0,0),d=this.getTabSize(),e=b.start.row;e<=b.end.row;++e){var f=this.getLine(e);c.start.row=e,c.end.row=e;for(var g=0;d>g&&" "==f.charAt(g);++g);d>g&&" "==f.charAt(g)?(c.start.column=g,c.end.column=g+1):(c.start.column=0,c.end.column=g),this.remove(c)}},this.$moveLines=function(a,b,c){if(a=this.getRowFoldStart(a),b=this.getRowFoldEnd(b),0>c){var d=this.getRowFoldStart(a+c);if(0>d)return 0;var e=d-a}else if(c>0){var d=this.getRowFoldEnd(b+c);if(d>this.doc.getLength()-1)return 0;var e=d-b}else{a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b);var e=b-a+1}var f=new j(a,0,b,Number.MAX_VALUE),g=this.getFoldsInRange(f).map(function(a){return a=a.clone(),a.start.row+=e,a.end.row+=e,a}),h=0==c?this.doc.getLines(a,b):this.doc.removeLines(a,b);return this.doc.insertLines(a+e,h),g.length&&this.addFolds(g),e},this.moveLinesUp=function(a,b){return this.$moveLines(a,b,-1)},this.moveLinesDown=function(a,b){return this.$moveLines(a,b,1)},this.duplicateLines=function(a,b){return this.$moveLines(a,b,0)},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipColumnToRow=function(a,b){return 0>b?0:Math.min(this.doc.getLine(a).length,b)},this.$clipPositionToDocument=function(a,b){if(b=Math.max(0,b),0>a)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$clipRangeToDocument=function(a){a.start.row<0?(a.start.row=0,a.start.column=0):a.start.column=this.$clipColumnToRow(a.start.row,a.start.column);var b=this.doc.getLength()-1;return a.end.row>b?(a.end.row=b,a.end.column=this.doc.getLine(b).length):a.end.column=this.$clipColumnToRow(a.end.row,a.end.column),a},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){if(this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0),a){var b=this.getLength();this.$wrapData=Array(b),this.$updateWrapData(0,b-1)}this._signal("changeWrapMode")}},this.getUseWrapMode=function(){return this.$useWrapMode},this.setWrapLimitRange=function(a,b){(this.$wrapLimitRange.min!==a||this.$wrapLimitRange.max!==b)&&(this.$wrapLimitRange={min:a,max:b},this.$modified=!0,this._signal("changeWrapMode"))},this.adjustWrapLimit=function(a,b){var c=this.$wrapLimitRange;c.max<0&&(c={min:b,max:b});var d=this.$constrainWrapLimit(a,c.min,c.max);return d!=this.$wrapLimit&&d>1?(this.$wrapLimit=d,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._signal("changeWrapLimit")),!0):!1},this.$constrainWrapLimit=function(a,b,c){return b&&(a=Math.max(b,a)),c&&(a=Math.min(c,a)),a},this.getWrapLimit=function(){return this.$wrapLimit},this.setWrapLimit=function(a){this.setWrapLimitRange(a,a)},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b,c=this.$useWrapMode,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;if(-1!=d.indexOf("Lines")?(f="insertLines"==d?e+a.data.lines.length:e,b=a.data.lines?a.data.lines.length:f-e):b=f-e,this.$updating=!0,0!=b)if(-1!=d.indexOf("remove")){this[c?"$wrapData":"$rowLengthCache"].splice(e,b);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-b);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l=h.row&&k.shiftRow(-b)}f=e}else{var n=Array(b);n.unshift(e,0);var o=c?this.$wrapData:this.$rowLengthCache;o.splice.apply(o,n);var j=this.$foldData,k=this.getFoldLine(e),l=0;if(k){var p=k.range.compareInside(g.row,g.column);0==p?(k=k.split(g.row,g.column),k&&(k.shiftRow(b),k.addRemoveChars(f,0,h.column-g.column))):-1==p&&(k.addRemoveChars(e,0,h.column-g.column),k.shiftRow(b)),l=j.indexOf(k)+1}for(l;l=e&&k.shiftRow(b)}}else{b=Math.abs(a.data.range.start.column-a.data.range.end.column),-1!=d.indexOf("remove")&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),b=-b);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,b)}return c&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),this.$updating=!1,c?this.$updateWrapData(e,f):this.$updateRowLengthCache(e,f),i},this.$updateRowLengthCache=function(a,b,c){this.$rowLengthCache[a]=null,this.$rowLengthCache[b]=null},this.$updateWrapData=function(a,b){var c,d,e=this.doc.getAllLines(),f=this.getTabSize(),g=this.$wrapData,i=this.$wrapLimit,j=a;for(b=Math.min(b,e.length-1);b>=j;)d=this.getFoldLine(j,d),d?(c=[],d.walk(function(a,b,d,f){var g;if(null!=a){g=this.$getDisplayTokens(a,c.length),g[0]=h;for(var i=1;ib;){var l=g+b;if(a[l-1]>=o&&a[l]>=o)d(l);else if(a[l]!=h&&a[l]!=k){for(var m=Math.max(l-(j?10:b-(b>>2)),g-1);l>m&&a[l]m&&a[l]m&&a[l]==n;)l--}else for(;l>m&&a[l]m?d(++l):(l=g+b,a[l]==c&&l--,d(l))}else{for(l;l!=g-1&&a[l]!=h;l--);if(l>g){d(l);continue}for(l=g+b;lj;j++)g.push(q)}else 32==i?g.push(o):i>39&&48>i||i>57&&64>i?g.push(n):i>=4352&&a(i)?g.push(b,c):g.push(b)}return g},this.$getStringScreenWidth=function(b,c,d){if(0==c)return[0,0];null==c&&(c=1/0),d=d||0;var e,f;for(f=0;f=4352&&a(e)?2:1,!(d>c));f++);return[d,f]},this.lineWidgets=null,this.getRowLength=function(a){if(this.lineWidgets)var b=this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0;else b=0;return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.getRowLineCount=function(a){return this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1:1},this.getScreenLastRowColumn=function(a){var b=this.screenToDocumentPosition(a,Number.MAX_VALUE);return this.documentToScreenColumn(b.row,b.column)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:void 0},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(0>a)return{row:0,column:0};var c,d,e=0,f=0,g=0,h=0,i=this.$screenRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var g=i[j],e=this.$docRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getLength()-1,n=this.getNextFoldLine(e),o=n?n.start.row:1/0;a>=g&&(h=this.getRowLength(e),!(g+h>a||e>=m));)g+=h,e++,e>o&&(e=n.end.row+1,n=this.getNextFoldLine(e,n),o=n?n.start.row:1/0),l&&(this.$docRowCache.push(e),this.$screenRowCache.push(g));if(n&&n.start.row<=e)c=this.getFoldDisplayLine(n),e=n.start.row;else{if(a>=g+h||e>m)return{row:m,column:this.getLine(m).length};c=this.getLine(e),n=null}if(this.$useWrapMode){var p=this.$wrapData[e];if(p){var q=Math.floor(a-g);d=p[q],q>0&&p.length&&(f=p[q-1]||p[p.length-1],c=c.substring(f))}}return f+=this.$getStringScreenWidth(c,b)[1],this.$useWrapMode&&f>=d&&(f=d-1),n?n.idxToPosition(f):{row:e,column:f}},this.documentToScreenPosition=function(a,b){if("undefined"==typeof b)var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=0,e=null,f=null;f=this.getFoldAt(a,b,1),f&&(a=f.start.row,b=f.start.column);var g,h=0,i=this.$docRowCache,j=this.$getRowCacheIndex(i,a),k=i.length;if(k&&j>=0)var h=i[j],d=this.$screenRowCache[j],l=a>i[k-1];else var l=!k;for(var m=this.getNextFoldLine(h),n=m?m.start.row:1/0;a>h;){if(h>=n){if(g=m.end.row+1,g>a)break;m=this.getNextFoldLine(g,m),n=m?m.start.row:1/0}else g=h+1;d+=this.getRowLength(h),h=g,l&&(this.$docRowCache.push(h),this.$screenRowCache.push(d))}var o="";if(m&&h>=n?(o=this.getFoldDisplayLine(m,a,b),e=m.start.row):(o=this.getLine(a).substring(0,b),e=a),this.$useWrapMode){var p=this.$wrapData[e];if(p){for(var q=0;o.length>=p[q];)d++,q++;o=o.substring(p[q-1]||0,o.length)}}return{row:d,column:this.$getStringScreenWidth(o)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null;if(this.$useWrapMode)for(var c=this.$wrapData.length,d=0,e=0,b=this.$foldData[e++],f=b?b.start.row:1/0;c>d;){var g=this.$wrapData[d];a+=g?g.length+1:1,d++,d>f&&(d=b.end.row+1,b=this.$foldData[e++],f=b?b.start.row:1/0)}else{a=this.getLength();for(var h=this.$foldData,e=0;e=l;l++){for(var m=0;j>m;m++)if(-1==e[l+m].search(h[m]))continue a;var n=e[l],o=e[l+j-1],p=n.length-n.match(h[0])[0].length,q=o.match(h[j-1])[0].length;i&&i.end.row===l&&i.end.column>p||(g.push(i=new f(l,p,l+j-1,q)),j>2&&(l=l+j-2))}}else for(var r=0;rr&&g[r].start.columnr&&g[m].end.column>v&&g[m].end.row==c.end.row;)m--;for(g=g.slice(r,m+1),r=0,m=g.length;m>r;r++)g[r].start.row+=c.start.row,g[r].end.row+=c.start.row}return g},this.replace=function(a,b){var c=this.$options,d=this.$assembleRegExp(c);if(c.$isMultiLine)return b;if(d){var e=d.exec(a);if(!e||e[0].length!=a.length)return null;if(b=a.replace(d,b),c.preserveCase){b=b.split("");for(var f=Math.min(a.length,a.length);f--;){var g=a[f];g&&g.toLowerCase()!=g?b[f]=b[f].toUpperCase():b[f]=b[f].toLowerCase()}b=b.join("")}return b}},this.$matchIterator=function(a,b){var c=this.$assembleRegExp(b);if(!c)return!1;var e,g=this,h=b.backwards;if(b.$isMultiLine)var i=c.length,j=function(b,d,g){var h=b.search(c[0]);if(-1!=h){for(var j=1;i>j;j++)if(b=a.getLine(d+j),-1==b.search(c[j]))return;var k=b.match(c[i-1])[0].length,l=new f(d,h,d+i-1,k);return 1==c.offset?(l.start.row--,l.start.column=Number.MAX_VALUE):g&&(l.start.column+=g),e(l)?!0:void 0}};else if(h)var j=function(a,b,f){for(var g=d.getMatchOffsets(a,c),h=g.length-1;h>=0;h--)if(e(g[h],b,f))return!0};else var j=function(a,b,f){for(var g=d.getMatchOffsets(a,c),h=0;h=g;d--)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=h,g=f.row;d>=g;d--)if(c(a.getLine(d),d))return}}:function(c){var d=f.row,e=a.getLine(d).substr(f.column);if(!c(e,d,f.column)){for(d+=1;h>=d;d++)if(c(a.getLine(d),d))return;if(0!=b.wrap)for(d=g,h=f.row;h>=d;d++)if(c(a.getLine(d),d))return}};return{forEach:i}}}).call(g.prototype),b.Search=g}),ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"],function(a,b,c){"use strict";function d(a,b){this.platform=b||(g.isMac?"mac":"win"),this.commands={},this.commandKeyBinding={},this.addCommands(a),this.$singleCommand=!0}function e(a,b){d.call(this,a,b),this.$singleCommand=!1}var f=a("../lib/keys"),g=a("../lib/useragent"),h=f.KEY_MODS;e.prototype=d.prototype,function(){this.addCommand=function(a){this.commands[a.name]&&this.removeCommand(a),this.commands[a.name]=a,a.bindKey&&this._buildKeyHash(a)},this.removeCommand=function(a,b){var c=a&&("string"==typeof a?a:a.name);a=this.commands[c],b||delete this.commands[c];var d=this.commandKeyBinding;for(var e in d){var f=d[e];if(f==a)delete d[e];else if(Array.isArray(f)){var g=f.indexOf(a);-1!=g&&(f.splice(g,1),1==f.length&&(d[e]=f[0]))}}},this.bindKey=function(a,b,c){return"object"==typeof a&&(a=a[this.platform]),a?"function"==typeof b?this.addCommand({exec:b,bindKey:a,name:b.name||a}):void a.split("|").forEach(function(a){var d="";if(-1!=a.indexOf(" ")){var e=a.split(/\s+/);a=e.pop(),e.forEach(function(a){var b=this.parseKeys(a),c=h[b.hashId]+b.key;d+=(d?" ":"")+c,this._addCommandToBinding(d,"chainKeys")},this),d+=" "}var f=this.parseKeys(a),g=h[f.hashId]+f.key;this._addCommandToBinding(d+g,b,c)},this):void 0},this._addCommandToBinding=function(a,b,c){var d,e=this.commandKeyBinding;b?!e[a]||this.$singleCommand?e[a]=b:(Array.isArray(e[a])?-1!=(d=e[a].indexOf(b))&&e[a].splice(d,1):e[a]=[e[a]],c||b.isDefault?e[a].unshift(b):e[a].push(b)):delete e[a]},this.addCommands=function(a){a&&Object.keys(a).forEach(function(b){var c=a[b];if(c){if("string"==typeof c)return this.bindKey(c,b);"function"==typeof c&&(c={exec:c}),"object"==typeof c&&(c.name||(c.name=b),this.addCommand(c))}},this)},this.removeCommands=function(a){Object.keys(a).forEach(function(b){this.removeCommand(a[b])},this)},this.bindKeys=function(a){Object.keys(a).forEach(function(b){this.bindKey(b,a[b])},this)},this._buildKeyHash=function(a){this.bindKey(a.bindKey,a)},this.parseKeys=function(a){var b=a.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(a){return a}),c=b.pop(),d=f[c];if(f.FUNCTION_KEYS[d])c=f.FUNCTION_KEYS[d].toLowerCase();else{if(!b.length)return{key:c,hashId:-1};if(1==b.length&&"shift"==b[0])return{key:c.toUpperCase(),hashId:-1}}for(var e=0,g=b.length;g--;){var h=f.KEY_MODS[b[g]];if(null==h)return"undefined"!=typeof console&&console.error("invalid modifier "+b[g]+" in "+a),!1;e|=h}return{key:c,hashId:e}},this.findKeyCommand=function(a,b){var c=h[a]+b;return this.commandKeyBinding[c]},this.handleKeyboard=function(a,b,c,d){var e=h[b]+c,f=this.commandKeyBinding[e];return a.$keyChain&&(a.$keyChain+=" "+e,f=this.commandKeyBinding[a.$keyChain]||f),!f||"chainKeys"!=f&&"chainKeys"!=f[f.length-1]?(a.$keyChain&&d>0&&(a.$keyChain=""),{command:f}):(a.$keyChain=a.$keyChain||e,{command:"null"})}}.call(d.prototype),b.HashHandler=d,b.MultiHashHandler=e}),ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../keyboard/hash_handler").MultiHashHandler,f=a("../lib/event_emitter").EventEmitter,g=function(a,b){e.call(this,b,a),this.byName=this.commands,this.setDefaultHandler("exec",function(a){return a.command.exec(a.editor,a.args||{})})};d.inherits(g,e),function(){d.implement(this,f),this.exec=function(a,b,c){if(Array.isArray(a)){for(var d=a.length;d--;)if(this.exec(a[d],b,c))return!0;return!1}if("string"==typeof a&&(a=this.commands[a]),!a)return!1;if(b&&b.$readOnly&&!a.readOnly)return!1;var e={editor:b,command:a,args:c};return e.returnValue=this._emit("exec",e),this._signal("afterExec",e),e.returnValue!==!1},this.toggleRecording=function(a){return this.$inReplay?void 0:(a&&a._emit("changeStatus"),this.recording?(this.macro.pop(),this.removeEventListener("exec",this.$addCommandToMacro),this.macro.length||(this.macro=this.oldMacro),this.recording=!1):(this.$addCommandToMacro||(this.$addCommandToMacro=function(a){this.macro.push([a.command,a.args])}.bind(this)),this.oldMacro=this.macro,this.macro=[],this.on("exec",this.$addCommandToMacro),this.recording=!0))},this.replay=function(a){if(!this.$inReplay&&this.macro){if(this.recording)return this.toggleRecording(a);try{this.$inReplay=!0,this.macro.forEach(function(b){"string"==typeof b?this.exec(b,a):this.exec(b[0],a,b[1])},this)}finally{this.$inReplay=!1}}},this.trimMacro=function(a){return a.map(function(a){return"string"!=typeof a[0]&&(a[0]=a[0].name),a[1]||(a=a[0]),a})}}.call(g.prototype),b.CommandManager=g}),ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"],function(a,b,c){"use strict";function d(a,b){return{win:a,mac:b}}var e=a("../lib/lang"),f=a("../config"),g=a("../range").Range;b.commands=[{name:"showSettingsMenu",bindKey:d("Ctrl-,","Command-,"),exec:function(a){f.loadModule("ace/ext/settings_menu",function(b){b.init(a),a.showSettingsMenu()})},readOnly:!0},{name:"goToNextError",bindKey:d("Alt-E","Ctrl-E"),exec:function(a){f.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,1)})},scrollIntoView:"animate",readOnly:!0},{name:"goToPreviousError",bindKey:d("Alt-Shift-E","Ctrl-Shift-E"),exec:function(a){f.loadModule("ace/ext/error_marker",function(b){b.showErrorMarker(a,-1)})},scrollIntoView:"animate",readOnly:!0},{name:"selectall",bindKey:d("Ctrl-A","Command-A"),exec:function(a){a.selectAll()},readOnly:!0},{name:"centerselection",bindKey:d(null,"Ctrl-L"),exec:function(a){a.centerSelection()},readOnly:!0},{name:"gotoline",bindKey:d("Ctrl-L","Command-L"),exec:function(a){var b=parseInt(prompt("Enter line number:"),10);isNaN(b)||a.gotoLine(b)},readOnly:!0},{name:"fold",bindKey:d("Alt-L|Ctrl-F1","Command-Alt-L|Command-F1"),exec:function(a){a.session.toggleFold(!1)},scrollIntoView:"center",readOnly:!0},{name:"unfold",bindKey:d("Alt-Shift-L|Ctrl-Shift-F1","Command-Alt-Shift-L|Command-Shift-F1"),exec:function(a){a.session.toggleFold(!0)},scrollIntoView:"center",readOnly:!0},{name:"toggleFoldWidget",bindKey:d("F2","F2"),exec:function(a){a.session.toggleFoldWidget()},scrollIntoView:"center",readOnly:!0},{name:"toggleParentFoldWidget",bindKey:d("Alt-F2","Alt-F2"),exec:function(a){a.session.toggleFoldWidget(!0)},scrollIntoView:"center",readOnly:!0},{name:"foldall",bindKey:d("Ctrl-Alt-0","Ctrl-Command-Option-0"),exec:function(a){a.session.foldAll()},scrollIntoView:"center",readOnly:!0},{name:"foldOther",bindKey:d("Alt-0","Command-Option-0"),exec:function(a){a.session.foldAll(),a.session.unfold(a.selection.getAllRanges())},scrollIntoView:"center",readOnly:!0},{name:"unfoldall",bindKey:d("Alt-Shift-0","Command-Option-Shift-0"),exec:function(a){a.session.unfold()},scrollIntoView:"center",readOnly:!0},{name:"findnext",bindKey:d("Ctrl-K","Command-G"),exec:function(a){a.findNext()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"findprevious",bindKey:d("Ctrl-Shift-K","Command-Shift-G"),exec:function(a){a.findPrevious()},multiSelectAction:"forEach",scrollIntoView:"center",readOnly:!0},{name:"selectOrFindNext",bindKey:d("Alt-K","Ctrl-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findNext()},readOnly:!0},{name:"selectOrFindPrevious",bindKey:d("Alt-Shift-K","Ctrl-Shift-G"),exec:function(a){a.selection.isEmpty()?a.selection.selectWord():a.findPrevious()},readOnly:!0},{name:"find",bindKey:d("Ctrl-F","Command-F"),exec:function(a){f.loadModule("ace/ext/searchbox",function(b){b.Search(a)})},readOnly:!0},{name:"overwrite",bindKey:"Insert",exec:function(a){a.toggleOverwrite()},readOnly:!0},{name:"selecttostart",bindKey:d("Ctrl-Shift-Home","Command-Shift-Up"),exec:function(a){a.getSelection().selectFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotostart",bindKey:d("Ctrl-Home","Command-Home|Command-Up"),exec:function(a){a.navigateFileStart()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectup",bindKey:d("Shift-Up","Shift-Up"),exec:function(a){a.getSelection().selectUp()},multiSelectAction:"forEach",readOnly:!0},{name:"golineup", +bindKey:d("Up","Up|Ctrl-P"),exec:function(a,b){a.navigateUp(b.times)},multiSelectAction:"forEach",readOnly:!0},{name:"selecttoend",bindKey:d("Ctrl-Shift-End","Command-Shift-Down"),exec:function(a){a.getSelection().selectFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"gotoend",bindKey:d("Ctrl-End","Command-End|Command-Down"),exec:function(a){a.navigateFileEnd()},multiSelectAction:"forEach",readOnly:!0,scrollIntoView:"animate",aceCommandGroup:"fileJump"},{name:"selectdown",bindKey:d("Shift-Down","Shift-Down"),exec:function(a){a.getSelection().selectDown()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"golinedown",bindKey:d("Down","Down|Ctrl-N"),exec:function(a,b){a.navigateDown(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordleft",bindKey:d("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a){a.getSelection().selectWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordleft",bindKey:d("Ctrl-Left","Option-Left"),exec:function(a){a.navigateWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolinestart",bindKey:d("Alt-Shift-Left","Command-Shift-Left"),exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolinestart",bindKey:d("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a){a.navigateLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectleft",bindKey:d("Shift-Left","Shift-Left"),exec:function(a){a.getSelection().selectLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoleft",bindKey:d("Left","Left|Ctrl-B"),exec:function(a,b){a.navigateLeft(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectwordright",bindKey:d("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a){a.getSelection().selectWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotowordright",bindKey:d("Ctrl-Right","Option-Right"),exec:function(a){a.navigateWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selecttolineend",bindKey:d("Alt-Shift-Right","Command-Shift-Right"),exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotolineend",bindKey:d("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a){a.navigateLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectright",bindKey:d("Shift-Right","Shift-Right"),exec:function(a){a.getSelection().selectRight()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"gotoright",bindKey:d("Right","Right|Ctrl-F"),exec:function(a,b){a.navigateRight(b.times)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectpagedown",bindKey:"Shift-PageDown",exec:function(a){a.selectPageDown()},readOnly:!0},{name:"pagedown",bindKey:d(null,"Option-PageDown"),exec:function(a){a.scrollPageDown()},readOnly:!0},{name:"gotopagedown",bindKey:d("PageDown","PageDown|Ctrl-V"),exec:function(a){a.gotoPageDown()},readOnly:!0},{name:"selectpageup",bindKey:"Shift-PageUp",exec:function(a){a.selectPageUp()},readOnly:!0},{name:"pageup",bindKey:d(null,"Option-PageUp"),exec:function(a){a.scrollPageUp()},readOnly:!0},{name:"gotopageup",bindKey:"PageUp",exec:function(a){a.gotoPageUp()},readOnly:!0},{name:"scrollup",bindKey:d("Ctrl-Up",null),exec:function(a){a.renderer.scrollBy(0,-2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"scrolldown",bindKey:d("Ctrl-Down",null),exec:function(a){a.renderer.scrollBy(0,2*a.renderer.layerConfig.lineHeight)},readOnly:!0},{name:"selectlinestart",bindKey:"Shift-Home",exec:function(a){a.getSelection().selectLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"selectlineend",bindKey:"Shift-End",exec:function(a){a.getSelection().selectLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"togglerecording",bindKey:d("Ctrl-Alt-E","Command-Option-E"),exec:function(a){a.commands.toggleRecording(a)},readOnly:!0},{name:"replaymacro",bindKey:d("Ctrl-Shift-E","Command-Shift-E"),exec:function(a){a.commands.replay(a)},readOnly:!0},{name:"jumptomatching",bindKey:d("Ctrl-P","Ctrl-P"),exec:function(a){a.jumpToMatching()},multiSelectAction:"forEach",readOnly:!0},{name:"selecttomatching",bindKey:d("Ctrl-Shift-P","Ctrl-Shift-P"),exec:function(a){a.jumpToMatching(!0)},multiSelectAction:"forEach",readOnly:!0},{name:"passKeysToBrowser",bindKey:d("null","null"),exec:function(){},passEvent:!0,readOnly:!0},{name:"cut",exec:function(a){var b=a.getSelectionRange();a._emit("cut",b),a.selection.isEmpty()||(a.session.remove(b),a.clearSelection())},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"removeline",bindKey:d("Ctrl-D","Command-D"),exec:function(a){a.removeLines()},scrollIntoView:"cursor",multiSelectAction:"forEachLine"},{name:"duplicateSelection",bindKey:d("Ctrl-Shift-D","Command-Shift-D"),exec:function(a){a.duplicateSelection()},scrollIntoView:"cursor",multiSelectAction:"forEach"},{name:"sortlines",bindKey:d("Ctrl-Alt-S","Command-Alt-S"),exec:function(a){a.sortLines()},scrollIntoView:"selection",multiSelectAction:"forEachLine"},{name:"togglecomment",bindKey:d("Ctrl-/","Command-/"),exec:function(a){a.toggleCommentLines()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"toggleBlockComment",bindKey:d("Ctrl-Shift-/","Command-Shift-/"),exec:function(a){a.toggleBlockComment()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"modifyNumberUp",bindKey:d("Ctrl-Shift-Up","Alt-Shift-Up"),exec:function(a){a.modifyNumber(1)},multiSelectAction:"forEach"},{name:"modifyNumberDown",bindKey:d("Ctrl-Shift-Down","Alt-Shift-Down"),exec:function(a){a.modifyNumber(-1)},multiSelectAction:"forEach"},{name:"replace",bindKey:d("Ctrl-H","Command-Option-F"),exec:function(a){f.loadModule("ace/ext/searchbox",function(b){b.Search(a,!0)})}},{name:"undo",bindKey:d("Ctrl-Z","Command-Z"),exec:function(a){a.undo()}},{name:"redo",bindKey:d("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a){a.redo()}},{name:"copylinesup",bindKey:d("Alt-Shift-Up","Command-Option-Up"),exec:function(a){a.copyLinesUp()},scrollIntoView:"cursor"},{name:"movelinesup",bindKey:d("Alt-Up","Option-Up"),exec:function(a){a.moveLinesUp()},scrollIntoView:"cursor"},{name:"copylinesdown",bindKey:d("Alt-Shift-Down","Command-Option-Down"),exec:function(a){a.copyLinesDown()},scrollIntoView:"cursor"},{name:"movelinesdown",bindKey:d("Alt-Down","Option-Down"),exec:function(a){a.moveLinesDown()},scrollIntoView:"cursor"},{name:"del",bindKey:d("Delete","Delete|Ctrl-D|Shift-Delete"),exec:function(a){a.remove("right")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"backspace",bindKey:d("Shift-Backspace|Backspace","Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a){a.remove("left")},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"cut_or_delete",bindKey:d("Shift-Delete",null),exec:function(a){return a.selection.isEmpty()?void a.remove("left"):!1},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolinestart",bindKey:d("Alt-Backspace","Command-Backspace"),exec:function(a){a.removeToLineStart()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removetolineend",bindKey:d("Alt-Delete","Ctrl-K"),exec:function(a){a.removeToLineEnd()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordleft",bindKey:d("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a){a.removeWordLeft()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"removewordright",bindKey:d("Ctrl-Delete","Alt-Delete"),exec:function(a){a.removeWordRight()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"outdent",bindKey:d("Shift-Tab","Shift-Tab"),exec:function(a){a.blockOutdent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"indent",bindKey:d("Tab","Tab"),exec:function(a){a.indent()},multiSelectAction:"forEach",scrollIntoView:"selectionPart"},{name:"blockoutdent",bindKey:d("Ctrl-[","Ctrl-["),exec:function(a){a.blockOutdent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"blockindent",bindKey:d("Ctrl-]","Ctrl-]"),exec:function(a){a.blockIndent()},multiSelectAction:"forEachLine",scrollIntoView:"selectionPart"},{name:"insertstring",exec:function(a,b){a.insert(b)},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"inserttext",exec:function(a,b){a.insert(e.stringRepeat(b.text||"",b.times||1))},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"splitline",bindKey:d(null,"Ctrl-O"),exec:function(a){a.splitLine()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"transposeletters",bindKey:d("Ctrl-T","Ctrl-T"),exec:function(a){a.transposeLetters()},multiSelectAction:function(a){a.transposeSelections(1)},scrollIntoView:"cursor"},{name:"touppercase",bindKey:d("Ctrl-U","Ctrl-U"),exec:function(a){a.toUpperCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"tolowercase",bindKey:d("Ctrl-Shift-U","Ctrl-Shift-U"),exec:function(a){a.toLowerCase()},multiSelectAction:"forEach",scrollIntoView:"cursor"},{name:"expandtoline",bindKey:d("Ctrl-Shift-L","Command-Shift-L"),exec:function(a){var b=a.selection.getRange();b.start.column=b.end.column=0,b.end.row++,a.selection.setRange(b,!1)},multiSelectAction:"forEach",scrollIntoView:"cursor",readOnly:!0},{name:"joinlines",bindKey:d(null,null),exec:function(a){for(var b=a.selection.isBackwards(),c=b?a.selection.getSelectionLead():a.selection.getSelectionAnchor(),d=b?a.selection.getSelectionAnchor():a.selection.getSelectionLead(),f=a.session.doc.getLine(c.row).length,h=a.session.doc.getTextRange(a.selection.getRange()),i=h.replace(/\n\s*/," ").length,j=a.session.doc.getLine(c.row),k=c.row+1;k<=d.row+1;k++){var l=e.stringTrimLeft(e.stringTrimRight(a.session.doc.getLine(k)));0!==l.length&&(l=" "+l),j+=l}d.row+10?(a.selection.moveCursorTo(c.row,c.column),a.selection.selectTo(c.row,c.column+i)):(f=a.session.doc.getLine(c.row).length>f?f+1:f,a.selection.moveCursorTo(c.row,f))},multiSelectAction:"forEach",readOnly:!0},{name:"invertSelection",bindKey:d(null,null),exec:function(a){var b=a.session.doc.getLength()-1,c=a.session.doc.getLine(b).length,d=a.selection.rangeList.ranges,e=[];d.length<1&&(d=[a.selection.getRange()]);for(var f=0;f=d.lastRow||c.end.row<=d.firstRow)&&this.renderer.scrollSelectionIntoView(this.selection.anchor,this.selection.lead)}"animate"==b.scrollIntoView&&this.renderer.animateScrolling(this.curOp.scrollTop)}this.prevOp=this.curOp,this.curOp=null}},this.$mergeableCommands=["backspace","del","insertstring"],this.$historyTracker=function(a){if(this.$mergeUndoDeltas){var b=this.prevOp,c=this.$mergeableCommands,d=b.command&&a.command.name==b.command.name;if("insertstring"==a.command.name){var e=a.args;void 0===this.mergeNextCommand&&(this.mergeNextCommand=!0),d=d&&this.mergeNextCommand&&(!/\s/.test(e)||/\s/.test(b.args)),this.mergeNextCommand=!0}else d=d&&-1!==c.indexOf(a.command.name);"always"!=this.$mergeUndoDeltas&&Date.now()-this.sequenceStartTime>2e3&&(d=!1),d?this.session.mergeUndoDeltas=!0:-1!==c.indexOf(a.command.name)&&(this.sequenceStartTime=Date.now())}},this.setKeyboardHandler=function(a,b){if(a&&"string"==typeof a){this.$keybindingId=a;var c=this;r.loadModule(["keybinding",a],function(d){c.$keybindingId==a&&c.keyBinding.setKeyboardHandler(d&&d.handler),b&&b()})}else this.$keybindingId=null,this.keyBinding.setKeyboardHandler(a),b&&b()},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){var b=this.session;if(b){this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange),this.session.removeEventListener("changeScrollTop",this.$onScrollTopChange),this.session.removeEventListener("changeScrollLeft",this.$onScrollLeftChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange)}this.session=a,a?(this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.onChangeTabSize.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.$onScrollTopChange=this.onScrollTopChange.bind(this),this.session.addEventListener("changeScrollTop",this.$onScrollTopChange),this.$onScrollLeftChange=this.onScrollLeftChange.bind(this),this.session.addEventListener("changeScrollLeft",this.$onScrollLeftChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.$blockScrolling+=1,this.onCursorChange(),this.$blockScrolling-=1,this.onScrollTopChange(),this.onScrollLeftChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.updateFull()):(this.selection=null,this.renderer.setSession(a)),this._signal("changeSession",{session:a,oldSession:b}),b&&b._signal("changeEditor",{oldEditor:this}),a&&a._signal("changeEditor",{editor:this})}},this.getSession=function(){return this.session},this.setValue=function(a,b){return this.session.doc.setValue(a),b?1==b?this.navigateFileEnd():-1==b&&this.navigateFileStart():this.selectAll(),a},this.getValue=function(){return this.session.getValue()},this.getSelection=function(){return this.selection},this.resize=function(a){this.renderer.onResize(a)},this.setTheme=function(a,b){this.renderer.setTheme(a,b)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.getFontSize=function(){return this.getOption("fontSize")||e.computedStyle(this.container,"fontSize")},this.setFontSize=function(a){this.setOption("fontSize",a)},this.$highlightBrackets=function(){if(this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null),!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=b.findMatchingBracket(a.getCursorPosition());if(c)var d=new n(c.row,c.column,c.row,c.column+1);else if(b.$mode.getMatching)var d=b.$mode.getMatching(a.session);d&&(b.$bracketHighlight=b.addMarker(d,"ace_bracket","text"))}},50)}},this.$highlightTags=function(){if(!this.$highlightTagPending){var a=this;this.$highlightTagPending=!0,setTimeout(function(){a.$highlightTagPending=!1;var b=a.session;if(b&&b.bgTokenizer){var c=a.getCursorPosition(),d=new s(a.session,c.row,c.column),e=d.getCurrentToken();if(!e||-1===e.type.indexOf("tag-name"))return b.removeMarker(b.$tagHighlight),void(b.$tagHighlight=null);var f=e.value,g=0,h=d.stepBackward();if("<"==h.value){do h=e,e=d.stepForward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=0)}else{do e=h,h=d.stepBackward(),e&&e.value===f&&-1!==e.type.indexOf("tag-name")&&("<"===h.value?g++:"=g);d.stepForward()}if(!e)return b.removeMarker(b.$tagHighlight),void(b.$tagHighlight=null);var i=d.getCurrentTokenRow(),j=d.getCurrentTokenColumn(),k=new n(i,j,i,j+e.value.length);b.$tagHighlight&&0!==k.compareRange(b.$backMarkers[b.$tagHighlight].range)&&(b.removeMarker(b.$tagHighlight),b.$tagHighlight=null),k&&!b.$tagHighlight&&(b.$tagHighlight=b.addMarker(k,"ace_bracket","text"))}},50)}},this.focus=function(){var a=this;setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(a){this.$isFocused||(this.$isFocused=!0,this.renderer.showCursor(),this.renderer.visualizeFocus(),this._emit("focus",a))},this.onBlur=function(a){this.$isFocused&&(this.$isFocused=!1,this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._emit("blur",a))},this.$cursorChange=function(){this.renderer.updateCursor()},this.onDocumentChange=function(a){var b,c=a.data,d=c.range;b=d.start.row==d.end.row&&"insertLines"!=c.action&&"removeLines"!=c.action?d.end.row:1/0,this.renderer.updateLines(d.start.row,b,this.session.$useWrapMode),this._signal("change",a),this.$cursorChange(),this.$updateHighlightActiveLine()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onScrollTopChange=function(){this.renderer.scrollToY(this.session.getScrollTop())},this.onScrollLeftChange=function(){this.renderer.scrollToX(this.session.getScrollLeft())},this.onCursorChange=function(){this.$cursorChange(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.$highlightBrackets(),this.$highlightTags(),this.$updateHighlightActiveLine(),this._signal("changeSelection")},this.$updateHighlightActiveLine=function(){var a,b=this.getSession();if(this.$highlightActiveLine&&("line"==this.$selectionStyle&&this.selection.isMultiLine()||(a=this.getCursorPosition()),!this.renderer.$maxLines||1!==this.session.getLength()||this.renderer.$minLines>1||(a=!1)),b.$highlightLineMarker&&!a)b.removeMarker(b.$highlightLineMarker.id),b.$highlightLineMarker=null;else if(!b.$highlightLineMarker&&a){var c=new n(a.row,a.column,a.row,1/0);c.id=b.addMarker(c,"ace_active-line","screenLine"),b.$highlightLineMarker=c}else a&&(b.$highlightLineMarker.start.row=a.row,b.$highlightLineMarker.end.row=a.row,b.$highlightLineMarker.start.column=a.column,b._signal("changeBackMarker"))},this.onSelectionChange=function(a){var b=this.session;if(b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null,this.selection.isEmpty())this.$updateHighlightActiveLine();else{var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}var e=this.$highlightSelectedWord&&this.$getSelectionHighLightRegexp();this.session.highlight(e),this._signal("changeSelection")},this.$getSelectionHighLightRegexp=function(){var a=this.session,b=this.getSelectionRange();if(!b.isEmpty()&&!b.isMultiLine()){var c=b.start.column-1,d=b.end.column+1,e=a.getLine(b.start.row),f=e.length,g=e.substring(Math.max(c,0),Math.min(d,f));if(!(c>=0&&/^[\w\d]/.test(g)||f>=d&&/[\w\d]$/.test(g))&&(g=e.substring(b.start.column,b.end.column),/^[\w\d]+$/.test(g))){var h=this.$search.$assembleRegExp({wholeWord:!0,caseSensitive:!0,needle:g});return h}}},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.updateBreakpoints()},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(a){this.renderer.updateText(),this._emit("changeMode",a)},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getSelectedText=function(){return this.session.getTextRange(this.getSelectionRange())},this.getCopyText=function(){var a=this.getSelectedText();return this._signal("copy",a),a},this.onCopy=function(){this.commands.exec("copy",this)},this.onCut=function(){this.commands.exec("cut",this)},this.onPaste=function(a){if(!this.$readOnly){var b={text:a};this._signal("paste",b),this.insert(b.text,!0)}},this.execCommand=function(a,b){return this.commands.exec(a,this,b)},this.insert=function(a,b){var c=this.session,d=c.getMode(),e=this.getCursorPosition();if(this.getBehavioursEnabled()&&!b){var f=d.transformAction(c.getState(e.row),"insertion",this,c,a);f&&(a!==f.text&&(this.session.mergeUndoDeltas=!1,this.$mergeNextCommand=!1),a=f.text)}if(" "==a&&(a=this.session.getTabString()),this.selection.isEmpty()){if(this.session.getOverwrite()){var g=new n.fromPoints(e,e);g.end.column+=a.length,this.session.remove(g)}}else{var g=this.getSelectionRange();e=this.session.remove(g),this.clearSelection()}if("\n"==a||"\r\n"==a){var h=c.getLine(e.row);if(e.column>h.search(/\S|$/)){var i=h.substr(e.column).search(/\S|$/);c.doc.removeInLine(e.row,e.column,e.column+i)}}this.clearSelection();var j=e.column,k=c.getState(e.row),h=c.getLine(e.row),l=d.checkOutdent(k,h,a);if(c.insert(e,a),f&&f.selection&&this.selection.setSelectionRange(2==f.selection.length?new n(e.row,j+f.selection[0],e.row,j+f.selection[1]):new n(e.row+f.selection[0],f.selection[1],e.row+f.selection[2],f.selection[3])),c.getDocument().isNewLine(a)){var m=d.getNextLineIndent(k,h.slice(0,e.column),c.getTabString());c.insert({row:e.row+1,column:0},m)}l&&d.autoOutdent(k,c,e.row)},this.onTextInput=function(a){this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.setOption("scrollSpeed",a)},this.getScrollSpeed=function(){return this.getOption("scrollSpeed")},this.setDragDelay=function(a){this.setOption("dragDelay",a)},this.getDragDelay=function(){return this.getOption("dragDelay")},this.setSelectionStyle=function(a){this.setOption("selectionStyle",a)},this.getSelectionStyle=function(){return this.getOption("selectionStyle")},this.setHighlightActiveLine=function(a){this.setOption("highlightActiveLine",a)},this.getHighlightActiveLine=function(){return this.getOption("highlightActiveLine")},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.setHighlightSelectedWord=function(a){this.setOption("highlightSelectedWord",a)},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setAnimatedScroll=function(a){this.renderer.setAnimatedScroll(a)},this.getAnimatedScroll=function(){return this.renderer.getAnimatedScroll()},this.setShowInvisibles=function(a){this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setDisplayIndentGuides=function(a){this.renderer.setDisplayIndentGuides(a)},this.getDisplayIndentGuides=function(){return this.renderer.getDisplayIndentGuides()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.setReadOnly=function(a){this.setOption("readOnly",a)},this.getReadOnly=function(){return this.getOption("readOnly")},this.setBehavioursEnabled=function(a){this.setOption("behavioursEnabled",a)},this.getBehavioursEnabled=function(){return this.getOption("behavioursEnabled")},this.setWrapBehavioursEnabled=function(a){this.setOption("wrapBehavioursEnabled",a)},this.getWrapBehavioursEnabled=function(){return this.getOption("wrapBehavioursEnabled")},this.setShowFoldWidgets=function(a){this.setOption("showFoldWidgets",a)},this.getShowFoldWidgets=function(){return this.getOption("showFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.remove=function(a){this.selection.isEmpty()&&("left"==a?this.selection.selectLeft():this.selection.selectRight());var b=this.getSelectionRange();if(this.getBehavioursEnabled()){var c=this.session,d=c.getState(b.start.row),e=c.getMode().transformAction(d,"deletion",this,c,b);if(0===b.end.column){var f=c.getTextRange(b);if("\n"==f[f.length-1]){var g=c.getLine(b.end.row);/^\s+$/.test(g)&&(b.end.column=g.length)}}e&&(b=e)}this.session.remove(b),this.clearSelection()},this.removeWordRight=function(){this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeWordLeft=function(){this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineStart=function(){this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection()},this.removeToLineEnd=function(){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()},this.splitLine=function(){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)},this.transposeLetters=function(){if(this.selection.isEmpty()){var a=this.getCursorPosition(),b=a.column;if(0!==b){var c,d,e=this.session.getLine(a.row);bb.toLowerCase()?1:0});for(var d=new n(0,0,0,0),e=a.first;e<=a.last;e++){var f=b.getLine(e);d.start.row=e,d.end.row=e,d.end.column=f.length,b.replace(d,c[e-a.first])}},this.toggleCommentLines=function(){var a=this.session.getState(this.getCursorPosition().row),b=this.$getSelectedRows();this.session.getMode().toggleCommentLines(a,this.session,b.first,b.last)},this.toggleBlockComment=function(){var a=this.getCursorPosition(),b=this.session.getState(a.row),c=this.getSelectionRange();this.session.getMode().toggleBlockComment(b,this.session,c,a)},this.getNumberAt=function(a,b){var c=/[\-]?[0-9]+(?:\.[0-9]+)?/g;c.lastIndex=0;for(var d=this.session.getLine(a);c.lastIndex=b){var f={value:e[0],start:e.index,end:e.index+e[0].length};return f}}return null},this.modifyNumber=function(a){var b=this.selection.getCursor().row,c=this.selection.getCursor().column,d=new n(b,c-1,b,c),e=this.session.getTextRange(d);if(!isNaN(parseFloat(e))&&isFinite(e)){var f=this.getNumberAt(b,c);if(f){var g=f.value.indexOf(".")>=0?f.start+f.value.indexOf(".")+1:f.end,h=f.start+f.value.length-g,i=parseFloat(f.value);i*=Math.pow(10,h),a*=g!==f.end&&g>c?Math.pow(10,f.end-c-1):Math.pow(10,f.end-c),i+=a,i/=Math.pow(10,h);var j=i.toFixed(h),k=new n(b,f.start,b,f.end);this.session.replace(k,j),this.moveCursorTo(b,Math.max(f.start+1,c+j.length-f.value.length))}}},this.removeLines=function(){var a,b=this.$getSelectedRows();a=0===b.first||b.last+1=g;)f[h].moveBy(e,0),h--}b.fromOrientedRange(b.ranges[0]),b.rangeList.attach(this.session)}},this.$getSelectedRows=function(){var a=this.getSelectionRange().collapseRows();return{first:this.session.getRowFoldStart(a.start.row),last:this.session.getRowFoldEnd(a.end.row)}},this.onCompositionStart=function(a){this.renderer.showComposition(this.getCursorPosition())},this.onCompositionUpdate=function(a){this.renderer.setCompositionText(a)},this.onCompositionEnd=function(){this.renderer.hideComposition()},this.getFirstVisibleRow=function(){return this.renderer.getFirstVisibleRow()},this.getLastVisibleRow=function(){return this.renderer.getLastVisibleRow()},this.isRowVisible=function(a){return a>=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.isRowFullyVisible=function(a){return a>=this.renderer.getFirstFullyVisibleRow()&&a<=this.renderer.getLastFullyVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$moveByPage=function(a,b){var c=this.renderer,d=this.renderer.layerConfig,e=a*Math.floor(d.height/d.lineHeight);this.$blockScrolling++,b===!0?this.selection.$moveSelection(function(){this.moveCursorBy(e,0)}):b===!1&&(this.selection.moveCursorBy(e,0),this.selection.clearSelection()),this.$blockScrolling--;var f=c.scrollTop;c.scrollBy(0,e*d.lineHeight),null!=b&&c.scrollCursorIntoView(null,.5),c.animateScrolling(f)},this.selectPageDown=function(){this.$moveByPage(1,!0)},this.selectPageUp=function(){this.$moveByPage(-1,!0)},this.gotoPageDown=function(){this.$moveByPage(1,!1)},this.gotoPageUp=function(){this.$moveByPage(-1,!1)},this.scrollPageDown=function(){this.$moveByPage(1)},this.scrollPageUp=function(){this.$moveByPage(-1)},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b,c,d){this.renderer.scrollToLine(a,b,c,d)},this.centerSelection=function(){var a=this.getSelectionRange(),b={row:Math.floor(a.start.row+(a.end.row-a.start.row)/2),column:Math.floor(a.start.column+(a.end.column-a.start.column)/2)};this.renderer.alignCursor(b,.5)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.jumpToMatching=function(a,b){var c=this.getCursorPosition(),d=new s(this.session,c.row,c.column),e=d.getCurrentToken(),f=e||d.stepForward();if(f){var g,h,i=!1,j={},k=c.column-f.start,l={")":"(","(":"(","]":"[","[":"[","{":"{","}":"{"};do{if(f.value.match(/[{}()\[\]]/g)){for(;k=0;--f)this.$tryReplace(c[f],a)&&d++;return this.selection.setSelectionRange(e),this.$blockScrolling-=1,d},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a);return b=this.$search.replace(c,b),null!==b?(a.end=this.session.replace(a,b),a):null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b,c){b||(b={}),"string"==typeof a||a instanceof RegExp?b.needle=a:"object"==typeof a&&d.mixin(b,a);var e=this.selection.getRange();null==b.needle&&(a=this.session.getTextRange(e)||this.$search.$options.needle,a||(e=this.session.getWordRange(e.start.row,e.start.column),a=this.session.getTextRange(e)),this.$search.set({needle:a})),this.$search.set(b),b.start||this.$search.set({start:e});var f=this.$search.find(this.session);return b.preventScroll?f:f?(this.revealRange(f,c),f):(b.backwards?e.start=e.end:e.end=e.start,void this.selection.setRange(e))},this.findNext=function(a,b){this.find({skipCurrent:!0,backwards:!1},a,b)},this.findPrevious=function(a,b){this.find(a,{skipCurrent:!0,backwards:!0},b)},this.revealRange=function(a,b){this.$blockScrolling+=1,this.session.unfold(a),this.selection.setSelectionRange(a),this.$blockScrolling-=1;var c=this.renderer.scrollTop;this.renderer.scrollSelectionIntoView(a.start,a.end,.5),b!==!1&&this.renderer.animateScrolling(c)},this.undo=function(){this.$blockScrolling++,this.session.getUndoManager().undo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.redo=function(){this.$blockScrolling++,this.session.getUndoManager().redo(),this.$blockScrolling--,this.renderer.scrollCursorIntoView(null,.5)},this.destroy=function(){this.renderer.destroy(),this._signal("destroy",this),this.session&&this.session.destroy()},this.setAutoScrollEditorIntoView=function(a){if(a){var b,c=this,d=!1;this.$scrollAnchor||(this.$scrollAnchor=document.createElement("div"));var e=this.$scrollAnchor;e.style.cssText="position:absolute",this.container.insertBefore(e,this.container.firstChild);var f=this.on("changeSelection",function(){d=!0}),g=this.renderer.on("beforeRender",function(){d&&(b=c.renderer.container.getBoundingClientRect())}),h=this.renderer.on("afterRender",function(){if(d&&b&&(c.isFocused()||c.searchBox&&c.searchBox.isFocused())){var a=c.renderer,f=a.$cursorLayer.$pixelPos,g=a.layerConfig,h=f.top-g.offset;d=f.top>=0&&h+b.top<0?!0:f.topwindow.innerHeight?!1:null,null!=d&&(e.style.top=h+"px",e.style.left=f.left+"px",e.style.height=g.lineHeight+"px",e.scrollIntoView(d)),d=b=null}});this.setAutoScrollEditorIntoView=function(a){a||(delete this.setAutoScrollEditorIntoView,this.removeEventListener("changeSelection",f),this.renderer.removeEventListener("afterRender",h),this.renderer.removeEventListener("beforeRender",g))}}},this.$resetCursorStyle=function(){var a=this.$cursorStyle||"ace",b=this.renderer.$cursorLayer;b&&(b.setSmoothBlinking(/smooth/.test(a)),b.isBlinking=!this.$readOnly&&"wide"!=a,e.setCssClass(b.element,"ace_slim-cursors",/slim/.test(a)))}}).call(t.prototype),r.defineOptions(t.prototype,"editor",{selectionStyle:{set:function(a){this.onSelectionChange(),this._signal("changeSelectionStyle",{data:a})},initialValue:"line"},highlightActiveLine:{set:function(){this.$updateHighlightActiveLine()},initialValue:!0},highlightSelectedWord:{set:function(a){this.$onSelectionChange()},initialValue:!0},readOnly:{set:function(a){this.$resetCursorStyle()},initialValue:!1},cursorStyle:{set:function(a){this.$resetCursorStyle()},values:["ace","slim","smooth","wide"],initialValue:"ace"},mergeUndoDeltas:{values:[!1,!0,"always"],initialValue:!0},behavioursEnabled:{initialValue:!0},wrapBehavioursEnabled:{initialValue:!0},autoScrollEditorIntoView:{set:function(a){this.setAutoScrollEditorIntoView(a)}},hScrollBarAlwaysVisible:"renderer",vScrollBarAlwaysVisible:"renderer",highlightGutterLine:"renderer",animatedScroll:"renderer",showInvisibles:"renderer",showPrintMargin:"renderer",printMarginColumn:"renderer",printMargin:"renderer",fadeFoldWidgets:"renderer",showFoldWidgets:"renderer",showLineNumbers:"renderer",showGutter:"renderer",displayIndentGuides:"renderer",fontSize:"renderer",fontFamily:"renderer",maxLines:"renderer",minLines:"renderer",scrollPastEnd:"renderer",fixedWidthGutter:"renderer",theme:"renderer",scrollSpeed:"$mouseHandler",dragDelay:"$mouseHandler",dragEnabled:"$mouseHandler",focusTimout:"$mouseHandler",tooltipFollowsMouse:"$mouseHandler",firstLineNumber:"session",overwrite:"session",newLineMode:"session",useWorker:"session",useSoftTabs:"session",tabSize:"session",wrap:"session",foldStyle:"session",mode:"session"}),b.Editor=t}),ace.define("ace/undomanager",["require","exports","module"],function(a,b,c){"use strict";var d=function(){this.reset()};(function(){this.execute=function(a){var b=a.args[0];this.$doc=a.args[1],a.merge&&this.hasUndo()&&(this.dirtyCounter--,b=this.$undoStack.pop().concat(b)),this.$undoStack.push(b),this.$redoStack=[],this.dirtyCounter<0&&(this.dirtyCounter=NaN),this.dirtyCounter++},this.undo=function(a){var b=this.$undoStack.pop(),c=null;return b&&(c=this.$doc.undoChanges(b,a),this.$redoStack.push(b),this.dirtyCounter--),c},this.redo=function(a){var b=this.$redoStack.pop(),c=null;return b&&(c=this.$doc.redoChanges(b,a),this.$undoStack.push(b),this.dirtyCounter++),c},this.reset=function(){this.$undoStack=[],this.$redoStack=[],this.dirtyCounter=0},this.hasUndo=function(){return this.$undoStack.length>0},this.hasRedo=function(){return this.$redoStack.length>0},this.markClean=function(){this.dirtyCounter=0},this.isClean=function(){return 0===this.dirtyCounter}}).call(d.prototype),b.UndoManager=d}),ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/oop"),f=a("../lib/lang"),g=a("../lib/event_emitter").EventEmitter,h=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_gutter-layer",a.appendChild(this.element),this.setShowFoldWidgets(this.$showFoldWidgets),this.gutterWidth=0,this.$annotations=[],this.$updateAnnotations=this.$updateAnnotations.bind(this),this.$cells=[]};(function(){e.implement(this,g),this.setSession=function(a){this.session&&this.session.removeEventListener("change",this.$updateAnnotations),this.session=a,a&&a.on("change",this.$updateAnnotations)},this.addGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.addGutterDecoration"),this.session.addGutterDecoration(a,b)},this.removeGutterDecoration=function(a,b){window.console&&console.warn&&console.warn("deprecated use session.removeGutterDecoration"),this.session.removeGutterDecoration(a,b)},this.setAnnotations=function(a){this.$annotations=[];for(var b=0;bg&&(p=f.end.row+1,f=b.getNextFoldLine(p,f),g=f?f.start.row:1/0),p>e){for(;this.$cells.length>o+1;)n=this.$cells.pop(),this.element.removeChild(n.element);break}n=this.$cells[++o],n||(n={element:null,textNode:null,foldWidget:null},n.element=d.createElement("div"),n.textNode=document.createTextNode(""),n.element.appendChild(n.textNode),this.element.appendChild(n.element),this.$cells[o]=n);var q="ace_gutter-cell ";i[p]&&(q+=i[p]),j[p]&&(q+=j[p]),this.$annotations[p]&&(q+=this.$annotations[p].className),n.element.className!=q&&(n.element.className=q);var r=b.getRowLength(p)*a.lineHeight+"px";if(r!=n.element.style.height&&(n.element.style.height=r),h){var s=h[p];null==s&&(s=h[p]=b.getFoldWidget(p))}if(s){n.foldWidget||(n.foldWidget=d.createElement("span"),n.element.appendChild(n.foldWidget));var q="ace_fold-widget ace_"+s;q+="start"==s&&p==g&&pc.right-b.right?"foldWidgets":void 0}}).call(h.prototype),b.Gutter=h}),ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"],function(a,b,c){"use strict";var d=a("../range").Range,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(a){this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c];if(d.range){var e=d.range.clipRows(a.firstRow,a.lastRow);if(!e.isEmpty())if(e=e.toScreenRange(this.session),d.renderer){var f=this.$getTop(e.start.row,a),g=this.$padding+e.start.column*a.characterWidth;d.renderer(b,e,g,f,a)}else"fullLine"==d.type?this.drawFullLineMarker(b,e,d.clazz,a):"screenLine"==d.type?this.drawScreenLineMarker(b,e,d.clazz,a):e.isMultiLine()?"text"==d.type?this.drawTextMarker(b,e,d.clazz,a):this.drawMultiLineMarker(b,e,d.clazz,a):this.drawSingleLineMarker(b,e,d.clazz+" ace_start",a)}else d.update(b,this,this.session,a)}this.element.innerHTML=b.join("")}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e,f){var g=b.start.row,h=new d(g,b.start.column,g,this.session.getScreenLastRowColumn(g));for(this.drawSingleLineMarker(a,h,c+" ace_start",e,1,f),g=b.end.row,h=new d(g,0,g,b.end.column),this.drawSingleLineMarker(a,h,c,e,0,f),g=b.start.row+1;g"),h=this.$getTop(b.end.row,d);var j=b.end.column*d.characterWidth;a.push("
    "),g=(b.end.row-b.start.row-1)*d.lineHeight,0>g||(h=this.$getTop(b.start.row+1,d),a.push("
    "))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=d.lineHeight,h=(b.end.column+(e||0)-b.start.column)*d.characterWidth,i=this.$getTop(b.start.row,d),j=this.$padding+b.start.column*d.characterWidth;a.push("
    ")},this.drawFullLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;b.start.row!=b.end.row&&(g+=this.$getTop(b.end.row,d)-f),a.push("
    ")},this.drawScreenLineMarker=function(a,b,c,d,e){var f=this.$getTop(b.start.row,d),g=d.lineHeight;a.push("
    ")}}).call(f.prototype),b.Marker=f}),ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=(a("../lib/useragent"),a("../lib/event_emitter").EventEmitter),h=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",a.appendChild(this.element),this.$updateEolChar=this.$updateEolChar.bind(this)};(function(){d.implement(this,g),this.EOF_CHAR="¶",this.EOL_CHAR_LF="¬",this.EOL_CHAR_CRLF="¤",this.EOL_CHAR=this.EOL_CHAR_LF,this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.$updateEolChar=function(){var a="\n"==this.session.doc.getNewLineCharacter()?this.EOL_CHAR_LF:this.EOL_CHAR_CRLF;return this.EOL_CHAR!=a?(this.EOL_CHAR=a,!0):void 0},this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$fontMetrics.$characterSize.height||0},this.getCharacterWidth=function(){return this.$fontMetrics.$characterSize.width||0},this.$setFontMetrics=function(a){this.$fontMetrics=a,this.$fontMetrics.on("changeCharacterSize",function(a){this._signal("changeCharacterSize",a)}.bind(this)),this.$pollSizeChanges()},this.checkForSizeChanges=function(){this.$fontMetrics.checkForSizeChanges()},this.$pollSizeChanges=function(){return this.$pollSizeChangesTimer=this.$fontMetrics.$pollSizeChanges()},this.setSession=function(a){this.session=a,a&&this.$computeTabString()},this.showInvisibles=!1,this.setShowInvisibles=function(a){return this.showInvisibles==a?!1:(this.showInvisibles=a,this.$computeTabString(),!0)},this.displayIndentGuides=!0,this.setDisplayIndentGuides=function(a){return this.displayIndentGuides==a?!1:(this.displayIndentGuides=a,this.$computeTabString(),!0)},this.$tabStrings=[],this.onChangeTabSize=this.$computeTabString=function(){var a=this.session.getTabSize();this.tabSize=a;for(var b=this.$tabStrings=[0],c=1;a+1>c;c++)b.push(this.showInvisibles?""+this.TAB_CHAR+f.stringRepeat(" ",c-1)+"":f.stringRepeat(" ",c));if(this.displayIndentGuides){this.$indentGuideRe=/\s\S| \t|\t |\s$/;var d="ace_indent-guide",e="",g="";if(this.showInvisibles){d+=" ace_invisible",e=" ace_invisible_space",g=" ace_invisible_tab";var h=f.stringRepeat(this.SPACE_CHAR,this.tabSize),i=this.TAB_CHAR+f.stringRepeat(" ",this.tabSize-1)}else var h=f.stringRepeat(" ",this.tabSize),i=h;this.$tabStrings[" "]=""+h+"",this.$tabStrings[" "]=""+i+""}},this.updateLines=function(a,b,c){(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;for(var d=Math.max(b,a.firstRow),e=Math.min(c,a.lastRow),f=this.element.childNodes,g=0,h=a.firstRow;d>h;h++){var i=this.session.getFoldLine(h);if(i){if(i.containsRow(d)){d=i.start.row;break}h=i.end.row}g++}for(var h=d,i=this.session.getNextFoldLine(h),j=i?i.start.row:1/0;h>j&&(h=i.end.row+1,i=this.session.getNextFoldLine(h,i),j=i?i.start.row:1/0),!(h>e);){var k=f[g++];if(k){var l=[];this.$renderLine(l,h,!this.$useLineGroups(),h==j?i:!1),k.style.height=a.lineHeight*this.session.getRowLength(h)+"px",k.innerHTML=l.join("")}h++}},this.scrollLines=function(a){var b=this.config;if(this.config=a,!b||b.lastRow0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRowb.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){for(var d=this.element.ownerDocument.createDocumentFragment(),f=b,g=this.session.getNextFoldLine(f),h=g?g.start.row:1/0;f>h&&(f=g.end.row+1,g=this.session.getNextFoldLine(f,g),h=g?g.start.row:1/0),!(f>c);){var i=e.createElement("div"),j=[];if(this.$renderLine(j,f,!1,f==h?g:!1),i.innerHTML=j.join(""),this.$useLineGroups())i.className="ace_line_group",d.appendChild(i),i.style.height=a.lineHeight*this.session.getRowLength(f)+"px";else for(;i.firstChild;)d.appendChild(i.firstChild);f++}return d},this.update=function(a){this.config=a;for(var b=[],c=a.firstRow,d=a.lastRow,e=c,f=this.session.getNextFoldLine(e),g=f?f.start.row:1/0;e>g&&(e=f.end.row+1,f=this.session.getNextFoldLine(e,f),g=f?f.start.row:1/0),!(e>d);)this.$useLineGroups()&&b.push("
    "),this.$renderLine(b,e,!1,e==g?f:!1),this.$useLineGroups()&&b.push("
    "),e++;this.element.innerHTML=b.join("")},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,g=/\t|&|<|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g,h=function(a,c,d,g,h){if(c)return e.showInvisibles?""+f.stringRepeat(e.SPACE_CHAR,a.length)+"":f.stringRepeat(" ",a.length);if("&"==a)return"&";if("<"==a)return"<";if(" "==a){var i=e.session.getScreenTabSize(b+g);return b+=i-1,e.$tabStrings[i]}if(" "==a){var j=e.showInvisibles?"ace_cjk ace_invisible ace_invisible_space":"ace_cjk",k=e.showInvisibles?e.SPACE_CHAR:"";return b+=1,""+k+""}return d?""+e.SPACE_CHAR+"":(b+=1,""+a+"")},i=d.replace(g,h);if(this.$textToken[c.type])a.push(i);else{var j="ace_"+c.type.replace(/\./g," ace_"),k="";"fold"==c.type&&(k=" style='width:"+c.value.length*this.config.characterWidth+"px;' "),a.push("",i,"")}return b+d.length},this.renderIndentGuide=function(a,b,c){var d=b.search(this.$indentGuideRe);return 0>=d||d>=c?b:" "==b[0]?(d-=d%this.tabSize,a.push(f.stringRepeat(this.$tabStrings[" "],d/this.tabSize)),b.substr(d)):" "==b[0]?(a.push(f.stringRepeat(this.$tabStrings[" "],d)),b.substr(d)):b},this.$renderWrappedLine=function(a,b,c,d){for(var e=0,f=0,g=c[0],h=0,i=0;i=g;)h=this.$renderToken(a,h,j,k.substring(0,g-e)),k=k.substring(g-e),e=g,d||a.push("","
    "),f++,h=0,g=c[f]||Number.MAX_VALUE;0!=k.length&&(e+=k.length,h=this.$renderToken(a,h,j,k))}}},this.$renderSimpleLine=function(a,b){var c=0,d=b[0],e=d.value;this.displayIndentGuides&&(e=this.renderIndentGuide(a,e)),e&&(c=this.$renderToken(a,c,d,e));for(var f=1;f"),e.length){var f=this.session.getRowSplitData(b);f&&f.length?this.$renderWrappedLine(a,e,f,c):this.$renderSimpleLine(a,e)}this.showInvisibles&&(d&&(b=d.end.row),a.push("",b==this.session.getLength()-1?this.EOF_CHAR:this.EOL_CHAR,"")),c||a.push("
    ")},this.$getFoldLineTokens=function(a,b){function c(a,b,c){for(var d=0,f=0;f+a[d].value.lengthc-b&&(g=g.substring(0,c-b)),e.push({type:a[d].type, +value:g}),f=b+g.length,d+=1}for(;c>f&&dc?{type:a[d].type,value:g.substring(0,c-f)}:a[d]),f+=g.length,d+=1}}var d=this.session,e=[],f=d.getTokens(a);return b.walk(function(a,b,g,h,i){null!=a?e.push({type:"fold",value:a}):(i&&(f=d.getTokens(b)),f.length&&c(f,h,g))},b.end.row,this.session.getLine(b.end.row).length),e},this.$useLineGroups=function(){return this.session.getUseWrapMode()},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(h.prototype),b.Text=h}),ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";var d,e=a("../lib/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),void 0===d&&(d="opacity"in this.element),this.isVisible=!1,this.isBlinking=!0,this.blinkInterval=1e3,this.smoothBlinking=!1,this.cursors=[],this.cursor=this.addCursor(),e.addCssClass(this.element,"ace_hidden-cursors"),this.$updateCursors=this.$updateVisibility.bind(this)};(function(){this.$updateVisibility=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.visibility=a?"":"hidden"},this.$updateOpacity=function(a){for(var b=this.cursors,c=b.length;c--;)b[c].style.opacity=a?"":"0"},this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setBlinking=function(a){a!=this.isBlinking&&(this.isBlinking=a,this.restartTimer())},this.setBlinkInterval=function(a){a!=this.blinkInterval&&(this.blinkInterval=a,this.restartTimer())},this.setSmoothBlinking=function(a){a==this.smoothBlinking||d||(this.smoothBlinking=a,e.setCssClass(this.element,"ace_smooth-blinking",a),this.$updateCursors(!0),this.$updateCursors=(a?this.$updateOpacity:this.$updateVisibility).bind(this),this.restartTimer())},this.addCursor=function(){var a=e.createElement("div");return a.className="ace_cursor",this.element.appendChild(a),this.cursors.push(a),a},this.removeCursor=function(){if(this.cursors.length>1){var a=this.cursors.pop();return a.parentNode.removeChild(a),a}},this.hideCursor=function(){this.isVisible=!1,e.addCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.showCursor=function(){this.isVisible=!0,e.removeCssClass(this.element,"ace_hidden-cursors"),this.restartTimer()},this.restartTimer=function(){var a=this.$updateCursors;if(clearInterval(this.intervalId),clearTimeout(this.timeoutId),this.smoothBlinking&&e.removeCssClass(this.element,"ace_smooth-blinking"),a(!0),this.isBlinking&&this.blinkInterval&&this.isVisible){this.smoothBlinking&&setTimeout(function(){e.addCssClass(this.element,"ace_smooth-blinking")}.bind(this));var b=function(){this.timeoutId=setTimeout(function(){a(!1)},.6*this.blinkInterval)}.bind(this);this.intervalId=setInterval(function(){a(!0),b()},this.blinkInterval),b()}},this.getPixelPosition=function(a,b){if(!this.config||!this.session)return{left:0,top:0};a||(a=this.session.selection.getCursor());var c=this.session.documentToScreenPosition(a),d=this.$padding+c.column*this.config.characterWidth,e=(c.row-(b?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a;var b=this.session.$selectionMarkers,c=0,d=0;(void 0===b||0===b.length)&&(b=[{cursor:null}]);for(var c=0,e=b.length;e>c;c++){var f=this.getPixelPosition(b[c].cursor,!0);if(!((f.top>a.height+a.offset||f.top<0)&&c>1)){var g=(this.cursors[d++]||this.addCursor()).style;g.left=f.left+"px",g.top=f.top+"px",g.width=a.characterWidth+"px",g.height=a.lineHeight+"px"}}for(;this.cursors.length>d;)this.removeCursor();var h=this.session.getOverwrite();this.$setOverwrite(h),this.$pixelPos=f,this.restartTimer()},this.$setOverwrite=function(a){a!=this.overwrite&&(this.overwrite=a,a?e.addCssClass(this.element,"ace_overwrite-cursors"):e.removeCssClass(this.element,"ace_overwrite-cursors"))},this.destroy=function(){clearInterval(this.intervalId),clearTimeout(this.timeoutId)}}).call(f.prototype),b.Cursor=f}),ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./lib/event"),g=a("./lib/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_scrollbar ace_scrollbar"+this.classSuffix,this.inner=e.createElement("div"),this.inner.className="ace_scrollbar-inner",this.element.appendChild(this.inner),a.appendChild(this.element),this.setVisible(!1),this.skipEvent=!1,f.addListener(this.element,"scroll",this.onScroll.bind(this)),f.addListener(this.element,"mousedown",f.preventDefault)};(function(){d.implement(this,g),this.setVisible=function(a){this.element.style.display=a?"":"none",this.isVisible=a}}).call(h.prototype);var i=function(a,b){h.call(this,a),this.scrollTop=0,b.$scrollbarWidth=this.width=e.scrollbarWidth(a.ownerDocument),this.inner.style.width=this.element.style.width=(this.width||15)+5+"px"};d.inherits(i,h),function(){this.classSuffix="-v",this.onScroll=function(){this.skipEvent||(this.scrollTop=this.element.scrollTop,this._emit("scroll",{data:this.scrollTop})),this.skipEvent=!1},this.getWidth=function(){return this.isVisible?this.width:0},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.scrollTop!=a&&(this.skipEvent=!0,this.scrollTop=this.element.scrollTop=a)}}.call(i.prototype);var j=function(a,b){h.call(this,a),this.scrollLeft=0,this.height=b.$scrollbarWidth,this.inner.style.height=this.element.style.height=(this.height||15)+5+"px"};d.inherits(j,h),function(){this.classSuffix="-h",this.onScroll=function(){this.skipEvent||(this.scrollLeft=this.element.scrollLeft,this._emit("scroll",{data:this.scrollLeft})),this.skipEvent=!1},this.getHeight=function(){return this.isVisible?this.height:0},this.setWidth=function(a){this.element.style.width=a+"px"},this.setInnerWidth=function(a){this.inner.style.width=a+"px"},this.setScrollWidth=function(a){this.inner.style.width=a+"px"},this.setScrollLeft=function(a){this.scrollLeft!=a&&(this.skipEvent=!0,this.scrollLeft=this.element.scrollLeft=a)}}.call(j.prototype),b.ScrollBar=i,b.ScrollBarV=i,b.ScrollBarH=j,b.VScrollBar=i,b.HScrollBar=j}),ace.define("ace/renderloop",["require","exports","module","ace/lib/event"],function(a,b,c){"use strict";var d=a("./lib/event"),e=function(a,b){this.onRender=a,this.pending=!1,this.changes=0,this.window=b||window};(function(){this.schedule=function(a){if(this.changes=this.changes|a,!this.pending&&this.changes){this.pending=!0;var b=this;d.nextFrame(function(){b.pending=!1;for(var a;a=b.changes;)b.changes=0,b.onRender(a)},this.window)}}}).call(e.prototype),b.RenderLoop=e}),ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"],function(a,b,c){var d=a("../lib/oop"),e=a("../lib/dom"),f=a("../lib/lang"),g=a("../lib/useragent"),h=a("../lib/event_emitter").EventEmitter,i=0,j=b.FontMetrics=function(a,b){this.el=e.createElement("div"),this.$setMeasureNodeStyles(this.el.style,!0),this.$main=e.createElement("div"),this.$setMeasureNodeStyles(this.$main.style),this.$measureNode=e.createElement("div"),this.$setMeasureNodeStyles(this.$measureNode.style),this.el.appendChild(this.$main),this.el.appendChild(this.$measureNode),a.appendChild(this.el),i||this.$testFractionalRect(),this.$measureNode.innerHTML=f.stringRepeat("X",i),this.$characterSize={width:0,height:0},this.checkForSizeChanges()};(function(){d.implement(this,h),this.$characterSize={width:0,height:0},this.$testFractionalRect=function(){var a=e.createElement("div");this.$setMeasureNodeStyles(a.style),a.style.width="0.2px",document.documentElement.appendChild(a);var b=a.getBoundingClientRect().width;i=b>0&&1>b?50:100,a.parentNode.removeChild(a)},this.$setMeasureNodeStyles=function(a,b){a.width=a.height="auto",a.left=a.top="-100px",a.visibility="hidden",a.position="fixed",a.whiteSpace="pre",g.isIE<8?a["font-family"]="inherit":a.font="inherit",a.overflow=b?"hidden":"visible"},this.checkForSizeChanges=function(){var a=this.$measureSizes();if(a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)){this.$measureNode.style.fontWeight="bold";var b=this.$measureSizes();this.$measureNode.style.fontWeight="",this.$characterSize=a,this.charSizes=Object.create(null),this.allowBoldFonts=b&&b.width===a.width&&b.height===a.height,this._emit("changeCharacterSize",{data:a})}},this.$pollSizeChanges=function(){if(this.$pollSizeChangesTimer)return this.$pollSizeChangesTimer;var a=this;return this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.setPolling=function(a){a?this.$pollSizeChanges():this.$pollSizeChangesTimer&&this.$pollSizeChangesTimer},this.$measureSizes=function(){if(50===i){var a=null;try{a=this.$measureNode.getBoundingClientRect()}catch(b){a={width:0,height:0}}var c={height:a.height,width:a.width/i}}else var c={height:this.$measureNode.clientHeight,width:this.$measureNode.clientWidth/i};return 0===c.width||0===c.height?null:c},this.$measureCharWidth=function(a){this.$main.innerHTML=f.stringRepeat(a,i);var b=this.$main.getBoundingClientRect();return b.width/i},this.getCharacterWidth=function(a){var b=this.charSizes[a];return void 0===b&&(this.charSizes[a]=this.$measureCharWidth(a)/this.$characterSize.width),b},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.el&&this.el.parentNode&&this.el.parentNode.removeChild(this.el)}}).call(j.prototype)}),ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"],function(a,b,c){"use strict";var d=a("./lib/oop"),e=a("./lib/dom"),f=a("./config"),g=a("./lib/useragent"),h=a("./layer/gutter").Gutter,i=a("./layer/marker").Marker,j=a("./layer/text").Text,k=a("./layer/cursor").Cursor,l=a("./scrollbar").HScrollBar,m=a("./scrollbar").VScrollBar,n=a("./renderloop").RenderLoop,o=a("./layer/font_metrics").FontMetrics,p=a("./lib/event_emitter").EventEmitter,q='.ace_editor { position: relative; overflow: hidden; font: 12px/normal \'Monaco\', \'Menlo\', \'Ubuntu Mono\', \'Consolas\', \'source-code-pro\', monospace; direction: ltr; } .ace_scroller { position: absolute; overflow: hidden; top: 0; bottom: 0; background-color: inherit; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; cursor: text; } .ace_content { position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; min-width: 100%; } .ace_dragging .ace_scroller:before{ position: absolute; top: 0; left: 0; right: 0; bottom: 0; content: \'\'; background: rgba(250, 250, 250, 0.01); z-index: 1000; } .ace_dragging.ace_dark .ace_scroller:before{ background: rgba(0, 0, 0, 0.01); } .ace_selecting, .ace_selecting * { cursor: text !important; } .ace_gutter { position: absolute; overflow : hidden; width: auto; top: 0; bottom: 0; left: 0; cursor: default; z-index: 4; -ms-user-select: none; -moz-user-select: none; -webkit-user-select: none; user-select: none; } .ace_gutter-active-line { position: absolute; left: 0; right: 0; } .ace_scroller.ace_scroll-left { box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset; } .ace_gutter-cell { padding-left: 19px; padding-right: 6px; background-repeat: no-repeat; } .ace_gutter-cell.ace_error { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAABOFBMVEX/////////QRswFAb/Ui4wFAYwFAYwFAaWGAfDRymzOSH/PxswFAb/SiUwFAYwFAbUPRvjQiDllog5HhHdRybsTi3/Tyv9Tir+Syj/UC3////XurebMBIwFAb/RSHbPx/gUzfdwL3kzMivKBAwFAbbvbnhPx66NhowFAYwFAaZJg8wFAaxKBDZurf/RB6mMxb/SCMwFAYwFAbxQB3+RB4wFAb/Qhy4Oh+4QifbNRcwFAYwFAYwFAb/QRzdNhgwFAYwFAbav7v/Uy7oaE68MBK5LxLewr/r2NXewLswFAaxJw4wFAbkPRy2PyYwFAaxKhLm1tMwFAazPiQwFAaUGAb/QBrfOx3bvrv/VC/maE4wFAbRPBq6MRO8Qynew8Dp2tjfwb0wFAbx6eju5+by6uns4uH9/f36+vr/GkHjAAAAYnRSTlMAGt+64rnWu/bo8eAA4InH3+DwoN7j4eLi4xP99Nfg4+b+/u9B/eDs1MD1mO7+4PHg2MXa347g7vDizMLN4eG+Pv7i5evs/v79yu7S3/DV7/498Yv24eH+4ufQ3Ozu/v7+y13sRqwAAADLSURBVHjaZc/XDsFgGIBhtDrshlitmk2IrbHFqL2pvXf/+78DPokj7+Fz9qpU/9UXJIlhmPaTaQ6QPaz0mm+5gwkgovcV6GZzd5JtCQwgsxoHOvJO15kleRLAnMgHFIESUEPmawB9ngmelTtipwwfASilxOLyiV5UVUyVAfbG0cCPHig+GBkzAENHS0AstVF6bacZIOzgLmxsHbt2OecNgJC83JERmePUYq8ARGkJx6XtFsdddBQgZE2nPR6CICZhawjA4Fb/chv+399kfR+MMMDGOQAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: 2px center; } .ace_gutter-cell.ace_warning { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAAmVBMVEX///8AAAD///8AAAAAAABPSzb/5sAAAAB/blH/73z/ulkAAAAAAAD85pkAAAAAAAACAgP/vGz/rkDerGbGrV7/pkQICAf////e0IsAAAD/oED/qTvhrnUAAAD/yHD/njcAAADuv2r/nz//oTj/p064oGf/zHAAAAA9Nir/tFIAAAD/tlTiuWf/tkIAAACynXEAAAAAAAAtIRW7zBpBAAAAM3RSTlMAABR1m7RXO8Ln31Z36zT+neXe5OzooRDfn+TZ4p3h2hTf4t3k3ucyrN1K5+Xaks52Sfs9CXgrAAAAjklEQVR42o3PbQ+CIBQFYEwboPhSYgoYunIqqLn6/z8uYdH8Vmdnu9vz4WwXgN/xTPRD2+sgOcZjsge/whXZgUaYYvT8QnuJaUrjrHUQreGczuEafQCO/SJTufTbroWsPgsllVhq3wJEk2jUSzX3CUEDJC84707djRc5MTAQxoLgupWRwW6UB5fS++NV8AbOZgnsC7BpEAAAAABJRU5ErkJggg=="); background-position: 2px center; } .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAAAAAA6mKC9AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAJ0Uk5TAAB2k804AAAAPklEQVQY02NgIB68QuO3tiLznjAwpKTgNyDbMegwisCHZUETUZV0ZqOquBpXj2rtnpSJT1AEnnRmL2OgGgAAIKkRQap2htgAAAAASUVORK5CYII="); background-position: 2px center; } .ace_dark .ace_gutter-cell.ace_info { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC"); } .ace_scrollbar { position: absolute; right: 0; bottom: 0; z-index: 6; } .ace_scrollbar-inner { position: absolute; cursor: text; left: 0; top: 0; } .ace_scrollbar-v{ overflow-x: hidden; overflow-y: scroll; top: 0; } .ace_scrollbar-h { overflow-x: scroll; overflow-y: hidden; left: 0; } .ace_print-margin { position: absolute; height: 100%; } .ace_text-input { position: absolute; z-index: 0; width: 0.5em; height: 1em; opacity: 0; background: transparent; -moz-appearance: none; appearance: none; border: none; resize: none; outline: none; overflow: hidden; font: inherit; padding: 0 1px; margin: 0 -1px; text-indent: -1em; -ms-user-select: text; -moz-user-select: text; -webkit-user-select: text; user-select: text; } .ace_text-input.ace_composition { background: inherit; color: inherit; z-index: 1000; opacity: 1; text-indent: 0; } .ace_layer { z-index: 1; position: absolute; overflow: hidden; white-space: pre; height: 100%; width: 100%; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; pointer-events: none; } .ace_gutter-layer { position: relative; width: auto; text-align: right; pointer-events: auto; } .ace_text-layer { font: inherit !important; } .ace_cjk { display: inline-block; text-align: center; } .ace_cursor-layer { z-index: 4; } .ace_cursor { z-index: 4; position: absolute; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; border-left: 2px solid } .ace_slim-cursors .ace_cursor { border-left-width: 1px; } .ace_overwrite-cursors .ace_cursor { border-left-width: 0; border-bottom: 1px solid; } .ace_hidden-cursors .ace_cursor { opacity: 0.2; } .ace_smooth-blinking .ace_cursor { -webkit-transition: opacity 0.18s; transition: opacity 0.18s; } .ace_editor.ace_multiselect .ace_cursor { border-left-width: 1px; } .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack { position: absolute; z-index: 3; } .ace_marker-layer .ace_selection { position: absolute; z-index: 5; } .ace_marker-layer .ace_bracket { position: absolute; z-index: 6; } .ace_marker-layer .ace_active-line { position: absolute; z-index: 2; } .ace_marker-layer .ace_selected-word { position: absolute; z-index: 4; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; } .ace_line .ace_fold { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; display: inline-block; height: 11px; margin-top: -2px; vertical-align: middle; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACJJREFUeNpi+P//fxgTAwPDBxDxD078RSX+YeEyDFMCIMAAI3INmXiwf2YAAAAASUVORK5CYII="); background-repeat: no-repeat, repeat-x; background-position: center center, top left; color: transparent; border: 1px solid black; border-radius: 2px; cursor: pointer; pointer-events: auto; } .ace_dark .ace_fold { } .ace_fold:hover{ background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABEAAAAJCAYAAADU6McMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAJpJREFUeNpi/P//PwOlgAXGYGRklAVSokD8GmjwY1wasKljQpYACtpCFeADcHVQfQyMQAwzwAZI3wJKvCLkfKBaMSClBlR7BOQikCFGQEErIH0VqkabiGCAqwUadAzZJRxQr/0gwiXIal8zQQPnNVTgJ1TdawL0T5gBIP1MUJNhBv2HKoQHHjqNrA4WO4zY0glyNKLT2KIfIMAAQsdgGiXvgnYAAAAASUVORK5CYII="), url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAACBJREFUeNpi+P//fz4TAwPDZxDxD5X4i5fLMEwJgAADAEPVDbjNw87ZAAAAAElFTkSuQmCC"); } .ace_tooltip { background-color: #FFF; background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1)); background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1)); border: 1px solid gray; border-radius: 1px; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); color: black; max-width: 100%; padding: 3px 4px; position: fixed; z-index: 999999; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; cursor: default; white-space: pre; word-wrap: break-word; line-height: normal; font-style: normal; font-weight: normal; letter-spacing: normal; pointer-events: none; } .ace_folding-enabled > .ace_gutter-cell { padding-right: 13px; } .ace_fold-widget { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0 -12px 0 1px; display: none; width: 11px; vertical-align: top; background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42mWKsQ0AMAzC8ixLlrzQjzmBiEjp0A6WwBCSPgKAXoLkqSot7nN3yMwR7pZ32NzpKkVoDBUxKAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; background-position: center; border-radius: 3px; border: 1px solid transparent; cursor: pointer; } .ace_folding-enabled .ace_fold-widget { display: inline-block; } .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAANElEQVR42m3HwQkAMAhD0YzsRchFKI7sAikeWkrxwScEB0nh5e7KTPWimZki4tYfVbX+MNl4pyZXejUO1QAAAABJRU5ErkJggg=="); } .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAGCAYAAAAG5SQMAAAAOUlEQVR42jXKwQkAMAgDwKwqKD4EwQ26sSOkVWjgIIHAzPiCgaqiqnJHZnKICBERHN194O5b9vbLuAVRL+l0YWnZAAAAAElFTkSuQmCCXA=="); } .ace_fold-widget:hover { border: 1px solid rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.2); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.7); } .ace_fold-widget:active { border: 1px solid rgba(0, 0, 0, 0.4); background-color: rgba(0, 0, 0, 0.05); box-shadow: 0 1px 1px rgba(255, 255, 255, 0.8); } .ace_dark .ace_fold-widget { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAHklEQVQIW2P4//8/AzoGEQ7oGCaLLAhWiSwB146BAQCSTPYocqT0AAAAAElFTkSuQmCC"); } .ace_dark .ace_fold-widget.ace_end { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAH0lEQVQIW2P4//8/AxQ7wNjIAjDMgC4AxjCVKBirIAAF0kz2rlhxpAAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget.ace_closed { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAMAAAAFCAYAAACAcVaiAAAAHElEQVQIW2P4//+/AxAzgDADlOOAznHAKgPWAwARji8UIDTfQQAAAABJRU5ErkJggg=="); } .ace_dark .ace_fold-widget:hover { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); background-color: rgba(255, 255, 255, 0.1); } .ace_dark .ace_fold-widget:active { box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2); } .ace_fold-widget.ace_invalid { background-color: #FFB4B4; border-color: #DE5555; } .ace_fade-fold-widgets .ace_fold-widget { -webkit-transition: opacity 0.4s ease 0.05s; transition: opacity 0.4s ease 0.05s; opacity: 0; } .ace_fade-fold-widgets:hover .ace_fold-widget { -webkit-transition: opacity 0.05s ease 0.05s; transition: opacity 0.05s ease 0.05s; opacity:1; } .ace_underline { text-decoration: underline; } .ace_bold { font-weight: bold; } .ace_nobold .ace_bold { font-weight: normal; } .ace_italic { font-style: italic; } .ace_error-marker { background-color: rgba(255, 0, 0,0.2); position: absolute; z-index: 9; } .ace_highlight-marker { background-color: rgba(255, 255, 0,0.2); position: absolute; z-index: 8; } ';e.importCssString(q,"ace_editor");var r=function(a,b){var c=this;this.container=a||e.createElement("div"),this.$keepTextAreaAtCursor=!g.isOldIE,e.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$gutterLayer.on("changeGutterWidth",this.onGutterResize.bind(this)),this.$markerBack=new i(this.content);var d=this.$textLayer=new j(this.content);this.canvas=d.element,this.$markerFront=new i(this.content),this.$cursorLayer=new k(this.content),this.$horizScroll=!1,this.$vScroll=!1,this.scrollBar=this.scrollBarV=new m(this.container,this),this.scrollBarH=new l(this.container,this),this.scrollBarV.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollTop(a.data-c.scrollMargin.top)}),this.scrollBarH.addEventListener("scroll",function(a){c.$scrollAnimation||c.session.setScrollLeft(a.data-c.scrollMargin.left)}),this.scrollTop=0,this.scrollLeft=0,this.cursorPos={row:0,column:0},this.$fontMetrics=new o(this.container,500),this.$textLayer.$setFontMetrics(this.$fontMetrics),this.$textLayer.addEventListener("changeCharacterSize",function(a){c.updateCharacterSize(),c.onResize(!0,c.gutterWidth,c.$size.width,c.$size.height),c._signal("changeCharacterSize",a)}),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0,$dirty:!0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:0,characterWidth:0,minHeight:1,maxHeight:1,offset:0,height:1,gutterOffset:1},this.scrollMargin={left:0,right:0,top:0,bottom:0,v:0,h:0},this.$loop=new n(this.$renderChanges.bind(this),this.container.ownerDocument.defaultView),this.$loop.schedule(this.CHANGE_FULL),this.updateCharacterSize(),this.setPadding(4),f.resetOptions(this),f._emit("renderer",this)};(function(){this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,this.CHANGE_H_SCROLL=1024,d.implement(this,p),this.updateCharacterSize=function(){this.$textLayer.allowBoldFonts!=this.$allowBoldFonts&&(this.$allowBoldFonts=this.$textLayer.allowBoldFonts,this.setStyle("ace_nobold",!this.$allowBoldFonts)),this.layerConfig.characterWidth=this.characterWidth=this.$textLayer.getCharacterWidth(),this.layerConfig.lineHeight=this.lineHeight=this.$textLayer.getLineHeight(),this.$updatePrintMargin()},this.setSession=function(a){this.session&&this.session.doc.off("changeNewLineMode",this.onChangeNewLineMode),this.session=a,a&&this.scrollMargin.top&&a.getScrollTop()<=0&&a.setScrollTop(-this.scrollMargin.top),this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),a&&(this.$loop.schedule(this.CHANGE_FULL),this.session.$setFontMetrics(this.$fontMetrics),this.onChangeNewLineMode=this.onChangeNewLineMode.bind(this),this.onChangeNewLineMode(),this.session.doc.on("changeNewLineMode",this.onChangeNewLineMode))},this.updateLines=function(a,b,c){if(void 0===b&&(b=1/0),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRowthis.layerConfig.lastRow||this.$loop.schedule(this.CHANGE_LINES)},this.onChangeNewLineMode=function(){this.$loop.schedule(this.CHANGE_TEXT),this.$textLayer.$updateEolChar()},this.onChangeTabSize=function(){this.$loop.schedule(this.CHANGE_TEXT|this.CHANGE_MARKER),this.$textLayer.onChangeTabSize()},this.updateText=function(){this.$loop.schedule(this.CHANGE_TEXT)},this.updateFull=function(a){a?this.$renderChanges(this.CHANGE_FULL,!0):this.$loop.schedule(this.CHANGE_FULL)},this.updateFontSize=function(){this.$textLayer.checkForSizeChanges()},this.$changes=0,this.$updateSizeAsync=function(){this.$loop.pending?this.$size.$dirty=!0:this.onResize()},this.onResize=function(a,b,c,d){if(!(this.resizing>2)){this.resizing>0?this.resizing++:this.resizing=a?1:0;var e=this.container;d||(d=e.clientHeight||e.scrollHeight),c||(c=e.clientWidth||e.scrollWidth);var f=this.$updateCachedSize(a,b,c,d);if(!this.$size.scrollerHeight||!c&&!d)return this.resizing=0;a&&(this.$gutterLayer.$padding=null),a?this.$renderChanges(f|this.$changes,!0):this.$loop.schedule(f|this.$changes),this.resizing&&(this.resizing=0)}},this.$updateCachedSize=function(a,b,c,d){d-=this.$extraHeight||0;var e=0,f=this.$size,g={width:f.width,height:f.height,scrollerHeight:f.scrollerHeight,scrollerWidth:f.scrollerWidth};return d&&(a||f.height!=d)&&(f.height=d,e|=this.CHANGE_SIZE,f.scrollerHeight=f.height,this.$horizScroll&&(f.scrollerHeight-=this.scrollBarH.getHeight()),this.scrollBarV.element.style.bottom=this.scrollBarH.getHeight()+"px",e|=this.CHANGE_SCROLL),c&&(a||f.width!=c)&&(e|=this.CHANGE_SIZE,f.width=c,null==b&&(b=this.$showGutter?this.$gutter.offsetWidth:0),this.gutterWidth=b,this.scrollBarH.element.style.left=this.scroller.style.left=b+"px",f.scrollerWidth=Math.max(0,c-b-this.scrollBarV.getWidth()),this.scrollBarH.element.style.right=this.scroller.style.right=this.scrollBarV.getWidth()+"px",this.scroller.style.bottom=this.scrollBarH.getHeight()+"px",(this.session&&this.session.getUseWrapMode()&&this.adjustWrapLimit()||a)&&(e|=this.CHANGE_FULL)),f.$dirty=!c||!d,e&&this._signal("resize",g),e},this.onGutterResize=function(){var a=this.$showGutter?this.$gutter.offsetWidth:0;a!=this.gutterWidth&&(this.$changes|=this.$updateCachedSize(!0,a,this.$size.width,this.$size.height)),this.session.getUseWrapMode()&&this.adjustWrapLimit()?this.$loop.schedule(this.CHANGE_FULL):this.$size.$dirty?this.$loop.schedule(this.CHANGE_FULL):(this.$computeLayerConfig(),this.$loop.schedule(this.CHANGE_MARKER))},this.adjustWrapLimit=function(){var a=this.$size.scrollerWidth-2*this.$padding,b=Math.floor(a/this.characterWidth);return this.session.adjustWrapLimit(b,this.$showPrintMargin&&this.$printMarginColumn)},this.setAnimatedScroll=function(a){this.setOption("animatedScroll",a)},this.getAnimatedScroll=function(){return this.$animatedScroll},this.setShowInvisibles=function(a){this.setOption("showInvisibles",a)},this.getShowInvisibles=function(){return this.getOption("showInvisibles")},this.getDisplayIndentGuides=function(){return this.getOption("displayIndentGuides")},this.setDisplayIndentGuides=function(a){this.setOption("displayIndentGuides",a)},this.setShowPrintMargin=function(a){this.setOption("showPrintMargin",a)},this.getShowPrintMargin=function(){return this.getOption("showPrintMargin")},this.setPrintMarginColumn=function(a){this.setOption("printMarginColumn",a)},this.getPrintMarginColumn=function(){return this.getOption("printMarginColumn")},this.getShowGutter=function(){return this.getOption("showGutter")},this.setShowGutter=function(a){return this.setOption("showGutter",a)},this.getFadeFoldWidgets=function(){return this.getOption("fadeFoldWidgets")},this.setFadeFoldWidgets=function(a){this.setOption("fadeFoldWidgets",a)},this.setHighlightGutterLine=function(a){this.setOption("highlightGutterLine",a)},this.getHighlightGutterLine=function(){return this.getOption("highlightGutterLine")},this.$updateGutterLineHighlight=function(){var a=this.$cursorLayer.$pixelPos,b=this.layerConfig.lineHeight;if(this.session.getUseWrapMode()){var c=this.session.selection.getCursor();c.column=0,a=this.$cursorLayer.getPixelPosition(c,!0),b*=this.session.getRowLength(c.row)}this.$gutterLineHighlight.style.top=a.top-this.layerConfig.offset+"px",this.$gutterLineHighlight.style.height=b+"px"},this.$updatePrintMargin=function(){if(this.$showPrintMargin||this.$printMarginEl){if(!this.$printMarginEl){var a=e.createElement("div");a.className="ace_layer ace_print-margin-layer",this.$printMarginEl=e.createElement("div"),this.$printMarginEl.className="ace_print-margin",a.appendChild(this.$printMarginEl),this.content.insertBefore(a,this.content.firstChild)}var b=this.$printMarginEl.style;b.left=this.characterWidth*this.$printMarginColumn+this.$padding+"px",b.visibility=this.$showPrintMargin?"visible":"hidden",this.session&&-1==this.session.$wrap&&this.adjustWrapLimit()}},this.getContainerElement=function(){return this.container},this.getMouseEventTarget=function(){return this.content},this.getTextAreaContainer=function(){return this.container},this.$moveTextAreaToCursor=function(){if(this.$keepTextAreaAtCursor){var a=this.layerConfig,b=this.$cursorLayer.$pixelPos.top,c=this.$cursorLayer.$pixelPos.left;b-=a.offset;var d=this.lineHeight;if(!(0>b||b>a.height-d)){var e=this.characterWidth;if(this.$composition){var f=this.textarea.value.replace(/^\x01+/,"");e*=this.session.$getStringScreenWidth(f)[0]+2,d+=2}c-=this.scrollLeft,c>this.$size.scrollerWidth-e&&(c=this.$size.scrollerWidth-e),c+=this.gutterWidth,this.textarea.style.height=d+"px",this.textarea.style.width=e+"px",this.textarea.style.left=Math.min(c,this.$size.scrollerWidth-e)+"px",this.textarea.style.top=Math.min(b,this.$size.height-d)+"px"}}},this.getFirstVisibleRow=function(){return this.layerConfig.firstRow},this.getFirstFullyVisibleRow=function(){return this.layerConfig.firstRow+(0===this.layerConfig.offset?0:1)},this.getLastFullyVisibleRow=function(){var a=Math.floor((this.layerConfig.height+this.layerConfig.offset)/this.layerConfig.lineHeight);return this.layerConfig.firstRow-1+a},this.getLastVisibleRow=function(){return this.layerConfig.lastRow},this.$padding=null,this.setPadding=function(a){this.$padding=a,this.$textLayer.setPadding(a),this.$cursorLayer.setPadding(a),this.$markerFront.setPadding(a),this.$markerBack.setPadding(a),this.$loop.schedule(this.CHANGE_FULL),this.$updatePrintMargin()},this.setScrollMargin=function(a,b,c,d){var e=this.scrollMargin;e.top=0|a,e.bottom=0|b,e.right=0|d,e.left=0|c,e.v=e.top+e.bottom,e.h=e.left+e.right,e.top&&this.scrollTop<=0&&this.session&&this.session.setScrollTop(-e.top),this.updateFull()},this.getHScrollBarAlwaysVisible=function(){ +return this.$hScrollBarAlwaysVisible},this.setHScrollBarAlwaysVisible=function(a){this.setOption("hScrollBarAlwaysVisible",a)},this.getVScrollBarAlwaysVisible=function(){return this.$hScrollBarAlwaysVisible},this.setVScrollBarAlwaysVisible=function(a){this.setOption("vScrollBarAlwaysVisible",a)},this.$updateScrollBarV=function(){var a=this.layerConfig.maxHeight,b=this.$size.scrollerHeight;!this.$maxLines&&this.$scrollPastEnd&&(a-=(b-this.lineHeight)*this.$scrollPastEnd,this.scrollTop>a-b&&(a=this.scrollTop+b,this.scrollBarV.scrollTop=null)),this.scrollBarV.setScrollHeight(a+this.scrollMargin.v),this.scrollBarV.setScrollTop(this.scrollTop+this.scrollMargin.top)},this.$updateScrollBarH=function(){this.scrollBarH.setScrollWidth(this.layerConfig.width+2*this.$padding+this.scrollMargin.h),this.scrollBarH.setScrollLeft(this.scrollLeft+this.scrollMargin.left)},this.$frozen=!1,this.freeze=function(){this.$frozen=!0},this.unfreeze=function(){this.$frozen=!1},this.$renderChanges=function(a,b){if(this.$changes&&(a|=this.$changes,this.$changes=0),!this.session||!this.container.offsetWidth||this.$frozen||!a&&!b)return void(this.$changes|=a);if(this.$size.$dirty)return this.$changes|=a,this.onResize(!0);this.lineHeight||this.$textLayer.checkForSizeChanges(),this._signal("beforeRender");var c=this.layerConfig;if(a&this.CHANGE_FULL||a&this.CHANGE_SIZE||a&this.CHANGE_TEXT||a&this.CHANGE_LINES||a&this.CHANGE_SCROLL||a&this.CHANGE_H_SCROLL){if(a|=this.$computeLayerConfig(),c.firstRow!=this.layerConfig.firstRow&&c.firstRowScreen==this.layerConfig.firstRowScreen){var d=this.scrollTop+(c.firstRow-this.layerConfig.firstRow)*this.lineHeight;d>0&&(this.scrollTop=d,a|=this.CHANGE_SCROLL,a|=this.$computeLayerConfig())}c=this.layerConfig,this.$updateScrollBarV(),a&this.CHANGE_H_SCROLL&&this.$updateScrollBarH(),this.$gutterLayer.element.style.marginTop=-c.offset+"px",this.content.style.marginTop=-c.offset+"px",this.content.style.width=c.width+2*this.$padding+"px",this.content.style.height=c.minHeight+"px"}return a&this.CHANGE_H_SCROLL&&(this.content.style.marginLeft=-this.scrollLeft+"px",this.scroller.className=this.scrollLeft<=0?"ace_scroller":"ace_scroller ace_scroll-left"),a&this.CHANGE_FULL?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),void this._signal("afterRender")):a&this.CHANGE_SCROLL?(a&this.CHANGE_TEXT||a&this.CHANGE_LINES?this.$textLayer.update(c):this.$textLayer.scrollLines(c),this.$showGutter&&this.$gutterLayer.update(c),this.$markerBack.update(c),this.$markerFront.update(c),this.$cursorLayer.update(c),this.$highlightGutterLine&&this.$updateGutterLineHighlight(),this.$moveTextAreaToCursor(),void this._signal("afterRender")):(a&this.CHANGE_TEXT?(this.$textLayer.update(c),this.$showGutter&&this.$gutterLayer.update(c)):a&this.CHANGE_LINES?(this.$updateLines()||a&this.CHANGE_GUTTER&&this.$showGutter)&&this.$gutterLayer.update(c):(a&this.CHANGE_TEXT||a&this.CHANGE_GUTTER)&&this.$showGutter&&this.$gutterLayer.update(c),a&this.CHANGE_CURSOR&&(this.$cursorLayer.update(c),this.$moveTextAreaToCursor(),this.$highlightGutterLine&&this.$updateGutterLineHighlight()),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_FRONT)&&this.$markerFront.update(c),a&(this.CHANGE_MARKER|this.CHANGE_MARKER_BACK)&&this.$markerBack.update(c),void this._signal("afterRender"))},this.$autosize=function(){var a=this.session.getScreenLength()*this.lineHeight,b=this.$maxLines*this.lineHeight,c=Math.max((this.$minLines||1)*this.lineHeight,Math.min(b,a))+this.scrollMargin.v+(this.$extraHeight||0),d=a>b;if(c!=this.desiredHeight||this.$size.height!=this.desiredHeight||d!=this.$vScroll){d!=this.$vScroll&&(this.$vScroll=d,this.scrollBarV.setVisible(d));var e=this.container.clientWidth;this.container.style.height=c+"px",this.$updateCachedSize(!0,this.$gutterWidth,e,c),this.desiredHeight=c,this._signal("autosize")}},this.$computeLayerConfig=function(){this.$maxLines&&this.lineHeight>1&&this.$autosize();var a=this.session,b=this.$size,c=b.height<=2*this.lineHeight,d=this.session.getScreenLength(),e=d*this.lineHeight,f=this.scrollTop%this.lineHeight,g=b.scrollerHeight+this.lineHeight,h=this.$getLongestLine(),i=!c&&(this.$hScrollBarAlwaysVisible||b.scrollerWidth-h-2*this.$padding<0),j=this.$horizScroll!==i;j&&(this.$horizScroll=i,this.scrollBarH.setVisible(i));var k=!this.$maxLines&&this.$scrollPastEnd?(b.scrollerHeight-this.lineHeight)*this.$scrollPastEnd:0;e+=k,this.session.setScrollTop(Math.max(-this.scrollMargin.top,Math.min(this.scrollTop,e-b.scrollerHeight+this.scrollMargin.bottom))),this.session.setScrollLeft(Math.max(-this.scrollMargin.left,Math.min(this.scrollLeft,h+2*this.$padding-b.scrollerWidth+this.scrollMargin.right)));var l=!c&&(this.$vScrollBarAlwaysVisible||b.scrollerHeight-e+k<0||this.scrollTop),m=this.$vScroll!==l;m&&(this.$vScroll=l,this.scrollBarV.setVisible(l));var n,o,p=Math.ceil(g/this.lineHeight)-1,q=Math.max(0,Math.round((this.scrollTop-f)/this.lineHeight)),r=q+p,s=this.lineHeight;q=a.screenToDocumentRow(q,0);var t=a.getFoldLine(q);t&&(q=t.start.row),n=a.documentToScreenRow(q,0),o=a.getRowLength(q)*s,r=Math.min(a.screenToDocumentRow(r,0),a.getLength()-1),g=b.scrollerHeight+a.getRowLength(r)*s+o,f=this.scrollTop-n*s;var u=0;return this.layerConfig.width!=h&&(u=this.CHANGE_H_SCROLL),(j||m)&&(u=this.$updateCachedSize(!0,this.gutterWidth,b.width,b.height),this._signal("scrollbarVisibilityChanged"),m&&(h=this.$getLongestLine())),this.layerConfig={width:h,padding:this.$padding,firstRow:q,firstRowScreen:n,lastRow:r,lineHeight:s,characterWidth:this.characterWidth,minHeight:g,maxHeight:e,offset:f,gutterOffset:Math.max(0,Math.ceil((f+b.height-b.scrollerHeight)/s)),height:this.$size.scrollerHeight},u},this.$updateLines=function(){var a=this.$changedLines.firstRow,b=this.$changedLines.lastRow;this.$changedLines=null;var c=this.layerConfig;return a>c.lastRow+1||bf?(b&&(f-=b*this.$size.scrollerHeight),0===f&&(f=-this.scrollMargin.top),this.session.setScrollTop(f)):i+this.$size.scrollerHeight-he?(ec;++c)e.push(f(c/this.STEPS,a,b-a));return e},this.scrollToLine=function(a,b,c,d){var e=this.$cursorLayer.getPixelPosition({row:a,column:0}),f=e.top;b&&(f-=this.$size.scrollerHeight/2);var g=this.scrollTop;this.session.setScrollTop(f),c!==!1&&this.animateScrolling(g,d)},this.animateScrolling=function(a,b){var c=this.scrollTop;if(this.$animatedScroll){var d=this;if(a!=c){if(this.$scrollAnimation){var e=this.$scrollAnimation.steps;if(e.length&&(a=e[0],a==c))return}var f=d.$calcSteps(a,c);this.$scrollAnimation={from:a,to:c,steps:f},clearInterval(this.$timer),d.session.setScrollTop(f.shift()),d.session.$scrollTop=c,this.$timer=setInterval(function(){f.length?(d.session.setScrollTop(f.shift()),d.session.$scrollTop=c):null!=c?(d.session.$scrollTop=-1,d.session.setScrollTop(c),c=null):(d.$timer=clearInterval(d.$timer),d.$scrollAnimation=null,b&&b())},10)}}},this.scrollToY=function(a){this.scrollTop!==a&&(this.$loop.schedule(this.CHANGE_SCROLL),this.scrollTop=a)},this.scrollToX=function(a){this.scrollLeft!==a&&(this.scrollLeft=a),this.$loop.schedule(this.CHANGE_H_SCROLL)},this.scrollTo=function(a,b){this.session.setScrollTop(b),this.session.setScrollLeft(b)},this.scrollBy=function(a,b){b&&this.session.setScrollTop(this.session.getScrollTop()+b),a&&this.session.setScrollLeft(this.session.getScrollLeft()+a)},this.isScrollableBy=function(a,b){return 0>b&&this.session.getScrollTop()>=1-this.scrollMargin.top?!0:b>0&&this.session.getScrollTop()+this.$size.scrollerHeight-this.layerConfig.maxHeight<-1+this.scrollMargin.bottom?!0:0>a&&this.session.getScrollLeft()>=1-this.scrollMargin.left?!0:a>0&&this.session.getScrollLeft()+this.$size.scrollerWidth-this.layerConfig.width<-1+this.scrollMargin.right?!0:void 0},this.pixelToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=(a+this.scrollLeft-c.left-this.$padding)/this.characterWidth,e=Math.floor((b+this.scrollTop-c.top)/this.lineHeight),f=Math.round(d);return{row:e,column:f,side:d-f>0?1:-1}},this.screenToTextCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=Math.round((a+this.scrollLeft-c.left-this.$padding)/this.characterWidth),e=(b+this.scrollTop-c.top)/this.lineHeight;return this.session.screenToDocumentPosition(e,Math.max(d,0))},this.textToScreenCoordinates=function(a,b){var c=this.scroller.getBoundingClientRect(),d=this.session.documentToScreenPosition(a,b),e=this.$padding+Math.round(d.column*this.characterWidth),f=d.row*this.lineHeight;return{pageX:c.left+e-this.scrollLeft,pageY:c.top+f-this.scrollTop}},this.visualizeFocus=function(){e.addCssClass(this.container,"ace_focus")},this.visualizeBlur=function(){e.removeCssClass(this.container,"ace_focus")},this.showComposition=function(a){this.$composition||(this.$composition={keepTextAreaAtCursor:this.$keepTextAreaAtCursor,cssText:this.textarea.style.cssText}),this.$keepTextAreaAtCursor=!0,e.addCssClass(this.textarea,"ace_composition"),this.textarea.style.cssText="",this.$moveTextAreaToCursor()},this.setCompositionText=function(a){this.$moveTextAreaToCursor()},this.hideComposition=function(){this.$composition&&(e.removeCssClass(this.textarea,"ace_composition"),this.$keepTextAreaAtCursor=this.$composition.keepTextAreaAtCursor,this.textarea.style.cssText=this.$composition.cssText,this.$composition=null)},this.setTheme=function(a,b){function c(c){if(d.$themeId!=a)return b&&b();if(c.cssClass){e.importCssString(c.cssText,c.cssClass,d.container.ownerDocument),d.theme&&e.removeCssClass(d.container,d.theme.cssClass);var f="padding"in c?c.padding:"padding"in(d.theme||{})?4:d.$padding;d.$padding&&f!=d.$padding&&d.setPadding(f),d.$theme=c.cssClass,d.theme=c,e.addCssClass(d.container,c.cssClass),e.setCssClass(d.container,"ace_dark",c.isDark),d.$size&&(d.$size.width=0,d.$updateSizeAsync()),d._dispatchEvent("themeLoaded",{theme:c}),b&&b()}}var d=this;if(this.$themeId=a,d._dispatchEvent("themeChange",{theme:a}),a&&"string"!=typeof a)c(a);else{var g=a||this.$options.theme.initialValue;f.loadModule(["theme",g],c)}},this.getTheme=function(){return this.$themeId},this.setStyle=function(a,b){e.setCssClass(this.container,a,b!==!1)},this.unsetStyle=function(a){e.removeCssClass(this.container,a)},this.setCursorStyle=function(a){this.scroller.style.cursor!=a&&(this.scroller.style.cursor=a)},this.setMouseCursor=function(a){this.scroller.style.cursor=a},this.destroy=function(){this.$textLayer.destroy(),this.$cursorLayer.destroy()}}).call(r.prototype),f.defineOptions(r.prototype,"renderer",{animatedScroll:{initialValue:!1},showInvisibles:{set:function(a){this.$textLayer.setShowInvisibles(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!1},showPrintMargin:{set:function(){this.$updatePrintMargin()},initialValue:!0},printMarginColumn:{set:function(){this.$updatePrintMargin()},initialValue:80},printMargin:{set:function(a){"number"==typeof a&&(this.$printMarginColumn=a),this.$showPrintMargin=!!a,this.$updatePrintMargin()},get:function(){return this.$showPrintMargin&&this.$printMarginColumn}},showGutter:{set:function(a){this.$gutter.style.display=a?"block":"none",this.$loop.schedule(this.CHANGE_FULL),this.onGutterResize()},initialValue:!0},fadeFoldWidgets:{set:function(a){e.setCssClass(this.$gutter,"ace_fade-fold-widgets",a)},initialValue:!1},showFoldWidgets:{set:function(a){this.$gutterLayer.setShowFoldWidgets(a)},initialValue:!0},showLineNumbers:{set:function(a){this.$gutterLayer.setShowLineNumbers(a),this.$loop.schedule(this.CHANGE_GUTTER)},initialValue:!0},displayIndentGuides:{set:function(a){this.$textLayer.setDisplayIndentGuides(a)&&this.$loop.schedule(this.CHANGE_TEXT)},initialValue:!0},highlightGutterLine:{set:function(a){return this.$gutterLineHighlight?(this.$gutterLineHighlight.style.display=a?"":"none",void(this.$cursorLayer.$pixelPos&&this.$updateGutterLineHighlight())):(this.$gutterLineHighlight=e.createElement("div"),this.$gutterLineHighlight.className="ace_gutter-active-line",void this.$gutter.appendChild(this.$gutterLineHighlight))},initialValue:!1,value:!0},hScrollBarAlwaysVisible:{set:function(a){this.$hScrollBarAlwaysVisible&&this.$horizScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},vScrollBarAlwaysVisible:{set:function(a){this.$vScrollBarAlwaysVisible&&this.$vScroll||this.$loop.schedule(this.CHANGE_SCROLL)},initialValue:!1},fontSize:{set:function(a){"number"==typeof a&&(a+="px"),this.container.style.fontSize=a,this.updateFontSize()},initialValue:12},fontFamily:{set:function(a){this.container.style.fontFamily=a,this.updateFontSize()}},maxLines:{set:function(a){this.updateFull()}},minLines:{set:function(a){this.updateFull()}},scrollPastEnd:{set:function(a){a=+a||0,this.$scrollPastEnd!=a&&(this.$scrollPastEnd=a,this.$loop.schedule(this.CHANGE_SCROLL))},initialValue:0,handlesSet:!0},fixedWidthGutter:{set:function(a){this.$gutterLayer.$fixedWidth=!!a,this.$loop.schedule(this.CHANGE_GUTTER)}},theme:{set:function(a){this.setTheme(a)},get:function(){return this.$themeId||this.theme},initialValue:"./theme/textmate",handlesSet:!0}}),b.VirtualRenderer=r}),ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"],function(a,b,d){"use strict";var e=a("../lib/oop"),f=a("../lib/net"),g=a("../lib/event_emitter").EventEmitter,h=a("../config"),i=function(b,d,e,f){if(this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.onMessage=this.onMessage.bind(this),a.nameToUrl&&!a.toUrl&&(a.toUrl=a.nameToUrl),h.get("packaged")||!a.toUrl)f=f||h.moduleUrl(d.id,"worker");else{var g=this.$normalizePath;f=f||g(a.toUrl("ace/worker/worker.js",null,"_"));var i={};b.forEach(function(b){i[b]=g(a.toUrl(b,null,"_").replace(/(\.js)?(\?.*)?$/,""))})}try{var j=d.src,k=c(19),l=new k([j],{type:"application/javascript"}),m=(window.URL||window.webkitURL).createObjectURL(l);this.$worker=new Worker(m)}catch(n){if(!(n instanceof window.DOMException))throw n;var l=this.$workerBlob(f),o=window.URL||window.webkitURL,p=o.createObjectURL(l);this.$worker=new Worker(p),o.revokeObjectURL(p)}this.$worker.postMessage({init:!0,tlns:i,module:d.id,classname:e}),this.callbackId=1,this.callbacks={},this.$worker.onmessage=this.onMessage};(function(){e.implement(this,g),this.onMessage=function(a){var b=a.data;switch(b.type){case"event":this._signal(b.name,{data:b.data});break;case"call":var c=this.callbacks[b.id];c&&(c(b.data),delete this.callbacks[b.id]);break;case"error":this.reportError(b.data);break;case"log":window.console&&console.log&&console.log.apply(console,b.data)}},this.reportError=function(a){window.console&&console.error&&console.error(a)},this.$normalizePath=function(a){return f.qualifyURL(a)},this.terminate=function(){this._signal("terminate",{}),this.deltaQueue=null,this.$worker.terminate(),this.$worker=null,this.$doc&&this.$doc.off("change",this.changeListener),this.$doc=null},this.send=function(a,b){this.$worker.postMessage({command:a,args:b})},this.call=function(a,b,c){if(c){var d=this.callbackId++;this.callbacks[d]=c,b.push(d)}this.send(a,b)},this.emit=function(a,b){try{this.$worker.postMessage({event:a,data:{data:b.data}})}catch(c){console.error(c.stack)}},this.attachToDocument=function(a){this.$doc&&this.terminate(),this.$doc=a,this.call("setValue",[a.getValue()]),a.on("change",this.changeListener)},this.changeListener=function(a){this.deltaQueue?this.deltaQueue.push(a.data):(this.deltaQueue=[a.data],setTimeout(this.$sendDeltaQueue,0))},this.$sendDeltaQueue=function(){var a=this.deltaQueue;a&&(this.deltaQueue=null,a.length>20&&a.length>this.$doc.getLength()>>1?this.call("setValue",[this.$doc.getValue()]):this.emit("change",{data:a}))},this.$workerBlob=function(a){var b="importScripts('"+f.qualifyURL(a)+"');";try{return new Blob([b],{type:"application/javascript"})}catch(c){var d=window.BlobBuilder||window.WebKitBlobBuilder||window.MozBlobBuilder,e=new d;return e.append(b),e.getBlob("application/javascript")}}}).call(i.prototype);var j=function(a,b,c){this.$sendDeltaQueue=this.$sendDeltaQueue.bind(this),this.changeListener=this.changeListener.bind(this),this.callbackId=1,this.callbacks={},this.messageBuffer=[];var d=null,e=!1,f=Object.create(g),i=this;this.$worker={},this.$worker.terminate=function(){},this.$worker.postMessage=function(a){i.messageBuffer.push(a),d&&(e?setTimeout(j):j())},this.setEmitSync=function(a){e=a};var j=function(){var a=i.messageBuffer.shift();a.command?d[a.command].apply(d,a.args):a.event&&f._signal(a.event,a.data)};f.postMessage=function(a){i.onMessage({data:a})},f.callback=function(a,b){this.postMessage({type:"call",id:b,data:a})},f.emit=function(a,b){this.postMessage({type:"event",name:a,data:b})},h.loadModule(["worker",b],function(a){for(d=new a[c](f);i.messageBuffer.length;)j()})};j.prototype=i.prototype,b.UIWorkerClient=j,b.WorkerClient=i}),ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"],function(a,b,c){"use strict";var d=a("./range").Range,e=a("./lib/event_emitter").EventEmitter,f=a("./lib/oop"),g=function(a,b,c,d,e,f){var g=this;this.length=b,this.session=a,this.doc=a.getDocument(),this.mainClass=e,this.othersClass=f,this.$onUpdate=this.onUpdate.bind(this),this.doc.on("change",this.$onUpdate),this.$others=d,this.$onCursorChange=function(){setTimeout(function(){g.onCursorChange()})},this.$pos=c;var h=a.getUndoManager().$undoStack||a.getUndoManager().$undostack||{length:-1};this.$undoStackDepth=h.length,this.setup(),a.selection.on("changeCursor",this.$onCursorChange)};(function(){f.implement(this,e),this.setup=function(){var a=this,b=this.doc,c=this.session,e=this.$pos;this.selectionBefore=c.selection.toJSON(),c.selection.inMultiSelectMode&&c.selection.toSingleRange(),this.pos=b.createAnchor(e.row,e.column),this.markerId=c.addMarker(new d(e.row,e.column,e.row,e.column+this.length),this.mainClass,null,!1),this.pos.on("change",function(b){c.removeMarker(a.markerId),a.markerId=c.addMarker(new d(b.value.row,b.value.column,b.value.row,b.value.column+a.length),a.mainClass,null,!1)}),this.others=[],this.$others.forEach(function(c){var d=b.createAnchor(c.row,c.column);a.others.push(d)}),c.setUndoSelect(!1)},this.showOtherMarkers=function(){if(!this.othersActive){var a=this.session,b=this;this.othersActive=!0,this.others.forEach(function(c){c.markerId=a.addMarker(new d(c.row,c.column,c.row,c.column+b.length),b.othersClass,null,!1),c.on("change",function(e){a.removeMarker(c.markerId),c.markerId=a.addMarker(new d(e.value.row,e.value.column,e.value.row,e.value.column+b.length),b.othersClass,null,!1)})})}},this.hideOtherMarkers=function(){if(this.othersActive){this.othersActive=!1;for(var a=0;a=this.pos.column&&c.start.column<=this.pos.column+this.length+1){var f=c.start.column-this.pos.column;if(this.length+=e,!this.session.$fromUndo){if("insertText"===b.action)for(var g=this.others.length-1;g>=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column=0;g--){var h=this.others[g],i={row:h.row,column:h.column+f};h.row===c.start.row&&c.start.column=this.pos.column&&b.column<=this.pos.column+this.length?(this.showOtherMarkers(),this._emit("cursorEnter",a)):(this.hideOtherMarkers(),this._emit("cursorLeave",a))}},this.detach=function(){this.session.removeMarker(this.markerId),this.hideOtherMarkers(),this.doc.removeEventListener("change",this.$onUpdate),this.session.selection.removeEventListener("changeCursor",this.$onCursorChange),this.pos.detach();for(var a=0;ac;c++)a.undo(!0);this.selectionBefore&&this.session.selection.fromJSON(this.selectionBefore)}}).call(g.prototype),b.PlaceHolder=g}),ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"],function(a,b,c){function d(a,b){return a.row==b.row&&a.column==b.column}function e(a){var b=a.domEvent,c=b.altKey,e=b.shiftKey,h=b.ctrlKey,i=a.getAccelKey(),j=a.getButton();if(h&&g.isMac&&(j=b.button),a.editor.inMultiSelectMode&&2==j)return void a.editor.textInput.onContextMenu(a.domEvent);if(!h&&!c&&!i)return void(0===j&&a.editor.inMultiSelectMode&&a.editor.exitMultiSelectMode());if(0===j){var k,l=a.editor,m=l.selection,n=l.inMultiSelectMode,o=a.getDocumentPosition(),p=m.getCursor(),q=a.inSelection()||m.isEmpty()&&d(o,p),r=a.x,s=a.y,t=function(a){r=a.clientX,s=a.clientY},u=l.session,v=l.renderer.pixelToScreenCoordinates(r,s),w=v;if(l.$mouseHandler.$enableJumpToDef)h&&c||i&&c?k="add":c&&(k="block");else if(i&&!c){if(k="add",!n&&e)return}else c&&(k="block");if(k&&g.isMac&&b.ctrlKey&&l.$mouseHandler.cancelContextMenu(),"add"==k){if(!n&&q)return;if(!n){var x=m.toOrientedRange();l.addSelectionMarker(x)}var y=m.rangeList.rangeAtPoint(o);l.$blockScrolling++,l.inVirtualSelectionMode=!0,e&&(y=null,x=m.ranges[0],l.removeSelectionMarker(x)),l.once("mouseup",function(){var a=m.toOrientedRange();y&&a.isEmpty()&&d(y.cursor,a.cursor)?m.substractPoint(a.cursor):(e?m.substractPoint(x.cursor):x&&(l.removeSelectionMarker(x),m.addRange(x)),m.addRange(a)),l.$blockScrolling--,l.inVirtualSelectionMode=!1})}else if("block"==k){a.stop(),l.inVirtualSelectionMode=!0;var z,A=[],B=function(){var a=l.renderer.pixelToScreenCoordinates(r,s),b=u.screenToDocumentPosition(a.row,a.column);d(w,a)&&d(b,m.lead)||(w=a,l.selection.moveToPosition(b),l.renderer.scrollCursorIntoView(),l.removeSelectionMarkers(A),A=m.rectangularRangeBlock(w,v),l.$mouseHandler.$clickSelection&&1==A.length&&A[0].isEmpty()&&(A[0]=l.$mouseHandler.$clickSelection.clone()),A.forEach(l.addSelectionMarker,l),l.updateSelectionMarkers())};n&&!i?m.toSingleRange():!n&&i&&(z=m.toOrientedRange(),l.addSelectionMarker(z)),e?v=u.documentToScreenPosition(m.lead):m.moveToPosition(o),w={row:-1,column:-1};var C=function(a){clearInterval(E),l.removeSelectionMarkers(A),A.length||(A=[m.toOrientedRange()]),l.$blockScrolling++,z&&(l.removeSelectionMarker(z),m.toSingleRange(z));for(var b=0;b1&&!this.inMultiSelectMode&&(this._signal("multiSelect"),this.inMultiSelectMode=!0,this.session.$undoSelect=!1,this.rangeList.attach(this.session)),b||this.fromOrientedRange(a)}},this.toSingleRange=function(a){a=a||this.ranges[0];var b=this.rangeList.removeAll();b.length&&this.$onRemoveRange(b),a&&this.fromOrientedRange(a)},this.substractPoint=function(a){var b=this.rangeList.substractPoint(a);return b?(this.$onRemoveRange(b),b[0]):void 0},this.mergeOverlappingRanges=function(){var a=this.rangeList.merge();a.length?this.$onRemoveRange(a):this.ranges[0]&&this.fromOrientedRange(this.ranges[0])},this.$onAddRange=function(a){this.rangeCount=this.rangeList.ranges.length,this.ranges.unshift(a),this._signal("addRange",{range:a})},this.$onRemoveRange=function(a){if(this.rangeCount=this.rangeList.ranges.length,1==this.rangeCount&&this.inMultiSelectMode){var b=this.rangeList.ranges.pop();a.push(b),this.rangeCount=0}for(var c=a.length;c--;){var d=this.ranges.indexOf(a[c]);this.ranges.splice(d,1)}this._signal("removeRange",{ranges:a}),0===this.rangeCount&&this.inMultiSelectMode&&(this.inMultiSelectMode=!1,this._signal("singleSelect"),this.session.$undoSelect=!0,this.rangeList.detach(this.session)),b=b||this.ranges[0],b&&!b.isEqual(this.getRange())&&this.fromOrientedRange(b)}, +this.$initRangeList=function(){this.rangeList||(this.rangeList=new h,this.ranges=[],this.rangeCount=0)},this.getAllRanges=function(){return this.rangeCount?this.rangeList.ranges.concat():[this.getRange()]},this.splitIntoLines=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=i.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var c=this.getRange(),d=this.isBackwards(),e=c.start.row,f=c.end.row;if(e==f){if(d)var g=c.end,h=c.start;else var g=c.start,h=c.end;return this.addRange(i.fromPoints(h,h)),void this.addRange(i.fromPoints(g,g))}var j=[],k=this.getLineRange(e,!0);k.start.column=c.start.column,j.push(k);for(var l=e+1;f>l;l++)j.push(this.getLineRange(l,!0));k=this.getLineRange(f,!0),k.end.column=c.end.column,j.push(k),j.forEach(this.addRange,this)}},this.toggleBlockSelection=function(){if(this.rangeCount>1){var a=this.rangeList.ranges,b=a[a.length-1],c=i.fromPoints(a[0].start,b.end);this.toSingleRange(),this.setSelectionRange(c,b.cursor==b.start)}else{var d=this.session.documentToScreenPosition(this.selectionLead),e=this.session.documentToScreenPosition(this.selectionAnchor),f=this.rectangularRangeBlock(d,e);f.forEach(this.addRange,this)}},this.rectangularRangeBlock=function(a,b,c){var d=[],f=a.columng&&(g=0),0>k&&(k=0),k==l&&(c=!0);for(var m=k;l>=m;m++){var n=i.fromPoints(this.session.screenToDocumentPosition(m,g),this.session.screenToDocumentPosition(m,h));if(n.isEmpty()){if(o&&e(n.end,o))break;var o=n.end}n.cursor=f?n.start:n.end,d.push(n)}if(j&&d.reverse(),!c){for(var p=d.length-1;d[p].isEmpty()&&p>0;)p--;if(p>0)for(var q=0;d[q].isEmpty();)q++;for(var r=p;r>=q;r--)d[r].isEmpty()&&d.splice(r,1)}return d}}.call(j.prototype);var r=a("./editor").Editor;(function(){this.updateSelectionMarkers=function(){this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.addSelectionMarker=function(a){a.cursor||(a.cursor=a.end);var b=this.getSelectionStyle();return a.marker=this.session.addMarker(a,"ace_selection",b),this.session.$selectionMarkers.push(a),this.session.selectionMarkerCount=this.session.$selectionMarkers.length,a},this.removeSelectionMarker=function(a){if(a.marker){this.session.removeMarker(a.marker);var b=this.session.$selectionMarkers.indexOf(a);-1!=b&&this.session.$selectionMarkers.splice(b,1),this.session.selectionMarkerCount=this.session.$selectionMarkers.length}},this.removeSelectionMarkers=function(a){for(var b=this.session.$selectionMarkers,c=a.length;c--;){var d=a[c];if(d.marker){this.session.removeMarker(d.marker);var e=b.indexOf(d);-1!=e&&b.splice(e,1)}}this.session.selectionMarkerCount=b.length},this.$onAddRange=function(a){this.addSelectionMarker(a.range),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onRemoveRange=function(a){this.removeSelectionMarkers(a.ranges),this.renderer.updateCursor(),this.renderer.updateBackMarkers()},this.$onMultiSelect=function(a){this.inMultiSelectMode||(this.inMultiSelectMode=!0,this.setStyle("ace_multiselect"),this.keyBinding.addKeyboardHandler(n.keyboardHandler),this.commands.setDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers())},this.$onSingleSelect=function(a){this.session.multiSelect.inVirtualMode||(this.inMultiSelectMode=!1,this.unsetStyle("ace_multiselect"),this.keyBinding.removeKeyboardHandler(n.keyboardHandler),this.commands.removeDefaultHandler("exec",this.$onMultiSelectExec),this.renderer.updateCursor(),this.renderer.updateBackMarkers(),this._emit("changeSelection"))},this.$onMultiSelectExec=function(a){var b=a.command,c=a.editor;if(c.multiSelect){if(b.multiSelectAction)"forEach"==b.multiSelectAction?d=c.forEachSelection(b,a.args):"forEachLine"==b.multiSelectAction?d=c.forEachSelection(b,a.args,!0):"single"==b.multiSelectAction?(c.exitMultiSelectMode(),d=b.exec(c,a.args||{})):d=b.multiSelectAction(c,a.args||{});else{var d=b.exec(c,a.args||{});c.multiSelect.addRange(c.multiSelect.toOrientedRange()),c.multiSelect.mergeOverlappingRanges()}return d}},this.forEachSelection=function(a,b,c){if(!this.inVirtualSelectionMode){var d,e=c&&c.keepOrder,f=1==c||c&&c.$byLines,g=this.session,h=this.selection,i=h.rangeList,k=(e?h:i).ranges;if(!k.length)return a.exec?a.exec(this,b||{}):a(this,b||{});var l=h._eventRegistry;h._eventRegistry={};var m=new j(g);this.inVirtualSelectionMode=!0;for(var n=k.length;n--;){if(f)for(;n>0&&k[n].start.row==k[n-1].end.row;)n--;m.fromOrientedRange(k[n]),m.index=n,this.selection=g.selection=m;var o=a.exec?a.exec(this,b||{}):a(this,b||{});d||void 0===o||(d=o),m.toOrientedRange(k[n])}m.detach(),this.selection=g.selection=h,this.inVirtualSelectionMode=!1,h._eventRegistry=l,h.mergeOverlappingRanges();var p=this.renderer.$scrollAnimation;return this.onCursorChange(),this.onSelectionChange(),p&&p.from==p.to&&this.renderer.animateScrolling(p.from),d}},this.exitMultiSelectMode=function(){this.inMultiSelectMode&&!this.inVirtualSelectionMode&&this.multiSelect.toSingleRange()},this.getSelectedText=function(){var a="";if(this.inMultiSelectMode&&!this.inVirtualSelectionMode){for(var b=this.multiSelect.rangeList.ranges,c=[],d=0;dd.length||c.length<2||!c[1])return this.commands.exec("insertstring",this,a);for(var e=d.length;e--;){var f=d[e];f.isEmpty()||this.session.remove(f),this.session.insert(f.start,c[e])}}},this.findAll=function(a,b,c){if(b=b||{},b.needle=a||b.needle,void 0==b.needle){var d=this.selection.isEmpty()?this.selection.getWordRange():this.selection.getRange();b.needle=this.session.getTextRange(d)}this.$search.set(b);var e=this.$search.findAll(this.session);if(!e.length)return 0;this.$blockScrolling+=1;var f=this.multiSelect;c||f.toSingleRange(e[0]);for(var g=e.length;g--;)f.addRange(e[g],!0);return d&&f.rangeList.rangeAtPoint(d.start)&&f.addRange(d,!0),this.$blockScrolling-=1,e.length},this.selectMoreLines=function(a,b){var c=this.selection.toOrientedRange(),d=c.cursor==c.end,e=this.session.documentToScreenPosition(c.cursor);this.selection.$desiredColumn&&(e.column=this.selection.$desiredColumn);var f=this.session.screenToDocumentPosition(e.row+a,e.column);if(c.isEmpty())var g=f;else var h=this.session.documentToScreenPosition(d?c.end:c.start),g=this.session.screenToDocumentPosition(h.row+a,h.column);if(d){var j=i.fromPoints(f,g);j.cursor=j.start}else{var j=i.fromPoints(g,f);j.cursor=j.end}if(j.desiredColumn=e.column,this.selection.inMultiSelectMode){if(b)var k=c.cursor}else this.selection.addRange(c);this.selection.addRange(j),k&&this.selection.substractPoint(k)},this.transposeSelections=function(a){for(var b=this.session,c=b.multiSelect,d=c.ranges,e=d.length;e--;){var f=d[e];if(f.isEmpty()){var g=b.getWordRange(f.start.row,f.start.column);f.start.row=g.start.row,f.start.column=g.start.column,f.end.row=g.end.row,f.end.column=g.end.column}}c.mergeOverlappingRanges();for(var h=[],e=d.length;e--;){var f=d[e];h.unshift(b.getTextRange(f))}0>a?h.unshift(h.pop()):h.push(h.shift());for(var e=d.length;e--;){var f=d[e],g=f.clone();b.replace(f,h[e]),f.start.row=g.start.row,f.start.column=g.start.column}},this.selectMore=function(a,b,c){var e=this.session,f=e.multiSelect,g=f.toOrientedRange();if(!g.isEmpty()||(g=e.getWordRange(g.start.row,g.start.column),g.cursor=-1==a?g.start:g.end,this.multiSelect.addRange(g),!c)){var h=e.getTextRange(g),i=d(e,h,a);i&&(i.cursor=-1==a?i.start:i.end,this.$blockScrolling+=1,this.session.unfold(i),this.multiSelect.addRange(i),this.$blockScrolling-=1,this.renderer.scrollCursorIntoView(null,.5)),b&&this.multiSelect.substractPoint(g.cursor)}},this.alignCursors=function(){var a=this.session,b=a.multiSelect,c=b.ranges,d=-1,e=c.filter(function(a){return a.cursor.row==d?!0:void(d=a.cursor.row)});if(c.length&&e.length!=c.length-1){e.forEach(function(a){b.substractPoint(a.cursor)});var f=0,g=1/0,h=c.map(function(b){var c=b.cursor,d=a.getLine(c.row),e=d.substr(c.column).search(/\S/g);return-1==e&&(e=0),c.column>f&&(f=c.column),g>e&&(g=e),e});c.forEach(function(b,c){var d=b.cursor,e=f-d.column,j=h[c]-g;e>j?a.insert(d,m.stringRepeat(" ",e-j)):a.remove(new i(d.row,d.column,d.row,d.column-e+j)),b.start.column=b.end.column=f,b.start.row=b.end.row=d.row,b.cursor=b.end}),b.fromOrientedRange(c[0]),this.renderer.updateCursor(),this.renderer.updateBackMarkers()}else{var j=this.selection.getRange(),k=j.start.row,l=j.end.row,n=k==l;if(n){var o,p=this.session.getLength();do o=this.session.getLine(l);while(/[=:]/.test(o)&&++l0);0>k&&(k=0),l>=p&&(l=p-1)}var q=this.session.doc.removeLines(k,l);q=this.$reAlignText(q,n),this.session.doc.insert({row:k,column:0},q.join("\n")+"\n"),n||(j.start.column=0,j.end.column=q[q.length-1].length),this.selection.setRange(j)}},this.$reAlignText=function(a,b){function c(a){return m.stringRepeat(" ",a)}function d(a){return a[2]?c(g)+a[2]+c(h-a[2].length+i)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function e(a){return a[2]?c(g+h-a[2].length)+a[2]+c(i," ")+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}function f(a){return a[2]?c(g)+a[2]+c(i)+a[4].replace(/^([=:])\s+/,"$1 "):a[0]}var g,h,i,j=!0,k=!0;return a.map(function(a){var b=a.match(/(\s*)(.*?)(\s*)([=:].*)/);return b?null==g?(g=b[1].length,h=b[2].length,i=b[3].length,b):(g+h+i!=b[1].length+b[2].length+b[3].length&&(k=!1),g!=b[1].length&&(j=!1),g>b[1].length&&(g=b[1].length),hb[3].length&&(i=b[3].length),b):[a]}).map(b?d:j?k?e:d:f)}}).call(r.prototype),b.onSessionChange=function(a){var b=a.session;b&&!b.multiSelect&&(b.$selectionMarkers=[],b.selection.$initRangeList(),b.multiSelect=b.selection),this.multiSelect=b&&b.multiSelect;var c=a.oldSession;c&&(c.multiSelect.off("addRange",this.$onAddRange),c.multiSelect.off("removeRange",this.$onRemoveRange),c.multiSelect.off("multiSelect",this.$onMultiSelect),c.multiSelect.off("singleSelect",this.$onSingleSelect),c.multiSelect.lead.off("change",this.$checkMultiselectChange),c.multiSelect.anchor.off("change",this.$checkMultiselectChange)),b&&(b.multiSelect.on("addRange",this.$onAddRange),b.multiSelect.on("removeRange",this.$onRemoveRange),b.multiSelect.on("multiSelect",this.$onMultiSelect),b.multiSelect.on("singleSelect",this.$onSingleSelect),b.multiSelect.lead.on("change",this.$checkMultiselectChange),b.multiSelect.anchor.on("change",this.$checkMultiselectChange)),b&&this.inMultiSelectMode!=b.selection.inMultiSelectMode&&(b.selection.inMultiSelectMode?this.$onMultiSelect():this.$onSingleSelect())},b.MultiSelect=f,a("./config").defineOptions(r.prototype,"editor",{enableMultiselect:{set:function(a){f(this),a?(this.on("changeSession",this.$multiselectOnSessionChange),this.on("mousedown",k)):(this.off("changeSession",this.$multiselectOnSessionChange),this.off("mousedown",k))},value:!0}})}),ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../../range").Range,e=b.FoldMode=function(){};(function(){this.foldingStartMarker=null,this.foldingStopMarker=null,this.getFoldWidget=function(a,b,c){var d=a.getLine(c);return this.foldingStartMarker.test(d)?"start":"markbeginend"==b&&this.foldingStopMarker&&this.foldingStopMarker.test(d)?"end":""},this.getFoldWidgetRange=function(a,b,c){return null},this.indentationBlock=function(a,b,c){var e=/\S/,f=a.getLine(b),g=f.search(e);if(-1!=g){for(var h=c||f.length,i=a.getLength(),j=b,k=b;++b=l)break;k=b}}if(k>j){var m=a.getLine(k).length;return new d(j,h,k,m)}}},this.openingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e+1},h=a.$findClosingBracket(b,g,f);if(h){var i=a.foldWidgets[h.row];return null==i&&(i=a.getFoldWidget(h.row)),"start"==i&&h.row>g.row&&(h.row--,h.column=a.getLine(h.row).length),d.fromPoints(g,h)}},this.closingBracketBlock=function(a,b,c,e,f){var g={row:c,column:e},h=a.$findOpeningBracket(b,g);return h?(h.column++,g.column--,d.fromPoints(h,g)):void 0}}).call(e.prototype)}),ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"],function(a,b,c){"use strict";b.isDark=!1,b.cssClass="ace-tm",b.cssText='.ace-tm .ace_gutter { background: #f0f0f0; color: #333; } .ace-tm .ace_print-margin { width: 1px; background: #e8e8e8; } .ace-tm .ace_fold { background-color: #6B72E6; } .ace-tm { background-color: #FFFFFF; color: black; } .ace-tm .ace_cursor { color: black; } .ace-tm .ace_invisible { color: rgb(191, 191, 191); } .ace-tm .ace_storage, .ace-tm .ace_keyword { color: blue; } .ace-tm .ace_constant { color: rgb(197, 6, 11); } .ace-tm .ace_constant.ace_buildin { color: rgb(88, 72, 246); } .ace-tm .ace_constant.ace_language { color: rgb(88, 92, 246); } .ace-tm .ace_constant.ace_library { color: rgb(6, 150, 14); } .ace-tm .ace_invalid { background-color: rgba(255, 0, 0, 0.1); color: red; } .ace-tm .ace_support.ace_function { color: rgb(60, 76, 114); } .ace-tm .ace_support.ace_constant { color: rgb(6, 150, 14); } .ace-tm .ace_support.ace_type, .ace-tm .ace_support.ace_class { color: rgb(109, 121, 222); } .ace-tm .ace_keyword.ace_operator { color: rgb(104, 118, 135); } .ace-tm .ace_string { color: rgb(3, 106, 7); } .ace-tm .ace_comment { color: rgb(76, 136, 107); } .ace-tm .ace_comment.ace_doc { color: rgb(0, 102, 255); } .ace-tm .ace_comment.ace_doc.ace_tag { color: rgb(128, 159, 191); } .ace-tm .ace_constant.ace_numeric { color: rgb(0, 0, 205); } .ace-tm .ace_variable { color: rgb(49, 132, 149); } .ace-tm .ace_xml-pe { color: rgb(104, 104, 91); } .ace-tm .ace_entity.ace_name.ace_function { color: #0000A2; } .ace-tm .ace_heading { color: rgb(12, 7, 255); } .ace-tm .ace_list { color:rgb(185, 6, 144); } .ace-tm .ace_meta.ace_tag { color:rgb(0, 22, 142); } .ace-tm .ace_string.ace_regex { color: rgb(255, 0, 0) } .ace-tm .ace_marker-layer .ace_selection { background: rgb(181, 213, 255); } .ace-tm.ace_multiselect .ace_selection.ace_start { box-shadow: 0 0 3px 0px white; border-radius: 2px; } .ace-tm .ace_marker-layer .ace_step { background: rgb(252, 255, 0); } .ace-tm .ace_marker-layer .ace_stack { background: rgb(164, 229, 101); } .ace-tm .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid rgb(192, 192, 192); } .ace-tm .ace_marker-layer .ace_active-line { background: rgba(0, 0, 0, 0.07); } .ace-tm .ace_gutter-active-line { background-color : #dcdcdc; } .ace-tm .ace_marker-layer .ace_selected-word { background: rgb(250, 250, 255); border: 1px solid rgb(200, 200, 250); } .ace-tm .ace_indent-guide { background: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==") right repeat-y; } ';var d=a("../lib/dom");d.importCssString(b.cssText,b.cssClass)}),ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"],function(a,b,c){"use strict";function d(a){this.session=a,this.session.widgetManager=this,this.session.getRowLength=this.getRowLength,this.session.$getWidgetScreenLength=this.$getWidgetScreenLength,this.updateOnChange=this.updateOnChange.bind(this),this.renderWidgets=this.renderWidgets.bind(this),this.measureWidgets=this.measureWidgets.bind(this),this.session._changedWidgets=[],this.$onChangeEditor=this.$onChangeEditor.bind(this),this.session.on("change",this.updateOnChange),this.session.on("changeEditor",this.$onChangeEditor)}var e=(a("./lib/oop"),a("./lib/dom"));a("./range").Range,function(){this.getRowLength=function(a){var b;return b=this.lineWidgets?this.lineWidgets[a]&&this.lineWidgets[a].rowCount||0:0,this.$useWrapMode&&this.$wrapData[a]?this.$wrapData[a].length+1+b:1+b},this.$getWidgetScreenLength=function(){var a=0;return this.lineWidgets.forEach(function(b){b&&b.rowCount&&(a+=b.rowCount)}),a},this.$onChangeEditor=function(a){this.attach(a.editor)},this.attach=function(a){a&&a.widgetManager&&a.widgetManager!=this&&a.widgetManager.detach(),this.editor!=a&&(this.detach(),this.editor=a,a&&(a.widgetManager=this,a.renderer.on("beforeRender",this.measureWidgets),a.renderer.on("afterRender",this.renderWidgets)))},this.detach=function(a){var b=this.editor;if(b){this.editor=null,b.widgetManager=null,b.renderer.off("beforeRender",this.measureWidgets),b.renderer.off("afterRender",this.renderWidgets);var c=this.session.lineWidgets;c&&c.forEach(function(a){a&&a.el&&a.el.parentNode&&(a._inDocument=!1,a.el.parentNode.removeChild(a.el))})}},this.updateOnChange=function(a){var b=this.session.lineWidgets;if(b){var c=a.data,d=c.range,e=d.start.row,f=d.end.row-e;if(0===f);else if("removeText"==c.action||"removeLines"==c.action){var g=b.splice(e+1,f);g.forEach(function(a){a&&this.removeLineWidget(a)},this),this.$updateRows()}else{var h=new Array(f);h.unshift(e,0),b.splice.apply(b,h),this.$updateRows()}}},this.$updateRows=function(){var a=this.session.lineWidgets;if(a){var b=!0;a.forEach(function(a,c){a&&(b=!1,a.row=c)}),b&&(this.session.lineWidgets=null)}},this.addLineWidget=function(a){this.session.lineWidgets||(this.session.lineWidgets=new Array(this.session.getLength())),this.session.lineWidgets[a.row]=a;var b=this.editor.renderer;return a.html&&!a.el&&(a.el=e.createElement("div"),a.el.innerHTML=a.html),a.el&&(e.addCssClass(a.el,"ace_lineWidgetContainer"),a.el.style.position="absolute",a.el.style.zIndex=5,b.container.appendChild(a.el),a._inDocument=!0),a.coverGutter||(a.el.style.zIndex=3),a.pixelHeight||(a.pixelHeight=a.el.offsetHeight),null==a.rowCount&&(a.rowCount=a.pixelHeight/b.layerConfig.lineHeight),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows(),this.renderWidgets(null,b),a},this.removeLineWidget=function(a){if(a._inDocument=!1,a.el&&a.el.parentNode&&a.el.parentNode.removeChild(a.el),a.editor&&a.editor.destroy)try{a.editor.destroy()}catch(b){}this.session.lineWidgets&&(this.session.lineWidgets[a.row]=void 0),this.session._emit("changeFold",{data:{start:{row:a.row}}}),this.$updateRows()},this.onWidgetChanged=function(a){this.session._changedWidgets.push(a),this.editor&&this.editor.renderer.updateFull()},this.measureWidgets=function(a,b){var c=this.session._changedWidgets,d=b.layerConfig;if(c&&c.length){for(var e=1/0,f=0;fh&&(h=0)),g.rowCount!=h&&(g.rowCount=h,g.row0&&!d[e];)e--;this.firstRow=c.firstRow,this.lastRow=c.lastRow,b.$cursorLayer.config=c;for(var g=e;f>=g;g++){var h=d[g];if(h&&h.el){h._inDocument||(h._inDocument=!0,b.container.appendChild(h.el));var i=b.$cursorLayer.getPixelPosition({row:g,column:0},!0).top;h.coverLine||(i+=c.lineHeight*this.session.getRowLineCount(h.row)),h.el.style.top=i-c.offset+"px";var j=h.coverGutter?0:b.gutterWidth;h.fixedWidth||(j-=b.scrollLeft),h.el.style.left=j+"px",h.fixedWidth?h.el.style.right=b.scrollBar.getWidth()+"px":h.el.style.right=""}}}}}.call(d.prototype),b.LineWidgets=d}),ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"],function(a,b,c){"use strict";function d(a,b,c){for(var d=0,e=a.length-1;e>=d;){var f=d+e>>1,g=c(b,a[f]);if(g>0)d=f+1;else{if(!(0>g))return f;e=f-1}}return-(d+1)}function e(a,b,c){var e=a.getAnnotations().sort(h.comparePoints);if(e.length){var f=d(e,{row:b,column:-1},h.comparePoints);0>f&&(f=-f-1),f>=e.length-1?f=c>0?0:e.length-1:0===f&&0>c&&(f=e.length-1);var g=e[f];if(g&&c){if(g.row===b){do g=e[f+=c];while(g&&g.row===b);if(!g)return e.slice()}var i=[];b=g.row;do i[0>c?"unshift":"push"](g),g=e[f+=c];while(g&&g.row==b);return i.length&&i}}}var f=a("../line_widgets").LineWidgets,g=a("../lib/dom"),h=a("../range").Range;b.showErrorMarker=function(a,b){var c=a.session;c.widgetManager||(c.widgetManager=new f(c),c.widgetManager.attach(a));var d=a.getCursorPosition(),h=d.row,i=c.lineWidgets&&c.lineWidgets[h];i?i.destroy():h-=b;var j,k=e(c,h,b);if(k){var l=k[0];d.column=(l.pos&&"number"!=typeof l.column?l.pos.sc:l.column)||0,d.row=l.row,j=a.renderer.$gutterLayer.$annotations[d.row]}else{if(i)return;j={text:["Looks good!"],className:"ace_ok"}}a.session.unfold(d.row),a.selection.moveToPosition(d);var m={row:d.row,fixedWidth:!0,coverGutter:!0,el:g.createElement("div")},n=m.el.appendChild(g.createElement("div")),o=m.el.appendChild(g.createElement("div"));o.className="error_widget_arrow "+j.className;var p=a.renderer.$cursorLayer.getPixelPosition(d).left;o.style.left=p+a.renderer.gutterWidth-5+"px",m.el.className="error_widget_wrapper",n.className="error_widget "+j.className,n.innerHTML=j.text.join("
    "),n.appendChild(g.createElement("div"));var q=function(a,b,c){return 0!==b||"esc"!==c&&"return"!==c?void 0:(m.destroy(),{command:"null"})};m.destroy=function(){a.$mouseHandler.isMousePressed||(a.keyBinding.removeKeyboardHandler(q),c.widgetManager.removeLineWidget(m),a.off("changeSelection",m.destroy),a.off("changeSession",m.destroy),a.off("mouseup",m.destroy),a.off("change",m.destroy))},a.keyBinding.addKeyboardHandler(q),a.on("changeSelection",m.destroy),a.on("changeSession",m.destroy),a.on("mouseup",m.destroy),a.on("change",m.destroy),a.session.widgetManager.addLineWidget(m),m.el.onmousedown=a.focus.bind(a),a.renderer.scrollCursorIntoView(null,.5,{bottom:m.el.offsetHeight})},g.importCssString(" .error_widget_wrapper { background: inherit; color: inherit; border:none } .error_widget { border-top: solid 2px; border-bottom: solid 2px; margin: 5px 0; padding: 10px 40px; white-space: pre-wrap; } .error_widget.ace_error, .error_widget_arrow.ace_error{ border-color: #ff5a5a } .error_widget.ace_warning, .error_widget_arrow.ace_warning{ border-color: #F1D817 } .error_widget.ace_info, .error_widget_arrow.ace_info{ border-color: #5a5a5a } .error_widget.ace_ok, .error_widget_arrow.ace_ok{ border-color: #5aaa5a } .error_widget_arrow { position: absolute; border: solid 5px; border-top-color: transparent!important; border-right-color: transparent!important; border-left-color: transparent!important; top: -5px; } ","")}),ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"],function(a,b,c){"use strict";a("./lib/fixoldbrowsers");var d=a("./lib/dom"),e=a("./lib/event"),f=a("./editor").Editor,g=a("./edit_session").EditSession,h=a("./undomanager").UndoManager,i=a("./virtual_renderer").VirtualRenderer;a("./worker/worker_client"),a("./keyboard/hash_handler"),a("./placeholder"),a("./multi_select"),a("./mode/folding/fold_mode"),a("./theme/textmate"),a("./ext/error_marker"),b.config=a("./config"),b.acequire=a,b.edit=function(a){if("string"==typeof a){var c=a;if(a=document.getElementById(c),!a)throw new Error("ace.edit can't find div #"+c)}if(a&&a.env&&a.env.editor instanceof f)return a.env.editor;var g="";if(a&&/input|textarea/i.test(a.tagName)){var h=a;g=h.value,a=d.createElement("pre"),h.parentNode.replaceChild(a,h)}else g=d.getInnerText(a),a.innerHTML="";var j=b.createEditSession(g),k=new f(new i(a));k.setSession(j);var l={document:j,editor:k,onResize:k.resize.bind(k,null)};return h&&(l.textarea=h),e.addListener(window,"resize",l.onResize),k.on("destroy",function(){e.removeListener(window,"resize",l.onResize),l.editor.container.env=null}),k.container.env=k.env=l,k},b.createEditSession=function(a,b){var c=new g(a,b);return c.setUndoManager(new h),c},b.EditSession=g,b.UndoManager=h}),function(){ace.acequire(["ace/ace"],function(a){a&&a.config.init(!0),window.ace||(window.ace=a);for(var b in a)a.hasOwnProperty(b)&&(window.ace[b]=a[b])})}(),a.exports=window.ace.acequire("ace/ace")},function(a,b,c){ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],function(a,b,c){"use strict";var d=a("../lib/oop"),e=a("./text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"variable",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)'},{token:"string",regex:'"',next:"string"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"paren.lparen",regex:"[[({]"},{token:"paren.rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],string:[{token:"constant.language.escape",regex:/\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/},{token:"string",regex:'[^"\\\\]+'},{token:"string",regex:'"',next:"start"},{token:"string",regex:"",next:"start"}]}};d.inherits(f,e),b.JsonHighlightRules=f}),ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){"use strict";var d=a("../range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){return a.match(/^\s*/)[0]}}).call(e.prototype),b.MatchingBraceOutdent=e}),ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"],function(a,b,c){"use strict";var d,e=a("../../lib/oop"),f=a("../behaviour").Behaviour,g=a("../../token_iterator").TokenIterator,h=a("../../lib/lang"),i=["text","paren.rparen","punctuation.operator"],j=["text","paren.rparen","punctuation.operator","comment"],k={},l=function(a){var b=-1;return a.multiSelect&&(b=a.selection.index,k.rangeCount!=a.multiSelect.rangeCount&&(k={rangeCount:a.multiSelect.rangeCount})),k[b]?d=k[b]:void(d=k[b]={autoInsertedBrackets:0,autoInsertedRow:-1,autoInsertedLineEnd:"",maybeInsertedBrackets:0,maybeInsertedRow:-1,maybeInsertedLineStart:"",maybeInsertedLineEnd:""})},m=function(){this.add("braces","insertion",function(a,b,c,e,f){var g=c.getCursorPosition(),i=e.doc.getLine(g.row);if("{"==f){l(c);var j=c.getSelectionRange(),k=e.doc.getTextRange(j);if(""!==k&&"{"!==k&&c.getWrapBehavioursEnabled())return{text:"{"+k+"}",selection:!1};if(m.isSaneInsertion(c,e))return/[\]\}\)]/.test(i[g.column])||c.inMultiSelectMode?(m.recordAutoInsert(c,e,"}"),{text:"{}",selection:[1,1]}):(m.recordMaybeInsert(c,e,"{"),{text:"{",selection:[1,1]})}else if("}"==f){l(c);var n=i.substring(g.column,g.column+1);if("}"==n){var o=e.$findOpeningBracket("}",{column:g.column+1,row:g.row});if(null!==o&&m.isAutoInsertedClosing(g,i,f))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}else{if("\n"==f||"\r\n"==f){l(c);var p="";m.isMaybeInsertedClosing(g,i)&&(p=h.stringRepeat("}",d.maybeInsertedBrackets),m.clearMaybeInsertedClosing());var n=i.substring(g.column,g.column+1);if("}"===n){var q=e.findMatchingBracket({row:g.row,column:g.column+1},"}");if(!q)return null;var r=this.$getIndent(e.getLine(q.row))}else{if(!p)return void m.clearMaybeInsertedClosing();var r=this.$getIndent(i)}var s=r+e.getTabString();return{text:"\n"+s+"\n"+r+p,selection:[1,s.length,1,s.length]}}m.clearMaybeInsertedClosing()}}),this.add("braces","deletion",function(a,b,c,e,f){var g=e.doc.getTextRange(f);if(!f.isMultiLine()&&"{"==g){l(c);var h=e.doc.getLine(f.start.row),i=h.substring(f.end.column,f.end.column+1);if("}"==i)return f.end.column++,f;d.maybeInsertedBrackets--}}),this.add("parens","insertion",function(a,b,c,d,e){if("("==e){l(c);var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(""!==g&&c.getWrapBehavioursEnabled())return{text:"("+g+")",selection:!1};if(m.isSaneInsertion(c,d))return m.recordAutoInsert(c,d,")"),{text:"()",selection:[1,1]}}else if(")"==e){l(c);var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(")"==j){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(null!==k&&m.isAutoInsertedClosing(h,i,e))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&"("==f){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(")"==h)return e.end.column++,e}}),this.add("brackets","insertion",function(a,b,c,d,e){if("["==e){l(c);var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(""!==g&&c.getWrapBehavioursEnabled())return{text:"["+g+"]",selection:!1};if(m.isSaneInsertion(c,d))return m.recordAutoInsert(c,d,"]"),{text:"[]",selection:[1,1]}}else if("]"==e){l(c);var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if("]"==j){var k=d.$findOpeningBracket("]",{column:h.column+1,row:h.row});if(null!==k&&m.isAutoInsertedClosing(h,i,e))return m.popAutoInsertedClosing(),{text:"",selection:[1,1]}}}}),this.add("brackets","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&"["==f){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if("]"==h)return e.end.column++,e}}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if('"'==e||"'"==e){l(c);var f=e,g=c.getSelectionRange(),h=d.doc.getTextRange(g);if(""!==h&&"'"!==h&&'"'!=h&&c.getWrapBehavioursEnabled())return{text:f+h+f,selection:!1};var i=c.getCursorPosition(),j=d.doc.getLine(i.row),k=j.substring(i.column-1,i.column);if("\\"==k)return null;for(var n,o=d.getTokens(g.start.row),p=0,q=-1,r=0;rq&&(q=n.value.indexOf(f)),!(n.value.length+p>g.start.column));r++)p+=o[r].value.length;if(!n||0>q&&"comment"!==n.type&&("string"!==n.type||g.start.column!==n.value.length+p-1&&n.value.lastIndexOf(f)===n.value.length-1)){if(!m.isSaneInsertion(c,d))return;return{text:f+f,selection:[1,1]}}if(n&&"string"===n.type){var s=j.substring(i.column,i.column+1);if(s==f)return{text:"",selection:[1,1]}}}}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&('"'==f||"'"==f)){l(c);var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==f)return e.end.column++,e}})};m.isSaneInsertion=function(a,b){var c=a.getCursorPosition(),d=new g(b,c.row,c.column);if(!this.$matchTokenType(d.getCurrentToken()||"text",i)){var e=new g(b,c.row,c.column+1); +if(!this.$matchTokenType(e.getCurrentToken()||"text",i))return!1}return d.stepForward(),d.getCurrentTokenRow()!==c.row||this.$matchTokenType(d.getCurrentToken()||"text",j)},m.$matchTokenType=function(a,b){return b.indexOf(a.type||a)>-1},m.recordAutoInsert=function(a,b,c){var e=a.getCursorPosition(),f=b.doc.getLine(e.row);this.isAutoInsertedClosing(e,f,d.autoInsertedLineEnd[0])||(d.autoInsertedBrackets=0),d.autoInsertedRow=e.row,d.autoInsertedLineEnd=c+f.substr(e.column),d.autoInsertedBrackets++},m.recordMaybeInsert=function(a,b,c){var e=a.getCursorPosition(),f=b.doc.getLine(e.row);this.isMaybeInsertedClosing(e,f)||(d.maybeInsertedBrackets=0),d.maybeInsertedRow=e.row,d.maybeInsertedLineStart=f.substr(0,e.column)+c,d.maybeInsertedLineEnd=f.substr(e.column),d.maybeInsertedBrackets++},m.isAutoInsertedClosing=function(a,b,c){return d.autoInsertedBrackets>0&&a.row===d.autoInsertedRow&&c===d.autoInsertedLineEnd[0]&&b.substr(a.column)===d.autoInsertedLineEnd},m.isMaybeInsertedClosing=function(a,b){return d.maybeInsertedBrackets>0&&a.row===d.maybeInsertedRow&&b.substr(a.column)===d.maybeInsertedLineEnd&&b.substr(0,a.column)==d.maybeInsertedLineStart},m.popAutoInsertedClosing=function(){d.autoInsertedLineEnd=d.autoInsertedLineEnd.substr(1),d.autoInsertedBrackets--},m.clearMaybeInsertedClosing=function(){d&&(d.maybeInsertedBrackets=0,d.maybeInsertedRow=-1)},e.inherits(m,f),b.CstyleBehaviour=m}),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],function(a,b,c){"use strict";var d=a("../../lib/oop"),e=a("../../range").Range,f=a("./fold_mode").FoldMode,g=b.FoldMode=function(a){a&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+a.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+a.end)))};d.inherits(g,f),function(){this.foldingStartMarker=/(\{|\[)[^\}\]]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/,this.getFoldWidgetRange=function(a,b,c,d){var e=a.getLine(c),f=e.match(this.foldingStartMarker);if(f){var g=f.index;if(f[1])return this.openingBracketBlock(a,f[1],c,g);var h=a.getCommentFoldRange(c,g+f[0].length,1);return h&&!h.isMultiLine()&&(d?h=this.getSectionRange(a,c):"all"!=b&&(h=null)),h}if("markbegin"!==b){var f=e.match(this.foldingStopMarker);if(f){var g=f.index+f[0].length;return f[1]?this.closingBracketBlock(a,f[1],c,g):a.getCommentFoldRange(c,g,-1)}}},this.getSectionRange=function(a,b){var c=a.getLine(b),d=c.search(/\S/),f=b,g=c.length;b+=1;for(var h=b,i=a.getLength();++bj)break;var k=this.getFoldWidgetRange(a,"all",b);if(k){if(k.start.row<=f)break;if(k.isMultiLine())b=k.end.row;else if(d==j)break}h=b}}return new e(f,g,h,a.getLine(h).length)}}.call(g.prototype)}),ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"],function(a,b,d){"use strict";var e=a("../lib/oop"),f=a("./text").Mode,g=a("./json_highlight_rules").JsonHighlightRules,h=a("./matching_brace_outdent").MatchingBraceOutdent,i=a("./behaviour/cstyle").CstyleBehaviour,j=a("./folding/cstyle").FoldMode,k=a("../worker/worker_client").WorkerClient,l=function(){this.HighlightRules=g,this.$outdent=new h,this.$behaviour=new i,this.foldingRules=new j};e.inherits(l,f),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b);if("start"==a){var e=b.match(/^.*[\{\(\[]\s*$/);e&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=new k(["ace"],c(17),"JsonWorker");return b.attachToDocument(a.getDocument()),b.on("error",function(b){a.setAnnotations([b.data])}),b.on("ok",function(){a.clearAnnotations()}),b},this.$id="ace/mode/json"}.call(l.prototype),b.Mode=l})},function(a,b,c){ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"],function(a,b,c){"use strict";var d=a("../lib/dom"),e=a("../lib/lang"),f=a("../lib/event"),g=" .ace_search { background-color: #ddd; border: 1px solid #cbcbcb; border-top: 0 none; max-width: 325px; overflow: hidden; margin: 0; padding: 4px; padding-right: 6px; padding-bottom: 0; position: absolute; top: 0px; z-index: 99; white-space: normal; } .ace_search.left { border-left: 0 none; border-radius: 0px 0px 5px 0px; left: 0; } .ace_search.right { border-radius: 0px 0px 0px 5px; border-right: 0 none; right: 0; } .ace_search_form, .ace_replace_form { border-radius: 3px; border: 1px solid #cbcbcb; float: left; margin-bottom: 4px; overflow: hidden; } .ace_search_form.ace_nomatch { outline: 1px solid red; } .ace_search_field { background-color: white; border-right: 1px solid #cbcbcb; border: 0 none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; float: left; height: 22px; outline: 0; padding: 0 7px; width: 214px; margin: 0; } .ace_searchbtn, .ace_replacebtn { background: #fff; border: 0 none; border-left: 1px solid #dcdcdc; cursor: pointer; float: left; height: 22px; margin: 0; padding: 0; position: relative; } .ace_searchbtn:last-child, .ace_replacebtn:last-child { border-top-right-radius: 3px; border-bottom-right-radius: 3px; } .ace_searchbtn:disabled { background: none; cursor: default; } .ace_searchbtn { background-position: 50% 50%; background-repeat: no-repeat; width: 27px; } .ace_searchbtn.prev { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); } .ace_searchbtn.next { background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); } .ace_searchbtn_close { background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0; border-radius: 50%; border: 0 none; color: #656565; cursor: pointer; float: right; font: 16px/16px Arial; height: 14px; margin: 5px 1px 9px 5px; padding: 0; text-align: center; width: 14px; } .ace_searchbtn_close:hover { background-color: #656565; background-position: 50% 100%; color: white; } .ace_replacebtn.prev { width: 54px } .ace_replacebtn.next { width: 27px } .ace_button { margin-left: 2px; cursor: pointer; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; overflow: hidden; opacity: 0.7; border: 1px solid rgba(100,100,100,0.23); padding: 1px; -moz-box-sizing: border-box; box-sizing: border-box; color: black; } .ace_button:hover { background-color: #eee; opacity:1; } .ace_button:active { background-color: #ddd; } .ace_button.checked { border-color: #3399ff; opacity:1; } .ace_search_options{ margin-bottom: 3px; text-align: right; -webkit-user-select: none; -moz-user-select: none; -o-user-select: none; -ms-user-select: none; user-select: none; }",h=a("../keyboard/hash_handler").HashHandler,i=a("../lib/keys");d.importCssString(g,"ace_searchbox");var j=''.replace(/>\s+/g,">"),k=function(a,b,c){var e=d.createElement("div");e.innerHTML=j,this.element=e.firstChild,this.$init(),this.setEditor(a)};(function(){this.setEditor=function(a){a.searchBox=this,a.container.appendChild(this.element),this.editor=a},this.$initElements=function(a){this.searchBox=a.querySelector(".ace_search_form"),this.replaceBox=a.querySelector(".ace_replace_form"),this.searchOptions=a.querySelector(".ace_search_options"),this.regExpOption=a.querySelector("[action=toggleRegexpMode]"),this.caseSensitiveOption=a.querySelector("[action=toggleCaseSensitive]"),this.wholeWordOption=a.querySelector("[action=toggleWholeWords]"),this.searchInput=this.searchBox.querySelector(".ace_search_field"),this.replaceInput=this.replaceBox.querySelector(".ace_search_field")},this.$init=function(){var a=this.element;this.$initElements(a);var b=this;f.addListener(a,"mousedown",function(a){setTimeout(function(){b.activeInput.focus()},0),f.stopPropagation(a)}),f.addListener(a,"click",function(a){var c=a.target||a.srcElement,d=c.getAttribute("action");d&&b[d]?b[d]():b.$searchBarKb.commands[d]&&b.$searchBarKb.commands[d].exec(b),f.stopPropagation(a)}),f.addCommandKeyListener(a,function(a,c,d){var e=i.keyCodeToString(d),g=b.$searchBarKb.findKeyCommand(c,e);g&&g.exec&&(g.exec(b),f.stopEvent(a))}),this.$onChange=e.delayedCall(function(){b.find(!1,!1)}),f.addListener(this.searchInput,"input",function(){b.$onChange.schedule(20)}),f.addListener(this.searchInput,"focus",function(){b.activeInput=b.searchInput,b.searchInput.value&&b.highlight()}),f.addListener(this.replaceInput,"focus",function(){b.activeInput=b.replaceInput,b.searchInput.value&&b.highlight()})},this.$closeSearchBarKb=new h([{bindKey:"Esc",name:"closeSearchBar",exec:function(a){a.searchBox.hide()}}]),this.$searchBarKb=new h,this.$searchBarKb.bindKeys({"Ctrl-f|Command-f|Ctrl-H|Command-Option-F":function(a){var b=a.isReplace=!a.isReplace;a.replaceBox.style.display=b?"":"none",a[b?"replaceInput":"searchInput"].focus()},"Ctrl-G|Command-G":function(a){a.findNext()},"Ctrl-Shift-G|Command-Shift-G":function(a){a.findPrev()},esc:function(a){setTimeout(function(){a.hide()})},Return:function(a){a.activeInput==a.replaceInput&&a.replace(),a.findNext()},"Shift-Return":function(a){a.activeInput==a.replaceInput&&a.replace(),a.findPrev()},"Alt-Return":function(a){a.activeInput==a.replaceInput&&a.replaceAll(),a.findAll()},Tab:function(a){(a.activeInput==a.replaceInput?a.searchInput:a.replaceInput).focus()}}),this.$searchBarKb.addCommands([{name:"toggleRegexpMode",bindKey:{win:"Alt-R|Alt-/",mac:"Ctrl-Alt-R|Ctrl-Alt-/"},exec:function(a){a.regExpOption.checked=!a.regExpOption.checked,a.$syncOptions()}},{name:"toggleCaseSensitive",bindKey:{win:"Alt-C|Alt-I",mac:"Ctrl-Alt-R|Ctrl-Alt-I"},exec:function(a){a.caseSensitiveOption.checked=!a.caseSensitiveOption.checked,a.$syncOptions()}},{name:"toggleWholeWords",bindKey:{win:"Alt-B|Alt-W",mac:"Ctrl-Alt-B|Ctrl-Alt-W"},exec:function(a){a.wholeWordOption.checked=!a.wholeWordOption.checked,a.$syncOptions()}}]),this.$syncOptions=function(){d.setCssClass(this.regExpOption,"checked",this.regExpOption.checked),d.setCssClass(this.wholeWordOption,"checked",this.wholeWordOption.checked),d.setCssClass(this.caseSensitiveOption,"checked",this.caseSensitiveOption.checked),this.find(!1,!1)},this.highlight=function(a){this.editor.session.highlight(a||this.editor.$search.$options.re),this.editor.renderer.updateBackMarkers()},this.find=function(a,b){var c=this.editor.find(this.searchInput.value,{skipCurrent:a,backwards:b,wrap:!0,regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),e=!c&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",e),this.editor._emit("findSearchBox",{match:!e}),this.highlight()},this.findNext=function(){this.find(!0,!1)},this.findPrev=function(){this.find(!0,!0)},this.findAll=function(){var a=this.editor.findAll(this.searchInput.value,{regExp:this.regExpOption.checked,caseSensitive:this.caseSensitiveOption.checked,wholeWord:this.wholeWordOption.checked}),b=!a&&this.searchInput.value;d.setCssClass(this.searchBox,"ace_nomatch",b),this.editor._emit("findSearchBox",{match:!b}),this.highlight(),this.hide()},this.replace=function(){this.editor.getReadOnly()||this.editor.replace(this.replaceInput.value)},this.replaceAndFindNext=function(){this.editor.getReadOnly()||(this.editor.replace(this.replaceInput.value),this.findNext())},this.replaceAll=function(){this.editor.getReadOnly()||this.editor.replaceAll(this.replaceInput.value)},this.hide=function(){this.element.style.display="none",this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb),this.editor.focus()},this.show=function(a,b){this.element.style.display="",this.replaceBox.style.display=b?"":"none",this.isReplace=b,a&&(this.searchInput.value=a),this.searchInput.focus(),this.searchInput.select(),this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb)},this.isFocused=function(){var a=document.activeElement;return a==this.searchInput||a==this.replaceInput}}).call(k.prototype),b.SearchBox=k,b.Search=function(a,b){var c=a.searchBox||new k(a);c.show(a.session.getTextRange(),b)}}),function(){ace.acequire(["ace/ext/searchbox"],function(){})}()},function(a,b,c){a.exports.id="ace/mode/json_worker",a.exports.src='"no use strict";(function(window){if(void 0===window.window||!window.document){window.console=function(){var msgs=Array.prototype.slice.call(arguments,0);postMessage({type:"log",data:msgs})},window.console.error=window.console.warn=window.console.log=window.console.trace=window.console,window.window=window,window.ace=window,window.onerror=function(message,file,line,col,err){postMessage({type:"error",data:{message:message,file:file,line:line,col:col,stack:err.stack}})},window.normalizeModule=function(parentId,moduleName){if(-1!==moduleName.indexOf("!")){var chunks=moduleName.split("!");return window.normalizeModule(parentId,chunks[0])+"!"+window.normalizeModule(parentId,chunks[1])}if("."==moduleName.charAt(0)){var base=parentId.split("/").slice(0,-1).join("/");for(moduleName=(base?base+"/":"")+moduleName;-1!==moduleName.indexOf(".")&&previous!=moduleName;){var previous=moduleName;moduleName=moduleName.replace(/^\\.\\//,"").replace(/\\/\\.\\//,"/").replace(/[^\\/]+\\/\\.\\.\\//,"")}}return moduleName},window.acequire=function(parentId,id){if(id||(id=parentId,parentId=null),!id.charAt)throw Error("worker.js acequire() accepts only (parentId, id) as arguments");id=window.normalizeModule(parentId,id);var module=window.acequire.modules[id];if(module)return module.initialized||(module.initialized=!0,module.exports=module.factory().exports),module.exports;var chunks=id.split("/");if(!window.acequire.tlns)return console.log("unable to load "+id);chunks[0]=window.acequire.tlns[chunks[0]]||chunks[0];var path=chunks.join("/")+".js";return window.acequire.id=id,importScripts(path),window.acequire(parentId,id)},window.acequire.modules={},window.acequire.tlns={},window.define=function(id,deps,factory){if(2==arguments.length?(factory=deps,"string"!=typeof id&&(deps=id,id=window.acequire.id)):1==arguments.length&&(factory=id,deps=[],id=window.acequire.id),"function"!=typeof factory)return window.acequire.modules[id]={exports:factory,initialized:!0},void 0;deps.length||(deps=["require","exports","module"]);var req=function(childId){return window.acequire(id,childId)};window.acequire.modules[id]={exports:{},factory:function(){var module=this,returnExports=factory.apply(this,deps.map(function(dep){switch(dep){case"require":return req;case"exports":return module.exports;case"module":return module;default:return req(dep)}}));return returnExports&&(module.exports=returnExports),module}}},window.define.amd={},window.initBaseUrls=function initBaseUrls(topLevelNamespaces){acequire.tlns=topLevelNamespaces},window.initSender=function initSender(){var EventEmitter=window.acequire("ace/lib/event_emitter").EventEmitter,oop=window.acequire("ace/lib/oop"),Sender=function(){};return function(){oop.implement(this,EventEmitter),this.callback=function(data,callbackId){postMessage({type:"call",id:callbackId,data:data})},this.emit=function(name,data){postMessage({type:"event",name:name,data:data})}}.call(Sender.prototype),new Sender};var main=window.main=null,sender=window.sender=null;window.onmessage=function(e){var msg=e.data;if(msg.command){if(!main[msg.command])throw Error("Unknown command:"+msg.command);main[msg.command].apply(main,msg.args)}else if(msg.init){initBaseUrls(msg.tlns),acequire("ace/lib/es5-shim"),sender=window.sender=initSender();var clazz=acequire(msg.module)[msg.classname];main=window.main=new clazz(sender)}else msg.event&&sender&&sender._signal(msg.event,msg.data)}}})(this),ace.define("ace/lib/oop",["require","exports","module"],function(acequire,exports){"use strict";exports.inherits=function(ctor,superCtor){ctor.super_=superCtor,ctor.prototype=Object.create(superCtor.prototype,{constructor:{value:ctor,enumerable:!1,writable:!0,configurable:!0}})},exports.mixin=function(obj,mixin){for(var key in mixin)obj[key]=mixin[key];return obj},exports.implement=function(proto,mixin){exports.mixin(proto,mixin)}}),ace.define("ace/lib/event_emitter",["require","exports","module"],function(acequire,exports){"use strict";var EventEmitter={},stopPropagation=function(){this.propagationStopped=!0},preventDefault=function(){this.defaultPrevented=!0};EventEmitter._emit=EventEmitter._dispatchEvent=function(eventName,e){this._eventRegistry||(this._eventRegistry={}),this._defaultHandlers||(this._defaultHandlers={});var listeners=this._eventRegistry[eventName]||[],defaultHandler=this._defaultHandlers[eventName];if(listeners.length||defaultHandler){"object"==typeof e&&e||(e={}),e.type||(e.type=eventName),e.stopPropagation||(e.stopPropagation=stopPropagation),e.preventDefault||(e.preventDefault=preventDefault),listeners=listeners.slice();for(var i=0;listeners.length>i&&(listeners[i](e,this),!e.propagationStopped);i++);return defaultHandler&&!e.defaultPrevented?defaultHandler(e,this):void 0}},EventEmitter._signal=function(eventName,e){var listeners=(this._eventRegistry||{})[eventName];if(listeners){listeners=listeners.slice();for(var i=0;listeners.length>i;i++)listeners[i](e,this)}},EventEmitter.once=function(eventName,callback){var _self=this;callback&&this.addEventListener(eventName,function newCallback(){_self.removeEventListener(eventName,newCallback),callback.apply(null,arguments)})},EventEmitter.setDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers||(handlers=this._defaultHandlers={_disabled_:{}}),handlers[eventName]){var old=handlers[eventName],disabled=handlers._disabled_[eventName];disabled||(handlers._disabled_[eventName]=disabled=[]),disabled.push(old);var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}handlers[eventName]=callback},EventEmitter.removeDefaultHandler=function(eventName,callback){var handlers=this._defaultHandlers;if(handlers){var disabled=handlers._disabled_[eventName];if(handlers[eventName]==callback)handlers[eventName],disabled&&this.setDefaultHandler(eventName,disabled.pop());else if(disabled){var i=disabled.indexOf(callback);-1!=i&&disabled.splice(i,1)}}},EventEmitter.on=EventEmitter.addEventListener=function(eventName,callback,capturing){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];return listeners||(listeners=this._eventRegistry[eventName]=[]),-1==listeners.indexOf(callback)&&listeners[capturing?"unshift":"push"](callback),callback},EventEmitter.off=EventEmitter.removeListener=EventEmitter.removeEventListener=function(eventName,callback){this._eventRegistry=this._eventRegistry||{};var listeners=this._eventRegistry[eventName];if(listeners){var index=listeners.indexOf(callback);-1!==index&&listeners.splice(index,1)}},EventEmitter.removeAllListeners=function(eventName){this._eventRegistry&&(this._eventRegistry[eventName]=[])},exports.EventEmitter=EventEmitter}),ace.define("ace/range",["require","exports","module"],function(acequire,exports){"use strict";var comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},Range=function(startRow,startColumn,endRow,endColumn){this.start={row:startRow,column:startColumn},this.end={row:endRow,column:endColumn}};(function(){this.isEqual=function(range){return this.start.row===range.start.row&&this.end.row===range.end.row&&this.start.column===range.start.column&&this.end.column===range.end.column},this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(row,column){return 0==this.compare(row,column)},this.compareRange=function(range){var cmp,end=range.end,start=range.start;return cmp=this.compare(end.row,end.column),1==cmp?(cmp=this.compare(start.row,start.column),1==cmp?2:0==cmp?1:0):-1==cmp?-2:(cmp=this.compare(start.row,start.column),-1==cmp?-1:1==cmp?42:0)},this.comparePoint=function(p){return this.compare(p.row,p.column)},this.containsRange=function(range){return 0==this.comparePoint(range.start)&&0==this.comparePoint(range.end)},this.intersects=function(range){var cmp=this.compareRange(range);return-1==cmp||0==cmp||1==cmp},this.isEnd=function(row,column){return this.end.row==row&&this.end.column==column},this.isStart=function(row,column){return this.start.row==row&&this.start.column==column},this.setStart=function(row,column){"object"==typeof row?(this.start.column=row.column,this.start.row=row.row):(this.start.row=row,this.start.column=column)},this.setEnd=function(row,column){"object"==typeof row?(this.end.column=row.column,this.end.row=row.row):(this.end.row=row,this.end.column=column)},this.inside=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)||this.isStart(row,column)?!1:!0:!1},this.insideStart=function(row,column){return 0==this.compare(row,column)?this.isEnd(row,column)?!1:!0:!1},this.insideEnd=function(row,column){return 0==this.compare(row,column)?this.isStart(row,column)?!1:!0:!1},this.compare=function(row,column){return this.isMultiLine()||row!==this.start.row?this.start.row>row?-1:row>this.end.row?1:this.start.row===row?column>=this.start.column?0:-1:this.end.row===row?this.end.column>=column?0:1:0:this.start.column>column?-1:column>this.end.column?1:0},this.compareStart=function(row,column){return this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.compareEnd=function(row,column){return this.end.row==row&&this.end.column==column?1:this.compare(row,column)},this.compareInside=function(row,column){return this.end.row==row&&this.end.column==column?1:this.start.row==row&&this.start.column==column?-1:this.compare(row,column)},this.clipRows=function(firstRow,lastRow){if(this.end.row>lastRow)var end={row:lastRow+1,column:0};else if(firstRow>this.end.row)var end={row:firstRow,column:0};if(this.start.row>lastRow)var start={row:lastRow+1,column:0};else if(firstRow>this.start.row)var start={row:firstRow,column:0};return Range.fromPoints(start||this.start,end||this.end)},this.extend=function(row,column){var cmp=this.compare(row,column);if(0==cmp)return this;if(-1==cmp)var start={row:row,column:column};else var end={row:row,column:column};return Range.fromPoints(start||this.start,end||this.end)},this.isEmpty=function(){return this.start.row===this.end.row&&this.start.column===this.end.column},this.isMultiLine=function(){return this.start.row!==this.end.row},this.clone=function(){return Range.fromPoints(this.start,this.end)},this.collapseRows=function(){return 0==this.end.column?new Range(this.start.row,0,Math.max(this.start.row,this.end.row-1),0):new Range(this.start.row,0,this.end.row,0)},this.toScreenRange=function(session){var screenPosStart=session.documentToScreenPosition(this.start),screenPosEnd=session.documentToScreenPosition(this.end);return new Range(screenPosStart.row,screenPosStart.column,screenPosEnd.row,screenPosEnd.column)},this.moveBy=function(row,column){this.start.row+=row,this.start.column+=column,this.end.row+=row,this.end.column+=column}}).call(Range.prototype),Range.fromPoints=function(start,end){return new Range(start.row,start.column,end.row,end.column)},Range.comparePoints=comparePoints,Range.comparePoints=function(p1,p2){return p1.row-p2.row||p1.column-p2.column},exports.Range=Range}),ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Anchor=exports.Anchor=function(doc,row,column){this.$onChange=this.onChange.bind(this),this.attach(doc),column===void 0?this.setPosition(row.row,row.column):this.setPosition(row,column)};(function(){oop.implement(this,EventEmitter),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.$insertRight=!1,this.onChange=function(e){var delta=e.data,range=delta.range;if(!(range.start.row==range.end.row&&range.start.row!=this.row||range.start.row>this.row||range.start.row==this.row&&range.start.column>this.column)){var row=this.row,column=this.column,start=range.start,end=range.end;"insertText"===delta.action?start.row===row&&column>=start.column?start.column===column&&this.$insertRight||(start.row===end.row?column+=end.column-start.column:(column-=start.column,row+=end.row-start.row)):start.row!==end.row&&row>start.row&&(row+=end.row-start.row):"insertLines"===delta.action?start.row===row&&0===column&&this.$insertRight||row>=start.row&&(row+=end.row-start.row):"removeText"===delta.action?start.row===row&&column>start.column?column=end.column>=column?start.column:Math.max(0,column-(end.column-start.column)):start.row!==end.row&&row>start.row?(end.row===row&&(column=Math.max(0,column-end.column)+start.column),row-=end.row-start.row):end.row===row&&(row-=end.row-start.row,column=Math.max(0,column-end.column)+start.column):"removeLines"==delta.action&&row>=start.row&&(row>=end.row?row-=end.row-start.row:(row=start.row,column=0)),this.setPosition(row,column,!0)}},this.setPosition=function(row,column,noClip){var pos;if(pos=noClip?{row:row,column:column}:this.$clipPositionToDocument(row,column),this.row!=pos.row||this.column!=pos.column){var old={row:this.row,column:this.column};this.row=pos.row,this.column=pos.column,this._signal("change",{old:old,value:pos})}},this.detach=function(){this.document.removeEventListener("change",this.$onChange)},this.attach=function(doc){this.document=doc||this.document,this.document.on("change",this.$onChange)},this.$clipPositionToDocument=function(row,column){var pos={};return row>=this.document.getLength()?(pos.row=Math.max(0,this.document.getLength()-1),pos.column=this.document.getLine(pos.row).length):0>row?(pos.row=0,pos.column=0):(pos.row=row,pos.column=Math.min(this.document.getLine(pos.row).length,Math.max(0,column))),0>column&&(pos.column=0),pos}}).call(Anchor.prototype)}),ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/range","ace/anchor"],function(acequire,exports){"use strict";var oop=acequire("./lib/oop"),EventEmitter=acequire("./lib/event_emitter").EventEmitter,Range=acequire("./range").Range,Anchor=acequire("./anchor").Anchor,Document=function(text){this.$lines=[],0===text.length?this.$lines=[""]:Array.isArray(text)?this._insertLines(0,text):this.insert({row:0,column:0},text)};(function(){oop.implement(this,EventEmitter),this.setValue=function(text){var len=this.getLength();this.remove(new Range(0,0,len,this.getLine(len-1).length)),this.insert({row:0,column:0},text)},this.getValue=function(){return this.getAllLines().join(this.getNewLineCharacter())},this.createAnchor=function(row,column){return new Anchor(this,row,column)},this.$split=0==="aaa".split(/a/).length?function(text){return text.replace(/\\r\\n|\\r/g,"\\n").split("\\n")}:function(text){return text.split(/\\r\\n|\\r|\\n/)},this.$detectNewLine=function(text){var match=text.match(/^.*?(\\r\\n|\\r|\\n)/m);this.$autoNewLine=match?match[1]:"\\n",this._signal("changeNewLineMode")},this.getNewLineCharacter=function(){switch(this.$newLineMode){case"windows":return"\\r\\n";case"unix":return"\\n";default:return this.$autoNewLine||"\\n"}},this.$autoNewLine="",this.$newLineMode="auto",this.setNewLineMode=function(newLineMode){this.$newLineMode!==newLineMode&&(this.$newLineMode=newLineMode,this._signal("changeNewLineMode"))},this.getNewLineMode=function(){return this.$newLineMode},this.isNewLine=function(text){return"\\r\\n"==text||"\\r"==text||"\\n"==text},this.getLine=function(row){return this.$lines[row]||""},this.getLines=function(firstRow,lastRow){return this.$lines.slice(firstRow,lastRow+1)},this.getAllLines=function(){return this.getLines(0,this.getLength())},this.getLength=function(){return this.$lines.length},this.getTextRange=function(range){if(range.start.row==range.end.row)return this.getLine(range.start.row).substring(range.start.column,range.end.column);var lines=this.getLines(range.start.row,range.end.row);lines[0]=(lines[0]||"").substring(range.start.column);var l=lines.length-1;return range.end.row-range.start.row==l&&(lines[l]=lines[l].substring(0,range.end.column)),lines.join(this.getNewLineCharacter())},this.$clipPosition=function(position){var length=this.getLength();return position.row>=length?(position.row=Math.max(0,length-1),position.column=this.getLine(length-1).length):0>position.row&&(position.row=0),position},this.insert=function(position,text){if(!text||0===text.length)return position;position=this.$clipPosition(position),1>=this.getLength()&&this.$detectNewLine(text);var lines=this.$split(text),firstLine=lines.splice(0,1)[0],lastLine=0==lines.length?null:lines.splice(lines.length-1,1)[0];return position=this.insertInLine(position,firstLine),null!==lastLine&&(position=this.insertNewLine(position),position=this._insertLines(position.row,lines),position=this.insertInLine(position,lastLine||"")),position},this.insertLines=function(row,lines){return row>=this.getLength()?this.insert({row:row,column:0},"\\n"+lines.join("\\n")):this._insertLines(Math.max(row,0),lines)},this._insertLines=function(row,lines){if(0==lines.length)return{row:row,column:0};for(;lines.length>61440;){var end=this._insertLines(row,lines.slice(0,61440));lines=lines.slice(61440),row=end.row}var args=[row,0];args.push.apply(args,lines),this.$lines.splice.apply(this.$lines,args);var range=new Range(row,0,row+lines.length,0),delta={action:"insertLines",range:range,lines:lines};return this._signal("change",{data:delta}),range.end},this.insertNewLine=function(position){position=this.$clipPosition(position);var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column),this.$lines.splice(position.row+1,0,line.substring(position.column,line.length));var end={row:position.row+1,column:0},delta={action:"insertText",range:Range.fromPoints(position,end),text:this.getNewLineCharacter()};return this._signal("change",{data:delta}),end},this.insertInLine=function(position,text){if(0==text.length)return position;var line=this.$lines[position.row]||"";this.$lines[position.row]=line.substring(0,position.column)+text+line.substring(position.column);var end={row:position.row,column:position.column+text.length},delta={action:"insertText",range:Range.fromPoints(position,end),text:text};return this._signal("change",{data:delta}),end},this.remove=function(range){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),range.start=this.$clipPosition(range.start),range.end=this.$clipPosition(range.end),range.isEmpty())return range.start;var firstRow=range.start.row,lastRow=range.end.row;if(range.isMultiLine()){var firstFullRow=0==range.start.column?firstRow:firstRow+1,lastFullRow=lastRow-1;range.end.column>0&&this.removeInLine(lastRow,0,range.end.column),lastFullRow>=firstFullRow&&this._removeLines(firstFullRow,lastFullRow),firstFullRow!=firstRow&&(this.removeInLine(firstRow,range.start.column,this.getLine(firstRow).length),this.removeNewLine(range.start.row))}else this.removeInLine(firstRow,range.start.column,range.end.column);return range.start},this.removeInLine=function(row,startColumn,endColumn){if(startColumn!=endColumn){var range=new Range(row,startColumn,row,endColumn),line=this.getLine(row),removed=line.substring(startColumn,endColumn),newLine=line.substring(0,startColumn)+line.substring(endColumn,line.length);this.$lines.splice(row,1,newLine);var delta={action:"removeText",range:range,text:removed};return this._signal("change",{data:delta}),range.start}},this.removeLines=function(firstRow,lastRow){return 0>firstRow||lastRow>=this.getLength()?this.remove(new Range(firstRow,0,lastRow+1,0)):this._removeLines(firstRow,lastRow)},this._removeLines=function(firstRow,lastRow){var range=new Range(firstRow,0,lastRow+1,0),removed=this.$lines.splice(firstRow,lastRow-firstRow+1),delta={action:"removeLines",range:range,nl:this.getNewLineCharacter(),lines:removed};return this._signal("change",{data:delta}),removed},this.removeNewLine=function(row){var firstLine=this.getLine(row),secondLine=this.getLine(row+1),range=new Range(row,firstLine.length,row+1,0),line=firstLine+secondLine;this.$lines.splice(row,2,line);var delta={action:"removeText",range:range,text:this.getNewLineCharacter()};this._signal("change",{data:delta})},this.replace=function(range,text){if(range instanceof Range||(range=Range.fromPoints(range.start,range.end)),0==text.length&&range.isEmpty())return range.start;if(text==this.getTextRange(range))return range.end;if(this.remove(range),text)var end=this.insert(range.start,text);else end=range.start;return end},this.applyDeltas=function(deltas){for(var i=0;deltas.length>i;i++){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this.insertLines(range.start.row,delta.lines):"insertText"==delta.action?this.insert(range.start,delta.text):"removeLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"removeText"==delta.action&&this.remove(range)}},this.revertDeltas=function(deltas){for(var i=deltas.length-1;i>=0;i--){var delta=deltas[i],range=Range.fromPoints(delta.range.start,delta.range.end);"insertLines"==delta.action?this._removeLines(range.start.row,range.end.row-1):"insertText"==delta.action?this.remove(range):"removeLines"==delta.action?this._insertLines(range.start.row,delta.lines):"removeText"==delta.action&&this.insert(range.start,delta.text)}},this.indexToPosition=function(index,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,i=startRow||0,l=lines.length;l>i;i++)if(index-=lines[i].length+newlineLength,0>index)return{row:i,column:index+lines[i].length+newlineLength};return{row:l-1,column:lines[l-1].length}},this.positionToIndex=function(pos,startRow){for(var lines=this.$lines||this.getAllLines(),newlineLength=this.getNewLineCharacter().length,index=0,row=Math.min(pos.row,lines.length),i=startRow||0;row>i;++i)index+=lines[i].length+newlineLength;return index+pos.column}}).call(Document.prototype),exports.Document=Document}),ace.define("ace/lib/lang",["require","exports","module"],function(acequire,exports){"use strict";exports.last=function(a){return a[a.length-1]},exports.stringReverse=function(string){return string.split("").reverse().join("")},exports.stringRepeat=function(string,count){for(var result="";count>0;)1&count&&(result+=string),(count>>=1)&&(string+=string);return result};var trimBeginRegexp=/^\\s\\s*/,trimEndRegexp=/\\s\\s*$/;exports.stringTrimLeft=function(string){return string.replace(trimBeginRegexp,"")},exports.stringTrimRight=function(string){return string.replace(trimEndRegexp,"")},exports.copyObject=function(obj){var copy={};for(var key in obj)copy[key]=obj[key];return copy},exports.copyArray=function(array){for(var copy=[],i=0,l=array.length;l>i;i++)copy[i]=array[i]&&"object"==typeof array[i]?this.copyObject(array[i]):array[i];return copy},exports.deepCopy=function(obj){if("object"!=typeof obj||!obj)return obj;var cons=obj.constructor;if(cons===RegExp)return obj;var copy=cons();for(var key in obj)copy[key]="object"==typeof obj[key]?exports.deepCopy(obj[key]):obj[key];return copy},exports.arrayToMap=function(arr){for(var map={},i=0;arr.length>i;i++)map[arr[i]]=1;return map},exports.createMap=function(props){var map=Object.create(null);for(var i in props)map[i]=props[i];return map},exports.arrayRemove=function(array,value){for(var i=0;array.length>=i;i++)value===array[i]&&array.splice(i,1)},exports.escapeRegExp=function(str){return str.replace(/([.*+?^${}()|[\\]\\/\\\\])/g,"\\\\$1")},exports.escapeHTML=function(str){return str.replace(/&/g,"&").replace(/"/g,""").replace(/\'/g,"'").replace(/="0"&&"9">=ch;)string+=ch,next();if("."===ch)for(string+=".";next()&&ch>="0"&&"9">=ch;)string+=ch;if("e"===ch||"E"===ch)for(string+=ch,next(),("-"===ch||"+"===ch)&&(string+=ch,next());ch>="0"&&"9">=ch;)string+=ch,next();return number=+string,isNaN(number)?(error("Bad number"),void 0):number},string=function(){var hex,i,uffff,string="";if(\'"\'===ch)for(;next();){if(\'"\'===ch)return next(),string;if("\\\\"===ch)if(next(),"u"===ch){for(uffff=0,i=0;4>i&&(hex=parseInt(next(),16),isFinite(hex));i+=1)uffff=16*uffff+hex;string+=String.fromCharCode(uffff)}else{if("string"!=typeof escapee[ch])break;string+=escapee[ch]}else string+=ch}error("Bad string")},white=function(){for(;ch&&" ">=ch;)next()},word=function(){switch(ch){case"t":return next("t"),next("r"),next("u"),next("e"),!0;case"f":return next("f"),next("a"),next("l"),next("s"),next("e"),!1;case"n":return next("n"),next("u"),next("l"),next("l"),null}error("Unexpected \'"+ch+"\'")},array=function(){var array=[];if("["===ch){if(next("["),white(),"]"===ch)return next("]"),array;for(;ch;){if(array.push(value()),white(),"]"===ch)return next("]"),array;next(","),white()}}error("Bad array")},object=function(){var key,object={};if("{"===ch){if(next("{"),white(),"}"===ch)return next("}"),object;for(;ch;){if(key=string(),white(),next(":"),Object.hasOwnProperty.call(object,key)&&error(\'Duplicate key "\'+key+\'"\'),object[key]=value(),white(),"}"===ch)return next("}"),object;next(","),white()}}error("Bad object")};return value=function(){switch(white(),ch){case"{":return object();case"[":return array();case\'"\':return string();case"-":return number();default:return ch>="0"&&"9">=ch?number():word()}},function(source,reviver){var result;return text=source,at=0,ch=" ",result=value(),white(),ch&&error("Syntax error"),"function"==typeof reviver?function walk(holder,key){var k,v,value=holder[key];if(value&&"object"==typeof value)for(k in value)Object.hasOwnProperty.call(value,k)&&(v=walk(value,k),void 0!==v?value[k]=v:delete value[k]);return reviver.call(holder,key,value)}({"":result},""):result}}),ace.define("ace/mode/json_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/json/json_parse"],function(acequire,exports){"use strict";var oop=acequire("../lib/oop"),Mirror=acequire("../worker/mirror").Mirror,parse=acequire("./json/json_parse"),JsonWorker=exports.JsonWorker=function(sender){Mirror.call(this,sender),this.setTimeout(200)};oop.inherits(JsonWorker,Mirror),function(){this.onUpdate=function(){var value=this.doc.getValue();try{value&&parse(value)}catch(e){var pos=this.doc.indexToPosition(e.at-1);return this.sender.emit("error",{row:pos.row,column:pos.column,text:e.message,type:"error"}),void 0}this.sender.emit("ok")}}.call(JsonWorker.prototype)}),ace.define("ace/lib/es5-shim",["require","exports","module"],function(){function Empty(){}function doesDefinePropertyWork(object){try{return Object.defineProperty(object,"sentinel",{}),"sentinel"in object}catch(exception){}}function toInteger(n){return n=+n,n!==n?n=0:0!==n&&n!==1/0&&n!==-(1/0)&&(n=(n>0||-1)*Math.floor(Math.abs(n))),n}Function.prototype.bind||(Function.prototype.bind=function(that){var target=this;if("function"!=typeof target)throw new TypeError("Function.prototype.bind called on incompatible "+target);var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var result=target.apply(this,args.concat(slice.call(arguments)));return Object(result)===result?result:this}return target.apply(that,args.concat(slice.call(arguments)))};return target.prototype&&(Empty.prototype=target.prototype,bound.prototype=new Empty,Empty.prototype=null),bound});var defineGetter,defineSetter,lookupGetter,lookupSetter,supportsAccessors,call=Function.prototype.call,prototypeOfArray=Array.prototype,prototypeOfObject=Object.prototype,slice=prototypeOfArray.slice,_toString=call.bind(prototypeOfObject.toString),owns=call.bind(prototypeOfObject.hasOwnProperty);if((supportsAccessors=owns(prototypeOfObject,"__defineGetter__"))&&(defineGetter=call.bind(prototypeOfObject.__defineGetter__),defineSetter=call.bind(prototypeOfObject.__defineSetter__),lookupGetter=call.bind(prototypeOfObject.__lookupGetter__),lookupSetter=call.bind(prototypeOfObject.__lookupSetter__)),2!=[1,2].splice(0).length)if(function(){function makeArray(l){var a=Array(l+2);return a[0]=a[1]=0,a}var lengthBefore,array=[];return array.splice.apply(array,makeArray(20)),array.splice.apply(array,makeArray(26)),lengthBefore=array.length,array.splice(5,0,"XXX"),lengthBefore+1==array.length,lengthBefore+1==array.length?!0:void 0}()){var array_splice=Array.prototype.splice;Array.prototype.splice=function(start,deleteCount){return arguments.length?array_splice.apply(this,[void 0===start?0:start,void 0===deleteCount?this.length-start:deleteCount].concat(slice.call(arguments,2))):[]}}else Array.prototype.splice=function(pos,removeCount){var length=this.length;pos>0?pos>length&&(pos=length):void 0==pos?pos=0:0>pos&&(pos=Math.max(length+pos,0)),length>pos+removeCount||(removeCount=length-pos);var removed=this.slice(pos,pos+removeCount),insert=slice.call(arguments,2),add=insert.length;if(pos===length)add&&this.push.apply(this,insert);else{var remove=Math.min(removeCount,length-pos),tailOldPos=pos+remove,tailNewPos=tailOldPos+add-remove,tailCount=length-tailOldPos,lengthAfterRemove=length-remove;if(tailOldPos>tailNewPos)for(var i=0;tailCount>i;++i)this[tailNewPos+i]=this[tailOldPos+i];else if(tailNewPos>tailOldPos)for(i=tailCount;i--;)this[tailNewPos+i]=this[tailOldPos+i];if(add&&pos===lengthAfterRemove)this.length=lengthAfterRemove,this.push.apply(this,insert);else for(this.length=lengthAfterRemove+add,i=0;add>i;++i)this[pos+i]=insert[i]}return removed};Array.isArray||(Array.isArray=function(obj){return"[object Array]"==_toString(obj)});var boxedString=Object("a"),splitString="a"!=boxedString[0]||!(0 in boxedString);if(Array.prototype.forEach||(Array.prototype.forEach=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,thisp=arguments[1],i=-1,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError;\nfor(;length>++i;)i in self&&fun.call(thisp,self[i],i,object)}),Array.prototype.map||(Array.prototype.map=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=Array(length),thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(result[i]=fun.call(thisp,self[i],i,object));return result}),Array.prototype.filter||(Array.prototype.filter=function(fun){var value,object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,result=[],thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)i in self&&(value=self[i],fun.call(thisp,value,i,object)&&result.push(value));return result}),Array.prototype.every||(Array.prototype.every=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&!fun.call(thisp,self[i],i,object))return!1;return!0}),Array.prototype.some||(Array.prototype.some=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0,thisp=arguments[1];if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");for(var i=0;length>i;i++)if(i in self&&fun.call(thisp,self[i],i,object))return!0;return!1}),Array.prototype.reduce||(Array.prototype.reduce=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduce of empty array with no initial value");var result,i=0;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i++];break}if(++i>=length)throw new TypeError("reduce of empty array with no initial value")}for(;length>i;i++)i in self&&(result=fun.call(void 0,result,self[i],i,object));return result}),Array.prototype.reduceRight||(Array.prototype.reduceRight=function(fun){var object=toObject(this),self=splitString&&"[object String]"==_toString(this)?this.split(""):object,length=self.length>>>0;if("[object Function]"!=_toString(fun))throw new TypeError(fun+" is not a function");if(!length&&1==arguments.length)throw new TypeError("reduceRight of empty array with no initial value");var result,i=length-1;if(arguments.length>=2)result=arguments[1];else for(;;){if(i in self){result=self[i--];break}if(0>--i)throw new TypeError("reduceRight of empty array with no initial value")}do i in this&&(result=fun.call(void 0,result,self[i],i,object));while(i--);return result}),Array.prototype.indexOf&&-1==[0,1].indexOf(1,2)||(Array.prototype.indexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=0;for(arguments.length>1&&(i=toInteger(arguments[1])),i=i>=0?i:Math.max(0,length+i);length>i;i++)if(i in self&&self[i]===sought)return i;return-1}),Array.prototype.lastIndexOf&&-1==[0,1].lastIndexOf(0,-3)||(Array.prototype.lastIndexOf=function(sought){var self=splitString&&"[object String]"==_toString(this)?this.split(""):toObject(this),length=self.length>>>0;if(!length)return-1;var i=length-1;for(arguments.length>1&&(i=Math.min(i,toInteger(arguments[1]))),i=i>=0?i:length-Math.abs(i);i>=0;i--)if(i in self&&sought===self[i])return i;return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(object){return object.__proto__||(object.constructor?object.constructor.prototype:prototypeOfObject)}),!Object.getOwnPropertyDescriptor){var ERR_NON_OBJECT="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(object,property){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT+object);if(owns(object,property)){var descriptor,getter,setter;if(descriptor={enumerable:!0,configurable:!0},supportsAccessors){var prototype=object.__proto__;object.__proto__=prototypeOfObject;var getter=lookupGetter(object,property),setter=lookupSetter(object,property);if(object.__proto__=prototype,getter||setter)return getter&&(descriptor.get=getter),setter&&(descriptor.set=setter),descriptor}return descriptor.value=object[property],descriptor}}}if(Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(object){return Object.keys(object)}),!Object.create){var createEmpty;createEmpty=null===Object.prototype.__proto__?function(){return{__proto__:null}}:function(){var empty={};for(var i in empty)empty[i]=null;return empty.constructor=empty.hasOwnProperty=empty.propertyIsEnumerable=empty.isPrototypeOf=empty.toLocaleString=empty.toString=empty.valueOf=empty.__proto__=null,empty},Object.create=function(prototype,properties){var object;if(null===prototype)object=createEmpty();else{if("object"!=typeof prototype)throw new TypeError("typeof prototype["+typeof prototype+"] != \'object\'");var Type=function(){};Type.prototype=prototype,object=new Type,object.__proto__=prototype}return void 0!==properties&&Object.defineProperties(object,properties),object}}if(Object.defineProperty){var definePropertyWorksOnObject=doesDefinePropertyWork({}),definePropertyWorksOnDom="undefined"==typeof document||doesDefinePropertyWork(document.createElement("div"));if(!definePropertyWorksOnObject||!definePropertyWorksOnDom)var definePropertyFallback=Object.defineProperty}if(!Object.defineProperty||definePropertyFallback){var ERR_NON_OBJECT_DESCRIPTOR="Property description must be an object: ",ERR_NON_OBJECT_TARGET="Object.defineProperty called on non-object: ",ERR_ACCESSORS_NOT_SUPPORTED="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(object,property,descriptor){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError(ERR_NON_OBJECT_TARGET+object);if("object"!=typeof descriptor&&"function"!=typeof descriptor||null===descriptor)throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR+descriptor);if(definePropertyFallback)try{return definePropertyFallback.call(Object,object,property,descriptor)}catch(exception){}if(owns(descriptor,"value"))if(supportsAccessors&&(lookupGetter(object,property)||lookupSetter(object,property))){var prototype=object.__proto__;object.__proto__=prototypeOfObject,delete object[property],object[property]=descriptor.value,object.__proto__=prototype}else object[property]=descriptor.value;else{if(!supportsAccessors)throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED);owns(descriptor,"get")&&defineGetter(object,property,descriptor.get),owns(descriptor,"set")&&defineSetter(object,property,descriptor.set)}return object}}Object.defineProperties||(Object.defineProperties=function(object,properties){for(var property in properties)owns(properties,property)&&Object.defineProperty(object,property,properties[property]);return object}),Object.seal||(Object.seal=function(object){return object}),Object.freeze||(Object.freeze=function(object){return object});try{Object.freeze(function(){})}catch(exception){Object.freeze=function(freezeObject){return function(object){return"function"==typeof object?object:freezeObject(object)}}(Object.freeze)}if(Object.preventExtensions||(Object.preventExtensions=function(object){return object}),Object.isSealed||(Object.isSealed=function(){return!1}),Object.isFrozen||(Object.isFrozen=function(){return!1}),Object.isExtensible||(Object.isExtensible=function(object){if(Object(object)===object)throw new TypeError;for(var name="";owns(object,name);)name+="?";object[name]=!0;var returnValue=owns(object,name);return delete object[name],returnValue}),!Object.keys){var hasDontEnumBug=!0,dontEnums=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],dontEnumsLength=dontEnums.length;for(var key in{toString:null})hasDontEnumBug=!1;Object.keys=function(object){if("object"!=typeof object&&"function"!=typeof object||null===object)throw new TypeError("Object.keys called on a non-object");var keys=[];for(var name in object)owns(object,name)&&keys.push(name);if(hasDontEnumBug)for(var i=0,ii=dontEnumsLength;ii>i;i++){var dontEnum=dontEnums[i];owns(object,dontEnum)&&keys.push(dontEnum)}return keys}}Date.now||(Date.now=function(){return(new Date).getTime()});var ws=" \\n\x0B\\f\\r   ᠎              \\u2028\\u2029";if(!String.prototype.trim||ws.trim()){ws="["+ws+"]";var trimBeginRegexp=RegExp("^"+ws+ws+"*"),trimEndRegexp=RegExp(ws+ws+"*$");String.prototype.trim=function(){return(this+"").replace(trimBeginRegexp,"").replace(trimEndRegexp,"")}}var toObject=function(o){if(null==o)throw new TypeError("can\'t convert "+o+" to object");return Object(o)}});'; },function(a,b,c){a.exports=function(){throw new Error("define cannot be used indirect")}},function(a,b,c){(function(b){function c(){if(b.Blob)try{return new Blob(["asdf"],{type:"text/plain"}),Blob}catch(a){}var c=b.WebKitBlobBuilder||b.MozBlobBuilder||b.MSBlobBuilder;return function(a,b){var d=new c,e=b.endings,f=b.type;if(e)for(var g=0,h=a.length;h>g;++g)d.append(a[g],e);else for(var g=0,h=a.length;h>g;++g)d.append(a[g]);return f?d.getBlob(f):d.getBlob()}}a.exports=c()}).call(b,function(){return this}())}])}),function(){function a(a,c,d){return b(a,c,d)}function b(a,i,k,l){l=l||{},i&&!d(i)&&(k=i,i=void 0),i=i||new Date,k=k||j,k.formats=k.formats||{};var m=i.getTime(),n=l.timezone,o=typeof n;if((l.utc||"number"==o||"string"==o)&&(i=c(i)),n){if("string"==o)var p="-"==n[0]?-1:1,q=parseInt(n.slice(1,3),10),r=parseInt(n.slice(3,5),10),n=60*p*q+r;o&&(i=new Date(i.getTime()+6e4*n))}return a.replace(/%([-_0]?.)/g,function(a,c){var d;if(2==c.length){if(d=c[0],"-"==d)d="";else if("_"==d)d=" ";else{if("0"!=d)return a;d="0"}c=c[1]}switch(c){case"A":return k.days[i.getDay()];case"a":return k.shortDays[i.getDay()];case"B":return k.months[i.getMonth()];case"b":return k.shortMonths[i.getMonth()];case"C":return e(Math.floor(i.getFullYear()/100),d);case"D":return b(k.formats.D||"%m/%d/%y",i,k);case"d":return e(i.getDate(),d);case"e":return i.getDate();case"F":return b(k.formats.F||"%Y-%m-%d",i,k);case"H":return e(i.getHours(),d);case"h":return k.shortMonths[i.getMonth()];case"I":return e(f(i),d);case"j":return d=new Date(i.getFullYear(),0,1),d=Math.ceil((i.getTime()-d.getTime())/864e5),e(d,3);case"k":return e(i.getHours(),null==d?" ":d);case"L":return e(Math.floor(m%1e3),3);case"l":return e(f(i),null==d?" ":d);case"M":return e(i.getMinutes(),d);case"m":return e(i.getMonth()+1,d);case"n":return"\n";case"o":return String(i.getDate())+g(i.getDate());case"P":return i.getHours()<12?k.am:k.pm;case"p":return i.getHours()<12?k.AM:k.PM;case"R":return b(k.formats.R||"%H:%M",i,k);case"r":return b(k.formats.r||"%I:%M:%S %p",i,k);case"S":return e(i.getSeconds(),d);case"s":return Math.floor(m/1e3);case"T":return b(k.formats.T||"%H:%M:%S",i,k);case"t":return" ";case"U":return e(h(i,"sunday"),d);case"u":return d=i.getDay(),0==d?7:d;case"v":return b(k.formats.v||"%e-%b-%Y",i,k);case"W":return e(h(i,"monday"),d);case"w":return i.getDay();case"Y":return i.getFullYear();case"y":return d=String(i.getFullYear()),d.slice(d.length-2);case"Z":return l.utc?"GMT":(d=i.toString().match(/\((\w+)\)/))&&d[1]||"";case"z":return l.utc?"+0000":(d="number"==typeof n?n:-i.getTimezoneOffset(),(0>d?"-":"+")+e(Math.abs(d/60))+e(d%60));default:return c}})}function c(a){var b=6e4*(a.getTimezoneOffset()||0);return new Date(a.getTime()+b)}function d(a){for(var b=0,c=k.length,b=0;c>b;++b)if("function"!=typeof a[k[b]])return!1;return!0}function e(a,b,c){if("number"==typeof b&&(c=b,b="0"),null==b&&(b="0"),c=c||2,a=String(a),b)for(;a.length12&&(a-=12),a}function g(a){var b=a%10;if(a%=100,a>=11&&13>=a||0===b||b>=4)return"th";switch(b){case 1:return"st";case 2:return"nd";case 3:return"rd"}}function h(a,b){var b=b||"sunday",c=a.getDay();"monday"==b&&(0==c?c=6:c--);var d=new Date(a.getFullYear(),0,1);return Math.floor(((a-d)/864e5+7-c)/7)}var i;i="undefined"!=typeof module?module.exports=a:function(){return this||(0,eval)("this")}();var j={days:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),shortDays:"Sun Mon Tue Wed Thu Fri Sat".split(" "),months:"January February March April May June July August September October November December".split(" "),shortMonths:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),AM:"AM",PM:"PM",am:"am",pm:"pm"};i.strftime=a,i.strftimeTZ=a.strftimeTZ=function(a,c,d,e){return"number"!=typeof d&&"string"!=typeof d||null!=e||(e=d,d=void 0),b(a,c,d,{timezone:e})},i.strftimeUTC=a.strftimeUTC=function(a,c,d){return b(a,c,d,{utc:!0})},i.localizedStrftime=a.localizedStrftime=function(a){return function(c,d){return b(c,d,a)}};var k=["getTime","getTimezoneOffset","getDay","getDate","getMonth","getFullYear","getYear","getHours","getMinutes","getSeconds"]}(),!function(){function a(b,c,d){function e(a){var e=b(a),f=d>e,g=d3.extent(b.range()),h=g[0],i=g[1],j=f?d-h:i-d;return 0==j&&(j=i-h),(f?-1:1)*j*(c+1)/(c+j/Math.abs(e-d))+d}return e.distortion=function(a){return arguments.length?(c=+a,e):c},e.focus=function(a){return arguments.length?(d=+a,e):d},e.copy=function(){return a(b.copy(),c,d)},e.nice=b.nice,e.ticks=b.ticks,e.tickFormat=b.tickFormat,d3.rebind(e,b,"domain","range")}d3.fisheye={scale:function(b){return a(b(),3,0)},circular:function(){function a(a){var b=a.x-g[0],f=a.y-g[1],h=Math.sqrt(b*b+f*f);if(!h||h>=e)return{x:a.x,y:a.y,z:1};var i=c*(1-Math.exp(-h*d))/h*.75+.25;return{x:g[0]+b*i,y:g[1]+f*i,z:Math.min(i,10)}}function b(){return c=Math.exp(f),c=c/(c-1)*e,d=f/e,a}var c,d,e=200,f=2,g=[0,0];return a.radius=function(a){return arguments.length?(e=+a,b()):e},a.distortion=function(a){return arguments.length?(f=+a,b()):f},a.focus=function(b){return arguments.length?(g=b,a):g},b()}}}(),!function(a){"use strict";function b(a){}function c(a){a.stopPropagation()}a.fn.pagination=function(d){function e(b,d){var e=d>=1&&d<=g.lastPage,f=a("").append(b),h=a("
  • ").append(f);return e?(f.click(function(){g.click(d)}),a(".arango-pagination").next().children().first().removeClass("disabledPag"),a(".arango-pagination").prev().children().first().removeClass("disabledPag")):(h.addClass("disabledPag"),setTimeout(function(){a(h).find("i").hasClass("fa-angle-right")?a(".arango-pagination").next().children().first().addClass("disabledPag"):a(h).find("i").hasClass("fa-angle-left")&&a(".arango-pagination").prev().children().first().addClass("disabledPag")},50)),f.click(c),d===g.page&&h.addClass("active active-arango-pagination-button"),h}function f(){var b,c=a('
      ');for(c.append(e(g.prev,g.page-1)),b=i;j>=b;b+=1)c.append(e(b,b));return c.append(e(g.next,g.page+1))}var g=a.extend({prev:'',next:'',left:3,right:3,page:1,lastPage:1,click:b},d||{}),h=g.left+g.right,i=Math.max(1,g.page-g.left),j=i+h;return g.lastPage",n="
      ",o=":empty",G="\n",m=">>> ",l="... ",k=2,c=""+i+"ansi-",q="",r=/\[(\d*)(?:;(\d*))*m/,b=function(){function a(){this.stylize=L(this.stylize,this),this._closeSpan=L(this._closeSpan,this),this._openSpan=L(this._openSpan,this),this.getClasses=L(this.getClasses,this),this._style=L(this._style,this),this._color=L(this._color,this),this._remove=L(this._remove,this),this._append=L(this._append,this),this.klasses=[]}return a.prototype.COLORS=["black","red","green","yellow","blue","magenta","cyan","white"],a.prototype._append=function(a){return a=""+c+a,-1===this.klasses.indexOf(a)?this.klasses.push(a):void 0},a.prototype._remove=function(){var a,b,d,e,f,g;for(d=1<=arguments.length?M.call(arguments,0):[],g=[],e=0,f=d.length;f>e;e++)b=d[e],"fonts"===b||"color"===b||"background-color"===b?g.push(this.klasses=function(){var d,e,f,g;for(f=this.klasses,g=[],d=0,e=f.length;e>d;d++)a=f[d],a.indexOf(b)!==c.length&&g.push(a);return g}.call(this)):(b=""+c+b,g.push(this.klasses=function(){var c,d,e,f;for(e=this.klasses,f=[],c=0,d=e.length;d>c;c++)a=e[c],a!==b&&f.push(a);return f}.call(this)));return g},a.prototype._color=function(a){return this.COLORS[a]},a.prototype._style=function(a){if(""===a&&(a=0),a=parseInt(a),!isNaN(a))switch(a){case 0:return this.klasses=[];case 1:return this._append("bold");case 2:return this._append("lighter");case 3:return this._append("italic");case 4:return this._append("underline");case 5:return this._append("blink");case 6:return this._append("blink-rapid");case 8:return this._append("hidden");case 9:return this._append("line-through");case 10:return this._remove("fonts");case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:return this._remove("fonts"),this._append("fonts-"+(a-10));case 20:return this._append("fraktur");case 21:return this._remove("bold","lighter");case 22:return this._remove("bold","lighter");case 23:return this._remove("italic","fraktur");case 24:return this._remove("underline");case 25:return this._remove("blink","blink-rapid");case 28:return this._remove("hidden");case 29:return this._remove("line-through");case 30:case 31:case 32:case 33:case 34:case 35:case 36:case 37:return this._remove("color"),this._append("color-"+this._color(a-30));case 39:return this._remove("color");case 40:case 41:case 42:case 43:case 44:case 45:case 46:case 47:return this._remove("background-color"),this._append("background-color-"+this._color(a-40));case 49:return this._remove("background-color");case 51:return this._append("framed");case 53:return this._append("overline");case 54:return this._remove("framed");case 55:return this._remove("overline")}},a.prototype.getClasses=function(){return this.klasses.join(" ")},a.prototype._openSpan=function(a){return''+a},a.prototype._closeSpan=function(a){return""+a+""},a.prototype.stylize=function(a){var b,c,d,e,f,g;for(a=this._openSpan(a),d=0;(d=a.indexOf(q,d))&&-1!==d;)if(c=a.slice(d).match(r)){for(g=c.slice(1),e=0,f=g.length;f>e;e++)b=g[e],this._style(b);a=this._closeSpan(a.slice(0,d))+this._openSpan(a.slice(d+1+c[0].length))}else d++;return this._closeSpan(a)},a}(),K=function(a,b){return''+(b||"")+""},t=function(){function c(c,d,e,g){this._HideComposition=L(this._HideComposition,this),this._ShowComposition=L(this._ShowComposition,this),this._UpdateComposition=L(this._UpdateComposition,this),this._EndComposition=L(this._EndComposition,this),this._StartComposition=L(this._StartComposition,this),this._CheckComposition=L(this._CheckComposition,this),this._ProcessMatch=L(this._ProcessMatch,this),this._HandleKey=L(this._HandleKey,this),this._HandleChar=L(this._HandleChar,this),this.isMobile=!!navigator.userAgent.match(/iPhone|iPad|iPod|Android/i),this.isIos=!!navigator.userAgent.match(/iPhone|iPad|iPod/i),this.isAndroid=!!navigator.userAgent.match(/Android/i),this.$window=a(window),this.header=d||"",this.prompt_label_main="string"==typeof e?e:m,this.prompt_label_continue=g||l,this.indent_width=k,this.state=I,this.input_queue=[],this.input_callback=null,this.multiline_callback=null,this.history=[],this.history_index=0,this.history_new="",this.history_active=!1,this.shortcuts={},this.$container=a("
      ").appendTo(c),this.$container.css({top:0,left:0,right:0,bottom:0,position:"absolute",overflow:"auto"}),this.$console=a('
      ').appendTo(this.$container),this.$console.css({margin:0,position:"relative","min-height":"100%","box-sizing":"border-box","-moz-box-sizing":"border-box","-webkit-box-sizing":"border-box"}),this.$console_focused=!0,this.$input_container=a(n).appendTo(this.$container),this.$input_container.css({position:"absolute",width:1,height:0,overflow:"hidden"}),this.$input_source=a(this.isAndroid?"":"