!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=127)}([function(t,n){t.exports=e},function(e,t,n){"use strict";e.exports=n(128)},function(e,t,n){e.exports=n(132)()},function(e,t,n){var r;try{r={cloneDeep:n(264),constant:n(62),defaults:n(265),each:n(92),filter:n(95),find:n(266),flatten:n(122),forEach:n(93),forIn:n(271),has:n(106),isUndefined:n(107),last:n(272),map:n(108),mapValues:n(273),max:n(274),merge:n(276),min:n(282),minBy:n(283),now:n(284),pick:n(285),range:n(290),reduce:n(110),sortBy:n(293),uniqueId:n(298),values:n(115),zipObject:n(299)}}catch(e){}r||(r=window._),e.exports=r},function(e,t){var n=Array.isArray;e.exports=n},function(e,t,n){"use strict";(function(e){n.d(t,"a",function(){return y});var r=n(70),o=n(2),a=n.n(o),i=n(1),l=n.n(i),s="undefined"!=typeof window?window:void 0!==e?e:"undefined"!=typeof self?self:{};var c,u=(function(e){var t,n,r,o,a,i,l,c,u,p,d,f,h,g,m;t=s,n=function(e,t,r){if(!c(t)||p(t)||d(t)||f(t)||l(t))return t;var o,a=0,i=0;if(u(t))for(o=[],i=t.length;a=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?d({},e,t):{}}function b(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 y(e){var t=e.icon,n=e.mask,o=e.symbol,a=e.className,i=e.title,l=b(t),s=v("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},d(t,"fa-"+e.size,null!==e.size),d(t,"fa-rotate-"+e.rotation,null!==e.rotation),d(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(a.split(" ")))),c=v("transform","string"==typeof e.transform?r.b.transform(e.transform):e.transform),u=v("mask",b(n)),p=Object(r.a)(l,f({},s,c,u,{symbol:o,title:i}));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){y.defaultProps.hasOwnProperty(t)||(x[t]=e[t])}),w(h[0],x)}y.displayName="FontAwesomeIcon",y.propTypes={border:a.a.bool,className:a.a.string,mask:a.a.oneOfType([a.a.object,a.a.array,a.a.string]),fixedWidth:a.a.bool,inverse:a.a.bool,flip:a.a.oneOf(["horizontal","vertical","both"]),icon:a.a.oneOfType([a.a.object,a.a.array,a.a.string]),listItem:a.a.bool,pull:a.a.oneOf(["right","left"]),pulse:a.a.bool,rotation:a.a.oneOf([90,180,270]),size:a.a.oneOf(["lg","xs","sm","1x","2x","3x","4x","5x","6x","7x","8x","9x","10x"]),spin:a.a.bool,symbol:a.a.oneOfType([a.a.bool,a.a.string]),title:a.a.string,transform:a.a.oneOfType([a.a.string,a.a.object])},y.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 w=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)),a=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=u.camelize(t.slice(0,r)),a=t.slice(r+1).trim();return o.startsWith("webkit")?e[(n=o,n.charAt(0).toUpperCase()+n.slice(1))]=a:e[o]=a,e},{});break;default:0===t.indexOf("aria-")||0===t.indexOf("data-")?e.attrs[t.toLowerCase()]=r:e.attrs[u.camelize(t)]=r}return e},{attrs:{}}),i=r.style,l=void 0===i?{}:i,s=h(r,["style"]);return a.attrs.style=f({},a.attrs.style,l),t.apply(void 0,[n.tag,f({},a.attrs,s)].concat(g(o)))}.bind(null,l.a.createElement)}).call(this,n(50))},function(e,t,n){"use strict";var r=n(3),o=n(9).Graph;function a(e,t,n,o){var a;do{a=r.uniqueId(o)}while(e.hasNode(a));return n.dummy=t,e.setNode(a,n),a}function i(e){return r.max(r.map(e.nodes(),function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n}))}e.exports={addDummyNode:a,simplify:function(e){var t=(new o).setGraph(e.graph());return r.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},o=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+o.weight,minlen:Math.max(r.minlen,o.minlen)})}),t},asNonCompoundGraph:function(e){var t=new o({multigraph:e.isMultigraph()}).setGraph(e.graph());return r.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),r.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t},successorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.outEdges(t),function(t){n[t.w]=(n[t.w]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},predecessorWeights:function(e){var t=r.map(e.nodes(),function(t){var n={};return r.forEach(e.inEdges(t),function(t){n[t.v]=(n[t.v]||0)+e.edge(t).weight}),n});return r.zipObject(e.nodes(),t)},intersectRect:function(e,t){var n,r,o=e.x,a=e.y,i=t.x-o,l=t.y-a,s=e.width/2,c=e.height/2;if(!i&&!l)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(l)*s>Math.abs(i)*c?(l<0&&(c=-c),n=c*i/l,r=c):(i<0&&(s=-s),n=s,r=s*l/i);return{x:o+n,y:a+r}},buildLayerMatrix:function(e){var t=r.map(r.range(i(e)+1),function(){return[]});return r.forEach(e.nodes(),function(n){var o=e.node(n),a=o.rank;r.isUndefined(a)||(t[a][o.order]=n)}),t},normalizeRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank}));r.forEach(e.nodes(),function(n){var o=e.node(n);r.has(o,"rank")&&(o.rank-=t)})},removeEmptyRanks:function(e){var t=r.min(r.map(e.nodes(),function(t){return e.node(t).rank})),n=[];r.forEach(e.nodes(),function(r){var o=e.node(r).rank-t;n[o]||(n[o]=[]),n[o].push(r)});var o=0,a=e.graph().nodeRankFactor;r.forEach(n,function(t,n){r.isUndefined(t)&&n%a!=0?--o:o&&r.forEach(t,function(t){e.node(t).rank+=o})})},addBorderNode:function(e,t,n,r){var o={width:0,height:0};arguments.length>=4&&(o.rank=n,o.order=r);return a(e,"border",o,t)},maxRank:i,partition:function(e,t){var n={lhs:[],rhs:[]};return r.forEach(e,function(e){t(e)?n.lhs.push(e):n.rhs.push(e)}),n},time:function(e,t){var n=r.now();try{return t()}finally{console.log(e+" time: "+(r.now()-n)+"ms")}},notime:function(e,t){return t()}}},function(e,t,n){var r;try{r={clone:n(152),constant:n(62),each:n(92),filter:n(95),has:n(106),isArray:n(4),isEmpty:n(228),isFunction:n(27),isUndefined:n(107),keys:n(15),map:n(108),reduce:n(110),size:n(231),transform:n(237),union:n(238),values:n(115)}}catch(e){}r||(r=window._),e.exports=r},function(e,t){e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},function(e,t,n){var r;try{r=n(150)}catch(e){}r||(r=window.graphlib),e.exports=r},function(e,t,n){var r=n(75),o="object"==typeof self&&self&&self.Object===Object&&self,a=r||o||Function("return this")();e.exports=a},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(129)},function(e,t){e.exports=function(e){return null!=e&&"object"==typeof e}},function(e,t,n){var r=n(27),o=n(56);e.exports=function(e){return null!=e&&o(e.length)&&!r(e)}},function(e,t,n){var r=n(208),o=n(218),a=n(18),i=n(4),l=n(225);e.exports=function(e){return"function"==typeof e?e:null==e?a:"object"==typeof e?i(e)?o(e[0],e[1]):r(e):l(e)}},function(e,t,n){var r=n(78),o=n(58),a=n(13);e.exports=function(e){return a(e)?r(e):o(e)}},function(e,t,n){var r=n(163),o=n(168);e.exports=function(e,t){var n=o(e,t);return r(n)?n:void 0}},function(e,t,n){var r=n(20),o=n(164),a=n(165),i="[object Null]",l="[object Undefined]",s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?l:i:s&&s in Object(e)?o(e):a(e)}},function(e,t){e.exports=function(e){return e}},function(e,t){e.exports=function(e,t){return e===t||e!=e&&t!=t}},function(e,t,n){var r=n(10).Symbol;e.exports=r},function(e,t,n){(function(e){var r=n(10),o=n(184),a=t&&!t.nodeType&&t,i=a&&"object"==typeof e&&e&&!e.nodeType&&e,l=i&&i.exports===a?r.Buffer:void 0,s=(l?l.isBuffer:void 0)||o;e.exports=s}).call(this,n(55)(e))},function(e,t,n){var r=n(78),o=n(188),a=n(13);e.exports=function(e){return a(e)?r(e,!0):o(e)}},function(e,t,n){var r=n(193),o=n(52),a=n(194),i=n(87),l=n(195),s=n(17),c=n(76),u=c(r),p=c(o),d=c(a),f=c(i),h=c(l),g=s;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||o&&"[object Map]"!=g(new o)||a&&"[object Promise]"!=g(a.resolve())||i&&"[object Set]"!=g(new i)||l&&"[object WeakMap]"!=g(new l))&&(g=function(e){var t=s(e),n="[object Object]"==t?e.constructor:void 0,r=n?c(n):"";if(r)switch(r){case u:return"[object DataView]";case p:return"[object Map]";case d:return"[object Promise]";case f:return"[object Set]";case h:return"[object WeakMap]"}return t}),e.exports=g},function(e,t,n){var r=n(17),o=n(12),a="[object Symbol]";e.exports=function(e){return"symbol"==typeof e||o(e)&&r(e)==a}},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=(i=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */"),a=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(a).concat([o]).join("\n")}var i;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&&u.splice(t,1)}function m(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),v(t,e.attrs),h(e,t),t}function v(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function b(e,t){var n,r,o,a;if(t.transform&&e.css){if(!(a=t.transform(e.css)))return function(){};e.css=a}if(t.singleton){var i=c++;n=s||(s=m(t)),r=x.bind(null,n,i,!1),o=x.bind(null,n,i,!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",v(t,e.attrs),h(e,t),t}(t),r=function(e,t,n){var r=n.css,o=n.sourceMap,a=void 0===t.convertToAbsoluteUrls&&o;(t.convertToAbsoluteUrls||a)&&(r=p(r));o&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */");var i=new Blob([r],{type:"text/css"}),l=e.href;e.href=URL.createObjectURL(i),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=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return d(n,t),function(e){for(var r=[],o=0;o-1&&e%1==0&&e0&&l.push({label:"Mesh attribute",value:1}),n.length>0&&l.push({label:"System value",value:2});return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},t.isUniform&&!t.isSystemValue&&t.animationType===i.AnimatedInputBlockTypes.None&&o.createElement(z,{label:"Type",options:[{label:"None",value:0},{label:"Visible in the inspector",value:1},{label:"Constant",value:2}],target:t,noDirectUpdate:!0,getSelection:function(e){return e.visibleInInspector?1:e.isConstant?2:0},onSelect:function(n){switch(n){case 0:t.visibleInInspector=!1,t.isConstant=!1;break;case 1:t.visibleInInspector=!0,t.isConstant=!1;break;case 2:t.visibleInInspector=!1,t.isConstant=!0}e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.visibleInInspector&&o.createElement(U,{globalState:this.props.globalState,label:"Group",propertyName:"groupInInspector",target:this.props.block,onChange:function(){e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),o.createElement(z,{label:"Mode",options:l,target:t,noDirectUpdate:!0,getSelection:function(e){return e.isAttribute?1:e.isSystemValue?2:0},onSelect:function(o){switch(o){case 0:t.isUniform=!0,t.setAsSystemValue(null),e.setDefaultValue();break;case 1:t.setAsAttribute(r[0].value);break;case 2:t.setAsSystemValue(n[0].value)}e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isAttribute&&o.createElement(z,{label:"Attribute",valuesAreStrings:!0,options:r,target:t,propertyName:"name",onSelect:function(n){t.setAsAttribute(n),e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isUniform&&a.length>0&&o.createElement(z,{label:"Animation type",options:a,target:t,propertyName:"animationType",onSelect:function(t){e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),t.isUniform&&!t.isSystemValue&&t.animationType===i.AnimatedInputBlockTypes.None&&this.renderValue(this.props.globalState),t.isUniform&&t.isSystemValue&&o.createElement(z,{label:"System value",options:n,target:t,propertyName:"systemValue",onSelect:function(n){t.setAsSystemValue(n),e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),G=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(o.Fragment,null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(C,{label:"Transform as direction",onSelect:function(t){var n=e.props.block;n.complementW=t?0:1,e.props.globalState.onRebuildRequiredObservable.notifyObservers()},isSelected:function(){return 0===e.props.block.complementW}})))},t}(o.Component),q=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(o.Fragment,null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(C,{label:"Invert X axis",target:this.props.block,propertyName:"invertX",onValueChanged:function(){return e.props.globalState.onRebuildRequiredObservable.notifyObservers()}}),o.createElement(C,{label:"Invert Y axis",target:this.props.block,propertyName:"invertY",onValueChanged:function(){return e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),Z=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.render=function(){var e=this;return o.createElement(o.Fragment,null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(C,{label:"Use Manhattan Distance",target:this.props.block,propertyName:"manhattanDistance",onValueChanged:function(){return e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),Q=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.forceRebuild=function(){this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.props.globalState.onRebuildRequiredObservable.notifyObservers()},t.prototype.render=function(){var e=this,t=this.props.block;return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(k,{globalState:this.props.globalState,label:"Minimum",propertyName:"minimum",target:t,onChange:function(){return e.forceRebuild()}}),o.createElement(k,{globalState:this.props.globalState,label:"Maximum",propertyName:"maximum",target:t,onChange:function(){return e.forceRebuild()}})))},t}(o.Component),K=function(e){function t(t){var n=e.call(this,t)||this;return n.state={gradient:t.step.step},n}return c(t,e),t.prototype.updateColor=function(e){this.props.step.color=i.Color3.FromHexString(e),this.props.onUpdateStep(),this.forceUpdate()},t.prototype.updateStep=function(e){this.props.step.step=e,this.setState({gradient:e}),this.props.onUpdateStep()},t.prototype.onPointerUp=function(){this.props.onCheckForReOrder()},t.prototype.render=function(){var e=this,t=this.props.step;return o.createElement("div",{className:"gradient-step"},o.createElement("div",{className:"step"},"#"+this.props.lineIndex),o.createElement("input",{type:"color",value:t.color.toHexString(),onChange:function(t){return e.updateColor(t.target.value)}}),o.createElement("div",{className:"step-value"},t.step.toFixed(2)),o.createElement("div",{className:"step-slider"},o.createElement("input",{className:"range",type:"range",step:.01,min:0,max:1,value:t.step,onPointerUp:function(t){return e.onPointerUp()},onChange:function(t){return e.updateStep(parseFloat(t.target.value))}})),o.createElement("div",{className:"gradient-delete",onClick:function(){return e.props.onDelete()}},o.createElement(p.a,{icon:g})))},t}(o.Component),$=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.forceRebuild=function(){this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.props.globalState.onRebuildRequiredObservable.notifyObservers()},t.prototype.deleteStep=function(e){var t=this.props.block,n=t.colorSteps.indexOf(e);n>-1&&(t.colorSteps.splice(n,1),this.forceRebuild(),this.forceUpdate())},t.prototype.addNewStep=function(){var e=this.props.block,t=new i.GradientBlockColorStep(1,i.Color3.White());e.colorSteps.push(t),this.forceRebuild(),this.forceUpdate()},t.prototype.checkForReOrder=function(){this.props.block.colorSteps.sort(function(e,t){return e.step===t.step?0:e.step>t.step?1:-1}),this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.forceUpdate()},t.prototype.render=function(){var e=this,t=this.props.block;return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"STEPS"},o.createElement(y,{label:"Add new step",onClick:function(){return e.addNewStep()}}),t.colorSteps.map(function(t,n){return o.createElement(K,{globalState:e.props.globalState,onCheckForReOrder:function(){return e.checkForReOrder()},onUpdateStep:function(){return e.forceRebuild()},key:"step-"+n,lineIndex:n,step:t,onDelete:function(){return e.deleteStep(t)}})})))},t}(o.Component),J=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this,t=this.props.globalState.nodeMaterial.getScene(),n=t.lights.map(function(e){return{label:e.name,value:e.name}});n.splice(0,0,{label:"All",value:""});var r=this.props.block;return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(z,{label:"Light",defaultIfNull:0,noDirectUpdate:!0,valuesAreStrings:!0,options:n,target:r,propertyName:"name",onSelect:function(n){r.light=""===n?null:t.getLightByName(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),ee=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.render=function(){var e=this,t=this.props.globalState.nodeMaterial.getScene(),n=t.lights.map(function(e){return{label:e.name,value:e.name}}),r=this.props.block;return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(z,{label:"Light",noDirectUpdate:!0,valuesAreStrings:!0,options:n,target:r,propertyName:"name",onSelect:function(n){r.light=t.getLightByName(n),e.forceUpdate(),e.props.globalState.onRebuildRequiredObservable.notifyObservers()}})))},t}(o.Component),te=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.forceRebuild=function(){this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.props.globalState.onRebuildRequiredObservable.notifyObservers()},t.prototype.render=function(){var e=this,t=this.props.block;return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(T,{globalState:this.props.globalState,label:"From",propertyName:"sourceRange",target:t,onChange:function(){return e.forceRebuild()}}),o.createElement(T,{globalState:this.props.globalState,label:"To",propertyName:"targetRange",target:t,onChange:function(){return e.forceRebuild()}})))},t}(o.Component),ne=function(e){function t(t){var n=e.call(this,t)||this,r=n.textureBlock.texture;return n.state={isEmbedded:!r||"data"===r.name.substring(0,4),loadAsCubeTexture:r&&r.isCube},n}return c(t,e),Object.defineProperty(t.prototype,"textureBlock",{get:function(){return this.props.block},enumerable:!0,configurable:!0}),t.prototype.UNSAFE_componentWillUpdate=function(e,t){if(e.block!==this.props.block){var n=e.block.texture;t.isEmbedded=!n||"data"===n.name.substring(0,4),t.loadAsCubeTexture=n&&n.isCube}},t.prototype._generateRandomForCache=function(){return"xxxxxxxxxxxxxxxxxxxx".replace(/[x]/g,function(e){return(10*Math.random()|0).toString()})},t.prototype.updateAfterTextureLoad=function(){this.props.globalState.onUpdateRequiredObservable.notifyObservers(),this.props.globalState.onRebuildRequiredObservable.notifyObservers(),this.forceUpdate()},t.prototype.removeTexture=function(){var e=this.textureBlock.texture;e&&(e.dispose(),e=null,this.textureBlock.texture=null),this.updateAfterTextureLoad()},t.prototype._prepareTexture=function(){var e=this.textureBlock.texture;e&&e.isCube!==this.state.loadAsCubeTexture&&(e.dispose(),e=null),e||(this.state.loadAsCubeTexture?(this.textureBlock.texture=new i.CubeTexture("",this.props.globalState.nodeMaterial.getScene()),(e=this.textureBlock.texture).coordinatesMode=i.Texture.CUBIC_MODE):(this.textureBlock.texture=new i.Texture(null,this.props.globalState.nodeMaterial.getScene(),!1,this.textureBlock instanceof i.ReflectionTextureBlock),(e=this.textureBlock.texture).coordinatesMode=i.Texture.EQUIRECTANGULAR_MODE))},t.prototype.replaceTexture=function(e){var t=this;this._prepareTexture();var n=this.textureBlock.texture;i.Tools.ReadFile(e,function(r){var o=new Blob([r],{type:"octet/stream"}),a=new FileReader;a.readAsDataURL(o),a.onloadend=function(){var r=a.result,o=void 0;e.name.toLowerCase().indexOf(".dds")>0?o=".dds":e.name.toLowerCase().indexOf(".env")>0&&(o=".env"),n.updateURL(r,o,function(){return t.updateAfterTextureLoad()})}},void 0,!0)},t.prototype.replaceTextureWithUrl=function(e){var t=this;this._prepareTexture();var n=this.textureBlock.texture;if(n.isCube||this.textureBlock instanceof i.ReflectionTextureBlock){var r=void 0;e.toLowerCase().indexOf(".dds")>0?r=".dds":e.toLowerCase().indexOf(".env")>0&&(r=".env"),n.updateURL(e,r,function(){return t.updateAfterTextureLoad()})}else n.updateURL(e,null,function(){return t.updateAfterTextureLoad()})},t.prototype.render=function(){var e=this,t="",n=this.textureBlock.texture;n&&n.name&&"data"!==n.name.substring(0,4)&&(t=n.name),t=t.replace(/\?nocache=\d+/,"");var r=this.textureBlock instanceof i.ReflectionTextureBlock,a=[{label:"Cubic",value:i.Texture.CUBIC_MODE},{label:"Equirectangular",value:i.Texture.EQUIRECTANGULAR_MODE},{label:"Explicit",value:i.Texture.EXPLICIT_MODE},{label:"Fixed equirectangular",value:i.Texture.FIXED_EQUIRECTANGULAR_MODE},{label:"Fixed mirrored equirectangular",value:i.Texture.FIXED_EQUIRECTANGULAR_MIRRORED_MODE},{label:"Planar",value:i.Texture.PLANAR_MODE},{label:"Projection",value:i.Texture.PROJECTION_MODE},{label:"Skybox",value:i.Texture.SKYBOX_MODE},{label:"Spherical",value:i.Texture.SPHERICAL_MODE}];return o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(C,{label:"Auto select UV",propertyName:"autoSelectUV",target:this.props.block,onValueChanged:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(C,{label:"Convert to gamma space",propertyName:"convertToGammaSpace",target:this.props.block,onValueChanged:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&r&&o.createElement(z,{label:"Reflection mode",options:a,target:n,propertyName:"coordinatesMode",onSelect:function(t){n.coordinatesMode=t,e.forceUpdate(),e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(C,{label:"Clamp U",isSelected:function(){return n.wrapU===i.Texture.CLAMP_ADDRESSMODE},onSelect:function(t){n.wrapU=t?i.Texture.CLAMP_ADDRESSMODE:i.Texture.WRAP_ADDRESSMODE,e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(C,{label:"Clamp V",isSelected:function(){return n.wrapV===i.Texture.CLAMP_ADDRESSMODE},onSelect:function(t){n.wrapV=t?i.Texture.CLAMP_ADDRESSMODE:i.Texture.WRAP_ADDRESSMODE,e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(k,{globalState:this.props.globalState,label:"Offset U",target:n,propertyName:"uOffset",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(k,{globalState:this.props.globalState,label:"Offset V",target:n,propertyName:"vOffset",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(k,{globalState:this.props.globalState,label:"Scale U",target:n,propertyName:"uScale",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(k,{globalState:this.props.globalState,label:"Scale V",target:n,propertyName:"vScale",onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(S,{label:"Rotation U",target:n,propertyName:"uAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(S,{label:"Rotation V",target:n,propertyName:"vAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}}),n&&!r&&o.createElement(S,{label:"Rotation W",target:n,propertyName:"wAng",minimum:0,maximum:2*Math.PI,useEuler:!0,step:.1,onChange:function(){e.props.globalState.onUpdateRequiredObservable.notifyObservers()}})),o.createElement(m,{title:"SOURCE"},o.createElement(C,{label:"Embed static texture",isSelected:function(){return e.state.isEmbedded},onSelect:function(t){e.setState({isEmbedded:t}),e.textureBlock.texture=null,e.updateAfterTextureLoad()}}),r&&o.createElement(C,{label:"Load as cube texture",isSelected:function(){return e.state.loadAsCubeTexture},onSelect:function(t){return e.setState({loadAsCubeTexture:t})}}),this.state.isEmbedded&&o.createElement(x,{label:"Upload",onClick:function(t){return e.replaceTexture(t)},accept:".jpg, .png, .tga, .dds, .env"}),!this.state.isEmbedded&&o.createElement(U,{label:"Link",globalState:this.props.globalState,value:t,onChange:function(t){return e.replaceTextureWithUrl(t)}}),!this.state.isEmbedded&&t&&o.createElement(y,{label:"Refresh",onClick:function(){return e.replaceTextureWithUrl(t+"?nocache="+e._generateRandomForCache())}}),n&&o.createElement(y,{label:"Remove",onClick:function(){return e.removeTexture()}})))},t}(o.Component),re=function(e){function t(t){return e.call(this,t)||this}return c(t,e),t.prototype.render=function(){var e=this,t=this.props.block,n=[{label:"Cos",value:i.TrigonometryBlockOperations.Cos},{label:"Sin",value:i.TrigonometryBlockOperations.Sin},{label:"Abs",value:i.TrigonometryBlockOperations.Abs},{label:"Exp",value:i.TrigonometryBlockOperations.Exp},{label:"Exp2",value:i.TrigonometryBlockOperations.Exp2},{label:"Round",value:i.TrigonometryBlockOperations.Round},{label:"Ceiling",value:i.TrigonometryBlockOperations.Ceiling},{label:"Floor",value:i.TrigonometryBlockOperations.Floor},{label:"ArcCos",value:i.TrigonometryBlockOperations.ArcCos},{label:"ArcSin",value:i.TrigonometryBlockOperations.ArcSin},{label:"ArcTan",value:i.TrigonometryBlockOperations.ArcTan},{label:"Tan",value:i.TrigonometryBlockOperations.Tan},{label:"Log",value:i.TrigonometryBlockOperations.Log},{label:"Fract",value:i.TrigonometryBlockOperations.Fract},{label:"Sign",value:i.TrigonometryBlockOperations.Sign},{label:"Radians to degrees",value:i.TrigonometryBlockOperations.Degrees},{label:"Degrees to radians",value:i.TrigonometryBlockOperations.Radians}];return n.sort(function(e,t){return e.label.localeCompare(t.label)}),o.createElement("div",null,o.createElement(V,{globalState:this.props.globalState,block:this.props.block}),o.createElement(m,{title:"PROPERTIES"},o.createElement(z,{label:"Operation",options:n,target:t,propertyName:"operation",onSelect:function(t){e.props.globalState.onUpdateRequiredObservable.notifyObservers(),e.props.globalState.onRebuildRequiredObservable.notifyObservers(),e.forceUpdate()}})))},t}(o.Component),oe=function(){function e(){}return e.RegisteredControls={},e}();oe.RegisteredControls.TransformBlock=G,oe.RegisteredControls.InputBlock=X,oe.RegisteredControls.PerturbNormalBlock=q,oe.RegisteredControls.WorleyNoise3DBlock=Z,oe.RegisteredControls.ClampBlock=Q,oe.RegisteredControls.GradientBlock=$,oe.RegisteredControls.LightBlock=J,oe.RegisteredControls.LightInformationBlock=ee,oe.RegisteredControls.RemapBlock=te,oe.RegisteredControls.TextureBlock=ne,oe.RegisteredControls.ReflectionTextureBlock=ne,oe.RegisteredControls.TrigonometryBlock=re;var ae=function(){function e(){}return e.GetBlockFromString=function(e,t,n){switch(e){case"DesaturateBlock":return new i.DesaturateBlock("Desaturate");case"RefractBlock":return new i.RefractBlock("Refract");case"ReflectBlock":return new i.ReflectBlock("Reflect");case"DerivativeBlock":return new i.DerivativeBlock("Derivative");case"Rotate2dBlock":return new i.Rotate2dBlock("Rotate2d");case"NormalBlendBlock":return new i.NormalBlendBlock("NormalBlend");case"WorleyNoise3DBlock":return new i.WorleyNoise3DBlock("WorleyNoise3D");case"SimplexPerlin3DBlock":return new i.SimplexPerlin3DBlock("SimplexPerlin3D");case"BonesBlock":return new i.BonesBlock("Bones");case"InstancesBlock":return new i.InstancesBlock("Instances");case"MorphTargetsBlock":return new i.MorphTargetsBlock("MorphTargets");case"DiscardBlock":return new i.DiscardBlock("Discard");case"ImageProcessingBlock":return new i.ImageProcessingBlock("ImageProcessing");case"ColorMergerBlock":return new i.ColorMergerBlock("ColorMerger");case"VectorMergerBlock":return new i.VectorMergerBlock("VectorMerger");case"ColorSplitterBlock":return new i.ColorSplitterBlock("ColorSplitter");case"VectorSplitterBlock":return new i.VectorSplitterBlock("VectorSplitter");case"TextureBlock":return new i.TextureBlock("Texture");case"ReflectionTextureBlock":return new i.ReflectionTextureBlock("Reflection texture");case"LightBlock":return new i.LightBlock("Lights");case"FogBlock":return new i.FogBlock("Fog");case"VertexOutputBlock":return new i.VertexOutputBlock("VertexOutput");case"FragmentOutputBlock":return new i.FragmentOutputBlock("FragmentOutput");case"AddBlock":return new i.AddBlock("Add");case"ClampBlock":return new i.ClampBlock("Clamp");case"ScaleBlock":return new i.ScaleBlock("Scale");case"CrossBlock":return new i.CrossBlock("Cross");case"DotBlock":return new i.DotBlock("Dot");case"PowBlock":return new i.PowBlock("Pow");case"MultiplyBlock":return new i.MultiplyBlock("Multiply");case"TransformBlock":return new i.TransformBlock("Transform");case"TrigonometryBlock":return new i.TrigonometryBlock("Trigonometry");case"RemapBlock":return new i.RemapBlock("Remap");case"NormalizeBlock":return new i.NormalizeBlock("Normalize");case"FresnelBlock":return new i.FresnelBlock("Fresnel");case"LerpBlock":return new i.LerpBlock("Lerp");case"NLerpBlock":return new i.NLerpBlock("NLerp");case"DivideBlock":return new i.DivideBlock("Divide");case"SubtractBlock":return new i.SubtractBlock("Subtract");case"StepBlock":return new i.StepBlock("Step");case"SmoothStepBlock":return new i.SmoothStepBlock("Smooth step");case"OneMinusBlock":return new i.OneMinusBlock("One minus");case"ReciprocalBlock":return new i.ReciprocalBlock("Reciprocal");case"ViewDirectionBlock":return new i.ViewDirectionBlock("View direction");case"LightInformationBlock":var r=new i.LightInformationBlock("Light information");return r.light=t.lights.length?t.lights[0]:null,r;case"MaxBlock":return new i.MaxBlock("Max");case"MinBlock":return new i.MinBlock("Min");case"LengthBlock":return new i.LengthBlock("Length");case"DistanceBlock":return new i.DistanceBlock("Distance");case"NegateBlock":return new i.NegateBlock("Negate");case"PerturbNormalBlock":return new i.PerturbNormalBlock("Perturb normal");case"RandomNumberBlock":return new i.RandomNumberBlock("Random number");case"ReplaceColorBlock":return new i.ReplaceColorBlock("Replace color");case"PosterizeBlock":return new i.PosterizeBlock("Posterize");case"ArcTan2Block":return new i.ArcTan2Block("ArcTan2");case"GradientBlock":return new i.GradientBlock("Gradient");case"FrontFacingBlock":return new i.FrontFacingBlock("Front facing");case"CosBlock":var o=new i.TrigonometryBlock("Cos");return o.operation=i.TrigonometryBlockOperations.Cos,o;case"SinBlock":var a=new i.TrigonometryBlock("Sin");return a.operation=i.TrigonometryBlockOperations.Sin,a;case"AbsBlock":var l=new i.TrigonometryBlock("Abs");return l.operation=i.TrigonometryBlockOperations.Abs,l;case"SqrtBlock":var s=new i.TrigonometryBlock("Sqrt");return s.operation=i.TrigonometryBlockOperations.Sqrt,s;case"ArcCosBlock":var c=new i.TrigonometryBlock("ArcCos");return c.operation=i.TrigonometryBlockOperations.ArcCos,c;case"ArcSinBlock":var u=new i.TrigonometryBlock("ArcSin");return u.operation=i.TrigonometryBlockOperations.ArcSin,u;case"TanBlock":var p=new i.TrigonometryBlock("Tan");return p.operation=i.TrigonometryBlockOperations.Tan,p;case"ArcTanBlock":var d=new i.TrigonometryBlock("ArcTan");return d.operation=i.TrigonometryBlockOperations.ArcTan,d;case"FractBlock":var f=new i.TrigonometryBlock("Fract");return f.operation=i.TrigonometryBlockOperations.Fract,f;case"SignBlock":var h=new i.TrigonometryBlock("Sign");return h.operation=i.TrigonometryBlockOperations.Sign,h;case"LogBlock":var g=new i.TrigonometryBlock("Log");return g.operation=i.TrigonometryBlockOperations.Log,g;case"ExpBlock":var m=new i.TrigonometryBlock("Exp");return m.operation=i.TrigonometryBlockOperations.Exp,m;case"Exp2Block":var v=new i.TrigonometryBlock("Exp2");return v.operation=i.TrigonometryBlockOperations.Exp2,v;case"DegreesToRadiansBlock":var b=new i.TrigonometryBlock("Degrees to radians");return b.operation=i.TrigonometryBlockOperations.Radians,b;case"RadiansToDegreesBlock":var y=new i.TrigonometryBlock("Radians to degrees");return y.operation=i.TrigonometryBlockOperations.Degrees,y;case"RoundBlock":var w=new i.TrigonometryBlock("Round");return w.operation=i.TrigonometryBlockOperations.Round,w;case"CeilingBlock":var x=new i.TrigonometryBlock("Ceiling");return x.operation=i.TrigonometryBlockOperations.Ceiling,x;case"FloorBlock":var _=new i.TrigonometryBlock("Floor");return _.operation=i.TrigonometryBlockOperations.Floor,_;case"SawToothWaveBlock":var C=new i.WaveBlock("SawTooth wave");return C.kind=i.WaveBlockKind.SawTooth,C;case"SquareWaveBlock":var k=new i.WaveBlock("Square wave");return k.kind=i.WaveBlockKind.Square,k;case"TriangleWaveBlock":var E=new i.WaveBlock("Triangle wave");return E.kind=i.WaveBlockKind.Triangle,E;case"WorldMatrixBlock":return(Y=new i.InputBlock("World")).setAsSystemValue(i.NodeMaterialSystemValues.World),Y;case"WorldViewMatrixBlock":var S=new i.InputBlock("World x View");return S.setAsSystemValue(i.NodeMaterialSystemValues.WorldView),S;case"WorldViewProjectionMatrixBlock":var P=new i.InputBlock("World x View x Projection");return P.setAsSystemValue(i.NodeMaterialSystemValues.WorldViewProjection),P;case"ViewMatrixBlock":var T=new i.InputBlock("View");return T.setAsSystemValue(i.NodeMaterialSystemValues.View),T;case"ViewProjectionMatrixBlock":var B=new i.InputBlock("View x Projection");return B.setAsSystemValue(i.NodeMaterialSystemValues.ViewProjection),B;case"ProjectionMatrixBlock":var N=new i.InputBlock("Projection");return N.setAsSystemValue(i.NodeMaterialSystemValues.Projection),N;case"CameraPositionBlock":var O=new i.InputBlock("Camera position");return O.setAsSystemValue(i.NodeMaterialSystemValues.CameraPosition),O;case"FogColorBlock":var L=new i.InputBlock("Fog color");return L.setAsSystemValue(i.NodeMaterialSystemValues.FogColor),L;case"PositionBlock":var M=new i.InputBlock("position");return M.setAsAttribute("position"),M;case"UVBlock":var R=new i.InputBlock("uv");return R.setAsAttribute("uv"),R;case"ColorBlock":var D=new i.InputBlock("color");return D.setAsAttribute("color"),D;case"NormalBlock":var I=new i.InputBlock("normal");return I.setAsAttribute("normal"),I;case"TangentBlock":var z=new i.InputBlock("tangent");return z.setAsAttribute("tangent"),z;case"MatrixIndicesBlock":var A=new i.InputBlock("matricesIndices");return A.setAsAttribute("matricesIndices"),A;case"MatrixWeightsBlock":var j=new i.InputBlock("matricesWeights");return j.setAsAttribute("matricesWeights"),j;case"TimeBlock":var U=new i.InputBlock("Time",void 0,i.NodeMaterialBlockConnectionPointTypes.Float);return U.animationType=i.AnimatedInputBlockTypes.Time,U;case"DeltaTimeBlock":var F=new i.InputBlock("Delta time");return F.setAsSystemValue(i.NodeMaterialSystemValues.DeltaTime),F;case"WorldPositionBlock":var V=n.getInputBlockByPredicate(function(e){return e.isAttribute&&"position"===e.name});V||(V=new i.InputBlock("position")).setAsAttribute("position"),(Y=n.getInputBlockByPredicate(function(e){return e.isSystemValue&&e.systemValue===i.NodeMaterialSystemValues.World}))||(Y=new i.InputBlock("World")).setAsSystemValue(i.NodeMaterialSystemValues.World);var W=new i.TransformBlock("World position");return V.connectTo(W),Y.connectTo(W),W;case"WorldNormalBlock":var H=n.getInputBlockByPredicate(function(e){return e.isAttribute&&"normal"===e.name});H||(H=new i.InputBlock("normal")).setAsAttribute("normal"),(Y=n.getInputBlockByPredicate(function(e){return e.isSystemValue&&e.systemValue===i.NodeMaterialSystemValues.World}))||(Y=new i.InputBlock("World")).setAsSystemValue(i.NodeMaterialSystemValues.World);W=new i.TransformBlock("World normal");return H.connectTo(W),Y.connectTo(W),W;case"WorldTangentBlock":var Y,X=n.getInputBlockByPredicate(function(e){return e.isAttribute&&"tangent"===e.name});X||(X=new i.InputBlock("tangent")).setAsAttribute("tangent"),(Y=n.getInputBlockByPredicate(function(e){return e.isSystemValue&&e.systemValue===i.NodeMaterialSystemValues.World}))||(Y=new i.InputBlock("World")).setAsSystemValue(i.NodeMaterialSystemValues.World);W=new i.TransformBlock("World tangent");return X.connectTo(W),Y.connectTo(W),W}return null},e.GetColorFromConnectionNodeType=function(e){var t="#880000";switch(e){case i.NodeMaterialBlockConnectionPointTypes.Float:t="#cb9e27";break;case i.NodeMaterialBlockConnectionPointTypes.Vector2:t="#16bcb1";break;case i.NodeMaterialBlockConnectionPointTypes.Vector3:case i.NodeMaterialBlockConnectionPointTypes.Color3:t="#b786cb";break;case i.NodeMaterialBlockConnectionPointTypes.Vector4:case i.NodeMaterialBlockConnectionPointTypes.Color4:t="#be5126";break;case i.NodeMaterialBlockConnectionPointTypes.Matrix:t="#591990"}return t},e.GetConnectionNodeTypeFromString=function(e){switch(e){case"Float":return i.NodeMaterialBlockConnectionPointTypes.Float;case"Vector2":return i.NodeMaterialBlockConnectionPointTypes.Vector2;case"Vector3":return i.NodeMaterialBlockConnectionPointTypes.Vector3;case"Vector4":return i.NodeMaterialBlockConnectionPointTypes.Vector4;case"Matrix":return i.NodeMaterialBlockConnectionPointTypes.Matrix;case"Color3":return i.NodeMaterialBlockConnectionPointTypes.Color3;case"Color4":return i.NodeMaterialBlockConnectionPointTypes.Color4}return i.NodeMaterialBlockConnectionPointTypes.AutoDetect},e.GetStringFromConnectionNodeType=function(e){switch(e){case i.NodeMaterialBlockConnectionPointTypes.Float:return"Float";case i.NodeMaterialBlockConnectionPointTypes.Vector2:return"Vector2";case i.NodeMaterialBlockConnectionPointTypes.Vector3:return"Vector3";case i.NodeMaterialBlockConnectionPointTypes.Vector4:return"Vector4";case i.NodeMaterialBlockConnectionPointTypes.Color3:return"Color3";case i.NodeMaterialBlockConnectionPointTypes.Color4:return"Color4";case i.NodeMaterialBlockConnectionPointTypes.Matrix:return"Matrix"}return""},e}(),ie=function(){function e(){}return e.prototype.getHeaderClass=function(e){var t=e;return t.isConstant?"constant":t.visibleInInspector?"inspector":""},e.prototype.shouldDisplayPortLabels=function(e){return!1},e.prototype.getHeaderText=function(e){var t=e,n=t.name+" ("+w.GetBaseType(t.output.type)+")";return t.isAttribute&&(n=w.GetBaseType(t.output.type)),n},e.prototype.getBackgroundColor=function(e){var t="",n=e;switch(n.type){case i.NodeMaterialBlockConnectionPointTypes.Color3:case i.NodeMaterialBlockConnectionPointTypes.Color4:if(n.value){t=n.value.toHexString();break}default:t=ae.GetColorFromConnectionNodeType(n.type)}return t},e.prototype.updatePreviewContent=function(e,t){var n="",r=e;if(r.isAttribute)n="mesh."+r.name;else if(r.isSystemValue)switch(r.systemValue){case i.NodeMaterialSystemValues.World:n="World";break;case i.NodeMaterialSystemValues.WorldView:n="World x View";break;case i.NodeMaterialSystemValues.WorldViewProjection:n="World x View x Projection";break;case i.NodeMaterialSystemValues.View:n="View";break;case i.NodeMaterialSystemValues.ViewProjection:n="View x Projection";break;case i.NodeMaterialSystemValues.Projection:n="Projection";break;case i.NodeMaterialSystemValues.CameraPosition:n="Camera position";break;case i.NodeMaterialSystemValues.FogColor:n="Fog color";break;case i.NodeMaterialSystemValues.DeltaTime:n="Delta time"}else switch(r.type){case i.NodeMaterialBlockConnectionPointTypes.Float:n=r.animationType!==i.AnimatedInputBlockTypes.None?i.AnimatedInputBlockTypes[r.animationType]:r.value.toFixed(2);break;case i.NodeMaterialBlockConnectionPointTypes.Vector2:var o=r.value;n="("+o.x.toFixed(2)+", "+o.y.toFixed(2)+")";break;case i.NodeMaterialBlockConnectionPointTypes.Vector3:var a=r.value;n="("+a.x.toFixed(2)+", "+a.y.toFixed(2)+", "+a.z.toFixed(2)+")";break;case i.NodeMaterialBlockConnectionPointTypes.Vector4:var l=r.value;n="("+l.x.toFixed(2)+", "+l.y.toFixed(2)+", "+l.z.toFixed(2)+", "+l.w.toFixed(2)+")"}t.innerHTML=n,t.classList.add("input-block")},e}(),le=function(){function e(){}return e.prototype.getHeaderClass=function(e){return""},e.prototype.shouldDisplayPortLabels=function(e){return!0},e.prototype.getHeaderText=function(e){return e.name},e.prototype.getBackgroundColor=function(e){return"rgb(106, 44, 131)"},e.prototype.updatePreviewContent=function(e,t){t.classList.add("output-block")},e}(),se=function(){function e(){}return e.prototype.getHeaderClass=function(e){return""},e.prototype.shouldDisplayPortLabels=function(e){return!1},e.prototype.getHeaderText=function(e){return e.name},e.prototype.getBackgroundColor=function(e){return"#4086BB"},e.prototype.updatePreviewContent=function(e,t){var n=e;t.classList.add("clamp-block"),t.innerHTML="["+n.minimum+", "+n.maximum+"]"},e}(),ce=function(){function e(){}return e.prototype.getHeaderClass=function(e){return""},e.prototype.shouldDisplayPortLabels=function(e){return!1},e.prototype.getHeaderText=function(e){return e.name},e.prototype.getBackgroundColor=function(e){var t=e.colorSteps.map(function(e){return"rgb("+255*e.color.r+", "+255*e.color.g+", "+255*e.color.b+") "+100*e.step+"%"});return t.length?"linear-gradient(90deg, "+t.join(", ")+")":"black"},e.prototype.updatePreviewContent=function(e,t){t.classList.add("gradient-block")},e}(),ue=function(){function e(){}return e.prototype.getHeaderClass=function(e){return""},e.prototype.shouldDisplayPortLabels=function(e){return!0},e.prototype.getHeaderText=function(e){return e.name},e.prototype.getBackgroundColor=function(e){return"#4086BB"},e.prototype._extractInputValue=function(e){var t=e.connectedPoint.ownerBlock;if(t.isInput){var n=t;if(n.isUniform&&!n.isSystemValue)return n.value}return"?"},e.prototype.updatePreviewContent=function(e,t){var n=e,r=n.sourceMin.isConnected?this._extractInputValue(n.sourceMin):n.sourceRange.x,o=n.sourceMax.isConnected?this._extractInputValue(n.sourceMax):n.sourceRange.y,a=n.targetMin.isConnected?this._extractInputValue(n.targetMin):n.targetRange.x,i=n.targetMax.isConnected?this._extractInputValue(n.targetMax):n.targetRange.y;t.classList.add("remap-block"),t.innerHTML="["+r+", "+o+"] -> ["+a+", "+i+"]"},e}(),pe=function(){function e(){}return e.prototype.getHeaderClass=function(e){return""},e.prototype.shouldDisplayPortLabels=function(e){return!1},e.prototype.getHeaderText=function(e){return e.name},e.prototype.getBackgroundColor=function(e){return"#405C86"},e.prototype.updatePreviewContent=function(e,t){var n=e;t.classList.add("trigonometry-block"),t.innerHTML=i.TrigonometryBlockOperations[n.operation]},e}(),de=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.canvasRef=o.createRef(),n}return c(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(){t.UpdatePreview(this.canvasRef.current,this.props.texture,this.props.width,this.state,void 0,this.props.globalState)},t.UpdatePreview=function(e,n,r,o,a,l){!n.isReady()&&n._texture&&n._texture.onLoadedObservable.addOnce(function(){t.UpdatePreview(e,n,r,o,a,l)});var s,c=n.getScene(),u=c.getEngine(),p=n.getSize(),d=p.width/p.height,f=r/d|1;if(n.isCube){var h=new i.PassCubePostProcess("pass",1,null,i.Texture.NEAREST_SAMPLINGMODE,u,!1,i.Constants.TEXTURETYPE_UNSIGNED_INT);h.face=o.face,s=h}else s=new i.PassPostProcess("pass",1,null,i.Texture.NEAREST_SAMPLINGMODE,u,!1,i.Constants.TEXTURETYPE_UNSIGNED_INT);if(!s.getEffect().isReady())return s.dispose(),void setTimeout(function(){return t.UpdatePreview(e,n,r,o,a,l)},250);l&&(l.blockMutationUpdates=!0);var g=new i.RenderTargetTexture("temp",{width:r,height:f},c,!1);s.onApply=function(e){e.setTexture("textureSampler",n)};var m=g.getInternalTexture();if(m){c.postProcessManager.directRender([s],m);var v=4*r,b=f/2,y=u.readPixels(0,0,r,f);if(!(n.isCube||o.displayRed&&o.displayGreen&&o.displayBlue))for(var w=0;we.x||t.righte.y||t.bottomt.right||e.bottomt.bottom);n.isSelected=r}),this._onFrameCreatedObserver=this._globalState.onFrameCreated.add(function(e){n._ownerCanvas.frames.some(function(e){return-1!==e.nodes.indexOf(n)})||n.isOverlappingFrame(e)&&e.nodes.push(n)})}return Object.defineProperty(e.prototype,"isVisible",{get:function(){return this._isVisible},set:function(e){this._isVisible=e,e?this._visual.classList.remove("hidden"):this._visual.classList.add("hidden");for(var t=0,n=this._links;t-1&&this._ownerCanvas.selectedNodes.splice(t,1)}},enumerable:!0,configurable:!0}),e.prototype.isOverlappingFrame=function(e){var t=this._visual.getBoundingClientRect(),n=e.element.getBoundingClientRect();return n.width-=5,n.height-=5,!(n.rightt.right||n.bottomt.bottom)},e.prototype.getPortForConnectionPoint=function(e){for(var t=0,n=this._inputPorts;t0){var e=o._commentsElement.offsetHeight+40;o._minFrameHeight=e}},this._onRightHandlePointerDown=function(e){var t=o;t.isCollapsed||(o.initResizing(e),t._resizingDirection=me.Right,t.mouseXLimit=e.clientX-(t.width-t._minFrameWidth),t._ownerCanvas.hostCanvas.addEventListener("pointerup",t._onRightHandlePointerUp),t._ownerCanvas.hostCanvas.addEventListener("pointermove",t._onRightHandlePointerMove))},this._onRightHandlePointerMove=function(e){var t=(o.element.offsetWidth-o._minFrameWidth)*o._ownerCanvas.zoom,n=o._mouseStartPointX-t;o._moveRightHandle(e,n)},this._moveRightHandle=function(e,t){var n=o;if(n.mouseXLimit){if(!n._isResizingRight()||null===n._mouseStartPointX||null===n._mouseStartPointY||e.clientXt)return;if(n._resizingDirection===me.Left){e.stopPropagation();var r=(e.clientX-n._mouseStartPointX)/n._ownerCanvas.zoom;n._expandLeft(r),n._mouseStartPointX=e.clientX}}},this._onLeftHandlePointerUp=function(e){var t=o;t._resizingDirection===me.Left&&(t.x=parseFloat(t.element.style.left.replace("px","")),t.width=parseFloat(t.element.style.width.replace("px","")),t._ownerCanvas.hostCanvas.removeEventListener("pointerup",t._onLeftHandlePointerUp),t._ownerCanvas.hostCanvas.removeEventListener("pointermove",t._onLeftHandlePointerMove),t.cleanUpResizing(e))},this._onTopHandlePointerDown=function(e){var t=o;t.isCollapsed||(t.initResizing(e),t._resizingDirection=me.Top,t._ownerCanvas.hostCanvas.addEventListener("pointerup",t._onTopHandlePointerUp),t._ownerCanvas.hostCanvas.addEventListener("pointermove",t._onTopHandlePointerMove))},this._onTopHandlePointerMove=function(e){var t=(o.element.offsetHeight-o._minFrameHeight)*o._ownerCanvas.zoom,n=o._mouseStartPointY+t;o._moveTopHandle(e,n)},this._moveTopHandle=function(e,t){var n=o;if(n._isResizingTop()&&null!==n._mouseStartPointX&&null!==n._mouseStartPointY&&!(e.clientY>t)&&n._isResizingTop()){e.stopPropagation();var r=(e.clientY-n._mouseStartPointY)/n._ownerCanvas.zoom;n._expandTop(r),n._mouseStartPointY=e.clientY}},this._onTopHandlePointerUp=function(e){var t=o;t._isResizingTop()&&(t.y=parseFloat(t.element.style.top.replace("px","")),t.height=parseFloat(t.element.style.height.replace("px","")),t._ownerCanvas.hostCanvas.removeEventListener("pointerup",t._onTopHandlePointerUp),t._ownerCanvas.hostCanvas.removeEventListener("pointermove",t._onTopHandlePointerMove),t.cleanUpResizing(e))},this._onTopRightHandlePointerDown=function(e){var t=o;t.isCollapsed||(t.initResizing(e),t._resizingDirection=me.TopRight,t._ownerCanvas.hostCanvas.addEventListener("pointerup",t._onTopRightHandlePointerUp),t._ownerCanvas.hostCanvas.addEventListener("pointermove",t._onTopRightHandlePointerMove))},this._onTopRightHandlePointerMove=function(e){var t=(o.element.offsetHeight-o._minFrameHeight)*o._ownerCanvas.zoom,n=o._mouseStartPointY+t,r=(o.element.offsetWidth-o._minFrameWidth)*o._ownerCanvas.zoom,a=o._mouseStartPointX-r;o._moveTopRightHandle(e,a,n)},this._moveTopRightHandle=function(e,t,n){var r=o;if(r._isResizingTop()&&r._isResizingRight()&&null!==r._mouseStartPointX&&null!==r._mouseStartPointY&&r._isResizingRight()&&r._isResizingTop())if(e.stopPropagation(),e.clientYt){var a=(e.clientX-r._mouseStartPointX)/r._ownerCanvas.zoom;r._expandRight(a,e.clientX),r._mouseStartPointX=e.clientX;var i=(e.clientY-r._mouseStartPointY)/r._ownerCanvas.zoom;r._expandTop(i),r._mouseStartPointY=e.clientY}else if(e.clientY>n&&e.clientX>t){a=(e.clientX-r._mouseStartPointX)/r._ownerCanvas.zoom;r._expandRight(a,e.clientX),r._mouseStartPointX=e.clientX}else if(e.clientYn&&e.clientX>t){var a=(e.clientX-r._mouseStartPointX)/r._ownerCanvas.zoom;r._expandRight(a,e.clientX),r._mouseStartPointX=e.clientX;var i=(e.clientY-r._mouseStartPointY)/r._ownerCanvas.zoom;r._expandBottom(i),r._mouseStartPointY=e.clientY}else if(e.clientYt){a=(e.clientX-r._mouseStartPointX)/r._ownerCanvas.zoom;r._expandRight(a,e.clientX),r._mouseStartPointX=e.clientX}else if(e.clientY>n&&e.clientXn&&e.clientXn&&e.clientX>t){i=(e.clientY-r._mouseStartPointY)/r._ownerCanvas.zoom;r._expandBottom(i),r._mouseStartPointY=e.clientY}},this._onBottomLeftHandlePointerUp=function(e){e.stopPropagation();var t=o;t._resizingDirection===me.BottomLeft&&(t.height=parseFloat(t.element.style.height.replace("px","")),t.x=parseFloat(t.element.style.left.replace("px","")),t.width=parseFloat(t.element.style.width.replace("px","")),t._ownerCanvas.hostCanvas.removeEventListener("pointerup",t._onBottomLeftHandlePointerUp),t._ownerCanvas.hostCanvas.removeEventListener("pointermove",t._onBottomLeftHandlePointerMove),t.cleanUpResizing(e))},this._onTopLeftHandlePointerDown=function(e){var t=o;t.isCollapsed||(t.initResizing(e),t._resizingDirection=me.TopLeft,t.mouseXLimit=e.clientX+t.width-t._minFrameWidth,t._ownerCanvas.hostCanvas.addEventListener("pointerup",t._onTopLeftHandlePointerUp),t._ownerCanvas.hostCanvas.addEventListener("pointermove",t._onTopLeftHandlePointerMove))},this._onTopLeftHandlePointerMove=function(e){var t=(o.element.offsetHeight-o._minFrameHeight)*o._ownerCanvas.zoom,n=o._mouseStartPointY+t,r=(o.element.offsetWidth-o._minFrameWidth)*o._ownerCanvas.zoom,a=o._mouseStartPointX+r;o._moveTopLeftHandle(e,a,n)},this._moveTopLeftHandle=function(e,t,n){var r=o;if(r._isResizingTop()&&r._isResizingLeft()&&null!==r._mouseStartPointX&&null!==r._mouseStartPointY&&r._isResizingLeft()&&r._isResizingTop())if(e.stopPropagation(),e.clientYn&&e.clientXt){i=(e.clientY-r._mouseStartPointY)/r._ownerCanvas.zoom;r._expandTop(i),r._mouseStartPointY=e.clientY}},this._onTopLeftHandlePointerUp=function(e){e.stopPropagation();var t=o;t._resizingDirection===me.TopLeft&&(t.y=parseFloat(t.element.style.top.replace("px","")),t.height=parseFloat(t.element.style.height.replace("px","")),t.x=parseFloat(t.element.style.left.replace("px","")),t.width=parseFloat(t.element.style.width.replace("px","")),t._ownerCanvas.hostCanvas.removeEventListener("pointerup",t._onTopLeftHandlePointerUp),t._ownerCanvas.hostCanvas.removeEventListener("pointermove",t._onTopLeftHandlePointerMove),t.cleanUpResizing(e))},this._id=e._FrameCounter++,this._ownerCanvas=n;var a=n.frameContainer;this.element=a.ownerDocument.createElement("div"),this.element.classList.add("frame-box"),a.appendChild(this.element),this._headerElement=a.ownerDocument.createElement("div"),this._headerElement.classList.add("frame-box-header"),this._headerElement.addEventListener("dblclick",function(){o.isCollapsed=!o.isCollapsed}),this.element.appendChild(this._headerElement),this._borderElement=a.ownerDocument.createElement("div"),this._borderElement.classList.add("frame-box-border"),this.element.appendChild(this._borderElement);var l=a.ownerDocument.createElement("div");l.className="handle right-handle",this.element.appendChild(l),l.addEventListener("pointerdown",this._onRightHandlePointerDown);var s=a.ownerDocument.createElement("div");s.className="handle left-handle",this.element.appendChild(s),s.addEventListener("pointerdown",this._onLeftHandlePointerDown);var c=a.ownerDocument.createElement("div");c.className="handle bottom-handle",this.element.appendChild(c),c.addEventListener("pointerdown",this._onBottomHandlePointerDown);var u=a.ownerDocument.createElement("div");u.className="handle top-handle",this.element.appendChild(u),u.addEventListener("pointerdown",this._onTopHandlePointerDown);var p=a.ownerDocument.createElement("div");p.className="handle right-handle top-right-corner-handle",this.element.appendChild(p),p.addEventListener("pointerdown",this._onTopRightHandlePointerDown);var d=a.ownerDocument.createElement("div");d.className="handle right-handle bottom-right-corner-handle",this.element.appendChild(d),d.addEventListener("pointerdown",this._onBottomRightHandlePointerDown);var f=a.ownerDocument.createElement("div");f.className="handle left-handle top-left-corner-handle",this.element.appendChild(f),f.addEventListener("pointerdown",this._onTopLeftHandlePointerDown);var h=a.ownerDocument.createElement("div");h.className="handle left-handle bottom-left-corner-handle",this.element.appendChild(h),h.addEventListener("pointerdown",this._onBottomLeftHandlePointerDown),this._headerTextElement=a.ownerDocument.createElement("div"),this._headerTextElement.classList.add("frame-box-header-title"),this._headerElement.appendChild(this._headerTextElement),this._headerCollapseElement=a.ownerDocument.createElement("div"),this._headerCollapseElement.classList.add("frame-box-header-collapse"),this._headerCollapseElement.classList.add("frame-box-header-button"),this._headerCollapseElement.title="Collapse",this._headerCollapseElement.ondragstart=function(){return!1},this._headerCollapseElement.addEventListener("pointerdown",function(e){o._headerCollapseElement.classList.add("down"),e.stopPropagation()}),this._headerCollapseElement.addEventListener("pointerup",function(e){e.stopPropagation(),o._headerCollapseElement.classList.remove("down"),o.isCollapsed=!o.isCollapsed}),this._headerCollapseElement.innerHTML=this.CollapseSVG,this._headerElement.appendChild(this._headerCollapseElement),this._headerCloseElement=a.ownerDocument.createElement("div"),this._headerCloseElement.classList.add("frame-box-header-close"),this._headerCloseElement.classList.add("frame-box-header-button"),this._headerCloseElement.title="Close",this._headerCloseElement.ondragstart=function(){return!1},this._headerCloseElement.addEventListener("pointerdown",function(e){e.stopPropagation()}),this._headerCloseElement.addEventListener("pointerup",function(e){e.stopPropagation(),o.dispose()}),this._headerCloseElement.innerHTML=this.CloseSVG,this._headerElement.appendChild(this._headerCloseElement),this._portContainer=a.ownerDocument.createElement("div"),this._portContainer.classList.add("port-container"),this.element.appendChild(this._portContainer),this._outputPortContainer=a.ownerDocument.createElement("div"),this._outputPortContainer.classList.add("outputsContainer"),this._portContainer.appendChild(this._outputPortContainer),this._inputPortContainer=a.ownerDocument.createElement("div"),this._inputPortContainer.classList.add("inputsContainer"),this._portContainer.appendChild(this._inputPortContainer),this.name="Frame",this.color=i.Color3.FromInts(72,72,72),t&&(this.x=parseFloat(t.style.left.replace("px","")),this.y=parseFloat(t.style.top.replace("px","")),this.width=parseFloat(t.style.width.replace("px","")),this.height=parseFloat(t.style.height.replace("px","")),this.cleanAccumulation()),this._headerTextElement.addEventListener("pointerdown",function(e){return o._onDown(e)}),this._headerTextElement.addEventListener("pointerup",function(e){return o._onUp(e)}),this._headerTextElement.addEventListener("pointermove",function(e){return o._onMove(e)}),this._onSelectionChangedObserver=n.globalState.onSelectionChangedObservable.add(function(e){e===o?o.element.classList.add("selected"):o.element.classList.remove("selected")}),this._commentsElement=document.createElement("div"),this._commentsElement.className="frame-comments",this._commentsElement.style.color="white",this._commentsElement.style.fontSize="16px",this.element.appendChild(this._commentsElement),r||this.refresh()}return Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"isCollapsed",{get:function(){return this._isCollapsed},set:function(e){if(this._isCollapsed!==e){if(this._isCollapsed=e,this._ownerCanvas._frameIsMoving=!0,e){this.element.classList.add("collapsed"),this._moveFrame((this.width-this.CollapsedWidth)/2,0);for(var t=0,n=this._nodes;tthis._minFrameWidth?e:this._minFrameWidth;this._width=t;var n=this._ownerCanvas.getGridPositionCeil(t+this._gridAlignedX);this.element.style.width=n-this._gridAlignedX+"px"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return this._height},set:function(e){if(this._height!==e){this._height=e;var t=this._ownerCanvas.getGridPositionCeil(e+this._gridAlignedY);this.element.style.height=t-this._gridAlignedY+"px"}},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"comments",{get:function(){return this._comments},set:function(e){e&&!this._comments&&e.length>0?(this.element.style.gridTemplateRows="40px min-content 1fr",this._borderElement.style.gridRow="1 / span 3",this._portContainer.style.gridRow="3",this._commentsElement.classList.add("has-comments")):e||(this.element.style.gridTemplateRows="40px calc(100% - 40px)",this._borderElement.style.gridRow="1 / span 2",this._portContainer.style.gridRow="2",this._commentsElement.classList.remove("has-comments")),(""===e||e&&e.length>=0)&&(this._commentsElement.innerText=e),this.height=this._borderElement.offsetHeight,this._comments=e,this.updateMinHeightWithComments()},enumerable:!0,configurable:!0}),e.prototype.refresh=function(){this._nodes=[],this._ownerCanvas.globalState.onFrameCreated.notifyObservers(this)},e.prototype.addNode=function(e){-1===this.nodes.indexOf(e)&&this.nodes.push(e)},e.prototype.removeNode=function(e){var t=this.nodes.indexOf(e);t>-1&&this.nodes.splice(t,1)},e.prototype.syncNode=function(e){this.isCollapsed||(e.isOverlappingFrame(this)?this.addNode(e):this.removeNode(e))},e.prototype.cleanAccumulation=function(){for(var e=0,t=this._nodes;e20&&(this._mouseStartPointX=t,this.element.style.width=n+e+"px"),this.updateMinHeightWithComments()},e.prototype._expandBottom=function(e){var t=parseFloat(this.element.style.height.replace("px",""));this.element.style.height=t+e+"px"},e.prototype.dispose=function(){this.isCollapsed=!1,this._onSelectionChangedObserver&&this._ownerCanvas.globalState.onSelectionChangedObservable.remove(this._onSelectionChangedObserver),this.element.parentElement.removeChild(this.element),this._ownerCanvas.frames.splice(this._ownerCanvas.frames.indexOf(this),1),this.onExpandStateChanged.clear()},e.prototype.serialize=function(){return{x:this._x,y:this._y,width:this._width,height:this._height,color:this._color.asArray(),name:this.name,isCollapsed:this.isCollapsed,blocks:this.nodes.map(function(e){return e.block.uniqueId}),comments:this._comments}},e.prototype.export=function(){var e=this._ownerCanvas.globalState,t=_.Serialize(e.nodeMaterial,e,this.nodes.map(function(e){return e.block}));w.DownloadAsFile(e.hostDocument,t,this._name+".json")},e.Parse=function(t,n,r){var o=new e(null,n,!0),a=!!t.isCollapsed;if(o.x=t.x,o.y=t.y,o.width=t.width,o.height=t.height,o.name=t.name,o.color=i.Color3.FromArray(t.color),o.comments=t.comments,t.blocks&&r)for(var l=function(){var e=r[u],t=n.nodes.filter(function(t){return t.block.uniqueId===e});t.length&&o.nodes.push(t[0])},s=0,c=t.blocks;s-1&&this._links.splice(t,1),e.dispose()},t.prototype.appendBlock=function(e){var t=new be(e,this.props.globalState);return t.appendVisual(this._graphCanvas,this),this._nodes.push(t),t},t.prototype.distributeGraph=function(){var e=this;this.x=0,this.y=0,this.zoom=1;var t=new Ae.graphlib.Graph;t.setGraph({}),t.setDefaultEdgeLabel(function(){return{}}),t.graph().rankdir="LR",this._nodes.forEach(function(n){e._frames.some(function(e){return-1!==e.nodes.indexOf(n)})||t.setNode(n.id.toString(),{id:n.id,type:"node",width:n.width,height:n.height})}),this._frames.forEach(function(e){t.setNode(e.id.toString(),{id:e.id,type:"frame",width:e.element.clientWidth,height:e.element.clientHeight})}),this._nodes.forEach(function(n){n.block.outputs.forEach(function(r){r.hasEndpoints&&r.endpoints.forEach(function(r){var o=e._frames.filter(function(e){return-1!==e.nodes.indexOf(n)}),a=e._frames.filter(function(e){return e.nodes.some(function(e){return e.block===r.ownerBlock})}),i=o.length>0?o[0].id:n.id,l=a.length>0?a[0].id:r.ownerBlock.uniqueId;t.setEdge(i.toString(),l.toString())})})}),Ae.layout(t),t.nodes().map(function(e){return t.node(e)}).forEach(function(t){if("node"!==t.type)for(var n=0,r=e._frames;nthis._selectionStartX?(this._selectionBox.style.left=this._selectionStartX/this.zoom+"px",this._selectionBox.style.width=(n-this._selectionStartX)/this.zoom+"px"):(this._selectionBox.style.left=n/this.zoom+"px",this._selectionBox.style.width=(this._selectionStartX-n)/this.zoom+"px"),r>this._selectionStartY?(this._selectionBox.style.top=this._selectionStartY/this.zoom+"px",this._selectionBox.style.height=(r-this._selectionStartY)/this.zoom+"px"):(this._selectionBox.style.top=r/this.zoom+"px",this._selectionBox.style.height=(this._selectionStartY-r)/this.zoom+"px"),void this.props.globalState.onSelectionBoxMoved.notifyObservers(this._selectionBox.getBoundingClientRect())}if(this._frameCandidate){t=this.canvasContainer.getBoundingClientRect(),n=e.pageX-t.left,r=e.pageY-t.top;return n>this._selectionStartX?(this._frameCandidate.style.left=this._selectionStartX/this.zoom+"px",this._frameCandidate.style.width=(n-this._selectionStartX)/this.zoom+"px"):(this._frameCandidate.style.left=n/this.zoom+"px",this._frameCandidate.style.width=(this._selectionStartX-n)/this.zoom+"px"),void(r>this._selectionStartY?(this._frameCandidate.style.top=this._selectionStartY/this.zoom+"px",this._frameCandidate.style.height=(r-this._selectionStartY)/this.zoom+"px"):(this._frameCandidate.style.top=r/this.zoom+"px",this._frameCandidate.style.height=(this._selectionStartY-r)/this.zoom+"px"))}if(this._candidateLink){t=this.canvasContainer.getBoundingClientRect();return this._candidatePort=null,this.props.globalState.onCandidateLinkMoved.notifyObservers(new i.Vector2(e.pageX,e.pageY)),this._dropPointX=(e.pageX-t.left)/this.zoom,this._dropPointY=(e.pageY-t.top)/this.zoom,void this._candidateLink.update(this._dropPointX,this._dropPointY,!0)}if(this._altKeyIsPressed&&1===e.buttons){this._oldY<0&&(this._oldY=e.pageY);var o=(e.pageY-this._oldY)/10;if(Math.abs(o)>5){var a=this.zoom;this.zoom=Math.max(Math.min(this.MaxZoom,this.zoom+o/100),this.MinZoom);var l=e.currentTarget.getBoundingClientRect(),s=l.width,c=s*this.zoom-s*a,u=(e.clientX-l.left-this.x)/a/s;this.x=this.x-c*u,this._oldY=e.pageY}}else this._rootContainer.style.cursor="move",null!==this._mouseStartPointX&&null!==this._mouseStartPointY&&(this.x+=e.clientX-this._mouseStartPointX,this.y+=e.clientY-this._mouseStartPointY,this._mouseStartPointX=e.clientX,this._mouseStartPointY=e.clientY)},t.prototype.onDown=function(e){if(this._rootContainer.setPointerCapture(e.pointerId),e.currentTarget===this._hostCanvas&&e.ctrlKey){this._selectionBox=this.props.globalState.hostDocument.createElement("div"),this._selectionBox.classList.add("selection-box"),this._selectionContainer.appendChild(this._selectionBox);var t=this.canvasContainer.getBoundingClientRect();return this._selectionStartX=e.pageX-t.left,this._selectionStartY=e.pageY-t.top,this._selectionBox.style.left=this._selectionStartX/this.zoom+"px",this._selectionBox.style.top=this._selectionStartY/this.zoom+"px",this._selectionBox.style.width="0px",void(this._selectionBox.style.height="0px")}if(e.currentTarget===this._hostCanvas&&e.shiftKey){this._frameCandidate=this.props.globalState.hostDocument.createElement("div"),this._frameCandidate.classList.add("frame-box"),this._frameContainer.appendChild(this._frameCandidate);t=this.canvasContainer.getBoundingClientRect();return this._selectionStartX=e.pageX-t.left,this._selectionStartY=e.pageY-t.top,this._frameCandidate.style.left=this._selectionStartX/this.zoom+"px",this._frameCandidate.style.top=this._selectionStartY/this.zoom+"px",this._frameCandidate.style.width="0px",void(this._frameCandidate.style.height="0px")}if(e.nativeEvent.srcElement&&"IMG"===e.nativeEvent.srcElement.nodeName){if(!this._candidateLink){var n=e.nativeEvent.srcElement.parentElement.port;this._candidateLink=new je(this,n,n.node)}}else this.props.globalState.onSelectionChangedObservable.notifyObservers(null),this._mouseStartPointX=e.clientX,this._mouseStartPointY=e.clientY},t.prototype.onUp=function(e){if(this._mouseStartPointX=null,this._mouseStartPointY=null,this._rootContainer.releasePointerCapture(e.pointerId),this._oldY=-1,this._candidateLink&&(this.processCandidatePort(),this.props.globalState.onCandidateLinkMoved.notifyObservers(null),this._candidateLink.dispose(),this._candidateLink=null,this._candidatePort=null),this._selectionBox&&(this._selectionBox.parentElement.removeChild(this._selectionBox),this._selectionBox=null),this._frameCandidate){var t=new ye(this._frameCandidate,this);this._frames.push(t),this._frameCandidate.parentElement.removeChild(this._frameCandidate),this._frameCandidate=null,this.props.globalState.onSelectionChangedObservable.notifyObservers(t)}},t.prototype.onWheel=function(e){var t=e.deltaY<0?.1:-.1,n=this.zoom;this.zoom=Math.min(Math.max(this.MinZoom,this.zoom+t*this.zoom),this.MaxZoom);var r=e.currentTarget.getBoundingClientRect(),o=r.width,a=r.height,i=o*this.zoom-o*n,l=a*this.zoom-a*n,s=e.clientX-r.left,c=e.clientY-r.top,u=(s-this.x)/n/o,p=(c-this.y)/n/a;this.x=this.x-i*u,this.y=this.y-l*p,e.stopPropagation()},t.prototype.zoomToFit=function(){var e=this,t=0,n=0;this._nodes.forEach(function(r){e._frames.some(function(e){return-1!==e.nodes.indexOf(r)})||(r.x-1&&n._blocks.splice(i,1)}return n._graphCanvas.selectedLink&&n._graphCanvas.selectedLink.dispose(),n._graphCanvas.selectedFrame&&n._graphCanvas.selectedFrame.dispose(),n.props.globalState.onSelectionChangedObservable.notifyObservers(null),void n.props.globalState.onRebuildRequiredObservable.notifyObservers()}if(e.ctrlKey&&!n.props.globalState.blockKeyboardEvents)if("c"===e.key){if(n._copiedNodes=[],n._copiedFrame=null,n._graphCanvas.selectedFrame)return void(n._copiedFrame=n._graphCanvas.selectedFrame);var l;if(!(l=n._graphCanvas.selectedNodes).length)return;if(!l[0].block)return;n._copiedNodes=l.slice(0)}else if("v"===e.key){var s=n.props.globalState.hostDocument.querySelector(".diagram-container"),c=n._graphCanvas.zoom,u=(n._mouseLocationY-s.offsetTop-n._graphCanvas.y-20)/c;if(n._copiedFrame){var p=new ye(null,n._graphCanvas,!0);n._graphCanvas.frames.push(p),p.width=n._copiedFrame.width,p.height=n._copiedFrame.height,p.width,p.name=n._copiedFrame.name,p.color=n._copiedFrame.color;var d=(n._mouseLocationX-s.offsetLeft-n._graphCanvas.x)/c;return p.x=d-p.width/2,p.y=u,n._copiedFrame.nodes.length&&(d=p.x+n._copiedFrame.nodes[0].x-n._copiedFrame.x,u=p.y+n._copiedFrame.nodes[0].y-n._copiedFrame.y,n.pasteSelection(n._copiedFrame.nodes,d,u)),void(n._copiedFrame.isCollapsed&&(p.isCollapsed=!0))}if(!n._copiedNodes.length)return;var f=(n._mouseLocationX-s.offsetLeft-n._graphCanvas.x-n.NodeWidth)/c;n.pasteSelection(n._copiedNodes,f,u)}},!1),n}return c(t,e),t.prototype.createNodeFromObject=function(e,t){if(void 0===t&&(t=!0),-1!==this._blocks.indexOf(e))return this._graphCanvas.nodes.filter(function(t){return t.block===e})[0];if(this._blocks.push(e),-1===this.props.globalState.nodeMaterial.attachedBlocks.indexOf(e)&&this.props.globalState.nodeMaterial.attachedBlocks.push(e),e.isFinalMerger&&this.props.globalState.nodeMaterial.addOutputNode(e),e.inputs.length)for(var n=0,r=e.inputs;n0){var p=u[0],d=n.indexOf(p);s.reconnectNewNodes(d,t,n,r);var f=l.outputs.indexOf(e.connectedPoint);t[d].block.outputs[f].connectTo(o)}else e._connectedPoint.connectTo(o);s._graphCanvas.connectPorts(o.connectedPoint,o)},s=this,c=0;cs){var c=l;l=s,s=c}return l+i+s+i+(r.isUndefined(a)?o:a)}function p(e,t){return u(e,t.v,t.w,t.name)}l.prototype._nodeCount=0,l.prototype._edgeCount=0,l.prototype.isDirected=function(){return this._isDirected},l.prototype.isMultigraph=function(){return this._isMultigraph},l.prototype.isCompound=function(){return this._isCompound},l.prototype.setGraph=function(e){return this._label=e,this},l.prototype.graph=function(){return this._label},l.prototype.setDefaultNodeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultNodeLabelFn=e,this},l.prototype.nodeCount=function(){return this._nodeCount},l.prototype.nodes=function(){return r.keys(this._nodes)},l.prototype.sources=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._in[t])})},l.prototype.sinks=function(){var e=this;return r.filter(this.nodes(),function(t){return r.isEmpty(e._out[t])})},l.prototype.setNodes=function(e,t){var n=arguments,o=this;return r.each(e,function(e){n.length>1?o.setNode(e,t):o.setNode(e)}),this},l.prototype.setNode=function(e,t){return r.has(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=a,this._children[e]={},this._children[a][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)},l.prototype.node=function(e){return this._nodes[e]},l.prototype.hasNode=function(e){return r.has(this._nodes,e)},l.prototype.removeNode=function(e){var t=this;if(r.has(this._nodes,e)){var n=function(e){t.removeEdge(t._edgeObjs[e])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],r.each(this.children(e),function(e){t.setParent(e)}),delete this._children[e]),r.each(r.keys(this._in[e]),n),delete this._in[e],delete this._preds[e],r.each(r.keys(this._out[e]),n),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this},l.prototype.setParent=function(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(t))t=a;else{for(var n=t+="";!r.isUndefined(n);n=this.parent(n))if(n===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this},l.prototype._removeFromParentsChildList=function(e){delete this._children[this._parent[e]][e]},l.prototype.parent=function(e){if(this._isCompound){var t=this._parent[e];if(t!==a)return t}},l.prototype.children=function(e){if(r.isUndefined(e)&&(e=a),this._isCompound){var t=this._children[e];if(t)return r.keys(t)}else{if(e===a)return this.nodes();if(this.hasNode(e))return[]}},l.prototype.predecessors=function(e){var t=this._preds[e];if(t)return r.keys(t)},l.prototype.successors=function(e){var t=this._sucs[e];if(t)return r.keys(t)},l.prototype.neighbors=function(e){var t=this.predecessors(e);if(t)return r.union(t,this.successors(e))},l.prototype.isLeaf=function(e){return 0===(this.isDirected()?this.successors(e):this.neighbors(e)).length},l.prototype.filterNodes=function(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var n=this;r.each(this._nodes,function(n,r){e(r)&&t.setNode(r,n)}),r.each(this._edgeObjs,function(e){t.hasNode(e.v)&&t.hasNode(e.w)&&t.setEdge(e,n.edge(e))});var o={};return this._isCompound&&r.each(t.nodes(),function(e){t.setParent(e,function e(r){var a=n.parent(r);return void 0===a||t.hasNode(a)?(o[r]=a,a):a in o?o[a]:e(a)}(e))}),t},l.prototype.setDefaultEdgeLabel=function(e){return r.isFunction(e)||(e=r.constant(e)),this._defaultEdgeLabelFn=e,this},l.prototype.edgeCount=function(){return this._edgeCount},l.prototype.edges=function(){return r.values(this._edgeObjs)},l.prototype.setPath=function(e,t){var n=this,o=arguments;return r.reduce(e,function(e,r){return o.length>1?n.setEdge(e,r,t):n.setEdge(e,r),r}),this},l.prototype.setEdge=function(){var e,t,n,o,a=!1,i=arguments[0];"object"==typeof i&&null!==i&&"v"in i?(e=i.v,t=i.w,n=i.name,2===arguments.length&&(o=arguments[1],a=!0)):(e=i,t=arguments[1],n=arguments[3],arguments.length>2&&(o=arguments[2],a=!0)),e=""+e,t=""+t,r.isUndefined(n)||(n=""+n);var l=u(this._isDirected,e,t,n);if(r.has(this._edgeLabels,l))return a&&(this._edgeLabels[l]=o),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[l]=a?o:this._defaultEdgeLabelFn(e,t,n);var c=function(e,t,n,r){var o=""+t,a=""+n;if(!e&&o>a){var i=o;o=a,a=i}var l={v:o,w:a};r&&(l.name=r);return l}(this._isDirected,e,t,n);return e=c.v,t=c.w,Object.freeze(c),this._edgeObjs[l]=c,s(this._preds[t],e),s(this._sucs[e],t),this._in[t][l]=c,this._out[e][l]=c,this._edgeCount++,this},l.prototype.edge=function(e,t,n){var r=1===arguments.length?p(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return this._edgeLabels[r]},l.prototype.hasEdge=function(e,t,n){var o=1===arguments.length?p(this._isDirected,arguments[0]):u(this._isDirected,e,t,n);return r.has(this._edgeLabels,o)},l.prototype.removeEdge=function(e,t,n){var r=1===arguments.length?p(this._isDirected,arguments[0]):u(this._isDirected,e,t,n),o=this._edgeObjs[r];return o&&(e=o.v,t=o.w,delete this._edgeLabels[r],delete this._edgeObjs[r],c(this._preds[t],e),c(this._sucs[e],t),delete this._in[t][r],delete this._out[e][r],this._edgeCount--),this},l.prototype.inEdges=function(e,t){var n=this._in[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.v===t}):o}},l.prototype.outEdges=function(e,t){var n=this._out[e];if(n){var o=r.values(n);return t?r.filter(o,function(e){return e.w===t}):o}},l.prototype.nodeEdges=function(e,t){var n=this.inEdges(e,t);if(n)return n.concat(this.outEdges(e,t))}},function(e,t,n){var r=n(16)(n(10),"Map");e.exports=r},function(e,t,n){var r=n(169),o=n(176),a=n(178),i=n(179),l=n(180);function s(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t-1&&e%1==0&&e<=n}},function(e,t,n){(function(e){var r=n(75),o=t&&!t.nodeType&&t,a=o&&"object"==typeof e&&e&&!e.nodeType&&e,i=a&&a.exports===o&&r.process,l=function(){try{var e=a&&a.require&&a.require("util").types;return e||i&&i.binding&&i.binding("util")}catch(e){}}();e.exports=l}).call(this,n(55)(e))},function(e,t,n){var r=n(41),o=n(186),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return o(e);var t=[];for(var n in Object(e))a.call(e,n)&&"constructor"!=n&&t.push(n);return t}},function(e,t,n){var r=n(82),o=n(83),a=Object.prototype.propertyIsEnumerable,i=Object.getOwnPropertySymbols,l=i?function(e){return null==e?[]:(e=Object(e),r(i(e),function(t){return a.call(e,t)}))}:o;e.exports=l},function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n0&&a(u)?n>1?e(u,n-1,a,i,l):r(l,u):i||(l[l.length]=u)}return l}},function(e,t,n){var r=n(24);e.exports=function(e,t,n){for(var o=-1,a=e.length;++o-1;o--){var a=n[o],i=(a.tagName||"").toUpperCase();["STYLE","LINK"].indexOf(i)>-1&&(r=a)}return h.head.insertBefore(t,r),e}}var N="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";function O(){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 M(e){return Object.keys(e||{}).reduce(function(t,n){return t+"".concat(n,": ").concat(e[n],";")},"")}function R(e){return e.size!==T.size||e.x!==T.x||e.y!==T.y||e.rotate!==T.rotate||e.flipX||e.flipY}function D(e){var t=e.transform,n=e.containerWidth,r=e.iconWidth,o={transform:"translate(".concat(n/2," 256)")},a="translate(".concat(32*t.x,", ").concat(32*t.y,") "),i="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(a," ").concat(i," ").concat(l)},path:{transform:"translate(".concat(r/2*-1," -256)")}}}var I={x:0,y:0,width:"100%",height:"100%"};function z(e){var t=e.icons,n=t.main,r=t.mask,o=e.prefix,i=e.iconName,l=e.transform,s=e.symbol,c=e.title,u=e.extra,p=e.watchable,d=void 0!==p&&p,f=r.found?r:n,h=f.width,g=f.height,m="fa-w-".concat(Math.ceil(h/g*16)),v=[k.replacementClass,i?"".concat(k.familyPrefix,"-").concat(i):"",m].filter(function(e){return-1===u.classes.indexOf(e)}).concat(u.classes).join(" "),b={children:[],attributes:a({},u.attributes,{"data-prefix":o,"data-icon":i,class:v,role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 ".concat(h," ").concat(g)})};d&&(b.attributes[y]=""),c&&b.children.push({tag:"title",attributes:{id:b.attributes["aria-labelledby"]||"title-".concat(O())},children:[c]});var w=a({},b,{prefix:o,iconName:i,main:n,mask:r,transform:l,symbol:s,styles:u.styles}),x=r.found&&n.found?function(e){var t=e.children,n=e.attributes,r=e.main,o=e.mask,i=e.transform,l=r.width,s=r.icon,c=o.width,u=o.icon,p=D({transform:i,containerWidth:c,iconWidth:l}),d={tag:"rect",attributes:a({},I,{fill:"white"})},f={tag:"g",attributes:a({},p.inner),children:[{tag:"path",attributes:a({},s.attributes,p.path,{fill:"black"})}]},h={tag:"g",attributes:a({},p.outer),children:[f]},g="mask-".concat(O()),m="clip-".concat(O()),v={tag:"defs",children:[{tag:"clipPath",attributes:{id:m},children:[u]},{tag:"mask",attributes:a({},I,{id:g,maskUnits:"userSpaceOnUse",maskContentUnits:"userSpaceOnUse"}),children:[d,h]}]};return t.push(v,{tag:"rect",attributes:a({fill:"currentColor","clip-path":"url(#".concat(m,")"),mask:"url(#".concat(g,")")},I)}),{children:t,attributes:n}}(w):function(e){var t=e.children,n=e.attributes,r=e.main,o=e.transform,i=M(e.styles);if(i.length>0&&(n.style=i),R(o)){var l=D({transform:o,containerWidth:r.width,iconWidth:r.width});t.push({tag:"g",attributes:a({},l.outer),children:[{tag:"g",attributes:a({},l.inner),children:[{tag:r.icon.tag,children:r.icon.children,attributes:a({},r.icon.attributes,l.path)}]}]})}else t.push(r.icon);return{children:t,attributes:n}}(w),_=x.children,C=x.attributes;return w.children=_,w.attributes=C,s?function(e){var t=e.prefix,n=e.iconName,r=e.children,o=e.attributes,i=e.symbol;return[{tag:"svg",attributes:{style:"display: none;"},children:[{tag:"symbol",attributes:a({},o,{id:!0===i?"".concat(t,"-").concat(k.familyPrefix,"-").concat(n):i}),children:r}]}]}(w):function(e){var t=e.children,n=e.main,r=e.mask,o=e.attributes,i=e.styles,l=e.transform;if(R(l)&&n.found&&!r.found){var s={x:n.width/n.height/2,y:.5};o.style=M(a({},i,{"transform-origin":"".concat(s.x+l.x/16,"em ").concat(s.y+l.y/16,"em")}))}return[{tag:"svg",attributes:o,children:t}]}(w)}var A=function(){},j=(k.measurePerformance&&g&&g.mark&&g.measure,function(e,t,n,r){var o,a,i,l=Object.keys(e),s=l.length,c=void 0!==r?function(e,t){return function(n,r,o,a){return e.call(t,n,r,o,a)}}(t,r):t;for(void 0===n?(o=1,i=e[l[0]]):(o=0,i=n);o").concat(a.map(H).join(""),"")}var Y=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 X(e){this.name="MissingIcon",this.message=e||"Icon unavailable",this.stack=(new Error).stack}X.prototype=Object.create(Error.prototype),X.prototype.constructor=X;var G={fill:"currentColor"},q={attributeType:"XML",repeatCount:"indefinite",dur:"2s"},Z={tag:"path",attributes:a({},G,{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"})},Q=a({},q,{attributeName:"opacity"});a({},G,{cx:"256",cy:"364",r:"28"}),a({},q,{attributeName:"r",values:"28;14;28;28;14;28;"}),a({},Q,{values:"1;0;1;1;0;1;"}),a({},G,{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"}),a({},Q,{values:"1;0;0;0;0;1;"}),a({},G,{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"}),a({},Q,{values:"0;0;1;1;0;0;"}),S.styles;var K='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 $(){var e=v,t=b,n=k.familyPrefix,r=k.replacementClass,o=K;if(n!==e||r!==t){var a=new RegExp("\\.".concat(e,"\\-"),"g"),i=new RegExp("\\.".concat(t),"g");o=o.replace(a,".".concat(n,"-")).replace(i,".".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(){k.autoAddCss&&!ae&&(B($()),ae=!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 H(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 W(oe.definitions,n,r)||W(S.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?T:n,o=t.symbol,i=void 0!==o&&o,l=t.mask,s=void 0===l?null:l,c=t.title,u=void 0===c?null:c,p=t.classes,d=void 0===p?[]:p,f=t.attributes,h=void 0===f?{}:f,g=t.styles,m=void 0===g?{}:g;if(e){var v=e.prefix,b=e.iconName,y=e.icon;return te(a({type:"icon"},e),function(){return ee(),k.autoA11y&&(u?h["aria-labelledby"]="".concat(k.replacementClass,"-title-").concat(O()):h["aria-hidden"]="true"),z({icons:{main:J(y),mask:s?J(s.icon):{found:!1,width:null,height:null,icon:{}}},prefix:v,iconName:b,transform:a({},T,r),symbol:i,title:u,extra:{attributes:h,styles:m,classes:d}})})}},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,a({},t,{mask:r}))})},function(e,t,n){e.exports={graphlib:n(9),layout:n(263),debug:n(322),util:{time:n(6).time,notime:n(6).notime},version:n(323)}},function(e,t,n){"use strict"; /* object-assign (c) Sindre Sorhus @license MIT */var r=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=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,i,l=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),s=1;sd))return!1;var h=u.get(e);if(h&&u.get(t))return h==t;var g=-1,m=!0,v=n&l?new r:void 0;for(u.set(e,t),u.set(t,e);++g0&&(a=s.removeMin(),(i=l[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(c);return l}(e,String(t),n||a,r||function(t){return e.outEdges(t)})};var a=r.constant(1)},function(e,t,n){var r=n(7);function o(){this._arr=[],this._keyIndices={}}e.exports=o,o.prototype.size=function(){return this._arr.length},o.prototype.keys=function(){return this._arr.map(function(e){return e.key})},o.prototype.has=function(e){return r.has(this._keyIndices,e)},o.prototype.priority=function(e){var t=this._keyIndices[e];if(void 0!==t)return this._arr[t].priority},o.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},o.prototype.add=function(e,t){var n=this._keyIndices;if(e=String(e),!r.has(n,e)){var o=this._arr,a=o.length;return n[e]=a,o.push({key:e,priority:t}),this._decrease(a),!0}return!1},o.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var e=this._arr.pop();return delete this._keyIndices[e.key],this._heapify(0),e.key},o.prototype.decrease=function(e,t){var n=this._keyIndices[e];if(t>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+e+" Old: "+this._arr[n].priority+" New: "+t);this._arr[n].priority=t,this._decrease(n)},o.prototype._heapify=function(e){var t=this._arr,n=2*e,r=n+1,o=e;n>1].priorityM.length&&M.push(e)}function I(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 a:case i:s=!0}}if(s)return r(o,t,""===n?"."+z(t,0):n),1;if(s=0,n=""===n?".":n+":",Array.isArray(t))for(var c=0;cthis.eventPool.length&&this.eventPool.push(e)}function pe(e){e.eventPool=[],e.getPooled=ce,e.release=ue}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=ie)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=ie)},persist:function(){this.isPersistent=ie},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 a=new t;return o(a,n.prototype),n.prototype=a,n.prototype.constructor=n,n.Interface=o({},r.Interface,e),n.extend=r.extend,pe(n),n},pe(se);var de=se.extend({data:null}),fe=se.extend({data:null}),he=[9,13,27,32],ge=Y&&"CompositionEvent"in window,me=null;Y&&"documentMode"in document&&(me=document.documentMode);var ve=Y&&"TextEvent"in window&&!me,be=Y&&(!ge||me&&8=me),ye=String.fromCharCode(32),we={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 _e(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 Ce(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var ke=!1;var Ee={eventTypes:we,extractEvents:function(e,t,n,r){var o=void 0,a=void 0;if(ge)e:{switch(e){case"compositionstart":o=we.compositionStart;break e;case"compositionend":o=we.compositionEnd;break e;case"compositionupdate":o=we.compositionUpdate;break e}o=void 0}else ke?_e(e,n)&&(o=we.compositionEnd):"keydown"===e&&229===n.keyCode&&(o=we.compositionStart);return o?(be&&"ko"!==n.locale&&(ke||o!==we.compositionStart?o===we.compositionEnd&&ke&&(a=ae()):(re="value"in(ne=r)?ne.value:ne.textContent,ke=!0)),o=de.getPooled(o,t,n,r),a?o.data=a:null!==(a=Ce(n))&&(o.data=a),H(o),a=o):a=null,(e=ve?function(e,t){switch(e){case"compositionend":return Ce(t);case"keypress":return 32!==t.which?null:(xe=!0,ye);case"textInput":return(e=t.data)===ye&&xe?null:e;default:return null}}(e,n):function(e,t){if(ke)return"compositionend"===e||!ge&&_e(e,t)?(e=ae(),oe=re=ne=null,ke=!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