server/php/basic/public_html/static/lib/renkan/js/renkan.min.map
changeset 488 1324bd8747ff
parent 463 41325cc50574
child 489 7f25a4453865
--- a/server/php/basic/public_html/static/lib/renkan/js/renkan.min.map	Thu Jun 18 16:50:54 2015 +0200
+++ b/server/php/basic/public_html/static/lib/renkan/js/renkan.min.map	Thu Jun 18 16:53:16 2015 +0200
@@ -1,1 +1,1 @@
-{"version":3,"file":"renkan.min.js","sources":["templates.js","../../js/main.js","../../js/dataloader.js","../../js/models.js","../../js/defaults.js","../../js/i18n.js","../../js/full-json.js","../../js/save-once.js","../../js/ldtjson-bin.js","../../js/list-bin.js","../../js/wikipedia-bin.js","paper-renderer.js"],"names":["this","obj","__t","__p","_","escape","__e","Array","prototype","join","renkan","translate","edge","title","options","show_edge_editor_uri","uri","properties","length","each","ontology","label","property","show_edge_editor_style","show_edge_editor_style_color","show_edge_editor_style_dash","dash","show_edge_editor_style_thickness","thickness","show_edge_editor_style_arrow","arrow","show_edge_editor_direction","show_edge_editor_nodes","from_color","shortenText","from_title","to_title","show_edge_editor_creator","has_creator","created_by_title","show_edge_tooltip_color","color","show_edge_tooltip_uri","short_uri","description","show_edge_tooltip_nodes","to_color","show_edge_tooltip_creator","created_by_color","Rkns","Utils","getFullURL","image","static_url","url","show_bins","show_editor","node","show_node_editor_uri","show_node_editor_description","show_node_editor_size","size","show_node_editor_style","show_node_editor_style_color","show_node_editor_style_dash","show_node_editor_style_thickness","show_node_editor_image","image_placeholder","clip_path","allow_image_upload","show_node_editor_creator","change_shapes","shapes","shape","charAt","toUpperCase","substring","show_node_tooltip_color","show_node_tooltip_uri","show_node_tooltip_description","show_node_tooltip_image","show_node_tooltip_creator","print","__j","call","arguments","show_top_bar","editor_mode","project","get","show_user_list","show_user_color","user_color_editable","colorPicker","home_button_url","home_button_title","show_fullscreen_button","show_addnode_button","show_addedge_button","show_export_button","show_save_button","show_open_button","show_bookmarklet","show_search_field","resize","show_zoom","save_view","root","$","jQuery","pickerColors","__renkans","_BaseBin","_renkan","_opts","find","hide","addClass","appendTo","title_icon_$","_this","attr","href","html","click","destroy","slideDown","resizeBins","refresh","count_$","title_$","main_$","auto_refresh","window","setInterval","detach","Renkan","push","defaults","templates","renkanJST","template","property_files","f","getJSON","data","concat","read_only","Models","Project","dataloader","DataLoader","Loader","setCurrentUser","user_id","user_name","addUser","_id","current_user","renderer","redrawUsers","container","tabs","search_engines","current_user_list","UsersList","on","_tmpl","map","c","Renderer","Scene","search","_select","_input","_form","_search","type","Search","_key","key","getSearchTitle","className","getBgClass","_el","setSearchEngine","submit","val","search_engine","mouseenter","mouseleave","bins","_bin","Bin","elementDropped","_mainDiv","siblings","is","slideUp","_t","_models","where","_model","highlightModel","mouseout","unhighlightAll","dragDrop","err","e","preventDefault","touch","originalEvent","changedTouches","off","canvas_$","offset","w","width","h","height","pageX","left","pageY","top","onMouseMove","div","document","createElement","appendChild","cloneNode","dropData","text/html","innerHTML","onMouseDown","onMouseUp","dataTransfer","setData","lastsearch","lastval","regexpFromTextOrArray","source","tab","render","_text","i18n","language","substr","onStatusChange","listClasses","split","classes","i","_d","outerHeight","css","getUUID4","replace","r","Math","random","v","toString","getUID","pad","n","Date","ID_AUTO_INCREMENT","ID_BASE","getUTCFullYear","getUTCMonth","getUTCDate","_base","_n","_uidbase","test","img","Image","src","res","inherit","_baseClass","_callbefore","_class","apply","slice","_init","_initialized","extend","replaceText","makeReplaceFunc","l","k","charsrx","txt","toLowerCase","remrx","j","remsrc","charsub","getSource","inp","removeChars","String","fromCharCode","RegExp","_textOrArray","testrx","replacerx","isempty","_replace","text","_MIN_DRAG_DISTANCE","_NODE_BUTTON_WIDTH","_EDGE_BUTTON_INNER","_EDGE_BUTTON_OUTER","_CLICKMODE_ADDNODE","_CLICKMODE_STARTEDGE","_CLICKMODE_ENDEDGE","_NODE_SIZE_STEP","LN2","_MIN_SCALE","_MAX_SCALE","_MOUSEMOVE_RATE","_DOUBLETAP_DELAY","_DOUBLETAP_DISTANCE","_USER_PLACEHOLDER","default_user_color","_BOOKMARKLET_CODE","_maxlength","drawEditBox","_options","_coords","_path","_xmargin","_selector","tooltip_width","tooltip_padding","_height","_isLeft","x","paper","view","center","_left","tooltip_arrow_length","_right","_top","y","tooltip_margin","max","tooltip_arrow_width","min","_bottom","segments","point","add","closed","fillColor","GradientColor","Gradient","tooltip_top_color","tooltip_bottom_color","increaseBrightness","hex","percent","parseInt","g","b","converters","from1to2","len","nodes","console","log","style","edges","schema_version","dataConverters","convert","schemaVersionFrom","getSchemaVersion","schemaVersionTo","converterName","load","set","validate","Backbone","guid","RenkanModel","RelationalModel","idAttribute","constructor","id","prepare","addReference","_propName","_list","_default","_element","User","toJSON","Node","relations","HasOne","relatedModel","created_by","position","Edge","from","to","View","isArray","zoom_level","hidden_nodes","RosterUser","blacklist","HasMany","reverseRelation","includeInJSON","_props","_user","findOrCreate","addNode","_node","addEdge","_edge","addView","_view","removeNode","remove","removeEdge","_project","users","views","_item","t","version","initialize","filter","json","clone","attributes","Model","Collection","omit","site_id","model","navigator","userLanguage","popup_editor","editor_panel","manual_save","size_bug_fix","force_resize","allow_double_click","zoom_on_scroll","element_delete_delay","autoscale_padding","default_view","user_name_editable","show_minimap","minimap_width","minimap_height","minimap_padding","minimap_background_color","minimap_border_color","minimap_highlight_color","minimap_highlight_weight","buttons_background","buttons_label_color","buttons_label_font_size","ghost_opacity","default_dash_array","show_node_circles","clip_node_images","node_images_fill_mode","node_size_base","node_stroke_width","node_stroke_max_width","selected_node_stroke_width","selected_node_stroke_max_width","node_stroke_witdh_scale","node_fill_color","highlighted_node_fill_color","node_label_distance","node_label_max_length","label_untitled_nodes","edge_stroke_width","edge_stroke_max_width","selected_edge_stroke_width","selected_edge_stroke_max_width","edge_stroke_witdh_scale","edge_label_distance","edge_label_max_length","edge_arrow_length","edge_arrow_width","edge_arrow_max_width","edge_gap_in_bundles","label_untitled_edges","tooltip_border_color","tooltip_border_width","uploaded_image_max_kb","fr","Edit Node","Edit Edge","Title:","URI:","Description:","From:","To:","Image URL:","Choose Image File:","Full Screen","Add Node","Add Edge","Save Project","Open Project","Auto-save enabled","Connection lost","Created by:","Zoom In","Zoom Out","Edit","Remove","Cancel deletion","Link to another node","Enlarge","Shrink","Click on the background canvas to add a node","Click on a first node to start the edge","Click on a second node to complete the edge","Wikipedia","Wikipedia in ","French","English","Japanese","Untitled project","Lignes de Temps","Loading, please wait","Edge color:","Dash:","Thickness:","Arrow:","Node color:","Choose color","Change edge direction","Do you really wish to remove node ","Do you really wish to remove edge ","This file is not an image","Image size must be under ","Size:","KB","Choose from vocabulary:","SKOS Documentation properties","has note","has example","has definition","SKOS Semantic relations","has broader","has narrower","has related","Dublin Core Metadata","has contributor","covers","created by","has date","published by","has source","has subject","Dragged resource","Search the Web","Search in Bins","Close bin","Refresh bin","(untitled)","Select contents:","Drag items from this website, drop them in Renkan","Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.","Shapes available","Circle","Square","Diamond","Hexagone","Ellipse","Star","Cloud","Triangle","Zoom Fit","Download Project","Zoom Save","View saved zoom","Renkan 'Drag-to-Add' bookmarklet","(unknown user)","<unknown user>","Search in graph","Search in ","jsonIO","_proj","http_method","_load","redrawActive","loadingStatus","_data","saveStatus","fixSize","_save","ajax","contentType","JSON","stringify","success","_thrSave","throttle","setTimeout","changedAttributes","hasChanged","jsonIOSaveOnClick","_saveWarn","_onLeave","getdata","rx","matches","location","hash","match","beforeSend","autoScale","_checkLeave","removeClass","save","hasClass","Ldt","ProjectBin","ldt_type","Resclass","error","tagTemplate","annotationTemplate","proj_id","project_id","ldt_platform","searchbase","highlight","_e","convertTC","_ms","_res","_totalSeconds","abs","floor","_hours","_minutes","_seconds","_html","_projtitle","meta","count","tags","_tag","_title","htitle","encodedtitle","encodeURIComponent","annotations","_annotation","_description","content","_duration","end","begin","_img","hdescription","start","duration","mediaid","media","annotationid","show","dataType","lang","_q","ResultsBin","segmentTemplate","max_results","highlightrx","objects","_segment","_begin","start_ts","_end","iri_id","element_id","format","q","limit","ResourceList","resultTemplate","list","trim","_match","langs","en","ja","query","_result","encodeURI","snippet","define","_BaseRepresentation","_renderer","_changeBinding","redraw","change","_removeBinding","removeRepresentation","defer","_selectBinding","select","_unselectBinding","unselect","_super","_func","moveTo","trigger","unhighlight","mousedown","mouseup","value","getUtils","getRenderer","requtils","BaseRepresentation","_BaseButton","_pos","sector","_newTarget","source_representation","cloud_path","builders","circle","getShape","Path","getImageShape","radius","rectangle","Rectangle","ellipse","polygon","RegularPolygon","diamond","d","SQRT2","rotate","star","cloud","path","scale","triangle","svg","ShapeBuilder","NodeRepr","node_layer","activate","buildShape","hidden","ghost","strokeWidth","h_ratio","labels_$","normal_buttons","NodeEditButton","NodeRemoveButton","NodeHideButton","NodeShowButton","NodeLinkButton","NodeEnlargeButton","NodeShrinkButton","pending_delete_buttons","NodeRevertButton","all_buttons","active_buttons","last_circle_radius","minimap","minimap_circle","__representation","miniframe","node_group","addChild","_getStrokeWidth","has","_getSelectedStrokeWidth","changed","shapeBuilder","sendToBack","_model_coords","Point","_baseRadius","exp","is_dragging","paper_coords","toPaperCoords","circle_radius","forEach","setSectorSize","node_image","subtract","image_delta","multiply","old_act_btn","opacity","dashArray","selected","isEditable","highlighted","_strokeWidth","_color","_dash","strokeColor","_pc","lastImage","showImage","minipos","toMinimapCoords","miniradius","minisize","Size","fitBounds","dontRedrawEdges","ed","repr","getRepresentationByModel","from_representation","to_representation","_image","image_cache","clipPath","hasClipPath","_clip","baseRadius","centerPoint","instructions","lastCoords","minX","Infinity","minY","maxX","maxY","transformCoords","tabc","relative","newCoords","parseFloat","isY","instr","coords","lineTo","cubicCurveTo","quadraticCurveTo","_raster","Raster","locked","Group","clipped","_circleClip","divide","insertAbove","paperShift","_delta","openEditor","removeRepresentationsOfType","_editor","addRepresentation","draw","_uri","showNeighbors","hideButtons","buttons_timeout","undefined","hideNeighbors","indexNode","hiddenNodes","indexOf","splice","textToReplace","hlvalue","throttledPaperDraw","saveCoords","toModelCoords","_event","_isTouch","unselectAll","index","click_target","edge_layer","bundle","addToBundles","line","arrow_scale","pivot","arrow_angle","EdgeEditButton","EdgeRemoveButton","EdgeRevertButton","minimap_line","_getArrowScale","_opacity","_arrow_scale","_p0a","_p1a","_v","_r","_u","_ortho","_group_pos","getPosition","_p0b","_p1b","_a","angle","_textdelta","_handle","visible","handleIn","handleOut","bounds","_textpos","transform","-moz-transform","-webkit-transform","text_angle","reject","TempEdge","_p0","_p1","end_pos","_c","_hitResult","hitTest","findTarget","_endDrag","item","_target","_destmodel","_BaseEditor","buttons_layer","editor_block","_pts","range","editor_$","BaseEditor","NodeEditor","readOnlyTemplate","_created_by","_template","_image_placeholder","_size","keys","closeEditor","onFieldChange","assign","keyCode","files","FileReader","alert","onload","target","result","readAsDataURL","focus","_picker","hover","shiftSize","_newsize","shiftThickness","_oldThickness","_newThickness","titlehtml","EdgeEditor","_from_model","_to_model","BaseButton","_NodeButton","sectorInner","lastSectorInner","drawSector","startAngle","endAngle","imageName","clearTimeout","NodeButton","delid","delete_list","time","valueOf","confirm","addHiddenNode","unset","_off","_point","addTempEdge","MiniFrame","filesaver","representations","notif_$","setup","initialScale","totalScroll","mouse_down","selected_target","Layer","background_layer","topleft","bottomRight","cliprectangle","bundles","click_mode","_allowScroll","_originalScale","_zooming","_lastTapX","_lastTapY","icon_cache","imgname","throttledMouseMove","mousemove","mousewheel","onScroll","touchstart","_touches","touches","_lastTap","pow","onDoubleClick","touchmove","_newScale","_scaleRatio","_newOffset","setScale","touchend","dblclick","dragover","dragenter","dragleave","drop","types","getData","parse","bindClick","selector","fname","evt","last","hideNodes","showNodes","fadeIn","delay","fadeOut","mouseover","onResize","_ratio","newWidth","newHeight","ratioH","delta","ratioW","resizeZoom","_thRedraw","addRepresentations","_thRedrawUsers","el","_delay","$cpwrapper","$cplist","$this","rxs","_now","findWhere","delete_scheduled","rescaleMinimap","_repr","_inR","_outR","_startAngle","_endAngle","_padding","_imgname","_caption","_startRads","PI","_endRads","_startdx","sin","_startdy","cos","_startXIn","_startYIn","_startXOut","_startYOut","_enddx","_enddy","_endXIn","_endYIn","_endXOut","_endYOut","_centerR","_centerRads","_centerX","_centerY","_centerXIn","_centerXOut","_centerYIn","_centerYOut","_textX","_textY","arcTo","PointText","characterStyle","fontSize","paragraphStyle","justification","_visible","_restPos","_grp","_imgdelta","_currentPos","_edgeRepr","_bundle","_er","_dir","savebtn","tip","_offset","force_view","_xx","_yy","_minx","_miny","_maxx","_maxy","_scale","at","redrawMiniframe","bottomright","_type","RendererType","_collection","userTemplate","allUsers","models","ulistHtml","$userpanel","$name","$cpitems","$colorsquare","$input","blur","empty","parent","name","background","_representation","_representations","_from","_tmpEdge","hideNode","last_point","_scrolldelta","SQRT1_2","open","defaultDropHandler","newNode","tweetdiv","_svgimgs","_svgpaths","_imgs","_as","fields","drop_enhancer","jsondata","drop_handler","_nodedata","fullScreen","_isFull","mozFullScreen","webkitIsFullScreen","_requestMethods","_cancelMethods","widthAft","heightAft","viewSize","zoomOut","zoomIn","_scaleWidth","_scaleHeight","addNodeBtn","addEdgeBtn","exportProject","projectJSON","projectId","fileNameToSaveAs","space_id","objId","idsMap","projectJSONStr","blob","Blob","foldBins","sizeAft","foldBinsButton","sizeBef","animate","require","config","paths","jquery","underscore","startRenkan"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,KAAgB,UAAIA,KAAgB,cAEpCA,KAAgB,UAAE,8BAAgC,SAASC,KAC3DA,MAAQA,OACR,EAAA,GAAIC,KAAKC,IAAM,EAAUC,GAAEC,OAC3B,KAAMJ,IACNE,KAAO,oBACS,OAAdD,IAAM,GAAe,GAAKA,KAC5B,yBACgB,OAAdA,IAAM,GAAe,GAAKA,KAC5B,SAGA,OAAOC,MAGPH,KAAgB,UAAE,6BAA+B,SAASC,KAC1DA,MAAQA,OACR,EAAA,GAAIC,KAAKC,IAAM,GAAIG,IAAMF,EAAEC,MAAcE,OAAMC,UAAUC,KAEzD,KAAMR,IACNE,KAAO,mDACPG,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BACA,0BACA,6BACA,4BACA,0BACA,4BACA,4BACA,qBACA,kBACG,SAAShe,EAAoByP,EAAY5N,EAAUjW,EAAM4gB,EAAUkB,EAAYC,EAAY2B,EAAYY,EAAY3N,EAAgBC,EAAkBC,EAAgBC,EAAgBK,EAAkBJ,EAAgBC,EAAmBC,EAAkB4H,EAAgBC,EAAkBC,EAAkBkG,EAAW7zB,GAInU,GAAI1H,GAAOoF,OAAOpF,IAEU,oBAAlBA,GAAKyH,WACXzH,EAAKyH,YAET,IAAIA,GAAWzH,EAAKyH,QAEpBA,GAAS0hB,oBAAsBuB,EAC/BjjB,EAASkjB,YAAcwP,EACvB1yB,EAASuO,KAAOuW,EAChB9kB,EAAS6O,KAAOA,EAChB7O,EAASyvB,SAAWA,EACpBzvB,EAASqwB,YAAcM,EACvB3wB,EAAS4wB,WAAaA,EACtB5wB,EAASuyB,WAAaA,EACtBvyB,EAAS2yB,YAAcQ,EACvBnzB,EAASwlB,eAAiBA,EAC1BxlB,EAASylB,iBAAmBA,EAC5BzlB,EAAS0lB,eAAiBA,EAC1B1lB,EAAS2lB,eAAiBA,EAC1B3lB,EAASgmB,iBAAmBA,EAC5BhmB,EAAS4lB,eAAiBA,EAC1B5lB,EAAS6lB,kBAAoBA,EAC7B7lB,EAAS8lB,iBAAmBA,EAC5B9lB,EAAS0tB,eAAiBA,EAC1B1tB,EAAS2tB,iBAAmBA,EAC5B3tB,EAAS4tB,iBAAmBA,EAC5B5tB,EAAS8zB,UAAYA,EACrB9zB,EAASC,MAAQA,EAEjBqhC,gBAGJ7f,OAAO,gBAAiB","sourcesContent":["this[\"renkanJST\"] = this[\"renkanJST\"] || {};\n\nthis[\"renkanJST\"][\"templates/colorpicker.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li data-color=\"' +\n((__t = (c)) == null ? '' : __t) +\n'\" style=\"background: ' +\n((__t = (c)) == null ? '' : __t) +\n'\"></li>';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/edgeeditor.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>' +\n__e(renkan.translate(\"Edit Edge\")) +\n'</span>\\n</h2>\\n<p>\\n    <label>' +\n__e(renkan.translate(\"Title:\")) +\n'</label>\\n    <input class=\"Rk-Edit-Title\" type=\"text\" value=\"' +\n__e(edge.title) +\n'\" />\\n</p>\\n';\n if (options.show_edge_editor_uri) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"URI:\")) +\n'</label>\\n        <input class=\"Rk-Edit-URI\" type=\"text\" value=\"' +\n__e(edge.uri) +\n'\" />\\n        <a class=\"Rk-Edit-Goto\" href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\"></a>\\n    </p>\\n    ';\n if (options.properties.length) { ;\n__p += '\\n        <p>\\n            <label>' +\n__e(renkan.translate(\"Choose from vocabulary:\")) +\n'</label>\\n            <select class=\"Rk-Edit-Vocabulary\">\\n                ';\n _.each(options.properties, function(ontology) { ;\n__p += '\\n                    <option class=\"Rk-Edit-Vocabulary-Class\" value=\"\">\\n                        ' +\n__e( renkan.translate(ontology.label) ) +\n'\\n                    </option>\\n                    ';\n _.each(ontology.properties, function(property) { var uri = ontology[\"base-uri\"] + property.uri; ;\n__p += '\\n                        <option class=\"Rk-Edit-Vocabulary-Property\" value=\"' +\n__e( uri ) +\n'\"\\n                            ';\n if (uri === edge.uri) { ;\n__p += ' selected';\n } ;\n__p += '>\\n                            ' +\n__e( renkan.translate(property.label) ) +\n'\\n                        </option>\\n                    ';\n }) ;\n__p += '\\n                ';\n }) ;\n__p += '\\n            </select>\\n        </p>\\n';\n } } ;\n__p += '\\n';\n if (options.show_edge_editor_style) { ;\n__p += '\\n    <div class=\"Rk-Editor-p\">\\n      ';\n if (options.show_edge_editor_style_color) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-color\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Edge color:\")) +\n'</span>\\n        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n            <span class=\"Rk-Edit-Color\" style=\"background: &lt;%-edge.color%>;\">\\n                <span class=\"Rk-Edit-ColorTip\"></span>\\n            </span>\\n            ' +\n((__t = ( renkan.colorPicker )) == null ? '' : __t) +\n'\\n            <span class=\"Rk-Edit-ColorPicker-Text\">' +\n__e( renkan.translate(\"Choose color\") ) +\n'</span>\\n        </div>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_dash) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-dash\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Dash:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Dash\" class=\"Rk-Edit-Dash\" ' +\n__e( edge.dash ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_thickness) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-thickness\">\\n          <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Thickness:\")) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Down\">-</a>\\n          <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Thickness-Value\">' +\n__e( edge.thickness ) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Up\">+</a>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_arrow) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-arrow\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Arrow:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Arrow\" class=\"Rk-Edit-Arrow\" ' +\n__e( edge.arrow ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_direction) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Edit-Direction\">' +\n__e( renkan.translate(\"Change edge direction\") ) +\n'</span>\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_nodes) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"From:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(edge.from_color) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.from_title, 25) ) +\n'\\n    </p>\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"To:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: >%-edge.to_color%>;\"></span>\\n        ' +\n__e( shortenText(edge.to_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_creator && edge.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: &lt;%-edge.created_by_color%>;\"></span>\\n        ' +\n__e( shortenText(edge.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/edgeeditor_readonly.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>\\n    ';\n if (options.show_edge_tooltip_color) { ;\n__p += '\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.color ) +\n';\"></span>\\n    ';\n } ;\n__p += '\\n    <span class=\"Rk-Display-Title\">\\n        ';\n if (edge.uri) { ;\n__p += '\\n            <a href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\">\\n        ';\n } ;\n__p += '\\n        ' +\n__e(edge.title) +\n'\\n        ';\n if (edge.uri) { ;\n__p += ' </a> ';\n } ;\n__p += '\\n    </span>\\n</h2>\\n';\n if (options.show_edge_tooltip_uri && edge.uri) { ;\n__p += '\\n    <p class=\"Rk-Display-URI\">\\n        <a href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\">' +\n__e( edge.short_uri ) +\n'</a>\\n    </p>\\n';\n } ;\n__p += '\\n<p>' +\n__e(edge.description) +\n'</p>\\n';\n if (options.show_edge_tooltip_nodes) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"From:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.from_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.from_title, 25) ) +\n'\\n    </p>\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"To:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.to_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.to_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_tooltip_creator && edge.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.created_by_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/annotationtemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/player/' +\n((__t = (mediaid)) == null ? '' : __t) +\n'/#id=' +\n((__t = (annotationid)) == null ? '' : __t) +\n'\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"' +\n__e(description) +\n'\">\\n\\n    <img class=\"Rk-Ldt-Annotation-Icon\" src=\"' +\n((__t = (image)) == null ? '' : __t) +\n'\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <p>' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    <p>Start: ' +\n((__t = (start)) == null ? '' : __t) +\n', End: ' +\n((__t = (end)) == null ? '' : __t) +\n', Duration: ' +\n((__t = (duration)) == null ? '' : __t) +\n'</p>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/segmenttemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/player/' +\n((__t = (mediaid)) == null ? '' : __t) +\n'/#id=' +\n((__t = (annotationid)) == null ? '' : __t) +\n'\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"' +\n__e(description) +\n'\">\\n\\n    <img class=\"Rk-Ldt-Annotation-Icon\" src=\"' +\n((__t = (image)) == null ? '' : __t) +\n'\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <p>' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    <p>Start: ' +\n((__t = (start)) == null ? '' : __t) +\n', End: ' +\n((__t = (end)) == null ? '' : __t) +\n', Duration: ' +\n((__t = (duration)) == null ? '' : __t) +\n'</p>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/tagtemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(static_url+'img/ldt-tag.png') ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/search/?search=' +\n((__t = (encodedtitle)) == null ? '' : __t) +\n'&field=all\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"Tag \\'' +\n__e(title) +\n'\\'\">\\n\\n    <img class=\"Rk-Ldt-Tag-Icon\" src=\"' +\n__e(static_url) +\n'img/ldt-tag.png\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/list-bin.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item Rk-ResourceList-Item\" draggable=\"true\"\\n    data-uri=\"' +\n__e(url) +\n'\" data-title=\"' +\n__e(title) +\n'\"\\n    data-description=\"' +\n__e(description) +\n'\"\\n    ';\n if (image) { ;\n__p += '\\n        data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    ';\n } else { ;\n__p += '\\n        data-image=\"\"\\n    ';\n } ;\n__p += '\\n>';\n if (image) { ;\n__p += '\\n    <img class=\"Rk-ResourceList-Image\" src=\"' +\n__e(image) +\n'\" />\\n';\n } ;\n__p += '\\n<h4 class=\"Rk-ResourceList-Title\">\\n    ';\n if (url) { ;\n__p += '\\n        <a href=\"' +\n__e(url) +\n'\" target=\"_blank\">\\n    ';\n } ;\n__p += '\\n    ' +\n((__t = (htitle)) == null ? '' : __t) +\n'\\n    ';\n if (url) { ;\n__p += '</a>';\n } ;\n__p += '\\n    </h4>\\n    ';\n if (description) { ;\n__p += '\\n        <p class=\"Rk-ResourceList-Description\">' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    ';\n } ;\n__p += '\\n    ';\n if (image) { ;\n__p += '\\n        <div style=\"clear: both;\"></div>\\n    ';\n } ;\n__p += '\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/main.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n if (options.show_bins) { ;\n__p += '\\n    <div class=\"Rk-Bins\">\\n        <div class=\"Rk-Bins-Head\">\\n            <h2 class=\"Rk-Bins-Title\">' +\n__e( translate(\"Select contents:\")) +\n'</h2>\\n            <form class=\"Rk-Web-Search-Form Rk-Search-Form\">\\n                <input class=\"Rk-Web-Search-Input Rk-Search-Input\" type=\"search\"\\n                    placeholder=\"' +\n__e( translate('Search the Web') ) +\n'\" />\\n                <div class=\"Rk-Search-Select\">\\n                    <div class=\"Rk-Search-Current\"></div>\\n                    <ul class=\"Rk-Search-List\"></ul>\\n                </div>\\n                <input type=\"submit\" value=\"\"\\n                    class=\"Rk-Web-Search-Submit Rk-Search-Submit\" title=\"' +\n__e( translate('Search the Web') ) +\n'\" />\\n            </form>\\n            <form class=\"Rk-Bins-Search-Form Rk-Search-Form\">\\n                <input class=\"Rk-Bins-Search-Input Rk-Search-Input\" type=\"search\"\\n                    placeholder=\"' +\n__e( translate('Search in Bins') ) +\n'\" /> <input\\n                    type=\"submit\" value=\"\"\\n                    class=\"Rk-Bins-Search-Submit Rk-Search-Submit\"\\n                    title=\"' +\n__e( translate('Search in Bins') ) +\n'\" />\\n            </form>\\n        </div>\\n        <ul class=\"Rk-Bin-List\"></ul>\\n    </div>\\n';\n } ;\n__p += ' ';\n if (options.show_editor) { ;\n__p += '\\n    <div class=\"Rk-Render Rk-Render-';\n if (options.show_bins) { ;\n__p += 'Panel';\n } else { ;\n__p += 'Full';\n } ;\n__p += '\"></div>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/nodeeditor.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n //TODO: change class to id ;\n__p += '\\n<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>' +\n__e(renkan.translate(\"Edit Node\")) +\n'</span>\\n</h2>\\n<p>\\n    <label>' +\n__e(renkan.translate(\"Title:\")) +\n'</label>\\n    <input class=\"Rk-Edit-Title\" type=\"text\" value=\"' +\n__e(node.title) +\n'\" />\\n</p>\\n';\n if (options.show_node_editor_uri) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"URI:\")) +\n'</label>\\n        <input class=\"Rk-Edit-URI\" type=\"text\" value=\"' +\n__e(node.uri) +\n'\" />\\n        <a class=\"Rk-Edit-Goto\" href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\"></a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_description) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Description:\")) +\n'</label>\\n        <textarea class=\"Rk-Edit-Description\">' +\n__e(node.description) +\n'</textarea>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_size) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Size:\")) +\n'</span>\\n        <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Size-Down\">-</a>\\n        <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Size-Value\">' +\n__e(node.size) +\n'</span>\\n        <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Size-Up\">+</a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_style) { ;\n__p += '\\n    <div class=\"Rk-Editor-p\">\\n      ';\n if (options.show_node_editor_style_color) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-color\">\\n        <span class=\"Rk-Editor-Label\">\\n        ' +\n__e(renkan.translate(\"Node color:\")) +\n'</span>\\n        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n            <span class=\"Rk-Edit-Color\" style=\"background: ' +\n__e(node.color) +\n';\">\\n                <span class=\"Rk-Edit-ColorTip\"></span>\\n            </span>\\n            ' +\n((__t = ( renkan.colorPicker )) == null ? '' : __t) +\n'\\n            <span class=\"Rk-Edit-ColorPicker-Text\">' +\n__e( renkan.translate(\"Choose color\") ) +\n'</span>\\n        </div>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_node_editor_style_dash) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-dash\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Dash:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Dash\" class=\"Rk-Edit-Dash\" ' +\n__e( node.dash ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_node_editor_style_thickness) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-thickness\">\\n          <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Thickness:\")) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Down\">-</a>\\n          <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Thickness-Value\">' +\n__e(node.thickness) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Up\">+</a>\\n      </div>\\n      ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_image) { ;\n__p += '\\n    <div class=\"Rk-Edit-ImgWrap\">\\n        <div class=\"Rk-Edit-ImgPreview\">\\n            <img src=\"' +\n__e(node.image || node.image_placeholder) +\n'\" />\\n            ';\n if (node.clip_path) { ;\n__p += '\\n                <svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewbox=\"0 0 1 1\" preserveAspectRatio=\"none\">\\n                    <path style=\"stroke-width: .02; stroke:red; fill-opacity:.3; fill:red;\" d=\"' +\n__e( node.clip_path ) +\n'\" />\\n                </svg>\\n            ';\n };\n__p += '\\n        </div>\\n    </div>\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Image URL:\")) +\n'</label>\\n        <div>\\n            <a class=\"Rk-Edit-Image-Del\" href=\"#\"></a>\\n            <input class=\"Rk-Edit-Image\" type=\"text\" value=\\'' +\n__e(node.image) +\n'\\' />\\n        </div>\\n    </p>\\n';\n if (options.allow_image_upload) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Choose Image File:\")) +\n'</label>\\n        <input class=\"Rk-Edit-Image-File\" type=\"file\" accept=\"image/*\" />\\n    </p>\\n';\n };\n\n } ;\n__p += ' ';\n if (options.show_node_editor_creator && node.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.created_by_color) +\n';\"></span>\\n        ' +\n__e( shortenText(node.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.change_shapes) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Shapes available\")) +\n':</label>\\n        <select class=\"Rk-Edit-Shape\">\\n          ';\n _.each(shapes, function(shape) { ;\n__p += '\\n            <option class=\"Rk-Edit-Vocabulary-Property\" value=\"' +\n__e( shape ) +\n'\"';\n if (node.shape === shape) { ;\n__p += ' selected';\n } ;\n__p += '>\\n                ' +\n__e( renkan.translate(shape.charAt(0).toUpperCase() + shape.substring(1)) ) +\n'\\n            </option>\\n          ';\n }); ;\n__p += '\\n        </select>\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/nodeeditor_readonly.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>\\n    ';\n if (options.show_node_tooltip_color) { ;\n__p += '\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.color) +\n';\"></span>\\n    ';\n } ;\n__p += '\\n    <span class=\"Rk-Display-Title\">\\n        ';\n if (node.uri) { ;\n__p += '\\n            <a href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\">\\n        ';\n } ;\n__p += '\\n        ' +\n__e(node.title) +\n'\\n        ';\n if (node.uri) { ;\n__p += '</a>';\n } ;\n__p += '\\n    </span>\\n</h2>\\n';\n if (node.uri && options.show_node_tooltip_uri) { ;\n__p += '\\n    <p class=\"Rk-Display-URI\">\\n        <a href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\">' +\n__e(node.short_uri) +\n'</a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_tooltip_description) { ;\n__p += '\\n    <p class=\"Rk-Display-Description\">' +\n__e(node.description) +\n'</p>\\n';\n } ;\n__p += ' ';\n if (node.image && options.show_node_tooltip_image) { ;\n__p += '\\n    <img class=\"Rk-Display-ImgPreview\" src=\"' +\n__e(node.image) +\n'\" />\\n';\n } ;\n__p += ' ';\n if (node.has_creator && options.show_node_tooltip_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.created_by_color) +\n';\"></span>\\n        ' +\n__e( shortenText(node.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/scene.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n if (options.show_top_bar) { ;\n__p += '\\n    <div class=\"Rk-TopBar\">\\n        <div class=\"loader\"></div>\\n        ';\n if (!options.editor_mode) { ;\n__p += '\\n            <h2 class=\"Rk-PadTitle\">\\n                ' +\n__e( project.get(\"title\") || translate(\"Untitled project\")) +\n'\\n            </h2>\\n        ';\n } else { ;\n__p += '\\n            <input type=\"text\" class=\"Rk-PadTitle\" value=\"' +\n__e( project.get('title') || '' ) +\n'\" placeholder=\"' +\n__e(translate('Untitled project')) +\n'\" />\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_user_list) { ;\n__p += '\\n            <div class=\"Rk-Users\">\\n                <div class=\"Rk-CurrentUser\">\\n                    ';\n if (options.show_user_color) { ;\n__p += '\\n                        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n                            <span class=\"Rk-CurrentUser-Color\">\\n                            ';\n if (options.user_color_editable) { ;\n__p += '\\n                                <span class=\"Rk-Edit-ColorTip\"></span>\\n                            ';\n } ;\n__p += '\\n                            </span>\\n                            ';\n if (options.user_color_editable) { print(colorPicker) } ;\n__p += '\\n                        </div>\\n                    ';\n } ;\n__p += '\\n                    <span class=\"Rk-CurrentUser-Name\">&lt;unknown user&gt;</span>\\n                </div>\\n                <ul class=\"Rk-UserList\"></ul>\\n            </div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.home_button_url) {;\n__p += '\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n            <a class=\"Rk-TopBar-Button Rk-Home-Button\" href=\"' +\n__e( options.home_button_url ) +\n'\">\\n                <div class=\"Rk-TopBar-Tooltip\">\\n                    <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                        ' +\n__e( translate(options.home_button_title) ) +\n'\\n                    </div>\\n                </div>\\n            </a>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_fullscreen_button) { ;\n__p += '\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n            <div class=\"Rk-TopBar-Button Rk-FullScreen-Button\">\\n                <div class=\"Rk-TopBar-Tooltip\">\\n                    <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                        ' +\n__e(translate(\"Full Screen\")) +\n'\\n                    </div>\\n                </div>\\n            </div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.editor_mode) { ;\n__p += '\\n            ';\n if (options.show_addnode_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-AddNode-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Add Node\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_addedge_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-AddEdge-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Add Edge\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_export_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Export-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Download Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_save_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Save-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\"></div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_open_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Open-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Open Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_bookmarklet) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <a class=\"Rk-TopBar-Button Rk-Bookmarklet-Button\" href=\"#\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Renkan \\'Drag-to-Add\\' bookmarklet\")) +\n'\\n                        </div>\\n                    </div>\\n                </a>\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n            ';\n } ;\n__p += '\\n        ';\n } else { ;\n__p += '\\n            ';\n if (options.show_export_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Export-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Download Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n            ';\n } ;\n__p += '\\n        ';\n }; ;\n__p += '\\n        ';\n if (options.show_search_field) { ;\n__p += '\\n            <form action=\"#\" class=\"Rk-GraphSearch-Form\">\\n                <input type=\"search\" class=\"Rk-GraphSearch-Field\" placeholder=\"' +\n__e( translate('Search in graph') ) +\n'\" />\\n            </form>\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n        ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += '\\n<div class=\"Rk-Editing-Space';\n if (!options.show_top_bar) { ;\n__p += ' Rk-Editing-Space-Full';\n } ;\n__p += '\">\\n    <div class=\"Rk-Labels\"></div>\\n    <canvas class=\"Rk-Canvas\" ';\n if (options.resize) { ;\n__p += ' resize=\"\" ';\n } ;\n__p += ' ></canvas>\\n    <div class=\"Rk-Notifications\"></div>\\n    <div class=\"Rk-Editor\">\\n        ';\n if (options.show_bins) { ;\n__p += '\\n            <div class=\"Rk-Fold-Bins\">&laquo;</div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_zoom) { ;\n__p += '\\n            <div class=\"Rk-ZoomButtons\">\\n                <div class=\"Rk-ZoomIn\" title=\"' +\n__e(translate('Zoom In')) +\n'\"></div>\\n                <div class=\"Rk-ZoomFit\" title=\"' +\n__e(translate('Zoom Fit')) +\n'\"></div>\\n                <div class=\"Rk-ZoomOut\" title=\"' +\n__e(translate('Zoom Out')) +\n'\"></div>\\n                ';\n if (options.editor_mode && options.save_view) { ;\n__p += '\\n                    <div class=\"Rk-ZoomSave\" title=\"' +\n__e(translate('Zoom Save')) +\n'\"></div>\\n                ';\n } ;\n__p += '\\n                ';\n if (options.save_view) { ;\n__p += '\\n                    <div class=\"Rk-ZoomSetSaved\" title=\"' +\n__e(translate('View saved zoom')) +\n'\"></div>\\n                \\t<div class=\"Rk-ShowHiddenNodes\" title=\"' +\n__e(translate('Show hidden nodes')) +\n'\"></div>\\n                ';\n } ;\n__p += '\\n            </div>\\n        ';\n } ;\n__p += '\\n    </div>\\n</div>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/search.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"' +\n((__t = ( className )) == null ? '' : __t) +\n'\" data-key=\"' +\n((__t = ( key )) == null ? '' : __t) +\n'\">' +\n((__t = ( title )) == null ? '' : __t) +\n'</li>';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/wikipedia-bin/resulttemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Wikipedia-Result Rk-Bin-Item\" draggable=\"true\"\\n    data-uri=\"' +\n__e(url) +\n'\" data-title=\"Wikipedia: ' +\n__e(title) +\n'\"\\n    data-description=\"' +\n__e(description) +\n'\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL( static_url + 'img/wikipedia.png' ) ) +\n'\">\\n\\n    <img class=\"Rk-Wikipedia-Icon\" src=\"' +\n__e(static_url) +\n'img/wikipedia.png\">\\n    <h4 class=\"Rk-Wikipedia-Title\">\\n        <a href=\"' +\n__e(url) +\n'\" target=\"_blank\">' +\n((__t = (htitle)) == null ? '' : __t) +\n'</a>\\n    </h4>\\n    <p class=\"Rk-Wikipedia-Snippet\">' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n</li>\\n';\n\n}\nreturn __p\n};","/* Declaring the Renkan Namespace Rkns and Default values */\n\n(function(root) {\n\n    \"use strict\";\n\n    if (typeof root.Rkns !== \"object\") {\n        root.Rkns = {};\n    }\n\n    var Rkns = root.Rkns;\n    var $ = Rkns.$ = root.jQuery;\n    var _ = Rkns._ = root._;\n\n    Rkns.pickerColors = [\"#8f1919\", \"#a80000\", \"#d82626\", \"#ff0000\", \"#e87c7c\", \"#ff6565\", \"#f7d3d3\", \"#fecccc\",\n        \"#8f5419\", \"#a85400\", \"#d87f26\", \"#ff7f00\", \"#e8b27c\", \"#ffb265\", \"#f7e5d3\", \"#fee5cc\",\n        \"#8f8f19\", \"#a8a800\", \"#d8d826\", \"#feff00\", \"#e8e87c\", \"#feff65\", \"#f7f7d3\", \"#fefecc\",\n        \"#198f19\", \"#00a800\", \"#26d826\", \"#00ff00\", \"#7ce87c\", \"#65ff65\", \"#d3f7d3\", \"#ccfecc\",\n        \"#198f8f\", \"#00a8a8\", \"#26d8d8\", \"#00feff\", \"#7ce8e8\", \"#65feff\", \"#d3f7f7\", \"#ccfefe\",\n        \"#19198f\", \"#0000a8\", \"#2626d8\", \"#0000ff\", \"#7c7ce8\", \"#6565ff\", \"#d3d3f7\", \"#ccccfe\",\n        \"#8f198f\", \"#a800a8\", \"#d826d8\", \"#ff00fe\", \"#e87ce8\", \"#ff65fe\", \"#f7d3f7\", \"#feccfe\",\n        \"#000000\", \"#242424\", \"#484848\", \"#6d6d6d\", \"#919191\", \"#b6b6b6\", \"#dadada\", \"#ffffff\"\n    ];\n\n    Rkns.__renkans = [];\n\n    var _BaseBin = Rkns._BaseBin = function(_renkan, _opts) {\n        if (typeof _renkan !== \"undefined\") {\n            this.renkan = _renkan;\n            this.renkan.$.find(\".Rk-Bin-Main\").hide();\n            this.$ = Rkns.$('<li>')\n                .addClass(\"Rk-Bin\")\n                .appendTo(_renkan.$.find(\".Rk-Bin-List\"));\n            this.title_icon_$ = Rkns.$('<span>')\n                .addClass(\"Rk-Bin-Title-Icon\")\n                .appendTo(this.$);\n\n            var _this = this;\n\n            Rkns.$('<a>')\n                .attr({\n                    href: \"#\",\n                    title: _renkan.translate(\"Close bin\")\n                })\n                .addClass(\"Rk-Bin-Close\")\n                .html('&times;')\n                .appendTo(this.$)\n                .click(function() {\n                    _this.destroy();\n                    if (!_renkan.$.find(\".Rk-Bin-Main:visible\").length) {\n                        _renkan.$.find(\".Rk-Bin-Main:last\").slideDown();\n                    }\n                    _renkan.resizeBins();\n                    return false;\n                });\n            Rkns.$('<a>')\n                .attr({\n                    href: \"#\",\n                    title: _renkan.translate(\"Refresh bin\")\n                })\n                .addClass(\"Rk-Bin-Refresh\")\n                .appendTo(this.$)\n                .click(function() {\n                    _this.refresh();\n                    return false;\n                });\n            this.count_$ = Rkns.$('<div>')\n                .addClass(\"Rk-Bin-Count\")\n                .appendTo(this.$);\n            this.title_$ = Rkns.$('<h2>')\n                .addClass(\"Rk-Bin-Title\")\n                .appendTo(this.$);\n            this.main_$ = Rkns.$('<div>')\n                .addClass(\"Rk-Bin-Main\")\n                .appendTo(this.$)\n                .html('<h4 class=\"Rk-Bin-Loading\">' + _renkan.translate(\"Loading, please wait\") + '</h4>');\n            this.title_$.html(_opts.title || '(new bin)');\n            this.renkan.resizeBins();\n\n            if (_opts.auto_refresh) {\n                window.setInterval(function() {\n                    _this.refresh();\n                }, _opts.auto_refresh);\n            }\n        }\n    };\n\n    _BaseBin.prototype.destroy = function() {\n        this.$.detach();\n        this.renkan.resizeBins();\n    };\n\n    /* Point of entry */\n\n    var Renkan = Rkns.Renkan = function(_opts) {\n        var _this = this;\n\n        Rkns.__renkans.push(this);\n\n        this.options = _.defaults(_opts, Rkns.defaults, {\n            templates: renkanJST\n        });\n        this.template = renkanJST['templates/main.html'];\n\n        _.each(this.options.property_files, function(f) {\n            Rkns.$.getJSON(f, function(data) {\n                _this.options.properties = _this.options.properties.concat(data);\n            });\n        });\n\n        this.read_only = this.options.read_only || !this.options.editor_mode;\n\n        this.project = new Rkns.Models.Project();\n        this.dataloader = new Rkns.DataLoader.Loader(this.project, this.options);\n\n        this.setCurrentUser = function(user_id, user_name) {\n            this.project.addUser({\n                _id: user_id,\n                title: user_name\n            });\n            this.current_user = user_id;\n            this.renderer.redrawUsers();\n        };\n\n        if (typeof this.options.user_id !== \"undefined\") {\n            this.current_user = this.options.user_id;\n        }\n        this.$ = Rkns.$(\"#\" + this.options.container);\n        this.$\n            .addClass(\"Rk-Main\")\n            .html(this.template(this));\n\n        this.tabs = [];\n        this.search_engines = [];\n\n        this.current_user_list = new Rkns.Models.UsersList();\n\n        this.current_user_list.on(\"add remove\", function() {\n            if (this.renderer) {\n                this.renderer.redrawUsers();\n            }\n        });\n\n        this.colorPicker = (function() {\n            var _tmpl = renkanJST['templates/colorpicker.html'];\n            return '<ul class=\"Rk-Edit-ColorPicker\">' + Rkns.pickerColors.map(function(c) {\n                return _tmpl({\n                    c: c\n                });\n            }).join(\"\") + '</ul>';\n        })();\n\n        if (this.options.show_editor) {\n            this.renderer = new Rkns.Renderer.Scene(this);\n        }\n\n        if (!this.options.search.length) {\n            this.$.find(\".Rk-Web-Search-Form\").detach();\n        } else {\n            var _tmpl = renkanJST['templates/search.html'],\n                _select = this.$.find(\".Rk-Search-List\"),\n                _input = this.$.find(\".Rk-Web-Search-Input\"),\n                _form = this.$.find(\".Rk-Web-Search-Form\");\n            _.each(this.options.search, function(_search, _key) {\n                if (Rkns[_search.type] && Rkns[_search.type].Search) {\n                    _this.search_engines.push(new Rkns[_search.type].Search(_this, _search));\n                }\n            });\n            _select.html(\n                _(this.search_engines).map(function(_search, _key) {\n                    return _tmpl({\n                        key: _key,\n                        title: _search.getSearchTitle(),\n                        className: _search.getBgClass()\n                    });\n                }).join(\"\")\n            );\n            _select.find(\"li\").click(function() {\n                var _el = Rkns.$(this);\n                _this.setSearchEngine(_el.attr(\"data-key\"));\n                _form.submit();\n            });\n            _form.submit(function() {\n                if (_input.val()) {\n                    var _search = _this.search_engine;\n                    _search.search(_input.val());\n                }\n                return false;\n            });\n            this.$.find(\".Rk-Search-Current\").mouseenter(\n                function() {\n                    _select.slideDown();\n                }\n            );\n            this.$.find(\".Rk-Search-Select\").mouseleave(\n                function() {\n                    _select.hide();\n                }\n            );\n            this.setSearchEngine(0);\n        }\n        _.each(this.options.bins, function(_bin) {\n            if (Rkns[_bin.type] && Rkns[_bin.type].Bin) {\n                _this.tabs.push(new Rkns[_bin.type].Bin(_this, _bin));\n            }\n        });\n\n        var elementDropped = false;\n\n        this.$.find(\".Rk-Bins\")\n            .on(\"click\", \".Rk-Bin-Title,.Rk-Bin-Title-Icon\", function() {\n                var _mainDiv = Rkns.$(this).siblings(\".Rk-Bin-Main\");\n                if (_mainDiv.is(\":hidden\")) {\n                    _this.$.find(\".Rk-Bin-Main\").slideUp();\n                    _mainDiv.slideDown();\n                }\n            });\n\n        if (this.options.show_editor) {\n\n            this.$.find(\".Rk-Bins\").on(\"mouseover\", \".Rk-Bin-Item\", function(_e) {\n                var _t = Rkns.$(this);\n                if (_t && $(_t).attr(\"data-uri\")) {\n                    var _models = _this.project.get(\"nodes\").where({\n                        uri: $(_t).attr(\"data-uri\")\n                    });\n                    _.each(_models, function(_model) {\n                        _this.renderer.highlightModel(_model);\n                    });\n                }\n            }).mouseout(function() {\n                _this.renderer.unhighlightAll();\n            }).on(\"mousemove\", \".Rk-Bin-Item\", function(e) {\n                try {\n                    this.dragDrop();\n                } catch (err) {}\n            }).on(\"touchstart\", \".Rk-Bin-Item\", function(e) {\n                elementDropped = false;\n            }).on(\"touchmove\", \".Rk-Bin-Item\", function(e) {\n                e.preventDefault();\n                var touch = e.originalEvent.changedTouches[0],\n                    off = _this.renderer.canvas_$.offset(),\n                    w = _this.renderer.canvas_$.width(),\n                    h = _this.renderer.canvas_$.height();\n                if (touch.pageX >= off.left && touch.pageX < (off.left + w) && touch.pageY >= off.top && touch.pageY < (off.top + h)) {\n                    if (elementDropped) {\n                        _this.renderer.onMouseMove(touch, true);\n                    } else {\n                        elementDropped = true;\n                        var div = document.createElement('div');\n                        div.appendChild(this.cloneNode(true));\n                        _this.renderer.dropData({\n                            \"text/html\": div.innerHTML\n                        }, touch);\n                        _this.renderer.onMouseDown(touch, true);\n                    }\n                }\n            }).on(\"touchend\", \".Rk-Bin-Item\", function(e) {\n                if (elementDropped) {\n                    _this.renderer.onMouseUp(e.originalEvent.changedTouches[0], true);\n                }\n                elementDropped = false;\n            }).on(\"dragstart\", \".Rk-Bin-Item\", function(e) {\n                var div = document.createElement('div');\n                div.appendChild(this.cloneNode(true));\n                try {\n                    e.originalEvent.dataTransfer.setData(\"text/html\", div.innerHTML);\n                } catch (err) {\n                    e.originalEvent.dataTransfer.setData(\"text\", div.innerHTML);\n                }\n            });\n\n        }\n\n        Rkns.$(window).resize(function() {\n            _this.resizeBins();\n        });\n\n        var lastsearch = false,\n            lastval = '';\n\n        this.$.find(\".Rk-Bins-Search-Input\").on(\"change keyup paste input\", function() {\n            var val = Rkns.$(this).val();\n            if (val === lastval) {\n                return;\n            }\n            var search = Rkns.Utils.regexpFromTextOrArray(val.length > 1 ? val : null);\n            if (search.source === lastsearch) {\n                return;\n            }\n            lastsearch = search.source;\n            _.each(_this.tabs, function(tab) {\n                tab.render(search);\n            });\n\n        });\n        this.$.find(\".Rk-Bins-Search-Form\").submit(function() {\n            return false;\n        });\n\n    };\n\n    Renkan.prototype.translate = function(_text) {\n        if (Rkns.i18n[this.options.language] && Rkns.i18n[this.options.language][_text]) {\n            return Rkns.i18n[this.options.language][_text];\n        }\n        if (this.options.language.length > 2 && Rkns.i18n[this.options.language.substr(0, 2)] && Rkns.i18n[this.options.language.substr(0, 2)][_text]) {\n            return Rkns.i18n[this.options.language.substr(0, 2)][_text];\n        }\n        return _text;\n    };\n\n    Renkan.prototype.onStatusChange = function() {\n        this.renderer.onStatusChange();\n    };\n\n    Renkan.prototype.setSearchEngine = function(_key) {\n        this.search_engine = this.search_engines[_key];\n        this.$.find(\".Rk-Search-Current\").attr(\"class\", \"Rk-Search-Current \" + this.search_engine.getBgClass());\n        var listClasses = this.search_engine.getBgClass().split(\" \");\n        var classes = \"\";\n        for (var i = 0; i < listClasses.length; i++) {\n            classes += \".\" + listClasses[i];\n        }\n        this.$.find(\".Rk-Web-Search-Input.Rk-Search-Input\").attr(\"placeholder\", this.translate(\"Search in \") + this.$.find(\".Rk-Search-List \" + classes).html());\n    };\n\n    Renkan.prototype.resizeBins = function() {\n        var _d = +this.$.find(\".Rk-Bins-Head\").outerHeight();\n        this.$.find(\".Rk-Bin-Title:visible\").each(function() {\n            _d += Rkns.$(this).outerHeight();\n        });\n        this.$.find(\".Rk-Bin-Main\").css({\n            height: this.$.find(\".Rk-Bins\").height() - _d\n        });\n    };\n\n    /* Utility functions */\n    var getUUID4 = function() {\n        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n            var r = Math.random() * 16 | 0,\n                v = c === 'x' ? r : (r & 0x3 | 0x8);\n            return v.toString(16);\n        });\n    };\n\n    Rkns.Utils = {\n        getUUID4: getUUID4,\n        getUID: (function() {\n            function pad(n) {\n                return n < 10 ? '0' + n : n;\n            }\n            var _d = new Date(),\n                ID_AUTO_INCREMENT = 0,\n                ID_BASE = _d.getUTCFullYear() + '-' +\n                pad(_d.getUTCMonth() + 1) + '-' +\n                pad(_d.getUTCDate()) + '-' +\n                getUUID4();\n            return function(_base) {\n                var _n = (++ID_AUTO_INCREMENT).toString(16),\n                    _uidbase = (typeof _base === \"undefined\" ? \"\" : _base + \"-\");\n                while (_n.length < 4) {\n                    _n = '0' + _n;\n                }\n                return _uidbase + ID_BASE + '-' + _n;\n            };\n        })(),\n        getFullURL: function(url) {\n\n            if (typeof(url) === 'undefined' || url == null) {\n                return \"\";\n            }\n            if (/https?:\\/\\//.test(url)) {\n                return url;\n            }\n            var img = new Image();\n            img.src = url;\n            var res = img.src;\n            img.src = null;\n            return res;\n\n        },\n        inherit: function(_baseClass, _callbefore) {\n\n            var _class = function(_arg) {\n                if (typeof _callbefore === \"function\") {\n                    _callbefore.apply(this, Array.prototype.slice.call(arguments, 0));\n                }\n                _baseClass.apply(this, Array.prototype.slice.call(arguments, 0));\n                if (typeof this._init === \"function\" && !this._initialized) {\n                    this._init.apply(this, Array.prototype.slice.call(arguments, 0));\n                    this._initialized = true;\n                }\n            };\n            _.extend(_class.prototype, _baseClass.prototype);\n\n            return _class;\n\n        },\n        regexpFromTextOrArray: (function() {\n            var charsub = [\n                    '[aáàâä]',\n                    '[cç]',\n                    '[eéèêë]',\n                    '[iíìîï]',\n                    '[oóòôö]',\n                    '[uùûü]'\n                ],\n                removeChars = [\n                    String.fromCharCode(768), String.fromCharCode(769), String.fromCharCode(770), String.fromCharCode(771), String.fromCharCode(807),\n                    \"{\", \"}\", \"(\", \")\", \"[\", \"]\", \"【\", \"】\", \"、\", \"・\", \"‥\", \"。\", \"「\", \"」\", \"『\", \"』\", \"〜\", \":\", \"!\", \"?\", \" \",\n                    \",\", \" \", \";\", \"(\", \")\", \".\", \"*\", \"+\", \"\\\\\", \"?\", \"|\", \"{\", \"}\", \"[\", \"]\", \"^\", \"#\", \"/\"\n                ],\n                remsrc = \"[\\\\\" + removeChars.join(\"\\\\\") + \"]\",\n                remrx = new RegExp(remsrc, \"gm\"),\n                charsrx = _.map(charsub, function(c) {\n                    return new RegExp(c);\n                });\n\n            function replaceText(_text) {\n                var txt = _text.toLowerCase().replace(remrx, \"\"),\n                    src = \"\";\n\n                function makeReplaceFunc(l) {\n                    return function(k, v) {\n                        l = l.replace(charsrx[k], v);\n                    };\n                }\n                for (var j = 0; j < txt.length; j++) {\n                    if (j) {\n                        src += remsrc + \"*\";\n                    }\n                    var l = txt[j];\n                    _.each(charsub, makeReplaceFunc(l));\n                    src += l;\n                }\n                return src;\n            }\n\n            function getSource(inp) {\n                switch (typeof inp) {\n                    case \"string\":\n                        return replaceText(inp);\n                    case \"object\":\n                        var src = '';\n                        _.each(inp, function(v) {\n                            var res = getSource(v);\n                            if (res) {\n                                if (src) {\n                                    src += '|';\n                                }\n                                src += res;\n                            }\n                        });\n                        return src;\n                }\n                return '';\n            }\n\n            return function(_textOrArray) {\n                var source = getSource(_textOrArray);\n                if (source) {\n                    var testrx = new RegExp(source, \"im\"),\n                        replacerx = new RegExp('(' + source + ')', \"igm\");\n                    return {\n                        isempty: false,\n                        source: source,\n                        test: function(_t) {\n                            return testrx.test(_t);\n                        },\n                        replace: function(_text, _replace) {\n                            return _text.replace(replacerx, _replace);\n                        }\n                    };\n                } else {\n                    return {\n                        isempty: true,\n                        source: '',\n                        test: function() {\n                            return true;\n                        },\n                        replace: function(_text) {\n                            return text;\n                        }\n                    };\n                }\n            };\n        })(),\n        /* The minimum distance (in pixels) the mouse has to move to consider an element was dragged */\n        _MIN_DRAG_DISTANCE: 2,\n        /* Distance between the inner and outer radius of buttons that appear when hovering on a node */\n        _NODE_BUTTON_WIDTH: 40,\n\n        _EDGE_BUTTON_INNER: 2,\n        _EDGE_BUTTON_OUTER: 40,\n        /* Constants used to know if a specific action is to be performed when clicking on the canvas */\n        _CLICKMODE_ADDNODE: 1,\n        _CLICKMODE_STARTEDGE: 2,\n        _CLICKMODE_ENDEDGE: 3,\n        /* Node size step: Used to calculate the size change when clicking the +/- buttons */\n        _NODE_SIZE_STEP: Math.LN2 / 4,\n        _MIN_SCALE: 1 / 20,\n        _MAX_SCALE: 20,\n        _MOUSEMOVE_RATE: 80,\n        _DOUBLETAP_DELAY: 800,\n        /* Maximum distance in pixels (squared, to reduce calculations)\n         * between two taps when double-tapping on a touch terminal */\n        _DOUBLETAP_DISTANCE: 20 * 20,\n        /* A placeholder so a default colour is displayed when a node has a null value for its user property */\n        _USER_PLACEHOLDER: function(_renkan) {\n            return {\n                color: _renkan.options.default_user_color,\n                title: _renkan.translate(\"(unknown user)\"),\n                get: function(attr) {\n                    return this[attr] || false;\n                }\n            };\n        },\n        /* The code for the \"Drag and Add Bookmarklet\", slightly minified and with whitespaces removed, though\n         * it doesn't seem that it's still a requirement in newer browsers (i.e. the ones compatibles with canvas drawing)\n         */\n        _BOOKMARKLET_CODE: function(_renkan) {\n            return \"(function(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r){a=document;b=a.body;c=a.location.href;j='draggable';m='text/x-iri-';d=a.createElement('div');d.innerHTML='<p_style=\\\"position:fixed;top:0;right:0;font:bold_18px_sans-serif;color:#fff;background:#909;padding:10px;z-index:100000;\\\">\" +\n                _renkan.translate(\"Drag items from this website, drop them in Renkan\").replace(/ /g, \"_\") +\n                \"</p>'.replace(/_/g,String.fromCharCode(32));b.appendChild(d);e=[{r:/https?:\\\\/\\\\/[^\\\\/]*twitter\\\\.com\\\\//,s:'.tweet',n:'twitter'},{r:/https?:\\\\/\\\\/[^\\\\/]*google\\\\.[^\\\\/]+\\\\//,s:'.g',n:'google'},{r:/https?:\\\\/\\\\/[^\\\\/]*lemonde\\\\.fr\\\\//,s:'[data-vr-contentbox]',n:'lemonde'}];f=false;e.forEach(function(g){if(g.r.test(c)){f=g;}});if(f){h=function(){Array.prototype.forEach.call(a.querySelectorAll(f.s),function(i){i[j]=true;k=i.style;k.borderWidth='2px';k.borderColor='#909';k.borderStyle='solid';k.backgroundColor='rgba(200,0,180,.1)';})};window.setInterval(h,500);h();};a.addEventListener('dragstart',function(k){l=k.dataTransfer;l.setData(m+'source-uri',c);l.setData(m+'source-title',a.title);n=k.target;if(f){o=n;while(!o.attributes[j]){o=o.parentNode;if(o==b){break;}}}if(f&&o.attributes[j]){p=o.cloneNode(true);l.setData(m+'specific-site',f.n)}else{q=a.getSelection();if(q.type==='Range'||!q.type){p=q.getRangeAt(0).cloneContents();}else{p=n.cloneNode();}}r=a.createElement('div');r.appendChild(p);l.setData('text/x-iri-selected-text',r.textContent.trim());l.setData('text/x-iri-selected-html',r.innerHTML);},false);})();\";\n        },\n        /* Shortens text to the required length then adds ellipsis */\n        shortenText: function(_text, _maxlength) {\n            return (_text.length > _maxlength ? (_text.substr(0, _maxlength) + '…') : _text);\n        },\n        /* Drawing an edit box with an arrow and positioning the edit box according to the position of the node/edge being edited\n         * Called by Rkns.Renderer.NodeEditor and Rkns.Renderer.EdgeEditor */\n        drawEditBox: function(_options, _coords, _path, _xmargin, _selector) {\n            _selector.css({\n                width: (_options.tooltip_width - 2 * _options.tooltip_padding)\n            });\n            var _height = _selector.outerHeight() + 2 * _options.tooltip_padding,\n                _isLeft = (_coords.x < paper.view.center.x ? 1 : -1),\n                _left = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length),\n                _right = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length + _options.tooltip_width),\n                _top = _coords.y - _height / 2;\n            if (_top + _height > (paper.view.size.height - _options.tooltip_margin)) {\n                _top = Math.max(paper.view.size.height - _options.tooltip_margin, _coords.y + _options.tooltip_arrow_width / 2) - _height;\n            }\n            if (_top < _options.tooltip_margin) {\n                _top = Math.min(_options.tooltip_margin, _coords.y - _options.tooltip_arrow_width / 2);\n            }\n            var _bottom = _top + _height;\n            /* jshint laxbreak:true */\n            _path.segments[0].point = _path.segments[7].point = _coords.add([_isLeft * _xmargin, 0]);\n            _path.segments[1].point.x = _path.segments[2].point.x = _path.segments[5].point.x = _path.segments[6].point.x = _left;\n            _path.segments[3].point.x = _path.segments[4].point.x = _right;\n            _path.segments[2].point.y = _path.segments[3].point.y = _top;\n            _path.segments[4].point.y = _path.segments[5].point.y = _bottom;\n            _path.segments[1].point.y = _coords.y - _options.tooltip_arrow_width / 2;\n            _path.segments[6].point.y = _coords.y + _options.tooltip_arrow_width / 2;\n            _path.closed = true;\n            _path.fillColor = new paper.GradientColor(new paper.Gradient([_options.tooltip_top_color, _options.tooltip_bottom_color]), [0, _top], [0, _bottom]);\n            _selector.css({\n                left: (_options.tooltip_padding + Math.min(_left, _right)),\n                top: (_options.tooltip_padding + _top)\n            });\n            return _path;\n        },\n        // from http://stackoverflow.com/a/6444043\n        increaseBrightness: function (hex, percent){\n            // strip the leading # if it's there\n            hex = hex.replace(/^\\s*#|\\s*$/g, '');\n\n            // convert 3 char codes --> 6, e.g. `E0F` --> `EE00FF`\n            if(hex.length === 3){\n                hex = hex.replace(/(.)/g, '$1$1');\n            }\n\n            var r = parseInt(hex.substr(0, 2), 16),\n                g = parseInt(hex.substr(2, 2), 16),\n                b = parseInt(hex.substr(4, 2), 16);\n\n            return '#' +\n               ((0|(1<<8) + r + (256 - r) * percent / 100).toString(16)).substr(1) +\n               ((0|(1<<8) + g + (256 - g) * percent / 100).toString(16)).substr(1) +\n               ((0|(1<<8) + b + (256 - b) * percent / 100).toString(16)).substr(1);\n        }\n    };\n})(window);\n\n/* END main.js */\n","(function(root) {\n\n    \"use strict\";\n\n    var DataLoader = root.Rkns.DataLoader = {\n        converters: {\n            from1to2: function(data) {\n\n                var i, len;\n                if(typeof data.nodes !== 'undefined') {\n                    for(i=0, len=data.nodes.length; i<len; i++) {\n                        var node = data.nodes[i];\n                        if(node.color) {\n                            console.log(\"node color : \", node.color);\n                            node.style = {\n                                color: node.color,\n                            };\n                        }\n                        else {\n                            node.style = {};\n                        }\n                    }\n                }\n                if(typeof data.edges !== 'undefined') {\n                    for(i=0, len=data.edges.length; i<len; i++) {\n                        var edge = data.edges[i];\n                        if(edge.color) {\n                            edge.style = {\n                                color: edge.color,\n                            };\n                        }\n                        else {\n                            edge.style = {};\n                        }\n                    }\n                }\n\n                data.schema_version = \"2\";\n\n                return data;\n            },\n        }\n    };\n\n\n    DataLoader.Loader = function(project, options) {\n        this.project = project;\n        this.dataConverters = _.defaults(options.converters || {}, DataLoader.converters);\n    };\n\n\n    DataLoader.Loader.prototype.convert = function(data) {\n        var schemaVersionFrom = this.project.getSchemaVersion(data);\n        var schemaVersionTo = this.project.getSchemaVersion();\n\n        if (schemaVersionFrom !== schemaVersionTo) {\n            var converterName = \"from\" + schemaVersionFrom + \"to\" + schemaVersionTo;\n            if (typeof this.dataConverters[converterName] === 'function') {\n                console.log(\"Apply conversion function :\", converterName);\n                data = this.dataConverters[converterName](data);\n            }\n        }\n        return data;\n    };\n\n    DataLoader.Loader.prototype.load = function(data) {\n        console.log(data);\n        this.project.set(this.convert(data), {\n            validate: true\n        });\n    };\n\n})(window);\n","(function(root) {\n    \"use strict\";\n\n    var Backbone = root.Backbone;\n\n    var Models = root.Rkns.Models = {};\n\n    Models.getUID = function(obj) {\n        var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,\n                function(c) {\n                    var r = Math.random() * 16 | 0, v = c === 'x' ? r\n                            : (r & 0x3 | 0x8);\n                    return v.toString(16);\n                });\n        if (typeof obj !== 'undefined') {\n            return obj.type + \"-\" + guid;\n        }\n        else {\n            return guid;\n        }\n    };\n\n    var RenkanModel = Backbone.RelationalModel.extend({\n        idAttribute : \"_id\",\n        constructor : function(options) {\n\n            if (typeof options !== \"undefined\") {\n                options._id = options._id || options.id || Models.getUID(this);\n                options.title = options.title || \"\";\n                options.description = options.description || \"\";\n                options.uri = options.uri || \"\";\n\n                if (typeof this.prepare === \"function\") {\n                    options = this.prepare(options);\n                }\n            }\n            Backbone.RelationalModel.prototype.constructor.call(this, options);\n        },\n        validate : function() {\n            if (!this.type) {\n                return \"object has no type\";\n            }\n        },\n        addReference : function(_options, _propName, _list, _id, _default) {\n            var _element = _list.get(_id);\n            if (typeof _element === \"undefined\" &&\n                typeof _default !== \"undefined\") {\n                _options[_propName] = _default;\n            }\n            else {\n                _options[_propName] = _element;\n            }\n        }\n    });\n\n    // USER\n    var User = Models.User = RenkanModel.extend({\n        type : \"user\",\n        prepare : function(options) {\n            options.color = options.color || \"#666666\";\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                color : this.get(\"color\")\n            };\n        }\n    });\n\n    // NODE\n    var Node = Models.Node = RenkanModel.extend({\n        type : \"node\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            options.description = options.description || \"\";\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                position : this.get(\"position\"),\n                image : this.get(\"image\"),\n                style : this.get(\"style\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null,\n                size : this.get(\"size\"),\n                clip_path : this.get(\"clip_path\"),\n                shape : this.get(\"shape\"),  \n                type : this.get(\"type\")\n            };\n        }\n    });\n\n    // EDGE\n    var Edge = Models.Edge = RenkanModel.extend({\n        type : \"edge\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        }, {\n            type : Backbone.HasOne,\n            key : \"from\",\n            relatedModel : Node\n        }, {\n            type : Backbone.HasOne,\n            key : \"to\",\n            relatedModel : Node\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            this.addReference(options, \"from\", project.get(\"nodes\"),\n                    options.from);\n            this.addReference(options, \"to\", project.get(\"nodes\"), options.to);\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                from : this.get(\"from\") ? this.get(\"from\").get(\"_id\") : null,\n                to : this.get(\"to\") ? this.get(\"to\").get(\"_id\") : null,\n                style : this.get(\"style\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null\n            };\n        }\n    });\n\n    // View\n    var View = Models.View = RenkanModel.extend({\n        type : \"view\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            options.description = options.description || \"\";\n            if (typeof options.offset !== \"undefined\") {\n                var offset = {};\n                if (Array.isArray(options.offset)) {\n                    offset.x = options.offset[0];\n                    offset.y = options.offset.length > 1 ? options.offset[1]\n                            : options.offset[0];\n                }\n                else if (options.offset.x != null) {\n                    offset.x = options.offset.x;\n                    offset.y = options.offset.y;\n                }\n                options.offset = offset;\n            }\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                zoom_level : this.get(\"zoom_level\"),\n                offset : this.get(\"offset\"),\n                title : this.get(\"title\"),\n                description : this.get(\"description\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null,\n                hidden_nodes: this.get(\"hidden_nodes\")\n            // Don't need project id\n            };\n        }\n    });\n\n    // PROJECT\n    var Project = Models.Project = RenkanModel.extend({\n        schema_version : \"2\",\n        type : \"project\",\n        blacklist : [ 'saveStatus', 'loadingStatus'],\n        relations : [ {\n            type : Backbone.HasMany,\n            key : \"users\",\n            relatedModel : User,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"nodes\",\n            relatedModel : Node,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"edges\",\n            relatedModel : Edge,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"views\",\n            relatedModel : View,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        } ],\n        addUser : function(_props, _options) {\n            _props.project = this;\n            var _user = User.findOrCreate(_props);\n            this.get(\"users\").push(_user, _options);\n            return _user;\n        },\n        addNode : function(_props, _options) {\n            _props.project = this;\n            var _node = Node.findOrCreate(_props);\n            this.get(\"nodes\").push(_node, _options);\n            return _node;\n        },\n        addEdge : function(_props, _options) {\n            _props.project = this;\n            var _edge = Edge.findOrCreate(_props);\n            this.get(\"edges\").push(_edge, _options);\n            return _edge;\n        },\n        addView : function(_props, _options) {\n            _props.project = this;\n            // TODO: check if need to replace with create only\n            var _view = View.findOrCreate(_props);\n            // TODO: Should we remember only one view?\n            this.get(\"views\").push(_view, _options);\n            return _view;\n        },\n        removeNode : function(_model) {\n            this.get(\"nodes\").remove(_model);\n        },\n        removeEdge : function(_model) {\n            this.get(\"edges\").remove(_model);\n        },\n        validate : function(options) {\n            var _project = this;\n            _.each(\n              [].concat(options.users, options.nodes, options.edges,options.views),\n              function(_item) {\n                if (_item) {\n                    _item.project = _project;\n                }\n              }\n            );\n        },\n        getSchemaVersion : function(data) {\n          var t = data;\n          if(typeof(t) === \"undefined\") {\n            t = this;\n          }\n          var version = t.schema_version;\n          if(!version) {\n            return 1;\n          }\n          else {\n            return version;\n          }\n        },\n        // Add event handler to remove edges when a node is removed\n        initialize : function() {\n            var _this = this;\n            this.on(\"remove:nodes\", function(_node) {\n                _this.get(\"edges\").remove(\n                        _this.get(\"edges\").filter(\n                                function(_edge) {\n                                    return _edge.get(\"from\") === _node ||\n                                           _edge.get(\"to\") === _node;\n                                }));\n            });\n        },\n        toJSON : function() {\n            var json = _.clone(this.attributes);\n            for ( var attr in json) {\n                if ((json[attr] instanceof Backbone.Model) ||\n                        (json[attr] instanceof Backbone.Collection) ||\n                        (json[attr] instanceof RenkanModel)) {\n                    json[attr] = json[attr].toJSON();\n                }\n            }\n            return _.omit(json, this.blacklist);\n        }\n    });\n\n    var RosterUser = Models.RosterUser = Backbone.Model\n            .extend({\n                type : \"roster_user\",\n                idAttribute : \"_id\",\n\n                constructor : function(options) {\n\n                    if (typeof options !== \"undefined\") {\n                        options._id = options._id ||\n                            options.id ||\n                            Models.getUID(this);\n                        options.title = options.title || \"(untitled \" + this.type + \")\";\n                        options.description = options.description || \"\";\n                        options.uri = options.uri || \"\";\n                        options.project = options.project || null;\n                        options.site_id = options.site_id || 0;\n\n                        if (typeof this.prepare === \"function\") {\n                            options = this.prepare(options);\n                        }\n                    }\n                    Backbone.Model.prototype.constructor.call(this, options);\n                },\n\n                validate : function() {\n                    if (!this.type) {\n                        return \"object has no type\";\n                    }\n                },\n\n                prepare : function(options) {\n                    options.color = options.color || \"#666666\";\n                    return options;\n                },\n\n                toJSON : function() {\n                    return {\n                        _id : this.get(\"_id\"),\n                        title : this.get(\"title\"),\n                        uri : this.get(\"uri\"),\n                        description : this.get(\"description\"),\n                        color : this.get(\"color\"),\n                        project : (this.get(\"project\") != null) ? this.get(\n                                \"project\").get(\"id\") : null,\n                        site_id : this.get(\"site_id\")\n                    };\n                }\n            });\n\n    var UsersList = Models.UsersList = Backbone.Collection.extend({\n        model : RosterUser\n    });\n\n})(window);\n","Rkns.defaults = {\n\n    language: (navigator.language || navigator.userLanguage || \"en\"),\n        /* GUI Language */\n    container: \"renkan\",\n        /* GUI Container DOM element ID */\n    search: [],\n        /* List of Search Engines */\n    bins: [],\n           /* List of Bins */\n    static_url: \"\",\n        /* URL for static resources */\n    popup_editor: true,\n        /* show the node editor as a popup inside the renkan view */\n    editor_panel: 'editor-panel',\n        /* GUI continer DOM element ID of the editor panel */\n    show_bins: true,\n        /* Show bins in left column */\n    properties: [],\n        /* Semantic properties for edges */\n    show_editor: true,\n        /* Show the graph editor... Setting this to \"false\" only shows the bins part ! */\n    read_only: false,\n        /* Allows editing of renkan without changing the rest of the GUI. Can be switched on/off on the fly to block/enable editing */\n    editor_mode: true,\n        /* Switch for Publish/Edit GUI. If editor_mode is false, read_only will be true.  */\n    manual_save: false,\n        /* In snapshot mode, clicking on the floppy will save a snapshot. Otherwise, it will show the connection status */\n    show_top_bar: true,\n        /* Show the top bar, (title, buttons, users) */\n    default_user_color: \"#303030\",\n    size_bug_fix: true,\n        /* Resize the canvas after load (fixes a bug on iPad and FF Mac) */\n    force_resize: false,\n    allow_double_click: true,\n        /* Allows Double Click to create a node on an empty background */\n    zoom_on_scroll: true,\n        /* Allows to use the scrollwheel to zoom */\n    element_delete_delay: 0,\n        /* Delay between clicking on the bin on an element and really deleting it\n           Set to 0 for delete confirm */\n    autoscale_padding: 50,\n    resize: true,\n\n    /* zoom options */\n    show_zoom: true,\n        /* show zoom buttons */\n    save_view: true,\n        /* show buttons to save view */\n    default_view: false,\n        /* Allows to load default view (zoom+offset) at start on read_only mode, instead of autoScale. the default_view will be the last */\n\n\n    /* TOP BAR BUTTONS */\n    show_search_field: true,\n    show_user_list: true,\n    user_name_editable: true,\n    user_color_editable: true,\n    show_user_color: true,\n    show_save_button: true,\n    show_export_button: true,\n    show_open_button: false,\n    show_addnode_button: true,\n    show_addedge_button: true,\n    show_bookmarklet: true,\n    show_fullscreen_button: true,\n    home_button_url: false,\n    home_button_title: \"Home\",\n\n    /* MINI-MAP OPTIONS */\n\n    show_minimap: true,\n        /* Show a small map at the bottom right */\n    minimap_width: 160,\n    minimap_height: 120,\n    minimap_padding: 20,\n    minimap_background_color: \"#ffffff\",\n    minimap_border_color: \"#cccccc\",\n    minimap_highlight_color: \"#ffff00\",\n    minimap_highlight_weight: 5,\n\n\n    /* EDGE/NODE COMMON OPTIONS */\n\n    buttons_background: \"#202020\",\n    buttons_label_color: \"#c000c0\",\n    buttons_label_font_size: 9,\n\n    ghost_opacity : 0.3,\n        /* opacity when the hidden element is revealed */\n    default_dash_array : [4, 5],\n        /* dash line genometry */\n\n    /* NODE DISPLAY OPTIONS */\n\n    show_node_circles: true,\n        /* Show circles for nodes */\n    clip_node_images: true,\n        /* Constraint node images to circles */\n    node_images_fill_mode: false,\n        /* Set to false for \"letterboxing\" (height/width of node adapted to show full image)\n           Set to true for \"crop\" (adapted to fill circle) */\n    node_size_base: 25,\n    node_stroke_width: 2,\n    node_stroke_max_width: 12,\n    selected_node_stroke_width: 4,\n    selected_node_stroke_max_width: 24,\n    node_stroke_witdh_scale: 5,\n    node_fill_color: \"#ffffff\",\n    highlighted_node_fill_color: \"#ffff00\",\n    node_label_distance: 5,\n        /* Vertical distance between node and label */\n    node_label_max_length: 60,\n        /* Maximum displayed text length */\n    label_untitled_nodes: \"(untitled)\",\n        /* Label to display on untitled nodes */\n    change_shapes: true,\n        /* Change shapes enabled */\n\n    /* EDGE DISPLAY OPTIONS */\n\n    edge_stroke_width: 2,\n    edge_stroke_max_width: 12,\n    selected_edge_stroke_width: 4,\n    selected_edge_stroke_max_width: 24,\n    edge_stroke_witdh_scale: 5,\n\n    edge_label_distance: 0,\n    edge_label_max_length: 20,\n    edge_arrow_length: 18,\n    edge_arrow_width: 12,\n    edge_arrow_max_width: 32,\n    edge_gap_in_bundles: 12,\n    label_untitled_edges: \"\",\n\n    /* CONTEXTUAL DISPLAY (TOOLTIP OR EDITOR) OPTIONS */\n\n    tooltip_width: 275,\n    tooltip_padding: 10,\n    tooltip_margin: 15,\n    tooltip_arrow_length : 20,\n    tooltip_arrow_width : 40,\n    tooltip_top_color: \"#f0f0f0\",\n    tooltip_bottom_color: \"#d0d0d0\",\n    tooltip_border_color: \"#808080\",\n    tooltip_border_width: 1,\n\n    /* NODE EDITOR OPTIONS */\n\n    show_node_editor_uri: true,\n    show_node_editor_description: true,\n    show_node_editor_size: true,\n    show_node_editor_style: true,\n    show_node_editor_style_color: true,\n    show_node_editor_style_dash: true,\n    show_node_editor_style_thickness: true,\n    show_node_editor_image: true,\n    show_node_editor_creator: true,\n    allow_image_upload: true,\n    uploaded_image_max_kb: 500,\n\n    /* NODE TOOLTIP OPTIONS */\n\n    show_node_tooltip_uri: true,\n    show_node_tooltip_description: true,\n    show_node_tooltip_color: true,\n    show_node_tooltip_image: true,\n    show_node_tooltip_creator: true,\n\n    /* EDGE EDITOR OPTIONS */\n\n    show_edge_editor_uri: true,\n    show_edge_editor_style: true,\n    show_edge_editor_style_color: true,\n    show_edge_editor_style_dash: true,\n    show_edge_editor_style_thickness: true,\n    show_edge_editor_style_arrow: true,\n    show_edge_editor_direction: true,\n    show_edge_editor_nodes: true,\n    show_edge_editor_creator: true,\n\n    /* EDGE TOOLTIP OPTIONS */\n\n    show_edge_tooltip_uri: true,\n    show_edge_tooltip_color: true,\n    show_edge_tooltip_nodes: true,\n    show_edge_tooltip_creator: true\n\n    /* */\n\n};\n","Rkns.i18n = {\n    fr: {\n        \"Edit Node\": \"Édition d’un nœud\",\n        \"Edit Edge\": \"Édition d’un lien\",\n        \"Title:\": \"Titre :\",\n        \"URI:\": \"URI :\",\n        \"Description:\": \"Description :\",\n        \"From:\": \"De :\",\n        \"To:\": \"Vers :\",\n        \"Image\": \"Image\",\n        \"Image URL:\": \"URL d'Image\",\n        \"Choose Image File:\": \"Choisir un fichier image\",\n        \"Full Screen\": \"Mode plein écran\",\n        \"Add Node\": \"Ajouter un nœud\",\n        \"Add Edge\": \"Ajouter un lien\",\n        \"Save Project\": \"Enregistrer le projet\",\n        \"Open Project\": \"Ouvrir un projet\",\n        \"Auto-save enabled\": \"Enregistrement automatique activé\",\n        \"Connection lost\": \"Connexion perdue\",\n        \"Created by:\": \"Créé par :\",\n        \"Zoom In\": \"Agrandir l’échelle\",\n        \"Zoom Out\": \"Rapetisser l’échelle\",\n        \"Edit\": \"Éditer\",\n        \"Remove\": \"Supprimer\",\n        \"Cancel deletion\": \"Annuler la suppression\",\n        \"Link to another node\": \"Créer un lien\",\n        \"Enlarge\": \"Agrandir\",\n        \"Shrink\": \"Rétrécir\",\n        \"Click on the background canvas to add a node\": \"Cliquer sur le fond du graphe pour rajouter un nœud\",\n        \"Click on a first node to start the edge\": \"Cliquer sur un premier nœud pour commencer le lien\",\n        \"Click on a second node to complete the edge\": \"Cliquer sur un second nœud pour terminer le lien\",\n        \"Wikipedia\": \"Wikipédia\",\n        \"Wikipedia in \": \"Wikipédia en \",\n        \"French\": \"Français\",\n        \"English\": \"Anglais\",\n        \"Japanese\": \"Japonais\",\n        \"Untitled project\": \"Projet sans titre\",\n        \"Lignes de Temps\": \"Lignes de Temps\",\n        \"Loading, please wait\": \"Chargement en cours, merci de patienter\",\n        \"Edge color:\": \"Couleur :\",\n        \"Dash:\": \"Point. :\",\n        \"Thickness:\": \"Epaisseur :\",\n        \"Arrow:\": \"Flèche :\",\n        \"Node color:\": \"Couleur :\",\n        \"Choose color\": \"Choisir une couleur\",\n        \"Change edge direction\": \"Changer le sens du lien\",\n        \"Do you really wish to remove node \": \"Voulez-vous réellement supprimer le nœud \",\n        \"Do you really wish to remove edge \": \"Voulez-vous réellement supprimer le lien \",\n        \"This file is not an image\": \"Ce fichier n'est pas une image\",\n        \"Image size must be under \": \"L'image doit peser moins de \",\n        \"Size:\": \"Taille :\",\n        \"KB\": \"ko\",\n        \"Choose from vocabulary:\": \"Choisir dans un vocabulaire :\",\n        \"SKOS Documentation properties\": \"SKOS: Propriétés documentaires\",\n        \"has note\": \"a pour note\",\n        \"has example\": \"a pour exemple\",\n        \"has definition\": \"a pour définition\",\n        \"SKOS Semantic relations\": \"SKOS: Relations sémantiques\",\n        \"has broader\": \"a pour concept plus large\",\n        \"has narrower\": \"a pour concept plus étroit\",\n        \"has related\": \"a pour concept apparenté\",\n        \"Dublin Core Metadata\": \"Métadonnées Dublin Core\",\n        \"has contributor\": \"a pour contributeur\",\n        \"covers\": \"couvre\",\n        \"created by\": \"créé par\",\n        \"has date\": \"a pour date\",\n        \"published by\": \"édité par\",\n        \"has source\": \"a pour source\",\n        \"has subject\": \"a pour sujet\",\n        \"Dragged resource\": \"Ressource glisée-déposée\",\n        \"Search the Web\": \"Rechercher en ligne\",\n        \"Search in Bins\": \"Rechercher dans les chutiers\",\n        \"Close bin\": \"Fermer le chutier\",\n        \"Refresh bin\": \"Rafraîchir le chutier\",\n        \"(untitled)\": \"(sans titre)\",\n        \"Select contents:\": \"Sélectionner des contenus :\",\n        \"Drag items from this website, drop them in Renkan\": \"Glissez des éléments de ce site web vers Renkan\",\n        \"Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.\": \"Glissez ce bouton vers votre barre de favoris. Ensuite, depuis un site tiers, cliquez dessus pour activer 'Drag-to-Add' puis glissez des éléments de ce site vers Renkan\",\n        \"Shapes available\": \"Formes disponibles\",\n        \"Circle\": \"Cercle\",\n        \"Square\": \"Carré\",\n        \"Diamond\": \"Losange\",\n        \"Hexagone\": \"Hexagone\",\n        \"Ellipse\": \"Ellipse\",\n        \"Star\": \"Étoile\",\n        \"Cloud\": \"Nuage\",\n        \"Triangle\": \"Triangle\",\n        \"Zoom Fit\": \"Ajuster le Zoom\",\n        \"Download Project\": \"Télécharger le projet\",\n        \"Zoom Save\": \"Sauver le Zoom\",\n        \"View saved zoom\": \"Restaurer le Zoom\",\n        \"Renkan \\'Drag-to-Add\\' bookmarklet\": \"Renkan \\'Deplacer-Pour-Ajouter\\' Signet\",\n        \"(unknown user)\":\"(non authentifié)\",\n        \"<unknown user>\":\"<non authentifié>\",\n        \"Search in graph\":\"Rechercher dans carte\",\n        \"Search in \" : \"Chercher dans \"\n    }\n};\n","/* Saves the Full JSON at each modification */\n\nRkns.jsonIO = function(_renkan, _opts) {\n    var _proj = _renkan.project;\n    if (typeof _opts.http_method === \"undefined\") {\n        _opts.http_method = 'PUT';\n    }\n    var _load = function() {\n        _renkan.renderer.redrawActive = false;\n        _proj.set({\n            loadingStatus : true\n        });\n        Rkns.$.getJSON(_opts.url, function(_data) {\n            _renkan.dataloader.load(_data);\n            _proj.set({\n                loadingStatus : false\n            });\n            _proj.set({\n                saveStatus : 0\n            });\n            _renkan.renderer.redrawActive = true;\n            _renkan.renderer.fixSize();\n        });\n    };\n    var _save = function() {\n        _proj.set({\n            saveStatus : 2\n        });\n        var _data = _proj.toJSON();\n        if (!_renkan.read_only) {\n            Rkns.$.ajax({\n                type : _opts.http_method,\n                url : _opts.url,\n                contentType : \"application/json\",\n                data : JSON.stringify(_data),\n                success : function(data, textStatus, jqXHR) {\n                    _proj.set({\n                        saveStatus : 0\n                    });\n                }\n            });\n        }\n\n    };\n    var _thrSave = Rkns._.throttle(function() {\n        setTimeout(_save, 100);\n    }, 1000);\n    _proj.on(\"add:nodes add:edges add:users add:views\", function(_model) {\n        _model.on(\"change remove\", function(_model) {\n            _thrSave();\n        });\n        _thrSave();\n    });\n    _proj.on(\"change\", function() {\n        if (!(_proj.changedAttributes.length === 1 && _proj\n                .hasChanged('saveStatus'))) {\n            _thrSave();\n        }\n    });\n\n    _load();\n};\n","/* Saves the Full JSON once */\n\nRkns.jsonIOSaveOnClick = function(_renkan, _opts) {\n    var _proj = _renkan.project,\n        _saveWarn = false,\n        _onLeave = function() {\n            return \"Project not saved\";\n        };\n    if (typeof _opts.http_method === \"undefined\") {\n        _opts.http_method = 'POST';\n    }\n    var _load = function() {\n        var getdata = {},\n            rx = /id=([^&#?=]+)/,\n            matches = document.location.hash.match(rx);\n        if (matches) {\n            getdata.id = matches[1];\n        }\n        Rkns.$.ajax({\n            url: _opts.url,\n            data: getdata,\n            beforeSend: function(){\n            \t_proj.set({loadingStatus:true});\n            },\n            success: function(_data) {\n                _renkan.dataloader.load(_data);\n                _proj.set({loadingStatus:false});\n                _proj.set({saveStatus:0});\n                _renkan.renderer.autoScale();\n            }\n        });\n    };\n    var _save = function() {\n        _proj.set(\"saved_at\", new Date());\n        var _data = _proj.toJSON();\n        Rkns.$.ajax({\n            type: _opts.http_method,\n            url: _opts.url,\n            contentType: \"application/json\",\n            data: JSON.stringify(_data),\n            beforeSend: function(){\n            \t_proj.set({saveStatus:2});\n            },\n            success: function(data, textStatus, jqXHR) {\n                $(window).off(\"beforeunload\", _onLeave);\n                _saveWarn = false;\n                _proj.set({saveStatus:0});\n                //document.location.hash = \"#id=\" + data.id;\n                //$(\".Rk-Notifications\").text(\"Saved as \"+document.location.href).fadeIn().delay(2000).fadeOut();\n            }\n        });\n    };\n    var _checkLeave = function() {\n    \t_proj.set({saveStatus:1});\n\n        var title = _proj.get(\"title\");\n        if (title && _proj.get(\"nodes\").length) {\n            $(\".Rk-Save-Button\").removeClass(\"disabled\");\n        } else {\n            $(\".Rk-Save-Button\").addClass(\"disabled\");\n        }\n        if (title) {\n            $(\".Rk-PadTitle\").css(\"border-color\",\"#333333\");\n        }\n        if (!_saveWarn) {\n            _saveWarn = true;\n            $(window).on(\"beforeunload\", _onLeave);\n        }\n    };\n    _load();\n    _proj.on(\"add:nodes add:edges add:users change\", function(_model) {\n\t    _model.on(\"change remove\", function(_model) {\n\t    \tif(!(_model.changedAttributes.length === 1 && _model.hasChanged('saveStatus'))) {\n\t    \t\t_checkLeave();\n\t    \t}\n\t    });\n\t\tif(!(_proj.changedAttributes.length === 1 && _proj.hasChanged('saveStatus'))) {\n\t\t    _checkLeave();\n    \t}\n    });\n    _renkan.renderer.save = function() {\n        if ($(\".Rk-Save-Button\").hasClass(\"disabled\")) {\n            if (!_proj.get(\"title\")) {\n                $(\".Rk-PadTitle\").css(\"border-color\",\"#ff0000\");\n            }\n        } else {\n            _save();\n        }\n    };\n};\n","(function(Rkns) {\n\"use strict\";\n\nvar _ = Rkns._;\n\nvar Ldt = Rkns.Ldt = {};\n\nvar Bin = Ldt.Bin = function(_renkan, _opts) {\n    if (_opts.ldt_type) {\n        var Resclass = Ldt[_opts.ldt_type+\"Bin\"];\n        if (Resclass) {\n            return new Resclass(_renkan, _opts);\n        }\n    }\n    console.error(\"No such LDT Bin Type\");\n};\n\nvar ProjectBin = Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nProjectBin.prototype.tagTemplate = renkanJST['templates/ldtjson-bin/tagtemplate.html'];\n\nProjectBin.prototype.annotationTemplate = renkanJST['templates/ldtjson-bin/annotationtemplate.html'];\n\nProjectBin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.proj_id = _opts.project_id;\n    this.ldt_platform = _opts.ldt_platform || \"http://ldt.iri.centrepompidou.fr/\";\n    this.title_$.html(_opts.title);\n    this.title_icon_$.addClass('Rk-Ldt-Title-Icon');\n    this.refresh();\n};\n\nProjectBin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    function highlight(_text) {\n        var _e = _(_text).escape();\n        return search.isempty ? _e : search.replace(_e, \"<span class='searchmatch'>$1</span>\");\n    }\n    function convertTC(_ms) {\n        function pad(_n) {\n            var _res = _n.toString();\n            while (_res.length < 2) {\n                _res = '0' + _res;\n            }\n            return _res;\n        }\n        var _totalSeconds = Math.abs(Math.floor(_ms/1000)),\n            _hours = Math.floor(_totalSeconds / 3600),\n            _minutes = (Math.floor(_totalSeconds / 60) % 60),\n            _seconds = _totalSeconds % 60,\n            _res = '';\n        if (_hours) {\n            _res += pad(_hours) + ':';\n        }\n        _res += pad(_minutes) + ':' + pad(_seconds);\n        return _res;\n    }\n\n    var _html = '<li><h3>Tags</h3></li>',\n        _projtitle = this.data.meta[\"dc:title\"],\n        _this = this,\n        count = 0;\n    _this.title_$.text('LDT Project: \"' + _projtitle + '\"');\n    _.map(_this.data.tags,function(_tag) {\n        var _title = _tag.meta[\"dc:title\"];\n        if (!search.isempty && !search.test(_title)) {\n            return;\n        }\n        count++;\n        _html += _this.tagTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            encodedtitle : encodeURIComponent(_title),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _html += '<li><h3>Annotations</h3></li>';\n    _.map(_this.data.annotations,function(_annotation) {\n        var _description = _annotation.content.description,\n            _title = _annotation.content.title.replace(_description,\"\");\n        if (!search.isempty && !search.test(_title) && !search.test(_description)) {\n            return;\n        }\n        count++;\n        var _duration = _annotation.end - _annotation.begin,\n            _img = (\n                (_annotation.content && _annotation.content.img && _annotation.content.img.src) ?\n                  _annotation.content.img.src :\n                  ( _duration ? _this.renkan.options.static_url+\"img/ldt-segment.png\" : _this.renkan.options.static_url+\"img/ldt-point.png\" )\n            );\n        _html += _this.annotationTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            description: _description,\n            hdescription: highlight(_description),\n            start: convertTC(_annotation.begin),\n            end: convertTC(_annotation.end),\n            duration: convertTC(_duration),\n            mediaid: _annotation.media,\n            annotationid: _annotation.id,\n            image: _img,\n            static_url: _this.renkan.options.static_url\n        });\n    });\n\n    this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nProjectBin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: this.ldt_platform + 'ldtplatform/ldt/cljson/id/' + this.proj_id,\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n\nvar Search = Ldt.Search = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.lang = _opts.lang || \"en\";\n};\n\nSearch.prototype.getBgClass = function() {\n    return \"Rk-Ldt-Icon\";\n};\n\nSearch.prototype.getSearchTitle = function() {\n    return this.renkan.translate(\"Lignes de Temps\");\n};\n\nSearch.prototype.search = function(_q) {\n    this.renkan.tabs.push(\n        new ResultsBin(this.renkan, {\n            search: _q\n        })\n    );\n};\n\nvar ResultsBin = Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nResultsBin.prototype.segmentTemplate = renkanJST['templates/ldtjson-bin/segmenttemplate.html'];\n\nResultsBin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.ldt_platform = _opts.ldt_platform || \"http://ldt.iri.centrepompidou.fr/\";\n    this.max_results = _opts.max_results || 50;\n    this.search = _opts.search;\n    this.title_$.html('Lignes de Temps: \"' + _opts.search + '\"');\n    this.title_icon_$.addClass('Rk-Ldt-Title-Icon');\n    this.refresh();\n};\n\nResultsBin.prototype.render = function(searchbase) {\n    if (!this.data) {\n        return;\n    }\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    var highlightrx = (search.isempty ? Rkns.Utils.regexpFromTextOrArray(this.search) : search);\n    function highlight(_text) {\n        return highlightrx.replace(_(_text).escape(), \"<span class='searchmatch'>$1</span>\");\n    }\n    function convertTC(_ms) {\n        function pad(_n) {\n            var _res = _n.toString();\n            while (_res.length < 2) {\n                _res = '0' + _res;\n            }\n            return _res;\n        }\n        var _totalSeconds = Math.abs(Math.floor(_ms/1000)),\n            _hours = Math.floor(_totalSeconds / 3600),\n            _minutes = (Math.floor(_totalSeconds / 60) % 60),\n            _seconds = _totalSeconds % 60,\n            _res = '';\n        if (_hours) {\n            _res += pad(_hours) + ':';\n        }\n        _res += pad(_minutes) + ':' + pad(_seconds);\n        return _res;\n    }\n\n    var _html = '',\n        _this = this,\n        count = 0;\n    _.each(this.data.objects,function(_segment) {\n        var _description = _segment.abstract,\n            _title = _segment.title;\n        if (!search.isempty && !search.test(_title) && !search.test(_description)) {\n            return;\n        }\n        count++;\n        var _duration = _segment.duration,\n            _begin = _segment.start_ts,\n            _end = + _segment.duration + _begin,\n            _img = (\n                _duration ?\n                  _this.renkan.options.static_url + \"img/ldt-segment.png\" :\n                  _this.renkan.options.static_url + \"img/ldt-point.png\"\n            );\n        _html += _this.segmentTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            description: _description,\n            hdescription: highlight(_description),\n            start: convertTC(_begin),\n            end: convertTC(_end),\n            duration: convertTC(_duration),\n            mediaid: _segment.iri_id,\n            //projectid: _segment.project_id,\n            //cuttingid: _segment.cutting_id,\n            annotationid: _segment.element_id,\n            image: _img\n        });\n    });\n\n    this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nResultsBin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: this.ldt_platform + 'ldtplatform/api/ldt/1.0/segments/search/',\n        data: {\n            format: \"jsonp\",\n            q: this.search,\n            limit: this.max_results\n        },\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n\n})(window.Rkns);\n","Rkns.ResourceList = {};\n\nRkns.ResourceList.Bin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nRkns.ResourceList.Bin.prototype.resultTemplate = renkanJST['templates/list-bin.html'];\n\nRkns.ResourceList.Bin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.title_$.html(_opts.title);\n    if (_opts.list) {\n        this.data = _opts.list;\n    }\n    this.refresh();\n};\n\nRkns.ResourceList.Bin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    function highlight(_text) {\n        var _e = _(_text).escape();\n        return search.isempty ? _e : search.replace(_e, \"<span class='searchmatch'>$1</span>\");\n    }\n    var _html = \"\",\n        _this = this,\n        count = 0;\n    Rkns._.each(this.data,function(_item) {\n        var _element;\n        if (typeof _item === \"string\") {\n            if (/^(https?:\\/\\/|www)/.test(_item)) {\n                _element = { url: _item };\n            } else {\n                _element = { title: _item.replace(/[:,]?\\s?(https?:\\/\\/|www)[\\d\\w\\/.&?=#%-_]+\\s?/,'').trim() };\n                var _match = _item.match(/(https?:\\/\\/|www)[\\d\\w\\/.&?=#%-_]+/);\n                if (_match) {\n                    _element.url = _match[0];\n                }\n                if (_element.title.length > 80) {\n                    _element.description = _element.title;\n                    _element.title = _element.title.replace(/^(.{30,60})\\s.+$/,'$1…');\n                }\n            }\n        } else {\n            _element = _item;\n        }\n        var title = _element.title || (_element.url || \"\").replace(/^https?:\\/\\/(www\\.)?/,'').replace(/^(.{40}).+$/,'$1…'),\n            url = _element.url || \"\",\n            description = _element.description || \"\",\n            image = _element.image || \"\";\n        if (url && !/^https?:\\/\\//.test(url)) {\n            url = 'http://' + url;\n        }\n        if (!search.isempty && !search.test(title) && !search.test(description)) {\n            return;\n        }\n        count++;\n        _html += _this.resultTemplate({\n            url: url,\n            title: title,\n            htitle: highlight(title),\n            image: image,\n            description: description,\n            hdescription: highlight(description),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nRkns.ResourceList.Bin.prototype.refresh = function() {\n    if (this.data) {\n        this.render();\n    }\n};\n","Rkns.Wikipedia = {\n};\n\nRkns.Wikipedia.Search = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.lang = _opts.lang || \"en\";\n};\n\nRkns.Wikipedia.Search.prototype.getBgClass = function() {\n    return \"Rk-Wikipedia-Search-Icon Rk-Wikipedia-Lang-\" + this.lang;\n};\n\nRkns.Wikipedia.Search.prototype.getSearchTitle = function() {\n    var langs = {\n        \"fr\": \"French\",\n        \"en\": \"English\",\n        \"ja\": \"Japanese\"\n    };\n    if (langs[this.lang]) {\n        return this.renkan.translate(\"Wikipedia in \") + this.renkan.translate(langs[this.lang]);\n    } else {\n        return this.renkan.translate(\"Wikipedia\") + \" [\" + this.lang + \"]\";\n    }\n};\n\nRkns.Wikipedia.Search.prototype.search = function(_q) {\n    this.renkan.tabs.push(\n        new Rkns.Wikipedia.Bin(this.renkan, {\n            lang: this.lang,\n            search: _q\n        })\n    );\n};\n\nRkns.Wikipedia.Bin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nRkns.Wikipedia.Bin.prototype.resultTemplate = renkanJST['templates/wikipedia-bin/resulttemplate.html'];\n\nRkns.Wikipedia.Bin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.search = _opts.search;\n    this.lang = _opts.lang || \"en\";\n    this.title_icon_$.addClass('Rk-Wikipedia-Title-Icon Rk-Wikipedia-Lang-' + this.lang);\n    this.title_$.html(this.search).addClass(\"Rk-Wikipedia-Title\");\n    this.refresh();\n};\n\nRkns.Wikipedia.Bin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    var highlightrx = (search.isempty ? Rkns.Utils.regexpFromTextOrArray(this.search) : search);\n    function highlight(_text) {\n        return highlightrx.replace(_(_text).escape(), \"<span class='searchmatch'>$1</span>\");\n    }\n    var _html = \"\",\n        _this = this,\n        count = 0;\n    Rkns._.each(this.data.query.search, function(_result) {\n        var title = _result.title,\n            url = \"http://\" + _this.lang + \".wikipedia.org/wiki/\" + encodeURI(title.replace(/ /g,\"_\")),\n            description = Rkns.$('<div>').html(_result.snippet).text();\n        if (!search.isempty && !search.test(title) && !search.test(description)) {\n            return;\n        }\n        count++;\n        _html += _this.resultTemplate({\n            url: url,\n            title: title,\n            htitle: highlight(title),\n            description: description,\n            hdescription: highlight(description),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nRkns.Wikipedia.Bin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: \"http://\" + _this.lang + \".wikipedia.org/w/api.php?action=query&list=search&srsearch=\" + encodeURIComponent(this.search) + \"&format=json\",\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n","\ndefine('renderer/baserepresentation',['jquery', 'underscore'], function ($, _) {\n    \n\n    /* Rkns.Renderer._BaseRepresentation Class */\n\n    /* In Renkan, a \"Representation\" is a sort of ViewModel (in the MVVM paradigm) and bridges the gap between\n     * models (written with Backbone.js) and the view (written with Paper.js)\n     * Renkan's representations all inherit from Rkns.Renderer._BaseRepresentation '*/\n\n    var _BaseRepresentation = function(_renderer, _model) {\n        if (typeof _renderer !== \"undefined\") {\n            this.renderer = _renderer;\n            this.renkan = _renderer.renkan;\n            this.project = _renderer.renkan.project;\n            this.options = _renderer.renkan.options;\n            this.model = _model;\n            if (this.model) {\n                var _this = this;\n                this._changeBinding = function() {\n                    _this.redraw({change: true});\n                };\n                this._removeBinding = function() {\n                    _renderer.removeRepresentation(_this);\n                    _.defer(function() {\n                        _renderer.redraw();\n                    });\n                };\n                this._selectBinding = function() {\n                    _this.select();\n                };\n                this._unselectBinding = function() {\n                    _this.unselect();\n                };\n                this.model.on(\"change\", this._changeBinding );\n                this.model.on(\"remove\", this._removeBinding );\n                this.model.on(\"select\", this._selectBinding );\n                this.model.on(\"unselect\", this._unselectBinding );\n            }\n        }\n    };\n\n    /* Rkns.Renderer._BaseRepresentation Methods */\n\n    _(_BaseRepresentation.prototype).extend({\n        _super: function(_func) {\n            return _BaseRepresentation.prototype[_func].apply(this, Array.prototype.slice.call(arguments, 1));\n        },\n        redraw: function() {},\n        moveTo: function() {},\n        show: function() { return \"BaseRepresentation.show\"; },\n        hide: function() {},\n        select: function() {\n            if (this.model) {\n                this.model.trigger(\"selected\");\n            }\n        },\n        unselect: function() {\n            if (this.model) {\n                this.model.trigger(\"unselected\");\n            }\n        },\n        highlight: function() {},\n        unhighlight: function() {},\n        mousedown: function() {},\n        mouseup: function() {\n            if (this.model) {\n                this.model.trigger(\"clicked\");\n            }\n        },\n        destroy: function() {\n            if (this.model) {\n                this.model.off(\"change\", this._changeBinding );\n                this.model.off(\"remove\", this._removeBinding );\n                this.model.off(\"select\", this._selectBinding );\n                this.model.off(\"unselect\", this._unselectBinding );\n            }\n        }\n    }).value();\n\n    /* End of Rkns.Renderer._BaseRepresentation Class */\n\n    return _BaseRepresentation;\n\n});\n\ndefine('requtils',[], function ($, _) {\n    \n    return {\n        getUtils: function(){\n            return window.Rkns.Utils;\n        },\n        getRenderer: function(){\n            return window.Rkns.Renderer;\n        }\n    };\n\n});\n\n\ndefine('renderer/basebutton',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Rkns.Renderer._BaseButton Class */\n\n    /* BaseButton is extended by contextual buttons that appear when hovering on nodes and edges */\n\n    var _BaseButton = Utils.inherit(BaseRepresentation);\n\n    _(_BaseButton.prototype).extend({\n        moveTo: function(_pos) {\n            this.sector.moveTo(_pos);\n        },\n        show: function() {\n            this.sector.show();\n        },\n        hide: function() {\n            this.sector.hide();\n        },\n        select: function() {\n            this.sector.select();\n        },\n        unselect: function(_newTarget) {\n            this.sector.unselect();\n            if (!_newTarget || (_newTarget !== this.source_representation && _newTarget.source_representation !== this.source_representation)) {\n                this.source_representation.unselect();\n            }\n        },\n        destroy: function() {\n            this.sector.destroy();\n        }\n    }).value();\n\n    return _BaseButton;\n\n});\n\n\ndefine('renderer/shapebuilder',[], function () {\n    \n\n    var cloud_path = \"M0,0c-0.1218516546,-0.0336420601 -0.2451649928,0.0048580836 -0.3302944641,0.0884969975c-0.0444763883,-0.0550844815 -0.1047003238,-0.0975985034 -0.1769360893,-0.1175406746c-0.1859066673,-0.0513257002 -0.3774236254,0.0626045858 -0.4272374613,0.2541588105c-0.0036603877,0.0140753132 -0.0046241235,0.028229722 -0.0065872453,0.042307536c-0.1674179627,-0.0179317735 -0.3276106855,0.0900599386 -0.3725537463,0.2628868425c-0.0445325077,0.1712456429 0.0395025693,0.3463497959 0.1905420475,0.4183458793c-0.0082101538,0.0183442886 -0.0158652506,0.0372432828 -0.0211098452,0.0574080693c-0.0498130336,0.1915540431 0.0608692569,0.3884647499 0.2467762814,0.4397904033c0.0910577256,0.0251434257 0.1830791813,0.0103792696 0.2594677475,-0.0334472349c0.042100113,0.0928009202 0.1205930075,0.1674914182 0.2240666796,0.1960572479c0.1476344161,0.0407610407 0.297446165,-0.0238077445 0.3783262342,-0.1475652419c0.0327623278,0.0238981846 0.0691792333,0.0436665447 0.1102008706,0.0549940004c0.1859065794,0.0513256592 0.3770116432,-0.0627203154 0.4268255671,-0.2542745401c0.0250490557,-0.0963230532 0.0095494076,-0.1938010889 -0.0356681889,-0.2736906101c0.0447507424,-0.0439678867 0.0797796014,-0.0996624318 0.0969425462,-0.1656617192c0.0498137481,-0.1915564561 -0.0608688118,-0.3884669813 -0.2467755669,-0.4397928163c-0.0195699622,-0.0054005426 -0.0391731675,-0.0084429542 -0.0586916488,-0.0102888295c0.0115683912,-0.1682147574 -0.0933564223,-0.3269222408 -0.2572937178,-0.3721841203z\";\n    /* ShapeBuilder Begin */\n\n    var builders = {\n        \"circle\":{\n            getShape: function() {\n                return new paper.Path.Circle([0, 0], 1);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Circle(center, radius);\n            }\n        },\n        \"rectangle\":{\n            getShape: function() {\n                return new paper.Path.Rectangle([-2, -2], [2, 2]);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Rectangle([-radius, -radius], [radius*2, radius*2]);\n            }\n        },\n        \"ellipse\":{\n            getShape: function() {\n                return new paper.Path.Ellipse(new paper.Rectangle([-2, -1], [2, 1]));\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Ellipse(new paper.Rectangle([-radius, -radius/2], [radius*2, radius]));\n            }\n        },\n        \"polygon\":{\n            getShape: function() {\n                return new paper.Path.RegularPolygon([0, 0], 6, 1);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.RegularPolygon(center, 6, radius);\n            }\n        },\n        \"diamond\":{\n            getShape: function() {\n                var d = new paper.Path.Rectangle([-Math.SQRT2, -Math.SQRT2], [Math.SQRT2, Math.SQRT2]);\n                d.rotate(45);\n                return d;\n            },\n            getImageShape: function(center, radius) {\n                var d = new paper.Path.Rectangle([-radius*Math.SQRT2/2, -radius*Math.SQRT2/2], [radius*Math.SQRT2, radius*Math.SQRT2]);\n                d.rotate(45);\n                return d;\n            }\n        },\n        \"star\":{\n            getShape: function() {\n                return new paper.Path.Star([0, 0], 8, 1, 0.7);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Star(center, 8, radius*1, radius*0.7);\n            }\n        },\n        \"cloud\": {\n            getShape: function() {\n                var path = new paper.Path(cloud_path);\n                return path;\n\n            },\n            getImageShape: function(center, radius) {\n                var path = new paper.Path(cloud_path);\n                path.scale(radius);\n                path.translate(center);\n                return path;\n            }\n        },\n        \"triangle\": {\n            getShape: function() {\n                return new paper.Path.RegularPolygon([0,0], 3, 1);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.RegularPolygon(center, 3, radius);\n            }\n        },\n        \"svg\": function(path){\n            return {\n                getShape: function() {\n                    return new paper.Path(path);\n                },\n                getImageShape: function(center, radius) {\n                    // No calcul for the moment\n                    return new paper.Path();\n                }\n            };\n        }\n    };\n\n    var ShapeBuilder = function (shape){\n        if(shape === null || typeof shape === \"undefined\"){\n            shape = \"circle\";\n        }\n        if(shape.substr(0,4)===\"svg:\"){\n            return builders.svg(shape.substr(4));\n        }\n        if(!(shape in builders)){\n            shape = \"circle\";\n        }\n        return builders[shape];\n    };\n\n    ShapeBuilder.builders = builders;\n\n    return ShapeBuilder;\n\n});\n\ndefine('renderer/noderepr',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation', 'renderer/shapebuilder'], function ($, _, requtils, BaseRepresentation, ShapeBuilder) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Rkns.Renderer.Node Class */\n\n    /* The representation for the node : A circle, with an image inside and a text label underneath.\n     * The circle and the image are drawn on canvas and managed by Paper.js.\n     * The text label is an HTML node, managed by jQuery. */\n\n    //var NodeRepr = Renderer.Node = Utils.inherit(Renderer._BaseRepresentation);\n    var NodeRepr = Utils.inherit(BaseRepresentation);\n\n    _(NodeRepr.prototype).extend({\n        _init: function() {\n            this.renderer.node_layer.activate();\n            this.type = \"Node\";\n            this.buildShape();\n            this.hidden = false;\n            this.ghost= false;\n            if (this.options.show_node_circles) {\n                this.circle.strokeWidth = this.options.node_stroke_width;\n                this.h_ratio = 1;\n            } else {\n                this.h_ratio = 0;\n            }\n            this.title = $('<div class=\"Rk-Label\">').appendTo(this.renderer.labels_$);\n\n            if (this.options.editor_mode) {\n                var Renderer = requtils.getRenderer();\n                this.normal_buttons = [\n                                       new Renderer.NodeEditButton(this.renderer, null),\n                                       new Renderer.NodeRemoveButton(this.renderer, null),\n                                       new Renderer.NodeHideButton(this.renderer, null),\n                                       new Renderer.NodeShowButton(this.renderer, null),\n                                       new Renderer.NodeLinkButton(this.renderer, null),\n                                       new Renderer.NodeEnlargeButton(this.renderer, null),\n                                       new Renderer.NodeShrinkButton(this.renderer, null)\n                                       ];\n                this.pending_delete_buttons = [\n                                               new Renderer.NodeRevertButton(this.renderer, null)\n                                               ];\n                this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons);\n\n                for (var i = 0; i < this.all_buttons.length; i++) {\n                    this.all_buttons[i].source_representation = this;\n                }\n                this.active_buttons = [];\n            } else {\n                this.active_buttons = this.all_buttons = [];\n            }\n            this.last_circle_radius = 1;\n\n            if (this.renderer.minimap) {\n                this.renderer.minimap.node_layer.activate();\n                this.minimap_circle = new paper.Path.Circle([0, 0], 1);\n                this.minimap_circle.__representation = this.renderer.minimap.miniframe.__representation;\n                this.renderer.minimap.node_group.addChild(this.minimap_circle);\n            }\n        },\n        _getStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.node_stroke_width + (thickness-1) * (this.options.node_stroke_max_width - this.options.node_stroke_width) / (this.options.node_stroke_witdh_scale-1);\n        },\n        _getSelectedStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.selected_node_stroke_width + (thickness-1) * (this.options.selected_node_stroke_max_width - this.options.selected_node_stroke_width) / (this.options.node_stroke_witdh_scale-1);\n        },\n        buildShape: function(){\n            if( 'shape' in this.model.changed ) {\n                delete this.img;\n            }\n            if(this.circle){\n                this.circle.remove();\n                delete this.circle;\n            }\n            // \"circle\" \"rectangle\" \"ellipse\" \"polygon\" \"star\" \"diamond\"\n            this.shapeBuilder = new ShapeBuilder(this.model.get(\"shape\"));\n            this.circle = this.shapeBuilder.getShape();\n            this.circle.__representation = this;\n            this.circle.sendToBack();\n            this.last_circle_radius = 1;\n        },\n        redraw: function(options) {\n            if( 'shape' in this.model.changed && 'change' in options && options.change ) {\n            //if( 'shape' in this.model.changed ) {\n                this.buildShape();\n            }\n            var _model_coords = new paper.Point(this.model.get(\"position\")),\n                _baseRadius = this.options.node_size_base * Math.exp((this.model.get(\"size\") || 0) * Utils._NODE_SIZE_STEP);\n            if (!this.is_dragging || !this.paper_coords) {\n                this.paper_coords = this.renderer.toPaperCoords(_model_coords);\n            }\n            this.circle_radius = _baseRadius * this.renderer.scale;\n            if (this.last_circle_radius !== this.circle_radius) {\n                this.all_buttons.forEach(function(b) {\n                    b.setSectorSize();\n                });\n                this.circle.scale(this.circle_radius / this.last_circle_radius);\n                if (this.node_image) {\n                    this.node_image.scale(this.circle_radius / this.last_circle_radius);\n                }\n            }\n            this.circle.position = this.paper_coords;\n            if (this.node_image) {\n                this.node_image.position = this.paper_coords.subtract(this.image_delta.multiply(this.circle_radius));\n            }\n            this.last_circle_radius = this.circle_radius;\n\n            var old_act_btn = this.active_buttons;\n\n            var opacity = 1;\n            if (this.model.get(\"delete_scheduled\")) {\n                opacity = 0.5;\n                this.active_buttons = this.pending_delete_buttons;\n                this.circle.dashArray = [2,2];\n            } else {\n                opacity = 1;\n                this.active_buttons = this.normal_buttons;\n                this.circle.dashArray = null;\n            }\n            if (this.selected && this.renderer.isEditable() && !this.ghost) {\n                if (old_act_btn !== this.active_buttons) {\n                    old_act_btn.forEach(function(b) {\n                        b.hide();\n                    });\n                }\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n\n            if (this.node_image) {\n                this.node_image.opacity = this.highlighted ? opacity * 0.5 : (opacity - 0.01);\n            }\n\n            this.circle.fillColor = this.highlighted ? this.options.highlighted_node_fill_color : this.options.node_fill_color;\n\n            this.circle.opacity = this.options.show_node_circles ? opacity : 0.01;\n\n            var _text = this.model.get(\"title\") || this.renkan.translate(this.options.label_untitled_nodes) || \"\";\n            _text = Utils.shortenText(_text, this.options.node_label_max_length);\n\n            if (typeof this.highlighted === \"object\") {\n                this.title.html(this.highlighted.replace(_(_text).escape(),'<span class=\"Rk-Highlighted\">$1</span>'));\n            } else {\n                this.title.text(_text);\n            }\n\n            var _strokeWidth = this._getStrokeWidth();\n            this.title.css({\n                left: this.paper_coords.x,\n                top: this.paper_coords.y + this.circle_radius * this.h_ratio + this.options.node_label_distance + 0.5*_strokeWidth,\n                opacity: opacity\n            });\n            var _color = (this.model.has(\"style\") && this.model.get(\"style\").color) || (this.model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                _dash = (this.model.has(\"style\") && this.model.get(\"style\").dash) ? this.options.default_dash_array : null;\n            this.circle.strokeWidth = _strokeWidth;\n            this.circle.strokeColor = _color;\n            this.circle.dashArray = _dash;\n            var _pc = this.paper_coords;\n            this.all_buttons.forEach(function(b) {\n                b.moveTo(_pc);\n            });\n            var lastImage = this.img;\n            this.img = this.model.get(\"image\");\n            if (this.img && this.img !== lastImage) {\n                this.showImage();\n                if(this.circle) {\n                    this.circle.sendToBack();\n                }\n            }\n            if (this.node_image && !this.img) {\n                this.node_image.remove();\n                delete this.node_image;\n            }\n\n            if (this.renderer.minimap) {\n                this.minimap_circle.fillColor = _color;\n                var minipos = this.renderer.toMinimapCoords(_model_coords),\n                miniradius = this.renderer.minimap.scale * _baseRadius,\n                minisize = new paper.Size([miniradius, miniradius]);\n                this.minimap_circle.fitBounds(minipos.subtract(minisize), minisize.multiply(2));\n            }\n\n            if (typeof options === 'undefined' || !('dontRedrawEdges' in options) || !options.dontRedrawEdges) {\n                var _this = this;\n                _.each(\n                        this.project.get(\"edges\").filter(\n                                function (ed) {\n                                    return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                                }\n                        ),\n                        function(edge, index, list) {\n                            var repr = _this.renderer.getRepresentationByModel(edge);\n                            if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                                repr.redraw();\n                            }\n                        }\n                );\n            }\n            if (this.ghost){\n                this.show(true);\n            } else {\n                if (this.hidden) { this.hide(); }\n            }\n        },\n        showImage: function() {\n            var _image = null;\n            if (typeof this.renderer.image_cache[this.img] === \"undefined\") {\n                _image = new Image();\n                this.renderer.image_cache[this.img] = _image;\n                _image.src = this.img;\n            } else {\n                _image = this.renderer.image_cache[this.img];\n            }\n            if (_image.width) {\n                if (this.node_image) {\n                    this.node_image.remove();\n                }\n                this.renderer.node_layer.activate();\n                var width = _image.width,\n                    height = _image.height,\n                    clipPath = this.model.get(\"clip_path\"),\n                    hasClipPath = (typeof clipPath !== \"undefined\" && clipPath),\n                    _clip = null,\n                    baseRadius = null,\n                    centerPoint = null;\n\n                if (hasClipPath) {\n                    _clip = new paper.Path();\n                    var instructions = clipPath.match(/[a-z][^a-z]+/gi) || [],\n                    lastCoords = [0,0],\n                    minX = Infinity,\n                    minY = Infinity,\n                    maxX = -Infinity,\n                    maxY = -Infinity;\n\n                    var transformCoords = function(tabc, relative) {\n                        var newCoords = tabc.slice(1).map(function(v, k) {\n                            var res = parseFloat(v),\n                            isY = k % 2;\n                            if (isY) {\n                                res = ( res - 0.5 ) * height;\n                            } else {\n                                res = ( res - 0.5 ) * width;\n                            }\n                            if (relative) {\n                                res += lastCoords[isY];\n                            }\n                            if (isY) {\n                                minY = Math.min(minY, res);\n                                maxY = Math.max(maxY, res);\n                            } else {\n                                minX = Math.min(minX, res);\n                                maxX = Math.max(maxX, res);\n                            }\n                            return res;\n                        });\n                        lastCoords = newCoords.slice(-2);\n                        return newCoords;\n                    };\n\n                    instructions.forEach(function(instr) {\n                        var coords = instr.match(/([a-z]|[0-9.-]+)/ig) || [\"\"];\n                        switch(coords[0]) {\n                        case \"M\":\n                            _clip.moveTo(transformCoords(coords));\n                            break;\n                        case \"m\":\n                            _clip.moveTo(transformCoords(coords, true));\n                            break;\n                        case \"L\":\n                            _clip.lineTo(transformCoords(coords));\n                            break;\n                        case \"l\":\n                            _clip.lineTo(transformCoords(coords, true));\n                            break;\n                        case \"C\":\n                            _clip.cubicCurveTo(transformCoords(coords));\n                            break;\n                        case \"c\":\n                            _clip.cubicCurveTo(transformCoords(coords, true));\n                            break;\n                        case \"Q\":\n                            _clip.quadraticCurveTo(transformCoords(coords));\n                            break;\n                        case \"q\":\n                            _clip.quadraticCurveTo(transformCoords(coords, true));\n                            break;\n                        }\n                    });\n\n                    baseRadius = Math[this.options.node_images_fill_mode ? \"min\" : \"max\"](maxX - minX, maxY - minY) / 2;\n                    centerPoint = new paper.Point((maxX + minX) / 2, (maxY + minY) / 2);\n                    if (!this.options.show_node_circles) {\n                        this.h_ratio = (maxY - minY) / (2 * baseRadius);\n                    }\n                } else {\n                    baseRadius = Math[this.options.node_images_fill_mode ? \"min\" : \"max\"](width, height) / 2;\n                    centerPoint = new paper.Point(0,0);\n                    if (!this.options.show_node_circles) {\n                        this.h_ratio = height / (2 * baseRadius);\n                    }\n                }\n                var _raster = new paper.Raster(_image);\n                _raster.locked = true; // Disable mouse events on icon\n                if (hasClipPath) {\n                    _raster = new paper.Group(_clip, _raster);\n                    _raster.opacity = 0.99;\n                    /* This is a workaround to allow clipping at group level\n                     * If opacity was set to 1, paper.js would merge all clipping groups in one (known bug).\n                     */\n                    _raster.clipped = true;\n                    _clip.__representation = this;\n                }\n                if (this.options.clip_node_images) {\n                    var _circleClip = this.shapeBuilder.getImageShape(centerPoint, baseRadius);\n                    _raster = new paper.Group(_circleClip, _raster);\n                    _raster.opacity = 0.99;\n                    _raster.clipped = true;\n                    _circleClip.__representation = this;\n                }\n                this.image_delta = centerPoint.divide(baseRadius);\n                this.node_image = _raster;\n                this.node_image.__representation = _this;\n                this.node_image.scale(this.circle_radius / baseRadius);\n                this.node_image.position = this.paper_coords.subtract(this.image_delta.multiply(this.circle_radius));\n                this.node_image.insertAbove(this.circle);\n            } else {\n                var _this = this;\n                $(_image).on(\"load\", function() {\n                    _this.showImage();\n                });\n            }\n        },\n        paperShift: function(_delta) {\n            if (this.options.editor_mode) {\n                if (!this.renkan.read_only) {\n                    this.is_dragging = true;\n                    this.paper_coords = this.paper_coords.add(_delta);\n                    this.redraw();\n                }\n            } else {\n                this.renderer.paperShift(_delta);\n            }\n        },\n        openEditor: function() {\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            var _editor = this.renderer.addRepresentation(\"NodeEditor\",null);\n            _editor.source_representation = this;\n            _editor.draw();\n        },\n        select: function() {\n            this.selected = true;\n            this.circle.strokeWidth = this._getSelectedStrokeWidth();\n            if (this.renderer.isEditable() && !this.hidden) {\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n            var _uri = this.model.get(\"uri\");\n            if (_uri) {\n                $('.Rk-Bin-Item').each(function() {\n                    var _el = $(this);\n                    if (_el.attr(\"data-uri\") === _uri) {\n                        _el.addClass(\"selected\");\n                    }\n                });\n            }\n            if (!this.options.editor_mode) {\n                this.openEditor();\n            }\n\n            if (this.renderer.minimap) {\n                this.minimap_circle.strokeWidth = this.options.minimap_highlight_weight;\n                this.minimap_circle.strokeColor = this.options.minimap_highlight_color;\n            }\n            //if the node is hidden and the mouse hover it, it appears as a ghost\n            if (this.hidden) {\n                this.show(true);\n            }\n            else {\n                this.showNeighbors(true);\n            }\n            this._super(\"select\");\n        },\n        hideButtons: function() {\n            this.all_buttons.forEach(function(b) {\n                b.hide();\n            });\n            delete(this.buttonTimeout);\n        },\n        unselect: function(_newTarget) {\n            if (!_newTarget || _newTarget.source_representation !== this) {\n                this.selected = false;\n                var _this = this;\n                this.buttons_timeout = setTimeout(function() { _this.hideButtons(); }, 200);\n                this.circle.strokeWidth = this._getStrokeWidth();\n                $('.Rk-Bin-Item').removeClass(\"selected\");\n                if (this.renderer.minimap) {\n                    this.minimap_circle.strokeColor = undefined;\n                }\n                //when the mouse don't hover the node anymore, we hide it\n                if (this.hidden) {\n                    this.hide();\n                }\n                else {\n                    this.hideNeighbors();\n                }\n                this._super(\"unselect\");\n            }\n        },\n        hide: function(){\n            var _this = this;\n            this.ghost = false;\n            this.hidden = true;\n            if (typeof this.node_image !== 'undefined'){\n                this.node_image.opacity = 0;\n            }\n            this.hideButtons();\n            this.circle.opacity = 0;\n            this.title.css('opacity', 0);\n            this.minimap_circle.opacity = 0;\n\n\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge);\n                        if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                            repr.hide();\n                        }\n                    }\n            );\n            this.hideNeighbors();\n        },\n        show: function(ghost){\n            var _this = this;\n            this.ghost = ghost;\n            if (this.ghost){\n                if (typeof this.node_image !== 'undefined'){\n                    this.node_image.opacity = this.options.ghost_opacity;\n                }\n                this.circle.opacity = this.options.ghost_opacity;\n                this.title.css('opacity', this.options.ghost_opacity);\n                this.minimap_circle.opacity = this.options.ghost_opacity;\n            } else {\n                this.hidden = false;\n                this.redraw();\n            }\n\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge);\n                        if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                            repr.show(_this.ghost);\n                        }\n                    }\n            );\n        },\n        hideNeighbors: function(){\n            var _this = this;\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return (ed.get(\"from\") === _this.model);\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge.get(\"to\"));\n                        if (repr && repr.ghost) {\n                            repr.hide();\n                        }\n                    }\n            );\n        },\n        showNeighbors: function(ghost){\n            var _this = this;\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return (ed.get(\"from\") === _this.model);\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge.get(\"to\"));\n                        if (repr && repr.hidden) {\n                            repr.show(ghost);\n                            if (!ghost){\n                                var indexNode = _this.renderer.hiddenNodes.indexOf(repr.model.id);\n                                if (indexNode !== -1){\n                                    _this.renderer.hiddenNodes.splice(indexNode, 1);\n                                }\n                            }\n                        }\n                    }\n            );\n        },\n        highlight: function(textToReplace) {\n            var hlvalue = textToReplace || true;\n            if (this.highlighted === hlvalue) {\n                return;\n            }\n            this.highlighted = hlvalue;\n            this.redraw();\n            this.renderer.throttledPaperDraw();\n        },\n        unhighlight: function() {\n            if (!this.highlighted) {\n                return;\n            }\n            this.highlighted = false;\n            this.redraw();\n            this.renderer.throttledPaperDraw();\n        },\n        saveCoords: function() {\n            var _coords = this.renderer.toModelCoords(this.paper_coords),\n            _data = {\n                position: {\n                    x: _coords.x,\n                    y: _coords.y\n                }\n            };\n            if (this.renderer.isEditable()) {\n                this.model.set(_data);\n            }\n        },\n        mousedown: function(_event, _isTouch) {\n            if (_isTouch) {\n                this.renderer.unselectAll();\n                this.select();\n            }\n        },\n        mouseup: function(_event, _isTouch) {\n            if (this.renderer.is_dragging && this.renderer.isEditable()) {\n                this.saveCoords();\n            } else {\n                if (this.hidden) {\n                    var index = this.renderer.hiddenNodes.indexOf(this.model.id);\n                    if (index !== -1){\n                        this.renderer.hiddenNodes.splice(index, 1);\n                    }\n                    this.show(false);\n                    this.select();\n                } else {\n                    if (!_isTouch && !this.model.get(\"delete_scheduled\")) {\n                        this.openEditor();\n                    }\n                    this.model.trigger(\"clicked\");\n                }\n            }\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.is_dragging = false;\n        },\n        destroy: function(_event) {\n            this._super(\"destroy\");\n            this.all_buttons.forEach(function(b) {\n                b.destroy();\n            });\n            this.circle.remove();\n            this.title.remove();\n            if (this.renderer.minimap) {\n                this.minimap_circle.remove();\n            }\n            if (this.node_image) {\n                this.node_image.remove();\n            }\n        }\n    }).value();\n\n    return NodeRepr;\n\n});\n\n\ndefine('renderer/edge',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Edge Class Begin */\n\n    //var Edge = Renderer.Edge = Utils.inherit(Renderer._BaseRepresentation);\n    var Edge = Utils.inherit(BaseRepresentation);\n\n    _(Edge.prototype).extend({\n        _init: function() {\n            this.renderer.edge_layer.activate();\n            this.type = \"Edge\";\n            this.hidden = false;\n            this.ghost = false;\n            this.from_representation = this.renderer.getRepresentationByModel(this.model.get(\"from\"));\n            this.to_representation = this.renderer.getRepresentationByModel(this.model.get(\"to\"));\n            this.bundle = this.renderer.addToBundles(this);\n            this.line = new paper.Path();\n            this.line.add([0,0],[0,0],[0,0]);\n            this.line.__representation = this;\n            this.line.strokeWidth = this.options.edge_stroke_width;\n            this.arrow_scale = 1;\n            this.arrow = new paper.Path();\n            this.arrow.add(\n                    [ 0, 0 ],\n                    [ this.options.edge_arrow_length, this.options.edge_arrow_width / 2 ],\n                    [ 0, this.options.edge_arrow_width ]\n            );\n            this.arrow.pivot = new paper.Point([ this.options.edge_arrow_length / 2, this.options.edge_arrow_width / 2 ]);\n            this.arrow.__representation = this;\n            this.text = $('<div class=\"Rk-Label Rk-Edge-Label\">').appendTo(this.renderer.labels_$);\n            this.arrow_angle = 0;\n            if (this.options.editor_mode) {\n                var Renderer = requtils.getRenderer();\n                this.normal_buttons = [\n                                       new Renderer.EdgeEditButton(this.renderer, null),\n                                       new Renderer.EdgeRemoveButton(this.renderer, null)\n                                       ];\n                this.pending_delete_buttons = [\n                                               new Renderer.EdgeRevertButton(this.renderer, null)\n                                               ];\n                this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons);\n                for (var i = 0; i < this.all_buttons.length; i++) {\n                    this.all_buttons[i].source_representation = this;\n                }\n                this.active_buttons = [];\n            } else {\n                this.active_buttons = this.all_buttons = [];\n            }\n\n            if (this.renderer.minimap) {\n                this.renderer.minimap.edge_layer.activate();\n                this.minimap_line = new paper.Path();\n                this.minimap_line.add([0,0],[0,0]);\n                this.minimap_line.__representation = this.renderer.minimap.miniframe.__representation;\n                this.minimap_line.strokeWidth = 1;\n            }\n        },\n        _getStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.edge_stroke_width + (thickness-1) * (this.options.edge_stroke_max_width - this.options.edge_stroke_width) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        _getSelectedStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.selected_edge_stroke_width + (thickness-1) * (this.options.selected_edge_stroke_max_width - this.options.selected_edge_stroke_width) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        _getArrowScale: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return 1 + (thickness-1) * ((this.options.edge_arrow_max_width / this.options.edge_arrow_width) - 1) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        redraw: function() {\n            var from = this.model.get(\"from\"),\n            to = this.model.get(\"to\");\n            if (!from || !to || (this.hidden && !this.ghost)) {\n                return;\n            }\n            this.from_representation = this.renderer.getRepresentationByModel(from);\n            this.to_representation = this.renderer.getRepresentationByModel(to);\n            if (typeof this.from_representation === \"undefined\" || typeof this.to_representation === \"undefined\" ||\n                    (this.from_representation.hidden && !this.from_representation.ghost) ||\n                    (this.to_representation.hidden && !this.to_representation.ghost)) {\n                this.hide();\n                return;\n            }\n            var _strokeWidth = this._getStrokeWidth(),\n                _arrow_scale = this._getArrowScale(),\n                _p0a = this.from_representation.paper_coords,\n                _p1a = this.to_representation.paper_coords,\n                _v = _p1a.subtract(_p0a),\n                _r = _v.length,\n                _u = _v.divide(_r),\n                _ortho = new paper.Point([- _u.y, _u.x]),\n                _group_pos = this.bundle.getPosition(this),\n                _delta = _ortho.multiply( this.options.edge_gap_in_bundles * _group_pos ),\n                _p0b = _p0a.add(_delta), /* Adding a 4 px difference */\n                _p1b = _p1a.add(_delta), /* to differentiate bundled links */\n                _a = _v.angle,\n                _textdelta = _ortho.multiply(this.options.edge_label_distance + 0.5 * _arrow_scale * this.options.edge_arrow_width),\n                _handle = _v.divide(3),\n                _color = (this.model.has(\"style\") && this.model.get(\"style\").color) || (this.model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                _dash = (this.model.has(\"style\") && this.model.get(\"style\").dash) ? this.options.default_dash_array : null,\n                _opacity;\n\n            if (this.model.get(\"delete_scheduled\") || this.from_representation.model.get(\"delete_scheduled\") || this.to_representation.model.get(\"delete_scheduled\")) {\n                _opacity = 0.5;\n                this.line.dashArray = [2, 2];\n            } else {\n                _opacity = this.ghost ? this.options.ghost_opacity : 1;\n                this.line.dashArray = null;\n            }\n\n            var old_act_btn = this.active_buttons;\n\n            this.arrow.visible =\n                (this.model.has(\"style\") && this.model.get(\"style\").arrow) ||\n                !this.model.has(\"style\") ||\n                typeof this.model.get(\"style\").arrow === 'undefined';\n\n            this.active_buttons = this.model.get(\"delete_scheduled\") ? this.pending_delete_buttons : this.normal_buttons;\n\n            if (this.selected && this.renderer.isEditable() && old_act_btn !== this.active_buttons) {\n                old_act_btn.forEach(function(b) {\n                    b.hide();\n                });\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n\n            this.paper_coords = _p0b.add(_p1b).divide(2);\n            this.line.strokeWidth = _strokeWidth;\n            this.line.strokeColor = _color;\n            this.line.dashArray = _dash;\n            this.line.opacity = _opacity;\n            this.line.segments[0].point = _p0a;\n            this.line.segments[1].point = this.paper_coords;\n            this.line.segments[1].handleIn = _handle.multiply(-1);\n            this.line.segments[1].handleOut = _handle;\n            this.line.segments[2].point = _p1a;\n            this.arrow.scale(_arrow_scale / this.arrow_scale);\n            this.arrow_scale = _arrow_scale;\n            this.arrow.fillColor = _color;\n            this.arrow.opacity = _opacity;\n            this.arrow.rotate(_a - this.arrow_angle, this.arrow.bounds.center);\n            this.arrow.position = this.paper_coords;\n\n            this.arrow_angle = _a;\n            if (_a > 90) {\n                _a -= 180;\n                _textdelta = _textdelta.multiply(-1);\n            }\n            if (_a < -90) {\n                _a += 180;\n                _textdelta = _textdelta.multiply(-1);\n            }\n            var _text = this.model.get(\"title\") || this.renkan.translate(this.options.label_untitled_edges) || \"\";\n            _text = Utils.shortenText(_text, this.options.node_label_max_length);\n            this.text.text(_text);\n            var _textpos = this.paper_coords.add(_textdelta);\n            this.text.css({\n                left: _textpos.x,\n                top: _textpos.y,\n                transform: \"rotate(\" + _a + \"deg)\",\n                \"-moz-transform\": \"rotate(\" + _a + \"deg)\",\n                \"-webkit-transform\": \"rotate(\" + _a + \"deg)\",\n                opacity: _opacity\n            });\n            this.text_angle = _a;\n\n            var _pc = this.paper_coords;\n            this.all_buttons.forEach(function(b) {\n                b.moveTo(_pc);\n            });\n\n            if (this.renderer.minimap) {\n                this.minimap_line.strokeColor = _color;\n                this.minimap_line.segments[0].point = this.renderer.toMinimapCoords(new paper.Point(this.from_representation.model.get(\"position\")));\n                this.minimap_line.segments[1].point = this.renderer.toMinimapCoords(new paper.Point(this.to_representation.model.get(\"position\")));\n            }\n        },\n        hide: function(){\n            this.hidden = true;\n            this.ghost = false;\n\n            this.text.hide();\n            this.line.visible = false;\n            this.arrow.visible = false;\n            this.minimap_line.visible = false;\n        },\n        show: function(ghost){\n            this.ghost = ghost;\n            if (this.ghost) {\n                this.text.css('opacity', 0.3);\n                this.line.opacity = 0.3;\n                this.arrow.opacity = 0.3;\n                this.minimap_line.opacity = 0.3;\n            } else {\n                this.hidden = false;\n\n                this.text.css('opacity', 1);\n                this.line.opacity = 1;\n                this.arrow.opacity = 1;\n                this.minimap_line.opacity = 1;\n            }\n            this.text.show();\n            this.line.visible = true;\n            this.arrow.visible = true;\n            this.minimap_line.visible = true;\n            this.redraw();\n        },\n        openEditor: function() {\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            var _editor = this.renderer.addRepresentation(\"EdgeEditor\",null);\n            _editor.source_representation = this;\n            _editor.draw();\n        },\n        select: function() {\n            this.selected = true;\n            this.line.strokeWidth = this._getSelectedStrokeWidth();\n            if (this.renderer.isEditable()) {\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n            if (!this.options.editor_mode) {\n                this.openEditor();\n            }\n            this._super(\"select\");\n        },\n        unselect: function(_newTarget) {\n            if (!_newTarget || _newTarget.source_representation !== this) {\n                this.selected = false;\n                if (this.options.editor_mode) {\n                    this.all_buttons.forEach(function(b) {\n                        b.hide();\n                    });\n                }\n                this.line.strokeWidth = this._getStrokeWidth();\n                this._super(\"unselect\");\n            }\n        },\n        mousedown: function(_event, _isTouch) {\n            if (_isTouch) {\n                this.renderer.unselectAll();\n                this.select();\n            }\n        },\n        mouseup: function(_event, _isTouch) {\n            if (!this.renkan.read_only && this.renderer.is_dragging) {\n                this.from_representation.saveCoords();\n                this.to_representation.saveCoords();\n                this.from_representation.is_dragging = false;\n                this.to_representation.is_dragging = false;\n            } else {\n                if (!_isTouch) {\n                    this.openEditor();\n                }\n                this.model.trigger(\"clicked\");\n            }\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n        },\n        paperShift: function(_delta) {\n            if (this.options.editor_mode) {\n                if (!this.options.read_only) {\n                    this.from_representation.paperShift(_delta);\n                    this.to_representation.paperShift(_delta);\n                }\n            } else {\n                this.renderer.paperShift(_delta);\n            }\n        },\n        destroy: function() {\n            this._super(\"destroy\");\n            this.line.remove();\n            this.arrow.remove();\n            this.text.remove();\n            if (this.renderer.minimap) {\n                this.minimap_line.remove();\n            }\n            this.all_buttons.forEach(function(b) {\n                b.destroy();\n            });\n            var _this = this;\n            this.bundle.edges = _.reject(this.bundle.edges, function(_edge) {\n                return _this === _edge;\n            });\n        }\n    }).value();\n\n    return Edge;\n\n});\n\n\n\ndefine('renderer/tempedge',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* TempEdge Class Begin */\n\n    //var TempEdge = Renderer.TempEdge = Utils.inherit(Renderer._BaseRepresentation);\n    var TempEdge = Utils.inherit(BaseRepresentation);\n\n    _(TempEdge.prototype).extend({\n        _init: function() {\n            this.renderer.edge_layer.activate();\n            this.type = \"Temp-edge\";\n\n            var _color = (this.project.get(\"users\").get(this.renkan.current_user) || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\");\n            this.line = new paper.Path();\n            this.line.strokeColor = _color;\n            this.line.dashArray = [4, 2];\n            this.line.strokeWidth = this.options.selected_edge_stroke_width;\n            this.line.add([0,0],[0,0]);\n            this.line.__representation = this;\n            this.arrow = new paper.Path();\n            this.arrow.fillColor = _color;\n            this.arrow.add(\n                    [ 0, 0 ],\n                    [ this.options.edge_arrow_length, this.options.edge_arrow_width / 2 ],\n                    [ 0, this.options.edge_arrow_width ]\n            );\n            this.arrow.__representation = this;\n            this.arrow_angle = 0;\n        },\n        redraw: function() {\n            var _p0 = this.from_representation.paper_coords,\n            _p1 = this.end_pos,\n            _a = _p1.subtract(_p0).angle,\n            _c = _p0.add(_p1).divide(2);\n            this.line.segments[0].point = _p0;\n            this.line.segments[1].point = _p1;\n            this.arrow.rotate(_a - this.arrow_angle);\n            this.arrow.position = _c;\n            this.arrow_angle = _a;\n        },\n        paperShift: function(_delta) {\n            if (!this.renderer.isEditable()) {\n                this.renderer.removeRepresentation(_this);\n                paper.view.draw();\n                return;\n            }\n            this.end_pos = this.end_pos.add(_delta);\n            var _hitResult = paper.project.hitTest(this.end_pos);\n            this.renderer.findTarget(_hitResult);\n            this.redraw();\n        },\n        mouseup: function(_event, _isTouch) {\n            var _hitResult = paper.project.hitTest(_event.point),\n            _model = this.from_representation.model,\n            _endDrag = true;\n            if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                var _target = _hitResult.item.__representation;\n                if (_target.type.substr(0,4) === \"Node\") {\n                    var _destmodel = _target.model || _target.source_representation.model;\n                    if (_model !== _destmodel) {\n                        var _data = {\n                                id: Utils.getUID('edge'),\n                                created_by: this.renkan.current_user,\n                                from: _model,\n                                to: _destmodel\n                        };\n                        if (this.renderer.isEditable()) {\n                            this.project.addEdge(_data);\n                        }\n                    }\n                }\n\n                if (_model === _target.model || (_target.source_representation && _target.source_representation.model === _model)) {\n                    _endDrag = false;\n                    this.renderer.is_dragging = true;\n                }\n            }\n            if (_endDrag) {\n                this.renderer.click_target = null;\n                this.renderer.is_dragging = false;\n                this.renderer.removeRepresentation(this);\n                paper.view.draw();\n            }\n        },\n        destroy: function() {\n            this.arrow.remove();\n            this.line.remove();\n        }\n    }).value();\n\n    /* TempEdge Class End */\n\n    return TempEdge;\n\n});\n\n\ndefine('renderer/baseeditor',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* _BaseEditor Begin */\n    //var _BaseEditor = Renderer._BaseEditor = Utils.inherit(Renderer._BaseRepresentation);\n    var _BaseEditor = Utils.inherit(BaseRepresentation);\n\n    _(_BaseEditor.prototype).extend({\n        _init: function() {\n            this.renderer.buttons_layer.activate();\n            this.type = \"editor\";\n            this.editor_block = new paper.Path();\n            var _pts = _.map(_.range(8), function() {return [0,0];});\n            this.editor_block.add.apply(this.editor_block, _pts);\n            this.editor_block.strokeWidth = this.options.tooltip_border_width;\n            this.editor_block.strokeColor = this.options.tooltip_border_color;\n            this.editor_block.opacity = 0.8;\n            this.editor_$ = $('<div>')\n            .appendTo(this.renderer.editor_$)\n            .css({\n                position: \"absolute\",\n                opacity: 0.8\n            })\n            .hide();\n        },\n        destroy: function() {\n            this.editor_block.remove();\n            this.editor_$.remove();\n        }\n    }).value();\n\n    /* _BaseEditor End */\n\n    return _BaseEditor;\n\n});\n\n\ndefine('renderer/nodeeditor',['jquery', 'underscore', 'requtils', 'renderer/baseeditor', 'renderer/shapebuilder'], function ($, _, requtils, BaseEditor, ShapeBuilder) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEditor Begin */\n    //var NodeEditor = Renderer.NodeEditor = Utils.inherit(Renderer._BaseEditor);\n    var NodeEditor = Utils.inherit(BaseEditor);\n\n    _(NodeEditor.prototype).extend({\n        _init: function() {\n            BaseEditor.prototype._init.apply(this);\n            this.template = this.options.templates['templates/nodeeditor.html'];\n            //this.templates['default']= this.options.templates['templates/nodeeditor.html'];\n            //fusionner avec this.options.node_editor_templates\n            this.readOnlyTemplate = this.options.templates['templates/nodeeditor_readonly.html'];\n        },\n        draw: function() {\n            var _model = this.source_representation.model,\n            _created_by = _model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan),\n            _template = (this.renderer.isEditable() ? this.template : this.readOnlyTemplate ),\n            _image_placeholder = this.options.static_url + \"img/image-placeholder.png\",\n            _size = (_model.get(\"size\") || 0);\n            this.editor_$\n            .html(_template({\n                node: {\n                    has_creator: !!_model.get(\"created_by\"),\n                    title: _model.get(\"title\"),\n                    uri: _model.get(\"uri\"),\n                    short_uri:  Utils.shortenText((_model.get(\"uri\") || \"\").replace(/^(https?:\\/\\/)?(www\\.)?/,'').replace(/\\/$/,''),40),\n                    description: _model.get(\"description\"),\n                    image: _model.get(\"image\") || \"\",\n                    image_placeholder: _image_placeholder,\n                    color: (_model.has(\"style\") && _model.get(\"style\").color) || _created_by.get(\"color\"),\n                    thickness: (_model.has(\"style\") && _model.get(\"style\").thickness) || 1,\n                    dash: _model.has(\"style\") && _model.get(\"style\").dash ? \"checked\" : \"\",\n                    clip_path: _model.get(\"clip_path\") || false,\n                    created_by_color: _created_by.get(\"color\"),\n                    created_by_title: _created_by.get(\"title\"),\n                    size: (_size > 0 ? \"+\" : \"\") + _size,\n                    shape: _model.get(\"shape\") || \"circle\"\n                },\n                renkan: this.renkan,\n                options: this.options,\n                shortenText: Utils.shortenText,\n                shapes : _(ShapeBuilder.builders).omit('svg').keys().value(),\n            }));\n            this.redraw();\n            var _this = this,\n            closeEditor = function() {\n                _this.editor_$.off(\"keyup\");\n                _this.editor_$.find(\"input, textarea, select\").off(\"change keyup paste\");\n                _this.editor_$.find(\".Rk-Edit-Image-File\").off('change');\n                _this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").off('hover');\n                _this.editor_$.find(\".Rk-Edit-Size-Btn\").off('click');\n                _this.editor_$.find(\".Rk-Edit-Image-Del\").off('click');\n                _this.editor_$.find(\".Rk-Edit-ColorPicker\").find(\"li\").off('hover click');\n                _this.editor_$.find(\".Rk-CloseX\").off('click');\n                _this.editor_$.find(\".Rk-Edit-Goto\").off('click');\n\n                _this.renderer.removeRepresentation(_this);\n                paper.view.draw();\n            };\n\n            this.editor_$.find(\".Rk-CloseX\").click(closeEditor);\n\n            this.editor_$.find(\".Rk-Edit-Goto\").click(function() {\n                if (!_model.get(\"uri\")) {\n                    return false;\n                }\n            });\n\n            if (this.renderer.isEditable()) {\n\n                var onFieldChange = _.throttle(function() {\n                  _.defer(function() {\n                    if (_this.renderer.isEditable()) {\n                        var _data = {\n                            title: _this.editor_$.find(\".Rk-Edit-Title\").val()\n                        };\n                        if (_this.options.show_node_editor_uri) {\n                            _data.uri = _this.editor_$.find(\".Rk-Edit-URI\").val();\n                            _this.editor_$.find(\".Rk-Edit-Goto\").attr(\"href\",_data.uri || \"#\");\n                        }\n                        if (_this.options.show_node_editor_image) {\n                            _data.image = _this.editor_$.find(\".Rk-Edit-Image\").val();\n                            _this.editor_$.find(\".Rk-Edit-ImgPreview\").attr(\"src\", _data.image || _image_placeholder);\n                        }\n                        if (_this.options.show_node_editor_description) {\n                            _data.description = _this.editor_$.find(\".Rk-Edit-Description\").val();\n                        }\n                        if (_this.options.show_node_editor_style) {\n                            var dash = _this.editor_$.find(\".Rk-Edit-Dash\").is(':checked');\n                            _data.style = _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {dash: dash});\n                        }\n                        if (_this.options.change_shapes) {\n                            if(_model.get(\"shape\")!==_this.editor_$.find(\".Rk-Edit-Shape\").val()){\n                                _data.shape = _this.editor_$.find(\".Rk-Edit-Shape\").val();\n                            }\n                        }\n                        _model.set(_data);\n                        _this.redraw();\n                    } else {\n                        closeEditor();\n                    }\n                  });\n                }, 500);\n\n                this.editor_$.on(\"keyup\", function(_e) {\n                    if (_e.keyCode === 27) {\n                        closeEditor();\n                    }\n                });\n\n                this.editor_$.find(\"input, textarea, select\").on(\"change keyup paste\", onFieldChange);\n\n                if(_this.options.allow_image_upload) {\n                    this.editor_$.find(\".Rk-Edit-Image-File\").change(function() {\n                        if (this.files.length) {\n                            var f = this.files[0],\n                            fr = new FileReader();\n                            if (f.type.substr(0,5) !== \"image\") {\n                                alert(_this.renkan.translate(\"This file is not an image\"));\n                                return;\n                            }\n                            if (f.size > (_this.options.uploaded_image_max_kb * 1024)) {\n                                alert(_this.renkan.translate(\"Image size must be under \") + _this.options.uploaded_image_max_kb + _this.renkan.translate(\"KB\"));\n                                return;\n                            }\n                            fr.onload = function(e) {\n                                _this.editor_$.find(\".Rk-Edit-Image\").val(e.target.result);\n                                onFieldChange();\n                            };\n                            fr.readAsDataURL(f);\n                        }\n                    });\n                }\n                this.editor_$.find(\".Rk-Edit-Title\")[0].focus();\n\n                var _picker = _this.editor_$.find(\".Rk-Edit-ColorPicker\");\n\n                this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.show();\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.hide();\n                        }\n                );\n\n                _picker.find(\"li\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", (_model.has(\"style\") && _model.get(\"style\").color) || (_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(_this.renkan)).get(\"color\"));\n                        }\n                ).click(function(_e) {\n                    _e.preventDefault();\n                    if (_this.renderer.isEditable()) {\n                        _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {color: $(this).attr(\"data-color\")}));\n                        _picker.hide();\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n\n                var shiftSize = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _newsize = n+(_model.get(\"size\") || 0);\n                        _this.editor_$.find(\"#Rk-Edit-Size-Value\").text((_newsize > 0 ? \"+\" : \"\") + _newsize);\n                        _model.set(\"size\", _newsize);\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Size-Down\").click(function() {\n                    shiftSize(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Size-Up\").click(function() {\n                    shiftSize(1);\n                    return false;\n                });\n\n                var shiftThickness = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _oldThickness = ((_model.has('style') && _model.get('style').thickness) || 1),\n                            _newThickness = n + _oldThickness;\n                        if(_newThickness < 1 ) {\n                            _newThickness = 1;\n                        }\n                        else if (_newThickness > _this.options.node_stroke_witdh_scale) {\n                            _newThickness = _this.options.node_stroke_witdh_scale;\n                        }\n                        if (_newThickness !== _oldThickness) {\n                            _this.editor_$.find(\"#Rk-Edit-Thickness-Value\").text(_newThickness);\n                            _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {thickness: _newThickness}));\n                            paper.view.draw();\n                        }\n                    }\n                    else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Thickness-Down\").click(function() {\n                    shiftThickness(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Thickness-Up\").click(function() {\n                    shiftThickness(1);\n                    return false;\n                });\n\n                this.editor_$.find(\".Rk-Edit-Image-Del\").click(function() {\n                    _this.editor_$.find(\".Rk-Edit-Image\").val('');\n                    onFieldChange();\n                    return false;\n                });\n            } else {\n                if (typeof this.source_representation.highlighted === \"object\") {\n                    var titlehtml = this.source_representation.highlighted.replace(_(_model.get(\"title\")).escape(),'<span class=\"Rk-Highlighted\">$1</span>');\n                    this.editor_$.find(\".Rk-Display-Title\" + (_model.get(\"uri\") ? \" a\" : \"\")).html(titlehtml);\n                    if (this.options.show_node_tooltip_description) {\n                        this.editor_$.find(\".Rk-Display-Description\").html(this.source_representation.highlighted.replace(_(_model.get(\"description\")).escape(),'<span class=\"Rk-Highlighted\">$1</span>'));\n                    }\n                }\n            }\n            this.editor_$.find(\"img\").load(function() {\n                _this.redraw();\n            });\n        },\n        redraw: function() {\n            if (this.options.popup_editor){\n                var _coords = this.source_representation.paper_coords;\n                Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);                \n            }\n            this.editor_$.show();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* NodeEditor End */\n\n    return NodeEditor;\n\n});\n\n\ndefine('renderer/edgeeditor',['jquery', 'underscore', 'requtils', 'renderer/baseeditor'], function ($, _, requtils, BaseEditor) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeEditor Begin */\n\n    //var EdgeEditor = Renderer.EdgeEditor = Utils.inherit(Renderer._BaseEditor);\n    var EdgeEditor = Utils.inherit(BaseEditor);\n\n    _(EdgeEditor.prototype).extend({\n        _init: function() {\n          BaseEditor.prototype._init.apply(this);\n          this.template = this.options.templates['templates/edgeeditor.html'];\n          this.readOnlyTemplate = this.options.templates['templates/edgeeditor_readonly.html'];\n        },\n        draw: function() {\n            var _model = this.source_representation.model,\n            _from_model = _model.get(\"from\"),\n            _to_model = _model.get(\"to\"),\n            _created_by = _model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan),\n            _template = (this.renderer.isEditable() ? this.template : this.readOnlyTemplate);\n            this.editor_$\n              .html(_template({\n                edge: {\n                    has_creator: !!_model.get(\"created_by\"),\n                    title: _model.get(\"title\"),\n                    uri: _model.get(\"uri\"),\n                    short_uri:  Utils.shortenText((_model.get(\"uri\") || \"\").replace(/^(https?:\\/\\/)?(www\\.)?/,'').replace(/\\/$/,''),40),\n                    description: _model.get(\"description\"),\n                    color: (_model.has(\"style\") && _model.get(\"style\").color) || _created_by.get(\"color\"),\n                    dash: _model.has(\"style\") && _model.get(\"style\").dash ? \"checked\" : \"\",\n                    arrow: (_model.has(\"style\") && _model.get(\"style\").arrow) || !_model.has(\"style\") || (typeof _model.get(\"style\").arrow === 'undefined') ? \"checked\" : \"\",\n                    thickness: (_model.has(\"style\") && _model.get(\"style\").thickness) || 1,\n                    from_title: _from_model.get(\"title\"),\n                    to_title: _to_model.get(\"title\"),\n                    from_color: (_from_model.has(\"style\") && _from_model.get(\"style\").color) || (_from_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                    to_color: (_to_model.has(\"style\") && _to_model.get(\"style\").color) || (_to_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                    created_by_color: _created_by.get(\"color\"),\n                    created_by_title: _created_by.get(\"title\")\n                },\n                renkan: this.renkan,\n                shortenText: Utils.shortenText,\n                options: this.options\n            }));\n            this.redraw();\n            var _this = this,\n            closeEditor = function() {\n                _this.renderer.removeRepresentation(_this);\n                _this.editor_$.find(\".Rk-Edit-Size-Btn\").off('click');\n                paper.view.draw();\n            };\n            this.editor_$.find(\".Rk-CloseX\").click(closeEditor);\n            this.editor_$.find(\".Rk-Edit-Goto\").click(function() {\n                if (!_model.get(\"uri\")) {\n                    return false;\n                }\n            });\n\n            if (this.renderer.isEditable()) {\n\n                var onFieldChange = _.throttle(function() {\n                    _.defer(function() {\n                        if (_this.renderer.isEditable()) {\n                            var _data = {\n                                title: _this.editor_$.find(\".Rk-Edit-Title\").val()\n                            };\n                            if (_this.options.show_edge_editor_uri) {\n                                _data.uri = _this.editor_$.find(\".Rk-Edit-URI\").val();\n                            }\n                            if (_this.options.show_node_editor_style) {\n                                var dash = _this.editor_$.find(\".Rk-Edit-Dash\").is(':checked');\n                                _data.style = _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {dash: dash});\n                                var arrow = _this.editor_$.find(\".Rk-Edit-Arrow\").is(':checked');\n                                _data.style = _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {arrow: arrow});\n                            }\n                            _this.editor_$.find(\".Rk-Edit-Goto\").attr(\"href\",_data.uri || \"#\");\n                            _model.set(_data);\n                            paper.view.draw();\n                        } else {\n                            closeEditor();\n                        }\n                    });\n                },500);\n\n                this.editor_$.on(\"keyup\", function(_e) {\n                    if (_e.keyCode === 27) {\n                        closeEditor();\n                    }\n                });\n\n                this.editor_$.find(\"input\").on(\"keyup change paste\", onFieldChange);\n\n                this.editor_$.find(\".Rk-Edit-Vocabulary\").change(function() {\n                    var e = $(this),\n                    v = e.val();\n                    if (v) {\n                        _this.editor_$.find(\".Rk-Edit-Title\").val(e.find(\":selected\").text());\n                        _this.editor_$.find(\".Rk-Edit-URI\").val(v);\n                        onFieldChange();\n                    }\n                });\n                this.editor_$.find(\".Rk-Edit-Direction\").click(function() {\n                    if (_this.renderer.isEditable()) {\n                        _model.set({\n                            from: _model.get(\"to\"),\n                            to: _model.get(\"from\")\n                        });\n                        _this.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n\n                var _picker = _this.editor_$.find(\".Rk-Edit-ColorPicker\");\n\n                this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.show();\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.hide();\n                        }\n                );\n\n                _picker.find(\"li\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", (_model.has(\"style\") && _model.get(\"style\").color)|| (_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(_this.renkan)).get(\"color\"));\n                        }\n                ).click(function(_e) {\n                    _e.preventDefault();\n                    if (_this.renderer.isEditable()) {\n                        _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {color: $(this).attr(\"data-color\")}));\n                        _picker.hide();\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n                var shiftThickness = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _oldThickness = ((_model.has('style') && _model.get('style').thickness) || 1),\n                            _newThickness = n + _oldThickness;\n                        if(_newThickness < 1 ) {\n                            _newThickness = 1;\n                        }\n                        else if (_newThickness > _this.options.node_stroke_witdh_scale) {\n                            _newThickness = _this.options.node_stroke_witdh_scale;\n                        }\n                        if (_newThickness !== _oldThickness) {\n                            _this.editor_$.find(\"#Rk-Edit-Thickness-Value\").text(_newThickness);\n                            _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {thickness: _newThickness}));\n                            paper.view.draw();\n                        }\n                    }\n                    else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Thickness-Down\").click(function() {\n                    shiftThickness(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Thickness-Up\").click(function() {\n                    shiftThickness(1);\n                    return false;\n                });\n            }\n        },\n        redraw: function() {\n            if (this.options.popup_editor){\n                var _coords = this.source_representation.paper_coords;\n                Utils.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);\n            }\n            this.editor_$.show();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* EdgeEditor End */\n\n    return EdgeEditor;\n\n});\n\n\ndefine('renderer/nodebutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* _NodeButton Begin */\n\n    //var _NodeButton = Renderer._NodeButton = Utils.inherit(Renderer._BaseButton);\n    var _NodeButton = Utils.inherit(BaseButton);\n\n    _(_NodeButton.prototype).extend({\n        setSectorSize: function() {\n            var sectorInner = this.source_representation.circle_radius;\n            if (sectorInner !== this.lastSectorInner) {\n                if (this.sector) {\n                    this.sector.destroy();\n                }\n                this.sector = this.renderer.drawSector(\n                        this, 1 + sectorInner,\n                        Utils._NODE_BUTTON_WIDTH + sectorInner,\n                        this.startAngle,\n                        this.endAngle,\n                        1,\n                        this.imageName,\n                        this.renkan.translate(this.text)\n                );\n                this.lastSectorInner = sectorInner;\n            }\n        },\n        unselect: function() {\n            BaseButton.prototype.unselect.apply(this, Array.prototype.slice.call(arguments, 1));\n            if(this.source_representation && this.source_representation.buttons_timeout) {\n                clearTimeout(this.source_representation.buttons_timeout);\n                this.source_representation.hideButtons();\n            }\n        },\n        select: function() {\n            if(this.source_representation && this.source_representation.buttons_timeout) {\n                clearTimeout(this.source_representation.buttons_timeout);\n            }\n            this.sector.select();\n        },\n    }).value();\n\n\n    /* _NodeButton End */\n\n    return _NodeButton;\n\n});\n\n\ndefine('renderer/nodeeditbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEditButton Begin */\n\n    //var NodeEditButton = Renderer.NodeEditButton = Utils.inherit(Renderer._NodeButton);\n    var NodeEditButton = Utils.inherit(NodeButton);\n\n    _(NodeEditButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-edit-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -125;\n            this.endAngle = -55;\n            this.imageName = \"edit\";\n            this.text = \"Edit\";\n        },\n        mouseup: function() {\n            if (!this.renderer.is_dragging) {\n                this.source_representation.openEditor();\n            }\n        }\n    }).value();\n\n    /* NodeEditButton End */\n\n    return NodeEditButton;\n\n});\n\n\ndefine('renderer/noderemovebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeRemoveButton = Utils.inherit(NodeButton);\n\n    _(NodeRemoveButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-remove-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -10;\n            this.endAngle = 45;\n            this.imageName = \"remove\";\n            this.text = \"Remove\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                if (this.options.element_delete_delay) {\n                    var delid = Utils.getUID(\"delete\");\n                    this.renderer.delete_list.push({\n                        id: delid,\n                        time: new Date().valueOf() + this.options.element_delete_delay\n                    });\n                    this.source_representation.model.set(\"delete_scheduled\", delid);\n                } else {\n                    if (confirm(this.renkan.translate('Do you really wish to remove node ') + '\"' + this.source_representation.model.get(\"title\") + '\"?')) {\n                        this.project.removeNode(this.source_representation.model);\n                    }\n                }\n            }\n        }\n    }).value();\n\n    /* NodeRemoveButton End */\n\n    return NodeRemoveButton;\n\n});\n\n\ndefine('renderer/nodehidebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeHideButton = Utils.inherit(NodeButton);\n\n    _(NodeHideButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-hide-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = 45;\n            this.endAngle = 90;\n            this.imageName = \"hide\";\n            this.text = \"Hide\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                this.renderer.addHiddenNode(this.source_representation.model);\n            }\n        }\n    }).value();\n\n    /* NodeRemoveButton End */\n\n    return NodeHideButton;\n\n});\n\n\ndefine('renderer/nodeshowbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeShowButton = Utils.inherit(NodeButton);\n\n    _(NodeShowButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-show-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = 90;\n            this.endAngle = 135;\n            this.imageName = \"show\";\n            this.text = \"Show\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                this.source_representation.showNeighbors(false);\n            }\n        }\n    }).value();\n\n    /* NodeShowButton End */\n\n    return NodeShowButton;\n\n});\n\n\ndefine('renderer/noderevertbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRevertButton Begin */\n\n    //var NodeRevertButton = Renderer.NodeRevertButton = Utils.inherit(Renderer._NodeButton);\n    var NodeRevertButton = Utils.inherit(NodeButton);\n\n    _(NodeRevertButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-revert-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -135;\n            this.endAngle = 135;\n            this.imageName = \"revert\";\n            this.text = \"Cancel deletion\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            if (this.renderer.isEditable()) {\n                this.source_representation.model.unset(\"delete_scheduled\");\n            }\n        }\n    }).value();\n\n    /* NodeRevertButton End */\n\n    return NodeRevertButton;\n\n});\n\n\ndefine('renderer/nodelinkbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeLinkButton Begin */\n\n    //var NodeLinkButton = Renderer.NodeLinkButton = Utils.inherit(Renderer._NodeButton);\n    var NodeLinkButton = Utils.inherit(NodeButton);\n\n    _(NodeLinkButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-link-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = 135;\n            this.endAngle = 190;\n            this.imageName = \"link\";\n            this.text = \"Link to another node\";\n        },\n        mousedown: function(_event, _isTouch) {\n            if (this.renderer.isEditable()) {\n                var _off = this.renderer.canvas_$.offset(),\n                _point = new paper.Point([\n                                          _event.pageX - _off.left,\n                                          _event.pageY - _off.top\n                                          ]);\n                this.renderer.click_target = null;\n                this.renderer.removeRepresentationsOfType(\"editor\");\n                this.renderer.addTempEdge(this.source_representation, _point);\n            }\n        }\n    }).value();\n\n    /* NodeLinkButton End */\n\n    return NodeLinkButton;\n\n});\n\n\n\ndefine('renderer/nodeenlargebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEnlargeButton Begin */\n\n    //var NodeEnlargeButton = Renderer.NodeEnlargeButton = Utils.inherit(Renderer._NodeButton);\n    var NodeEnlargeButton = Utils.inherit(NodeButton);\n\n    _(NodeEnlargeButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-enlarge-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -55;\n            this.endAngle = -10;\n            this.imageName = \"enlarge\";\n            this.text = \"Enlarge\";\n        },\n        mouseup: function() {\n            var _newsize = 1 + (this.source_representation.model.get(\"size\") || 0);\n            this.source_representation.model.set(\"size\", _newsize);\n            this.source_representation.select();\n            this.select();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* NodeEnlargeButton End */\n\n    return NodeEnlargeButton;\n\n});\n\n\ndefine('renderer/nodeshrinkbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeShrinkButton Begin */\n\n    //var NodeShrinkButton = Renderer.NodeShrinkButton = Utils.inherit(Renderer._NodeButton);\n    var NodeShrinkButton = Utils.inherit(NodeButton);\n\n    _(NodeShrinkButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-shrink-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -170;\n            this.endAngle = -125;\n            this.imageName = \"shrink\";\n            this.text = \"Shrink\";\n        },\n        mouseup: function() {\n            var _newsize = -1 + (this.source_representation.model.get(\"size\") || 0);\n            this.source_representation.model.set(\"size\", _newsize);\n            this.source_representation.select();\n            this.select();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* NodeShrinkButton End */\n\n    return NodeShrinkButton;\n\n});\n\n\ndefine('renderer/edgeeditbutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeEditButton Begin */\n\n    //var EdgeEditButton = Renderer.EdgeEditButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeEditButton = Utils.inherit(BaseButton);\n\n    _(EdgeEditButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-edit-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -270, -90, 1, \"edit\", this.renkan.translate(\"Edit\"));\n        },\n        mouseup: function() {\n            if (!this.renderer.is_dragging) {\n                this.source_representation.openEditor();\n            }\n        }\n    }).value();\n\n    /* EdgeEditButton End */\n\n    return EdgeEditButton;\n\n});\n\n\ndefine('renderer/edgeremovebutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeRemoveButton Begin */\n\n    //var EdgeRemoveButton = Renderer.EdgeRemoveButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeRemoveButton = Utils.inherit(BaseButton);\n\n    _(EdgeRemoveButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-remove-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -90, 90, 1, \"remove\", this.renkan.translate(\"Remove\"));\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                if (this.options.element_delete_delay) {\n                    var delid = Utils.getUID(\"delete\");\n                    this.renderer.delete_list.push({\n                        id: delid,\n                        time: new Date().valueOf() + this.options.element_delete_delay\n                    });\n                    this.source_representation.model.set(\"delete_scheduled\", delid);\n                } else {\n                    if (confirm(this.renkan.translate('Do you really wish to remove edge ') + '\"' + this.source_representation.model.get(\"title\") + '\"?')) {\n                        this.project.removeEdge(this.source_representation.model);\n                    }\n                }\n            }\n        }\n    }).value();\n\n    /* EdgeRemoveButton End */\n\n    return EdgeRemoveButton;\n\n});\n\n\ndefine('renderer/edgerevertbutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeRevertButton Begin */\n\n    //var EdgeRevertButton = Renderer.EdgeRevertButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeRevertButton = Utils.inherit(BaseButton);\n\n    _(EdgeRevertButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-revert-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -135, 135, 1, \"revert\", this.renkan.translate(\"Cancel deletion\"));\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            if (this.renderer.isEditable()) {\n                this.source_representation.model.unset(\"delete_scheduled\");\n            }\n        }\n    }).value();\n\n    /* EdgeRevertButton End */\n\n    return EdgeRevertButton;\n\n});\n\n\ndefine('renderer/miniframe',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* MiniFrame Begin */\n\n    //var MiniFrame = Renderer.MiniFrame = Utils.inherit(Renderer._BaseRepresentation);\n    var MiniFrame = Utils.inherit(BaseRepresentation);\n\n    _(MiniFrame.prototype).extend({\n        paperShift: function(_delta) {\n            this.renderer.offset = this.renderer.offset.subtract(_delta.divide(this.renderer.minimap.scale).multiply(this.renderer.scale));\n            this.renderer.redraw();\n        },\n        mouseup: function(_delta) {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n        }\n    }).value();\n\n\n    /* MiniFrame End */\n\n    return MiniFrame;\n\n});\n\n\ndefine('renderer/scene',['jquery', 'underscore', 'filesaver', 'requtils', 'renderer/miniframe'], function ($, _, filesaver, requtils, MiniFrame) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Scene Begin */\n\n    var Scene = function(_renkan) {\n        this.renkan = _renkan;\n        this.$ = $(\".Rk-Render\");\n        this.representations = [];\n        this.$.html(_renkan.options.templates['templates/scene.html'](_renkan));\n        this.onStatusChange();\n        this.canvas_$ = this.$.find(\".Rk-Canvas\");\n        this.labels_$ = this.$.find(\".Rk-Labels\");\n        if (!_renkan.options.popup_editor){\n            this.editor_$ = $(\"#\" + _renkan.options.editor_panel);\n        }else{\n            this.editor_$ = this.$.find(\".Rk-Editor\");\n        }\n        this.notif_$ = this.$.find(\".Rk-Notifications\");\n        paper.setup(this.canvas_$[0]);\n        this.scale = 1;\n        this.initialScale = 1;\n        this.offset = paper.view.center;\n        this.totalScroll = 0;\n        this.hiddenNodes = [];\n        this.mouse_down = false;\n        this.click_target = null;\n        this.selected_target = null;\n        this.edge_layer = new paper.Layer();\n        this.node_layer = new paper.Layer();\n        this.buttons_layer = new paper.Layer();\n        this.delete_list = [];\n        this.redrawActive = true;\n\n        if (_renkan.options.show_minimap) {\n            this.minimap = {\n                    background_layer: new paper.Layer(),\n                    edge_layer: new paper.Layer(),\n                    node_layer: new paper.Layer(),\n                    node_group: new paper.Group(),\n                    size: new paper.Size( _renkan.options.minimap_width, _renkan.options.minimap_height )\n            };\n\n            this.minimap.background_layer.activate();\n            this.minimap.topleft = paper.view.bounds.bottomRight.subtract(this.minimap.size);\n            this.minimap.rectangle = new paper.Path.Rectangle(this.minimap.topleft.subtract([2,2]), this.minimap.size.add([4,4]));\n            this.minimap.rectangle.fillColor = _renkan.options.minimap_background_color;\n            this.minimap.rectangle.strokeColor = _renkan.options.minimap_border_color;\n            this.minimap.rectangle.strokeWidth = 4;\n            this.minimap.offset = new paper.Point(this.minimap.size.divide(2));\n            this.minimap.scale = 0.1;\n\n            this.minimap.node_layer.activate();\n            this.minimap.cliprectangle = new paper.Path.Rectangle(this.minimap.topleft, this.minimap.size);\n            this.minimap.node_group.addChild(this.minimap.cliprectangle);\n            this.minimap.node_group.clipped = true;\n            this.minimap.miniframe = new paper.Path.Rectangle(this.minimap.topleft, this.minimap.size);\n            this.minimap.node_group.addChild(this.minimap.miniframe);\n            this.minimap.miniframe.fillColor = '#c0c0ff';\n            this.minimap.miniframe.opacity = 0.3;\n            this.minimap.miniframe.strokeColor = '#000080';\n            this.minimap.miniframe.strokeWidth = 2;\n            this.minimap.miniframe.__representation = new MiniFrame(this, null);\n        }\n\n        this.throttledPaperDraw = _(function() {\n            paper.view.draw();\n        }).throttle(100).value();\n\n        this.bundles = [];\n        this.click_mode = false;\n\n        var _this = this,\n        _allowScroll = true,\n        _originalScale = 1,\n        _zooming = false,\n        _lastTapX = 0,\n        _lastTapY = 0;\n\n        this.image_cache = {};\n        this.icon_cache = {};\n\n        ['edit', 'remove', 'hide', 'show', 'link', 'enlarge', 'shrink', 'revert' ].forEach(function(imgname) {\n            var img = new Image();\n            img.src = _renkan.options.static_url + 'img/' + imgname + '.png';\n            _this.icon_cache[imgname] = img;\n        });\n\n        var throttledMouseMove = _.throttle(function(_event, _isTouch) {\n            _this.onMouseMove(_event, _isTouch);\n        }, Utils._MOUSEMOVE_RATE);\n\n        this.canvas_$.on({\n            mousedown: function(_event) {\n                _event.preventDefault();\n                _this.onMouseDown(_event, false);\n            },\n            mousemove: function(_event) {\n                _event.preventDefault();\n                throttledMouseMove(_event, false);\n            },\n            mouseup: function(_event) {\n                _event.preventDefault();\n                _this.onMouseUp(_event, false);\n            },\n            mousewheel: function(_event, _delta) {\n                if(_renkan.options.zoom_on_scroll) {\n                    _event.preventDefault();\n                    if (_allowScroll) {\n                        _this.onScroll(_event, _delta);\n                    }\n                }\n            },\n            touchstart: function(_event) {\n                _event.preventDefault();\n                var _touches = _event.originalEvent.touches[0];\n                if (\n                        _renkan.options.allow_double_click &&\n                        new Date() - _lastTap < Utils._DOUBLETAP_DELAY &&\n                        ( Math.pow(_lastTapX - _touches.pageX, 2) + Math.pow(_lastTapY - _touches.pageY, 2) < Utils._DOUBLETAP_DISTANCE )\n                ) {\n                    _lastTap = 0;\n                    _this.onDoubleClick(_touches);\n                } else {\n                    _lastTap = new Date();\n                    _lastTapX = _touches.pageX;\n                    _lastTapY = _touches.pageY;\n                    _originalScale = _this.scale;\n                    _zooming = false;\n                    _this.onMouseDown(_touches, true);\n                }\n            },\n            touchmove: function(_event) {\n                _event.preventDefault();\n                _lastTap = 0;\n                if (_event.originalEvent.touches.length === 1) {\n                    _this.onMouseMove(_event.originalEvent.touches[0], true);\n                } else {\n                    if (!_zooming) {\n                        _this.onMouseUp(_event.originalEvent.touches[0], true);\n                        _this.click_target = null;\n                        _this.is_dragging = false;\n                        _zooming = true;\n                    }\n                    if (_event.originalEvent.scale === \"undefined\") {\n                        return;\n                    }\n                    var _newScale = _event.originalEvent.scale * _originalScale,\n                    _scaleRatio = _newScale / _this.scale,\n                    _newOffset = new paper.Point([\n                                                  _this.canvas_$.width(),\n                                                  _this.canvas_$.height()\n                                                  ]).multiply( 0.5 * ( 1 - _scaleRatio ) ).add(_this.offset.multiply( _scaleRatio ));\n                    _this.setScale(_newScale, _newOffset);\n                }\n            },\n            touchend: function(_event) {\n                _event.preventDefault();\n                _this.onMouseUp(_event.originalEvent.changedTouches[0], true);\n            },\n            dblclick: function(_event) {\n                _event.preventDefault();\n                if (_renkan.options.allow_double_click) {\n                    _this.onDoubleClick(_event);\n                }\n            },\n            mouseleave: function(_event) {\n                _event.preventDefault();\n                _this.onMouseUp(_event, false);\n                _this.click_target = null;\n                _this.is_dragging = false;\n            },\n            dragover: function(_event) {\n                _event.preventDefault();\n            },\n            dragenter: function(_event) {\n                _event.preventDefault();\n                _allowScroll = false;\n            },\n            dragleave: function(_event) {\n                _event.preventDefault();\n                _allowScroll = true;\n            },\n            drop: function(_event) {\n                _event.preventDefault();\n                _allowScroll = true;\n                var res = {};\n                _.each(_event.originalEvent.dataTransfer.types, function(t) {\n                    try {\n                        res[t] = _event.originalEvent.dataTransfer.getData(t);\n                    } catch(e) {}\n                });\n                var text = _event.originalEvent.dataTransfer.getData(\"Text\");\n                if (typeof text === \"string\") {\n                    switch(text[0]) {\n                    case \"{\":\n                    case \"[\":\n                        try {\n                            var data = JSON.parse(text);\n                            _.extend(res,data);\n                        }\n                        catch(e) {\n                            if (!res[\"text/plain\"]) {\n                                res[\"text/plain\"] = text;\n                            }\n                        }\n                        break;\n                    case \"<\":\n                        if (!res[\"text/html\"]) {\n                            res[\"text/html\"] = text;\n                        }\n                        break;\n                    default:\n                        if (!res[\"text/plain\"]) {\n                            res[\"text/plain\"] = text;\n                        }\n                    }\n                }\n                var url = _event.originalEvent.dataTransfer.getData(\"URL\");\n                if (url && !res[\"text/uri-list\"]) {\n                    res[\"text/uri-list\"] = url;\n                }\n                _this.dropData(res, _event.originalEvent);\n            }\n        });\n\n        var bindClick = function(selector, fname) {\n            _this.$.find(selector).click(function(evt) {\n                _this[fname](evt);\n                return false;\n            });\n        };\n\n        bindClick(\".Rk-ZoomOut\", \"zoomOut\");\n        bindClick(\".Rk-ZoomIn\", \"zoomIn\");\n        bindClick(\".Rk-ZoomFit\", \"autoScale\");\n        this.$.find(\".Rk-ZoomSave\").click( function() {\n            // Save scale and offset point\n            _this.renkan.project.addView( { zoom_level:_this.scale, offset:_this.offset, hidden_nodes: _this.hiddenNodes } );\n        });\n        this.$.find(\".Rk-ZoomSetSaved\").click( function() {\n            var view = _this.renkan.project.get(\"views\").last();\n            if(view){\n                _this.setScale(view.get(\"zoom_level\"), new paper.Point(view.get(\"offset\")));\n                _this.hiddenNodes = view.get(\"hidden_nodes\") || [];\n                _this.hideNodes();\n            }\n        });\n        this.$.find(\".Rk-ShowHiddenNodes\").mouseenter( function() {\n            _this.showNodes(true);\n            _this.$.find(\".Rk-ShowHiddenNodes\").mouseleave( function() {\n                _this.hideNodes(false);\n            });\n        });\n        this.$.find(\".Rk-ShowHiddenNodes\").click( function() {\n            _this.showNodes(false);\n            _this.$.find(\".Rk-ShowHiddenNodes\").off( \"mouseleave\" ); \n        });\n        if(this.renkan.project.get(\"views\").length > 0 && this.renkan.options.save_view){\n            this.$.find(\".Rk-ZoomSetSaved\").show();\n        }\n        this.$.find(\".Rk-CurrentUser\").mouseenter(\n                function() { _this.$.find(\".Rk-UserList\").slideDown(); }\n        );\n        this.$.find(\".Rk-Users\").mouseleave(\n                function() { _this.$.find(\".Rk-UserList\").slideUp(); }\n        );\n        bindClick(\".Rk-FullScreen-Button\", \"fullScreen\");\n        bindClick(\".Rk-AddNode-Button\", \"addNodeBtn\");\n        bindClick(\".Rk-AddEdge-Button\", \"addEdgeBtn\");\n        bindClick(\".Rk-Save-Button\", \"save\");\n        bindClick(\".Rk-Open-Button\", \"open\");\n        bindClick(\".Rk-Export-Button\", \"exportProject\");\n        this.$.find(\".Rk-Bookmarklet-Button\")\n          /*jshint scripturl:true */\n          .attr(\"href\",\"javascript:\" + Utils._BOOKMARKLET_CODE(_renkan))\n          .click(function(){\n              _this.notif_$\n              .text(_renkan.translate(\"Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.\"))\n              .fadeIn()\n              .delay(5000)\n              .fadeOut();\n              return false;\n          });\n        this.$.find(\".Rk-TopBar-Button\").mouseover(function() {\n            $(this).find(\".Rk-TopBar-Tooltip\").show();\n        }).mouseout(function() {\n            $(this).find(\".Rk-TopBar-Tooltip\").hide();\n        });\n        bindClick(\".Rk-Fold-Bins\", \"foldBins\");\n\n        paper.view.onResize = function(_event) {\n            var _ratio,\n                newWidth = _event.width,\n                newHeight = _event.height;\n\n            if (_this.minimap) {\n                _this.minimap.topleft = paper.view.bounds.bottomRight.subtract(_this.minimap.size);\n                _this.minimap.rectangle.fitBounds(_this.minimap.topleft.subtract([2,2]), _this.minimap.size.add([4,4]));\n                _this.minimap.cliprectangle.fitBounds(_this.minimap.topleft, _this.minimap.size);\n            }\n\n            var ratioH = newHeight/(newHeight-_event.delta.height),\n                ratioW = newWidth/(newWidth-_event.delta.width);\n            if (newHeight < newWidth) {\n                    _ratio = ratioH;\n            } else {\n                _ratio = ratioW;\n            }\n\n            _this.resizeZoom(ratioW, ratioH, _ratio);\n\n            _this.redraw();\n\n        };\n\n        var _thRedraw = _.throttle(function() {\n            _this.redraw();\n        },50);\n\n        this.addRepresentations(\"Node\", this.renkan.project.get(\"nodes\"));\n        this.addRepresentations(\"Edge\", this.renkan.project.get(\"edges\"));\n        this.renkan.project.on(\"change:title\", function() {\n            _this.$.find(\".Rk-PadTitle\").val(_renkan.project.get(\"title\"));\n        });\n\n        this.$.find(\".Rk-PadTitle\").on(\"keyup input paste\", function() {\n            _renkan.project.set({\"title\": $(this).val()});\n        });\n\n        var _thRedrawUsers = _.throttle(function() {\n            _this.redrawUsers();\n        }, 100);\n\n        _thRedrawUsers();\n\n        // register model events\n        this.renkan.project.on(\"change:saveStatus\", function(){\n            switch (_this.renkan.project.get(\"saveStatus\")) {\n                case 0: //clean\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"to-save\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saving\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"saved\");\n                    break;\n                case 1: //dirty\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saved\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saving\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"to-save\");\n                    break;\n                case 2: //saving\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saved\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"to-save\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"saving\");\n                    break;\n            }\n        });\n\n        this.renkan.project.on(\"change:loadingStatus\", function(){\n            if (_this.renkan.project.get(\"loadingStatus\")){\n                var animate = _this.$.find(\".loader\").addClass(\"run\");\n                var timer = setTimeout(function(){\n                    _this.$.find(\".loader\").hide(250);\n                }, 3000);\n            }\n        });\n\n        this.renkan.project.on(\"add:users remove:users\", _thRedrawUsers);\n\n        this.renkan.project.on(\"add:views remove:views\", function(_node) {\n            if(_this.renkan.project.get('views').length > 0) {\n                _this.$.find(\".Rk-ZoomSetSaved\").show();\n            }\n            else {\n                _this.$.find(\".Rk-ZoomSetSaved\").hide();\n            }\n        });\n\n        this.renkan.project.on(\"add:nodes\", function(_node) {\n            _this.addRepresentation(\"Node\", _node);\n            if (!_this.renkan.project.get(\"loadingStatus\")){\n                _thRedraw();\n            }\n        });\n        this.renkan.project.on(\"add:edges\", function(_edge) {\n            _this.addRepresentation(\"Edge\", _edge);\n            if (!_this.renkan.project.get(\"loadingStatus\")){\n                _thRedraw();\n            }\n        });\n        this.renkan.project.on(\"change:title\", function(_model, _title) {\n            var el = _this.$.find(\".Rk-PadTitle\");\n            if (el.is(\"input\")) {\n                if (el.val() !== _title) {\n                    el.val(_title);\n                }\n            } else {\n                el.text(_title);\n            }\n        });\n\n        if (_renkan.options.size_bug_fix) {\n            var _delay = (\n                    typeof _renkan.options.size_bug_fix === \"number\" ?\n                        _renkan.options.size_bug_fix\n                                : 500\n            );\n            window.setTimeout(\n                    function() {\n                        _this.fixSize();\n                    },\n                    _delay\n            );\n        }\n\n        if (_renkan.options.force_resize) {\n            $(window).resize(function() {\n                _this.autoScale();\n            });\n        }\n\n        if (_renkan.options.show_user_list && _renkan.options.user_color_editable) {\n            var $cpwrapper = this.$.find(\".Rk-Users .Rk-Edit-ColorPicker-Wrapper\"),\n            $cplist = this.$.find(\".Rk-Users .Rk-Edit-ColorPicker\");\n\n            $cpwrapper.hover(\n                    function(_e) {\n                        if (_this.isEditable()) {\n                            _e.preventDefault();\n                            $cplist.show();\n                        }\n                    },\n                    function(_e) {\n                        _e.preventDefault();\n                        $cplist.hide();\n                    }\n            );\n\n            $cplist.find(\"li\").mouseenter(\n                    function(_e) {\n                        if (_this.isEditable()) {\n                            _e.preventDefault();\n                            _this.$.find(\".Rk-CurrentUser-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        }\n                    }\n            );\n        }\n\n        if (_renkan.options.show_search_field) {\n\n            var lastval = '';\n\n            this.$.find(\".Rk-GraphSearch-Field\").on(\"keyup change paste input\", function() {\n                var $this = $(this),\n                val = $this.val();\n                if (val === lastval) {\n                    return;\n                }\n                lastval = val;\n                if (val.length < 2) {\n                    _renkan.project.get(\"nodes\").each(function(n) {\n                        _this.getRepresentationByModel(n).unhighlight();\n                    });\n                } else {\n                    var rxs = Utils.regexpFromTextOrArray(val);\n                    _renkan.project.get(\"nodes\").each(function(n) {\n                        if (rxs.test(n.get(\"title\")) || rxs.test(n.get(\"description\"))) {\n                            _this.getRepresentationByModel(n).highlight(rxs);\n                        } else {\n                            _this.getRepresentationByModel(n).unhighlight();\n                        }\n                    });\n                }\n            });\n        }\n\n        this.redraw();\n\n        window.setInterval(function() {\n            var _now = new Date().valueOf();\n            _this.delete_list.forEach(function(d) {\n                if (_now >= d.time) {\n                    var el = _renkan.project.get(\"nodes\").findWhere({\"delete_scheduled\":d.id});\n                    if (el) {\n                        project.removeNode(el);\n                    }\n                    el = _renkan.project.get(\"edges\").findWhere({\"delete_scheduled\":d.id});\n                    if (el) {\n                        project.removeEdge(el);\n                    }\n                }\n            });\n            _this.delete_list = _this.delete_list.filter(function(d) {\n                return _renkan.project.get(\"nodes\").findWhere({\"delete_scheduled\":d.id}) || _renkan.project.get(\"edges\").findWhere({\"delete_scheduled\":d.id});\n            });\n        }, 500);\n\n        if (this.minimap) {\n            window.setInterval(function() {\n                _this.rescaleMinimap();\n            }, 2000);\n        }\n\n    };\n\n    _(Scene.prototype).extend({\n        fixSize: function() {\n            if( this.renkan.options.default_view && this.renkan.project.get(\"views\").length > 0) {\n                var view = this.renkan.project.get(\"views\").last();\n                this.setScale(view.get(\"zoom_level\"), new paper.Point(view.get(\"offset\")));\n            }\n            else{\n                this.autoScale();\n            }\n        },\n        drawSector: function(_repr, _inR, _outR, _startAngle, _endAngle, _padding, _imgname, _caption) {\n            var _options = this.renkan.options,\n                _startRads = _startAngle * Math.PI / 180,\n                _endRads = _endAngle * Math.PI / 180,\n                _img = this.icon_cache[_imgname],\n                _startdx = - Math.sin(_startRads),\n                _startdy = Math.cos(_startRads),\n                _startXIn = Math.cos(_startRads) * _inR + _padding * _startdx,\n                _startYIn = Math.sin(_startRads) * _inR + _padding * _startdy,\n                _startXOut = Math.cos(_startRads) * _outR + _padding * _startdx,\n                _startYOut = Math.sin(_startRads) * _outR + _padding * _startdy,\n                _enddx = - Math.sin(_endRads),\n                _enddy = Math.cos(_endRads),\n                _endXIn = Math.cos(_endRads) * _inR - _padding * _enddx,\n                _endYIn = Math.sin(_endRads) * _inR - _padding * _enddy,\n                _endXOut = Math.cos(_endRads) * _outR - _padding * _enddx,\n                _endYOut = Math.sin(_endRads) * _outR - _padding * _enddy,\n                _centerR = (_inR + _outR) / 2,\n                _centerRads = (_startRads + _endRads) / 2,\n                _centerX = Math.cos(_centerRads) * _centerR,\n                _centerY = Math.sin(_centerRads) * _centerR,\n                _centerXIn = Math.cos(_centerRads) * _inR,\n                _centerXOut = Math.cos(_centerRads) * _outR,\n                _centerYIn = Math.sin(_centerRads) * _inR,\n                _centerYOut = Math.sin(_centerRads) * _outR,\n                _textX = Math.cos(_centerRads) * (_outR + 3),\n                _textY = Math.sin(_centerRads) * (_outR + _options.buttons_label_font_size) + _options.buttons_label_font_size / 2;\n            this.buttons_layer.activate();\n            var _path = new paper.Path();\n            _path.add([_startXIn, _startYIn]);\n            _path.arcTo([_centerXIn, _centerYIn], [_endXIn, _endYIn]);\n            _path.lineTo([_endXOut,  _endYOut]);\n            _path.arcTo([_centerXOut, _centerYOut], [_startXOut, _startYOut]);\n            _path.fillColor = _options.buttons_background;\n            _path.opacity = 0.5;\n            _path.closed = true;\n            _path.__representation = _repr;\n            var _text = new paper.PointText(_textX,_textY);\n            _text.characterStyle = {\n                    fontSize: _options.buttons_label_font_size,\n                    fillColor: _options.buttons_label_color\n            };\n            if (_textX > 2) {\n                _text.paragraphStyle.justification = 'left';\n            } else if (_textX < -2) {\n                _text.paragraphStyle.justification = 'right';\n            } else {\n                _text.paragraphStyle.justification = 'center';\n            }\n            _text.visible = false;\n            var _visible = false,\n                _restPos = new paper.Point(-200, -200),\n                _grp = new paper.Group([_path, _text]),\n                //_grp = new paper.Group([_path]),\n                _delta = _grp.position,\n                _imgdelta = new paper.Point([_centerX, _centerY]),\n                _currentPos = new paper.Point(0,0);\n            _text.content = _caption;\n            // set group pivot to not depend on text visibility that changes the group bounding box.\n            _grp.pivot = _grp.bounds.center;\n            _grp.visible = false;\n            _grp.position = _restPos;\n            var _res = {\n                    show: function() {\n                        _visible = true;\n                        _grp.position = _currentPos.add(_delta);\n                        _grp.visible = true;\n                    },\n                    moveTo: function(_point) {\n                        _currentPos = _point;\n                        if (_visible) {\n                            _grp.position = _point.add(_delta);\n                        }\n                    },\n                    hide: function() {\n                        _visible = false;\n                        _grp.visible = false;\n                        _grp.position = _restPos;\n                    },\n                    select: function() {\n                        _path.opacity = 0.8;\n                        _text.visible = true;\n                    },\n                    unselect: function() {\n                        _path.opacity = 0.5;\n                        _text.visible = false;\n                    },\n                    destroy: function() {\n                        _grp.remove();\n                    }\n            };\n            var showImage = function() {\n                var _raster = new paper.Raster(_img);\n                _raster.position = _imgdelta.add(_grp.position).subtract(_delta);\n                _raster.locked = true; // Disable mouse events on icon\n                _grp.addChild(_raster);\n            };\n            if (_img.width) {\n                showImage();\n            } else {\n                $(_img).on(\"load\",showImage);\n            }\n\n            return _res;\n        },\n        addToBundles: function(_edgeRepr) {\n            var _bundle = _(this.bundles).find(function(_bundle) {\n                return (\n                        ( _bundle.from === _edgeRepr.from_representation && _bundle.to === _edgeRepr.to_representation ) ||\n                        ( _bundle.from === _edgeRepr.to_representation && _bundle.to === _edgeRepr.from_representation )\n                );\n            });\n            if (typeof _bundle !== \"undefined\") {\n                _bundle.edges.push(_edgeRepr);\n            } else {\n                _bundle = {\n                        from: _edgeRepr.from_representation,\n                        to: _edgeRepr.to_representation,\n                        edges: [ _edgeRepr ],\n                        getPosition: function(_er) {\n                            var _dir = (_er.from_representation === this.from) ? 1 : -1;\n                            return _dir * ( _(this.edges).indexOf(_er) - (this.edges.length - 1) / 2 );\n                        }\n                };\n                this.bundles.push(_bundle);\n            }\n            return _bundle;\n        },\n        isEditable: function() {\n            return (this.renkan.options.editor_mode && !this.renkan.read_only);\n        },\n        onStatusChange: function() {\n            var savebtn = this.$.find(\".Rk-Save-Button\"),\n            tip = savebtn.find(\".Rk-TopBar-Tooltip-Contents\");\n            if (this.renkan.read_only) {\n                savebtn.removeClass(\"disabled Rk-Save-Online\").addClass(\"Rk-Save-ReadOnly\");\n                tip.text(this.renkan.translate(\"Connection lost\"));\n            } else {\n                if (this.renkan.options.manual_save) {\n                    savebtn.removeClass(\"Rk-Save-ReadOnly Rk-Save-Online\");\n                    tip.text(this.renkan.translate(\"Save Project\"));\n                } else {\n                    savebtn.removeClass(\"disabled Rk-Save-ReadOnly\").addClass(\"Rk-Save-Online\");\n                    tip.text(this.renkan.translate(\"Auto-save enabled\"));\n                }\n            }\n            this.redrawUsers();\n        },\n        setScale: function(_newScale, _offset) {\n            if ((_newScale/this.initialScale) > Utils._MIN_SCALE && (_newScale/this.initialScale) < Utils._MAX_SCALE) {\n                this.scale = _newScale;\n                if (_offset) {\n                    this.offset = _offset;\n                }\n                this.redraw();\n            }\n        },\n        autoScale: function(force_view) {\n            var nodes = this.renkan.project.get(\"nodes\");\n            if (nodes.length > 1) {\n                var _xx = nodes.map(function(_node) { return _node.get(\"position\").x; }),\n                _yy = nodes.map(function(_node) { return _node.get(\"position\").y; }),\n                _minx = Math.min.apply(Math, _xx),\n                _miny = Math.min.apply(Math, _yy),\n                _maxx = Math.max.apply(Math, _xx),\n                _maxy = Math.max.apply(Math, _yy);\n                var _scale = Math.min( (paper.view.size.width - 2 * this.renkan.options.autoscale_padding) / (_maxx - _minx), (paper.view.size.height - 2 * this.renkan.options.autoscale_padding) / (_maxy - _miny));\n                this.initialScale = _scale;\n                // Override calculated scale if asked\n                if((typeof force_view !== \"undefined\") && parseFloat(force_view.zoom_level)>0 && parseFloat(force_view.offset.x)>0 && parseFloat(force_view.offset.y)>0){\n                    this.setScale(parseFloat(force_view.zoom_level), new paper.Point(parseFloat(force_view.offset.x), parseFloat(force_view.offset.y)));\n                }\n                else{\n                    this.setScale(_scale, paper.view.center.subtract(new paper.Point([(_maxx + _minx) / 2, (_maxy + _miny) / 2]).multiply(_scale)));\n                }\n            }\n            if (nodes.length === 1) {\n                this.setScale(1, paper.view.center.subtract(new paper.Point([nodes.at(0).get(\"position\").x, nodes.at(0).get(\"position\").y])));\n            }\n        },\n        redrawMiniframe: function() {\n            var topleft = this.toMinimapCoords(this.toModelCoords(new paper.Point([0,0]))),\n                bottomright = this.toMinimapCoords(this.toModelCoords(paper.view.bounds.bottomRight));\n            this.minimap.miniframe.fitBounds(topleft, bottomright);\n        },\n        rescaleMinimap: function() {\n            var nodes = this.renkan.project.get(\"nodes\");\n            if (nodes.length > 1) {\n                var _xx = nodes.map(function(_node) { return _node.get(\"position\").x; }),\n                    _yy = nodes.map(function(_node) { return _node.get(\"position\").y; }),\n                    _minx = Math.min.apply(Math, _xx),\n                    _miny = Math.min.apply(Math, _yy),\n                    _maxx = Math.max.apply(Math, _xx),\n                    _maxy = Math.max.apply(Math, _yy);\n                var _scale = Math.min(\n                        this.scale * 0.8 * this.renkan.options.minimap_width / paper.view.bounds.width,\n                        this.scale * 0.8 * this.renkan.options.minimap_height / paper.view.bounds.height,\n                        ( this.renkan.options.minimap_width - 2 * this.renkan.options.minimap_padding ) / (_maxx - _minx),\n                        ( this.renkan.options.minimap_height - 2 * this.renkan.options.minimap_padding ) / (_maxy - _miny)\n                );\n                this.minimap.offset = this.minimap.size.divide(2).subtract(new paper.Point([(_maxx + _minx) / 2, (_maxy + _miny) / 2]).multiply(_scale));\n                this.minimap.scale = _scale;\n            }\n            if (nodes.length === 1) {\n                this.minimap.scale = 0.1;\n                this.minimap.offset = this.minimap.size.divide(2).subtract(new paper.Point([nodes.at(0).get(\"position\").x, nodes.at(0).get(\"position\").y]).multiply(this.minimap.scale));\n            }\n            this.redraw();\n        },\n        toPaperCoords: function(_point) {\n            return _point.multiply(this.scale).add(this.offset);\n        },\n        toMinimapCoords: function(_point) {\n            return _point.multiply(this.minimap.scale).add(this.minimap.offset).add(this.minimap.topleft);\n        },\n        toModelCoords: function(_point) {\n            return _point.subtract(this.offset).divide(this.scale);\n        },\n        addRepresentation: function(_type, _model) {\n            var RendererType = requtils.getRenderer()[_type];\n            var _repr = new RendererType(this, _model);\n            this.representations.push(_repr);\n            return _repr;\n        },\n        addRepresentations: function(_type, _collection) {\n            var _this = this;\n            _collection.forEach(function(_model) {\n                _this.addRepresentation(_type, _model);\n            });\n        },\n        userTemplate: _.template(\n                '<li class=\"Rk-User\"><span class=\"Rk-UserColor\" style=\"background:<%=background%>;\"></span><%=name%></li>'\n        ),\n        redrawUsers: function() {\n            if (!this.renkan.options.show_user_list) {\n                return;\n            }\n            var allUsers = [].concat((this.renkan.project.current_user_list || {}).models || [], (this.renkan.project.get(\"users\") || {}).models || []),\n            ulistHtml = '',\n            $userpanel = this.$.find(\".Rk-Users\"),\n            $name = $userpanel.find(\".Rk-CurrentUser-Name\"),\n            $cpitems = $userpanel.find(\".Rk-Edit-ColorPicker li\"),\n            $colorsquare = $userpanel.find(\".Rk-CurrentUser-Color\"),\n            _this = this;\n            $name.off(\"click\").text(this.renkan.translate(\"<unknown user>\"));\n            $cpitems.off(\"mouseleave click\");\n            allUsers.forEach(function(_user) {\n                if (_user.get(\"_id\") === _this.renkan.current_user) {\n                    $name.text(_user.get(\"title\"));\n                    $colorsquare.css(\"background\", _user.get(\"color\"));\n                    if (_this.isEditable()) {\n\n                        if (_this.renkan.options.user_name_editable) {\n                            $name.click(function() {\n                                var $this = $(this),\n                                $input = $('<input>').val(_user.get(\"title\")).blur(function() {\n                                    _user.set(\"title\", $(this).val());\n                                    _this.redrawUsers();\n                                    _this.redraw();\n                                });\n                                $this.empty().html($input);\n                                $input.select();\n                            });\n                        }\n\n                        if (_this.renkan.options.user_color_editable) {\n                            $cpitems.click(\n                                    function(_e) {\n                                        _e.preventDefault();\n                                        if (_this.isEditable()) {\n                                            _user.set(\"color\", $(this).attr(\"data-color\"));\n                                        }\n                                        $(this).parent().hide();\n                                    }\n                            ).mouseleave(function() {\n                                $colorsquare.css(\"background\", _user.get(\"color\"));\n                            });\n                        }\n                    }\n\n                } else {\n                    ulistHtml += _this.userTemplate({\n                        name: _user.get(\"title\"),\n                        background: _user.get(\"color\")\n                    });\n                }\n            });\n            $userpanel.find(\".Rk-UserList\").html(ulistHtml);\n        },\n        removeRepresentation: function(_representation) {\n            _representation.destroy();\n            this.representations = _.reject(this.representations,\n                function(_repr) {\n                    return _repr === _representation;\n                }\n            );\n        },\n        getRepresentationByModel: function(_model) {\n            if (!_model) {\n                return undefined;\n            }\n            return _.find(this.representations, function(_repr) {\n                return _repr.model === _model;\n            });\n        },\n        removeRepresentationsOfType: function(_type) {\n            var _representations = _.filter(this.representations,function(_repr) {\n                return _repr.type === _type;\n                }),\n                _this = this;\n            _.each(_representations, function(_repr) {\n                _this.removeRepresentation(_repr);\n            });\n        },\n        highlightModel: function(_model) {\n            var _repr = this.getRepresentationByModel(_model);\n            if (_repr) {\n                _repr.highlight();\n            }\n        },\n        unhighlightAll: function(_model) {\n            _.each(this.representations, function(_repr) {\n                _repr.unhighlight();\n            });\n        },\n        unselectAll: function(_model) {\n            _.each(this.representations, function(_repr) {\n                _repr.unselect();\n            });\n        },\n        redraw: function() {\n            var _this = this;\n            if(! this.redrawActive ) {\n                return;\n            }\n            _.each(this.representations, function(_representation) {\n                _representation.redraw({ dontRedrawEdges:true });\n            });\n            if (this.minimap) {\n                this.redrawMiniframe();\n            }\n            paper.view.draw();\n        },\n        addTempEdge: function(_from, _point) {\n            var _tmpEdge = this.addRepresentation(\"TempEdge\",null);\n            _tmpEdge.end_pos = _point;\n            _tmpEdge.from_representation = _from;\n            _tmpEdge.redraw();\n            this.click_target = _tmpEdge;\n        },\n        addHiddenNode: function(_model){\n            this.hideNode(_model);\n            this.hiddenNodes.push(_model.id);\n        },\n        hideNode: function(_model){\n            var _this = this;\n            if (typeof _this.getRepresentationByModel(_model) !== 'undefined'){\n                _this.getRepresentationByModel(_model).hide();\n            }\n        },\n        hideNodes: function(){\n            var _this = this;\n            this.hiddenNodes.forEach(function(_id, index){\n                var node = _this.renkan.project.get(\"nodes\").get(_id);\n                if (typeof node !== 'undefined'){\n                    return _this.hideNode(_this.renkan.project.get(\"nodes\").get(_id));\n                }else{\n                    _this.hiddenNodes.splice(index, 1);\n                }\n            });\n            paper.view.draw();\n        },\n        showNodes: function(ghost){\n            var _this = this;\n            this.hiddenNodes.forEach(function(_id){\n                _this.getRepresentationByModel(_this.renkan.project.get(\"nodes\").get(_id)).show(ghost);\n            });\n            if (!ghost){\n                this.hiddenNodes = [];\n            }\n            paper.view.draw();\n        },\n        findTarget: function(_hitResult) {\n            if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                var _newTarget = _hitResult.item.__representation;\n                if (this.selected_target !== _hitResult.item.__representation) {\n                    if (this.selected_target) {\n                        this.selected_target.unselect(_newTarget);\n                    }\n                    _newTarget.select(this.selected_target);\n                    this.selected_target = _newTarget;\n                }\n            } else {\n                if (this.selected_target) {\n                    this.selected_target.unselect();\n                }\n                this.selected_target = null;\n            }\n        },\n        paperShift: function(_delta) {\n            this.offset = this.offset.add(_delta);\n            this.redraw();\n        },\n        onMouseMove: function(_event) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]),\n                                      _delta = _point.subtract(this.last_point);\n            this.last_point = _point;\n            if (!this.is_dragging && this.mouse_down && _delta.length > Utils._MIN_DRAG_DISTANCE) {\n                this.is_dragging = true;\n            }\n            var _hitResult = paper.project.hitTest(_point);\n            if (this.is_dragging) {\n                if (this.click_target && typeof this.click_target.paperShift === \"function\") {\n                    this.click_target.paperShift(_delta);\n                } else {\n                    this.paperShift(_delta);\n                }\n            } else {\n                this.findTarget(_hitResult);\n            }\n            paper.view.draw();\n        },\n        onMouseDown: function(_event, _isTouch) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]);\n            this.last_point = _point;\n            this.mouse_down = true;\n            if (!this.click_target || this.click_target.type !== \"Temp-edge\") {\n                this.removeRepresentationsOfType(\"editor\");\n                this.is_dragging = false;\n                var _hitResult = paper.project.hitTest(_point);\n                if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                    this.click_target = _hitResult.item.__representation;\n                    this.click_target.mousedown(_event, _isTouch);\n                } else {\n                    this.click_target = null;\n                    if (this.isEditable() && this.click_mode === Utils._CLICKMODE_ADDNODE) {\n                        var _coords = this.toModelCoords(_point),\n                        _data = {\n                            id: Utils.getUID('node'),\n                            created_by: this.renkan.current_user,\n                            position: {\n                                x: _coords.x,\n                                y: _coords.y\n                            }\n                        };\n                        _node = this.renkan.project.addNode(_data);\n                        this.getRepresentationByModel(_node).openEditor();\n                    }\n                }\n            }\n            if (this.click_mode) {\n                if (this.isEditable() && this.click_mode === Utils._CLICKMODE_STARTEDGE && this.click_target && this.click_target.type === \"Node\") {\n                    this.removeRepresentationsOfType(\"editor\");\n                    this.addTempEdge(this.click_target, _point);\n                    this.click_mode = Utils._CLICKMODE_ENDEDGE;\n                    this.notif_$.fadeOut(function() {\n                        $(this).html(this.renkan.translate(\"Click on a second node to complete the edge\")).fadeIn();\n                    });\n                } else {\n                    this.notif_$.hide();\n                    this.click_mode = false;\n                }\n            }\n            paper.view.draw();\n        },\n        onMouseUp: function(_event, _isTouch) {\n            this.mouse_down = false;\n            if (this.click_target) {\n                var _off = this.canvas_$.offset();\n                this.click_target.mouseup(\n                        {\n                            point: new paper.Point([\n                                                    _event.pageX - _off.left,\n                                                    _event.pageY - _off.top\n                                                    ])\n                        },\n                        _isTouch\n                );\n            } else {\n                this.click_target = null;\n                this.is_dragging = false;\n                if (_isTouch) {\n                    this.unselectAll();\n                }\n            }\n            paper.view.draw();\n        },\n        onScroll: function(_event, _scrolldelta) {\n            this.totalScroll += _scrolldelta;\n            if (Math.abs(this.totalScroll) >= 1) {\n                var _off = this.canvas_$.offset(),\n                _delta = new paper.Point([\n                                          _event.pageX - _off.left,\n                                          _event.pageY - _off.top\n                                          ]).subtract(this.offset).multiply( Math.SQRT2 - 1 );\n                if (this.totalScroll > 0) {\n                    this.setScale( this.scale * Math.SQRT2, this.offset.subtract(_delta) );\n                } else {\n                    this.setScale( this.scale * Math.SQRT1_2, this.offset.add(_delta.divide(Math.SQRT2)));\n                }\n                this.totalScroll = 0;\n            }\n        },\n        onDoubleClick: function(_event) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]);\n            var _hitResult = paper.project.hitTest(_point);\n            \n            if (!this.isEditable()) {\n                if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                    if (_hitResult.item.__representation.model.get('uri')){\n                        window.open(_hitResult.item.__representation.model.get('uri'), '_blank');\n                    }\n                }\n                return;\n            }\n            if (this.isEditable() && (!_hitResult || typeof _hitResult.item.__representation === \"undefined\")) {\n                var _coords = this.toModelCoords(_point),\n                _data = {\n                    id: Utils.getUID('node'),\n                    created_by: this.renkan.current_user,\n                    position: {\n                        x: _coords.x,\n                        y: _coords.y\n                    }\n                },\n                _node = this.renkan.project.addNode(_data);\n                this.getRepresentationByModel(_node).openEditor();\n            }\n            paper.view.draw();\n        },\n        defaultDropHandler: function(_data) {\n            var newNode = {};\n            var snippet = \"\";\n            switch(_data[\"text/x-iri-specific-site\"]) {\n                case \"twitter\":\n                    snippet = $('<div>').html(_data[\"text/x-iri-selected-html\"]);\n                    var tweetdiv = snippet.find(\".tweet\");\n                    newNode.title = this.renkan.translate(\"Tweet by \") + tweetdiv.attr(\"data-name\");\n                    newNode.uri = \"http://twitter.com/\" + tweetdiv.attr(\"data-screen-name\") + \"/status/\" + tweetdiv.attr(\"data-tweet-id\");\n                    newNode.image = tweetdiv.find(\".avatar\").attr(\"src\");\n                    newNode.description = tweetdiv.find(\".js-tweet-text:first\").text();\n                    break;\n                case \"google\":\n                    snippet = $('<div>').html(_data[\"text/x-iri-selected-html\"]);\n                    newNode.title = snippet.find(\"h3:first\").text().trim();\n                    newNode.uri = snippet.find(\"h3 a\").attr(\"href\");\n                    newNode.description = snippet.find(\".st:first\").text().trim();\n                    break;\n                default:\n                    if (_data[\"text/x-iri-source-uri\"]) {\n                        newNode.uri = _data[\"text/x-iri-source-uri\"];\n                    }\n            }\n            if (_data[\"text/plain\"] || _data[\"text/x-iri-selected-text\"]) {\n                newNode.description = (_data[\"text/plain\"] || _data[\"text/x-iri-selected-text\"]).replace(/[\\s\\n]+/gm,' ').trim();\n            }\n            if (_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]) {\n                snippet = $('<div>').html(_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]);\n                var _svgimgs = snippet.find(\"image\");\n                if (_svgimgs.length) {\n                    newNode.image = _svgimgs.attr(\"xlink:href\");\n                }\n                var _svgpaths = snippet.find(\"path\");\n                if (_svgpaths.length) {\n                    newNode.clipPath = _svgpaths.attr(\"d\");\n                }\n                var _imgs = snippet.find(\"img\");\n                if (_imgs.length) {\n                    newNode.image = _imgs[0].src;\n                }\n                var _as = snippet.find(\"a\");\n                if (_as.length) {\n                    newNode.uri = _as[0].href;\n                }\n                newNode.title = snippet.find(\"[title]\").attr(\"title\") || newNode.title;\n                newNode.description = snippet.text().replace(/[\\s\\n]+/gm,' ').trim();\n            }\n            if (_data[\"text/uri-list\"]) {\n                newNode.uri = _data[\"text/uri-list\"];\n            }\n            if (_data[\"text/x-moz-url\"] && !newNode.title) {\n                newNode.title = (_data[\"text/x-moz-url\"].split(\"\\n\")[1] || \"\").trim();\n                if (newNode.title === newNode.uri) {\n                    newNode.title = false;\n                }\n            }\n            if (_data[\"text/x-iri-source-title\"] && !newNode.title) {\n                newNode.title = _data[\"text/x-iri-source-title\"];\n            }\n            if (_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]) {\n                snippet = $('<div>').html(_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]);\n                newNode.image = snippet.find(\"[data-image]\").attr(\"data-image\") || newNode.image;\n                newNode.uri = snippet.find(\"[data-uri]\").attr(\"data-uri\") || newNode.uri;\n                newNode.title = snippet.find(\"[data-title]\").attr(\"data-title\") || newNode.title;\n                newNode.description = snippet.find(\"[data-description]\").attr(\"data-description\") || newNode.description;\n                newNode.clipPath = snippet.find(\"[data-clip-path]\").attr(\"data-clip-path\") || newNode.clipPath;\n            }\n\n            if (!newNode.title) {\n                newNode.title = this.renkan.translate(\"Dragged resource\");\n            }\n            var fields = [\"title\", \"description\", \"uri\", \"image\"];\n            for (var i = 0; i < fields.length; i++) {\n                var f = fields[i];\n                if (_data[\"text/x-iri-\" + f] || _data[f]) {\n                    newNode[f] = _data[\"text/x-iri-\" + f] || _data[f];\n                }\n                if (newNode[f] === \"none\" || newNode[f] === \"null\") {\n                    newNode[f] = undefined;\n                }\n            }\n\n            if(typeof this.renkan.options.drop_enhancer === \"function\"){\n                newNode = this.renkan.options.drop_enhancer(newNode, _data);\n            }\n\n            return newNode;\n\n        },\n        dropData: function(_data, _event) {\n            if (!this.isEditable()) {\n                return;\n            }\n            if (_data[\"text/json\"] || _data[\"application/json\"]) {\n                try {\n                    var jsondata = JSON.parse(_data[\"text/json\"] || _data[\"application/json\"]);\n                    _.extend(_data,jsondata);\n                }\n                catch(e) {}\n            }\n\n            var newNode = (typeof this.renkan.options.drop_handler === \"undefined\")?this.defaultDropHandler(_data):this.renkan.options.drop_handler(_data);\n\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]),\n                                      _coords = this.toModelCoords(_point),\n                                      _nodedata = {\n                id: Utils.getUID('node'),\n                created_by: this.renkan.current_user,\n                uri: newNode.uri || \"\",\n                title: newNode.title || \"\",\n                description: newNode.description || \"\",\n                image: newNode.image || \"\",\n                color: newNode.color || undefined,\n                clip_path: newNode.clipPath || undefined,\n                position: {\n                    x: _coords.x,\n                    y: _coords.y\n                }\n            };\n            var _node = this.renkan.project.addNode(_nodedata),\n            _repr = this.getRepresentationByModel(_node);\n            if (_event.type === \"drop\") {\n                _repr.openEditor();\n            }\n        },\n        fullScreen: function() {\n            var _isFull = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen,\n                _el = this.renkan.$[0],\n                _requestMethods = [\"requestFullScreen\",\"mozRequestFullScreen\",\"webkitRequestFullScreen\"],\n                _cancelMethods = [\"cancelFullScreen\",\"mozCancelFullScreen\",\"webkitCancelFullScreen\"],\n                i;\n            if (_isFull) {\n                for (i = 0; i < _cancelMethods.length; i++) {\n                    if (typeof document[_cancelMethods[i]] === \"function\") {\n                        document[_cancelMethods[i]]();\n                        break;\n                    }\n                }\n                var widthAft = this.$.width();\n                var heightAft = this.$.height();\n\n                if (this.renkan.options.show_top_bar) {\n                    heightAft -= this.$.find(\".Rk-TopBar\").height();\n                }\n                if (this.renkan.options.show_bins && (this.renkan.$.find(\".Rk-Bins\").position().left > 0)) {\n                    widthAft -= this.renkan.$.find(\".Rk-Bins\").width();\n                }\n\n                paper.view.viewSize = new paper.Size([widthAft, heightAft]);\n\n            } else {\n                for (i = 0; i < _requestMethods.length; i++) {\n                    if (typeof _el[_requestMethods[i]] === \"function\") {\n                        _el[_requestMethods[i]]();\n                        break;\n                    }\n                }\n                this.redraw();\n            }\n        },\n        zoomOut: function() {\n            var _newScale = this.scale * Math.SQRT1_2,\n            _offset = new paper.Point([\n                                       this.canvas_$.width(),\n                                       this.canvas_$.height()\n                                       ]).multiply( 0.5 * ( 1 - Math.SQRT1_2 ) ).add(this.offset.multiply( Math.SQRT1_2 ));\n            this.setScale( _newScale, _offset );\n        },\n        zoomIn: function() {\n            var _newScale = this.scale * Math.SQRT2,\n            _offset = new paper.Point([\n                                       this.canvas_$.width(),\n                                       this.canvas_$.height()\n                                       ]).multiply( 0.5 * ( 1 - Math.SQRT2 ) ).add(this.offset.multiply( Math.SQRT2 ));\n            this.setScale( _newScale, _offset );\n        },\n        resizeZoom: function(_scaleWidth, _scaleHeight, _ratio) {\n            var _newScale = this.scale * _ratio,\n                _offset = new paper.Point([\n                                       (this.offset.x * _scaleWidth),\n                                       (this.offset.y * _scaleHeight)\n                                       ]);\n            this.setScale( _newScale, _offset );\n        },\n        addNodeBtn: function() {\n            if (this.click_mode === Utils._CLICKMODE_ADDNODE) {\n                this.click_mode = false;\n                this.notif_$.hide();\n            } else {\n                this.click_mode = Utils._CLICKMODE_ADDNODE;\n                this.notif_$.text(this.renkan.translate(\"Click on the background canvas to add a node\")).fadeIn();\n            }\n            return false;\n        },\n        addEdgeBtn: function() {\n            if (this.click_mode === Utils._CLICKMODE_STARTEDGE || this.click_mode === Utils._CLICKMODE_ENDEDGE) {\n                this.click_mode = false;\n                this.notif_$.hide();\n            } else {\n                this.click_mode = Utils._CLICKMODE_STARTEDGE;\n                this.notif_$.text(this.renkan.translate(\"Click on a first node to start the edge\")).fadeIn();\n            }\n            return false;\n        },\n        exportProject: function() {\n          var projectJSON = this.renkan.project.toJSON(),\n              downloadLink = document.createElement(\"a\"),\n              projectId = projectJSON.id,\n              fileNameToSaveAs = projectId + \".json\";\n\n          // clean ids\n          delete projectJSON.id;\n          delete projectJSON._id;\n          delete projectJSON.space_id;\n\n          var objId,\n              idsMap = {},\n              hiddenNodes;\n\n          _.each(projectJSON.nodes, function(e,i,l) {\n            objId = e.id || e._id;\n            delete e._id;\n            delete e.id;\n            idsMap[objId] = e['@id'] = Utils.getUUID4();\n          });\n          _.each(projectJSON.edges, function(e,i,l) {\n            delete e._id;\n            delete e.id;\n            e.to = idsMap[e.to];\n            e.from = idsMap[e.from];\n          });\n          _.each(projectJSON.views, function(e,i,l) {\n            delete e._id;\n            delete e.id;\n            \n            if(e.hidden_nodes) {\n                hiddenNodes = e.hidden_nodes;\n                e.hidden_nodes = [];\n                _.each(hiddenNodes, function(h,j) {\n                    e.hidden_nodes.push(idsMap[h]);\n                });\n            }\n          });\n          projectJSON.users = [];\n\n          var projectJSONStr = JSON.stringify(projectJSON, null, 2);\n          var blob = new Blob([projectJSONStr], {type: \"application/json;charset=utf-8\"});\n          filesaver(blob,fileNameToSaveAs);\n\n        },\n        foldBins: function() {\n            var foldBinsButton = this.$.find(\".Rk-Fold-Bins\"),\n                bins = this.renkan.$.find(\".Rk-Bins\");\n            var _this = this,\n                sizeBef = _this.canvas_$.width(),\n                sizeAft;\n            if (bins.position().left < 0) {\n                bins.animate({left: 0},250);\n                this.$.animate({left: 300},250,function() {\n                    var w = _this.$.width();\n                    paper.view.viewSize = new paper.Size([w, _this.canvas_$.height()]);\n                });\n                if ((sizeBef -  bins.width()) < bins.height()){\n                    sizeAft = sizeBef;\n                } else {\n                    sizeAft = sizeBef - bins.width();\n                }\n                foldBinsButton.html(\"&laquo;\");\n            } else {\n                bins.animate({left: -300},250);\n                this.$.animate({left: 0},250,function() {\n                    var w = _this.$.width();\n                    paper.view.viewSize = new paper.Size([w, _this.canvas_$.height()]);\n                });\n                sizeAft = sizeBef+300;\n                foldBinsButton.html(\"&raquo;\");\n            }\n            _this.resizeZoom(1, 1, (sizeAft/sizeBef));\n        },\n        save: function() { },\n        open: function() { }\n    }).value();\n\n    /* Scene End */\n\n    return Scene;\n\n});\n\n\n//Load modules and use them\nif( typeof require.config === \"function\" ) {\n    require.config({\n        paths: {\n            'jquery':'../lib/jquery/jquery',\n            'underscore':'../lib/lodash/lodash',\n            'filesaver' :'../lib/FileSaver/FileSaver',\n            'requtils':'require-utils'\n        }\n    });\n}\n\nrequire(['renderer/baserepresentation',\n         'renderer/basebutton',\n         'renderer/noderepr',\n         'renderer/edge',\n         'renderer/tempedge',\n         'renderer/baseeditor',\n         'renderer/nodeeditor',\n         'renderer/edgeeditor',\n         'renderer/nodebutton',\n         'renderer/nodeeditbutton',\n         'renderer/noderemovebutton',\n         'renderer/nodehidebutton',\n         'renderer/nodeshowbutton',\n         'renderer/noderevertbutton',\n         'renderer/nodelinkbutton',\n         'renderer/nodeenlargebutton',\n         'renderer/nodeshrinkbutton',\n         'renderer/edgeeditbutton',\n         'renderer/edgeremovebutton',\n         'renderer/edgerevertbutton',\n         'renderer/miniframe',\n         'renderer/scene'\n         ], function(BaseRepresentation, BaseButton, NodeRepr, Edge, TempEdge, BaseEditor, NodeEditor, EdgeEditor, NodeButton, NodeEditButton, NodeRemoveButton, NodeHideButton, NodeShowButton, NodeRevertButton, NodeLinkButton, NodeEnlargeButton, NodeShrinkButton, EdgeEditButton, EdgeRemoveButton, EdgeRevertButton, MiniFrame, Scene){\n\n    \n\n    var Rkns = window.Rkns;\n\n    if(typeof Rkns.Renderer === \"undefined\"){\n        Rkns.Renderer = {};\n    }\n    var Renderer = Rkns.Renderer;\n\n    Renderer._BaseRepresentation = BaseRepresentation;\n    Renderer._BaseButton = BaseButton;\n    Renderer.Node = NodeRepr;\n    Renderer.Edge = Edge;\n    Renderer.TempEdge = TempEdge;\n    Renderer._BaseEditor = BaseEditor;\n    Renderer.NodeEditor = NodeEditor;\n    Renderer.EdgeEditor = EdgeEditor;\n    Renderer._NodeButton = NodeButton;\n    Renderer.NodeEditButton = NodeEditButton;\n    Renderer.NodeRemoveButton = NodeRemoveButton;\n    Renderer.NodeHideButton = NodeHideButton;\n    Renderer.NodeShowButton = NodeShowButton;\n    Renderer.NodeRevertButton = NodeRevertButton;\n    Renderer.NodeLinkButton = NodeLinkButton;\n    Renderer.NodeEnlargeButton = NodeEnlargeButton;\n    Renderer.NodeShrinkButton = NodeShrinkButton;\n    Renderer.EdgeEditButton = EdgeEditButton;\n    Renderer.EdgeRemoveButton = EdgeRemoveButton;\n    Renderer.EdgeRevertButton = EdgeRevertButton;\n    Renderer.MiniFrame = MiniFrame;\n    Renderer.Scene = Scene;\n\n    startRenkan();\n});\n\ndefine(\"main-renderer\", function(){});\n\n"]}
\ No newline at end of file
+{"version":3,"file":"renkan.min.js","sources":["templates.js","../../js/main.js","../../js/router.js","../../js/dataloader.js","../../js/models.js","../../js/defaults.js","../../js/i18n.js","../../js/full-json.js","../../js/save-once.js","../../js/ldtjson-bin.js","../../js/list-bin.js","../../js/wikipedia-bin.js","paper-renderer.js"],"names":["this","obj","__t","__p","_","escape","__e","Array","prototype","join","renkan","translate","edge","title","options","show_edge_editor_uri","uri","properties","length","each","ontology","label","property","show_edge_editor_style","show_edge_editor_style_color","show_edge_editor_style_dash","dash","show_edge_editor_style_thickness","thickness","show_edge_editor_style_arrow","arrow","show_edge_editor_direction","show_edge_editor_nodes","from_color","shortenText","from_title","to_title","show_edge_editor_creator","has_creator","created_by_title","show_edge_tooltip_color","color","show_edge_tooltip_uri","short_uri","show_edge_tooltip_nodes","to_color","show_edge_tooltip_creator","created_by_color","Rkns","Utils","getFullURL","image","description","static_url","url","show_bins","show_editor","node","show_node_editor_uri","change_types","types","type","charAt","toUpperCase","substring","show_node_editor_description","show_node_editor_description_richtext","show_node_editor_size","size","show_node_editor_style","show_node_editor_style_color","show_node_editor_style_dash","show_node_editor_style_thickness","show_node_editor_image","image_placeholder","clip_path","allow_image_upload","show_node_editor_creator","change_shapes","shapes","shape","show_node_tooltip_color","show_node_tooltip_uri","show_node_tooltip_description","show_node_tooltip_image","show_node_tooltip_creator","_id","print","__j","call","arguments","show_top_bar","editor_mode","project","get","show_user_list","show_user_color","user_color_editable","colorPicker","home_button_url","home_button_title","show_fullscreen_button","show_addnode_button","show_addedge_button","show_export_button","show_save_button","show_open_button","show_bookmarklet","show_search_field","resize","show_zoom","save_view","hide_nodes","root","$","jQuery","pickerColors","__renkans","_BaseBin","_renkan","_opts","find","hide","addClass","appendTo","title_icon_$","_this","attr","href","html","click","destroy","slideDown","resizeBins","refresh","count_$","title_$","main_$","auto_refresh","window","setInterval","detach","Renkan","push","defaults","templates","renkanJST","node_editor_templates","template","types_templates","value","key","property_files","f","getJSON","data","concat","read_only","router","Router","Models","Project","dataloader","DataLoader","Loader","setCurrentUser","user_id","user_name","addUser","current_user","renderer","redrawUsers","container","tabs","search_engines","current_user_list","UsersList","on","_tmpl","map","c","Renderer","Scene","search","_select","_input","_form","_search","Search","_key","getSearchTitle","className","getBgClass","_el","setSearchEngine","submit","val","search_engine","mouseenter","mouseleave","bins","_bin","Bin","elementDropped","_mainDiv","siblings","is","slideUp","_t","_models","where","_model","highlightModel","mouseout","unhighlightAll","dragDrop","err","e","preventDefault","touch","originalEvent","changedTouches","off","canvas_$","offset","w","width","h","height","pageX","left","pageY","top","onMouseMove","div","document","createElement","appendChild","cloneNode","dropData","text/html","innerHTML","onMouseDown","onMouseUp","dataTransfer","setData","lastsearch","lastval","regexpFromTextOrArray","source","tab","render","_text","i18n","language","substr","onStatusChange","listClasses","split","classes","i","_d","outerHeight","css","getUUID4","replace","r","Math","random","v","toString","getUID","pad","n","Date","ID_AUTO_INCREMENT","ID_BASE","getUTCFullYear","getUTCMonth","getUTCDate","_base","_n","_uidbase","test","img","Image","src","res","inherit","_baseClass","_callbefore","_class","apply","slice","_init","_initialized","extend","replaceText","makeReplaceFunc","l","k","charsrx","txt","toLowerCase","remrx","j","remsrc","charsub","getSource","inp","removeChars","String","fromCharCode","RegExp","_textOrArray","testrx","replacerx","isempty","_replace","text","_MIN_DRAG_DISTANCE","_NODE_BUTTON_WIDTH","_EDGE_BUTTON_INNER","_EDGE_BUTTON_OUTER","_CLICKMODE_ADDNODE","_CLICKMODE_STARTEDGE","_CLICKMODE_ENDEDGE","_NODE_SIZE_STEP","LN2","_MIN_SCALE","_MAX_SCALE","_MOUSEMOVE_RATE","_DOUBLETAP_DELAY","_DOUBLETAP_DISTANCE","_USER_PLACEHOLDER","default_user_color","_BOOKMARKLET_CODE","_maxlength","drawEditBox","_options","_coords","_path","_xmargin","_selector","tooltip_width","tooltip_padding","_height","_isLeft","x","paper","view","center","_left","tooltip_arrow_length","_right","_top","y","tooltip_margin","max","tooltip_arrow_width","min","_bottom","segments","point","add","closed","fillColor","GradientColor","Gradient","tooltip_top_color","tooltip_bottom_color","increaseBrightness","hex","percent","parseInt","g","b","Backbone","routes","index","parameters","result","forEach","part","item","decodeURIComponent","trigger","converters","from1to2","len","nodes","style","edges","schema_version","dataConverters","convert","schemaVersionFrom","getSchemaVersion","schemaVersionTo","converterName","load","set","validate","guid","RenkanModel","RelationalModel","idAttribute","constructor","id","prepare","addReference","_propName","_list","_default","_element","User","toJSON","Node","relations","HasOne","relatedModel","created_by","position","Edge","from","to","View","isArray","zoom_level","hidden_nodes","RosterUser","blacklist","HasMany","reverseRelation","includeInJSON","_props","_user","findOrCreate","addNode","_node","addEdge","_edge","addView","_view","removeNode","remove","removeEdge","_project","users","views","_item","t","version","initialize","filter","json","clone","attributes","Model","Collection","omit","site_id","model","navigator","userLanguage","popup_editor","editor_panel","manual_save","size_bug_fix","force_resize","allow_double_click","zoom_on_scroll","element_delete_delay","autoscale_padding","default_view","user_name_editable","show_minimap","minimap_width","minimap_height","minimap_padding","minimap_background_color","minimap_border_color","minimap_highlight_color","minimap_highlight_weight","buttons_background","buttons_label_color","buttons_label_font_size","ghost_opacity","default_dash_array","show_node_circles","clip_node_images","node_images_fill_mode","node_size_base","node_stroke_width","node_stroke_max_width","selected_node_stroke_width","selected_node_stroke_max_width","node_stroke_witdh_scale","node_fill_color","highlighted_node_fill_color","node_label_distance","node_label_max_length","label_untitled_nodes","default","video","edge_stroke_width","edge_stroke_max_width","selected_edge_stroke_width","selected_edge_stroke_max_width","edge_stroke_witdh_scale","edge_label_distance","edge_label_max_length","edge_arrow_length","edge_arrow_width","edge_arrow_max_width","edge_gap_in_bundles","label_untitled_edges","tooltip_border_color","tooltip_border_width","richtext_editor_config","toolbarGroups","name","groups","removePlugins","uploaded_image_max_kb","fr","Edit Node","Edit Edge","Title:","URI:","Description:","From:","To:","Image URL:","Choose Image File:","Full Screen","Add Node","Add Edge","Save Project","Open Project","Auto-save enabled","Connection lost","Created by:","Zoom In","Zoom Out","Edit","Remove","Cancel deletion","Link to another node","Enlarge","Shrink","Click on the background canvas to add a node","Click on a first node to start the edge","Click on a second node to complete the edge","Wikipedia","Wikipedia in ","French","English","Japanese","Untitled project","Lignes de Temps","Loading, please wait","Edge color:","Dash:","Thickness:","Arrow:","Node color:","Choose color","Change edge direction","Do you really wish to remove node ","Do you really wish to remove edge ","This file is not an image","Image size must be under ","Size:","KB","Choose from vocabulary:","SKOS Documentation properties","has note","has example","has definition","SKOS Semantic relations","has broader","has narrower","has related","Dublin Core Metadata","has contributor","covers","created by","has date","published by","has source","has subject","Dragged resource","Search the Web","Search in Bins","Close bin","Refresh bin","(untitled)","Select contents:","Drag items from this website, drop them in Renkan","Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.","Shapes available","Circle","Square","Diamond","Hexagone","Ellipse","Star","Cloud","Triangle","Zoom Fit","Download Project","Save view","View saved view","Renkan 'Drag-to-Add' bookmarklet","(unknown user)","<unknown user>","Search in graph","Search in ","jsonIO","_proj","http_method","_load","redrawActive","loadingStatus","_data","saveStatus","fixSize","_save","ajax","contentType","JSON","stringify","success","_thrSave","throttle","setTimeout","changedAttributes","hasChanged","jsonIOSaveOnClick","_saveWarn","_onLeave","getdata","rx","matches","location","hash","match","beforeSend","autoScale","_checkLeave","removeClass","save","hasClass","Ldt","ProjectBin","ldt_type","Resclass","console","error","tagTemplate","annotationTemplate","proj_id","project_id","ldt_platform","searchbase","highlight","_e","convertTC","_ms","_res","_totalSeconds","abs","floor","_hours","_minutes","_seconds","_html","_projtitle","meta","count","tags","_tag","_title","htitle","encodedtitle","encodeURIComponent","annotations","_annotation","_description","content","_duration","end","begin","_img","hdescription","start","duration","mediaid","media","annotationid","show","dataType","lang","_q","ResultsBin","segmentTemplate","max_results","highlightrx","objects","_segment","_begin","start_ts","_end","iri_id","element_id","format","q","limit","ResourceList","resultTemplate","list","trim","_match","langs","en","ja","query","_result","encodeURI","snippet","define","_BaseRepresentation","_renderer","_changeBinding","redraw","change","_removeBinding","removeRepresentation","defer","_selectBinding","select","_unselectBinding","unselect","_super","_func","moveTo","unhighlight","mousedown","mouseup","getUtils","getRenderer","requtils","BaseRepresentation","_BaseButton","_pos","sector","_newTarget","source_representation","cloud_path","builders","circle","getShape","Path","getImageShape","radius","rectangle","Rectangle","ellipse","polygon","RegularPolygon","diamond","d","SQRT2","rotate","star","cloud","path","scale","triangle","svg","ShapeBuilder","NodeRepr","node_layer","activate","buildShape","hidden","ghost","strokeWidth","h_ratio","labels_$","normal_buttons","NodeEditButton","NodeRemoveButton","NodeLinkButton","NodeEnlargeButton","NodeShrinkButton","NodeHideButton","NodeShowButton","pending_delete_buttons","NodeRevertButton","all_buttons","active_buttons","last_circle_radius","minimap","minimap_circle","__representation","miniframe","node_group","addChild","_getStrokeWidth","has","_getSelectedStrokeWidth","changed","shapeBuilder","sendToBack","_model_coords","Point","_baseRadius","exp","is_dragging","paper_coords","toPaperCoords","circle_radius","setSectorSize","node_image","subtract","image_delta","multiply","old_act_btn","opacity","dashArray","selected","isEditable","highlighted","_strokeWidth","_color","_dash","strokeColor","_pc","lastImage","showImage","minipos","toMinimapCoords","miniradius","minisize","Size","fitBounds","dontRedrawEdges","ed","repr","getRepresentationByModel","from_representation","to_representation","_image","image_cache","clipPath","hasClipPath","_clip","baseRadius","centerPoint","instructions","lastCoords","minX","Infinity","minY","maxX","maxY","transformCoords","tabc","relative","newCoords","parseFloat","isY","instr","coords","lineTo","cubicCurveTo","quadraticCurveTo","_raster","Raster","locked","Group","clipped","_circleClip","divide","insertAbove","paperShift","_delta","openEditor","removeRepresentationsOfType","_editor","addRepresentation","draw","_uri","showNeighbors","hideButtons","buttons_timeout","undefined","hideNeighbors","indexNode","hiddenNodes","indexOf","splice","textToReplace","hlvalue","throttledPaperDraw","saveCoords","toModelCoords","_event","_isTouch","unselectAll","click_target","edge_layer","bundle","addToBundles","line","arrow_scale","pivot","arrow_angle","EdgeEditButton","EdgeRemoveButton","EdgeRevertButton","minimap_line","_getArrowScale","_opacity","_arrow_scale","_p0a","_p1a","_v","_r","_u","_ortho","_group_pos","getPosition","_p0b","_p1b","_a","angle","_textdelta","_handle","visible","handleIn","handleOut","bounds","_textpos","transform","-moz-transform","-webkit-transform","text_angle","reject","TempEdge","_p0","_p1","end_pos","_c","_hitResult","hitTest","findTarget","_endDrag","_target","_destmodel","_BaseEditor","buttons_layer","editor_block","_pts","range","editor_$","BaseEditor","NodeEditor","readOnlyTemplate","_created_by","_template","_image_placeholder","_size","keys","editorInstance","ckeditor","closeEditor","cleanEditor","editor","focusManager","blur","onFieldChange","checkDirty","getData","resetDirty","assign","keyCode","files","FileReader","alert","onload","target","readAsDataURL","focus","_picker","hover","shiftSize","_newsize","shiftThickness","_oldThickness","_newThickness","titlehtml","EdgeEditor","_from_model","_to_model","BaseButton","_NodeButton","sectorInner","lastSectorInner","drawSector","startAngle","endAngle","imageName","clearTimeout","NodeButton","delid","delete_list","time","valueOf","confirm","addHiddenNode","unset","_off","_point","addTempEdge","MiniFrame","filesaver","representations","notif_$","setup","initialScale","totalScroll","mouse_down","selected_target","Layer","background_layer","topleft","bottomRight","cliprectangle","bundles","click_mode","_allowScroll","_originalScale","_zooming","_lastTapX","_lastTapY","icon_cache","imgname","throttledMouseMove","mousemove","mousewheel","onScroll","touchstart","_touches","touches","_lastTap","pow","onDoubleClick","touchmove","_newScale","_scaleRatio","_newOffset","setScale","touchend","dblclick","dragover","dragenter","dragleave","drop","parse","bindClick","selector","fname","evt","last","showNodes","hideNodes","fadeIn","delay","fadeOut","mouseover","onResize","_ratio","newWidth","newHeight","ratioH","delta","ratioW","resizeZoom","_thRedraw","addRepresentations","_thRedrawUsers","history","el","_params","_delay","$cpwrapper","$cplist","$this","rxs","_now","findWhere","delete_scheduled","rescaleMinimap","_repr","_inR","_outR","_startAngle","_endAngle","_padding","_imgname","_caption","_startRads","PI","_endRads","_startdx","sin","_startdy","cos","_startXIn","_startYIn","_startXOut","_startYOut","_enddx","_enddy","_endXIn","_endYIn","_endXOut","_endYOut","_centerR","_centerRads","_centerX","_centerY","_centerXIn","_centerXOut","_centerYIn","_centerYOut","_textX","_textY","arcTo","PointText","characterStyle","fontSize","paragraphStyle","justification","_visible","_restPos","_grp","_imgdelta","_currentPos","_edgeRepr","_bundle","_er","_dir","savebtn","tip","_offset","force_view","_xx","_yy","_minx","_miny","_maxx","_maxy","_scale","at","redrawMiniframe","bottomright","_type","RendererType","_collection","userTemplate","allUsers","models","ulistHtml","$userpanel","$name","$cpitems","$colorsquare","$input","empty","parent","background","_representation","_representations","_from","_tmpEdge","hideNode","last_point","_scrolldelta","SQRT1_2","open","defaultDropHandler","newNode","tweetdiv","_svgimgs","_svgpaths","_imgs","_as","fields","drop_enhancer","jsondata","drop_handler","_nodedata","fullScreen","_isFull","mozFullScreen","webkitIsFullScreen","_requestMethods","_cancelMethods","widthAft","heightAft","viewSize","zoomOut","zoomIn","_scaleWidth","_scaleHeight","addNodeBtn","addEdgeBtn","exportProject","projectJSON","projectId","fileNameToSaveAs","space_id","objId","idsMap","projectJSONStr","blob","Blob","idnode","foldBins","sizeAft","foldBinsButton","sizeBef","animate","require","config","paths","jquery","underscore","ckeditor-core","ckeditor-jquery","shim","deps","startRenkan"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAAA,KAAgB,UAAIA,KAAgB,cAEpCA,KAAgB,UAAE,8BAAgC,SAASC,KAC3DA,MAAQA,OACR,EAAA,GAAIC,KAAKC,IAAM,EAAUC,GAAEC,OAC3B,KAAMJ,IACNE,KAAO,oBACS,OAAdD,IAAM,GAAe,GAAKA,KAC5B,yBACgB,OAAdA,IAAM,GAAe,GAAKA,KAC5B,SAGA,OAAOC,MAGPH,KAAgB,U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B,iBAAmBA,EAC5BpmB,EAASwmB,eAAiBA,EAC1BxmB,EAASymB,eAAiBA,EAC1BzmB,EAAS2mB,iBAAmBA,EAC5B3mB,EAASqmB,eAAiBA,EAC1BrmB,EAASsmB,kBAAoBA,EAC7BtmB,EAASumB,iBAAmBA,EAC5BvmB,EAASmuB,eAAiBA,EAC1BnuB,EAASouB,iBAAmBA,EAC5BpuB,EAASquB,iBAAmBA,EAC5BruB,EAAS80B,UAAYA,EACrB90B,EAASC,MAAQA,EAEjBwiC,gBAGJngB,OAAO,gBAAiB","sourcesContent":["this[\"renkanJST\"] = this[\"renkanJST\"] || {};\n\nthis[\"renkanJST\"][\"templates/colorpicker.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li data-color=\"' +\n((__t = (c)) == null ? '' : __t) +\n'\" style=\"background: ' +\n((__t = (c)) == null ? '' : __t) +\n'\"></li>';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/edgeeditor.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>' +\n__e(renkan.translate(\"Edit Edge\")) +\n'</span>\\n</h2>\\n<p>\\n    <label>' +\n__e(renkan.translate(\"Title:\")) +\n'</label>\\n    <input class=\"Rk-Edit-Title\" type=\"text\" value=\"' +\n__e(edge.title) +\n'\" />\\n</p>\\n';\n if (options.show_edge_editor_uri) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"URI:\")) +\n'</label>\\n        <input class=\"Rk-Edit-URI\" type=\"text\" value=\"' +\n__e(edge.uri) +\n'\" />\\n        <a class=\"Rk-Edit-Goto\" href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\"></a>\\n    </p>\\n    ';\n if (options.properties.length) { ;\n__p += '\\n        <p>\\n            <label>' +\n__e(renkan.translate(\"Choose from vocabulary:\")) +\n'</label>\\n            <select class=\"Rk-Edit-Vocabulary\">\\n                ';\n _.each(options.properties, function(ontology) { ;\n__p += '\\n                    <option class=\"Rk-Edit-Vocabulary-Class\" value=\"\">\\n                        ' +\n__e( renkan.translate(ontology.label) ) +\n'\\n                    </option>\\n                    ';\n _.each(ontology.properties, function(property) { var uri = ontology[\"base-uri\"] + property.uri; ;\n__p += '\\n                        <option class=\"Rk-Edit-Vocabulary-Property\" value=\"' +\n__e( uri ) +\n'\"\\n                            ';\n if (uri === edge.uri) { ;\n__p += ' selected';\n } ;\n__p += '>\\n                            ' +\n__e( renkan.translate(property.label) ) +\n'\\n                        </option>\\n                    ';\n }) ;\n__p += '\\n                ';\n }) ;\n__p += '\\n            </select>\\n        </p>\\n';\n } } ;\n__p += '\\n';\n if (options.show_edge_editor_style) { ;\n__p += '\\n    <div class=\"Rk-Editor-p\">\\n      ';\n if (options.show_edge_editor_style_color) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-color\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Edge color:\")) +\n'</span>\\n        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n            <span class=\"Rk-Edit-Color\" style=\"background: &lt;%-edge.color%>;\">\\n                <span class=\"Rk-Edit-ColorTip\"></span>\\n            </span>\\n            ' +\n((__t = ( renkan.colorPicker )) == null ? '' : __t) +\n'\\n            <span class=\"Rk-Edit-ColorPicker-Text\">' +\n__e( renkan.translate(\"Choose color\") ) +\n'</span>\\n        </div>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_dash) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-dash\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Dash:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Dash\" class=\"Rk-Edit-Dash\" ' +\n__e( edge.dash ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_thickness) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-thickness\">\\n          <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Thickness:\")) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Down\">-</a>\\n          <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Thickness-Value\">' +\n__e( edge.thickness ) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Up\">+</a>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_edge_editor_style_arrow) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-arrow\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Arrow:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Arrow\" class=\"Rk-Edit-Arrow\" ' +\n__e( edge.arrow ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_direction) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Edit-Direction\">' +\n__e( renkan.translate(\"Change edge direction\") ) +\n'</span>\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_nodes) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"From:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(edge.from_color) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.from_title, 25) ) +\n'\\n    </p>\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"To:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: >%-edge.to_color%>;\"></span>\\n        ' +\n__e( shortenText(edge.to_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_editor_creator && edge.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: &lt;%-edge.created_by_color%>;\"></span>\\n        ' +\n__e( shortenText(edge.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/edgeeditor_readonly.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>\\n    ';\n if (options.show_edge_tooltip_color) { ;\n__p += '\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.color ) +\n';\"></span>\\n    ';\n } ;\n__p += '\\n    <span class=\"Rk-Display-Title\">\\n        ';\n if (edge.uri) { ;\n__p += '\\n            <a href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\">\\n        ';\n } ;\n__p += '\\n        ' +\n__e(edge.title) +\n'\\n        ';\n if (edge.uri) { ;\n__p += ' </a> ';\n } ;\n__p += '\\n    </span>\\n</h2>\\n';\n if (options.show_edge_tooltip_uri && edge.uri) { ;\n__p += '\\n    <p class=\"Rk-Display-URI\">\\n        <a href=\"' +\n__e(edge.uri) +\n'\" target=\"_blank\">' +\n__e( edge.short_uri ) +\n'</a>\\n    </p>\\n';\n } ;\n__p += '\\n<p>' +\n((__t = (edge.description)) == null ? '' : __t) +\n'</p>\\n';\n if (options.show_edge_tooltip_nodes) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"From:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.from_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.from_title, 25) ) +\n'\\n    </p>\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"To:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.to_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.to_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n if (options.show_edge_tooltip_creator && edge.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e( edge.created_by_color ) +\n';\"></span>\\n        ' +\n__e( shortenText(edge.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/annotationtemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/player/' +\n((__t = (mediaid)) == null ? '' : __t) +\n'/#id=' +\n((__t = (annotationid)) == null ? '' : __t) +\n'\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"' +\n__e(description) +\n'\">\\n\\n    <img class=\"Rk-Ldt-Annotation-Icon\" src=\"' +\n((__t = (image)) == null ? '' : __t) +\n'\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <p>' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    <p>Start: ' +\n((__t = (start)) == null ? '' : __t) +\n', End: ' +\n((__t = (end)) == null ? '' : __t) +\n', Duration: ' +\n((__t = (duration)) == null ? '' : __t) +\n'</p>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/segmenttemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/player/' +\n((__t = (mediaid)) == null ? '' : __t) +\n'/#id=' +\n((__t = (annotationid)) == null ? '' : __t) +\n'\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"' +\n__e(description) +\n'\">\\n\\n    <img class=\"Rk-Ldt-Annotation-Icon\" src=\"' +\n((__t = (image)) == null ? '' : __t) +\n'\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <p>' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    <p>Start: ' +\n((__t = (start)) == null ? '' : __t) +\n', End: ' +\n((__t = (end)) == null ? '' : __t) +\n', Duration: ' +\n((__t = (duration)) == null ? '' : __t) +\n'</p>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/ldtjson-bin/tagtemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item\" draggable=\"true\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL(static_url+'img/ldt-tag.png') ) +\n'\"\\n    data-uri=\"' +\n((__t = (ldt_platform)) == null ? '' : __t) +\n'ldtplatform/ldt/front/search/?search=' +\n((__t = (encodedtitle)) == null ? '' : __t) +\n'&field=all\"\\n    data-title=\"' +\n__e(title) +\n'\" data-description=\"Tag \\'' +\n__e(title) +\n'\\'\">\\n\\n    <img class=\"Rk-Ldt-Tag-Icon\" src=\"' +\n__e(static_url) +\n'img/ldt-tag.png\" />\\n    <h4>' +\n((__t = (htitle)) == null ? '' : __t) +\n'</h4>\\n    <div class=\"Rk-Clear\"></div>\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/list-bin.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<li class=\"Rk-Bin-Item Rk-ResourceList-Item\" draggable=\"true\"\\n    data-uri=\"' +\n__e(url) +\n'\" data-title=\"' +\n__e(title) +\n'\"\\n    data-description=\"' +\n__e(description) +\n'\"\\n    ';\n if (image) { ;\n__p += '\\n        data-image=\"' +\n__e( Rkns.Utils.getFullURL(image) ) +\n'\"\\n    ';\n } else { ;\n__p += '\\n        data-image=\"\"\\n    ';\n } ;\n__p += '\\n>';\n if (image) { ;\n__p += '\\n    <img class=\"Rk-ResourceList-Image\" src=\"' +\n__e(image) +\n'\" />\\n';\n } ;\n__p += '\\n<h4 class=\"Rk-ResourceList-Title\">\\n    ';\n if (url) { ;\n__p += '\\n        <a href=\"' +\n__e(url) +\n'\" target=\"_blank\">\\n    ';\n } ;\n__p += '\\n    ' +\n((__t = (htitle)) == null ? '' : __t) +\n'\\n    ';\n if (url) { ;\n__p += '</a>';\n } ;\n__p += '\\n    </h4>\\n    ';\n if (description) { ;\n__p += '\\n        <p class=\"Rk-ResourceList-Description\">' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n    ';\n } ;\n__p += '\\n    ';\n if (image) { ;\n__p += '\\n        <div style=\"clear: both;\"></div>\\n    ';\n } ;\n__p += '\\n</li>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/main.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n if (options.show_bins) { ;\n__p += '\\n    <div class=\"Rk-Bins\">\\n        <div class=\"Rk-Bins-Head\">\\n            <h2 class=\"Rk-Bins-Title\">' +\n__e( translate(\"Select contents:\")) +\n'</h2>\\n            <form class=\"Rk-Web-Search-Form Rk-Search-Form\">\\n                <input class=\"Rk-Web-Search-Input Rk-Search-Input\" type=\"search\"\\n                    placeholder=\"' +\n__e( translate('Search the Web') ) +\n'\" />\\n                <div class=\"Rk-Search-Select\">\\n                    <div class=\"Rk-Search-Current\"></div>\\n                    <ul class=\"Rk-Search-List\"></ul>\\n                </div>\\n                <input type=\"submit\" value=\"\"\\n                    class=\"Rk-Web-Search-Submit Rk-Search-Submit\" title=\"' +\n__e( translate('Search the Web') ) +\n'\" />\\n            </form>\\n            <form class=\"Rk-Bins-Search-Form Rk-Search-Form\">\\n                <input class=\"Rk-Bins-Search-Input Rk-Search-Input\" type=\"search\"\\n                    placeholder=\"' +\n__e( translate('Search in Bins') ) +\n'\" /> <input\\n                    type=\"submit\" value=\"\"\\n                    class=\"Rk-Bins-Search-Submit Rk-Search-Submit\"\\n                    title=\"' +\n__e( translate('Search in Bins') ) +\n'\" />\\n            </form>\\n        </div>\\n        <ul class=\"Rk-Bin-List\"></ul>\\n    </div>\\n';\n } ;\n__p += ' ';\n if (options.show_editor) { ;\n__p += '\\n    <div class=\"Rk-Render Rk-Render-';\n if (options.show_bins) { ;\n__p += 'Panel';\n } else { ;\n__p += 'Full';\n } ;\n__p += '\"></div>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/nodeeditor.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n //TODO: change class to id ;\n__p += '\\n<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>' +\n__e(renkan.translate(\"Edit Node\")) +\n'</span>\\n</h2>\\n<p>\\n    <label>' +\n__e(renkan.translate(\"Title:\")) +\n'</label>\\n    <input class=\"Rk-Edit-Title\" type=\"text\" value=\"' +\n__e(node.title) +\n'\" />\\n</p>\\n';\n if (options.show_node_editor_uri) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"URI:\")) +\n'</label>\\n        <input class=\"Rk-Edit-URI\" type=\"text\" value=\"' +\n__e(node.uri) +\n'\" />\\n        <a class=\"Rk-Edit-Goto\" href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\"></a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.change_types) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Types available\")) +\n':</label>\\n        <select class=\"Rk-Edit-Type\">\\n          ';\n _.each(types, function(type) { ;\n__p += '\\n            <option class=\"Rk-Edit-Vocabulary-Property\" value=\"' +\n__e( type ) +\n'\"';\n if (node.type === type) { ;\n__p += ' selected';\n } ;\n__p += '>\\n                ' +\n__e( renkan.translate(type.charAt(0).toUpperCase() + type.substring(1)) ) +\n'\\n            </option>\\n          ';\n }); ;\n__p += '\\n        </select>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_description) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Description:\")) +\n'</label>\\n        ';\n if (options.show_node_editor_description_richtext) { ;\n__p += '\\n            <div class=\"Rk-Edit-Description\" contenteditable=\"true\">' +\n((__t = (node.description)) == null ? '' : __t) +\n'</div>\\n        ';\n } else { ;\n__p += '\\n            <textarea class=\"Rk-Edit-Description\">' +\n((__t = (node.description)) == null ? '' : __t) +\n'</textarea>\\n        ';\n } ;\n__p += '\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_size) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Size:\")) +\n'</span>\\n        <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Size-Down\">-</a>\\n        <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Size-Value\">' +\n__e(node.size) +\n'</span>\\n        <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Size-Up\">+</a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_style) { ;\n__p += '\\n    <div class=\"Rk-Editor-p\">\\n      ';\n if (options.show_node_editor_style_color) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-color\">\\n        <span class=\"Rk-Editor-Label\">\\n        ' +\n__e(renkan.translate(\"Node color:\")) +\n'</span>\\n        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n            <span class=\"Rk-Edit-Color\" style=\"background: ' +\n__e(node.color) +\n';\">\\n                <span class=\"Rk-Edit-ColorTip\"></span>\\n            </span>\\n            ' +\n((__t = ( renkan.colorPicker )) == null ? '' : __t) +\n'\\n            <span class=\"Rk-Edit-ColorPicker-Text\">' +\n__e( renkan.translate(\"Choose color\") ) +\n'</span>\\n        </div>\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_node_editor_style_dash) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-dash\">\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Dash:\")) +\n'</span>\\n        <input type=\"checkbox\" name=\"Rk-Edit-Dash\" class=\"Rk-Edit-Dash\" ' +\n__e( node.dash ) +\n' />\\n      </div>\\n      ';\n } ;\n__p += '\\n      ';\n if (options.show_node_editor_style_thickness) { ;\n__p += '\\n      <div id=\"Rk-Editor-p-thickness\">\\n          <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Thickness:\")) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Down\">-</a>\\n          <span class=\"Rk-Edit-Size-Disp\" id=\"Rk-Edit-Thickness-Value\">' +\n__e(node.thickness) +\n'</span>\\n          <a href=\"#\" class=\"Rk-Edit-Size-Btn\" id=\"Rk-Edit-Thickness-Up\">+</a>\\n      </div>\\n      ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += ' ';\n if (options.show_node_editor_image) { ;\n__p += '\\n    <div class=\"Rk-Edit-ImgWrap\">\\n        <div class=\"Rk-Edit-ImgPreview\">\\n            <img src=\"' +\n__e(node.image || node.image_placeholder) +\n'\" />\\n            ';\n if (node.clip_path) { ;\n__p += '\\n                <svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" viewbox=\"0 0 1 1\" preserveAspectRatio=\"none\">\\n                    <path style=\"stroke-width: .02; stroke:red; fill-opacity:.3; fill:red;\" d=\"' +\n__e( node.clip_path ) +\n'\" />\\n                </svg>\\n            ';\n };\n__p += '\\n        </div>\\n    </div>\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Image URL:\")) +\n'</label>\\n        <div>\\n            <a class=\"Rk-Edit-Image-Del\" href=\"#\"></a>\\n            <input class=\"Rk-Edit-Image\" type=\"text\" value=\\'' +\n__e(node.image) +\n'\\' />\\n        </div>\\n    </p>\\n';\n if (options.allow_image_upload) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Choose Image File:\")) +\n'</label>\\n        <input class=\"Rk-Edit-Image-File\" type=\"file\" accept=\"image/*\" />\\n    </p>\\n';\n };\n\n } ;\n__p += ' ';\n if (options.show_node_editor_creator && node.has_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.created_by_color) +\n';\"></span>\\n        ' +\n__e( shortenText(node.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.change_shapes) { ;\n__p += '\\n    <p>\\n        <label>' +\n__e(renkan.translate(\"Shapes available\")) +\n':</label>\\n        <select class=\"Rk-Edit-Shape\">\\n          ';\n _.each(shapes, function(shape) { ;\n__p += '\\n            <option class=\"Rk-Edit-Vocabulary-Property\" value=\"' +\n__e( shape ) +\n'\"';\n if (node.shape === shape) { ;\n__p += ' selected';\n } ;\n__p += '>\\n                ' +\n__e( renkan.translate(shape.charAt(0).toUpperCase() + shape.substring(1)) ) +\n'\\n            </option>\\n          ';\n }); ;\n__p += '\\n        </select>\\n    </p>\\n';\n } ;\n__p += '\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/nodeeditor_readonly.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>\\n    ';\n if (options.show_node_tooltip_color) { ;\n__p += '\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.color) +\n';\"></span>\\n    ';\n } ;\n__p += '\\n    <span class=\"Rk-Display-Title\">\\n        ';\n if (node.uri) { ;\n__p += '\\n            <a href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\">\\n        ';\n } ;\n__p += '\\n        ' +\n__e(node.title) +\n'\\n        ';\n if (node.uri) { ;\n__p += '</a>';\n } ;\n__p += '\\n    </span>\\n</h2>\\n';\n if (node.uri && options.show_node_tooltip_uri) { ;\n__p += '\\n    <p class=\"Rk-Display-URI\">\\n        <a href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\">' +\n__e(node.short_uri) +\n'</a>\\n    </p>\\n';\n } ;\n__p += ' ';\n if (options.show_node_tooltip_description) { ;\n__p += '\\n    <p class=\"Rk-Display-Description\">' +\n((__t = (node.description)) == null ? '' : __t) +\n'</p>\\n';\n } ;\n__p += ' ';\n if (node.image && options.show_node_tooltip_image) { ;\n__p += '\\n    <img class=\"Rk-Display-ImgPreview\" src=\"' +\n__e(node.image) +\n'\" />\\n';\n } ;\n__p += ' ';\n if (node.has_creator && options.show_node_tooltip_creator) { ;\n__p += '\\n    <p>\\n        <span class=\"Rk-Editor-Label\">' +\n__e(renkan.translate(\"Created by:\")) +\n'</span>\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.created_by_color) +\n';\"></span>\\n        ' +\n__e( shortenText(node.created_by_title, 25) ) +\n'\\n    </p>\\n';\n } ;\n__p += '\\n    <a href=\"#?idnode=' +\n__e(node._id) +\n'\">' +\n__e(renkan.translate(\"Link to the node\")) +\n'</a>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/nodeeditor_video.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n__p += '<h2>\\n    <span class=\"Rk-CloseX\">&times;</span>\\n    ';\n if (options.show_node_tooltip_color) { ;\n__p += '\\n        <span class=\"Rk-UserColor\" style=\"background: ' +\n__e(node.color) +\n';\"></span>\\n    ';\n } ;\n__p += '\\n    <span class=\"Rk-Display-Title\">\\n        ';\n if (node.uri) { ;\n__p += '\\n            <a href=\"' +\n__e(node.uri) +\n'\" target=\"_blank\">\\n        ';\n } ;\n__p += '\\n        ' +\n__e(node.title) +\n'\\n        ';\n if (node.uri) { ;\n__p += '</a>';\n } ;\n__p += '\\n    </span>\\n</h2>\\n';\n if (node.uri && options.show_node_tooltip_uri) { ;\n__p += '\\n     <video width=\"320\" height=\"240\" controls>\\n        <source src=\"' +\n__e(node.uri) +\n'\" type=\"video/mp4\">\\n     </video> \\n';\n } ;\n__p += '\\n    <a href=\"#?idnode=' +\n__e(node._id) +\n'\">' +\n__e(renkan.translate(\"Link to the node\")) +\n'</a>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/scene.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape, __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\nwith (obj) {\n\n if (options.show_top_bar) { ;\n__p += '\\n    <div class=\"Rk-TopBar\">\\n        <div class=\"loader\"></div>\\n        ';\n if (!options.editor_mode) { ;\n__p += '\\n            <h2 class=\"Rk-PadTitle\">\\n                ' +\n__e( project.get(\"title\") || translate(\"Untitled project\")) +\n'\\n            </h2>\\n        ';\n } else { ;\n__p += '\\n            <input type=\"text\" class=\"Rk-PadTitle\" value=\"' +\n__e( project.get('title') || '' ) +\n'\" placeholder=\"' +\n__e(translate('Untitled project')) +\n'\" />\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_user_list) { ;\n__p += '\\n            <div class=\"Rk-Users\">\\n                <div class=\"Rk-CurrentUser\">\\n                    ';\n if (options.show_user_color) { ;\n__p += '\\n                        <div class=\"Rk-Edit-ColorPicker-Wrapper\">\\n                            <span class=\"Rk-CurrentUser-Color\">\\n                            ';\n if (options.user_color_editable) { ;\n__p += '\\n                                <span class=\"Rk-Edit-ColorTip\"></span>\\n                            ';\n } ;\n__p += '\\n                            </span>\\n                            ';\n if (options.user_color_editable) { print(colorPicker) } ;\n__p += '\\n                        </div>\\n                    ';\n } ;\n__p += '\\n                    <span class=\"Rk-CurrentUser-Name\">&lt;unknown user&gt;</span>\\n                </div>\\n                <ul class=\"Rk-UserList\"></ul>\\n            </div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.home_button_url) {;\n__p += '\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n            <a class=\"Rk-TopBar-Button Rk-Home-Button\" href=\"' +\n__e( options.home_button_url ) +\n'\">\\n                <div class=\"Rk-TopBar-Tooltip\">\\n                    <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                        ' +\n__e( translate(options.home_button_title) ) +\n'\\n                    </div>\\n                </div>\\n            </a>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_fullscreen_button) { ;\n__p += '\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n            <div class=\"Rk-TopBar-Button Rk-FullScreen-Button\">\\n                <div class=\"Rk-TopBar-Tooltip\">\\n                    <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                        ' +\n__e(translate(\"Full Screen\")) +\n'\\n                    </div>\\n                </div>\\n            </div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.editor_mode) { ;\n__p += '\\n            ';\n if (options.show_addnode_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-AddNode-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Add Node\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_addedge_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-AddEdge-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Add Edge\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_export_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Export-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Download Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_save_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Save-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\"></div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_open_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Open-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Open Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n            ';\n } ;\n__p += '\\n            ';\n if (options.show_bookmarklet) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <a class=\"Rk-TopBar-Button Rk-Bookmarklet-Button\" href=\"#\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Renkan \\'Drag-to-Add\\' bookmarklet\")) +\n'\\n                        </div>\\n                    </div>\\n                </a>\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n            ';\n } ;\n__p += '\\n        ';\n } else { ;\n__p += '\\n            ';\n if (options.show_export_button) { ;\n__p += '\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n                <div class=\"Rk-TopBar-Button Rk-Export-Button\">\\n                    <div class=\"Rk-TopBar-Tooltip\">\\n                        <div class=\"Rk-TopBar-Tooltip-Contents\">\\n                            ' +\n__e(translate(\"Download Project\")) +\n'\\n                        </div>\\n                    </div>\\n                </div>\\n                <div class=\"Rk-TopBar-Separator\"></div>\\n            ';\n } ;\n__p += '\\n        ';\n }; ;\n__p += '\\n        ';\n if (options.show_search_field) { ;\n__p += '\\n            <form action=\"#\" class=\"Rk-GraphSearch-Form\">\\n                <input type=\"search\" class=\"Rk-GraphSearch-Field\" placeholder=\"' +\n__e( translate('Search in graph') ) +\n'\" />\\n            </form>\\n            <div class=\"Rk-TopBar-Separator\"></div>\\n        ';\n } ;\n__p += '\\n    </div>\\n';\n } ;\n__p += '\\n<div class=\"Rk-Editing-Space';\n if (!options.show_top_bar) { ;\n__p += ' Rk-Editing-Space-Full';\n } ;\n__p += '\">\\n    <div class=\"Rk-Labels\"></div>\\n    <canvas class=\"Rk-Canvas\" ';\n if (options.resize) { ;\n__p += ' resize=\"\" ';\n } ;\n__p += ' ></canvas>\\n    <div class=\"Rk-Notifications\"></div>\\n    <div class=\"Rk-Editor\">\\n        ';\n if (options.show_bins) { ;\n__p += '\\n            <div class=\"Rk-Fold-Bins\">&laquo;</div>\\n        ';\n } ;\n__p += '\\n        ';\n if (options.show_zoom) { ;\n__p += '\\n            <div class=\"Rk-ZoomButtons\">\\n                <div class=\"Rk-ZoomIn\" title=\"' +\n__e(translate('Zoom In')) +\n'\"></div>\\n                <div class=\"Rk-ZoomFit\" title=\"' +\n__e(translate('Zoom Fit')) +\n'\"></div>\\n                <div class=\"Rk-ZoomOut\" title=\"' +\n__e(translate('Zoom Out')) +\n'\"></div>\\n                ';\n if (options.editor_mode && options.save_view) { ;\n__p += '\\n                    <div class=\"Rk-ZoomSave\" title=\"' +\n__e(translate('Save view')) +\n'\"></div>\\n                ';\n } ;\n__p += '\\n                ';\n if (options.save_view) { ;\n__p += '\\n                    <div class=\"Rk-ZoomSetSaved\" title=\"' +\n__e(translate('View saved view')) +\n'\"></div>\\n                    ';\n if (options.hide_nodes) { ;\n__p += '\\n                \\t   <div class=\"Rk-ShowHiddenNodes\" title=\"' +\n__e(translate('Show hidden nodes')) +\n'\"></div>\\n                    ';\n } ;\n__p += '       \\n                ';\n } ;\n__p += '\\n            </div>\\n        ';\n } ;\n__p += '\\n    </div>\\n</div>\\n';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/search.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"' +\n((__t = ( className )) == null ? '' : __t) +\n'\" data-key=\"' +\n((__t = ( key )) == null ? '' : __t) +\n'\">' +\n((__t = ( title )) == null ? '' : __t) +\n'</li>';\n\n}\nreturn __p\n};\n\nthis[\"renkanJST\"][\"templates/wikipedia-bin/resulttemplate.html\"] = function(obj) {\nobj || (obj = {});\nvar __t, __p = '', __e = _.escape;\nwith (obj) {\n__p += '<li class=\"Rk-Wikipedia-Result Rk-Bin-Item\" draggable=\"true\"\\n    data-uri=\"' +\n__e(url) +\n'\" data-title=\"Wikipedia: ' +\n__e(title) +\n'\"\\n    data-description=\"' +\n__e(description) +\n'\"\\n    data-image=\"' +\n__e( Rkns.Utils.getFullURL( static_url + 'img/wikipedia.png' ) ) +\n'\">\\n\\n    <img class=\"Rk-Wikipedia-Icon\" src=\"' +\n__e(static_url) +\n'img/wikipedia.png\">\\n    <h4 class=\"Rk-Wikipedia-Title\">\\n        <a href=\"' +\n__e(url) +\n'\" target=\"_blank\">' +\n((__t = (htitle)) == null ? '' : __t) +\n'</a>\\n    </h4>\\n    <p class=\"Rk-Wikipedia-Snippet\">' +\n((__t = (hdescription)) == null ? '' : __t) +\n'</p>\\n</li>\\n';\n\n}\nreturn __p\n};","/* Declaring the Renkan Namespace Rkns and Default values */\n\n(function(root) {\n\n    \"use strict\";\n\n    if (typeof root.Rkns !== \"object\") {\n        root.Rkns = {};\n    }\n\n    var Rkns = root.Rkns;\n    var $ = Rkns.$ = root.jQuery;\n    var _ = Rkns._ = root._;\n\n    Rkns.pickerColors = [\"#8f1919\", \"#a80000\", \"#d82626\", \"#ff0000\", \"#e87c7c\", \"#ff6565\", \"#f7d3d3\", \"#fecccc\",\n        \"#8f5419\", \"#a85400\", \"#d87f26\", \"#ff7f00\", \"#e8b27c\", \"#ffb265\", \"#f7e5d3\", \"#fee5cc\",\n        \"#8f8f19\", \"#a8a800\", \"#d8d826\", \"#feff00\", \"#e8e87c\", \"#feff65\", \"#f7f7d3\", \"#fefecc\",\n        \"#198f19\", \"#00a800\", \"#26d826\", \"#00ff00\", \"#7ce87c\", \"#65ff65\", \"#d3f7d3\", \"#ccfecc\",\n        \"#198f8f\", \"#00a8a8\", \"#26d8d8\", \"#00feff\", \"#7ce8e8\", \"#65feff\", \"#d3f7f7\", \"#ccfefe\",\n        \"#19198f\", \"#0000a8\", \"#2626d8\", \"#0000ff\", \"#7c7ce8\", \"#6565ff\", \"#d3d3f7\", \"#ccccfe\",\n        \"#8f198f\", \"#a800a8\", \"#d826d8\", \"#ff00fe\", \"#e87ce8\", \"#ff65fe\", \"#f7d3f7\", \"#feccfe\",\n        \"#000000\", \"#242424\", \"#484848\", \"#6d6d6d\", \"#919191\", \"#b6b6b6\", \"#dadada\", \"#ffffff\"\n    ];\n\n    Rkns.__renkans = [];\n\n    var _BaseBin = Rkns._BaseBin = function(_renkan, _opts) {\n        if (typeof _renkan !== \"undefined\") {\n            this.renkan = _renkan;\n            this.renkan.$.find(\".Rk-Bin-Main\").hide();\n            this.$ = Rkns.$('<li>')\n                .addClass(\"Rk-Bin\")\n                .appendTo(_renkan.$.find(\".Rk-Bin-List\"));\n            this.title_icon_$ = Rkns.$('<span>')\n                .addClass(\"Rk-Bin-Title-Icon\")\n                .appendTo(this.$);\n\n            var _this = this;\n\n            Rkns.$('<a>')\n                .attr({\n                    href: \"#\",\n                    title: _renkan.translate(\"Close bin\")\n                })\n                .addClass(\"Rk-Bin-Close\")\n                .html('&times;')\n                .appendTo(this.$)\n                .click(function() {\n                    _this.destroy();\n                    if (!_renkan.$.find(\".Rk-Bin-Main:visible\").length) {\n                        _renkan.$.find(\".Rk-Bin-Main:last\").slideDown();\n                    }\n                    _renkan.resizeBins();\n                    return false;\n                });\n            Rkns.$('<a>')\n                .attr({\n                    href: \"#\",\n                    title: _renkan.translate(\"Refresh bin\")\n                })\n                .addClass(\"Rk-Bin-Refresh\")\n                .appendTo(this.$)\n                .click(function() {\n                    _this.refresh();\n                    return false;\n                });\n            this.count_$ = Rkns.$('<div>')\n                .addClass(\"Rk-Bin-Count\")\n                .appendTo(this.$);\n            this.title_$ = Rkns.$('<h2>')\n                .addClass(\"Rk-Bin-Title\")\n                .appendTo(this.$);\n            this.main_$ = Rkns.$('<div>')\n                .addClass(\"Rk-Bin-Main\")\n                .appendTo(this.$)\n                .html('<h4 class=\"Rk-Bin-Loading\">' + _renkan.translate(\"Loading, please wait\") + '</h4>');\n            this.title_$.html(_opts.title || '(new bin)');\n            this.renkan.resizeBins();\n\n            if (_opts.auto_refresh) {\n                window.setInterval(function() {\n                    _this.refresh();\n                }, _opts.auto_refresh);\n            }\n        }\n    };\n\n    _BaseBin.prototype.destroy = function() {\n        this.$.detach();\n        this.renkan.resizeBins();\n    };\n\n    /* Point of entry */\n\n    var Renkan = Rkns.Renkan = function(_opts) {\n        var _this = this;\n\n        Rkns.__renkans.push(this);\n\n        this.options = _.defaults(_opts, Rkns.defaults, {\n            templates: _.defaults(_opts.templates, renkanJST) || renkanJST,\n            node_editor_templates: _.defaults(_opts.node_editor_templates, Rkns.defaults.node_editor_templates)\n        });\n        this.template = renkanJST['templates/main.html'];\n\n        var types_templates = {};\n        _.each(this.options.node_editor_templates, function(value, key) {\n            types_templates[key] = _this.options.templates[value];\n            delete _this.options.templates[value];\n        });\n        this.options.node_editor_templates = types_templates;\n\n        _.each(this.options.property_files, function(f) {\n            Rkns.$.getJSON(f, function(data) {\n                _this.options.properties = _this.options.properties.concat(data);\n            });\n        });\n\n        this.read_only = this.options.read_only || !this.options.editor_mode;\n        \n        this.router = new Rkns.Router();\n        \n        this.project = new Rkns.Models.Project();\n        this.dataloader = new Rkns.DataLoader.Loader(this.project, this.options);\n\n        this.setCurrentUser = function(user_id, user_name) {\n            this.project.addUser({\n                _id: user_id,\n                title: user_name\n            });\n            this.current_user = user_id;\n            this.renderer.redrawUsers();\n        };\n\n        if (typeof this.options.user_id !== \"undefined\") {\n            this.current_user = this.options.user_id;\n        }\n        this.$ = Rkns.$(\"#\" + this.options.container);\n        this.$\n            .addClass(\"Rk-Main\")\n            .html(this.template(this));\n\n        this.tabs = [];\n        this.search_engines = [];\n\n        this.current_user_list = new Rkns.Models.UsersList();\n\n        this.current_user_list.on(\"add remove\", function() {\n            if (this.renderer) {\n                this.renderer.redrawUsers();\n            }\n        });\n\n        this.colorPicker = (function() {\n            var _tmpl = renkanJST['templates/colorpicker.html'];\n            return '<ul class=\"Rk-Edit-ColorPicker\">' + Rkns.pickerColors.map(function(c) {\n                return _tmpl({\n                    c: c\n                });\n            }).join(\"\") + '</ul>';\n        })();\n\n        if (this.options.show_editor) {\n            this.renderer = new Rkns.Renderer.Scene(this);\n        }\n\n        if (!this.options.search.length) {\n            this.$.find(\".Rk-Web-Search-Form\").detach();\n        } else {\n            var _tmpl = renkanJST['templates/search.html'],\n                _select = this.$.find(\".Rk-Search-List\"),\n                _input = this.$.find(\".Rk-Web-Search-Input\"),\n                _form = this.$.find(\".Rk-Web-Search-Form\");\n            _.each(this.options.search, function(_search, _key) {\n                if (Rkns[_search.type] && Rkns[_search.type].Search) {\n                    _this.search_engines.push(new Rkns[_search.type].Search(_this, _search));\n                }\n            });\n            _select.html(\n                _(this.search_engines).map(function(_search, _key) {\n                    return _tmpl({\n                        key: _key,\n                        title: _search.getSearchTitle(),\n                        className: _search.getBgClass()\n                    });\n                }).join(\"\")\n            );\n            _select.find(\"li\").click(function() {\n                var _el = Rkns.$(this);\n                _this.setSearchEngine(_el.attr(\"data-key\"));\n                _form.submit();\n            });\n            _form.submit(function() {\n                if (_input.val()) {\n                    var _search = _this.search_engine;\n                    _search.search(_input.val());\n                }\n                return false;\n            });\n            this.$.find(\".Rk-Search-Current\").mouseenter(\n                function() {\n                    _select.slideDown();\n                }\n            );\n            this.$.find(\".Rk-Search-Select\").mouseleave(\n                function() {\n                    _select.hide();\n                }\n            );\n            this.setSearchEngine(0);\n        }\n        _.each(this.options.bins, function(_bin) {\n            if (Rkns[_bin.type] && Rkns[_bin.type].Bin) {\n                _this.tabs.push(new Rkns[_bin.type].Bin(_this, _bin));\n            }\n        });\n\n        var elementDropped = false;\n\n        this.$.find(\".Rk-Bins\")\n            .on(\"click\", \".Rk-Bin-Title,.Rk-Bin-Title-Icon\", function() {\n                var _mainDiv = Rkns.$(this).siblings(\".Rk-Bin-Main\");\n                if (_mainDiv.is(\":hidden\")) {\n                    _this.$.find(\".Rk-Bin-Main\").slideUp();\n                    _mainDiv.slideDown();\n                }\n            });\n\n        if (this.options.show_editor) {\n\n            this.$.find(\".Rk-Bins\").on(\"mouseover\", \".Rk-Bin-Item\", function(_e) {\n                var _t = Rkns.$(this);\n                if (_t && $(_t).attr(\"data-uri\")) {\n                    var _models = _this.project.get(\"nodes\").where({\n                        uri: $(_t).attr(\"data-uri\")\n                    });\n                    _.each(_models, function(_model) {\n                        _this.renderer.highlightModel(_model);\n                    });\n                }\n            }).mouseout(function() {\n                _this.renderer.unhighlightAll();\n            }).on(\"mousemove\", \".Rk-Bin-Item\", function(e) {\n                try {\n                    this.dragDrop();\n                } catch (err) {}\n            }).on(\"touchstart\", \".Rk-Bin-Item\", function(e) {\n                elementDropped = false;\n            }).on(\"touchmove\", \".Rk-Bin-Item\", function(e) {\n                e.preventDefault();\n                var touch = e.originalEvent.changedTouches[0],\n                    off = _this.renderer.canvas_$.offset(),\n                    w = _this.renderer.canvas_$.width(),\n                    h = _this.renderer.canvas_$.height();\n                if (touch.pageX >= off.left && touch.pageX < (off.left + w) && touch.pageY >= off.top && touch.pageY < (off.top + h)) {\n                    if (elementDropped) {\n                        _this.renderer.onMouseMove(touch, true);\n                    } else {\n                        elementDropped = true;\n                        var div = document.createElement('div');\n                        div.appendChild(this.cloneNode(true));\n                        _this.renderer.dropData({\n                            \"text/html\": div.innerHTML\n                        }, touch);\n                        _this.renderer.onMouseDown(touch, true);\n                    }\n                }\n            }).on(\"touchend\", \".Rk-Bin-Item\", function(e) {\n                if (elementDropped) {\n                    _this.renderer.onMouseUp(e.originalEvent.changedTouches[0], true);\n                }\n                elementDropped = false;\n            }).on(\"dragstart\", \".Rk-Bin-Item\", function(e) {\n                var div = document.createElement('div');\n                div.appendChild(this.cloneNode(true));\n                try {\n                    e.originalEvent.dataTransfer.setData(\"text/html\", div.innerHTML);\n                } catch (err) {\n                    e.originalEvent.dataTransfer.setData(\"text\", div.innerHTML);\n                }\n            });\n\n        }\n\n        Rkns.$(window).resize(function() {\n            _this.resizeBins();\n        });\n\n        var lastsearch = false,\n            lastval = '';\n\n        this.$.find(\".Rk-Bins-Search-Input\").on(\"change keyup paste input\", function() {\n            var val = Rkns.$(this).val();\n            if (val === lastval) {\n                return;\n            }\n            var search = Rkns.Utils.regexpFromTextOrArray(val.length > 1 ? val : null);\n            if (search.source === lastsearch) {\n                return;\n            }\n            lastsearch = search.source;\n            _.each(_this.tabs, function(tab) {\n                tab.render(search);\n            });\n\n        });\n        this.$.find(\".Rk-Bins-Search-Form\").submit(function() {\n            return false;\n        });\n    };\n\n    Renkan.prototype.translate = function(_text) {\n        if (Rkns.i18n[this.options.language] && Rkns.i18n[this.options.language][_text]) {\n            return Rkns.i18n[this.options.language][_text];\n        }\n        if (this.options.language.length > 2 && Rkns.i18n[this.options.language.substr(0, 2)] && Rkns.i18n[this.options.language.substr(0, 2)][_text]) {\n            return Rkns.i18n[this.options.language.substr(0, 2)][_text];\n        }\n        return _text;\n    };\n\n    Renkan.prototype.onStatusChange = function() {\n        this.renderer.onStatusChange();\n    };\n\n    Renkan.prototype.setSearchEngine = function(_key) {\n        this.search_engine = this.search_engines[_key];\n        this.$.find(\".Rk-Search-Current\").attr(\"class\", \"Rk-Search-Current \" + this.search_engine.getBgClass());\n        var listClasses = this.search_engine.getBgClass().split(\" \");\n        var classes = \"\";\n        for (var i = 0; i < listClasses.length; i++) {\n            classes += \".\" + listClasses[i];\n        }\n        this.$.find(\".Rk-Web-Search-Input.Rk-Search-Input\").attr(\"placeholder\", this.translate(\"Search in \") + this.$.find(\".Rk-Search-List \" + classes).html());\n    };\n\n    Renkan.prototype.resizeBins = function() {\n        var _d = +this.$.find(\".Rk-Bins-Head\").outerHeight();\n        this.$.find(\".Rk-Bin-Title:visible\").each(function() {\n            _d += Rkns.$(this).outerHeight();\n        });\n        this.$.find(\".Rk-Bin-Main\").css({\n            height: this.$.find(\".Rk-Bins\").height() - _d\n        });\n    };\n\n    /* Utility functions */\n    var getUUID4 = function() {\n        return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function(c) {\n            var r = Math.random() * 16 | 0,\n                v = c === 'x' ? r : (r & 0x3 | 0x8);\n            return v.toString(16);\n        });\n    };\n\n    Rkns.Utils = {\n        getUUID4: getUUID4,\n        getUID: (function() {\n            function pad(n) {\n                return n < 10 ? '0' + n : n;\n            }\n            var _d = new Date(),\n                ID_AUTO_INCREMENT = 0,\n                ID_BASE = _d.getUTCFullYear() + '-' +\n                pad(_d.getUTCMonth() + 1) + '-' +\n                pad(_d.getUTCDate()) + '-' +\n                getUUID4();\n            return function(_base) {\n                var _n = (++ID_AUTO_INCREMENT).toString(16),\n                    _uidbase = (typeof _base === \"undefined\" ? \"\" : _base + \"-\");\n                while (_n.length < 4) {\n                    _n = '0' + _n;\n                }\n                return _uidbase + ID_BASE + '-' + _n;\n            };\n        })(),\n        getFullURL: function(url) {\n\n            if (typeof(url) === 'undefined' || url == null) {\n                return \"\";\n            }\n            if (/https?:\\/\\//.test(url)) {\n                return url;\n            }\n            var img = new Image();\n            img.src = url;\n            var res = img.src;\n            img.src = null;\n            return res;\n\n        },\n        inherit: function(_baseClass, _callbefore) {\n\n            var _class = function(_arg) {\n                if (typeof _callbefore === \"function\") {\n                    _callbefore.apply(this, Array.prototype.slice.call(arguments, 0));\n                }\n                _baseClass.apply(this, Array.prototype.slice.call(arguments, 0));\n                if (typeof this._init === \"function\" && !this._initialized) {\n                    this._init.apply(this, Array.prototype.slice.call(arguments, 0));\n                    this._initialized = true;\n                }\n            };\n            _.extend(_class.prototype, _baseClass.prototype);\n\n            return _class;\n\n        },\n        regexpFromTextOrArray: (function() {\n            var charsub = [\n                    '[aáàâä]',\n                    '[cç]',\n                    '[eéèêë]',\n                    '[iíìîï]',\n                    '[oóòôö]',\n                    '[uùûü]'\n                ],\n                removeChars = [\n                    String.fromCharCode(768), String.fromCharCode(769), String.fromCharCode(770), String.fromCharCode(771), String.fromCharCode(807),\n                    \"{\", \"}\", \"(\", \")\", \"[\", \"]\", \"【\", \"】\", \"、\", \"・\", \"‥\", \"。\", \"「\", \"」\", \"『\", \"』\", \"〜\", \":\", \"!\", \"?\", \" \",\n                    \",\", \" \", \";\", \"(\", \")\", \".\", \"*\", \"+\", \"\\\\\", \"?\", \"|\", \"{\", \"}\", \"[\", \"]\", \"^\", \"#\", \"/\"\n                ],\n                remsrc = \"[\\\\\" + removeChars.join(\"\\\\\") + \"]\",\n                remrx = new RegExp(remsrc, \"gm\"),\n                charsrx = _.map(charsub, function(c) {\n                    return new RegExp(c);\n                });\n\n            function replaceText(_text) {\n                var txt = _text.toLowerCase().replace(remrx, \"\"),\n                    src = \"\";\n\n                function makeReplaceFunc(l) {\n                    return function(k, v) {\n                        l = l.replace(charsrx[k], v);\n                    };\n                }\n                for (var j = 0; j < txt.length; j++) {\n                    if (j) {\n                        src += remsrc + \"*\";\n                    }\n                    var l = txt[j];\n                    _.each(charsub, makeReplaceFunc(l));\n                    src += l;\n                }\n                return src;\n            }\n\n            function getSource(inp) {\n                switch (typeof inp) {\n                    case \"string\":\n                        return replaceText(inp);\n                    case \"object\":\n                        var src = '';\n                        _.each(inp, function(v) {\n                            var res = getSource(v);\n                            if (res) {\n                                if (src) {\n                                    src += '|';\n                                }\n                                src += res;\n                            }\n                        });\n                        return src;\n                }\n                return '';\n            }\n\n            return function(_textOrArray) {\n                var source = getSource(_textOrArray);\n                if (source) {\n                    var testrx = new RegExp(source, \"im\"),\n                        replacerx = new RegExp('(' + source + ')', \"igm\");\n                    return {\n                        isempty: false,\n                        source: source,\n                        test: function(_t) {\n                            return testrx.test(_t);\n                        },\n                        replace: function(_text, _replace) {\n                            return _text.replace(replacerx, _replace);\n                        }\n                    };\n                } else {\n                    return {\n                        isempty: true,\n                        source: '',\n                        test: function() {\n                            return true;\n                        },\n                        replace: function(_text) {\n                            return text;\n                        }\n                    };\n                }\n            };\n        })(),\n        /* The minimum distance (in pixels) the mouse has to move to consider an element was dragged */\n        _MIN_DRAG_DISTANCE: 2,\n        /* Distance between the inner and outer radius of buttons that appear when hovering on a node */\n        _NODE_BUTTON_WIDTH: 40,\n\n        _EDGE_BUTTON_INNER: 2,\n        _EDGE_BUTTON_OUTER: 40,\n        /* Constants used to know if a specific action is to be performed when clicking on the canvas */\n        _CLICKMODE_ADDNODE: 1,\n        _CLICKMODE_STARTEDGE: 2,\n        _CLICKMODE_ENDEDGE: 3,\n        /* Node size step: Used to calculate the size change when clicking the +/- buttons */\n        _NODE_SIZE_STEP: Math.LN2 / 4,\n        _MIN_SCALE: 1 / 20,\n        _MAX_SCALE: 20,\n        _MOUSEMOVE_RATE: 80,\n        _DOUBLETAP_DELAY: 800,\n        /* Maximum distance in pixels (squared, to reduce calculations)\n         * between two taps when double-tapping on a touch terminal */\n        _DOUBLETAP_DISTANCE: 20 * 20,\n        /* A placeholder so a default colour is displayed when a node has a null value for its user property */\n        _USER_PLACEHOLDER: function(_renkan) {\n            return {\n                color: _renkan.options.default_user_color,\n                title: _renkan.translate(\"(unknown user)\"),\n                get: function(attr) {\n                    return this[attr] || false;\n                }\n            };\n        },\n        /* The code for the \"Drag and Add Bookmarklet\", slightly minified and with whitespaces removed, though\n         * it doesn't seem that it's still a requirement in newer browsers (i.e. the ones compatibles with canvas drawing)\n         */\n        _BOOKMARKLET_CODE: function(_renkan) {\n            return \"(function(a,b,c,d,e,f,h,i,j,k,l,m,n,o,p,q,r){a=document;b=a.body;c=a.location.href;j='draggable';m='text/x-iri-';d=a.createElement('div');d.innerHTML='<p_style=\\\"position:fixed;top:0;right:0;font:bold_18px_sans-serif;color:#fff;background:#909;padding:10px;z-index:100000;\\\">\" +\n                _renkan.translate(\"Drag items from this website, drop them in Renkan\").replace(/ /g, \"_\") +\n                \"</p>'.replace(/_/g,String.fromCharCode(32));b.appendChild(d);e=[{r:/https?:\\\\/\\\\/[^\\\\/]*twitter\\\\.com\\\\//,s:'.tweet',n:'twitter'},{r:/https?:\\\\/\\\\/[^\\\\/]*google\\\\.[^\\\\/]+\\\\//,s:'.g',n:'google'},{r:/https?:\\\\/\\\\/[^\\\\/]*lemonde\\\\.fr\\\\//,s:'[data-vr-contentbox]',n:'lemonde'}];f=false;e.forEach(function(g){if(g.r.test(c)){f=g;}});if(f){h=function(){Array.prototype.forEach.call(a.querySelectorAll(f.s),function(i){i[j]=true;k=i.style;k.borderWidth='2px';k.borderColor='#909';k.borderStyle='solid';k.backgroundColor='rgba(200,0,180,.1)';})};window.setInterval(h,500);h();};a.addEventListener('dragstart',function(k){l=k.dataTransfer;l.setData(m+'source-uri',c);l.setData(m+'source-title',a.title);n=k.target;if(f){o=n;while(!o.attributes[j]){o=o.parentNode;if(o==b){break;}}}if(f&&o.attributes[j]){p=o.cloneNode(true);l.setData(m+'specific-site',f.n)}else{q=a.getSelection();if(q.type==='Range'||!q.type){p=q.getRangeAt(0).cloneContents();}else{p=n.cloneNode();}}r=a.createElement('div');r.appendChild(p);l.setData('text/x-iri-selected-text',r.textContent.trim());l.setData('text/x-iri-selected-html',r.innerHTML);},false);})();\";\n        },\n        /* Shortens text to the required length then adds ellipsis */\n        shortenText: function(_text, _maxlength) {\n            return (_text.length > _maxlength ? (_text.substr(0, _maxlength) + '…') : _text);\n        },\n        /* Drawing an edit box with an arrow and positioning the edit box according to the position of the node/edge being edited\n         * Called by Rkns.Renderer.NodeEditor and Rkns.Renderer.EdgeEditor */\n        drawEditBox: function(_options, _coords, _path, _xmargin, _selector) {\n            _selector.css({\n                width: (_options.tooltip_width - 2 * _options.tooltip_padding)\n            });\n            var _height = _selector.outerHeight() + 2 * _options.tooltip_padding,\n                _isLeft = (_coords.x < paper.view.center.x ? 1 : -1),\n                _left = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length),\n                _right = _coords.x + _isLeft * (_xmargin + _options.tooltip_arrow_length + _options.tooltip_width),\n                _top = _coords.y - _height / 2;\n            if (_top + _height > (paper.view.size.height - _options.tooltip_margin)) {\n                _top = Math.max(paper.view.size.height - _options.tooltip_margin, _coords.y + _options.tooltip_arrow_width / 2) - _height;\n            }\n            if (_top < _options.tooltip_margin) {\n                _top = Math.min(_options.tooltip_margin, _coords.y - _options.tooltip_arrow_width / 2);\n            }\n            var _bottom = _top + _height;\n            /* jshint laxbreak:true */\n            _path.segments[0].point = _path.segments[7].point = _coords.add([_isLeft * _xmargin, 0]);\n            _path.segments[1].point.x = _path.segments[2].point.x = _path.segments[5].point.x = _path.segments[6].point.x = _left;\n            _path.segments[3].point.x = _path.segments[4].point.x = _right;\n            _path.segments[2].point.y = _path.segments[3].point.y = _top;\n            _path.segments[4].point.y = _path.segments[5].point.y = _bottom;\n            _path.segments[1].point.y = _coords.y - _options.tooltip_arrow_width / 2;\n            _path.segments[6].point.y = _coords.y + _options.tooltip_arrow_width / 2;\n            _path.closed = true;\n            _path.fillColor = new paper.GradientColor(new paper.Gradient([_options.tooltip_top_color, _options.tooltip_bottom_color]), [0, _top], [0, _bottom]);\n            _selector.css({\n                left: (_options.tooltip_padding + Math.min(_left, _right)),\n                top: (_options.tooltip_padding + _top)\n            });\n            return _path;\n        },\n        // from http://stackoverflow.com/a/6444043\n        increaseBrightness: function (hex, percent){\n            // strip the leading # if it's there\n            hex = hex.replace(/^\\s*#|\\s*$/g, '');\n\n            // convert 3 char codes --> 6, e.g. `E0F` --> `EE00FF`\n            if(hex.length === 3){\n                hex = hex.replace(/(.)/g, '$1$1');\n            }\n\n            var r = parseInt(hex.substr(0, 2), 16),\n                g = parseInt(hex.substr(2, 2), 16),\n                b = parseInt(hex.substr(4, 2), 16);\n\n            return '#' +\n               ((0|(1<<8) + r + (256 - r) * percent / 100).toString(16)).substr(1) +\n               ((0|(1<<8) + g + (256 - g) * percent / 100).toString(16)).substr(1) +\n               ((0|(1<<8) + b + (256 - b) * percent / 100).toString(16)).substr(1);\n        }\n    };\n})(window);\n\n/* END main.js */\n","(function(root) {\n    \"use strict\";\n    \n    var Backbone = root.Backbone;\n    \n    var Router = root.Rkns.Router = Backbone.Router.extend({\n        routes: {\n            '': 'index'\n        },\n        \n        index: function (parameters) {\n            \n            var result = {};\n            if (parameters === null){\n                return;\n            }\n            parameters.split(\"&\").forEach(function(part) {\n              var item = part.split(\"=\");\n              result[item[0]] = decodeURIComponent(item[1]);\n            });\n            this.trigger('router', result);            \n        }  \n    });\n\n})(window);","(function(root) {\n\n    \"use strict\";\n\n    var DataLoader = root.Rkns.DataLoader = {\n        converters: {\n            from1to2: function(data) {\n\n                var i, len;\n                if(typeof data.nodes !== 'undefined') {\n                    for(i=0, len=data.nodes.length; i<len; i++) {\n                        var node = data.nodes[i];\n                        if(node.color) {\n                            node.style = {\n                                color: node.color,\n                            };\n                        }\n                        else {\n                            node.style = {};\n                        }\n                    }\n                }\n                if(typeof data.edges !== 'undefined') {\n                    for(i=0, len=data.edges.length; i<len; i++) {\n                        var edge = data.edges[i];\n                        if(edge.color) {\n                            edge.style = {\n                                color: edge.color,\n                            };\n                        }\n                        else {\n                            edge.style = {};\n                        }\n                    }\n                }\n\n                data.schema_version = \"2\";\n\n                return data;\n            },\n        }\n    };\n\n\n    DataLoader.Loader = function(project, options) {\n        this.project = project;\n        this.dataConverters = _.defaults(options.converters || {}, DataLoader.converters);\n    };\n\n\n    DataLoader.Loader.prototype.convert = function(data) {\n        var schemaVersionFrom = this.project.getSchemaVersion(data);\n        var schemaVersionTo = this.project.getSchemaVersion();\n\n        if (schemaVersionFrom !== schemaVersionTo) {\n            var converterName = \"from\" + schemaVersionFrom + \"to\" + schemaVersionTo;\n            if (typeof this.dataConverters[converterName] === 'function') {\n                data = this.dataConverters[converterName](data);\n            }\n        }\n        return data;\n    };\n\n    DataLoader.Loader.prototype.load = function(data) {\n        this.project.set(this.convert(data), {\n            validate: true\n        });\n    };\n\n})(window);\n","(function(root) {\n    \"use strict\";\n\n    var Backbone = root.Backbone;\n\n    var Models = root.Rkns.Models = {};\n\n    Models.getUID = function(obj) {\n        var guid = 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g,\n                function(c) {\n                    var r = Math.random() * 16 | 0, v = c === 'x' ? r\n                            : (r & 0x3 | 0x8);\n                    return v.toString(16);\n                });\n        if (typeof obj !== 'undefined') {\n            return obj.type + \"-\" + guid;\n        }\n        else {\n            return guid;\n        }\n    };\n\n    var RenkanModel = Backbone.RelationalModel.extend({\n        idAttribute : \"_id\",\n        constructor : function(options) {\n\n            if (typeof options !== \"undefined\") {\n                options._id = options._id || options.id || Models.getUID(this);\n                options.title = options.title || \"\";\n                options.description = options.description || \"\";\n                options.uri = options.uri || \"\";\n\n                if (typeof this.prepare === \"function\") {\n                    options = this.prepare(options);\n                }\n            }\n            Backbone.RelationalModel.prototype.constructor.call(this, options);\n        },\n        validate : function() {\n            if (!this.type) {\n                return \"object has no type\";\n            }\n        },\n        addReference : function(_options, _propName, _list, _id, _default) {\n            var _element = _list.get(_id);\n            if (typeof _element === \"undefined\" &&\n                typeof _default !== \"undefined\") {\n                _options[_propName] = _default;\n            }\n            else {\n                _options[_propName] = _element;\n            }\n        }\n    });\n\n    // USER\n    var User = Models.User = RenkanModel.extend({\n        type : \"user\",\n        prepare : function(options) {\n            options.color = options.color || \"#666666\";\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                color : this.get(\"color\")\n            };\n        }\n    });\n\n    // NODE\n    var Node = Models.Node = RenkanModel.extend({\n        type : \"node\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            options.description = options.description || \"\";\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                position : this.get(\"position\"),\n                image : this.get(\"image\"),\n                style : this.get(\"style\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null,\n                size : this.get(\"size\"),\n                clip_path : this.get(\"clip_path\"),\n                shape : this.get(\"shape\"),  \n                type : this.get(\"type\")\n            };\n        }\n    });\n\n    // EDGE\n    var Edge = Models.Edge = RenkanModel.extend({\n        type : \"edge\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        }, {\n            type : Backbone.HasOne,\n            key : \"from\",\n            relatedModel : Node\n        }, {\n            type : Backbone.HasOne,\n            key : \"to\",\n            relatedModel : Node\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            this.addReference(options, \"from\", project.get(\"nodes\"),\n                    options.from);\n            this.addReference(options, \"to\", project.get(\"nodes\"), options.to);\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                title : this.get(\"title\"),\n                uri : this.get(\"uri\"),\n                description : this.get(\"description\"),\n                from : this.get(\"from\") ? this.get(\"from\").get(\"_id\") : null,\n                to : this.get(\"to\") ? this.get(\"to\").get(\"_id\") : null,\n                style : this.get(\"style\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null\n            };\n        }\n    });\n\n    // View\n    var View = Models.View = RenkanModel.extend({\n        type : \"view\",\n        relations : [ {\n            type : Backbone.HasOne,\n            key : \"created_by\",\n            relatedModel : User\n        } ],\n        prepare : function(options) {\n            var project = options.project;\n            this.addReference(options, \"created_by\", project.get(\"users\"),\n                    options.created_by, project.current_user);\n            options.description = options.description || \"\";\n            if (typeof options.offset !== \"undefined\") {\n                var offset = {};\n                if (Array.isArray(options.offset)) {\n                    offset.x = options.offset[0];\n                    offset.y = options.offset.length > 1 ? options.offset[1]\n                            : options.offset[0];\n                }\n                else if (options.offset.x != null) {\n                    offset.x = options.offset.x;\n                    offset.y = options.offset.y;\n                }\n                options.offset = offset;\n            }\n            return options;\n        },\n        toJSON : function() {\n            return {\n                _id : this.get(\"_id\"),\n                zoom_level : this.get(\"zoom_level\"),\n                offset : this.get(\"offset\"),\n                title : this.get(\"title\"),\n                description : this.get(\"description\"),\n                created_by : this.get(\"created_by\") ? this.get(\"created_by\")\n                        .get(\"_id\") : null,\n                hidden_nodes: this.get(\"hidden_nodes\")\n            // Don't need project id\n            };\n        }\n    });\n\n    // PROJECT\n    var Project = Models.Project = RenkanModel.extend({\n        schema_version : \"2\",\n        type : \"project\",\n        blacklist : [ 'saveStatus', 'loadingStatus'],\n        relations : [ {\n            type : Backbone.HasMany,\n            key : \"users\",\n            relatedModel : User,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"nodes\",\n            relatedModel : Node,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"edges\",\n            relatedModel : Edge,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        }, {\n            type : Backbone.HasMany,\n            key : \"views\",\n            relatedModel : View,\n            reverseRelation : {\n                key : 'project',\n                includeInJSON : '_id'\n            }\n        } ],\n        addUser : function(_props, _options) {\n            _props.project = this;\n            var _user = User.findOrCreate(_props);\n            this.get(\"users\").push(_user, _options);\n            return _user;\n        },\n        addNode : function(_props, _options) {\n            _props.project = this;\n            var _node = Node.findOrCreate(_props);\n            this.get(\"nodes\").push(_node, _options);\n            return _node;\n        },\n        addEdge : function(_props, _options) {\n            _props.project = this;\n            var _edge = Edge.findOrCreate(_props);\n            this.get(\"edges\").push(_edge, _options);\n            return _edge;\n        },\n        addView : function(_props, _options) {\n            _props.project = this;\n            // TODO: check if need to replace with create only\n            var _view = View.findOrCreate(_props);\n            // TODO: Should we remember only one view?\n            this.get(\"views\").push(_view, _options);\n            return _view;\n        },\n        removeNode : function(_model) {\n            this.get(\"nodes\").remove(_model);\n        },\n        removeEdge : function(_model) {\n            this.get(\"edges\").remove(_model);\n        },\n        validate : function(options) {\n            var _project = this;\n            _.each(\n              [].concat(options.users, options.nodes, options.edges,options.views),\n              function(_item) {\n                if (_item) {\n                    _item.project = _project;\n                }\n              }\n            );\n        },\n        getSchemaVersion : function(data) {\n          var t = data;\n          if(typeof(t) === \"undefined\") {\n            t = this;\n          }\n          var version = t.schema_version;\n          if(!version) {\n            return 1;\n          }\n          else {\n            return version;\n          }\n        },\n        // Add event handler to remove edges when a node is removed\n        initialize : function() {\n            var _this = this;\n            this.on(\"remove:nodes\", function(_node) {\n                _this.get(\"edges\").remove(\n                        _this.get(\"edges\").filter(\n                                function(_edge) {\n                                    return _edge.get(\"from\") === _node ||\n                                           _edge.get(\"to\") === _node;\n                                }));\n            });\n        },\n        toJSON : function() {\n            var json = _.clone(this.attributes);\n            for ( var attr in json) {\n                if ((json[attr] instanceof Backbone.Model) ||\n                        (json[attr] instanceof Backbone.Collection) ||\n                        (json[attr] instanceof RenkanModel)) {\n                    json[attr] = json[attr].toJSON();\n                }\n            }\n            return _.omit(json, this.blacklist);\n        }\n    });\n\n    var RosterUser = Models.RosterUser = Backbone.Model\n            .extend({\n                type : \"roster_user\",\n                idAttribute : \"_id\",\n\n                constructor : function(options) {\n\n                    if (typeof options !== \"undefined\") {\n                        options._id = options._id ||\n                            options.id ||\n                            Models.getUID(this);\n                        options.title = options.title || \"(untitled \" + this.type + \")\";\n                        options.description = options.description || \"\";\n                        options.uri = options.uri || \"\";\n                        options.project = options.project || null;\n                        options.site_id = options.site_id || 0;\n\n                        if (typeof this.prepare === \"function\") {\n                            options = this.prepare(options);\n                        }\n                    }\n                    Backbone.Model.prototype.constructor.call(this, options);\n                },\n\n                validate : function() {\n                    if (!this.type) {\n                        return \"object has no type\";\n                    }\n                },\n\n                prepare : function(options) {\n                    options.color = options.color || \"#666666\";\n                    return options;\n                },\n\n                toJSON : function() {\n                    return {\n                        _id : this.get(\"_id\"),\n                        title : this.get(\"title\"),\n                        uri : this.get(\"uri\"),\n                        description : this.get(\"description\"),\n                        color : this.get(\"color\"),\n                        project : (this.get(\"project\") != null) ? this.get(\n                                \"project\").get(\"id\") : null,\n                        site_id : this.get(\"site_id\")\n                    };\n                }\n            });\n\n    var UsersList = Models.UsersList = Backbone.Collection.extend({\n        model : RosterUser\n    });\n\n})(window);\n","Rkns.defaults = {\n\n    language: (navigator.language || navigator.userLanguage || \"en\"),\n        /* GUI Language */\n    container: \"renkan\",\n        /* GUI Container DOM element ID */\n    search: [],\n        /* List of Search Engines */\n    bins: [],\n           /* List of Bins */\n    static_url: \"\",\n        /* URL for static resources */\n    popup_editor: true,\n        /* show the node editor as a popup inside the renkan view */\n    editor_panel: 'editor-panel',\n        /* GUI continer DOM element ID of the editor panel */\n    show_bins: true,\n        /* Show bins in left column */\n    properties: [],\n        /* Semantic properties for edges */\n    show_editor: true,\n        /* Show the graph editor... Setting this to \"false\" only shows the bins part ! */\n    read_only: false,\n        /* Allows editing of renkan without changing the rest of the GUI. Can be switched on/off on the fly to block/enable editing */\n    editor_mode: true,\n        /* Switch for Publish/Edit GUI. If editor_mode is false, read_only will be true.  */\n    manual_save: false,\n        /* In snapshot mode, clicking on the floppy will save a snapshot. Otherwise, it will show the connection status */\n    show_top_bar: true,\n        /* Show the top bar, (title, buttons, users) */\n    default_user_color: \"#303030\",\n    size_bug_fix: true,\n        /* Resize the canvas after load (fixes a bug on iPad and FF Mac) */\n    force_resize: false,\n    allow_double_click: true,\n        /* Allows Double Click to create a node on an empty background */\n    zoom_on_scroll: true,\n        /* Allows to use the scrollwheel to zoom */\n    element_delete_delay: 0,\n        /* Delay between clicking on the bin on an element and really deleting it\n           Set to 0 for delete confirm */\n    autoscale_padding: 50,\n    resize: true,\n\n    /* zoom options */\n    show_zoom: true,\n        /* show zoom buttons */\n    save_view: true,\n        /* show buttons to save view */\n    default_view: false,\n        /* Allows to load default view (zoom+offset) at start on read_only mode, instead of autoScale. the default_view will be the last */\n\n\n    /* TOP BAR BUTTONS */\n    show_search_field: true,\n    show_user_list: true,\n    user_name_editable: true,\n    user_color_editable: true,\n    show_user_color: true,\n    show_save_button: true,\n    show_export_button: true,\n    show_open_button: false,\n    show_addnode_button: true,\n    show_addedge_button: true,\n    show_bookmarklet: true,\n    show_fullscreen_button: true,\n    home_button_url: false,\n    home_button_title: \"Home\",\n\n    /* MINI-MAP OPTIONS */\n\n    show_minimap: true,\n        /* Show a small map at the bottom right */\n    minimap_width: 160,\n    minimap_height: 120,\n    minimap_padding: 20,\n    minimap_background_color: \"#ffffff\",\n    minimap_border_color: \"#cccccc\",\n    minimap_highlight_color: \"#ffff00\",\n    minimap_highlight_weight: 5,\n\n\n    /* EDGE/NODE COMMON OPTIONS */\n\n    buttons_background: \"#202020\",\n    buttons_label_color: \"#c000c0\",\n    buttons_label_font_size: 9,\n\n    ghost_opacity : 0.3,\n        /* opacity when the hidden element is revealed */\n    default_dash_array : [4, 5],\n        /* dash line genometry */\n\n    /* NODE DISPLAY OPTIONS */\n\n    show_node_circles: true,\n        /* Show circles for nodes */\n    clip_node_images: true,\n        /* Constraint node images to circles */\n    node_images_fill_mode: false,\n        /* Set to false for \"letterboxing\" (height/width of node adapted to show full image)\n           Set to true for \"crop\" (adapted to fill circle) */\n    node_size_base: 25,\n    node_stroke_width: 2,\n    node_stroke_max_width: 12,\n    selected_node_stroke_width: 4,\n    selected_node_stroke_max_width: 24,\n    node_stroke_witdh_scale: 5,\n    node_fill_color: \"#ffffff\",\n    highlighted_node_fill_color: \"#ffff00\",\n    node_label_distance: 5,\n        /* Vertical distance between node and label */\n    node_label_max_length: 60,\n        /* Maximum displayed text length */\n    label_untitled_nodes: \"(untitled)\",\n        /* Label to display on untitled nodes */\n    hide_nodes: true, \n    /* allow hide/show nodes */\n    change_shapes: true,\n        /* Change shapes enabled */\n    change_types: true,\n    /* Change type enabled */\n    \n    /* NODE EDITOR TEMPLATE*/\n    \n    node_editor_templates: {\n        \"default\": \"templates/nodeeditor_readonly.html\",\n        \"video\": \"templates/nodeeditor_video.html\"\n    },\n\n    /* EDGE DISPLAY OPTIONS */\n\n    edge_stroke_width: 2,\n    edge_stroke_max_width: 12,\n    selected_edge_stroke_width: 4,\n    selected_edge_stroke_max_width: 24,\n    edge_stroke_witdh_scale: 5,\n\n    edge_label_distance: 0,\n    edge_label_max_length: 20,\n    edge_arrow_length: 18,\n    edge_arrow_width: 12,\n    edge_arrow_max_width: 32,\n    edge_gap_in_bundles: 12,\n    label_untitled_edges: \"\",\n\n    /* CONTEXTUAL DISPLAY (TOOLTIP OR EDITOR) OPTIONS */\n\n    tooltip_width: 275,\n    tooltip_padding: 10,\n    tooltip_margin: 15,\n    tooltip_arrow_length : 20,\n    tooltip_arrow_width : 40,\n    tooltip_top_color: \"#f0f0f0\",\n    tooltip_bottom_color: \"#d0d0d0\",\n    tooltip_border_color: \"#808080\",\n    tooltip_border_width: 1,\n\n    richtext_editor_config: {\n        toolbarGroups: [\n            { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] },\n            { name: 'clipboard',   groups: [ 'clipboard', 'undo' ] },\n            '/',\n\t        { name: 'styles'},\n        ],\n        removePlugins : 'colorbutton,find,flash,font,forms,iframe,image,newpage,smiley,specialchar,stylescombo,templates',\n    },\n\n    /* NODE EDITOR OPTIONS */\n\n    show_node_editor_uri: true,\n    show_node_editor_description: true,\n    show_node_editor_description_richtext: true,\n    show_node_editor_size: true,\n    show_node_editor_style: true,\n    show_node_editor_style_color: true,\n    show_node_editor_style_dash: true,\n    show_node_editor_style_thickness: true,\n    show_node_editor_image: true,\n    show_node_editor_creator: true,\n    allow_image_upload: true,\n    uploaded_image_max_kb: 500,\n\n\n    /* NODE TOOLTIP OPTIONS */\n\n    show_node_tooltip_uri: true,\n    show_node_tooltip_description: true,\n    show_node_tooltip_color: true,\n    show_node_tooltip_image: true,\n    show_node_tooltip_creator: true,\n\n    /* EDGE EDITOR OPTIONS */\n\n    show_edge_editor_uri: true,\n    show_edge_editor_style: true,\n    show_edge_editor_style_color: true,\n    show_edge_editor_style_dash: true,\n    show_edge_editor_style_thickness: true,\n    show_edge_editor_style_arrow: true,\n    show_edge_editor_direction: true,\n    show_edge_editor_nodes: true,\n    show_edge_editor_creator: true,\n\n    /* EDGE TOOLTIP OPTIONS */\n\n    show_edge_tooltip_uri: true,\n    show_edge_tooltip_color: true,\n    show_edge_tooltip_nodes: true,\n    show_edge_tooltip_creator: true,\n\n};\n","Rkns.i18n = {\n    fr: {\n        \"Edit Node\": \"Édition d’un nœud\",\n        \"Edit Edge\": \"Édition d’un lien\",\n        \"Title:\": \"Titre :\",\n        \"URI:\": \"URI :\",\n        \"Description:\": \"Description :\",\n        \"From:\": \"De :\",\n        \"To:\": \"Vers :\",\n        \"Image\": \"Image\",\n        \"Image URL:\": \"URL d'Image\",\n        \"Choose Image File:\": \"Choisir un fichier image\",\n        \"Full Screen\": \"Mode plein écran\",\n        \"Add Node\": \"Ajouter un nœud\",\n        \"Add Edge\": \"Ajouter un lien\",\n        \"Save Project\": \"Enregistrer le projet\",\n        \"Open Project\": \"Ouvrir un projet\",\n        \"Auto-save enabled\": \"Enregistrement automatique activé\",\n        \"Connection lost\": \"Connexion perdue\",\n        \"Created by:\": \"Créé par :\",\n        \"Zoom In\": \"Agrandir l’échelle\",\n        \"Zoom Out\": \"Rapetisser l’échelle\",\n        \"Edit\": \"Éditer\",\n        \"Remove\": \"Supprimer\",\n        \"Cancel deletion\": \"Annuler la suppression\",\n        \"Link to another node\": \"Créer un lien\",\n        \"Enlarge\": \"Agrandir\",\n        \"Shrink\": \"Rétrécir\",\n        \"Click on the background canvas to add a node\": \"Cliquer sur le fond du graphe pour rajouter un nœud\",\n        \"Click on a first node to start the edge\": \"Cliquer sur un premier nœud pour commencer le lien\",\n        \"Click on a second node to complete the edge\": \"Cliquer sur un second nœud pour terminer le lien\",\n        \"Wikipedia\": \"Wikipédia\",\n        \"Wikipedia in \": \"Wikipédia en \",\n        \"French\": \"Français\",\n        \"English\": \"Anglais\",\n        \"Japanese\": \"Japonais\",\n        \"Untitled project\": \"Projet sans titre\",\n        \"Lignes de Temps\": \"Lignes de Temps\",\n        \"Loading, please wait\": \"Chargement en cours, merci de patienter\",\n        \"Edge color:\": \"Couleur :\",\n        \"Dash:\": \"Point. :\",\n        \"Thickness:\": \"Epaisseur :\",\n        \"Arrow:\": \"Flèche :\",\n        \"Node color:\": \"Couleur :\",\n        \"Choose color\": \"Choisir une couleur\",\n        \"Change edge direction\": \"Changer le sens du lien\",\n        \"Do you really wish to remove node \": \"Voulez-vous réellement supprimer le nœud \",\n        \"Do you really wish to remove edge \": \"Voulez-vous réellement supprimer le lien \",\n        \"This file is not an image\": \"Ce fichier n'est pas une image\",\n        \"Image size must be under \": \"L'image doit peser moins de \",\n        \"Size:\": \"Taille :\",\n        \"KB\": \"ko\",\n        \"Choose from vocabulary:\": \"Choisir dans un vocabulaire :\",\n        \"SKOS Documentation properties\": \"SKOS: Propriétés documentaires\",\n        \"has note\": \"a pour note\",\n        \"has example\": \"a pour exemple\",\n        \"has definition\": \"a pour définition\",\n        \"SKOS Semantic relations\": \"SKOS: Relations sémantiques\",\n        \"has broader\": \"a pour concept plus large\",\n        \"has narrower\": \"a pour concept plus étroit\",\n        \"has related\": \"a pour concept apparenté\",\n        \"Dublin Core Metadata\": \"Métadonnées Dublin Core\",\n        \"has contributor\": \"a pour contributeur\",\n        \"covers\": \"couvre\",\n        \"created by\": \"créé par\",\n        \"has date\": \"a pour date\",\n        \"published by\": \"édité par\",\n        \"has source\": \"a pour source\",\n        \"has subject\": \"a pour sujet\",\n        \"Dragged resource\": \"Ressource glisée-déposée\",\n        \"Search the Web\": \"Rechercher en ligne\",\n        \"Search in Bins\": \"Rechercher dans les chutiers\",\n        \"Close bin\": \"Fermer le chutier\",\n        \"Refresh bin\": \"Rafraîchir le chutier\",\n        \"(untitled)\": \"(sans titre)\",\n        \"Select contents:\": \"Sélectionner des contenus :\",\n        \"Drag items from this website, drop them in Renkan\": \"Glissez des éléments de ce site web vers Renkan\",\n        \"Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.\": \"Glissez ce bouton vers votre barre de favoris. Ensuite, depuis un site tiers, cliquez dessus pour activer 'Drag-to-Add' puis glissez des éléments de ce site vers Renkan\",\n        \"Shapes available\": \"Formes disponibles\",\n        \"Circle\": \"Cercle\",\n        \"Square\": \"Carré\",\n        \"Diamond\": \"Losange\",\n        \"Hexagone\": \"Hexagone\",\n        \"Ellipse\": \"Ellipse\",\n        \"Star\": \"Étoile\",\n        \"Cloud\": \"Nuage\",\n        \"Triangle\": \"Triangle\",\n        \"Zoom Fit\": \"Ajuster le Zoom\",\n        \"Download Project\": \"Télécharger le projet\",\n        \"Save view\": \"Sauver la vue\",\n        \"View saved view\": \"Restaurer la Vue\",\n        \"Renkan \\'Drag-to-Add\\' bookmarklet\": \"Renkan \\'Deplacer-Pour-Ajouter\\' Signet\",\n        \"(unknown user)\":\"(non authentifié)\",\n        \"<unknown user>\":\"<non authentifié>\",\n        \"Search in graph\":\"Rechercher dans carte\",\n        \"Search in \" : \"Chercher dans \"\n    }\n};\n","/* Saves the Full JSON at each modification */\n\nRkns.jsonIO = function(_renkan, _opts) {\n    var _proj = _renkan.project;\n    if (typeof _opts.http_method === \"undefined\") {\n        _opts.http_method = 'PUT';\n    }\n    var _load = function() {\n        _renkan.renderer.redrawActive = false;\n        _proj.set({\n            loadingStatus : true\n        });\n        Rkns.$.getJSON(_opts.url, function(_data) {\n            _renkan.dataloader.load(_data);\n            _proj.set({\n                loadingStatus : false\n            });\n            _proj.set({\n                saveStatus : 0\n            });\n            _renkan.renderer.redrawActive = true;\n            _renkan.renderer.fixSize();\n        });\n    };\n    var _save = function() {\n        _proj.set({\n            saveStatus : 2\n        });\n        var _data = _proj.toJSON();\n        if (!_renkan.read_only) {\n            Rkns.$.ajax({\n                type : _opts.http_method,\n                url : _opts.url,\n                contentType : \"application/json\",\n                data : JSON.stringify(_data),\n                success : function(data, textStatus, jqXHR) {\n                    _proj.set({\n                        saveStatus : 0\n                    });\n                }\n            });\n        }\n\n    };\n    var _thrSave = Rkns._.throttle(function() {\n        setTimeout(_save, 100);\n    }, 1000);\n    _proj.on(\"add:nodes add:edges add:users add:views\", function(_model) {\n        _model.on(\"change remove\", function(_model) {\n            _thrSave();\n        });\n        _thrSave();\n    });\n    _proj.on(\"change\", function() {\n        if (!(_proj.changedAttributes.length === 1 && _proj\n                .hasChanged('saveStatus'))) {\n            _thrSave();\n        }\n    });\n\n    _load();\n};\n","/* Saves the Full JSON once */\n\nRkns.jsonIOSaveOnClick = function(_renkan, _opts) {\n    var _proj = _renkan.project,\n        _saveWarn = false,\n        _onLeave = function() {\n            return \"Project not saved\";\n        };\n    if (typeof _opts.http_method === \"undefined\") {\n        _opts.http_method = 'POST';\n    }\n    var _load = function() {\n        var getdata = {},\n            rx = /id=([^&#?=]+)/,\n            matches = document.location.hash.match(rx);\n        if (matches) {\n            getdata.id = matches[1];\n        }\n        Rkns.$.ajax({\n            url: _opts.url,\n            data: getdata,\n            beforeSend: function(){\n            \t_proj.set({loadingStatus:true});\n            },\n            success: function(_data) {\n                _renkan.dataloader.load(_data);\n                _proj.set({loadingStatus:false});\n                _proj.set({saveStatus:0});\n                _renkan.renderer.autoScale();\n            }\n        });\n    };\n    var _save = function() {\n        _proj.set(\"saved_at\", new Date());\n        var _data = _proj.toJSON();\n        Rkns.$.ajax({\n            type: _opts.http_method,\n            url: _opts.url,\n            contentType: \"application/json\",\n            data: JSON.stringify(_data),\n            beforeSend: function(){\n            \t_proj.set({saveStatus:2});\n            },\n            success: function(data, textStatus, jqXHR) {\n                $(window).off(\"beforeunload\", _onLeave);\n                _saveWarn = false;\n                _proj.set({saveStatus:0});\n                //document.location.hash = \"#id=\" + data.id;\n                //$(\".Rk-Notifications\").text(\"Saved as \"+document.location.href).fadeIn().delay(2000).fadeOut();\n            }\n        });\n    };\n    var _checkLeave = function() {\n    \t_proj.set({saveStatus:1});\n\n        var title = _proj.get(\"title\");\n        if (title && _proj.get(\"nodes\").length) {\n            $(\".Rk-Save-Button\").removeClass(\"disabled\");\n        } else {\n            $(\".Rk-Save-Button\").addClass(\"disabled\");\n        }\n        if (title) {\n            $(\".Rk-PadTitle\").css(\"border-color\",\"#333333\");\n        }\n        if (!_saveWarn) {\n            _saveWarn = true;\n            $(window).on(\"beforeunload\", _onLeave);\n        }\n    };\n    _load();\n    _proj.on(\"add:nodes add:edges add:users change\", function(_model) {\n\t    _model.on(\"change remove\", function(_model) {\n\t    \tif(!(_model.changedAttributes.length === 1 && _model.hasChanged('saveStatus'))) {\n\t    \t\t_checkLeave();\n\t    \t}\n\t    });\n\t\tif(!(_proj.changedAttributes.length === 1 && _proj.hasChanged('saveStatus'))) {\n\t\t    _checkLeave();\n    \t}\n    });\n    _renkan.renderer.save = function() {\n        if ($(\".Rk-Save-Button\").hasClass(\"disabled\")) {\n            if (!_proj.get(\"title\")) {\n                $(\".Rk-PadTitle\").css(\"border-color\",\"#ff0000\");\n            }\n        } else {\n            _save();\n        }\n    };\n};\n","(function(Rkns) {\n\"use strict\";\n\nvar _ = Rkns._;\n\nvar Ldt = Rkns.Ldt = {};\n\nvar Bin = Ldt.Bin = function(_renkan, _opts) {\n    if (_opts.ldt_type) {\n        var Resclass = Ldt[_opts.ldt_type+\"Bin\"];\n        if (Resclass) {\n            return new Resclass(_renkan, _opts);\n        }\n    }\n    console.error(\"No such LDT Bin Type\");\n};\n\nvar ProjectBin = Ldt.ProjectBin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nProjectBin.prototype.tagTemplate = renkanJST['templates/ldtjson-bin/tagtemplate.html'];\n\nProjectBin.prototype.annotationTemplate = renkanJST['templates/ldtjson-bin/annotationtemplate.html'];\n\nProjectBin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.proj_id = _opts.project_id;\n    this.ldt_platform = _opts.ldt_platform || \"http://ldt.iri.centrepompidou.fr/\";\n    this.title_$.html(_opts.title);\n    this.title_icon_$.addClass('Rk-Ldt-Title-Icon');\n    this.refresh();\n};\n\nProjectBin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    function highlight(_text) {\n        var _e = _(_text).escape();\n        return search.isempty ? _e : search.replace(_e, \"<span class='searchmatch'>$1</span>\");\n    }\n    function convertTC(_ms) {\n        function pad(_n) {\n            var _res = _n.toString();\n            while (_res.length < 2) {\n                _res = '0' + _res;\n            }\n            return _res;\n        }\n        var _totalSeconds = Math.abs(Math.floor(_ms/1000)),\n            _hours = Math.floor(_totalSeconds / 3600),\n            _minutes = (Math.floor(_totalSeconds / 60) % 60),\n            _seconds = _totalSeconds % 60,\n            _res = '';\n        if (_hours) {\n            _res += pad(_hours) + ':';\n        }\n        _res += pad(_minutes) + ':' + pad(_seconds);\n        return _res;\n    }\n\n    var _html = '<li><h3>Tags</h3></li>',\n        _projtitle = this.data.meta[\"dc:title\"],\n        _this = this,\n        count = 0;\n    _this.title_$.text('LDT Project: \"' + _projtitle + '\"');\n    _.map(_this.data.tags,function(_tag) {\n        var _title = _tag.meta[\"dc:title\"];\n        if (!search.isempty && !search.test(_title)) {\n            return;\n        }\n        count++;\n        _html += _this.tagTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            encodedtitle : encodeURIComponent(_title),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _html += '<li><h3>Annotations</h3></li>';\n    _.map(_this.data.annotations,function(_annotation) {\n        var _description = _annotation.content.description,\n            _title = _annotation.content.title.replace(_description,\"\");\n        if (!search.isempty && !search.test(_title) && !search.test(_description)) {\n            return;\n        }\n        count++;\n        var _duration = _annotation.end - _annotation.begin,\n            _img = (\n                (_annotation.content && _annotation.content.img && _annotation.content.img.src) ?\n                  _annotation.content.img.src :\n                  ( _duration ? _this.renkan.options.static_url+\"img/ldt-segment.png\" : _this.renkan.options.static_url+\"img/ldt-point.png\" )\n            );\n        _html += _this.annotationTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            description: _description,\n            hdescription: highlight(_description),\n            start: convertTC(_annotation.begin),\n            end: convertTC(_annotation.end),\n            duration: convertTC(_duration),\n            mediaid: _annotation.media,\n            annotationid: _annotation.id,\n            image: _img,\n            static_url: _this.renkan.options.static_url\n        });\n    });\n\n    this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nProjectBin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: this.ldt_platform + 'ldtplatform/ldt/cljson/id/' + this.proj_id,\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n\nvar Search = Ldt.Search = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.lang = _opts.lang || \"en\";\n};\n\nSearch.prototype.getBgClass = function() {\n    return \"Rk-Ldt-Icon\";\n};\n\nSearch.prototype.getSearchTitle = function() {\n    return this.renkan.translate(\"Lignes de Temps\");\n};\n\nSearch.prototype.search = function(_q) {\n    this.renkan.tabs.push(\n        new ResultsBin(this.renkan, {\n            search: _q\n        })\n    );\n};\n\nvar ResultsBin = Ldt.ResultsBin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nResultsBin.prototype.segmentTemplate = renkanJST['templates/ldtjson-bin/segmenttemplate.html'];\n\nResultsBin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.ldt_platform = _opts.ldt_platform || \"http://ldt.iri.centrepompidou.fr/\";\n    this.max_results = _opts.max_results || 50;\n    this.search = _opts.search;\n    this.title_$.html('Lignes de Temps: \"' + _opts.search + '\"');\n    this.title_icon_$.addClass('Rk-Ldt-Title-Icon');\n    this.refresh();\n};\n\nResultsBin.prototype.render = function(searchbase) {\n    if (!this.data) {\n        return;\n    }\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    var highlightrx = (search.isempty ? Rkns.Utils.regexpFromTextOrArray(this.search) : search);\n    function highlight(_text) {\n        return highlightrx.replace(_(_text).escape(), \"<span class='searchmatch'>$1</span>\");\n    }\n    function convertTC(_ms) {\n        function pad(_n) {\n            var _res = _n.toString();\n            while (_res.length < 2) {\n                _res = '0' + _res;\n            }\n            return _res;\n        }\n        var _totalSeconds = Math.abs(Math.floor(_ms/1000)),\n            _hours = Math.floor(_totalSeconds / 3600),\n            _minutes = (Math.floor(_totalSeconds / 60) % 60),\n            _seconds = _totalSeconds % 60,\n            _res = '';\n        if (_hours) {\n            _res += pad(_hours) + ':';\n        }\n        _res += pad(_minutes) + ':' + pad(_seconds);\n        return _res;\n    }\n\n    var _html = '',\n        _this = this,\n        count = 0;\n    _.each(this.data.objects,function(_segment) {\n        var _description = _segment.abstract,\n            _title = _segment.title;\n        if (!search.isempty && !search.test(_title) && !search.test(_description)) {\n            return;\n        }\n        count++;\n        var _duration = _segment.duration,\n            _begin = _segment.start_ts,\n            _end = + _segment.duration + _begin,\n            _img = (\n                _duration ?\n                  _this.renkan.options.static_url + \"img/ldt-segment.png\" :\n                  _this.renkan.options.static_url + \"img/ldt-point.png\"\n            );\n        _html += _this.segmentTemplate({\n            ldt_platform: _this.ldt_platform,\n            title: _title,\n            htitle: highlight(_title),\n            description: _description,\n            hdescription: highlight(_description),\n            start: convertTC(_begin),\n            end: convertTC(_end),\n            duration: convertTC(_duration),\n            mediaid: _segment.iri_id,\n            //projectid: _segment.project_id,\n            //cuttingid: _segment.cutting_id,\n            annotationid: _segment.element_id,\n            image: _img\n        });\n    });\n\n    this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nResultsBin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: this.ldt_platform + 'ldtplatform/api/ldt/1.0/segments/search/',\n        data: {\n            format: \"jsonp\",\n            q: this.search,\n            limit: this.max_results\n        },\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n\n})(window.Rkns);\n","Rkns.ResourceList = {};\n\nRkns.ResourceList.Bin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nRkns.ResourceList.Bin.prototype.resultTemplate = renkanJST['templates/list-bin.html'];\n\nRkns.ResourceList.Bin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.title_$.html(_opts.title);\n    if (_opts.list) {\n        this.data = _opts.list;\n    }\n    this.refresh();\n};\n\nRkns.ResourceList.Bin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    function highlight(_text) {\n        var _e = _(_text).escape();\n        return search.isempty ? _e : search.replace(_e, \"<span class='searchmatch'>$1</span>\");\n    }\n    var _html = \"\",\n        _this = this,\n        count = 0;\n    Rkns._.each(this.data,function(_item) {\n        var _element;\n        if (typeof _item === \"string\") {\n            if (/^(https?:\\/\\/|www)/.test(_item)) {\n                _element = { url: _item };\n            } else {\n                _element = { title: _item.replace(/[:,]?\\s?(https?:\\/\\/|www)[\\d\\w\\/.&?=#%-_]+\\s?/,'').trim() };\n                var _match = _item.match(/(https?:\\/\\/|www)[\\d\\w\\/.&?=#%-_]+/);\n                if (_match) {\n                    _element.url = _match[0];\n                }\n                if (_element.title.length > 80) {\n                    _element.description = _element.title;\n                    _element.title = _element.title.replace(/^(.{30,60})\\s.+$/,'$1…');\n                }\n            }\n        } else {\n            _element = _item;\n        }\n        var title = _element.title || (_element.url || \"\").replace(/^https?:\\/\\/(www\\.)?/,'').replace(/^(.{40}).+$/,'$1…'),\n            url = _element.url || \"\",\n            description = _element.description || \"\",\n            image = _element.image || \"\";\n        if (url && !/^https?:\\/\\//.test(url)) {\n            url = 'http://' + url;\n        }\n        if (!search.isempty && !search.test(title) && !search.test(description)) {\n            return;\n        }\n        count++;\n        _html += _this.resultTemplate({\n            url: url,\n            title: title,\n            htitle: highlight(title),\n            image: image,\n            description: description,\n            hdescription: highlight(description),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nRkns.ResourceList.Bin.prototype.refresh = function() {\n    if (this.data) {\n        this.render();\n    }\n};\n","Rkns.Wikipedia = {\n};\n\nRkns.Wikipedia.Search = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.lang = _opts.lang || \"en\";\n};\n\nRkns.Wikipedia.Search.prototype.getBgClass = function() {\n    return \"Rk-Wikipedia-Search-Icon Rk-Wikipedia-Lang-\" + this.lang;\n};\n\nRkns.Wikipedia.Search.prototype.getSearchTitle = function() {\n    var langs = {\n        \"fr\": \"French\",\n        \"en\": \"English\",\n        \"ja\": \"Japanese\"\n    };\n    if (langs[this.lang]) {\n        return this.renkan.translate(\"Wikipedia in \") + this.renkan.translate(langs[this.lang]);\n    } else {\n        return this.renkan.translate(\"Wikipedia\") + \" [\" + this.lang + \"]\";\n    }\n};\n\nRkns.Wikipedia.Search.prototype.search = function(_q) {\n    this.renkan.tabs.push(\n        new Rkns.Wikipedia.Bin(this.renkan, {\n            lang: this.lang,\n            search: _q\n        })\n    );\n};\n\nRkns.Wikipedia.Bin = Rkns.Utils.inherit(Rkns._BaseBin);\n\nRkns.Wikipedia.Bin.prototype.resultTemplate = renkanJST['templates/wikipedia-bin/resulttemplate.html'];\n\nRkns.Wikipedia.Bin.prototype._init = function(_renkan, _opts) {\n    this.renkan = _renkan;\n    this.search = _opts.search;\n    this.lang = _opts.lang || \"en\";\n    this.title_icon_$.addClass('Rk-Wikipedia-Title-Icon Rk-Wikipedia-Lang-' + this.lang);\n    this.title_$.html(this.search).addClass(\"Rk-Wikipedia-Title\");\n    this.refresh();\n};\n\nRkns.Wikipedia.Bin.prototype.render = function(searchbase) {\n    var search = searchbase || Rkns.Utils.regexpFromTextOrArray();\n    var highlightrx = (search.isempty ? Rkns.Utils.regexpFromTextOrArray(this.search) : search);\n    function highlight(_text) {\n        return highlightrx.replace(_(_text).escape(), \"<span class='searchmatch'>$1</span>\");\n    }\n    var _html = \"\",\n        _this = this,\n        count = 0;\n    Rkns._.each(this.data.query.search, function(_result) {\n        var title = _result.title,\n            url = \"http://\" + _this.lang + \".wikipedia.org/wiki/\" + encodeURI(title.replace(/ /g,\"_\")),\n            description = Rkns.$('<div>').html(_result.snippet).text();\n        if (!search.isempty && !search.test(title) && !search.test(description)) {\n            return;\n        }\n        count++;\n        _html += _this.resultTemplate({\n            url: url,\n            title: title,\n            htitle: highlight(title),\n            description: description,\n            hdescription: highlight(description),\n            static_url: _this.renkan.options.static_url\n        });\n    });\n    _this.main_$.html(_html);\n    if (!search.isempty && count) {\n        this.count_$.text(count).show();\n    } else {\n        this.count_$.hide();\n    }\n    if (!search.isempty && !count) {\n        this.$.hide();\n    } else {\n        this.$.show();\n    }\n    this.renkan.resizeBins();\n};\n\nRkns.Wikipedia.Bin.prototype.refresh = function() {\n    var _this = this;\n    Rkns.$.ajax({\n        url: \"http://\" + _this.lang + \".wikipedia.org/w/api.php?action=query&list=search&srsearch=\" + encodeURIComponent(this.search) + \"&format=json\",\n        dataType: \"jsonp\",\n        success: function(_data) {\n            _this.data = _data;\n            _this.render();\n        }\n    });\n};\n","\ndefine('renderer/baserepresentation',['jquery', 'underscore'], function ($, _) {\n    \n\n    /* Rkns.Renderer._BaseRepresentation Class */\n\n    /* In Renkan, a \"Representation\" is a sort of ViewModel (in the MVVM paradigm) and bridges the gap between\n     * models (written with Backbone.js) and the view (written with Paper.js)\n     * Renkan's representations all inherit from Rkns.Renderer._BaseRepresentation '*/\n\n    var _BaseRepresentation = function(_renderer, _model) {\n        if (typeof _renderer !== \"undefined\") {\n            this.renderer = _renderer;\n            this.renkan = _renderer.renkan;\n            this.project = _renderer.renkan.project;\n            this.options = _renderer.renkan.options;\n            this.model = _model;\n            if (this.model) {\n                var _this = this;\n                this._changeBinding = function() {\n                    _this.redraw({change: true});\n                };\n                this._removeBinding = function() {\n                    _renderer.removeRepresentation(_this);\n                    _.defer(function() {\n                        _renderer.redraw();\n                    });\n                };\n                this._selectBinding = function() {\n                    _this.select();\n                };\n                this._unselectBinding = function() {\n                    _this.unselect();\n                };\n                this.model.on(\"change\", this._changeBinding );\n                this.model.on(\"remove\", this._removeBinding );\n                this.model.on(\"select\", this._selectBinding );\n                this.model.on(\"unselect\", this._unselectBinding );\n            }\n        }\n    };\n\n    /* Rkns.Renderer._BaseRepresentation Methods */\n\n    _(_BaseRepresentation.prototype).extend({\n        _super: function(_func) {\n            return _BaseRepresentation.prototype[_func].apply(this, Array.prototype.slice.call(arguments, 1));\n        },\n        redraw: function() {},\n        moveTo: function() {},\n        show: function() { return \"BaseRepresentation.show\"; },\n        hide: function() {},\n        select: function() {\n            if (this.model) {\n                this.model.trigger(\"selected\");\n            }\n        },\n        unselect: function() {\n            if (this.model) {\n                this.model.trigger(\"unselected\");\n            }\n        },\n        highlight: function() {},\n        unhighlight: function() {},\n        mousedown: function() {},\n        mouseup: function() {\n            if (this.model) {\n                this.model.trigger(\"clicked\");\n            }\n        },\n        destroy: function() {\n            if (this.model) {\n                this.model.off(\"change\", this._changeBinding );\n                this.model.off(\"remove\", this._removeBinding );\n                this.model.off(\"select\", this._selectBinding );\n                this.model.off(\"unselect\", this._unselectBinding );\n            }\n        }\n    }).value();\n\n    /* End of Rkns.Renderer._BaseRepresentation Class */\n\n    return _BaseRepresentation;\n\n});\n\ndefine('requtils',[], function ($, _) {\n    \n    return {\n        getUtils: function(){\n            return window.Rkns.Utils;\n        },\n        getRenderer: function(){\n            return window.Rkns.Renderer;\n        }\n    };\n\n});\n\n\ndefine('renderer/basebutton',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Rkns.Renderer._BaseButton Class */\n\n    /* BaseButton is extended by contextual buttons that appear when hovering on nodes and edges */\n\n    var _BaseButton = Utils.inherit(BaseRepresentation);\n\n    _(_BaseButton.prototype).extend({\n        moveTo: function(_pos) {\n            this.sector.moveTo(_pos);\n        },\n        show: function() {\n            this.sector.show();\n        },\n        hide: function() {\n            this.sector.hide();\n        },\n        select: function() {\n            this.sector.select();\n        },\n        unselect: function(_newTarget) {\n            this.sector.unselect();\n            if (!_newTarget || (_newTarget !== this.source_representation && _newTarget.source_representation !== this.source_representation)) {\n                this.source_representation.unselect();\n            }\n        },\n        destroy: function() {\n            this.sector.destroy();\n        }\n    }).value();\n\n    return _BaseButton;\n\n});\n\n\ndefine('renderer/shapebuilder',[], function () {\n    \n\n    var cloud_path = \"M0,0c-0.1218516546,-0.0336420601 -0.2451649928,0.0048580836 -0.3302944641,0.0884969975c-0.0444763883,-0.0550844815 -0.1047003238,-0.0975985034 -0.1769360893,-0.1175406746c-0.1859066673,-0.0513257002 -0.3774236254,0.0626045858 -0.4272374613,0.2541588105c-0.0036603877,0.0140753132 -0.0046241235,0.028229722 -0.0065872453,0.042307536c-0.1674179627,-0.0179317735 -0.3276106855,0.0900599386 -0.3725537463,0.2628868425c-0.0445325077,0.1712456429 0.0395025693,0.3463497959 0.1905420475,0.4183458793c-0.0082101538,0.0183442886 -0.0158652506,0.0372432828 -0.0211098452,0.0574080693c-0.0498130336,0.1915540431 0.0608692569,0.3884647499 0.2467762814,0.4397904033c0.0910577256,0.0251434257 0.1830791813,0.0103792696 0.2594677475,-0.0334472349c0.042100113,0.0928009202 0.1205930075,0.1674914182 0.2240666796,0.1960572479c0.1476344161,0.0407610407 0.297446165,-0.0238077445 0.3783262342,-0.1475652419c0.0327623278,0.0238981846 0.0691792333,0.0436665447 0.1102008706,0.0549940004c0.1859065794,0.0513256592 0.3770116432,-0.0627203154 0.4268255671,-0.2542745401c0.0250490557,-0.0963230532 0.0095494076,-0.1938010889 -0.0356681889,-0.2736906101c0.0447507424,-0.0439678867 0.0797796014,-0.0996624318 0.0969425462,-0.1656617192c0.0498137481,-0.1915564561 -0.0608688118,-0.3884669813 -0.2467755669,-0.4397928163c-0.0195699622,-0.0054005426 -0.0391731675,-0.0084429542 -0.0586916488,-0.0102888295c0.0115683912,-0.1682147574 -0.0933564223,-0.3269222408 -0.2572937178,-0.3721841203z\";\n    /* ShapeBuilder Begin */\n\n    var builders = {\n        \"circle\":{\n            getShape: function() {\n                return new paper.Path.Circle([0, 0], 1);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Circle(center, radius);\n            }\n        },\n        \"rectangle\":{\n            getShape: function() {\n                return new paper.Path.Rectangle([-2, -2], [2, 2]);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Rectangle([-radius, -radius], [radius*2, radius*2]);\n            }\n        },\n        \"ellipse\":{\n            getShape: function() {\n                return new paper.Path.Ellipse(new paper.Rectangle([-2, -1], [2, 1]));\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Ellipse(new paper.Rectangle([-radius, -radius/2], [radius*2, radius]));\n            }\n        },\n        \"polygon\":{\n            getShape: function() {\n                return new paper.Path.RegularPolygon([0, 0], 6, 1);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.RegularPolygon(center, 6, radius);\n            }\n        },\n        \"diamond\":{\n            getShape: function() {\n                var d = new paper.Path.Rectangle([-Math.SQRT2, -Math.SQRT2], [Math.SQRT2, Math.SQRT2]);\n                d.rotate(45);\n                return d;\n            },\n            getImageShape: function(center, radius) {\n                var d = new paper.Path.Rectangle([-radius*Math.SQRT2/2, -radius*Math.SQRT2/2], [radius*Math.SQRT2, radius*Math.SQRT2]);\n                d.rotate(45);\n                return d;\n            }\n        },\n        \"star\":{\n            getShape: function() {\n                return new paper.Path.Star([0, 0], 8, 1, 0.7);\n            },\n            getImageShape: function(center, radius) {\n                return new paper.Path.Star(center, 8, radius*1, radius*0.7);\n            }\n        },\n        \"cloud\": {\n            getShape: function() {\n                var path = new paper.Path(cloud_path);\n                return path;\n\n            },\n            getImageShape: function(center, radius) {\n                var path = new paper.Path(cloud_path);\n                path.scale(radius);\n                path.translate(center);\n                return path;\n            }\n        },\n        \"triangle\": {\n            getShape: function() {\n                return new paper.Path.RegularPolygon([0,0], 3, 1);\n            },\n            getImageShape: function(center, radius) {\n                var shape = new paper.Path.RegularPolygon([0,0], 3, 1);\n                shape.scale(radius);\n                shape.translate(center);\n                return shape;\n            }\n        },\n        \"svg\": function(path){\n            return {\n                getShape: function() {\n                    return new paper.Path(path);\n                },\n                getImageShape: function(center, radius) {\n                    // No calcul for the moment\n                    return new paper.Path();\n                }\n            };\n        }\n    };\n\n    var ShapeBuilder = function (shape){\n        if(shape === null || typeof shape === \"undefined\"){\n            shape = \"circle\";\n        }\n        if(shape.substr(0,4)===\"svg:\"){\n            return builders.svg(shape.substr(4));\n        }\n        if(!(shape in builders)){\n            shape = \"circle\";\n        }\n        return builders[shape];\n    };\n\n    ShapeBuilder.builders = builders;\n\n    return ShapeBuilder;\n\n});\n\ndefine('renderer/noderepr',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation', 'renderer/shapebuilder'], function ($, _, requtils, BaseRepresentation, ShapeBuilder) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Rkns.Renderer.Node Class */\n\n    /* The representation for the node : A circle, with an image inside and a text label underneath.\n     * The circle and the image are drawn on canvas and managed by Paper.js.\n     * The text label is an HTML node, managed by jQuery. */\n\n    //var NodeRepr = Renderer.Node = Utils.inherit(Renderer._BaseRepresentation);\n    var NodeRepr = Utils.inherit(BaseRepresentation);\n\n    _(NodeRepr.prototype).extend({\n        _init: function() {\n            this.renderer.node_layer.activate();\n            this.type = \"Node\";\n            this.buildShape();\n            this.hidden = false;\n            this.ghost= false;\n            if (this.options.show_node_circles) {\n                this.circle.strokeWidth = this.options.node_stroke_width;\n                this.h_ratio = 1;\n            } else {\n                this.h_ratio = 0;\n            }\n            this.title = $('<div class=\"Rk-Label\">').appendTo(this.renderer.labels_$);\n\n            if (this.options.editor_mode) {\n                var Renderer = requtils.getRenderer();\n                this.normal_buttons = [\n                                       new Renderer.NodeEditButton(this.renderer, null),\n                                       new Renderer.NodeRemoveButton(this.renderer, null),\n                                       new Renderer.NodeLinkButton(this.renderer, null),\n                                       new Renderer.NodeEnlargeButton(this.renderer, null),\n                                       new Renderer.NodeShrinkButton(this.renderer, null)\n                                       ];\n                if (this.options.hide_nodes){\n                    this.normal_buttons.push(\n                            new Renderer.NodeHideButton(this.renderer, null),\n                            new Renderer.NodeShowButton(this.renderer, null)\n                            );\n                }\n                this.pending_delete_buttons = [\n                                               new Renderer.NodeRevertButton(this.renderer, null)\n                                               ];\n                this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons);\n\n                for (var i = 0; i < this.all_buttons.length; i++) {\n                    this.all_buttons[i].source_representation = this;\n                }\n                this.active_buttons = [];\n            } else {\n                this.active_buttons = this.all_buttons = [];\n            }\n            this.last_circle_radius = 1;\n\n            if (this.renderer.minimap) {\n                this.renderer.minimap.node_layer.activate();\n                this.minimap_circle = new paper.Path.Circle([0, 0], 1);\n                this.minimap_circle.__representation = this.renderer.minimap.miniframe.__representation;\n                this.renderer.minimap.node_group.addChild(this.minimap_circle);\n            }\n        },\n        _getStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.node_stroke_width + (thickness-1) * (this.options.node_stroke_max_width - this.options.node_stroke_width) / (this.options.node_stroke_witdh_scale-1);\n        },\n        _getSelectedStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.selected_node_stroke_width + (thickness-1) * (this.options.selected_node_stroke_max_width - this.options.selected_node_stroke_width) / (this.options.node_stroke_witdh_scale-1);\n        },\n        buildShape: function(){\n            if( 'shape' in this.model.changed ) {\n                delete this.img;\n            }\n            if(this.circle){\n                this.circle.remove();\n                delete this.circle;\n            }\n            // \"circle\" \"rectangle\" \"ellipse\" \"polygon\" \"star\" \"diamond\"\n            this.shapeBuilder = new ShapeBuilder(this.model.get(\"shape\"));\n            this.circle = this.shapeBuilder.getShape();\n            this.circle.__representation = this;\n            this.circle.sendToBack();\n            this.last_circle_radius = 1;\n        },\n        redraw: function(options) {\n            if( 'shape' in this.model.changed && 'change' in options && options.change ) {\n            //if( 'shape' in this.model.changed ) {\n                this.buildShape();\n            }\n            var _model_coords = new paper.Point(this.model.get(\"position\")),\n                _baseRadius = this.options.node_size_base * Math.exp((this.model.get(\"size\") || 0) * Utils._NODE_SIZE_STEP);\n            if (!this.is_dragging || !this.paper_coords) {\n                this.paper_coords = this.renderer.toPaperCoords(_model_coords);\n            }\n            this.circle_radius = _baseRadius * this.renderer.scale;\n            if (this.last_circle_radius !== this.circle_radius) {\n                this.all_buttons.forEach(function(b) {\n                    b.setSectorSize();\n                });\n                this.circle.scale(this.circle_radius / this.last_circle_radius);\n                if (this.node_image) {\n                    this.node_image.scale(this.circle_radius / this.last_circle_radius);\n                }\n            }\n            this.circle.position = this.paper_coords;\n            if (this.node_image) {\n                this.node_image.position = this.paper_coords.subtract(this.image_delta.multiply(this.circle_radius));\n            }\n            this.last_circle_radius = this.circle_radius;\n\n            var old_act_btn = this.active_buttons;\n\n            var opacity = 1;\n            if (this.model.get(\"delete_scheduled\")) {\n                opacity = 0.5;\n                this.active_buttons = this.pending_delete_buttons;\n                this.circle.dashArray = [2,2];\n            } else {\n                opacity = 1;\n                this.active_buttons = this.normal_buttons;\n                this.circle.dashArray = null;\n            }\n            if (this.selected && this.renderer.isEditable() && !this.ghost) {\n                if (old_act_btn !== this.active_buttons) {\n                    old_act_btn.forEach(function(b) {\n                        b.hide();\n                    });\n                }\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n\n            if (this.node_image) {\n                this.node_image.opacity = this.highlighted ? opacity * 0.5 : (opacity - 0.01);\n            }\n\n            this.circle.fillColor = this.highlighted ? this.options.highlighted_node_fill_color : this.options.node_fill_color;\n\n            this.circle.opacity = this.options.show_node_circles ? opacity : 0.01;\n\n            var _text = this.model.get(\"title\") || this.renkan.translate(this.options.label_untitled_nodes) || \"\";\n            _text = Utils.shortenText(_text, this.options.node_label_max_length);\n\n            if (typeof this.highlighted === \"object\") {\n                this.title.html(this.highlighted.replace(_(_text).escape(),'<span class=\"Rk-Highlighted\">$1</span>'));\n            } else {\n                this.title.text(_text);\n            }\n\n            var _strokeWidth = this._getStrokeWidth();\n            this.title.css({\n                left: this.paper_coords.x,\n                top: this.paper_coords.y + this.circle_radius * this.h_ratio + this.options.node_label_distance + 0.5*_strokeWidth,\n                opacity: opacity\n            });\n            var _color = (this.model.has(\"style\") && this.model.get(\"style\").color) || (this.model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                _dash = (this.model.has(\"style\") && this.model.get(\"style\").dash) ? this.options.default_dash_array : null;\n            this.circle.strokeWidth = _strokeWidth;\n            this.circle.strokeColor = _color;\n            this.circle.dashArray = _dash;\n            var _pc = this.paper_coords;\n            this.all_buttons.forEach(function(b) {\n                b.moveTo(_pc);\n            });\n            var lastImage = this.img;\n            this.img = this.model.get(\"image\");\n            if (this.img && this.img !== lastImage) {\n                this.showImage();\n                if(this.circle) {\n                    this.circle.sendToBack();\n                }\n            }\n            if (this.node_image && !this.img) {\n                this.node_image.remove();\n                delete this.node_image;\n            }\n\n            if (this.renderer.minimap) {\n                this.minimap_circle.fillColor = _color;\n                var minipos = this.renderer.toMinimapCoords(_model_coords),\n                miniradius = this.renderer.minimap.scale * _baseRadius,\n                minisize = new paper.Size([miniradius, miniradius]);\n                this.minimap_circle.fitBounds(minipos.subtract(minisize), minisize.multiply(2));\n            }\n\n            if (typeof options === 'undefined' || !('dontRedrawEdges' in options) || !options.dontRedrawEdges) {\n                var _this = this;\n                _.each(\n                        this.project.get(\"edges\").filter(\n                                function (ed) {\n                                    return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                                }\n                        ),\n                        function(edge, index, list) {\n                            var repr = _this.renderer.getRepresentationByModel(edge);\n                            if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                                repr.redraw();\n                            }\n                        }\n                );\n            }\n            if (this.ghost){\n                this.show(true);\n            } else {\n                if (this.hidden) { this.hide(); }\n            }\n        },\n        showImage: function() {\n            var _image = null;\n            if (typeof this.renderer.image_cache[this.img] === \"undefined\") {\n                _image = new Image();\n                this.renderer.image_cache[this.img] = _image;\n                _image.src = this.img;\n            } else {\n                _image = this.renderer.image_cache[this.img];\n            }\n            if (_image.width) {\n                if (this.node_image) {\n                    this.node_image.remove();\n                }\n                this.renderer.node_layer.activate();\n                var width = _image.width,\n                    height = _image.height,\n                    clipPath = this.model.get(\"clip_path\"),\n                    hasClipPath = (typeof clipPath !== \"undefined\" && clipPath),\n                    _clip = null,\n                    baseRadius = null,\n                    centerPoint = null;\n\n                if (hasClipPath) {\n                    _clip = new paper.Path();\n                    var instructions = clipPath.match(/[a-z][^a-z]+/gi) || [],\n                    lastCoords = [0,0],\n                    minX = Infinity,\n                    minY = Infinity,\n                    maxX = -Infinity,\n                    maxY = -Infinity;\n\n                    var transformCoords = function(tabc, relative) {\n                        var newCoords = tabc.slice(1).map(function(v, k) {\n                            var res = parseFloat(v),\n                            isY = k % 2;\n                            if (isY) {\n                                res = ( res - 0.5 ) * height;\n                            } else {\n                                res = ( res - 0.5 ) * width;\n                            }\n                            if (relative) {\n                                res += lastCoords[isY];\n                            }\n                            if (isY) {\n                                minY = Math.min(minY, res);\n                                maxY = Math.max(maxY, res);\n                            } else {\n                                minX = Math.min(minX, res);\n                                maxX = Math.max(maxX, res);\n                            }\n                            return res;\n                        });\n                        lastCoords = newCoords.slice(-2);\n                        return newCoords;\n                    };\n\n                    instructions.forEach(function(instr) {\n                        var coords = instr.match(/([a-z]|[0-9.-]+)/ig) || [\"\"];\n                        switch(coords[0]) {\n                        case \"M\":\n                            _clip.moveTo(transformCoords(coords));\n                            break;\n                        case \"m\":\n                            _clip.moveTo(transformCoords(coords, true));\n                            break;\n                        case \"L\":\n                            _clip.lineTo(transformCoords(coords));\n                            break;\n                        case \"l\":\n                            _clip.lineTo(transformCoords(coords, true));\n                            break;\n                        case \"C\":\n                            _clip.cubicCurveTo(transformCoords(coords));\n                            break;\n                        case \"c\":\n                            _clip.cubicCurveTo(transformCoords(coords, true));\n                            break;\n                        case \"Q\":\n                            _clip.quadraticCurveTo(transformCoords(coords));\n                            break;\n                        case \"q\":\n                            _clip.quadraticCurveTo(transformCoords(coords, true));\n                            break;\n                        }\n                    });\n\n                    baseRadius = Math[this.options.node_images_fill_mode ? \"min\" : \"max\"](maxX - minX, maxY - minY) / 2;\n                    centerPoint = new paper.Point((maxX + minX) / 2, (maxY + minY) / 2);\n                    if (!this.options.show_node_circles) {\n                        this.h_ratio = (maxY - minY) / (2 * baseRadius);\n                    }\n                } else {\n                    baseRadius = Math[this.options.node_images_fill_mode ? \"min\" : \"max\"](width, height) / 2;\n                    centerPoint = new paper.Point(0,0);\n                    if (!this.options.show_node_circles) {\n                        this.h_ratio = height / (2 * baseRadius);\n                    }\n                }\n                var _raster = new paper.Raster(_image);\n                _raster.locked = true; // Disable mouse events on icon\n                if (hasClipPath) {\n                    _raster = new paper.Group(_clip, _raster);\n                    _raster.opacity = 0.99;\n                    /* This is a workaround to allow clipping at group level\n                     * If opacity was set to 1, paper.js would merge all clipping groups in one (known bug).\n                     */\n                    _raster.clipped = true;\n                    _clip.__representation = this;\n                }\n                if (this.options.clip_node_images) {\n                    var _circleClip = this.shapeBuilder.getImageShape(centerPoint, baseRadius);\n                    _raster = new paper.Group(_circleClip, _raster);\n                    _raster.opacity = 0.99;\n                    _raster.clipped = true;\n                    _circleClip.__representation = this;\n                }\n                this.image_delta = centerPoint.divide(baseRadius);\n                this.node_image = _raster;\n                this.node_image.__representation = _this;\n                this.node_image.scale(this.circle_radius / baseRadius);\n                this.node_image.position = this.paper_coords.subtract(this.image_delta.multiply(this.circle_radius));\n                this.node_image.insertAbove(this.circle);\n            } else {\n                var _this = this;\n                $(_image).on(\"load\", function() {\n                    _this.showImage();\n                });\n            }\n        },\n        paperShift: function(_delta) {\n            if (this.options.editor_mode) {\n                if (!this.renkan.read_only) {\n                    this.is_dragging = true;\n                    this.paper_coords = this.paper_coords.add(_delta);\n                    this.redraw();\n                }\n            } else {\n                this.renderer.paperShift(_delta);\n            }\n        },\n        openEditor: function() {\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            var _editor = this.renderer.addRepresentation(\"NodeEditor\",null);\n            _editor.source_representation = this;\n            _editor.draw();\n        },\n        select: function() {\n            this.selected = true;\n            this.circle.strokeWidth = this._getSelectedStrokeWidth();\n            if (this.renderer.isEditable() && !this.hidden) {\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n            var _uri = this.model.get(\"uri\");\n            if (_uri) {\n                $('.Rk-Bin-Item').each(function() {\n                    var _el = $(this);\n                    if (_el.attr(\"data-uri\") === _uri) {\n                        _el.addClass(\"selected\");\n                    }\n                });\n            }\n            if (!this.options.editor_mode) {\n                this.openEditor();\n            }\n\n            if (this.renderer.minimap) {\n                this.minimap_circle.strokeWidth = this.options.minimap_highlight_weight;\n                this.minimap_circle.strokeColor = this.options.minimap_highlight_color;\n            }\n            //if the node is hidden and the mouse hover it, it appears as a ghost\n            if (this.hidden) {\n                this.show(true);\n            }\n            else {\n                this.showNeighbors(true);\n            }\n            this._super(\"select\");\n        },\n        hideButtons: function() {\n            this.all_buttons.forEach(function(b) {\n                b.hide();\n            });\n            delete(this.buttonTimeout);\n        },\n        unselect: function(_newTarget) {\n            if (!_newTarget || _newTarget.source_representation !== this) {\n                this.selected = false;\n                var _this = this;\n                this.buttons_timeout = setTimeout(function() { _this.hideButtons(); }, 200);\n                this.circle.strokeWidth = this._getStrokeWidth();\n                $('.Rk-Bin-Item').removeClass(\"selected\");\n                if (this.renderer.minimap) {\n                    this.minimap_circle.strokeColor = undefined;\n                }\n                //when the mouse don't hover the node anymore, we hide it\n                if (this.hidden) {\n                    this.hide();\n                }\n                else {\n                    this.hideNeighbors();\n                }\n                this._super(\"unselect\");\n            }\n        },\n        hide: function(){\n            var _this = this;\n            this.ghost = false;\n            this.hidden = true;\n            if (typeof this.node_image !== 'undefined'){\n                this.node_image.opacity = 0;\n            }\n            this.hideButtons();\n            this.circle.opacity = 0;\n            this.title.css('opacity', 0);\n            this.minimap_circle.opacity = 0;\n\n\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge);\n                        if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                            repr.hide();\n                        }\n                    }\n            );\n            this.hideNeighbors();\n        },\n        show: function(ghost){\n            var _this = this;\n            this.ghost = ghost;\n            if (this.ghost){\n                if (typeof this.node_image !== 'undefined'){\n                    this.node_image.opacity = this.options.ghost_opacity;\n                }\n                this.circle.opacity = this.options.ghost_opacity;\n                this.title.css('opacity', this.options.ghost_opacity);\n                this.minimap_circle.opacity = this.options.ghost_opacity;\n            } else {\n                this.hidden = false;\n                this.redraw();\n            }\n\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return ((ed.get(\"to\") === _this.model) || (ed.get(\"from\") === _this.model));\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge);\n                        if (repr && typeof repr.from_representation !== \"undefined\" && typeof repr.from_representation.paper_coords !== \"undefined\" && typeof repr.to_representation !== \"undefined\" && typeof repr.to_representation.paper_coords !== \"undefined\") {\n                            repr.show(_this.ghost);\n                        }\n                    }\n            );\n        },\n        hideNeighbors: function(){\n            var _this = this;\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return (ed.get(\"from\") === _this.model);\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge.get(\"to\"));\n                        if (repr && repr.ghost) {\n                            repr.hide();\n                        }\n                    }\n            );\n        },\n        showNeighbors: function(ghost){\n            var _this = this;\n            _.each(\n                    this.project.get(\"edges\").filter(\n                            function (ed) {\n                                return (ed.get(\"from\") === _this.model);\n                            }\n                    ),\n                    function(edge, index, list) {\n                        var repr = _this.renderer.getRepresentationByModel(edge.get(\"to\"));\n                        if (repr && repr.hidden) {\n                            repr.show(ghost);\n                            if (!ghost){\n                                var indexNode = _this.renderer.hiddenNodes.indexOf(repr.model.id);\n                                if (indexNode !== -1){\n                                    _this.renderer.hiddenNodes.splice(indexNode, 1);\n                                }\n                            }\n                        }\n                    }\n            );\n        },\n        highlight: function(textToReplace) {\n            var hlvalue = textToReplace || true;\n            if (this.highlighted === hlvalue) {\n                return;\n            }\n            this.highlighted = hlvalue;\n            this.redraw();\n            this.renderer.throttledPaperDraw();\n        },\n        unhighlight: function() {\n            if (!this.highlighted) {\n                return;\n            }\n            this.highlighted = false;\n            this.redraw();\n            this.renderer.throttledPaperDraw();\n        },\n        saveCoords: function() {\n            var _coords = this.renderer.toModelCoords(this.paper_coords),\n            _data = {\n                position: {\n                    x: _coords.x,\n                    y: _coords.y\n                }\n            };\n            if (this.renderer.isEditable()) {\n                this.model.set(_data);\n            }\n        },\n        mousedown: function(_event, _isTouch) {\n            if (_isTouch) {\n                this.renderer.unselectAll();\n                this.select();\n            }\n        },\n        mouseup: function(_event, _isTouch) {\n            if (this.renderer.is_dragging && this.renderer.isEditable()) {\n                this.saveCoords();\n            } else {\n                if (this.hidden) {\n                    var index = this.renderer.hiddenNodes.indexOf(this.model.id);\n                    if (index !== -1){\n                        this.renderer.hiddenNodes.splice(index, 1);\n                    }\n                    this.show(false);\n                    this.select();\n                } else {\n                    if (!_isTouch && !this.model.get(\"delete_scheduled\")) {\n                        this.openEditor();\n                    }\n                    this.model.trigger(\"clicked\");\n                }\n            }\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.is_dragging = false;\n        },\n        destroy: function(_event) {\n            this._super(\"destroy\");\n            this.all_buttons.forEach(function(b) {\n                b.destroy();\n            });\n            this.circle.remove();\n            this.title.remove();\n            if (this.renderer.minimap) {\n                this.minimap_circle.remove();\n            }\n            if (this.node_image) {\n                this.node_image.remove();\n            }\n        }\n    }).value();\n\n    return NodeRepr;\n\n});\n\n\ndefine('renderer/edge',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Edge Class Begin */\n\n    //var Edge = Renderer.Edge = Utils.inherit(Renderer._BaseRepresentation);\n    var Edge = Utils.inherit(BaseRepresentation);\n\n    _(Edge.prototype).extend({\n        _init: function() {\n            this.renderer.edge_layer.activate();\n            this.type = \"Edge\";\n            this.hidden = false;\n            this.ghost = false;\n            this.from_representation = this.renderer.getRepresentationByModel(this.model.get(\"from\"));\n            this.to_representation = this.renderer.getRepresentationByModel(this.model.get(\"to\"));\n            this.bundle = this.renderer.addToBundles(this);\n            this.line = new paper.Path();\n            this.line.add([0,0],[0,0],[0,0]);\n            this.line.__representation = this;\n            this.line.strokeWidth = this.options.edge_stroke_width;\n            this.arrow_scale = 1;\n            this.arrow = new paper.Path();\n            this.arrow.add(\n                    [ 0, 0 ],\n                    [ this.options.edge_arrow_length, this.options.edge_arrow_width / 2 ],\n                    [ 0, this.options.edge_arrow_width ]\n            );\n            this.arrow.pivot = new paper.Point([ this.options.edge_arrow_length / 2, this.options.edge_arrow_width / 2 ]);\n            this.arrow.__representation = this;\n            this.text = $('<div class=\"Rk-Label Rk-Edge-Label\">').appendTo(this.renderer.labels_$);\n            this.arrow_angle = 0;\n            if (this.options.editor_mode) {\n                var Renderer = requtils.getRenderer();\n                this.normal_buttons = [\n                                       new Renderer.EdgeEditButton(this.renderer, null),\n                                       new Renderer.EdgeRemoveButton(this.renderer, null)\n                                       ];\n                this.pending_delete_buttons = [\n                                               new Renderer.EdgeRevertButton(this.renderer, null)\n                                               ];\n                this.all_buttons = this.normal_buttons.concat(this.pending_delete_buttons);\n                for (var i = 0; i < this.all_buttons.length; i++) {\n                    this.all_buttons[i].source_representation = this;\n                }\n                this.active_buttons = [];\n            } else {\n                this.active_buttons = this.all_buttons = [];\n            }\n\n            if (this.renderer.minimap) {\n                this.renderer.minimap.edge_layer.activate();\n                this.minimap_line = new paper.Path();\n                this.minimap_line.add([0,0],[0,0]);\n                this.minimap_line.__representation = this.renderer.minimap.miniframe.__representation;\n                this.minimap_line.strokeWidth = 1;\n            }\n        },\n        _getStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.edge_stroke_width + (thickness-1) * (this.options.edge_stroke_max_width - this.options.edge_stroke_width) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        _getSelectedStrokeWidth: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return this.options.selected_edge_stroke_width + (thickness-1) * (this.options.selected_edge_stroke_max_width - this.options.selected_edge_stroke_width) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        _getArrowScale: function() {\n            var thickness = (this.model.has('style') && this.model.get('style').thickness) || 1;\n            return 1 + (thickness-1) * ((this.options.edge_arrow_max_width / this.options.edge_arrow_width) - 1) / (this.options.edge_stroke_witdh_scale-1);\n        },\n        redraw: function() {\n            var from = this.model.get(\"from\"),\n            to = this.model.get(\"to\");\n            if (!from || !to || (this.hidden && !this.ghost)) {\n                return;\n            }\n            this.from_representation = this.renderer.getRepresentationByModel(from);\n            this.to_representation = this.renderer.getRepresentationByModel(to);\n            if (typeof this.from_representation === \"undefined\" || typeof this.to_representation === \"undefined\" ||\n                    (this.from_representation.hidden && !this.from_representation.ghost) ||\n                    (this.to_representation.hidden && !this.to_representation.ghost)) {\n                this.hide();\n                return;\n            }\n            var _strokeWidth = this._getStrokeWidth(),\n                _arrow_scale = this._getArrowScale(),\n                _p0a = this.from_representation.paper_coords,\n                _p1a = this.to_representation.paper_coords,\n                _v = _p1a.subtract(_p0a),\n                _r = _v.length,\n                _u = _v.divide(_r),\n                _ortho = new paper.Point([- _u.y, _u.x]),\n                _group_pos = this.bundle.getPosition(this),\n                _delta = _ortho.multiply( this.options.edge_gap_in_bundles * _group_pos ),\n                _p0b = _p0a.add(_delta), /* Adding a 4 px difference */\n                _p1b = _p1a.add(_delta), /* to differentiate bundled links */\n                _a = _v.angle,\n                _textdelta = _ortho.multiply(this.options.edge_label_distance + 0.5 * _arrow_scale * this.options.edge_arrow_width),\n                _handle = _v.divide(3),\n                _color = (this.model.has(\"style\") && this.model.get(\"style\").color) || (this.model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                _dash = (this.model.has(\"style\") && this.model.get(\"style\").dash) ? this.options.default_dash_array : null,\n                _opacity;\n\n            if (this.model.get(\"delete_scheduled\") || this.from_representation.model.get(\"delete_scheduled\") || this.to_representation.model.get(\"delete_scheduled\")) {\n                _opacity = 0.5;\n                this.line.dashArray = [2, 2];\n            } else {\n                _opacity = this.ghost ? this.options.ghost_opacity : 1;\n                this.line.dashArray = null;\n            }\n\n            var old_act_btn = this.active_buttons;\n\n            this.arrow.visible =\n                (this.model.has(\"style\") && this.model.get(\"style\").arrow) ||\n                !this.model.has(\"style\") ||\n                typeof this.model.get(\"style\").arrow === 'undefined';\n\n            this.active_buttons = this.model.get(\"delete_scheduled\") ? this.pending_delete_buttons : this.normal_buttons;\n\n            if (this.selected && this.renderer.isEditable() && old_act_btn !== this.active_buttons) {\n                old_act_btn.forEach(function(b) {\n                    b.hide();\n                });\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n\n            this.paper_coords = _p0b.add(_p1b).divide(2);\n            this.line.strokeWidth = _strokeWidth;\n            this.line.strokeColor = _color;\n            this.line.dashArray = _dash;\n            this.line.opacity = _opacity;\n            this.line.segments[0].point = _p0a;\n            this.line.segments[1].point = this.paper_coords;\n            this.line.segments[1].handleIn = _handle.multiply(-1);\n            this.line.segments[1].handleOut = _handle;\n            this.line.segments[2].point = _p1a;\n            this.arrow.scale(_arrow_scale / this.arrow_scale);\n            this.arrow_scale = _arrow_scale;\n            this.arrow.fillColor = _color;\n            this.arrow.opacity = _opacity;\n            this.arrow.rotate(_a - this.arrow_angle, this.arrow.bounds.center);\n            this.arrow.position = this.paper_coords;\n\n            this.arrow_angle = _a;\n            if (_a > 90) {\n                _a -= 180;\n                _textdelta = _textdelta.multiply(-1);\n            }\n            if (_a < -90) {\n                _a += 180;\n                _textdelta = _textdelta.multiply(-1);\n            }\n            var _text = this.model.get(\"title\") || this.renkan.translate(this.options.label_untitled_edges) || \"\";\n            _text = Utils.shortenText(_text, this.options.node_label_max_length);\n            this.text.text(_text);\n            var _textpos = this.paper_coords.add(_textdelta);\n            this.text.css({\n                left: _textpos.x,\n                top: _textpos.y,\n                transform: \"rotate(\" + _a + \"deg)\",\n                \"-moz-transform\": \"rotate(\" + _a + \"deg)\",\n                \"-webkit-transform\": \"rotate(\" + _a + \"deg)\",\n                opacity: _opacity\n            });\n            this.text_angle = _a;\n\n            var _pc = this.paper_coords;\n            this.all_buttons.forEach(function(b) {\n                b.moveTo(_pc);\n            });\n\n            if (this.renderer.minimap) {\n                this.minimap_line.strokeColor = _color;\n                this.minimap_line.segments[0].point = this.renderer.toMinimapCoords(new paper.Point(this.from_representation.model.get(\"position\")));\n                this.minimap_line.segments[1].point = this.renderer.toMinimapCoords(new paper.Point(this.to_representation.model.get(\"position\")));\n            }\n        },\n        hide: function(){\n            this.hidden = true;\n            this.ghost = false;\n\n            this.text.hide();\n            this.line.visible = false;\n            this.arrow.visible = false;\n            this.minimap_line.visible = false;\n        },\n        show: function(ghost){\n            this.ghost = ghost;\n            if (this.ghost) {\n                this.text.css('opacity', 0.3);\n                this.line.opacity = 0.3;\n                this.arrow.opacity = 0.3;\n                this.minimap_line.opacity = 0.3;\n            } else {\n                this.hidden = false;\n\n                this.text.css('opacity', 1);\n                this.line.opacity = 1;\n                this.arrow.opacity = 1;\n                this.minimap_line.opacity = 1;\n            }\n            this.text.show();\n            this.line.visible = true;\n            this.arrow.visible = true;\n            this.minimap_line.visible = true;\n            this.redraw();\n        },\n        openEditor: function() {\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            var _editor = this.renderer.addRepresentation(\"EdgeEditor\",null);\n            _editor.source_representation = this;\n            _editor.draw();\n        },\n        select: function() {\n            this.selected = true;\n            this.line.strokeWidth = this._getSelectedStrokeWidth();\n            if (this.renderer.isEditable()) {\n                this.active_buttons.forEach(function(b) {\n                    b.show();\n                });\n            }\n            if (!this.options.editor_mode) {\n                this.openEditor();\n            }\n            this._super(\"select\");\n        },\n        unselect: function(_newTarget) {\n            if (!_newTarget || _newTarget.source_representation !== this) {\n                this.selected = false;\n                if (this.options.editor_mode) {\n                    this.all_buttons.forEach(function(b) {\n                        b.hide();\n                    });\n                }\n                this.line.strokeWidth = this._getStrokeWidth();\n                this._super(\"unselect\");\n            }\n        },\n        mousedown: function(_event, _isTouch) {\n            if (_isTouch) {\n                this.renderer.unselectAll();\n                this.select();\n            }\n        },\n        mouseup: function(_event, _isTouch) {\n            if (!this.renkan.read_only && this.renderer.is_dragging) {\n                this.from_representation.saveCoords();\n                this.to_representation.saveCoords();\n                this.from_representation.is_dragging = false;\n                this.to_representation.is_dragging = false;\n            } else {\n                if (!_isTouch) {\n                    this.openEditor();\n                }\n                this.model.trigger(\"clicked\");\n            }\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n        },\n        paperShift: function(_delta) {\n            if (this.options.editor_mode) {\n                if (!this.options.read_only) {\n                    this.from_representation.paperShift(_delta);\n                    this.to_representation.paperShift(_delta);\n                }\n            } else {\n                this.renderer.paperShift(_delta);\n            }\n        },\n        destroy: function() {\n            this._super(\"destroy\");\n            this.line.remove();\n            this.arrow.remove();\n            this.text.remove();\n            if (this.renderer.minimap) {\n                this.minimap_line.remove();\n            }\n            this.all_buttons.forEach(function(b) {\n                b.destroy();\n            });\n            var _this = this;\n            this.bundle.edges = _.reject(this.bundle.edges, function(_edge) {\n                return _this === _edge;\n            });\n        }\n    }).value();\n\n    return Edge;\n\n});\n\n\n\ndefine('renderer/tempedge',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* TempEdge Class Begin */\n\n    //var TempEdge = Renderer.TempEdge = Utils.inherit(Renderer._BaseRepresentation);\n    var TempEdge = Utils.inherit(BaseRepresentation);\n\n    _(TempEdge.prototype).extend({\n        _init: function() {\n            this.renderer.edge_layer.activate();\n            this.type = \"Temp-edge\";\n\n            var _color = (this.project.get(\"users\").get(this.renkan.current_user) || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\");\n            this.line = new paper.Path();\n            this.line.strokeColor = _color;\n            this.line.dashArray = [4, 2];\n            this.line.strokeWidth = this.options.selected_edge_stroke_width;\n            this.line.add([0,0],[0,0]);\n            this.line.__representation = this;\n            this.arrow = new paper.Path();\n            this.arrow.fillColor = _color;\n            this.arrow.add(\n                    [ 0, 0 ],\n                    [ this.options.edge_arrow_length, this.options.edge_arrow_width / 2 ],\n                    [ 0, this.options.edge_arrow_width ]\n            );\n            this.arrow.__representation = this;\n            this.arrow_angle = 0;\n        },\n        redraw: function() {\n            var _p0 = this.from_representation.paper_coords,\n            _p1 = this.end_pos,\n            _a = _p1.subtract(_p0).angle,\n            _c = _p0.add(_p1).divide(2);\n            this.line.segments[0].point = _p0;\n            this.line.segments[1].point = _p1;\n            this.arrow.rotate(_a - this.arrow_angle);\n            this.arrow.position = _c;\n            this.arrow_angle = _a;\n        },\n        paperShift: function(_delta) {\n            if (!this.renderer.isEditable()) {\n                this.renderer.removeRepresentation(_this);\n                paper.view.draw();\n                return;\n            }\n            this.end_pos = this.end_pos.add(_delta);\n            var _hitResult = paper.project.hitTest(this.end_pos);\n            this.renderer.findTarget(_hitResult);\n            this.redraw();\n        },\n        mouseup: function(_event, _isTouch) {\n            var _hitResult = paper.project.hitTest(_event.point),\n            _model = this.from_representation.model,\n            _endDrag = true;\n            if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                var _target = _hitResult.item.__representation;\n                if (_target.type.substr(0,4) === \"Node\") {\n                    var _destmodel = _target.model || _target.source_representation.model;\n                    if (_model !== _destmodel) {\n                        var _data = {\n                                id: Utils.getUID('edge'),\n                                created_by: this.renkan.current_user,\n                                from: _model,\n                                to: _destmodel\n                        };\n                        if (this.renderer.isEditable()) {\n                            this.project.addEdge(_data);\n                        }\n                    }\n                }\n\n                if (_model === _target.model || (_target.source_representation && _target.source_representation.model === _model)) {\n                    _endDrag = false;\n                    this.renderer.is_dragging = true;\n                }\n            }\n            if (_endDrag) {\n                this.renderer.click_target = null;\n                this.renderer.is_dragging = false;\n                this.renderer.removeRepresentation(this);\n                paper.view.draw();\n            }\n        },\n        destroy: function() {\n            this.arrow.remove();\n            this.line.remove();\n        }\n    }).value();\n\n    /* TempEdge Class End */\n\n    return TempEdge;\n\n});\n\n\ndefine('renderer/baseeditor',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* _BaseEditor Begin */\n    //var _BaseEditor = Renderer._BaseEditor = Utils.inherit(Renderer._BaseRepresentation);\n    var _BaseEditor = Utils.inherit(BaseRepresentation);\n\n    _(_BaseEditor.prototype).extend({\n        _init: function() {\n            this.renderer.buttons_layer.activate();\n            this.type = \"editor\";\n            this.editor_block = new paper.Path();\n            var _pts = _.map(_.range(8), function() {return [0,0];});\n            this.editor_block.add.apply(this.editor_block, _pts);\n            this.editor_block.strokeWidth = this.options.tooltip_border_width;\n            this.editor_block.strokeColor = this.options.tooltip_border_color;\n            this.editor_block.opacity = 0.8;\n            this.editor_$ = $('<div>')\n            .appendTo(this.renderer.editor_$)\n            .css({\n                position: \"absolute\",\n                opacity: 0.8\n            })\n            .hide();\n        },\n        destroy: function() {\n            this.editor_block.remove();\n            this.editor_$.remove();\n        }\n    }).value();\n\n    /* _BaseEditor End */\n\n    return _BaseEditor;\n\n});\n\n\ndefine('renderer/nodeeditor',['jquery', 'underscore', 'requtils', 'renderer/baseeditor', 'renderer/shapebuilder', 'ckeditor-jquery'], function ($, _, requtils, BaseEditor, ShapeBuilder) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEditor Begin */\n    //var NodeEditor = Renderer.NodeEditor = Utils.inherit(Renderer._BaseEditor);\n    var NodeEditor = Utils.inherit(BaseEditor);\n\n    _(NodeEditor.prototype).extend({\n        _init: function() {\n            BaseEditor.prototype._init.apply(this);\n            this.template = this.options.templates['templates/nodeeditor.html'];\n            //this.templates['default']= this.options.templates['templates/nodeeditor.html'];\n            //fusionner avec this.options.node_editor_templates\n            this.readOnlyTemplate = this.options.node_editor_templates;\n        },\n        draw: function() {\n            var _model = this.source_representation.model,\n            _created_by = _model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan),\n            _template = (this.renderer.isEditable() ? this.template : this.readOnlyTemplate[_model.get(\"type\")] || this.readOnlyTemplate[\"default\"]),\n            _image_placeholder = this.options.static_url + \"img/image-placeholder.png\",\n            _size = (_model.get(\"size\") || 0);\n            this.editor_$\n            .html(_template({\n                node: {\n                    _id: _model.get(\"_id\"),\n                    has_creator: !!_model.get(\"created_by\"),\n                    title: _model.get(\"title\"),\n                    uri: _model.get(\"uri\"),\n                    type: _model.get(\"type\") || \"default\",\n                    short_uri:  Utils.shortenText((_model.get(\"uri\") || \"\").replace(/^(https?:\\/\\/)?(www\\.)?/,'').replace(/\\/$/,''),40),\n                    description: _model.get(\"description\"),\n                    image: _model.get(\"image\") || \"\",\n                    image_placeholder: _image_placeholder,\n                    color: (_model.has(\"style\") && _model.get(\"style\").color) || _created_by.get(\"color\"),\n                    thickness: (_model.has(\"style\") && _model.get(\"style\").thickness) || 1,\n                    dash: _model.has(\"style\") && _model.get(\"style\").dash ? \"checked\" : \"\",\n                    clip_path: _model.get(\"clip_path\") || false,\n                    created_by_color: _created_by.get(\"color\"),\n                    created_by_title: _created_by.get(\"title\"),\n                    size: (_size > 0 ? \"+\" : \"\") + _size,\n                    shape: _model.get(\"shape\") || \"circle\"\n                },\n                renkan: this.renkan,\n                options: this.options,\n                shortenText: Utils.shortenText,\n                shapes : _(ShapeBuilder.builders).omit('svg').keys().value(),\n                types : _(this.options.node_editor_templates).keys().value(),\n            }));\n            this.redraw();\n            var _this = this,\n                editorInstance = _this.options.show_node_editor_description_richtext ?\n                    $(\".Rk-Edit-Description\").ckeditor(_this.options.richtext_editor_config) :\n                    false,\n                closeEditor = function() {\n                    _this.renderer.removeRepresentation(_this);\n                    paper.view.draw();\n                };\n\n            _this.cleanEditor = function() {\n                _this.editor_$.off(\"keyup\");\n                _this.editor_$.find(\"input, textarea, select\").off(\"change keyup paste\");\n                _this.editor_$.find(\".Rk-Edit-Image-File\").off('change');\n                _this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").off('hover');\n                _this.editor_$.find(\".Rk-Edit-Size-Btn\").off('click');\n                _this.editor_$.find(\".Rk-Edit-Image-Del\").off('click');\n                _this.editor_$.find(\".Rk-Edit-ColorPicker\").find(\"li\").off('hover click');\n                _this.editor_$.find(\".Rk-CloseX\").off('click');\n                _this.editor_$.find(\".Rk-Edit-Goto\").off('click');\n\n                if(_this.options.show_node_editor_description_richtext) {\n                    if(typeof editorInstance.editor !== 'undefined') {\n                        var _editor = editorInstance.editor;\n                        delete editorInstance.editor;\n                        _editor.focusManager.blur(true);\n                        _editor.destroy();\n                    }\n                }\n            };\n\n            this.editor_$.find(\".Rk-CloseX\").click(function (e) {\n                e.preventDefault();\n                closeEditor();\n            });\n\n            this.editor_$.find(\".Rk-Edit-Goto\").click(function() {\n                if (!_model.get(\"uri\")) {\n                    return false;\n                }\n            });\n\n            if (this.renderer.isEditable()) {\n\n                var onFieldChange = _.throttle(function() {\n                  _.defer(function() {\n                    if (_this.renderer.isEditable()) {\n                        var _data = {\n                            title: _this.editor_$.find(\".Rk-Edit-Title\").val()\n                        };\n                        if (_this.options.show_node_editor_uri) {\n                            _data.uri = _this.editor_$.find(\".Rk-Edit-URI\").val();\n                            _this.editor_$.find(\".Rk-Edit-Goto\").attr(\"href\",_data.uri || \"#\");\n                        }\n                        if (_this.options.show_node_editor_image) {\n                            _data.image = _this.editor_$.find(\".Rk-Edit-Image\").val();\n                            _this.editor_$.find(\".Rk-Edit-ImgPreview\").attr(\"src\", _data.image || _image_placeholder);\n                        }\n                        if (_this.options.show_node_editor_description) {\n                            if(_this.options.show_node_editor_description_richtext) {\n                                if(typeof editorInstance.editor !== 'undefined' &&\n                                    editorInstance.editor.checkDirty()) {\n                                    _data.description = editorInstance.editor.getData();\n                                    editorInstance.editor.resetDirty();\n                                }\n                            }\n                            else {\n                                _data.description = _this.editor_$.find(\".Rk-Edit-Description\").val();\n                            }\n                        }\n                        if (_this.options.show_node_editor_style) {\n                            var dash = _this.editor_$.find(\".Rk-Edit-Dash\").is(':checked');\n                            _data.style = _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {dash: dash});\n                        }\n                        if (_this.options.change_shapes) {\n                            if(_model.get(\"shape\")!==_this.editor_$.find(\".Rk-Edit-Shape\").val()){\n                                _data.shape = _this.editor_$.find(\".Rk-Edit-Shape\").val();\n                            }\n                        }\n                        if (_this.options.change_types) {\n                            if(_model.get(\"type\")!==_this.editor_$.find(\".Rk-Edit-Type\").val()){\n                                _data.type = _this.editor_$.find(\".Rk-Edit-Type\").val();\n                            }\n                        }\n                        _model.set(_data);\n                        _this.redraw();\n                    } else {\n                        closeEditor();\n                    }\n                  });\n                }, 1000);\n\n                this.editor_$.on(\"keyup\", function(_e) {\n                    if (_e.keyCode === 27) {\n                        closeEditor();\n                    }\n                });\n\n                this.editor_$.find(\"input, textarea, select\").on(\"change keyup paste\", onFieldChange);\n                if( _this.options.show_node_editor_description &&\n                    _this.options.show_node_editor_description_richtext &&\n                    typeof editorInstance.editor !== 'undefined')\n                {\n                    editorInstance.editor.on(\"change\", onFieldChange);\n                    editorInstance.editor.on(\"blur\", onFieldChange);\n                }\n\n                if(_this.options.allow_image_upload) {\n                    this.editor_$.find(\".Rk-Edit-Image-File\").change(function() {\n                        if (this.files.length) {\n                            var f = this.files[0],\n                            fr = new FileReader();\n                            if (f.type.substr(0,5) !== \"image\") {\n                                alert(_this.renkan.translate(\"This file is not an image\"));\n                                return;\n                            }\n                            if (f.size > (_this.options.uploaded_image_max_kb * 1024)) {\n                                alert(_this.renkan.translate(\"Image size must be under \") + _this.options.uploaded_image_max_kb + _this.renkan.translate(\"KB\"));\n                                return;\n                            }\n                            fr.onload = function(e) {\n                                _this.editor_$.find(\".Rk-Edit-Image\").val(e.target.result);\n                                onFieldChange();\n                            };\n                            fr.readAsDataURL(f);\n                        }\n                    });\n                }\n                this.editor_$.find(\".Rk-Edit-Title\")[0].focus();\n\n                var _picker = _this.editor_$.find(\".Rk-Edit-ColorPicker\");\n\n                this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.show();\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.hide();\n                        }\n                );\n\n                _picker.find(\"li\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", (_model.has(\"style\") && _model.get(\"style\").color) || (_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(_this.renkan)).get(\"color\"));\n                        }\n                ).click(function(_e) {\n                    _e.preventDefault();\n                    if (_this.renderer.isEditable()) {\n                        _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {color: $(this).attr(\"data-color\")}));\n                        _picker.hide();\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n\n                var shiftSize = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _newsize = n+(_model.get(\"size\") || 0);\n                        _this.editor_$.find(\"#Rk-Edit-Size-Value\").text((_newsize > 0 ? \"+\" : \"\") + _newsize);\n                        _model.set(\"size\", _newsize);\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Size-Down\").click(function() {\n                    shiftSize(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Size-Up\").click(function() {\n                    shiftSize(1);\n                    return false;\n                });\n\n                var shiftThickness = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _oldThickness = ((_model.has('style') && _model.get('style').thickness) || 1),\n                            _newThickness = n + _oldThickness;\n                        if(_newThickness < 1 ) {\n                            _newThickness = 1;\n                        }\n                        else if (_newThickness > _this.options.node_stroke_witdh_scale) {\n                            _newThickness = _this.options.node_stroke_witdh_scale;\n                        }\n                        if (_newThickness !== _oldThickness) {\n                            _this.editor_$.find(\"#Rk-Edit-Thickness-Value\").text(_newThickness);\n                            _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {thickness: _newThickness}));\n                            paper.view.draw();\n                        }\n                    }\n                    else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Thickness-Down\").click(function() {\n                    shiftThickness(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Thickness-Up\").click(function() {\n                    shiftThickness(1);\n                    return false;\n                });\n\n                this.editor_$.find(\".Rk-Edit-Image-Del\").click(function() {\n                    _this.editor_$.find(\".Rk-Edit-Image\").val('');\n                    onFieldChange();\n                    return false;\n                });\n            } else {\n                if (typeof this.source_representation.highlighted === \"object\") {\n                    var titlehtml = this.source_representation.highlighted.replace(_(_model.get(\"title\")).escape(),'<span class=\"Rk-Highlighted\">$1</span>');\n                    this.editor_$.find(\".Rk-Display-Title\" + (_model.get(\"uri\") ? \" a\" : \"\")).html(titlehtml);\n                    if (this.options.show_node_tooltip_description) {\n                        this.editor_$.find(\".Rk-Display-Description\").html(this.source_representation.highlighted.replace(_(_model.get(\"description\")).escape(),'<span class=\"Rk-Highlighted\">$1</span>'));\n                    }\n                }\n            }\n            this.editor_$.find(\"img\").load(function() {\n                _this.redraw();\n            });\n        },\n        redraw: function() {\n            if (this.options.popup_editor){\n                var _coords = this.source_representation.paper_coords;\n                Utils.drawEditBox(this.options, _coords, this.editor_block, this.source_representation.circle_radius * 0.75, this.editor_$);\n            }\n            this.editor_$.show();\n            paper.view.draw();\n        },\n        destroy: function() {\n            if(typeof this.cleanEditor !== 'undefined') {\n                this.cleanEditor();\n            }\n            this.editor_block.remove();\n            this.editor_$.remove();\n        }\n    }).value();\n\n    /* NodeEditor End */\n\n    return NodeEditor;\n\n});\n\n\ndefine('renderer/edgeeditor',['jquery', 'underscore', 'requtils', 'renderer/baseeditor'], function ($, _, requtils, BaseEditor) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeEditor Begin */\n\n    //var EdgeEditor = Renderer.EdgeEditor = Utils.inherit(Renderer._BaseEditor);\n    var EdgeEditor = Utils.inherit(BaseEditor);\n\n    _(EdgeEditor.prototype).extend({\n        _init: function() {\n          BaseEditor.prototype._init.apply(this);\n          this.template = this.options.templates['templates/edgeeditor.html'];\n          this.readOnlyTemplate = this.options.templates['templates/edgeeditor_readonly.html'];\n        },\n        draw: function() {\n            var _model = this.source_representation.model,\n            _from_model = _model.get(\"from\"),\n            _to_model = _model.get(\"to\"),\n            _created_by = _model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan),\n            _template = (this.renderer.isEditable() ? this.template : this.readOnlyTemplate);\n            this.editor_$\n              .html(_template({\n                edge: {\n                    has_creator: !!_model.get(\"created_by\"),\n                    title: _model.get(\"title\"),\n                    uri: _model.get(\"uri\"),\n                    short_uri:  Utils.shortenText((_model.get(\"uri\") || \"\").replace(/^(https?:\\/\\/)?(www\\.)?/,'').replace(/\\/$/,''),40),\n                    description: _model.get(\"description\"),\n                    color: (_model.has(\"style\") && _model.get(\"style\").color) || _created_by.get(\"color\"),\n                    dash: _model.has(\"style\") && _model.get(\"style\").dash ? \"checked\" : \"\",\n                    arrow: (_model.has(\"style\") && _model.get(\"style\").arrow) || !_model.has(\"style\") || (typeof _model.get(\"style\").arrow === 'undefined') ? \"checked\" : \"\",\n                    thickness: (_model.has(\"style\") && _model.get(\"style\").thickness) || 1,\n                    from_title: _from_model.get(\"title\"),\n                    to_title: _to_model.get(\"title\"),\n                    from_color: (_from_model.has(\"style\") && _from_model.get(\"style\").color) || (_from_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                    to_color: (_to_model.has(\"style\") && _to_model.get(\"style\").color) || (_to_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(this.renkan)).get(\"color\"),\n                    created_by_color: _created_by.get(\"color\"),\n                    created_by_title: _created_by.get(\"title\")\n                },\n                renkan: this.renkan,\n                shortenText: Utils.shortenText,\n                options: this.options\n            }));\n            this.redraw();\n            var _this = this,\n            closeEditor = function() {\n                _this.renderer.removeRepresentation(_this);\n                _this.editor_$.find(\".Rk-Edit-Size-Btn\").off('click');\n                paper.view.draw();\n            };\n            this.editor_$.find(\".Rk-CloseX\").click(closeEditor);\n            this.editor_$.find(\".Rk-Edit-Goto\").click(function() {\n                if (!_model.get(\"uri\")) {\n                    return false;\n                }\n            });\n\n            if (this.renderer.isEditable()) {\n\n                var onFieldChange = _.throttle(function() {\n                    _.defer(function() {\n                        if (_this.renderer.isEditable()) {\n                            var _data = {\n                                title: _this.editor_$.find(\".Rk-Edit-Title\").val()\n                            };\n                            if (_this.options.show_edge_editor_uri) {\n                                _data.uri = _this.editor_$.find(\".Rk-Edit-URI\").val();\n                            }\n                            if (_this.options.show_node_editor_style) {\n                                var dash = _this.editor_$.find(\".Rk-Edit-Dash\").is(':checked'),\n                                    arrow = _this.editor_$.find(\".Rk-Edit-Arrow\").is(':checked');\n                                _data.style = _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {dash: dash, arrow: arrow});\n                            }\n                            _this.editor_$.find(\".Rk-Edit-Goto\").attr(\"href\",_data.uri || \"#\");\n                            _model.set(_data);\n                            paper.view.draw();\n                        } else {\n                            closeEditor();\n                        }\n                    });\n                },500);\n\n                this.editor_$.on(\"keyup\", function(_e) {\n                    if (_e.keyCode === 27) {\n                        closeEditor();\n                    }\n                });\n\n                this.editor_$.find(\"input\").on(\"keyup change paste\", onFieldChange);\n\n                this.editor_$.find(\".Rk-Edit-Vocabulary\").change(function() {\n                    var e = $(this),\n                    v = e.val();\n                    if (v) {\n                        _this.editor_$.find(\".Rk-Edit-Title\").val(e.find(\":selected\").text());\n                        _this.editor_$.find(\".Rk-Edit-URI\").val(v);\n                        onFieldChange();\n                    }\n                });\n                this.editor_$.find(\".Rk-Edit-Direction\").click(function() {\n                    if (_this.renderer.isEditable()) {\n                        _model.set({\n                            from: _model.get(\"to\"),\n                            to: _model.get(\"from\")\n                        });\n                        _this.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n\n                var _picker = _this.editor_$.find(\".Rk-Edit-ColorPicker\");\n\n                this.editor_$.find(\".Rk-Edit-ColorPicker-Wrapper\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.show();\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _picker.hide();\n                        }\n                );\n\n                _picker.find(\"li\").hover(\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        },\n                        function(_e) {\n                            _e.preventDefault();\n                            _this.editor_$.find(\".Rk-Edit-Color\").css(\"background\", (_model.has(\"style\") && _model.get(\"style\").color)|| (_model.get(\"created_by\") || Utils._USER_PLACEHOLDER(_this.renkan)).get(\"color\"));\n                        }\n                ).click(function(_e) {\n                    _e.preventDefault();\n                    if (_this.renderer.isEditable()) {\n                        _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {color: $(this).attr(\"data-color\")}));\n                        _picker.hide();\n                        paper.view.draw();\n                    } else {\n                        closeEditor();\n                    }\n                });\n                var shiftThickness = function(n) {\n                    if (_this.renderer.isEditable()) {\n                        var _oldThickness = ((_model.has('style') && _model.get('style').thickness) || 1),\n                            _newThickness = n + _oldThickness;\n                        if(_newThickness < 1 ) {\n                            _newThickness = 1;\n                        }\n                        else if (_newThickness > _this.options.node_stroke_witdh_scale) {\n                            _newThickness = _this.options.node_stroke_witdh_scale;\n                        }\n                        if (_newThickness !== _oldThickness) {\n                            _this.editor_$.find(\"#Rk-Edit-Thickness-Value\").text(_newThickness);\n                            _model.set(\"style\", _.assign( ((_model.has(\"style\") && _.clone(_model.get(\"style\"))) || {}), {thickness: _newThickness}));\n                            paper.view.draw();\n                        }\n                    }\n                    else {\n                        closeEditor();\n                    }\n                };\n\n                this.editor_$.find(\"#Rk-Edit-Thickness-Down\").click(function() {\n                    shiftThickness(-1);\n                    return false;\n                });\n                this.editor_$.find(\"#Rk-Edit-Thickness-Up\").click(function() {\n                    shiftThickness(1);\n                    return false;\n                });\n            }\n        },\n        redraw: function() {\n            if (this.options.popup_editor){\n                var _coords = this.source_representation.paper_coords;\n                Utils.drawEditBox(this.options, _coords, this.editor_block, 5, this.editor_$);\n            }\n            this.editor_$.show();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* EdgeEditor End */\n\n    return EdgeEditor;\n\n});\n\n\ndefine('renderer/nodebutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* _NodeButton Begin */\n\n    //var _NodeButton = Renderer._NodeButton = Utils.inherit(Renderer._BaseButton);\n    var _NodeButton = Utils.inherit(BaseButton);\n\n    _(_NodeButton.prototype).extend({\n        setSectorSize: function() {\n            var sectorInner = this.source_representation.circle_radius;\n            if (sectorInner !== this.lastSectorInner) {\n                if (this.sector) {\n                    this.sector.destroy();\n                }\n                this.sector = this.renderer.drawSector(\n                        this, 1 + sectorInner,\n                        Utils._NODE_BUTTON_WIDTH + sectorInner,\n                        this.startAngle,\n                        this.endAngle,\n                        1,\n                        this.imageName,\n                        this.renkan.translate(this.text)\n                );\n                this.lastSectorInner = sectorInner;\n            }\n        },\n        unselect: function() {\n            BaseButton.prototype.unselect.apply(this, Array.prototype.slice.call(arguments, 1));\n            if(this.source_representation && this.source_representation.buttons_timeout) {\n                clearTimeout(this.source_representation.buttons_timeout);\n                this.source_representation.hideButtons();\n            }\n        },\n        select: function() {\n            if(this.source_representation && this.source_representation.buttons_timeout) {\n                clearTimeout(this.source_representation.buttons_timeout);\n            }\n            this.sector.select();\n        },\n    }).value();\n\n\n    /* _NodeButton End */\n\n    return _NodeButton;\n\n});\n\n\ndefine('renderer/nodeeditbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEditButton Begin */\n\n    //var NodeEditButton = Renderer.NodeEditButton = Utils.inherit(Renderer._NodeButton);\n    var NodeEditButton = Utils.inherit(NodeButton);\n\n    _(NodeEditButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-edit-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = this.options.hide_nodes ? -125 : -135;\n            this.endAngle = this.options.hide_nodes ? -55 : -45;\n            this.imageName = \"edit\";\n            this.text = \"Edit\";\n        },\n        mouseup: function() {\n            if (!this.renderer.is_dragging) {\n                this.source_representation.openEditor();\n            }\n        }\n    }).value();\n\n    /* NodeEditButton End */\n\n    return NodeEditButton;\n\n});\n\n\ndefine('renderer/noderemovebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeRemoveButton = Utils.inherit(NodeButton);\n\n    _(NodeRemoveButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-remove-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = this.options.hide_nodes ? -10 : 0;\n            this.endAngle = this.options.hide_nodes ? 45 : 90;\n            this.imageName = \"remove\";\n            this.text = \"Remove\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                if (this.options.element_delete_delay) {\n                    var delid = Utils.getUID(\"delete\");\n                    this.renderer.delete_list.push({\n                        id: delid,\n                        time: new Date().valueOf() + this.options.element_delete_delay\n                    });\n                    this.source_representation.model.set(\"delete_scheduled\", delid);\n                } else {\n                    if (confirm(this.renkan.translate('Do you really wish to remove node ') + '\"' + this.source_representation.model.get(\"title\") + '\"?')) {\n                        this.project.removeNode(this.source_representation.model);\n                    }\n                }\n            }\n        }\n    }).value();\n\n    /* NodeRemoveButton End */\n\n    return NodeRemoveButton;\n\n});\n\n\ndefine('renderer/nodehidebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeHideButton = Utils.inherit(NodeButton);\n\n    _(NodeHideButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-hide-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = 45;\n            this.endAngle = 90;\n            this.imageName = \"hide\";\n            this.text = \"Hide\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                this.renderer.addHiddenNode(this.source_representation.model);\n            }\n        }\n    }).value();\n\n    /* NodeRemoveButton End */\n\n    return NodeHideButton;\n\n});\n\n\ndefine('renderer/nodeshowbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRemoveButton Begin */\n\n    //var NodeRemoveButton = Renderer.NodeRemoveButton = Utils.inherit(Renderer._NodeButton);\n    var NodeShowButton = Utils.inherit(NodeButton);\n\n    _(NodeShowButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-show-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = 90;\n            this.endAngle = 135;\n            this.imageName = \"show\";\n            this.text = \"Show\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                this.source_representation.showNeighbors(false);\n            }\n        }\n    }).value();\n\n    /* NodeShowButton End */\n\n    return NodeShowButton;\n\n});\n\n\ndefine('renderer/noderevertbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeRevertButton Begin */\n\n    //var NodeRevertButton = Renderer.NodeRevertButton = Utils.inherit(Renderer._NodeButton);\n    var NodeRevertButton = Utils.inherit(NodeButton);\n\n    _(NodeRevertButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-revert-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = -135;\n            this.endAngle = 135;\n            this.imageName = \"revert\";\n            this.text = \"Cancel deletion\";\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            if (this.renderer.isEditable()) {\n                this.source_representation.model.unset(\"delete_scheduled\");\n            }\n        }\n    }).value();\n\n    /* NodeRevertButton End */\n\n    return NodeRevertButton;\n\n});\n\n\ndefine('renderer/nodelinkbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeLinkButton Begin */\n\n    //var NodeLinkButton = Renderer.NodeLinkButton = Utils.inherit(Renderer._NodeButton);\n    var NodeLinkButton = Utils.inherit(NodeButton);\n\n    _(NodeLinkButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-link-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = this.options.hide_nodes ? 135 : 90;\n            this.endAngle = this.options.hide_nodes ? 190 : 180;\n            this.imageName = \"link\";\n            this.text = \"Link to another node\";\n        },\n        mousedown: function(_event, _isTouch) {\n            if (this.renderer.isEditable()) {\n                var _off = this.renderer.canvas_$.offset(),\n                _point = new paper.Point([\n                                          _event.pageX - _off.left,\n                                          _event.pageY - _off.top\n                                          ]);\n                this.renderer.click_target = null;\n                this.renderer.removeRepresentationsOfType(\"editor\");\n                this.renderer.addTempEdge(this.source_representation, _point);\n            }\n        }\n    }).value();\n\n    /* NodeLinkButton End */\n\n    return NodeLinkButton;\n\n});\n\n\n\ndefine('renderer/nodeenlargebutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeEnlargeButton Begin */\n\n    //var NodeEnlargeButton = Renderer.NodeEnlargeButton = Utils.inherit(Renderer._NodeButton);\n    var NodeEnlargeButton = Utils.inherit(NodeButton);\n\n    _(NodeEnlargeButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-enlarge-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = this.options.hide_nodes ? -55 : -45;\n            this.endAngle = this.options.hide_nodes ? -10 : 0;\n            this.imageName = \"enlarge\";\n            this.text = \"Enlarge\";\n        },\n        mouseup: function() {\n            var _newsize = 1 + (this.source_representation.model.get(\"size\") || 0);\n            this.source_representation.model.set(\"size\", _newsize);\n            this.source_representation.select();\n            this.select();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* NodeEnlargeButton End */\n\n    return NodeEnlargeButton;\n\n});\n\n\ndefine('renderer/nodeshrinkbutton',['jquery', 'underscore', 'requtils', 'renderer/nodebutton'], function ($, _, requtils, NodeButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* NodeShrinkButton Begin */\n\n    //var NodeShrinkButton = Renderer.NodeShrinkButton = Utils.inherit(Renderer._NodeButton);\n    var NodeShrinkButton = Utils.inherit(NodeButton);\n\n    _(NodeShrinkButton.prototype).extend({\n        _init: function() {\n            this.type = \"Node-shrink-button\";\n            this.lastSectorInner = 0;\n            this.startAngle = this.options.hide_nodes ? -170 : -180;\n            this.endAngle = this.options.hide_nodes ? -125 : -135;\n            this.imageName = \"shrink\";\n            this.text = \"Shrink\";\n        },\n        mouseup: function() {\n            var _newsize = -1 + (this.source_representation.model.get(\"size\") || 0);\n            this.source_representation.model.set(\"size\", _newsize);\n            this.source_representation.select();\n            this.select();\n            paper.view.draw();\n        }\n    }).value();\n\n    /* NodeShrinkButton End */\n\n    return NodeShrinkButton;\n\n});\n\n\ndefine('renderer/edgeeditbutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeEditButton Begin */\n\n    //var EdgeEditButton = Renderer.EdgeEditButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeEditButton = Utils.inherit(BaseButton);\n\n    _(EdgeEditButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-edit-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -270, -90, 1, \"edit\", this.renkan.translate(\"Edit\"));\n        },\n        mouseup: function() {\n            if (!this.renderer.is_dragging) {\n                this.source_representation.openEditor();\n            }\n        }\n    }).value();\n\n    /* EdgeEditButton End */\n\n    return EdgeEditButton;\n\n});\n\n\ndefine('renderer/edgeremovebutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeRemoveButton Begin */\n\n    //var EdgeRemoveButton = Renderer.EdgeRemoveButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeRemoveButton = Utils.inherit(BaseButton);\n\n    _(EdgeRemoveButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-remove-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -90, 90, 1, \"remove\", this.renkan.translate(\"Remove\"));\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            this.renderer.removeRepresentationsOfType(\"editor\");\n            if (this.renderer.isEditable()) {\n                if (this.options.element_delete_delay) {\n                    var delid = Utils.getUID(\"delete\");\n                    this.renderer.delete_list.push({\n                        id: delid,\n                        time: new Date().valueOf() + this.options.element_delete_delay\n                    });\n                    this.source_representation.model.set(\"delete_scheduled\", delid);\n                } else {\n                    if (confirm(this.renkan.translate('Do you really wish to remove edge ') + '\"' + this.source_representation.model.get(\"title\") + '\"?')) {\n                        this.project.removeEdge(this.source_representation.model);\n                    }\n                }\n            }\n        }\n    }).value();\n\n    /* EdgeRemoveButton End */\n\n    return EdgeRemoveButton;\n\n});\n\n\ndefine('renderer/edgerevertbutton',['jquery', 'underscore', 'requtils', 'renderer/basebutton'], function ($, _, requtils, BaseButton) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* EdgeRevertButton Begin */\n\n    //var EdgeRevertButton = Renderer.EdgeRevertButton = Utils.inherit(Renderer._BaseButton);\n    var EdgeRevertButton = Utils.inherit(BaseButton);\n\n    _(EdgeRevertButton.prototype).extend({\n        _init: function() {\n            this.type = \"Edge-revert-button\";\n            this.sector = this.renderer.drawSector(this, Utils._EDGE_BUTTON_INNER, Utils._EDGE_BUTTON_OUTER, -135, 135, 1, \"revert\", this.renkan.translate(\"Cancel deletion\"));\n        },\n        mouseup: function() {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n            if (this.renderer.isEditable()) {\n                this.source_representation.model.unset(\"delete_scheduled\");\n            }\n        }\n    }).value();\n\n    /* EdgeRevertButton End */\n\n    return EdgeRevertButton;\n\n});\n\n\ndefine('renderer/miniframe',['jquery', 'underscore', 'requtils', 'renderer/baserepresentation'], function ($, _, requtils, BaseRepresentation) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* MiniFrame Begin */\n\n    //var MiniFrame = Renderer.MiniFrame = Utils.inherit(Renderer._BaseRepresentation);\n    var MiniFrame = Utils.inherit(BaseRepresentation);\n\n    _(MiniFrame.prototype).extend({\n        paperShift: function(_delta) {\n            this.renderer.offset = this.renderer.offset.subtract(_delta.divide(this.renderer.minimap.scale).multiply(this.renderer.scale));\n            this.renderer.redraw();\n        },\n        mouseup: function(_delta) {\n            this.renderer.click_target = null;\n            this.renderer.is_dragging = false;\n        }\n    }).value();\n\n\n    /* MiniFrame End */\n\n    return MiniFrame;\n\n});\n\n\ndefine('renderer/scene',['jquery', 'underscore', 'filesaver', 'requtils', 'renderer/miniframe'], function ($, _, filesaver, requtils, MiniFrame) {\n    \n\n    var Utils = requtils.getUtils();\n\n    /* Scene Begin */\n\n    var Scene = function(_renkan) {\n        this.renkan = _renkan;\n        this.$ = $(\".Rk-Render\");\n        this.representations = [];\n        this.$.html(_renkan.options.templates['templates/scene.html'](_renkan));\n        this.onStatusChange();\n        this.canvas_$ = this.$.find(\".Rk-Canvas\");\n        this.labels_$ = this.$.find(\".Rk-Labels\");\n        if (!_renkan.options.popup_editor){\n            this.editor_$ = $(\"#\" + _renkan.options.editor_panel);\n        }else{\n            this.editor_$ = this.$.find(\".Rk-Editor\");\n        }\n        this.notif_$ = this.$.find(\".Rk-Notifications\");\n        paper.setup(this.canvas_$[0]);\n        this.scale = 1;\n        this.initialScale = 1;\n        this.offset = paper.view.center;\n        this.totalScroll = 0;\n        this.hiddenNodes = [];\n        this.mouse_down = false;\n        this.click_target = null;\n        this.selected_target = null;\n        this.edge_layer = new paper.Layer();\n        this.node_layer = new paper.Layer();\n        this.buttons_layer = new paper.Layer();\n        this.delete_list = [];\n        this.redrawActive = true;\n\n        if (_renkan.options.show_minimap) {\n            this.minimap = {\n                    background_layer: new paper.Layer(),\n                    edge_layer: new paper.Layer(),\n                    node_layer: new paper.Layer(),\n                    node_group: new paper.Group(),\n                    size: new paper.Size( _renkan.options.minimap_width, _renkan.options.minimap_height )\n            };\n\n            this.minimap.background_layer.activate();\n            this.minimap.topleft = paper.view.bounds.bottomRight.subtract(this.minimap.size);\n            this.minimap.rectangle = new paper.Path.Rectangle(this.minimap.topleft.subtract([2,2]), this.minimap.size.add([4,4]));\n            this.minimap.rectangle.fillColor = _renkan.options.minimap_background_color;\n            this.minimap.rectangle.strokeColor = _renkan.options.minimap_border_color;\n            this.minimap.rectangle.strokeWidth = 4;\n            this.minimap.offset = new paper.Point(this.minimap.size.divide(2));\n            this.minimap.scale = 0.1;\n\n            this.minimap.node_layer.activate();\n            this.minimap.cliprectangle = new paper.Path.Rectangle(this.minimap.topleft, this.minimap.size);\n            this.minimap.node_group.addChild(this.minimap.cliprectangle);\n            this.minimap.node_group.clipped = true;\n            this.minimap.miniframe = new paper.Path.Rectangle(this.minimap.topleft, this.minimap.size);\n            this.minimap.node_group.addChild(this.minimap.miniframe);\n            this.minimap.miniframe.fillColor = '#c0c0ff';\n            this.minimap.miniframe.opacity = 0.3;\n            this.minimap.miniframe.strokeColor = '#000080';\n            this.minimap.miniframe.strokeWidth = 2;\n            this.minimap.miniframe.__representation = new MiniFrame(this, null);\n        }\n\n        this.throttledPaperDraw = _(function() {\n            paper.view.draw();\n        }).throttle(100).value();\n\n        this.bundles = [];\n        this.click_mode = false;\n\n        var _this = this,\n        _allowScroll = true,\n        _originalScale = 1,\n        _zooming = false,\n        _lastTapX = 0,\n        _lastTapY = 0;\n\n        this.image_cache = {};\n        this.icon_cache = {};\n\n        ['edit', 'remove', 'hide', 'show', 'link', 'enlarge', 'shrink', 'revert' ].forEach(function(imgname) {\n            var img = new Image();\n            img.src = _renkan.options.static_url + 'img/' + imgname + '.png';\n            _this.icon_cache[imgname] = img;\n        });\n\n        var throttledMouseMove = _.throttle(function(_event, _isTouch) {\n            _this.onMouseMove(_event, _isTouch);\n        }, Utils._MOUSEMOVE_RATE);\n\n        this.canvas_$.on({\n            mousedown: function(_event) {\n                _event.preventDefault();\n                _this.onMouseDown(_event, false);\n            },\n            mousemove: function(_event) {\n                _event.preventDefault();\n                throttledMouseMove(_event, false);\n            },\n            mouseup: function(_event) {\n                _event.preventDefault();\n                _this.onMouseUp(_event, false);\n            },\n            mousewheel: function(_event, _delta) {\n                if(_renkan.options.zoom_on_scroll) {\n                    _event.preventDefault();\n                    if (_allowScroll) {\n                        _this.onScroll(_event, _delta);\n                    }\n                }\n            },\n            touchstart: function(_event) {\n                _event.preventDefault();\n                var _touches = _event.originalEvent.touches[0];\n                if (\n                        _renkan.options.allow_double_click &&\n                        new Date() - _lastTap < Utils._DOUBLETAP_DELAY &&\n                        ( Math.pow(_lastTapX - _touches.pageX, 2) + Math.pow(_lastTapY - _touches.pageY, 2) < Utils._DOUBLETAP_DISTANCE )\n                ) {\n                    _lastTap = 0;\n                    _this.onDoubleClick(_touches);\n                } else {\n                    _lastTap = new Date();\n                    _lastTapX = _touches.pageX;\n                    _lastTapY = _touches.pageY;\n                    _originalScale = _this.scale;\n                    _zooming = false;\n                    _this.onMouseDown(_touches, true);\n                }\n            },\n            touchmove: function(_event) {\n                _event.preventDefault();\n                _lastTap = 0;\n                if (_event.originalEvent.touches.length === 1) {\n                    _this.onMouseMove(_event.originalEvent.touches[0], true);\n                } else {\n                    if (!_zooming) {\n                        _this.onMouseUp(_event.originalEvent.touches[0], true);\n                        _this.click_target = null;\n                        _this.is_dragging = false;\n                        _zooming = true;\n                    }\n                    if (_event.originalEvent.scale === \"undefined\") {\n                        return;\n                    }\n                    var _newScale = _event.originalEvent.scale * _originalScale,\n                    _scaleRatio = _newScale / _this.scale,\n                    _newOffset = new paper.Point([\n                                                  _this.canvas_$.width(),\n                                                  _this.canvas_$.height()\n                                                  ]).multiply( 0.5 * ( 1 - _scaleRatio ) ).add(_this.offset.multiply( _scaleRatio ));\n                    _this.setScale(_newScale, _newOffset);\n                }\n            },\n            touchend: function(_event) {\n                _event.preventDefault();\n                _this.onMouseUp(_event.originalEvent.changedTouches[0], true);\n            },\n            dblclick: function(_event) {\n                _event.preventDefault();\n                if (_renkan.options.allow_double_click) {\n                    _this.onDoubleClick(_event);\n                }\n            },\n            mouseleave: function(_event) {\n                _event.preventDefault();\n                //_this.onMouseUp(_event, false);//\n                _this.click_target = null;\n                _this.is_dragging = false;\n            },\n            dragover: function(_event) {\n                _event.preventDefault();\n            },\n            dragenter: function(_event) {\n                _event.preventDefault();\n                _allowScroll = false;\n            },\n            dragleave: function(_event) {\n                _event.preventDefault();\n                _allowScroll = true;\n            },\n            drop: function(_event) {\n                _event.preventDefault();\n                _allowScroll = true;\n                var res = {};\n                _.each(_event.originalEvent.dataTransfer.types, function(t) {\n                    try {\n                        res[t] = _event.originalEvent.dataTransfer.getData(t);\n                    } catch(e) {}\n                });\n                var text = _event.originalEvent.dataTransfer.getData(\"Text\");\n                if (typeof text === \"string\") {\n                    switch(text[0]) {\n                    case \"{\":\n                    case \"[\":\n                        try {\n                            var data = JSON.parse(text);\n                            _.extend(res,data);\n                        }\n                        catch(e) {\n                            if (!res[\"text/plain\"]) {\n                                res[\"text/plain\"] = text;\n                            }\n                        }\n                        break;\n                    case \"<\":\n                        if (!res[\"text/html\"]) {\n                            res[\"text/html\"] = text;\n                        }\n                        break;\n                    default:\n                        if (!res[\"text/plain\"]) {\n                            res[\"text/plain\"] = text;\n                        }\n                    }\n                }\n                var url = _event.originalEvent.dataTransfer.getData(\"URL\");\n                if (url && !res[\"text/uri-list\"]) {\n                    res[\"text/uri-list\"] = url;\n                }\n                _this.dropData(res, _event.originalEvent);\n            }\n        });\n\n        var bindClick = function(selector, fname) {\n            _this.$.find(selector).click(function(evt) {\n                _this[fname](evt);\n                return false;\n            });\n        };\n\n        bindClick(\".Rk-ZoomOut\", \"zoomOut\");\n        bindClick(\".Rk-ZoomIn\", \"zoomIn\");\n        bindClick(\".Rk-ZoomFit\", \"autoScale\");\n        this.$.find(\".Rk-ZoomSave\").click( function() {\n            // Save scale and offset point\n            _this.renkan.project.addView( { zoom_level:_this.scale, offset:_this.offset, hidden_nodes: _this.hiddenNodes } );\n        });\n        this.$.find(\".Rk-ZoomSetSaved\").click( function() {\n            var view = _this.renkan.project.get(\"views\").last();\n            if(view){\n                _this.showNodes(false);\n                _this.setScale(view.get(\"zoom_level\"), new paper.Point(view.get(\"offset\")));\n                if (_this.renkan.options.hide_nodes){\n                    _this.hiddenNodes = (view.get(\"hidden_nodes\") || []).concat();\n                    _this.hideNodes();                    \n                }\n            }\n        });\n        this.$.find(\".Rk-ShowHiddenNodes\").mouseenter( function() {\n            _this.showNodes(true);\n            _this.$.find(\".Rk-ShowHiddenNodes\").mouseleave( function() {\n                _this.hideNodes();\n            });\n        });\n        this.$.find(\".Rk-ShowHiddenNodes\").click( function() {\n            _this.showNodes(false);\n            _this.$.find(\".Rk-ShowHiddenNodes\").off( \"mouseleave\" );\n        });\n        if(this.renkan.project.get(\"views\").length > 0 && this.renkan.options.save_view){\n            this.$.find(\".Rk-ZoomSetSaved\").show();\n        }\n        this.$.find(\".Rk-CurrentUser\").mouseenter(\n                function() { _this.$.find(\".Rk-UserList\").slideDown(); }\n        );\n        this.$.find(\".Rk-Users\").mouseleave(\n                function() { _this.$.find(\".Rk-UserList\").slideUp(); }\n        );\n        bindClick(\".Rk-FullScreen-Button\", \"fullScreen\");\n        bindClick(\".Rk-AddNode-Button\", \"addNodeBtn\");\n        bindClick(\".Rk-AddEdge-Button\", \"addEdgeBtn\");\n        bindClick(\".Rk-Save-Button\", \"save\");\n        bindClick(\".Rk-Open-Button\", \"open\");\n        bindClick(\".Rk-Export-Button\", \"exportProject\");\n        this.$.find(\".Rk-Bookmarklet-Button\")\n          /*jshint scripturl:true */\n          .attr(\"href\",\"javascript:\" + Utils._BOOKMARKLET_CODE(_renkan))\n          .click(function(){\n              _this.notif_$\n              .text(_renkan.translate(\"Drag this button to your bookmark bar. When on a third-party website, click it to enable drag-and-drop from the website to Renkan.\"))\n              .fadeIn()\n              .delay(5000)\n              .fadeOut();\n              return false;\n          });\n        this.$.find(\".Rk-TopBar-Button\").mouseover(function() {\n            $(this).find(\".Rk-TopBar-Tooltip\").show();\n        }).mouseout(function() {\n            $(this).find(\".Rk-TopBar-Tooltip\").hide();\n        });\n        bindClick(\".Rk-Fold-Bins\", \"foldBins\");\n\n        paper.view.onResize = function(_event) {\n            var _ratio,\n                newWidth = _event.width,\n                newHeight = _event.height;\n\n            if (_this.minimap) {\n                _this.minimap.topleft = paper.view.bounds.bottomRight.subtract(_this.minimap.size);\n                _this.minimap.rectangle.fitBounds(_this.minimap.topleft.subtract([2,2]), _this.minimap.size.add([4,4]));\n                _this.minimap.cliprectangle.fitBounds(_this.minimap.topleft, _this.minimap.size);\n            }\n\n            var ratioH = newHeight/(newHeight-_event.delta.height),\n                ratioW = newWidth/(newWidth-_event.delta.width);\n            if (newHeight < newWidth) {\n                    _ratio = ratioH;\n            } else {\n                _ratio = ratioW;\n            }\n\n            _this.resizeZoom(ratioW, ratioH, _ratio);\n\n            _this.redraw();\n\n        };\n\n        var _thRedraw = _.throttle(function() {\n            _this.redraw();\n        },50);\n\n        this.addRepresentations(\"Node\", this.renkan.project.get(\"nodes\"));\n        this.addRepresentations(\"Edge\", this.renkan.project.get(\"edges\"));\n        this.renkan.project.on(\"change:title\", function() {\n            _this.$.find(\".Rk-PadTitle\").val(_renkan.project.get(\"title\"));\n        });\n\n        this.$.find(\".Rk-PadTitle\").on(\"keyup input paste\", function() {\n            _renkan.project.set({\"title\": $(this).val()});\n        });\n\n        var _thRedrawUsers = _.throttle(function() {\n            _this.redrawUsers();\n        }, 100);\n\n        _thRedrawUsers();\n\n        // register model events\n        this.renkan.project.on(\"change:saveStatus\", function(){\n            switch (_this.renkan.project.get(\"saveStatus\")) {\n                case 0: //clean\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"to-save\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saving\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"saved\");\n                    break;\n                case 1: //dirty\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saved\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saving\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"to-save\");\n                    break;\n                case 2: //saving\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"saved\");\n                    _this.$.find(\".Rk-Save-Button\").removeClass(\"to-save\");\n                    _this.$.find(\".Rk-Save-Button\").addClass(\"saving\");\n                    break;\n            }\n        });\n\n        this.renkan.project.on(\"change:loadingStatus\", function(){\n            if (_this.renkan.project.get(\"loadingStatus\")){\n                var animate = _this.$.find(\".loader\").addClass(\"run\");\n                var timer = setTimeout(function(){\n                    _this.$.find(\".loader\").hide(250);\n                }, 3000);\n            }\n            else{\n                Backbone.history.start();\n            }\n        });\n\n        this.renkan.project.on(\"add:users remove:users\", _thRedrawUsers);\n\n        this.renkan.project.on(\"add:views remove:views\", function(_node) {\n            if(_this.renkan.project.get('views').length > 0) {\n                _this.$.find(\".Rk-ZoomSetSaved\").show();\n            }\n            else {\n                _this.$.find(\".Rk-ZoomSetSaved\").hide();\n            }\n        });\n\n        this.renkan.project.on(\"add:nodes\", function(_node) {\n            _this.addRepresentation(\"Node\", _node);\n            if (!_this.renkan.project.get(\"loadingStatus\")){\n                _thRedraw();\n            }\n        });\n        this.renkan.project.on(\"add:edges\", function(_edge) {\n            _this.addRepresentation(\"Edge\", _edge);\n            if (!_this.renkan.project.get(\"loadingStatus\")){\n                _thRedraw();\n            }\n        });\n        this.renkan.project.on(\"change:title\", function(_model, _title) {\n            var el = _this.$.find(\".Rk-PadTitle\");\n            if (el.is(\"input\")) {\n                if (el.val() !== _title) {\n                    el.val(_title);\n                }\n            } else {\n                el.text(_title);\n            }\n        });\n        \n        //register router events\n        this.renkan.router.on(\"router\", function(_params){\n            _this.parameters(_params);\n        });\n\n        if (_renkan.options.size_bug_fix) {\n            var _delay = (\n                    typeof _renkan.options.size_bug_fix === \"number\" ?\n                        _renkan.options.size_bug_fix\n                                : 500\n            );\n            window.setTimeout(\n                    function() {\n                        _this.fixSize();\n                    },\n                    _delay\n            );\n        }\n\n        if (_renkan.options.force_resize) {\n            $(window).resize(function() {\n                _this.autoScale();\n            });\n        }\n\n        if (_renkan.options.show_user_list && _renkan.options.user_color_editable) {\n            var $cpwrapper = this.$.find(\".Rk-Users .Rk-Edit-ColorPicker-Wrapper\"),\n            $cplist = this.$.find(\".Rk-Users .Rk-Edit-ColorPicker\");\n\n            $cpwrapper.hover(\n                    function(_e) {\n                        if (_this.isEditable()) {\n                            _e.preventDefault();\n                            $cplist.show();\n                        }\n                    },\n                    function(_e) {\n                        _e.preventDefault();\n                        $cplist.hide();\n                    }\n            );\n\n            $cplist.find(\"li\").mouseenter(\n                    function(_e) {\n                        if (_this.isEditable()) {\n                            _e.preventDefault();\n                            _this.$.find(\".Rk-CurrentUser-Color\").css(\"background\", $(this).attr(\"data-color\"));\n                        }\n                    }\n            );\n        }\n\n        if (_renkan.options.show_search_field) {\n\n            var lastval = '';\n\n            this.$.find(\".Rk-GraphSearch-Field\").on(\"keyup change paste input\", function() {\n                var $this = $(this),\n                val = $this.val();\n                if (val === lastval) {\n                    return;\n                }\n                lastval = val;\n                if (val.length < 2) {\n                    _renkan.project.get(\"nodes\").each(function(n) {\n                        _this.getRepresentationByModel(n).unhighlight();\n                    });\n                } else {\n                    var rxs = Utils.regexpFromTextOrArray(val);\n                    _renkan.project.get(\"nodes\").each(function(n) {\n                        if (rxs.test(n.get(\"title\")) || rxs.test(n.get(\"description\"))) {\n                            _this.getRepresentationByModel(n).highlight(rxs);\n                        } else {\n                            _this.getRepresentationByModel(n).unhighlight();\n                        }\n                    });\n                }\n            });\n        }\n\n        this.redraw();\n\n        window.setInterval(function() {\n            var _now = new Date().valueOf();\n            _this.delete_list.forEach(function(d) {\n                if (_now >= d.time) {\n                    var el = _renkan.project.get(\"nodes\").findWhere({\"delete_scheduled\":d.id});\n                    if (el) {\n                        project.removeNode(el);\n                    }\n                    el = _renkan.project.get(\"edges\").findWhere({\"delete_scheduled\":d.id});\n                    if (el) {\n                        project.removeEdge(el);\n                    }\n                }\n            });\n            _this.delete_list = _this.delete_list.filter(function(d) {\n                return _renkan.project.get(\"nodes\").findWhere({\"delete_scheduled\":d.id}) || _renkan.project.get(\"edges\").findWhere({\"delete_scheduled\":d.id});\n            });\n        }, 500);\n\n        if (this.minimap) {\n            window.setInterval(function() {\n                _this.rescaleMinimap();\n            }, 2000);\n        }\n\n    };\n\n    _(Scene.prototype).extend({\n        fixSize: function() {\n            if( this.renkan.options.default_view && this.renkan.project.get(\"views\").length > 0) {\n                var view = this.renkan.project.get(\"views\").last();\n                this.setScale(view.get(\"zoom_level\"), new paper.Point(view.get(\"offset\")));\n            }\n            else{\n                this.autoScale();\n            }\n        },\n        drawSector: function(_repr, _inR, _outR, _startAngle, _endAngle, _padding, _imgname, _caption) {\n            var _options = this.renkan.options,\n                _startRads = _startAngle * Math.PI / 180,\n                _endRads = _endAngle * Math.PI / 180,\n                _img = this.icon_cache[_imgname],\n                _startdx = - Math.sin(_startRads),\n                _startdy = Math.cos(_startRads),\n                _startXIn = Math.cos(_startRads) * _inR + _padding * _startdx,\n                _startYIn = Math.sin(_startRads) * _inR + _padding * _startdy,\n                _startXOut = Math.cos(_startRads) * _outR + _padding * _startdx,\n                _startYOut = Math.sin(_startRads) * _outR + _padding * _startdy,\n                _enddx = - Math.sin(_endRads),\n                _enddy = Math.cos(_endRads),\n                _endXIn = Math.cos(_endRads) * _inR - _padding * _enddx,\n                _endYIn = Math.sin(_endRads) * _inR - _padding * _enddy,\n                _endXOut = Math.cos(_endRads) * _outR - _padding * _enddx,\n                _endYOut = Math.sin(_endRads) * _outR - _padding * _enddy,\n                _centerR = (_inR + _outR) / 2,\n                _centerRads = (_startRads + _endRads) / 2,\n                _centerX = Math.cos(_centerRads) * _centerR,\n                _centerY = Math.sin(_centerRads) * _centerR,\n                _centerXIn = Math.cos(_centerRads) * _inR,\n                _centerXOut = Math.cos(_centerRads) * _outR,\n                _centerYIn = Math.sin(_centerRads) * _inR,\n                _centerYOut = Math.sin(_centerRads) * _outR,\n                _textX = Math.cos(_centerRads) * (_outR + 3),\n                _textY = Math.sin(_centerRads) * (_outR + _options.buttons_label_font_size) + _options.buttons_label_font_size / 2;\n            this.buttons_layer.activate();\n            var _path = new paper.Path();\n            _path.add([_startXIn, _startYIn]);\n            _path.arcTo([_centerXIn, _centerYIn], [_endXIn, _endYIn]);\n            _path.lineTo([_endXOut,  _endYOut]);\n            _path.arcTo([_centerXOut, _centerYOut], [_startXOut, _startYOut]);\n            _path.fillColor = _options.buttons_background;\n            _path.opacity = 0.5;\n            _path.closed = true;\n            _path.__representation = _repr;\n            var _text = new paper.PointText(_textX,_textY);\n            _text.characterStyle = {\n                    fontSize: _options.buttons_label_font_size,\n                    fillColor: _options.buttons_label_color\n            };\n            if (_textX > 2) {\n                _text.paragraphStyle.justification = 'left';\n            } else if (_textX < -2) {\n                _text.paragraphStyle.justification = 'right';\n            } else {\n                _text.paragraphStyle.justification = 'center';\n            }\n            _text.visible = false;\n            var _visible = false,\n                _restPos = new paper.Point(-200, -200),\n                _grp = new paper.Group([_path, _text]),\n                //_grp = new paper.Group([_path]),\n                _delta = _grp.position,\n                _imgdelta = new paper.Point([_centerX, _centerY]),\n                _currentPos = new paper.Point(0,0);\n            _text.content = _caption;\n            // set group pivot to not depend on text visibility that changes the group bounding box.\n            _grp.pivot = _grp.bounds.center;\n            _grp.visible = false;\n            _grp.position = _restPos;\n            var _res = {\n                    show: function() {\n                        _visible = true;\n                        _grp.position = _currentPos.add(_delta);\n                        _grp.visible = true;\n                    },\n                    moveTo: function(_point) {\n                        _currentPos = _point;\n                        if (_visible) {\n                            _grp.position = _point.add(_delta);\n                        }\n                    },\n                    hide: function() {\n                        _visible = false;\n                        _grp.visible = false;\n                        _grp.position = _restPos;\n                    },\n                    select: function() {\n                        _path.opacity = 0.8;\n                        _text.visible = true;\n                    },\n                    unselect: function() {\n                        _path.opacity = 0.5;\n                        _text.visible = false;\n                    },\n                    destroy: function() {\n                        _grp.remove();\n                    }\n            };\n            var showImage = function() {\n                var _raster = new paper.Raster(_img);\n                _raster.position = _imgdelta.add(_grp.position).subtract(_delta);\n                _raster.locked = true; // Disable mouse events on icon\n                _grp.addChild(_raster);\n            };\n            if (_img.width) {\n                showImage();\n            } else {\n                $(_img).on(\"load\",showImage);\n            }\n\n            return _res;\n        },\n        addToBundles: function(_edgeRepr) {\n            var _bundle = _(this.bundles).find(function(_bundle) {\n                return (\n                        ( _bundle.from === _edgeRepr.from_representation && _bundle.to === _edgeRepr.to_representation ) ||\n                        ( _bundle.from === _edgeRepr.to_representation && _bundle.to === _edgeRepr.from_representation )\n                );\n            });\n            if (typeof _bundle !== \"undefined\") {\n                _bundle.edges.push(_edgeRepr);\n            } else {\n                _bundle = {\n                        from: _edgeRepr.from_representation,\n                        to: _edgeRepr.to_representation,\n                        edges: [ _edgeRepr ],\n                        getPosition: function(_er) {\n                            var _dir = (_er.from_representation === this.from) ? 1 : -1;\n                            return _dir * ( _(this.edges).indexOf(_er) - (this.edges.length - 1) / 2 );\n                        }\n                };\n                this.bundles.push(_bundle);\n            }\n            return _bundle;\n        },\n        isEditable: function() {\n            return (this.renkan.options.editor_mode && !this.renkan.read_only);\n        },\n        onStatusChange: function() {\n            var savebtn = this.$.find(\".Rk-Save-Button\"),\n            tip = savebtn.find(\".Rk-TopBar-Tooltip-Contents\");\n            if (this.renkan.read_only) {\n                savebtn.removeClass(\"disabled Rk-Save-Online\").addClass(\"Rk-Save-ReadOnly\");\n                tip.text(this.renkan.translate(\"Connection lost\"));\n            } else {\n                if (this.renkan.options.manual_save) {\n                    savebtn.removeClass(\"Rk-Save-ReadOnly Rk-Save-Online\");\n                    tip.text(this.renkan.translate(\"Save Project\"));\n                } else {\n                    savebtn.removeClass(\"disabled Rk-Save-ReadOnly\").addClass(\"Rk-Save-Online\");\n                    tip.text(this.renkan.translate(\"Auto-save enabled\"));\n                }\n            }\n            this.redrawUsers();\n        },\n        setScale: function(_newScale, _offset) {\n            if ((_newScale/this.initialScale) > Utils._MIN_SCALE && (_newScale/this.initialScale) < Utils._MAX_SCALE) {\n                this.scale = _newScale;\n                if (_offset) {\n                    this.offset = _offset;\n                }\n                this.redraw();\n            }\n        },\n        autoScale: function(force_view) {\n            var nodes = this.renkan.project.get(\"nodes\");\n            if (nodes.length > 1) {\n                var _xx = nodes.map(function(_node) { return _node.get(\"position\").x; }),\n                _yy = nodes.map(function(_node) { return _node.get(\"position\").y; }),\n                _minx = Math.min.apply(Math, _xx),\n                _miny = Math.min.apply(Math, _yy),\n                _maxx = Math.max.apply(Math, _xx),\n                _maxy = Math.max.apply(Math, _yy);\n                var _scale = Math.min( (paper.view.size.width - 2 * this.renkan.options.autoscale_padding) / (_maxx - _minx), (paper.view.size.height - 2 * this.renkan.options.autoscale_padding) / (_maxy - _miny));\n                this.initialScale = _scale;\n                // Override calculated scale if asked\n                if((typeof force_view !== \"undefined\") && parseFloat(force_view.zoom_level)>0 && parseFloat(force_view.offset.x)>0 && parseFloat(force_view.offset.y)>0){\n                    this.setScale(parseFloat(force_view.zoom_level), new paper.Point(parseFloat(force_view.offset.x), parseFloat(force_view.offset.y)));\n                }\n                else{\n                    this.setScale(_scale, paper.view.center.subtract(new paper.Point([(_maxx + _minx) / 2, (_maxy + _miny) / 2]).multiply(_scale)));\n                }\n            }\n            if (nodes.length === 1) {\n                this.setScale(1, paper.view.center.subtract(new paper.Point([nodes.at(0).get(\"position\").x, nodes.at(0).get(\"position\").y])));\n            }\n        },\n        redrawMiniframe: function() {\n            var topleft = this.toMinimapCoords(this.toModelCoords(new paper.Point([0,0]))),\n                bottomright = this.toMinimapCoords(this.toModelCoords(paper.view.bounds.bottomRight));\n            this.minimap.miniframe.fitBounds(topleft, bottomright);\n        },\n        rescaleMinimap: function() {\n            var nodes = this.renkan.project.get(\"nodes\");\n            if (nodes.length > 1) {\n                var _xx = nodes.map(function(_node) { return _node.get(\"position\").x; }),\n                    _yy = nodes.map(function(_node) { return _node.get(\"position\").y; }),\n                    _minx = Math.min.apply(Math, _xx),\n                    _miny = Math.min.apply(Math, _yy),\n                    _maxx = Math.max.apply(Math, _xx),\n                    _maxy = Math.max.apply(Math, _yy);\n                var _scale = Math.min(\n                        this.scale * 0.8 * this.renkan.options.minimap_width / paper.view.bounds.width,\n                        this.scale * 0.8 * this.renkan.options.minimap_height / paper.view.bounds.height,\n                        ( this.renkan.options.minimap_width - 2 * this.renkan.options.minimap_padding ) / (_maxx - _minx),\n                        ( this.renkan.options.minimap_height - 2 * this.renkan.options.minimap_padding ) / (_maxy - _miny)\n                );\n                this.minimap.offset = this.minimap.size.divide(2).subtract(new paper.Point([(_maxx + _minx) / 2, (_maxy + _miny) / 2]).multiply(_scale));\n                this.minimap.scale = _scale;\n            }\n            if (nodes.length === 1) {\n                this.minimap.scale = 0.1;\n                this.minimap.offset = this.minimap.size.divide(2).subtract(new paper.Point([nodes.at(0).get(\"position\").x, nodes.at(0).get(\"position\").y]).multiply(this.minimap.scale));\n            }\n            this.redraw();\n        },\n        toPaperCoords: function(_point) {\n            return _point.multiply(this.scale).add(this.offset);\n        },\n        toMinimapCoords: function(_point) {\n            return _point.multiply(this.minimap.scale).add(this.minimap.offset).add(this.minimap.topleft);\n        },\n        toModelCoords: function(_point) {\n            return _point.subtract(this.offset).divide(this.scale);\n        },\n        addRepresentation: function(_type, _model) {\n            var RendererType = requtils.getRenderer()[_type];\n            var _repr = new RendererType(this, _model);\n            this.representations.push(_repr);\n            return _repr;\n        },\n        addRepresentations: function(_type, _collection) {\n            var _this = this;\n            _collection.forEach(function(_model) {\n                _this.addRepresentation(_type, _model);\n            });\n        },\n        userTemplate: _.template(\n                '<li class=\"Rk-User\"><span class=\"Rk-UserColor\" style=\"background:<%=background%>;\"></span><%=name%></li>'\n        ),\n        redrawUsers: function() {\n            if (!this.renkan.options.show_user_list) {\n                return;\n            }\n            var allUsers = [].concat((this.renkan.project.current_user_list || {}).models || [], (this.renkan.project.get(\"users\") || {}).models || []),\n            ulistHtml = '',\n            $userpanel = this.$.find(\".Rk-Users\"),\n            $name = $userpanel.find(\".Rk-CurrentUser-Name\"),\n            $cpitems = $userpanel.find(\".Rk-Edit-ColorPicker li\"),\n            $colorsquare = $userpanel.find(\".Rk-CurrentUser-Color\"),\n            _this = this;\n            $name.off(\"click\").text(this.renkan.translate(\"<unknown user>\"));\n            $cpitems.off(\"mouseleave click\");\n            allUsers.forEach(function(_user) {\n                if (_user.get(\"_id\") === _this.renkan.current_user) {\n                    $name.text(_user.get(\"title\"));\n                    $colorsquare.css(\"background\", _user.get(\"color\"));\n                    if (_this.isEditable()) {\n\n                        if (_this.renkan.options.user_name_editable) {\n                            $name.click(function() {\n                                var $this = $(this),\n                                $input = $('<input>').val(_user.get(\"title\")).blur(function() {\n                                    _user.set(\"title\", $(this).val());\n                                    _this.redrawUsers();\n                                    _this.redraw();\n                                });\n                                $this.empty().html($input);\n                                $input.select();\n                            });\n                        }\n\n                        if (_this.renkan.options.user_color_editable) {\n                            $cpitems.click(\n                                    function(_e) {\n                                        _e.preventDefault();\n                                        if (_this.isEditable()) {\n                                            _user.set(\"color\", $(this).attr(\"data-color\"));\n                                        }\n                                        $(this).parent().hide();\n                                    }\n                            ).mouseleave(function() {\n                                $colorsquare.css(\"background\", _user.get(\"color\"));\n                            });\n                        }\n                    }\n\n                } else {\n                    ulistHtml += _this.userTemplate({\n                        name: _user.get(\"title\"),\n                        background: _user.get(\"color\")\n                    });\n                }\n            });\n            $userpanel.find(\".Rk-UserList\").html(ulistHtml);\n        },\n        removeRepresentation: function(_representation) {\n            _representation.destroy();\n            this.representations = _.reject(this.representations,\n                function(_repr) {\n                    return _repr === _representation;\n                }\n            );\n        },\n        getRepresentationByModel: function(_model) {\n            if (!_model) {\n                return undefined;\n            }\n            return _.find(this.representations, function(_repr) {\n                return _repr.model === _model;\n            });\n        },\n        removeRepresentationsOfType: function(_type) {\n            var _representations = _.filter(this.representations,function(_repr) {\n                return _repr.type === _type;\n                }),\n                _this = this;\n            _.each(_representations, function(_repr) {\n                _this.removeRepresentation(_repr);\n            });\n        },\n        highlightModel: function(_model) {\n            var _repr = this.getRepresentationByModel(_model);\n            if (_repr) {\n                _repr.highlight();\n            }\n        },\n        unhighlightAll: function(_model) {\n            _.each(this.representations, function(_repr) {\n                _repr.unhighlight();\n            });\n        },\n        unselectAll: function(_model) {\n            _.each(this.representations, function(_repr) {\n                _repr.unselect();\n            });\n        },\n        redraw: function() {\n            var _this = this;\n            if(! this.redrawActive ) {\n                return;\n            }\n            _.each(this.representations, function(_representation) {\n                _representation.redraw({ dontRedrawEdges:true });\n            });\n            if (this.minimap) {\n                this.redrawMiniframe();\n            }\n            paper.view.draw();\n        },\n        addTempEdge: function(_from, _point) {\n            var _tmpEdge = this.addRepresentation(\"TempEdge\",null);\n            _tmpEdge.end_pos = _point;\n            _tmpEdge.from_representation = _from;\n            _tmpEdge.redraw();\n            this.click_target = _tmpEdge;\n        },\n        addHiddenNode: function(_model){\n            this.hideNode(_model);\n            this.hiddenNodes.push(_model.id);\n        },\n        hideNode: function(_model){\n            var _this = this;\n            if (typeof _this.getRepresentationByModel(_model) !== 'undefined'){\n                _this.getRepresentationByModel(_model).hide();\n            }\n        },\n        hideNodes: function(){\n            var _this = this;\n            this.hiddenNodes.forEach(function(_id, index){\n                var node = _this.renkan.project.get(\"nodes\").get(_id);\n                if (typeof node !== 'undefined'){\n                    return _this.hideNode(_this.renkan.project.get(\"nodes\").get(_id));\n                }else{\n                    _this.hiddenNodes.splice(index, 1);\n                }\n            });\n            paper.view.draw();\n        },\n        showNodes: function(ghost){\n            var _this = this;\n            var i = 0;\n            this.hiddenNodes.forEach(function(_id){\n                i++;\n                _this.getRepresentationByModel(_this.renkan.project.get(\"nodes\").get(_id)).show(ghost);\n            });\n            if (!ghost){\n                this.hiddenNodes = [];\n            }\n            paper.view.draw();\n        },\n        findTarget: function(_hitResult) {\n            if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                var _newTarget = _hitResult.item.__representation;\n                if (this.selected_target !== _hitResult.item.__representation) {\n                    if (this.selected_target) {\n                        this.selected_target.unselect(_newTarget);\n                    }\n                    _newTarget.select(this.selected_target);\n                    this.selected_target = _newTarget;\n                }\n            } else {\n                if (this.selected_target) {\n                    this.selected_target.unselect();\n                }\n                this.selected_target = null;\n            }\n        },\n        paperShift: function(_delta) {\n            this.offset = this.offset.add(_delta);\n            this.redraw();\n        },\n        onMouseMove: function(_event) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]),\n                                      _delta = _point.subtract(this.last_point);\n            this.last_point = _point;\n            if (!this.is_dragging && this.mouse_down && _delta.length > Utils._MIN_DRAG_DISTANCE) {\n                this.is_dragging = true;\n            }\n            var _hitResult = paper.project.hitTest(_point);\n            if (this.is_dragging) {\n                if (this.click_target && typeof this.click_target.paperShift === \"function\") {\n                    this.click_target.paperShift(_delta);\n                } else {\n                    this.paperShift(_delta);\n                }\n            } else {\n                this.findTarget(_hitResult);\n            }\n            paper.view.draw();\n        },\n        onMouseDown: function(_event, _isTouch) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]);\n            this.last_point = _point;\n            this.mouse_down = true;\n            if (!this.click_target || this.click_target.type !== \"Temp-edge\") {\n                this.removeRepresentationsOfType(\"editor\");\n                this.is_dragging = false;\n                var _hitResult = paper.project.hitTest(_point);\n                if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                    this.click_target = _hitResult.item.__representation;\n                    this.click_target.mousedown(_event, _isTouch);\n                } else {\n                    this.click_target = null;\n                    if (this.isEditable() && this.click_mode === Utils._CLICKMODE_ADDNODE) {\n                        var _coords = this.toModelCoords(_point),\n                        _data = {\n                            id: Utils.getUID('node'),\n                            created_by: this.renkan.current_user,\n                            position: {\n                                x: _coords.x,\n                                y: _coords.y\n                            }\n                        };\n                        var _node = this.renkan.project.addNode(_data);\n                        this.getRepresentationByModel(_node).openEditor();\n                    }\n                }\n            }\n            if (this.click_mode) {\n                if (this.isEditable() && this.click_mode === Utils._CLICKMODE_STARTEDGE && this.click_target && this.click_target.type === \"Node\") {\n                    this.removeRepresentationsOfType(\"editor\");\n                    this.addTempEdge(this.click_target, _point);\n                    this.click_mode = Utils._CLICKMODE_ENDEDGE;\n                    this.notif_$.fadeOut(function() {\n                        $(this).html(this.renkan.translate(\"Click on a second node to complete the edge\")).fadeIn();\n                    });\n                } else {\n                    this.notif_$.hide();\n                    this.click_mode = false;\n                }\n            }\n            paper.view.draw();\n        },\n        onMouseUp: function(_event, _isTouch) {\n            this.mouse_down = false;\n            if (this.click_target) {\n                var _off = this.canvas_$.offset();\n                this.click_target.mouseup(\n                        {\n                            point: new paper.Point([\n                                                    _event.pageX - _off.left,\n                                                    _event.pageY - _off.top\n                                                    ])\n                        },\n                        _isTouch\n                );\n            } else {\n                this.click_target = null;\n                this.is_dragging = false;\n                if (_isTouch) {\n                    this.unselectAll();\n                }\n            }\n            paper.view.draw();\n        },\n        onScroll: function(_event, _scrolldelta) {\n            this.totalScroll += _scrolldelta;\n            if (Math.abs(this.totalScroll) >= 1) {\n                var _off = this.canvas_$.offset(),\n                _delta = new paper.Point([\n                                          _event.pageX - _off.left,\n                                          _event.pageY - _off.top\n                                          ]).subtract(this.offset).multiply( Math.SQRT2 - 1 );\n                if (this.totalScroll > 0) {\n                    this.setScale( this.scale * Math.SQRT2, this.offset.subtract(_delta) );\n                } else {\n                    this.setScale( this.scale * Math.SQRT1_2, this.offset.add(_delta.divide(Math.SQRT2)));\n                }\n                this.totalScroll = 0;\n            }\n        },\n        onDoubleClick: function(_event) {\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]);\n            var _hitResult = paper.project.hitTest(_point);\n\n            if (!this.isEditable()) {\n                if (_hitResult && typeof _hitResult.item.__representation !== \"undefined\") {\n                    if (_hitResult.item.__representation.model.get('uri')){\n                        window.open(_hitResult.item.__representation.model.get('uri'), '_blank');\n                    }\n                }\n                return;\n            }\n            if (this.isEditable() && (!_hitResult || typeof _hitResult.item.__representation === \"undefined\")) {\n                var _coords = this.toModelCoords(_point),\n                _data = {\n                    id: Utils.getUID('node'),\n                    created_by: this.renkan.current_user,\n                    position: {\n                        x: _coords.x,\n                        y: _coords.y\n                    }\n                },\n                _node = this.renkan.project.addNode(_data);\n                this.getRepresentationByModel(_node).openEditor();\n            }\n            paper.view.draw();\n        },\n        defaultDropHandler: function(_data) {\n            var newNode = {};\n            var snippet = \"\";\n            switch(_data[\"text/x-iri-specific-site\"]) {\n                case \"twitter\":\n                    snippet = $('<div>').html(_data[\"text/x-iri-selected-html\"]);\n                    var tweetdiv = snippet.find(\".tweet\");\n                    newNode.title = this.renkan.translate(\"Tweet by \") + tweetdiv.attr(\"data-name\");\n                    newNode.uri = \"http://twitter.com/\" + tweetdiv.attr(\"data-screen-name\") + \"/status/\" + tweetdiv.attr(\"data-tweet-id\");\n                    newNode.image = tweetdiv.find(\".avatar\").attr(\"src\");\n                    newNode.description = tweetdiv.find(\".js-tweet-text:first\").text();\n                    break;\n                case \"google\":\n                    snippet = $('<div>').html(_data[\"text/x-iri-selected-html\"]);\n                    newNode.title = snippet.find(\"h3:first\").text().trim();\n                    newNode.uri = snippet.find(\"h3 a\").attr(\"href\");\n                    newNode.description = snippet.find(\".st:first\").text().trim();\n                    break;\n                default:\n                    if (_data[\"text/x-iri-source-uri\"]) {\n                        newNode.uri = _data[\"text/x-iri-source-uri\"];\n                    }\n            }\n            if (_data[\"text/plain\"] || _data[\"text/x-iri-selected-text\"]) {\n                newNode.description = (_data[\"text/plain\"] || _data[\"text/x-iri-selected-text\"]).replace(/[\\s\\n]+/gm,' ').trim();\n            }\n            if (_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]) {\n                snippet = $('<div>').html(_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]);\n                var _svgimgs = snippet.find(\"image\");\n                if (_svgimgs.length) {\n                    newNode.image = _svgimgs.attr(\"xlink:href\");\n                }\n                var _svgpaths = snippet.find(\"path\");\n                if (_svgpaths.length) {\n                    newNode.clipPath = _svgpaths.attr(\"d\");\n                }\n                var _imgs = snippet.find(\"img\");\n                if (_imgs.length) {\n                    newNode.image = _imgs[0].src;\n                }\n                var _as = snippet.find(\"a\");\n                if (_as.length) {\n                    newNode.uri = _as[0].href;\n                }\n                newNode.title = snippet.find(\"[title]\").attr(\"title\") || newNode.title;\n                newNode.description = snippet.text().replace(/[\\s\\n]+/gm,' ').trim();\n            }\n            if (_data[\"text/uri-list\"]) {\n                newNode.uri = _data[\"text/uri-list\"];\n            }\n            if (_data[\"text/x-moz-url\"] && !newNode.title) {\n                newNode.title = (_data[\"text/x-moz-url\"].split(\"\\n\")[1] || \"\").trim();\n                if (newNode.title === newNode.uri) {\n                    newNode.title = false;\n                }\n            }\n            if (_data[\"text/x-iri-source-title\"] && !newNode.title) {\n                newNode.title = _data[\"text/x-iri-source-title\"];\n            }\n            if (_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]) {\n                snippet = $('<div>').html(_data[\"text/html\"] || _data[\"text/x-iri-selected-html\"]);\n                newNode.image = snippet.find(\"[data-image]\").attr(\"data-image\") || newNode.image;\n                newNode.uri = snippet.find(\"[data-uri]\").attr(\"data-uri\") || newNode.uri;\n                newNode.title = snippet.find(\"[data-title]\").attr(\"data-title\") || newNode.title;\n                newNode.description = snippet.find(\"[data-description]\").attr(\"data-description\") || newNode.description;\n                newNode.clipPath = snippet.find(\"[data-clip-path]\").attr(\"data-clip-path\") || newNode.clipPath;\n            }\n\n            if (!newNode.title) {\n                newNode.title = this.renkan.translate(\"Dragged resource\");\n            }\n            var fields = [\"title\", \"description\", \"uri\", \"image\"];\n            for (var i = 0; i < fields.length; i++) {\n                var f = fields[i];\n                if (_data[\"text/x-iri-\" + f] || _data[f]) {\n                    newNode[f] = _data[\"text/x-iri-\" + f] || _data[f];\n                }\n                if (newNode[f] === \"none\" || newNode[f] === \"null\") {\n                    newNode[f] = undefined;\n                }\n            }\n\n            if(typeof this.renkan.options.drop_enhancer === \"function\"){\n                newNode = this.renkan.options.drop_enhancer(newNode, _data);\n            }\n\n            return newNode;\n\n        },\n        dropData: function(_data, _event) {\n            if (!this.isEditable()) {\n                return;\n            }\n            if (_data[\"text/json\"] || _data[\"application/json\"]) {\n                try {\n                    var jsondata = JSON.parse(_data[\"text/json\"] || _data[\"application/json\"]);\n                    _.extend(_data,jsondata);\n                }\n                catch(e) {}\n            }\n\n            var newNode = (typeof this.renkan.options.drop_handler === \"undefined\")?this.defaultDropHandler(_data):this.renkan.options.drop_handler(_data);\n\n            var _off = this.canvas_$.offset(),\n            _point = new paper.Point([\n                                      _event.pageX - _off.left,\n                                      _event.pageY - _off.top\n                                      ]),\n                                      _coords = this.toModelCoords(_point),\n                                      _nodedata = {\n                id: Utils.getUID('node'),\n                created_by: this.renkan.current_user,\n                uri: newNode.uri || \"\",\n                title: newNode.title || \"\",\n                description: newNode.description || \"\",\n                image: newNode.image || \"\",\n                color: newNode.color || undefined,\n                clip_path: newNode.clipPath || undefined,\n                position: {\n                    x: _coords.x,\n                    y: _coords.y\n                }\n            };\n            var _node = this.renkan.project.addNode(_nodedata),\n            _repr = this.getRepresentationByModel(_node);\n            if (_event.type === \"drop\") {\n                _repr.openEditor();\n            }\n        },\n        fullScreen: function() {\n            var _isFull = document.fullScreen || document.mozFullScreen || document.webkitIsFullScreen,\n                _el = this.renkan.$[0],\n                _requestMethods = [\"requestFullScreen\",\"mozRequestFullScreen\",\"webkitRequestFullScreen\"],\n                _cancelMethods = [\"cancelFullScreen\",\"mozCancelFullScreen\",\"webkitCancelFullScreen\"],\n                i;\n            if (_isFull) {\n                for (i = 0; i < _cancelMethods.length; i++) {\n                    if (typeof document[_cancelMethods[i]] === \"function\") {\n                        document[_cancelMethods[i]]();\n                        break;\n                    }\n                }\n                var widthAft = this.$.width();\n                var heightAft = this.$.height();\n\n                if (this.renkan.options.show_top_bar) {\n                    heightAft -= this.$.find(\".Rk-TopBar\").height();\n                }\n                if (this.renkan.options.show_bins && (this.renkan.$.find(\".Rk-Bins\").position().left > 0)) {\n                    widthAft -= this.renkan.$.find(\".Rk-Bins\").width();\n                }\n\n                paper.view.viewSize = new paper.Size([widthAft, heightAft]);\n\n            } else {\n                for (i = 0; i < _requestMethods.length; i++) {\n                    if (typeof _el[_requestMethods[i]] === \"function\") {\n                        _el[_requestMethods[i]]();\n                        break;\n                    }\n                }\n                this.redraw();\n            }\n        },\n        zoomOut: function() {\n            var _newScale = this.scale * Math.SQRT1_2,\n            _offset = new paper.Point([\n                                       this.canvas_$.width(),\n                                       this.canvas_$.height()\n                                       ]).multiply( 0.5 * ( 1 - Math.SQRT1_2 ) ).add(this.offset.multiply( Math.SQRT1_2 ));\n            this.setScale( _newScale, _offset );\n        },\n        zoomIn: function() {\n            var _newScale = this.scale * Math.SQRT2,\n            _offset = new paper.Point([\n                                       this.canvas_$.width(),\n                                       this.canvas_$.height()\n                                       ]).multiply( 0.5 * ( 1 - Math.SQRT2 ) ).add(this.offset.multiply( Math.SQRT2 ));\n            this.setScale( _newScale, _offset );\n        },\n        resizeZoom: function(_scaleWidth, _scaleHeight, _ratio) {\n            var _newScale = this.scale * _ratio,\n                _offset = new paper.Point([\n                                       (this.offset.x * _scaleWidth),\n                                       (this.offset.y * _scaleHeight)\n                                       ]);\n            this.setScale( _newScale, _offset );\n        },\n        addNodeBtn: function() {\n            if (this.click_mode === Utils._CLICKMODE_ADDNODE) {\n                this.click_mode = false;\n                this.notif_$.hide();\n            } else {\n                this.click_mode = Utils._CLICKMODE_ADDNODE;\n                this.notif_$.text(this.renkan.translate(\"Click on the background canvas to add a node\")).fadeIn();\n            }\n            return false;\n        },\n        addEdgeBtn: function() {\n            if (this.click_mode === Utils._CLICKMODE_STARTEDGE || this.click_mode === Utils._CLICKMODE_ENDEDGE) {\n                this.click_mode = false;\n                this.notif_$.hide();\n            } else {\n                this.click_mode = Utils._CLICKMODE_STARTEDGE;\n                this.notif_$.text(this.renkan.translate(\"Click on a first node to start the edge\")).fadeIn();\n            }\n            return false;\n        },\n        exportProject: function() {\n          var projectJSON = this.renkan.project.toJSON(),\n              downloadLink = document.createElement(\"a\"),\n              projectId = projectJSON.id,\n              fileNameToSaveAs = projectId + \".json\";\n\n          // clean ids\n          delete projectJSON.id;\n          delete projectJSON._id;\n          delete projectJSON.space_id;\n\n          var objId,\n              idsMap = {},\n              hiddenNodes;\n\n          _.each(projectJSON.nodes, function(e,i,l) {\n            objId = e.id || e._id;\n            delete e._id;\n            delete e.id;\n            idsMap[objId] = e['@id'] = Utils.getUUID4();\n          });\n          _.each(projectJSON.edges, function(e,i,l) {\n            delete e._id;\n            delete e.id;\n            e.to = idsMap[e.to];\n            e.from = idsMap[e.from];\n          });\n          _.each(projectJSON.views, function(e,i,l) {\n            delete e._id;\n            delete e.id;\n\n            if(e.hidden_nodes) {\n                hiddenNodes = e.hidden_nodes;\n                e.hidden_nodes = [];\n                _.each(hiddenNodes, function(h,j) {\n                    e.hidden_nodes.push(idsMap[h]);\n                });\n            }\n          });\n          projectJSON.users = [];\n\n          var projectJSONStr = JSON.stringify(projectJSON, null, 2);\n          var blob = new Blob([projectJSONStr], {type: \"application/json;charset=utf-8\"});\n          filesaver(blob,fileNameToSaveAs);\n\n        },\n        parameters: function(_params){\n            if (typeof _params.idnode !== 'undefined'){\n                this.unhighlightAll();\n                this.highlightModel(this.renkan.project.get(\"nodes\").get(_params.idnode));                 \n            }\n        },\n        foldBins: function() {\n            var foldBinsButton = this.$.find(\".Rk-Fold-Bins\"),\n                bins = this.renkan.$.find(\".Rk-Bins\");\n            var _this = this,\n                sizeBef = _this.canvas_$.width(),\n                sizeAft;\n            if (bins.position().left < 0) {\n                bins.animate({left: 0},250);\n                this.$.animate({left: 300},250,function() {\n                    var w = _this.$.width();\n                    paper.view.viewSize = new paper.Size([w, _this.canvas_$.height()]);\n                });\n                if ((sizeBef -  bins.width()) < bins.height()){\n                    sizeAft = sizeBef;\n                } else {\n                    sizeAft = sizeBef - bins.width();\n                }\n                foldBinsButton.html(\"&laquo;\");\n            } else {\n                bins.animate({left: -300},250);\n                this.$.animate({left: 0},250,function() {\n                    var w = _this.$.width();\n                    paper.view.viewSize = new paper.Size([w, _this.canvas_$.height()]);\n                });\n                sizeAft = sizeBef+300;\n                foldBinsButton.html(\"&raquo;\");\n            }\n            _this.resizeZoom(1, 1, (sizeAft/sizeBef));\n        },\n        save: function() { },\n        open: function() { }\n    }).value();\n\n    /* Scene End */\n\n    return Scene;\n\n});\n\n\n//Load modules and use them\nif( typeof require.config === \"function\" ) {\n    require.config({\n        paths: {\n            'jquery':'../lib/jquery/jquery',\n            'underscore':'../lib/lodash/lodash',\n            'filesaver' :'../lib/FileSaver/FileSaver',\n            'requtils':'require-utils',\n            'ckeditor-core':'../lib/ckeditor/ckeditor',\n            'ckeditor-jquery':'../lib/ckeditor/adapters/jquery'\n        },\n        shim: {\n            'ckeditor-jquery':{\n                deps:['jquery','ckeditor-core']\n            }\n        },\n    });\n}\n\nrequire(['renderer/baserepresentation',\n         'renderer/basebutton',\n         'renderer/noderepr',\n         'renderer/edge',\n         'renderer/tempedge',\n         'renderer/baseeditor',\n         'renderer/nodeeditor',\n         'renderer/edgeeditor',\n         'renderer/nodebutton',\n         'renderer/nodeeditbutton',\n         'renderer/noderemovebutton',\n         'renderer/nodehidebutton',\n         'renderer/nodeshowbutton',\n         'renderer/noderevertbutton',\n         'renderer/nodelinkbutton',\n         'renderer/nodeenlargebutton',\n         'renderer/nodeshrinkbutton',\n         'renderer/edgeeditbutton',\n         'renderer/edgeremovebutton',\n         'renderer/edgerevertbutton',\n         'renderer/miniframe',\n         'renderer/scene'\n         ], function(BaseRepresentation, BaseButton, NodeRepr, Edge, TempEdge, BaseEditor, NodeEditor, EdgeEditor, NodeButton, NodeEditButton, NodeRemoveButton, NodeHideButton, NodeShowButton, NodeRevertButton, NodeLinkButton, NodeEnlargeButton, NodeShrinkButton, EdgeEditButton, EdgeRemoveButton, EdgeRevertButton, MiniFrame, Scene){\n\n    \n\n    var Rkns = window.Rkns;\n\n    if(typeof Rkns.Renderer === \"undefined\"){\n        Rkns.Renderer = {};\n    }\n    var Renderer = Rkns.Renderer;\n\n    Renderer._BaseRepresentation = BaseRepresentation;\n    Renderer._BaseButton = BaseButton;\n    Renderer.Node = NodeRepr;\n    Renderer.Edge = Edge;\n    Renderer.TempEdge = TempEdge;\n    Renderer._BaseEditor = BaseEditor;\n    Renderer.NodeEditor = NodeEditor;\n    Renderer.EdgeEditor = EdgeEditor;\n    Renderer._NodeButton = NodeButton;\n    Renderer.NodeEditButton = NodeEditButton;\n    Renderer.NodeRemoveButton = NodeRemoveButton;\n    Renderer.NodeHideButton = NodeHideButton;\n    Renderer.NodeShowButton = NodeShowButton;\n    Renderer.NodeRevertButton = NodeRevertButton;\n    Renderer.NodeLinkButton = NodeLinkButton;\n    Renderer.NodeEnlargeButton = NodeEnlargeButton;\n    Renderer.NodeShrinkButton = NodeShrinkButton;\n    Renderer.EdgeEditButton = EdgeEditButton;\n    Renderer.EdgeRemoveButton = EdgeRemoveButton;\n    Renderer.EdgeRevertButton = EdgeRevertButton;\n    Renderer.MiniFrame = MiniFrame;\n    Renderer.Scene = Scene;\n\n    startRenkan();\n});\n\ndefine(\"main-renderer\", function(){});\n\n"]}
\ No newline at end of file