UNPKG

awv3

Version:
2 lines 372 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={};return 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=432)}([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";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(133),o=r(i);e.default=o.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(224),o=r(i),a=n(222),s=r(a),u=n(29),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 "+("undefined"==typeof 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";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(29),o=r(i);e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,o.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(36),d=r(h),p=n(18),v=n(38),m=n(27),_=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}),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)());_.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"},e.default=_},function(t,e,n){var r=n(10),i=n(4),o=n(21),a=n(23),s="prototype",u=function(t,e,n){var c,l,f,h=t&u.F,d=t&u.G,p=t&u.S,v=t&u.P,m=t&u.B,_=t&u.W,y=d?i:i[e]||(i[e]={}),g=y[s],b=d?r:p?r[e]:(r[e]||{})[s];d&&(n=e);for(c in n)l=!h&&b&&void 0!==b[c],l&&c in y||(f=l?b[c]:n[c],y[c]=d&&"function"!=typeof b[c]?n[c]:m&&l?o(f,r):_&&b[c]==f?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[s]=t[s],e}(f):v&&"function"==typeof f?o(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[c]=f,t&u.R&&g&&!g[c]&&a(g,c,f)))};u.F=1,u.G=2,u.S=4,u.P=8,u.B=16,u.W=32,u.U=64,u.R=128,t.exports=u},function(t,e,n){t.exports={default:n(231),__esModule:!0}},function(t,e,n){var r=n(99)("wks"),i=n(71),o=n(10).Symbol,a="function"==typeof o,s=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};s.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(13),i=n(139),o=n(101),a=Object.defineProperty;e.f=n(14)?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){t.exports={default:n(242),__esModule:!0}},function(t,e,n){var r=n(15);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,n){var r=n(167),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();t.exports=o},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){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}function i(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 o=n(29),a=i(o),s=n(1),u=i(s),c=n(86),l=i(c),f=n(12),h=i(f),d=n(87),p=i(d),v=n(0),m=i(v),_=n(3),y=i(_),g=n(2),b=i(g),w=n(5),x=(r(w),n(410)),k=i(x),S=n(229),A=i(S),O=n(20),M=i(O),j=n(46),E=(e.Pool=function(t){function e(n){var r=n.session;(0,m.default)(this,e);var i=(0,y.default)(this,t.call(this));return i.session=r,i.temporary=new M.default,i.temporary.updateParentMaterials=!1,i.temporary.measurable=!1,t.prototype.add.call(i,i.temporary),i}return(0,b.default)(e,t),e.prototype.update=function(){},e}(M.default),e.ObjectPrototype=function(t){function e(n){var r,i=n.session;(0,m.default)(this,e);var o=(0,y.default)(this,t.call(this));return o.on((r={},r[M.default.Events.Lifecycle.ChildAdded]=function(t){var e=t.child;return e.updateMaterials().animate({materials:{meshes:[{opacity:1}],lines:[{opacity:"undefined"!=typeof i.options.materials.edgeOpacity?i.options.materials.edgeOpacity:1}]}}).from({materials:{meshes:[{opacity:0}],lines:[{opacity:0}]}}).start(200).easing(j.exponential.in)},r)),o}return(0,b.default)(e,t),e}(M.default),e.pack=function(t){return A.default.encode(k.default.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 p.default(t),o=new p.default(e),a=[];if(n){var s=t.filter(function(t){return!o.has(t)});if(s.length){var u=n(s);u&&(a=u)}}if(r){var c=e.filter(function(t){return!i.has(t)});if(c.length){var l=r(c);l&&(a=[].concat(a,l))}}return h.default.all(a)}),P=(e.createObserver=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.getState;return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},a=o.fireOnStart,s=void 0!==a&&a,c=o.unsubscribeOnUndefined,f=void 0!==c&&c,h=o.onRemove,d=void 0===h?void 0:h,p=o.manager,v=void 0===p?void 0:p,m=o.deep,_=void 0!==m&&m,y=void 0,g=!1,b=void 0,w=void 0;if(void 0===(b=n())||void 0===(w=r(b))&&f)return function(){};var x=new l.default,k=function(t,e){return x.set(t,e)},S=function(t){x.delete(t.id),d&&d(t)},A=function(){if(!g){var a=w;return void 0===(b=n())||void 0===(w=r(b))&&f?(w=a,y()):void(w!==a&&(_&&E((w||{}).children,(a||{}).children,function(r){return r.forEach(function(r){return k(r,t(e,n)(function(t){return t.tree[r]},i,(0,u.default)({},o,{unsubscribeOnUndefined:!0,onRemove:S,manager:void 0})))})}),i(w,a)))}};(s||_)&&(w=void 0,A());var O=e.subscribe(A);return y=function(){if(!g){g=!0,O(),d&&d(w);var t=[].concat(x.values());t.forEach(function(t){return t()})}},v&&v(y),y}},e.buildFeaturePath=function(t,e){"object"!==("undefined"==typeof e?"undefined":(0,a.default)(e))&&(e=t[e]);for(var n=[P(e.name)],r=e;r&&r.parent>1;)r=t[r.parent],n.push(P(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){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}function i(t){return t&&t.__esModule?t:{default:t}}function o(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 a(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 o;if(r){if(i>=n.length)break;o=n[i++]}else{if(i=n.next(),i.done)break;o=i.value}var s=o;s.updateParentMaterials&&a(s,e)}}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)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,_;p&&p.isInterleavedBufferAttribute?(v=p.data.array,m=p.offset,_=p.data.stride):(v=p.array,m=0,_=3);for(var h=m,d=v.length;h<d;h+=_)n.fromArray(v,h),n.applyMatrix4(u.matrixWorld),t.expandByPoint(n)}}u.measurable&&s(t,u)}}e.__esModule=!0;var u=n(8),c=i(u),l=n(132),f=i(l),h=n(49),d=i(h),p=n(48),v=i(p),m=n(12),_=i(m),y=n(28),g=i(y),b=n(1),w=i(b),x=n(0),k=i(x),S=n(3),A=i(S),O=n(2),M=i(O),j=n(5),E=r(j),P=n(62),z=i(P),C=n(34),D=i(C),T=n(81),B=i(T),F=n(84),R=i(F),L=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,A.default)(this,t.call(this));return r&&i.setValues(r),n&&i.add(n),i}return(0,M.default)(e,t),e}(E.Object3D);e.default=L,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,D.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){t.interaction.targets.indexOf(n)==-1&&!function(){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,g.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([L.Events.Interaction.Clicked,L.Events.Interaction.Picked,L.Events.Interaction.Dropped,L.Events.Interaction.Dragged,L.Events.Interaction.Hovered,L.Events.Interaction.Unhovered,L.Events.Interaction.Misses,L.Events.Lifecycle.Rendered]))},E.Object3D.prototype.viewFound=function(){var t=this;return this.view?_.default.resolve(this.view):new _.default(function(e){return t.once(E.Object3D.Events.Lifecycle.ViewFound,e)})},E.Object3D.prototype._destroyRecursive=function(t){if(this.geometry&&this.geometry.dispose(),this.material&&(this.material instanceof E.MultiMaterial?this.material.materials.forEach(function(t){return t.dispose()}):this.material.dispose()),this.materials&&(this.materials.all.forEach(function(t){return t.dispose()}),this.materials.all=[],this.materials.meshes=[],this.materials.lines=[],this.bounds=void 0),this.userData={},t.async)return _.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=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=(0,w.default)({keep:!0,data:!0,interaction:!0,listeners:!0},e),!e.keep||!this.keep){t.next=3;break}return t.abrupt("return");case 3:if(t.t0=e.data,!t.t0){t.next=7;break}return t.next=7,this._destroyRecursive((0,w.default)({},e,{async:!0}));case 7:return e.interaction&&this.removeInteraction(),t.next=10,this.emit(L.Events.Lifecycle.Destroyed);case 10:if(t.t1=this.parent,!t.t1){t.next=14;break}return t.next=14,this.parent.removeAsync(this);case 14:e.listeners&&this.removeListeners(),this.removeObjectTweens();case 16: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]:{};t=(0,w.default)({keep:!0,data:!0,interaction:!0,listeners:!0},t),t.keep&&this.keep||(this.emit(L.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.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",_.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(o(this,e)),t.next=11,this.emit(L.Events.Lifecycle.ChildAdded,{child:e});case 11:return t.next=13,e.emit(L.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;return t=arguments.length>1?(0,f.default)(arguments):t,Array.isArray(t)?_.default.all(t.map(function(t){return e.add(t)})):void(t!==this&&t instanceof E.Object3D&&(t.parent&&t.parent.remove(t),t.parent=this,this.children.push(o(this,t)),this.emit(L.Events.Lifecycle.ChildAdded,{child:t}),t.emit(L.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,i=arguments;return d.default.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=i.length>1?(0,f.default)(i):e,!Array.isArray(e)){t.next=3;break}return t.abrupt("return",_.default.all(e.map(function(t){return r.removeAsync(t)})));case 3:if(!(e instanceof E.Object3D)){t.next=14;break}if(n=this.children.indexOf(e),n===-1){t.next=14;break}return t.next=8,this.emit(L.Events.Lifecycle.ChildRemoved,{child:e});case 8:return t.next=10,e.emit(L.Events.Lifecycle.Removed,{parent:this});case 10:this.children.splice(this.children.indexOf(e),1),e.parent=null,o(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 _.default.all(t.map(function(t){return e.remove(t)}));if(t instanceof E.Object3D){var n=this.children.indexOf(t);n!==-1&&(this.emit(L.Events.Lifecycle.ChildRemoved,{child:t}),t.emit(L.Events.Lifecycle.Removed,{parent:this}),this.children.splice(n,1),t.parent=null,o(this,t),!!this.view&&this.view.invalidate())}},E.Object3D.prototype.removeObjectTweens=function(){return B.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=[],a(this,function(t){return e[t.material.uuid]=t.material}),(0,g.default)(e).forEach(function(n){var r=e[n];"MultiMaterial"===r.type?r.materials.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,g.default)(this.materials.all),{}),n=function(){o=t.materials.all[r],a="#"+o.color.getHexString()+"_"+o.opacity.toFixed(2)+"_"+o.type;var n=e[a];n?t.traverse(function(t){t.material===o&&(t.material.dispose(),t.material=n)}):e[a]=o},r=0,i=this.materials.all.length;r<i;r++){var o,a;n()}return this.updateMaterials(),this}},E.Object3D.prototype.animate=function(t){return this.tweens?new B.default(this,t):new B.default({},{})},E.Material.prototype.tweens=!0,E.Material.prototype.animate=function(t){return this.tweens?new B.default(this,t):new B.default({},{})},E.Object3D.prototype.animateMaterials=function(t){return this.tweens?new B.default(this,{materials:t}):new B.default({},{})},E.Object3D.prototype.animateAllMaterials=function(t){return this.tweens?new B.default(this,{materials:{all:[t]}}):new B.default({},{})},E.Object3D.prototype.animateMeshes=function(t){return this.tweens?new B.default(this,{materials:{meshes:[t]}}):new B.default({},{})},E.Object3D.prototype.animateLines=function(t){return this.tweens?new B.default(this,{materials:{lines:[t]}}):new B.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 B.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),e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e&&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 n=this.children,r=Array.isArray(n),i=0,n=r?n:(0,c.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;a.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}var i=r;i.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]:z.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){var e=t(this);if(e)for(var n=this.children,r=0,i=n.length;r<i;r++)n[r].traverseConditional(t)},E.Object3D.prototype.traverseMaterials=function(t){this.traverse(function(e){e.material&&(e.material instanceof E.MultiMaterial?e.material.materials.forEach(function(n){return t(n,e)}):t(e.material,e))})}},function(t,e,n){var r=n(88);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(55);t.exports=n(14)?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(94),i=n(66);t.exports=function(t){return r(i(t))}},function(t,e){function n(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}t.exports=n},function(t,e,n){"use strict";var r="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;e.assign=function(t){for(var e=Array.prototype.slice.call(arguments,1);e.length;){var n=e.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)n.hasOwnProperty(r)&&(t[r]=n[r])}}return t},e.shrinkBuf=function(t,e){return t.length===e?t:t.subarray?t.subarray(0,e):(t.length=e,t)};var i={arraySet:function(t,e,n,r,i){if(e.subarray&&t.subarray)return void t.set(e.subarray(n,n+r),i);for(var o=0;o<r;o++)t[i+o]=e[n+o]},flattenChunks:function(t){var e,n,r,i,o,a;for(r=0,e=0,n=t.length;e<n;e++)r+=t[e].length;for(a=new Uint8Array(r),i=0,e=0,n=t.length;e<n;e++)o=t[e],a.set(o,i),i+=o.length;return a}},o={arraySet:function(t,e,n,r,i){for(var o=0;o<r;o++)t[i+o]=e[n+o]},flattenChunks:function(t){return[].concat.apply([],t)}};e.setTyped=function(t){t?(e.Buf8=Uint8Array,e.Buf16=Uint16Array,e.Buf32=Int32Array,e.assign(e,i)):(e.Buf8=Array,e.Buf16=Array,e.Buf32=Array,e.assign(e,o))},e.setTyped(r)},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=e.payload;switch(n){case h.enable:return(0,u.default)({},t,{enabled:r.enabled,collapsed:!r.enabled||t.collapsed});case h.toggle:return(0,u.default)({},t,{enabled:!t.enabled,collapsed:!!t.enabled||t.collapsed});case h.collapse:return(0,u.default)({},t,{collapsed:r.collapsed});case h.toggleCollapse:return(0,u.default)({},t,{collapsed:!t.collapsed});case h.addElement:return(0,u.default)({},t,{elements:[].concat(t.elements,[r.element])});case h.removeElement:return(0,u.default)({},t,{elements:t.elements.filter(function(t){return t!==r.element})});case h.removeAllElements:return(0,u.default)({},t,{elements:[]});default:return t}}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var o=n(135),a=r(o),s=n(1),u=r(s),c=n(36),l="plugins",f=e.base=(0,c.mixin)(l,i),h=e.types=(0,u.default)({},f.types,{enable:l+"/enable",toggle:l+"/toggle",collapse:l+"/collapse",toggleCollapse:l+"/toggleCollapse",addElement:l+"/addElement",removeElement:l+"/removeElement",removeAllElements:l+"/removeAllElements",closeAllFeatures:l+"/closeAllFeatures"}),d=e.actions=(0,u.default)({},f.actions,{enable:function(t,e){return{type:h.enable,payload:{id:t,enabled:e}}},toggle:function(t){return{type:h.toggle,payload:{id:t}}},collapse:function(t,e){return function(n){return requestAnimationFrame(function(){return n({type:h.collapse,payload:{id:t,collapsed:e}})})}},toggleCollapse:function(t){return function(e){return requestAnimationFrame(function(){return e({type:h.toggleCollapse,payload:{id:t}})})}},addElement:function(t,e){return{type:h.addElement,payload:{id:t,element:e}}},removeElement:function(t,e){return{type:h.removeElement,payload:{id:t,element:e}}},removeAllElements:function(t){return{type:h.removeAllElements,payload:{id:t}}},closeAllFeatures:function(){return function(t){return(0,a.default)(f.references).forEach(function(e){return e.feature&&t(d.unregister(e.id))})}}});e.reducer=f.reducer},function(t,e,n){t.exports={default:n(239),__esModule:!0}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var i=n(226),o=r(i),a=n(225),s=r(a),u="function"==typeof s.default&&"symbol"==typeof o.default?function(t){return typeof t}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":typeof t};e.default="function"==typeof s.default&&"symbol"===u(o.default)?function(t){return"undefined"==typeof t?"undefined":u(t)}:function(t){return t&&"function"==typeof s.default&&t.constructor===s.default&&t!==s.default.prototype?"symbol":"undefined"==typeof t?"undefined":u(t)}},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(148),i=n(93);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(324),o=n(357);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}}e.__esModule=!0;var i=n(12),o=r(i),a=n(223),s=r(a),u=n(29),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 _=m;_({action:"Add",type:l,callback:e})}}else if("object"===("undefined"==typeof t?"undefined":(0,c.default)(t))&&void 0===e)for(var y in t){var g=t[y];"function"==typeof g&&this.on(y,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"===("undefined"==typeof 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 _=m.indexOf(e);if(_>-1&&m.splice(_,1),this._inspectors)for(var y=this._inspectors,g=Array.isArray(y),b=0,y=g?y:(0,f.default)(y);;){var w;if(g){if(b>=y.length)break;w=y[b++]}else{if(b=y.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,S=Array.isArray(k),A=0,k=S?k:(0,f.default)(k);;){var O;if(S){if(A>=k.length)break;O=k[A++]}else{if(A=k.next(),A.done)break;O=A.value}var M=O;M({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=function(){if(l){if(h>=c.length)return"break";d=c[h++]}else{if(h=c.next(),h.done)return"break"; d=h.value}var n=d;a=a.then(function(i){return n.remove&&e.removeListener(t,n),n.call.apply(n,[e].concat(r))})},c=s,l=Array.isArray(c),h=0,c=l?c:(0,f.default)(c);;){var d,p=u();if("break"===p)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=function(){if(l){if(h>=c.length)return"break";d=c[h++]}else{if(h=c.next(),h.done)return"break";d=h.value}var t=d;a=a.then(function(n){return t.call.apply(t,[e].concat(r))})},c=s,l=Array.isArray(c),h=0,c=l?c:(0,f.default)(c);;){var d,p=u();if("break"===p)break}else if(this.parent){var v;(v=this.parent).bubble.apply(v,[t].concat(r))}return a},t.prototype.findListener=function(t){this._callbacks||(this._callbacks={});var e=this._callbacks[t];return e?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){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(221),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,c=t(o,"00")+":"+t(a,"00")+"."+t(s,"000000");return c}}}()},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(134),o=r(i),a=n(3),s=r(a),u=n(2),c=r(u),l=n(0),f=r(l),h=n(28),d=r(h),p=n(1),v=r(p),m=n(45),_=r(m),y=n(183),g=r(y),b=n(179),w=r(b),x=n(18),k=n(19);e.mixin=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,payload:{id:t.id,props:e}})}},unregister:function(t){return function(e){var i=Array.isArray(t)?t:[t];e({type:r.unregister,payload:{ids:t}}),i.forEach(function(t){n[t]&&(n[t].destroy(!1),delete n[t])})}},update:function(t,e){return{type:r.update,payload:{id:t,props:e}}},merge:function(t){return{type:r.merge,payload:{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.payload;switch(a){case r.register:return(0,v.default)({},i,(t={},t[s.id]=(0,v.default)({id:s.id},s.props),t));case r.unregister:return(0,g.default)(i,s.ids);case r.update:return(0,v.default)({},i,(n={},n[s.id]=(0,v.default)({},i[s.id],s.props),n));case r.merge:return(0,d.default)(s.props).reduce(function(t,e){var n;return(0,v.default)({},t,(n={},n[e]=(0,v.default)({id:e},t[e],s.props[e]),n))},i);default:if(s&&s.id&&i[s.id]){var u;return(0,v.default)({},i,(u={},u[s.id]=e(i[s.id],{type:a,payload:s}),u))}}return i}}};e.default=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:function(){function t(){(0,f.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,x.halt)("Lifecycle object is missing a session"),i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:(0,x.halt)("Lifecycle object is missing link to actions"),a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:(0,x.halt)("Lifecycle object is missing a selector"),u=arguments[3];(0,f.default)(this,n);var c=(0,s.default)(this,t.call(this,e));c.id=(0,_.default)(),c.session=r,c.store=r.store,c.actions=i,c.getState=function(){return a(c.store.getState())},c.subscriptions=[],c.dependencies=[],c.store.dispatch(i.register(c,u)),c.props=(0,w.default)(u);var l=(0,k.createObserver)(c.store,c.getState);c.observe=function(t,e,n){return l(t,e,(0,v.default)({manager:c.addSubscription.bind(c)},n))};var h=function(t){!c[t]&&(0,o.default)(c,t,{configurable:!0,get:function(){var e=c.getState();return e&&e[t]},set:function(e){var n;return c.store.dispatch(i.update(c.id,(n={},n[t]=e,n)))}})};for(var d in u)h(d);return c}return(0,c.default)(n,t),n.prototype.reset=function(){this.store.dispatch(actions.update(this.id,this.props))},n.prototype.destroy=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t?this.store.dispatch(this.actions.unregister(this.id)):(this.removeSubscriptions(),this.__onDestroyed&&this.__onDestroyed(),this.onDestroyed(),this.dependencies.slice().forEach(function(t){return t.destroy()}),this.dependencies=[])},n.prototype.addSubscription=function(t){return this.subscriptions.push(t),t},n.prototype.removeSubscriptions=function(){this.subscriptions.forEach(function(t){return t()}),this.subscriptions=[],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=e.type,r=e.payload;switch(n){case A.init:return(0,d.default)({},t,{tree:r.data});case A.patch:return(0,d.default)({},t,{tree:(0,m.apply_patch)(t.tree,r.patches)});case A.message:return(0,d.default)({},t,{messages:[].concat(t.messages,[{type:r.type,message:r.message,reset:r.reset}])});case A.setActiveFeature:return(0,d.default)({},t,{activeFeature:r.feature});case A.linkPlugins:return(0,d.default)({},t,{plugins:[].concat(t.plugins,Array.isArray(r.plugins)?r.plugins:[r.plugins])});case A.unlinkPlugins:return(0,d.default)({},t,{plugins:(0,v.default)(t.plugins,Array.isArray(r.plugins)?r.plugins:[r.plugins])});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=(0,g.createContext)(n),a=o.options;return(0,d.default)({},a,{materials:r.options.materials,callback:function(n){if("Model"===n.type){r.options.updateMaterials&&n.model.updateMaterials(),r.options.centerGeometry&&n.model.centerGeometry();var o=i[n.model.userData.id];if(o){var s=o.parent;o.destroyAsync(),i[n.model.userData.id]=n.model,s&&s.addAsync(n.model).then(function(){t(O.update(e.id,{tree:(0,d.default)({},e.tree,{solids:[].concat(e.tree.solids)})})),e.pool.update()})}else i[n.model.userData.id]=n.model}a.callback(n)}})}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var a=n(49),s=r(a),u=n(12),c=r(u),l=n(48),f=r(l),h=n(1),d=r(h),p=n(125),v=r(p),m=n(290),_=n(36),y=n(19),g=n(83),b=r(g),w=n(47),x="connections",k=new b.default,S=e.base=(0,_.mixin)(x,i),A=e.types=(0,d.default)({},S.types,{init:x+"/init",patch:x+"/patch",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"}),O=(0,d.default)({},S.actions,{patch:function(t,e){return{type:A.patch,payload:{id:t,patches:e}}},message:function(t,e,n,r){return{type:A.message,payload:{id:t,type:e,message:n,reset:r}}},setActiveFeature:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;return{type:A.setActiveFeature,payload:{id:t,feature:e}}},linkPlugins:function(t,e){return{type:A.linkPlugins,payload:{id:t,plugins:e}}},unlinkPlugins:function(t,e){return{type:A.unlinkPlugins,payload:{id:t,plugins:e}}},connect:function(t,e,n){return function(){var r=(0,f.default)(s.default.mark(function r(i){var o;return s.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return o=S.references[t],r.next=3,(new n).connect(e);case 3:return o.socket=r.sent,o.sequence=c.default.resolve(),r.next=7,i(O.init(t));case 7:o.emit("connected",o);case 8: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)(s.default.mark(function e(n){var r,i;return s.default.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=S.references[t],e.next=3,r.socket.request({command:"GetTree"});case 3:return i=e.sent,n({type:A.init,payload:{id:t,data:i.firstResult}}),n(O.message(t,"success","Connected to "+r.socket.url)),e.abrupt("return",i);case 7: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=S.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(O.patch(t,e.patches)),e.errors&&e.errors.forEach(function(e){var n=e.errorMessage;return r(O.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)(s.default.mark(function r(i){var a,u;return s.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a=S.references[t],r.next=3,k.stream(e,o(i,a,n));case 3:return u=r.sent,u.patches&&i(O.patch(t,u.patches)),r.abrupt("return",u);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)(s.default.mark(function r(i){var a,u;return s.default.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return a=S.references[t],r.next=3,k.parse(e,o(i,a,n));case 3:return u=r.sent,u.patches&&i(O.patch(t,u.patches)),r.abrupt("return",u);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 S.references[t].execute(e)}},exportStep:function(t,e){return function(n){return S.references[t].execute('_C.CADApplication.ExportStep("'+e+'");')}},exportOf1:function(t,e){return function(n){return S.references[t].execute('_C.CADApplication.ExportOf1("'+e+'");')}},recalc:function(t){return function(e){return S.references[t].execute("_C.GlobaleFunktionen.UseOnStartRecalc(_O);")}},setColor:function(t,e,n){return function(r){return S.references[t].execute("_C.CADApplication.SetColor(CADH_RealToId("+e+"),"+n.join(",")+");")}},setName:function(t,e,n){return function(r){var i=S.references[t];return i.execute((0,y.buildFeaturePath)(i.tree,e)+'.OBJ_ChangeName("'+(0,y.normalizeName)(n)+'");')}},newPart:function(t){return function(e){return e(O.setActiveFeature(t,void 0)),S.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=S.references[t];return o.request({command:"Execute",task:(0,y.buildFeaturePath)(o.tree,e)+'.ReadStream("data", VOID, "'+r+'");',streamData:{data:n}})}},load:function(t,e){return function(n){return n(O.setActiveFeature(t,void 0)),S.references[t].request({command:"Execute",task:'CADH_SetVertexFilter(TRUE); _C.CADApplication.LoadPart("data");',streamData:{data:e}})}}});e.actions=O;e.reducer=S.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=e.payload;switch(n){case p.addChild:return(0,a.default)({},t,{children:[].concat(t.children,[r.child])});case p.removeChild:return(0,a.default)({},t,{children:t.children.filter(function(t){return t!==r.child})});case p.removeAllChilds:return(0,a.default)({},t,{children:[]});case p.event:return(0,a.default)({},t,{lastEvent:r.event});default:return t}}e.__esModule=!0,e.reducer=e.actions=e.types=e.base=void 0;var o=n(1),a=r(o),s=n(404),u=r(s),c=n(25),l=r(c),f=n(36),h="elements",d=e.base=(0,f.mixin)(h,i),p=e.types=(0,a.default)({},d.types,{addChild:h+"/addChild",removeChild:h+"/removeChild",removeAllChilds:h+"/removeAllChilds",event:h+"/event"}),v=(0,a.default)({},d.actions,{addChild:function(t,e){return{type:p.addChild,payload:{id:t,child:e}}},removeChild:function(t,e){return{type:p.removeChild,payload:{id:t,child:e}}},removeAllChilds:function(t){return{type:p.removeAllChilds,payload:{id:t}}},event:function(t,e){return{type:p.event,payload:{id:t,event:(0,u.default)(e,l.default)}}}});e.actions=v;e.reducer=d.reducer},function(t,e,n){"use strict";var r=n(265)(!0);n(95)(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(269);for(var r=n(10),i=n(23),o=n(52),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(16),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(356),a=n(384),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(17),o=n(115),a=n(395),s=n(409);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(124),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?.5*(t*t*((e+1)*t-e)):.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,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),-(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)))},out:function(t){var e=void 0,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),n*Math.pow(2,-10*t)*Math.sin((t-e)*(2*Math.PI)/r)+1)},inOut:function(t){var e=void 0,n=.1,r=.4;return 0===t?0:1===t?1:(!n||n<1?(n=1,e=r/4):e=r*Math.asin(1/n)/(2*Math.PI),(t*=2)<1?-.5*(n*Math.pow(2,10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)):n*Math.pow(2,-10*(t-=1))*Math.sin((t-e)*(2*Math.PI)/r)*.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*(-Math.pow(2,-10*(t-1))+2)}},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:.5*((t-=2)*t*t*t*t+2)}},e.sinusoidal={in:function(t){return 1-Math.cos(t*Math.PI/2)},out:function(t){return Math.sin(t*Math.PI/2)},inOut:function(t){return.5*(1-Math.cos(Math.PI*t))}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0,e.reducer=e.actions=e.types=void 0;var i=n(1),o=r(i),a=n(183),s=r(a),u=n(125),c=r(u),l=(n(27),n(37)),f="globals",h=e.types={setLocale:f+"/setLocale",setActiveSelection:f+"/setActiveSelection",setActiveConnection:f+"/setActiveConnection",linkPlugins:f+"/linkPlugins",unlinkPlugins:f+"/unlinkPlugins",addResources:f+"/addResources",addMessage:f+"/addMessage",beginTask:f+"/beginTask",finishTask:f+"/finishTask"},d=e.actions={setLocale:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"en_US";return{type:h.setLocale,payload:{id:t}}},setActiveSelection:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return