diff --git a/app.js b/app.js index e37859ff..843d5565 100644 --- a/app.js +++ b/app.js @@ -23,8 +23,8 @@ app.use('/node_modules/bootstrap-select', express.static(__dirname + '/node_modu var multerInstance = multer({dest:'./uploads/'}); -//var APP_PORT = 3000; -var APP_PORT = 80; +var APP_PORT = 3000; +//var APP_PORT = 80; //get handler for index.html function indexGetHandler(req,res){ diff --git a/public/bin/base.min.css b/public/bin/base.min.css index 16d12648..2b6d6373 100644 --- a/public/bin/base.min.css +++ b/public/bin/base.min.css @@ -1,7 +1,7 @@ -.modal .modal-body h3,.modal .modal-footer a{color:#1abc9c}.modal,.modal .modal-footer{text-align:center}#gridOptionsDiv .modal,#gridOptionsDiv .modal-body,#layoutPropertiesDiv .modal,#layoutPropertiesDiv .modal-body,#pathwayDetailsDiv .modal,#pathwayDetailsDiv .modal-body{max-height:100%}.modal .modal-body .aboutImageContent,.modal .modal-body .adressText{margin-bottom:15px}.modal .modal-body .adressText p{margin-bottom:0!important}#aboutModal .modal-dialog{width:400px}#edge_legend_modal .modal-body img,#layoutPropertiesDiv .modal-dialog,#node_legend_modal .modal-body img{width:500px}#quickHelpModal .modal-body ul li{margin-bottom:15px}.ui-cytoscape-nodeadd{z-index:99999;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;margin-bottom:5px}#ui-cytoscape-nodeadd-icon{font-size:1.3em!important;cursor:pointer}#ui-cytoscape-nodeadd-icon .explanationText{font:14px helvetica neue,helvetica,arial,sans-serif}#ui-cytoscape-nodeadd-icon img{width:110px}.ui-cytoscape-nodeadd-nodediv{z-index:99999;padding:3px;text-align:center;width:110px;-webkit-backface-visibility:hidden;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.dropdown-submenu{position:relative;font-size:12px!important}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:0;margin-left:0;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background-color:#34495e!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>.dropdown-menu>li>a{color:#fff!important;font-size:12px!important}.dropdown-submenu>.dropdown-menu>li>a:hover{color:#fff!important;background-color:#1abc9c!important;border-radius:4px!important}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent transparent transparent #ccc;border-style:solid;border-width:5px 0 5px 5px;margin-top:5px;margin-right:-10px}#gridOptionsDiv .modal-footer button,#layoutPropertiesDiv .modal-footer button,#pathwayDetailsDiv .modal-footer button{border:none!important}#pathwayDetailsDiv .modal .form-control:focus,#pathwayDetailsDiv .modal-body .form-control:focus{box-shadow:inset 0 2px 2px rgba(0,0,0,.075),0 0 8px #1abc9c;color:#2f4154}.form-control:focus,.qtip-tipsy .form-control:focus{box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px #1abc9c}.geneDetails,.qtipLabel{margin-top:10px}.inputCol{padding-left:0!important}.qtip-tipsy{background:rgba(47,65,84,.92);color:#fff;border:0 solid transparent;font-size:12px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px}.qtip-tipsy .qtip-content{padding:5px 10px}.qtip-tipsy .scrollable{max-height:200px;overflow-y:scroll}.qtip-tipsy .form-control:focus{border-color:#1abc9c}.qtip-tipsy a{color:#1abc9c}.centerText{text-align:center!important}.leftText{text-align:left!important}.justifyText{text-align:justify!important}.popover{max-width:400px}.popover span{background-color:#e74c3c}.welcomePageContainer{position:fixed;top:0;left:0;background-color:#F6F6F6;z-index:100;height:100%;display:table;width:100%}.welcomePageContainer h1,.welcomePageContainer h3{color:#2f4154}.welcomePageContainer .landingContent{height:100%;position:relative;display:table-cell;vertical-align:middle;padding-top:70px;padding-bottom:70px}.welcomePageContainer .welcomePageLoading{display:none;margin-top:20px;margin-bottom:20px}.welcomePageContainer .welcomePageLoading i{color:#1abc9c}.welcomePageContainer .welPageButtons{margin-top:30px}.welcomePageContainer .welcomePageCheckable{display:inline-block;padding:10px;background-color:#fff;border-radius:6px;border:2px solid #979797;color:#606060;font-weight:500;transition:all .2s linear;min-width:180px;cursor:pointer}.welcomePageContainer .welcomePageCheckable i{visibility:hidden}.welcomePageContainer .active,.welcomePageContainer .welcomePageCheckable:hover{color:#2f4154;border-color:#1abc9c}.welcomePageContainer .active i,.welcomePageContainer .welcomePageCheckable:hover i{visibility:visible;color:#1abc9c}.welcomePageContainer .continueRow{margin-top:30px;visibility:hidden;cursor:pointer}.welcomePageContainer .continueButton{padding:10px;background-color:#2f4154;border-radius:6px;color:#fff;font-weight:500;transition:all .2s linear;max-width:200px;margin-left:auto;margin-right:auto}.welcomePageContainer .continueButton:hover{background-color:#1abc9c}.welcomePageContainer .buttonsSeparator{margin-left:10px;margin-right:10px;font-weight:600}.modal .modal-header{background-color:#ececec;border-top-left-radius:6px;border-top-right-radius:6px}.modal .modal-footer{background-color:#ececec;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.modal .close{outline:0!important}.modal .modal-title{color:#2f4154}.modal .close:hover{color:#1abc9c}#genomicDataExplorerDiv .modal-body .genomicLoadButton{padding:10px;border-radius:6px;outline:0;background-color:#fff;border:2px solid #2f4154;color:#2f4154;transition:all .2s linear}#genomicDataExplorerDiv .modal-body .genomicLoadButton:hover{border-color:#1abc9c;color:#1abc9c}#genomicDataExplorerDiv .modal-body .wrapper{margin-top:20px;margin-bottom:20px}#genomicDataExplorerDiv .modal-body .genomicChecboxDiv{text-align:left!important;margin-left:50px!important}#genomicDataExplorerDiv .modal-body .genomicDataContentDiv{margin-bottom:15px}#genomicDataExplorerDiv .modal-body .genomicDataContentDiv h4{margin-bottom:5px}#cy-context-menus-cxt-menu{display:none;z-index:1000;position:absolute;padding:0;margin:0;outline:0;border-radius:6px;border:none;opacity:.9}#cy-context-menus-cxt-menu:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#cy-context-menus-cxt-menu:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.cy-context-menus-cxt-menuitem{display:block;z-index:1000;width:100%;padding:3px 20px;position:relative;margin:0;background-color:#2F4154;font-weight:400;font-size:13px;white-space:nowrap;border:0;text-align:left;outline:0}.pathwayPanel .fileNameContent,body{font:14px helvetica neue,helvetica,arial,sans-serif}.cy-context-menus-cxt-menuitem:enabled{color:#fff}.cy-context-menus-ctx-operation:focus{outline:0}.cy-context-menus-cxt-menuitem:hover{color:#fff;text-decoration:none;background-color:#1abc9c;background-image:none;cursor:pointer}.cy-context-menus-cxt-menuitem[title]:before{content:attr(title)}.cy-context-menus-cxt-menuitem:not([title]):before{content:"\2630"}#cbioPortalModal .modal-body{text-align:left}#cbioPortalModal .modal-body .bootstrap-select>.dropdown-toggle{width:500px}#cbioPortalModal .modal-body .section{margin-bottom:20px}/*! +.modal .modal-body h3,.modal .modal-footer a{color:#1abc9c}.modal,.modal .modal-footer{text-align:center}#gridOptionsDiv .modal,#gridOptionsDiv .modal-body,#layoutPropertiesDiv .modal,#layoutPropertiesDiv .modal-body,#pathwayDetailsDiv .modal,#pathwayDetailsDiv .modal-body{max-height:100%}.modal .modal-body .aboutImageContent,.modal .modal-body .adressText{margin-bottom:15px}.modal .modal-body .adressText p{margin-bottom:0!important}#aboutModal .modal-dialog{width:400px}#edge_legend_modal .modal-body img,#layoutPropertiesDiv .modal-dialog,#node_legend_modal .modal-body img{width:500px}#quickHelpModal .modal-body ul li{margin-bottom:15px}.ui-cytoscape-nodeadd{z-index:99999;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;margin-bottom:5px}#ui-cytoscape-nodeadd-icon{font-size:1.3em!important;cursor:pointer}#ui-cytoscape-nodeadd-icon .explanationText{font:14px helvetica neue,helvetica,arial,sans-serif}#ui-cytoscape-nodeadd-icon img{width:110px}.ui-cytoscape-nodeadd-nodediv{z-index:99999;padding:3px;text-align:center;width:110px;-webkit-backface-visibility:hidden;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box}.dropdown-submenu{position:relative;font-size:12px!important}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:0;margin-left:0;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;background-color:#34495e!important}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropdown-submenu>.dropdown-menu>li>a{color:#fff!important;font-size:12px!important}.dropdown-submenu>.dropdown-menu>li>a:hover{color:#fff!important;background-color:#1abc9c!important;border-radius:4px!important}.dropdown-submenu>a:after{display:block;content:" ";float:right;width:0;height:0;border-color:transparent transparent transparent #ccc;border-style:solid;border-width:5px 0 5px 5px;margin-top:5px;margin-right:-10px}#gridOptionsDiv .modal-footer button,#layoutPropertiesDiv .modal-footer button,#pathwayDetailsDiv .modal-footer button{border:none!important}#pathwayDetailsDiv .modal .form-control:focus,#pathwayDetailsDiv .modal-body .form-control:focus{box-shadow:inset 0 2px 2px rgba(0,0,0,.075),0 0 8px #1abc9c;color:#2f4154}.form-control:focus,.qtip-tipsy .form-control:focus{box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px #1abc9c}.geneDetails,.qtipLabel{margin-top:10px}.inputCol{padding-left:0!important}.qtip-tipsy{background:rgba(47,65,84,.92);color:#fff;border:0 solid transparent;font-size:12px;font-family:'Lucida Grande',sans-serif;font-weight:700;line-height:16px}.qtip-tipsy .qtip-content{padding:5px 10px}.qtip-tipsy .scrollable{max-height:200px;overflow-y:scroll}.qtip-tipsy .form-control:focus{border-color:#1abc9c}.qtip-tipsy a{color:#1abc9c}.centerText{text-align:center!important}.leftText{text-align:left!important}.justifyText{text-align:justify!important}.popover{max-width:400px}.popover span{background-color:#e74c3c}.welcomePageContainer{position:fixed;top:0;left:0;background-color:#F6F6F6;z-index:100;height:100%;display:table;width:100%}.welcomePageContainer h1,.welcomePageContainer h3{color:#2f4154}.welcomePageContainer .landingContent{height:100%;position:relative;display:table-cell;vertical-align:middle;padding-top:70px;padding-bottom:70px}.welcomePageContainer .welcomePageLoading{display:none;margin-top:20px;margin-bottom:20px}.welcomePageContainer .welcomePageLoading i{color:#1abc9c}.welcomePageContainer .welPageButtons{margin-top:30px}.welcomePageContainer .welcomePageCheckable{display:inline-block;padding:10px;background-color:#fff;border-radius:6px;border:2px solid #979797;color:#606060;font-weight:500;transition:all .2s linear;min-width:180px;cursor:pointer}.welcomePageContainer .welcomePageCheckable i{visibility:hidden}.welcomePageContainer .active,.welcomePageContainer .welcomePageCheckable:hover{color:#2f4154;border-color:#1abc9c}.welcomePageContainer .active i,.welcomePageContainer .welcomePageCheckable:hover i{visibility:visible;color:#1abc9c}.welcomePageContainer .continueRow{margin-top:30px;visibility:hidden;cursor:pointer}.welcomePageContainer .continueButton{padding:10px;background-color:#2f4154;border-radius:6px;color:#fff;font-weight:500;transition:all .2s linear;max-width:200px;margin-left:auto;margin-right:auto}.welcomePageContainer .continueButton:hover{background-color:#1abc9c}.welcomePageContainer .buttonsSeparator{margin-left:10px;margin-right:10px;font-weight:600}.modal .modal-header{background-color:#ececec;border-top-left-radius:6px;border-top-right-radius:6px}.modal .modal-footer{background-color:#ececec;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.modal .close{outline:0!important}.modal .modal-title{color:#2f4154}.modal .close:hover{color:#1abc9c}#genomicDataExplorerDiv .modal-body .genomicLoadButton{padding:10px;border-radius:6px;outline:0;background-color:#fff;border:2px solid #2f4154;color:#2f4154;transition:all .2s linear}#genomicDataExplorerDiv .modal-body .genomicLoadButton:hover{border-color:#1abc9c;color:#1abc9c}#genomicDataExplorerDiv .modal-body .wrapper{margin-top:20px;margin-bottom:20px}#genomicDataExplorerDiv .modal-body .genomicChecboxDiv{text-align:left!important;margin-left:50px!important}#cbioPortalModal .modal-body,.control-label{text-align:left}#genomicDataExplorerDiv .modal-body .genomicDataContentDiv{margin-bottom:15px}#genomicDataExplorerDiv .modal-body .genomicDataContentDiv h4{margin-bottom:5px}#cy-context-menus-cxt-menu{display:none;z-index:1000;position:absolute;padding:0;margin:0;outline:0;border-radius:6px;border:none;opacity:.9}#cy-context-menus-cxt-menu:first-child{border-top-left-radius:6px;border-top-right-radius:6px}#cy-context-menus-cxt-menu:last-child{border-bottom-left-radius:6px;border-bottom-right-radius:6px}.cy-context-menus-cxt-menuitem{display:block;z-index:1000;width:100%;padding:3px 20px;position:relative;margin:0;background-color:#2F4154;font-weight:400;font-size:13px;white-space:nowrap;border:0;text-align:left;outline:0}.pathwayPanel .fileNameContent,body{font:14px helvetica neue,helvetica,arial,sans-serif}.cy-context-menus-cxt-menuitem:enabled{color:#fff}.cy-context-menus-ctx-operation:focus{outline:0}.cy-context-menus-cxt-menuitem:hover{color:#fff;text-decoration:none;background-color:#1abc9c;background-image:none;cursor:pointer}.cy-context-menus-cxt-menuitem[title]:before{content:attr(title)}.cy-context-menus-cxt-menuitem:not([title]):before{content:"\2630"}#cbioPortalModal .modal-body .bootstrap-select>.dropdown-toggle{width:500px}#cbioPortalModal .modal-body .section{margin-bottom:20px}/*! * animate.css -http://daneden.me/animate * Version - 3.5.1 * Licensed under the MIT license - http://opensource.org/licenses/MIT * * Copyright (c) 2016 Daniel Eden - */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}@keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}@keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}@keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.39062deg) skewY(.39062deg);transform:skewX(.39062deg) skewY(.39062deg)}88.8%{-webkit-transform:skewX(-.19531deg) skewY(-.19531deg);transform:skewX(-.19531deg) skewY(-.19531deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.39062deg) skewY(.39062deg);transform:skewX(.39062deg) skewY(.39062deg)}88.8%{-webkit-transform:skewX(-.19531deg) skewY(-.19531deg);transform:skewX(-.19531deg) skewY(-.19531deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}.flipInY,.flipOutX{-webkit-backface-visibility:visible!important}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}[data-notify=container][class*=alert-pastel-]{background-color:#1abc9c;color:#FFF}[data-notify=container][class*=alert-pastel-] .close{opacity:1;color:#FFF;margin-top:7px;outline:0}.control-label,.input-group input[type=checkbox]{margin-top:10px}[data-notify=container][class*=alert-pastel-] .close:hover{color:#FFF}body{background-color:#fff}#colorPickerInput{width:287px;border-top-right-radius:0!important;border-bottom-right-radius:0!important}#colorPickerButton{padding-top:10px}.form-control:focus{border:2px solid #1abc9c;color:#2f4154}.cy-panzoom{right:120px;z-index:100}.cytoscape-navigatorView{background:#1abc9c}.cytoscape-navigator-wrapper{position:absolute;border:2px solid #2F4154;border-radius:6px;background:#fff;z-index:100;width:300px;height:200px;bottom:8.5%;right:3.5%;overflow:hidden}.btn:focus{outline:0!important}.pathwayPanel .fileNameContent{color:#2f4154;margin-bottom:10px;padding:5px;cursor:pointer;min-width:100px}.pathwayPanel div[contenteditable=true]:focus{outline:#1abc9c solid 2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px #1abc9c;background-color:#fff}.pathwayPanel textarea{width:170px;height:50px;margin-bottom:10px;z-index:999999}.mainContentWrapper{display:flex}.sideBarWrapper{min-width:130px;max-width:130px;font-size:12px}.control-label{text-align:left;color:rgba(23,22,22,.78)!important;font-weight:300!important}.buttonContainer,.edgePaletteWrapper,.pnl .pnl-header{text-align:center}.input-group{margin-bottom:5px;width:100%}.input-group .form-control{border-radius:6px!important}.edgePaletteWrapper .list-group{margin-bottom:0!important}.edgePaletteWrapper .list-group .list-group-item{border:none!important}.edgePaletteWrapper .edge-palette .list-group-item.active,.edgePaletteWrapper .edge-palette .list-group-item.active:focus,.edgePaletteWrapper .edge-palette .list-group-item.active:hover{background-color:#1abc9c!important}.edgePaletteWrapper .edge-palette .list-group-item{padding:7px 5px}.edgePaletteWrapper .edge-palette a{margin-bottom:5px;border-radius:6px;font-size:12px}.edgePaletteWrapper .edge-palette a img{width:30px}footer{background-color:#eee;color:#393939;height:100%}.pageContentWrapper{margin-bottom:70px}.navbar-nav>.open>a,.navbar-nav>.open>a:focus,.navbar-nav>.open>a:hover{color:#fff!important;background-color:#1abc9c!important;border-left-color:transparent}.navbar-nav>.open>.dropdown-menu>li>a{color:#fff!important;border-radius:4px!important;font-size:12px!important}.navbar-nav>.open>.dropdown-menu{background-color:#2f4154!important}.navbar-nav>li>.dropdown-menu,.navbar-nav>li>.dropdown-submenu{border-radius:4px!important;border:none}.navbar-nav>.open>.dropdown-menu>li>a:focus,.navbar-nav>.open>.dropdown-menu>li>a:hover{color:#fff;background-color:#1abc9c}.navbar{border-radius:0 0 6px 6px;background-color:#2f4154;border:none!important;margin-bottom:10px!important}.navbar-nav a{transition:all .2s linear}.navbar-nav>li>a{color:#fff!important;font-weight:500!important;font-size:12px}.navbar-nav>li>a:hover{color:#1abc9c!important}.navbar-brand{color:#fff!important;font-size:16px;font-weight:700}.pnl{margin-bottom:10px;border-radius:6px;box-shadow:0 1px 1px rgba(0,0,0,.15),0 -1px 1px rgba(0,0,0,.15)}.pnl .pnl-header{background-color:#1abc9c;border-top-left-radius:6px;border-top-right-radius:6px;padding:8px 5px 5px;color:#fff;font-size:12px;font-weight:900}.pnl .pnl-body{background-color:#eff0f2;padding:4px 2px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.pnl .pnl-body .buttonContainer>button{border:none!important}.pnl .pnl-body .dragButtonContainer{width:115px;margin-left:auto;margin-right:auto}.customMargins{margin-left:3%!important;margin-right:3%!important}.leftPanelFix{padding-left:0}.hiddenfile{width:0;height:0;overflow:hidden}.buttonContainer{margin-bottom:5px}.buttonContainer button{font-size:12px;width:85%}.cyContainer{border:3px solid #1abc9c;height:850px;border-radius:6px;padding-right:0!important;padding-left:0!important;width:100%;margin-left:10px}#cy{height:100%}.btn:focus{background-color:#fff!important} \ No newline at end of file + */.animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.animated.infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.animated.hinge{-webkit-animation-duration:2s;animation-duration:2s}.animated.bounceIn,.animated.bounceOut,.animated.flipOutX,.animated.flipOutY{-webkit-animation-duration:.75s;animation-duration:.75s}@-webkit-keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}@keyframes bounce{20%,53%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1);-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}40%,43%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-30px,0);transform:translate3d(0,-30px,0)}70%{-webkit-animation-timing-function:cubic-bezier(.755,.05,.855,.06);animation-timing-function:cubic-bezier(.755,.05,.855,.06);-webkit-transform:translate3d(0,-15px,0);transform:translate3d(0,-15px,0)}90%{-webkit-transform:translate3d(0,-4px,0);transform:translate3d(0,-4px,0)}}.bounce{-webkit-animation-name:bounce;animation-name:bounce;-webkit-transform-origin:center bottom;transform-origin:center bottom}@-webkit-keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}@keyframes flash{50%,from,to{opacity:1}25%,75%{opacity:0}}.flash{-webkit-animation-name:flash;animation-name:flash}@-webkit-keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}@keyframes pulse{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}50%{-webkit-transform:scale3d(1.05,1.05,1.05);transform:scale3d(1.05,1.05,1.05)}}.pulse{-webkit-animation-name:pulse;animation-name:pulse}@-webkit-keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}@keyframes rubberBand{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}30%{-webkit-transform:scale3d(1.25,.75,1);transform:scale3d(1.25,.75,1)}40%{-webkit-transform:scale3d(.75,1.25,1);transform:scale3d(.75,1.25,1)}50%{-webkit-transform:scale3d(1.15,.85,1);transform:scale3d(1.15,.85,1)}65%{-webkit-transform:scale3d(.95,1.05,1);transform:scale3d(.95,1.05,1)}75%{-webkit-transform:scale3d(1.05,.95,1);transform:scale3d(1.05,.95,1)}}.rubberBand{-webkit-animation-name:rubberBand;animation-name:rubberBand}@-webkit-keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}@keyframes shake{from,to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}10%,30%,50%,70%,90%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}20%,40%,60%,80%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}}.shake{-webkit-animation-name:shake;animation-name:shake}@-webkit-keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}@keyframes headShake{0%{-webkit-transform:translateX(0);transform:translateX(0)}6.5%{-webkit-transform:translateX(-6px) rotateY(-9deg);transform:translateX(-6px) rotateY(-9deg)}18.5%{-webkit-transform:translateX(5px) rotateY(7deg);transform:translateX(5px) rotateY(7deg)}31.5%{-webkit-transform:translateX(-3px) rotateY(-5deg);transform:translateX(-3px) rotateY(-5deg)}43.5%{-webkit-transform:translateX(2px) rotateY(3deg);transform:translateX(2px) rotateY(3deg)}50%{-webkit-transform:translateX(0);transform:translateX(0)}}.headShake{-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;-webkit-animation-name:headShake;animation-name:headShake}@-webkit-keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}@keyframes swing{20%{-webkit-transform:rotate3d(0,0,1,15deg);transform:rotate3d(0,0,1,15deg)}40%{-webkit-transform:rotate3d(0,0,1,-10deg);transform:rotate3d(0,0,1,-10deg)}60%{-webkit-transform:rotate3d(0,0,1,5deg);transform:rotate3d(0,0,1,5deg)}80%{-webkit-transform:rotate3d(0,0,1,-5deg);transform:rotate3d(0,0,1,-5deg)}to{-webkit-transform:rotate3d(0,0,1,0deg);transform:rotate3d(0,0,1,0deg)}}.swing{-webkit-transform-origin:top center;transform-origin:top center;-webkit-animation-name:swing;animation-name:swing}@-webkit-keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}@keyframes tada{from,to{-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}10%,20%{-webkit-transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg);transform:scale3d(.9,.9,.9) rotate3d(0,0,1,-3deg)}30%,50%,70%,90%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,3deg)}40%,60%,80%{-webkit-transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg);transform:scale3d(1.1,1.1,1.1) rotate3d(0,0,1,-3deg)}}.tada{-webkit-animation-name:tada;animation-name:tada}@-webkit-keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}@keyframes wobble{from,to{-webkit-transform:none;transform:none}15%{-webkit-transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg);transform:translate3d(-25%,0,0) rotate3d(0,0,1,-5deg)}30%{-webkit-transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg);transform:translate3d(20%,0,0) rotate3d(0,0,1,3deg)}45%{-webkit-transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg);transform:translate3d(-15%,0,0) rotate3d(0,0,1,-3deg)}60%{-webkit-transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg);transform:translate3d(10%,0,0) rotate3d(0,0,1,2deg)}75%{-webkit-transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg);transform:translate3d(-5%,0,0) rotate3d(0,0,1,-1deg)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble}@-webkit-keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.39062deg) skewY(.39062deg);transform:skewX(.39062deg) skewY(.39062deg)}88.8%{-webkit-transform:skewX(-.19531deg) skewY(-.19531deg);transform:skewX(-.19531deg) skewY(-.19531deg)}}@keyframes jello{11.1%,from,to{-webkit-transform:none;transform:none}22.2%{-webkit-transform:skewX(-12.5deg) skewY(-12.5deg);transform:skewX(-12.5deg) skewY(-12.5deg)}33.3%{-webkit-transform:skewX(6.25deg) skewY(6.25deg);transform:skewX(6.25deg) skewY(6.25deg)}44.4%{-webkit-transform:skewX(-3.125deg) skewY(-3.125deg);transform:skewX(-3.125deg) skewY(-3.125deg)}55.5%{-webkit-transform:skewX(1.5625deg) skewY(1.5625deg);transform:skewX(1.5625deg) skewY(1.5625deg)}66.6%{-webkit-transform:skewX(-.78125deg) skewY(-.78125deg);transform:skewX(-.78125deg) skewY(-.78125deg)}77.7%{-webkit-transform:skewX(.39062deg) skewY(.39062deg);transform:skewX(.39062deg) skewY(.39062deg)}88.8%{-webkit-transform:skewX(-.19531deg) skewY(-.19531deg);transform:skewX(-.19531deg) skewY(-.19531deg)}}.jello{-webkit-animation-name:jello;animation-name:jello;-webkit-transform-origin:center;transform-origin:center}@-webkit-keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}@keyframes bounceIn{20%,40%,60%,80%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}20%{-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}40%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}60%{opacity:1;-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}80%{-webkit-transform:scale3d(.97,.97,.97);transform:scale3d(.97,.97,.97)}to{opacity:1;-webkit-transform:scale3d(1,1,1);transform:scale3d(1,1,1)}}.bounceIn{-webkit-animation-name:bounceIn;animation-name:bounceIn}@-webkit-keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInDown{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(0,-3000px,0);transform:translate3d(0,-3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,25px,0);transform:translate3d(0,25px,0)}75%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}90%{-webkit-transform:translate3d(0,5px,0);transform:translate3d(0,5px,0)}to{-webkit-transform:none;transform:none}}.bounceInDown{-webkit-animation-name:bounceInDown;animation-name:bounceInDown}@-webkit-keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInLeft{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{opacity:0;-webkit-transform:translate3d(-3000px,0,0);transform:translate3d(-3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(25px,0,0);transform:translate3d(25px,0,0)}75%{-webkit-transform:translate3d(-10px,0,0);transform:translate3d(-10px,0,0)}90%{-webkit-transform:translate3d(5px,0,0);transform:translate3d(5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInLeft{-webkit-animation-name:bounceInLeft;animation-name:bounceInLeft}@-webkit-keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}@keyframes bounceInRight{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(3000px,0,0);transform:translate3d(3000px,0,0)}60%{opacity:1;-webkit-transform:translate3d(-25px,0,0);transform:translate3d(-25px,0,0)}75%{-webkit-transform:translate3d(10px,0,0);transform:translate3d(10px,0,0)}90%{-webkit-transform:translate3d(-5px,0,0);transform:translate3d(-5px,0,0)}to{-webkit-transform:none;transform:none}}.bounceInRight{-webkit-animation-name:bounceInRight;animation-name:bounceInRight}@-webkit-keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes bounceInUp{60%,75%,90%,from,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}from{opacity:0;-webkit-transform:translate3d(0,3000px,0);transform:translate3d(0,3000px,0)}60%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}75%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}90%{-webkit-transform:translate3d(0,-5px,0);transform:translate3d(0,-5px,0)}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.bounceInUp{-webkit-animation-name:bounceInUp;animation-name:bounceInUp}@-webkit-keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}@keyframes bounceOut{20%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}50%,55%{opacity:1;-webkit-transform:scale3d(1.1,1.1,1.1);transform:scale3d(1.1,1.1,1.1)}to{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}}.bounceOut{-webkit-animation-name:bounceOut;animation-name:bounceOut}@-webkit-keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes bounceOutDown{20%{-webkit-transform:translate3d(0,10px,0);transform:translate3d(0,10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.bounceOutDown{-webkit-animation-name:bounceOutDown;animation-name:bounceOutDown}@-webkit-keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes bounceOutLeft{20%{opacity:1;-webkit-transform:translate3d(20px,0,0);transform:translate3d(20px,0,0)}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.bounceOutLeft{-webkit-animation-name:bounceOutLeft;animation-name:bounceOutLeft}@-webkit-keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes bounceOutRight{20%{opacity:1;-webkit-transform:translate3d(-20px,0,0);transform:translate3d(-20px,0,0)}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.bounceOutRight{-webkit-animation-name:bounceOutRight;animation-name:bounceOutRight}@-webkit-keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes bounceOutUp{20%{-webkit-transform:translate3d(0,-10px,0);transform:translate3d(0,-10px,0)}40%,45%{opacity:1;-webkit-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0)}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.bounceOutUp{-webkit-animation-name:bounceOutUp;animation-name:bounceOutUp}@-webkit-keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}.fadeIn{-webkit-animation-name:fadeIn;animation-name:fadeIn}@-webkit-keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDown{-webkit-animation-name:fadeInDown;animation-name:fadeInDown}@-webkit-keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInDownBig{from{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInDownBig{-webkit-animation-name:fadeInDownBig;animation-name:fadeInDownBig}@-webkit-keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeft{from{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeft{-webkit-animation-name:fadeInLeft;animation-name:fadeInLeft}@-webkit-keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInLeftBig{from{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInLeftBig{-webkit-animation-name:fadeInLeftBig;animation-name:fadeInLeftBig}@-webkit-keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRight{from{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRight{-webkit-animation-name:fadeInRight;animation-name:fadeInRight}@-webkit-keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInRightBig{from{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInRightBig{-webkit-animation-name:fadeInRightBig;animation-name:fadeInRightBig}@-webkit-keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUp{from{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUp{-webkit-animation-name:fadeInUp;animation-name:fadeInUp}@-webkit-keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes fadeInUpBig{from{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}to{opacity:1;-webkit-transform:none;transform:none}}.fadeInUpBig{-webkit-animation-name:fadeInUpBig;animation-name:fadeInUpBig}@-webkit-keyframes fadeOut{from{opacity:1}to{opacity:0}}@keyframes fadeOut{from{opacity:1}to{opacity:0}}.fadeOut{-webkit-animation-name:fadeOut;animation-name:fadeOut}@-webkit-keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes fadeOutDown{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.fadeOutDown{-webkit-animation-name:fadeOutDown;animation-name:fadeOutDown}@-webkit-keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}@keyframes fadeOutDownBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,2000px,0);transform:translate3d(0,2000px,0)}}.fadeOutDownBig{-webkit-animation-name:fadeOutDownBig;animation-name:fadeOutDownBig}@-webkit-keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes fadeOutLeft{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.fadeOutLeft{-webkit-animation-name:fadeOutLeft;animation-name:fadeOutLeft}@-webkit-keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}@keyframes fadeOutLeftBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(-2000px,0,0);transform:translate3d(-2000px,0,0)}}.fadeOutLeftBig{-webkit-animation-name:fadeOutLeftBig;animation-name:fadeOutLeftBig}@-webkit-keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes fadeOutRight{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.fadeOutRight{-webkit-animation-name:fadeOutRight;animation-name:fadeOutRight}@-webkit-keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}@keyframes fadeOutRightBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(2000px,0,0);transform:translate3d(2000px,0,0)}}.fadeOutRightBig{-webkit-animation-name:fadeOutRightBig;animation-name:fadeOutRightBig}@-webkit-keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes fadeOutUp{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.fadeOutUp{-webkit-animation-name:fadeOutUp;animation-name:fadeOutUp}@-webkit-keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}@keyframes fadeOutUpBig{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-2000px,0);transform:translate3d(0,-2000px,0)}}.fadeOutUpBig{-webkit-animation-name:fadeOutUpBig;animation-name:fadeOutUpBig}@-webkit-keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}@keyframes flip{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,-360deg);transform:perspective(400px) rotate3d(0,1,0,-360deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}40%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-190deg);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}50%{-webkit-transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);transform:perspective(400px) translate3d(0,0,150px) rotate3d(0,1,0,-170deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}80%{-webkit-transform:perspective(400px) scale3d(.95,.95,.95);transform:perspective(400px) scale3d(.95,.95,.95);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}to{-webkit-transform:perspective(400px);transform:perspective(400px);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}}.animated.flip{-webkit-backface-visibility:visible;backface-visibility:visible;-webkit-animation-name:flip;animation-name:flip}@-webkit-keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInX{from{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(1,0,0,10deg);transform:perspective(400px) rotate3d(1,0,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-5deg);transform:perspective(400px) rotate3d(1,0,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInX{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipInX;animation-name:flipInX}.flipInY,.flipOutX{-webkit-backface-visibility:visible!important}@-webkit-keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}@keyframes flipInY{from{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in;opacity:0}40%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-20deg);transform:perspective(400px) rotate3d(0,1,0,-20deg);-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}60%{-webkit-transform:perspective(400px) rotate3d(0,1,0,10deg);transform:perspective(400px) rotate3d(0,1,0,10deg);opacity:1}80%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-5deg);transform:perspective(400px) rotate3d(0,1,0,-5deg)}to{-webkit-transform:perspective(400px);transform:perspective(400px)}}.flipInY{backface-visibility:visible!important;-webkit-animation-name:flipInY;animation-name:flipInY}@-webkit-keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}@keyframes flipOutX{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(1,0,0,-20deg);transform:perspective(400px) rotate3d(1,0,0,-20deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(1,0,0,90deg);transform:perspective(400px) rotate3d(1,0,0,90deg);opacity:0}}.flipOutX{-webkit-animation-name:flipOutX;animation-name:flipOutX;backface-visibility:visible!important}@-webkit-keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}@keyframes flipOutY{from{-webkit-transform:perspective(400px);transform:perspective(400px)}30%{-webkit-transform:perspective(400px) rotate3d(0,1,0,-15deg);transform:perspective(400px) rotate3d(0,1,0,-15deg);opacity:1}to{-webkit-transform:perspective(400px) rotate3d(0,1,0,90deg);transform:perspective(400px) rotate3d(0,1,0,90deg);opacity:0}}.flipOutY{-webkit-backface-visibility:visible!important;backface-visibility:visible!important;-webkit-animation-name:flipOutY;animation-name:flipOutY}@-webkit-keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}@keyframes lightSpeedIn{from{-webkit-transform:translate3d(100%,0,0) skewX(-30deg);transform:translate3d(100%,0,0) skewX(-30deg);opacity:0}60%{-webkit-transform:skewX(20deg);transform:skewX(20deg);opacity:1}80%{-webkit-transform:skewX(-5deg);transform:skewX(-5deg);opacity:1}to{-webkit-transform:none;transform:none;opacity:1}}.lightSpeedIn{-webkit-animation-name:lightSpeedIn;animation-name:lightSpeedIn;-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}@-webkit-keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}@keyframes lightSpeedOut{from{opacity:1}to{-webkit-transform:translate3d(100%,0,0) skewX(30deg);transform:translate3d(100%,0,0) skewX(30deg);opacity:0}}.lightSpeedOut{-webkit-animation-name:lightSpeedOut;animation-name:lightSpeedOut;-webkit-animation-timing-function:ease-in;animation-timing-function:ease-in}@-webkit-keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateIn{from{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,-200deg);transform:rotate3d(0,0,1,-200deg);opacity:0}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:none;transform:none;opacity:1}}.rotateIn{-webkit-animation-name:rotateIn;animation-name:rotateIn}@-webkit-keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownLeft{-webkit-animation-name:rotateInDownLeft;animation-name:rotateInDownLeft}@-webkit-keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInDownRight{-webkit-animation-name:rotateInDownRight;animation-name:rotateInDownRight}@-webkit-keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpLeft{-webkit-animation-name:rotateInUpLeft;animation-name:rotateInUpLeft}@-webkit-keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}@keyframes rotateInUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-90deg);transform:rotate3d(0,0,1,-90deg);opacity:0}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:none;transform:none;opacity:1}}.rotateInUpRight{-webkit-animation-name:rotateInUpRight;animation-name:rotateInUpRight}@-webkit-keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}@keyframes rotateOut{from{-webkit-transform-origin:center;transform-origin:center;opacity:1}to{-webkit-transform-origin:center;transform-origin:center;-webkit-transform:rotate3d(0,0,1,200deg);transform:rotate3d(0,0,1,200deg);opacity:0}}.rotateOut{-webkit-animation-name:rotateOut;animation-name:rotateOut}@-webkit-keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}@keyframes rotateOutDownLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,45deg);transform:rotate3d(0,0,1,45deg);opacity:0}}.rotateOutDownLeft{-webkit-animation-name:rotateOutDownLeft;animation-name:rotateOutDownLeft}@-webkit-keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutDownRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutDownRight{-webkit-animation-name:rotateOutDownRight;animation-name:rotateOutDownRight}@-webkit-keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}@keyframes rotateOutUpLeft{from{-webkit-transform-origin:left bottom;transform-origin:left bottom;opacity:1}to{-webkit-transform-origin:left bottom;transform-origin:left bottom;-webkit-transform:rotate3d(0,0,1,-45deg);transform:rotate3d(0,0,1,-45deg);opacity:0}}.rotateOutUpLeft{-webkit-animation-name:rotateOutUpLeft;animation-name:rotateOutUpLeft}@-webkit-keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}@keyframes rotateOutUpRight{from{-webkit-transform-origin:right bottom;transform-origin:right bottom;opacity:1}to{-webkit-transform-origin:right bottom;transform-origin:right bottom;-webkit-transform:rotate3d(0,0,1,90deg);transform:rotate3d(0,0,1,90deg);opacity:0}}.rotateOutUpRight{-webkit-animation-name:rotateOutUpRight;animation-name:rotateOutUpRight}@-webkit-keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}@keyframes hinge{0%{-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}20%,60%{-webkit-transform:rotate3d(0,0,1,80deg);transform:rotate3d(0,0,1,80deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}40%,80%{-webkit-transform:rotate3d(0,0,1,60deg);transform:rotate3d(0,0,1,60deg);-webkit-transform-origin:top left;transform-origin:top left;-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out;opacity:1}to{-webkit-transform:translate3d(0,700px,0);transform:translate3d(0,700px,0);opacity:0}}.hinge{-webkit-animation-name:hinge;animation-name:hinge}@-webkit-keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}@keyframes rollIn{from{opacity:0;-webkit-transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg);transform:translate3d(-100%,0,0) rotate3d(0,0,1,-120deg)}to{opacity:1;-webkit-transform:none;transform:none}}.rollIn{-webkit-animation-name:rollIn;animation-name:rollIn}@-webkit-keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}@keyframes rollOut{from{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg);transform:translate3d(100%,0,0) rotate3d(0,0,1,120deg)}}.rollOut{-webkit-animation-name:rollOut;animation-name:rollOut}@-webkit-keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}@keyframes zoomIn{from{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}50%{opacity:1}}.zoomIn{-webkit-animation-name:zoomIn;animation-name:zoomIn}@-webkit-keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInDown{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInDown{-webkit-animation-name:zoomInDown;animation-name:zoomInDown}@-webkit-keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInLeft{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(-1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(10px,0,0);transform:scale3d(.475,.475,.475) translate3d(10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInLeft{-webkit-animation-name:zoomInLeft;animation-name:zoomInLeft}@-webkit-keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInRight{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);transform:scale3d(.1,.1,.1) translate3d(1000px,0,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);transform:scale3d(.475,.475,.475) translate3d(-10px,0,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInRight{-webkit-animation-name:zoomInRight;animation-name:zoomInRight}@-webkit-keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomInUp{from{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);transform:scale3d(.1,.1,.1) translate3d(0,1000px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}60%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomInUp{-webkit-animation-name:zoomInUp;animation-name:zoomInUp}@-webkit-keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}@keyframes zoomOut{from{opacity:1}50%{opacity:0;-webkit-transform:scale3d(.3,.3,.3);transform:scale3d(.3,.3,.3)}to{opacity:0}}.zoomOut{-webkit-animation-name:zoomOut;animation-name:zoomOut}@-webkit-keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutDown{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);transform:scale3d(.475,.475,.475) translate3d(0,-60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutDown{-webkit-animation-name:zoomOutDown;animation-name:zoomOutDown}@-webkit-keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}@keyframes zoomOutLeft{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(42px,0,0);transform:scale3d(.475,.475,.475) translate3d(42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(-2000px,0,0);transform:scale(.1) translate3d(-2000px,0,0);-webkit-transform-origin:left center;transform-origin:left center}}.zoomOutLeft{-webkit-animation-name:zoomOutLeft;animation-name:zoomOutLeft}@-webkit-keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}@keyframes zoomOutRight{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(-42px,0,0);transform:scale3d(.475,.475,.475) translate3d(-42px,0,0)}to{opacity:0;-webkit-transform:scale(.1) translate3d(2000px,0,0);transform:scale(.1) translate3d(2000px,0,0);-webkit-transform-origin:right center;transform-origin:right center}}.zoomOutRight{-webkit-animation-name:zoomOutRight;animation-name:zoomOutRight}@-webkit-keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}@keyframes zoomOutUp{40%{opacity:1;-webkit-transform:scale3d(.475,.475,.475) translate3d(0,60px,0);transform:scale3d(.475,.475,.475) translate3d(0,60px,0);-webkit-animation-timing-function:cubic-bezier(.55,.055,.675,.19);animation-timing-function:cubic-bezier(.55,.055,.675,.19)}to{opacity:0;-webkit-transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);transform:scale3d(.1,.1,.1) translate3d(0,-2000px,0);-webkit-transform-origin:center bottom;transform-origin:center bottom;-webkit-animation-timing-function:cubic-bezier(.175,.885,.32,1);animation-timing-function:cubic-bezier(.175,.885,.32,1)}}.zoomOutUp{-webkit-animation-name:zoomOutUp;animation-name:zoomOutUp}@-webkit-keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInDown{from{-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInDown{-webkit-animation-name:slideInDown;animation-name:slideInDown}@-webkit-keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInLeft{from{-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInLeft{-webkit-animation-name:slideInLeft;animation-name:slideInLeft}@-webkit-keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInRight{from{-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInRight{-webkit-animation-name:slideInRight;animation-name:slideInRight}@-webkit-keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes slideInUp{from{-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);visibility:visible}to{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}.slideInUp{-webkit-animation-name:slideInUp;animation-name:slideInUp}@-webkit-keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes slideOutDown{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.slideOutDown{-webkit-animation-name:slideOutDown;animation-name:slideOutDown}@-webkit-keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes slideOutLeft{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.slideOutLeft{-webkit-animation-name:slideOutLeft;animation-name:slideOutLeft}@-webkit-keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes slideOutRight{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.slideOutRight{-webkit-animation-name:slideOutRight;animation-name:slideOutRight}@-webkit-keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes slideOutUp{from{-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}to{visibility:hidden;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.slideOutUp{-webkit-animation-name:slideOutUp;animation-name:slideOutUp}[data-notify=container][class*=alert-pathwayMapper-] .close{opacity:1;color:#FFF;margin-top:7px;outline:0}.control-label,.input-group input[type=checkbox]{margin-top:10px}[data-notify=container][class*=alert-pathwayMapper-] .close:hover{color:#FFF}[data-notify=container].alert-pathwayMapper-success{background-color:#1abc9c;color:#FFF}[data-notify=container].alert-pathwayMapper-fail{background-color:#ff2644;color:#FFF}.gridModal{width:300px!important}body{background-color:#fff}input[type=color]{padding:2px}input[type=color]:hover{cursor:pointer}#colorPickerButton{padding-top:10px}.form-control:focus{border:2px solid #1abc9c;color:#2f4154}.cy-panzoom{right:120px;z-index:100}.cytoscape-navigatorView{background:#1abc9c}.cytoscape-navigator-wrapper{position:absolute;border:2px solid #2F4154;border-radius:6px;background:#fff;z-index:100;width:300px;height:200px;bottom:8.5%;right:3.5%;overflow:hidden}.btn:focus{outline:0!important}.pathwayPanel .fileNameContent{color:#2f4154;margin-bottom:10px;padding:5px;cursor:pointer;min-width:100px}.pathwayPanel div[contenteditable=true]:focus{outline:#1abc9c solid 2px;box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px #1abc9c;background-color:#fff}.pathwayPanel textarea{width:170px;height:50px;margin-bottom:10px;z-index:999999}.mainContentWrapper{display:flex}.sideBarWrapper{min-width:130px;max-width:130px;font-size:12px}.control-label{color:rgba(23,22,22,.78)!important;font-weight:300!important}.buttonContainer,.edgePaletteWrapper,.pnl .pnl-header{text-align:center}.input-group{margin-bottom:5px;width:100%}.input-group .form-control{border-radius:6px!important}.edgePaletteWrapper .list-group{margin-bottom:0!important}.edgePaletteWrapper .list-group .list-group-item{border:none!important}.edgePaletteWrapper .edge-palette .list-group-item.active,.edgePaletteWrapper .edge-palette .list-group-item.active:focus,.edgePaletteWrapper .edge-palette .list-group-item.active:hover{background-color:#1abc9c!important}.edgePaletteWrapper .edge-palette .list-group-item{padding:7px 5px}.edgePaletteWrapper .edge-palette a{margin-bottom:5px;border-radius:6px;font-size:12px}.edgePaletteWrapper .edge-palette a img{width:30px}footer{background-color:#eee;color:#393939;height:100%}.pageContentWrapper{margin-bottom:70px}.navbar-nav>.open>a,.navbar-nav>.open>a:focus,.navbar-nav>.open>a:hover{color:#fff!important;background-color:#1abc9c!important;border-left-color:transparent}.navbar-nav>.open>.dropdown-menu>li>a{color:#fff!important;border-radius:4px!important;font-size:12px!important}.navbar-nav>.open>.dropdown-menu{background-color:#2f4154!important}.navbar-nav>li>.dropdown-menu,.navbar-nav>li>.dropdown-submenu{border-radius:4px!important;border:none}.navbar-nav>.open>.dropdown-menu>li>a:focus,.navbar-nav>.open>.dropdown-menu>li>a:hover{color:#fff;background-color:#1abc9c}.navbar{border-radius:0 0 6px 6px;background-color:#2f4154;border:none!important;margin-bottom:10px!important}.navbar-nav a{transition:all .2s linear}.navbar-nav>li>a{color:#fff!important;font-weight:500!important;font-size:12px}.navbar-nav>li>a:hover{color:#1abc9c!important}.navbar-brand{color:#fff!important;font-size:16px;font-weight:700}.pnl{margin-bottom:10px;border-radius:6px;box-shadow:0 1px 1px rgba(0,0,0,.15),0 -1px 1px rgba(0,0,0,.15)}.pnl .pnl-header{background-color:#1abc9c;border-top-left-radius:6px;border-top-right-radius:6px;padding:8px 5px 5px;color:#fff;font-size:12px;font-weight:900}.pnl .pnl-body{background-color:#eff0f2;padding:4px 2px;border-bottom-left-radius:6px;border-bottom-right-radius:6px}.pnl .pnl-body .buttonContainer>button{border:none!important}.pnl .pnl-body .dragButtonContainer{width:115px;margin-left:auto;margin-right:auto}.customMargins{margin-left:3%!important;margin-right:3%!important}.leftPanelFix{padding-left:0}.hiddenfile{width:0;height:0;overflow:hidden}.buttonContainer{margin-bottom:5px}.buttonContainer button{font-size:12px;width:85%}.cyContainer{border:3px solid #1abc9c;height:850px;border-radius:6px;padding-right:0!important;padding-left:0!important;width:100%;margin-left:10px}#cy{height:100%}.btn:focus{background-color:#fff!important} \ No newline at end of file diff --git a/public/bin/base.min.js b/public/bin/base.min.js index 5368a545..2f29863a 100644 --- a/public/bin/base.min.js +++ b/public/bin/base.min.js @@ -22,12 +22,12 @@ start.select()}else{if(start.selected()){start.unselect()}else{start.select()}}r }};module.exports=CRp},{"../../../is":114}],101:[function(require,module,exports){"use strict";var CRp={};var util=require("../../../util");var motionBlurDelay=100;CRp.getPixelRatio=function(){var context=this.data.contexts[0];if(this.forcedPixelRatio!=null){return this.forcedPixelRatio}var backingStore=context.backingStorePixelRatio||context.webkitBackingStorePixelRatio||context.mozBackingStorePixelRatio||context.msBackingStorePixelRatio||context.oBackingStorePixelRatio||context.backingStorePixelRatio||1;return(window.devicePixelRatio||1)/backingStore};CRp.paintCache=function(context){var caches=this.paintCaches=this.paintCaches||[];var needToCreateCache=true;var cache;for(var i=0;i0){context.shadowBlur=blur*zoom;context.shadowColor="rgba("+color[0]+","+color[1]+","+color[2]+","+opacity+")";context.shadowOffsetX=offsetX*zoom;context.shadowOffsetY=offsetY*zoom}else{context.shadowBlur=0;context.shadowColor="transparent";context.shadowOffsetX=0;context.shadowOffsetY=0}};CRp.matchCanvasSize=function(container){var r=this;var data=r.data;var width=container.clientWidth;var height=container.clientHeight;var pixelRatio=r.getPixelRatio();var mbPxRatio=r.motionBlurPxRatio;if(container===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE]||container===r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG]){pixelRatio=mbPxRatio}var canvasWidth=width*pixelRatio;var canvasHeight=height*pixelRatio;var canvas;if(canvasWidth===r.canvasWidth&&canvasHeight===r.canvasHeight){return}r.fontCaches=null;var canvasContainer=data.canvasContainer;canvasContainer.style.width=width+"px";canvasContainer.style.height=height+"px";for(var i=0;ir.minMbLowQualFrames){r.motionBlurPxRatio=r.mbPxRBlurry}}if(r.clearingMotionBlur){r.motionBlurPxRatio=1}if(r.textureDrawLastFrame&&!textureDraw){needDraw[r.NODE]=true;needDraw[r.SELECT_BOX]=true}var coreStyle=cy.style()._private.coreStyle;var zoom=cy.zoom();var effectiveZoom=forcedZoom!==undefined?forcedZoom:zoom;var pan=cy.pan();var effectivePan={x:pan.x,y:pan.y};var vp={zoom:zoom,pan:{x:pan.x,y:pan.y}};var prevVp=r.prevViewport;var viewportIsDiff=prevVp===undefined||vp.zoom!==prevVp.zoom||vp.pan.x!==prevVp.pan.x||vp.pan.y!==prevVp.pan.y;if(!viewportIsDiff&&!(inNodeDragGesture&&!hasCompoundNodes)){r.motionBlurPxRatio=1}if(forcedPan){effectivePan=forcedPan}effectiveZoom*=pixelRatio;effectivePan.x*=pixelRatio;effectivePan.y*=pixelRatio;var eles=r.getCachedZSortedEles();function mbclear(context,x,y,w,h){var gco=context.globalCompositeOperation;context.globalCompositeOperation="destination-out";r.fillStyle(context,255,255,255,r.motionBlurTransparency);context.fillRect(x,y,w,h);context.globalCompositeOperation=gco}function setContextTransform(context,clear){var ePan,eZoom,w,h;if(!r.clearingMotionBlur&&(context===data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]||context===data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG])){ePan={x:pan.x*mbPxRatio,y:pan.y*mbPxRatio};eZoom=zoom*mbPxRatio;w=r.canvasWidth*mbPxRatio;h=r.canvasHeight*mbPxRatio}else{ePan=effectivePan;eZoom=effectiveZoom;w=r.canvasWidth;h=r.canvasHeight}context.setTransform(1,0,0,1,0,0);if(clear==="motionBlur"){mbclear(context,0,0,w,h)}else if(!forcedContext&&(clear===undefined||clear)){context.clearRect(0,0,w,h)}if(!drawAllLayers){context.translate(ePan.x,ePan.y);context.scale(eZoom,eZoom)}if(forcedPan){context.translate(forcedPan.x,forcedPan.y)}if(forcedZoom){context.scale(forcedZoom,forcedZoom)}}if(!textureDraw){r.textureDrawLastFrame=false}if(textureDraw){r.textureDrawLastFrame=true;var bb;if(!r.textureCache){r.textureCache={};bb=r.textureCache.bb=cy.mutableElements().boundingBox();r.textureCache.texture=r.data.bufferCanvases[r.TEXTURE_BUFFER];var cxt=r.data.bufferContexts[r.TEXTURE_BUFFER];cxt.setTransform(1,0,0,1,0,0);cxt.clearRect(0,0,r.canvasWidth*r.textureMult,r.canvasHeight*r.textureMult);r.render({forcedContext:cxt,drawOnlyNodeLayer:true,forcedPxRatio:pixelRatio*r.textureMult});var vp=r.textureCache.viewport={zoom:cy.zoom(),pan:cy.pan(),width:r.canvasWidth,height:r.canvasHeight};vp.mpan={x:(0-vp.pan.x)/vp.zoom,y:(0-vp.pan.y)/vp.zoom}}needDraw[r.DRAG]=false;needDraw[r.NODE]=false;var context=data.contexts[r.NODE];var texture=r.textureCache.texture;var vp=r.textureCache.viewport;bb=r.textureCache.bb;context.setTransform(1,0,0,1,0,0);if(motionBlur){mbclear(context,0,0,vp.width,vp.height)}else{context.clearRect(0,0,vp.width,vp.height)}var outsideBgColor=coreStyle["outside-texture-bg-color"].value;var outsideBgOpacity=coreStyle["outside-texture-bg-opacity"].value;r.fillStyle(context,outsideBgColor[0],outsideBgColor[1],outsideBgColor[2],outsideBgOpacity);context.fillRect(0,0,vp.width,vp.height);var zoom=cy.zoom();setContextTransform(context,false);context.clearRect(vp.mpan.x,vp.mpan.y,vp.width/vp.zoom/pixelRatio,vp.height/vp.zoom/pixelRatio);context.drawImage(texture,vp.mpan.x,vp.mpan.y,vp.width/vp.zoom/pixelRatio,vp.height/vp.zoom/pixelRatio)}else if(r.textureOnViewport&&!forcedContext){r.textureCache=null}var extent=cy.extent();var vpManip=r.pinching||r.hoverData.dragging||r.swipePanning||r.data.wheelZooming||r.hoverData.draggingEles;var hideEdges=r.hideEdgesOnViewport&&vpManip;var needMbClear=[];needMbClear[r.NODE]=!needDraw[r.NODE]&&motionBlur&&!r.clearedForMotionBlur[r.NODE]||r.clearingMotionBlur;if(needMbClear[r.NODE]){r.clearedForMotionBlur[r.NODE]=true}needMbClear[r.DRAG]=!needDraw[r.DRAG]&&motionBlur&&!r.clearedForMotionBlur[r.DRAG]||r.clearingMotionBlur;if(needMbClear[r.DRAG]){r.clearedForMotionBlur[r.DRAG]=true}if(needDraw[r.NODE]||drawAllLayers||drawOnlyNodeLayer||needMbClear[r.NODE]){var useBuffer=motionBlur&&!needMbClear[r.NODE]&&mbPxRatio!==1;var context=forcedContext||(useBuffer?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_NODE]:data.contexts[r.NODE]);var clear=motionBlur&&!useBuffer?"motionBlur":undefined;setContextTransform(context,clear);if(hideEdges){r.drawCachedNodes(context,eles.nondrag,pixelRatio,extent)}else{r.drawLayeredElements(context,eles.nondrag,pixelRatio,extent)}if(!drawAllLayers&&!motionBlur){needDraw[r.NODE]=false}}if(!drawOnlyNodeLayer&&(needDraw[r.DRAG]||drawAllLayers||needMbClear[r.DRAG])){var useBuffer=motionBlur&&!needMbClear[r.DRAG]&&mbPxRatio!==1;var context=forcedContext||(useBuffer?r.data.bufferContexts[r.MOTIONBLUR_BUFFER_DRAG]:data.contexts[r.DRAG]);setContextTransform(context,motionBlur&&!useBuffer?"motionBlur":undefined);if(hideEdges){r.drawCachedNodes(context,eles.drag,pixelRatio,extent)}else{r.drawCachedElements(context,eles.drag,pixelRatio,extent)}if(!drawAllLayers&&!motionBlur){needDraw[r.DRAG]=false}}if(r.showFps||!drawOnlyNodeLayer&&(needDraw[r.SELECT_BOX]&&!drawAllLayers)){var context=forcedContext||data.contexts[r.SELECT_BOX];setContextTransform(context);if(r.selection[4]==1&&(r.hoverData.selecting||r.touchData.selecting)){var zoom=r.cy.zoom();var borderWidth=coreStyle["selection-box-border-width"].value/zoom;context.lineWidth=borderWidth;context.fillStyle="rgba("+coreStyle["selection-box-color"].value[0]+","+coreStyle["selection-box-color"].value[1]+","+coreStyle["selection-box-color"].value[2]+","+coreStyle["selection-box-opacity"].value+")";context.fillRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1]);if(borderWidth>0){context.strokeStyle="rgba("+coreStyle["selection-box-border-color"].value[0]+","+coreStyle["selection-box-border-color"].value[1]+","+coreStyle["selection-box-border-color"].value[2]+","+coreStyle["selection-box-opacity"].value+")";context.strokeRect(r.selection[0],r.selection[1],r.selection[2]-r.selection[0],r.selection[3]-r.selection[1])}}if(data.bgActivePosistion&&!r.hoverData.selecting){var zoom=r.cy.zoom();var pos=data.bgActivePosistion;context.fillStyle="rgba("+coreStyle["active-bg-color"].value[0]+","+coreStyle["active-bg-color"].value[1]+","+coreStyle["active-bg-color"].value[2]+","+coreStyle["active-bg-opacity"].value+")";context.beginPath();context.arc(pos.x,pos.y,coreStyle["active-bg-size"].pfValue/zoom,0,2*Math.PI);context.fill()}var timeToRender=r.lastRedrawTime;if(r.showFps&&timeToRender){timeToRender=Math.round(timeToRender);var fps=Math.round(1e3/timeToRender);context.setTransform(1,0,0,1,0,0);context.fillStyle="rgba(255, 0, 0, 0.75)";context.strokeStyle="rgba(255, 0, 0, 0.75)";context.lineWidth=1;context.fillText("1 frame = "+timeToRender+" ms = "+fps+" fps",0,20);var maxFps=60;context.strokeRect(0,30,250,20);context.fillRect(0,30,250*Math.min(fps/maxFps,1),20)}if(!drawAllLayers){needDraw[r.SELECT_BOX]=false}}if(motionBlur&&mbPxRatio!==1){var cxtNode=data.contexts[r.NODE];var txtNode=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_NODE];var cxtDrag=data.contexts[r.DRAG];var txtDrag=r.data.bufferCanvases[r.MOTIONBLUR_BUFFER_DRAG];var drawMotionBlur=function(cxt,txt,needClear){cxt.setTransform(1,0,0,1,0,0);if(needClear||!motionBlurFadeEffect){cxt.clearRect(0,0,r.canvasWidth,r.canvasHeight)}else{mbclear(cxt,0,0,r.canvasWidth,r.canvasHeight)}var pxr=mbPxRatio;cxt.drawImage(txt,0,0,r.canvasWidth*pxr,r.canvasHeight*pxr,0,0,r.canvasWidth,r.canvasHeight)};if(needDraw[r.NODE]||needMbClear[r.NODE]){drawMotionBlur(cxtNode,txtNode,needMbClear[r.NODE]);needDraw[r.NODE]=false}if(needDraw[r.DRAG]||needMbClear[r.DRAG]){drawMotionBlur(cxtDrag,txtDrag,needMbClear[r.DRAG]);needDraw[r.DRAG]=false}}r.prevViewport=vp;if(r.clearingMotionBlur){r.clearingMotionBlur=false;r.motionBlurCleared=true;r.motionBlur=true}if(motionBlur){r.motionBlurTimeout=setTimeout(function(){r.motionBlurTimeout=null;r.clearedForMotionBlur[r.NODE]=false;r.clearedForMotionBlur[r.DRAG]=false;r.motionBlur=false;r.clearingMotionBlur=!textureDraw;r.mbFrames=0;needDraw[r.NODE]=true;needDraw[r.DRAG]=true;r.redraw()},motionBlurDelay)}r.drawingImage=false;if(!forcedContext&&!r.initrender){r.initrender=true;cy.trigger("initrender")}if(!forcedContext){cy.trigger("render")}};module.exports=CRp},{"../../../util":131}],102:[function(require,module,exports){"use strict";var math=require("../../../math");var CRp={};CRp.drawPolygonPath=function(context,x,y,width,height,points){var halfW=width/2;var halfH=height/2;if(context.beginPath){context.beginPath()}context.moveTo(x+halfW*points[0],y+halfH*points[1]);for(var i=1;i=maxZoom||lvl>maxLvl){return null}var scale=Math.pow(2,lvl);var eleScaledH=bb.h*scale;var eleScaledW=bb.w*scale;var caches=rs.imgCaches=rs.imgCaches||{};var eleCache=caches[lvl];if(eleCache){return eleCache}var txrH;if(eleScaledH<=minTxrH){txrH=minTxrH}else if(eleScaledH<=txrStepH){txrH=txrStepH}else{txrH=Math.ceil(eleScaledH/txrStepH)*txrStepH}if(eleScaledH>maxTxrH||eleScaledW>maxTxrW||!allowEdgeTxrCaching&&ele.isEdge()||!allowParentTxrCaching&&ele.isParent()){return null}var txrQ=self.getTextureQueue(txrH);var txr=txrQ[txrQ.length-2];var addNewTxr=function(){return self.recycleTexture(txrH,eleScaledW)||self.addTexture(txrH,eleScaledW)};if(!txr){txr=txrQ[txrQ.length-1]}if(!txr){txr=addNewTxr()}if(txr.width-txr.usedWidthlvl;l--){oneUpCache=self.getElement(ele,bb,pxRatio,l,getTxrReasons.downscale)}downscale()}else{self.queueElement(ele,bb,higherCache.level-1);return higherCache}}else{var lowerCache;if(!deqing&&!highQualityReq&&!downscaleReq){for(var l=lvl-1;l>=minLvl;l--){var c=caches[l];if(c){lowerCache=c;break}}}if(scalableFrom(lowerCache)){self.queueElement(ele,bb,lvl);return lowerCache}txr.context.translate(txr.usedWidth,0);txr.context.scale(scale,scale);r.drawElement(txr.context,ele,bb,scaledLabelShown);txr.context.scale(1/scale,1/scale);txr.context.translate(-txr.usedWidth,0)}eleCache=caches[lvl]={ele:ele,x:txr.usedWidth,texture:txr,level:lvl,scale:scale,width:eleScaledW,height:eleScaledH,scaledLabelShown:scaledLabelShown};txr.usedWidth+=Math.ceil(eleScaledW+eleTxrSpacing);txr.eleCaches.push(eleCache);self.checkTextureFullness(txr);return eleCache};ETCp.invalidateElement=function(ele){var self=this;var caches=ele._private.rscratch.imgCaches;if(caches){for(var lvl=minLvl;lvl<=maxLvl;lvl++){var cache=caches[lvl];if(cache){var txr=cache.texture;txr.invalidatedWidth+=cache.width;caches[lvl]=null;util.removeFromArray(txr.eleCaches,cache);self.checkTextureUtility(txr)}}}};ETCp.checkTextureUtility=function(txr){if(txr.invalidatedWidth>=minUtility*txr.width){this.retireTexture(txr)}};ETCp.checkTextureFullness=function(txr){var self=this;var txrQ=self.getTextureQueue(txr.height);if(txr.usedWidth/txr.width>maxFullness&&txr.fullnessChecks>=maxFullnessChecks){util.removeFromArray(txrQ,txr)}else{txr.fullnessChecks++}};ETCp.retireTexture=function(txr){var self=this;var txrH=txr.height;var txrQ=self.getTextureQueue(txrH);util.removeFromArray(txrQ,txr);txr.retired=true;var eleCaches=txr.eleCaches;for(var i=0;i=minW){txr.retired=false;txr.usedWidth=0;txr.invalidatedWidth=0;txr.fullnessChecks=0;util.clearArray(txr.eleCaches);txr.context.clearRect(0,0,txr.width,txr.height);util.removeFromArray(rtxtrQ,txr);txrQ.push(txr);return txr}}};ETCp.queueElement=function(ele,bb,lvl){var self=this;var q=self.getElementQueue();var id2q=self.getElementIdToQueue();var id=ele.id();var existingReq=id2q[id];if(existingReq){existingReq.level=Math.max(existingReq.level,lvl);existingReq.reqs++;q.updateItem(existingReq)}else{var req={ele:ele,bb:bb,position:math.copyPosition(ele.position()),level:lvl,reqs:1};if(ele.isEdge()){req.positions={source:math.copyPosition(ele.source().position()),target:math.copyPosition(ele.target().position())}}q.push(req);id2q[id]=req}};ETCp.dequeue=function(pxRatio,extent){var self=this;var q=self.getElementQueue();var id2q=self.getElementIdToQueue();var dequeued=[];for(var i=0;i0){var req=q.pop();id2q[req.ele.id()]=null;dequeued.push(req);var ele=req.ele;var bb;if(ele.isEdge()&&(!math.arePositionsSame(ele.source().position(),req.positions.source)||!math.arePositionsSame(ele.target().position(),req.positions.target))||!math.arePositionsSame(ele.position(),req.position)){bb=ele.boundingBox()}else{bb=req.bb}self.getElement(req.ele,bb,pxRatio,req.level,getTxrReasons.dequeue)}else{break}}return dequeued};ETCp.onDequeue=function(fn){this.onDequeues.push(fn)};ETCp.offDequeue=function(fn){util.removeFromArray(this.onDequeues,fn)};ETCp.setupDequeueing=defs.setupDequeueing({deqRedrawThreshold:deqRedrawThreshold,deqCost:deqCost,deqAvgCost:deqAvgCost,deqNoDrawCost:deqNoDrawCost,deqFastCost:deqFastCost,deq:function(self,pxRatio,extent){return self.dequeue(pxRatio,extent)},onDeqd:function(self,deqd){for(var i=0;i0&&height>0){buffCxt.clearRect(0,0,width,height);if(options.bg){buffCxt.fillStyle=options.bg;buffCxt.rect(0,0,width,height);buffCxt.fill()}buffCxt.globalCompositeOperation="source-over";var zsortedEles=this.getCachedZSortedEles();if(options.full){buffCxt.translate(-bb.x1*scale,-bb.y1*scale);buffCxt.scale(scale,scale);this.drawElements(buffCxt,zsortedEles)}else{var pan=cy.pan();var translation={x:pan.x*scale,y:pan.y*scale};scale*=cy.zoom();buffCxt.translate(translation.x,translation.y);buffCxt.scale(scale,scale);this.drawElements(buffCxt,zsortedEles)}}return buffCanvas};CRp.png=function(options){return this.bufferCanvasImage(options).toDataURL("image/png")};CRp.jpg=function(options){return this.bufferCanvasImage(options).toDataURL("image/jpeg")};module.exports=CRp},{"../../../is":114}],105:[function(require,module,exports){"use strict";var util=require("../../../util");var is=require("../../../is");var ElementTextureCache=require("./ele-texture-cache");var LayeredTextureCache=require("./layered-texture-cache");var CR=CanvasRenderer;var CRp=CanvasRenderer.prototype;CRp.CANVAS_LAYERS=3;CRp.SELECT_BOX=0;CRp.DRAG=1;CRp.NODE=2;CRp.BUFFER_COUNT=3;CRp.TEXTURE_BUFFER=0;CRp.MOTIONBLUR_BUFFER_NODE=1;CRp.MOTIONBLUR_BUFFER_DRAG=2;function CanvasRenderer(options){var r=this;r.data={canvases:new Array(CRp.CANVAS_LAYERS),contexts:new Array(CRp.CANVAS_LAYERS),canvasNeedsRedraw:new Array(CRp.CANVAS_LAYERS),bufferCanvases:new Array(CRp.BUFFER_COUNT),bufferContexts:new Array(CRp.CANVAS_LAYERS)};r.data.canvasContainer=document.createElement("div");var containerStyle=r.data.canvasContainer.style;r.data.canvasContainer.setAttribute("style","-webkit-tap-highlight-color: rgba(0,0,0,0);");containerStyle.position="relative";containerStyle.zIndex="0";containerStyle.overflow="hidden";var container=options.cy.container();container.appendChild(r.data.canvasContainer);container.setAttribute("style",(container.getAttribute("style")||"")+"-webkit-tap-highlight-color: rgba(0,0,0,0);");for(var i=0;i0){r.data.lyrTxrCache.invalidateElements(eles)}})}CRp.redrawHint=function(group,bool){var r=this;switch(group){case"eles":r.data.canvasNeedsRedraw[CRp.NODE]=bool;break;case"drag":r.data.canvasNeedsRedraw[CRp.DRAG]=bool;break;case"select":r.data.canvasNeedsRedraw[CRp.SELECT_BOX]=bool;break}};var pathsImpld=typeof Path2D!=="undefined";CRp.path2dEnabled=function(on){if(on===undefined){return this.pathsEnabled}this.pathsEnabled=on?true:false};CRp.usePaths=function(){return pathsImpld&&this.pathsEnabled};[require("./arrow-shapes"),require("./drawing-elements"),require("./drawing-edges"),require("./drawing-images"),require("./drawing-label-text"),require("./drawing-nodes"),require("./drawing-redraw"),require("./drawing-shapes"),require("./export-image"),require("./node-shapes")].forEach(function(props){util.extend(CRp,props)});module.exports=CR},{"../../../is":114,"../../../util":131,"./arrow-shapes":95,"./drawing-edges":96,"./drawing-elements":97,"./drawing-images":98,"./drawing-label-text":99,"./drawing-nodes":100,"./drawing-redraw":101,"./drawing-shapes":102,"./ele-texture-cache":103,"./export-image":104,"./layered-texture-cache":106,"./node-shapes":107}],106:[function(require,module,exports){"use strict";var util=require("../../../util");var math=require("../../../math");var Heap=require("../../../heap");var is=require("../../../is");var defs=require("./texture-cache-defs");var defNumLayers=1;var minLvl=-4;var maxLvl=2;var maxZoom=3.99;var deqRedrawThreshold=50;var refineEleDebounceTime=50;var disableEleImgSmoothing=true;var deqCost=.15;var deqAvgCost=.1;var deqNoDrawCost=.9;var deqFastCost=.9;var maxDeqSize=1;var invalidThreshold=250;var maxLayerArea=4e3*4e3;var alwaysQueue=true;var useHighQualityEleTxrReqs=true;var useEleTxrCaching=true;var LayeredTextureCache=function(renderer,eleTxrCache){var self=this;var r=self.renderer=renderer;self.layersByLevel={};self.firstGet=true;self.lastInvalidationTime=util.performanceNow()-2*invalidThreshold;self.skipping=false;r.beforeRender(function(willDraw,now){if(now-self.lastInvalidationTime<=invalidThreshold){self.skipping=true}else{self.skipping=false}});var qSort=function(a,b){return b.reqs-a.reqs};self.layersQueue=new Heap(qSort);self.eleTxrCache=eleTxrCache;self.setupEleCacheInvalidation();self.setupDequeueing()};var LTCp=LayeredTextureCache.prototype;var layerIdPool=0;var MAX_INT=Math.pow(2,53)-1;LTCp.makeLayer=function(bb,lvl){var scale=Math.pow(2,lvl);var w=Math.ceil(bb.w*scale);var h=Math.ceil(bb.h*scale);var canvas=document.createElement("canvas");canvas.width=w;canvas.height=h;var layer={id:layerIdPool=++layerIdPool%MAX_INT,bb:bb,level:lvl,width:w,height:h,canvas:canvas,context:canvas.getContext("2d"),eles:[],elesQueue:[],reqs:0};var cxt=layer.context;var dx=-layer.bb.x1;var dy=-layer.bb.y1;cxt.scale(scale,scale);cxt.translate(dx,dy);return layer};LTCp.getLayers=function(eles,pxRatio,lvl){var self=this;var r=self.renderer;var cy=r.cy;var zoom=cy.zoom();var firstGet=self.firstGet;self.firstGet=false;if(lvl==null){lvl=Math.ceil(math.log2(zoom*pxRatio));if(lvl=maxZoom||lvl>maxLvl){return null}}self.validateLayersElesOrdering(lvl,eles);var layersByLvl=self.layersByLevel;var scale=Math.pow(2,lvl);var layers=layersByLvl[lvl]=layersByLvl[lvl]||[];var bb;var lvlComplete=self.levelIsComplete(lvl,eles);var tmpLayers;var checkTempLevels=function(){var canUseAsTmpLvl=function(l){self.validateLayersElesOrdering(l,eles);if(self.levelIsComplete(l,eles)){tmpLayers=layersByLvl[l];return true}};var checkLvls=function(dir){if(tmpLayers){return}for(var l=lvl+dir;minLvl<=l&&l<=maxLvl;l+=dir){if(canUseAsTmpLvl(l)){break}}};checkLvls(+1);checkLvls(-1);for(var i=layers.length-1;i>=0;i--){var layer=layers[i];if(layer.invalid){util.removeFromArray(layers,layer)}}};if(!lvlComplete){checkTempLevels()}else{return layers}var getBb=function(){if(!bb){bb=math.makeBoundingBox();for(var i=0;imaxLayerArea){return null}var layer=self.makeLayer(bb,lvl);if(after!=null){var index=layers.indexOf(after)+1;layers.splice(index,0,layer)}else if(opts.insert===undefined||opts.insert){layers.unshift(layer)}return layer};if(self.skipping&&!firstGet){return null}var layer=null;var maxElesPerLayer=eles.length/defNumLayers;var allowLazyQueueing=alwaysQueue&&!firstGet;for(var i=0;i=maxElesPerLayer||!math.boundingBoxInBoundingBox(layer.bb,ele.boundingBox())){layer=makeLayer({insert:true,after:layer});if(!layer){return null}}if(tmpLayers||allowLazyQueueing){self.queueLayer(layer,ele)}else{self.drawEleInLayer(layer,ele,lvl,pxRatio); -}layer.eles.push(ele);caches[lvl]=layer}if(tmpLayers){return tmpLayers}if(allowLazyQueueing){return null}return layers};LTCp.getEleLevelForLayerLevel=function(lvl,pxRatio){return lvl};function imgSmoothing(context,bool){if(context.imageSmoothingEnabled!=null){context.imageSmoothingEnabled=bool}else{context.webkitImageSmoothingEnabled=bool;context.mozImageSmoothingEnabled=bool;context.msImageSmoothingEnabled=bool}}LTCp.drawEleInLayer=function(layer,ele,lvl,pxRatio){var self=this;var r=this.renderer;var context=layer.context;var bb=ele.boundingBox();if(bb.w===0||bb.h===0){return}var eleCache=self.eleTxrCache;var reason=useHighQualityEleTxrReqs?eleCache.reasons.highQuality:undefined;lvl=self.getEleLevelForLayerLevel(lvl,pxRatio);var cache=useEleTxrCaching?eleCache.getElement(ele,bb,null,lvl,reason):null;if(cache){if(disableEleImgSmoothing){imgSmoothing(context,false)}context.drawImage(cache.texture.canvas,cache.x,0,cache.width,cache.height,bb.x1,bb.y1,bb.w,bb.h);if(disableEleImgSmoothing){imgSmoothing(context,true)}}else{r.drawElement(context,ele)}};LTCp.levelIsComplete=function(lvl,eles){var self=this;var layers=self.layersByLevel[lvl];if(!layers||layers.length===0){return false}var numElesInLayers=0;for(var i=0;i0){return false}if(layer.invalid){return false}numElesInLayers+=layer.eles.length}if(numElesInLayers!==eles.length){return false}return true};LTCp.validateLayersElesOrdering=function(lvl,eles){var layers=this.layersByLevel[lvl];if(!layers){return}for(var i=0;i0){haveLayers=true;break}}return haveLayers};LTCp.invalidateElements=function(eles){var self=this;self.lastInvalidationTime=util.performanceNow();if(eles.length===0||!self.haveLayers()){return}self.updateElementsInLayers(eles,function invalAssocLayers(layer,ele,req){self.invalidateLayer(layer)})};LTCp.invalidateLayer=function(layer){this.lastInvalidationTime=util.performanceNow();if(layer.invalid){return}var lvl=layer.level;var eles=layer.eles;var layers=this.layersByLevel[lvl];util.removeFromArray(layers,layer);layer.elesQueue=[];layer.invalid=true;if(layer.replacement){layer.replacement.invalid=true}for(var i=0;i=opts.deqFastCost*timeAvailable){break}}else{if(willDraw){if(duration>=opts.deqCost*renderTime||duration>=opts.deqAvgCost*avgRenderTime){break}}else if(frameDuration>=opts.deqNoDrawCost*fullFpsTime){break}}var thisDeqd=opts.deq(self,pixelRatio,extent);if(thisDeqd.length>0){for(var i=0;i0){opts.onDeqd(self,deqd);if(!willDraw&&opts.shouldRedraw(self,deqd,pixelRatio,extent)){queueRedraw()}}};var priority=opts.priority||util.noop;r.beforeRender(dequeue,priority(self))}}}},{"../../../util":131}],109:[function(require,module,exports){"use strict";module.exports=[{name:"null",impl:require("./null")},{name:"base",impl:require("./base")},{name:"canvas",impl:require("./canvas")}]},{"./base":91,"./canvas":105,"./null":110}],110:[function(require,module,exports){"use strict";function NullRenderer(options){this.options=options;this.notifications=0}var noop=function(){};NullRenderer.prototype={recalculateRenderedStyle:noop,notify:function(){this.notifications++},init:noop};module.exports=NullRenderer},{}],111:[function(require,module,exports){"use strict";var is=require("./is");var util=require("./util");var Thread=require("./thread");var Promise=require("./promise");var define=require("./define");var Fabric=function(N){if(!(this instanceof Fabric)){return new Fabric(N)}this._private={pass:[]};var defN=4;if(is.number(N)){}if(typeof navigator!=="undefined"&&navigator.hardwareConcurrency!=null){N=navigator.hardwareConcurrency}else{try{N=require("os").cpus().length}catch(err){N=defN}}for(var i=0;ib){return 1}return 0};self.require(cmp,"_$_$_cmp");return self.spread(function(split){var sortedSplit=split.sort(_$_$_cmp);resolve(sortedSplit)}).then(function(joined){var merge=function(i,j,max){j=Math.min(j,P);max=Math.min(max,P);var l=i;var r=j;var sorted=[];for(var k=l;k=max||cmp(eleI,eleJ)<=0)){sorted.push(eleI);i++}else{sorted.push(eleJ);j++}}for(var k=0;ky){return 1}return 0};insort=function(a,x,lo,hi,cmp){var mid;if(lo==null){lo=0}if(cmp==null){cmp=defaultCmp}if(lo<0){throw new Error("lo must be non-negative")}if(hi==null){hi=a.length}while(lo_ref;0<=_ref?_j++:_j--){_results1.push(_j)}return _results1}.apply(this).reverse();_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){i=_ref1[_i];_results.push(_siftup(array,i,cmp))}return _results};updateItem=function(array,item,cmp){var pos;if(cmp==null){cmp=defaultCmp}pos=array.indexOf(item);if(pos===-1){return}_siftdown(array,0,pos,cmp);return _siftup(array,pos,cmp)};nlargest=function(array,n,cmp){var elem,result,_i,_len,_ref;if(cmp==null){cmp=defaultCmp}result=array.slice(0,n);if(!result.length){return result}heapify(result,cmp);_ref=array.slice(n);for(_i=0,_len=_ref.length;_i<_len;_i++){elem=_ref[_i];heappushpop(result,elem,cmp)}return result.sort(cmp).reverse()};nsmallest=function(array,n,cmp){var elem,i,los,result,_i,_j,_len,_ref,_ref1,_results;if(cmp==null){cmp=defaultCmp}if(n*10<=array.length){result=array.slice(0,n).sort(cmp);if(!result.length){return result}los=result[result.length-1];_ref=array.slice(n);for(_i=0,_len=_ref.length;_i<_len;_i++){elem=_ref[_i];if(cmp(elem,los)<0){insort(result,elem,0,null,cmp);result.pop();los=result[result.length-1]}}return result}heapify(array,cmp);_results=[];for(i=_j=0,_ref1=min(n,array.length);0<=_ref1?_j<_ref1:_j>_ref1;i=0<=_ref1?++_j:--_j){_results.push(heappop(array,cmp))}return _results};_siftdown=function(array,startpos,pos,cmp){var newitem,parent,parentpos;if(cmp==null){cmp=defaultCmp}newitem=array[pos];while(pos>startpos){parentpos=pos-1>>1;parent=array[parentpos];if(cmp(newitem,parent)<0){array[pos]=parent;pos=parentpos;continue}break}return array[pos]=newitem};_siftup=function(array,pos,cmp){var childpos,endpos,newitem,rightpos,startpos;if(cmp==null){cmp=defaultCmp}endpos=array.length;startpos=pos;newitem=array[pos];childpos=2*pos+1;while(childpos0){return 1}else if(x<0){return-1}else{return 0}};math.dist=function(p1,p2){return Math.sqrt(math.sqdist(p1,p2))};math.sqdist=function(p1,p2){var dx=p2.x-p1.x;var dy=p2.y-p1.y;return dx*dx+dy*dy};math.qbezierAt=function(p0,p1,p2,t){return(1-t)*(1-t)*p0+2*(1-t)*t*p1+t*t*p2};math.qbezierPtAt=function(p0,p1,p2,t){return{x:math.qbezierAt(p0.x,p1.x,p2.x,t),y:math.qbezierAt(p0.y,p1.y,p2.y,t)}};math.lineAt=function(p0,p1,t,d){var vec={x:p1.x-p0.x,y:p1.y-p0.y};var vecDist=math.dist(p0,p1);var normVec={x:vec.x/vecDist,y:vec.y/vecDist};t=t==null?0:t;var d=d!=null?d:t*vecDist;return{x:p0.x+normVec.x*d,y:p0.y+normVec.y*d}};math.lineAtDist=function(p0,p1,d){return math.lineAt(p0,p1,undefined,d)};math.triangleAngle=function(A,B,C){var a=math.dist(B,C);var b=math.dist(A,C);var c=math.dist(A,B);return Math.acos((a*a+b*b-c*c)/(2*a*b))};math.bound=function(min,val,max){return Math.max(min,Math.min(max,val))};math.makeBoundingBox=function(bb){if(bb==null){return{x1:Infinity,y1:Infinity,x2:-Infinity,y2:-Infinity,w:0,h:0}}else if(bb.x1!=null&&bb.y1!=null){if(bb.x2!=null&&bb.y2!=null&&bb.x2>=bb.x1&&bb.y2>=bb.y1){return{x1:bb.x1,y1:bb.y1,x2:bb.x2,y2:bb.y2,w:bb.x2-bb.x1,h:bb.y2-bb.y1}}else if(bb.w!=null&&bb.h!=null&&bb.w>=0&&bb.h>=0){return{x1:bb.x1,y1:bb.y1,x2:bb.x1+bb.w,y2:bb.y1+bb.h,w:bb.w,h:bb.h}}}};math.updateBoundingBox=function(bb1,bb2){bb1.x1=Math.min(bb1.x1,bb2.x1);bb1.x2=Math.max(bb1.x2,bb2.x2);bb1.w=bb1.x2-bb1.x1;bb1.y1=Math.min(bb1.y1,bb2.y1);bb1.y2=Math.max(bb1.y2,bb2.y2);bb1.h=bb1.y2-bb1.y1};math.expandBoundingBox=function(bb,padding){bb.x1-=padding;bb.x2+=padding;bb.y1-=padding;bb.y2+=padding;bb.w=bb.x2-bb.x1;bb.h=bb.y2-bb.y1;return bb};math.boundingBoxesIntersect=function(bb1,bb2){if(bb1.x1>bb2.x2){return false}if(bb2.x1>bb1.x2){return false}if(bb1.x2bb2.y2){return false}if(bb2.y1>bb1.y2){return false}return true};math.inBoundingBox=function(bb,x,y){return bb.x1<=x&&x<=bb.x2&&bb.y1<=y&&y<=bb.y2};math.pointInBoundingBox=function(bb,pt){return this.inBoundingBox(bb,pt.x,pt.y)};math.boundingBoxInBoundingBox=function(bb1,bb2){return math.inBoundingBox(bb1,bb2.x1,bb2.y1)&&math.inBoundingBox(bb1,bb2.x2,bb2.y2)};math.roundRectangleIntersectLine=function(x,y,nodeX,nodeY,width,height,padding){var cornerRadius=this.getRoundRectangleRadius(width,height);var halfWidth=width/2;var halfHeight=height/2;var straightLineIntersections;{var topStartX=nodeX-halfWidth+cornerRadius-padding;var topStartY=nodeY-halfHeight-padding;var topEndX=nodeX+halfWidth-cornerRadius+padding;var topEndY=topStartY;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,topStartX,topStartY,topEndX,topEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var rightStartX=nodeX+halfWidth+padding;var rightStartY=nodeY-halfHeight+cornerRadius-padding;var rightEndX=rightStartX;var rightEndY=nodeY+halfHeight-cornerRadius+padding;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,rightStartX,rightStartY,rightEndX,rightEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var bottomStartX=nodeX-halfWidth+cornerRadius-padding;var bottomStartY=nodeY+halfHeight+padding;var bottomEndX=nodeX+halfWidth-cornerRadius+padding;var bottomEndY=bottomStartY;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,bottomStartX,bottomStartY,bottomEndX,bottomEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var leftStartX=nodeX-halfWidth-padding;var leftStartY=nodeY-halfHeight+cornerRadius-padding;var leftEndX=leftStartX;var leftEndY=nodeY+halfHeight-cornerRadius+padding;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,leftStartX,leftStartY,leftEndX,leftEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}var arcIntersections;{var topLeftCenterX=nodeX-halfWidth+cornerRadius;var topLeftCenterY=nodeY-halfHeight+cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,topLeftCenterX,topLeftCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]<=topLeftCenterX&&arcIntersections[1]<=topLeftCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var topRightCenterX=nodeX+halfWidth-cornerRadius;var topRightCenterY=nodeY-halfHeight+cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,topRightCenterX,topRightCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]>=topRightCenterX&&arcIntersections[1]<=topRightCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var bottomRightCenterX=nodeX+halfWidth-cornerRadius;var bottomRightCenterY=nodeY+halfHeight-cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,bottomRightCenterX,bottomRightCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]>=bottomRightCenterX&&arcIntersections[1]>=bottomRightCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var bottomLeftCenterX=nodeX-halfWidth+cornerRadius;var bottomLeftCenterY=nodeY+halfHeight-cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,bottomLeftCenterX,bottomLeftCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]<=bottomLeftCenterX&&arcIntersections[1]>=bottomLeftCenterY){return[arcIntersections[0],arcIntersections[1]]}}return[]};math.inLineVicinity=function(x,y,lx1,ly1,lx2,ly2,tolerance){var t=tolerance;var x1=Math.min(lx1,lx2);var x2=Math.max(lx1,lx2);var y1=Math.min(ly1,ly2);var y2=Math.max(ly1,ly2);return x1-t<=x&&x<=x2+t&&y1-t<=y&&y<=y2+t};math.inBezierVicinity=function(x,y,x1,y1,x2,y2,x3,y3,tolerance){var bb={x1:Math.min(x1,x3,x2)-tolerance,x2:Math.max(x1,x3,x2)+tolerance,y1:Math.min(y1,y3,y2)-tolerance,y2:Math.max(y1,y3,y2)+tolerance};if(xbb.x2||ybb.y2){return false}else{return true}};math.solveCubic=function(a,b,c,d,result){b/=a;c/=a;d/=a;var discriminant,q,r,dum1,s,t,term1,r13;q=(3*c-b*b)/9;r=-(27*d)+b*(9*c-2*(b*b));r/=54;discriminant=q*q*q+r*r;result[1]=0;term1=b/3;if(discriminant>0){s=r+Math.sqrt(discriminant);s=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3);t=r-Math.sqrt(discriminant);t=t<0?-Math.pow(-t,1/3):Math.pow(t,1/3);result[0]=-term1+s+t;term1+=(s+t)/2;result[4]=result[2]=-term1;term1=Math.sqrt(3)*(-t+s)/2;result[3]=term1;result[5]=-term1;return}result[5]=result[3]=0;if(discriminant===0){r13=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);result[0]=-term1+2*r13;result[4]=result[2]=-(r13+term1);return}q=-q;dum1=q*q*q;dum1=Math.acos(r/Math.sqrt(dum1));r13=2*Math.sqrt(q);result[0]=-term1+r13*Math.cos(dum1/3);result[2]=-term1+r13*Math.cos((dum1+2*Math.PI)/3);result[4]=-term1+r13*Math.cos((dum1+4*Math.PI)/3);return};math.sqdistToQuadraticBezier=function(x,y,x1,y1,x2,y2,x3,y3){var a=1*x1*x1-4*x1*x2+2*x1*x3+4*x2*x2-4*x2*x3+x3*x3+y1*y1-4*y1*y2+2*y1*y3+4*y2*y2-4*y2*y3+y3*y3;var b=1*9*x1*x2-3*x1*x1-3*x1*x3-6*x2*x2+3*x2*x3+9*y1*y2-3*y1*y1-3*y1*y3-6*y2*y2+3*y2*y3;var c=1*3*x1*x1-6*x1*x2+x1*x3-x1*x+2*x2*x2+2*x2*x-x3*x+3*y1*y1-6*y1*y2+y1*y3-y1*y+2*y2*y2+2*y2*y-y3*y;var d=1*x1*x2-x1*x1+x1*x-x2*x+y1*y2-y1*y1+y1*y-y2*y;var roots=[];this.solveCubic(a,b,c,d,roots);var zeroThreshold=1e-7;var params=[];for(var index=0;index<6;index+=2){if(Math.abs(roots[index+1])=0&&roots[index]<=1){params.push(roots[index])}}params.push(1);params.push(0);var minDistanceSquared=-1;var closestParam;var curX,curY,distSquared;for(var i=0;i=0){if(distSquaredlineSq){return(x-x2)*(x-x2)+(y-y2)*(y-y2)}return hypSq-adjSq};math.pointInsidePolygonPoints=function(x,y,points){var x1,y1,x2,y2;var y3;var up=0;var down=0;for(var i=0;i=x&&x>=x2||x1<=x&&x<=x2){y3=(x-x1)/(x2-x1)*(y2-y1)+y1;if(y3>y){up++}if(y30){var expandedLineSet=this.expandPolygon(transformedPoints,-padding); +}layer.eles.push(ele);caches[lvl]=layer}if(tmpLayers){return tmpLayers}if(allowLazyQueueing){return null}return layers};LTCp.getEleLevelForLayerLevel=function(lvl,pxRatio){return lvl};function imgSmoothing(context,bool){if(context.imageSmoothingEnabled!=null){context.imageSmoothingEnabled=bool}else{context.webkitImageSmoothingEnabled=bool;context.mozImageSmoothingEnabled=bool;context.msImageSmoothingEnabled=bool}}LTCp.drawEleInLayer=function(layer,ele,lvl,pxRatio){var self=this;var r=this.renderer;var context=layer.context;var bb=ele.boundingBox();if(bb.w===0||bb.h===0){return}var eleCache=self.eleTxrCache;var reason=useHighQualityEleTxrReqs?eleCache.reasons.highQuality:undefined;lvl=self.getEleLevelForLayerLevel(lvl,pxRatio);var cache=useEleTxrCaching?eleCache.getElement(ele,bb,null,lvl,reason):null;if(cache){if(disableEleImgSmoothing){imgSmoothing(context,false)}context.drawImage(cache.texture.canvas,cache.x,0,cache.width,cache.height,bb.x1,bb.y1,bb.w,bb.h);if(disableEleImgSmoothing){imgSmoothing(context,true)}}else{r.drawElement(context,ele)}};LTCp.levelIsComplete=function(lvl,eles){var self=this;var layers=self.layersByLevel[lvl];if(!layers||layers.length===0){return false}var numElesInLayers=0;for(var i=0;i0){return false}if(layer.invalid){return false}numElesInLayers+=layer.eles.length}if(numElesInLayers!==eles.length){return false}return true};LTCp.validateLayersElesOrdering=function(lvl,eles){var layers=this.layersByLevel[lvl];if(!layers){return}for(var i=0;i0){haveLayers=true;break}}return haveLayers};LTCp.invalidateElements=function(eles){var self=this;self.lastInvalidationTime=util.performanceNow();if(eles.length===0||!self.haveLayers()){return}self.updateElementsInLayers(eles,function invalAssocLayers(layer,ele,req){self.invalidateLayer(layer)})};LTCp.invalidateLayer=function(layer){this.lastInvalidationTime=util.performanceNow();if(layer.invalid){return}var lvl=layer.level;var eles=layer.eles;var layers=this.layersByLevel[lvl];util.removeFromArray(layers,layer);layer.elesQueue=[];layer.invalid=true;if(layer.replacement){layer.replacement.invalid=true}for(var i=0;i=opts.deqFastCost*timeAvailable){break}}else{if(willDraw){if(duration>=opts.deqCost*renderTime||duration>=opts.deqAvgCost*avgRenderTime){break}}else if(frameDuration>=opts.deqNoDrawCost*fullFpsTime){break}}var thisDeqd=opts.deq(self,pixelRatio,extent);if(thisDeqd.length>0){for(var i=0;i0){opts.onDeqd(self,deqd);if(!willDraw&&opts.shouldRedraw(self,deqd,pixelRatio,extent)){queueRedraw()}}};var priority=opts.priority||util.noop;r.beforeRender(dequeue,priority(self))}}}},{"../../../util":131}],109:[function(require,module,exports){"use strict";module.exports=[{name:"null",impl:require("./null")},{name:"base",impl:require("./base")},{name:"canvas",impl:require("./canvas")}]},{"./base":91,"./canvas":105,"./null":110}],110:[function(require,module,exports){"use strict";function NullRenderer(options){this.options=options;this.notifications=0}var noop=function(){};NullRenderer.prototype={recalculateRenderedStyle:noop,notify:function(){this.notifications++},init:noop};module.exports=NullRenderer},{}],111:[function(require,module,exports){"use strict";var is=require("./is");var util=require("./util");var Thread=require("./thread");var Promise=require("./promise");var define=require("./define");var Fabric=function(N){if(!(this instanceof Fabric)){return new Fabric(N)}this._private={pass:[]};var defN=4;if(is.number(N)){}if(typeof navigator!=="undefined"&&navigator.hardwareConcurrency!=null){N=navigator.hardwareConcurrency}else{try{N=require("os").cpus().length}catch(err){N=defN}}for(var i=0;ib){return 1}return 0};self.require(cmp,"_$_$_cmp");return self.spread(function(split){var sortedSplit=split.sort(_$_$_cmp);resolve(sortedSplit)}).then(function(joined){var merge=function(i,j,max){j=Math.min(j,P);max=Math.min(max,P);var l=i;var r=j;var sorted=[];for(var k=l;k=max||cmp(eleI,eleJ)<=0)){sorted.push(eleI);i++}else{sorted.push(eleJ);j++}}for(var k=0;ky){return 1}return 0};insort=function(a,x,lo,hi,cmp){var mid;if(lo==null){lo=0}if(cmp==null){cmp=defaultCmp}if(lo<0){throw new Error("lo must be non-negative")}if(hi==null){hi=a.length}while(lo_ref;0<=_ref?_j++:_j--){_results1.push(_j)}return _results1}.apply(this).reverse();_results=[];for(_i=0,_len=_ref1.length;_i<_len;_i++){i=_ref1[_i];_results.push(_siftup(array,i,cmp))}return _results};updateItem=function(array,item,cmp){var pos;if(cmp==null){cmp=defaultCmp}pos=array.indexOf(item);if(pos===-1){return}_siftdown(array,0,pos,cmp);return _siftup(array,pos,cmp)};nlargest=function(array,n,cmp){var elem,result,_i,_len,_ref;if(cmp==null){cmp=defaultCmp}result=array.slice(0,n);if(!result.length){return result}heapify(result,cmp);_ref=array.slice(n);for(_i=0,_len=_ref.length;_i<_len;_i++){elem=_ref[_i];heappushpop(result,elem,cmp)}return result.sort(cmp).reverse()};nsmallest=function(array,n,cmp){var elem,i,los,result,_i,_j,_len,_ref,_ref1,_results;if(cmp==null){cmp=defaultCmp}if(n*10<=array.length){result=array.slice(0,n).sort(cmp);if(!result.length){return result}los=result[result.length-1];_ref=array.slice(n);for(_i=0,_len=_ref.length;_i<_len;_i++){elem=_ref[_i];if(cmp(elem,los)<0){insort(result,elem,0,null,cmp);result.pop();los=result[result.length-1]}}return result}heapify(array,cmp);_results=[];for(i=_j=0,_ref1=min(n,array.length);0<=_ref1?_j<_ref1:_j>_ref1;i=0<=_ref1?++_j:--_j){_results.push(heappop(array,cmp))}return _results};_siftdown=function(array,startpos,pos,cmp){var newitem,parent,parentpos;if(cmp==null){cmp=defaultCmp}newitem=array[pos];while(pos>startpos){parentpos=pos-1>>1;parent=array[parentpos];if(cmp(newitem,parent)<0){array[pos]=parent;pos=parentpos;continue}break}return array[pos]=newitem};_siftup=function(array,pos,cmp){var childpos,endpos,newitem,rightpos,startpos;if(cmp==null){cmp=defaultCmp}endpos=array.length;startpos=pos;newitem=array[pos];childpos=2*pos+1;while(childpos0){return 1}else if(x<0){return-1}else{return 0}};math.dist=function(p1,p2){return Math.sqrt(math.sqdist(p1,p2))};math.sqdist=function(p1,p2){var dx=p2.x-p1.x;var dy=p2.y-p1.y;return dx*dx+dy*dy};math.qbezierAt=function(p0,p1,p2,t){return(1-t)*(1-t)*p0+2*(1-t)*t*p1+t*t*p2};math.qbezierPtAt=function(p0,p1,p2,t){return{x:math.qbezierAt(p0.x,p1.x,p2.x,t),y:math.qbezierAt(p0.y,p1.y,p2.y,t)}};math.lineAt=function(p0,p1,t,d){var vec={x:p1.x-p0.x,y:p1.y-p0.y};var vecDist=math.dist(p0,p1);var normVec={x:vec.x/vecDist,y:vec.y/vecDist};t=t==null?0:t;var d=d!=null?d:t*vecDist;return{x:p0.x+normVec.x*d,y:p0.y+normVec.y*d}};math.lineAtDist=function(p0,p1,d){return math.lineAt(p0,p1,undefined,d)};math.triangleAngle=function(A,B,C){var a=math.dist(B,C);var b=math.dist(A,C);var c=math.dist(A,B);return Math.acos((a*a+b*b-c*c)/(2*a*b))};math.bound=function(min,val,max){return Math.max(min,Math.min(max,val))};math.makeBoundingBox=function(bb){if(bb==null){return{x1:Infinity,y1:Infinity,x2:-Infinity,y2:-Infinity,w:0,h:0}}else if(bb.x1!=null&&bb.y1!=null){if(bb.x2!=null&&bb.y2!=null&&bb.x2>=bb.x1&&bb.y2>=bb.y1){return{x1:bb.x1,y1:bb.y1,x2:bb.x2,y2:bb.y2,w:bb.x2-bb.x1,h:bb.y2-bb.y1}}else if(bb.w!=null&&bb.h!=null&&bb.w>=0&&bb.h>=0){return{x1:bb.x1,y1:bb.y1,x2:bb.x1+bb.w,y2:bb.y1+bb.h,w:bb.w,h:bb.h}}}};math.updateBoundingBox=function(bb1,bb2){bb1.x1=Math.min(bb1.x1,bb2.x1);bb1.x2=Math.max(bb1.x2,bb2.x2);bb1.w=bb1.x2-bb1.x1;bb1.y1=Math.min(bb1.y1,bb2.y1);bb1.y2=Math.max(bb1.y2,bb2.y2);bb1.h=bb1.y2-bb1.y1};math.expandBoundingBox=function(bb,padding){bb.x1-=padding;bb.x2+=padding;bb.y1-=padding;bb.y2+=padding;bb.w=bb.x2-bb.x1;bb.h=bb.y2-bb.y1;return bb};math.boundingBoxesIntersect=function(bb1,bb2){if(bb1.x1>bb2.x2){return false}if(bb2.x1>bb1.x2){return false}if(bb1.x2bb2.y2){return false}if(bb2.y1>bb1.y2){return false}return true};math.inBoundingBox=function(bb,x,y){return bb.x1<=x&&x<=bb.x2&&bb.y1<=y&&y<=bb.y2};math.pointInBoundingBox=function(bb,pt){return this.inBoundingBox(bb,pt.x,pt.y)};math.boundingBoxInBoundingBox=function(bb1,bb2){return math.inBoundingBox(bb1,bb2.x1,bb2.y1)&&math.inBoundingBox(bb1,bb2.x2,bb2.y2)};math.roundRectangleIntersectLine=function(x,y,nodeX,nodeY,width,height,padding){var cornerRadius=this.getRoundRectangleRadius(width,height);var halfWidth=width/2;var halfHeight=height/2;var straightLineIntersections;{var topStartX=nodeX-halfWidth+cornerRadius-padding;var topStartY=nodeY-halfHeight-padding;var topEndX=nodeX+halfWidth-cornerRadius+padding;var topEndY=topStartY;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,topStartX,topStartY,topEndX,topEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var rightStartX=nodeX+halfWidth+padding;var rightStartY=nodeY-halfHeight+cornerRadius-padding;var rightEndX=rightStartX;var rightEndY=nodeY+halfHeight-cornerRadius+padding;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,rightStartX,rightStartY,rightEndX,rightEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var bottomStartX=nodeX-halfWidth+cornerRadius-padding;var bottomStartY=nodeY+halfHeight+padding;var bottomEndX=nodeX+halfWidth-cornerRadius+padding;var bottomEndY=bottomStartY;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,bottomStartX,bottomStartY,bottomEndX,bottomEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}{var leftStartX=nodeX-halfWidth-padding;var leftStartY=nodeY-halfHeight+cornerRadius-padding;var leftEndX=leftStartX;var leftEndY=nodeY+halfHeight-cornerRadius+padding;straightLineIntersections=this.finiteLinesIntersect(x,y,nodeX,nodeY,leftStartX,leftStartY,leftEndX,leftEndY,false);if(straightLineIntersections.length>0){return straightLineIntersections}}var arcIntersections;{var topLeftCenterX=nodeX-halfWidth+cornerRadius;var topLeftCenterY=nodeY-halfHeight+cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,topLeftCenterX,topLeftCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]<=topLeftCenterX&&arcIntersections[1]<=topLeftCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var topRightCenterX=nodeX+halfWidth-cornerRadius;var topRightCenterY=nodeY-halfHeight+cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,topRightCenterX,topRightCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]>=topRightCenterX&&arcIntersections[1]<=topRightCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var bottomRightCenterX=nodeX+halfWidth-cornerRadius;var bottomRightCenterY=nodeY+halfHeight-cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,bottomRightCenterX,bottomRightCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]>=bottomRightCenterX&&arcIntersections[1]>=bottomRightCenterY){return[arcIntersections[0],arcIntersections[1]]}}{var bottomLeftCenterX=nodeX-halfWidth+cornerRadius;var bottomLeftCenterY=nodeY+halfHeight-cornerRadius;arcIntersections=this.intersectLineCircle(x,y,nodeX,nodeY,bottomLeftCenterX,bottomLeftCenterY,cornerRadius+padding);if(arcIntersections.length>0&&arcIntersections[0]<=bottomLeftCenterX&&arcIntersections[1]>=bottomLeftCenterY){return[arcIntersections[0],arcIntersections[1]]}}return[]};math.inLineVicinity=function(x,y,lx1,ly1,lx2,ly2,tolerance){var t=tolerance;var x1=Math.min(lx1,lx2);var x2=Math.max(lx1,lx2);var y1=Math.min(ly1,ly2);var y2=Math.max(ly1,ly2);return x1-t<=x&&x<=x2+t&&y1-t<=y&&y<=y2+t};math.inBezierVicinity=function(x,y,x1,y1,x2,y2,x3,y3,tolerance){var bb={x1:Math.min(x1,x3,x2)-tolerance,x2:Math.max(x1,x3,x2)+tolerance,y1:Math.min(y1,y3,y2)-tolerance,y2:Math.max(y1,y3,y2)+tolerance};if(xbb.x2||ybb.y2){return false}else{return true}};math.solveCubic=function(a,b,c,d,result){b/=a;c/=a;d/=a;var discriminant,q,r,dum1,s,t,term1,r13;q=(3*c-b*b)/9;r=-(27*d)+b*(9*c-2*(b*b));r/=54;discriminant=q*q*q+r*r;result[1]=0;term1=b/3;if(discriminant>0){s=r+Math.sqrt(discriminant);s=s<0?-Math.pow(-s,1/3):Math.pow(s,1/3);t=r-Math.sqrt(discriminant);t=t<0?-Math.pow(-t,1/3):Math.pow(t,1/3);result[0]=-term1+s+t;term1+=(s+t)/2;result[4]=result[2]=-term1;term1=Math.sqrt(3)*(-t+s)/2;result[3]=term1;result[5]=-term1;return}result[5]=result[3]=0;if(discriminant===0){r13=r<0?-Math.pow(-r,1/3):Math.pow(r,1/3);result[0]=-term1+2*r13;result[4]=result[2]=-(r13+term1);return}q=-q;dum1=q*q*q;dum1=Math.acos(r/Math.sqrt(dum1));r13=2*Math.sqrt(q);result[0]=-term1+r13*Math.cos(dum1/3);result[2]=-term1+r13*Math.cos((dum1+2*Math.PI)/3);result[4]=-term1+r13*Math.cos((dum1+4*Math.PI)/3);return};math.sqdistToQuadraticBezier=function(x,y,x1,y1,x2,y2,x3,y3){var a=1*x1*x1-4*x1*x2+2*x1*x3+4*x2*x2-4*x2*x3+x3*x3+y1*y1-4*y1*y2+2*y1*y3+4*y2*y2-4*y2*y3+y3*y3;var b=1*9*x1*x2-3*x1*x1-3*x1*x3-6*x2*x2+3*x2*x3+9*y1*y2-3*y1*y1-3*y1*y3-6*y2*y2+3*y2*y3;var c=1*3*x1*x1-6*x1*x2+x1*x3-x1*x+2*x2*x2+2*x2*x-x3*x+3*y1*y1-6*y1*y2+y1*y3-y1*y+2*y2*y2+2*y2*y-y3*y;var d=1*x1*x2-x1*x1+x1*x-x2*x+y1*y2-y1*y1+y1*y-y2*y;var roots=[];this.solveCubic(a,b,c,d,roots);var zeroThreshold=1e-7;var params=[];for(var index=0;index<6;index+=2){if(Math.abs(roots[index+1])=0&&roots[index]<=1){params.push(roots[index])}}params.push(1);params.push(0);var minDistanceSquared=-1;var closestParam;var curX,curY,distSquared;for(var i=0;i=0){if(distSquaredlineSq){return(x-x2)*(x-x2)+(y-y2)*(y-y2)}return hypSq-adjSq};math.pointInsidePolygonPoints=function(x,y,points){var x1,y1,x2,y2;var y3;var up=0;var down=0;for(var i=0;i=x&&x>=x2||x1<=x&&x<=x2){y3=(x-x1)/(x2-x1)*(y2-y1)+y1;if(y3>y){up++}if(y30){var expandedLineSet=this.expandPolygon(transformedPoints,-padding); points=this.joinLines(expandedLineSet)}else{points=transformedPoints}return math.pointInsidePolygonPoints(x,y,points)};math.joinLines=function(lineSet){var vertices=new Array(lineSet.length/2);var currentLineStartX,currentLineStartY,currentLineEndX,currentLineEndY;var nextLineStartX,nextLineStartY,nextLineEndX,nextLineEndY;for(var i=0;i=0&&tMin<=1){inRangeParams.push(tMin)}if(tMax>=0&&tMax<=1){inRangeParams.push(tMax)}if(inRangeParams.length===0){return[]}var nearIntersectionX=inRangeParams[0]*d[0]+x1;var nearIntersectionY=inRangeParams[0]*d[1]+y1;if(inRangeParams.length>1){if(inRangeParams[0]==inRangeParams[1]){return[nearIntersectionX,nearIntersectionY]}else{var farIntersectionX=inRangeParams[1]*d[0]+x1;var farIntersectionY=inRangeParams[1]*d[1]+y1;return[nearIntersectionX,nearIntersectionY,farIntersectionX,farIntersectionY]}}else{return[nearIntersectionX,nearIntersectionY]}};math.findCircleNearPoint=function(centerX,centerY,radius,farX,farY){var displacementX=farX-centerX;var displacementY=farY-centerY;var distance=Math.sqrt(displacementX*displacementX+displacementY*displacementY);var unitDisplacementX=displacementX/distance;var unitDisplacementY=displacementY/distance;return[centerX+unitDisplacementX*radius,centerY+unitDisplacementY*radius]};math.findMaxSqDistanceToOrigin=function(points){var maxSqDistance=1e-6;var sqDistance;for(var i=0;imaxSqDistance){maxSqDistance=sqDistance}}return maxSqDistance};math.midOfThree=function(a,b,c){if(b<=a&&a<=c||c<=a&&a<=b){return a}else if(a<=b&&b<=c||c<=b&&b<=a){return b}else{return c}};math.finiteLinesIntersect=function(x1,y1,x2,y2,x3,y3,x4,y4,infiniteLines){var dx13=x1-x3;var dx21=x2-x1;var dx43=x4-x3;var dy13=y1-y3;var dy21=y2-y1;var dy43=y4-y3;var ua_t=dx43*dy13-dy43*dx13;var ub_t=dx21*dy13-dy21*dx13;var u_b=dy43*dx21-dx43*dy21;if(u_b!==0){var ua=ua_t/u_b;var ub=ub_t/u_b;var flptThreshold=.001;var min=0-flptThreshold;var max=1+flptThreshold;if(min<=ua&&ua<=max&&min<=ub&&ub<=max){return[x1+ua*dx21,y1+ua*dy21]}else{if(!infiniteLines){return[]}else{return[x1+ua*dx21,y1+ua*dy21]}}}else{if(ua_t===0||ub_t===0){if(this.midOfThree(x1,x2,x4)===x4){return[x4,y4]}if(this.midOfThree(x1,x2,x3)===x3){return[x3,y3]}if(this.midOfThree(x3,x4,x2)===x2){return[x2,y2]}return[]}else{return[]}}};math.polygonIntersectLine=function(x,y,basePoints,centerX,centerY,width,height,padding){var intersections=[];var intersection;var transformedPoints=new Array(basePoints.length);for(var i=0;i0){var expandedLineSet=math.expandPolygon(transformedPoints,-padding);points=math.joinLines(expandedLineSet)}else{points=transformedPoints}var currentX,currentY,nextX,nextY;for(var i=0;i\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:'"(?:\\\\"|[^"])+"'+"|"+"'(?:\\\\'|[^'])+'",number:util.regex.number,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$"};tokens.variable="(?:[\\w-]|(?:\\\\"+tokens.metaChar+"))+";tokens.value=tokens.string+"|"+tokens.number;tokens.className=tokens.variable;tokens.id=tokens.variable;var cleanMetaChars=function(str){return str.replace(new RegExp("\\\\("+tokens.metaChar+")","g"),function(match,$1,offset,original){return $1})};var ops=tokens.comparatorOp.split("|");for(var i=0;i=0){continue}if(op==="="){continue}tokens.comparatorOp+="|\\!"+op}var exprs=[{name:"group",query:true,regex:"(node|edge|\\*)",populate:function(group){this.group=group==="*"?group:group+"s"}},{name:"state",query:true,regex:"(:selected|:unselected|:locked|:unlocked|:visible|:hidden|:transparent|:grabbed|:free|:removed|:inside|:grabbable|:ungrabbable|:animated|:unanimated|:selectable|:unselectable|:orphan|:nonorphan|:parent|:child|:loop|:simple|:active|:inactive|:touch|:backgrounding|:nonbackgrounding)",populate:function(state){this.colonSelectors.push(state)}},{name:"id",query:true,regex:"\\#("+tokens.id+")",populate:function(id){this.ids.push(cleanMetaChars(id))}},{name:"className",query:true,regex:"\\.("+tokens.className+")",populate:function(className){this.classes.push(cleanMetaChars(className))}},{name:"dataExists",query:true,regex:"\\[\\s*("+tokens.variable+")\\s*\\]",populate:function(variable){this.data.push({field:cleanMetaChars(variable)})}},{name:"dataCompare",query:true,regex:"\\[\\s*("+tokens.variable+")\\s*("+tokens.comparatorOp+")\\s*("+tokens.value+")\\s*\\]",populate:function(variable,comparatorOp,value){var valueIsString=new RegExp("^"+tokens.string+"$").exec(value)!=null;if(valueIsString){value=value.substring(1,value.length-1)}else{value=parseFloat(value)}this.data.push({field:cleanMetaChars(variable),operator:comparatorOp,value:value})}},{name:"dataBool",query:true,regex:"\\[\\s*("+tokens.boolOp+")\\s*("+tokens.variable+")\\s*\\]",populate:function(boolOp,variable){this.data.push({field:cleanMetaChars(variable),operator:boolOp})}},{name:"metaCompare",query:true,regex:"\\[\\[\\s*("+tokens.meta+")\\s*("+tokens.comparatorOp+")\\s*("+tokens.number+")\\s*\\]\\]",populate:function(meta,comparatorOp,number){this.meta.push({field:cleanMetaChars(meta),operator:comparatorOp,value:parseFloat(number)})}},{name:"nextQuery",separator:true,regex:tokens.separator,populate:function(){self[++i]=newQuery();currentSubject=null}},{name:"child",separator:true,regex:tokens.child,populate:function(){var childQuery=newQuery();childQuery.parent=this;childQuery.subject=currentSubject;self[i]=childQuery}},{name:"descendant",separator:true,regex:tokens.descendant,populate:function(){var descendantQuery=newQuery();descendantQuery.ancestor=this;descendantQuery.subject=currentSubject;self[i]=descendantQuery}},{name:"subject",modifier:true,regex:tokens.subject,populate:function(){if(currentSubject!=null&&this.subject!=this){util.error("Redefinition of subject in selector `"+selector+"`");return false}currentSubject=this;this.subject=this}}];self._private.selectorText=selector;var remaining=selector;var i=0;var consumeExpr=function(expectation){var expr;var match;var name;for(var j=0;j=0){fieldStr=fieldStr.toLowerCase();valStr=valStr.toLowerCase();operator=operator.replace("@","");caseInsensitive=true}var notExpr=false;if(operator.indexOf("!")>=0){operator=operator.replace("!","");notExpr=true}if(caseInsensitive){value=valStr.toLowerCase();fieldVal=fieldStr.toLowerCase()}var isIneqCmp=false;switch(operator){case"*=":matches=fieldStr.indexOf(valStr)>=0;break;case"$=":matches=fieldStr.indexOf(valStr,fieldStr.length-valStr.length)>=0;break;case"^=":matches=fieldStr.indexOf(valStr)===0;break;case"=":matches=fieldVal===value;break;case">":isIneqCmp=true;matches=fieldVal>value;break;case">=":isIneqCmp=true;matches=fieldVal>=value;break;case"<":isIneqCmp=true;matches=fieldVal "+str}if(query.ancestor!=null){str=queryToString(query.ancestor)+" "+str}if(query.child!=null){str+=" > "+queryToString(query.child)}if(query.descendant!=null){str+=" "+queryToString(query.descendant)}return str};for(var i=0;i1&&i0;if(cxtHasDiffed||cxtHasMappedProps){var props;if(cxtHasDiffed&&cxtHasMappedProps){props=cxt.properties}else if(cxtHasDiffed){props=cxt.properties}else if(cxtHasMappedProps){props=cxt.mappedProperties}for(var j=0;j0){hasPie=true;break}}}_p.hasPie=hasPie;var transform=ele.pstyle("text-transform").strValue;var content=ele.pstyle("label").strValue;var srcContent=ele.pstyle("source-label").strValue;var tgtContent=ele.pstyle("target-label").strValue;var fStyle=ele.pstyle("font-style").strValue;var size=ele.pstyle("font-size").pfValue+"px";var family=ele.pstyle("font-family").strValue;var weight=ele.pstyle("font-weight").strValue;var valign=ele.pstyle("text-valign").strValue;var halign=ele.pstyle("text-valign").strValue;var oWidth=ele.pstyle("text-outline-width").pfValue;var wrap=ele.pstyle("text-wrap").strValue;var wrapW=ele.pstyle("text-max-width").pfValue;var labelStyleKey=fStyle+"$"+size+"$"+family+"$"+weight+"$"+transform+"$"+valign+"$"+halign+"$"+oWidth+"$"+wrap+"$"+wrapW;_p.labelStyleKey=labelStyleKey;_p.sourceLabelKey=labelStyleKey+"$"+srcContent;_p.targetLabelKey=labelStyleKey+"$"+tgtContent;_p.labelKey=labelStyleKey+"$"+content;_p.fontKey=fStyle+"$"+weight+"$"+size+"$"+family;_p.styleKey=Date.now()};styfn.applyParsedProperty=function(ele,parsedProp){var self=this;var prop=parsedProp;var style=ele._private.style;var fieldVal,flatProp;var types=self.types;var type=self.properties[prop.name].type;var propIsBypass=prop.bypass;var origProp=style[prop.name];var origPropIsBypass=origProp&&origProp.bypass;var _p=ele._private;if(parsedProp.name==="curve-style"&&parsedProp.value==="haystack"&&ele.isEdge()&&(ele.isLoop()||ele.source().isParent()||ele.target().isParent())){prop=parsedProp=this.parse(parsedProp.name,"bezier",propIsBypass)}if(prop.delete){style[prop.name]=undefined;return true}if(prop.deleteBypassed){if(!origProp){return true}else if(origProp.bypass){origProp.bypassed=undefined;return true}else{return false}}if(prop.deleteBypass){if(!origProp){return true}else if(origProp.bypass){style[prop.name]=origProp.bypassed;return true}else{return false}}var printMappingErr=function(){util.error("Do not assign mappings to elements without corresponding data (e.g. ele `"+ele.id()+"` for property `"+prop.name+"` with data field `"+prop.field+"`); try a `["+prop.field+"]` selector to limit scope to elements with `"+prop.field+"` defined")};switch(prop.mapped){case types.mapData:case types.mapLayoutData:case types.mapScratch:var isLayout=prop.mapped===types.mapLayoutData;var isScratch=prop.mapped===types.mapScratch;var fields=prop.field.split(".");var fieldVal;if(isScratch||isLayout){fieldVal=_p.scratch}else{fieldVal=_p.data}for(var i=0;i1){percent=1}if(type.color){var r1=prop.valueMin[0];var r2=prop.valueMax[0];var g1=prop.valueMin[1];var g2=prop.valueMax[1];var b1=prop.valueMin[2];var b2=prop.valueMax[2];var a1=prop.valueMin[3]==null?1:prop.valueMin[3];var a2=prop.valueMax[3]==null?1:prop.valueMax[3];var clr=[Math.round(r1+(r2-r1)*percent),Math.round(g1+(g2-g1)*percent),Math.round(b1+(b2-b1)*percent),Math.round(a1+(a2-a1)*percent)];flatProp={bypass:prop.bypass,name:prop.name,value:clr,strValue:"rgb("+clr[0]+", "+clr[1]+", "+clr[2]+")"}}else if(type.number){var calcValue=prop.valueMin+(prop.valueMax-prop.valueMin)*percent;flatProp=this.parse(prop.name,calcValue,prop.bypass,true)}else{return false}if(!flatProp){flatProp=this.parse(prop.name,origProp.strValue,prop.bypass,true)}if(!flatProp){printMappingErr()}flatProp.mapping=prop;prop=flatProp;break;case types.data:case types.layoutData:case types.scratch:var isLayout=prop.mapped===types.layoutData;var isScratch=prop.mapped===types.scratch;var fields=prop.field.split(".");var fieldVal;if(isScratch||isLayout){fieldVal=_p.scratch}else{fieldVal=_p.data}if(fieldVal){for(var i=0;i0&&duration>0){var css={};var anyPrev=false;for(var i=0;i0){ele.delay(delay)}ele.animate({css:css},{duration:duration,easing:ele.pstyle("transition-timing-function").value,queue:false,complete:function(){if(!isBypass){self.removeBypasses(ele,props)}_p.transitioning=false}})}else if(_p.transitioning){ele.stop();this.removeBypasses(ele,props);_p.transitioning=false}};module.exports=styfn},{"../is":114,"../util":131}],120:[function(require,module,exports){"use strict";var is=require("../is");var util=require("../util");var styfn={};styfn.applyBypass=function(eles,name,value,updateTransitions){var self=this;var props=[];var isBypass=true;if(name==="*"||name==="**"){if(value!==undefined){for(var i=0;itype.max){return null}var ret={name:name,value:value,strValue:""+value+(units?units:""),units:units,bypass:propIsBypass};if(type.unitless||units!=="px"&&units!=="em"){ret.pfValue=value}else{ret.pfValue=units==="px"||!units?value:this.getEmSizeInPixels()*value}if(units==="ms"||units==="s"){ret.pfValue=units==="ms"?value:1e3*value}if(units==="deg"||units==="rad"){ret.pfValue=units==="rad"?value:math.deg2rad(value)}return ret}else if(type.propList){var props=[];var propsStr=""+value;if(propsStr==="none"){}else{var propsSplit=propsStr.split(",");for(var i=0;i node").css({shape:"rectangle","padding-top":10,"padding-right":10,"padding-left":10,"padding-bottom":10,"background-color":"#eee","border-color":"#ccc","border-width":1}).selector("edge").css({width:3,"curve-style":"haystack"}).selector(":selected").css({"background-color":"#0169D9","line-color":"#0169D9","source-arrow-color":"#0169D9","target-arrow-color":"#0169D9","mid-source-arrow-color":"#0169D9","mid-target-arrow-color":"#0169D9"}).selector("node:parent:selected").css({"background-color":"#CCE1F9","border-color":"#aec8e5"}).selector(":active").css({"overlay-color":"black","overlay-padding":10,"overlay-opacity":.25}).selector("core").css({"selection-box-color":"#ddd","selection-box-opacity":.65,"selection-box-border-color":"#aaa","selection-box-border-width":1,"active-bg-color":"black","active-bg-opacity":.15,"active-bg-size":30,"outside-texture-bg-color":"#000","outside-texture-bg-opacity":.125});this.defaultLength=this.length};module.exports=styfn},{"../util":131}],127:[function(require,module,exports){"use strict";var util=require("../util");var Selector=require("../selector");var styfn={};styfn.applyFromString=function(string){var self=this;var style=this;var remaining=""+string;var selAndBlockStr;var blockRem;var propAndValStr;remaining=remaining.replace(/[/][*](\s|.)+?[*][/]/g,"");function removeSelAndBlockFromRemaining(){if(remaining.length>selAndBlockStr.length){remaining=remaining.substr(selAndBlockStr.length)}else{remaining=""}}function removePropAndValFromRem(){if(blockRem.length>propAndValStr.length){blockRem=blockRem.substr(propAndValStr.length)}else{blockRem=""}}while(true){var nothingLeftToParse=remaining.match(/^\s*$/);if(nothingLeftToParse){break}var selAndBlock=remaining.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!selAndBlock){util.error("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+remaining);break}selAndBlockStr=selAndBlock[0];var selectorStr=selAndBlock[1];if(selectorStr!=="core"){var selector=new Selector(selectorStr);if(selector._private.invalid){util.error("Skipping parsing of block: Invalid selector found in string stylesheet: "+selectorStr);removeSelAndBlockFromRemaining();continue}}var blockStr=selAndBlock[2];var invalidBlock=false;blockRem=blockStr;var props=[];while(true){var nothingLeftToParse=blockRem.match(/^\s*$/);if(nothingLeftToParse){break}var propAndVal=blockRem.match(/^\s*(.+?)\s*:\s*(.+?)\s*;/);if(!propAndVal){util.error("Skipping parsing of block: Invalid formatting of style property and value definitions found in:"+blockStr);invalidBlock=true;break}propAndValStr=propAndVal[0];var propStr=propAndVal[1];var valStr=propAndVal[2];var prop=self.properties[propStr];if(!prop){ -util.error("Skipping property: Invalid property name in: "+propAndValStr);removePropAndValFromRem();continue}var parsedProp=style.parse(propStr,valStr);if(!parsedProp){util.error("Skipping property: Invalid property definition in: "+propAndValStr);removePropAndValFromRem();continue}props.push({name:propStr,val:valStr});removePropAndValFromRem()}if(invalidBlock){removeSelAndBlockFromRemaining();break}style.selector(selectorStr);for(var i=0;i1?", "+JSON.stringify(arg1):"")+" );"," "," resolve = origResolve;"," resolve( res.length > 0 ? res : ret );","}"].join("\n"))}};util.extend(thdfn,{reduce:defineFnal({name:"reduce"}),reduceRight:defineFnal({name:"reduceRight"}),map:defineFnal({name:"map"})});var fn=thdfn;fn.promise=fn.run;fn.terminate=fn.halt=fn.stop;fn.include=fn.require;util.extend(thdfn,{on:define.on(),one:define.on({unbindSelfOnTrigger:true}),off:define.off(),trigger:define.trigger()});define.eventAliasesOn(thdfn);module.exports=Thread}).call(this,"/node_modules/cytoscape/src")},{"./define":75,"./event":76,"./is":114,"./promise":117,"./util":131,"./window":138,child_process:199,path:201}],130:[function(require,module,exports){"use strict";var is=require("../is");module.exports={hex2tuple:function(hex){if(!(hex.length===4||hex.length===7)||hex[0]!=="#"){return}var shortHex=hex.length===4;var r,g,b;var base=16;if(shortHex){r=parseInt(hex[1]+hex[1],base);g=parseInt(hex[2]+hex[2],base);b=parseInt(hex[3]+hex[3],base)}else{r=parseInt(hex[1]+hex[2],base);g=parseInt(hex[3]+hex[4],base);b=parseInt(hex[5]+hex[6],base)}return[r,g,b]},hsl2tuple:function(hsl){var ret;var h,s,l,a,r,g,b;function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}var m=new RegExp("^"+this.regex.hsla+"$").exec(hsl);if(m){h=parseInt(m[1]);if(h<0){h=(360- -1*h%360)%360}else if(h>360){h=h%360}h/=360;s=parseFloat(m[2]);if(s<0||s>100){return}s=s/100;l=parseFloat(m[3]);if(l<0||l>100){return}l=l/100;a=m[4];if(a!==undefined){a=parseFloat(a);if(a<0||a>1){return}}if(s===0){r=g=b=Math.round(l*255)}else{var q=l<.5?l*(1+s):l+s-l*s;var p=2*l-q;r=Math.round(255*hue2rgb(p,q,h+1/3));g=Math.round(255*hue2rgb(p,q,h));b=Math.round(255*hue2rgb(p,q,h-1/3))}ret=[r,g,b,a]}return ret},rgb2tuple:function(rgb){var ret;var m=new RegExp("^"+this.regex.rgba+"$").exec(rgb);if(m){ret=[];var isPct=[];for(var i=1;i<=3;i++){var channel=m[i];if(channel[channel.length-1]==="%"){isPct[i]=true}channel=parseFloat(channel);if(isPct[i]){channel=channel/100*255}if(channel<0||channel>255){return}ret.push(Math.floor(channel))}var atLeastOneIsPct=isPct[1]||isPct[2]||isPct[3];var allArePct=isPct[1]&&isPct[2]&&isPct[3];if(atLeastOneIsPct&&!allArePct){return}var alpha=m[4];if(alpha!==undefined){alpha=parseFloat(alpha);if(alpha<0||alpha>1){return}ret.push(alpha)}}return ret},colorname2tuple:function(color){return this.colors[color.toLowerCase()]},color2tuple:function(color){return(is.array(color)?color:null)||this.colorname2tuple(color)||this.hex2tuple(color)||this.rgb2tuple(color)||this.hsl2tuple(color)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},{"../is":114}],131:[function(require,module,exports){"use strict";var is=require("../is");var math=require("../math");var util={trueify:function(){return true},falsify:function(){return false},zeroify:function(){return 0},noop:function(){},error:function(msg){if(console.error){console.error.apply(console,arguments);if(console.trace){console.trace()}}else{console.log.apply(console,arguments);if(console.trace){console.trace()}}},clone:function(obj){return this.extend({},obj)},copy:function(obj){if(obj==null){return obj}if(is.array(obj)){return obj.slice()}else if(is.plainObject(obj)){return this.clone(obj)}else{return obj}},uuid:function(a,b){for(b=a="";a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):"-");return b}};util.makeBoundingBox=math.makeBoundingBox.bind(math);util._staticEmptyObject={};util.staticEmptyObject=function(){return util._staticEmptyObject};util.extend=Object.assign!=null?Object.assign:function(tgt){var args=arguments;for(var i=1;i=0;i--){if(arr[i]===ele){arr.splice(i,1);if(!manyCopies){break}}}};util.clearArray=function(arr){arr.splice(0,arr.length)};util.getPrefixedProperty=function(obj,propName,prefix){if(prefix){propName=this.prependCamel(prefix,propName)}return obj[propName]};util.setPrefixedProperty=function(obj,propName,prefix,value){if(prefix){propName=this.prependCamel(prefix,propName)}obj[propName]=value};[require("./colors"),require("./maps"),{memoize:require("./memoize")},require("./regex"),require("./strings"),require("./timing")].forEach(function(req){util.extend(util,req)});module.exports=util},{"../is":114,"../math":116,"./colors":130,"./maps":132,"./memoize":133,"./regex":134,"./strings":135,"./timing":136}],132:[function(require,module,exports){"use strict";var is=require("../is");module.exports={mapEmpty:function(map){var empty=true;if(map!=null){return Object.keys(map).length===0}return empty},pushMap:function(options){var array=this.getMap(options);if(array==null){this.setMap(this.extend({},options,{value:[options.value]}))}else{array.push(options.value)}},setMap:function(options){var obj=options.map;var key;var keys=options.keys;var l=keys.length;for(var i=0;i=0&&j=0},isPlainObject:function(obj){var key;if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype||{},"isPrototypeOf")){return false}for(key in obj){}return key===undefined||hasOwn.call(obj,key)},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType; +util.error("Skipping property: Invalid property name in: "+propAndValStr);removePropAndValFromRem();continue}var parsedProp=style.parse(propStr,valStr);if(!parsedProp){util.error("Skipping property: Invalid property definition in: "+propAndValStr);removePropAndValFromRem();continue}props.push({name:propStr,val:valStr});removePropAndValFromRem()}if(invalidBlock){removeSelAndBlockFromRemaining();break}style.selector(selectorStr);for(var i=0;i1?", "+JSON.stringify(arg1):"")+" );"," "," resolve = origResolve;"," resolve( res.length > 0 ? res : ret );","}"].join("\n"))}};util.extend(thdfn,{reduce:defineFnal({name:"reduce"}),reduceRight:defineFnal({name:"reduceRight"}),map:defineFnal({name:"map"})});var fn=thdfn;fn.promise=fn.run;fn.terminate=fn.halt=fn.stop;fn.include=fn.require;util.extend(thdfn,{on:define.on(),one:define.on({unbindSelfOnTrigger:true}),off:define.off(),trigger:define.trigger()});define.eventAliasesOn(thdfn);module.exports=Thread}).call(this,"/node_modules/cytoscape/src")},{"./define":75,"./event":76,"./is":114,"./promise":117,"./util":131,"./window":138,child_process:200,path:202}],130:[function(require,module,exports){"use strict";var is=require("../is");module.exports={hex2tuple:function(hex){if(!(hex.length===4||hex.length===7)||hex[0]!=="#"){return}var shortHex=hex.length===4;var r,g,b;var base=16;if(shortHex){r=parseInt(hex[1]+hex[1],base);g=parseInt(hex[2]+hex[2],base);b=parseInt(hex[3]+hex[3],base)}else{r=parseInt(hex[1]+hex[2],base);g=parseInt(hex[3]+hex[4],base);b=parseInt(hex[5]+hex[6],base)}return[r,g,b]},hsl2tuple:function(hsl){var ret;var h,s,l,a,r,g,b;function hue2rgb(p,q,t){if(t<0)t+=1;if(t>1)t-=1;if(t<1/6)return p+(q-p)*6*t;if(t<1/2)return q;if(t<2/3)return p+(q-p)*(2/3-t)*6;return p}var m=new RegExp("^"+this.regex.hsla+"$").exec(hsl);if(m){h=parseInt(m[1]);if(h<0){h=(360- -1*h%360)%360}else if(h>360){h=h%360}h/=360;s=parseFloat(m[2]);if(s<0||s>100){return}s=s/100;l=parseFloat(m[3]);if(l<0||l>100){return}l=l/100;a=m[4];if(a!==undefined){a=parseFloat(a);if(a<0||a>1){return}}if(s===0){r=g=b=Math.round(l*255)}else{var q=l<.5?l*(1+s):l+s-l*s;var p=2*l-q;r=Math.round(255*hue2rgb(p,q,h+1/3));g=Math.round(255*hue2rgb(p,q,h));b=Math.round(255*hue2rgb(p,q,h-1/3))}ret=[r,g,b,a]}return ret},rgb2tuple:function(rgb){var ret;var m=new RegExp("^"+this.regex.rgba+"$").exec(rgb);if(m){ret=[];var isPct=[];for(var i=1;i<=3;i++){var channel=m[i];if(channel[channel.length-1]==="%"){isPct[i]=true}channel=parseFloat(channel);if(isPct[i]){channel=channel/100*255}if(channel<0||channel>255){return}ret.push(Math.floor(channel))}var atLeastOneIsPct=isPct[1]||isPct[2]||isPct[3];var allArePct=isPct[1]&&isPct[2]&&isPct[3];if(atLeastOneIsPct&&!allArePct){return}var alpha=m[4];if(alpha!==undefined){alpha=parseFloat(alpha);if(alpha<0||alpha>1){return}ret.push(alpha)}}return ret},colorname2tuple:function(color){return this.colors[color.toLowerCase()]},color2tuple:function(color){return(is.array(color)?color:null)||this.colorname2tuple(color)||this.hex2tuple(color)||this.rgb2tuple(color)||this.hsl2tuple(color)},colors:{transparent:[0,0,0,0],aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],grey:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}}},{"../is":114}],131:[function(require,module,exports){"use strict";var is=require("../is");var math=require("../math");var util={trueify:function(){return true},falsify:function(){return false},zeroify:function(){return 0},noop:function(){},error:function(msg){if(console.error){console.error.apply(console,arguments);if(console.trace){console.trace()}}else{console.log.apply(console,arguments);if(console.trace){console.trace()}}},clone:function(obj){return this.extend({},obj)},copy:function(obj){if(obj==null){return obj}if(is.array(obj)){return obj.slice()}else if(is.plainObject(obj)){return this.clone(obj)}else{return obj}},uuid:function(a,b){for(b=a="";a++<36;b+=a*51&52?(a^15?8^Math.random()*(a^20?16:4):4).toString(16):"-");return b}};util.makeBoundingBox=math.makeBoundingBox.bind(math);util._staticEmptyObject={};util.staticEmptyObject=function(){return util._staticEmptyObject};util.extend=Object.assign!=null?Object.assign:function(tgt){var args=arguments;for(var i=1;i=0;i--){if(arr[i]===ele){arr.splice(i,1);if(!manyCopies){break}}}};util.clearArray=function(arr){arr.splice(0,arr.length)};util.getPrefixedProperty=function(obj,propName,prefix){if(prefix){propName=this.prependCamel(prefix,propName)}return obj[propName]};util.setPrefixedProperty=function(obj,propName,prefix,value){if(prefix){propName=this.prependCamel(prefix,propName)}obj[propName]=value};[require("./colors"),require("./maps"),{memoize:require("./memoize")},require("./regex"),require("./strings"),require("./timing")].forEach(function(req){util.extend(util,req)});module.exports=util},{"../is":114,"../math":116,"./colors":130,"./maps":132,"./memoize":133,"./regex":134,"./strings":135,"./timing":136}],132:[function(require,module,exports){"use strict";var is=require("../is");module.exports={mapEmpty:function(map){var empty=true;if(map!=null){return Object.keys(map).length===0}return empty},pushMap:function(options){var array=this.getMap(options);if(array==null){this.setMap(this.extend({},options,{value:[options.value]}))}else{array.push(options.value)}},setMap:function(options){var obj=options.map;var key;var keys=options.keys;var l=keys.length;for(var i=0;i=0&&j=0},isPlainObject:function(obj){var key;if(jQuery.type(obj)!=="object"||obj.nodeType||jQuery.isWindow(obj)){return false}if(obj.constructor&&!hasOwn.call(obj,"constructor")&&!hasOwn.call(obj.constructor.prototype||{},"isPrototypeOf")){return false}for(key in obj){}return key===undefined||hasOwn.call(obj,key)},isEmptyObject:function(obj){var name;for(name in obj){return false}return true},type:function(obj){if(obj==null){return obj+""}return typeof obj==="object"||typeof obj==="function"?class2type[toString.call(obj)]||"object":typeof obj},globalEval:function(code){var script,indirect=eval;code=jQuery.trim(code);if(code){if(code.indexOf("use strict")===1){script=document.createElement("script");script.text=code;document.head.appendChild(script).parentNode.removeChild(script)}else{indirect(code)}}},camelCase:function(string){return string.replace(rmsPrefix,"ms-").replace(rdashAlpha,fcamelCase)},nodeName:function(elem,name){return elem.nodeName&&elem.nodeName.toLowerCase()===name.toLowerCase()},each:function(obj,callback){var length,i=0;if(isArrayLike(obj)){length=obj.length;for(;i0&&length-1 in obj}var Sizzle=function(window){var i,support,Expr,getText,isXML,tokenize,compile,select,outermostContext,sortInput,hasDuplicate,setDocument,document,docElem,documentIsHTML,rbuggyQSA,rbuggyMatches,matches,contains,expando="sizzle"+1*new Date,preferredDoc=window.document,dirruns=0,done=0,classCache=createCache(),tokenCache=createCache(),compilerCache=createCache(),sortOrder=function(a,b){if(a===b){hasDuplicate=true}return 0},MAX_NEGATIVE=1<<31,hasOwn={}.hasOwnProperty,arr=[],pop=arr.pop,push_native=arr.push,push=arr.push,slice=arr.slice,indexOf=function(list,elem){var i=0,len=list.length;for(;i+~]|"+whitespace+")"+whitespace+"*"),rattributeQuotes=new RegExp("="+whitespace+"*([^\\]'\"]*?)"+whitespace+"*\\]","g"),rpseudo=new RegExp(pseudos),ridentifier=new RegExp("^"+identifier+"$"),matchExpr={ID:new RegExp("^#("+identifier+")"),CLASS:new RegExp("^\\.("+identifier+")"),TAG:new RegExp("^("+identifier+"|[*])"),ATTR:new RegExp("^"+attributes),PSEUDO:new RegExp("^"+pseudos),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+whitespace+"*(even|odd|(([+-]|)(\\d*)n|)"+whitespace+"*(?:([+-]|)"+whitespace+"*(\\d+)|))"+whitespace+"*\\)|)","i"),bool:new RegExp("^(?:"+booleans+")$","i"),needsContext:new RegExp("^"+whitespace+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+whitespace+"*((?:-\\d)?\\d*)"+whitespace+"*\\)|)(?=[^-]|$)","i")},rinputs=/^(?:input|select|textarea|button)$/i,rheader=/^h\d$/i,rnative=/^[^{]+\{\s*\[native \w/,rquickExpr=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,rsibling=/[+~]/,rescape=/'|\\/g,runescape=new RegExp("\\\\([\\da-f]{1,6}"+whitespace+"?|("+whitespace+")|.)","ig"),funescape=function(_,escaped,escapedWhitespace){var high="0x"+escaped-65536;return high!==high||escapedWhitespace?escaped:high<0?String.fromCharCode(high+65536):String.fromCharCode(high>>10|55296,high&1023|56320)},unloadHandler=function(){setDocument()};try{push.apply(arr=slice.call(preferredDoc.childNodes),preferredDoc.childNodes);arr[preferredDoc.childNodes.length].nodeType; }catch(e){push={apply:arr.length?function(target,els){push_native.apply(target,slice.call(els))}:function(target,els){var j=target.length,i=0;while(target[j++]=els[i++]){}target.length=j-1}}}function Sizzle(selector,context,results,seed){var m,i,elem,nid,nidselect,match,groups,newSelector,newContext=context&&context.ownerDocument,nodeType=context?context.nodeType:9;results=results||[];if(typeof selector!=="string"||!selector||nodeType!==1&&nodeType!==9&&nodeType!==11){return results}if(!seed){if((context?context.ownerDocument||context:preferredDoc)!==document){setDocument(context)}context=context||document;if(documentIsHTML){if(nodeType!==11&&(match=rquickExpr.exec(selector))){if(m=match[1]){if(nodeType===9){if(elem=context.getElementById(m)){if(elem.id===m){results.push(elem);return results}}else{return results}}else{if(newContext&&(elem=newContext.getElementById(m))&&contains(context,elem)&&elem.id===m){results.push(elem);return results}}}else if(match[2]){push.apply(results,context.getElementsByTagName(selector));return results}else if((m=match[3])&&support.getElementsByClassName&&context.getElementsByClassName){push.apply(results,context.getElementsByClassName(m));return results}}if(support.qsa&&!compilerCache[selector+" "]&&(!rbuggyQSA||!rbuggyQSA.test(selector))){if(nodeType!==1){newContext=context;newSelector=selector}else if(context.nodeName.toLowerCase()!=="object"){if(nid=context.getAttribute("id")){nid=nid.replace(rescape,"\\$&")}else{context.setAttribute("id",nid=expando)}groups=tokenize(selector);i=groups.length;nidselect=ridentifier.test(nid)?"#"+nid:"[id='"+nid+"']";while(i--){groups[i]=nidselect+" "+toSelector(groups[i])}newSelector=groups.join(",");newContext=rsibling.test(selector)&&testContext(context.parentNode)||context}if(newSelector){try{push.apply(results,newContext.querySelectorAll(newSelector));return results}catch(qsaError){}finally{if(nid===expando){context.removeAttribute("id")}}}}}}return select(selector.replace(rtrim,"$1"),context,results,seed)}function createCache(){var keys=[];function cache(key,value){if(keys.push(key+" ")>Expr.cacheLength){delete cache[keys.shift()]}return cache[key+" "]=value}return cache}function markFunction(fn){fn[expando]=true;return fn}function assert(fn){var div=document.createElement("div");try{return!!fn(div)}catch(e){return false}finally{if(div.parentNode){div.parentNode.removeChild(div)}div=null}}function addHandle(attrs,handler){var arr=attrs.split("|"),i=arr.length;while(i--){Expr.attrHandle[arr[i]]=handler}}function siblingCheck(a,b){var cur=b&&a,diff=cur&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||MAX_NEGATIVE)-(~a.sourceIndex||MAX_NEGATIVE);if(diff){return diff}if(cur){while(cur=cur.nextSibling){if(cur===b){return-1}}}return a?1:-1}function createInputPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type===type}}function createButtonPseudo(type){return function(elem){var name=elem.nodeName.toLowerCase();return(name==="input"||name==="button")&&elem.type===type}}function createPositionalPseudo(fn){return markFunction(function(argument){argument=+argument;return markFunction(function(seed,matches){var j,matchIndexes=fn([],seed.length,argument),i=matchIndexes.length;while(i--){if(seed[j=matchIndexes[i]]){seed[j]=!(matches[j]=seed[j])}}})})}function testContext(context){return context&&typeof context.getElementsByTagName!=="undefined"&&context}support=Sizzle.support={};isXML=Sizzle.isXML=function(elem){var documentElement=elem&&(elem.ownerDocument||elem).documentElement;return documentElement?documentElement.nodeName!=="HTML":false};setDocument=Sizzle.setDocument=function(node){var hasCompare,parent,doc=node?node.ownerDocument||node:preferredDoc;if(doc===document||doc.nodeType!==9||!doc.documentElement){return document}document=doc;docElem=document.documentElement;documentIsHTML=!isXML(document);if((parent=document.defaultView)&&parent.top!==parent){if(parent.addEventListener){parent.addEventListener("unload",unloadHandler,false)}else if(parent.attachEvent){parent.attachEvent("onunload",unloadHandler)}}support.attributes=assert(function(div){div.className="i";return!div.getAttribute("className")});support.getElementsByTagName=assert(function(div){div.appendChild(document.createComment(""));return!div.getElementsByTagName("*").length});support.getElementsByClassName=rnative.test(document.getElementsByClassName);support.getById=assert(function(div){docElem.appendChild(div).id=expando;return!document.getElementsByName||!document.getElementsByName(expando).length});if(support.getById){Expr.find["ID"]=function(id,context){if(typeof context.getElementById!=="undefined"&&documentIsHTML){var m=context.getElementById(id);return m?[m]:[]}};Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){return elem.getAttribute("id")===attrId}}}else{delete Expr.find["ID"];Expr.filter["ID"]=function(id){var attrId=id.replace(runescape,funescape);return function(elem){var node=typeof elem.getAttributeNode!=="undefined"&&elem.getAttributeNode("id");return node&&node.value===attrId}}}Expr.find["TAG"]=support.getElementsByTagName?function(tag,context){if(typeof context.getElementsByTagName!=="undefined"){return context.getElementsByTagName(tag)}else if(support.qsa){return context.querySelectorAll(tag)}}:function(tag,context){var elem,tmp=[],i=0,results=context.getElementsByTagName(tag);if(tag==="*"){while(elem=results[i++]){if(elem.nodeType===1){tmp.push(elem)}}return tmp}return results};Expr.find["CLASS"]=support.getElementsByClassName&&function(className,context){if(typeof context.getElementsByClassName!=="undefined"&&documentIsHTML){return context.getElementsByClassName(className)}};rbuggyMatches=[];rbuggyQSA=[];if(support.qsa=rnative.test(document.querySelectorAll)){assert(function(div){docElem.appendChild(div).innerHTML=""+"";if(div.querySelectorAll("[msallowcapture^='']").length){rbuggyQSA.push("[*^$]="+whitespace+"*(?:''|\"\")")}if(!div.querySelectorAll("[selected]").length){rbuggyQSA.push("\\["+whitespace+"*(?:value|"+booleans+")")}if(!div.querySelectorAll("[id~="+expando+"-]").length){rbuggyQSA.push("~=")}if(!div.querySelectorAll(":checked").length){rbuggyQSA.push(":checked")}if(!div.querySelectorAll("a#"+expando+"+*").length){rbuggyQSA.push(".#.+[+~]")}});assert(function(div){var input=document.createElement("input");input.setAttribute("type","hidden");div.appendChild(input).setAttribute("name","D");if(div.querySelectorAll("[name=d]").length){rbuggyQSA.push("name"+whitespace+"*[*^$|!~]?=")}if(!div.querySelectorAll(":enabled").length){rbuggyQSA.push(":enabled",":disabled")}div.querySelectorAll("*,:x");rbuggyQSA.push(",.*:")})}if(support.matchesSelector=rnative.test(matches=docElem.matches||docElem.webkitMatchesSelector||docElem.mozMatchesSelector||docElem.oMatchesSelector||docElem.msMatchesSelector)){assert(function(div){support.disconnectedMatch=matches.call(div,"div");matches.call(div,"[s!='']:x");rbuggyMatches.push("!=",pseudos)})}rbuggyQSA=rbuggyQSA.length&&new RegExp(rbuggyQSA.join("|"));rbuggyMatches=rbuggyMatches.length&&new RegExp(rbuggyMatches.join("|"));hasCompare=rnative.test(docElem.compareDocumentPosition);contains=hasCompare||rnative.test(docElem.contains)?function(a,b){var adown=a.nodeType===9?a.documentElement:a,bup=b&&b.parentNode;return a===bup||!!(bup&&bup.nodeType===1&&(adown.contains?adown.contains(bup):a.compareDocumentPosition&&a.compareDocumentPosition(bup)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};sortOrder=hasCompare?function(a,b){if(a===b){hasDuplicate=true;return 0}var compare=!a.compareDocumentPosition-!b.compareDocumentPosition;if(compare){return compare}compare=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(compare&1||!support.sortDetached&&b.compareDocumentPosition(a)===compare){if(a===document||a.ownerDocument===preferredDoc&&contains(preferredDoc,a)){return-1}if(b===document||b.ownerDocument===preferredDoc&&contains(preferredDoc,b)){return 1}return sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}return compare&4?-1:1}:function(a,b){if(a===b){hasDuplicate=true;return 0}var cur,i=0,aup=a.parentNode,bup=b.parentNode,ap=[a],bp=[b];if(!aup||!bup){return a===document?-1:b===document?1:aup?-1:bup?1:sortInput?indexOf(sortInput,a)-indexOf(sortInput,b):0}else if(aup===bup){return siblingCheck(a,b)}cur=a;while(cur=cur.parentNode){ap.unshift(cur)}cur=b;while(cur=cur.parentNode){bp.unshift(cur)}while(ap[i]===bp[i]){i++}return i?siblingCheck(ap[i],bp[i]):ap[i]===preferredDoc?-1:bp[i]===preferredDoc?1:0};return document};Sizzle.matches=function(expr,elements){return Sizzle(expr,null,null,elements)};Sizzle.matchesSelector=function(elem,expr){if((elem.ownerDocument||elem)!==document){setDocument(elem)}expr=expr.replace(rattributeQuotes,"='$1']");if(support.matchesSelector&&documentIsHTML&&!compilerCache[expr+" "]&&(!rbuggyMatches||!rbuggyMatches.test(expr))&&(!rbuggyQSA||!rbuggyQSA.test(expr))){try{var ret=matches.call(elem,expr);if(ret||support.disconnectedMatch||elem.document&&elem.document.nodeType!==11){return ret}}catch(e){}}return Sizzle(expr,document,null,[elem]).length>0};Sizzle.contains=function(context,elem){if((context.ownerDocument||context)!==document){setDocument(context)}return contains(context,elem)};Sizzle.attr=function(elem,name){if((elem.ownerDocument||elem)!==document){setDocument(elem)}var fn=Expr.attrHandle[name.toLowerCase()],val=fn&&hasOwn.call(Expr.attrHandle,name.toLowerCase())?fn(elem,name,!documentIsHTML):undefined;return val!==undefined?val:support.attributes||!documentIsHTML?elem.getAttribute(name):(val=elem.getAttributeNode(name))&&val.specified?val.value:null};Sizzle.error=function(msg){throw new Error("Syntax error, unrecognized expression: "+msg)};Sizzle.uniqueSort=function(results){var elem,duplicates=[],j=0,i=0;hasDuplicate=!support.detectDuplicates;sortInput=!support.sortStable&&results.slice(0);results.sort(sortOrder);if(hasDuplicate){while(elem=results[i++]){if(elem===results[i]){j=duplicates.push(i)}}while(j--){results.splice(duplicates[j],1)}}sortInput=null;return results};getText=Sizzle.getText=function(elem){var node,ret="",i=0,nodeType=elem.nodeType;if(!nodeType){while(node=elem[i++]){ret+=getText(node)}}else if(nodeType===1||nodeType===9||nodeType===11){if(typeof elem.textContent==="string"){return elem.textContent}else{for(elem=elem.firstChild;elem;elem=elem.nextSibling){ret+=getText(elem)}}}else if(nodeType===3||nodeType===4){return elem.nodeValue}return ret};Expr=Sizzle.selectors={cacheLength:50,createPseudo:markFunction,match:matchExpr,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(match){match[1]=match[1].replace(runescape,funescape);match[3]=(match[3]||match[4]||match[5]||"").replace(runescape,funescape);if(match[2]==="~="){match[3]=" "+match[3]+" "}return match.slice(0,4)},CHILD:function(match){match[1]=match[1].toLowerCase();if(match[1].slice(0,3)==="nth"){if(!match[3]){Sizzle.error(match[0])}match[4]=+(match[4]?match[5]+(match[6]||1):2*(match[3]==="even"||match[3]==="odd"));match[5]=+(match[7]+match[8]||match[3]==="odd")}else if(match[3]){Sizzle.error(match[0])}return match},PSEUDO:function(match){var excess,unquoted=!match[6]&&match[2];if(matchExpr["CHILD"].test(match[0])){return null}if(match[3]){match[2]=match[4]||match[5]||""}else if(unquoted&&rpseudo.test(unquoted)&&(excess=tokenize(unquoted,true))&&(excess=unquoted.indexOf(")",unquoted.length-excess)-unquoted.length)){match[0]=match[0].slice(0,excess);match[2]=unquoted.slice(0,excess)}return match.slice(0,3)}},filter:{TAG:function(nodeNameSelector){var nodeName=nodeNameSelector.replace(runescape,funescape).toLowerCase();return nodeNameSelector==="*"?function(){return true}:function(elem){return elem.nodeName&&elem.nodeName.toLowerCase()===nodeName}},CLASS:function(className){var pattern=classCache[className+" "];return pattern||(pattern=new RegExp("(^|"+whitespace+")"+className+"("+whitespace+"|$)"))&&classCache(className,function(elem){return pattern.test(typeof elem.className==="string"&&elem.className||typeof elem.getAttribute!=="undefined"&&elem.getAttribute("class")||"")})},ATTR:function(name,operator,check){return function(elem){var result=Sizzle.attr(elem,name);if(result==null){return operator==="!="}if(!operator){return true}result+="";return operator==="="?result===check:operator==="!="?result!==check:operator==="^="?check&&result.indexOf(check)===0:operator==="*="?check&&result.indexOf(check)>-1:operator==="$="?check&&result.slice(-check.length)===check:operator==="~="?(" "+result.replace(rwhitespace," ")+" ").indexOf(check)>-1:operator==="|="?result===check||result.slice(0,check.length+1)===check+"-":false}},CHILD:function(type,what,argument,first,last){var simple=type.slice(0,3)!=="nth",forward=type.slice(-4)!=="last",ofType=what==="of-type";return first===1&&last===0?function(elem){return!!elem.parentNode}:function(elem,context,xml){var cache,uniqueCache,outerCache,node,nodeIndex,start,dir=simple!==forward?"nextSibling":"previousSibling",parent=elem.parentNode,name=ofType&&elem.nodeName.toLowerCase(),useCache=!xml&&!ofType,diff=false;if(parent){if(simple){while(dir){node=elem;while(node=node[dir]){if(ofType?node.nodeName.toLowerCase()===name:node.nodeType===1){return false}}start=dir=type==="only"&&!start&&"nextSibling"}return true}start=[forward?parent.firstChild:parent.lastChild];if(forward&&useCache){node=parent;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex&&cache[2];node=nodeIndex&&parent.childNodes[nodeIndex];while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if(node.nodeType===1&&++diff&&node===elem){uniqueCache[type]=[dirruns,nodeIndex,diff];break}}}else{if(useCache){node=elem;outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});cache=uniqueCache[type]||[];nodeIndex=cache[0]===dirruns&&cache[1];diff=nodeIndex}if(diff===false){while(node=++nodeIndex&&node&&node[dir]||(diff=nodeIndex=0)||start.pop()){if((ofType?node.nodeName.toLowerCase()===name:node.nodeType===1)&&++diff){if(useCache){outerCache=node[expando]||(node[expando]={});uniqueCache=outerCache[node.uniqueID]||(outerCache[node.uniqueID]={});uniqueCache[type]=[dirruns,diff]}if(node===elem){break}}}}}diff-=last;return diff===first||diff%first===0&&diff/first>=0}}},PSEUDO:function(pseudo,argument){var args,fn=Expr.pseudos[pseudo]||Expr.setFilters[pseudo.toLowerCase()]||Sizzle.error("unsupported pseudo: "+pseudo);if(fn[expando]){return fn(argument)}if(fn.length>1){args=[pseudo,pseudo,"",argument];return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase())?markFunction(function(seed,matches){var idx,matched=fn(seed,argument),i=matched.length;while(i--){idx=indexOf(seed,matched[i]);seed[idx]=!(matches[idx]=matched[i])}}):function(elem){return fn(elem,0,args)}}return fn}},pseudos:{not:markFunction(function(selector){var input=[],results=[],matcher=compile(selector.replace(rtrim,"$1"));return matcher[expando]?markFunction(function(seed,matches,context,xml){var elem,unmatched=matcher(seed,null,xml,[]),i=seed.length;while(i--){if(elem=unmatched[i]){seed[i]=!(matches[i]=elem)}}}):function(elem,context,xml){input[0]=elem;matcher(input,null,xml,results);input[0]=null;return!results.pop()}}),has:markFunction(function(selector){return function(elem){return Sizzle(selector,elem).length>0}}),contains:markFunction(function(text){text=text.replace(runescape,funescape);return function(elem){return(elem.textContent||elem.innerText||getText(elem)).indexOf(text)>-1}}),lang:markFunction(function(lang){if(!ridentifier.test(lang||"")){Sizzle.error("unsupported lang: "+lang)}lang=lang.replace(runescape,funescape).toLowerCase();return function(elem){var elemLang;do{if(elemLang=documentIsHTML?elem.lang:elem.getAttribute("xml:lang")||elem.getAttribute("lang")){elemLang=elemLang.toLowerCase();return elemLang===lang||elemLang.indexOf(lang+"-")===0}}while((elem=elem.parentNode)&&elem.nodeType===1);return false}}),target:function(elem){var hash=window.location&&window.location.hash;return hash&&hash.slice(1)===elem.id},root:function(elem){return elem===docElem},focus:function(elem){return elem===document.activeElement&&(!document.hasFocus||document.hasFocus())&&!!(elem.type||elem.href||~elem.tabIndex)},enabled:function(elem){return elem.disabled===false},disabled:function(elem){return elem.disabled===true},checked:function(elem){var nodeName=elem.nodeName.toLowerCase();return nodeName==="input"&&!!elem.checked||nodeName==="option"&&!!elem.selected},selected:function(elem){if(elem.parentNode){elem.parentNode.selectedIndex}return elem.selected===true},empty:function(elem){for(elem=elem.firstChild;elem;elem=elem.nextSibling){if(elem.nodeType<6){return false}}return true},parent:function(elem){return!Expr.pseudos["empty"](elem)},header:function(elem){return rheader.test(elem.nodeName)},input:function(elem){return rinputs.test(elem.nodeName)},button:function(elem){var name=elem.nodeName.toLowerCase();return name==="input"&&elem.type==="button"||name==="button"},text:function(elem){var attr;return elem.nodeName.toLowerCase()==="input"&&elem.type==="text"&&((attr=elem.getAttribute("type"))==null||attr.toLowerCase()==="text")},first:createPositionalPseudo(function(){return[0]}),last:createPositionalPseudo(function(matchIndexes,length){return[length-1]}),eq:createPositionalPseudo(function(matchIndexes,length,argument){return[argument<0?argument+length:argument]}),even:createPositionalPseudo(function(matchIndexes,length){var i=0;for(;i=0;){matchIndexes.push(i)}return matchIndexes}),gt:createPositionalPseudo(function(matchIndexes,length,argument){var i=argument<0?argument+length:argument;for(;++i1?function(elem,context,xml){var i=matchers.length;while(i--){if(!matchers[i](elem,context,xml)){return false}}return true}:matchers[0]}function multipleContexts(selector,contexts,results){var i=0,len=contexts.length;for(;i-1){seed[temp]=!(results[temp]=elem)}}}}else{matcherOut=condense(matcherOut===results?matcherOut.splice(preexisting,matcherOut.length):matcherOut);if(postFinder){postFinder(null,results,matcherOut,xml)}else{push.apply(results,matcherOut)}}})}function matcherFromTokens(tokens){var checkContext,matcher,j,len=tokens.length,leadingRelative=Expr.relative[tokens[0].type],implicitRelative=leadingRelative||Expr.relative[" "],i=leadingRelative?1:0,matchContext=addCombinator(function(elem){return elem===checkContext},implicitRelative,true),matchAnyContext=addCombinator(function(elem){return indexOf(checkContext,elem)>-1},implicitRelative,true),matchers=[function(elem,context,xml){var ret=!leadingRelative&&(xml||context!==outermostContext)||((checkContext=context).nodeType?matchContext(elem,context,xml):matchAnyContext(elem,context,xml));checkContext=null;return ret}];for(;i1&&elementMatcher(matchers),i>1&&toSelector(tokens.slice(0,i-1).concat({value:tokens[i-2].type===" "?"*":""})).replace(rtrim,"$1"),matcher,i0,byElement=elementMatchers.length>0,superMatcher=function(seed,context,xml,results,outermost){var elem,j,matcher,matchedCount=0,i="0",unmatched=seed&&[],setMatched=[],contextBackup=outermostContext,elems=seed||byElement&&Expr.find["TAG"]("*",outermost),dirrunsUnique=dirruns+=contextBackup==null?1:Math.random()||.1,len=elems.length;if(outermost){outermostContext=context===document||context||outermost}for(;i!==len&&(elem=elems[i])!=null;i++){if(byElement&&elem){j=0;if(!context&&elem.ownerDocument!==document){setDocument(elem);xml=!documentIsHTML}while(matcher=elementMatchers[j++]){if(matcher(elem,context||document,xml)){results.push(elem);break}}if(outermost){dirruns=dirrunsUnique}}if(bySet){if(elem=!matcher&&elem){matchedCount--}if(seed){unmatched.push(elem)}}}matchedCount+=i;if(bySet&&i!==matchedCount){j=0;while(matcher=setMatchers[j++]){matcher(unmatched,setMatched,context,xml)}if(seed){if(matchedCount>0){while(i--){if(!(unmatched[i]||setMatched[i])){setMatched[i]=pop.call(results)}}}setMatched=condense(setMatched)}push.apply(results,setMatched);if(outermost&&!seed&&setMatched.length>0&&matchedCount+setMatchers.length>1){Sizzle.uniqueSort(results)}}if(outermost){dirruns=dirrunsUnique;outermostContext=contextBackup}return unmatched};return bySet?markFunction(superMatcher):superMatcher}compile=Sizzle.compile=function(selector,match){var i,setMatchers=[],elementMatchers=[],cached=compilerCache[selector+" "];if(!cached){if(!match){match=tokenize(selector)}i=match.length;while(i--){cached=matcherFromTokens(match[i]);if(cached[expando]){setMatchers.push(cached)}else{elementMatchers.push(cached)}}cached=compilerCache(selector,matcherFromGroupMatchers(elementMatchers,setMatchers));cached.selector=selector}return cached};select=Sizzle.select=function(selector,context,results,seed){var i,tokens,token,type,find,compiled=typeof selector==="function"&&selector,match=!seed&&tokenize(selector=compiled.selector||selector);results=results||[];if(match.length===1){tokens=match[0]=match[0].slice(0);if(tokens.length>2&&(token=tokens[0]).type==="ID"&&support.getById&&context.nodeType===9&&documentIsHTML&&Expr.relative[tokens[1].type]){context=(Expr.find["ID"](token.matches[0].replace(runescape,funescape),context)||[])[0];if(!context){return results}else if(compiled){context=context.parentNode}selector=selector.slice(tokens.shift().value.length)}i=matchExpr["needsContext"].test(selector)?0:tokens.length;while(i--){token=tokens[i];if(Expr.relative[type=token.type]){break}if(find=Expr.find[type]){if(seed=find(token.matches[0].replace(runescape,funescape),rsibling.test(tokens[0].type)&&testContext(context.parentNode)||context)){tokens.splice(i,1);selector=seed.length&&toSelector(tokens);if(!selector){push.apply(results,seed);return results}break}}}}(compiled||compile(selector,match))(seed,context,!documentIsHTML,results,!context||rsibling.test(selector)&&testContext(context.parentNode)||context);return results};support.sortStable=expando.split("").sort(sortOrder).join("")===expando;support.detectDuplicates=!!hasDuplicate;setDocument();support.sortDetached=assert(function(div1){return div1.compareDocumentPosition(document.createElement("div"))&1});if(!assert(function(div){div.innerHTML="";return div.firstChild.getAttribute("href")==="#"})){addHandle("type|href|height|width",function(elem,name,isXML){if(!isXML){return elem.getAttribute(name,name.toLowerCase()==="type"?1:2)}})}if(!support.attributes||!assert(function(div){div.innerHTML="";div.firstChild.setAttribute("value","");return div.firstChild.getAttribute("value")===""})){addHandle("value",function(elem,name,isXML){if(!isXML&&elem.nodeName.toLowerCase()==="input"){return elem.defaultValue}})}if(!assert(function(div){return div.getAttribute("disabled")==null})){addHandle(booleans,function(elem,name,isXML){var val;if(!isXML){return elem[name]===true?name.toLowerCase():(val=elem.getAttributeNode(name))&&val.specified?val.value:null}})}return Sizzle}(window);jQuery.find=Sizzle;jQuery.expr=Sizzle.selectors;jQuery.expr[":"]=jQuery.expr.pseudos;jQuery.uniqueSort=jQuery.unique=Sizzle.uniqueSort;jQuery.text=Sizzle.getText;jQuery.isXMLDoc=Sizzle.isXML;jQuery.contains=Sizzle.contains;var dir=function(elem,dir,until){var matched=[],truncate=until!==undefined;while((elem=elem[dir])&&elem.nodeType!==9){if(elem.nodeType===1){if(truncate&&jQuery(elem).is(until)){break}matched.push(elem)}}return matched};var siblings=function(n,elem){var matched=[];for(;n;n=n.nextSibling){if(n.nodeType===1&&n!==elem){matched.push(n)}}return matched};var rneedsContext=jQuery.expr.match.needsContext;var rsingleTag=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/;var risSimple=/^.[^:#\[\.,]*$/;function winnow(elements,qualifier,not){if(jQuery.isFunction(qualifier)){return jQuery.grep(elements,function(elem,i){return!!qualifier.call(elem,i,elem)!==not})}if(qualifier.nodeType){return jQuery.grep(elements,function(elem){return elem===qualifier!==not})}if(typeof qualifier==="string"){if(risSimple.test(qualifier)){return jQuery.filter(qualifier,elements,not)}qualifier=jQuery.filter(qualifier,elements)}return jQuery.grep(elements,function(elem){return indexOf.call(qualifier,elem)>-1!==not})}jQuery.filter=function(expr,elems,not){var elem=elems[0];if(not){expr=":not("+expr+")"}return elems.length===1&&elem.nodeType===1?jQuery.find.matchesSelector(elem,expr)?[elem]:[]:jQuery.find.matches(expr,jQuery.grep(elems,function(elem){return elem.nodeType===1}))};jQuery.fn.extend({find:function(selector){var i,len=this.length,ret=[],self=this;if(typeof selector!=="string"){return this.pushStack(jQuery(selector).filter(function(){for(i=0;i1?jQuery.unique(ret):ret);ret.selector=this.selector?this.selector+" "+selector:selector;return ret},filter:function(selector){return this.pushStack(winnow(this,selector||[],false))},not:function(selector){return this.pushStack(winnow(this,selector||[],true))},is:function(selector){return!!winnow(this,typeof selector==="string"&&rneedsContext.test(selector)?jQuery(selector):selector||[],false).length}});var rootjQuery,rquickExpr=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,init=jQuery.fn.init=function(selector,context,root){var match,elem;if(!selector){return this}root=root||rootjQuery;if(typeof selector==="string"){if(selector[0]==="<"&&selector[selector.length-1]===">"&&selector.length>=3){match=[null,selector,null]}else{match=rquickExpr.exec(selector)}if(match&&(match[1]||!context)){if(match[1]){context=context instanceof jQuery?context[0]:context;jQuery.merge(this,jQuery.parseHTML(match[1],context&&context.nodeType?context.ownerDocument||context:document,true));if(rsingleTag.test(match[1])&&jQuery.isPlainObject(context)){for(match in context){if(jQuery.isFunction(this[match])){this[match](context[match])}else{this.attr(match,context[match])}}}return this}else{elem=document.getElementById(match[2]);if(elem&&elem.parentNode){this.length=1;this[0]=elem}this.context=document;this.selector=selector;return this}}else if(!context||context.jquery){return(context||root).find(selector)}else{return this.constructor(context).find(selector)}}else if(selector.nodeType){this.context=this[0]=selector;this.length=1;return this}else if(jQuery.isFunction(selector)){return root.ready!==undefined?root.ready(selector):selector(jQuery)}if(selector.selector!==undefined){this.selector=selector.selector;this.context=selector.context}return jQuery.makeArray(selector,this)};init.prototype=jQuery.fn;rootjQuery=jQuery(document);var rparentsprev=/^(?:parents|prev(?:Until|All))/,guaranteedUnique={children:true,contents:true,next:true,prev:true};jQuery.fn.extend({has:function(target){var targets=jQuery(target,this),l=targets.length;return this.filter(function(){var i=0;for(;i-1)){throw"assert failed"}}return this.owner};LNode.prototype.getWidth=function(){return this.rect.width};LNode.prototype.setWidth=function(width){this.rect.width=width};LNode.prototype.getHeight=function(){return this.rect.height};LNode.prototype.setHeight=function(height){this.rect.height=height};LNode.prototype.getCenterX=function(){return this.rect.x+this.rect.width/2};LNode.prototype.getCenterY=function(){return this.rect.y+this.rect.height/2};LNode.prototype.getCenter=function(){return new PointD(this.rect.x+this.rect.width/2,this.rect.y+this.rect.height/2)};LNode.prototype.getLocation=function(){return new PointD(this.rect.x,this.rect.y)};LNode.prototype.getRect=function(){return this.rect};LNode.prototype.getDiagonal=function(){return Math.sqrt(this.rect.width*this.rect.width+this.rect.height*this.rect.height)};LNode.prototype.setRect=function(upperLeft,dimension){this.rect.x=upperLeft.x;this.rect.y=upperLeft.y;this.rect.width=dimension.width;this.rect.height=dimension.height};LNode.prototype.setCenter=function(cx,cy){this.rect.x=cx-this.rect.width/2;this.rect.y=cy-this.rect.height/2};LNode.prototype.setLocation=function(x,y){this.rect.x=x;this.rect.y=y};LNode.prototype.moveBy=function(dx,dy){this.rect.x+=dx;this.rect.y+=dy};LNode.prototype.getEdgeListToNode=function(to){var edgeList=[];var edge;for(var obj in this.edges){edge=obj;if(edge.target==to){if(edge.source!=this)throw"Incorrect edge source!";edgeList.push(edge)}}return edgeList};LNode.prototype.getEdgesBetween=function(other){var edgeList=[];var edge;for(var obj in this.edges){edge=this.edges[obj];if(!(edge.source==this||edge.target==this))throw"Incorrect edge source and/or target";if(edge.target==other||edge.source==other){edgeList.push(edge)}}return edgeList};LNode.prototype.getNeighborsList=function(){var neighbors=new HashSet;var edge;for(var obj in this.edges){edge=this.edges[obj];if(edge.source==this){neighbors.add(edge.target)}else{if(!edge.target==this)throw"Incorrect incidency!";neighbors.add(edge.source)}}return neighbors};LNode.prototype.withChildren=function(){var withNeighborsList=[];var childNode;withNeighborsList.push(this);if(this.child!=null){var nodes=this.child.getNodes();for(var i=0;iLayoutConstants.WORLD_BOUNDARY){left=LayoutConstants.WORLD_BOUNDARY}else if(left<-LayoutConstants.WORLD_BOUNDARY){left=-LayoutConstants.WORLD_BOUNDARY}var top=this.rect.y;if(top>LayoutConstants.WORLD_BOUNDARY){top=LayoutConstants.WORLD_BOUNDARY}else if(top<-LayoutConstants.WORLD_BOUNDARY){top=-LayoutConstants.WORLD_BOUNDARY}var leftTop=new PointD(left,top);var vLeftTop=trans.inverseTransformPoint(leftTop);this.setLocation(vLeftTop.x,vLeftTop.y)};LNode.prototype.getLeft=function(){return this.rect.x};LNode.prototype.getRight=function(){return this.rect.x+this.rect.width};LNode.prototype.getTop=function(){return this.rect.y};LNode.prototype.getBottom=function(){return this.rect.y+this.rect.height};LNode.prototype.getParent=function(){if(this.owner==null){return null}return this.owner.getParent()};module.exports=LNode},{"./Integer":156,"./LGraphObject":160,"./RectangleD":167}],162:[function(require,module,exports){var LayoutConstants=require("./LayoutConstants");var HashMap=require("./HashMap");var LGraphManager=require("./LGraphManager");function Layout(isRemoteUse){this.layoutQuality=LayoutConstants.DEFAULT_QUALITY;this.createBendsAsNeeded=LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED;this.incremental=LayoutConstants.DEFAULT_INCREMENTAL;this.animationOnLayout=LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT;this.animationDuringLayout=LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT;this.animationPeriod=LayoutConstants.DEFAULT_ANIMATION_PERIOD;this.uniformLeafNodeSizes=LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES;this.edgeToDummyNodes=new HashMap;this.graphManager=new LGraphManager(this);this.isLayoutFinished=false;this.isSubLayout=false;this.isRemoteUse=false;if(isRemoteUse!=null){this.isRemoteUse=isRemoteUse}}Layout.RANDOM_SEED=1;Layout.prototype.getGraphManager=function(){return this.graphManager};Layout.prototype.getAllNodes=function(){return this.graphManager.getAllNodes()};Layout.prototype.getAllEdges=function(){return this.graphManager.getAllEdges()};Layout.prototype.getAllNodesToApplyGravitation=function(){return this.graphManager.getAllNodesToApplyGravitation()};Layout.prototype.newGraphManager=function(){var gm=new LGraphManager(this);this.graphManager=gm;return gm};Layout.prototype.newGraph=function(vGraph){return new LGraph(null,this.graphManager,vGraph)};Layout.prototype.newNode=function(vNode){return new LNode(this.graphManager,vNode)};Layout.prototype.newEdge=function(vEdge){return new LEdge(null,null,vEdge)};Layout.prototype.runLayout=function(){this.isLayoutFinished=false;this.initParameters();var isLayoutSuccessfull;if(this.graphManager.getRoot()==null||this.graphManager.getRoot().getNodes().length==0||this.graphManager.includesInvalidEdge()){isLayoutSuccessfull=false}else{var startTime=0;if(!this.isSubLayout){startTime=(new Date).getTime()}isLayoutSuccessfull=this.layout();if(!this.isSubLayout){var endTime=(new Date).getTime();var excTime=endTime-startTime;console.log("Total execution time: "+excTime+" miliseconds.")}}if(isLayoutSuccessfull){if(!this.isSubLayout){this.doPostLayout()}}this.isLayoutFinished=true;return isLayoutSuccessfull};Layout.prototype.doPostLayout=function(){this.transform();this.update()};Layout.prototype.update2=function(){if(this.createBendsAsNeeded){this.createBendpointsFromDummyNodes();this.graphManager.resetAllEdges()}if(!this.isRemoteUse){var edge;var allEdges=this.graphManager.getAllEdges();for(var i=0;i0&&isForest){toBeVisited.push(unProcessedNodes[0]);while(toBeVisited.length>0&&isForest){var currentNode=toBeVisited[0];toBeVisited.splice(0,1);visited.add(currentNode);var neighborEdges=currentNode.getEdges();for(var i=0;i-1){unProcessedNodes.splice(index,1)}}visited=new HashSet;parents=new HashMap}}return flatForest};Layout.prototype.createDummyNodesForBendpoints=function(edge){var dummyNodes=[];var prev=edge.source;var graph=this.graphManager.calcLowestCommonAncestor(edge.source,edge.target);for(var i=0;i0){var path=this.edgeToDummyNodes.get(lEdge);for(var i=0;i=0){list.splice(index,1)}var neighbours=node.getNeighborsList();for(var j in neighbours.set){var neighbour=neighbours.set[j];if(removedNodes.indexOf(neighbour)<0){var otherDegree=remainingDegrees.get(neighbour);var newDegree=otherDegree-1;if(newDegree==1){tempList.push(neighbour)}remainingDegrees.put(neighbour,newDegree)}}}removedNodes=removedNodes.concat(tempList);if(list.length==1||list.length==2){foundCenter=true;centerNode=list[0]}}return centerNode};Layout.prototype.setGraphManager=function(gm){this.graphManager=gm};module.exports=Layout},{"./HashMap":152,"./LGraphManager":159,"./LayoutConstants":163}],163:[function(require,module,exports){function LayoutConstants(){}LayoutConstants.PROOF_QUALITY=0;LayoutConstants.DEFAULT_QUALITY=1;LayoutConstants.DRAFT_QUALITY=2;LayoutConstants.DEFAULT_CREATE_BENDS_AS_NEEDED=false;LayoutConstants.DEFAULT_INCREMENTAL=false;LayoutConstants.DEFAULT_ANIMATION_ON_LAYOUT=true;LayoutConstants.DEFAULT_ANIMATION_DURING_LAYOUT=false;LayoutConstants.DEFAULT_ANIMATION_PERIOD=50;LayoutConstants.DEFAULT_UNIFORM_LEAF_NODE_SIZES=false;LayoutConstants.DEFAULT_GRAPH_MARGIN=10;LayoutConstants.LABEL_HEIGHT=20;LayoutConstants.COMPOUND_NODE_MARGIN=5;LayoutConstants.SIMPLE_NODE_SIZE=40;LayoutConstants.SIMPLE_NODE_HALF_SIZE=LayoutConstants.SIMPLE_NODE_SIZE/2;LayoutConstants.EMPTY_COMPOUND_NODE_SIZE=40;LayoutConstants.MIN_EDGE_LENGTH=1;LayoutConstants.WORLD_BOUNDARY=1e6;LayoutConstants.INITIAL_WORLD_BOUNDARY=LayoutConstants.WORLD_BOUNDARY/1e3;LayoutConstants.WORLD_CENTER_X=1200;LayoutConstants.WORLD_CENTER_Y=900;module.exports=LayoutConstants},{}],164:[function(require,module,exports){function Point(x,y,p){this.x=null;this.y=null;if(x==null&&y==null&&p==null){this.x=0;this.y=0}else if(typeof x=="number"&&typeof y=="number"&&p==null){this.x=x;this.y=y}else if(x.constructor.name=="Point"&&y==null&&p==null){p=x;this.x=p.x;this.y=p.y}}Point.prototype.getX=function(){return this.x};Point.prototype.getY=function(){return this.y};Point.prototype.getLocation=function(){return new Point(this.x,this.y)};Point.prototype.setLocation=function(x,y,p){if(x.constructor.name=="Point"&&y==null&&p==null){p=x;this.setLocation(p.x,p.y)}else if(typeof x=="number"&&typeof y=="number"&&p==null){if(parseInt(x)==x&&parseInt(y)==y){this.move(x,y)}else{this.x=Math.floor(x+.5);this.y=Math.floor(y+.5)}}};Point.prototype.move=function(x,y){this.x=x;this.y=y};Point.prototype.translate=function(dx,dy){this.x+=dx;this.y+=dy};Point.prototype.equals=function(obj){if(obj.constructor.name=="Point"){var pt=obj;return this.x==pt.x&&this.y==pt.y}return this==obj};Point.prototype.toString=function(){return(new Point).constructor.name+"[x="+this.x+",y="+this.y+"]"};module.exports=Point},{}],165:[function(require,module,exports){function PointD(x,y){if(x==null&&y==null){this.x=0;this.y=0}else{this.x=x;this.y=y}}PointD.prototype.getX=function(){return this.x};PointD.prototype.getY=function(){return this.y};PointD.prototype.setX=function(x){this.x=x};PointD.prototype.setY=function(y){this.y=y};PointD.prototype.getDifference=function(pt){return new DimensionD(this.x-pt.x,this.y-pt.y)};PointD.prototype.getCopy=function(){return new PointD(this.x,this.y)};PointD.prototype.translate=function(dim){this.x+=dim.width;this.y+=dim.height;return this};module.exports=PointD},{}],166:[function(require,module,exports){function RandomSeed(){}RandomSeed.seed=1;RandomSeed.x=0;RandomSeed.nextDouble=function(){RandomSeed.x=Math.sin(RandomSeed.seed++)*1e4;return RandomSeed.x-Math.floor(RandomSeed.x)};module.exports=RandomSeed},{}],167:[function(require,module,exports){function RectangleD(x,y,width,height){this.x=0;this.y=0;this.width=0;this.height=0;if(x!=null&&y!=null&&width!=null&&height!=null){this.x=x;this.y=y;this.width=width;this.height=height}}RectangleD.prototype.getX=function(){return this.x};RectangleD.prototype.setX=function(x){this.x=x};RectangleD.prototype.getY=function(){return this.y};RectangleD.prototype.setY=function(y){this.y=y};RectangleD.prototype.getWidth=function(){return this.width};RectangleD.prototype.setWidth=function(width){this.width=width};RectangleD.prototype.getHeight=function(){return this.height};RectangleD.prototype.setHeight=function(height){this.height=height};RectangleD.prototype.getRight=function(){return this.x+this.width};RectangleD.prototype.getBottom=function(){return this.y+this.height};RectangleD.prototype.intersects=function(a){if(this.getRight()0){var theNewGraph;theNewGraph=layout_t.getGraphManager().add(layout_t.newGraph(),theNode);theNewGraph.graphManager=gm_t;processNodes(theNewGraph,children_of_children)}}};var nodes=pData.nodes;for(var i=0;i0){continue}graph.updateBounds(true);var centerX=(graph.getLeft()+graph.getRight())/2;var centerY=(graph.getTop()+graph.getBottom())/2;var children=graph.getNodes();var dummyNode=new CoSENode(gm_t,new PointD(centerX,centerY),new DimensionD(1,1));dummyNode.id=i+"_dummy";dummyNodes.push(dummyNode);graph.add(dummyNode);for(var k=0;k0){_CoSELayout.toBeTiled[id]=false;return false}if(theChild.children()==null||theChild.children().length==0){_CoSELayout.toBeTiled[theChild.data("id")]=false;continue}if(!this.getToBeTiled(theChild)){_CoSELayout.toBeTiled[id]=false;return false}}_CoSELayout.toBeTiled[id]=true;return true};_CoSELayout.prototype.getNodeDegree=function(node){var id=node.id();var edges=this.options.eles.edges().filter(function(i,ele){var source=ele.data("source");var target=ele.data("target");if(source!=target&&(source==id||target==id)){return true}});return edges.length};_CoSELayout.prototype.getNodeDegreeWithChildren=function(node){var degree=this.getNodeDegree(node);var children=node.children();for(var i=0;i1){var dummyCompoundId="DummyCompound_"+p_id;memberGroups[dummyCompoundId]=tempMemberGroups[p_id];if(this.options.cy.getElementById(dummyCompoundId).empty()){this.options.cy.add({group:"nodes",data:{id:dummyCompoundId,parent:p_id}});var dummy=this.options.cy.nodes()[this.options.cy.nodes().length-1];this.options.eles=this.options.eles.union(dummy);dummy.hide();for(var i=0;i=0;i--){var id=_CoSELayout.compoundOrder[i].id();var lCompoundNode=_CoSELayout.idToLNode[id];var horizontalMargin=parseInt(_CoSELayout.compoundOrder[i].css("padding-left"));var verticalMargin=parseInt(_CoSELayout.compoundOrder[i].css("padding-top"));this.adjustLocations(tiledMemberPack[id],lCompoundNode.rect.x,lCompoundNode.rect.y,horizontalMargin,verticalMargin)}};_CoSELayout.prototype.repopulateZeroDegreeMembers=function(tiledPack){for(var i in tiledPack){var compound=this.cy.getElementById(i);var compoundNode=_CoSELayout.idToLNode[i];var horizontalMargin=parseInt(compound.css("padding-left"));var verticalMargin=parseInt(compound.css("padding-top"));this.adjustLocations(tiledPack[i],compoundNode.rect.x,compoundNode.rect.y,horizontalMargin,verticalMargin);var tempchildren=compound.scratch("coseBilkent").tempchildren;for(var i=0;imaxHeight)maxHeight=lnode.rect.height}y+=maxHeight+organization.verticalPadding}};_CoSELayout.prototype.tileCompoundMembers=function(childGraphMap){var tiledMemberPack=[];for(var id in childGraphMap){var compoundNode=_CoSELayout.idToLNode[id];tiledMemberPack[id]=this.tileNodes(childGraphMap[id]);compoundNode.rect.width=tiledMemberPack[id].width+20;compoundNode.rect.height=tiledMemberPack[id].height+20}return tiledMemberPack};_CoSELayout.prototype.tileNodes=function(nodes){var self=this;var verticalPadding=typeof self.options.tilingPaddingVertical==="function"?self.options.tilingPaddingVertical.call():self.options.tilingPaddingVertical;var horizontalPadding=typeof self.options.tilingPaddingHorizontal==="function"?self.options.tilingPaddingHorizontal.call():self.options.tilingPaddingHorizontal;var organization={rows:[],rowWidth:[],rowHeight:[],width:20,height:20,verticalPadding:verticalPadding,horizontalPadding:horizontalPadding};var layoutNodes=[];for(var i=0;in2.rect.width*n2.rect.height)return-1;if(n1.rect.width*n1.rect.height0){w+=organization.horizontalPadding}organization.rowWidth[rowIndex]=w;if(organization.width0)h+=organization.verticalPadding;var extraHeight=0;if(h>organization.rowHeight[rowIndex]){extraHeight=organization.rowHeight[rowIndex];organization.rowHeight[rowIndex]=h;extraHeight=organization.rowHeight[rowIndex]-extraHeight}organization.height+=extraHeight;organization.rows[rowIndex].push(node)};_CoSELayout.prototype.getShortestRowIndex=function(organization){var r=-1;var min=Number.MAX_VALUE;for(var i=0;imax){r=i;max=organization.rowWidth[i]}}return r};_CoSELayout.prototype.canAddHorizontal=function(organization,extraWidth,extraHeight){var sri=this.getShortestRowIndex(organization);if(sri<0){return true}var min=organization.rowWidth[sri];if(min+organization.horizontalPadding+extraWidth<=organization.width)return true;var hDiff=0;if(organization.rowHeight[sri]0)hDiff=extraHeight+organization.verticalPadding-organization.rowHeight[sri]}var add_to_row_ratio;if(organization.width-min>=extraWidth+organization.horizontalPadding){add_to_row_ratio=(organization.height+hDiff)/(min+extraWidth+organization.horizontalPadding)}else{add_to_row_ratio=(organization.height+hDiff)/organization.width}hDiff=extraHeight+organization.verticalPadding;var add_new_row_ratio;if(organization.widthdiff&&longest!=last){row.splice(-1,1);organization.rows[last].push(node);organization.rowWidth[longest]=organization.rowWidth[longest]-diff;organization.rowWidth[last]=organization.rowWidth[last]+diff;organization.width=organization.rowWidth[this.getLongestRowIndex(organization)];var maxHeight=Number.MIN_VALUE;for(var i=0;imaxHeight)maxHeight=row[i].height}if(longest>0)maxHeight+=organization.verticalPadding;var prevTotal=organization.rowHeight[longest]+organization.rowHeight[last];organization.rowHeight[longest]=maxHeight;if(organization.rowHeight[last]0){var theNewGraph;theNewGraph=_CoSELayout.layout.getGraphManager().add(_CoSELayout.layout.newGraph(),theNode);this.processChildrenList(theNewGraph,children_of_children)}}};module.exports=function get(cytoscape){Thread=cytoscape.Thread;return _CoSELayout}},{"./CoSEConstants":141,"./CoSEEdge":142,"./CoSEGraph":143,"./CoSEGraphManager":144,"./CoSELayout":145,"./CoSENode":146,"./DimensionD":147,"./FDLayout":148,"./FDLayoutConstants":149,"./FDLayoutEdge":150,"./FDLayoutNode":151,"./HashMap":152,"./HashSet":153,"./IGeometry":154,"./IMath":155,"./Integer":156,"./LEdge":157,"./LGraph":158,"./LGraphManager":159,"./LGraphObject":160,"./LNode":161,"./Layout":162,"./LayoutConstants":163,"./Point":164,"./PointD":165,"./RandomSeed":166,"./RectangleD":167,"./Transform":168,"./UniqueIDGeneretor":169}],171:[function(require,module,exports){"use strict";var getLayout=require("./Layout");var register=function(cytoscape){var Layout=getLayout(cytoscape);cytoscape("layout","cose-bilkent",Layout)};if(typeof cytoscape!=="undefined"){register(cytoscape)}module.exports=register},{"./Layout":170}],172:[function(require,module,exports){var cytoscape=window.cytoscape=require("cytoscape");var panzoom=require("cytoscape-panzoom");var navigator=require("cytoscape-navigator");var cyqtip=require("cytoscape-qtip");var regCose=require("../../lib/js/cose-bilkent/src/index.js");var grid_guide=require("cytoscape-grid-guide");var undoRedo=require("cytoscape-undo-redo");var contextMenus=require("cytoscape-context-menus");var panzoomOpts=require("./PanzoomOptions.js");var styleSheet=require("./GraphStyleSheet.js");var edgeHandleOpts=require("./EdgeHandlesOptions.js");var LayoutProperties=require("./BackboneViews/LayoutPropertiesView.js");var GenomicDataExplorerView=require("./BackboneViews/GenomicDataExplorerView.js");var PathwayDetailsView=require("./BackboneViews/PathwayDetailsView.js");var GridOptionsView=require("./BackboneViews/GridOptionsView.js");var CBioPortalAccessView=require("./BackboneViews/CbioPortalAccessView.js");require("./FileOperationsManager.js");require("./OtherMenuOperations.js");require("./GenomicMenuOperations.js");require("./ViewOperationsManager.js");require("./GraphUtilities.js");require("bootstrap-select");var QtipManager=require("./QtipManager.js");var ContextMenuManager=require("./ContextMenuManager.js");var DragDropNodeAddPlugin=require("./DragDropNodeAddPlugin.js");var EditorActionsManager=require("./EditorActionsManager.js");var SaveLoadUtilities=require("./SaveLoadUtility.js");var CBioPortalAccessor=require("./cBioPortalAccessor.js");var notify=require("bootstrap-notify");module.exports=function(){function AppManager(isCollaborative,realTimeManager){this.isCollaborative=isCollaborative;this.realTimeManager=realTimeManager;this.init();this.createSampleMenu();this.createCBioPortalAccessModal()}AppManager.prototype.init=function(){this.initCyJS();this.initCyHandlers();var that=this;window.onresize=function(){that.placePanzoomAndOverlay()};if(!this.isCollaborative){$(document).keydown(function(e){if(e.which===89&&(e.ctrlKey||event.metaKey)){window.undoRedoManager.redo()}else if(e.which===90&&(e.ctrlKey||event.metaKey)){window.undoRedoManager.undo()}})}else{$('a[role="redo"]').hide();$('a[role="undo"]').hide()}window.appManager=this};AppManager.prototype.placePanzoomAndOverlay=function(){var offset=5;var topCy=$(".cyContainer").offset().top;var leftCy=$(".cyContainer").offset().left;var heightCy=$(".cyContainer").outerHeight();var widthCy=$(".cyContainer").outerWidth();var heightNavigator=$(".cytoscape-navigator-wrapper").outerHeight();var widthNavigator=$(".cytoscape-navigator-wrapper").outerWidth();var heightPanzoom=$(".cy-panzoom").outerHeight();var widthPanzoom=$(".cy-panzoom").outerWidth();$(".cytoscape-navigator-wrapper").css("top",heightCy+topCy-heightNavigator-offset);$(".cytoscape-navigator-wrapper").css("left",widthCy+leftCy-widthNavigator-offset);$(".cy-panzoom").css("top",topCy+5);$(".cy-panzoom").css("left",widthCy+leftCy-55)};AppManager.prototype.createSampleMenu=function(){var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var templateData=JSON.parse(request.responseText);for(var key in templateData){if(templateData.hasOwnProperty(key)){var newTCGAMenu=$('");var newTCGAPathway=$('');for(var i in templateData[key]){var newPath=templateData[key][i];var pName=newPath.replace(/-/gi," ").substring(0,newPath.length-4);var sampleLink=$('
  • '+pName+"
  • ");sampleLink.on("click",sampleMenuClickHandler);if(key.includes("PanCancer")){$("#panCancerSubMenu").append(sampleLink)}else{newTCGAPathway.append(sampleLink);newTCGAMenu.append(newTCGAPathway)}}if(!key.includes("PanCancer")&&!key.includes("Creighton")){$("#sampleSubMenu").append(newTCGAMenu)}}}}};function sampleMenuClickHandler(event){var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var allEles=SaveLoadUtilities.parseGraph(request.responseText);window.editorActionsManager.loadFile(allEles.nodes,allEles.edges);window.undoRedoManager.reset();window.appManager.pathwayDetailsView.updatePathwayProperties({fileName:allEles.title+".txt",pathwayTitle:allEles.title,pathwayDescription:allEles.description})}};var pathwayName=event.target.attributes[0].value;request.open("GET","/pathway?filename="+pathwayName);request.send()}request.open("GET","/getTemplateFileData");request.send()};AppManager.prototype.createCBioPortalAccessModal=function(){var portalAccessor=new CBioPortalAccessor;var self=this;this.portalAccessView=new CBioPortalAccessView({el:$("#cbioPortalAccessDiv")});portalAccessor.fetchCancerStudies(function(cancerStudies){self.portalAccessView.updateCancerStudies(cancerStudies)})};AppManager.prototype.initCyJS=function(){panzoom(cytoscape,$);cyqtip(cytoscape,$);regCose(cytoscape);navigator(cytoscape);grid_guide(cytoscape,$);undoRedo(cytoscape);contextMenus(cytoscape,$);window.edgeAddingMode=0;cy=window.cy=cytoscape({container:document.querySelector("#cy"),boxSelectionEnabled:true,autounselectify:false,wheelSensitivity:.1,style:styleSheet,ready:function(){},textureOnViewport:false,motionBlur:true,layout:{name:"preset"}});window.editorActionsManager=this.editorActionsManager=new EditorActionsManager(this.isCollaborative,this.realTimeManager,window.cy);this.qtipManager=new QtipManager(window.cy),this.editorActionsManager;this.cxtMenuManager=new ContextMenuManager(window.cy,this.editorActionsManager);this.dragDropNodeAddManager=new DragDropNodeAddPlugin(this.editorActionsManager);this.layoutPropertiesView=new LayoutProperties({el:$("#layoutPropertiesDiv"),editorActionsManager:this.editorActionsManager}).render();this.gridOptionsView=new GridOptionsView({el:$("#gridOptionsDiv")}).render();this.genomicDataExplorerView=new GenomicDataExplorerView({el:$("#genomicDataExplorerDiv"),editorActionsManager:this.editorActionsManager}).render();this.pathwayDetailsView=new PathwayDetailsView({el:$("#pathwayDetailsDiv")}).render();cy.panzoom(panzoomOpts);cy.nodeadd({components:[{container:$("#simpleNodeDiv"),nodeType:"Gene"},{container:$("#familyNodeDiv"),nodeType:"Family"},{container:$("#complexNodeDiv"),nodeType:"Complex",icon:"fa fa-square-o"},{container:$("#compartmentNodeDiv"),nodeType:"Compartment",icon:"fa fa-square-o"},{container:$("#processNodeDiv"),nodeType:"Process"}]});cy.edgehandles(edgeHandleOpts);var navDefaults={container:".cytoscape-navigator-wrapper",viewLiveFramerate:0,thumbnailEventFramerate:10,thumbnailLiveFramerate:false,dblClickDelay:200,removeCustomContainer:true,rerenderDelay:100};var nav=cy.navigator(navDefaults);this.placePanzoomAndOverlay()};AppManager.prototype.initCyHandlers=function(){var that=this;var tappedBefore;var tappedTimeout;cy.on("tap",function(event){var tappedNow=event.cyTarget;if(tappedTimeout&&tappedBefore){clearTimeout(tappedTimeout)}if(tappedBefore===tappedNow){tappedNow.trigger("doubleTap");tappedBefore=null}else{tappedTimeout=setTimeout(function(){tappedBefore=null},300);tappedBefore=tappedNow}});cy.on("doubleTap","node",function(e){var eventIsDirect=e.cyTarget===this;if(eventIsDirect){$(".qtip").remove();that.qtipManager.addQtipToElements(e.cyTarget);var api=this.qtip("api");if(api){api.show()}}});cy.on("select","node",function(e){window.editorActionsManager.pushSelectedNodeStack(e.cyTarget)});cy.on("unselect","node",function(e){window.editorActionsManager.removeElementFromSelectedNodeStack(e.cyTarget)});cy.on("free","node",function(e){var selectedNodes=cy.nodes(":selected");var nodes=e.cyTarget;nodes=nodes.union(nodes.descendants());nodes=nodes.union(selectedNodes);that.editorActionsManager.moveElements(nodes)});cy.on("layoutstop",function(event){that.editorActionsManager.postLayout()});cy.on("add","node",function(event){cy.style().update();cy.forceRender()})};return AppManager}()},{"../../lib/js/cose-bilkent/src/index.js":171,"./BackboneViews/CbioPortalAccessView.js":174,"./BackboneViews/GenomicDataExplorerView.js":175,"./BackboneViews/GridOptionsView.js":176,"./BackboneViews/LayoutPropertiesView.js":177,"./BackboneViews/PathwayDetailsView.js":178,"./ContextMenuManager.js":180,"./DragDropNodeAddPlugin.js":181,"./EdgeHandlesOptions.js":182,"./EditorActionsManager.js":183,"./FileOperationsManager.js":184,"./GenomicMenuOperations.js":186,"./GraphStyleSheet.js":187,"./GraphUtilities.js":188,"./OtherMenuOperations.js":189,"./PanzoomOptions.js":190,"./QtipManager.js":191,"./SaveLoadUtility.js":195,"./ViewOperationsManager.js":196,"./cBioPortalAccessor.js":197,"bootstrap-notify":2,"bootstrap-select":3,cytoscape:113,"cytoscape-context-menus":17,"cytoscape-grid-guide":24,"cytoscape-navigator":28,"cytoscape-panzoom":29,"cytoscape-qtip":30,"cytoscape-undo-redo":31}],173:[function(require,module,exports){var BioGeneView=Backbone.View.extend({render:function(){var variables={geneDescription:this.model.geneDescription,geneAliases:this.parseDelimitedInfo(this.model.geneAliases,":",",",null),geneDesignations:this.parseDelimitedInfo(this.model.geneDesignations,":",",",null),geneLocation:this.model.geneLocation,geneMim:this.model.geneMim,geneId:this.model.geneId,geneUniprotId:this.extractFirstUniprotId(this.model.geneUniprotMapping),geneUniprotLinks:this.generateUniprotLinks(this.model.geneUniprotMapping),geneSummary:this.model.geneSummary};var template=_.template($("#biogene-template").html());template=template(variables);this.$el.html(template);this.format(this.model);return this.$el},format:function(){if(this.model.geneDescription==undefined)this.$el.find(".biogene-description").hide();if(this.model.geneAliases==undefined)this.$el.find(".biogene-aliases").hide();if(this.model.geneDesignations==undefined)this.$el.find(".biogene-designations").hide();if(this.model.geneChromosome==undefined)this.$el.find(".biogene-chromosome").hide();if(this.model.geneLocation==undefined)this.$el.find(".biogene-location").hide();if(this.model.geneMim==undefined)this.$el.find(".biogene-mim").hide();if(this.model.geneId==undefined)this.$el.find(".biogene-id").hide();if(this.model.geneUniprotMapping==undefined)this.$el.find(".biogene-uniprot-links").hide();if(this.model.geneSummary==undefined)this.$el.find(".node-details-summary").hide();var expanderOpts={slicePoint:100,expandPrefix:" ",expandText:" (...)",userCollapseText:" (show less)",moreClass:"expander-read-more",lessClass:"expander-read-less",detailClass:"expander-details",expandEffect:"fadeIn",collapseEffect:"fadeOut"};expanderOpts.slicePoint=2;expanderOpts.widow=0},generateUniprotLinks:function(mapping){var formatter=function(id){var tpl=_.template($("#uniprot-link-template").html());tpl=tpl({id:id});return tpl};if(mapping==undefined||mapping==null){return""}if(mapping.indexOf(":")<0){return""}else{mapping=mapping.substring(mapping.indexOf(":")+1);return", "+this.parseDelimitedInfo(mapping,":",",",formatter)}},extractFirstUniprotId:function(mapping){if(mapping==undefined||mapping==null){return""}var parts=mapping.split(":");if(parts.length>0){return parts[0]}return""},parseDelimitedInfo:function(info,delimiter,separator,formatter){ -if(info==undefined||info==null){return info}var text="";var parts=info.split(delimiter);if(parts.length>0){if(formatter){text=formatter(parts[0])}else{text=parts[0]}}for(var i=1;iPlease Wait Loading Cancer Studies");this.$el.find("#cancerDropDown").append(this.cachedLoadingTemplate)},updateCancerStudies:function(cancerStudies){this.cancerStudies=cancerStudies;this.updateView()},updateView:function(){var self=this;this.$el.find("#cancerDropDown").empty();this.$el.find("#dataTypeSelection").empty();this.$el.find("#cancerDropDown").append("

    Select Cancer Study

    ");var cancerStudiesDropDown=$('');for(var cancerName in this.cancerStudies){cancerStudiesDropDown.append("")}$("#cancerDropDown").append(cancerStudiesDropDown);cancerStudiesDropDown.selectpicker({liveSearch:true,container:"body",liveSearchPlaceholder:"Search Cancer Study"});$("#cancerSelectBox").change(function(){self.$el.find("#dataTypeSelection").empty();self.$el.find("#dataTypeSelection").append(self.cachedLoadingTemplate);var key=$(this).find("option:selected").attr("key");self.currenCancerStudy=self.cancerStudies[key];var createDataTypeSelectionCallback=function(cancerData){self.$el.find("#dataTypeSelection").empty();var dataTypes={};for(var obj in cancerData){var dataType=self.portalAccessor.getDataType(obj);dataTypes[dataType]=cancerData[obj]}self.$el.find("#dataTypeSelection").append("

    Data Types

    ");for(var obj in dataTypes){var newCheckbox=$('
    '+""+"
    ");newCheckbox.find('input[type="checkbox"]').on("click",function(evt){var checkedNum=self.$el.find('input[type="checkbox"]:checked').length;if(checkedNum>=1)self.showSubmitButton();else if(checkedNum==0)self.hideSubmitButton()});self.$el.find("#dataTypeSelection").append(newCheckbox)}};self.portalAccessor.getSupportedGeneticProfiles(key,createDataTypeSelectionCallback)})},render:function(){this.hideSubmitButton();if(!this.cancerStudies){this.$el.modal("show");return}this.updateView();this.$el.modal("show")},hideSubmitButton:function(){$("#getProfileData").hide()},showSubmitButton:function(){$("#getProfileData").show()},fetchProfileData:function(){var checkedDataTypes=this.$el.find('input[type="checkbox"]:checked');var geneSymbols=window.editorActionsManager.getGeneSymbols();var self=this;for(var i=0;iThere is currently no data to show');this.$el.find("#save-genomic").hide()},saveHandler:function(event){var dataMap={};this.$el.find(".genomicDataContentDiv label").each(function(){var jqEl=$(this);var cancerType=jqEl.text();var isChecked=jqEl.find("input").is(":checked");dataMap[cancerType]=isChecked});this.editorActionsManagerRef.updateGenomicDataVisibility(dataMap);this.$el.modal("toggle")},notify:function(data){this.$el.find(".genomicDataContentDiv").empty();var cancerTypes=this.editorActionsManagerRef.genomicDataOverlayManager.visibleGenomicDataMapByType;if(cancerTypes&&Object.keys(cancerTypes).length===0){this.renderEmptyView()}else{this.$el.find(".genomicDataContentDiv").append('');var checkboxDiv=$('
    ');for(var cancerType in cancerTypes){var checkboxContent=$('");checkboxContent.find("input").attr("checked",cancerTypes[cancerType]);checkboxDiv.append(checkboxContent)}this.$el.find(".genomicDataContentDiv").append(checkboxDiv);this.$el.find("#save-genomic").show()}}});module.exports=genomicDataExplorer},{}],176:[function(require,module,exports){var gridOptionsView=Backbone.View.extend({currentProperties:null,events:{"click #applyGridOptions":"saveProperties"},initialize:function(options){this.defaultGridGuideOptions={snapToGrid:false,discreteDrag:false,guidelines:true,resize:false,gridSpacing:20,parentPadding:false,drawGrid:false,guidelinesStackOrder:4,guidelinesTolerance:2,guidelinesStyle:{lineWidth:2,strokeStyle:"#000000",lineDash:[7,15]}};this.copyProperties(this.defaultGridGuideOptions);cy.gridGuide(this.currentProperties)},copyProperties:function(params){this.currentProperties=_.clone(params)},render:function(){var templateProperties=_.clone(this.currentProperties);this.template=_.template($("#gridOptionsTemplate").html());var tplContent=this.template(templateProperties);this.$el.empty();this.$el.append(tplContent);this.$el.find("#colorPickerDiv").colorpicker();this.delegateEvents()},saveProperties:function(event){this.currentProperties.gridSpacing=Number(this.$el.find("#gridSize").val());this.currentProperties.drawGrid=this.$el.find("#showGrid").is(":checked");this.currentProperties.guidelines=this.$el.find("#showGuides").is(":checked");this.currentProperties.snapToGrid=this.$el.find("#snapToGrid").is(":checked");this.currentProperties.guidelinesStyle.strokeStyle=this.$el.find("#colorPickerInput").val();cy.gridGuide(this.currentProperties);this.$el.modal("toggle")},changeParameters:function(){this.$el.find("#gridSize").val(this.currentProperties.gridSize);this.$el.find("#showGrid")[0].checked=this.currentProperties.showGrid;this.$el.find("#showGuides")[0].checked=this.currentProperties.showGuides;this.$el.find("#colorPickerInput").val(this.currentProperties.guidelinesStyle.strokeStyle)},defaultLayoutHandler:function(event){},notify:function(){}});module.exports=gridOptionsView},{}],177:[function(require,module,exports){var layoutProps=Backbone.View.extend({currentLayoutProperties:null,events:{"click #save-layout":"saveLayoutHandler","click #default-layout":"defaultLayoutHandler"},initialize:function(options){this.editorActionsManagerRef=options.editorActionsManager;this.copyProperties(this.editorActionsManagerRef.layoutProperties);this.editorActionsManagerRef.registerObserver(this)},copyProperties:function(params){this.currentLayoutProperties=_.clone(params)},render:function(){var templateProperties=_.clone(this.currentLayoutProperties);this.template=_.template($("#layoutPropertiesTemplate").html());var tplContent=this.template(templateProperties);this.$el.empty();this.$el.append(tplContent);this.delegateEvents()},saveLayoutHandler:function(event){this.currentLayoutProperties.nodeRepulsion=Number(this.$el.find("#node-repulsion").val());this.currentLayoutProperties.nodeOverlap=Number(this.$el.find("#node-overlap").val());this.currentLayoutProperties.idealEdgeLength=Number(this.$el.find("#ideal-edge-length").val());this.currentLayoutProperties.edgeElasticity=Number(this.$el.find("#edge-elasticity").val());this.currentLayoutProperties.nestingFactor=Number(this.$el.find("#nesting-factor").val());this.currentLayoutProperties.gravity=Number(this.$el.find("#gravity").val());this.currentLayoutProperties.numIter=Number(this.$el.find("#num-iter").val());this.currentLayoutProperties.gravityRangeCompound=Number(this.$el.find("#comp-gravRange").val());this.currentLayoutProperties.gravityCompound=Number(this.$el.find("#comp-grav").val());this.currentLayoutProperties.gravityRange=Number(this.$el.find("#grav-range").val());this.currentLayoutProperties.tile=this.$el.find("#tile").is(":checked");this.currentLayoutProperties.animate=this.$el.find("#animate").is(":checked");this.currentLayoutProperties.randomize=!this.$el.find("#randomize").is(":checked");this.editorActionsManagerRef.saveLayoutProperties(this.currentLayoutProperties);this.$el.modal("toggle")},changeParameters:function(){this.$el.find("#node-repulsion").val(this.currentLayoutProperties.nodeRepulsion);this.$el.find("#node-overlap").val(this.currentLayoutProperties.nodeOverlap);this.$el.find("#ideal-edge-length").val(this.currentLayoutProperties.idealEdgeLength);this.$el.find("#edge-elasticity").val(this.currentLayoutProperties.edgeElasticity);this.$el.find("#nesting-factor").val(this.currentLayoutProperties.nestingFactor);this.$el.find("#gravity").val(this.currentLayoutProperties.gravity);this.$el.find("#comp-gravRange").val(this.currentLayoutProperties.gravityRangeCompound);this.$el.find("#comp-grav").val(this.currentLayoutProperties.gravityCompound);this.$el.find("#grav-range").val(this.currentLayoutProperties.gravityRange);this.$el.find("#num-iter").val(this.currentLayoutProperties.numIter);this.$el.find("#tile")[0].checked=this.currentLayoutProperties.tile;this.$el.find("#animate")[0].checked=this.currentLayoutProperties.animate;this.$el.find("#randomize")[0].checked=!this.currentLayoutProperties.randomize},defaultLayoutHandler:function(event){this.copyProperties(this.editorActionsManagerRef.defaultLayoutProperties);this.changeParameters()},notify:function(){this.copyProperties(this.editorActionsManagerRef.layoutProperties);this.changeParameters()}});module.exports=layoutProps},{}],178:[function(require,module,exports){var pathwayDetails=Backbone.View.extend({currentLayoutProperties:null,events:{"click #savePathwayDetails":"saveHandler"},initialize:function(options){this.properties={pathwayName:"pathway.txt",pathwayTitle:"New Pathway",pathwayDescription:""}},saveHandler:function(event){this.properties.pathwayName=this.$el.find("#pName").val();this.properties.pathwayTitle=this.$el.find("#pTitle").val();this.properties.pathwayDescription=this.$el.find("#pDesc").val();this.$el.modal("toggle")},updatePathwayProperties:function(data){this.properties.pathwayName=data.fileName;this.properties.pathwayTitle=data.pathwayTitle;this.properties.pathwayDescription=data.pathwayDescription},copyProperties:function(params){this.currentLayoutProperties=_.clone(params)},render:function(){this.template=_.template($("#pathwayDetailsTemplate").html());var tplContent=this.template(this.properties);this.$el.empty();this.$el.append(tplContent);this.delegateEvents();this.$el.find("input").on("keypress",function(e){if(e.keyCode==13){e.preventDefault()}});return this}});module.exports=pathwayDetails},{}],179:[function(require,module,exports){var WelcomePageView=Backbone.View.extend({cachedTpl:_.template($("#welcomePageTemplate").html()),events:{"click #localUsage":"localUsageHandler","click #collaborativeUsage":"collaborativeUsageHandler","click .continueButton":"continueButtonHandler"},initialize:function(options){this.localUsageCallback=options.localUsageCallback;this.collaborativeUsageCallback=options.collaborativeUsageCallback;this.modelSelectionMap={NONE:-1,LOCAL:0,COLLAB:1};this.modelSelection=this.modelSelectionMap.NONE},render:function(){this.$el.empty();this.$el.append(this.cachedTpl());this.$el.find("#localUsage").popover({container:"body",content:"Create a pathway individually",placement:"left",delay:100,trigger:"manual"});this.$el.find("#collaborativeUsage").popover({container:"body",html:true,content:function(){return $("#collaborativePopoverContent").html()},placement:"right",delay:200,trigger:"manual"})},localUsageHandler:function(event){if(this.modelSelection==this.modelSelectionMap.LOCAL)return;$(".popover").popover("hide");this.$el.find(".welcomePageCheckable").removeClass("active");$(event.currentTarget).addClass("active");this.$el.find("#localUsage").popover("show");this.$el.find(".continueRow").css("visibility","visible");this.modelSelection=this.modelSelectionMap.LOCAL},collaborativeUsageHandler:function(event){if(this.modelSelection==this.modelSelectionMap.COLLAB)return;$(".popover").popover("hide");this.$el.find(".welcomePageCheckable").removeClass("active");$(event.currentTarget).addClass("active");this.$el.find("#collaborativeUsage").popover("show");this.$el.find(".continueRow").css("visibility","visible");this.modelSelection=this.modelSelectionMap.COLLAB},continueButtonHandler:function(event){$(".popover").hide();var self=this;this.$el.find(".welcomePageLoading").show();function postHandler(){self.postSuccess()}if(this.modelSelection!=this.modelSelectionMap.NONE){if(this.modelSelection==this.modelSelectionMap.LOCAL){this.localUsageCallback(postHandler)}else if(this.modelSelection==this.modelSelectionMap.COLLAB){this.collaborativeUsageCallback(postHandler)}}},postSuccess:function(){this.$el.empty();this.$el.fadeOut(800)}});module.exports=WelcomePageView},{}],180:[function(require,module,exports){module.exports=function(){"use strict";var CxtMenu=function(cy,editorActionsManager){this.cy=cy;this.editorActionsManager=editorActionsManager;this.init()};CxtMenu.prototype.init=function(){var classRef=this;var options={menuItems:[{id:"remove",title:"Delete",selector:"node, edge",onClickFunction:function(event){var ele=event.cyTarget;var selectedElements=cy.nodes(":selected").union(ele);classRef.editorActionsManager.removeElement(selectedElements)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"addSelected",title:"Add selected into this",selector:"node",onClickFunction:function(event){var ele=event.cyTarget;var selectedNodes=cy.nodes(":selected");var containerType=ele.data("type");var validNodes=cy.collection();if(ele._private.data["type"]==="GENE"||selectedNodes.size()<1){return}else{var notValid=false;selectedNodes.forEach(function(tmpNode,i){if(ele.id()==tmpNode.id()){notValid=true;return false}if(tmpNode.isParent()){notValid=isChildren(tmpNode,ele);if(notValid){return false}}});if(notValid){return}}selectedNodes.forEach(function(tmpNode,i){if(containerType=="FAMILY"||containerType=="COMPLEX"){if(tmpNode.data("type")!="COMPARTMENT"&&tmpNode.data("type")!="PROCESS"){validNodes=validNodes.add(tmpNode)}}else{validNodes=validNodes.add(tmpNode)}});var compId=ele.id();classRef.editorActionsManager.changeParents(validNodes,compId)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"removeSelected",title:"Remove selected from parent",selector:"node",onClickFunction:function(event){var ele=event.cyTarget;var selectedNodes=cy.nodes(":selected").union(ele);var notValid=false;selectedNodes.forEach(function(tmpNode,i){if(tmpNode.isParent()){notValid=isChildren(tmpNode,ele);if(notValid){return false}}});if(notValid){return}classRef.editorActionsManager.changeParents(selectedNodes,null)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"performLayout",title:"Perform Layout",coreAsWell:true,onClickFunction:function(event){classRef.editorActionsManager.performLayout()},disabled:false,hasTrailingDivider:true}],menuItemClasses:[],contextMenuClasses:[]};this.cy.contextMenus(options)};window.edgeAddingMode=false;function isChildren(node,queryNode){var parent=queryNode.parent()[0];while(parent){if(parent.id()==node.id()){return true}parent=parent.parent()[0]}return false}return CxtMenu}()},{}],181:[function(require,module,exports){module.exports=function($,$$){"use strict";var NodeAdd=function(editorActionsManager){this.editorActionsManager=editorActionsManager;this.initNodeAdd()};NodeAdd.prototype.initNodeAdd=function(){var nodeAddClass=this;var defaults={height:30,width:30,padding:5,backgroundColorDiv:"#fbfbfb",borderColorDiv:"#fff",borderWidthDiv:"0px",borderRadiusDiv:"5px",icon:"",nodeParams:function(){return{}}};$.fn.cytoscapeNodeadd=function(params){var options=$.extend(true,{},defaults,params);var fn=params;var functions={destroy:function(){var $this=$(this);$this.find(".ui-cytoscape-nodeadd").remove()},init:function(){return $(this).each(function(){var components=options.components;for(var index in components){var component=components[index];var dragContainer=component.container;var explanationText=component.explanationText;var $nodeadd=$('
    ');dragContainer.append($nodeadd);var $nodeDragHandle=$('
    ');$nodeadd.append($nodeDragHandle);$nodeDragHandle.bind("mousedown",function(e){e.stopPropagation();e.preventDefault()});dragContainer.find(".ui-cytoscape-nodeadd-nodediv").css({background:options.backgroundColorDiv,border:options.borderWidthDiv+" solid "+options.borderColorDiv,"border-radius":options.borderRadiusDiv});dragContainer.find("#ui-cytoscape-nodeadd-icon").draggable({helper:"clone",cursor:"pointer"})}var $container=$(this);$container.droppable({activeClass:"ui-state-highlight",drop:function(event,ui){$container.removeClass("ui-state-highlight");var currentOffset=$container.offset();var relX=event.pageX-currentOffset.left;var relY=event.pageY-currentOffset.top;var nodeType=$(ui.helper).attr("nodeType").toUpperCase();var cy=$container.cytoscape("get");var nodeMap={};var parentMap={};cy.nodes().forEach(function(node,i){var nodeBbox=node.renderedBoundingBox();if(relX<=nodeBbox.x2&&relX>=nodeBbox.x1&&(relY<=nodeBbox.y2&&relY>=nodeBbox.y1)&&node.data().type!="GENE"){if(node.children().length>0){parentMap[node.id()]=true}if(parentMap[node._private.data.parent]){delete nodeMap[node._private.data.parent]}nodeMap[node.id()]=node}});var parent=nodeMap[Object.keys(nodeMap)[0]];var nodeData={type:nodeType,name:"New "+$(ui.helper).attr("nodeType")};if(parent){if(parent.data().type=="FAMILY"||parent.data().type=="COMPLEX"){if(nodeType!="COMPARTMENT"&&nodeType!="PROCESS"){nodeData.parent=parent.id()}}else{nodeData.parent=parent.id()}}relX=relX/cy.zoom()+cy.extent().x1;relY=relY/cy.zoom()+cy.extent().y1;nodeAddClass.editorActionsManager.addNode(nodeData,{x:relX,y:relY})}})})}};if(functions[fn]){return functions[fn].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof fn=="object"||!fn){return functions.init.apply(this,arguments)}else{$.error("No such function `"+fn+"` for jquery.cytoscapenodeadd")}return $(this)};$.fn.cynodeadd=$.fn.cytoscapeNodeadd;$$("core","nodeadd",function(options){var cy=this;$(cy.container()).cytoscapeNodeadd(options)})};return NodeAdd}(window.$,window.cytoscape)},{}],182:[function(require,module,exports){var edgeHandleDefaults={preview:true,stackOrder:4,handleSize:10,handleColor:"#1abc9c",handleLineType:"ghost",handleLineWidth:1,handleNodes:"node",hoverDelay:1,cxt:false,enabled:false,toggleOffOnLeave:true,edgeType:function(sourceNode,targetNode){return"flat"},loopAllowed:function(node){return false},nodeLoopOffset:-50,nodeParams:function(sourceNode,targetNode){return{}},edgeParams:function(sourceNode,targetNode,i){return{}},start:function(sourceNode){var type=this.getGlobalEdgeType();cy.edgehandles("option","ghostEdgeType",type)},complete:function(sourceNode,targetNodes,addedEntities){cy.remove(addedEntities);window.editorActionsManager.addEdge({source:sourceNode.id(),target:targetNodes[0].id(),type:this.getGlobalEdgeType()})},stop:function(sourceNode){$(".edge-palette a").blur().removeClass("active");window.edgeAddingMode==-1;cy.edgehandles("disable")},getGlobalEdgeType:function(){var type="NONE";if(window.edgeAddingMode==1){type="ACTIVATES"}else if(window.edgeAddingMode==2){type="INHIBITS"}else if(window.edgeAddingMode==3){type="INDUCES"}else if(window.edgeAddingMode==4){type="REPRESSES"}else if(window.edgeAddingMode==5){type="BINDS"}return type}};module.exports=edgeHandleDefaults},{}],183:[function(require,module,exports){var GenomicDataOverlayManager=require("./GenomicDataOverlayManager.js");var SVGExporter=require("./SVGExporter.js");module.exports=function(){"use strict";var EditorActionsManager=function(isCollaborative,realtimeManager,cyInst){this.cy=cyInst;this.isCollaborative=isCollaborative;if(this.isCollaborative&&realtimeManager)this.realTimeManager=realtimeManager;this.defaultLayoutProperties={name:"cose-bilkent",nodeRepulsion:4500,nodeOverlap:10,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.15,numIter:2500,tile:true,animate:"end",randomize:false,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:1.5};this.FIT_CONSTANT=50;this.layoutProperties=_.clone(this.defaultLayoutProperties);this.observers=[];this.genomicDataOverlayManager=new GenomicDataOverlayManager;this.svgExporter=new SVGExporter;this.selecteNodeStack={};window.undoRedoManager=cy.undoRedo();window.undoRedoManager.action("changePositions",this.doChangePosition,this.undoChangePosition);window.undoRedoManager.action("changeName",this.doChangename,this.undoChangeName)};EditorActionsManager.prototype.doChangename=function(args){var currentName=args.node.data("name");var newArgs={node:args.node,newName:args.newName,oldName:currentName};args.node.data("name",args.newName);args.node.css("content",args.newName);return newArgs};EditorActionsManager.prototype.undoChangeName=function(args){var currentName=args.node.data("name");var newArgs={node:args.node,newName:args.oldName,oldName:currentName};args.node.data("name",args.oldName);args.node.css("content",args.oldName);return newArgs};EditorActionsManager.prototype.doChangePosition=function(movedNodes){var newMovedNodes=[];for(var i=0;i0){children.forEach(function(childNode,i){lockedNodes[childNode.id()]=true});removedEles=removedEles.union(removeNodes(children))}removedEles=removedEles.union(nodes.remove());self.cy.nodes().updateCompoundBounds();return removedEles}var removedEles=removeNodes(eles);window.undoRedoManager.do("remove",removedEles);for(var i=0;i0){ele.data.source=cySourceNode.id()}if(cyTargetNode.length>0){ele.data.target=cyTargetNode.id()}if(cyTargetNode.length<0&&cySourceNode.length<0){continue}var edgesBtw=cy.filter('edge[source = "'+cySourceNode.id()+'"][target = "'+cyTargetNode.id()+'"]');var isFound=false;edgesBtw.forEach(function(edge,i){if(edge.data().type==ele.data.type){isFound=true;return false}});if(!isFound){delete ele.data.id;edgesToBeAdded.push(ele)}}cy.add(edgesToBeAdded)};EditorActionsManager.prototype.fitGraph=function(){if(this.isCollaborative){cy.fit(this.FIT_CONSTANT);var newState={zoomLevel:cy.zoom(),panLevel:cy.pan()};this.updateGlobalOptions(newState)}else{cy.fit(this.FIT_CONSTANT)}};EditorActionsManager.prototype.loadFile=function(nodes,edges){if(this.isCollaborative){this.loadfileRealTime(nodes,edges)}else{this.loadFileCy(nodes,edges)}this.fitGraph()};EditorActionsManager.prototype.loadFileCy=function(nodes,edges){this.removeElementCy(cy.elements());this.addNodesCy(nodes);this.addEdgesCy(edges)};EditorActionsManager.prototype.loadfileRealTime=function(nodes,edges){this.realTimeManager.loadGraph(nodes,edges)};EditorActionsManager.prototype.removeAllElements=function(){if(this.isCollaborative){this.realTimeManager.removeAllElements()}else{cy.remove(cy.elements())}};EditorActionsManager.prototype.changeName=function(ele,newName){if(this.isCollaborative){this.realTimeManager.changeName(ele,newName)}else{this.changeNameCy(ele,newName)}};EditorActionsManager.prototype.changeNameCy=function(ele,newName){var currentName=ele.data("name");var args={node:ele,oldName:currentName,newName:newName};window.undoRedoManager.do("changeName",args)};EditorActionsManager.prototype.updateElementCallback=function(ele,id){var nodeID=id;var cyEle=this.cy.$("#"+nodeID);cyEle.position({x:ele.x,y:ele.y});this.changeNameCy(cyEle,ele.name)};EditorActionsManager.prototype.getGenomicDataSVG=function(node){return this.genomicDataOverlayManager.generateSVGForNode(node)};EditorActionsManager.prototype.removeGenomicData=function(){if(this.isCollaborative){this.realTimeManager.clearGenomicData();this.realTimeManager.clearGenomicVisData()}else{this.genomicDataOverlayManager.removeGenomicData();this.genomicDataOverlayManager.removeGenomicVisData();this.genomicDataOverlayManager.hideGenomicData();this.genomicDataOverlayManager.notifyObservers()}};EditorActionsManager.prototype.addGenomicData=function(genomicData){if(this.isCollaborative){this.removeGenomicData();var parsedGenomicData=this.genomicDataOverlayManager.prepareGenomicDataRealTime(genomicData);var genomicDataMap=parsedGenomicData.genomicDataMap;var visibilityMap=parsedGenomicData.visibilityMap;this.realTimeManager.addGenomicData("genomicData",genomicDataMap);this.realTimeManager.addGenomicVisibilityData("visMap",visibilityMap)}else{this.genomicDataOverlayManager.addGenomicDataLocally(genomicData)}};EditorActionsManager.prototype.addPortalGenomicData=function(genomicData){if(this.isCollaborative){this.genomicDataOverlayManager.addPortalGenomicData(genomicData);this.realTimeManager.addGenomicData("genomicData",this.genomicDataOverlayManager.genomicDataMap);this.realTimeManager.addGenomicVisibilityData("visMap",this.genomicDataOverlayManager.visibleGenomicDataMapByType)}else{this.genomicDataOverlayManager.addPortalGenomicData(genomicData)}};EditorActionsManager.prototype.realTimeGenomicDataHandler=function(event){var newData=event.newValue;var geneSymbol=event.property;if(newData){this.genomicDataOverlayManager.addGenomicData(newData)}else{this.genomicDataOverlayManager.removeGenomicData(geneSymbol)}};EditorActionsManager.prototype.realTimeGenomicDataVsibilityHandler=function(event){var data=event.newValue;if(data){this.genomicDataOverlayManager.addGenomicVisData(data)}else{this.genomicDataOverlayManager.removeGenomicVisData(data)}this.genomicDataOverlayManager.showGenomicData();this.genomicDataOverlayManager.notifyObservers()};return EditorActionsManager}()},{"./GenomicDataOverlayManager.js":185,"./SVGExporter.js":194}],184:[function(require,module,exports){var SaveLoadUtilities=require("./SaveLoadUtility.js");module.exports=function($){"use strict";function b64toBlob(b64Data,contentType,sliceSize){contentType=contentType||"";sliceSize=sliceSize||512;var byteCharacters=atob(b64Data);var byteArrays=[];for(var offset=0;offset0?"<0.5":Math.round(percent);var text=textPercent+"%";var fontSize=14;var textLength=text.length;var xOffset=w/2-textLength*4;var yOffset=fontSize/3;var svgText=document.createElementNS(svgNameSpace,"text");svgText.setAttribute("x",x+xOffset);svgText.setAttribute("y",y+h/2+yOffset);svgText.setAttribute("font-family","Arial");svgText.setAttribute("font-size",fontSize);svgText.innerHTML=text;parentSVG.appendChild(overlayRect);parentSVG.appendChild(svgText)}return svg};function getRequiredWidthForGenomicData(genomicDataBoxCount){var term=genomicDataBoxCount>3?genomicDataBoxCount-3:0;return 150+term*35}GenomicDataOverlayManager.prototype.showGenomicData=function(){var self=this;var genomicDataBoxCount=this.countVisibleGenomicDataByType();if(genomicDataBoxCount<1){this.hideGenomicData();return}cy.style().selector('node[type="GENE"]').style("width",function(ele){return getRequiredWidthForGenomicData(genomicDataBoxCount)}).style("text-margin-y",function(ele){var nodeLabel=ele.data("name");if(!(nodeLabel in self.genomicDataMap))return 0;return-15}).style("background-image",function(ele){var dataURI="data:image/svg+xml,";return dataURI+self.generateSVGForNode(ele).outerHTML}).update()};GenomicDataOverlayManager.prototype.parseGenomicData=function(genomicData){this.genomicDataMap={};this.cancerTypes=[];this.visibleGenomicDataMapByType={};var lines=genomicData.split("\n");var metaLineColumns=lines[0].split(" ");for(var i=1;i0){mappedArr[mappedElem.parent().id()].childNodes.push(mappedElem)}else{tree.push(mappedElem)}}return tree};GraphUtilities.prototype.createGraphHierarchyRealTime=function(nodes){var tree=[];var mappedArr={};for(var i=0,len=nodes.length;i');textInput.change(function(){var nodeID=$(this).find("input").attr("nodeid");var cyNode=self.cy.$("#"+nodeID)[0];var newName=$(this).find("input").val();window.editorActionsManager.changeName(cyNode,newName)});var wrapper=$("
    ");var row=$('
    Name:
    ');row.append(textInput);wrapper.append(row);if(ele.data().type==="GENE"){var entrezGeneButton=$('
    ');entrezGeneButton.find("button").on("click",function(event){event.preventDefault();var nodeID=$(this).attr("nodeid");var nodeSymbol=self.cy.$("#"+nodeID)[0]._private.data["name"];var parent=$(this).parent();parent.empty().append('');var formData=new FormData;formData.append("query",nodeSymbol);var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE){if(request.status===200){var jsonData=JSON.parse(request.responseText);if(jsonData.count>0){var backboneView=new BackboneView({model:jsonData.geneInfo[0]}).render().html();parent.empty().append(backboneView)}else{parent.empty().append("There is no extra information for this gene")}}else{parent.empty().append("An error occured while retrieving the data")}}};request.open("POST","/getBioGeneData");request.send(formData)});wrapper.append(entrezGeneButton)}return wrapper};QtipManager.prototype.addQtipToElements=function(eles){var self=this;eles.forEach(function(node,i){var qTipOpts={content:{text:function(){return self.generateQtipContentHTML(this)},title:function(){return capitalizeFirstLetter(node.data().type.toLowerCase())+" Details"}},position:{my:"top center",at:"bottom center"},style:{classes:"qtip-tipsy qtip-rounded",width:400}};node.qtip(qTipOpts)})};function capitalizeFirstLetter(string){return string.charAt(0).toUpperCase()+string.slice(1)}return QtipManager}(window.$)},{"./BackboneViews/BioGeneView.js":173}],192:[function(require,module,exports){module.exports=function(){"use strict";var RealTimeManager=function(postFileLoadCallback){this.clientId="122039910543-b7u74aijsqne9iv5rk2tgm3529ped4d0.apps.googleusercontent.com";this.NODEMAP_NAME="nodes";this.EDGEMAP_NAME="edges";this.LAYOUT_PROPS_NAME="layoutProperties";this.GLOBAL_OPTS_NAME="globalOptions";this.GENOMIC_DATA_MAP_NAME="genomicDataMap";this.VISIBLE_GENOMIC_DATA_MAP_NAME="visibleGenomicDataMapByType";this.realtimeUtils=new utils.RealtimeUtils({clientId:this.clientId});this.postFileLoad=postFileLoadCallback};RealTimeManager.prototype.authorize=function(callbackFunction,isModal){this.realtimeUtils.authorize(function(response){callbackFunction(response)},isModal)};RealTimeManager.prototype.initRealTimeAPI=function(){var id=this.realtimeUtils.getParam("id");this.registerTypes();var self=this;var initFileCallback=function(model){self.onFileInitialize(model)};var loadFileCallback=function(model){self.onFileLoaded(model)};if(id){this.realtimeUtils.load(id.replace("/",""),loadFileCallback,initFileCallback)}else{this.realtimeUtils.createAppFile("New Graph",function(createResponse){var result=createResponse.result;window.history.pushState(null,null,"?id="+result.id);self.realtimeUtils.load(result.id,loadFileCallback,initFileCallback)})}};RealTimeManager.prototype.onFileInitialize=function(model){var root=model.getRoot();var nodeMap=model.createMap();var edgeMap=model.createMap();var layoutProperties=model.create(LayoutPropertiesR,window.editorActionsManager.layoutProperties);var globalOptions=model.create(GlobalOptionsR,window.editorActionsManager.getGlobalOptions());var genomicDataMap=model.createMap();var genomicDataVisibilityMap=model.createMap();root.set(this.NODEMAP_NAME,nodeMap);root.set(this.EDGEMAP_NAME,edgeMap);root.set(this.LAYOUT_PROPS_NAME,layoutProperties);root.set(this.GLOBAL_OPTS_NAME,globalOptions);root.set(this.GENOMIC_DATA_MAP_NAME,genomicDataMap);root.set(this.VISIBLE_GENOMIC_DATA_MAP_NAME,genomicDataVisibilityMap); +var targetNode=_CoSELayout.idToLNode[edge.data("target")];var e1=gm.add(_CoSELayout.layout.newEdge(),sourceNode,targetNode);e1.id=edge.id()}var t1=layout.thread;if(!t1||t1.stopped()){t1=layout.thread=Thread();t1.require(DimensionD,"DimensionD");t1.require(HashMap,"HashMap");t1.require(HashSet,"HashSet");t1.require(IGeometry,"IGeometry");t1.require(IMath,"IMath");t1.require(Integer,"Integer");t1.require(Point,"Point");t1.require(PointD,"PointD");t1.require(RandomSeed,"RandomSeed");t1.require(RectangleD,"RectangleD");t1.require(Transform,"Transform");t1.require(UniqueIDGeneretor,"UniqueIDGeneretor");t1.require(LGraphObject,"LGraphObject");t1.require(LGraph,"LGraph");t1.require(LEdge,"LEdge");t1.require(LGraphManager,"LGraphManager");t1.require(LNode,"LNode");t1.require(Layout,"Layout");t1.require(LayoutConstants,"LayoutConstants");t1.require(FDLayout,"FDLayout");t1.require(FDLayoutConstants,"FDLayoutConstants");t1.require(FDLayoutEdge,"FDLayoutEdge");t1.require(FDLayoutNode,"FDLayoutNode");t1.require(CoSEConstants,"CoSEConstants");t1.require(CoSEEdge,"CoSEEdge");t1.require(CoSEGraph,"CoSEGraph");t1.require(CoSEGraphManager,"CoSEGraphManager");t1.require(CoSELayout,"CoSELayout");t1.require(CoSENode,"CoSENode")}var nodes=this.options.eles.nodes();var edges=this.options.eles.edges();var pData={nodes:[],edges:[]};var nodeIdMap={};for(var i=0;i0){var theNewGraph;theNewGraph=layout_t.getGraphManager().add(layout_t.newGraph(),theNode);theNewGraph.graphManager=gm_t;processNodes(theNewGraph,children_of_children)}}};var nodes=pData.nodes;for(var i=0;i0){continue}graph.updateBounds(true);var centerX=(graph.getLeft()+graph.getRight())/2;var centerY=(graph.getTop()+graph.getBottom())/2;var children=graph.getNodes();var dummyNode=new CoSENode(gm_t,new PointD(centerX,centerY),new DimensionD(1,1));dummyNode.id=i+"_dummy";dummyNodes.push(dummyNode);graph.add(dummyNode);for(var k=0;k0){_CoSELayout.toBeTiled[id]=false;return false}if(theChild.children()==null||theChild.children().length==0){_CoSELayout.toBeTiled[theChild.data("id")]=false;continue}if(!this.getToBeTiled(theChild)){_CoSELayout.toBeTiled[id]=false;return false}}_CoSELayout.toBeTiled[id]=true;return true};_CoSELayout.prototype.getNodeDegree=function(node){var id=node.id();var edges=this.options.eles.edges().filter(function(i,ele){var source=ele.data("source");var target=ele.data("target");if(source!=target&&(source==id||target==id)){return true}});return edges.length};_CoSELayout.prototype.getNodeDegreeWithChildren=function(node){var degree=this.getNodeDegree(node);var children=node.children();for(var i=0;i1){var dummyCompoundId="DummyCompound_"+p_id;memberGroups[dummyCompoundId]=tempMemberGroups[p_id];if(this.options.cy.getElementById(dummyCompoundId).empty()){this.options.cy.add({group:"nodes",data:{id:dummyCompoundId,parent:p_id}});var dummy=this.options.cy.nodes()[this.options.cy.nodes().length-1];this.options.eles=this.options.eles.union(dummy);dummy.hide();for(var i=0;i=0;i--){var id=_CoSELayout.compoundOrder[i].id();var lCompoundNode=_CoSELayout.idToLNode[id];var horizontalMargin=parseInt(_CoSELayout.compoundOrder[i].css("padding-left"));var verticalMargin=parseInt(_CoSELayout.compoundOrder[i].css("padding-top"));this.adjustLocations(tiledMemberPack[id],lCompoundNode.rect.x,lCompoundNode.rect.y,horizontalMargin,verticalMargin)}};_CoSELayout.prototype.repopulateZeroDegreeMembers=function(tiledPack){for(var i in tiledPack){var compound=this.cy.getElementById(i);var compoundNode=_CoSELayout.idToLNode[i];var horizontalMargin=parseInt(compound.css("padding-left"));var verticalMargin=parseInt(compound.css("padding-top"));this.adjustLocations(tiledPack[i],compoundNode.rect.x,compoundNode.rect.y,horizontalMargin,verticalMargin);var tempchildren=compound.scratch("coseBilkent").tempchildren;for(var i=0;imaxHeight)maxHeight=lnode.rect.height}y+=maxHeight+organization.verticalPadding}};_CoSELayout.prototype.tileCompoundMembers=function(childGraphMap){var tiledMemberPack=[];for(var id in childGraphMap){var compoundNode=_CoSELayout.idToLNode[id];tiledMemberPack[id]=this.tileNodes(childGraphMap[id]);compoundNode.rect.width=tiledMemberPack[id].width+20;compoundNode.rect.height=tiledMemberPack[id].height+20}return tiledMemberPack};_CoSELayout.prototype.tileNodes=function(nodes){var self=this;var verticalPadding=typeof self.options.tilingPaddingVertical==="function"?self.options.tilingPaddingVertical.call():self.options.tilingPaddingVertical;var horizontalPadding=typeof self.options.tilingPaddingHorizontal==="function"?self.options.tilingPaddingHorizontal.call():self.options.tilingPaddingHorizontal;var organization={rows:[],rowWidth:[],rowHeight:[],width:20,height:20,verticalPadding:verticalPadding,horizontalPadding:horizontalPadding};var layoutNodes=[];for(var i=0;in2.rect.width*n2.rect.height)return-1;if(n1.rect.width*n1.rect.height0){w+=organization.horizontalPadding}organization.rowWidth[rowIndex]=w;if(organization.width0)h+=organization.verticalPadding;var extraHeight=0;if(h>organization.rowHeight[rowIndex]){extraHeight=organization.rowHeight[rowIndex];organization.rowHeight[rowIndex]=h;extraHeight=organization.rowHeight[rowIndex]-extraHeight}organization.height+=extraHeight;organization.rows[rowIndex].push(node)};_CoSELayout.prototype.getShortestRowIndex=function(organization){var r=-1;var min=Number.MAX_VALUE;for(var i=0;imax){r=i;max=organization.rowWidth[i]}}return r};_CoSELayout.prototype.canAddHorizontal=function(organization,extraWidth,extraHeight){var sri=this.getShortestRowIndex(organization);if(sri<0){return true}var min=organization.rowWidth[sri];if(min+organization.horizontalPadding+extraWidth<=organization.width)return true;var hDiff=0;if(organization.rowHeight[sri]0)hDiff=extraHeight+organization.verticalPadding-organization.rowHeight[sri]}var add_to_row_ratio;if(organization.width-min>=extraWidth+organization.horizontalPadding){add_to_row_ratio=(organization.height+hDiff)/(min+extraWidth+organization.horizontalPadding)}else{add_to_row_ratio=(organization.height+hDiff)/organization.width}hDiff=extraHeight+organization.verticalPadding;var add_new_row_ratio;if(organization.widthdiff&&longest!=last){row.splice(-1,1);organization.rows[last].push(node);organization.rowWidth[longest]=organization.rowWidth[longest]-diff;organization.rowWidth[last]=organization.rowWidth[last]+diff;organization.width=organization.rowWidth[this.getLongestRowIndex(organization)];var maxHeight=Number.MIN_VALUE;for(var i=0;imaxHeight)maxHeight=row[i].height}if(longest>0)maxHeight+=organization.verticalPadding;var prevTotal=organization.rowHeight[longest]+organization.rowHeight[last];organization.rowHeight[longest]=maxHeight;if(organization.rowHeight[last]0){var theNewGraph;theNewGraph=_CoSELayout.layout.getGraphManager().add(_CoSELayout.layout.newGraph(),theNode);this.processChildrenList(theNewGraph,children_of_children)}}};module.exports=function get(cytoscape){Thread=cytoscape.Thread;return _CoSELayout}},{"./CoSEConstants":141,"./CoSEEdge":142,"./CoSEGraph":143,"./CoSEGraphManager":144,"./CoSELayout":145,"./CoSENode":146,"./DimensionD":147,"./FDLayout":148,"./FDLayoutConstants":149,"./FDLayoutEdge":150,"./FDLayoutNode":151,"./HashMap":152,"./HashSet":153,"./IGeometry":154,"./IMath":155,"./Integer":156,"./LEdge":157,"./LGraph":158,"./LGraphManager":159,"./LGraphObject":160,"./LNode":161,"./Layout":162,"./LayoutConstants":163,"./Point":164,"./PointD":165,"./RandomSeed":166,"./RectangleD":167,"./Transform":168,"./UniqueIDGeneretor":169}],171:[function(require,module,exports){"use strict";var getLayout=require("./Layout");var register=function(cytoscape){var Layout=getLayout(cytoscape);cytoscape("layout","cose-bilkent",Layout)};if(typeof cytoscape!=="undefined"){register(cytoscape)}module.exports=register},{"./Layout":170}],172:[function(require,module,exports){var cytoscape=window.cytoscape=require("cytoscape");var panzoom=require("cytoscape-panzoom");var navigator=require("cytoscape-navigator");var cyqtip=require("cytoscape-qtip");var regCose=require("../../lib/js/cose-bilkent/src/index.js");var grid_guide=require("cytoscape-grid-guide");var undoRedo=require("cytoscape-undo-redo");var contextMenus=require("cytoscape-context-menus");require("bootstrap-select");var panzoomOpts=require("./PanzoomOptions.js");var styleSheet=require("./GraphStyleSheet.js");var edgeHandleOpts=require("./EdgeHandlesOptions.js");var LayoutProperties=require("./BackboneViews/LayoutPropertiesView.js");var GenomicDataExplorerView=require("./BackboneViews/GenomicDataExplorerView.js");var PathwayDetailsView=require("./BackboneViews/PathwayDetailsView.js");var GridOptionsView=require("./BackboneViews/GridOptionsView.js");var CBioPortalAccessView=require("./BackboneViews/CbioPortalAccessView.js");require("./FileOperationsManager.js");require("./OtherMenuOperations.js");require("./GenomicMenuOperations.js");require("./ViewOperationsManager.js");require("./GraphUtilities.js");var QtipManager=require("./QtipManager.js");var ContextMenuManager=require("./ContextMenuManager.js");var DragDropNodeAddPlugin=require("./DragDropNodeAddPlugin.js");var EditorActionsManager=require("./EditorActionsManager.js");var SaveLoadUtilities=require("./SaveLoadUtility.js");var CBioPortalAccessor=require("./cBioPortalAccessor.js");var notify=require("bootstrap-notify");window.notificationManager=require("./NotificationFactory");module.exports=function(){function AppManager(isCollaborative,realTimeManager){this.isCollaborative=isCollaborative;this.realTimeManager=realTimeManager;this.init();this.createSampleMenu();this.createCBioPortalAccessModal()}AppManager.prototype.init=function(){this.initCyJS();this.initCyHandlers();var that=this;window.onresize=function(){that.placePanzoomAndOverlay()};if(!this.isCollaborative){$(document).keydown(function(e){if(e.which===89&&(e.ctrlKey||event.metaKey)){window.undoRedoManager.redo()}else if(e.which===90&&(e.ctrlKey||event.metaKey)){window.undoRedoManager.undo()}})}else{$('a[role="redo"]').hide();$('a[role="undo"]').hide()}window.appManager=this};AppManager.prototype.placePanzoomAndOverlay=function(){var offset=5;var topCy=$(".cyContainer").offset().top;var leftCy=$(".cyContainer").offset().left;var heightCy=$(".cyContainer").outerHeight();var widthCy=$(".cyContainer").outerWidth();var heightNavigator=$(".cytoscape-navigator-wrapper").outerHeight();var widthNavigator=$(".cytoscape-navigator-wrapper").outerWidth();var heightPanzoom=$(".cy-panzoom").outerHeight();var widthPanzoom=$(".cy-panzoom").outerWidth();$(".cytoscape-navigator-wrapper").css("top",heightCy+topCy-heightNavigator-offset);$(".cytoscape-navigator-wrapper").css("left",widthCy+leftCy-widthNavigator-offset);$(".cy-panzoom").css("top",topCy+5);$(".cy-panzoom").css("left",widthCy+leftCy-55)};AppManager.prototype.createSampleMenu=function(){var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var templateData=JSON.parse(request.responseText);for(var key in templateData){if(templateData.hasOwnProperty(key)){var newTCGAMenu=$('");var newTCGAPathway=$('');for(var i in templateData[key]){var newPath=templateData[key][i];var pName=newPath.replace(/-/gi," ").substring(0,newPath.length-4);var sampleLink=$('
  • '+pName+"
  • ");sampleLink.on("click",sampleMenuClickHandler);if(key.includes("PanCancer")){$("#panCancerSubMenu").append(sampleLink)}else{newTCGAPathway.append(sampleLink);newTCGAMenu.append(newTCGAPathway)}}if(!key.includes("PanCancer")&&!key.includes("Creighton")){$("#sampleSubMenu").append(newTCGAMenu)}}}}};function sampleMenuClickHandler(event){var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var allEles=SaveLoadUtilities.parseGraph(request.responseText);window.editorActionsManager.loadFile(allEles.nodes,allEles.edges);window.undoRedoManager.reset();window.appManager.pathwayDetailsView.updatePathwayProperties({fileName:allEles.title+".txt",pathwayTitle:allEles.title,pathwayDescription:allEles.description})}};var pathwayName=event.target.attributes[0].value;request.open("GET","/pathway?filename="+pathwayName);request.send()}request.open("GET","/getTemplateFileData");request.send()};AppManager.prototype.createCBioPortalAccessModal=function(){var portalAccessor=new CBioPortalAccessor;var self=this;this.portalAccessView=new CBioPortalAccessView({el:$("#cbioPortalAccessDiv")});portalAccessor.fetchCancerStudies(function(cancerStudies){self.portalAccessView.updateCancerStudies(cancerStudies)})};AppManager.prototype.initCyJS=function(){panzoom(cytoscape,$);cyqtip(cytoscape,$);regCose(cytoscape);navigator(cytoscape);grid_guide(cytoscape,$);undoRedo(cytoscape);contextMenus(cytoscape,$);window.edgeAddingMode=0;cy=window.cy=cytoscape({container:document.querySelector("#cy"),boxSelectionEnabled:true,autounselectify:false,wheelSensitivity:.1,style:styleSheet,ready:function(){},textureOnViewport:false,motionBlur:true,layout:{name:"preset"}});window.editorActionsManager=this.editorActionsManager=new EditorActionsManager(this.isCollaborative,this.realTimeManager,window.cy);this.qtipManager=new QtipManager(window.cy),this.editorActionsManager;this.cxtMenuManager=new ContextMenuManager(window.cy,this.editorActionsManager);this.dragDropNodeAddManager=new DragDropNodeAddPlugin(this.editorActionsManager);this.layoutPropertiesView=new LayoutProperties({el:$("#layoutPropertiesDiv"),editorActionsManager:this.editorActionsManager}).render();this.gridOptionsView=new GridOptionsView({el:$("#gridOptionsDiv")}).render();this.genomicDataExplorerView=new GenomicDataExplorerView({el:$("#genomicDataExplorerDiv"),editorActionsManager:this.editorActionsManager}).render();this.pathwayDetailsView=new PathwayDetailsView({el:$("#pathwayDetailsDiv")}).render();cy.panzoom(panzoomOpts);cy.nodeadd({components:[{container:$("#simpleNodeDiv"),nodeType:"Gene"},{container:$("#familyNodeDiv"),nodeType:"Family"},{container:$("#complexNodeDiv"),nodeType:"Complex",icon:"fa fa-square-o"},{container:$("#compartmentNodeDiv"),nodeType:"Compartment",icon:"fa fa-square-o"},{container:$("#processNodeDiv"),nodeType:"Process"}]});cy.edgehandles(edgeHandleOpts);var navDefaults={container:".cytoscape-navigator-wrapper",viewLiveFramerate:0,thumbnailEventFramerate:10,thumbnailLiveFramerate:false,dblClickDelay:200,removeCustomContainer:true,rerenderDelay:100};var nav=cy.navigator(navDefaults);this.placePanzoomAndOverlay()};AppManager.prototype.initCyHandlers=function(){var that=this;var tappedBefore;var tappedTimeout;cy.on("tap",function(event){var tappedNow=event.cyTarget;if(tappedTimeout&&tappedBefore){clearTimeout(tappedTimeout)}if(tappedBefore===tappedNow){tappedNow.trigger("doubleTap");tappedBefore=null}else{tappedTimeout=setTimeout(function(){tappedBefore=null},300);tappedBefore=tappedNow}});cy.on("doubleTap","node",function(e){var eventIsDirect=e.cyTarget===this;if(eventIsDirect){$(".qtip").remove();that.qtipManager.addQtipToElements(e.cyTarget);var api=this.qtip("api");if(api){api.show()}}});cy.on("select","node",function(e){window.editorActionsManager.pushSelectedNodeStack(e.cyTarget)});cy.on("unselect","node",function(e){window.editorActionsManager.removeElementFromSelectedNodeStack(e.cyTarget)});cy.on("free","node",function(e){var selectedNodes=cy.nodes(":selected");var nodes=e.cyTarget;nodes=nodes.union(nodes.descendants());nodes=nodes.union(selectedNodes);that.editorActionsManager.moveElements(nodes)});cy.on("layoutstop",function(event){that.editorActionsManager.postLayout()});cy.on("add","node",function(event){cy.style().update();cy.forceRender()})};return AppManager}()},{"../../lib/js/cose-bilkent/src/index.js":171,"./BackboneViews/CbioPortalAccessView.js":174,"./BackboneViews/GenomicDataExplorerView.js":175,"./BackboneViews/GridOptionsView.js":176,"./BackboneViews/LayoutPropertiesView.js":177,"./BackboneViews/PathwayDetailsView.js":178,"./ContextMenuManager.js":180,"./DragDropNodeAddPlugin.js":181,"./EdgeHandlesOptions.js":182,"./EditorActionsManager.js":183,"./FileOperationsManager.js":184,"./GenomicMenuOperations.js":186,"./GraphStyleSheet.js":187,"./GraphUtilities.js":188,"./NotificationFactory":189,"./OtherMenuOperations.js":190,"./PanzoomOptions.js":191,"./QtipManager.js":192,"./SaveLoadUtility.js":196,"./ViewOperationsManager.js":197,"./cBioPortalAccessor.js":198,"bootstrap-notify":2,"bootstrap-select":3,cytoscape:113,"cytoscape-context-menus":17,"cytoscape-grid-guide":24,"cytoscape-navigator":28,"cytoscape-panzoom":29,"cytoscape-qtip":30,"cytoscape-undo-redo":31}],173:[function(require,module,exports){var BioGeneView=Backbone.View.extend({render:function(){var variables={geneDescription:this.model.geneDescription,geneAliases:this.parseDelimitedInfo(this.model.geneAliases,":",",",null),geneDesignations:this.parseDelimitedInfo(this.model.geneDesignations,":",",",null),geneLocation:this.model.geneLocation,geneMim:this.model.geneMim,geneId:this.model.geneId,geneUniprotId:this.extractFirstUniprotId(this.model.geneUniprotMapping),geneUniprotLinks:this.generateUniprotLinks(this.model.geneUniprotMapping),geneSummary:this.model.geneSummary};var template=_.template($("#biogene-template").html());template=template(variables);this.$el.html(template);this.format(this.model);return this.$el},format:function(){if(this.model.geneDescription==undefined)this.$el.find(".biogene-description").hide();if(this.model.geneAliases==undefined)this.$el.find(".biogene-aliases").hide();if(this.model.geneDesignations==undefined)this.$el.find(".biogene-designations").hide();if(this.model.geneChromosome==undefined)this.$el.find(".biogene-chromosome").hide();if(this.model.geneLocation==undefined)this.$el.find(".biogene-location").hide();if(this.model.geneMim==undefined)this.$el.find(".biogene-mim").hide();if(this.model.geneId==undefined)this.$el.find(".biogene-id").hide();if(this.model.geneUniprotMapping==undefined)this.$el.find(".biogene-uniprot-links").hide();if(this.model.geneSummary==undefined)this.$el.find(".node-details-summary").hide();var expanderOpts={slicePoint:100,expandPrefix:" ",expandText:" (...)",userCollapseText:" (show less)",moreClass:"expander-read-more",lessClass:"expander-read-less",detailClass:"expander-details",expandEffect:"fadeIn",collapseEffect:"fadeOut"};expanderOpts.slicePoint=2;expanderOpts.widow=0},generateUniprotLinks:function(mapping){var formatter=function(id){var tpl=_.template($("#uniprot-link-template").html());tpl=tpl({id:id});return tpl};if(mapping==undefined||mapping==null){return""}if(mapping.indexOf(":")<0){return""}else{mapping=mapping.substring(mapping.indexOf(":")+1);return", "+this.parseDelimitedInfo(mapping,":",",",formatter)}},extractFirstUniprotId:function(mapping){if(mapping==undefined||mapping==null){return""}var parts=mapping.split(":"); -};RealTimeManager.prototype.onFileLoaded=function(doc){var model=doc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var realTimeLayoutProperties=root.get(this.LAYOUT_PROPS_NAME);var globalOptions=root.get(this.GLOBAL_OPTS_NAME);var genomicDataMap=root.get(this.GENOMIC_DATA_MAP_NAME);var visDataMap=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);var nodeMapEntries=nodeMap.values();var edgeMapEntries=edgeMap.values();window.editorActionsManager.addNewElementsLocally(nodeMapEntries,edgeMapEntries);window.editorActionsManager.updateLayoutPropertiesCallback(realTimeLayoutProperties);window.editorActionsManager.changeGlobalOptions(globalOptions);window.editorActionsManager.genomicDataOverlayManager.genomicDataMap=genomicDataMap.get("genomicData");window.editorActionsManager.genomicDataOverlayManager.visibleGenomicDataMapByType=visDataMap.get("visMap");window.editorActionsManager.genomicDataOverlayManager.showGenomicData();window.editorActionsManager.genomicDataOverlayManager.notifyObservers();cy.fit(50);this.realTimeDoc=doc;var nodeAddRemoveHandler=function(event){window.editorActionsManager.realTimeNodeAddRemoveEventCallBack(event)};var edgeAddRemoveHandler=function(event){window.editorActionsManager.realTimeEdgeAddRemoveEventCallBack(event)};var genomicDataAddRemoveHandler=function(event){window.editorActionsManager.realTimeGenomicDataHandler(event)};var genomicDataVisibilityChangeHandler=function(event){window.editorActionsManager.realTimeGenomicDataVsibilityHandler(event)};root.get(this.NODEMAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,nodeAddRemoveHandler);root.get(this.EDGEMAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,edgeAddRemoveHandler);root.get(this.GENOMIC_DATA_MAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,genomicDataAddRemoveHandler);root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,genomicDataVisibilityChangeHandler);this.postFileLoad()};RealTimeManager.prototype.clearGenomicData=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var genomicMap=root.get(this.GENOMIC_DATA_MAP_NAME);var genomicMapKeys=genomicMap.keys();model.beginCompoundOperation();for(var i in genomicMapKeys){genomicMap.delete(genomicMapKeys[i])}model.endCompoundOperation()};RealTimeManager.prototype.clearGenomicVisData=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var map=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);var mapKeys=map.keys();model.beginCompoundOperation();for(var i in mapKeys){map.delete(mapKeys[i])}model.endCompoundOperation()};RealTimeManager.prototype.addGenomicData=function(_key,geneData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var genomicMap=root.get(this.GENOMIC_DATA_MAP_NAME);genomicMap.set(_key,geneData)};RealTimeManager.prototype.addGenomicVisibilityData=function(cancerType,isVisible){var model=this.realTimeDoc.getModel();var root=model.getRoot();var map=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);map.set(cancerType,isVisible)};RealTimeManager.prototype.addNewNode=function(nodeData,posData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var newNode=model.create(NodeR,{name:nodeData.name,type:nodeData.type,parent:nodeData.parent});if(posData){newNode.x=posData.x;newNode.y=posData.y}var realTimeGeneratedID=this.getCustomObjId(newNode);nodeMap.set(realTimeGeneratedID,newNode)};RealTimeManager.prototype.addNewEdge=function(edgeData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var edgeMap=root.get(this.EDGEMAP_NAME);var newEdge=model.create(EdgeR,{type:edgeData.type,source:edgeData.source,target:edgeData.target});var realTimeGeneratedID=this.getCustomObjId(newEdge);edgeMap.set(realTimeGeneratedID,newEdge)};RealTimeManager.prototype.removeElement=function(elementID){var model=this.realTimeDoc.getModel();var root=model.getRoot();var edgeMap=root.get(this.EDGEMAP_NAME);var nodeMap=root.get(this.NODEMAP_NAME);if(nodeMap.has(elementID)){nodeMap.delete(elementID)}else if(edgeMap.has(elementID)){edgeMap.delete(elementID)}else{throw new Error("Element does not exists in Real Time")}};RealTimeManager.prototype.moveElement=function(ele){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var elementID=ele.id();var newPos=ele.position();if(nodeMap.has(elementID)){var tmpNode=nodeMap.get(elementID);model.beginCompoundOperation();tmpNode.x=newPos.x;tmpNode.y=newPos.y;model.endCompoundOperation()}else{throw new Error("Element does not exists in nodes !!! ")}};RealTimeManager.prototype.changeName=function(ele,newName){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var elementID=ele.id();if(nodeMap.has(elementID)){var tmpNode=nodeMap.get(elementID);model.beginCompoundOperation();tmpNode.name=newName;model.endCompoundOperation()}else{throw new Error("Element does not exists in nodes !!! ")}};RealTimeManager.prototype.changeParent=function(rootNode,newParentId,connectedEdges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var nodeLookupTable={};var self=this;function traverseFromRoot(rootNode,parId){var refNode=rootNode.nodeRef;var children=rootNode.children;var newParentId=parId;if(refNode){var refNodeId=refNode.id();var nodeData=refNode.data();var posData=refNode.position();var newNodeData={name:nodeData.name,type:nodeData.type,x:posData.x,y:posData.y};if(parId){newNodeData.parent=parId}self.removeElement(refNodeId);var newNode=model.create(NodeR,newNodeData);var newNodeId=self.getCustomObjId(newNode);nodeMap.set(newNodeId,newNode);newParentId=newNodeId;nodeLookupTable[refNodeId]=newNodeId}for(var i in children){var childNode=children[i];traverseFromRoot(childNode,newParentId)}}traverseFromRoot(rootNode,newParentId);connectedEdges.forEach(function(edge,index){var edgeData=edge.data();self.removeElement(edge.id());var newSource=nodeLookupTable[edgeData.source];var newTarget=nodeLookupTable[edgeData.target];if(newSource){edgeData.source=newSource}if(newTarget){edgeData.target=newTarget}self.addNewEdge(edgeData)})};RealTimeManager.prototype.removeAllElements=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var nodeMapKeys=nodeMap.keys();var edgeMapKeys=edgeMap.keys();for(var index in nodeMapKeys){this.removeElement(nodeMapKeys[index])}for(var index in edgeMapKeys){this.removeElement(edgeMapKeys[index])}};RealTimeManager.prototype.loadGraph=function(nodes,edges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);this.removeAllElements();var that=this;var oldIdNewIdMap={};function traverseTree(node,newParentId){node.data.x=node.position.x;node.data.y=node.position.y;if(newParentId){var parent=node.data.parent;if(parent){node.data.parent=newParentId}}var newNode=model.create(NodeR,node.data);var newNodeId=that.getCustomObjId(newNode);oldIdNewIdMap[node.data.id]=newNodeId;nodeMap.set(newNodeId,newNode);if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,newNodeId)}}}var tree=window.GraphUtilities.createGraphHierarchyRealTime(nodes);for(var i in tree){var rootLevelNode=tree[i];traverseTree(rootLevelNode)}for(var i in edges){var edge=edges[i];edge.data.source=oldIdNewIdMap[edge.data.source];edge.data.target=oldIdNewIdMap[edge.data.target];var newEdge=model.create(EdgeR,edge.data);var newEdgeID=this.getCustomObjId(newEdge);edgeMap.set(newEdgeID,newEdge)}};RealTimeManager.prototype.mergeGraph=function(nodes,edges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var realTimeNodeMap=nodeMap.items();var realTimeNodeLookupTable={};var realTimeNodeNameLookupTable={};var oldIdNewIdMap={};var that=this;for(var i in realTimeNodeMap){var nodeMapItem=realTimeNodeMap[i];realTimeNodeLookupTable[nodeMapItem[0]]=nodeMapItem[1];realTimeNodeNameLookupTable[nodeMapItem[1].name]=nodeMapItem[1]}function traverseTree(node,newParentId){if(!(node.data.name in realTimeNodeNameLookupTable)){node.data.x=node.position.x;node.data.y=node.position.y;if(newParentId){var parent=node.data.parent;if(parent){node.data.parent=newParentId}}var newNode=model.create(NodeR,node.data);var newNodeId=that.getCustomObjId(newNode);oldIdNewIdMap[node.data.id]=newNodeId;nodeMap.set(newNodeId,newNode);if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,newNodeId)}}}else{var sameNameNode=realTimeNodeNameLookupTable[node.data.name];var sameNodeId=that.getCustomObjId(sameNameNode);oldIdNewIdMap[node.data.id]=sameNodeId;if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,sameNodeId)}}}}var tree=window.GraphUtilities.createGraphHierarchyRealTime(nodes);for(var i in tree){var rootLevelNode=tree[i];traverseTree(rootLevelNode,rootLevelNode.data.id)}for(var i in edges){var edge=edges[i];edge.data.source=oldIdNewIdMap[edge.data.source];edge.data.target=oldIdNewIdMap[edge.data.target];var newEdge=model.create(EdgeR,edge.data);var newEdgeID=this.getCustomObjId(newEdge);edgeMap.set(newEdgeID,newEdge)}};RealTimeManager.prototype.updateLayoutProperties=function(newLayoutProperties){var model=this.realTimeDoc.getModel();var root=model.getRoot();var layoutPropertiesR=root.get(this.LAYOUT_PROPS_NAME);model.beginCompoundOperation();for(var property in newLayoutProperties){if(newLayoutProperties.hasOwnProperty(property)){layoutPropertiesR[property]=newLayoutProperties[property]}}model.endCompoundOperation()};RealTimeManager.prototype.updateGlobalOptions=function(newOptions){var model=this.realTimeDoc.getModel();var root=model.getRoot();var globalOptions=root.get(this.GLOBAL_OPTS_NAME);model.beginCompoundOperation();for(var property in globalOptions){if(newOptions.hasOwnProperty(property)){globalOptions[property]=newOptions[property]}}model.endCompoundOperation()};RealTimeManager.prototype.getCustomObjId=function(object){return gapi.drive.realtime.custom.getId(object)};RealTimeManager.prototype.registerTypes=function(){this.createRealTimeObjectDefinitions()};RealTimeManager.prototype.createGraphHierarchy=function(nodes){var tree=[];var mappedArr={};for(var i=0,len=nodes.length;i0){var id=files[0].id;successHandler(id)}else{var createProps={resource:{name:appFName,mimeType:"application/vnd.google-apps.folder"}};driveAPI.files.create(createProps).then(function(resp){var newFolderId=resp.result.id;successHandler(newFolderId)},function(err){console.log(err)})}},function(err){console.log(err)})}},shareRealTimeFile:function(fileId){window.gapi.client.drive.permissions.create({resource:{type:"anyone",role:"writer",allowFileDiscovery:false},fileId:fileId}).then(function(resp){console.log("File shared succesfully !")},function(reason){console.log("An Error happened: "+reason.result.error.message)})},load:function(documentId,onFileLoaded,initializeModel){var that=this;window.gapi.drive.realtime.load(documentId,function(doc){onFileLoaded(doc)},initializeModel,this.onError.bind(this))},onError:function(error){if(error.type==window.gapi.drive.realtime.ErrorType.TOKEN_REFRESH_REQUIRED){this.authorizer.authorize(function(){console.log("Error, auth refreshed")},false)}else if(error.type==window.gapi.drive.realtime.ErrorType.CLIENT_ERROR){alert("An Error happened: "+error.message);window.location.href="/"}else if(error.type==window.gapi.drive.realtime.ErrorType.NOT_FOUND){alert("The file was not found. It does not exist or you do not have "+"read access to the file.");window.location.href="/"}else if(error.type==window.gapi.drive.realtime.ErrorType.FORBIDDEN){alert("You do not have access to this file. Try having the owner share"+"it with you from Google Drive.");window.location.href="/"}}};utils.RealtimeAuthorizer=function(realtimeUtil){this.util=realtimeUtil;this.handleAuthResult=this.handleAuthResult.bind(this);this.token=null};utils.RealtimeAuthorizer.prototype={start:function(onAuthComplete,usePopup){var that=this;window.gapi.load("auth:client,drive-realtime,drive-share",{callback:function(){that.authorize(onAuthComplete,usePopup)}});if(this.authTimer){window.clearTimeout(this.authTimer)}this.refreshAuth()},authorize:function(onAuthComplete,usePopup){this.onAuthComplete=onAuthComplete;window.gapi.auth.authorize({client_id:this.util.clientId,scope:this.util.scopes,immediate:!usePopup},this.handleAuthResult)},handleAuthResult:function(authResult){if(authResult&&!authResult.error){this.token=authResult.access_token}this.onAuthComplete(authResult)},refreshAuth:function(){var that=this;this.authTimer=setTimeout(function(){that.authorize(function(){console.log("Refreshed Auth Token")},false);that.refreshAuth()},this.util.refreshInterval)}}}()},{}],194:[function(require,module,exports){var SaveLoadUtilities=require("./SaveLoadUtility.js");module.exports=function(){var SVGExporter=function(){this.SVGNameSpace="http://www.w3.org/2000/svg";this.svg=document.createElementNS(this.SVGNameSpace,"svg");this.NODE_FILL_COLOR="rgb(255,255,255)";this.FAMILY_FILL_COLOR="rgb(255,255,255)";this.FAMILY_STROKE_COLOR="rgb(204,204,204)";this.NODE_STROKE_COLOR="rgb(0,0,0)";this.COMPARTMENT_STROKE_WIDTH=2;this.NODE_STROKE_WIDTH=1;this.NODE_OPACITY=.5;this.ROUNDING_FACTOR=6;this.GENOMICDATA_LABEL_Y_OFFSET=-15;this.EDGE_WIDTH=1;this.T_WIDTH=2;this.T_HEIGHT=8;this.T_ARROW_HEAD_OFFSET=2;this.TRIANGLE_ARROW_HEAD_HEIGHT=8;this.TRIANGLE_ARROW_HEAD_WIDTH=8;this.DASH_PARAMETERS="5, 3";this.COMPOUND_MARGIN=8;this.NODE_FONT_SIZE=14};SVGExporter.prototype.resetSVG=function(){this.svg=document.createElementNS(this.SVGNameSpace,"svg")};SVGExporter.prototype.exportGraph=function(nodes,edges){this.resetSVG();var cyBounds=cy.extent();this.svg.setAttribute("viewBox",cyBounds.x1+" "+cyBounds.y1+" "+cyBounds.w+" "+cyBounds.h);var that=this;var nodeMap={};var nodeTree=window.GraphUtilities.createGraphHierarchy(nodes);var traverseFunction=function(node){nodeMap[node.id()]=node;var genomicDataSVG=window.editorActionsManager.getGenomicDataSVG(node).children;that.svg.appendChild(that.createRect(node));var labelOffset=genomicDataSVG&&genomicDataSVG.length>0?that.GENOMICDATA_LABEL_Y_OFFSET:0;that.svg.appendChild(that.createText(node,labelOffset));if(genomicDataSVG){while(genomicDataSVG.length>0){var elemSVG=genomicDataSVG[0];var nodePosition=node.position();var svgX=elemSVG.getAttribute("x");var svgY=elemSVG.getAttribute("y");elemSVG.setAttribute("x",nodePosition.x-node.width()/2+parseFloat(svgX));elemSVG.setAttribute("y",nodePosition.y-node.height()/2+parseFloat(svgY));that.svg.appendChild(elemSVG)}}if(node.childNodes){for(var i in node.childNodes){traverseFunction(node.childNodes[i])}}};for(var i in nodeTree){var rootLevelNode=nodeTree[i];traverseFunction(rootLevelNode)}edges.forEach(function(edge){var source=nodeMap[edge.source().id()];var target=nodeMap[edge.target().id()];that.drawEdge(edge,source,target)});return this.svg.outerHTML};SVGExporter.prototype.drawEdge=function(edge,source,target){var edgeType=edge.data().type;var sourceRectangle={x:source.position().x,y:source.position().y,width:source.width(),height:source.height()};var targetRectangle={x:target.position().x,y:target.position().y,width:target.width(),height:target.height()};if(source.isParent()){sourceRectangle.width+=this.COMPOUND_MARGIN;sourceRectangle.height+=this.COMPOUND_MARGIN}if(target.isParent()){targetRectangle.width+=this.COMPOUND_MARGIN;targetRectangle.height+=this.COMPOUND_MARGIN}var clipPoints=this.findClippingPoints(sourceRectangle,targetRectangle);var unitV=unitVector({x:clipPoints.targetClipPoints.x-clipPoints.sourceClipPoints.x,y:clipPoints.targetClipPoints.y-clipPoints.sourceClipPoints.y});var inverseUnitV=scale(unitV,-1);var targetX=clipPoints.targetClipPoints.x;var targetY=clipPoints.targetClipPoints.y;if(edgeType=="ACTIVATES"||edgeType=="INDUCES"){targetX=clipPoints.targetClipPoints.x+this.TRIANGLE_ARROW_HEAD_HEIGHT*inverseUnitV.x;targetY=clipPoints.targetClipPoints.y+this.TRIANGLE_ARROW_HEAD_HEIGHT*inverseUnitV.y;var point1Vector=rotateVector(unitV,Math.PI/2);var point2Vector=rotateVector(unitV,-Math.PI/2);point1Vector=scale(point1Vector,this.TRIANGLE_ARROW_HEAD_WIDTH/2);point2Vector=scale(point2Vector,this.TRIANGLE_ARROW_HEAD_WIDTH/2);var point1X=targetX+point1Vector.x;var point1Y=targetY+point1Vector.y;var point2X=targetX+point2Vector.x;var point2Y=targetY+point2Vector.y;var polySVG=document.createElementNS(this.SVGNameSpace,"polygon");polySVG.setAttribute("points",point1X+","+point1Y+","+point2X+","+point2Y+","+clipPoints.targetClipPoints.x+","+clipPoints.targetClipPoints.y);this.svg.appendChild(polySVG)}else if(edgeType=="INHIBITS"||edgeType=="REPRESSES"){targetX=clipPoints.targetClipPoints.x+this.T_ARROW_HEAD_OFFSET*inverseUnitV.x;targetY=clipPoints.targetClipPoints.y+this.T_ARROW_HEAD_OFFSET*inverseUnitV.y;var point1Vector=rotateVector(unitV,Math.PI/2);var point2Vector=rotateVector(unitV,-Math.PI/2);point1Vector=scale(point1Vector,this.T_HEIGHT/2);point2Vector=scale(point2Vector,this.T_HEIGHT/2);var point1X=targetX+point1Vector.x;var point1Y=targetY+point1Vector.y;var point2X=targetX+point2Vector.x;var point2Y=targetY+point2Vector.y;var lineSVG=document.createElementNS(this.SVGNameSpace,"line");lineSVG.setAttribute("x1",point1X);lineSVG.setAttribute("y1",point1Y);lineSVG.setAttribute("x2",point2X);lineSVG.setAttribute("y2",point2Y);lineSVG.setAttribute("stroke-width",this.T_WIDTH);lineSVG.setAttribute("stroke","black");this.svg.appendChild(lineSVG)}var lineSVG=document.createElementNS(this.SVGNameSpace,"line");lineSVG.setAttribute("x1",clipPoints.sourceClipPoints.x);lineSVG.setAttribute("y1",clipPoints.sourceClipPoints.y);lineSVG.setAttribute("x2",targetX);lineSVG.setAttribute("y2",targetY);lineSVG.setAttribute("stroke-width",this.EDGE_WIDTH);lineSVG.setAttribute("stroke","black");if(edgeType=="INDUCES"||edgeType=="REPRESSES"){lineSVG.setAttribute("stroke-dasharray",this.DASH_PARAMETERS)}this.svg.appendChild(lineSVG)};SVGExporter.prototype.findClippingPoints=function(sourceRectangle,targetRectangle){var sourceAABB={xMin:sourceRectangle.x-sourceRectangle.width/2,xMax:sourceRectangle.x+sourceRectangle.width/2,yMin:sourceRectangle.y-sourceRectangle.height/2,yMax:sourceRectangle.y+sourceRectangle.height/2};var targetAABB={xMin:targetRectangle.x-targetRectangle.width/2,xMax:targetRectangle.x+targetRectangle.width/2,yMin:targetRectangle.y-targetRectangle.height/2,yMax:targetRectangle.y+targetRectangle.height/2};var line1={x1:sourceRectangle.x,y1:sourceRectangle.y,x2:targetRectangle.x,y2:targetRectangle.y};var line2={x1:targetRectangle.x,y1:targetRectangle.y,x2:sourceRectangle.x,y2:sourceRectangle.y};var returnObj={sourceClipPoints:clipLine(line1,sourceAABB),targetClipPoints:clipLine(line2,targetAABB)};return returnObj};SVGExporter.prototype.createRect=function(node){var nodeRectangle=document.createElementNS(this.SVGNameSpace,"rect");var nodePosition=node.position();if(node.isParent()){nodeRectangle.setAttribute("x",nodePosition.x-node.width()/2-this.COMPOUND_MARGIN/2);nodeRectangle.setAttribute("y",nodePosition.y-node.height()/2-this.COMPOUND_MARGIN/2);nodeRectangle.setAttribute("width",node.width()+this.COMPOUND_MARGIN);nodeRectangle.setAttribute("height",node.height()+this.COMPOUND_MARGIN)}else{nodeRectangle.setAttribute("x",nodePosition.x-node.width()/2);nodeRectangle.setAttribute("y",nodePosition.y-node.height()/2);nodeRectangle.setAttribute("width",node.width());nodeRectangle.setAttribute("height",node.height())}nodeRectangle=this.createStyleForNodes(node,nodeRectangle);return nodeRectangle};SVGExporter.prototype.createText=function(node,genomicDataOffset){var verticalTextOffset=5;var nodePosition=node.position();var svgText=document.createElementNS(this.SVGNameSpace,"text");if(node.isParent()){verticalTextOffset=20;svgText.setAttribute("x",nodePosition.x);svgText.setAttribute("y",nodePosition.y+node.height()/2+verticalTextOffset)}else{svgText.setAttribute("x",nodePosition.x);svgText.setAttribute("y",nodePosition.y+verticalTextOffset+genomicDataOffset)}svgText.setAttribute("font-family","Arial");svgText.setAttribute("text-anchor","middle");svgText.setAttribute("font-size",this.NODE_FONT_SIZE);svgText.innerHTML=node.data().name;return svgText};SVGExporter.prototype.createStyleForNodes=function(node,nodeRectangle){var nodeType=node.data().type;var strokeWidth=this.NODE_STROKE_WIDTH;var strokeColor=this.NODE_STROKE_COLOR;var fillColor=this.NODE_FILL_COLOR;var opacity=this.NODE_OPACITY;var strokeOpacity=1;if(nodeType=="GENE"||nodeType=="COMPARTMENT"){nodeRectangle.setAttribute("rx",this.ROUNDING_FACTOR);nodeRectangle.setAttribute("ry",this.ROUNDING_FACTOR);if(nodeType=="COMPARTMENT")strokeWidth=this.COMPARTMENT_STROKE_WIDTH}if(nodeType=="PROCESS"){opacity=0;strokeOpacity=0}if(nodeType=="FAMILY"){fillColor=this.FAMILY_FILL_COLOR;strokeColor=this.FAMILY_STROKE_COLOR}var styleString="stroke-width:"+strokeWidth+";"+"stroke:"+strokeColor+";"+"fill-opacity:"+opacity+";"+"fill:"+fillColor+";"+"stroke-opacity:"+strokeOpacity+";";nodeRectangle.setAttribute("style",styleString);return nodeRectangle};function clipLine(line,rectangle){var INSIDE=0;var LEFT=1;var RIGHT=2;var BOTTOM=4;var TOP=8;function getOutCode(point,rectangle){var outcode=INSIDE;if(point.xrectangle.xMax)outcode=outcode|RIGHT;if(point.yrectangle.yMax)outcode=outcode|BOTTOM;return outcode}var outcode0=getOutCode({x:line.x1,y:line.y1},rectangle);var outcode1=getOutCode({x:line.x2,y:line.y2},rectangle);var slope=(line.y2-line.y1)/(line.x2-line.x1);var returnCoords={x:line.x1,y:line.y1,slope:slope};var accept=false;while(true){if(!(outcode0|outcode1)){accept=true;break}else if(outcode0&outcode1){break}else{var outCode=outcode0?outcode0:outcode1;if(outCode&TOP){returnCoords.x=line.x1+(rectangle.yMin-line.y1)/slope;returnCoords.y=rectangle.yMin}else if(outCode&BOTTOM){returnCoords.x=line.x1+(rectangle.yMax-line.y1)/slope;returnCoords.y=rectangle.yMax}else if(outCode&RIGHT){returnCoords.x=rectangle.xMax;returnCoords.y=line.y1+slope*(rectangle.xMax-line.x1)}else if(outCode&LEFT){returnCoords.x=rectangle.xMin;returnCoords.y=line.y1+slope*(rectangle.xMin-line.x1)}if(outCode==outcode0){outcode0=getOutCode({x:returnCoords.x,y:returnCoords.y},rectangle)}else{outcode1=getOutCode({x:returnCoords.x,y:returnCoords.y},rectangle)}}}return returnCoords}function dotProduct(v1,v2){var newX=v1.x*v2.x;var newY=v1.y*v2.y;return{x:newX,y:newY}}function unitVector(v){var inverseLength=1/Math.sqrt(v.x*v.x+v.y*v.y);return{x:v.x*inverseLength,y:v.y*inverseLength}}function rotateVector(v,radians){var newX=v.x*Math.cos(radians)-v.y*Math.sin(radians);var newY=v.x*Math.sin(radians)+v.y*Math.cos(radians);return{x:newX,y:newY}}function scale(v,scalar){var newX=v.x*scalar;var newY=v.y*scalar;return{x:newX,y:newY}}return SVGExporter}()},{"./SaveLoadUtility.js":195}],195:[function(require,module,exports){var SaveLoadUtils={exportGraph:function(pathwayDetails){ -var returnString=pathwayDetails.pathwayTitle+"\n\n";returnString+=pathwayDetails.pathwayDescription+"\n\n";var nodes=pathwayDetails.graphJSON.elements.nodes;var edges=pathwayDetails.graphJSON.elements.edges;returnString+="--NODE_NAME NODE_ID NODE_TYPE PARENT_ID POSX POSY--"+"\n";if(nodes){for(var i=0;i4?lineData[4]:"0";var posY=lineData.length>5?lineData[5]:"0";var newNode={group:"nodes",data:{id:nodeID,name:nodeName,type:nodeType},position:{x:parseInt(posX),y:parseInt(posY)}};if(parentID!="-1"){newNode.data.parent=parentID}nodes.push(newNode)}for(var i=edgesStartIndex;i0){var firstSelected=nodes[0];var firstBbox=firstSelected.boundingBox();nodes.forEach(function(node,index){if(index==0){return}if(nodeMap[node.parent().id()]==null){var newPosition=calculateNewPosition(param,node,firstBbox);changePosition(node,0,0,newPosition)}});window.editorActionsManager.handleChangePositionByAlignment(movedNodes)}}function calculateNewPosition(param,node,referenceBbox){var currentPos=node.position();var currentBbox=node.boundingBox();var newPosition;if(param==="vLeft"){newPosition={x:referenceBbox.x1+currentBbox.w/2,y:currentPos.y}}else if(param==="vCen"){newPosition={x:referenceBbox.x1+referenceBbox.w/2,y:currentPos.y}}else if(param==="vRight"){newPosition={x:referenceBbox.x2-currentBbox.w/2,y:currentPos.y}}else if(param==="hTop"){newPosition={x:currentPos.x,y:referenceBbox.y1+currentBbox.h/2}}else if(param==="hMid"){newPosition={x:currentPos.x,y:referenceBbox.y1+referenceBbox.h/2}}else if(param==="hBot"){newPosition={x:currentPos.x,y:referenceBbox.y2-currentBbox.h/2}}else{console.log("Error: wrong alignment name "+param);return}return newPosition}function changePosition(node,dx,dy,newPos){if(node.isParent()){var childNodes=node.children();var parentBbox=node.boundingBox();childNodes.forEach(function(childNode,index){var childBbox=childNode.boundingBox();var _dx=-(parentBbox.x1-childBbox.x1)-parentBbox.w/2+childBbox.w/2;var _dy=-(parentBbox.y1-childBbox.y1)-parentBbox.h/2+childBbox.h/2;if(childNode.isParent()){changePosition(childNode,0,0,{x:newPos.x+_dx,y:newPos.y+_dy})}else{changePosition(childNode,_dx,_dy,newPos)}})}else{var position={x:newPos.x+dx,y:newPos.y+dy};movedNodes.push({node:node,nextPosition:position,oldPosition:null})}}$(".viewDropdown li a").click(function(event){event.preventDefault();var dropdownLinkRole=$(event.target).attr("role");if(dropdownLinkRole=="grid"){$("#gridOptionsDiv").modal("show")}else{handleNodeAlignment(dropdownLinkRole)}})}(window.$)},{}],197:[function(require,module,exports){module.exports=function(){function CBioPortalAccessor(){this.GET_ALL_CANCER_STUDIES_URL="http://www.cbioportal.org/webservice.do?cmd=getCancerStudies";this.GET_GENETIC_PROFILES_URL="http://www.cbioportal.org/webservice.do?cmd=getGeneticProfiles&cancer_study_id=";this.GET_PROFILE_DATA_URL="http://www.cbioportal.org/webservice.do?cmd=getProfileData";this.MRNA_EXP_STUDY_NAME="_mrna_median_Zscores";this.CNA_EXP_STUDY_NAME="_gistic";this.MUTATION_EXP_STUDY_NAME="_mutations";this.CNA_DELETION=-2;this.CNA_GAIN=2;this.Z_SCORE_UPPER_THRESHOLD=2;this.Z_SCORE_LOWER_THRESHOLD=-2;this.MUTATION="Mutation";this.GENE_EXPRESSION="Gene Expression";this.CNA="Copy Number Alteration"}CBioPortalAccessor.prototype.fetchCancerStudies=function(callbackFunction){var cancerStudies={};var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var seperator=/\r?\n|\r/;var lines=request.responseText.split(seperator);for(var i=1;i=this.Z_SCORE_UPPER_THRESHOLD||parseInt(lineData[j])<=this.Z_SCORE_LOWER_THRESHOLD))profileDataAlteration++}}outData[geneticProfileId][lineData[1]]=profileDataAlteration/numOfTumorSamples*100}callbackFunction(outData)};CBioPortalAccessor.prototype.getProfileData=function(params,callbackFunction){var outData={};var request=new XMLHttpRequest;var self=this;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){self.calcAlterationPercentages(request.responseText,params.geneticProfileId,callbackFunction)}};var queryURL=this.GET_PROFILE_DATA_URL;queryURL+="&case_set_id="+params.caseSetId+"_sequenced";queryURL+="&genetic_profile_id="+params.geneticProfileId;queryURL+="&gene_list=";for(var i=0;i0){var pathwayName=uri.substring(uri.indexOf("=")+1,uri.length);getLocalPathway(pathwayName)}};var collaborativeUsageCallback=function(postSuccess){var realTimeManager=new RealTimeModule(postSuccess);var realTimeAuthCallback=function(response){if(response.error){function popUpAuthHandler(response){if(response.error)console.log(response.error);var appInstance=new AppManager(true,realTimeManager);realTimeManager.initRealTimeAPI()}realTimeManager.authorize(popUpAuthHandler,true)}else{var appInstance=new AppManager(true,realTimeManager);realTimeManager.initRealTimeAPI()}};realTimeManager.authorize(realTimeAuthCallback,false)};var welPage=new WelcomePageView({el:$(".welcomePageContainer"),localUsageCallback:localUsageCallback,collaborativeUsageCallback:collaborativeUsageCallback}).render();var uri=window.location.search;if(uri.length>0){var uriTerm=uri.substring(1,uri.indexOf("="));if(uriTerm==="id"){$(".landingContent h3").hide();$(".welPageButtons").hide();$("#collaborativeUsage").click();$(".continueButton").click().hide()}else if(uriTerm==="filename"){$(".landingContent h3").hide();$(".welPageButtons").hide();$("#localUsage").click();$(".continueButton").click().hide()}}})},{"./AppManager":172,"./BackboneViews/WelcomePageView.js":179,"./RealTimeManager":192,"./RealTimeUtils":193,"./SaveLoadUtility.js":195,backbone:1,bootstrap:4,jquery:139,underscore:140}],199:[function(require,module,exports){},{}],200:[function(require,module,exports){exports.endianness=function(){return"LE"};exports.hostname=function(){if(typeof location!=="undefined"){return location.hostname}else return""};exports.loadavg=function(){return[]};exports.uptime=function(){return 0};exports.freemem=function(){return Number.MAX_VALUE};exports.totalmem=function(){return Number.MAX_VALUE};exports.cpus=function(){return[]};exports.type=function(){return"Browser"};exports.release=function(){if(typeof navigator!=="undefined"){return navigator.appVersion}return""};exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}};exports.arch=function(){return"javascript"};exports.platform=function(){return"browser"};exports.tmpdir=exports.tmpDir=function(){return"/tmp"};exports.EOL="\n"},{}],201:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i1){for(var i=1;i0){return parts[0]}return""},parseDelimitedInfo:function(info,delimiter,separator,formatter){if(info==undefined||info==null){return info}var text="";var parts=info.split(delimiter);if(parts.length>0){if(formatter){text=formatter(parts[0])}else{text=parts[0]}}for(var i=1;iPlease Wait Loading Cancer Studies");this.$el.find("#cancerDropDown").append(this.cachedLoadingTemplate)},updateCancerStudies:function(cancerStudies){this.cancerStudies=cancerStudies;this.updateView()},updateView:function(){var self=this;this.$el.find("#cancerDropDown").empty();this.$el.find("#dataTypeSelection").empty();this.$el.find("#cancerDropDown").append("

    Select Cancer Study

    ");var cancerStudiesDropDown=$('');for(var cancerName in this.cancerStudies){cancerStudiesDropDown.append("")}$("#cancerDropDown").append(cancerStudiesDropDown);cancerStudiesDropDown.selectpicker({liveSearch:true,container:"body",liveSearchPlaceholder:"Search Cancer Study"});$("#cancerSelectBox").change(function(){self.$el.find("#dataTypeSelection").empty();self.$el.find("#dataTypeSelection").append(self.cachedLoadingTemplate);var key=$(this).find("option:selected").attr("key");self.currenCancerStudy=self.cancerStudies[key];var createDataTypeSelectionCallback=function(cancerData){self.$el.find("#dataTypeSelection").empty();var dataTypes={};for(var obj in cancerData){var dataType=self.portalAccessor.getDataType(obj);dataTypes[dataType]=cancerData[obj]}self.$el.find("#dataTypeSelection").append("

    Data Types

    ");for(var obj in dataTypes){var newCheckbox=$('
    '+""+"
    ");newCheckbox.find('input[type="checkbox"]').on("click",function(evt){var checkedNum=self.$el.find('input[type="checkbox"]:checked').length;if(checkedNum>=1)self.showSubmitButton();else if(checkedNum==0)self.hideSubmitButton()});self.$el.find("#dataTypeSelection").append(newCheckbox)}};self.portalAccessor.getSupportedGeneticProfiles(key,createDataTypeSelectionCallback)})},render:function(){this.hideSubmitButton();if(!this.cancerStudies){this.$el.modal("show");return}this.updateView();this.$el.modal("show")},hideSubmitButton:function(){$("#getProfileData").hide()},showSubmitButton:function(){$("#getProfileData").show()},fetchProfileData:function(){var checkedDataTypes=this.$el.find('input[type="checkbox"]:checked');var geneSymbols=window.editorActionsManager.getGeneSymbols();var self=this;for(var i=0;iThere is currently no data to show');this.$el.find("#save-genomic").hide()},saveHandler:function(event){var dataMap={};this.$el.find(".genomicDataContentDiv label").each(function(){var jqEl=$(this);var cancerType=jqEl.text();var isChecked=jqEl.find("input").is(":checked");dataMap[cancerType]=isChecked});this.editorActionsManagerRef.updateGenomicDataVisibility(dataMap);this.$el.modal("toggle")},notify:function(data){this.$el.find(".genomicDataContentDiv").empty();var cancerTypes=this.editorActionsManagerRef.genomicDataOverlayManager.visibleGenomicDataMapByType;if(cancerTypes&&Object.keys(cancerTypes).length===0){this.renderEmptyView()}else{this.$el.find(".genomicDataContentDiv").append('');var checkboxDiv=$('
    ');for(var cancerType in cancerTypes){var checkboxContent=$('");checkboxContent.find("input").attr("checked",cancerTypes[cancerType]);checkboxDiv.append(checkboxContent)}this.$el.find(".genomicDataContentDiv").append(checkboxDiv);this.$el.find("#save-genomic").show()}}});module.exports=genomicDataExplorer},{}],176:[function(require,module,exports){var gridOptionsView=Backbone.View.extend({currentProperties:null,events:{"click #applyGridOptions":"saveProperties"},initialize:function(options){this.defaultGridGuideOptions={snapToGrid:false,discreteDrag:false,guidelines:true,resize:false,gridSpacing:20,parentPadding:false,drawGrid:false,guidelinesStackOrder:4,guidelinesTolerance:2,guidelinesStyle:{lineWidth:2,strokeStyle:"#000000",lineDash:[7,15]}};this.copyProperties(this.defaultGridGuideOptions);cy.gridGuide(this.currentProperties)},copyProperties:function(params){this.currentProperties=_.clone(params)},render:function(){var templateProperties=_.clone(this.currentProperties);this.template=_.template($("#gridOptionsTemplate").html());var tplContent=this.template(templateProperties);this.$el.empty();this.$el.append(tplContent);this.delegateEvents()},saveProperties:function(event){this.currentProperties.gridSpacing=Number(this.$el.find("#gridSize").val());this.currentProperties.drawGrid=this.$el.find("#showGrid").is(":checked");this.currentProperties.guidelines=this.$el.find("#showGuides").is(":checked");this.currentProperties.snapToGrid=this.$el.find("#snapToGrid").is(":checked");this.currentProperties.guidelinesStyle.strokeStyle=this.$el.find('input[type="color"]').val();cy.gridGuide(this.currentProperties);this.$el.modal("toggle")},changeParameters:function(){this.$el.find("#gridSize").val(this.currentProperties.gridSize);this.$el.find("#showGrid")[0].checked=this.currentProperties.showGrid;this.$el.find("#showGuides")[0].checked=this.currentProperties.showGuides;this.$el.find('input[type="color"]').val(this.currentProperties.guidelinesStyle.strokeStyle)},defaultLayoutHandler:function(event){},notify:function(){}});module.exports=gridOptionsView},{}],177:[function(require,module,exports){var layoutProps=Backbone.View.extend({currentLayoutProperties:null,events:{"click #save-layout":"saveLayoutHandler","click #default-layout":"defaultLayoutHandler"},initialize:function(options){this.editorActionsManagerRef=options.editorActionsManager;this.copyProperties(this.editorActionsManagerRef.layoutProperties);this.editorActionsManagerRef.registerObserver(this)},copyProperties:function(params){this.currentLayoutProperties=_.clone(params)},render:function(){var templateProperties=_.clone(this.currentLayoutProperties);this.template=_.template($("#layoutPropertiesTemplate").html());var tplContent=this.template(templateProperties);this.$el.empty();this.$el.append(tplContent);this.delegateEvents()},saveLayoutHandler:function(event){this.currentLayoutProperties.nodeRepulsion=Number(this.$el.find("#node-repulsion").val());this.currentLayoutProperties.nodeOverlap=Number(this.$el.find("#node-overlap").val());this.currentLayoutProperties.idealEdgeLength=Number(this.$el.find("#ideal-edge-length").val());this.currentLayoutProperties.edgeElasticity=Number(this.$el.find("#edge-elasticity").val());this.currentLayoutProperties.nestingFactor=Number(this.$el.find("#nesting-factor").val());this.currentLayoutProperties.gravity=Number(this.$el.find("#gravity").val());this.currentLayoutProperties.numIter=Number(this.$el.find("#num-iter").val());this.currentLayoutProperties.gravityRangeCompound=Number(this.$el.find("#comp-gravRange").val());this.currentLayoutProperties.gravityCompound=Number(this.$el.find("#comp-grav").val());this.currentLayoutProperties.gravityRange=Number(this.$el.find("#grav-range").val());this.currentLayoutProperties.tile=this.$el.find("#tile").is(":checked");this.currentLayoutProperties.animate=this.$el.find("#animate").is(":checked");this.currentLayoutProperties.randomize=!this.$el.find("#randomize").is(":checked");this.editorActionsManagerRef.saveLayoutProperties(this.currentLayoutProperties);this.$el.modal("toggle")},changeParameters:function(){this.$el.find("#node-repulsion").val(this.currentLayoutProperties.nodeRepulsion);this.$el.find("#node-overlap").val(this.currentLayoutProperties.nodeOverlap);this.$el.find("#ideal-edge-length").val(this.currentLayoutProperties.idealEdgeLength);this.$el.find("#edge-elasticity").val(this.currentLayoutProperties.edgeElasticity);this.$el.find("#nesting-factor").val(this.currentLayoutProperties.nestingFactor);this.$el.find("#gravity").val(this.currentLayoutProperties.gravity);this.$el.find("#comp-gravRange").val(this.currentLayoutProperties.gravityRangeCompound);this.$el.find("#comp-grav").val(this.currentLayoutProperties.gravityCompound);this.$el.find("#grav-range").val(this.currentLayoutProperties.gravityRange);this.$el.find("#num-iter").val(this.currentLayoutProperties.numIter);this.$el.find("#tile")[0].checked=this.currentLayoutProperties.tile;this.$el.find("#animate")[0].checked=this.currentLayoutProperties.animate;this.$el.find("#randomize")[0].checked=!this.currentLayoutProperties.randomize},defaultLayoutHandler:function(event){this.copyProperties(this.editorActionsManagerRef.defaultLayoutProperties);this.changeParameters()},notify:function(){this.copyProperties(this.editorActionsManagerRef.layoutProperties);this.changeParameters()}});module.exports=layoutProps},{}],178:[function(require,module,exports){var pathwayDetails=Backbone.View.extend({currentLayoutProperties:null,events:{"click #savePathwayDetails":"saveHandler"},initialize:function(options){this.properties={pathwayName:"pathway.txt",pathwayTitle:"New Pathway",pathwayDescription:""}},saveHandler:function(event){this.properties.pathwayName=this.$el.find("#pName").val();this.properties.pathwayTitle=this.$el.find("#pTitle").val();this.properties.pathwayDescription=this.$el.find("#pDesc").val();this.$el.modal("toggle")},updatePathwayProperties:function(data){this.properties.pathwayName=data.fileName;this.properties.pathwayTitle=data.pathwayTitle;this.properties.pathwayDescription=data.pathwayDescription},copyProperties:function(params){this.currentLayoutProperties=_.clone(params)},render:function(){this.template=_.template($("#pathwayDetailsTemplate").html());var tplContent=this.template(this.properties);this.$el.empty();this.$el.append(tplContent);this.delegateEvents();this.$el.find("input").on("keypress",function(e){if(e.keyCode==13){e.preventDefault()}});return this}});module.exports=pathwayDetails},{}],179:[function(require,module,exports){var WelcomePageView=Backbone.View.extend({cachedTpl:_.template($("#welcomePageTemplate").html()),events:{"click #localUsage":"localUsageHandler","click #collaborativeUsage":"collaborativeUsageHandler","click .continueButton":"continueButtonHandler"},initialize:function(options){this.localUsageCallback=options.localUsageCallback;this.collaborativeUsageCallback=options.collaborativeUsageCallback;this.modelSelectionMap={NONE:-1,LOCAL:0,COLLAB:1};this.modelSelection=this.modelSelectionMap.NONE},render:function(){this.$el.empty();this.$el.append(this.cachedTpl());this.$el.find("#localUsage").popover({container:"body",content:"Create a pathway individually",placement:"left",delay:100,trigger:"manual"});this.$el.find("#collaborativeUsage").popover({container:"body",html:true,content:function(){return $("#collaborativePopoverContent").html()},placement:"right",delay:200,trigger:"manual"})},localUsageHandler:function(event){if(this.modelSelection==this.modelSelectionMap.LOCAL)return;$(".popover").popover("hide");this.$el.find(".welcomePageCheckable").removeClass("active");$(event.currentTarget).addClass("active");this.$el.find("#localUsage").popover("show");this.$el.find(".continueRow").css("visibility","visible");this.modelSelection=this.modelSelectionMap.LOCAL},collaborativeUsageHandler:function(event){if(this.modelSelection==this.modelSelectionMap.COLLAB)return;$(".popover").popover("hide");this.$el.find(".welcomePageCheckable").removeClass("active");$(event.currentTarget).addClass("active");this.$el.find("#collaborativeUsage").popover("show");this.$el.find(".continueRow").css("visibility","visible");this.modelSelection=this.modelSelectionMap.COLLAB},continueButtonHandler:function(event){$(".popover").hide();var self=this;this.$el.find(".welcomePageLoading").show();function postHandler(){self.postSuccess()}if(this.modelSelection!=this.modelSelectionMap.NONE){if(this.modelSelection==this.modelSelectionMap.LOCAL){this.localUsageCallback(postHandler)}else if(this.modelSelection==this.modelSelectionMap.COLLAB){this.collaborativeUsageCallback(postHandler)}}},postSuccess:function(){this.$el.empty();this.$el.fadeOut(800)}});module.exports=WelcomePageView},{}],180:[function(require,module,exports){module.exports=function(){"use strict";var CxtMenu=function(cy,editorActionsManager){this.cy=cy;this.editorActionsManager=editorActionsManager;this.init()};CxtMenu.prototype.init=function(){var classRef=this;var options={menuItems:[{id:"remove",title:"Delete",selector:"node, edge",onClickFunction:function(event){var ele=event.cyTarget;var selectedElements=cy.nodes(":selected").union(ele);classRef.editorActionsManager.removeElement(selectedElements)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"addSelected",title:"Add selected into this",selector:"node",onClickFunction:function(event){var ele=event.cyTarget;var selectedNodes=cy.nodes(":selected");var containerType=ele.data("type");var validNodes=cy.collection();if(ele._private.data["type"]==="GENE"||selectedNodes.size()<1){return}else{var notValid=false;selectedNodes.forEach(function(tmpNode,i){if(ele.id()==tmpNode.id()){notValid=true;return false}if(tmpNode.isParent()){notValid=isChildren(tmpNode,ele);if(notValid){return false}}});if(notValid){return}}selectedNodes.forEach(function(tmpNode,i){if(containerType=="FAMILY"||containerType=="COMPLEX"){if(tmpNode.data("type")!="COMPARTMENT"&&tmpNode.data("type")!="PROCESS"){validNodes=validNodes.add(tmpNode)}}else{validNodes=validNodes.add(tmpNode)}});var compId=ele.id();classRef.editorActionsManager.changeParents(validNodes,compId)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"removeSelected",title:"Remove selected from parent",selector:"node",onClickFunction:function(event){var ele=event.cyTarget;var selectedNodes=cy.nodes(":selected").union(ele);var notValid=false;selectedNodes.forEach(function(tmpNode,i){if(tmpNode.isParent()){notValid=isChildren(tmpNode,ele);if(notValid){return false}}});if(notValid){return}classRef.editorActionsManager.changeParents(selectedNodes,null)},disabled:false,hasTrailingDivider:true,coreAsWell:false},{id:"performLayout",title:"Perform Layout",coreAsWell:true,onClickFunction:function(event){classRef.editorActionsManager.performLayout()},disabled:false,hasTrailingDivider:true}],menuItemClasses:[],contextMenuClasses:[]};this.cy.contextMenus(options)};window.edgeAddingMode=false;function isChildren(node,queryNode){var parent=queryNode.parent()[0];while(parent){if(parent.id()==node.id()){return true}parent=parent.parent()[0]}return false}return CxtMenu}()},{}],181:[function(require,module,exports){module.exports=function($,$$){"use strict";var NodeAdd=function(editorActionsManager){this.editorActionsManager=editorActionsManager;this.initNodeAdd()};NodeAdd.prototype.initNodeAdd=function(){var nodeAddClass=this;var defaults={height:30,width:30,padding:5,backgroundColorDiv:"#fbfbfb",borderColorDiv:"#fff",borderWidthDiv:"0px",borderRadiusDiv:"5px",icon:"",nodeParams:function(){return{}}};$.fn.cytoscapeNodeadd=function(params){var options=$.extend(true,{},defaults,params);var fn=params;var functions={destroy:function(){var $this=$(this);$this.find(".ui-cytoscape-nodeadd").remove()},init:function(){return $(this).each(function(){var components=options.components;for(var index in components){var component=components[index];var dragContainer=component.container;var explanationText=component.explanationText;var $nodeadd=$('
    ');dragContainer.append($nodeadd);var $nodeDragHandle=$('
    ');$nodeadd.append($nodeDragHandle);$nodeDragHandle.bind("mousedown",function(e){e.stopPropagation();e.preventDefault()});dragContainer.find(".ui-cytoscape-nodeadd-nodediv").css({background:options.backgroundColorDiv,border:options.borderWidthDiv+" solid "+options.borderColorDiv,"border-radius":options.borderRadiusDiv});dragContainer.find("#ui-cytoscape-nodeadd-icon").draggable({helper:"clone",cursor:"pointer"})}var $container=$(this);$container.droppable({activeClass:"ui-state-highlight",drop:function(event,ui){$container.removeClass("ui-state-highlight");var currentOffset=$container.offset();var relX=event.pageX-currentOffset.left;var relY=event.pageY-currentOffset.top;var nodeType=$(ui.helper).attr("nodeType").toUpperCase();var cy=$container.cytoscape("get");var nodeMap={};var parentMap={};cy.nodes().forEach(function(node,i){var nodeBbox=node.renderedBoundingBox();if(relX<=nodeBbox.x2&&relX>=nodeBbox.x1&&(relY<=nodeBbox.y2&&relY>=nodeBbox.y1)&&node.data().type!="GENE"){if(node.children().length>0){parentMap[node.id()]=true}if(parentMap[node._private.data.parent]){delete nodeMap[node._private.data.parent]}nodeMap[node.id()]=node}});var parent=nodeMap[Object.keys(nodeMap)[0]];var nodeData={type:nodeType,name:"New "+$(ui.helper).attr("nodeType")};if(parent){if(parent.data().type=="FAMILY"||parent.data().type=="COMPLEX"){if(nodeType!="COMPARTMENT"&&nodeType!="PROCESS"){nodeData.parent=parent.id()}}else{nodeData.parent=parent.id()}}relX=relX/cy.zoom()+cy.extent().x1;relY=relY/cy.zoom()+cy.extent().y1;nodeAddClass.editorActionsManager.addNode(nodeData,{x:relX,y:relY})}})})}};if(functions[fn]){return functions[fn].apply(this,Array.prototype.slice.call(arguments,1))}else if(typeof fn=="object"||!fn){return functions.init.apply(this,arguments)}else{$.error("No such function `"+fn+"` for jquery.cytoscapenodeadd")}return $(this)};$.fn.cynodeadd=$.fn.cytoscapeNodeadd;$$("core","nodeadd",function(options){var cy=this;$(cy.container()).cytoscapeNodeadd(options)})};return NodeAdd}(window.$,window.cytoscape)},{}],182:[function(require,module,exports){var edgeHandleDefaults={preview:true,stackOrder:4,handleSize:10,handleColor:"#1abc9c",handleLineType:"ghost",handleLineWidth:1,handleNodes:"node",hoverDelay:1,cxt:false,enabled:false,toggleOffOnLeave:true,edgeType:function(sourceNode,targetNode){return"flat"},loopAllowed:function(node){return false},nodeLoopOffset:-50,nodeParams:function(sourceNode,targetNode){return{}},edgeParams:function(sourceNode,targetNode,i){return{}},start:function(sourceNode){var type=this.getGlobalEdgeType();cy.edgehandles("option","ghostEdgeType",type)},complete:function(sourceNode,targetNodes,addedEntities){cy.remove(addedEntities);window.editorActionsManager.addEdge({source:sourceNode.id(),target:targetNodes[0].id(),type:this.getGlobalEdgeType()})},stop:function(sourceNode){$(".edge-palette a").blur().removeClass("active");window.edgeAddingMode==-1;cy.edgehandles("disable")},getGlobalEdgeType:function(){var type="NONE";if(window.edgeAddingMode==1){type="ACTIVATES"}else if(window.edgeAddingMode==2){type="INHIBITS"}else if(window.edgeAddingMode==3){type="INDUCES"}else if(window.edgeAddingMode==4){type="REPRESSES"}else if(window.edgeAddingMode==5){type="BINDS"}return type}};module.exports=edgeHandleDefaults},{}],183:[function(require,module,exports){var GenomicDataOverlayManager=require("./GenomicDataOverlayManager.js");var SVGExporter=require("./SVGExporter.js");module.exports=function(){"use strict";var EditorActionsManager=function(isCollaborative,realtimeManager,cyInst){this.cy=cyInst;this.isCollaborative=isCollaborative;if(this.isCollaborative&&realtimeManager)this.realTimeManager=realtimeManager;this.defaultLayoutProperties={name:"cose-bilkent",nodeRepulsion:4500,nodeOverlap:10,idealEdgeLength:50,edgeElasticity:.45,nestingFactor:.1,gravity:.15,numIter:2500,tile:true,animate:"end",randomize:false,gravityRangeCompound:1.5,gravityCompound:1,gravityRange:1.5};this.FIT_CONSTANT=50;this.layoutProperties=_.clone(this.defaultLayoutProperties);this.observers=[];this.genomicDataOverlayManager=new GenomicDataOverlayManager;this.svgExporter=new SVGExporter;this.selecteNodeStack={};window.undoRedoManager=cy.undoRedo();window.undoRedoManager.action("changePositions",this.doChangePosition,this.undoChangePosition);window.undoRedoManager.action("changeName",this.doChangename,this.undoChangeName)};EditorActionsManager.prototype.doChangename=function(args){var currentName=args.node.data("name");var newArgs={node:args.node,newName:args.newName,oldName:currentName};args.node.data("name",args.newName);args.node.css("content",args.newName);return newArgs};EditorActionsManager.prototype.undoChangeName=function(args){var currentName=args.node.data("name");var newArgs={node:args.node,newName:args.oldName,oldName:currentName};args.node.data("name",args.oldName);args.node.css("content",args.oldName);return newArgs};EditorActionsManager.prototype.doChangePosition=function(movedNodes){var newMovedNodes=[];for(var i=0;i0){children.forEach(function(childNode,i){lockedNodes[childNode.id()]=true});removedEles=removedEles.union(removeNodes(children))}removedEles=removedEles.union(nodes.remove());self.cy.nodes().updateCompoundBounds();return removedEles}var removedEles=removeNodes(eles);window.undoRedoManager.do("remove",removedEles);for(var i=0;i0){ele.data.source=cySourceNode.id()}if(cyTargetNode.length>0){ele.data.target=cyTargetNode.id()}if(cyTargetNode.length<0&&cySourceNode.length<0){continue}var edgesBtw=cy.filter('edge[source = "'+cySourceNode.id()+'"][target = "'+cyTargetNode.id()+'"]');var isFound=false;edgesBtw.forEach(function(edge,i){if(edge.data().type==ele.data.type){isFound=true;return false}});if(!isFound){delete ele.data.id;edgesToBeAdded.push(ele)}}cy.add(edgesToBeAdded)};EditorActionsManager.prototype.fitGraph=function(){if(this.isCollaborative){cy.fit(this.FIT_CONSTANT);var newState={zoomLevel:cy.zoom(),panLevel:cy.pan()};this.updateGlobalOptions(newState)}else{cy.fit(this.FIT_CONSTANT)}};EditorActionsManager.prototype.loadFile=function(nodes,edges){if(this.isCollaborative){this.loadfileRealTime(nodes,edges)}else{this.loadFileCy(nodes,edges)}this.fitGraph()};EditorActionsManager.prototype.loadFileCy=function(nodes,edges){this.removeElementCy(cy.elements());this.addNodesCy(nodes);this.addEdgesCy(edges)};EditorActionsManager.prototype.loadfileRealTime=function(nodes,edges){this.realTimeManager.loadGraph(nodes,edges)};EditorActionsManager.prototype.removeAllElements=function(){if(this.isCollaborative){this.realTimeManager.removeAllElements()}else{cy.remove(cy.elements())}};EditorActionsManager.prototype.changeName=function(ele,newName){if(this.isCollaborative){this.realTimeManager.changeName(ele,newName)}else{this.changeNameCy(ele,newName)}};EditorActionsManager.prototype.changeNameCy=function(ele,newName){var currentName=ele.data("name");var args={node:ele,oldName:currentName,newName:newName};window.undoRedoManager.do("changeName",args)};EditorActionsManager.prototype.updateElementCallback=function(ele,id){var nodeID=id;var cyEle=this.cy.$("#"+nodeID);cyEle.position({x:ele.x,y:ele.y});this.changeNameCy(cyEle,ele.name)};EditorActionsManager.prototype.getGenomicDataSVG=function(node){return this.genomicDataOverlayManager.generateSVGForNode(node)};EditorActionsManager.prototype.removeGenomicData=function(){if(this.isCollaborative){this.realTimeManager.clearGenomicData();this.realTimeManager.clearGenomicVisData()}else{this.genomicDataOverlayManager.removeGenomicData();this.genomicDataOverlayManager.removeGenomicVisData();this.genomicDataOverlayManager.hideGenomicData();this.genomicDataOverlayManager.notifyObservers()}};EditorActionsManager.prototype.addGenomicData=function(genomicData){if(this.isCollaborative){this.removeGenomicData();var parsedGenomicData=this.genomicDataOverlayManager.prepareGenomicDataRealTime(genomicData);var genomicDataMap=parsedGenomicData.genomicDataMap;var visibilityMap=parsedGenomicData.visibilityMap;this.realTimeManager.addGenomicData("genomicData",genomicDataMap);this.realTimeManager.addGenomicVisibilityData("visMap",visibilityMap)}else{this.genomicDataOverlayManager.addGenomicDataLocally(genomicData)}};EditorActionsManager.prototype.addPortalGenomicData=function(genomicData){if(this.isCollaborative){this.genomicDataOverlayManager.addPortalGenomicData(genomicData);this.realTimeManager.addGenomicData("genomicData",this.genomicDataOverlayManager.genomicDataMap);this.realTimeManager.addGenomicVisibilityData("visMap",this.genomicDataOverlayManager.visibleGenomicDataMapByType)}else{this.genomicDataOverlayManager.addPortalGenomicData(genomicData)}};EditorActionsManager.prototype.realTimeGenomicDataHandler=function(event){var newData=event.newValue;var geneSymbol=event.property;if(newData){this.genomicDataOverlayManager.addGenomicData(newData)}else{this.genomicDataOverlayManager.removeGenomicData(geneSymbol)}};EditorActionsManager.prototype.realTimeGenomicDataVsibilityHandler=function(event){var data=event.newValue;if(data){this.genomicDataOverlayManager.addGenomicVisData(data)}else{this.genomicDataOverlayManager.removeGenomicVisData(data)}this.genomicDataOverlayManager.showGenomicData();this.genomicDataOverlayManager.notifyObservers()};return EditorActionsManager}()},{"./GenomicDataOverlayManager.js":185,"./SVGExporter.js":195}],184:[function(require,module,exports){var SaveLoadUtilities=require("./SaveLoadUtility.js");module.exports=function($){"use strict";function b64toBlob(b64Data,contentType,sliceSize){contentType=contentType||"";sliceSize=sliceSize||512;var byteCharacters=atob(b64Data);var byteArrays=[];for(var offset=0;offset0?"<0.5":Math.round(percent);var text=textPercent+"%";var fontSize=14;var textLength=text.length;var xOffset=w/2-textLength*4;var yOffset=fontSize/3;var svgText=document.createElementNS(svgNameSpace,"text");svgText.setAttribute("x",x+xOffset);svgText.setAttribute("y",y+h/2+yOffset);svgText.setAttribute("font-family","Arial");svgText.setAttribute("font-size",fontSize);svgText.innerHTML=text;parentSVG.appendChild(overlayRect);parentSVG.appendChild(svgText)}return svg};function getRequiredWidthForGenomicData(genomicDataBoxCount){var term=genomicDataBoxCount>3?genomicDataBoxCount-3:0;return 150+term*35}GenomicDataOverlayManager.prototype.showGenomicData=function(){var self=this;var genomicDataBoxCount=this.countVisibleGenomicDataByType();if(genomicDataBoxCount<1){this.hideGenomicData();return}cy.style().selector('node[type="GENE"]').style("width",function(ele){return getRequiredWidthForGenomicData(genomicDataBoxCount)}).style("text-margin-y",function(ele){var nodeLabel=ele.data("name");if(!(nodeLabel in self.genomicDataMap))return 0;return-15}).style("background-image",function(ele){var dataURI="data:image/svg+xml,";return dataURI+self.generateSVGForNode(ele).outerHTML}).update()};GenomicDataOverlayManager.prototype.parseGenomicData=function(genomicData){this.genomicDataMap={};this.cancerTypes=[];this.visibleGenomicDataMapByType={};var lines=genomicData.split("\n");var metaLineColumns=lines[0].split(" ");for(var i=1;i0){mappedArr[mappedElem.parent().id()].childNodes.push(mappedElem)}else{tree.push(mappedElem)}}return tree};GraphUtilities.prototype.createGraphHierarchyRealTime=function(nodes){var tree=[];var mappedArr={};for(var i=0,len=nodes.length;i');textInput.change(function(){var nodeID=$(this).find("input").attr("nodeid");var cyNode=self.cy.$("#"+nodeID)[0];var newName=$(this).find("input").val();window.editorActionsManager.changeName(cyNode,newName)});var wrapper=$("
    ");var row=$('
    Name:
    ');row.append(textInput);wrapper.append(row);if(ele.data().type==="GENE"){var entrezGeneButton=$('
    ');entrezGeneButton.find("button").on("click",function(event){event.preventDefault();var nodeID=$(this).attr("nodeid");var nodeSymbol=self.cy.$("#"+nodeID)[0]._private.data["name"];var parent=$(this).parent();parent.empty().append('');var formData=new FormData;formData.append("query",nodeSymbol);var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE){if(request.status===200){var jsonData=JSON.parse(request.responseText);if(jsonData.count>0){var backboneView=new BackboneView({model:jsonData.geneInfo[0]}).render().html();parent.empty().append(backboneView)}else{parent.empty().append("There is no extra information for this gene")}}else{parent.empty().append("An error occured while retrieving the data")}}};request.open("POST","/getBioGeneData");request.send(formData)});wrapper.append(entrezGeneButton)}return wrapper};QtipManager.prototype.addQtipToElements=function(eles){var self=this;eles.forEach(function(node,i){var qTipOpts={content:{text:function(){return self.generateQtipContentHTML(this)},title:function(){return capitalizeFirstLetter(node.data().type.toLowerCase())+" Details"}},position:{my:"top center",at:"bottom center"},style:{classes:"qtip-tipsy qtip-rounded",width:400}};node.qtip(qTipOpts)})};function capitalizeFirstLetter(string){return string.charAt(0).toUpperCase()+string.slice(1)}return QtipManager}(window.$)},{"./BackboneViews/BioGeneView.js":173}],193:[function(require,module,exports){module.exports=function(){"use strict";var RealTimeManager=function(postFileLoadCallback){this.clientId="122039910543-b7u74aijsqne9iv5rk2tgm3529ped4d0.apps.googleusercontent.com";this.NODEMAP_NAME="nodes";this.EDGEMAP_NAME="edges";this.LAYOUT_PROPS_NAME="layoutProperties";this.GLOBAL_OPTS_NAME="globalOptions";this.GENOMIC_DATA_MAP_NAME="genomicDataMap";this.VISIBLE_GENOMIC_DATA_MAP_NAME="visibleGenomicDataMapByType";this.realtimeUtils=new utils.RealtimeUtils({clientId:this.clientId});this.postFileLoad=postFileLoadCallback};RealTimeManager.prototype.authorize=function(callbackFunction,isModal){this.realtimeUtils.authorize(function(response){callbackFunction(response)},isModal)};RealTimeManager.prototype.initRealTimeAPI=function(){var id=this.realtimeUtils.getParam("id");this.registerTypes();var self=this;var initFileCallback=function(model){self.onFileInitialize(model)};var loadFileCallback=function(model){self.onFileLoaded(model)};if(id){this.realtimeUtils.load(id.replace("/",""),loadFileCallback,initFileCallback)}else{this.realtimeUtils.createAppFile("New Graph",function(createResponse){var result=createResponse.result;window.history.pushState(null,null,"?id="+result.id);self.realtimeUtils.load(result.id,loadFileCallback,initFileCallback)})}};RealTimeManager.prototype.onFileInitialize=function(model){var root=model.getRoot();var nodeMap=model.createMap();var edgeMap=model.createMap();var layoutProperties=model.create(LayoutPropertiesR,window.editorActionsManager.layoutProperties); + +var globalOptions=model.create(GlobalOptionsR,window.editorActionsManager.getGlobalOptions());var genomicDataMap=model.createMap();var genomicDataVisibilityMap=model.createMap();root.set(this.NODEMAP_NAME,nodeMap);root.set(this.EDGEMAP_NAME,edgeMap);root.set(this.LAYOUT_PROPS_NAME,layoutProperties);root.set(this.GLOBAL_OPTS_NAME,globalOptions);root.set(this.GENOMIC_DATA_MAP_NAME,genomicDataMap);root.set(this.VISIBLE_GENOMIC_DATA_MAP_NAME,genomicDataVisibilityMap)};RealTimeManager.prototype.onFileLoaded=function(doc){var model=doc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var realTimeLayoutProperties=root.get(this.LAYOUT_PROPS_NAME);var globalOptions=root.get(this.GLOBAL_OPTS_NAME);var genomicDataMap=root.get(this.GENOMIC_DATA_MAP_NAME);var visDataMap=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);var nodeMapEntries=nodeMap.values();var edgeMapEntries=edgeMap.values();window.editorActionsManager.addNewElementsLocally(nodeMapEntries,edgeMapEntries);window.editorActionsManager.updateLayoutPropertiesCallback(realTimeLayoutProperties);window.editorActionsManager.changeGlobalOptions(globalOptions);window.editorActionsManager.genomicDataOverlayManager.genomicDataMap=genomicDataMap.get("genomicData");window.editorActionsManager.genomicDataOverlayManager.visibleGenomicDataMapByType=visDataMap.get("visMap");window.editorActionsManager.genomicDataOverlayManager.showGenomicData();window.editorActionsManager.genomicDataOverlayManager.notifyObservers();cy.fit(50);this.realTimeDoc=doc;var nodeAddRemoveHandler=function(event){window.editorActionsManager.realTimeNodeAddRemoveEventCallBack(event)};var edgeAddRemoveHandler=function(event){window.editorActionsManager.realTimeEdgeAddRemoveEventCallBack(event)};var genomicDataAddRemoveHandler=function(event){window.editorActionsManager.realTimeGenomicDataHandler(event)};var genomicDataVisibilityChangeHandler=function(event){window.editorActionsManager.realTimeGenomicDataVsibilityHandler(event)};root.get(this.NODEMAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,nodeAddRemoveHandler);root.get(this.EDGEMAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,edgeAddRemoveHandler);root.get(this.GENOMIC_DATA_MAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,genomicDataAddRemoveHandler);root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME).addEventListener(gapi.drive.realtime.EventType.VALUE_CHANGED,genomicDataVisibilityChangeHandler);this.postFileLoad()};RealTimeManager.prototype.clearGenomicData=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var genomicMap=root.get(this.GENOMIC_DATA_MAP_NAME);var genomicMapKeys=genomicMap.keys();model.beginCompoundOperation();for(var i in genomicMapKeys){genomicMap.delete(genomicMapKeys[i])}model.endCompoundOperation()};RealTimeManager.prototype.clearGenomicVisData=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var map=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);var mapKeys=map.keys();model.beginCompoundOperation();for(var i in mapKeys){map.delete(mapKeys[i])}model.endCompoundOperation()};RealTimeManager.prototype.addGenomicData=function(_key,geneData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var genomicMap=root.get(this.GENOMIC_DATA_MAP_NAME);genomicMap.set(_key,geneData)};RealTimeManager.prototype.addGenomicVisibilityData=function(cancerType,isVisible){var model=this.realTimeDoc.getModel();var root=model.getRoot();var map=root.get(this.VISIBLE_GENOMIC_DATA_MAP_NAME);map.set(cancerType,isVisible)};RealTimeManager.prototype.addNewNode=function(nodeData,posData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var newNode=model.create(NodeR,{name:nodeData.name,type:nodeData.type,parent:nodeData.parent});if(posData){newNode.x=posData.x;newNode.y=posData.y}var realTimeGeneratedID=this.getCustomObjId(newNode);nodeMap.set(realTimeGeneratedID,newNode)};RealTimeManager.prototype.addNewEdge=function(edgeData){var model=this.realTimeDoc.getModel();var root=model.getRoot();var edgeMap=root.get(this.EDGEMAP_NAME);var newEdge=model.create(EdgeR,{type:edgeData.type,source:edgeData.source,target:edgeData.target});var realTimeGeneratedID=this.getCustomObjId(newEdge);edgeMap.set(realTimeGeneratedID,newEdge)};RealTimeManager.prototype.removeElement=function(elementID){var model=this.realTimeDoc.getModel();var root=model.getRoot();var edgeMap=root.get(this.EDGEMAP_NAME);var nodeMap=root.get(this.NODEMAP_NAME);if(nodeMap.has(elementID)){nodeMap.delete(elementID)}else if(edgeMap.has(elementID)){edgeMap.delete(elementID)}else{throw new Error("Element does not exists in Real Time")}};RealTimeManager.prototype.moveElement=function(ele){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var elementID=ele.id();var newPos=ele.position();if(nodeMap.has(elementID)){var tmpNode=nodeMap.get(elementID);model.beginCompoundOperation();tmpNode.x=newPos.x;tmpNode.y=newPos.y;model.endCompoundOperation()}else{throw new Error("Element does not exists in nodes !!! ")}};RealTimeManager.prototype.changeName=function(ele,newName){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var elementID=ele.id();if(nodeMap.has(elementID)){var tmpNode=nodeMap.get(elementID);model.beginCompoundOperation();tmpNode.name=newName;model.endCompoundOperation()}else{throw new Error("Element does not exists in nodes !!! ")}};RealTimeManager.prototype.changeParent=function(rootNode,newParentId,connectedEdges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var nodeLookupTable={};var self=this;function traverseFromRoot(rootNode,parId){var refNode=rootNode.nodeRef;var children=rootNode.children;var newParentId=parId;if(refNode){var refNodeId=refNode.id();var nodeData=refNode.data();var posData=refNode.position();var newNodeData={name:nodeData.name,type:nodeData.type,x:posData.x,y:posData.y};if(parId){newNodeData.parent=parId}self.removeElement(refNodeId);var newNode=model.create(NodeR,newNodeData);var newNodeId=self.getCustomObjId(newNode);nodeMap.set(newNodeId,newNode);newParentId=newNodeId;nodeLookupTable[refNodeId]=newNodeId}for(var i in children){var childNode=children[i];traverseFromRoot(childNode,newParentId)}}traverseFromRoot(rootNode,newParentId);connectedEdges.forEach(function(edge,index){var edgeData=edge.data();self.removeElement(edge.id());var newSource=nodeLookupTable[edgeData.source];var newTarget=nodeLookupTable[edgeData.target];if(newSource){edgeData.source=newSource}if(newTarget){edgeData.target=newTarget}self.addNewEdge(edgeData)})};RealTimeManager.prototype.removeAllElements=function(){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var nodeMapKeys=nodeMap.keys();var edgeMapKeys=edgeMap.keys();for(var index in nodeMapKeys){this.removeElement(nodeMapKeys[index])}for(var index in edgeMapKeys){this.removeElement(edgeMapKeys[index])}};RealTimeManager.prototype.loadGraph=function(nodes,edges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);this.removeAllElements();var that=this;var oldIdNewIdMap={};function traverseTree(node,newParentId){node.data.x=node.position.x;node.data.y=node.position.y;if(newParentId){var parent=node.data.parent;if(parent){node.data.parent=newParentId}}var newNode=model.create(NodeR,node.data);var newNodeId=that.getCustomObjId(newNode);oldIdNewIdMap[node.data.id]=newNodeId;nodeMap.set(newNodeId,newNode);if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,newNodeId)}}}var tree=window.GraphUtilities.createGraphHierarchyRealTime(nodes);for(var i in tree){var rootLevelNode=tree[i];traverseTree(rootLevelNode)}for(var i in edges){var edge=edges[i];edge.data.source=oldIdNewIdMap[edge.data.source];edge.data.target=oldIdNewIdMap[edge.data.target];var newEdge=model.create(EdgeR,edge.data);var newEdgeID=this.getCustomObjId(newEdge);edgeMap.set(newEdgeID,newEdge)}};RealTimeManager.prototype.mergeGraph=function(nodes,edges){var model=this.realTimeDoc.getModel();var root=model.getRoot();var nodeMap=root.get(this.NODEMAP_NAME);var edgeMap=root.get(this.EDGEMAP_NAME);var realTimeNodeMap=nodeMap.items();var realTimeNodeLookupTable={};var realTimeNodeNameLookupTable={};var oldIdNewIdMap={};var that=this;for(var i in realTimeNodeMap){var nodeMapItem=realTimeNodeMap[i];realTimeNodeLookupTable[nodeMapItem[0]]=nodeMapItem[1];realTimeNodeNameLookupTable[nodeMapItem[1].name]=nodeMapItem[1]}function traverseTree(node,newParentId){if(!(node.data.name in realTimeNodeNameLookupTable)){node.data.x=node.position.x;node.data.y=node.position.y;if(newParentId){var parent=node.data.parent;if(parent){node.data.parent=newParentId}}var newNode=model.create(NodeR,node.data);var newNodeId=that.getCustomObjId(newNode);oldIdNewIdMap[node.data.id]=newNodeId;nodeMap.set(newNodeId,newNode);if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,newNodeId)}}}else{var sameNameNode=realTimeNodeNameLookupTable[node.data.name];var sameNodeId=that.getCustomObjId(sameNameNode);oldIdNewIdMap[node.data.id]=sameNodeId;if(node.children.length>0){for(var i in node.children){var tmpNode=node.children[i];traverseTree(tmpNode,sameNodeId)}}}}var tree=window.GraphUtilities.createGraphHierarchyRealTime(nodes);for(var i in tree){var rootLevelNode=tree[i];traverseTree(rootLevelNode,rootLevelNode.data.id)}for(var i in edges){var edge=edges[i];edge.data.source=oldIdNewIdMap[edge.data.source];edge.data.target=oldIdNewIdMap[edge.data.target];var newEdge=model.create(EdgeR,edge.data);var newEdgeID=this.getCustomObjId(newEdge);edgeMap.set(newEdgeID,newEdge)}};RealTimeManager.prototype.updateLayoutProperties=function(newLayoutProperties){var model=this.realTimeDoc.getModel();var root=model.getRoot();var layoutPropertiesR=root.get(this.LAYOUT_PROPS_NAME);model.beginCompoundOperation();for(var property in newLayoutProperties){if(newLayoutProperties.hasOwnProperty(property)){layoutPropertiesR[property]=newLayoutProperties[property]}}model.endCompoundOperation()};RealTimeManager.prototype.updateGlobalOptions=function(newOptions){var model=this.realTimeDoc.getModel();var root=model.getRoot();var globalOptions=root.get(this.GLOBAL_OPTS_NAME);model.beginCompoundOperation();for(var property in globalOptions){if(newOptions.hasOwnProperty(property)){globalOptions[property]=newOptions[property]}}model.endCompoundOperation()};RealTimeManager.prototype.getCustomObjId=function(object){return gapi.drive.realtime.custom.getId(object)};RealTimeManager.prototype.registerTypes=function(){this.createRealTimeObjectDefinitions()};RealTimeManager.prototype.createGraphHierarchy=function(nodes){var tree=[];var mappedArr={};for(var i=0,len=nodes.length;i0){var id=files[0].id;successHandler(id)}else{var createProps={resource:{name:appFName,mimeType:"application/vnd.google-apps.folder"}};driveAPI.files.create(createProps).then(function(resp){var newFolderId=resp.result.id;successHandler(newFolderId)},function(err){console.log(err)})}},function(err){console.log(err)})}},shareRealTimeFile:function(fileId){window.gapi.client.drive.permissions.create({resource:{type:"anyone",role:"writer",allowFileDiscovery:false},fileId:fileId}).then(function(resp){console.log("File shared succesfully !")},function(reason){console.log("An Error happened: "+reason.result.error.message)})},load:function(documentId,onFileLoaded,initializeModel){var that=this;window.gapi.drive.realtime.load(documentId,function(doc){onFileLoaded(doc)},initializeModel,this.onError.bind(this))},onError:function(error){if(error.type==window.gapi.drive.realtime.ErrorType.TOKEN_REFRESH_REQUIRED){this.authorizer.authorize(function(){console.log("Error, auth refreshed")},false)}else if(error.type==window.gapi.drive.realtime.ErrorType.CLIENT_ERROR){alert("An Error happened: "+error.message);window.location.href="/"}else if(error.type==window.gapi.drive.realtime.ErrorType.NOT_FOUND){alert("The file was not found. It does not exist or you do not have "+"read access to the file.");window.location.href="/"}else if(error.type==window.gapi.drive.realtime.ErrorType.FORBIDDEN){alert("You do not have access to this file. Try having the owner share"+"it with you from Google Drive.");window.location.href="/"}}};utils.RealtimeAuthorizer=function(realtimeUtil){this.util=realtimeUtil;this.handleAuthResult=this.handleAuthResult.bind(this);this.token=null};utils.RealtimeAuthorizer.prototype={start:function(onAuthComplete,usePopup){var that=this;window.gapi.load("auth:client,drive-realtime,drive-share",{callback:function(){that.authorize(onAuthComplete,usePopup)}});if(this.authTimer){window.clearTimeout(this.authTimer)}this.refreshAuth()},authorize:function(onAuthComplete,usePopup){this.onAuthComplete=onAuthComplete;window.gapi.auth.authorize({client_id:this.util.clientId,scope:this.util.scopes,immediate:!usePopup},this.handleAuthResult)},handleAuthResult:function(authResult){if(authResult&&!authResult.error){this.token=authResult.access_token}this.onAuthComplete(authResult)},refreshAuth:function(){var that=this;this.authTimer=setTimeout(function(){that.authorize(function(){console.log("Refreshed Auth Token")},false);that.refreshAuth()},this.util.refreshInterval)}}}()},{}],195:[function(require,module,exports){var SaveLoadUtilities=require("./SaveLoadUtility.js");module.exports=function(){var SVGExporter=function(){this.SVGNameSpace="http://www.w3.org/2000/svg";this.svg=document.createElementNS(this.SVGNameSpace,"svg");this.NODE_FILL_COLOR="rgb(255,255,255)";this.FAMILY_FILL_COLOR="rgb(255,255,255)";this.FAMILY_STROKE_COLOR="rgb(204,204,204)";this.NODE_STROKE_COLOR="rgb(0,0,0)";this.COMPARTMENT_STROKE_WIDTH=2;this.NODE_STROKE_WIDTH=1;this.NODE_OPACITY=.5;this.ROUNDING_FACTOR=6;this.GENOMICDATA_LABEL_Y_OFFSET=-15;this.EDGE_WIDTH=1;this.T_WIDTH=2;this.T_HEIGHT=8;this.T_ARROW_HEAD_OFFSET=2;this.TRIANGLE_ARROW_HEAD_HEIGHT=8;this.TRIANGLE_ARROW_HEAD_WIDTH=8;this.DASH_PARAMETERS="5, 3";this.COMPOUND_MARGIN=8;this.NODE_FONT_SIZE=14};SVGExporter.prototype.resetSVG=function(){this.svg=document.createElementNS(this.SVGNameSpace,"svg")};SVGExporter.prototype.exportGraph=function(nodes,edges){this.resetSVG();var cyBounds=cy.extent();this.svg.setAttribute("viewBox",cyBounds.x1+" "+cyBounds.y1+" "+cyBounds.w+" "+cyBounds.h);var that=this;var nodeMap={};var nodeTree=window.GraphUtilities.createGraphHierarchy(nodes);var traverseFunction=function(node){nodeMap[node.id()]=node;var genomicDataSVG=window.editorActionsManager.getGenomicDataSVG(node).children;that.svg.appendChild(that.createRect(node));var labelOffset=genomicDataSVG&&genomicDataSVG.length>0?that.GENOMICDATA_LABEL_Y_OFFSET:0;that.svg.appendChild(that.createText(node,labelOffset));if(genomicDataSVG){while(genomicDataSVG.length>0){var elemSVG=genomicDataSVG[0];var nodePosition=node.position();var svgX=elemSVG.getAttribute("x");var svgY=elemSVG.getAttribute("y");elemSVG.setAttribute("x",nodePosition.x-node.width()/2+parseFloat(svgX));elemSVG.setAttribute("y",nodePosition.y-node.height()/2+parseFloat(svgY));that.svg.appendChild(elemSVG)}}if(node.childNodes){for(var i in node.childNodes){traverseFunction(node.childNodes[i])}}};for(var i in nodeTree){var rootLevelNode=nodeTree[i];traverseFunction(rootLevelNode)}edges.forEach(function(edge){var source=nodeMap[edge.source().id()];var target=nodeMap[edge.target().id()];that.drawEdge(edge,source,target)});return this.svg.outerHTML};SVGExporter.prototype.drawEdge=function(edge,source,target){var edgeType=edge.data().type;var sourceRectangle={x:source.position().x,y:source.position().y,width:source.width(),height:source.height()};var targetRectangle={x:target.position().x,y:target.position().y,width:target.width(),height:target.height()};if(source.isParent()){sourceRectangle.width+=this.COMPOUND_MARGIN;sourceRectangle.height+=this.COMPOUND_MARGIN}if(target.isParent()){targetRectangle.width+=this.COMPOUND_MARGIN;targetRectangle.height+=this.COMPOUND_MARGIN}var clipPoints=this.findClippingPoints(sourceRectangle,targetRectangle);var unitV=unitVector({x:clipPoints.targetClipPoints.x-clipPoints.sourceClipPoints.x,y:clipPoints.targetClipPoints.y-clipPoints.sourceClipPoints.y});var inverseUnitV=scale(unitV,-1);var targetX=clipPoints.targetClipPoints.x;var targetY=clipPoints.targetClipPoints.y;if(edgeType=="ACTIVATES"||edgeType=="INDUCES"){targetX=clipPoints.targetClipPoints.x+this.TRIANGLE_ARROW_HEAD_HEIGHT*inverseUnitV.x;targetY=clipPoints.targetClipPoints.y+this.TRIANGLE_ARROW_HEAD_HEIGHT*inverseUnitV.y;var point1Vector=rotateVector(unitV,Math.PI/2);var point2Vector=rotateVector(unitV,-Math.PI/2);point1Vector=scale(point1Vector,this.TRIANGLE_ARROW_HEAD_WIDTH/2);point2Vector=scale(point2Vector,this.TRIANGLE_ARROW_HEAD_WIDTH/2);var point1X=targetX+point1Vector.x;var point1Y=targetY+point1Vector.y;var point2X=targetX+point2Vector.x;var point2Y=targetY+point2Vector.y;var polySVG=document.createElementNS(this.SVGNameSpace,"polygon");polySVG.setAttribute("points",point1X+","+point1Y+","+point2X+","+point2Y+","+clipPoints.targetClipPoints.x+","+clipPoints.targetClipPoints.y);this.svg.appendChild(polySVG)}else if(edgeType=="INHIBITS"||edgeType=="REPRESSES"){targetX=clipPoints.targetClipPoints.x+this.T_ARROW_HEAD_OFFSET*inverseUnitV.x;targetY=clipPoints.targetClipPoints.y+this.T_ARROW_HEAD_OFFSET*inverseUnitV.y;var point1Vector=rotateVector(unitV,Math.PI/2);var point2Vector=rotateVector(unitV,-Math.PI/2);point1Vector=scale(point1Vector,this.T_HEIGHT/2);point2Vector=scale(point2Vector,this.T_HEIGHT/2);var point1X=targetX+point1Vector.x;var point1Y=targetY+point1Vector.y;var point2X=targetX+point2Vector.x;var point2Y=targetY+point2Vector.y;var lineSVG=document.createElementNS(this.SVGNameSpace,"line");lineSVG.setAttribute("x1",point1X);lineSVG.setAttribute("y1",point1Y);lineSVG.setAttribute("x2",point2X);lineSVG.setAttribute("y2",point2Y);lineSVG.setAttribute("stroke-width",this.T_WIDTH);lineSVG.setAttribute("stroke","black");this.svg.appendChild(lineSVG)}var lineSVG=document.createElementNS(this.SVGNameSpace,"line");lineSVG.setAttribute("x1",clipPoints.sourceClipPoints.x);lineSVG.setAttribute("y1",clipPoints.sourceClipPoints.y);lineSVG.setAttribute("x2",targetX);lineSVG.setAttribute("y2",targetY);lineSVG.setAttribute("stroke-width",this.EDGE_WIDTH);lineSVG.setAttribute("stroke","black");if(edgeType=="INDUCES"||edgeType=="REPRESSES"){lineSVG.setAttribute("stroke-dasharray",this.DASH_PARAMETERS)}this.svg.appendChild(lineSVG)};SVGExporter.prototype.findClippingPoints=function(sourceRectangle,targetRectangle){var sourceAABB={xMin:sourceRectangle.x-sourceRectangle.width/2,xMax:sourceRectangle.x+sourceRectangle.width/2,yMin:sourceRectangle.y-sourceRectangle.height/2,yMax:sourceRectangle.y+sourceRectangle.height/2};var targetAABB={xMin:targetRectangle.x-targetRectangle.width/2,xMax:targetRectangle.x+targetRectangle.width/2,yMin:targetRectangle.y-targetRectangle.height/2,yMax:targetRectangle.y+targetRectangle.height/2};var line1={x1:sourceRectangle.x,y1:sourceRectangle.y,x2:targetRectangle.x,y2:targetRectangle.y};var line2={x1:targetRectangle.x,y1:targetRectangle.y,x2:sourceRectangle.x,y2:sourceRectangle.y};var returnObj={sourceClipPoints:clipLine(line1,sourceAABB),targetClipPoints:clipLine(line2,targetAABB)};return returnObj};SVGExporter.prototype.createRect=function(node){var nodeRectangle=document.createElementNS(this.SVGNameSpace,"rect");var nodePosition=node.position();if(node.isParent()){nodeRectangle.setAttribute("x",nodePosition.x-node.width()/2-this.COMPOUND_MARGIN/2);nodeRectangle.setAttribute("y",nodePosition.y-node.height()/2-this.COMPOUND_MARGIN/2);nodeRectangle.setAttribute("width",node.width()+this.COMPOUND_MARGIN);nodeRectangle.setAttribute("height",node.height()+this.COMPOUND_MARGIN)}else{nodeRectangle.setAttribute("x",nodePosition.x-node.width()/2);nodeRectangle.setAttribute("y",nodePosition.y-node.height()/2);nodeRectangle.setAttribute("width",node.width());nodeRectangle.setAttribute("height",node.height())}nodeRectangle=this.createStyleForNodes(node,nodeRectangle);return nodeRectangle};SVGExporter.prototype.createText=function(node,genomicDataOffset){var verticalTextOffset=5;var nodePosition=node.position();var svgText=document.createElementNS(this.SVGNameSpace,"text");if(node.isParent()){verticalTextOffset=20;svgText.setAttribute("x",nodePosition.x);svgText.setAttribute("y",nodePosition.y+node.height()/2+verticalTextOffset)}else{svgText.setAttribute("x",nodePosition.x);svgText.setAttribute("y",nodePosition.y+verticalTextOffset+genomicDataOffset)}svgText.setAttribute("font-family","Arial");svgText.setAttribute("text-anchor","middle");svgText.setAttribute("font-size",this.NODE_FONT_SIZE);svgText.innerHTML=node.data().name;return svgText};SVGExporter.prototype.createStyleForNodes=function(node,nodeRectangle){var nodeType=node.data().type;var strokeWidth=this.NODE_STROKE_WIDTH;var strokeColor=this.NODE_STROKE_COLOR;var fillColor=this.NODE_FILL_COLOR;var opacity=this.NODE_OPACITY;var strokeOpacity=1;if(nodeType=="GENE"||nodeType=="COMPARTMENT"){nodeRectangle.setAttribute("rx",this.ROUNDING_FACTOR);nodeRectangle.setAttribute("ry",this.ROUNDING_FACTOR);if(nodeType=="COMPARTMENT")strokeWidth=this.COMPARTMENT_STROKE_WIDTH}if(nodeType=="PROCESS"){opacity=0;strokeOpacity=0}if(nodeType=="FAMILY"){fillColor=this.FAMILY_FILL_COLOR;strokeColor=this.FAMILY_STROKE_COLOR}var styleString="stroke-width:"+strokeWidth+";"+"stroke:"+strokeColor+";"+"fill-opacity:"+opacity+";"+"fill:"+fillColor+";"+"stroke-opacity:"+strokeOpacity+";";nodeRectangle.setAttribute("style",styleString);return nodeRectangle};function clipLine(line,rectangle){var INSIDE=0;var LEFT=1;var RIGHT=2;var BOTTOM=4;var TOP=8;function getOutCode(point,rectangle){var outcode=INSIDE;if(point.xrectangle.xMax)outcode=outcode|RIGHT;if(point.yrectangle.yMax)outcode=outcode|BOTTOM;return outcode}var outcode0=getOutCode({x:line.x1,y:line.y1},rectangle);var outcode1=getOutCode({x:line.x2,y:line.y2},rectangle);var slope=(line.y2-line.y1)/(line.x2-line.x1);var returnCoords={x:line.x1,y:line.y1,slope:slope};var accept=false;while(true){if(!(outcode0|outcode1)){accept=true;break}else if(outcode0&outcode1){break}else{var outCode=outcode0?outcode0:outcode1;if(outCode&TOP){returnCoords.x=line.x1+(rectangle.yMin-line.y1)/slope;returnCoords.y=rectangle.yMin}else if(outCode&BOTTOM){returnCoords.x=line.x1+(rectangle.yMax-line.y1)/slope;returnCoords.y=rectangle.yMax}else if(outCode&RIGHT){returnCoords.x=rectangle.xMax;returnCoords.y=line.y1+slope*(rectangle.xMax-line.x1)}else if(outCode&LEFT){returnCoords.x=rectangle.xMin;returnCoords.y=line.y1+slope*(rectangle.xMin-line.x1)}if(outCode==outcode0){outcode0=getOutCode({x:returnCoords.x,y:returnCoords.y},rectangle)}else{outcode1=getOutCode({x:returnCoords.x,y:returnCoords.y},rectangle)}}}return returnCoords}function dotProduct(v1,v2){var newX=v1.x*v2.x;var newY=v1.y*v2.y;return{x:newX,y:newY}}function unitVector(v){var inverseLength=1/Math.sqrt(v.x*v.x+v.y*v.y); + +return{x:v.x*inverseLength,y:v.y*inverseLength}}function rotateVector(v,radians){var newX=v.x*Math.cos(radians)-v.y*Math.sin(radians);var newY=v.x*Math.sin(radians)+v.y*Math.cos(radians);return{x:newX,y:newY}}function scale(v,scalar){var newX=v.x*scalar;var newY=v.y*scalar;return{x:newX,y:newY}}return SVGExporter}()},{"./SaveLoadUtility.js":196}],196:[function(require,module,exports){var SaveLoadUtils={exportGraph:function(pathwayDetails){var returnString=pathwayDetails.pathwayTitle+"\n\n";returnString+=pathwayDetails.pathwayDescription+"\n\n";var nodes=pathwayDetails.graphJSON.elements.nodes;var edges=pathwayDetails.graphJSON.elements.edges;returnString+="--NODE_NAME NODE_ID NODE_TYPE PARENT_ID POSX POSY--"+"\n";if(nodes){for(var i=0;i4?lineData[4]:"0";var posY=lineData.length>5?lineData[5]:"0";var newNode={group:"nodes",data:{id:nodeID,name:nodeName,type:nodeType},position:{x:parseInt(posX),y:parseInt(posY)}};if(parentID!="-1"){newNode.data.parent=parentID}nodes.push(newNode)}for(var i=edgesStartIndex;i0){var firstSelected=nodes[0];var firstBbox=firstSelected.boundingBox();nodes.forEach(function(node,index){if(index==0){return}if(nodeMap[node.parent().id()]==null){var newPosition=calculateNewPosition(param,node,firstBbox);changePosition(node,0,0,newPosition)}});window.editorActionsManager.handleChangePositionByAlignment(movedNodes)}}function calculateNewPosition(param,node,referenceBbox){var currentPos=node.position();var currentBbox=node.boundingBox();var newPosition;if(param==="vLeft"){newPosition={x:referenceBbox.x1+currentBbox.w/2,y:currentPos.y}}else if(param==="vCen"){newPosition={x:referenceBbox.x1+referenceBbox.w/2,y:currentPos.y}}else if(param==="vRight"){newPosition={x:referenceBbox.x2-currentBbox.w/2,y:currentPos.y}}else if(param==="hTop"){newPosition={x:currentPos.x,y:referenceBbox.y1+currentBbox.h/2}}else if(param==="hMid"){newPosition={x:currentPos.x,y:referenceBbox.y1+referenceBbox.h/2}}else if(param==="hBot"){newPosition={x:currentPos.x,y:referenceBbox.y2-currentBbox.h/2}}else{console.log("Error: wrong alignment name "+param);return}return newPosition}function changePosition(node,dx,dy,newPos){if(node.isParent()){var childNodes=node.children();var parentBbox=node.boundingBox();childNodes.forEach(function(childNode,index){var childBbox=childNode.boundingBox();var _dx=-(parentBbox.x1-childBbox.x1)-parentBbox.w/2+childBbox.w/2;var _dy=-(parentBbox.y1-childBbox.y1)-parentBbox.h/2+childBbox.h/2;if(childNode.isParent()){changePosition(childNode,0,0,{x:newPos.x+_dx,y:newPos.y+_dy})}else{changePosition(childNode,_dx,_dy,newPos)}})}else{var position={x:newPos.x+dx,y:newPos.y+dy};movedNodes.push({node:node,nextPosition:position,oldPosition:null})}}$(".viewDropdown li a").click(function(event){event.preventDefault();var dropdownLinkRole=$(event.target).attr("role");if(dropdownLinkRole=="grid"){$("#gridOptionsDiv").modal("show")}else{handleNodeAlignment(dropdownLinkRole)}})}(window.$)},{}],198:[function(require,module,exports){module.exports=function(){function CBioPortalAccessor(){this.GET_ALL_CANCER_STUDIES_URL="http://www.cbioportal.org/webservice.do?cmd=getCancerStudies";this.GET_GENETIC_PROFILES_URL="http://www.cbioportal.org/webservice.do?cmd=getGeneticProfiles&cancer_study_id=";this.GET_PROFILE_DATA_URL="http://www.cbioportal.org/webservice.do?cmd=getProfileData";this.MRNA_EXP_STUDY_NAME="_mrna_median_Zscores";this.CNA_EXP_STUDY_NAME="_gistic";this.MUTATION_EXP_STUDY_NAME="_mutations";this.CNA_DELETION=-2;this.CNA_GAIN=2;this.Z_SCORE_UPPER_THRESHOLD=2;this.Z_SCORE_LOWER_THRESHOLD=-2;this.MUTATION="Mutation";this.GENE_EXPRESSION="Gene Expression";this.CNA="Copy Number Alteration"}CBioPortalAccessor.prototype.fetchCancerStudies=function(callbackFunction){var cancerStudies={};var request=new XMLHttpRequest;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){var seperator=/\r?\n|\r/;var lines=request.responseText.split(seperator);for(var i=1;i=this.Z_SCORE_UPPER_THRESHOLD||parseInt(lineData[j])<=this.Z_SCORE_LOWER_THRESHOLD))profileDataAlteration++}}outData[geneticProfileId][lineData[1]]=profileDataAlteration/numOfTumorSamples*100}callbackFunction(outData)};CBioPortalAccessor.prototype.getProfileData=function(params,callbackFunction){var outData={};var request=new XMLHttpRequest;var self=this;request.onreadystatechange=function(){if(request.readyState===XMLHttpRequest.DONE&&request.status===200){self.calcAlterationPercentages(request.responseText,params.geneticProfileId,callbackFunction);window.notificationManager.createNotification("Profile data "+params.geneticProfileId+" is succesfully loaded from cBioPortal ","success")}};var queryURL=this.GET_PROFILE_DATA_URL;queryURL+="&case_set_id="+params.caseSetId+"_sequenced";queryURL+="&genetic_profile_id="+params.geneticProfileId;queryURL+="&gene_list=";for(var i=0;i0){var pathwayName=uri.substring(uri.indexOf("=")+1,uri.length);getLocalPathway(pathwayName)}};var collaborativeUsageCallback=function(postSuccess){var realTimeManager=new RealTimeModule(postSuccess);var realTimeAuthCallback=function(response){if(response.error){function popUpAuthHandler(response){if(response.error)console.log(response.error);var appInstance=new AppManager(true,realTimeManager);realTimeManager.initRealTimeAPI()}realTimeManager.authorize(popUpAuthHandler,true)}else{var appInstance=new AppManager(true,realTimeManager);realTimeManager.initRealTimeAPI()}};realTimeManager.authorize(realTimeAuthCallback,false)};var welPage=new WelcomePageView({el:$(".welcomePageContainer"),localUsageCallback:localUsageCallback,collaborativeUsageCallback:collaborativeUsageCallback}).render();var uri=window.location.search;if(uri.length>0){var uriTerm=uri.substring(1,uri.indexOf("="));if(uriTerm==="id"){$(".landingContent h3").hide();$(".welPageButtons").hide();$("#collaborativeUsage").click();$(".continueButton").click().hide()}else if(uriTerm==="filename"){$(".landingContent h3").hide();$(".welPageButtons").hide();$("#localUsage").click();$(".continueButton").click().hide()}}})},{"./AppManager":172,"./BackboneViews/WelcomePageView.js":179,"./RealTimeManager":193,"./RealTimeUtils":194,"./SaveLoadUtility.js":196,backbone:1,bootstrap:4,jquery:139,underscore:140}],200:[function(require,module,exports){},{}],201:[function(require,module,exports){exports.endianness=function(){return"LE"};exports.hostname=function(){if(typeof location!=="undefined"){return location.hostname}else return""};exports.loadavg=function(){return[]};exports.uptime=function(){return 0};exports.freemem=function(){return Number.MAX_VALUE};exports.totalmem=function(){return Number.MAX_VALUE};exports.cpus=function(){return[]};exports.type=function(){return"Browser"};exports.release=function(){if(typeof navigator!=="undefined"){return navigator.appVersion}return""};exports.networkInterfaces=exports.getNetworkInterfaces=function(){return{}};exports.arch=function(){return"javascript"};exports.platform=function(){return"browser"};exports.tmpdir=exports.tmpDir=function(){return"/tmp"};exports.EOL="\n"},{}],202:[function(require,module,exports){(function(process){function normalizeArray(parts,allowAboveRoot){var up=0;for(var i=parts.length-1;i>=0;i--){var last=parts[i];if(last==="."){parts.splice(i,1)}else if(last===".."){parts.splice(i,1);up++}else if(up){parts.splice(i,1);up--}}if(allowAboveRoot){for(;up--;up){parts.unshift("..")}}return parts}var splitPathRe=/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;var splitPath=function(filename){return splitPathRe.exec(filename).slice(1)};exports.resolve=function(){var resolvedPath="",resolvedAbsolute=false;for(var i=arguments.length-1;i>=-1&&!resolvedAbsolute;i--){var path=i>=0?arguments[i]:process.cwd();if(typeof path!=="string"){throw new TypeError("Arguments to path.resolve must be strings")}else if(!path){continue}resolvedPath=path+"/"+resolvedPath;resolvedAbsolute=path.charAt(0)==="/"}resolvedPath=normalizeArray(filter(resolvedPath.split("/"),function(p){return!!p}),!resolvedAbsolute).join("/");return(resolvedAbsolute?"/":"")+resolvedPath||"."};exports.normalize=function(path){var isAbsolute=exports.isAbsolute(path),trailingSlash=substr(path,-1)==="/";path=normalizeArray(filter(path.split("/"),function(p){return!!p}),!isAbsolute).join("/");if(!path&&!isAbsolute){path="."}if(path&&trailingSlash){path+="/"}return(isAbsolute?"/":"")+path};exports.isAbsolute=function(path){return path.charAt(0)==="/"};exports.join=function(){var paths=Array.prototype.slice.call(arguments,0);return exports.normalize(filter(paths,function(p,index){if(typeof p!=="string"){throw new TypeError("Arguments to path.join must be strings")}return p}).join("/"))};exports.relative=function(from,to){from=exports.resolve(from).substr(1);to=exports.resolve(to).substr(1);function trim(arr){var start=0;for(;start=0;end--){if(arr[end]!=="")break}if(start>end)return[];return arr.slice(start,end-start+1)}var fromParts=trim(from.split("/"));var toParts=trim(to.split("/"));var length=Math.min(fromParts.length,toParts.length);var samePartsLength=length;for(var i=0;i1){for(var i=1;i - - - + + @@ -656,7 +655,7 @@ - - + + - diff --git a/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css b/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css deleted file mode 100644 index d1597b97..00000000 --- a/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css +++ /dev/null @@ -1,10 +0,0 @@ -/*! - * Bootstrap Colorpicker v2.3.6 - * https://itsjavi.com/bootstrap-colorpicker/ - * - * Originally written by (c) 2012 Stefan Petre - * Licensed under the Apache License v2.0 - * http://www.apache.org/licenses/LICENSE-2.0.txt - * - */.colorpicker-saturation{width:100px;height:100px;background-image:url(../img/bootstrap-colorpicker/saturation.png);cursor:crosshair;float:left}.colorpicker-saturation i{display:block;height:5px;width:5px;border:1px solid #000;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;position:absolute;top:0;left:0;margin:-4px 0 0 -4px}.colorpicker-saturation i b{display:block;height:5px;width:5px;border:1px solid #fff;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.colorpicker-alpha,.colorpicker-hue{width:15px;height:100px;float:left;cursor:row-resize;margin-left:4px;margin-bottom:4px}.colorpicker-alpha i,.colorpicker-hue i{display:block;height:1px;background:#000;border-top:1px solid #fff;position:absolute;top:0;left:0;width:100%;margin-top:-1px}.colorpicker-hue{background-image:url(../img/bootstrap-colorpicker/hue.png)}.colorpicker-alpha{background-image:url(../img/bootstrap-colorpicker/alpha.png);display:none}.colorpicker-alpha,.colorpicker-hue,.colorpicker-saturation{background-size:contain}.colorpicker{padding:4px;min-width:130px;margin-top:1px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;z-index:2500}.colorpicker:after,.colorpicker:before{display:table;content:"";line-height:0}.colorpicker:after{clear:both}.colorpicker:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0,0,0,.2);position:absolute;top:-7px;left:6px}.colorpicker:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #fff;position:absolute;top:-6px;left:7px}.colorpicker div{position:relative}.colorpicker.colorpicker-with-alpha{min-width:140px}.colorpicker.colorpicker-with-alpha .colorpicker-alpha{display:block}.colorpicker-color{height:10px;margin-top:5px;clear:both;background-image:url(../img/bootstrap-colorpicker/alpha.png);background-position:0 100%}.colorpicker-color div{height:10px}.colorpicker-selectors{display:none;height:10px;margin-top:5px;clear:both}.colorpicker-selectors i{cursor:pointer;float:left;height:10px;width:10px}.colorpicker-selectors i+i{margin-left:3px}.colorpicker-element .add-on i,.colorpicker-element .input-group-addon i{display:inline-block;cursor:pointer;height:16px;vertical-align:text-top;width:16px}.colorpicker.colorpicker-inline{position:relative;display:inline-block;float:none;z-index:auto}.colorpicker.colorpicker-horizontal{width:110px;min-width:110px;height:auto}.colorpicker.colorpicker-horizontal .colorpicker-saturation{margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-color{width:100px}.colorpicker.colorpicker-horizontal .colorpicker-alpha,.colorpicker.colorpicker-horizontal .colorpicker-hue{width:100px;height:15px;float:left;cursor:col-resize;margin-left:0;margin-bottom:4px}.colorpicker.colorpicker-horizontal .colorpicker-alpha i,.colorpicker.colorpicker-horizontal .colorpicker-hue i{display:block;height:15px;background:#fff;position:absolute;top:0;left:0;width:1px;border:none;margin-top:0}.colorpicker.colorpicker-horizontal .colorpicker-hue{background-image:url(../img/bootstrap-colorpicker/hue-horizontal.png)}.colorpicker.colorpicker-horizontal .colorpicker-alpha{background-image:url(../img/bootstrap-colorpicker/alpha-horizontal.png)}.colorpicker.colorpicker-hidden{display:none}.colorpicker.colorpicker-visible{display:block}.colorpicker-inline.colorpicker-visible{display:inline-block}.colorpicker-right:before{left:auto;right:6px}.colorpicker-right:after{left:auto;right:7px}.colorpicker-no-arrow:before{border-right:0;border-left:0}.colorpicker-no-arrow:after{border-right:0;border-left:0} -/*# sourceMappingURL=bootstrap-colorpicker.min.css.map */ \ No newline at end of file diff --git a/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css.map b/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css.map deleted file mode 100644 index f61ccb3e..00000000 --- a/public/lib/js/bootstrap-color-picker/css/bootstrap-colorpicker.min.css.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["src/less/colorpicker.less"],"names":[],"mappings":";;;;;;;;AAqBA,wBACE,MAAA,MACA,OAAA,MAXA,iBAAsB,iDAatB,OAAA,UACA,MAAA,KACA,0BACE,QAAA,MACA,OAAA,IACA,MAAA,IACA,OAAA,IAAA,MAAA,KAfF,sBAAA,IACA,mBAAA,IACA,cAAA,IAeE,SAAA,SACA,IAAA,EACA,KAAA,EACA,OAAA,KAAA,EAAA,EAAA,KACA,4BACE,QAAA,MACA,OAAA,IACA,MAAA,IACA,OAAA,IAAA,MAAA,KAzBJ,sBAAA,IACA,mBAAA,IACA,cAAA,IA8BF,mBADA,iBAEE,MAAA,KACA,OAAA,MACA,MAAA,KACA,OAAA,WACA,YAAA,IACA,cAAA,IAIiB,qBADF,mBAEf,QAAA,MACA,OAAA,IACA,WAAA,KACA,WAAA,IAAA,MAAA,KACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,KACA,WAAA,KAGF,iBA1DE,iBAAsB,0CA8DxB,mBA9DE,iBAAsB,4CAgEtB,QAAA,KAKF,mBADA,iBADA,wBAGE,gBAAA,QAGF,aACE,QAAA,IACA,UAAA,MACA,WAAA,IAxEA,sBAAA,IACA,mBAAA,IACA,cAAA,IAwEA,QAAA,KAIU,mBADA,oBAEV,QAAA,MACA,QAAA,GACA,YAAA,EAGU,mBACV,MAAA,KAGU,oBACV,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,oBAAA,eACA,SAAA,SACA,IAAA,KACA,KAAA,IAGU,mBACV,QAAA,GACA,QAAA,aACA,YAAA,IAAA,MAAA,YACA,aAAA,IAAA,MAAA,YACA,cAAA,IAAA,MAAA,KACA,SAAA,SACA,IAAA,KACA,KAAA,IAGW,iBACX,SAAA,SAGU,oCACV,UAAA,MAGkC,uDAClC,QAAA,MAGF,mBACE,OAAA,KACA,WAAA,IACA,MAAA,KAlIA,iBAAsB,4CAoItB,oBAAA,EAAA,KAGiB,uBACjB,OAAA,KAGF,uBACE,QAAA,KACA,OAAA,KACA,WAAA,IACA,MAAA,KAGqB,yBACrB,OAAA,QACA,MAAA,KACA,OAAA,KACA,MAAA,KAGuB,2BACvB,YAAA,IAI2B,+BADW,0CAEtC,QAAA,aACA,OAAA,QACA,OAAA,KACA,eAAA,SACA,MAAA,KAGU,gCACV,SAAA,SACA,QAAA,aACA,MAAA,KACA,QAAA,KAGU,oCACV,MAAA,MACA,UAAA,MACA,OAAA,KAGkC,4DAClC,cAAA,IAGkC,uDAClC,MAAA,MAIkC,uDADA,qDAElC,MAAA,MACA,OAAA,KACA,MAAA,KACA,OAAA,WACA,YAAA,EACA,cAAA,IAIqD,yDADF,uDAEnD,QAAA,MACA,OAAA,KACA,WAAA,KACA,SAAA,SACA,IAAA,EACA,KAAA,EACA,MAAA,IACA,OAAA,KACA,WAAA,EAGkC,qDAlNlC,iBAAsB,qDAsNY,uDAtNlC,iBAAsB,uDA0NZ,gCACV,QAAA,KAGU,iCACV,QAAA,MAGiB,wCACjB,QAAA,aAGgB,0BAChB,KAAA,KACA,MAAA,IAGgB,yBAChB,KAAA,KACA,MAAA,IAGmB,6BACnB,aAAA,EACA,YAAA,EAGmB,4BACnB,aAAA,EACA,YAAA"} \ No newline at end of file diff --git a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha-horizontal.png b/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha-horizontal.png deleted file mode 100644 index f8318895..00000000 Binary files a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha-horizontal.png and /dev/null differ diff --git a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha.png b/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha.png deleted file mode 100644 index 2e53a30e..00000000 Binary files a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/alpha.png and /dev/null differ diff --git a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue-horizontal.png b/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue-horizontal.png deleted file mode 100644 index 3dcd5946..00000000 Binary files a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue-horizontal.png and /dev/null differ diff --git a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue.png b/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue.png deleted file mode 100644 index 6f5ec2e5..00000000 Binary files a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/hue.png and /dev/null differ diff --git a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/saturation.png b/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/saturation.png deleted file mode 100644 index 170841cb..00000000 Binary files a/public/lib/js/bootstrap-color-picker/img/bootstrap-colorpicker/saturation.png and /dev/null differ diff --git a/public/lib/js/bootstrap-color-picker/js/bootstrap-colorpicker.min.js b/public/lib/js/bootstrap-color-picker/js/bootstrap-colorpicker.min.js deleted file mode 100644 index 07436d1d..00000000 --- a/public/lib/js/bootstrap-color-picker/js/bootstrap-colorpicker.min.js +++ /dev/null @@ -1,5 +0,0 @@ -/*! - * Bootstrap Colorpicker v2.3.6 - * https://itsjavi.com/bootstrap-colorpicker/ - */ -!function(a){"use strict";"object"==typeof exports?module.exports=a(window.jQuery):"function"==typeof define&&define.amd?define(["jquery"],a):window.jQuery&&!window.jQuery.fn.colorpicker&&a(window.jQuery)}(function(a){"use strict";var b=function(b,c){this.value={h:0,s:0,b:0,a:1},this.origFormat=null,c&&a.extend(this.colors,c),b&&(void 0!==b.toLowerCase?(b+="",this.setColor(b)):void 0!==b.h&&(this.value=b))};b.prototype={constructor:b,colors:{aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32",transparent:"transparent"},_sanitizeNumber:function(a){return"number"==typeof a?a:isNaN(a)||null===a||""===a||void 0===a?1:""===a?0:void 0!==a.toLowerCase?(a.match(/^\./)&&(a="0"+a),Math.ceil(100*parseFloat(a))/100):1},isTransparent:function(a){return!!a&&(a=a.toLowerCase().trim(),"transparent"===a||a.match(/#?00000000/)||a.match(/(rgba|hsla)\(0,0,0,0?\.?0\)/))},rgbaIsTransparent:function(a){return 0===a.r&&0===a.g&&0===a.b&&0===a.a},setColor:function(a){a=a.toLowerCase().trim(),a&&(this.isTransparent(a)?this.value={h:0,s:0,b:0,a:0}:this.value=this.stringToHSB(a)||{h:0,s:0,b:0,a:1})},stringToHSB:function(b){b=b.toLowerCase();var c;"undefined"!=typeof this.colors[b]&&(b=this.colors[b],c="alias");var d=this,e=!1;return a.each(this.stringParsers,function(a,f){var g=f.re.exec(b),h=g&&f.parse.apply(d,[g]),i=c||f.format||"rgba";return!h||(e=i.match(/hsla?/)?d.RGBtoHSB.apply(d,d.HSLtoRGB.apply(d,h)):d.RGBtoHSB.apply(d,h),d.origFormat=i,!1)}),e},setHue:function(a){this.value.h=1-a},setSaturation:function(a){this.value.s=a},setBrightness:function(a){this.value.b=1-a},setAlpha:function(a){this.value.a=Math.round(parseInt(100*(1-a),10)/100*100)/100},toRGB:function(a,b,c,d){a||(a=this.value.h,b=this.value.s,c=this.value.b),a*=360;var e,f,g,h,i;return a=a%360/60,i=c*b,h=i*(1-Math.abs(a%2-1)),e=f=g=c-i,a=~~a,e+=[i,h,0,0,h,i][a],f+=[h,i,i,h,0,0][a],g+=[0,0,h,i,i,h][a],{r:Math.round(255*e),g:Math.round(255*f),b:Math.round(255*g),a:d||this.value.a}},toHex:function(a,b,c,d){var e=this.toRGB(a,b,c,d);return this.rgbaIsTransparent(e)?"transparent":"#"+(1<<24|parseInt(e.r)<<16|parseInt(e.g)<<8|parseInt(e.b)).toString(16).substr(1)},toHSL:function(a,b,c,d){a=a||this.value.h,b=b||this.value.s,c=c||this.value.b,d=d||this.value.a;var e=a,f=(2-b)*c,g=b*c;return g/=f>0&&f<=1?f:2-f,f/=2,g>1&&(g=1),{h:isNaN(e)?0:e,s:isNaN(g)?0:g,l:isNaN(f)?0:f,a:isNaN(d)?0:d}},toAlias:function(a,b,c,d){var e=this.toHex(a,b,c,d);for(var f in this.colors)if(this.colors[f]===e)return f;return!1},RGBtoHSB:function(a,b,c,d){a/=255,b/=255,c/=255;var e,f,g,h;return g=Math.max(a,b,c),h=g-Math.min(a,b,c),e=0===h?null:g===a?(b-c)/h:g===b?(c-a)/h+2:(a-b)/h+4,e=(e+360)%6*60/360,f=0===h?0:h/g,{h:this._sanitizeNumber(e),s:f,b:g,a:this._sanitizeNumber(d)}},HueToRGB:function(a,b,c){return c<0?c+=1:c>1&&(c-=1),6*c<1?a+(b-a)*c*6:2*c<1?b:3*c<2?a+(b-a)*(2/3-c)*6:a},HSLtoRGB:function(a,b,c,d){b<0&&(b=0);var e;e=c<=.5?c*(1+b):c+b-c*b;var f=2*c-e,g=a+1/3,h=a,i=a-1/3,j=Math.round(255*this.HueToRGB(f,e,g)),k=Math.round(255*this.HueToRGB(f,e,h)),l=Math.round(255*this.HueToRGB(f,e,i));return[j,k,l,this._sanitizeNumber(d)]},toString:function(a){a=a||"rgba";var b=!1;switch(a){case"rgb":return b=this.toRGB(),this.rgbaIsTransparent(b)?"transparent":"rgb("+b.r+","+b.g+","+b.b+")";case"rgba":return b=this.toRGB(),"rgba("+b.r+","+b.g+","+b.b+","+b.a+")";case"hsl":return b=this.toHSL(),"hsl("+Math.round(360*b.h)+","+Math.round(100*b.s)+"%,"+Math.round(100*b.l)+"%)";case"hsla":return b=this.toHSL(),"hsla("+Math.round(360*b.h)+","+Math.round(100*b.s)+"%,"+Math.round(100*b.l)+"%,"+b.a+")";case"hex":return this.toHex();case"alias":return this.toAlias()||this.toHex();default:return b}},stringParsers:[{re:/rgb\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*?\)/,format:"rgb",parse:function(a){return[a[1],a[2],a[3],1]}},{re:/rgb\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"rgb",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],1]}},{re:/rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[a[1],a[2],a[3],a[4]]}},{re:/rgba\(\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"rgba",parse:function(a){return[2.55*a[1],2.55*a[2],2.55*a[3],a[4]]}},{re:/hsl\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*?\)/,format:"hsl",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/hsla\(\s*(\d*(?:\.\d+)?)\s*,\s*(\d*(?:\.\d+)?)\%\s*,\s*(\d*(?:\.\d+)?)\%\s*(?:,\s*(\d*(?:\.\d+)?)\s*)?\)/,format:"hsla",parse:function(a){return[a[1]/360,a[2]/100,a[3]/100,a[4]]}},{re:/#?([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/,format:"hex",parse:function(a){return[parseInt(a[1],16),parseInt(a[2],16),parseInt(a[3],16),1]}},{re:/#?([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/,format:"hex",parse:function(a){return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16),1]}}],colorNameToHex:function(a){return"undefined"!=typeof this.colors[a.toLowerCase()]&&this.colors[a.toLowerCase()]}};var c={horizontal:!1,inline:!1,color:!1,format:!1,input:"input",container:!1,component:".add-on, .input-group-addon",sliders:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setHue"},alpha:{maxLeft:0,maxTop:100,callLeft:!1,callTop:"setAlpha"}},slidersHorz:{saturation:{maxLeft:100,maxTop:100,callLeft:"setSaturation",callTop:"setBrightness"},hue:{maxLeft:100,maxTop:0,callLeft:"setHue",callTop:!1},alpha:{maxLeft:100,maxTop:0,callLeft:"setAlpha",callTop:!1}},template:'