!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("babylonjs")):"function"==typeof define&&define.amd?define("babylonjs-node-editor",["babylonjs"],t):"object"==typeof exports?exports["babylonjs-node-editor"]=t(require("babylonjs")):e.NODEEDITOR=t(e.BABYLON)}("undefined"!=typeof self?self:"undefined"!=typeof global?global:this,function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=12)}([function(e,t,n){"use strict";e.exports=n(13)},function(t,n){t.exports=e},function(e,t,n){e.exports=n(19)()},function(e,t,n){var r;window,r=function(e,t){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=45)}([function(t,n){t.exports=e},function(e,n){e.exports=t},function(e,t){e.exports={Always:1,Never:2,IfAtMostOneObstacle:3,OnlyWhenNoObstacles:4}},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),i=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n-l&&(s-=l,e+=o),uMath.abs(e.y-t.y),o=r?n:0,i=r?0:n;return"M"+e.x+","+e.y+" C "+(e.x+o)+","+(e.y+i)+"\n "+(t.x-o)+","+(t.y-i)+" "+t.x+","+t.y},e.generateDynamicPath=function(e){var t=i();return t=t.moveto(e[0][0]*o.ROUTING_SCALING_FACTOR,e[0][1]*o.ROUTING_SCALING_FACTOR),e.slice(1).forEach(function(e){t=t.lineto(e[0]*o.ROUTING_SCALING_FACTOR,e[1]*o.ROUTING_SCALING_FACTOR)}),t.print()},e.TESTING=!1,e.TESTING_UID=0,e}();t.Toolkit=a},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e){this.type=e}return e.prototype.getType=function(){return this.type},e}();t.AbstractFactory=r},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(6),a=n(0),l=function(e){function t(t,n){void 0===t&&(t="default");var r=e.call(this,t,n)||this;return r.x=0,r.y=0,r.extras={},r.ports={},r}return o(t,e),t.prototype.setPosition=function(e,t){var n=this.x,r=this.y;a.forEach(this.ports,function(o){a.forEach(o.getLinks(),function(i){var a=i.getPointForPort(o);a.x=a.x+e-n,a.y=a.y+t-r})}),this.x=e,this.y=t},t.prototype.getSelectedEntities=function(){var t=e.prototype.getSelectedEntities.call(this);return this.isSelected()&&a.forEach(this.ports,function(e){t=t.concat(a.map(e.getLinks(),function(t){return t.getPointForPort(e)}))}),t},t.prototype.deSerialize=function(t,n){var r=this;e.prototype.deSerialize.call(this,t,n),this.x=t.x,this.y=t.y,this.extras=t.extras,a.forEach(t.ports,function(e){var t=n.getPortFactory(e.type).getNewInstance();t.deSerialize(e,n),r.addPort(t)})},t.prototype.serialize=function(){return a.merge(e.prototype.serialize.call(this),{x:this.x,y:this.y,extras:this.extras,ports:a.map(this.ports,function(e){return e.serialize()})})},t.prototype.doClone=function(e,t){void 0===e&&(e={}),t.ports={},a.forEach(this.ports,function(n){t.addPort(n.clone(e))})},t.prototype.remove=function(){e.prototype.remove.call(this),a.forEach(this.ports,function(e){a.forEach(e.getLinks(),function(e){e.remove()})})},t.prototype.getPortFromID=function(e){for(var t in this.ports)if(this.ports[t].id===e)return this.ports[t];return null},t.prototype.getPort=function(e){return this.ports[e]},t.prototype.getPorts=function(){return this.ports},t.prototype.removePort=function(e){this.ports[e.name]&&(this.ports[e.name].setParent(null),delete this.ports[e.name])},t.prototype.addPort=function(e){return e.setParent(this),this.ports[e.name]=e,e},t.prototype.updateDimensions=function(e){var t=e.width,n=e.height;this.width=t,this.height=n},t}(i.BaseModel);t.NodeModel=l},function(e,t){e.exports={manhattan:function(e,t){return e+t},euclidean:function(e,t){return Math.sqrt(e*e+t*t)},octile:function(e,t){var n=Math.SQRT2-1;return e=1)return a.values(this.links)[0];if(e>=this.maximumLinks)return null}return null},t.prototype.updateCoords=function(e){var t=e.x,n=e.y,r=e.width,o=e.height;this.x=t,this.y=n,this.width=r,this.height=o},t.prototype.canLinkToPort=function(e){return!0},t.prototype.isLocked=function(){return e.prototype.isLocked.call(this)||this.getParent().isLocked()},t}(i.BaseModel);t.PortModel=l},function(e,t,n){"use strict";var r=this&&this.__assign||Object.assign||function(e){for(var t,n=1,r=arguments.length;n2&&this.points.splice(0,this.points.length-2)},t.prototype.addPoint=function(e,t){return void 0===t&&(t=1),e.setParent(this),this.points.splice(t,0,e),e},t.prototype.generatePoint=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=0),new l.PointModel(this,{x:e,y:t})},t}(a.BaseModel);t.LinkModel=u},function(e,t,n){var r=n(15),o=n(4),i=n(10),a=n(2);function l(e){e=e||{},this.allowDiagonal=e.allowDiagonal,this.dontCrossCorners=e.dontCrossCorners,this.diagonalMovement=e.diagonalMovement,this.heuristic=e.heuristic||i.manhattan,this.weight=e.weight||1,this.diagonalMovement||(this.allowDiagonal?this.dontCrossCorners?this.diagonalMovement=a.OnlyWhenNoObstacles:this.diagonalMovement=a.IfAtMostOneObstacle:this.diagonalMovement=a.Never),this.diagonalMovement===a.Never?this.heuristic=e.heuristic||i.manhattan:this.heuristic=e.heuristic||i.octile}l.prototype.findPath=function(e,t,n,i,a){var l,s,u,c,p,f,d,h,g=function(e,t){return e.f-t.f},m=new r(g),y=new r(g),v=a.getNodeAt(e,t),b=a.getNodeAt(n,i),_=this.heuristic,x=this.diagonalMovement,w=this.weight,k=Math.abs,P=Math.SQRT2;for(v.g=0,v.f=0,m.push(v),v.opened=1,b.g=0,b.f=0,y.push(b),b.opened=2;!m.empty()&&!y.empty();){for((l=m.pop()).closed=!0,c=0,p=(s=a.getNeighbors(l,x)).length;cthis.mouseX?this.mouseX:this.mouseX2,top:this.mouseY2>this.mouseY?this.mouseY:this.mouseY2,width:Math.abs(this.mouseX2-this.mouseX),height:Math.abs(this.mouseY2-this.mouseY),right:this.mouseX2o.left&&e*r+n.getOffsetX()o.top&&t*r+n.getOffsetY()0&&window.requestAnimationFrame(this.calculateAllLabelPosition.bind(this))},t.prototype.componentDidMount=function(){this.props.link.labels.length>0&&window.requestAnimationFrame(this.calculateAllLabelPosition.bind(this))},t.prototype.generatePoint=function(e){var t=this,n=this.props.link.points[e].x,r=this.props.link.points[e].y;return a.createElement("g",{key:"point-"+this.props.link.points[e].id},a.createElement("circle",{cx:n,cy:r,r:5,className:"point "+this.bem("__point")+(this.props.link.points[e].isSelected()?this.bem("--point-selected"):"")}),a.createElement("circle",{onMouseLeave:function(){t.setState({selected:!1})},onMouseEnter:function(){t.setState({selected:!0})},"data-id":this.props.link.points[e].id,"data-linkid":this.props.link.id,cx:n,cy:r,r:15,opacity:0,className:"point "+this.bem("__point")}))},t.prototype.generateLabel=function(e){var t=this,n=this.props.diagramEngine.canvas;return a.createElement("foreignObject",{key:e.id,className:this.bem("__label"),width:n.offsetWidth,height:n.offsetHeight},a.createElement("div",{ref:function(n){return t.refLabels[e.id]=n}},this.props.diagramEngine.getFactoryForLabel(e).generateReactWidget(this.props.diagramEngine,e)))},t.prototype.generateLink=function(e,t,n){var r=this,o=this.props,l=a.cloneElement(o.diagramEngine.getFactoryForLink(this.props.link).generateLinkSegment(this.props.link,this,this.state.selected||this.props.link.isSelected(),e),{ref:function(e){return e&&r.refPaths.push(e)}}),s=a.cloneElement(l,i({},t,{strokeLinecap:"round",onMouseLeave:function(){r.setState({selected:!1})},onMouseEnter:function(){r.setState({selected:!0})},ref:null,"data-linkid":this.props.link.getID(),strokeOpacity:this.state.selected?.1:0,strokeWidth:20,onContextMenu:function(){r.props.diagramEngine.isModelLocked(r.props.link)||(event.preventDefault(),r.props.link.remove())}}));return a.createElement("g",{key:"link-"+n},l,s)},t.prototype.isSmartRoutingApplicable=function(){var e=this.props,t=e.diagramEngine,n=e.link;return!!t.isSmartRoutingEnabled()&&(2===n.points.length&&(null!==n.sourcePort&&null!==n.targetPort))},t.prototype.render=function(){var e=this,t=this.props.diagramEngine;if(!t.nodesRendered)return null;var n=this.props.link.points,r=[];if(this.isSmartRoutingApplicable()){var o=this.pathFinding.calculateDirectPath(c.first(n),c.last(n)),l=t.getRoutingMatrix(),u=this.pathFinding.calculateLinkStartEndCoords(l,o);if(u){var p=u.start,f=u.end,d=u.pathToStart,h=u.pathToEnd,g=this.pathFinding.calculateDynamicPath(l,p,f,d,h);r.push(this.generateLink(s.Toolkit.generateDynamicPath(g),{onMouseDown:function(t){e.addPointToLink(t,1)}},"0"))}}if(0===r.length)if(2===n.length){var m=Math.abs(n[0].x-n[1].x)>Math.abs(n[0].y-n[1].y)?"x":"y";Math.abs(n[0][m]-n[1][m])<50&&5;var y=n[0],v=n[1];y[m]>v[m]&&(y=n[1],v=n[0]),r.push(this.generateLink(s.Toolkit.generateCurvePath(y,v,this.props.link.curvyness),{onMouseDown:function(t){e.addPointToLink(t,1)}},"0")),null===this.props.link.targetPort&&r.push(this.generatePoint(1))}else{for(var b=function(t){r.push(_.generateLink(s.Toolkit.generateLinePath(n[t],n[t+1]),{"data-linkid":_.props.link.id,"data-point":t,onMouseDown:function(n){e.addPointToLink(n,t+1)}},t))},_=this,x=0;x0&&(n=l.filter(l.uniq(n),function(t){return!!(l.includes(e,"node")&&t instanceof u.NodeModel)||(!!(l.includes(e,"link")&&t instanceof s.LinkModel)||(!!(l.includes(e,"port")&&t instanceof c.PortModel)||!!(l.includes(e,"point")&&t instanceof p.PointModel)))})),n},t.prototype.setZoomLevel=function(e){this.zoom=e,this.iterateListeners(function(t,n){t.zoomUpdated&&t.zoomUpdated(i({},n,{zoom:e}))})},t.prototype.setOffset=function(e,t){this.offsetX=e,this.offsetY=t,this.iterateListeners(function(n,r){n.offsetUpdated&&n.offsetUpdated(i({},r,{offsetX:e,offsetY:t}))})},t.prototype.setOffsetX=function(e){var t=this;this.offsetX=e,this.iterateListeners(function(n,r){n.offsetUpdated&&n.offsetUpdated(i({},r,{offsetX:e,offsetY:t.offsetY}))})},t.prototype.setOffsetY=function(e){var t=this;this.offsetY=e,this.iterateListeners(function(e,n){e.offsetUpdated&&e.offsetUpdated(i({},n,{offsetX:t.offsetX,offsetY:t.offsetY}))})},t.prototype.getOffsetY=function(){return this.offsetY},t.prototype.getOffsetX=function(){return this.offsetX},t.prototype.getZoomLevel=function(){return this.zoom},t.prototype.getNode=function(e){return e instanceof u.NodeModel?e:this.nodes[e]?this.nodes[e]:null},t.prototype.getLink=function(e){return e instanceof s.LinkModel?e:this.links[e]?this.links[e]:null},t.prototype.addAll=function(){for(var e=this,t=[],n=0;n10&&n.setZoomLevel(n.getZoomLevel()+i);var a=n.getZoomLevel()/100,l=r.currentTarget.getBoundingClientRect(),s=l.width,u=l.height,c=s*a-s*o,p=u*a-u*o,f=r.clientX-l.left,d=r.clientY-l.top,h=(f-n.getOffsetX())/o/s,g=(d-n.getOffsetY())/o/u;n.setOffset(n.getOffsetX()-c*h,n.getOffsetY()-p*g),t.enableRepaintEntities([]),e.forceUpdate()}},onMouseDown:function(r){e.setState(i({},e.state,{wasMoved:!1})),t.clearRepaintEntities();var o=e.getMouseElement(r);if(null===o)if(r.shiftKey){var a=t.getRelativePoint(r.clientX,r.clientY);e.startFiringAction(new d.SelectingAction(a.x,a.y))}else n.clearSelection(),e.startFiringAction(new p.MoveCanvasAction(r.clientX,r.clientY,n));else if(o.model instanceof m.PortModel)if(e.props.diagramEngine.isModelLocked(o.model))n.clearSelection();else{a=t.getRelativeMousePoint(r);var l=o.model,s=l.createLinkModel();s.setSourcePort(l),s&&(s.removeMiddlePoints(),s.getSourcePort()!==l&&s.setSourcePort(l),s.setTargetPort(null),s.getFirstPoint().updateLocation(a),s.getLastPoint().updateLocation(a),n.clearSelection(),s.getLastPoint().setSelected(!0),n.addLink(s),e.startFiringAction(new f.MoveItemsAction(r.clientX,r.clientY,t)))}else r.shiftKey||o.model.isSelected()||n.clearSelection(),o.model.setSelected(!0),e.startFiringAction(new f.MoveItemsAction(r.clientX,r.clientY,t));e.state.document.addEventListener("mousemove",e.onMouseMove),e.state.document.addEventListener("mouseup",e.onMouseUp)}}),this.state.renderedNodes&&a.createElement(s.LinkLayerWidget,{diagramEngine:t,pointAdded:function(r,o){e.state.document.addEventListener("mousemove",e.onMouseMove),e.state.document.addEventListener("mouseup",e.onMouseUp),o.stopPropagation(),n.clearSelection(r),e.setState({action:new f.MoveItemsAction(o.clientX,o.clientY,t)})}}),a.createElement(u.NodeLayerWidget,{diagramEngine:t}),this.state.action instanceof d.SelectingAction&&this.drawSelectionBox())},t.defaultProps={diagramEngine:null,allowLooseLinks:!0,allowCanvasTranslation:!0,allowCanvasZoom:!0,inverseZoom:!1,maxNumberPointsPerLink:1/0,smartRouting:!1,deleteKeys:[46,8]},t}(n(3).BaseWidget);t.DiagramWidget=y},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(38),a=n(1),l=n(35),s=function(e){function t(){return e.call(this,"default")||this}return o(t,e),t.prototype.generateReactWidget=function(e,t){return a.createElement(l.DefaultNodeWidget,{node:t,diagramEngine:e})},t.prototype.getNewInstance=function(e){return new i.DefaultNodeModel},t}(n(32).AbstractNodeFactory);t.DefaultNodeFactory=s},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(1),a=n(37),l=n(36),s=n(19),u=function(e){function t(){return e.call(this,"default")||this}return o(t,e),t.prototype.generateReactWidget=function(e,t){return i.createElement(a.DefaultLinkWidget,{link:t,diagramEngine:e})},t.prototype.getNewInstance=function(e){return new s.DefaultLinkModel},t.prototype.generateLinkSegment=function(e,t,n,r){return i.createElement("path",{className:n?t.bem("--path-selected"):"",strokeWidth:e.width,stroke:e.color,d:r})},t}(l.AbstractLinkFactory);t.DefaultLinkFactory=u},function(e,t,n){"use strict";var r,o=this&&this.__extends||(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)});Object.defineProperty(t,"__esModule",{value:!0});var i=n(13),a=n(44),l=n(0),s=n(9),u=n(5),c=n(45),p=n(16),f=n(43),d=n(41),h=n(7),g=function(e){function t(){var t=e.call(this)||this;return t.canvasMatrix=[],t.routingMatrix=[],t.hAdjustmentFactor=0,t.vAdjustmentFactor=0,t.calculateMatrixDimensions=function(){var e=l.values(t.diagramModel.nodes).map(function(e){return{x:e.x,width:e.width,y:e.y,height:e.height}}),n=l.values(t.diagramModel.links),r=l.flatMap(n.map(function(e){return[e.sourcePort,e.targetPort]})).filter(function(e){return null!==e}).map(function(e){return{x:e.x,width:e.width,y:e.y,height:e.height}}),o=l.flatMap(n.map(function(e){return e.points})).map(function(e){return{x:e.x,width:0,y:e.y,height:0}}),i=t.canvas,a=Math.floor(Math.min(l.minBy(l.concat(e,r,o),function(e){return e.x}).x,0)/p.ROUTING_SCALING_FACTOR)*p.ROUTING_SCALING_FACTOR,s=l.maxBy(l.concat(e,r,o),function(e){return e.x+e.width}),u=Math.max(s.x+s.width,i.offsetWidth),c=Math.floor(Math.min(l.minBy(l.concat(e,r,o),function(e){return e.y}).y,0)/p.ROUTING_SCALING_FACTOR)*p.ROUTING_SCALING_FACTOR,f=l.maxBy(l.concat(e,r,o),function(e){return e.y+e.height}),d=Math.max(f.y+f.height,i.offsetHeight);return{width:Math.ceil(Math.abs(a)+u),hAdjustmentFactor:Math.abs(a)/p.ROUTING_SCALING_FACTOR+1,height:Math.ceil(Math.abs(c)+d),vAdjustmentFactor:Math.abs(c)/p.ROUTING_SCALING_FACTOR+1}},t.markNodes=function(e){l.values(t.diagramModel.nodes).forEach(function(n){for(var r=Math.floor(n.x/p.ROUTING_SCALING_FACTOR),o=Math.ceil((n.x+n.width)/p.ROUTING_SCALING_FACTOR),i=Math.floor(n.y/p.ROUTING_SCALING_FACTOR),a=Math.ceil((n.y+n.height)/p.ROUTING_SCALING_FACTOR),l=r-1;l<=o+1;l++)for(var s=i-1;s=-n&&e.vec[0]*r>=-n;var i=t.vec[0]*e.vec[1]-t.vec[1]*e.vec[0];if(0===i)return!1;var a=(o*t.vec[0]-r*t.vec[1])/i,l=(o*e.vec[0]-r*e.vec[1])/i;return a>=-n&&l>=n||a>=n&&l>=-n},matrixTransform:function(e,t){return e.map(function(e){return{x:e.x*t[0]+e.y*t[2]+t[4],y:e.x*t[1]+e.y*t[3]+t[5]}})},transformEllipse:function(e,t,n,r){var o=Math.PI/180,i=Math.cos(n*o),a=Math.sin(n*o),l=[e*(r[0]*i+r[2]*a),e*(r[1]*i+r[3]*a),t*(-r[0]*a+r[2]*i),t*(-r[1]*a+r[3]*i)],s=l[0]*l[0]+l[2]*l[2],u=l[1]*l[1]+l[3]*l[3],c=((l[0]-l[3])*(l[0]-l[3])+(l[2]+l[1])*(l[2]+l[1]))*((l[0]+l[3])*(l[0]+l[3])+(l[2]-l[1])*(l[2]-l[1])),p=(s+u)/2;if(c<1e-10*p)return{rx:Math.sqrt(p),ry:Math.sqrt(p),ax:0,isDegenerate:!1};var f=l[0]*l[1]+l[2]*l[3],d=p+(c=Math.sqrt(c))/2,h=p-c/2,g=void 0,m=void 0,y=void 0;return(g=Math.abs(f)<1e-10&&Math.abs(d-u)<1e-10?90:180*Math.atan(Math.abs(f)>Math.abs(d-u)?(d-s)/f:f/(d-u))/Math.PI)>=0?(m=Math.sqrt(d),y=Math.sqrt(h)):(g+=90,m=Math.sqrt(h),y=Math.sqrt(d)),{rx:m,ry:y,ax:g,isDegenerate:m<1e-10*y||y<1e-10*m}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=function(){return function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,l=e[Symbol.iterator]();!(r=(a=l.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),o=n(50),i=function e(t){var n=t||[],i=function(e){return e.command+" "+e.params.map(function(e){return t=6,function(e,t){for(var n=e.length;"0"===e.charAt(n-1);)n-=1;return"."===e.charAt(n-1)&&(n-=1),e.substr(0,n)}(e.toFixed(t));var t}).join(" ")},a=function(e,t){var n=e.command,r=e.params;switch(n){case"M":case"L":return[r[0],r[1]];case"H":return[r[0],t[1]];case"V":return[t[0],r[0]];case"Z":return null;case"C":return[r[4],r[5]];case"S":case"Q":return[r[2],r[3]];case"T":return[r[0],r[1]];case"A":return[r[5],r[6]]}},l=function(e,t,n){var r=e.params,i={V:function(e,t,n){var i=[{x:n[0],y:r[1]}],a=(0,o.matrixTransform)(i,t);return a[0].x===(0,o.matrixTransform)([{x:n[0],y:n[1]}])[0].x?{command:"V",params:[a[0].y]}:{command:"L",params:[a[0].x,a[0].y]}},H:function(e,t,n){var i=[{x:r[0],y:n[1]}],a=(0,o.matrixTransform)(i,t);return a[0].y===(0,o.matrixTransform)([{x:n[0],y:n[1]}])[0].y?{command:"H",params:[a[0].x]}:{command:"L",params:[a[0].x,a[0].y]}},A:function(e,t,n){var i=(0,o.transformEllipse)(r[0],r[1],r[2],t),a=r[4];t[0]*t[3]-t[1]*t[2]<0&&(a=a?"0":"1");var l=[{x:r[5],y:r[6]}],s=(0,o.matrixTransform)(l,t);return i.isDegenerate?{command:"L",params:[s[0].x,s[0].y]}:{command:"A",params:[i.rx,i.ry,i.ax,r[3],a,s[0].x,s[0].y]}},C:function(e,t,n){var i=[{x:r[0],y:r[1]},{x:r[2],y:r[3]},{x:r[4],y:r[5]}],a=(0,o.matrixTransform)(i,t);return{command:"C",params:[a[0].x,a[0].y,a[1].x,a[1].y,a[2].x,a[2].y]}},Z:function(e,t,n){return{command:"Z",params:[]}},default:function(e,t,n){var i=[{x:r[0],y:r[1]}],a=(0,o.matrixTransform)(i,t),l=e.params.slice(0,e.params.length);return l.splice(0,2,a[0].x,a[0].y),{command:e.command,params:l}}};return i[e.command]?i[e.command](e,t,n):i.default(e,t,n)},s=function(e,t){return function(n){var r="object"==typeof n?e.map(function(e){return n[e]}):arguments;return t.apply(null,r)}},u=function(t){return e((o=t,(i=(r=n).slice(0,r.length)).push(o),i));var r,o,i};return{moveto:s(["x","y"],function(e,t){return u({command:"M",params:[e,t]})}),lineto:s(["x","y"],function(e,t){return u({command:"L",params:[e,t]})}),hlineto:s(["x"],function(e){return u({command:"H",params:[e]})}),vlineto:s(["y"],function(e){return u({command:"V",params:[e]})}),closepath:function(){return u({command:"Z",params:[]})},curveto:s(["x1","y1","x2","y2","x","y"],function(e,t,n,r,o,i){return u({command:"C",params:[e,t,n,r,o,i]})}),smoothcurveto:s(["x2","y2","x","y"],function(e,t,n,r){return u({command:"S",params:[e,t,n,r]})}),qcurveto:s(["x1","y1","x","y"],function(e,t,n,r){return u({command:"Q",params:[e,t,n,r]})}),smoothqcurveto:s(["x","y"],function(e,t){return u({command:"T",params:[e,t]})}),arc:s(["rx","ry","xrot","largeArcFlag","sweepFlag","x","y"],function(e,t,n,r,o,i,a){return u({command:"A",params:[e,t,n,r,o,i,a]})}),translate:s(["dx","dy"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0],r=arguments.length<=1||void 0===arguments[1]?0:arguments[1];if(0===t&&0===t)return e(n);var o,i,s,u=(o=[0,0],i=[1,0,0,1,t,r],s=n.map(function(e){var t=l(e,i,o);return o=a(e,o),t}),{v:e(s)});return"object"==typeof u?u.v:void 0}),rotate:s(["angle","rx","ry"],function(t){var r=arguments.length<=1||void 0===arguments[1]?0:arguments[1],o=arguments.length<=2||void 0===arguments[2]?0:arguments[2];if(0===t)return e(n);var i=function(){var i=void 0,s=void 0,u=n;0!==r&&0!==o&&(i=[0,0],s=[1,0,0,1,-r,-o],u=u.map(function(e){var t=l(e,s,i);return i=a(e,i),t}));var c=t*Math.PI/180,p=Math.cos(c),f=Math.sin(c);return i=[0,0],s=[p,f,-f,p,0,0],u=u.map(function(e){var t=l(e,s,i);return i=a(e,i),t}),0!==r&&0!==o&&(i=[0,0],s=[1,0,0,1,r,o],u=u.map(function(e){var t=l(e,s,i);return i=a(e,i),t})),{v:e(u)}}();return"object"==typeof i?i.v:void 0}),scale:s(["sx","sy"],function(){var t=arguments.length<=0||void 0===arguments[0]?1:arguments[0],r=arguments.length<=1||void 0===arguments[1]?t:arguments[1];return function(){if(1===t&&1===r)return e(n);var o,i,s,u=(o=[0,0],i=[t,0,0,r,0,0],s=n.map(function(e){var t=l(e,i,o);return o=a(e,o),t}),{v:e(s)});return"object"==typeof u?u.v:void 0}()}),shearX:s(["angle"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r,o,i,s=(r=[0,0],o=[1,0,Math.tan(t*Math.PI/180),1,0,0],i=n.map(function(e){var t=l(e,o,r);return r=a(e,r),t}),{v:e(i)});return"object"==typeof s?s.v:void 0}),shearY:s(["angle"],function(){var t=arguments.length<=0||void 0===arguments[0]?0:arguments[0];if(0===t)return e(n);var r,o,i,s=(r=[0,0],o=[1,Math.tan(t*Math.PI/180),0,1,0,0],i=n.map(function(e){var t=l(e,o,r);return r=a(e,r),t}),{v:e(i)});return"object"==typeof s?s.v:void 0}),print:function(){return n.map(i).join(" ")},toString:function(){return(void 0).print()},points:function(){var e=[],t=[0,0],r=!0,o=!1,i=void 0;try{for(var l,s=n[Symbol.iterator]();!(r=(l=s.next()).done);r=!0){var u=l.value,c=a(u,t);t=c,c&&e.push(c)}}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return e},instructions:function(){return n.slice(0,n.length)},connect:function(t){var o,i,a,l,s,u,c,p=this.points(),f=p[p.length-1],d=t.points()[0],h=void 0;return"Z"!==n[n.length-1].command?(h=t.instructions().slice(1),o=d,i=r(f,2),a=i[0],l=i[1],s=r(o,2),u=s[0],c=s[1],(a!==u||l!==c)&&h.unshift({command:"L",params:d})):h=t.instructions(),e(this.instructions().concat(h))}}};t.default=function(){return i()},e.exports=t.default},function(e,t,n){var r=n(14),o=n(2);function i(e){r.call(this,e)}i.prototype=new r,i.prototype.constructor=i,i.prototype._jump=function(e,t,n,r){var o=this.grid,i=e-n,a=t-r;if(!o.isWalkableAt(e,t))return null;if(!0===this.trackJumpRecursion&&(o.getNodeAt(e,t).tested=!0),o.getNodeAt(e,t)===this.endNode)return[e,t];if(0!==i&&0!==a){if(o.isWalkableAt(e-i,t+a)&&!o.isWalkableAt(e-i,t)||o.isWalkableAt(e+i,t-a)&&!o.isWalkableAt(e,t-a))return[e,t];if(this._jump(e+i,t,e,t)||this._jump(e,t+a,e,t))return[e,t]}else if(0!==i){if(o.isWalkableAt(e+i,t+1)&&!o.isWalkableAt(e,t+1)||o.isWalkableAt(e+i,t-1)&&!o.isWalkableAt(e,t-1))return[e,t]}else if(o.isWalkableAt(e+1,t+a)&&!o.isWalkableAt(e+1,t)||o.isWalkableAt(e-1,t+a)&&!o.isWalkableAt(e-1,t))return[e,t];return o.isWalkableAt(e+i,t)||o.isWalkableAt(e,t+a)?this._jump(e+i,t+a,e,t):null},i.prototype._findNeighbors=function(e){var t,n,r,i,a,l,s,u,c=e.parent,p=e.x,f=e.y,d=this.grid,h=[];if(c)t=c.x,n=c.y,r=(p-t)/Math.max(Math.abs(p-t),1),i=(f-n)/Math.max(Math.abs(f-n),1),0!==r&&0!==i?(d.isWalkableAt(p,f+i)&&h.push([p,f+i]),d.isWalkableAt(p+r,f)&&h.push([p+r,f]),(d.isWalkableAt(p,f+i)||d.isWalkableAt(p+r,f))&&h.push([p+r,f+i]),!d.isWalkableAt(p-r,f)&&d.isWalkableAt(p,f+i)&&h.push([p-r,f+i]),!d.isWalkableAt(p,f-i)&&d.isWalkableAt(p+r,f)&&h.push([p+r,f-i])):0===r?d.isWalkableAt(p,f+i)&&(h.push([p,f+i]),d.isWalkableAt(p+1,f)||h.push([p+1,f+i]),d.isWalkableAt(p-1,f)||h.push([p-1,f+i])):d.isWalkableAt(p+r,f)&&(h.push([p+r,f]),d.isWalkableAt(p,f+1)||h.push([p+r,f+1]),d.isWalkableAt(p,f-1)||h.push([p+r,f-1]));else for(s=0,u=(a=d.getNeighbors(e,o.IfAtMostOneObstacle)).length;s0&&(new Date).getTime()-u>1e3*this.timeLimit)return 1/0;var l,s,f,h,g=t+c(e,d)*this.weight;if(g>n)return g;if(e==d)return r[a]=[e.x,e.y],e;var m,y,v=i.getNeighbors(e,this.diagonalMovement);for(f=0,l=1/0;h=v[f];++f){if(this.trackRecursion&&(h.retainCount=h.retainCount+1||1,!0!==h.tested&&(h.tested=!0)),(s=p(h,t+(y=h,(m=e).x===y.x||m.y===y.y?1:Math.SQRT2),n,r,a+1))instanceof o)return r[a]=[e.x,e.y],s;this.trackRecursion&&0==--h.retainCount&&(h.tested=!1),s=0&&e=0&&tt?1:0},u=function(e,t,o,i,a){var l;if(null==o&&(o=0),null==a&&(a=n),o<0)throw new Error("lo must be non-negative");for(null==i&&(i=e.length);on;0<=n?t++:t--)u.push(t);return u}.apply(this).reverse()).length;ig;0<=g?++f:--f)m.push(i(e,r));return m},h=function(e,t,r,o){var i,a,l;for(null==o&&(o=n),i=e[r];r>t&&o(i,a=e[l=r-1>>1])<0;)e[r]=a,r=l;return e[r]=i},g=function(e,t,r){var o,i,a,l,s;for(null==r&&(r=n),i=e.length,s=t,a=e[t],o=2*t+1;o=0||Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=e[r]);return n},g=function(e){if(Array.isArray(e)){for(var t=0,n=Array(e.length);t0||!Array.isArray(t)&&t?f({},e,t):{}}function v(e){return null===e?null:"object"===(void 0===e?"undefined":p(e))&&e.prefix&&e.iconName?e:Array.isArray(e)&&2===e.length?{prefix:e[0],iconName:e[1]}:"string"==typeof e?{prefix:"fas",iconName:e}:void 0}function b(e){var t=e.icon,n=e.mask,o=e.symbol,i=e.className,a=e.title,l=v(t),s=y("classes",[].concat(g(function(e){var t,n=(t={"fa-spin":e.spin,"fa-pulse":e.pulse,"fa-fw":e.fixedWidth,"fa-inverse":e.inverse,"fa-border":e.border,"fa-li":e.listItem,"fa-flip-horizontal":"horizontal"===e.flip||"both"===e.flip,"fa-flip-vertical":"vertical"===e.flip||"both"===e.flip},f(t,"fa-"+e.size,null!==e.size),f(t,"fa-rotate-"+e.rotation,null!==e.rotation),f(t,"fa-pull-"+e.pull,null!==e.pull),t);return Object.keys(n).map(function(e){return n[e]?e:null}).filter(function(e){return e})}(e)),g(i.split(" ")))),u=y("transform","string"==typeof e.transform?r.b.transform(e.transform):e.transform),c=y("mask",v(n)),p=Object(r.a)(l,d({},s,u,c,{symbol:o,title:a}));if(!p)return function(){var e;!m&&console&&"function"==typeof console.error&&(e=console).error.apply(e,arguments)}("Could not find icon",l),null;var h=p.abstract,x={};return Object.keys(e).forEach(function(t){b.defaultProps.hasOwnProperty(t)||(x[t]=e[t])}),_(h[0],x)}b.displayName="FontAwesomeIcon",b.propTypes={border:i.a.bool,className:i.a.string,mask:i.a.oneOfType([i.a.object,i.a.array,i.a.string]),fixedWidth:i.a.bool,inverse:i.a.bool,flip:i.a.oneOf(["horizontal","vertical","both"]),icon:i.a.oneOfType([i.a.object,i.a.array,i.a.string]),listItem:i.a.bool,pull:i.a.oneOf(["right","left"]),pulse:i.a.bool,rotation:i.a.oneOf([90,180,270]),size:i.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:i.a.bool,symbol:i.a.oneOfType([i.a.bool,i.a.string]),title:i.a.string,transform:i.a.oneOfType([i.a.string,i.a.object])},b.defaultProps={border:!1,className:"",mask:null,fixedWidth:!1,inverse:!1,flip:null,icon:null,listItem:!1,pull:null,pulse:!1,rotation:null,size:null,spin:!1,symbol:!1,title:"",transform:null};var _=function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if("string"==typeof n)return n;var o=(n.children||[]).map(e.bind(null,t)),i=Object.keys(n.attributes||{}).reduce(function(e,t){var r=n.attributes[t];switch(t){case"class":e.attrs.className=r,delete n.attributes.class;break;case"style":e.attrs.style=r.split(";").map(function(e){return e.trim()}).filter(function(e){return e}).reduce(function(e,t){var n,r=t.indexOf(":"),o=c.camelize(t.slice(0,r)),i=t.slice(r+1).trim();return o.startsWith("webkit")?e[(n=o,n.charAt(0).toUpperCase()+n.slice(1))]=i:e[o]=i,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[c.camelize(t)]=r}return e},{attrs:{}}),a=r.style,l=void 0===a?{}:a,s=h(r,["style"]);return i.attrs.style=d({},i.attrs.style,l),t.apply(void 0,[n.tag,d({},i.attrs,s)].concat(g(o)))}.bind(null,l.a.createElement)}).call(this,n(8))},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var o=(a=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),i=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(i).concat([o]).join("\n")}var a;return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},o=0;o=0&&c.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),y(t,e.attrs),h(e,t),t}function y(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function v(e,t){var n,r,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;n=s||(s=m(t)),r=x.bind(null,n,a,!1),o=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",y(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||i)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var a=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(a),l&&URL.revokeObjectURL(l)}.bind(null,n,t),o=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(t),r=function(e,t){var n=t.css,r=t.media;r&&e.setAttribute("media",r);if(e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),o=function(){g(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else o()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=d(e,t);return f(n,t),function(e){for(var r=[],o=0;o0&&-1===o.indexOf(l.name))){var s=new p(l.name,"input");if(s.connection=l,a.addPort(s),l.connectedPoint){var u=t.filter(function(e){return e.block===l._connectedPoint._ownerBlock}),c=(0==u.length?r.createNodeFromObject({column:e.column+1,nodeMaterialBlock:l.connectedPoint._ownerBlock}):u[0]).ports[l.connectedPoint.name].link(s);r._toAdd?r._toAdd.push(c):n.addAll(c)}else{var f="";l.type==i.NodeMaterialBlockConnectionPointTypes.Texture?f="Texture":l.type==i.NodeMaterialBlockConnectionPointTypes.Matrix?f="Matrix":l.type&i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3?f="Vector3":l.type&i.NodeMaterialBlockConnectionPointTypes.Vector2?f="Vector2":l.type&i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3OrVector4OrColor4?f="Vector4":l.type&i.NodeMaterialBlockConnectionPointTypes.Float&&(f="Float");var d=r.addValueNode(f,e.column+1,l);if(d){var h=d.getPorts();for(var g in h){c=h[g].link(s);r._toAdd?r._toAdd.push(c):n.addAll(c)}}}}}))},t.prototype.renderProperties=function(e){return null},t}(u.NodeModel),d=function(e){function t(t){return e.call(this,t)||this}return s(t,e),t.prototype.onLink=function(){this.props.onLink&&this.props.onLink()},t.prototype.renderContent=function(){var e=this;return this.props.onLink?r.createElement("div",{className:"link-value",title:this.props.value,onClick:function(){return e.onLink()}},this.props.value||"no name"):r.createElement("div",{className:"value",title:this.props.value,style:{color:this.props.color?this.props.color:""}},this.props.value||"no name")},t.prototype.render=function(){return r.createElement("div",{className:this.props.underline?"textLine underline":"textLine"},r.createElement("div",{className:"label"},this.props.label),this.renderContent())},t}(r.Component),h=n(4),g={prefix:"fas",iconName:"chevron-down",icon:[448,512,[],"f078","M207.029 381.476L12.686 187.132c-9.373-9.373-9.373-24.569 0-33.941l22.667-22.667c9.357-9.357 24.522-9.375 33.901-.04L224 284.505l154.745-154.021c9.379-9.335 24.544-9.317 33.901.04l22.667 22.667c9.373 9.373 9.373 24.569 0 33.941L240.971 381.476c-9.373 9.372-24.569 9.372-33.942 0z"]},m={prefix:"fas",iconName:"copy",icon:[448,512,[],"f0c5","M320 448v40c0 13.255-10.745 24-24 24H24c-13.255 0-24-10.745-24-24V120c0-13.255 10.745-24 24-24h72v296c0 30.879 25.121 56 56 56h168zm0-344V0H152c-13.255 0-24 10.745-24 24v368c0 13.255 10.745 24 24 24h272c13.255 0 24-10.745 24-24V128H344c-13.2 0-24-10.8-24-24zm120.971-31.029L375.029 7.029A24 24 0 0 0 358.059 0H352v96h96v-6.059a24 24 0 0 0-7.029-16.97z"]},y={prefix:"fas",iconName:"minus",icon:[448,512,[],"f068","M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},v={prefix:"fas",iconName:"plus",icon:[448,512,[],"f067","M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"]},b=function(e){function t(n){var r,o=e.call(this,n)||this;try{r=t._InMemoryStorage&&void 0!==t._InMemoryStorage[o.props.title]?t._InMemoryStorage[o.props.title]:"undefined"!=typeof Storage&&null!==localStorage.getItem(o.props.title)?"true"===localStorage.getItem(o.props.title):!o.props.closed}catch(e){t._InMemoryStorage={},t._InMemoryStorage[o.props.title]=!o.props.closed,r=!o.props.closed}return o.state={isExpanded:r},o}return s(t,e),t.prototype.switchExpandedState=function(){var e=!this.state.isExpanded;try{t._InMemoryStorage?t._InMemoryStorage[this.props.title]=e:"undefined"!=typeof Storage&&localStorage.setItem(this.props.title,e?"true":"false")}catch(n){t._InMemoryStorage={},t._InMemoryStorage[this.props.title]=e}this.setState({isExpanded:e})},t.prototype.renderHeader=function(){var e=this,t=this.state.isExpanded?"collapse":"collapse closed";return r.createElement("div",{className:"header",onClick:function(){return e.switchExpandedState()}},r.createElement("div",{className:"title"},this.props.title),r.createElement("div",{className:t},r.createElement(h.a,{icon:g})))},t.prototype.render=function(){return this.state.isExpanded?r.createElement("div",{className:"paneContainer"},r.createElement("div",{className:"paneContainer-content"},this.renderHeader(),r.createElement("div",{className:"paneList"},this.props.children))):r.createElement("div",{className:"paneContainer"},r.createElement("div",{className:"paneContainer-content"},this.renderHeader()))},t}(r.Component),_=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:n.props.value||n.props.target[n.props.propertyName]||""},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=e.value||e.target[e.propertyName];return n!==t.value&&(t.value=n||"",!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onChange?this.props.onChange(e):this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateValue=function(e){this._localChange=!0;var t=this.props.value||this.props.target[this.props.propertyName];this.setState({value:e}),this.raiseOnPropertyChanged(e,t),this.props.propertyName&&(this.props.target[this.props.propertyName]=e)},t.prototype.render=function(){var e=this;return r.createElement("div",{className:"textInputLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"value"},r.createElement("input",{value:this.state.value,onChange:function(t){return e.updateValue(t.target.value)}})))},t}(r.Component),x=function(e){function t(){var t=e.call(this,"generic")||this;return t.vector2=null,t.vector3=null,t.vector4=null,t.matrix=null,t}return s(t,e),t.prototype.prepare=function(t,n,r,o,i){e.prototype.prepare.call(this,t,n,r,o,i)},t.prototype.renderProperties=function(e){return r.createElement(b,{title:"GENERAL"},r.createElement(_,{label:"Name",propertyName:"name",target:this.block,onChange:function(){return e.onUpdateRequiredObservable.notifyObservers()}}),r.createElement(d,{label:"Type",value:this.block.getClassName()}))},t}(f),w=function(e){function t(t){var n=e.call(this,"generic")||this;return n._globalState=t,n}return s(t,e),t.prototype.generateReactWidget=function(e,t){return r.createElement(c,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new x},t}(u.AbstractNodeFactory),k=function(e){function t(t){return e.call(this,t)||this}return s(t,e),t.prototype.render=function(){var e=this;return r.createElement("div",{className:"buttonLine"},r.createElement("button",{onClick:function(){return e.props.onClick()}},this.props.label))},t}(r.Component);n(21);var P=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){var e=this,t={Vertex:[i.BonesBlock,i.InstancesBlock,i.MorphTargetsBlock],Fragment:[i.AlphaTestBlock,,i.ImageProcessingBlock,i.RGBAMergerBlock,i.RGBASplitterBlock,i.TextureBlock],Outputs:[i.VertexOutputBlock,i.FragmentOutputBlock],Dual:[i.FogBlock],Math:[i.AddBlock,i.ClampBlock,i.MatrixMultiplicationBlock,i.MultiplyBlock,i.ScaleBlock,i.Vector2TransformBlock,i.Vector3TransformBlock,i.Vector4TransformBlock],Inputs:["Vector2","Vector3","Vector4","Color3","Color4","Matrix"]},n=[];for(var o in t){var a=t[o].map(function(t){var n="string"==typeof t?t:t.prototype.getClassName().replace("Block",""),o="string"==typeof t?function(){e.props.onAddValueNode(t),e.props.globalState.onUpdateRequiredObservable.notifyObservers()}:function(){e.props.onAddNodeFromClass(t)};return r.createElement(k,{key:n,label:n,onClick:o})});n.push(r.createElement(b,{key:o+" blocks",title:o+" blocks",closed:!1},a))}return r.createElement("div",{id:"nodeList",style:{borderRightStyle:"solid",borderColor:"grey",borderWidth:"1px"}},r.createElement("div",{className:"panes"},r.createElement("div",{className:"pane"},n)))},t}(r.Component);n(24);var C=function(e){function t(t){var n=e.call(this,t)||this;return n.state={currentNode:null},n}return s(t,e),t.prototype.componentWillMount=function(){var e=this;this.props.globalState.onSelectionChangedObservable.add(function(t){e.setState({currentNode:t})})},t.prototype.render=function(){var e=this;return this.state.currentNode?r.createElement("div",{id:"propertyTab"},r.createElement("div",{id:"header"},r.createElement("img",{id:"logo",src:"https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png"}),r.createElement("div",{id:"title"},"NODE MATERIAL EDITOR")),this.state.currentNode.renderProperties(this.props.globalState)):r.createElement("div",{id:"propertyTab"},r.createElement("div",{id:"header"},r.createElement("img",{id:"logo",src:"https://www.babylonjs.com/Assets/logo-babylonjs-social-twitter.png"}),r.createElement("div",{id:"title"},"NODE MATERIAL EDITOR")),r.createElement("div",null,r.createElement(b,{title:"PROPERTIES"}),r.createElement(b,{title:"GENERAL"},r.createElement(k,{label:"Reset to default",onClick:function(){e.props.globalState.nodeMaterial.setToDefault(),e.props.globalState.onResetRequiredObservable.notifyObservers()}})),r.createElement(b,{title:"UI"},r.createElement(k,{label:"Zoom to fit",onClick:function(){e.props.globalState.onZoomToFitRequiredObservable.notifyObservers()}}))))},t}(r.Component),E=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){return o.createPortal(this.props.children,this.props.globalState.hostElement)},t}(r.Component),O=function(e){function t(t){var n=e.call(this,t)||this;return n.state={displayRed:!0,displayGreen:!0,displayBlue:!0,displayAlpha:!0,face:0},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){return!0},t.prototype.componentDidMount=function(){this.updatePreview()},t.prototype.componentDidUpdate=function(){this.updatePreview()},t.prototype.updatePreview=function(){var e=this,t=this.props.texture;!t.isReady()&&t._texture&&t._texture.onLoadedObservable.addOnce(function(){e.updatePreview()});var n,r=t.getScene(),o=r.getEngine(),a=t.getSize(),l=a.width/a.height,s=this.props.width,u=s/l|1;if(t.isCube){var c=new i.PassCubePostProcess("pass",1,null,i.Texture.NEAREST_SAMPLINGMODE,o,!1,i.Constants.TEXTURETYPE_UNSIGNED_INT);c.face=this.state.face,n=c}else n=new i.PassPostProcess("pass",1,null,i.Texture.NEAREST_SAMPLINGMODE,o,!1,i.Constants.TEXTURETYPE_UNSIGNED_INT);if(!n.getEffect().isReady())return n.dispose(),void setTimeout(function(){return e.updatePreview()},250);var p=this.refs.canvas;this.props.globalState&&(this.props.globalState.blockMutationUpdates=!0);var f=new i.RenderTargetTexture("temp",{width:s,height:u},r,!1);n.onApply=function(e){e.setTexture("textureSampler",t)};var d=f.getInternalTexture();if(d){r.postProcessManager.directRender([n],d);var h=4*s,g=u/2,m=o.readPixels(0,0,s,u);if(!(t.isCube||this.state.displayRed&&this.state.displayGreen&&this.state.displayBlue))for(var y=0;y0?a=".dds":e.name.toLowerCase().indexOf(".env")>0&&(a=".env"),n.updateURL(i,a,function(){return t.props.globalState.onUpdateRequiredObservable.notifyObservers()})}else n.updateURL(i,null,function(){return t.props.globalState.onUpdateRequiredObservable.notifyObservers()});t.props.globalState.onUpdateRequiredObservable.notifyObservers(),t.props.globalState.onRebuildRequiredObservable.notifyObservers()},void 0,!0)}},t.prototype.render=function(){var e=this;return r.createElement("div",null,r.createElement(b,{title:"GENERAL"},r.createElement(_,{label:"Name",propertyName:"name",target:this.props.node.block,onChange:function(){return e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),r.createElement(d,{label:"Type",value:"Texture"})),r.createElement(b,{title:"PROPERTIES"},r.createElement(T,{label:"Replace texture",onClick:function(t){return e.replaceTexture(t)},accept:".jpg, .png, .tga, .dds, .env"})))},t}(r.Component),M=function(e){function t(){return e.call(this,"texture")||this}return s(t,e),Object.defineProperty(t.prototype,"texture",{get:function(){return this._block.texture.value},set:function(e){this._block.texture.value=e},enumerable:!0,configurable:!0}),t.prototype.renderProperties=function(e){return r.createElement(N,{globalState:e,node:this})},t.prototype.prepare=function(t,n,r,o,i){this._block=t.nodeMaterialBlock,e.prototype.prepare.call(this,t,n,r,o,i)},t}(f),L=function(e){function t(t){var n=e.call(this,"texture")||this;return n._globalState=t,n}return s(t,e),t.prototype.generateReactWidget=function(e,t){return r.createElement(S,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new M},t}(u.AbstractNodeFactory),A=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:n.props.value.toFixed(3)},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){return this._localChange?(this._localChange=!1,!0):e.value.toString()!==t.value&&(t.value=e.value.toFixed(3),!0)},t.prototype.updateValue=function(e){var t=e.target.value;if(!/[^0-9\.\-]/g.test(t)){var n=parseFloat(t);this._localChange=!0,this.setState({value:t}),isNaN(n)||this.props.onChange(n)}},t.prototype.render=function(){var e=this;return r.createElement("div",{className:"numeric"},this.props.label&&r.createElement("div",{className:"numeric-label"},this.props.label+": "),r.createElement("input",{type:"number",step:this.props.step,className:"numeric-input",value:this.state.value,onChange:function(t){return e.updateValue(t)}}))},t.defaultProps={step:1},t}(r.Component),j=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:n.props.target[n.props.propertyName].clone()},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onChange&&this.props.onChange(this.state.value),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.value,initialValue:e})},t.prototype.updateStateX=function(e){this._localChange=!0;var t=this.state.value.clone();this.props.target[this.props.propertyName].x=e,this.state.value.x=e,this.setState({value:this.state.value}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateY=function(e){this._localChange=!0;var t=this.state.value.clone();this.props.target[this.props.propertyName].y=e,this.state.value.y=e,this.setState({value:this.state.value}),this.raiseOnPropertyChanged(t)},t.prototype.render=function(){var e=this,t=this.state.isExpanded?r.createElement(h.a,{icon:y}):r.createElement(h.a,{icon:v});return r.createElement("div",{className:"vector3Line"},r.createElement("div",{className:"firstLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"vector"},"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)),r.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&r.createElement("div",{className:"secondLine"},r.createElement(A,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),r.createElement(A,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}})))},t.defaultProps={step:.001},t}(r.Component),I=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){return r.createElement(j,{label:"Value",target:this.props.connection,propertyName:"value"})},t}(r.Component),R=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,value:n.props.target[n.props.propertyName].clone()},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.value)&&!this._localChange)&&(t.value=n.clone(),this._localChange=!1,!0)},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onChange&&this.props.onChange(this.state.value),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.value,initialValue:e})},t.prototype.updateVector3=function(){var e=this.props.target[this.props.propertyName].clone();this.props.target[this.props.propertyName]=this.state.value,this.setState({value:e}),this.raiseOnPropertyChanged(e)},t.prototype.updateStateX=function(e){this._localChange=!0,this.state.value.x=e,this.updateVector3()},t.prototype.updateStateY=function(e){this._localChange=!0,this.state.value.y=e,this.updateVector3()},t.prototype.updateStateZ=function(e){this._localChange=!0,this.state.value.z=e,this.updateVector3()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?r.createElement(h.a,{icon:y}):r.createElement(h.a,{icon:v});return r.createElement("div",{className:"vector3Line"},r.createElement("div",{className:"firstLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"vector"},"X: "+this.state.value.x.toFixed(2)+", Y: "+this.state.value.y.toFixed(2)+", Z: "+this.state.value.z.toFixed(2)),r.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&r.createElement("div",{className:"secondLine"},r.createElement(A,{label:"x",step:this.props.step,value:this.state.value.x,onChange:function(t){return e.updateStateX(t)}}),r.createElement(A,{label:"y",step:this.props.step,value:this.state.value.y,onChange:function(t){return e.updateStateY(t)}}),r.createElement(A,{label:"z",step:this.props.step,value:this.state.value.z,onChange:function(t){return e.updateStateZ(t)}})))},t.defaultProps={step:.001},t}(r.Component),F=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){return r.createElement(R,{label:"Value",target:this.props.connection,propertyName:"value"})},t}(r.Component),D=function(e){function t(n){var r=e.call(this,n)||this;return r._localChange=!1,r._uniqueId=t._UniqueIdSeed++,r.props.isSelected?r.state={isSelected:r.props.isSelected()}:r.state={isSelected:!0===r.props.target[r.props.propertyName]},r}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n;return!((n=this.props.isSelected?e.isSelected():!0===e.target[e.propertyName])===t.isSelected&&!this._localChange)&&(t.isSelected=n,this._localChange=!1,!0)},t.prototype.onChange=function(){this._localChange=!0,this.props.onSelect?this.props.onSelect(!this.state.isSelected):(this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:!this.state.isSelected,initialValue:this.state.isSelected}),this.props.target[this.props.propertyName]=!this.state.isSelected),this.props.onValueChanged&&this.props.onValueChanged(),this.setState({isSelected:!this.state.isSelected})},t.prototype.render=function(){var e=this;return r.createElement("div",{className:"checkBoxLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"checkBox"},r.createElement("input",{type:"checkbox",id:"checkbox"+this._uniqueId,className:"cbx hidden",checked:this.state.isSelected,onChange:function(){return e.onChange()}}),r.createElement("label",{htmlFor:"checkbox"+this._uniqueId,className:"lbl"})))},t._UniqueIdSeed=0,t}(r.Component),W=(function(){}(),function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={value:t.target[t.propertyName]},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=e.target[e.propertyName];return null!=n&&n!==t.value&&(t.value=n,!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateValue=function(e){var t=this.props.valuesAreStrings?e:parseInt(e);this._localChange=!0;var n=this.state.value;this.props.noDirectUpdate||(this.props.target[this.props.propertyName]=t),this.setState({value:t}),this.raiseOnPropertyChanged(t,n),this.props.onSelect&&this.props.onSelect(t)},t.prototype.render=function(){var e=this;return r.createElement("div",{className:"listLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"options"},r.createElement("select",{onChange:function(t){return e.updateValue(t.target.value)},value:this.state.value},this.props.options.map(function(e){return r.createElement("option",{key:e.label,value:e.value},e.label)}))))},t}(r.Component)),z=function(e){function t(t){var n=e.call(this,t)||this;return n._localChange=!1,n.state={isExpanded:!1,color:n.props.target[n.props.propertyName].clone()},n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=e.target[e.propertyName];return!(n.equals(t.color)&&!this._localChange)&&(t.color=n.clone(),this._localChange=!1,!0)},t.prototype.onChange=function(e){this._localChange=!0;var t=i.Color3.FromHexString(e);this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:t,initialValue:this.state.color}),this.props.target[this.props.propertyName]=t,this.setState({color:t})},t.prototype.switchExpandState=function(){this._localChange=!0,this.setState({isExpanded:!this.state.isExpanded})},t.prototype.raiseOnPropertyChanged=function(e){this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:this.state.color,initialValue:e})},t.prototype.updateStateR=function(e){this._localChange=!0;var t=this.state.color.clone();this.props.target[this.props.propertyName].x=e,this.state.color.r=e,this.props.target[this.props.propertyName]=this.state.color,this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateG=function(e){this._localChange=!0;var t=this.state.color.clone();this.props.target[this.props.propertyName].g=e,this.state.color.g=e,this.props.target[this.props.propertyName]=this.state.color,this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.updateStateB=function(e){this._localChange=!0;var t=this.state.color.clone();this.props.target[this.props.propertyName].b=e,this.state.color.b=e,this.props.target[this.props.propertyName]=this.state.color,this.setState({color:this.state.color}),this.raiseOnPropertyChanged(t)},t.prototype.copyToClipboard=function(){var e=document.createElement("div");if(e.textContent=this.state.color.toHexString(),document.body.appendChild(e),window.getSelection){var t=document.createRange();t.selectNode(e),window.getSelection().removeAllRanges(),window.getSelection().addRange(t)}document.execCommand("copy"),e.remove()},t.prototype.render=function(){var e=this,t=this.state.isExpanded?r.createElement(h.a,{icon:y}):r.createElement(h.a,{icon:v}),n="Color3"===this.state.color.getClassName()?this.state.color:new i.Color3(this.state.color.r,this.state.color.g,this.state.color.b);return r.createElement("div",{className:"color3Line"},r.createElement("div",{className:"firstLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"color3"},r.createElement("input",{type:"color",value:n.toHexString(),onChange:function(t){return e.onChange(t.target.value)}})),r.createElement("div",{className:"copy hoverIcon",onClick:function(){return e.copyToClipboard()},title:"Copy to clipboard"},r.createElement(h.a,{icon:m})),r.createElement("div",{className:"expand hoverIcon",onClick:function(){return e.switchExpandState()},title:"Expand"},t)),this.state.isExpanded&&r.createElement("div",{className:"secondLine"},r.createElement(A,{label:"r",value:this.state.color.r,onChange:function(t){return e.updateStateR(t)}}),r.createElement(A,{label:"g",value:this.state.color.g,onChange:function(t){return e.updateStateG(t)}}),r.createElement(A,{label:"b",value:this.state.color.b,onChange:function(t){return e.updateStateB(t)}})))},t}(r.Component),U=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){return r.createElement(z,{label:"Value",target:this.props.connection,propertyName:"value"})},t}(r.Component),B=function(e){function t(t){var n=e.call(this,t)||this;n._localChange=!1;var r=n.props.target[n.props.propertyName];return n.state={value:r?n.props.isInteger?r.toFixed(0):r.toFixed(n.props.digits||3):"0"},n._store=r,n}return s(t,e),t.prototype.shouldComponentUpdate=function(e,t){if(this._localChange)return this._localChange=!1,!0;var n=e.target[e.propertyName],r=n?this.props.isInteger?n.toFixed(0):n.toFixed(this.props.digits||3):"0";return r!==t.value&&(t.value=r,!0)},t.prototype.raiseOnPropertyChanged=function(e,t){this.props.onChange&&this.props.onChange(e),this.props.onPropertyChangedObservable&&this.props.onPropertyChangedObservable.notifyObservers({object:this.props.target,property:this.props.propertyName,value:e,initialValue:t})},t.prototype.updateValue=function(e){var t;/[^0-9\.\-]/g.test(e)||(t=this.props.isInteger?parseInt(e):parseFloat(e),this._localChange=!0,this.setState({value:e}),isNaN(t)||(this.raiseOnPropertyChanged(t,this._store),this.props.target[this.props.propertyName]=t,this._store=t))},t.prototype.render=function(){var e=this;return r.createElement("div",null,r.createElement("div",{className:this.props.additionalClass?this.props.additionalClass+" floatLine":"floatLine"},r.createElement("div",{className:"label"},this.props.label),r.createElement("div",{className:"value"},r.createElement("input",{type:"number",step:this.props.step||"0.01",className:"numeric-input",value:this.state.value,onChange:function(t){return e.updateValue(t.target.value)}}))))},t}(r.Component),V=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return s(t,e),t.prototype.render=function(){return r.createElement(B,{label:"Value",target:this.props.connection,propertyName:"value"})},t}(r.Component),Y=function(e){function t(t){return e.call(this,t)||this}return s(t,e),t.prototype.renderValue=function(e){var t=this.props.inputNode.connection;switch(t.type){case i.NodeMaterialBlockConnectionPointTypes.Float:return r.createElement(V,{globalState:e,connection:t});case i.NodeMaterialBlockConnectionPointTypes.Vector2:return r.createElement(I,{globalState:e,connection:t});case i.NodeMaterialBlockConnectionPointTypes.Vector3:case i.NodeMaterialBlockConnectionPointTypes.Color3:case i.NodeMaterialBlockConnectionPointTypes.Color3OrColor4:case i.NodeMaterialBlockConnectionPointTypes.Color4:return r.createElement(U,{globalState:e,connection:t});case i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3:return r.createElement(F,{globalState:e,connection:t})}return null},t.prototype.setDefaultValue=function(){var e=this.props.inputNode.connection;switch(e.type){case i.NodeMaterialBlockConnectionPointTypes.Float:e.value=0;break;case i.NodeMaterialBlockConnectionPointTypes.Vector2:e.value=i.Vector2.Zero();break;case i.NodeMaterialBlockConnectionPointTypes.Vector3:case i.NodeMaterialBlockConnectionPointTypes.Color3:case i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3:e.value=i.Vector3.Zero();break;case i.NodeMaterialBlockConnectionPointTypes.Matrix:e.value=i.Matrix.Identity()}},t.prototype.render=function(){var e=this,t=this.props.inputNode.connection,n=[{label:"World",value:i.NodeMaterialWellKnownValues.World},{label:"WorldxView",value:i.NodeMaterialWellKnownValues.WorldView},{label:"WorldxViewxProjection",value:i.NodeMaterialWellKnownValues.WorldViewProjection},{label:"View",value:i.NodeMaterialWellKnownValues.View},{label:"ViewxProjection",value:i.NodeMaterialWellKnownValues.ViewProjection},{label:"Projection",value:i.NodeMaterialWellKnownValues.Projection},{label:"Automatic",value:i.NodeMaterialWellKnownValues.Automatic}];return r.createElement("div",null,r.createElement(b,{title:"GENERAL"},r.createElement(d,{label:"Type",value:function(e){switch(e){case i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3:case i.NodeMaterialBlockConnectionPointTypes.Vector4OrColor4:case i.NodeMaterialBlockConnectionPointTypes.Vector3OrVector4:case i.NodeMaterialBlockConnectionPointTypes.Vector3OrColor3OrVector4OrColor4:return"Vector";case i.NodeMaterialBlockConnectionPointTypes.Color3:case i.NodeMaterialBlockConnectionPointTypes.Color3OrColor4:case i.NodeMaterialBlockConnectionPointTypes.Color4:return"Color";default:return i.NodeMaterialBlockConnectionPointTypes[e]}}(t.type)})),r.createElement(b,{title:"PROPERTIES"},r.createElement(D,{label:"Is mesh attribute",onSelect:function(n){n?t.isAttribute=!0:t.isUniform=!0,e.props.globalState.onRebuildRequiredObservable.notifyObservers(),e.forceUpdate()},isSelected:function(){return t.isAttribute}}),t.isAttribute&&r.createElement(W,{label:"Attribute",valuesAreStrings:!0,options:[{label:"position",value:"position"},{label:"normal",value:"normal"},{label:"tangent",value:"tangent"},{label:"color",value:"color"},{label:"uv",value:"uv"},{label:"uv2",value:"uv2"}],target:t,propertyName:"name",onSelect:function(n){t.setAsAttribute(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isUniform&&r.createElement(D,{label:"Is well known value",onSelect:function(n){n?t.setAsWellKnownValue(i.NodeMaterialWellKnownValues.World):(t.setAsWellKnownValue(null),e.setDefaultValue()),e.props.globalState.onRebuildRequiredObservable.notifyObservers(),e.forceUpdate()},isSelected:function(){return t.isWellKnownValue}}),t.isUniform&&!t.isWellKnownValue&&this.renderValue(this.props.globalState),t.isUniform&&t.isWellKnownValue&&r.createElement(W,{label:"Well known value",options:n,target:t,propertyName:"wellKnownValue",onSelect:function(n){t.setAsWellKnownValue(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(r.Component),X=function(e){function t(){return e.call(this,"input")||this}return s(t,e),t.prototype.renderProperties=function(e){return this.connection?r.createElement(Y,{globalState:e,inputNode:this}):null},t}(f),G=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.props.node&&n.props.node.addListener({selectionChanged:function(){var e=n.props.node.selected;n.props.globalState.onSelectionChangedObservable.notifyObservers(e?n.props.node:null)}}),n}return s(t,e),t.prototype.render=function(){var e,t=new Array;if(this.props.node)for(var n in this.props.node.ports){e=this.props.node.ports[n],t.push(r.createElement("div",{key:n,className:"output-port"},r.createElement("div",{className:"output-port-label"}),r.createElement("div",{className:"output-port-plug"},r.createElement(u.PortWidget,{key:n,name:e.name,node:this.props.node}))));break}var o=this.props.node.connection,a="",l=e.name;if(o){if(o.isAttribute)a="mesh."+o.name;else if(o.isWellKnownValue)switch(o.wellKnownValue){case i.NodeMaterialWellKnownValues.World:a="World";break;case i.NodeMaterialWellKnownValues.WorldView:a="World x View";break;case i.NodeMaterialWellKnownValues.WorldViewProjection:a="World x View x Projection";break;case i.NodeMaterialWellKnownValues.View:a="View";break;case i.NodeMaterialWellKnownValues.ViewProjection:a="View x Projection";break;case i.NodeMaterialWellKnownValues.Projection:a="Projection";break;case i.NodeMaterialWellKnownValues.Automatic:a="Automatic"}}else l="Not connected input";return r.createElement("div",{className:"diagramBlock input"+(o&&o.isAttribute?" attribute":"")},r.createElement("div",{className:"header"},l),r.createElement("div",{className:"outputs"},t),r.createElement("div",{className:"value"},a))},t}(r.Component),q=function(e){function t(t){var n=e.call(this,"input")||this;return n._globalState=t,n}return s(t,e),t.prototype.generateReactWidget=function(e,t){return r.createElement(G,{node:t,globalState:this._globalState})},t.prototype.getNewInstance=function(){return new X},t}(u.AbstractNodeFactory);n(26);var H=function(e){function t(t){var n=e.call(this,t)||this;return n.state={logs:[]},n}return s(t,e),t.prototype.componentWillMount=function(){var e=this;this.props.globalState.onLogRequiredObservable.add(function(t){var n=e.state.logs;n.push.apply(n,t.split("\r\n")),e.setState({logs:n})})},t.prototype.componentDidUpdate=function(){var e=o.findDOMNode(this.refs["log-console"]);e&&(e.scrollTop=e.scrollHeight)},t.prototype.render=function(){return r.createElement("div",{id:"log-console",ref:"log-console"},this.state.logs.map(function(e,t){return r.createElement("div",{key:t,className:"log"},e)}))},t}(r.Component);n(28),n(30),n(32);var K=function(e){function t(t){var n=e.call(this,t)||this;return n._nodes=new Array,n._toAdd=[],n._rowPos=new Array,n._engine=new u.DiagramEngine,n._engine.installDefaultFactories(),n._engine.registerNodeFactory(new w(n.props.globalState)),n._engine.registerNodeFactory(new L(n.props.globalState)),n._engine.registerNodeFactory(new q(n.props.globalState)),n.props.globalState.onRebuildRequiredObservable.add(function(){n.props.globalState.nodeMaterial&&n.buildMaterial(),n.forceUpdate()}),n.props.globalState.onResetRequiredObservable.add(function(){n._rowPos=[],n.build(),n.props.globalState.nodeMaterial&&n.buildMaterial()}),n.props.globalState.onUpdateRequiredObservable.add(function(){n.forceUpdate()}),n.props.globalState.onZoomToFitRequiredObservable.add(function(){n._engine.zoomToFit()}),n.build(),n}return s(t,e),t.prototype.createNodeFromObject=function(e){var t;null==this._rowPos[e.column]?this._rowPos[e.column]=0:this._rowPos[e.column]++;var n=[];return e.nodeMaterialBlock?(e.nodeMaterialBlock instanceof i.TextureBlock?(t=new M,n.push("uv")):t=new x,e.nodeMaterialBlock.isFinalMerger&&this.props.globalState.nodeMaterial.addOutputNode(e.nodeMaterialBlock)):(t=new X).connection=e.connection,this._nodes.push(t),t.setPosition(1600-300*e.column,210*this._rowPos[e.column]),this._model.addAll(t),e.nodeMaterialBlock&&t.prepare(e,this._nodes,this._model,this,n),t},t.prototype.componentDidMount=function(){if(this.props.globalState.hostDocument){var e=this.refs.test;e.setState({document:this.props.globalState.hostDocument}),this.props.globalState.hostDocument.addEventListener("keyup",e.onKeyUpPointer,!1)}},t.prototype.componentWillUnmount=function(){if(this.props.globalState.hostDocument){var e=this.refs.test;this.props.globalState.hostDocument.removeEventListener("keyup",e.onKeyUpPointer,!1)}},t.prototype.buildMaterial=function(){if(this.props.globalState.nodeMaterial)try{this.props.globalState.nodeMaterial.build(!0),this.props.globalState.onLogRequiredObservable.notifyObservers("Node material build successful")}catch(e){this.props.globalState.onLogRequiredObservable.notifyObservers(e)}},t.prototype.build=function(){var e=this;if(this._model=new u.DiagramModel,this._model.addListener({nodesUpdated:function(t){if(!t.isCreated){var n=t.node.block;n&&n.isFinalMerger&&e.props.globalState.nodeMaterial.removeOutputNode(n)}},linksUpdated:function(t){if(!t.isCreated){e.props.globalState.onSelectionChangedObservable.notifyObservers(null);var n=p.SortInputOutput(t.link.sourcePort,t.link.targetPort);if(n&&n.input.connection){var r=n.input.connection.ownerBlock;r.isFinalMerger&&e.props.globalState.nodeMaterial.removeOutputNode(r),n.output.connection?(n.output.connection.disconnectFrom(n.input.connection),n.input.syncWithNodeMaterialConnectionPoint(n.input.connection),n.output.syncWithNodeMaterialConnectionPoint(n.output.connection)):n.input.connection.value&&(n.input.connection.value=null)}}t.link.addListener({sourcePortChanged:function(){console.log("port change")},targetPortChanged:function(){var n=p.SortInputOutput(t.link.sourcePort,t.link.targetPort);if(n){if(n.output.connection&&n.input.connection)n.output.connection.connectTo(n.input.connection);else if(n.input.connection&&!n.output.connection){var r=n.output.name;n.output.syncWithNodeMaterialConnectionPoint(n.input.connection),n.output.name=r,n.output.getNode().connection=n.output.connection,n.input.connection.value=n.output.defaultValue}e.props.globalState.nodeMaterial&&e.buildMaterial()}}})}}),this.props.globalState.nodeMaterial){var t=this.props.globalState.nodeMaterial;t._vertexOutputNodes.forEach(function(t){e.createNodeFromObject({column:0,nodeMaterialBlock:t})}),t._fragmentOutputNodes.forEach(function(t){e.createNodeFromObject({column:0,nodeMaterialBlock:t})})}setTimeout(function(){var t;e._toAdd&&(t=e._model).addAll.apply(t,e._toAdd),e._toAdd=null,e._engine.setDiagramModel(e._model),e.forceUpdate()},550)},t.prototype.addNodeFromClass=function(e){var t=this,n=new e(e.prototype.getClassName()),r=this.createNodeFromObject({column:0,nodeMaterialBlock:n}),o=this.refs.test;return this.forceUpdate(),setTimeout(function(){o.startFiringAction(new u.MoveCanvasAction(1,0,t._model))},500),r},t.prototype.addValueNode=function(e,t,n){void 0===t&&(t=0);var r=this.createNodeFromObject({column:t,type:e,connection:n}),o=new p(e,"output");if(r.addPort(o),!n)switch(e){case"Vector2":o.defaultValue=i.Vector2.Zero();break;case"Vector3":o.defaultValue=i.Vector3.Zero();break;case"Vector4":o.defaultValue=i.Vector4.Zero();break;case"Matrix":o.defaultValue=i.Matrix.Identity();break;case"Color3":o.defaultValue=i.Color3.White();break;case"Color4":o.defaultValue=new i.Color4(1,1,1,1)}return r},t.prototype.render=function(){var e=this;return r.createElement(E,{globalState:this.props.globalState},r.createElement("div",{id:"node-editor-graph-root"},r.createElement(P,{globalState:this.props.globalState,onAddValueNode:function(t){return e.addValueNode(t)},onAddNodeFromClass:function(t){return e.addNodeFromClass(t)}}),r.createElement(u.DiagramWidget,{deleteKeys:[46],ref:"test",inverseZoom:!0,className:"diagram-container",diagramEngine:this._engine,maxNumberPointsPerLink:0}),r.createElement(C,{globalState:this.props.globalState}),r.createElement(H,{globalState:this.props.globalState})))},t}(r.Component),$=function(){function e(){}return e.CreatePopup=function(e,t,n,r){var o=this;void 0===n&&(n=300),void 0===r&&(r=800);var i={width:n,height:r,top:(window.innerHeight-n)/2+window.screenY,left:(window.innerWidth-r)/2+window.screenX},a=Object.keys(i).map(function(e){return e+"="+i[e]}).join(","),l=window.open("",e,a);if(!l)return null;var s=l.document,u=s.createElement("link");u.rel="stylesheet",u.href="https://use.typekit.net/cta4xsb.css",s.head.appendChild(u),s.title=e,s.body.style.width="100%",s.body.style.height="100%",s.body.style.margin="0",s.body.style.padding="0";var c=s.createElement("div");return c.style.width="100%",c.style.height="100%",c.style.margin="0",c.style.padding="0",l.document.body.appendChild(c),this._CopyStyles(window.document,s),setTimeout(function(){o._CopyStyles(window.document,s)},0),this[t]=l,c},e._CopyStyles=function(e,t){for(var n=0;n-1;o--){var i=n[o],a=(i.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(a)>-1&&(r=i)}return h.head.insertBefore(t,r),e}}var N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function M(){for(var e=12,t="";e-- >0;)t+=N[62*Math.random()|0];return t}function L(e){return"".concat(e).replace(/&/g,"&").replace(/"/g,""").replace(/'/g,"'").replace(//g,">")}function A(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function j(e){return e.size!==S.size||e.x!==S.x||e.y!==S.y||e.rotate!==S.rotate||e.flipX||e.flipY}function I(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},i="translate(".concat(32*t.x,", ").concat(32*t.y,") "),a="scale(".concat(t.size/16*(t.flipX?-1:1),", ").concat(t.size/16*(t.flipY?-1:1),") "),l="rotate(".concat(t.rotate," 0 0)");return{outer:o,inner:{transform:"".concat(i," ").concat(a," ").concat(l)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var R={x:0,y:0,width:"100%",height:"100%"};function F(e){var t=e.icons,n=t.main,r=t.mask,o=e.prefix,a=e.iconName,l=e.transform,s=e.symbol,u=e.title,c=e.extra,p=e.watchable,f=void 0!==p&&p,d=r.found?r:n,h=d.width,g=d.height,m="fa-w-".concat(Math.ceil(h/g*16)),y=[P.replacementClass,a?"".concat(P.familyPrefix,"-").concat(a):"",m].filter(function(e){return-1===c.classes.indexOf(e)}).concat(c.classes).join(" "),v={children:[],attributes:i({},c.attributes,{"data-prefix":o,"data-icon":a,class:y,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(g)})};f&&(v.attributes[b]=""),u&&v.children.push({tag:"title",attributes:{id:v.attributes["aria-labelledby"]||"title-".concat(M())},children:[u]});var _=i({},v,{prefix:o,iconName:a,main:n,mask:r,transform:l,symbol:s,styles:c.styles}),x=r.found&&n.found?function(e){var t=e.children,n=e.attributes,r=e.main,o=e.mask,a=e.transform,l=r.width,s=r.icon,u=o.width,c=o.icon,p=I({transform:a,containerWidth:u,iconWidth:l}),f={tag:"rect",attributes:i({},R,{fill:"white"})},d={tag:"g",attributes:i({},p.inner),children:[{tag:"path",attributes:i({},s.attributes,p.path,{fill:"black"})}]},h={tag:"g",attributes:i({},p.outer),children:[d]},g="mask-".concat(M()),m="clip-".concat(M()),y={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:[c]},{tag:"mask",attributes:i({},R,{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[f,h]}]};return t.push(y,{tag:"rect",attributes:i({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(g,")")},R)}),{children:t,attributes:n}}(_):function(e){var t=e.children,n=e.attributes,r=e.main,o=e.transform,a=A(e.styles);if(a.length>0&&(n.style=a),j(o)){var l=I({transform:o,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:i({},l.outer),children:[{tag:"g",attributes:i({},l.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:i({},r.icon.attributes,l.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}(_),w=x.children,k=x.attributes;return _.children=w,_.attributes=k,s?function(e){var t=e.prefix,n=e.iconName,r=e.children,o=e.attributes,a=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:i({},o,{id:!0===a?"".concat(t,"-").concat(P.familyPrefix,"-").concat(n):a}),children:r}]}]}(_):function(e){var t=e.children,n=e.main,r=e.mask,o=e.attributes,a=e.styles,l=e.transform;if(j(l)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};o.style=A(i({},a,{"transform-origin":"".concat(s.x+l.x/16,"em ").concat(s.y+l.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}(_)}var D=function(){},W=(P.measurePerformance&&g&&g.mark&&g.measure,function(e,t,n,r){var o,i,a,l=Object.keys(e),s=l.length,u=void 0!==r?function(e,t){return function(n,r,o,i){return e.call(t,n,r,o,i)}}(t,r):t;for(void 0===n?(o=1,a=e[l[0]]):(o=0,a=n);o").concat(i.map(Y).join(""),"")}var X=function(e){var t={size:16,x:0,y:0,flipX:!1,flipY:!1,rotate:0};return e?e.toLowerCase().split(" ").reduce(function(e,t){var n=t.toLowerCase().split("-"),r=n[0],o=n.slice(1).join("-");if(r&&"h"===o)return e.flipX=!0,e;if(r&&"v"===o)return e.flipY=!0,e;if(o=parseFloat(o),isNaN(o))return e;switch(r){case"grow":e.size=e.size+o;break;case"shrink":e.size=e.size-o;break;case"left":e.x=e.x-o;break;case"right":e.x=e.x+o;break;case"up":e.y=e.y-o;break;case"down":e.y=e.y+o;break;case"rotate":e.rotate=e.rotate+o}return e},t):t};function G(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}G.prototype=Object.create(Error.prototype),G.prototype.constructor=G;var q={fill:"currentColor"},H={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},K={tag:"path",attributes:i({},q,{d:"M156.5,447.7l-12.6,29.5c-18.7-9.5-35.9-21.2-51.5-34.9l22.7-22.7C127.6,430.5,141.5,440,156.5,447.7z M40.6,272H8.5 c1.4,21.2,5.4,41.7,11.7,61.1L50,321.2C45.1,305.5,41.8,289,40.6,272z M40.6,240c1.4-18.8,5.2-37,11.1-54.1l-29.5-12.6 C14.7,194.3,10,216.7,8.5,240H40.6z M64.3,156.5c7.8-14.9,17.2-28.8,28.1-41.5L69.7,92.3c-13.7,15.6-25.5,32.8-34.9,51.5 L64.3,156.5z M397,419.6c-13.9,12-29.4,22.3-46.1,30.4l11.9,29.8c20.7-9.9,39.8-22.6,56.9-37.6L397,419.6z M115,92.4 c13.9-12,29.4-22.3,46.1-30.4l-11.9-29.8c-20.7,9.9-39.8,22.6-56.8,37.6L115,92.4z M447.7,355.5c-7.8,14.9-17.2,28.8-28.1,41.5 l22.7,22.7c13.7-15.6,25.5-32.9,34.9-51.5L447.7,355.5z M471.4,272c-1.4,18.8-5.2,37-11.1,54.1l29.5,12.6 c7.5-21.1,12.2-43.5,13.6-66.8H471.4z M321.2,462c-15.7,5-32.2,8.2-49.2,9.4v32.1c21.2-1.4,41.7-5.4,61.1-11.7L321.2,462z M240,471.4c-18.8-1.4-37-5.2-54.1-11.1l-12.6,29.5c21.1,7.5,43.5,12.2,66.8,13.6V471.4z M462,190.8c5,15.7,8.2,32.2,9.4,49.2h32.1 c-1.4-21.2-5.4-41.7-11.7-61.1L462,190.8z M92.4,397c-12-13.9-22.3-29.4-30.4-46.1l-29.8,11.9c9.9,20.7,22.6,39.8,37.6,56.9 L92.4,397z M272,40.6c18.8,1.4,36.9,5.2,54.1,11.1l12.6-29.5C317.7,14.7,295.3,10,272,8.5V40.6z M190.8,50 c15.7-5,32.2-8.2,49.2-9.4V8.5c-21.2,1.4-41.7,5.4-61.1,11.7L190.8,50z M442.3,92.3L419.6,115c12,13.9,22.3,29.4,30.5,46.1 l29.8-11.9C470,128.5,457.3,109.4,442.3,92.3z M397,92.4l22.7-22.7c-15.6-13.7-32.8-25.5-51.5-34.9l-12.6,29.5 C370.4,72.1,384.4,81.5,397,92.4z"})},$=i({},H,{attributeName:"opacity"});i({},q,{cx:"256",cy:"364",r:"28"}),i({},H,{attributeName:"r",values:"28;14;28;28;14;28;"}),i({},$,{values:"1;0;1;1;0;1;"}),i({},q,{opacity:"1",d:"M263.7,312h-16c-6.6,0-12-5.4-12-12c0-71,77.4-63.9,77.4-107.8c0-20-17.8-40.2-57.4-40.2c-29.1,0-44.3,9.6-59.2,28.7 c-3.9,5-11.1,6-16.2,2.4l-13.1-9.2c-5.6-3.9-6.9-11.8-2.6-17.2c21.2-27.2,46.4-44.7,91.2-44.7c52.3,0,97.4,29.8,97.4,80.2 c0,67.6-77.4,63.5-77.4,107.8C275.7,306.6,270.3,312,263.7,312z"}),i({},$,{values:"1;0;0;0;0;1;"}),i({},q,{opacity:"0",d:"M232.5,134.5l7,168c0.3,6.4,5.6,11.5,12,11.5h9c6.4,0,11.7-5.1,12-11.5l7-168c0.3-6.8-5.2-12.5-12-12.5h-23 C237.7,122,232.2,127.7,232.5,134.5z"}),i({},$,{values:"0;0;1;1;0;0;"}),E.styles;var Z='svg:not(:root).svg-inline--fa {\n overflow: visible;\n}\n\n.svg-inline--fa {\n display: inline-block;\n font-size: inherit;\n height: 1em;\n overflow: visible;\n vertical-align: -0.125em;\n}\n.svg-inline--fa.fa-lg {\n vertical-align: -0.225em;\n}\n.svg-inline--fa.fa-w-1 {\n width: 0.0625em;\n}\n.svg-inline--fa.fa-w-2 {\n width: 0.125em;\n}\n.svg-inline--fa.fa-w-3 {\n width: 0.1875em;\n}\n.svg-inline--fa.fa-w-4 {\n width: 0.25em;\n}\n.svg-inline--fa.fa-w-5 {\n width: 0.3125em;\n}\n.svg-inline--fa.fa-w-6 {\n width: 0.375em;\n}\n.svg-inline--fa.fa-w-7 {\n width: 0.4375em;\n}\n.svg-inline--fa.fa-w-8 {\n width: 0.5em;\n}\n.svg-inline--fa.fa-w-9 {\n width: 0.5625em;\n}\n.svg-inline--fa.fa-w-10 {\n width: 0.625em;\n}\n.svg-inline--fa.fa-w-11 {\n width: 0.6875em;\n}\n.svg-inline--fa.fa-w-12 {\n width: 0.75em;\n}\n.svg-inline--fa.fa-w-13 {\n width: 0.8125em;\n}\n.svg-inline--fa.fa-w-14 {\n width: 0.875em;\n}\n.svg-inline--fa.fa-w-15 {\n width: 0.9375em;\n}\n.svg-inline--fa.fa-w-16 {\n width: 1em;\n}\n.svg-inline--fa.fa-w-17 {\n width: 1.0625em;\n}\n.svg-inline--fa.fa-w-18 {\n width: 1.125em;\n}\n.svg-inline--fa.fa-w-19 {\n width: 1.1875em;\n}\n.svg-inline--fa.fa-w-20 {\n width: 1.25em;\n}\n.svg-inline--fa.fa-pull-left {\n margin-right: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-pull-right {\n margin-left: 0.3em;\n width: auto;\n}\n.svg-inline--fa.fa-border {\n height: 1.5em;\n}\n.svg-inline--fa.fa-li {\n width: 2em;\n}\n.svg-inline--fa.fa-fw {\n width: 1.25em;\n}\n\n.fa-layers svg.svg-inline--fa {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.fa-layers {\n display: inline-block;\n height: 1em;\n position: relative;\n text-align: center;\n vertical-align: -0.125em;\n width: 1em;\n}\n.fa-layers svg.svg-inline--fa {\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter, .fa-layers-text {\n display: inline-block;\n position: absolute;\n text-align: center;\n}\n\n.fa-layers-text {\n left: 50%;\n top: 50%;\n -webkit-transform: translate(-50%, -50%);\n transform: translate(-50%, -50%);\n -webkit-transform-origin: center center;\n transform-origin: center center;\n}\n\n.fa-layers-counter {\n background-color: #ff253a;\n border-radius: 1em;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n color: #fff;\n height: 1.5em;\n line-height: 1;\n max-width: 5em;\n min-width: 1.5em;\n overflow: hidden;\n padding: 0.25em;\n right: 0;\n text-overflow: ellipsis;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-bottom-right {\n bottom: 0;\n right: 0;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom right;\n transform-origin: bottom right;\n}\n\n.fa-layers-bottom-left {\n bottom: 0;\n left: 0;\n right: auto;\n top: auto;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: bottom left;\n transform-origin: bottom left;\n}\n\n.fa-layers-top-right {\n right: 0;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top right;\n transform-origin: top right;\n}\n\n.fa-layers-top-left {\n left: 0;\n right: auto;\n top: 0;\n -webkit-transform: scale(0.25);\n transform: scale(0.25);\n -webkit-transform-origin: top left;\n transform-origin: top left;\n}\n\n.fa-lg {\n font-size: 1.3333333333em;\n line-height: 0.75em;\n vertical-align: -0.0667em;\n}\n\n.fa-xs {\n font-size: 0.75em;\n}\n\n.fa-sm {\n font-size: 0.875em;\n}\n\n.fa-1x {\n font-size: 1em;\n}\n\n.fa-2x {\n font-size: 2em;\n}\n\n.fa-3x {\n font-size: 3em;\n}\n\n.fa-4x {\n font-size: 4em;\n}\n\n.fa-5x {\n font-size: 5em;\n}\n\n.fa-6x {\n font-size: 6em;\n}\n\n.fa-7x {\n font-size: 7em;\n}\n\n.fa-8x {\n font-size: 8em;\n}\n\n.fa-9x {\n font-size: 9em;\n}\n\n.fa-10x {\n font-size: 10em;\n}\n\n.fa-fw {\n text-align: center;\n width: 1.25em;\n}\n\n.fa-ul {\n list-style-type: none;\n margin-left: 2.5em;\n padding-left: 0;\n}\n.fa-ul > li {\n position: relative;\n}\n\n.fa-li {\n left: -2em;\n position: absolute;\n text-align: center;\n width: 2em;\n line-height: inherit;\n}\n\n.fa-border {\n border: solid 0.08em #eee;\n border-radius: 0.1em;\n padding: 0.2em 0.25em 0.15em;\n}\n\n.fa-pull-left {\n float: left;\n}\n\n.fa-pull-right {\n float: right;\n}\n\n.fa.fa-pull-left,\n.fas.fa-pull-left,\n.far.fa-pull-left,\n.fal.fa-pull-left,\n.fab.fa-pull-left {\n margin-right: 0.3em;\n}\n.fa.fa-pull-right,\n.fas.fa-pull-right,\n.far.fa-pull-right,\n.fal.fa-pull-right,\n.fab.fa-pull-right {\n margin-left: 0.3em;\n}\n\n.fa-spin {\n -webkit-animation: fa-spin 2s infinite linear;\n animation: fa-spin 2s infinite linear;\n}\n\n.fa-pulse {\n -webkit-animation: fa-spin 1s infinite steps(8);\n animation: fa-spin 1s infinite steps(8);\n}\n\n@-webkit-keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n\n@keyframes fa-spin {\n 0% {\n -webkit-transform: rotate(0deg);\n transform: rotate(0deg);\n }\n 100% {\n -webkit-transform: rotate(360deg);\n transform: rotate(360deg);\n }\n}\n.fa-rotate-90 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=1)";\n -webkit-transform: rotate(90deg);\n transform: rotate(90deg);\n}\n\n.fa-rotate-180 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2)";\n -webkit-transform: rotate(180deg);\n transform: rotate(180deg);\n}\n\n.fa-rotate-270 {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=3)";\n -webkit-transform: rotate(270deg);\n transform: rotate(270deg);\n}\n\n.fa-flip-horizontal {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=0, mirror=1)";\n -webkit-transform: scale(-1, 1);\n transform: scale(-1, 1);\n}\n\n.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(1, -1);\n transform: scale(1, -1);\n}\n\n.fa-flip-horizontal.fa-flip-vertical {\n -ms-filter: "progid:DXImageTransform.Microsoft.BasicImage(rotation=2, mirror=1)";\n -webkit-transform: scale(-1, -1);\n transform: scale(-1, -1);\n}\n\n:root .fa-rotate-90,\n:root .fa-rotate-180,\n:root .fa-rotate-270,\n:root .fa-flip-horizontal,\n:root .fa-flip-vertical {\n -webkit-filter: none;\n filter: none;\n}\n\n.fa-stack {\n display: inline-block;\n height: 2em;\n position: relative;\n width: 2.5em;\n}\n\n.fa-stack-1x,\n.fa-stack-2x {\n bottom: 0;\n left: 0;\n margin: auto;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.svg-inline--fa.fa-stack-1x {\n height: 1em;\n width: 1.25em;\n}\n.svg-inline--fa.fa-stack-2x {\n height: 2em;\n width: 2.5em;\n}\n\n.fa-inverse {\n color: #fff;\n}\n\n.sr-only {\n border: 0;\n clip: rect(0, 0, 0, 0);\n height: 1px;\n margin: -1px;\n overflow: hidden;\n padding: 0;\n position: absolute;\n width: 1px;\n}\n\n.sr-only-focusable:active, .sr-only-focusable:focus {\n clip: auto;\n height: auto;\n margin: 0;\n overflow: visible;\n position: static;\n width: auto;\n}';function Q(){var e=y,t=v,n=P.familyPrefix,r=P.replacementClass,o=Z;if(n!==e||r!==t){var i=new RegExp("\\.".concat(e,"\\-"),"g"),a=new RegExp("\\.".concat(t),"g");o=o.replace(i,".".concat(n,"-")).replace(a,".".concat(r))}return o}function J(e){return{found:!0,width:e[0],height:e[1],icon:{tag:"path",attributes:{fill:"currentColor",d:e.slice(4)[0]}}}}function ee(){P.autoAddCss&&!ie&&(T(Q()),ie=!0)}function te(e,t){return Object.defineProperty(e,"abstract",{get:t}),Object.defineProperty(e,"html",{get:function(){return e.abstract.map(function(e){return Y(e)})}}),Object.defineProperty(e,"node",{get:function(){if(m){var t=h.createElement("div");return t.innerHTML=e.html,t.children}}}),e}function ne(e){var t=e.prefix,n=void 0===t?"fa":t,r=e.iconName;if(r)return V(oe.definitions,n,r)||V(E.styles,n,r)}var re,oe=new(function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.definitions={}}var t,n,o;return t=e,(n=[{key:"add",value:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r1&&void 0!==arguments[1]?arguments[1]:{},n=t.transform,r=void 0===n?S:n,o=t.symbol,a=void 0!==o&&o,l=t.mask,s=void 0===l?null:l,u=t.title,c=void 0===u?null:u,p=t.classes,f=void 0===p?[]:p,d=t.attributes,h=void 0===d?{}:d,g=t.styles,m=void 0===g?{}:g;if(e){var y=e.prefix,v=e.iconName,b=e.icon;return te(i({type:"icon"},e),function(){return ee(),P.autoA11y&&(c?h["aria-labelledby"]="".concat(P.replacementClass,"-title-").concat(M()):h["aria-hidden"]="true"),F({icons:{main:J(b),mask:s?J(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:y,iconName:v,transform:i({},S,r),symbol:a,title:c,extra:{attributes:h,styles:m,classes:f}})})}},function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=(e||{}).icon?e:ne(e||{}),r=t.mask;return r&&(r=(r||{}).icon?r:ne(r||{})),re(n,i({},t,{mask:r}))})},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,a,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;sM.length&&M.push(e)}function j(e,t,n){return null==e?0:function e(t,n,r,o){var l=typeof t;"undefined"!==l&&"boolean"!==l||(t=null);var s=!1;if(null===t)s=!0;else switch(l){case"string":case"number":s=!0;break;case"object":switch(t.$$typeof){case i:case a:s=!0}}if(s)return r(o,t,""===n?"."+I(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var u=0;uthis.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=ue,e.release=ce}o(se.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=ae)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ae)},persist:function(){this.isPersistent=ae},isPersistent:le,destructor:function(){var e,t=this.constructor.Interface;for(e in t)this[e]=null;this.nativeEvent=this._targetInst=this.dispatchConfig=null,this.isPropagationStopped=this.isDefaultPrevented=le,this._dispatchInstances=this._dispatchListeners=null}}),se.Interface={type:null,target:null,currentTarget:function(){return null},eventPhase:null,bubbles:null,cancelable:null,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:null,isTrusted:null},se.extend=function(e){function t(){}function n(){return r.apply(this,arguments)}var r=this;t.prototype=r.prototype;var i=new t;return o(i,n.prototype),n.prototype=i,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,pe(n),n},pe(se);var fe=se.extend({data:null}),de=se.extend({data:null}),he=[9,13,27,32],ge=X&&"CompositionEvent"in window,me=null;X&&"documentMode"in document&&(me=document.documentMode);var ye=X&&"TextEvent"in window&&!me,ve=X&&(!ge||me&&8=me),be=String.fromCharCode(32),_e={beforeInput:{phasedRegistrationNames:{bubbled:"onBeforeInput",captured:"onBeforeInputCapture"},dependencies:["compositionend","keypress","textInput","paste"]},compositionEnd:{phasedRegistrationNames:{bubbled:"onCompositionEnd",captured:"onCompositionEndCapture"},dependencies:"blur compositionend keydown keypress keyup mousedown".split(" ")},compositionStart:{phasedRegistrationNames:{bubbled:"onCompositionStart",captured:"onCompositionStartCapture"},dependencies:"blur compositionstart keydown keypress keyup mousedown".split(" ")},compositionUpdate:{phasedRegistrationNames:{bubbled:"onCompositionUpdate",captured:"onCompositionUpdateCapture"},dependencies:"blur compositionupdate keydown keypress keyup mousedown".split(" ")}},xe=!1;function we(e,t){switch(e){case"keyup":return-1!==he.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"blur":return!0;default:return!1}}function ke(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Pe=!1;var Ce={eventTypes:_e,extractEvents:function(e,t,n,r){var o=void 0,i=void 0;if(ge)e:{switch(e){case"compositionstart":o=_e.compositionStart;break e;case"compositionend":o=_e.compositionEnd;break e;case"compositionupdate":o=_e.compositionUpdate;break e}o=void 0}else Pe?we(e,n)&&(o=_e.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=_e.compositionStart);return o?(ve&&"ko"!==n.locale&&(Pe||o!==_e.compositionStart?o===_e.compositionEnd&&Pe&&(i=ie()):(re="value"in(ne=r)?ne.value:ne.textContent,Pe=!0)),o=fe.getPooled(o,t,n,r),i?o.data=i:null!==(i=ke(n))&&(o.data=i),Y(o),i=o):i=null,(e=ye?function(e,t){switch(e){case"compositionend":return ke(t);case"keypress":return 32!==t.which?null:(xe=!0,be);case"textInput":return(e=t.data)===be&&xe?null:e;default:return null}}(e,n):function(e,t){if(Pe)return"compositionend"===e||!ge&&we(e,t)?(e=ie(),oe=re=ne=null,Pe=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1