UNPKG

awv3

Version:
1 lines 344 kB
!function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};e.m=t,e.c=n,e.i=function(t){return t},e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=195)}([function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(134),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=i.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(222),o=r(i),a=n(220),s=r(a),u=n(49),c=r(u);e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,c.default)(e)));t.prototype=(0,s.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(o.default?(0,o.default)(t,e):t.__proto__=e)}},function(t,e,n){"use strict";e.__esModule=!0;var r=n(49),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,i.default)(e))&&"function"!=typeof e?t:e}},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e){t.exports=THREE},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(1),o=r(i),a=n(0),s=r(a),u=n(3),c=r(u),l=n(2),f=r(l),h=n(35),d=r(h),p=n(19),v=n(37),m=n(27),y=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,p.halt)("element must be initialized with a plugin"),r=arguments[1];(0,s.default)(this,e);var i=(0,o.default)({name:"",type:"",visible:!0,active:!0,collapsed:!1,children:[],color:void 0,focus:!1,flex:1,margin:!0,lastEvent:{},index:0},r,{plugin:n.id,managed:!0}),a=(0,c.default)(this,t.call(this,n.session,v.actions,function(t){return t.elements[a.id]},i));return a.__plugin=n,n.dependencies.push(a),a}return(0,f.default)(e,t),e.prototype.addChild=function(t){this.store.dispatch(v.actions.addChild(this.id,t instanceof e?t.id:t))},e.prototype.removeChild=function(t){this.store.dispatch(v.actions.removeChild(this.id,t instanceof e?t.id:t))},e.prototype.removeAllChilds=function(){this.store.dispatch(v.actions.removeAllChilds(this.id))},e.prototype.__onDestroyed=function(){var t=this.__plugin.dependencies.indexOf(this);t>-1&&this.__plugin.dependencies.splice(t,1),this.store.dispatch(m.actions.removeElement(this.__plugin.id,this.id))},e}((0,d.default)());y.Type={Group:"Group",Label:"Label",Input:"Input",Button:"Button",Checkbox:"Checkbox",Dropdown:"Dropdown",Selection:"Selection",Console:"Console",Spacer:"Spacer",Divider:"Divider",Slider:"Slider",Link:"Link",Custom:"Custom"},e.default=y},function(t,e,n){var r=n(10),i=n(4),o=n(22),a=n(24),s=function(t,e,n){var u,c,l,f=t&s.F,h=t&s.G,d=t&s.S,p=t&s.P,v=t&s.B,m=t&s.W,y=h?i:i[e]||(i[e]={}),g=y.prototype,_=h?r:d?r[e]:(r[e]||{}).prototype;h&&(n=e);for(u in n)(c=!f&&_&&void 0!==_[u])&&u in y||(l=c?_[u]:n[u],y[u]=h&&"function"!=typeof _[u]?n[u]:v&&c?o(l,r):m&&_[u]==l?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e.prototype=t.prototype,e}(l):p&&"function"==typeof l?o(Function.call,l):l,p&&((y.virtual||(y.virtual={}))[u]=l,t&s.R&&g&&!g[u]&&a(g,u,l)))};s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},function(t,e,n){t.exports={default:n(228),__esModule:!0}},function(t,e,n){var r=n(101)("wks"),i=n(72),o=n(10).Symbol,a="function"==typeof o;(t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))}).store=r},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e,n){var r=n(15),i=n(140),o=n(103),a=Object.defineProperty;e.f=n(16)?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(168),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){t.exports={default:n(238),__esModule:!0}},function(t,e,n){var r=n(17);t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n){t.exports=!n(30)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){"use strict";function r(t){}function i(t){throw new Error(t)}e.__esModule=!0,e.log=r,e.halt=i},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.normalizeName=e.buildFeaturePath=e.createObserver=e.arrayDiff=e.pack=e.ObjectPrototype=e.Pool=void 0;var i=n(49),o=r(i),a=n(14),s=r(a),u=n(65),c=r(u),l=n(1),f=r(l),h=n(0),d=r(h),p=n(3),v=r(p),m=n(2),y=r(m),g=n(5),_=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(g),b=n(408),w=n(226),x=n(21),k=r(x),O=n(46),S=(e.Pool=function(t){function e(n){var r=n.session,i=n.name,o=void 0===i?"pool":i;(0,d.default)(this,e);var a=(0,v.default)(this,t.call(this));return a.name=o,a.session=r,a.temporary=new _.Group,a.temporary.name=o+".temporary",a.temporary.updateParentMaterials=!1,t.prototype.add.call(a,a.temporary),a.preset={duration:300,renderOrder:k.default.RenderOrder.Default},a.defaults=a.preset,a}return(0,y.default)(e,t),e.prototype.update=function(){},e.prototype.fadeIn=function(t){var e=this;if(this.session){this.updateMaterials(),this.defaults=this.preset;var n=this.session.options.materials.edgeOpacity,r=this.session.options.materials.edgeColor;t=(0,f.default)({},this.preset,t),this.materials.all.forEach(function(i){var o=1,a=i.color;i.meta&&(a=new(Function.prototype.bind.apply(_.Color,[null].concat(i.meta.material.color))),o=i.meta.material.opacity),i.type.indexOf("Line")>-1&&(o="undefined"!==n?n:o,a="undefined"!==r?r:a),i.animate({opacity:o,color:a}).start(t.duration),e.setRenderOrder(t.renderOrder)})}},e.prototype.fadeOut=function(t){if(this.session){this.updateMaterials();var e=this.session.options.materials.edgeOpacity||.3;this.defaults=(0,f.default)({},this.preset,{meshOpacity:.3,lineOpacity:e,renderOrder:k.default.RenderOrder.MeshesFirst},t),this.animate({materials:{meshes:[{opacity:this.defaults.meshOpacity}],lines:[{opacity:this.defaults.lineOpacity}]}}).start(this.defaults.duration),this.setRenderOrder(this.defaults.renderOrder)}},e}(_.Group),e.ObjectPrototype=function(t){function e(n){var r=n.session;(0,d.default)(this,e);var i=(0,v.default)(this,t.call(this));return i.session=r,i.session&&(i.pool=r.pool),i}return(0,y.default)(e,t),e.prototype.reset=function(t){var e=this;if(this.pool){t.updateMaterials();var n=t.materials.meshes.map(function(t){return{opacity:e.pool.defaults.meshOpacity||void 0!==session.options.materials.meshOpacity?session.options.materials.edgeOpacity:t.opacity}}),r=t.materials.lines.map(function(t){return{opacity:e.pool.defaults.lineOpacity||void 0!==session.options.materials.edgeOpacity?session.options.materials.edgeOpacity:t.opacity}});t.animate({materials:{meshes:n,lines:r}}).from({materials:{meshes:[{opacity:0}],lines:[{opacity:0}]}}).start(this.pool.defaults.duration).easing(O.exponential.in),t.setRenderOrder(this.pool.defaults.renderOrder)}return this},e}(_.Group),e.pack=function(t){return(0,w.encode)((0,b.deflate)(t,{raw:!0}))},e.arrayDiff=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments[2],r=arguments[3],i=new c.default(t),o=new c.default(e),a=[];if(n){var u=t.filter(function(t){return!o.has(t)});if(u.length){var l=n(u);l&&(a=l)}}if(r){var f=e.filter(function(t){return!i.has(t)});if(f.length){var h=r(f);h&&(a=[].concat(a,h))}}return s.default.all(a)},e.createObserver=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.getState;return function(n,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i.fireOnStart,a=void 0!==o&&o,s=i.unsubscribeOnUndefined,u=void 0!==s&&s,c=i.onRemove,l=void 0===c?void 0:c,f=i.manager,h=void 0===f?void 0:f,d=void 0,p=!1,v=void 0,m=void 0;if(void 0===(v=e())||void 0===(m=n(v))&&u)return function(){};var y=function(){if(!p){var t=m;if(void 0===(v=e())||void 0===(m=n(v))&&u)return m=t,d();m!==t&&r(m,t)}};a&&(m=void 0,y());var g=t.subscribe(y);return d=function(){p||(p=!0,g(),l&&l(m,d))},h&&h(d),d}},e.buildFeaturePath=function(t,e){"object"!==(void 0===e?"undefined":(0,o.default)(e))&&(e=t[e]);for(var n=[S(e.name)],r=e;r&&r.parent>1;)r=t[r.parent],n.push(S(r.name));return"_O."+n.reverse().join(".")},e.normalizeName=function(t){return t.replace(/(\s|-|\r?\n)/g,"")})},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){return e.parent===t&&t instanceof E.Scene||t.view?e.traverse(function(e){e.scene=t instanceof E.Scene?t:t.scene,e.view=t.view,e.canvas=t.canvas,e.emit(E.Object3D.Events.Lifecycle.ViewFound,e.view)}):e.traverse(function(t){t.scene=void 0,t.view=void 0,t.canvas=void 0}),e}function o(t,e){t.material&&e(t);for(var n=t.children,r=Array.isArray(n),i=0,n=r?n:(0,c.default)(n);;){var a;if(r){if(i>=n.length)break;a=n[i++]}else{if(i=n.next(),i.done)break;a=i.value}var s=a;s.updateParentMaterials&&o(s,e)}}function a(t,e){for(var n=["polygonOffsetFactor","polygonOffsetUnits"],r=0;r<n.length;r++){var i=n[r];void 0!==e[i]&&(t[i]=e[i],delete e[i])}}function s(t,e){for(var n=new E.Vector3,r=e.children,i=Array.isArray(r),o=0,r=i?r:(0,c.default)(r);;){var a;if(i){if(o>=r.length)break;a=r[o++]}else{if(o=r.next(),o.done)break;a=o.value}var u=a,l=u.geometry;if(void 0!==l&&u.measurable&&u.visible)if(l&&l.isGeometry)for(var f=l.vertices,h=0,d=f.length;h<d;h++)n.copy(f[h]),n.applyMatrix4(u.matrixWorld),t.expandByPoint(n);else if(l&&l.isBufferGeometry){var p=l.attributes.position;if(void 0!==p){var v,m,y;p&&p.isInterleavedBufferAttribute?(v=p.data.array,m=p.offset,y=p.data.stride):(v=p.array,m=0,y=3);for(var h=m,d=v.length;h<d;h+=y)n.fromArray(v,h),n.applyMatrix4(u.matrixWorld),t.expandByPoint(n)}}u.measurable&&u.visible&&s(t,u)}}e.__esModule=!0;var u=n(8),c=r(u),l=n(89),f=r(l),h=n(50),d=r(h),p=n(48),v=r(p),m=n(14),y=r(m),g=n(28),_=r(g),b=n(1),w=r(b),x=n(0),k=r(x),O=n(3),S=r(O),A=n(2),j=r(A),M=n(5),E=function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e.default=t,e}(M),P=n(63),C=r(P),D=n(26),T=r(D),F=n(84),z=r(F),I=n(87),R=r(I),B=function(t){function e(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;(0,k.default)(this,e);var i=(0,S.default)(this,t.call(this));return r&&i.setValues(r),n&&i.add(n),i}return(0,j.default)(e,t),e}(E.Object3D);e.default=B,E.Object3D.Events={Lifecycle:{Loaded:"Loaded",Added:"Added",ViewFound:"ViewFound",ChildAdded:"ChildAdded",Removed:"Removed",ChildRemoved:"ChildRemoved",Destroyed:"Destroyed",Rendered:"Rendered"},Interaction:{Clicked:"Clicked",Picked:"Picked",Dropped:"Dropped",Dragged:"Dragged",Hovered:"Hovered",Unhovered:"Unhovered",Missed:"Missed"}},E.Object3D.prototype.canvas=void 0,E.Object3D.prototype.view=void 0,E.Object3D.prototype.bounds=void 0,E.Object3D.prototype.materials=void 0,E.Object3D.prototype.updateParentMaterials=!0,E.Object3D.prototype.keep=!1,E.Object3D.prototype.measurable=!0,E.Object3D.prototype.tweens=!0,E.Object3D.prototype.interactive=!0,E.Object3D.prototype.interaction=void 0,T.default.mixin(E.Object3D.prototype),E.Object3D.prototype.createInteraction=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(this.interaction)return this;this.interaction=(0,w.default)({first:!0,faces:!1,priority:0,enabled:!0,recursive:!1,approach:R.default.Approach.Default,types:["Mesh"]},e);var n=this;return this.viewFound().then(function(t){if(-1==t.interaction.targets.indexOf(n)){t.interaction.targets.push(n);var e=0;t.scene.traverse(function(t){return t.depthIndex=e++}),t.interaction.targets.sort(function(t,e){return t.depthIndex-e.depthIndex})}}),this.inspect(function(e){return t.interaction._active=!!(0,_.default)(t._callbacks).find(function(t){return t in E.Object3D.Events.Interaction})}),this},E.Object3D.prototype.removeInteraction=function(){this.view&&this.interaction&&(this.interaction=void 0,this.view.interaction.removeTarget(this),this.removeInspectors(),this.removeListener([B.Events.Interaction.Clicked,B.Events.Interaction.Picked,B.Events.Interaction.Dropped,B.Events.Interaction.Dragged,B.Events.Interaction.Hovered,B.Events.Interaction.Unhovered,B.Events.Interaction.Misses,B.Events.Lifecycle.Rendered]))},E.Object3D.prototype.viewFound=function(){var t=this;return this.view?y.default.resolve(this.view):new y.default(function(e){return t.once(E.Object3D.Events.Lifecycle.ViewFound,e)})},E.Object3D.prototype._destroyRecursive=function(t){if(this.canvas=void 0,this.view=void 0,this.scene=void 0,this.bounds=void 0,this.userData={},this.geometry&&this.geometry.dispose(),this.material){Array.isArray(this.material)?(this.material.forEach(function(t){t.dispose(),t.needsUpdate=!0}),this.material=void 0):(this.material.dispose&&this.material.dispose(),this.material.needsUpdate=!0,this.material=void 0)}if(this.materials&&(this.materials.all=[],this.materials.meshes=[],this.materials.lines=[]),t.async)return y.default.all(this.children.map(function(e){return e.destroyAsync(t)}));for(var e=this.children.length-1;e>=0;e--)this.children[e].destroy(t)},E.Object3D.prototype.destroyAsync=function(){var t=(0,v.default)(d.default.mark(function t(){var e,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=this.view,n=(0,w.default)({keep:!0,data:!0,interaction:!0,listeners:!0},n),!n.keep||!this.keep){t.next=4;break}return t.abrupt("return");case 4:if(t.t0=n.data,!t.t0){t.next=8;break}return t.next=8,this._destroyRecursive((0,w.default)({},n,{async:!0}));case 8:return n.interaction&&this.removeInteraction(),t.next=11,this.emit(B.Events.Lifecycle.Destroyed);case 11:if(t.t1=this.parent,!t.t1){t.next=15;break}return t.next=15,this.parent.removeAsync(this);case 15:n.listeners&&this.removeListeners(),this.removeObjectTweens(),e&&e.invalidate();case 18:case"end":return t.stop()}},t,this)}));return function(){return t.apply(this,arguments)}}(),E.Object3D.prototype.destroy=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=this.view;t=(0,w.default)({keep:!0,data:!0,interaction:!0,listeners:!0},t),t.keep&&this.keep||(this.emit(B.Events.Lifecycle.Destroyed),this.parent&&this.parent.remove(this),t.interaction&&this.removeInteraction(),t.listeners&&this.removeListeners(),this.removeObjectTweens(),t.data&&this._destroyRecursive(t),e&&e.invalidate())},E.Object3D.prototype.addAsync=function(){var t=(0,v.default)(d.default.mark(function t(e){var n=this,r=arguments;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=r.length>1?(0,f.default)(r):e,!Array.isArray(e)){t.next=3;break}return t.abrupt("return",y.default.all(e.map(function(t){return n.addAsync(t)})));case 3:if(!(e!==this&&e instanceof E.Object3D)){t.next=14;break}if(!e.parent){t.next=7;break}return t.next=7,e.parent.removeAsync(e);case 7:return e.parent=this,this.children.push(i(this,e)),t.next=11,this.emit(B.Events.Lifecycle.ChildAdded,{child:e});case 11:return t.next=13,e.emit(B.Events.Lifecycle.Added,{parent:this});case 13:!!this.view&&this.view.invalidate();case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),E.Object3D.prototype.add=function(t){var e=this;if(t=arguments.length>1?(0,f.default)(arguments):t,Array.isArray(t))return y.default.all(t.map(function(t){return e.add(t)}));t!==this&&t instanceof E.Object3D&&(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(i(this,t)),this.emit(B.Events.Lifecycle.ChildAdded,{child:t}),t.emit(B.Events.Lifecycle.Added,{parent:this}),!!this.view&&this.view.invalidate())},E.Object3D.prototype.removeAsync=function(){var t=(0,v.default)(d.default.mark(function t(e){var n,r=this,o=arguments;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=o.length>1?(0,f.default)(o):e,!Array.isArray(e)){t.next=3;break}return t.abrupt("return",y.default.all(e.map(function(t){return r.removeAsync(t)})));case 3:if(!(e instanceof E.Object3D)){t.next=14;break}if(-1===(n=this.children.indexOf(e))){t.next=14;break}return t.next=8,this.emit(B.Events.Lifecycle.ChildRemoved,{child:e});case 8:return t.next=10,e.emit(B.Events.Lifecycle.Removed,{parent:this});case 10:this.children.splice(this.children.indexOf(e),1),e.parent=null,i(this,e),!!this.view&&this.view.invalidate();case 14:case"end":return t.stop()}},t,this)}));return function(e){return t.apply(this,arguments)}}(),E.Object3D.prototype.remove=function(t){var e=this;if(t=arguments.length>1?(0,f.default)(arguments):t,Array.isArray(t))return y.default.all(t.map(function(t){return e.remove(t)}));if(t instanceof E.Object3D){var n=this.children.indexOf(t);-1!==n&&(this.emit(B.Events.Lifecycle.ChildRemoved,{child:t}),t.emit(B.Events.Lifecycle.Removed,{parent:this}),this.children.splice(n,1),t.parent=null,i(this,t),!!this.view&&this.view.invalidate())}},E.Object3D.prototype.removeObjectTweens=function(){return z.default.removeObjectTweens(this),this},E.Object3D.prototype.updateMaterials=function(){var t=this,e={};return this.materials=this.materials||{updateParent:!0,all:[],meshes:[],lines:[]},this.materials.all=[],this.materials.meshes=[],this.materials.lines=[],o(this,function(t){return e[t.material.uuid]=t.material}),(0,_.default)(e).forEach(function(n){var r=e[n];Array.isArray(r)?r.forEach(function(e){t.materials.all.push(e),e.type.indexOf("Mesh")>-1?t.materials.meshes.push(e):e.type.indexOf("Line")>-1&&t.materials.lines.push(e)}):(t.materials.all.push(r),r.type.indexOf("Mesh")>-1?t.materials.meshes.push(r):r.type.indexOf("Line")>-1&&t.materials.lines.push(r))}),this},E.Object3D.prototype.compress=function(){var t=this;if(this.materials){for(var e=((0,_.default)(this.materials.all),{}),n=0,r=this.materials.all.length;n<r;n++){var i,o;!function(){i=t.materials.all[n],o="#"+i.color.getHexString()+"_"+i.opacity.toFixed(2)+"_"+i.type;var r=e[o];r?t.traverse(function(t){if(t.material){if(Array.isArray(i))for(var e,n=0,o=t.material.length;n<o;n++)(e=t.material[n])===i&&(e.dispose(),t.material[n]=r);else t.material===i&&(t.material.dispose(),t.material=r)}}):e[o]=i}()}return this.updateMaterials(),this}},E.Object3D.prototype.animate=function(t){return this.tweens?new z.default(this,t):new z.default({},{})},E.Material.prototype.tweens=!0,E.Material.prototype.animate=function(t){return a(this,t),this.tweens?new z.default(this,t):new z.default({},{})},E.Object3D.prototype.animateMaterials=function(t){return this.tweens?new z.default(this,{materials:t}):new z.default({},{})},E.Object3D.prototype.animateAllMaterials=function(t){return this.tweens?new z.default(this,{materials:{all:[t]}}):new z.default({},{})},E.Object3D.prototype.animateMeshes=function(t){return this.tweens?new z.default(this,{materials:{meshes:[t]}}):new z.default({},{})},E.Object3D.prototype.animateLines=function(t){return this.tweens?new z.default(this,{materials:{lines:[t]}}):new z.default({},{})},E.Object3D.prototype.fadeOut=function(t){return this.animate({materials:{meshes:[{opacity:0}],lines:[{opacity:0}]}}).start(t||0),this},E.Object3D.prototype.fadeIn=function(t,e){return this.animate({materials:{meshes:[{opacity:e||1}],lines:[{opacity:e||1}]}}).start(t||0),this},E.Object3D.prototype.setValues=function(t){return new z.default(this,t).start(0)},E.Object3D.prototype.root=function(){for(var t=this;t;){if(!t.parent||t.parent instanceof E.Scene)return t;t=t.parent}},E.Object3D.prototype.pwtl=function(t){return this.parent.worldToLocal(t.clone())},E.Object3D.prototype.pltw=function(t){return this.parent.localToWorld(t.clone())},E.Object3D.prototype.isChildOf=function(t){for(var e=this;e;){if(e==t)return!0;e=e.parent}return!1},E.Object3D.prototype.isVisible=function(){return!(!this.visible||this instanceof E.Mesh&&0==this.material.opacity)&&(null==this.parent||this.parent instanceof E.Scene?this.visible:!!this.visible&&this.parent.isVisible())},E.Object3D.prototype.find=function(t){if(t(this))return this;for(var e=this.children,n=Array.isArray(e),r=0,e=n?e:(0,c.default)(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}var o=i,a=o.find(t);if(a)return a}},E.Object3D.prototype.getObjectByMatch=function(t){for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e];if(r.name.indexOf(t)>-1)return r}},E.Object3D.prototype.getObjectByUserId=function(t){if(this.userData&&this.userData.id===t)return this;for(var e=0,n=this.children.length;e<n;e++){var r=this.children[e],i=r.getObjectByUserId(t);if(void 0!==i)return i}},E.Object3D.prototype.lastChild=function(){return this.children.length?this.children[this.children.length-1]:void 0},E.Object3D.prototype.setPosition=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(E.Vector3,[null].concat(Array.prototype.slice.call(arguments)))):t,this.position.copy(t),this},E.Object3D.prototype.setRotation=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(E.Euler,[null].concat(Array.prototype.slice.call(arguments)))):t,this.rotation.copy(t),this},E.Object3D.prototype.setScale=function(t){return t=arguments.length>1?new(Function.prototype.bind.apply(E.Vector3,[null].concat(Array.prototype.slice.call(arguments)))):t,this.scale.copy(t),this},E.Object3D.prototype.setRenderOrder=function(t,e){return this.traverse(function(n){(n instanceof E.Mesh||e&&n instanceof E.Line)&&(n.renderOrder=t)}),this},E.Object3D.prototype.updateBounds=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this.bounds=this.bounds||{box:new E.Box3,sphere:new E.Sphere},this.bounds.box=t?this.bounds.box.union(t):(new E.Box3).setFromObject(this),this.bounds.sphere=this.bounds.box.getBoundingSphere(),this},E.Box3.prototype.setFromObject=function(t){return t.updateMatrixWorld(!0),this.makeEmpty(),s(this,t),this},E.Object3D.prototype.getCenter=function(t){return!t&&this.bounds||this.updateBounds(),this.bounds.sphere.center.clone()},E.Object3D.prototype.getRadius=function(t){return!t&&this.bounds||this.updateBounds(),this.bounds.sphere.radius},E.Object3D.prototype.centerGeometry=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.getCenter(!0);(!(arguments.length>1&&void 0!==arguments[1])||arguments[1])&&this.position.copy(t),this.geometry&&(this.geometry instanceof E.Geometry||this.geometry instanceof E.BufferGeometry)&&(this.geometry.applyMatrix((new E.Matrix4).makeTranslation(-t.x,-t.y,-t.z)),this.geometry.computeBoundingBox(),this.geometry.computeBoundingSphere());for(var e=this.children,n=Array.isArray(e),r=0,e=n?e:(0,c.default)(e);;){var i;if(n){if(r>=e.length)break;i=e[r++]}else{if(r=e.next(),r.done)break;i=r.value}i.centerGeometry(t,!1)}return this},E.Object3D.prototype.centerChildGeometry=function(){for(var t=this.children,e=Array.isArray(t),n=0,t=e?t:(0,c.default)(t);;){var r;if(e){if(n>=t.length)break;r=t[n++]}else{if(n=t.next(),n.done)break;r=n.value}r.centerGeometry()}return this},E.Object3D.prototype.addEventListener=function(t,e){return this.on(t,e)},E.Object3D.prototype.hasEventListener=function(t,e){return this.hasListener(t,e)},E.Object3D.prototype.removeEventListener=function(t,e){return this.removeListener(t,e)},E.Object3D.prototype.dispatchEvent=function(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];return this.emit.apply(this,[t].concat(n))},E.Object3D.prototype.setRenderOrder=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C.default.renderOrder;return this.traverse(function(e){var n=t[e.type];void 0!==n&&(e.renderOrder=n)}),this},E.Object3D.RenderOrder={Default:{Mesh:0,LineSegments:100},LinesFirst:{Mesh:0,LineSegments:100},MeshesFirst:{Mesh:100,LineSegments:0}},E.Object3D.prototype.traverseConditional=function(t){if(t(this))for(var e=this.children,n=0,r=e.length;n<r;n++)e[n].traverseConditional(t)},E.Object3D.prototype.traverseMaterials=function(t){this.traverse(function(e){if(e.material){Array.isArray(e.material)?e.material.forEach(function(n){return t(n,e)}):t(e.material,e)}})}},function(t,e,n){var r=n(90);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(11),i=n(56);t.exports=n(16)?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(96),i=n(67);t.exports=function(t){return r(i(t))}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(14),o=r(i),a=n(221),s=r(a),u=n(49),c=r(u),l=n(8),f=r(l),h=n(0),d=r(h),p=function(){function t(){(0,d.default)(this,t),this._callbacks=void 0,this._inspectors=void 0}return t.prototype.once=function(t,e){this.on(t,e,!0)},t.prototype.onFirst=function(t,e){this.on(t,e,!1,1)},t.prototype.onLast=function(t,e){this.on(t,e,!1,-1)},t.prototype.on=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0;if(this._callbacks||(this._callbacks={}),Array.isArray(t)||"string"==typeof t&&"function"==typeof e)for(var i=Array.isArray(t)?t:[t],o=i,a=Array.isArray(o),s=0,o=a?o:(0,f.default)(o);;){var u;if(a){if(s>=o.length)break;u=o[s++]}else{if(s=o.next(),s.done)break;u=s.value}var l=u,h=this._callbacks[l];if(h||(h=this._callbacks[l]=[]),h.indexOf(e)<0&&(e.remove=n,r&&(e.priority=r),h.push(e),h.sort(function(t,e){return e.priority||0-t.priority||0}),this._inspectors))for(var d=this._inspectors,p=Array.isArray(d),v=0,d=p?d:(0,f.default)(d);;){var m;if(p){if(v>=d.length)break;m=d[v++]}else{if(v=d.next(),v.done)break;m=v.value}var y=m;y({action:"Add",type:l,callback:e})}}else if("object"===(void 0===t?"undefined":(0,c.default)(t))&&void 0===e)for(var g in t){var _=t[g];"function"==typeof _&&this.on(g,_,n,r)}return this},t.prototype.inspect=function(t){this._inspectors||(this._inspectors=[]),this._inspectors.push(t)},t.prototype.removeListener=function(t,e){if(!Array.isArray(t)&&"object"===(void 0===t?"undefined":(0,c.default)(t))&&void 0===e){for(var n=(0,s.default)(t),r=Array.isArray(n),i=0,n=r?n:(0,f.default)(n);;){var o;if(r){if(i>=n.length)break;o=n[i++]}else{if(i=n.next(),i.done)break;o=i.value}var a=o,u=a[0],l=a[1];this.removeListener(u,l)}return this}this._callbacks||(this._callbacks={}),t=Array.isArray(t)?t:[t];for(var h=t,d=Array.isArray(h),p=0,h=d?h:(0,f.default)(h);;){var v;if(d){if(p>=h.length)break;v=h[p++]}else{if(p=h.next(),p.done)break;v=p.value}var u=v,m=this._callbacks[u];if(m)if(e){var y=m.indexOf(e);if(y>-1&&m.splice(y,1),this._inspectors)for(var g=this._inspectors,_=Array.isArray(g),b=0,g=_?g:(0,f.default)(g);;){var w;if(_){if(b>=g.length)break;w=g[b++]}else{if(b=g.next(),b.done)break;w=b.value}var x=w;x({action:"Remove",type:u,callback:e})}}else if(delete this._callbacks[u],this._inspectors)for(var k=this._inspectors,O=Array.isArray(k),S=0,k=O?k:(0,f.default)(k);;){var A;if(O){if(S>=k.length)break;A=k[S++]}else{if(S=k.next(),S.done)break;A=S.value}var j=A;j({action:"Remove",type:u,callback:void 0})}}return this},t.prototype.removeListeners=function(){this._callbacks=void 0},t.prototype.removeInspectors=function(){this._inspectors=void 0},t.prototype.emit=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=o.default.resolve();this._callbacks||(this._callbacks={});var s=this._callbacks[t];if(s)for(var u=s,c=Array.isArray(u),l=0,u=c?u:(0,f.default)(u);;){var h,d=function(){if(c){if(l>=u.length)return"break";h=u[l++]}else{if(l=u.next(),l.done)return"break";h=l.value}var n=h;a=a.then(function(i){return n.remove&&e.removeListener(t,n),n.call.apply(n,[e].concat(r))})}();if("break"===d)break}return a},t.prototype.bubble=function(t){for(var e=this,n=arguments.length,r=Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];var a=o.default.resolve();this._callbacks||(this._callbacks={});var s=this._callbacks[t];if(s)for(var u=s,c=Array.isArray(u),l=0,u=c?u:(0,f.default)(u);;){var h,d=function(){if(c){if(l>=u.length)return"break";h=u[l++]}else{if(l=u.next(),l.done)return"break";h=l.value}var t=h;a=a.then(function(n){return t.call.apply(t,[e].concat(r))})}();if("break"===d)break}else if(this.parent){var p;(p=this.parent).bubble.apply(p,[t].concat(r))}return a},t.prototype.findListener=function(t){return this._callbacks||(this._callbacks={}),this._callbacks[t]?this:this.parent?this.parent.find(t):void 0},t.prototype.hasListener=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;this._callbacks||(this._callbacks={});var n=this._callbacks[t];return!(!n||e&&e!==n)},t.mixin=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;e.hasListener=t.prototype.hasListener,e.on=t.prototype.on,e.once=t.prototype.once,e.onFirst=t.prototype.onFirst,e.onLast=t.prototype.onLast,e.inspect=t.prototype.inspect,e.removeListener=t.prototype.removeListener,e.removeListeners=t.prototype.removeListeners,e.removeInspectors=t.prototype.removeInspectors,e.emit=t.prototype.emit,e.bubble=t.prototype.bubble,e.findListener=t.prototype.findListener,n&&e.on.bind(e)(n)},t}();e.default=p},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=e.type,r=(0,a.default)(e,["type"]);switch(n){case p.enable:return(0,l.default)({},t,{enabled:r.enabled,collapsed:!r.enabled||t.collapsed});case p.toggle:return(0,l.default)({},t,{enabled:!t.enabled,collapsed:!!t.enabled||t.collapsed});case p.collapse:return(0,l.default)({},t,{collapsed:r.collapsed});case p.toggleCollapse:return(0,l.default)({},t,{collapsed:!t.collapsed});case p.addElement:return(0,l.default)({},t,{elements:[].concat(t.elements,[r.element])});case p.removeElement:return(0,l.default)({},t,{elements:t.elements.filter(function(t){return t!==r.element})});case p.removeAllElements:return(0,l.default)({},t,{elements:[]});default:return t}}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var o=n(29),a=r(o),s=n(136),u=r(s),c=n(1),l=r(c),f=n(35),h="plugins",d=e.base=(0,f.mixin)(h,i),p=e.types=(0,l.default)({},d.types,{enable:h+"/enable",toggle:h+"/toggle",collapse:h+"/collapse",toggleCollapse:h+"/toggleCollapse",addElement:h+"/addElement",removeElement:h+"/removeElement",removeAllElements:h+"/removeAllElements",closeAllFeatures:h+"/closeAllFeatures"}),v=e.actions=(0,l.default)({},d.actions,{enable:function(t,e){return{type:p.enable,id:t,enabled:e}},toggle:function(t){return{type:p.toggle,id:t}},collapse:function(t,e){return function(e){return requestAnimationFrame(function(){return e({type:p.collapse,id:t})})}},toggleCollapse:function(t){return function(e){return requestAnimationFrame(function(){return e({type:p.toggleCollapse,id:t})})}},addElement:function(t,e){return{type:p.addElement,id:t,element:e}},removeElement:function(t,e){return{type:p.removeElement,id:t,element:e}},removeAllElements:function(t){return{type:p.removeAllElements,id:t}},closeAllFeatures:function(){return function(t){return(0,u.default)(d.references).forEach(function(e){return e.feature&&t(v.unregister(e.id))})}}});e.reducer=d.reducer},function(t,e,n){t.exports={default:n(235),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){var n={};for(var r in t)e.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(t,r)&&(n[r]=t[r]);return n}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(149),i=n(95);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){function r(t,e){var n=o(t,e);return i(n)?n:void 0}var i=n(318),o=n(351);t.exports=r},function(t,e){function n(t){return null!=t&&"object"==typeof t}t.exports=n},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t){for(var e=window.location.search.substring(1),n=e.split("&"),r=0;r<n.length;r++){var i=n[r].split("=");if(i[0]==t)return i[1]}}function o(t){return("string"==typeof t||t instanceof String)&&(t=document.querySelector(t)),t}function a(t,e,n,r){var i,o,a,s=["-moz-","-webkit-","-o-","-ms-","-khtml-"];t.style[e]="",a=t.style[e];try{if(t.style[e]=n,t.style[e]!==a)return}catch(t){}for(i=0;i<s.length;++i){o=s[i]+n;try{if(t.style[e]=o,t.style[e]!==a)return}catch(t){}}t.style[e]=r}e.__esModule=!0,e.Timestamp=e.Performance=void 0;var s=n(219),u=r(s),c=n(0),l=r(c);e.url=i,e.queryDom=o,e.setPrefixedValue=a;e.Performance=function(){function t(){(0,l.default)(this,t),this.stamp=void 0,this.total=void 0}return t.prototype.begin=function(){return this.stamp=performance.now(),this},t.prototype.end=function(){return this.stamp=performance.now()-this.stamp,(!this.total||this.stamp>this.total)&&(this.total=this.stamp),this},t.prototype.printCurrent=function(){return this},t.prototype.printTotal=function(){return this},t.prototype.clear=function(){return this.total=void 0,this},t}(),e.Timestamp=function(){function t(t,e){return t=t.toString(),String(e+t).slice(-e.length)}var e=performance.now(),n=Date.now();return{get:function(){var r=performance.now()-e,i=n+r,o=(0,u.default)(i/6e4)%60,a=(0,u.default)(i/1e3)%60,s=(0,u.default)(1e3*i)%1e6;return t(o,"00")+":"+t(a,"00")+"."+t(s,"000000")}}}()},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.mixin=void 0;var i=n(135),o=r(i),a=n(65),s=r(a),u=n(3),c=r(u),l=n(2),f=r(l),h=n(0),d=r(h),p=n(28),v=r(p),m=n(1),y=r(m),g=n(29),_=r(g),b=n(45),w=r(b),x=n(184),k=r(x),O=n(180),S=r(O),A=n(19),j=n(20),M=function(t,e){var n={},r={register:t+"/REGISTER",registerQueue:t+"/REGISTERQUEUE",unregister:t+"/UNREGISTER",update:t+"/UPDATE",merge:t+"/MERGE"};return{references:n,types:r,actions:{register:function(t,e){return function(i){n[t.id]=t,i({type:r.register,id:t.id,props:e})}},unregister:function(t){return function(e){var i=Array.isArray(t)?t:[t];e({type:r.unregister,ids:t}),i.forEach(function(t){n[t]&&(n[t].destroy(!1),delete n[t])})}},update:function(t,e){return{type:r.update,id:t,props:e}},merge:function(t){return{type:r.merge,props:t}}},reducer:function(){var t,n,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=arguments[1],a=o.type,s=o.id,u=(0,_.default)(o,["type","id"]);switch(a){case r.register:return(0,y.default)({},i,(t={},t[s]=(0,y.default)({id:s},u.props),t));case r.unregister:return(0,k.default)(i,u.ids);case r.update:return(0,y.default)({},i,(n={},n[s]=(0,y.default)({},i[s],u.props),n));case r.merge:return(0,v.default)(u.props).reduce(function(t,e){var n;return(0,y.default)({},t,(n={},n[e]=(0,y.default)({id:e},t[e],u.props[e]),n))},i);default:if(u&&s&&i[s]){var c;return(0,y.default)({},i,(c={},c[s]=e(i[s],(0,y.default)({type:a},u)),c))}}return i}}};e.mixin=M,e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){function t(){(0,d.default)(this,t)}return t}(),e=arguments[1];return function(t){function n(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:(0,A.halt)("Lifecycle object is missing a session"),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,A.halt)("Lifecycle object is missing link to actions"),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,A.halt)("Lifecycle object is missing a selector"),u=arguments[3];(0,d.default)(this,n);var l=(0,c.default)(this,t.call(this,e));l.id=(0,w.default)(),l.session=r,l.store=r.store,l.actions=i,l.getState=function(){return a(l.store.getState())},l.subscriptions=new s.default,l.dependencies=[],l.store.dispatch(i.register(l,u)),l.props=(0,S.default)(u);var f=(0,j.createObserver)(l.store,l.getState);l.observe=function(t,e,n){return f(t,e,(0,y.default)({manager:l.managed&&l.addSubscription.bind(l)},n))};for(var h in u)!function(t){!l[t]&&(0,o.default)(l,t,{configurable:!0,get:function(){var e=l.getState();return e&&e[t]},set:function(e){var n;return l.store.dispatch(i.update(l.id,(n={},n[t]=e,n)))}})}(h);return l}return(0,f.default)(n,t),n.prototype.reset=function(){this.store.dispatch(this.actions.update(this.id,this.props))},n.prototype.destroy=function(){arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?(this.removeSubscriptions(),this.__onDestroyed&&this.__onDestroyed(),this.onDestroyed(),this.dependencies.slice().forEach(function(t){return t.destroy()}),this.dependencies=[]):this.store.dispatch(this.actions.unregister(this.id))},n.prototype.addSubscription=function(t){return this.subscriptions.add(t),t},n.prototype.removeSubscription=function(t){t(),this.subscriptions.delete(t)},n.prototype.removeSubscriptions=function(){this.subscriptions.forEach(function(t){return t()}),this.subscriptions.clear(),this.dependencies.forEach(function(t){return t.removeSubscriptions()})},n.prototype.onDestroyed=function(){},n}(t)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n,r=e.type,i=(0,s.default)(e,["type"]);switch(r){case S.setTree:return(0,d.default)({},t,{tree:i.tree});case S.destroyTree:return(0,d.default)({},t,{tree:{1:{id:1,name:"",class:"",parent:null},root:1}});case S.patchTree:return(0,d.default)({},t,{tree:(0,m.apply_patch)(t.tree,i.patches)});case S.message:return(0,d.default)({},t,{messages:[].concat(t.messages,[{type:i.type,message:i.message,reset:i.reset}])});case S.setActiveFeature:return(0,d.default)({},t,{activeFeature:i.feature});case S.linkPlugins:return(0,d.default)({},t,{plugins:[].concat(t.plugins,Array.isArray(i.plugins)?i.plugins:[i.plugins])});case S.unlinkPlugins:return(0,d.default)({},t,{plugins:v.default.apply(void 0,[t.plugins].concat(Array.isArray(i.plugins)?i.plugins:[i.plugins]))});case S.updateTree:return(0,d.default)({},t,{tree:(0,d.default)({},t.tree,(n={},n[i.node]=(0,d.default)({},t.tree[i.node],i.attributes),n))});default:return t}}function o(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.session,i=e.primitives,o=e.waiting,a=(e.pool,(0,_.createContext)(n)),s=a.options;return(0,d.default)({},s,{session:r,materials:r.options.materials,callback:function(t){if("Model"===t.type){r.options.updateMaterials&&t.model.updateMaterials(),r.options.centerGeometry&&t.model.centerGeometry();var n=t.model.userData.id,a=i[n];if(a){var u=a.references.slice();a.destroy(),i[n]=t.model,t.model.references=[],u.forEach(function(e){var n=e.parent;if(e.destroyAsync(),n){var r=t.model.clone();n.addAsync(r),t.model.references.push(r)}})}else i[n]=t.model,t.model.references=[],o[n]&&(o[n].forEach(function(e){return e(t.model)}),delete o[n],e.updateView())}s.callback(t)}})}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var a=n(29),s=r(a),u=n(50),c=r(u),l=n(48),f=r(l),h=n(1),d=r(h),p=n(126),v=r(p),m=n(284),y=n(35),g=n(20),_=n(86),b=r(_),w=n(47),x="connections",k=new b.default,O=e.base=(0,y.mixin)(x,i),S=e.types=(0,d.default)({},O.types,{init:x+"/init",setTree:x+"/setTree",destroyTree:x+"/destroyTree",patchTree:x+"/patchTree",request:x+"/request",message:x+"/message",recalc:x+"/recalc",setName:x+"/setName",setColor:x+"/setColor",setActiveFeature:x+"/setActiveFeature",linkPlugins:x+"/linkPlugins",unlinkPlugins:x+"/unlinkPlugins",disableAllPlugins:x+"/disableAllPlugins",updateTree:x+"/updateTree"}),A=(0,d.default)({},O.actions,{setTree:function(t,e){return{type:S.setTree,id:t,tree:e}},destroyTree:function(t){return{type:S.destroyTree,id:t}},patchTree:function(t,e){return{type:S.patchTree,id:t,patches:e}},message:function(t,e,n,r){var i;return i={type:S.message,id:t},i.type=e,i.message=n,i.reset=r,i},setActiveFeature:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:S.setActiveFeature,id:t,feature:e}},linkPlugins:function(t,e){return{type:S.linkPlugins,id:t,plugins:e}},unlinkPlugins:function(t,e){return{type:S.unlinkPlugins,id:t,plugins:e}},updateTree:function(t,e,n){return{type:S.updateTree,id:t,node:e,attributes:n}},connect:function(t,e,n){return function(){var r=(0,f.default)(c.default.mark(function r(i){var o;return c.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o=O.references[t],r.next=3,(new n).connect(e);case 3:return o.socket=r.sent,r.next=6,i(A.init(t));case 6:o.emit("connected",o);case 7:case"end":return r.stop()}},r,void 0)}));return function(t){return r.apply(this,arguments)}}()},init:function(t){return function(){var e=(0,f.default)(c.default.mark(function e(n){var r,i;return c.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=O.references[t],e.next=3,r.socket.execute('CADH_SetVar("CC_ProductRefCreation",3);');case 3:return e.next=5,r.socket.request({command:"GetTree"});case 5:return i=e.sent,n({type:S.setTree,id:t,tree:i.firstResult}),n(A.message(t,"success","Connected to "+r.socket.url)),e.abrupt("return",i);case 9:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}()},request:function(t,e,n){return function(r){var i=O.references[t],a=o(r,i,n);r(w.actions.beginTask(a.id,e));var s=i.socket.request(e,a);return i.sequence=i.sequence.then(function(){return s.then(function(e){return e.patches&&r(A.patchTree(t,e.patches)),e.errors&&e.errors.forEach(function(e){var n=e.errorMessage;return r(A.message(t,"error",n))}),r(w.actions.finishTask(a.id)),e})}),i.sequence}},stream:function(t,e,n){return function(){var r=(0,f.default)(c.default.mark(function r(i){var a,s;return c.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a=O.references[t],r.next=3,k.stream(e,o(i,a,n));case 3:return s=r.sent,s.patches&&i(A.patchTree(t,s.patches)),r.abrupt("return",s);case 6:case"end":return r.stop()}},r,void 0)}));return function(t){return r.apply(this,arguments)}}()},parse:function(t,e,n){return function(){var r=(0,f.default)(c.default.mark(function r(i){var a,s;return c.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a=O.references[t],r.next=3,k.parse(e,o(i,a,n));case 3:return s=r.sent,s.patches&&i(A.patchTree(t,s.patches)),r.abrupt("return",s);case 6:case"end":return r.stop()}},r,void 0)}));return function(t){return r.apply(this,arguments)}}()},execute:function(t,e){return function(n){return O.references[t].execute(e)}},exportStep:function(t,e){return function(n){return O.references[t].execute('_C.CADApplication.ExportStep("'+e+'");')}},exportOf1:function(t,e){return function(n){return O.references[t].execute('_C.CADApplication.ExportOf1("'+e+'");')}},recalc:function(t){return function(e){return O.references[t].execute("_C.GlobaleFunktionen.UseOnStartRecalc(_O);")}},setColor:function(t,e,n){return function(r){return O.references[t].execute("_C.CADApplication.SetColor(CADH_RealToId("+e+"),"+n.join(",")+");")}},setName:function(t,e,n){return function(r){var i=O.references[t];return i.execute((0,g.buildFeaturePath)(i.tree,e)+'.OBJ_ChangeName("'+(0,g.normalizeName)(n)+'");')}},newPart:function(t){return function(e){return e(A.setActiveFeature(t,void 0)),O.references[t].execute("_C.CADApplication.NewPart();")}},readStream:function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"step";return function(i){var o=O.references[t];return o.request({command:"Execute",task:(0,g.buildFeaturePath)(o.tree,e)+'.ReadStream("data", VOID, "'+r+'");',streamData:{data:n}})}},load:function(t,e){return function(n){return n(A.setActiveFeature(t,void 0)),O.references[t].request({command:"Execute",task:'CADH_SetVertexFilter(TRUE); _C.CADApplication.LoadPart("data");',streamData:{data:e}})}}});e.actions=A;e.reducer=O.reducer},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}function i(t,e){var n=e.type,r=(0,a.default)(e,["type"]);switch(n){case m.addChild:return(0,u.default)({},t,{children:[].concat(t.children,[r.child])});case m.removeChild:return(0,u.default)({},t,{children:t.children.filter(function(t){return t!==r.child})});case m.removeAllChilds:return(0,u.default)({},t,{children:[]});case m.event:return(0,u.default)({},t,{lastEvent:r.event});default:return t}}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var o=n(29),a=r(o),s=n(1),u=r(s),c=n(400),l=r(c),f=n(13),h=r(f),d=n(35),p="elements",v=e.base=(0,d.mixin)(p,i),m=e.types=(0,u.default)({},v.types,{addChild:p+"/addChild",removeChild:p+"/removeChild",removeAllChilds:p+"/removeAllChilds",event:p+"/event"}),y=(0,u.default)({},v.actions,{addChild:function(t,e){return{type:m.addChild,id:t,child:e}},removeChild:function(t,e){return{type:m.removeChild,id:t,child:e}},removeAllChilds:function(t){return{type:m.removeAllChilds,id:t}},event:function(t,e){return{type:m.event,id:t,event:(0,l.default)(e,h.default)}}});e.actions=y;e.reducer=v.reducer},function(t,e,n){"use strict";e.__esModule=!0;var r=n(135),i=function(t){return t&&t.__esModule?t:{default:t}}(r);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),(0,i.default)(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){"use strict";var r=n(261)(!0);n(97)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=r(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){n(265);for(var r=n(10),i=n(24),o=n(53),a=n(9)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],u=0;u<5;u++){var c=s[u],l=r[c],f=l&&l.prototype;f&&!f[a]&&i(f,a,c),o[c]=o.Array}},function(t,e,n){var r=n(12),i=r.Symbol;t.exports=i},function(t,e,n){function r(t){return null==t?void 0===t?u:s:c&&c in Object(t)?o(t):a(t)}var i=n(41),o=n(350),a=n(378),s="[object Null]",u="[object Undefined]",c=i?i.toStringTag:void 0;t.exports=r},function(t,e,n){function r(t,e){return i(t)?t:o(t,e)?[t]:a(s(t))}var i=n(18),o=n(117),a=n(389),s=n(407);t.exports=r},function(t,e,n){function r(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-o?"-0":e}var i=n(80),o=1/0;t.exports=r},function(t,e){e=t.exports=function(){for(var t,n="",r=0;r<32;r++)t=16*e.random()|0,r>4&&r<21&&!(r%4)&&(n+="-"),n+=(12===r?4:16===r?3&t|8:t).toString(16);return n};var n=/^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/;e.isUUID=function(t){return n.test(t)},e.random=function(){return Math.random()}},function(t,e,n){"use strict";e.__esModule=!0;e.back={in:function(t){var e=1.70158;return t*t*((e+1)*t-e)},out:function(t){var e=1.70158;return--t*t*((e+1)*t+e)+1},inOut:function(t){var e=2.5949095;return(t*=2)<1?t*t*((e+1)*t-e)*.5:.5*((t-=2)*t*((e+1)*t+e)+2)}},e.bounce={in:function(t){return 1-outward(1-t)},out:function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},inOut:function(t){return t<.5?.5*inward(2*t):.5*outward(2*t-1)+.5}},e.circular={in:function(t){return 1-Math.sqrt(1-t*t)},out:function(t){return Math.sqrt(1- --t*t)},inOut:function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},e.cubic={in:function(t){return t*t*t},out:function(t){return--t*t*t+1},inOut:function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},e.elastic={in:function(t){var e=void 0,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1)))*Math.sin((t-e)*(2*Math.PI)/.4))},out:function(t){var e=void 0,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/.4)+1)},inOut:function(t){var e=void 0,n=.1;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=.1):e=.4*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*-.5:n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/.4)*.5+1)}},e.exponential={in:function(t){return 0===t?0:Math.pow(1024,t-1)},out:function(t){return 1===t?1:1-Math.pow(2,-10*t)},inOut:function(t){return 0===t?0:1===t?1:(t*=2)<1?.5*Math.pow(1024,t-1):.5*(2-Math.pow(2,-10*(t-1)))}},e.linear=function(t){return t},e.quadratic={in:function(t){return t*t},out:function(t){return t*(2-t)},inOut:function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},e.quartic={in:function(t){return t*t*t*t},out:function(t){return 1- --t*t*t*t},inOut:function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},e.quintic={in:function(t){return t*t*t*t*t},out:function(t){return--t*t*t*t*t+1},inOut:function(t){return(t*=2)<1?.5*t*t*t*t*t: