!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.skadi=t():e.skadi=t()}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var o=n[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var n={};return t.m=e,t.c=n,t.i=function(e){return e},t.d=function(e,n,r){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:r})},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="/",t(t.s=238)}([function(e,t,n){"use strict";e.exports=n(170)},function(e,t,n){e.exports=n(160)()},function(e,t,n){"use strict";function r(e){if(e||(e=u.a.Promise||Promise),!e)throw new Error("no Promise impl found");return e}n.d(t,"a",function(){return l});var o=n(44),i=n(225),a=n(21),s=n(90),u=n(31),l=function(){function e(e){this._isScalar=!1,e&&(this._subscribe=e)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(e,t,r){var o=this.operator,a=n.i(i.a)(e,t,r);if(o?a.add(o.call(a,this.source)):a.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!a.syncErrorThrowable?this._subscribe(a):this._trySubscribe(a)),u.a.useDeprecatedSynchronousErrorHandling&&a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){u.a.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),n.i(o.a)(e)?e.error(t):console.warn(t)}},e.prototype.forEach=function(e,t){var n=this;return new(t=r(t))(function(t,r){var o;o=n.subscribe(function(t){try{e(t)}catch(e){r(e),o&&o.unsubscribe()}},r,t)})},e.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},e.prototype[a.a]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t=this.sceneDurationSeconds)return this.loop&&this.reset(),void this.subject.next(l.Events.TimerFinished);this.deltaTimeSeconds+=1,this.timerSubject.next(l.Events.TimerTick)}}},{key:"progress",value:function(){var e=this.running?Date.now():this.pauseMS;if(!this.running&&this.pauseMS<=0)return 0;var t=1e3*this.sceneDurationSeconds;return(e-this.startTimeMS)/t}},{key:"start",value:function(){this.running||(this.startTimeMS=Date.now(),this.running=!0,this.subject.next(l.Events.TimerStart),this.deltaTimeSeconds=0,this.running=!0,clearInterval(this.lastInterval),this.lastInterval=setInterval(this.tick.bind(this),1e3))}},{key:"pause",value:function(){console.info("pause"),this.scrubbing||(this.pauseMS=Date.now(),this.running||(this.startTimeMS=Date.now()-1e3*this.deltaTimeSeconds),this.running=!this.running,this.subject.next(l.Events.TimerPaused))}},{key:"reset",value:function(){this.scrubbing=!1,this.stop(),this.start()}},{key:"seek",value:function(e){console.info("seek to "+e),this.setTimeMs(e)}},{key:"setTimeMs",value:function(e){this.deltaTimeSeconds=(0,u.msToSec)(e)}},{key:"scrub",value:function(e){this.scrubbing||(this.scrubbing=!0,this.setTimeMs(e),this.startTimeMS=Date.now()-e,this.running=!1,(0,s.actionScrubStart)((0,u.msToSec)(e)))}},{key:"finishScrub",value:function(){this.scrubbing=!1,this.running=!0,this.subject.next(l.Events.TimerPaused)}},{key:"setMute",value:function(e){this.globalMute=e,this.subject.next(l.Events.Mute)}},{key:"stop",value:function(){console.info("stop"),clearInterval(this.lastInterval),this.running=!1,this.pauseMS=0,this.deltaTimeSeconds=0,this.subject.next(l.Events.TimerStop)}},{key:"updateSceneDuration",value:function(e){this.sceneDurationSeconds=e}}]),e}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=t.TimelineState={Stopped:0,Playing:0};t.TrackMoveState={None:0,ExpandLeft:1,ExpandRight:2,Move:3},t.Events={AddObject:"addObject",AssetLoaded:"assetLoaded",AssetRemove:"assetRemove",Kickstart:"kickstart",Mute:"mute",RemoveObject:"removeObject",ScrubEnd:"scrubEnd",ScrubResolved:"scrubResolved",ScrubStart:"scrubStart",TimerFinished:"finished",TimerPaused:"pause",TimerReset:"reset",TimerStart:"start",TimerStop:"stop",TimerTick:"tick",TrackReset:"trackReset",TrackSeek:"trackSeek",TrackStart:"trackStart",TrackStop:"trackStop",UpdateObject:"updateObject",PlayerLoadStart:"playerLoadStart",PlayerLoadFinish:"playerLoadFinish",ManifestUpdated:"manifestUpdated"},t.initialState={initialTime:0,duration:0,currentTime:0,state:r.Stopped,stepSize:1},t.sampleTrack={assetPath:"",assetType:"",startTime:"",duration:""},t.EditorFonts={},t.EditorColors={LightGreyLabel:"#C4C4C4",LightGrayBackground:"#575B65",MediumGrayBackground:"#3A3E44",DarkGrayBackground:"#303238"}},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(3),o=n(34),i=n(74),a=n(8),s=n(43),u=n(31),l=n(45),c=function(e){function t(n,r,o){var a=e.call(this)||this;switch(a.syncErrorValue=null,a.syncErrorThrown=!1,a.syncErrorThrowable=!1,a.isStopped=!1,arguments.length){case 0:a.destination=i.a;break;case 1:if(!n){a.destination=i.a;break}if("object"==typeof n){n instanceof t?(a.syncErrorThrowable=n.syncErrorThrowable,a.destination=n,n.add(a)):(a.syncErrorThrowable=!0,a.destination=new f(a,n));break}default:a.syncErrorThrowable=!0,a.destination=new f(a,n,r,o)}return a}return r.a(t,e),t.prototype[s.a]=function(){return this},t.create=function(e,n,r){var o=new t(e,n,r);return o.syncErrorThrowable=!1,o},t.prototype.next=function(e){this.isStopped||this._next(e)},t.prototype.error=function(e){this.isStopped||(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this))},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},t.prototype._unsubscribeAndRecycle=function(){var e=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=e,this},t}(a.a),f=function(e){function t(t,r,a,s){var u=e.call(this)||this;u._parentSubscriber=t;var l,c=u;return n.i(o.a)(r)?l=r:r&&(l=r.next,a=r.error,s=r.complete,r!==i.a&&(c=Object.create(r),n.i(o.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=l,u._error=a,u._complete=s,u}return r.a(t,e),t.prototype.next=function(e){if(!this.isStopped&&this._next){var t=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?this.__tryOrSetError(t,this._next,e)&&this.unsubscribe():this.__tryOrUnsub(this._next,e)}},t.prototype.error=function(e){if(!this.isStopped){var t=this._parentSubscriber,r=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)r&&t.syncErrorThrowable?(this.__tryOrSetError(t,this._error,e),this.unsubscribe()):(this.__tryOrUnsub(this._error,e),this.unsubscribe());else if(t.syncErrorThrowable)r?(t.syncErrorValue=e,t.syncErrorThrown=!0):n.i(l.a)(e),this.unsubscribe();else{if(this.unsubscribe(),r)throw e;n.i(l.a)(e)}}},t.prototype.complete=function(){var e=this;if(!this.isStopped){var t=this._parentSubscriber;if(this._complete){var n=function(){return e._complete.call(e._context)};u.a.useDeprecatedSynchronousErrorHandling&&t.syncErrorThrowable?(this.__tryOrSetError(t,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},t.prototype.__tryOrUnsub=function(e,t){try{e.call(this._context,t)}catch(e){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw e;n.i(l.a)(e)}},t.prototype.__tryOrSetError=function(e,t,r){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{t.call(this._context,r)}catch(t){return u.a.useDeprecatedSynchronousErrorHandling?(e.syncErrorValue=t,e.syncErrorThrown=!0,!0):(n.i(l.a)(t),!0)}return!1},t.prototype._unsubscribe=function(){var e=this._parentSubscriber;this._context=null,this._parentSubscriber=null,e.unsubscribe()},t}(c)},function(e,t,n){"use strict";function r(e){return e.reduce(function(e,t){return e.concat(t instanceof s.a?t.errors:t)},[])}n.d(t,"a",function(){return u});var o=n(9),i=n(46),a=n(34),s=n(85),u=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var u=this,l=u._parentOrParents,c=u._ctorUnsubscribe,f=u._unsubscribe,p=u._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,l instanceof e)l.remove(this);else if(null!==l)for(var d=0;d0&&void 0!==arguments[0]?arguments[0]:c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=window,n=t.AFRAME,n.scenes.length||console.info("no scenes yet!?"),(0,l.registerComponent)(),r=n.scenes[0],o=document.createElement("a-entity"),o.setAttribute("id","timeline"),o.setAttribute("scale","1 1 1"),o.setAttribute("position","0 0 0"),o.setAttribute("shadow","cast: false"),o.setAttribute("timeline","editor: true;\n manifest: "+JSON.stringify(i)+"\n "),r.appendChild(o),e.abrupt("return",o);case 12:case"end":return e.stop()}},e,void 0)}));return function(){return e.apply(this,arguments)}}()},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e){function r(){return(r=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Args: "+n.join(", "):""))}function u(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=ce(t%52)+n;return(ce(t%52)+n).replace(le,"$1-$2")}function l(e){for(var t=0;t0&&(n[0]=n[0].replace(o,m))},h,function(e){if(-2===e){var t=d;return d=[],t}}])),t.hash=f.length?f.reduce(function(e,t){return t.name||s(15),fe(e,t.name)},5381).toString():"",t}function f(){return n.i(C.useContext)(ge)||Ee}function p(){return n.i(C.useContext)(be)||we}function d(e){var t=n.i(C.useState)(e.stylisPlugins),r=t[0],o=t[1],i=f(),a=n.i(C.useMemo)(function(){var t=i;return e.sheet?t=e.sheet:e.target&&(t=t.reconstructWithOptions({target:e.target},!1)),e.disableCSSOMInjection&&(t=t.reconstructWithOptions({useCSSOMInjection:!1})),t},[e.disableCSSOMInjection,e.sheet,e.target]),s=n.i(C.useMemo)(function(){return c({options:{prefix:!e.disableVendorPrefixes},plugins:r})},[e.disableVendorPrefixes,r]);return n.i(C.useEffect)(function(){A()(r,e.stylisPlugins)||o(e.stylisPlugins)},[e.stylisPlugins]),O.a.createElement(ge.Provider,{value:a},O.a.createElement(be.Provider,{value:s},e.children))}function h(e){return Se.test(e)?e.replace(ke,Ce).replace(Te,"-ms-"):e}function m(e,t,n,r){if(Array.isArray(e)){for(var i,s=[],u=0,l=e.length;u1?t-1:0),r=1;r1?t-1:0),r=1;r=0||(o[n]=e[n]);return o}(t,["componentId"]),a=n&&n+"-"+(y(e)?e:g(i(e)));return x(e,r({},o,{attrs:S,componentId:a}),s)},Object.defineProperty(T,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=u?E({},e.defaultProps,t):t}}),T.toString=function(){return"."+T.styledComponentId},l&&N()(T,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),T}function S(e){function t(e){var t=f(),r=p(),i=n.i(C.useContext)(Ne),a=n.i(C.useRef)(t.allocateGSInstance(l)).current;return n.i(C.useLayoutEffect)(function(){return o(a,e,t,i,r),function(){return c.removeStyles(a,t)}},[a,e,t,i,r]),null}function o(e,n,o,i,a){if(c.isStatic)c.renderStyles(e,V,o,a);else{var s=r({},n,{theme:_e(n,i,t.defaultProps)});c.renderStyles(e,s,o,a)}}for(var i=arguments.length,a=new Array(i>1?i-1:0),s=1;s1?t-1:0),r=1;r=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&s(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(H))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(H,"active"),r.setAttribute("data-styled-version","5.3.0");var a=te();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},re=function(){function e(e){var t=this.element=ne(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e0&&(l+=e+",")}),r+=""+s+u+'{content:"'+l+'"}/*!sc*/\n'}}}return r}(this)},e}(),le=/(a)(d)/gi,ce=function(e){return String.fromCharCode(e+(e>25?39:97))},fe=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},pe=function(e){return fe(5381,e)},de=pe("5.3.0"),he=function(){function e(e,t,n){this.rules=e,this.staticRulesId="",this.isStatic=(void 0===n||n.isStatic)&&l(e),this.componentId=t,this.baseHash=fe(de,t),this.baseStyle=n,ue.registerId(t)}return e.prototype.generateAndInjectStyles=function(e,t,n){var r=this.componentId,o=[];if(this.baseStyle&&o.push(this.baseStyle.generateAndInjectStyles(e,t,n)),this.isStatic&&!n.hash)if(this.staticRulesId&&t.hasNameForId(r,this.staticRulesId))o.push(this.staticRulesId);else{var i=m(this.rules,e,t,n).join(""),a=u(fe(this.baseHash,i.length)>>>0);if(!t.hasNameForId(r,a)){var s=n(i,"."+a,void 0,r);t.insertRules(r,a,s)}o.push(a),this.staticRulesId=a}else{for(var l=this.rules.length,c=fe(this.baseHash,n.hash),f="",p=0;p>>0);if(!t.hasNameForId(r,g)){var y=n(f,"."+g,void 0,r);t.insertRules(r,g,y)}o.push(g)}}return o.join(" ")},e}(),me=/^\s*\/\/.*$/gm,ve=[":","[",".","#"],ge=O.a.createContext(),ye=ge.Consumer,be=O.a.createContext(),Ee=(be.Consumer,new ue),we=c(),xe=function(){function e(e,t){var n=this;this.inject=function(e,t){void 0===t&&(t=we);var r=n.name+t.hash;e.hasNameForId(n.id,r)||e.insertRules(n.id,r,t(n.rules,r,"@keyframes"))},this.toString=function(){return s(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return e.prototype.getName=function(e){return void 0===e&&(e=we),this.name+e.hash},e}(),Se=/([A-Z])/,ke=/([A-Z])/g,Te=/^ms-/,Ce=function(e){return"-"+e.toLowerCase()},Oe=function(e){return null==e||!1===e||""===e},_e=(new Set,function(e,t,n){return void 0===n&&(n=F),e.theme!==n.theme&&e.theme||t||n.theme}),Ae=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Re=/(^-|-$)/g,Ie=function(e){return u(pe(e)>>>0)},Me=function(e){return"function"==typeof e||"object"==typeof e&&null!==e&&!Array.isArray(e)},Pe=function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e},Ne=O.a.createContext(),je=Ne.Consumer,Le={},De=function(e){return function e(t,o,i){if(void 0===i&&(i=F),!n.i(T.isValidElementType)(o))return s(1,String(o));var a=function(){return t(o,i,v.apply(void 0,arguments))};return a.withConfig=function(n){return e(t,o,r({},i,{},n))},a.attrs=function(n){return e(t,o,r({},i,{attrs:Array.prototype.concat(i.attrs,n).filter(Boolean)}))},a}(x,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","textPath","tspan"].forEach(function(e){De[e]=De(e)});var Fe=function(){function e(e,t){this.rules=e,this.componentId=t,this.isStatic=l(e),ue.registerId(this.componentId+1)}var t=e.prototype;return t.createStyles=function(e,t,n,r){var o=r(m(this.rules,t,n,r).join(""),""),i=this.componentId+e;n.insertRules(i,i,o)},t.removeStyles=function(e,t){t.clearRules(this.componentId+e)},t.renderStyles=function(e,t,n,r){e>2&&ue.registerId(this.componentId+e),this.removeStyles(e,n),this.createStyles(e,t,n,r)},e}(),He=function(){function e(){var e=this;this._emitSheetCSS=function(){var t=e.instance.toString(),n=te();return""},this.getStyleTags=function(){return e.sealed?s(2):e._emitSheetCSS()},this.getStyleElement=function(){var t;if(e.sealed)return s(2);var n=((t={})[H]="",t["data-styled-version"]="5.3.0",t.dangerouslySetInnerHTML={__html:e.instance.toString()},t),o=te();return o&&(n.nonce=o),[O.a.createElement("style",r({},n,{key:"sc-0-0"}))]},this.seal=function(){e.sealed=!0},this.instance=new ue({isServer:!0}),this.sealed=!1}var t=e.prototype;return t.collectStyles=function(e){return this.sealed?s(2):O.a.createElement(d,{sheet:this.instance},e)},t.interleaveWithNodeStream=function(e){return s(3)},e}(),Ue=function(e){var t=O.a.forwardRef(function(t,o){var i=n.i(C.useContext)(Ne),a=e.defaultProps,s=_e(t,i,a);return O.a.createElement(e,r({},t,{theme:s,ref:o}))});return N()(t,e),t.displayName="WithTheme("+i(e)+")",t},ze=function(){return n.i(C.useContext)(Ne)},Be={StyleSheet:ue,masterSheet:Ee};t.default=De}.call(t,n(67))},function(e,t,n){"use strict";function r(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}r(),e.exports=n(163)},function(e,t,n){"use strict";function r(e){return e?o(e):a}function o(e){return new i.a(function(t){return e.schedule(function(){return t.complete()})})}n.d(t,"b",function(){return a}),t.a=r;var i=n(2),a=new i.a(function(e){return e.complete()})},function(e,t,n){"use strict";function r(e){return e&&"function"==typeof e.schedule}t.a=r},function(e,t,n){"use strict";function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(0,l.sharedHub)().subject.next(Object.assign({action:e},t))}function o(e){r(c.Events.ScrubStart,{ts:e})}function i(){return r(c.Events.ScrubResolved)}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;(0,l.sharedHub)().subject.next({action:c.Events.TrackStart,targetAsset:e.asset,time:t})}function s(e,t){(0,l.sharedHub)().subject.next({action:c.Events.TrackSeek,targetAsset:e.asset,time:t})}function u(e){(0,l.sharedHub)().subject.next({action:c.Events.AssetLoaded,asset:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.actionDispatch=r,t.actionScrubStart=o,t.actionScrubComplete=i,t.actionStartTrack=a,t.actionSeekTrack=s,t.assetLoaded=u;var l=n(5),c=n(6)},function(e,t,n){"use strict";function r(e,t,n){var r;if(-1!==t.indexOf("."))if(r=t.split("."),null===n||void 0===n){var o=e.getAttribute(r[0]);delete o[r[1]],e.setAttribute(r[0],o)}else e.setAttribute(r[0],r[1],n);else null===n||void 0===n?e.removeAttribute(t):e.setAttribute(t,n);_.emit("entityupdate",{component:r?r[0]:t,entity:e,property:r?r[1]:"",value:n})}function o(e,t){if(e&&(!0===t||confirm("Do you really want to remove entity `"+(e.id||e.tagName)+"`?"))){var n=i(e);AFRAME.INSPECTOR.removeObject(e.object3D),e.parentNode.removeChild(e),AFRAME.INSPECTOR.selectEntity(n)}}function i(e){for(var t=e.nextElementSibling;t&&(!t.isEntity||t.isInspector);)t=t.nextElementSibling;if(t&&t.isEntity&&!t.isInspector)return t;for(var n=e.previousElementSibling;n&&(!n.isEntity||n.isInspector);)n=n.previousElementSibling;return n&&n.isEntity&&!n.isInspector?n:null}function a(e){AFRAME.INSPECTOR.selectedEntity&&o(AFRAME.INSPECTOR.selectedEntity,e)}function s(e,t){t.parentNode||(t=AFRAME.INSPECTOR.selectedEntity),t?t.parentNode.insertBefore(e,t.nextSibling):AFRAME.INSPECTOR.sceneEl.appendChild(e)}function u(e){e.flushToDOM();var t=e.cloneNode(!0);t.addEventListener("loaded",function(e){AFRAME.INSPECTOR.selectEntity(t),_.emit("entityclone")}),e.id&&(t.id=w(e.id)),s(t,e)}function l(){AFRAME.INSPECTOR.selectedEntity&&u(AFRAME.INSPECTOR.selectedEntity)}function c(e){return f(e).outerHTML}function f(e){for(var t=e.cloneNode(!1),n=e.childNodes,r=0,o=n.length;r');var o=e.id,i="id";return e.isScene||o||!e.getAttribute("class")?e.isScene||o||!e.getAttribute("mixin")||(o=e.getAttribute("mixin").split(" ")[0],i="mixin"):(o=e.getAttribute("class").split(" ")[0],i="class"),C.default.createElement("span",{className:"entityPrint",onDoubleClick:t},C.default.createElement("span",{className:"entityTagName"},"<"+e.tagName.toLowerCase()),o&&C.default.createElement("span",{className:"entityName","data-entity-name-type":i}," ",o),!!n&&C.default.createElement("span",{className:"entityIcons",dangerouslySetInnerHTML:{__html:n}}),C.default.createElement("span",{className:"entityCloseTag"},">"))}function k(e,t){var n=document.createElement(e.element);for(var r in e.components)n.setAttribute(r,e.components[r]);return n.addEventListener("loaded",function(){_.emit("entitycreated",n),t(n)}),AFRAME.scenes[0].appendChild(n),n}Object.defineProperty(t,"__esModule",{value:!0}),t.updateEntity=r,t.removeEntity=o,t.removeSelectedEntity=a,t.cloneEntity=u,t.cloneSelectedEntity=l,t.getEntityClipboardRepresentation=c,t.getComponentClipboardRepresentation=x,t.printEntity=S,t.createEntity=k;var T=n(0),C=function(e){return e&&e.__esModule?e:{default:e}}(T),O=n(17),_=n(4),A={camera:"fa-camera",mesh:"fa-cube",light:"fa-lightbulb-o",text:"fa-font"}},function(e,t,n){"use strict";function r(e){return parseFloat(e.toFixed(3))}function o(e){for(var t=e.split("."),n=!1,r=0;rthis.props.max&&(e=this.props.max),this.setState({value:e,displayValue:e.toFixed(this.props.precision)}),this.props.onChange&&this.props.onChange(this.props.name,parseFloat(e.toFixed(5))))}},{key:"componentWillReceiveProps",value:function(e){e.value!==this.state.value&&this.setState({value:e.value,displayValue:e.value.toFixed(this.props.precision)})}},{key:"render",value:function(){return l.default.createElement("input",{ref:"input",className:"number",type:"text",value:this.state.displayValue,onKeyDown:this.onKeyDown,onChange:this.onChange,onMouseDown:this.onMouseDown,onFocus:this.onFocus,onBlur:this.onBlur})}}]),t}(l.default.Component);p.propTypes={componentname:f.default.string,entity:f.default.object,max:f.default.number,min:f.default.number,name:f.default.string,onChange:f.default.func,precision:f.default.number,step:f.default.number,value:f.default.number},p.defaultProps={min:-1/0,max:1/0,value:0,precision:3,step:1},t.default=p},function(e,t,n){(function(t){function n(e,t,n){function o(t){var n=m,r=v;return m=v=void 0,k=t,y=e.apply(r,n)}function i(e){return k=e,b=setTimeout(c,t),T?o(e):y}function u(e){var n=e-S,r=e-k,o=t-n;return C?w(o,g-r):o}function l(e){var n=e-S,r=e-k;return void 0===S||n>=t||n<0||C&&r>=g}function c(){var e=x();if(l(e))return f(e);b=setTimeout(c,u(e))}function f(e){return b=void 0,O&&m?o(e):(m=v=void 0,y)}function p(){void 0!==b&&clearTimeout(b),k=0,m=S=v=b=void 0}function d(){return void 0===b?y:f(x())}function h(){var e=x(),n=l(e);if(m=arguments,v=this,S=e,n){if(void 0===b)return i(S);if(C)return b=setTimeout(c,t),o(S)}return void 0===b&&(b=setTimeout(c,t)),y}var m,v,g,y,b,S,k=0,T=!1,C=!1,O=!0;if("function"!=typeof e)throw new TypeError(s);return t=a(t)||0,r(n)&&(T=!!n.leading,C="maxWait"in n,g=C?E(a(n.maxWait)||0,t):g,O="trailing"in n?!!n.trailing:O),h.cancel=p,h.flush=d,h}function r(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function o(e){return!!e&&"object"==typeof e}function i(e){return"symbol"==typeof e||o(e)&&b.call(e)==l}function a(e){if("number"==typeof e)return e;if(i(e))return u;if(r(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=r(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(c,"");var n=p.test(e);return n||d.test(e)?h(e.slice(2),n?2:8):f.test(e)?u:+e}var s="Expected a function",u=NaN,l="[object Symbol]",c=/^\s+|\s+$/g,f=/^[-+]0x[0-9a-f]+$/i,p=/^0b[01]+$/i,d=/^0o[0-7]+$/i,h=parseInt,m="object"==typeof t&&t&&t.Object===Object&&t,v="object"==typeof self&&self&&self.Object===Object&&self,g=m||v||Function("return this")(),y=Object.prototype,b=y.toString,E=Math.max,w=Math.min,x=function(){return g.Date.now()};e.exports=n}).call(t,n(28))},function(e,t,n){"use strict";function r(e,t){return t?n.i(a.a)(e,t):new o.a(n.i(i.a)(e))}t.a=r;var o=n(2),i=n(91),a=n(41)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(3),o=n(204),i=function(e){function t(t,n){var r=e.call(this,t,n)||this;return r.scheduler=t,r.work=n,r.pending=!1,r}return r.a(t,e),t.prototype.schedule=function(e,t){if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,t)),this.pending=!0,this.delay=t,this.id=this.id||this.requestAsyncId(r,this.id,t),this},t.prototype.requestAsyncId=function(e,t,n){return void 0===n&&(n=0),setInterval(e.flush.bind(e,this),n)},t.prototype.recycleAsyncId=function(e,t,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return t;clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(e,t);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var n=!1,r=void 0;try{this.work(e)}catch(e){n=!0,r=!!e&&e||new Error(e)}if(n)return this.unsubscribe(),r},t.prototype._unsubscribe=function(){var e=this.id,t=this.scheduler,n=t.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=e&&(this.id=this.recycleAsyncId(t,e,null)),this.delay=null},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return i});var r=n(3),o=n(76),i=function(e){function t(n,r){void 0===r&&(r=o.a.now);var i=e.call(this,n,function(){return t.delegate&&t.delegate!==i?t.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.a(t,e),t.prototype.schedule=function(n,r,o){return void 0===r&&(r=0),t.delegate&&t.delegate!==this?t.delegate.schedule(n,r,o):e.prototype.schedule.call(this,n,r,o)},t.prototype.flush=function(e){var t=this.actions;if(this.active)return void t.push(e);var n;this.active=!0;do{if(n=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}},t}(o.a)},function(e,t,n){"use strict";n.d(t,"a",function(){return r});var r=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r,o;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ !function(){"use strict";function n(){for(var e=[],t=0;t=0||(o[n]=e[n]);return o}function h(e,t){if(null==e)return{};var n,r,o=d(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function v(e,t){return!t||"object"!=typeof t&&"function"!=typeof t?m(e):t}function g(e){return y(e)||b(e)||E()}function y(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t-1}function T(e){return k(e)?window.pageYOffset:e.scrollTop}function C(e,t){if(k(e))return void window.scrollTo(0,t);e.scrollTop=t}function O(e){var t=getComputedStyle(e),n="absolute"===t.position,r=/(auto|scroll)/,o=document.documentElement;if("fixed"===t.position)return o;for(var i=e;i=i.parentElement;)if(t=getComputedStyle(i),(!n||"static"!==t.position)&&r.test(t.overflow+t.overflowY+t.overflowX))return i;return o}function _(e,t,n,r){return n*((e=e/r-1)*e*e+1)+t}function A(e,t){function n(){u+=s;var t=_(u,i,a,r);C(e,t),u2&&void 0!==arguments[2]?arguments[2]:200,o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:ee,i=T(e),a=t-i,s=10,u=0;n()}function R(e,t){var n=e.getBoundingClientRect(),r=t.getBoundingClientRect(),o=t.offsetHeight/3;r.bottom+o>n.bottom?C(e,Math.min(t.offsetTop+t.clientHeight-e.offsetHeight+o,e.scrollHeight)):r.top-o=m)return{placement:"bottom",maxHeight:t};if(R>=m&&!a)return i&&A(l,I,160),{placement:"bottom",maxHeight:t};if(!a&&R>=r||a&&k>=r){i&&A(l,I,160);return{placement:"bottom",maxHeight:a?k-w:R-w}}if("auto"===o||a){var P=t,N=a?S:_;return N>=r&&(P=Math.min(N-w-u.controlHeight,t)),{placement:"top",maxHeight:P}}if("bottom"===o)return C(l,I),{placement:"bottom",maxHeight:t};break;case"top":if(S>=m)return{placement:"top",maxHeight:t};if(_>=m&&!a)return i&&A(l,M,160),{placement:"top",maxHeight:t};if(!a&&_>=r||a&&S>=r){var j=t;return(!a&&_>=r||a&&S>=r)&&(j=a?S-x:_-x),i&&A(l,M,160),{placement:"top",maxHeight:j}}return{placement:"bottom",maxHeight:t};default:throw new Error('Invalid placement provided "'.concat(o,'".'))}return c}function N(e){var t={bottom:"top",top:"bottom"};return e?t[e]:"bottom"}function j(e,t){if(e===t)return!0;if(e&&t&&"object"==r(e)&&"object"==r(t)){var n,o,i,a=me(e),s=me(t);if(a&&s){if((o=e.length)!=t.length)return!1;for(n=o;0!=n--;)if(!j(e[n],t[n]))return!1;return!0}if(a!=s)return!1;var u=e instanceof Date,l=t instanceof Date;if(u!=l)return!1;if(u&&l)return e.getTime()==t.getTime();var c=e instanceof RegExp,f=t instanceof RegExp;if(c!=f)return!1;if(c&&f)return e.toString()==t.toString();var p=ve(e);if((o=p.length)!==ve(t).length)return!1;for(n=o;0!=n--;)if(!ge.call(t,p[n]))return!1;for(n=o;0!=n--;)if(!("_owner"===(i=p[n])&&e.$$typeof||j(e[i],t[i])))return!1;return!0}return e!==e&&t!==t}function L(e,t){try{return j(e,t)}catch(e){if(e.message&&e.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",e.name,e.message),!1;throw e}}function D(e){e.preventDefault()}function F(e){e.stopPropagation()}function H(){var e=this.scrollTop,t=this.scrollHeight,n=e+this.offsetHeight;0===e?this.scrollTop=1:n===t&&(this.scrollTop=e-1)}function U(){return"ontouchstart"in window||navigator.maxTouchPoints}function z(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=l({},e);return Object.keys(t).forEach(function(r){e[r]?n[r]=function(n,o){return t[r](e[r](n,o),o)}:n[r]=t[r]}),n}Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"SelectBase",function(){return Ut}),n.d(t,"Async",function(){return Wt}),n.d(t,"makeAsyncSelect",function(){return Gt}),n.d(t,"AsyncCreatable",function(){return tn}),n.d(t,"Creatable",function(){return Kt}),n.d(t,"makeCreatableSelect",function(){return Qt}),n.d(t,"createFilter",function(){return xe}),n.d(t,"makeAnimated",function(){return dn}),n.d(t,"components",function(){return Mt}),n.d(t,"mergeStyles",function(){return z}),n.d(t,"defaultTheme",function(){return Dt});var B=n(0),V=n.n(B),G=n(157),Y=n(150),W=n(12),q=(n.n(W),n(1)),$=n.n(q),X=n(162),Q=n.n(X),Z=n(164),K=n.n(Z),J=n(168),ee=(n.n(J),function(){}),te=function(e){return Array.isArray(e)?e.filter(Boolean):"object"===r(e)&&null!==e?[e]:[]},ne=function(e){return"auto"===e?"bottom":e},re=function(e){var t,n=e.placement,r=e.theme,o=r.borderRadius,i=r.spacing,a=r.colors;return t={label:"menu"},s(t,N(n),"100%"),s(t,"backgroundColor",a.neutral0),s(t,"borderRadius",o),s(t,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),s(t,"marginBottom",i.menuGutter),s(t,"marginTop",i.menuGutter),s(t,"position","absolute"),s(t,"width","100%"),s(t,"zIndex",1),t},oe=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a-1}},Se=function(e){return V.a.createElement("span",u({className:n.i(Y.a)({label:"a11yText",zIndex:9999,border:0,clip:"rect(1px, 1px, 1px, 1px)",height:1,width:1,position:"absolute",overflow:"hidden",padding:0,whiteSpace:"nowrap",backgroundColor:"red",color:"blue"})},e))},ke=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=(e.in,e.out,e.onExited,e.appear,e.enter,e.exit,e.innerRef),r=(e.emotion,h(e,["in","out","onExited","appear","enter","exit","innerRef","emotion"]));return V.a.createElement("input",u({ref:t},r,{className:n.i(Y.a)({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"})}))}}]),t}(B.Component),Te=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.props.innerRef(n.i(W.findDOMNode)(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),t}(B.Component),Ce=["boxSizing","height","overflow","paddingRight","position"],Oe={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"},_e=!("undefined"==typeof window||!window.document||!window.document.createElement),Ae=0,Re=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a0,h=c-f-l,m=!1;h>t&&n.isBottom&&(i&&i(e),n.isBottom=!1),d&&n.isTop&&(s&&s(e),n.isTop=!1),d&&t>h?(o&&!n.isBottom&&o(e),p.scrollTop=c,m=!0,n.isBottom=!0):!d&&-t>l&&(a&&!n.isTop&&a(e),p.scrollTop=0,m=!0,n.isTop=!0),m&&n.cancelScroll(e)}),s(m(m(n)),"onWheel",function(e){n.handleEventDelta(e,e.deltaY)}),s(m(m(n)),"onTouchStart",function(e){n.touchStart=e.changedTouches[0].clientY}),s(m(m(n)),"onTouchMove",function(e){var t=n.touchStart-e.changedTouches[0].clientY;n.handleEventDelta(e,t)}),s(m(m(n)),"getScrollTarget",function(e){n.scrollTarget=e}),n}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(e){e&&(e.scrollHeight<=e.clientHeight||("function"==typeof e.addEventListener&&e.addEventListener("wheel",this.onWheel,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.addEventListener&&e.addEventListener("touchmove",this.onTouchMove,!1)))}},{key:"stopListening",value:function(e){e.scrollHeight<=e.clientHeight||("function"==typeof e.removeEventListener&&e.removeEventListener("wheel",this.onWheel,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchstart",this.onTouchStart,!1),"function"==typeof e.removeEventListener&&e.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return V.a.createElement(Te,{innerRef:this.getScrollTarget},this.props.children)}}]),t}(B.Component),Pe=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.isEnabled,n=h(e,["isEnabled"]);return t?V.a.createElement(Me,n):this.props.children}}]),t}(B.Component);s(Pe,"defaultProps",{isEnabled:!0});var Ne=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.isSearchable,r=t.isMulti,o=t.label,i=t.isDisabled;switch(e){case"menu":return"Use Up and Down to choose options".concat(i?"":", press Enter to select the currently focused option",", press Escape to exit the menu, press Tab to select the option and exit the menu.");case"input":return"".concat(o||"Select"," is focused ").concat(n?",type to refine list":"",", press Down to open the menu, ").concat(r?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},je=function(e,t){var n=t.value,r=t.isDisabled;if(n)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(n,", deselected.");case"select-option":return r?"option ".concat(n," is disabled. Select another option."):"option ".concat(n,", selected.")}},Le=function(e){var t=e.focusedValue,n=e.getOptionLabel,r=e.selectValue;return"value ".concat(n(t)," focused, ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},De=function(e){var t=e.focusedOption,n=e.getOptionLabel,r=e.options;return"option ".concat(n(t)," focused").concat(t.isDisabled?" disabled":"",", ").concat(r.indexOf(t)+1," of ").concat(r.length,".")},Fe=function(e){var t=e.inputValue;return"".concat(e.screenReaderMessage).concat(t?" for search term "+t:"",".")},He=function(e){return e.label},Ue=function(e){return e.label},ze=function(e){return e.value},Be=function(e){return!!e.isDisabled},Ve=function(e){var t=e.isDisabled;return{label:"container",direction:e.isRtl?"rtl":null,pointerEvents:t?"none":null,position:"relative"}},Ge=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps,s=e.isDisabled,l=e.isRtl;return V.a.createElement("div",u({className:o(n.i(Y.a)(i("container",e)),{"--is-disabled":s,"--is-rtl":l},r)},a),t)},Ye=function(e){var t=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(t.baseUnit/2,"px ").concat(2*t.baseUnit,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},We=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,o=e.cx,i=e.isMulti,a=e.getStyles,s=e.hasValue;return V.a.createElement("div",{className:o(n.i(Y.a)(a("valueContainer",this.props)),{"value-container":!0,"value-container--is-multi":i,"value-container--has-value":s},r)},t)}}]),t}(B.Component),qe=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},$e=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles;return V.a.createElement("div",{className:o(n.i(Y.a)(i("indicatorsContainer",e)),{indicators:!0},r)},t)},Xe=function(e){var t=e.size,r=h(e,["size"]);return V.a.createElement("svg",u({height:t,width:t,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",className:n.i(Y.a)({display:"inline-block",fill:"currentColor",lineHeight:1,stroke:"currentColor",strokeWidth:0})},r))},Qe=function(e){return V.a.createElement(Xe,u({size:20},e),V.a.createElement("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},Ze=function(e){return V.a.createElement(Xe,u({size:20},e),V.a.createElement("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},Ke=function(e){var t=e.isFocused,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorContainer",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*r,transition:"color 150ms",":hover":{color:t?o.neutral80:o.neutral40}}},Je=Ke,et=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return V.a.createElement("div",u({},a,{className:o(n.i(Y.a)(i("dropdownIndicator",e)),{indicator:!0,"dropdown-indicator":!0},r)}),t||V.a.createElement(Ze,null))},tt=Ke,nt=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return V.a.createElement("div",u({},a,{className:o(n.i(Y.a)(i("clearIndicator",e)),{indicator:!0,"clear-indicator":!0},r)}),t||V.a.createElement(Qe,null))},rt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing.baseUnit,o=n.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:t?o.neutral10:o.neutral20,marginBottom:2*r,marginTop:2*r,width:1}},ot=function(e){var t=e.className,r=e.cx,o=e.getStyles,i=e.innerProps;return V.a.createElement("span",u({},i,{className:r(n.i(Y.a)(o("indicatorSeparator",e)),{"indicator-separator":!0},t)}))},it=!1,at=function(e){var t=e.isFocused,n=e.size,r=e.theme,o=r.colors,i=r.spacing.baseUnit;return{label:"loadingIndicator",color:t?o.neutral60:o.neutral20,display:"flex",padding:2*i,transition:"color 150ms",alignSelf:"center",fontSize:n,lineHeight:1,marginRight:n,textAlign:"center",verticalAlign:"middle"}},st=function(e){var t=e.color,r=e.delay,o=e.offset;return V.a.createElement("span",{className:n.i(Y.a)({animationDuration:"1s",animationDelay:"".concat(r,"ms"),animationIterationCount:"infinite",animationName:"react-select-loading-indicator",animationTimingFunction:"ease-in-out",backgroundColor:t,borderRadius:"1em",display:"inline-block",marginLeft:o?"1em":null,height:"1em",verticalAlign:"top",width:"1em"})})},ut=function(e){var t=e.className,r=e.cx,o=e.getStyles,i=e.innerProps,a=e.isFocused,s=e.isRtl,l=e.theme.colors,c=a?l.neutral80:l.neutral20;return it||(n.i(Y.b)("@keyframes ","react-select-loading-indicator","{0%,80%,100%{opacity:0;}40%{opacity:1;}};"),it=!0),V.a.createElement("div",u({},i,{className:r(n.i(Y.a)(o("loadingIndicator",e)),{indicator:!0,"loading-indicator":!0},t)}),V.a.createElement(st,{color:c,delay:0,offset:s}),V.a.createElement(st,{color:c,delay:160,offset:!0}),V.a.createElement(st,{color:c,delay:320,offset:!s}))};ut.defaultProps={size:4};var lt=function(e){var t=e.isDisabled,n=e.isFocused,r=e.theme,o=r.colors,i=r.borderRadius,a=r.spacing;return{label:"control",alignItems:"center",backgroundColor:t?o.neutral5:o.neutral0,borderColor:t?o.neutral10:n?o.primary:o.neutral20,borderRadius:i,borderStyle:"solid",borderWidth:1,boxShadow:n?"0 0 0 1px ".concat(o.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:a.controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:n?o.primary:o.neutral30}}},ct=function(e){var t=e.children,r=e.cx,o=e.getStyles,i=e.className,a=e.isDisabled,s=e.isFocused,l=e.innerRef,c=e.innerProps,f=e.menuIsOpen;return V.a.createElement("div",u({ref:l,className:r(n.i(Y.a)(o("control",e)),{control:!0,"control--is-disabled":a,"control--is-focused":s,"control--menu-is-open":f},i)},c),t)},ft=function(e){var t=e.theme.spacing;return{paddingBottom:2*t.baseUnit,paddingTop:2*t.baseUnit}},pt=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.Heading,s=e.headingProps,l=e.label,c=e.theme,f=e.selectProps;return V.a.createElement("div",{className:o(n.i(Y.a)(i("group",e)),{group:!0},r)},V.a.createElement(a,u({},s,{selectProps:f,theme:c,getStyles:i,cx:o}),l),V.a.createElement("div",null,t))},dt=function(e){var t=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:3*t.baseUnit,paddingRight:3*t.baseUnit,textTransform:"uppercase"}},ht=function(e){var t=e.className,r=e.cx,o=e.getStyles,i=e.theme,a=(e.selectProps,h(e,["className","cx","getStyles","theme","selectProps"]));return V.a.createElement("div",u({className:r(n.i(Y.a)(o("groupHeading",l({theme:i},a))),{"group-heading":!0},t)},a))},mt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{margin:r.baseUnit/2,paddingBottom:r.baseUnit/2,paddingTop:r.baseUnit/2,visibility:t?"hidden":"visible",color:o.neutral80}},vt=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},gt=function(e){var t=e.className,r=e.cx,o=e.getStyles,i=e.innerRef,a=e.isHidden,s=e.isDisabled,c=e.theme,f=(e.selectProps,h(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]));return V.a.createElement("div",{className:n.i(Y.a)(o("input",l({theme:c},f)))},V.a.createElement(K.a,u({className:r(null,{input:!0},t),inputRef:i,inputStyle:vt(a),disabled:s},f)))},yt=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius;return{label:"multiValue",backgroundColor:t.colors.neutral10,borderRadius:r/2,display:"flex",margin:n.baseUnit/2,minWidth:0}},bt=function(e){var t=e.theme,n=t.borderRadius,r=t.colors,o=e.cropWithEllipsis;return{borderRadius:n/2,color:r.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:o?"ellipsis":null,whiteSpace:"nowrap"}},Et=function(e){var t=e.theme,n=t.spacing,r=t.borderRadius,o=t.colors;return{alignItems:"center",borderRadius:r/2,backgroundColor:e.isFocused&&o.dangerLight,display:"flex",paddingLeft:n.baseUnit,paddingRight:n.baseUnit,":hover":{backgroundColor:o.dangerLight,color:o.danger}}},wt=function(e){var t=e.children,n=e.innerProps;return V.a.createElement("div",n,t)},xt=wt,St=wt,kt=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,n=e.innerProps;return V.a.createElement("div",n,t||V.a.createElement(Qe,{size:14}))}}]),t}(B.Component),Tt=function(e){function t(){return o(this,t),v(this,f(t).apply(this,arguments))}return c(t,e),a(t,[{key:"render",value:function(){var e=this.props,t=e.children,r=e.className,o=e.components,i=e.cx,a=e.data,s=e.getStyles,u=e.innerProps,c=e.isDisabled,f=e.removeProps,p=e.selectProps,d=o.Container,h=o.Label,m=o.Remove,v=l({className:i(n.i(Y.a)(s("multiValue",this.props)),{"multi-value":!0,"multi-value--is-disabled":c},r)},u),g={className:i(n.i(Y.a)(s("multiValueLabel",this.props)),{"multi-value__label":!0},r)},y=l({className:i(n.i(Y.a)(s("multiValueRemove",this.props)),{"multi-value__remove":!0},r)},f);return V.a.createElement(d,{data:a,innerProps:v,selectProps:p},V.a.createElement(h,{data:a,innerProps:g,selectProps:p},t),V.a.createElement(m,{data:a,innerProps:y,selectProps:p}))}}]),t}(B.Component);s(Tt,"defaultProps",{cropWithEllipsis:!0});var Ct=function(e){var t=e.isDisabled,n=e.isFocused,r=e.isSelected,o=e.theme,i=o.spacing,a=o.colors;return{label:"option",backgroundColor:r?a.primary:n?a.primary25:"transparent",color:t?a.neutral20:r?a.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(2*i.baseUnit,"px ").concat(3*i.baseUnit,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!t&&(r?a.primary:a.primary50)}}},Ot=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.isFocused,l=e.isSelected,c=e.innerRef,f=e.innerProps;return V.a.createElement("div",u({ref:c,className:o(n.i(Y.a)(i("option",e)),{option:!0,"option--is-disabled":a,"option--is-focused":s,"option--is-selected":l},r)},f),t)},_t=function(e){var t=e.theme,n=t.spacing;return{label:"placeholder",color:t.colors.neutral50,marginLeft:n.baseUnit/2,marginRight:n.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},At=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.innerProps;return V.a.createElement("div",u({className:o(n.i(Y.a)(i("placeholder",e)),{placeholder:!0},r)},a),t)},Rt=function(e){var t=e.isDisabled,n=e.theme,r=n.spacing,o=n.colors;return{label:"singleValue",color:t?o.neutral40:o.neutral80,marginLeft:r.baseUnit/2,marginRight:r.baseUnit/2,maxWidth:"calc(100% - ".concat(2*r.baseUnit,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},It=function(e){var t=e.children,r=e.className,o=e.cx,i=e.getStyles,a=e.isDisabled,s=e.innerProps;return V.a.createElement("div",u({className:o(n.i(Y.a)(i("singleValue",e)),{"single-value":!0,"single-value--is-disabled":a},r)},s),t)},Mt={ClearIndicator:nt,Control:ct,DropdownIndicator:et,DownChevron:Ze,CrossIcon:Qe,Group:pt,GroupHeading:ht,IndicatorsContainer:$e,IndicatorSeparator:ot,Input:gt,LoadingIndicator:ut,Menu:ie,MenuList:se,MenuPortal:he,LoadingMessage:pe,NoOptionsMessage:fe,MultiValue:Tt,MultiValueContainer:xt,MultiValueLabel:St,MultiValueRemove:kt,Option:Ot,Placeholder:At,SelectContainer:Ge,SingleValue:It,ValueContainer:We},Pt=function(e){return l({},Mt,e.components)},Nt={clearIndicator:tt,container:Ve,control:lt,dropdownIndicator:Je,group:ft,groupHeading:dt,indicatorsContainer:qe,indicatorSeparator:rt,input:mt,loadingIndicator:at,loadingMessage:ce,menu:re,menuList:ae,menuPortal:de,multiValue:yt,multiValueLabel:bt,multiValueRemove:Et,noOptionsMessage:le,option:Ct,placeholder:_t,singleValue:Rt,valueContainer:Ye},jt={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},Lt={baseUnit:4,controlHeight:38,menuGutter:8},Dt={borderRadius:4,colors:jt,spacing:Lt},Ft={backspaceRemovesValue:!0,blurInputOnSelect:M(),captureMenuScroll:!M(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:xe(),formatGroupLabel:He,getOptionLabel:Ue,getOptionValue:ze,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Be,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!function(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch(e){return!1}}(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var t=e.count;return"".concat(t," result").concat(1!==t?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Ht=1,Ut=function(e){function t(e){var r;o(this,t),r=v(this,f(t).call(this,e)),s(m(m(r)),"state",{ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]}),s(m(m(r)),"blockOptionHover",!1),s(m(m(r)),"isComposing",!1),s(m(m(r)),"clearFocusValueOnUpdate",!1),s(m(m(r)),"commonProps",void 0),s(m(m(r)),"components",void 0),s(m(m(r)),"hasGroups",!1),s(m(m(r)),"initialTouchX",0),s(m(m(r)),"initialTouchY",0),s(m(m(r)),"inputIsHiddenAfterUpdate",void 0),s(m(m(r)),"instancePrefix",""),s(m(m(r)),"openAfterFocus",!1),s(m(m(r)),"scrollToFocusedOptionOnUpdate",!1),s(m(m(r)),"userIsDragging",void 0),s(m(m(r)),"controlRef",null),s(m(m(r)),"getControlRef",function(e){r.controlRef=e}),s(m(m(r)),"focusedOptionRef",null),s(m(m(r)),"getFocusedOptionRef",function(e){r.focusedOptionRef=e}),s(m(m(r)),"menuListRef",null),s(m(m(r)),"getMenuListRef",function(e){r.menuListRef=e}),s(m(m(r)),"inputRef",null),s(m(m(r)),"getInputRef",function(e){r.inputRef=e}),s(m(m(r)),"cacheComponents",function(e){r.components=Pt({components:e})}),s(m(m(r)),"focus",r.focusInput),s(m(m(r)),"blur",r.blurInput),s(m(m(r)),"onChange",function(e,t){var n=r.props;(0,n.onChange)(e,l({},t,{name:n.name}))}),s(m(m(r)),"setValue",function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"set-value",n=arguments.length>2?arguments[2]:void 0,o=r.props,i=o.closeMenuOnSelect,a=o.isMulti;r.onInputChange("",{action:"set-value"}),i&&(r.inputIsHiddenAfterUpdate=!a,r.onMenuClose()),r.clearFocusValueOnUpdate=!0,r.onChange(e,{action:t,option:n})}),s(m(m(r)),"selectOption",function(e){var t=r.props,n=t.blurInputOnSelect,o=t.isMulti,i=r.state.selectValue;if(o)if(r.isOptionSelected(e,i)){var a=r.getOptionValue(e);r.setValue(i.filter(function(e){return r.getOptionValue(e)!==a}),"deselect-option",e),r.announceAriaLiveSelection({event:"deselect-option",context:{value:r.getOptionLabel(e)}})}else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue([].concat(g(i),[e]),"select-option",e),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));else r.isOptionDisabled(e,i)?r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e),isDisabled:!0}}):(r.setValue(e,"select-option"),r.announceAriaLiveSelection({event:"select-option",context:{value:r.getOptionLabel(e)}}));n&&r.blurInput()}),s(m(m(r)),"removeValue",function(e){var t=r.state.selectValue,n=r.getOptionValue(e);r.onChange(t.filter(function(e){return r.getOptionValue(e)!==n}),{action:"remove-value",removedValue:e}),r.announceAriaLiveSelection({event:"remove-value",context:{value:e?r.getOptionLabel(e):""}}),r.focusInput()}),s(m(m(r)),"clearValue",function(){var e=r.props.isMulti;r.onChange(e?[]:null,{action:"clear"})}),s(m(m(r)),"popValue",function(){var e=r.state.selectValue,t=e[e.length-1];r.announceAriaLiveSelection({event:"pop-value",context:{value:t?r.getOptionLabel(t):""}}),r.onChange(e.slice(0,e.length-1),{action:"pop-value",removedValue:t})}),s(m(m(r)),"getOptionLabel",function(e){return r.props.getOptionLabel(e)}),s(m(m(r)),"getOptionValue",function(e){return r.props.getOptionValue(e)}),s(m(m(r)),"getStyles",function(e,t){var n=Nt[e](t);n.boxSizing="border-box";var o=r.props.styles[e];return o?o(n,t):n}),s(m(m(r)),"getElementId",function(e){return"".concat(r.instancePrefix,"-").concat(e)}),s(m(m(r)),"getActiveDescendentId",function(){var e=r.props.menuIsOpen,t=r.state,n=t.menuOptions,o=t.focusedOption;if(o&&e){var i=n.focusable.indexOf(o),a=n.render[i];return a&&a.key}}),s(m(m(r)),"announceAriaLiveSelection",function(e){var t=e.event,n=e.context;r.setState({ariaLiveSelection:je(t,n)})}),s(m(m(r)),"announceAriaLiveContext",function(e){var t=e.event,n=e.context;r.setState({ariaLiveContext:Ne(t,l({},n,{label:r.props["aria-label"]}))})}),s(m(m(r)),"onMenuMouseDown",function(e){0===e.button&&(e.stopPropagation(),e.preventDefault(),r.focusInput())}),s(m(m(r)),"onMenuMouseMove",function(e){r.blockOptionHover=!1}),s(m(m(r)),"onControlMouseDown",function(e){var t=r.props.openMenuOnClick;r.state.isFocused?r.props.menuIsOpen?"INPUT"!==e.target.tagName&&r.onMenuClose():t&&r.openMenu("first"):(t&&(r.openAfterFocus=!0),r.focusInput()),"INPUT"!==e.target.tagName&&e.preventDefault()}),s(m(m(r)),"onDropdownIndicatorMouseDown",function(e){if(!(e&&"mousedown"===e.type&&0!==e.button||r.props.isDisabled)){var t=r.props,n=t.isMulti,o=t.menuIsOpen;r.focusInput(),o?(r.inputIsHiddenAfterUpdate=!n,r.onMenuClose()):r.openMenu("first"),e.preventDefault(),e.stopPropagation()}}),s(m(m(r)),"onClearIndicatorMouseDown",function(e){e&&"mousedown"===e.type&&0!==e.button||(r.clearValue(),e.stopPropagation(),r.openAfterFocus=!1,setTimeout(function(){return r.focusInput()}))}),s(m(m(r)),"onScroll",function(e){"boolean"==typeof r.props.closeMenuOnScroll?e.target instanceof HTMLElement&&k(e.target)&&r.props.onMenuClose():"function"==typeof r.props.closeMenuOnScroll&&r.props.closeMenuOnScroll(e)&&r.props.onMenuClose()}),s(m(m(r)),"onCompositionStart",function(){r.isComposing=!0}),s(m(m(r)),"onCompositionEnd",function(){r.isComposing=!1}),s(m(m(r)),"onTouchStart",function(e){var t=e.touches,n=t.item(0);n&&(r.initialTouchX=n.clientX,r.initialTouchY=n.clientY,r.userIsDragging=!1)}),s(m(m(r)),"onTouchMove",function(e){var t=e.touches,n=t.item(0);if(n){var o=Math.abs(n.clientX-r.initialTouchX),i=Math.abs(n.clientY-r.initialTouchY);r.userIsDragging=o>5||i>5}}),s(m(m(r)),"onTouchEnd",function(e){r.userIsDragging||(r.controlRef&&!r.controlRef.contains(e.target)&&r.menuListRef&&!r.menuListRef.contains(e.target)&&r.blurInput(),r.initialTouchX=0,r.initialTouchY=0)}),s(m(m(r)),"onControlTouchEnd",function(e){r.userIsDragging||r.onControlMouseDown(e)}),s(m(m(r)),"onClearIndicatorTouchEnd",function(e){r.userIsDragging||r.onClearIndicatorMouseDown(e)}),s(m(m(r)),"onDropdownIndicatorTouchEnd",function(e){r.userIsDragging||r.onDropdownIndicatorMouseDown(e)}),s(m(m(r)),"handleInputChange",function(e){var t=e.currentTarget.value;r.inputIsHiddenAfterUpdate=!1,r.onInputChange(t,{action:"input-change"}),r.onMenuOpen()}),s(m(m(r)),"onInputFocus",function(e){var t=r.props,n=t.isSearchable,o=t.isMulti;r.props.onFocus&&r.props.onFocus(e),r.inputIsHiddenAfterUpdate=!1,r.announceAriaLiveContext({event:"input",context:{isSearchable:n,isMulti:o}}),r.setState({isFocused:!0}),(r.openAfterFocus||r.props.openMenuOnFocus)&&r.openMenu("first"),r.openAfterFocus=!1}),s(m(m(r)),"onInputBlur",function(e){if(r.menuListRef&&r.menuListRef.contains(document.activeElement))return void r.inputRef.focus();r.props.onBlur&&r.props.onBlur(e),r.onInputChange("",{action:"input-blur"}),r.onMenuClose(),r.setState({focusedValue:null,isFocused:!1})}),s(m(m(r)),"onOptionHover",function(e){r.blockOptionHover||r.state.focusedOption===e||r.setState({focusedOption:e})}),s(m(m(r)),"shouldHideSelectedOptions",function(){var e=r.props,t=e.hideSelectedOptions,n=e.isMulti;return void 0===t?n:t}),s(m(m(r)),"onKeyDown",function(e){var t=r.props,n=t.isMulti,o=t.backspaceRemovesValue,i=t.escapeClearsValue,a=t.inputValue,s=t.isClearable,u=t.isDisabled,l=t.menuIsOpen,c=t.onKeyDown,f=t.tabSelectsValue,p=t.openMenuOnFocus,d=r.state,h=d.focusedOption,m=d.focusedValue,v=d.selectValue;if(!(u||"function"==typeof c&&(c(e),e.defaultPrevented))){switch(r.blockOptionHover=!0,e.key){case"ArrowLeft":if(!n||a)return;r.focusValue("previous");break;case"ArrowRight":if(!n||a)return;r.focusValue("next");break;case"Delete":case"Backspace":if(a)return;if(m)r.removeValue(m);else{if(!o)return;n?r.popValue():s&&r.clearValue()}break;case"Tab":if(r.isComposing)return;if(e.shiftKey||!l||!f||!h||p&&r.isOptionSelected(h,v))return;r.selectOption(h);break;case"Enter":if(229===e.keyCode)break;if(l){if(!h)return;if(r.isComposing)return;r.selectOption(h);break}return;case"Escape":l?(r.inputIsHiddenAfterUpdate=!1,r.onInputChange("",{action:"menu-close"}),r.onMenuClose()):s&&i&&r.clearValue();break;case" ":if(a)return;if(!l){r.openMenu("first");break}if(!h)return;r.selectOption(h);break;case"ArrowUp":l?r.focusOption("up"):r.openMenu("last");break;case"ArrowDown":l?r.focusOption("down"):r.openMenu("first");break;case"PageUp":if(!l)return;r.focusOption("pageup");break;case"PageDown":if(!l)return;r.focusOption("pagedown");break;case"Home":if(!l)return;r.focusOption("first");break;case"End":if(!l)return;r.focusOption("last");break;default:return}e.preventDefault()}});var i=e.value;r.cacheComponents=n.i(G.a)(r.cacheComponents,L).bind(m(m(r))),r.cacheComponents(e.components),r.instancePrefix="react-select-"+(r.props.instanceId||++Ht);var a=te(i),u=r.buildMenuOptions(e,a);return r.state.menuOptions=u,r.state.selectValue=a,r}return c(t,e),a(t,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"componentWillReceiveProps",value:function(e){var t=this.props,n=t.options,r=t.value,o=t.inputValue;if(this.cacheComponents(e.components),e.value!==r||e.options!==n||e.inputValue!==o){var i=te(e.value),a=this.buildMenuOptions(e,i),s=this.getNextFocusedValue(i),u=this.getNextFocusedOption(a.focusable);this.setState({menuOptions:a,selectValue:i,focusedOption:u,focusedValue:s})}null!=this.inputIsHiddenAfterUpdate&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(e){var t=this.props,n=t.isDisabled,r=t.menuIsOpen,o=this.state.isFocused;(o&&!n&&e.isDisabled||o&&r&&!e.menuIsOpen)&&this.focusInput(),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&R(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var e=this.props,t=e.isSearchable,n=e.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:t,isMulti:n}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(e,t){this.props.onInputChange(e,t)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(e){var t=this.state,n=t.menuOptions,r=t.selectValue,o=t.isFocused,i=this.props.isMulti,a="first"===e?0:n.focusable.length-1;if(!i){var s=n.focusable.indexOf(r[0]);s>-1&&(a=s)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.onMenuOpen(),this.setState({focusedValue:null,focusedOption:n.focusable[a]}),this.announceAriaLiveContext({event:"menu"})}},{key:"focusValue",value:function(e){var t=this.props,n=t.isMulti,r=t.isSearchable,o=this.state,i=o.selectValue,a=o.focusedValue;if(n){this.setState({focusedOption:null});var s=i.indexOf(a);a||(s=-1,this.announceAriaLiveContext({event:"value"}));var u=i.length-1,l=-1;if(i.length){switch(e){case"previous":l=0===s?0:-1===s?u:s-1;break;case"next":s>-1&&s0&&void 0!==arguments[0]?arguments[0]:"first",t=this.props.pageSize,n=this.state,r=n.focusedOption,o=n.menuOptions,i=o.focusable;if(i.length){var a=0,s=i.indexOf(r);r||(s=-1,this.announceAriaLiveContext({event:"menu"})),"up"===e?a=s>0?s-1:i.length-1:"down"===e?a=(s+1)%i.length:"pageup"===e?(a=s-t)<0&&(a=0):"pagedown"===e?(a=s+t)>i.length-1&&(a=i.length-1):"last"===e&&(a=i.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:i[a],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Be(i[a])}})}}},{key:"getTheme",value:function(){return this.props.theme?"function"==typeof this.props.theme?this.props.theme(Dt):l({},Dt,this.props.theme):Dt}},{key:"getCommonProps",value:function(){var e=this.clearValue,t=this.getStyles,n=this.setValue,r=this.selectOption,o=this.props,i=o.classNamePrefix,a=o.isMulti,s=o.isRtl,u=o.options,l=this.state.selectValue,c=this.hasValue(),f=function(){return l};return{cx:x.bind(null,i),clearValue:e,getStyles:t,getValue:f,hasValue:c,isMulti:a,isRtl:s,options:u,selectOption:r,setValue:n,selectProps:o,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(e){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var t=this.state,n=t.focusedValue,r=t.selectValue,o=r.indexOf(n);if(o>-1){if(e.indexOf(n)>-1)return n;if(o-1?t:e[0]}},{key:"hasValue",value:function(){return this.state.selectValue.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var e=this.props,t=e.isClearable,n=e.isMulti;return void 0===t?n:t}},{key:"isOptionDisabled",value:function(e,t){return"function"==typeof this.props.isOptionDisabled&&this.props.isOptionDisabled(e,t)}},{key:"isOptionSelected",value:function(e,t){var n=this;if(t.indexOf(e)>-1)return!0;if("function"==typeof this.props.isOptionSelected)return this.props.isOptionSelected(e,t);var r=this.getOptionValue(e);return t.some(function(e){return n.getOptionValue(e)===r})}},{key:"filterOption",value:function(e,t){return!this.props.filterOption||this.props.filterOption(e,t)}},{key:"formatOptionLabel",value:function(e,t){if("function"==typeof this.props.formatOptionLabel){var n=this.props.inputValue,r=this.state.selectValue;return this.props.formatOptionLabel(e,{context:t,inputValue:n,selectValue:r})}return this.getOptionLabel(e)}},{key:"formatGroupLabel",value:function(e){return this.props.formatGroupLabel(e)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"buildMenuOptions",value:function(e,t){var n=this,r=e.inputValue,o=void 0===r?"":r,i=e.options,a=function(e,r){var i=n.isOptionDisabled(e,t),a=n.isOptionSelected(e,t),s=n.getOptionLabel(e),u=n.getOptionValue(e);if(!(n.shouldHideSelectedOptions()&&a||!n.filterOption({label:s,value:u,data:e},o))){var l=i?void 0:function(){return n.onOptionHover(e)},c=i?void 0:function(){return n.selectOption(e)},f="".concat(n.getElementId("option"),"-").concat(r);return{innerProps:{id:f,onClick:c,onMouseMove:l,onMouseOver:l,tabIndex:-1},data:e,isDisabled:i,isSelected:a,key:f,label:s,type:"option",value:u}}};return i.reduce(function(e,t,r){if(t.options){n.hasGroups||(n.hasGroups=!0);var o=t.options,i=o.map(function(t,n){var o=a(t,"".concat(r,"-").concat(n));return o&&e.focusable.push(t),o}).filter(Boolean);if(i.length){var s="".concat(n.getElementId("group"),"-").concat(r);e.render.push({type:"group",key:s,data:t,options:i})}}else{var u=a(t,"".concat(r));u&&(e.render.push(u),e.focusable.push(t))}return e},{render:[],focusable:[]})}},{key:"constructAriaLiveMessage",value:function(){var e=this.state,t=e.ariaLiveContext,n=e.selectValue,r=e.focusedValue,o=e.focusedOption,i=this.props,a=i.options,s=i.menuIsOpen,u=i.inputValue,l=i.screenReaderStatus,c=r?Le({focusedValue:r,getOptionLabel:this.getOptionLabel,selectValue:n}):"",f=o&&s?De({focusedOption:o,getOptionLabel:this.getOptionLabel,options:a}):"",p=Fe({inputValue:u,screenReaderMessage:l({count:this.countOptions()})});return"".concat(c," ").concat(f," ").concat(p," ").concat(t)}},{key:"renderInput",value:function(){var e=this.props,t=e.isDisabled,n=e.isSearchable,r=e.inputId,o=e.inputValue,i=e.tabIndex,a=this.components.Input,s=this.state.inputIsHidden,l=r||this.getElementId("input");if(!n)return V.a.createElement(ke,{id:l,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ee,onFocus:this.onInputFocus,readOnly:!0,disabled:t,tabIndex:i,value:""});var c={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]},f=this.commonProps,p=f.cx,d=f.theme,h=f.selectProps;return V.a.createElement(a,u({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:p,getStyles:this.getStyles,id:l,innerRef:this.getInputRef,isDisabled:t,isHidden:s,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:h,spellCheck:"false",tabIndex:i,theme:d,type:"text",value:o},c))}},{key:"renderPlaceholderOrValue",value:function(){var e=this,t=this.components,n=t.MultiValue,r=t.MultiValueContainer,o=t.MultiValueLabel,i=t.MultiValueRemove,a=t.SingleValue,s=t.Placeholder,l=this.commonProps,c=this.props,f=c.controlShouldRenderValue,p=c.isDisabled,d=c.isMulti,h=c.inputValue,m=c.placeholder,v=this.state,g=v.selectValue,y=v.focusedValue,b=v.isFocused;if(!this.hasValue()||!f)return h?null:V.a.createElement(s,u({},l,{key:"placeholder",isDisabled:p,isFocused:b}),m);if(d){return g.map(function(t){var a=t===y;return V.a.createElement(n,u({},l,{components:{Container:r,Label:o,Remove:i},isFocused:a,isDisabled:p,key:e.getOptionValue(t),removeProps:{onClick:function(){return e.removeValue(t)},onTouchEnd:function(){return e.removeValue(t)},onMouseDown:function(e){e.preventDefault(),e.stopPropagation()}},data:t}),e.formatOptionLabel(t,"value"))})}if(h)return null;var E=g[0];return V.a.createElement(a,u({},l,{data:E,isDisabled:p}),this.formatOptionLabel(E,"value"))}},{key:"renderClearIndicator",value:function(){var e=this.components.ClearIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!this.isClearable()||!e||r||!this.hasValue()||o)return null;var a={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return V.a.createElement(e,u({},t,{innerProps:a,isFocused:i}))}},{key:"renderLoadingIndicator",value:function(){var e=this.components.LoadingIndicator,t=this.commonProps,n=this.props,r=n.isDisabled,o=n.isLoading,i=this.state.isFocused;if(!e||!o)return null;var a={"aria-hidden":"true"};return V.a.createElement(e,u({},t,{innerProps:a,isDisabled:r,isFocused:i}))}},{key:"renderIndicatorSeparator",value:function(){var e=this.components,t=e.DropdownIndicator,n=e.IndicatorSeparator;if(!t||!n)return null;var r=this.commonProps,o=this.props.isDisabled,i=this.state.isFocused;return V.a.createElement(n,u({},r,{isDisabled:o,isFocused:i}))}},{key:"renderDropdownIndicator",value:function(){var e=this.components.DropdownIndicator;if(!e)return null;var t=this.commonProps,n=this.props.isDisabled,r=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return V.a.createElement(e,u({},t,{innerProps:o,isDisabled:n,isFocused:r}))}},{key:"renderMenu",value:function(){var e=this,t=this.components,n=t.Group,r=t.GroupHeading,o=t.Menu,i=t.MenuList,a=t.MenuPortal,s=t.LoadingMessage,l=t.NoOptionsMessage,c=t.Option,f=this.commonProps,p=this.state,d=p.focusedOption,m=p.menuOptions,v=this.props,g=v.captureMenuScroll,y=v.inputValue,b=v.isLoading,E=v.loadingMessage,w=v.minMenuHeight,x=v.maxMenuHeight,S=v.menuIsOpen,k=v.menuPlacement,T=v.menuPosition,C=v.menuPortalTarget,O=v.menuShouldBlockScroll,_=v.menuShouldScrollIntoView,A=v.noOptionsMessage,R=v.onMenuScrollToTop,I=v.onMenuScrollToBottom;if(!S)return null;var M,P=function(t){var n=d===t.data;return t.innerRef=n?e.getFocusedOptionRef:void 0,V.a.createElement(c,u({},f,t,{isFocused:n}),e.formatOptionLabel(t.data,"menu"))};if(this.hasOptions())M=m.render.map(function(t){if("group"===t.type){var o=(t.type,h(t,["type"])),i="".concat(t.key,"-heading");return V.a.createElement(n,u({},f,o,{Heading:r,headingProps:{id:i},label:e.formatGroupLabel(t.data)}),t.options.map(function(e){return P(e)}))}if("option"===t.type)return P(t)});else if(b){var N=E({inputValue:y});if(null===N)return null;M=V.a.createElement(s,f,N)}else{var j=A({inputValue:y});if(null===j)return null;M=V.a.createElement(l,f,j)}var L={minMenuHeight:w,maxMenuHeight:x,menuPlacement:k,menuPosition:T,menuShouldScrollIntoView:_},D=V.a.createElement(oe,u({},f,L),function(t){var n=t.ref,r=t.placerProps,a=r.placement,s=r.maxHeight;return V.a.createElement(o,u({},f,L,{innerRef:n,innerProps:{onMouseDown:e.onMenuMouseDown,onMouseMove:e.onMenuMouseMove},isLoading:b,placement:a}),V.a.createElement(Pe,{isEnabled:g,onTopArrive:R,onBottomArrive:I},V.a.createElement(Ie,{isEnabled:O},V.a.createElement(i,u({},f,{innerRef:e.getMenuListRef,isLoading:b,maxHeight:s}),M))))});return C||"fixed"===T?V.a.createElement(a,u({},f,{appendTo:C,controlElement:this.controlRef,menuPlacement:k,menuPosition:T}),D):D}},{key:"renderFormField",value:function(){var e=this,t=this.props,n=t.delimiter,r=t.isDisabled,o=t.isMulti,i=t.name,a=this.state.selectValue;if(i&&!r){if(o){if(n){var s=a.map(function(t){return e.getOptionValue(t)}).join(n);return V.a.createElement("input",{name:i,type:"hidden",value:s})}var u=a.length>0?a.map(function(t,n){return V.a.createElement("input",{key:"i-".concat(n),name:i,type:"hidden",value:e.getOptionValue(t)})}):V.a.createElement("input",{name:i,type:"hidden"});return V.a.createElement("div",null,u)}var l=a[0]?this.getOptionValue(a[0]):"";return V.a.createElement("input",{name:i,type:"hidden",value:l})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?V.a.createElement(Se,{"aria-live":"assertive"},V.a.createElement("p",{id:"aria-selection-event"}," ",this.state.ariaLiveSelection),V.a.createElement("p",{id:"aria-context"}," ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var e=this.components,t=e.Control,n=e.IndicatorsContainer,r=e.SelectContainer,o=e.ValueContainer,i=this.props,a=i.className,s=i.id,l=i.isDisabled,c=i.menuIsOpen,f=this.state.isFocused,p=this.commonProps=this.getCommonProps();return V.a.createElement(r,u({},p,{className:a,innerProps:{id:s,onKeyDown:this.onKeyDown},isDisabled:l,isFocused:f}),this.renderLiveRegion(),V.a.createElement(t,u({},p,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:l,isFocused:f,menuIsOpen:c}),V.a.createElement(o,u({},p,{isDisabled:l}),this.renderPlaceholderOrValue(),this.renderInput()),V.a.createElement(n,u({},p,{isDisabled:l}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),t}(B.Component);s(Ut,"defaultProps",Ft);var zt={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},Bt=function(e){var t,n;return n=t=function(t){function n(){var e,t;o(this,n);for(var r=arguments.length,i=new Array(r),a=0;a1?n-1:0),o=1;o0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0,n=String(e).toLowerCase(),r=String(t.value).toLowerCase(),o=String(t.label).toLowerCase();return r===n||o===n},$t={formatCreateLabel:function(e){return'Create "'.concat(e,'"')},isValidNewOption:function(e,t,n){return!(!e||t.some(function(t){return qt(e,t)})||n.some(function(t){return qt(e,t)}))},getNewOptionData:function(e,t){return{label:t,value:e,__isNew__:!0}}},Xt=l({allowCreateWhileLoading:!1,createOptionPosition:"last"},$t),Qt=function(e){var t,n;return n=t=function(t){function n(e){var t;o(this,n),t=v(this,f(n).call(this,e)),s(m(m(t)),"select",void 0),s(m(m(t)),"onChange",function(e,n){var r=t.props,o=r.getNewOptionData,i=r.inputValue,a=r.isMulti,s=r.onChange,u=r.onCreateOption,l=r.value;if("select-option"!==n.action)return s(e,n);var c=t.state.newOption,f=Array.isArray(e)?e:[e];if(f[f.length-1]!==c)s(e,n);else if(u)u(i);else{var p=o(i,i),d={action:"create-option"};a?s([].concat(g(te(l)),[p]),d):s(p,d)}});var r=e.options||[];return t.state={newOption:void 0,options:r},t}return c(n,t),a(n,[{key:"componentWillReceiveProps",value:function(e){var t=e.allowCreateWhileLoading,n=e.createOptionPosition,r=e.formatCreateLabel,o=e.getNewOptionData,i=e.inputValue,a=e.isLoading,s=e.isValidNewOption,u=e.value,l=e.options||[],c=this.state.newOption;c=s(i,te(u),l)?o(i,r(i)):void 0,this.setState({newOption:c,options:!t&&a||!c?l:"first"===n?[c].concat(g(l)):[].concat(g(l),[c])})}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"render",value:function(){var t=this,n=u({},this.props),r=this.state.options;return V.a.createElement(e,u({},n,{ref:function(e){t.select=e},options:r,onChange:this.onChange}))}}]),n}(B.Component),s(t,"defaultProps",Xt),n},Zt=Qt(Ut),Kt=Bt(Zt),Jt=Qt(Ut),en=Bt(Jt),tn=Gt(en),nn=function(e){return function(t){var n=(t.in,t.onExited,t.appear,t.enter,t.exit,h(t,["in","onExited","appear","enter","exit"]));return V.a.createElement(e,n)}},rn=function(e){var t=e.component,n=e.duration,r=void 0===n?1:n,o=e.in,i=(e.onExited,h(e,["component","duration","in","onExited"])),a={entering:{opacity:0},entered:{opacity:1,transition:"opacity ".concat(r,"ms")},exiting:{opacity:0},exited:{opacity:0}};return V.a.createElement(J.Transition,{mountOnEnter:!0,unmountOnExit:!0,in:o,timeout:r},function(e){var n={style:l({},a[e])};return V.a.createElement(t,u({innerProps:n},i))})},on=260,an=function(e){function t(){var e,n;o(this,t);for(var r=arguments.length,i=new Array(r),a=0;a0&&void 0!==arguments[0]?arguments[0]:{},t=Pt({components:e}),n=t.Input,r=t.MultiValue,o=t.Placeholder,i=t.SingleValue,a=t.ValueContainer,s=h(t,["Input","MultiValue","Placeholder","SingleValue","ValueContainer"]);return l({Input:nn(n),MultiValue:sn(r),Placeholder:un(o),SingleValue:ln(i),ValueContainer:cn(a)},s)},pn=fn(),dn=(pn.Input,pn.MultiValue,pn.Placeholder,pn.SingleValue,pn.ValueContainer,n.i(G.a)(fn,L)),hn=Bt(Ut);t.default=hn},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=!1,o={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){(new Error).stack}r=e},get useDeprecatedSynchronousErrorHandling(){return r}}},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=function(){function e(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return e.prototype=Object.create(Error.prototype),e}(),o=r},function(e,t,n){"use strict";function r(e){return e}t.a=r},function(e,t,n){"use strict";function r(e){return"function"==typeof e}t.a=r},function(e,t,n){"use strict";n.d(t,"a",function(){return p});var r=n(91),o=n(224),i=n(222),a=n(223),s=n(86),u=n(88),l=n(46),c=n(27),f=n(21),p=function(e){if(e&&"function"==typeof e[f.a])return n.i(a.a)(e);if(n.i(s.a)(e))return n.i(r.a)(e);if(n.i(u.a)(e))return n.i(o.a)(e);if(e&&"function"==typeof e[c.a])return n.i(i.a)(e);var t=n.i(l.a)(e)?"an invalid object":"'"+e+"'",p="You provided "+t+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.";throw new TypeError(p)}},function(e,t,n){"use strict";function r(e){(0,c.sharedHub)().subject.next({action:f.Events.TrackStart,targetAsset:e.asset})}function o(e){(0,c.sharedHub)().subject.next({action:f.Events.TrackStop,targetAsset:e.asset})}function i(e,t){(0,c.sharedHub)().subject.next({action:f.Events.TrackSeek,targetAsset:e.asset,targetTime:t})}function a(e){(0,c.sharedHub)().subject.next({action:f.Events.AssetRemove,trackId:e.id,targetAsset:e.asset})}function s(e){(0,c.sharedHub)().subject.next({action:f.Events.TrackStart,targetAsset:e.asset})}function u(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";(0,c.sharedHub)().subject.next({action:f.Events.AssetRemove,trackId:t,targetAsset:e})}function l(e){(0,c.sharedHub)().subject.next({action:f.Events.ManifestUpdated,manifest:e})}Object.defineProperty(t,"__esModule",{value:!0}),t.actionStart=r,t.actionStop=o,t.actionSeek=i,t.actionRemoveTrack=a,t.actionStartTrack=s,t.actionRemoveAsset=u,t.actionManifestUpdated=l;var c=n(5),f=n(6)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}function o(e){var t={assets:e.assets,tracks:e.tracks};if(Array.isArray(e.assets)){var n={},r=!0,o=!1,i=void 0;try{for(var a,s=e.assets[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;n[u.id]=u}}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}t.assets=n}return t}Object.defineProperty(t,"__esModule",{value:!0}),t.isSafari=t.createAsset=t.fetchManifest=void 0;t.fetchManifest=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(t);case 2:return n=e.sent,r=n.json(),r||console.warn("error loading remote manifest"),e.abrupt("return",r||{});case 6:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),t.createAsset=function(){var e=r(regeneratorRuntime.mark(function e(t,n){var r,o,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2],d=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],h=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.info("creating asset "+n),r=(0,i.genId)(),o=(0,f.findAssetType)(n.src),e.t0=o.type,e.next=e.t0===f.AssetTypes.MPD?6:e.t0===f.AssetTypes.GLTF?7:e.t0===f.AssetTypes.IMAGE?8:e.t0===f.AssetTypes.VIDEO?9:e.t0===f.AssetTypes.YOUTUBE?12:15;break;case 6:return e.abrupt("return",(0,a.createHologram)(t,n,p,d,h));case 7:return e.abrupt("return",(0,s.createGLTFModel)(t,n,p,d));case 8:return e.abrupt("return",(0,u.createImage)(r,t,n,p,d));case 9:return e.next=11,(0,l.createVideo)(r,t,n,p,d);case 11:return e.abrupt("return",e.sent);case 12:return e.next=14,(0,c.createYoutube)(r,t,n,p,d);case 14:return e.abrupt("return",e.sent);case 15:console.warn("could not determine asset type for "+n.src);case 16:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}();t.parseManifest=o;var i=n(10),a=n(116),s=n(115),u=n(117),l=n(118),c=n(119),f=n(56);t.isSafari=navigator.vendor&&navigator.vendor.indexOf("Apple")>-1},function(e,t,n){(function(t){var n;n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},e.exports=n}).call(t,n(28))},function(e,t,n){"use strict";n.d(t,"a",function(){return a});var r=n(3),o=n(18),i=n(8),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.value=null,t.hasNext=!1,t.hasCompleted=!1,t}return r.a(t,e),t.prototype._subscribe=function(t){return this.hasError?(t.error(this.thrownError),i.a.EMPTY):this.hasCompleted&&this.hasNext?(t.next(this.value),t.complete(),i.a.EMPTY):e.prototype._subscribe.call(this,t)},t.prototype.next=function(e){this.hasCompleted||(this.value=e,this.hasNext=!0)},t.prototype.error=function(t){this.hasCompleted||e.prototype.error.call(this,t)},t.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&e.prototype.next.call(this,this.value),e.prototype.complete.call(this)},t}(o.a)},function(e,t,n){"use strict";function r(){for(var e=[],t=0;td)&&(H=(B=B.replace(" ",":")).length),0r&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0u.charCodeAt(8))break;case 115:a=a.replace(u,"-webkit-"+u)+";"+a;break;case 207:case 102:a=a.replace(u,"-webkit-"+(102r.charCodeAt(0)&&(r=r.trim()),D=r,r=[D],00)return c.default.createElement(_.default,s({},r,{options:e.schema.oneOf}));switch(t){case"number":return c.default.createElement(C.default,s({},r,o));case"int":return c.default.createElement(C.default,s({},r,o,{precision:0}));case"vec2":return c.default.createElement(N.default,r);case"vec3":return c.default.createElement(M.default,r);case"vec4":return c.default.createElement(R.default,r);case"color":return c.default.createElement(x.default,r);case"boolean":return c.default.createElement(E.default,r);default:return c.default.createElement(k.default,r)}}},{key:"render",value:function(){var e=this.props,t="selector"===e.schema.type?e.entity.getDOMAttribute(e.componentname)[e.name]:JSON.stringify(e.data),n=e.name+"\n - type: "+e.schema.type+"\n - value: "+t,r=(0,p.default)({propertyRow:!0,propertyRowDefined:e.isSingle?!!e.entity.getDOMAttribute(e.componentname):e.name in(e.entity.getDOMAttribute(e.componentname)||{})});return c.default.createElement("div",{className:r},c.default.createElement("label",{htmlFor:this.id,className:"text",title:n},e.name),this.getWidget(e.schema.type))}}]),t}(c.default.Component);L.propTypes={componentname:h.default.string.isRequired,id:h.default.string,name:h.default.string.isRequired,schema:h.default.object.isRequired},t.default=L},function(e,t,n){"use strict";function r(e,t){e.traverse(function(e){e.isMesh&&(e.material.opacity=t,e.material.transparent=t<1,e.material.needsUpdate=!0)})}function o(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return new Promise(function(o,i){!function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;try{if(a>=1)return r(t,1),void o();var s=a+n;r(t,s),setTimeout(function(){e(t,n,s)},50)}catch(e){i(e)}}(e,t,n)})}function i(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new Promise(function(o,i){!function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:.05,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;try{if(a<=0)return r(t,0),void o();var s=a-n;r(t,s),setTimeout(function(){e(t,n,s)},50)}catch(e){i(e)}}(e,t,n)})}Object.defineProperty(t,"__esModule",{value:!0}),t.setOpacity=r,t.fadeIn=o,t.fadeOut=i;t.POLLING_TIMEOUT=1e3,t.MAX_OPACITY=1,t.MIN_OPACITY=0,t.LIVE_HOLOGRAM_POLL_TIMEOUT=2e3},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=o(["\n 50% {\n color: ","; \n }\n"],["\n 50% {\n color: ","; \n }\n"]),s=o(["\n color: ",";\n animation: ",";\n animation-delay: 0;\n animation-iteration-count: infinite;\n animation-direction: forward;\n animation-duration: 5s;\n padding-right: 0.5em;\n"],["\n color: ",";\n animation: ",";\n animation-delay: 0;\n animation-iteration-count: infinite;\n animation-direction: forward;\n animation-duration: 5s;\n padding-right: 0.5em;\n"]),u=o(["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: #3B3E45;\n backdrop-filter: blur(12px);\n width: 100%;\n padding: 1em;\n cursor: default;\n"],["\n display: flex;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n background: #3B3E45;\n backdrop-filter: blur(12px);\n width: 100%;\n padding: 1em;\n cursor: default;\n"]),l=o(["\n display: flex;\n align-items: center;\n justify-content: stretch;\n height: 24px;\n margin: 0 0 0.5em 0;\n background: transparent;\n width: 100%;\n"],["\n display: flex;\n align-items: center;\n justify-content: stretch;\n height: 24px;\n margin: 0 0 0.5em 0;\n background: transparent;\n width: 100%;\n"]),c=o(["\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: 72px;\n background: transparent;\n flex-grow: 1;\n width: 100%;\n padding: 0 0.25em 3em 0.25em;\n"],["\n display: flex;\n align-items: flex-start;\n justify-content: flex-start;\n height: 72px;\n background: transparent;\n flex-grow: 1;\n width: 100%;\n padding: 0 0.25em 3em 0.25em;\n"]),f=o(["\n font-size: 1.25em;\n text-align: right;\n padding: 0 0 0 0;\n flex-grow: 1;\n height: 100%;\n color: ",";\n"],["\n font-size: 1.25em;\n text-align: right;\n padding: 0 0 0 0;\n flex-grow: 1;\n height: 100%;\n color: ",";\n"]),p=o(["\n cursor: pointer;\n outline: none;\n color: ",";\n margin: 0.33rem 1.25rem 0 0;\n &:hover {\n color: #acacac;\n }\n"],["\n cursor: pointer;\n outline: none;\n color: ",";\n margin: 0.33rem 1.25rem 0 0;\n &:hover {\n color: #acacac;\n }\n"]),d=o(["\n display: flex;\n color: ",";\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n height: 100%;\n font-size: 16px;\n"],["\n display: flex;\n color: ",";\n justify-content: flex-end;\n align-items: center;\n flex-grow: 1;\n height: 100%;\n font-size: 16px;\n"]),h=o(["\n cursor: pointer;\n flex-grow: 1;\n flex-shrink: 0;\n width: 100%;\n border-radius: 2px;\n height: 8px;\n transition: none;\n background: ",";\n "],["\n cursor: pointer;\n flex-grow: 1;\n flex-shrink: 0;\n width: 100%;\n border-radius: 2px;\n height: 8px;\n transition: none;\n background: ",";\n "]),m=n(0),v=r(m),g=n(11),y=r(g),b=n(5),E=n(6),w=n(10),x=n(120),S={IconColorFG:"#fff",ColorGrey:"#1B1C1F",LabelTextColor:"#fff",ProgressBarMargin:8,ProgressBarHeight:18.09,ProgressBarColorBG:"#fff",ProgressBarColorFG:"#DF5C27"},k=(0,g.keyframes)(a,S.ProgressBarColorFG),T=y.default.div(s,S.ColorGrey,k),C=y.default.div(u),O=y.default.div(l),_=y.default.div(c),A=y.default.div(f,S.ColorGrey),R=y.default.a(p,S.IconColorFG),I=y.default.div(d,S.LabelTextColor),M=y.default.canvas(h,S.ColorGrey),P=function(e){var t=(0,b.sharedHub)(),n=(0,m.useState)(!window.liveplayer),r=i(n,2),o=r[0],a=(r[1],(0,m.useState)(t.running)),s=i(a,2),u=s[0],l=s[1],c=(0,m.useRef)(),f=(0,m.useRef)(),p=(0,m.useRef)(0),d=(0,m.useState)(0),h=i(d,2),g=h[0],y=h[1],k=(0,m.useState)((0,b.sharedHub)().globalMute),P=i(k,2),N=P[0],j=P[1],L=(0,m.useState)(!1),D=i(L,2),F=D[0],H=D[1],U=function e(){var t=f.current,n=(0,b.sharedHub)().progress();if(t){var r=t.getContext("2d"),o=t.getBoundingClientRect();t.width=o.width,t.height=o.height;var i=o.width*n;r.fillStyle=""+S.ProgressBarColorFG,r.fillRect(0,0,i,o.height),c.current=requestAnimationFrame(e),p.current=i}};(0,m.useEffect)(function(){var e=function(){var e=f.current;if(e){var t=(0,b.sharedHub)().progress(),n=e.getBoundingClientRect();p.current=n.width*t}};return window.addEventListener("focus",e),t.timerSubject.subscribe(function(e){switch(e){case E.Events.TimerTick:t.running?u||l(!0):u&&l(!1),y(t.deltaTimeSeconds)}}),t.subject.subscribe(function(e){switch(e){case E.Events.Mute:j((0,b.sharedHub)().globalMute);break;case E.Events.TimerTick:case E.Events.ScrubStart:t.running?u||l(!0):u&&l(!1),y(t.deltaTimeSeconds);break;case E.Events.TimerStop:l(!1);break;case E.Events.TimerStart:var n=document.getElementById("play-button");n&&n.parentNode.removeChild(n),H(!0),l(!0);break;case E.Events.TimerPaused:l(t.running)}}),U(),function(){window.removeEventListener("focus",e)}},[]);var z=function(e){var n=f.current;if(n){var r=n.getBoundingClientRect(),o=Math.max(e.clientX-r.left,0),i=o/r.width,a=t.sceneDurationSeconds*i*1e3;t.scrub(a)}},B=(0,x.useDebounce)(function(){F?(0,b.sharedHub)().pause():(0,b.sharedHub)().start()},100),V=(0,x.useDebounce)(function(){(0,b.sharedHub)().reset(),p.current=0},100),G=function(){var e=!N;(0,b.sharedHub)().setMute(e),j(e)},Y=u?"fa fa-lg fa-pause":"fa fa-lg fa-play";return v.default.createElement(C,null,o&&v.default.createElement(O,null,v.default.createElement(M,{onClick:z,ref:f})),v.default.createElement(_,null,v.default.createElement(R,{onClick:B,className:""+Y,title:"Play"}),v.default.createElement(R,{onClick:V,className:"fa fa-lg fa-refresh",title:"Refresh"}),v.default.createElement(R,{onClick:G,className:"fa fa-lg "+(N?"fa-volume-off":"fa-volume-up"),title:"Mute"}),v.default.createElement(A,null,o?v.default.createElement(I,null,(0,w.ts)(g)+"/"+(0,w.ts)((0,b.sharedHub)().sceneDurationSeconds)):v.default.createElement(T,null,"Live"))))};t.default=P},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(t,"__esModule",{value:!0}),t.registerComponent=void 0;var a=function(){function e(e,t){for(var n=0;n=t}),i=Object.keys(this.activeTracks).filter(function(e){return!o.find(function(t){return t.id===e})}),a=Object.keys(this.activeTracks).filter(function(e){return o.find(function(t){return t.id===e})}),s=o.filter(function(e){return!a.find(function(t){return t===e.id})}),console.info("Tracks to remove "+JSON.stringify(i,4)),console.info("Tracks to keep "+JSON.stringify(a,4)),console.info("Tracks to add "+JSON.stringify(s,4)),u=!0,l=!1,c=void 0,e.prev=12,d=i[Symbol.iterator]();!(u=(h=d.next()).done);u=!0)m=h.value,v=this.activeTracks[m],console.info("remove track and asset "+v.id+" "+v.asset),this.removeTrack(v);e.next=20;break;case 16:e.prev=16,e.t0=e.catch(12),l=!0,c=e.t0;case 20:e.prev=20,e.prev=21,!u&&d.return&&d.return();case 23:if(e.prev=23,!l){e.next=26;break}throw c;case 26:return e.finish(23);case 27:return e.finish(20);case 28:for(y=!0,b=!1,E=void 0,e.prev=31,w=a[Symbol.iterator]();!(y=(x=w.next()).done);y=!0)S=x.value,v=this.activeTracks[S],k=t-v.startTime,(0,g.actionSeekTrack)(v,k);e.next=39;break;case 35:e.prev=35,e.t1=e.catch(31),b=!0,E=e.t1;case 39:e.prev=39,e.prev=40,!y&&w.return&&w.return();case 42:if(e.prev=42,!b){e.next=45;break}throw E;case 45:return e.finish(42);case 46:return e.finish(39);case 47:for(T=!0,C=!1,O=void 0,e.prev=50,_=s[Symbol.iterator]();!(T=(A=_.next()).done);T=!0)v=A.value,k=t-v.startTime,console.info("start track "+v.id+" "+v.asset),this.startTrack(v,k);e.next=58;break;case 54:e.prev=54,e.t2=e.catch(50),C=!0,O=e.t2;case 58:e.prev=58,e.prev=59,!T&&_.return&&_.return();case 61:if(e.prev=61,!C){e.next=64;break}throw O;case 64:return e.finish(61);case 65:return e.finish(58);case 66:this.lastSecond=t,(0,f.sharedHub)().finishScrub(),R=function e(t){t>=10||(I.hub.subject.next(p.Events.TimerTick),setTimeout(function(){e(t++)},1e3))},R(0);case 70:case"end":return e.stop()}},e,this,[[12,16,20,28],[21,,23,27],[31,35,39,47],[40,,42,46],[50,54,58,66],[59,,61,65]])}));return e}()},{key:"subscribeEditorEvents",value:function(){var e=this;(0,f.sharedHub)().subject.subscribe(function(t){switch(t.action||t){case p.Events.ScrubStart:var n=t.ts;e.scrubToLocation(n);break;case p.Events.ScrubResolved:break;case p.Events.TimerStop:e.reset(),e.refresh();break;case p.Events.TimerStart:var r=e.activeManifest;e.preloadAssets||e.reset(),e.hub.running||(e.lastSecond=-1),e.activeManifest=(0,h.parseManifest)(r)}})}},{key:"createControls",value:function(){c.default.render(u.default.createElement(v.default,null),document.getElementById("controls"))}},{key:"loadAssets",value:function(){function e(){return t.apply(this,arguments)}var t=o(regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,s,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=this.activeManifest.assets,n=!0,r=!1,o=void 0,e.prev=4,i=Object.keys(t)[Symbol.iterator]();case 6:if(n=(a=i.next()).done){e.next=15;break}return s=a.value,u=t[s],this.activeAssets[s]=!0,e.next=12,(0,h.createAsset)(this.el,u,!1,!1);case 12:n=!0,e.next=6;break;case 15:e.next=21;break;case 17:e.prev=17,e.t0=e.catch(4),r=!0,o=e.t0;case 21:e.prev=21,e.prev=22,!n&&i.return&&i.return();case 24:if(e.prev=24,!r){e.next=27;break}throw o;case 27:return e.finish(24);case 28:return e.finish(21);case 29:case"end":return e.stop()}},e,this,[[4,17,21,29],[22,,24,28]])}));return e}()},{key:"init",value:function(){function e(){return t.apply(this,arguments)}var t=o(regeneratorRuntime.mark(function e(){var t,n,r,o,i;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.data,n=t.editor,r=t.manifestURL,o=t.preload,this.preloadAssets=o,this.editor=n,this.subscribeEditorEvents(),!r){e.next=9;break}return e.next=7,(0,h.fetchManifest)(r);case 7:i=e.sent,this.activeManifest=(0,h.parseManifest)(i);case 9:if(n){e.next=18;break}if(!o){e.next=15;break}return e.next=13,this.loadAssets();case 13:e.next=16;break;case 15:(0,y.loadInitialElements)(this.activeManifest);case 16:h.isSafari&&this.hub.setMute(!0),this.createControls();case 18:n&&this.refresh();case 19:case"end":return e.stop()}},e,this)}));return e}()},{key:"startTrack",value:function(){function e(e){return t.apply(this,arguments)}var t=o(regeneratorRuntime.mark(function e(t){var n,r,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.activeManifest.assets,console.info("loading track "+t.id+" for asset "+t.asset),this.activeTracks[t.id]=t,!this.preloadAssets){e.next=7;break}(0,d.actionStartTrack)(t,o),e.next=13;break;case 7:return console.info("assets"),console.log(""+JSON.stringify(this.activeManifest)),r=n[t.asset],e.next=12,(0,h.createAsset)(this.el,r,!1,!0,o);case 12:this.activeAssets[t.asset]=!0;case 13:case"end":return e.stop()}},e,this)}));return e}()},{key:"removeTrack",value:function(e){console.info("!! Removing "+JSON.stringify(e)),(0,d.actionRemoveAsset)(e.asset,e.id),delete this.activeTracks[e.id]}},{key:"reset",value:function(){var e=!0,t=!1,n=void 0;try{for(var r,o=Object.keys(this.activeAssets)[Symbol.iterator]();!(e=(r=o.next()).done);e=!0){var i=r.value;(0,d.actionRemoveAsset)(i)}}catch(e){t=!0,n=e}finally{try{!e&&o.return&&o.return()}finally{if(t)throw n}}for(;this.el.lastElementChild;)this.el.removeChild(this.el.lastElementChild);this.activeTracks={},this.activeAssets={}}},{key:"updateSceneForTick",value:function(){var e=this.activeManifest,t=this.hub.deltaTimeSeconds;if(!e)return void console.warn("error manifest not found");var n=e.tracks;if(!n)return void console.warn("error no tracks in manifest");if(this.lastSecond!==t){var r=n.filter(function(e){return e.startTime<=t&&e.endTime>=t+1}),o=Object.keys(this.activeTracks).filter(function(e){var t=!0,n=!1,o=void 0;try{for(var i,a=r[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){if(i.value.id===e)return!1}}catch(e){n=!0,o=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw o}}return!0}),i=!0,a=!1,s=void 0;try{for(var u,l=o[Symbol.iterator]();!(i=(u=l.next()).done);i=!0){var c=u.value;console.info("removing track "+c),this.removeTrack(this.activeTracks[c])}}catch(e){a=!0,s=e}finally{try{!i&&l.return&&l.return()}finally{if(a)throw s}}var f=!0,p=!1,d=void 0;try{for(var h,m=r[Symbol.iterator]();!(f=(h=m.next()).done);f=!0){var v=h.value;this.activeTracks[v.id]||this.startTrack(v)}}catch(e){p=!0,d=e}finally{try{!f&&m.return&&m.return()}finally{if(p)throw d}}this.lastSecond=t}}},{key:"tick",value:function(e,t){(0,f.sharedHub)().running&&this.updateSceneForTick()}},{key:"cleanup",value:function(){var e=this.activeManifest.assets,t=!0,n=!1,r=void 0;try{for(var o,i=Object.keys(this.activeAssets)[Symbol.iterator]();!(t=(o=i.next()).done);t=!0){var a=o.value;e[a]||((0,d.actionRemoveAsset)(a),delete this.activeAssets[a])}}catch(e){n=!0,r=e}finally{try{!t&&i.return&&i.return()}finally{if(n)throw r}}}},{key:"refreshForEditing",value:function(){function e(){return t.apply(this,arguments)}var t=o(regeneratorRuntime.mark(function e(){var t,n,r,o,i,a,s,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!0!==this.updating){e.next=2;break}return e.abrupt("return");case 2:if(this.updating=!0,this.data.manifest&&(this.activeManifest=this.data.manifest),t=this.activeManifest.assets){e.next=8;break}return this.updating=!1,e.abrupt("return");case 8:this.cleanup(),n=!0,r=!1,o=void 0,e.prev=12,i=Object.keys(t)[Symbol.iterator]();case 14:if(n=(a=i.next()).done){e.next=25;break}if(s=a.value,!this.activeAssets[s]){e.next=18;break}return e.abrupt("continue",22);case 18:return this.activeAssets[s]=!0,u=t[s],e.next=22,(0,h.createAsset)(this.el,u,this.editor,!1);case 22:n=!0,e.next=14;break;case 25:e.next=31;break;case 27:e.prev=27,e.t0=e.catch(12),r=!0,o=e.t0;case 31:e.prev=31,e.prev=32,!n&&i.return&&i.return();case 34:if(e.prev=34,!r){e.next=37;break}throw o;case 37:return e.finish(34);case 38:return e.finish(31);case 39:this.updating=!1;case 40:case"end":return e.stop()}},e,this,[[12,27,31,39],[32,,34,38]])}));return e}()},{key:"refresh",value:function(){function e(){return t.apply(this,arguments)}var t=o(regeneratorRuntime.mark(function e(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:this.editor&&(this.data.manifest&&(this.activeManifest=this.data.manifest),(0,f.sharedHub)().sceneDurationSeconds=this.data.manifest.duration||(0,f.sharedHub)().sceneDurationSeconds,this.refreshForEditing());case 1:case"end":return e.stop()}},e,this)}));return e}()}]),e}();b.schema={editor:{type:"boolean",default:!1},preload:{type:"boolean",default:!1},manifestURL:{type:"string",default:""},manifest:{parse:JSON.parse,stringify:JSON.stringify,default:"{}"}};t.registerComponent=function(){try{AFRAME.registerComponent("timeline",{schema:b.schema,init:function(){var e=this.data,t=this.el;this.component=new b(e,t),this.component.init(),document.querySelector("a-scene").addEventListener("enter-vr",function(){document.getElementById("camera-rig").setAttribute("position","0 10 15")}),document.querySelector("a-scene").addEventListener("exit-vr",function(){document.getElementById("camera-rig").setAttribute("position","0 0 5")})},tick:function(e,t){try{this.component.tick(e,t)}catch(e){return}},update:function(){this.component.refresh()}})}catch(e){console.warn("error registering timeline "+e)}};window.playTimeline=function(){(0,f.sharedHub)().start()},window.pauseTimeline=function(){(0,f.sharedHub)().pause()},window.seekTimeline=function(e){}},function(e,t,n){"use strict";function r(e){return e.includes(".mpd")}function o(e){return e.includes(".gltf")||e.includes(".glb")}function i(e){return e.includes(".mp4")||e.includes(".webm")}function a(e){return e.includes(".png")||e.includes(".jpg")||e.includes(".jpeg")}function s(e){return e.includes("youtube.com")}function u(e){return c.find(function(t){return t.func(e)})}Object.defineProperty(t,"__esModule",{value:!0}),t.isMPD=r,t.isGLTF=o,t.isVideo=i,t.isImage=a,t.isYoutube=s,t.findAssetType=u;var l=t.AssetTypes={MPD:"mpd",GLTF:"gltf",IMAGE:"image",VIDEO:"video",YOUTUBE:"youtube"},c=[{type:l.MPD,func:r},{type:l.GLTF,func:o},{type:l.YOUTUBE,func:s},{type:l.IMAGE,func:a},{type:l.VIDEO,func:i}]},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===p(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,f.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new l.default({action:this.action(t),target:this.target(t),text:this.text(t),container:this.container,trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return u("action",e)}},{key:"defaultTarget",value:function(e){var t=u("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return u("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}],[{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}]),t}(c.default);e.exports=h})},function(e,t,n){"use strict";function r(e){if(null===e||void 0===e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}/* object-assign (c) Sindre Sorhus @license MIT */ var o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map(function(e){return t[e]}).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach(function(e){r[e]=e}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,t){for(var n,s,u=r(e),l=1;l1)for(var n=1;n=0||(o[n]=e[n]);return o}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function a(){}t.__esModule=!0,t.default=t.EXITING=t.ENTERED=t.ENTERING=t.EXITED=t.UNMOUNTED=void 0;var s=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var r=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(e,n):{};r.get||r.set?Object.defineProperty(t,n,r):t[n]=e[n]}return t.default=e,t}(n(1)),u=r(n(0)),l=r(n(12)),c=n(69),f=(n(72),"unmounted");t.UNMOUNTED=f;var p="exited";t.EXITED=p;var d="entering";t.ENTERING=d;var h="entered";t.ENTERED=h;t.EXITING="exiting";var m=function(e){function t(t,n){var r;r=e.call(this,t,n)||this;var o,i=n.transitionGroup,a=i&&!i.isMounting?t.enter:t.appear;return r.appearStatus=null,t.in?a?(o=p,r.appearStatus=d):o=h:o=t.unmountOnExit||t.mountOnEnter?f:p,r.state={status:o},r.nextCallback=null,r}i(t,e);var n=t.prototype;return n.getChildContext=function(){return{transitionGroup:null}},t.getDerivedStateFromProps=function(e,t){return e.in&&t.status===f?{status:p}:null},n.componentDidMount=function(){this.updateStatus(!0,this.appearStatus)},n.componentDidUpdate=function(e){var t=null;if(e!==this.props){var n=this.state.status;this.props.in?n!==d&&n!==h&&(t=d):n!==d&&n!==h||(t="exiting")}this.updateStatus(!1,t)},n.componentWillUnmount=function(){this.cancelNextCallback()},n.getTimeouts=function(){var e,t,n,r=this.props.timeout;return e=t=n=r,null!=r&&"number"!=typeof r&&(e=r.exit,t=r.enter,n=void 0!==r.appear?r.appear:t),{exit:e,enter:t,appear:n}},n.updateStatus=function(e,t){if(void 0===e&&(e=!1),null!==t){this.cancelNextCallback();var n=l.default.findDOMNode(this);t===d?this.performEnter(n,e):this.performExit(n)}else this.props.unmountOnExit&&this.state.status===p&&this.setState({status:f})},n.performEnter=function(e,t){var n=this,r=this.props.enter,o=this.context.transitionGroup?this.context.transitionGroup.isMounting:t,i=this.getTimeouts(),a=o?i.appear:i.enter;if(!t&&!r)return void this.safeSetState({status:h},function(){n.props.onEntered(e)});this.props.onEnter(e,o),this.safeSetState({status:d},function(){n.props.onEntering(e,o),n.onTransitionEnd(e,a,function(){n.safeSetState({status:h},function(){n.props.onEntered(e,o)})})})},n.performExit=function(e){var t=this,n=this.props.exit,r=this.getTimeouts();if(!n)return void this.safeSetState({status:p},function(){t.props.onExited(e)});this.props.onExit(e),this.safeSetState({status:"exiting"},function(){t.props.onExiting(e),t.onTransitionEnd(e,r.exit,function(){t.safeSetState({status:p},function(){t.props.onExited(e)})})})},n.cancelNextCallback=function(){null!==this.nextCallback&&(this.nextCallback.cancel(),this.nextCallback=null)},n.safeSetState=function(e,t){t=this.setNextCallback(t),this.setState(e,t)},n.setNextCallback=function(e){var t=this,n=!0;return this.nextCallback=function(r){n&&(n=!1,t.nextCallback=null,e(r))},this.nextCallback.cancel=function(){n=!1},this.nextCallback},n.onTransitionEnd=function(e,t,n){this.setNextCallback(n);var r=null==t&&!this.props.addEndListener;if(!e||r)return void setTimeout(this.nextCallback,0);this.props.addEndListener&&this.props.addEndListener(e,this.nextCallback),null!=t&&setTimeout(this.nextCallback,t)},n.render=function(){var e=this.state.status;if(e===f)return null;var t=this.props,n=t.children,r=o(t,["children"]);if(delete r.in,delete r.mountOnEnter,delete r.unmountOnExit,delete r.appear,delete r.enter,delete r.exit,delete r.timeout,delete r.addEndListener,delete r.onEnter,delete r.onEntering,delete r.onEntered,delete r.onExit,delete r.onExiting,delete r.onExited,"function"==typeof n)return n(e,r);var i=u.default.Children.only(n);return u.default.cloneElement(i,r)},t}(u.default.Component);m.contextTypes={transitionGroup:s.object},m.childContextTypes={transitionGroup:function(){}},m.propTypes={},m.defaultProps={in:!1,mountOnEnter:!1,unmountOnExit:!1,appear:!1,enter:!0,exit:!0,onEnter:a,onEntering:a,onEntered:a,onExit:a,onExiting:a,onExited:a},m.UNMOUNTED=0,m.EXITED=1,m.ENTERING=2,m.ENTERED=3,m.EXITING=4;var v=(0,c.polyfill)(m);t.default=v},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}function i(){return i=Object.assign||function(e){for(var t=1;t=0}t.a=r;var o=n(9)},function(e,t,n){"use strict";function r(e){return!!e&&"function"!=typeof e.subscribe&&"function"==typeof e.then}t.a=r},function(e,t,n){"use strict";function r(){}t.a=r},function(e,t,n){"use strict";function r(){for(var e=[],t=0;t=0))throw o(ae,new Error(e.tagName+"@"+n));for(var i=t.length-1;r"==e&&">"||"&"==e&&"&"||'"'==e&&"""||"&#"+e.charCodeAt()+";"}function m(e,t){if(t(e))return!0;if(e=e.firstChild)do{if(m(e,t))return!0}while(e=e.nextSibling)}function v(){}function g(e,t,n){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&(t._nsMap[n.prefix?n.localName:""]=n.value)}function y(e,t,n,r){e&&e._inc++,"http://www.w3.org/2000/xmlns/"==n.namespaceURI&&delete t._nsMap[n.prefix?n.localName:""]}function b(e,t,n){if(e&&e._inc){e._inc++;var r=t.childNodes;if(n)r[r.length++]=n;else{for(var o=t.firstChild,i=0;o;)r[i++]=o,o=o.nextSibling;r.length=i}}}function E(e,t){var n=t.previousSibling,r=t.nextSibling;return n?n.nextSibling=r:e.firstChild=r,r?r.previousSibling=n:e.lastChild=n,b(e.ownerDocument,e),t}function w(e,t,n){var r=t.parentNode;if(r&&r.removeChild(t),t.nodeType===te){var o=t.firstChild;if(null==o)return t;var i=t.lastChild}else o=i=t;var a=n?n.previousSibling:e.lastChild;o.previousSibling=a,i.nextSibling=n,a?a.nextSibling=o:e.firstChild=o,null==n?e.lastChild=i:n.previousSibling=i;do{o.parentNode=e}while(o!==i&&(o=o.nextSibling));return b(e.ownerDocument||e,e),t.nodeType==te&&(t.firstChild=t.lastChild=null),t}function x(e,t){var n=t.parentNode;if(n){var r=e.lastChild;n.removeChild(t);var r=e.lastChild}var r=e.lastChild;return t.parentNode=e,t.previousSibling=r,t.nextSibling=null,r?r.nextSibling=t:e.firstChild=t,e.lastChild=t,b(e.ownerDocument,e,t),t}function S(){this._nsMap={}}function k(){}function T(){}function C(){}function O(){}function _(){}function A(){}function R(){}function I(){}function M(){}function P(){}function N(){}function j(){}function L(e,t){var n=[],r=9==this.nodeType&&this.documentElement||this,o=r.prefix,i=r.namespaceURI;if(i&&null==o){var o=r.lookupPrefix(i);if(null==o)var a=[{namespace:i,prefix:null}]}return F(this,n,e,t,a),n.join("")}function D(e,t,n){var r=e.prefix||"",o=e.namespaceURI;if(!r&&!o)return!1;if("xml"===r&&"http://www.w3.org/XML/1998/namespace"===o||"http://www.w3.org/2000/xmlns/"==o)return!1;for(var i=n.length;i--;){var a=n[i];if(a.prefix==r)return a.namespace!=o}return!0}function F(e,t,n,r,o){if(r){if(!(e=r(e)))return;if("string"==typeof e)return void t.push(e)}switch(e.nodeType){case Y:o||(o=[]);var i=(o.length,e.attributes),a=i.length,s=e.firstChild,u=e.tagName;n=V===e.namespaceURI||n,t.push("<",u);for(var l=0;l"),n&&/^script$/i.test(u))for(;s;)s.data?t.push(s.data):F(s,t,n,r,o),s=s.nextSibling;else for(;s;)F(s,t,n,r,o),s=s.nextSibling;t.push("")}else t.push("/>");return;case J:case te:for(var s=e.firstChild;s;)F(s,t,n,r,o),s=s.nextSibling;return;case W:return t.push(" ",e.name,'="',e.value.replace(/[&"]/g,h),'"');case q:return t.push(e.data.replace(/[<&]/g,h).replace(/]]>/g,"]]>"));case $:return t.push("");case K:return t.push("\x3c!--",e.data,"--\x3e");case ee:var m=e.publicId,v=e.systemId;if(t.push("");else if(v&&"."!=v)t.push(" SYSTEM ",v,">");else{var g=e.internalSubset;g&&t.push(" [",g,"]"),t.push(">")}return;case Z:return t.push("");case X:return t.push("&",e.nodeName,";");default:t.push("??",e.nodeName)}}function H(e,t,n){var r;switch(t.nodeType){case Y:r=t.cloneNode(!1),r.ownerDocument=e;case te:break;case W:n=!0}if(r||(r=t.cloneNode(!1)),r.ownerDocument=e,r.parentNode=null,n)for(var o=t.firstChild;o;)r.appendChild(H(e,o,n)),o=o.nextSibling;return r}function U(e,t,n){var r=new t.constructor;for(var o in t){var a=t[o];"object"!=typeof a&&a!=r[o]&&(r[o]=a)}switch(t.childNodes&&(r.childNodes=new i),r.ownerDocument=e,r.nodeType){case Y:var s=t.attributes,l=r.attributes=new u,c=s.length;l._ownerElement=r;for(var f=0;f0},lookupPrefix:function(e){for(var t=this;t;){var n=t._nsMap;if(n)for(var r in n)if(n[r]==e)return r;t=t.nodeType==W?t.ownerDocument:t.parentNode}return null},lookupNamespaceURI:function(e){for(var t=this;t;){var n=t._nsMap;if(n&&e in n)return n[e];t=t.nodeType==W?t.ownerDocument:t.parentNode}return null},isDefaultNamespace:function(e){return null==this.lookupPrefix(e)}},n(G,d),n(G,d.prototype),v.prototype={nodeName:"#document",nodeType:J,doctype:null,documentElement:null,_inc:1,insertBefore:function(e,t){if(e.nodeType==te){for(var n=e.firstChild;n;){var r=n.nextSibling;this.insertBefore(n,t),n=r}return e}return null==this.documentElement&&e.nodeType==Y&&(this.documentElement=e),w(this,e,t),e.ownerDocument=this,e},removeChild:function(e){return this.documentElement==e&&(this.documentElement=null),E(this,e)},importNode:function(e,t){return H(this,e,t)},getElementById:function(e){var t=null;return m(this.documentElement,function(n){if(n.nodeType==Y&&n.getAttribute("id")==e)return t=n,!0}),t},getElementsByClassName:function(e){var t=new RegExp("(^|\\s)"+e+"(\\s|$)");return new a(this,function(e){var n=[];return m(e.documentElement,function(r){r!==e&&r.nodeType==Y&&t.test(r.getAttribute("class"))&&n.push(r)}),n})},createElement:function(e){var t=new S;return t.ownerDocument=this,t.nodeName=e,t.tagName=e,t.childNodes=new i,(t.attributes=new u)._ownerElement=t,t},createDocumentFragment:function(){var e=new P;return e.ownerDocument=this,e.childNodes=new i,e},createTextNode:function(e){var t=new C;return t.ownerDocument=this,t.appendData(e),t},createComment:function(e){var t=new O;return t.ownerDocument=this,t.appendData(e),t},createCDATASection:function(e){var t=new _;return t.ownerDocument=this,t.appendData(e),t},createProcessingInstruction:function(e,t){var n=new N;return n.ownerDocument=this,n.tagName=n.target=e,n.nodeValue=n.data=t,n},createAttribute:function(e){var t=new k;return t.ownerDocument=this,t.name=e,t.nodeName=e,t.localName=e,t.specified=!0,t},createEntityReference:function(e){var t=new M;return t.ownerDocument=this,t.nodeName=e,t},createElementNS:function(e,t){var n=new S,r=t.split(":"),o=n.attributes=new u;return n.childNodes=new i,n.ownerDocument=this,n.nodeName=t,n.tagName=t,n.namespaceURI=e,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,o._ownerElement=n,n},createAttributeNS:function(e,t){var n=new k,r=t.split(":");return n.ownerDocument=this,n.nodeName=t,n.name=t,n.namespaceURI=e,n.specified=!0,2==r.length?(n.prefix=r[0],n.localName=r[1]):n.localName=t,n}},r(v,d),S.prototype={nodeType:Y,hasAttribute:function(e){return null!=this.getAttributeNode(e)},getAttribute:function(e){var t=this.getAttributeNode(e);return t&&t.value||""},getAttributeNode:function(e){return this.attributes.getNamedItem(e)},setAttribute:function(e,t){var n=this.ownerDocument.createAttribute(e);n.value=n.nodeValue=""+t,this.setAttributeNode(n)},removeAttribute:function(e){var t=this.getAttributeNode(e);t&&this.removeAttributeNode(t)},appendChild:function(e){return e.nodeType===te?this.insertBefore(e,null):x(this,e)},setAttributeNode:function(e){return this.attributes.setNamedItem(e)},setAttributeNodeNS:function(e){return this.attributes.setNamedItemNS(e)},removeAttributeNode:function(e){return this.attributes.removeNamedItem(e.nodeName)},removeAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);n&&this.removeAttributeNode(n)},hasAttributeNS:function(e,t){return null!=this.getAttributeNodeNS(e,t)},getAttributeNS:function(e,t){var n=this.getAttributeNodeNS(e,t);return n&&n.value||""},setAttributeNS:function(e,t,n){var r=this.ownerDocument.createAttributeNS(e,t);r.value=r.nodeValue=""+n,this.setAttributeNode(r)},getAttributeNodeNS:function(e,t){return this.attributes.getNamedItemNS(e,t)},getElementsByTagName:function(e){return new a(this,function(t){var n=[];return m(t,function(r){r===t||r.nodeType!=Y||"*"!==e&&r.tagName!=e||n.push(r)}),n})},getElementsByTagNameNS:function(e,t){return new a(this,function(n){var r=[];return m(n,function(o){o===n||o.nodeType!==Y||"*"!==e&&o.namespaceURI!==e||"*"!==t&&o.localName!=t||r.push(o)}),r})}},v.prototype.getElementsByTagName=S.prototype.getElementsByTagName,v.prototype.getElementsByTagNameNS=S.prototype.getElementsByTagNameNS,r(S,d),k.prototype.nodeType=W,r(k,d),T.prototype={data:"",substringData:function(e,t){return this.data.substring(e,e+t)},appendData:function(e){e=this.data+e,this.nodeValue=this.data=e,this.length=e.length},insertData:function(e,t){this.replaceData(e,0,t)},appendChild:function(e){throw new Error(oe[ie])},deleteData:function(e,t){this.replaceData(e,t,"")},replaceData:function(e,t,n){n=this.data.substring(0,e)+n+this.data.substring(e+t),this.nodeValue=this.data=n,this.length=n.length}},r(T,d),C.prototype={nodeName:"#text",nodeType:q,splitText:function(e){var t=this.data,n=t.substring(e);t=t.substring(0,e),this.data=this.nodeValue=t,this.length=t.length;var r=this.ownerDocument.createTextNode(n);return this.parentNode&&this.parentNode.insertBefore(r,this.nextSibling),r}},r(C,T),O.prototype={nodeName:"#comment",nodeType:K},r(O,T),_.prototype={nodeName:"#cdata-section",nodeType:$},r(_,T),A.prototype.nodeType=ee,r(A,d),R.prototype.nodeType=ne,r(R,d),I.prototype.nodeType=Q,r(I,d),M.prototype.nodeType=X,r(M,d),P.prototype.nodeName="#document-fragment",P.prototype.nodeType=te,r(P,d),N.prototype.nodeType=Z,r(N,d),j.prototype.serializeToString=function(e,t,n){return L.call(e,t,n)},d.prototype.toString=L;try{Object.defineProperty&&(Object.defineProperty(a.prototype,"length",{get:function(){return s(this),this.$$length}}),Object.defineProperty(d.prototype,"textContent",{get:function(){return B(this)},set:function(e){switch(this.nodeType){case Y:case te:for(;this.firstChild;)this.removeChild(this.firstChild);(e||String(e))&&this.appendChild(this.ownerDocument.createTextNode(e));break;default:this.data=e,this.value=e,this.nodeValue=e}}}),z=function(e,t,n){e["$$"+t]=n})}catch(e){}t.Node=d,t.DOMException=o,t.DOMImplementation=p,t.XMLSerializer=j},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(){var e=this;this.assetsLoader=new E,this.exporters={gltf:new THREE.GLTFExporter},this.history=n(134),this.isFirstOpen=!0,this.modules={},this.on=y.on,this.opened=!1;!function t(){return x||AFRAME.components.timeline||(console.info("register timeline"),(0,h.registerComponent)()),AFRAME.scenes.length?(e.sceneEl=AFRAME.scenes[0],e.sceneEl.hasLoaded?void e.init():void e.sceneEl.addEventListener("loaded",e.init.bind(e),{once:!0})):void setTimeout(function(){t()},100)}()}Object.defineProperty(t,"__esModule",{value:!0});var i=(n(6),n(1)),a=(r(i),n(0)),s=r(a),u=n(12),l=r(u),c=n(100),f=r(c),p=n(133),d=(n(17),n(16)),h=(n(138),n(55)),m=n(5),v=n(101),g=r(v),y=n(4),b=n(137),E=n(131),w=n(136);n(231);var x=function(){var e=document.getElementById("scene");return!!e&&"true"===e.getAttribute("editor")}();o.prototype={init:function(){var e=this;if(!this.sceneEl.camera)return void this.sceneEl.addEventListener("camera-set-active",function(){e.init()},{once:!0});this.container=document.querySelector(".a-canvas"),x&&((0,p.initCameras)(this),this.sceneEl.camera.position.set(0,1.6,20)),this.initUI()},initUI:function(){var e=this;if(w.init(this),this.initEvents(),this.selected=null,x){var t=document.createElement("div");t.id="aframeInspector",t.setAttribute("data-aframe-inspector","app"),document.body.appendChild(t),l.default.render(s.default.createElement(f.default,null),t)}this.scene=this.sceneEl.object3D,this.helpers={},this.sceneHelpers=new THREE.Scene,this.sceneHelpers.userData.source="INSPECTOR",this.sceneHelpers.visible=!0,this.inspectorActive=!1,this.viewport=new b(this),y.emit("windowresize"),x&&(this.sceneEl.object3D.traverse(function(t){e.addHelper(t)}),this.scene.add(this.sceneHelpers),this.open())},removeObject:function(e){this.removeHelpers(e),y.emit("objectremove",e)},addHelper:function(){new THREE.SphereBufferGeometry(2,4,2),new THREE.MeshBasicMaterial({color:16711680,visible:!1});if(x)return function(e){var t=void 0;if(e instanceof THREE.Camera)this.cameraHelper=t=new THREE.CameraHelper(e,.1);else if(e instanceof THREE.PointLight)t=new THREE.PointLightHelper(e,1);else if(e instanceof THREE.DirectionalLight)t=new THREE.DirectionalLightHelper(e,1);else if(e instanceof THREE.SpotLight)t=new THREE.SpotLightHelper(e,1);else if(e instanceof THREE.HemisphereLight)t=new THREE.HemisphereLightHelper(e,1);else{if(!(e instanceof THREE.SkinnedMesh))return;t=new THREE.SkeletonHelper(e)}t.visible=!1,this.sceneHelpers.add(t),this.helpers[e.uuid]=t,t.update()}}(),removeHelpers:function(e){var t=this;e.traverse(function(e){var n=t.helpers[e.uuid];n&&(t.sceneHelpers.remove(n),delete t.helpers[e.uuid],y.emit("helperremove",t.helpers[e.uuid]))})},selectEntity:function(e,t){var n=this;if(x&&(this.selectedEntity=e,e?this.select(e.object3D):this.select(null),e&&void 0===t&&y.emit("entityselect",e),e)){for(var r in this.helpers)this.helpers[r].visible=!1;e!==this.sceneEl&&e.object3D&&e.object3D.traverse(function(e){n.helpers[e.uuid]&&(n.helpers[e.uuid].visible=!0)})}},initEvents:function(){var e=this;window.addEventListener("keydown",function(t){73===t.keyCode&&t.ctrlKey&&t.altKey&&e.toggle()}),y.on("entityselect",function(t){e.selectEntity(t,!1)}),y.on("inspectortoggle",function(t){e.inspectorActive=t,e.sceneHelpers.visible=e.inspectorActive}),y.on("entitycreate",function(t){(0,d.createEntity)(t,function(t){e.selectEntity(t)})}),document.addEventListener("child-detached",function(e){var t=e.detail.el;AFRAME.INSPECTOR.removeObject(t.object3D)})},selectById:function(e){if(e===this.camera.id)return void this.select(this.camera);this.select(this.scene.getObjectById(e,!0))},select:function(e){if(e){var t=(0,m.sharedHub)();if(x&&!t.running&&this.selected!==e&&e.el){var n=e.el;n&&"floor"===n.id||(this.selected=e,y.emit("objectselect",e))}}},deselect:function(){this.select(null)},toggle:function(){this.opened?this.close():this.open()},open:function(e){this.opened=!0,y.emit("inspectortoggle",!0),this.sceneEl.hasAttribute("embedded")&&(this.sceneEl.removeAttribute("embedded"),this.sceneEl.setAttribute("aframe-inspector-removed-embedded")),document.body.classList.add("aframe-inspector-opened"),this.sceneEl.resize(),this.sceneEl.pause(),this.sceneEl.exitVR(),w.enable(),this.sceneEl.isPlaying=!0,this.cursor.play(),!e&&this.isFirstOpen&&AFRAME.utils.getUrlParameter("inspector")&&(e=document.getElementById(AFRAME.utils.getUrlParameter("inspector"))),e&&(this.selectEntity(e),y.emit("objectfocus",e.object3D)),this.isFirstOpen=!1},close:function(){this.opened=!1,y.emit("inspectortoggle",!1),this.sceneEl.isPlaying=!1,this.sceneEl.play(),this.cursor.pause(),this.sceneEl.hasAttribute("aframe-inspector-removed-embedded")&&(this.sceneEl.setAttribute("embedded",""),this.sceneEl.removeAttribute("aframe-inspector-removed-embedded")),document.body.classList.remove("aframe-inspector-opened"),this.sceneEl.resize(),w.disable()}};AFRAME.INSPECTOR=new o;t.default=g.default},function(e,t){function n(e){return e&&e.__esModule?e:{default:e}}e.exports=n,e.exports.default=e.exports,e.exports.__esModule=!0},function(e,t,n){"use strict";function r(e){for(var t,n=e.length,r=n^n,o=0;n>=4;)t=255&e.charCodeAt(o)|(255&e.charCodeAt(++o))<<8|(255&e.charCodeAt(++o))<<16|(255&e.charCodeAt(++o))<<24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),t^=t>>>24,t=1540483477*(65535&t)+((1540483477*(t>>>16)&65535)<<16),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)^t,n-=4,++o;switch(n){case 3:r^=(255&e.charCodeAt(o+2))<<16;case 2:r^=(255&e.charCodeAt(o+1))<<8;case 1:r^=255&e.charCodeAt(o),r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16)}return r^=r>>>13,r=1540483477*(65535&r)+((1540483477*(r>>>16)&65535)<<16),r^=r>>>15,(r>>>0).toString(36)}t.a=r},function(e,t,n){"use strict";var r=n(47),o=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,i=n.i(r.a)(function(e){return o.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91});t.a=i},function(e,t,n){"use strict";(function(e){function r(e){for(var t=a(e),n=new Uint8Array(t.length),r=0;r2,component:t[r],entity:e,key:r,name:r})});return l.default.createElement("div",{className:"components"},l.default.createElement(g.default,{entity:e}),l.default.createElement(d.default,{entity:e}),r)}}]),t}(l.default.Component);E.propTypes={entity:f.default.object},t.default=E},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:n=(0,i.findAssetType)(t),e.t0=n.type,e.next=e.t0===i.AssetTypes.MPD?4:e.t0===i.AssetTypes.IMAGE?7:e.t0===i.AssetTypes.VIDEO?7:8;break;case 4:if(!r){e.next=6;break}return e.abrupt("return",{id:(0,a.genId)(t),src:t,duration:r?300:-1,position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1},rotation:{x:0,y:0,z:0},live:r});case 6:return e.abrupt("return",s(t));case 7:return e.abrupt("return",u(t,{x:0,y:2,z:0},{x:4,y:4,z:4}));case 8:return e.abrupt("return",u(t));case 9:case"end":return e.stop()}},e,this)}));return function(t){return e.apply(this,arguments)}}(),n(158)),i=n(56),a=n(10),s=function(){var e=r(regeneratorRuntime.mark(function e(t){var n,r,i,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,e.next=4,fetch(t);case 4:n=e.sent,e.next=10;break;case 7:e.prev=7,e.t0=e.catch(1),console.error("exception received "+e.t0+" ");case 10:if(200===n.status){e.next=12;break}return e.abrupt("return");case 12:return e.next=14,n.text();case 14:return r=e.sent,i=(0,o.parse)(r,{url:t}),s=0===i.duration,e.abrupt("return",{id:(0,a.genId)(t),src:t,duration:s?300:i.duration,position:{x:0,y:0,z:0},scale:{x:1,y:1,z:1},rotation:{x:0,y:0,z:0},live:s});case 18:case"end":return e.stop()}},e,void 0,[[1,7]])}));return function(t){return e.apply(this,arguments)}}(),u=function(){var e=r(regeneratorRuntime.mark(function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{x:0,y:0,z:0},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{x:1,y:1,z:1};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",{id:(0,a.genId)(t),src:t,duration:10,position:n,scale:r,rotation:{x:0,y:0,z:0}});case 1:case"end":return e.stop()}},e,void 0)}));return function(t){return e.apply(this,arguments)}}()},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){function e(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var a,s=e[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}(),a=o(["\n display: flex;\n align-items: center;\n padding: 1em 0 1em 1em;\n"],["\n display: flex;\n align-items: center;\n padding: 1em 0 1em 1em;\n"]),s=o(["\n padding: 0 2em 0 0;\n"],["\n padding: 0 2em 0 0;\n"]),u=o(["\n padding: 0 4em 0 0;\n"],["\n padding: 0 4em 0 0;\n"]),l=o(["\n font-size: 1.25em;\n text-align: right;\n padding: 0 2em 0 0;\n width: 100%;\n"],["\n font-size: 1.25em;\n text-align: right;\n padding: 0 2em 0 0;\n width: 100%;\n"]),c=o(["\n height: 100%;\n font-size: 1.25em;\n margin: 0 0.5rem 0 0;\n padding: 0 1rem 0 1rem;\n"],["\n height: 100%;\n font-size: 1.25em;\n margin: 0 0.5rem 0 0;\n padding: 0 1rem 0 1rem;\n"]),f=n(1),p=r(f),d=n(0),h=r(d),m=n(11),v=r(m),g=n(5),y=n(10),b=v.default.div(a),E=v.default.a(s),w=v.default.div(u),x=v.default.div(l),S=v.default.button(c),k=function(e){var t=e.onAddTrack,n=e.onImport,r=e.onExport,o=e.onPlay,a=e.onPause,s=e.onStop,u=(0,g.sharedHub)(),l=(0,d.useState)(0),c=i(l,2),f=c[0],p=c[1];return(0,d.useEffect)(function(){u.timerSubject.subscribe(function(e){p(u.deltaTimeSeconds)}),u.subject.subscribe(function(e){p(u.deltaTimeSeconds)})},[]),h.default.createElement(b,null,h.default.createElement(E,{onClick:t,className:"fa fa-plus",title:"Add Track"}),h.default.createElement(w,null),h.default.createElement(E,{onClick:o,className:"fa fa-play",title:"Play"}),h.default.createElement(E,{onClick:a,className:"fa fa-pause",title:"Pause"}),h.default.createElement(E,{onClick:s,className:"fa fa-stop",title:"Stop"}),h.default.createElement(S,{onClick:n},"Import"),h.default.createElement(S,{onClick:r},"Export"),h.default.createElement(x,null,(0,y.ts)(f)+"/"+(0,y.ts)(u.sceneDurationSeconds)))};k.propTypes={onAddTrack:p.default.func,onExport:p.default.func,onnImport:p.default.func,onPlay:p.default.func,onPause:p.default.func,onStop:p.default.func},t.default=k},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}Object.defineProperty(t,"__esModule",{value:!0});var i=o(["\n display: flex;\n height: 40px;\n width: 100%;\n overflow: none;\n background: #303238;\n margin-top: 6px;\n border-radius: 6px 0px 0px 6px;\n"],["\n display: flex;\n height: 40px;\n width: 100%;\n overflow: none;\n background: #303238;\n margin-top: 6px;\n border-radius: 6px 0px 0px 6px;\n"]),a=o(["\n height: 40px;\n width: 115px;\n"],["\n height: 40px;\n width: 115px;\n"]),s=o(["\n height: 40px;\n width: 35px;\n"],["\n height: 40px;\n width: 35px;\n"]),u=o(["\n flex-basis: 100%;\n height: 100%;\n"],["\n flex-basis: 100%;\n height: 100%;\n"]),l=o(["\n width: 100%;\n height: 100%;\n"],["\n width: 100%;\n height: 100%;\n"]),c=n(1),f=r(c),p=n(0),d=r(p),h=n(11),m=r(h),v=n(109),g=r(v),y=n(6),b=n(5),E={TrackFGColor:"#DF5C27",TrackBGColor:"#DF5C27",ContainerBGColor:"#DF5C27"},w=m.default.div(i),x=m.default.div(a),S=(m.default.div(s),m.default.div(u)),k=m.default.canvas(l),T=function(e){var t=e.duration,n=e.onRemoveTrack,r=e.onTrackUpdate,o=e.startTime,i=e.track,a=e.trackId,s=(0,p.useRef)(),u=(0,p.useRef)(y.TrackMoveState.None),l=(0,p.useRef)(),c=(0,p.useRef)(),f=(0,p.useRef)({startTime:0,duration:t}),h=1;(0,p.useEffect)(function(){console.info("--- "+o+" for "+a+" "),f.current.startTime=o||0},[o]);var m=function e(){var t=c.current;if(t){var n=t.getContext("2d"),r=T(),o=t.getBoundingClientRect();t.width=o.width,t.height=o.height,h=t.width/(0,b.sharedHub)().sceneDurationSeconds,n.fillStyle=E.TrackFGColor,n.fillRect(r.timeline.x,r.timeline.y,r.timeline.width,r.timeline.height),s.current=requestAnimationFrame(e)}},v=function(){r(Object.assign(f.current,{id:a,endTime:f.current.startTime+f.current.duration}))},T=function(){var e=h*f.current.startTime,t=h*f.current.duration,n=c.current,r={x:e,y:0,width:t,height:n.height};return{timeline:r,left:{x:r.x,y:0,width:8,height:n.height},right:{x:r.x+r.width,y:0,width:8,height:n.height}}},C=function(e,t){var n=c.current,r=n.getBoundingClientRect(),o=e.clientX-r.left;return o>t.x&&o3&&void 0!==arguments[3]&&arguments[3];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(u=(0,y.sharedHub)(),l=null,f(!1),t){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,C.importAsset)(a,d);case 7:if(l=e.sent,c=Object.assign(D.current,i({},l.id,Object.assign(l,{name:s}))),D.current=c,l){e.next=12;break}return e.abrupt("return");case 12:p={id:(0,T.genId)(),asset:l.id,startTime:0,name:l.name,endTime:l.duration,duration:l.duration},u.updateSceneDuration(Math.max(l.duration,u.sceneDurationSeconds)),L.current=[].concat(o(n),[p]),r(L.current),F(),R();case 18:case"end":return e.stop()}},e,void 0)}));return function(t,n,r){return e.apply(this,arguments)}}(),[n]),S=(0,p.useCallback)(function(e){var t=L.current.find(function(t){return t.id===e}),n=L.current.filter(function(t){return e!==t.id});L.current.filter(function(e){return e.asset===t.asset}).length<=1&&delete D.current[t.asset],r(n),F()},[n]);(0,p.useEffect)(function(){L.current=[].concat(o(n))},[n]);var O=function(){var e=a(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:_.default.emit("objectfocus",null),F(),(0,y.sharedHub)().start();case 3:case"end":return e.stop()}},e,void 0)}));return function(){return e.apply(this,arguments)}}(),R=function(){var e=B();(0,M.actionManifestUpdated)(e)},F=function(){if(!(0,y.sharedHub)().running){var e=B();h.current.setAttribute("timeline","editor: true;\n manifest: "+JSON.stringify(e)),(0,M.actionManifestUpdated)(e)}},H=function(){(0,y.sharedHub)().pause()},U=function(){_.default.emit("objectfocus",null),(0,y.sharedHub)().stop()},z=(0,p.useCallback)(function(e){L.current=L.current.map(function(t){return t.id===e.id?Object.assign(t,e):t}),r(L.current),F()},[n]),B=function(){return{assets:Object.keys(D.current).map(function(e){return D.current[e]}),tracks:L.current}},V=function(){var e=a(regeneratorRuntime.mark(function e(){var t;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t=B(),(0,T.saveObject)(t,"scene.json");case 2:case"end":return e.stop()}},e,void 0)}));return function(){return e.apply(this,arguments)}}(),G=function(){var e=a(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:m.current.click();case 1:case"end":return e.stop()}},e,void 0)}));return function(){return e.apply(this,arguments)}}(),Y=function(e){var t=e.target.files;if(!(t.length<1)){var n=t[0],o=new FileReader;o.onload=function(e){try{var t=(0,A.parseManifest)(JSON.parse(e.target.result));L.current=t.tracks,D.current=t.assets,r(L.current),h.current.setAttribute("timeline","editor: true;\n manifest: "+JSON.stringify(t))}catch(e){console.warn("could not parse manifest "+e)}},o.readAsText(n)}};return d.default.createElement(p.Fragment,null,d.default.createElement(P,null,d.default.createElement("h3",null," Timeline "),d.default.createElement(g.default,{onAddTrack:b,onExport:V,onImport:G,onPlay:O,onPause:H,onStop:U}),d.default.createElement("div",null,d.default.createElement(k.default,null,n.map(function(e){return d.default.createElement(E.default,{duration:e.duration,key:e.id,track:e,trackId:e.id,startTime:e.startTime,onRemoveTrack:S,onTrackUpdate:z})})))),d.default.createElement(N,{open:c},d.default.createElement(x.default,{onDialogComplete:w})),d.default.createElement(j,{onChange:Y,ref:m,type:"file"}))};t.default=F},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}function o(e){if(e.material&&(e.material.color=new THREE.Color(16777215),e.material.emissive=new THREE.Color(2500134),e.material.flatShade=!0),e.children){var t=!0,n=!1,r=void 0;try{for(var i,a=e.children[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var s=i.value;s.children&&o(s)}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}}Object.defineProperty(t,"__esModule",{value:!0}),t.createGLTFModel=void 0;var i=(t.createGLTFModel=function(){var e=r(regeneratorRuntime.mark(function e(t,n){var l,c,f,p,d,h,m,v,g,y,b,E=this,w=arguments.length>2&&void 0!==arguments[2]&&arguments[2],x=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return l=n.position,c=n.rotation,f=n.scale,p=n.id,d=n.src,h=(0,i.sharedHub)(),m=document.createElement("a-entity"),v=w?.5:.05,g=w?1:.25,y=0===h.deltaTimeSeconds,m.setAttribute("id",p),m.setAttribute("unlit",!0),m.setAttribute("asset-id",p),m.setAttribute("position",l),m.setAttribute("rotation",c),m.setAttribute("scale",f),m.setAttribute("visible",y),m.setAttribute("opacity",y?1:g),m.setAttribute("shadow","receive: false; cast: true"),m.setAttribute("gltf-model",d),b=h.subject.subscribe(function(){var e=r(regeneratorRuntime.mark(function e(t){var r,o,i,s;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t===a.Events.TimerStart&&m.setAttribute("visible",!1),t===a.Events.TimerStop&&m.setAttribute("visible",!0),r=t.action,o=t.targetAsset,o===n.id){e.next=5;break}return e.abrupt("return");case 5:if(r!==a.Events.AssetRemove){e.next=13;break}if(i=m.object3DMap){e.next=9;break}return e.abrupt("return");case 9:if(s=m.getObject3D("mesh")){e.next=12;break}return e.abrupt("return");case 12:(0,u.fadeOut)(s,.25).then(function(){m&&(m.setAttribute("visible",!1),b.unsubscribe(),m.parentNode&&m.parentNode.removeChild(m))});case 13:r===a.Events.TrackStart&&m.setAttribute("visible",!0),r===a.Events.TrackStop&&m.setAttribute("visible",!1);case 15:case"end":return e.stop()}},e,E)}));return function(t){return e.apply(this,arguments)}}()),(x||w)&&m.setAttribute("visible",!0),t.appendChild(m),m.addEventListener("animationcomplete",function(){m.setAttribute("visible",!1)}),m.addEventListener("model-loaded",function(){var e=(m.object3DMap,m.object3D,m.getObject3D("mesh"));(0,s.assetLoaded)(n),o(e),"Tank"!==n.name||w||m.setAttribute("animation","property: position; to: 50 "+l.y+" "+l.z+"; dur: 12000; easing: linear; loop: false"),y||(0,u.fadeIn)(e,v)}),e.abrupt("return",m);case 22:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),n(5)),a=n(6),s=n(15),u=n(53)},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}function o(e,t,n){var r=(arguments.length>3&&void 0!==arguments[3]&&arguments[3],e.action||e);if(e.targetAsset&&e.targetAsset!==n.id)return!0;var o=c[t];if(!o)return!1;var i=o.components.hologram;switch(r){case s.Events.TimerPaused:n.live?(0,a.sharedHub)().running?i.play():i.pause():i.paused?i.play():i.pause();break;case s.Events.TimerTick:(0,a.sharedHub)().running&&i.paused&&!n.live&&i.play();break;case s.Events.TimerStop:n.live||i.seek(0),i.pause(),o.setAttribute("visible",!0);break;case s.Events.TimerStart:o.setAttribute("visible",!1);break;case s.Events.Mute:o.setAttribute("hologram",{muted:(0,a.sharedHub)().globalMute});break;case s.Events.AssetRemove:if(e.targetAsset!==n.id)break;var u=o.getObject3D("mesh");return(0,l.fadeOut)(u,.25).then(function(){return!!o&&(!!o.parentNode&&(delete c[n.id],o.setAttribute("visible",!1),void o.parentNode.removeChild(o)))}).catch(function(e){o.setAttribute("visible",!1),o.parentNode.removeChild(o)}),!1;case s.Events.TrackStart:n.live||hologram.seek(0),hologram.setAttribute("visible",!0);break;case s.Events.TrackStop:n.live||(hologram.seek(0),i.pause()),hologram.setAttribute("visible",!1);break;case s.Events.TrackSeek:var f=document.getElementById(n.id),p=f.components.hologram,d=e.time;n.live||p.seek(d)}return!0}Object.defineProperty(t,"__esModule",{value:!0}),t.playHologram=t.createHologram=void 0;var i=(t.createHologram=function(){var e=r(regeneratorRuntime.mark(function e(t,n){var o,u,c,f,p,d,h,m,v,g,y,b,E=arguments.length>2&&void 0!==arguments[2]&&arguments[2],w=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],x=this,S=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,k=arguments.length>5&&void 0!==arguments[5]?arguments[5]:{};return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=n.position,u=n.rotation,c=n.scale,f=n.id,p=n.src,d=(0,a.sharedHub)(),n.live){e.next=4;break}return e.abrupt("return",i(t,n,E,w,S,k));case 4:return h=function(){var e=r(regeneratorRuntime.mark(function e(t){var n;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=null,e.prev=1,console.info("checking "+t.src),e.next=5,fetch(t.src);case 5:n=e.sent,e.next=11;break;case 8:return e.prev=8,e.t0=e.catch(1),e.abrupt("return",!1);case 11:if(200!==n.status){e.next=13;break}return e.abrupt("return",!0);case 13:return e.abrupt("return",!1);case 14:case"end":return e.stop()}},e,x,[[1,8]])}));return function(t){return e.apply(this,arguments)}}(),e.next=7,h(n);case 7:if(!(m=e.sent)){e.next=10;break}return e.abrupt("return",i(t,n,E,w,S,k));case 10:return v=document.createElement("a-entity"),g=E?.5:.05,v.setAttribute("position",o),v.setAttribute("rotation",u),v.setAttribute("scale",c),v.setAttribute("visible",!0),v.setAttribute("opacity","0.75"),v.setAttribute("shadow","receive: false; cast: false"),v.setAttribute("geometry","primitive: cylinder"),v.setAttribute("material","shader: flat; color: blue; opacity: 0.5; side: double; transparent: true"),v.setAttribute("animation","property: material.opacity; to: 0.1; dur: 1000; dir: alternate; easing: linear; loop: true"),t.appendChild(v),y=d.subject.subscribe(function(e){switch(e){case s.Events.TimerStop:v.setAttribute("visible",!0);break;case s.Events.TimerStart:v.setAttribute("visible",!1);break;default:var t=e.action;if(e.targetAsset!==n.id)break;switch(t){case s.Events.AssetRemove:v.parentNode.removeChild(v),y.unsubscribe();break;case s.Events.TrackStart:v.setAttribute("visible",!0);break;case s.Events.TrackStop:v.setAttribute("visible",!1)}}}),b=function(){var e=r(regeneratorRuntime.mark(function e(){var r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,h(n);case 2:if(r=e.sent){e.next=6;break}return setTimeout(function(){b()},l.LIVE_HOLOGRAM_POLL_TIMEOUT),e.abrupt("return");case 6:return y.unsubscribe(),v.parentNode.removeChild(v),v=null,e.abrupt("return",i(t,n,E,w,S,k));case 10:case"end":return e.stop()}},e,x)}));return function(){return e.apply(this,arguments)}}(),E||b(),e.abrupt("return");case 26:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}(),t.playHologram=function(){var e=r(regeneratorRuntime.mark(function e(t,n){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise(function(e,f){var p=n.position,d=n.rotation,h=n.scale,m=n.id,v=n.src,g=(0,a.sharedHub)(),y=r?.5:.08,b=!!n.muted,E=!!n.loop,w=!!g.globalMute||b,x=r||n.live?1:.25,S=document.createElement("a-entity");S.setAttribute("id",m),S.setAttribute("asset-id",m),S.setAttribute("position",p),S.setAttribute("rotation",d),S.setAttribute("scale",h),S.setAttribute("visible",!0),S.setAttribute("shadow","cast: true; receive: false"),S.setAttribute("hologram","src: "+v+"; muted: "+w+"; loop: "+E+"; autoplay: "+(!!n.live||i)+"; fps: {fps}"),c[m]=S,t.appendChild(S);var k=g.subject.subscribe(function(e){o(e,m,n)||k.unsubscribe()}),T=S.components.hologram;(i||n.live)&&T.play();var C=function t(o){S.removeEventListener("oncanplay",t);var i=S.components.hologram,a=S.getObject3D("mesh");n.live||(i.seek(s),(0,l.setOpacity)(a,x)),n.live||(0,l.fadeIn)(a,y),r&&(n.live||i.pause()),(0,u.assetLoaded)(n),e(S)};S.addEventListener("oncanplay",C)}));case 1:case"end":return e.stop()}},e,this)}));return function(t,n){return e.apply(this,arguments)}}()),a=n(5),s=n(6),u=n(15),l=n(53),c={}},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0}),t.createImage=void 0;var o=(t.createImage=function(){var e=r(regeneratorRuntime.mark(function e(t,n,u){var l,c,f,p,d,h,m,v,g,y,b=this,E=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:l=u.position,c=u.rotation,f=u.scale,p=u.id,d=u.src,h=(0,i.sharedHub)(),m=document.createElement("a-entity"),v=E?.5:.05,m.setAttribute("id",t),m.setAttribute("asset-id",p),m.setAttribute("position",l),m.setAttribute("rotation",c),m.setAttribute("scale",f),m.setAttribute("visible",!0),m.setAttribute("opacity","0.1"),m.setAttribute("shadow","receive: false; cast: false"),m.setAttribute("geometry","primitive: plane"),m.setAttribute("material","shader: flat; src: "+d+"; side: double; transparent: true"),g=h.subject.subscribe(function(){var e=r(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t===o.Events.TimerStart&&m.setAttribute("visible",!1),t===o.Events.TimerStop&&m.setAttribute("visible",!0),n=t.action,r=t.targetAsset,r===u.id){e.next=5;break}return e.abrupt("return");case 5:if(n!==o.Events.AssetRemove){e.next=11;break}if(m.setAttribute("visible",!1),g.unsubscribe(),m.parentNode){e.next=10;break}return e.abrupt("return");case 10:m.parentNode.removeChild(m);case 11:n===o.Events.TrackStart&&m.setAttribute("visible",!0),n===o.Events.TrackStop&&m.setAttribute("visible",!1);case 13:case"end":return e.stop()}},e,b)}));return function(t){return e.apply(this,arguments)}}()),n.appendChild(m),y=function e(){var t=m.sceneEl.renderer,n=m.object3D;if(m.object3D.length<=0)return void setTimeout(e,s);var r=!0,o=!1,i=void 0;try{for(var l,c=n.children[Symbol.iterator]();!(r=(l=c.next()).done);r=!0){var f=l.value,p=f.material,d=p.map;if(!d)return void setTimeout(e,s);d.anisotropy=t.capabilities.getMaxAnisotropy(),d.needsUpdate=!0,(0,a.assetLoaded)(u)}}catch(e){o=!0,i=e}finally{try{!r&&c.return&&c.return()}finally{if(o)throw i}}},setTimeout(y,s);case 18:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),n(6)),i=n(5),a=n(15),s=500},function(e,t,n){"use strict";function r(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}function o(e,t,n,r,o){switch(t){case a.Events.AssetRemove:r.setAttribute("visible",!1),r.parentNode&&r.parentNode.removeChild(r),o.removeAttribute("src"),n.unsubscribe();break;case a.Events.TrackStart:o.currentTime=0,o.play(),r.setAttribute("visible",!0);break;case a.Events.TrackStop:o.pause(),hologram.setAttribute("visible",!1);break;case a.Events.TrackSeek:var i=e.time;o.currentTime=i}}function i(e,t,n){var i=this,l=(0,s.sharedHub)(),c=l.subject.subscribe(function(){var l=r(regeneratorRuntime.mark(function r(l){var f,p;return regeneratorRuntime.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:l===a.Events.TimerStart&&t.setAttribute("visible",!1),l===a.Events.TimerStop&&(n.currentTime=0,setTimeout(function(){n.pause()},u),t.setAttribute("visible",!0)),l===a.Events.TimerPaused&&((0,s.sharedHub)().running?(n.paused&&n.pause(),n.currentTime=(0,s.sharedHub)().deltaTimeSeconds):n.pause()),f=l.action,p=l.targetAsset,p===e.id&&o(l,f,c,t,n);case 5:case"end":return r.stop()}},r,i)}));return function(e){return l.apply(this,arguments)}}())}Object.defineProperty(t,"__esModule",{value:!0}),t.createVideo=void 0;var a=(t.createVideo=function(){var e=r(regeneratorRuntime.mark(function e(t,n,r){var o,a,s,l,c,f,p,d,h,m=arguments.length>3&&void 0!==arguments[3]&&arguments[3],v=!(arguments.length>4&&void 0!==arguments[4])||arguments[4];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=r.position,a=r.rotation,s=r.scale,l=r.id,c=r.src,f=document.createElement("a-entity"),n.appendChild(f),p=m?.5:.05,d=document.createElement,h=function(e){if("video"===e){var t=d(e);document.createElement=d,t.muted=!0,t.loop=!0,t.addEventListener("play",function(e){console.info("The Boolean paused property is now false. Either the play() method was called or the autoplay attribute was toggled.")}),t.addEventListener("canplay",function(e){v&&t.play()}),t.addEventListener("pause",function(e){console.info("pause")}),t.addEventListener("playing",function(e){});var n=function(){t.paying?t.pause():t.play()};return m&&(v||m||setTimeout(n,u)),i(r,f,t),t}return d(e)},document.createElement=h,f.setAttribute("id",t),f.setAttribute("asset-id",l),f.setAttribute("position",o),f.setAttribute("rotation",a),f.setAttribute("scale",s),f.setAttribute("visible",!0),f.setAttribute("opacity","0.1"),f.setAttribute("shadow","receive: false; cast: false"),f.setAttribute("geometry","primitive: plane"),f.setAttribute("material","shader: flat; src: "+r.src+"; side: double; transparent: true;");case 17:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),n(6)),s=n(5),u=1e3},function(e,t,n){"use strict";function r(e,t){return Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}function o(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,n){function r(o,i){try{var a=t[o](i),s=a.value}catch(e){return void n(e)}if(!a.done)return Promise.resolve(s).then(function(e){r("next",e)},function(e){r("throw",e)});e(s)}return r("next")})}}Object.defineProperty(t,"__esModule",{value:!0});var i=function(){var e=o(regeneratorRuntime.mark(function e(t,n,r){var o;arguments.length>3&&void 0!==arguments[3]&&arguments[3];return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=""(s)(a);case 1:case"end":return e.stop()}},e,this)}));return function(t,n,r){return e.apply(this,arguments)}}(),a=r([""],[""]),s=r(['\n\t\n\t'],['\n\t\n\t']);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.useDebounce=void 0;var r=n(0);t.useDebounce=function(e,t){var n=(0,r.useRef)(),o=(0,r.useRef)();return(0,r.useEffect)(function(){n.current=e},[e]),function(){o.current&&clearTimeout(o.current),o.current=setTimeout(function(){n.current()},t)}}},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){console.info("starting the load!")}function i(){}Object.defineProperty(t,"__esModule",{value:!0}),t.loadInitialElements=o,t.loadComplete=i;var a=n(0),s=(r(a),n(12)),u=(r(s),n(5),n(6),n(36),n(10),n(37),n(54));r(u),n(15)},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&void 0!==arguments[1]&&arguments[1],n=e.split("/").pop();return t&&(n=l(n)),n}function u(e){return/^[A-Za-z]+[\w\-]*$/.test(e)}function l(e){return e.split(".").shift().replace(/\s/,"-").replace(/^\d+\s*/,"").replace(/[\W]/,"").toLowerCase()}Object.defineProperty(t,"__esModule",{value:!0});var c=function(){function e(e,t){for(var n=0;n-1||e.name.toUpperCase().indexOf(n)>-1||e.tags.indexOf(n)>-1}).map(function(e){var n=t.bind(this,e);return h.default.createElement("li",{key:e.src,onClick:n},h.default.createElement("img",{width:"155px",height:"155px",src:e.src}),h.default.createElement("div",{className:"detail"},h.default.createElement("span",{className:"title"},e.name),h.default.createElement("span",null,s(e.src)),h.default.createElement("span",null,e.width," x ",e.height)))})}},{key:"render",value:function(){var e=this.state.isOpen,t=this.state.loadedTextures,n=this.state.preview,r=u(this.state.preview.name),o=this.isValidAsset(),i=this.state.addNewDialogOpened?"BACK":"LOAD TEXTURE";return h.default.createElement(y.default,{id:"textureModal",title:"Textures",isOpen:e,onClose:this.onClose,closeOnClickOutside:!1},h.default.createElement("button",{onClick:this.toggleNewDialog},i),h.default.createElement("div",{className:this.state.addNewDialogOpened?"":"hide"},h.default.createElement("div",{className:"newimage"},h.default.createElement("div",{className:"new_asset_options"},h.default.createElement("span",null,"Load a new texture from one of these sources:"),h.default.createElement("ul",null,h.default.createElement("li",null,h.default.createElement("span",null,"From URL (and press Enter):")," ",h.default.createElement("input",{type:"text",className:"imageUrl",value:this.state.newUrl,onChange:this.onUrlChange,onKeyUp:this.onNewUrl})),h.default.createElement("li",null,h.default.createElement("span",null,"From assets registry: "),h.default.createElement("div",{className:"assets search"},h.default.createElement("input",{placeholder:"Filter...",value:this.state.filterText,onChange:this.onChangeFilter}),h.default.createElement("span",{className:"fa fa-search"})),h.default.createElement("ul",{ref:"registryGallery",className:"gallery"},this.renderRegistryImages())))),h.default.createElement("div",{className:"preview"},"Name:"," ",h.default.createElement("input",{ref:"imageName",className:this.state.preview.name.length>0&&!r?"error":"",type:"text",value:this.state.preview.name,onChange:this.onNameChanged,onKeyUp:this.onNameKeyUp}),h.default.createElement("img",{ref:"preview",width:"155px",height:"155px",src:n.src}),this.state.preview.loaded?h.default.createElement("div",{className:"detail"},h.default.createElement("span",{className:"title",title:n.filename},n.filename),h.default.createElement("br",null),h.default.createElement("span",null,n.width," x ",n.height)):h.default.createElement("span",null),h.default.createElement("br",null),h.default.createElement("button",{disabled:!o,onClick:this.addNewAsset},"LOAD THIS TEXTURE")))),h.default.createElement("div",{className:this.state.addNewDialogOpened?"hide":""},h.default.createElement("ul",{className:"gallery"},this.state.assetsImages.sort(function(e,t){return e.id>t.id}).map(function(e){var t=this.selectTexture.bind(this,e),n=this.props.selectedTexture==="#"+e.id?"selected":"";return h.default.createElement("li",{key:e.id,onClick:t,className:n},h.default.createElement("img",{width:"155px",height:"155px",src:e.src}),h.default.createElement("div",{className:"detail"},h.default.createElement("span",{className:"title"},e.name),h.default.createElement("span",null,s(e.src)),h.default.createElement("span",null,e.width," x ",e.height)))}.bind(this)),t.map(function(e){var t=e.image,n=this.selectTexture.bind(this,e);return h.default.createElement("li",{key:e.uuid,onClick:n},h.default.createElement("img",{width:"155px",height:"155px",src:t.src}),h.default.createElement("div",{className:"detail"},h.default.createElement("span",{className:"title"},"Name:")," ",h.default.createElement("span",null,t.name),h.default.createElement("span",{className:"title"},"Filename:")," ",h.default.createElement("span",null,s(t.src)),h.default.createElement("span",null,t.width," x ",t.height)))}))))}}]),t}(h.default.Component);E.propTypes={isOpen:v.default.bool,onClose:v.default.func,selectedTexture:v.default.string},t.default=E},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e){return p.filter(function(t){return t.value===e})[0]}Object.defineProperty(t,"__esModule",{value:!0});var s=function(){function e(e,t){for(var n=0;n1&&document.querySelector(e)&&document.querySelector(e).getAttribute("src")}function u(e){if(e){var t=e.toString().match(/.*\/(.+?)\./);if(t&&t.length>1)return t[1]}return""}function l(e,t,n){var r=null;switch(e){case"img":r=document.createElement("img"),r.id=t,r.src=n}r&&document.getElementsByTagName("a-assets")[0].appendChild(r)}function c(e){var t=u(e),n=document.querySelector("a-assets > img[src='"+e+"']");if(n)t=n.id;else{if(isNaN(parseInt(t[0],10))||(t="i"+t),document.getElementById(t)){for(var r=1;document.getElementById(t+"_"+r);)r++;t+="_"+r}l("img",t,e)}return t}Object.defineProperty(t,"__esModule",{value:!0});var f=function(){function e(e,t){for(var n=0;n0){o.title=t;var n=o.width/e.width;i.drawImage(e,0,0,e.width*n,e.height*n)}else i.clearRect(0,0,o.width,o.height)}function n(e){t(e.image)}var r,o=this.refs.canvas,i=o.getContext("2d"),a="#"===e[0],u=e instanceof HTMLImageElement;r=u?e.src:a?s(e):AFRAME.utils.srcLoader.parseUrl(e);var l=function(e){for(var t in AFRAME.INSPECTOR.sceneEl.systems.material.textureCache)if(JSON.parse(t).src===e)return AFRAME.INSPECTOR.sceneEl.systems.material.textureCache[t];return null}(e),c=null;if(c=u||a?"asset":"url",l)l.then(n);else if(r){var f=new Image;f.addEventListener("load",function(){t(f)},!1),f.src=r}else i.clearRect(0,0,o.width,o.height);this.setState({value:u?"#"+e.id:e,valueType:c,url:r})}},{key:"render",value:function(){var e="";return this.state.value&&(e="asset"===this.state.valueType?"Asset ID: "+this.state.value+"\nURL: "+this.state.url:"URL: "+this.state.value),d.default.createElement("span",{className:"texture"},d.default.createElement("input",{className:"map_value string",type:"text",title:e,value:this.state.value,onChange:this.onChange}),d.default.createElement("canvas",{ref:"canvas",width:"32",height:"16",title:e,onClick:this.openDialog}))}}]),t}(d.default.Component);g.propTypes={componentname:m.default.string,entity:m.default.object,mapName:m.default.string,name:m.default.string.isRequired,onChange:m.default.func,value:m.default.oneOfType([m.default.object,m.default.string])},g.defaultProps={value:"",mapName:"nomap",dataURL:""},t.default=g},function(e,t,n){"use strict";e.exports={BooleanWidget:n(58).default,ColorWidget:n(59).default,InputWidget:n(60).default,NumberWidget:n(22).default,SelectWidget:n(61).default,TextureWidget:n(127).default,Vec4Widget:n(64).default,Vec3Widget:n(63).default,Vec2Widget:n(62).default}},function(e,t,n){"use strict";var r=n(23),o=function(e){return e&&e.__esModule?e:{default:e}}(r);THREE.Box3.prototype.expandByObject=function(){function e(e){var i=e.geometry;if(void 0!==i)if(i.isGeometry){var a=i.vertices;for(n=0,r=a.length;n0?1:-1))}function s(e){e.preventDefault()}function u(e){if(!1!==f.enabled){switch(e.touches.length){case 1:T[0].set(e.touches[0].pageX,e.touches[0].pageY,0),T[1].set(e.touches[0].pageX,e.touches[0].pageY,0);break;case 2:T[0].set(e.touches[0].pageX,e.touches[0].pageY,0),T[1].set(e.touches[1].pageX,e.touches[1].pageY,0),O=T[0].distanceTo(T[1])}C[0].copy(T[0]),C[1].copy(T[1])}}function l(e){function t(e,t){var n=t[0];for(var r in t)n.distanceTo(e)>t[r].distanceTo(e)&&(n=t[r]);return n}if(!1!==f.enabled){switch(e.preventDefault(),e.stopPropagation(),e.touches.length){case 1:T[0].set(e.touches[0].pageX,e.touches[0].pageY,0),T[1].set(e.touches[0].pageX,e.touches[0].pageY,0),f.rotate(T[0].sub(t(T[0],C)).multiplyScalar(-f.rotationSpeed));break;case 2:T[0].set(e.touches[0].pageX,e.touches[0].pageY,0),T[1].set(e.touches[1].pageX,e.touches[1].pageY,0);var n=T[0].distanceTo(T[1]);f.zoom(d.set(0,0,O-n)),O=n;var r=T[0].clone().sub(t(T[0],C)),o=T[1].clone().sub(t(T[1],C));r.x=-r.x,o.x=-o.x,f.pan(r.add(o).multiplyScalar(.5))}C[0].copy(T[0]),C[1].copy(T[1])}}t=void 0!==t?t:document,this.enabled=!0,this.center=new THREE.Vector3,this.panSpeed=.001,this.zoomSpeed=.1,this.rotationSpeed=.005;var c=e,f=this,p=new THREE.Vector3,d=new THREE.Vector3,h=new THREE.Box3,m={NONE:-1,ROTATE:0,ZOOM:1,PAN:2},v=m.NONE,g=this.center,y=new THREE.Matrix3,b=new THREE.Vector2,E=new THREE.Vector2,w=new THREE.Spherical,x=new THREE.Sphere;this.isOrthographic=!1,this.rotationEnabled=!0,this.setCamera=function(e){(c=e)&&("OrthographicCamera"===c.type?(this.rotationEnabled=!1,this.isOrthographic=!0):(this.rotationEnabled=!0,this.isOrthographic=!1))},this.setCamera(e);var S={type:"change"};this.dispatchChange=(0,o.default)(function(){f.dispatchEvent(S)},100),this.focus=function(e){var t;h.setFromObject(e),!1!==h.isEmpty()||isNaN(h.min.x)?(g.setFromMatrixPosition(e.matrixWorld),t=.1):(h.getCenter(g),t=h.getBoundingSphere(x).radius),c&&(c.position.copy(e.localToWorld(new THREE.Vector3(0,0,2*t))),c.lookAt(e.getWorldPosition(new THREE.Vector3)),f.dispatchEvent(S))},this.pan=function(e){if(c){var t;t=this.isOrthographic?Math.abs(c.right):c.position.distanceTo(g),e.multiplyScalar(t*f.panSpeed),e.applyMatrix3(y.getNormalMatrix(c.matrix)),c.position.add(e),g.add(e),f.dispatchChange()}};var k=1;this.setAspectRatio=function(e){k=e},this.zoom=function(e){if(c){var t=c.position.distanceTo(g);if(e.multiplyScalar(t*f.zoomSpeed),!(e.length()>t)){if(e.applyMatrix3(y.getNormalMatrix(c.matrix)),this.isOrthographic){var n=1;if(e.x+e.y+e.z<0&&(n=-1),e=t*f.zoomSpeed*n,c.left-=e*k,c.bottom-=e,c.right+=e*k,c.top+=e,c.left>=-1e-4)return;c.updateProjectionMatrix()}else c.position.add(e);f.dispatchChange()}}},this.rotate=function(e){this.rotationEnabled&&c&&(p.copy(c.position).sub(g),w.setFromVector3(p),w.theta+=e.x,w.phi+=e.y,w.makeSafe(),p.setFromSpherical(w),c.position.copy(g).add(p),c.lookAt(g),f.dispatchChange())},this.dispose=function(){t.removeEventListener("contextmenu",s,!1),t.removeEventListener("mousedown",n,!1),t.removeEventListener("wheel",a,!1),t.removeEventListener("mousemove",r,!1),t.removeEventListener("mouseup",i,!1),t.removeEventListener("mouseout",i,!1),t.removeEventListener("dblclick",i,!1),t.removeEventListener("touchstart",u,!1),t.removeEventListener("touchmove",l,!1)},t.addEventListener("contextmenu",s,!1),t.addEventListener("mousedown",n,!1),t.addEventListener("wheel",a,!1);var T=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],C=[new THREE.Vector3,new THREE.Vector3,new THREE.Vector3],O=null;t.addEventListener("touchstart",u,!1),t.addEventListener("touchmove",l,!1)},THREE.EditorControls.prototype=Object.create(THREE.EventDispatcher.prototype),THREE.EditorControls.prototype.constructor=THREE.EditorControls},function(e,t,n){"use strict";!function(){var e=function(e){THREE.MeshBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.fog=!1,this.side=THREE.FrontSide,this.transparent=!0,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};e.prototype=Object.create(THREE.MeshBasicMaterial.prototype),e.prototype.constructor=e;var t=function(e){THREE.LineBasicMaterial.call(this),this.depthTest=!1,this.depthWrite=!1,this.fog=!1,this.transparent=!0,this.linewidth=1,this.setValues(e),this.oldColor=this.color.clone(),this.oldOpacity=this.opacity,this.highlight=function(e){e?(this.color.setRGB(1,1,0),this.opacity=1):(this.color.copy(this.oldColor),this.opacity=this.oldOpacity)}};t.prototype=Object.create(THREE.LineBasicMaterial.prototype),t.prototype.constructor=t;var n=new e({visible:!1,transparent:!1});THREE.TransformGizmo=function(){this.init=function(){THREE.Object3D.call(this),this.handles=new THREE.Object3D,this.pickers=new THREE.Object3D,this.planes=new THREE.Object3D,this.add(this.handles),this.add(this.pickers),this.add(this.planes);var e=new THREE.PlaneBufferGeometry(50,50,2,2),t=new THREE.MeshBasicMaterial({visible:!1,side:THREE.DoubleSide}),n={XY:new THREE.Mesh(e,t),YZ:new THREE.Mesh(e,t),XZ:new THREE.Mesh(e,t),XYZE:new THREE.Mesh(e,t)};this.activePlane=n.XYZE,n.YZ.rotation.set(0,Math.PI/2,0),n.XZ.rotation.set(-Math.PI/2,0,0);for(var r in n)n[r].name=r,this.planes.add(n[r]),this.planes[r]=n[r];var o=function(e,t){for(var n in e)for(r=e[n].length;r--;){var o=e[n][r][0],i=e[n][r][1],a=e[n][r][2];o.name=n,o.renderOrder=1/0,i&&o.position.set(i[0],i[1],i[2]),a&&o.rotation.set(a[0],a[1],a[2]),t.add(o)}};o(this.handleGizmos,this.handles),o(this.pickerGizmos,this.pickers),this.traverse(function(e){if(e instanceof THREE.Mesh){e.updateMatrix();var t=e.geometry.clone();t.applyMatrix(e.matrix),e.geometry=t,e.position.set(0,0,0),e.rotation.set(0,0,0),e.scale.set(1,1,1)}})},this.highlight=function(e){this.traverse(function(t){t.material&&t.material.highlight&&(t.name===e?t.material.highlight(!0):t.material.highlight(!1))})}},THREE.TransformGizmo.prototype=Object.create(THREE.Object3D.prototype),THREE.TransformGizmo.prototype.constructor=THREE.TransformGizmo,THREE.TransformGizmo.prototype.update=function(e,t){var n=new THREE.Vector3(0,0,0),r=new THREE.Vector3(0,1,0),o=new THREE.Matrix4;this.traverse(function(i){-1!==i.name.search("E")?i.quaternion.setFromRotationMatrix(o.lookAt(t,n,r)):-1===i.name.search("X")&&-1===i.name.search("Y")&&-1===i.name.search("Z")||i.quaternion.setFromEuler(e)})},THREE.TransformGizmoTranslate=function(){THREE.TransformGizmo.call(this);var r=new THREE.ConeBufferGeometry(.05,.2,12,1,!1);r.translate(0,.5,0);var o=new THREE.BufferGeometry;o.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,1,0,0],3));var i=new THREE.BufferGeometry;i.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,1,0],3));var a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new THREE.Mesh(r,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new THREE.Line(o,new t({color:16711680}))]],Y:[[new THREE.Mesh(r,new e({color:65280})),[0,.5,0]],[new THREE.Line(i,new t({color:65280}))]],Z:[[new THREE.Mesh(r,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new THREE.Line(a,new t({color:255}))]],XYZ:[[new THREE.Mesh(new THREE.OctahedronGeometry(.1,0),new e({color:16777215,opacity:.25})),[0,0,0],[0,0,0]]],XY:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:16776960,opacity:.25})),[.15,.15,0]]],YZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:65535,opacity:.25})),[0,.15,.15],[0,Math.PI/2,0]]],XZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.29,.29),new e({color:16711935,opacity:.25})),[.15,0,.15],[-Math.PI/2,0,0]]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new THREE.Mesh(new THREE.OctahedronGeometry(.2,0),n)]],XY:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[.2,.2,0]]],YZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[0,.2,.2],[0,Math.PI/2,0]]],XZ:[[new THREE.Mesh(new THREE.PlaneBufferGeometry(.4,.4),n),[.2,0,.2],[-Math.PI/2,0,0]]]},this.setActivePlane=function(e,t){var n=new THREE.Matrix4;t.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE),"XY"===e&&(this.activePlane=this.planes.XY),"YZ"===e&&(this.activePlane=this.planes.YZ),"XZ"===e&&(this.activePlane=this.planes.XZ)},this.init()},THREE.TransformGizmoTranslate.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoTranslate.prototype.constructor=THREE.TransformGizmoTranslate,THREE.TransformGizmoRotate=function(){THREE.TransformGizmo.call(this);var e=function(e,t,n){var r=new THREE.BufferGeometry,o=[];n=n||1;for(var i=0;i<=64*n;++i)"x"===t&&o.push(0,Math.cos(i/32*Math.PI)*e,Math.sin(i/32*Math.PI)*e),"y"===t&&o.push(Math.cos(i/32*Math.PI)*e,0,Math.sin(i/32*Math.PI)*e),"z"===t&&o.push(Math.sin(i/32*Math.PI)*e,Math.cos(i/32*Math.PI)*e,0);return r.addAttribute("position",new THREE.Float32BufferAttribute(o,3)),r};this.handleGizmos={X:[[new THREE.Line(new e(1,"x",.5),new t({color:16711680}))]],Y:[[new THREE.Line(new e(1,"y",.5),new t({color:65280}))]],Z:[[new THREE.Line(new e(1,"z",.5),new t({color:255}))]],E:[[new THREE.Line(new e(1.25,"z",1),new t({color:13421568}))]],XYZE:[[new THREE.Line(new e(1,"z",1),new t({color:7895160}))]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[0,-Math.PI/2,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[Math.PI/2,0,0]]],Z:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,4,12,Math.PI),n),[0,0,0],[0,0,-Math.PI/2]]],E:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1.25,.12,2,24),n)]],XYZE:[[new THREE.Mesh(new THREE.TorusBufferGeometry(1,.12,2,24),n)]]},this.pickerGizmos.XYZE[0][0].visible=!1,this.setActivePlane=function(e){"E"===e&&(this.activePlane=this.planes.XYZE),"X"===e&&(this.activePlane=this.planes.YZ),"Y"===e&&(this.activePlane=this.planes.XZ),"Z"===e&&(this.activePlane=this.planes.XY)},this.update=function(e,t){THREE.TransformGizmo.prototype.update.apply(this,arguments);var n=new THREE.Matrix4,r=new THREE.Euler(0,0,1),o=new THREE.Quaternion,i=new THREE.Vector3(1,0,0),a=new THREE.Vector3(0,1,0),s=new THREE.Vector3(0,0,1),u=new THREE.Quaternion,l=new THREE.Quaternion,c=new THREE.Quaternion,f=t.clone();r.copy(this.planes.XY.rotation),o.setFromEuler(r),n.makeRotationFromQuaternion(o).getInverse(n),f.applyMatrix4(n),this.traverse(function(e){o.setFromEuler(r),"X"===e.name&&(u.setFromAxisAngle(i,Math.atan2(-f.y,f.z)),o.multiplyQuaternions(o,u),e.quaternion.copy(o)),"Y"===e.name&&(l.setFromAxisAngle(a,Math.atan2(f.x,f.z)),o.multiplyQuaternions(o,l),e.quaternion.copy(o)),"Z"===e.name&&(c.setFromAxisAngle(s,Math.atan2(f.y,f.x)),o.multiplyQuaternions(o,c),e.quaternion.copy(o))})},this.init()},THREE.TransformGizmoRotate.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoRotate.prototype.constructor=THREE.TransformGizmoRotate,THREE.TransformGizmoScale=function(){THREE.TransformGizmo.call(this);var r=new THREE.BoxBufferGeometry(.125,.125,.125);r.translate(0,.5,0);var o=new THREE.BufferGeometry;o.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,1,0,0],3));var i=new THREE.BufferGeometry;i.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,1,0],3));var a=new THREE.BufferGeometry;a.addAttribute("position",new THREE.Float32BufferAttribute([0,0,0,0,0,1],3)),this.handleGizmos={X:[[new THREE.Mesh(r,new e({color:16711680})),[.5,0,0],[0,0,-Math.PI/2]],[new THREE.Line(o,new t({color:16711680}))]],Y:[[new THREE.Mesh(r,new e({color:65280})),[0,.5,0]],[new THREE.Line(i,new t({color:65280}))]],Z:[[new THREE.Mesh(r,new e({color:255})),[0,0,.5],[Math.PI/2,0,0]],[new THREE.Line(a,new t({color:255}))]],XYZ:[[new THREE.Mesh(new THREE.BoxBufferGeometry(.125,.125,.125),new e({color:16777215,opacity:.25}))]]},this.pickerGizmos={X:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[.6,0,0],[0,0,-Math.PI/2]]],Y:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,.6,0]]],Z:[[new THREE.Mesh(new THREE.CylinderBufferGeometry(.2,0,1,4,1,!1),n),[0,0,.6],[Math.PI/2,0,0]]],XYZ:[[new THREE.Mesh(new THREE.BoxBufferGeometry(.4,.4,.4),n)]]},this.setActivePlane=function(e,t){var n=new THREE.Matrix4;t.applyMatrix4(n.getInverse(n.extractRotation(this.planes.XY.matrixWorld))),"X"===e&&(this.activePlane=this.planes.XY,Math.abs(t.y)>Math.abs(t.z)&&(this.activePlane=this.planes.XZ)),"Y"===e&&(this.activePlane=this.planes.XY,Math.abs(t.x)>Math.abs(t.z)&&(this.activePlane=this.planes.YZ)),"Z"===e&&(this.activePlane=this.planes.XZ,Math.abs(t.x)>Math.abs(t.y)&&(this.activePlane=this.planes.YZ)),"XYZ"===e&&(this.activePlane=this.planes.XYZE)},this.init()},THREE.TransformGizmoScale.prototype=Object.create(THREE.TransformGizmo.prototype),THREE.TransformGizmoScale.prototype.constructor=THREE.TransformGizmoScale,THREE.TransformControls=function(e,t){function n(e){if(void 0!==u.object&&!0!==c&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e,n=a(t,f[l].pickers.children),r=null;n&&(r=n.object.name,e.preventDefault()),u.axis!==r&&(u.axis=r,u.update(),u.dispatchEvent(h))}}function r(e){if(void 0!==u.object&&!0!==c&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e;if(0===t.button||void 0===t.button){var n=a(t,f[l].pickers.children);if(n){e.preventDefault(),e.stopPropagation(),u.axis=n.object.name,u.dispatchEvent(m),u.update(),C.copy(W).sub(V).normalize(),f[l].setActivePlane(u.axis,C);var r=a(t,[f[l].activePlane]);r&&(F.copy(u.object.position),H.copy(u.object.scale),U.extractRotation(u.object.matrix),Y.extractRotation(u.object.matrixWorld),u.object.parent&&(z.extractRotation(u.object.parent.matrixWorld),B.setFromMatrixScale(O.getInverse(u.object.parent.matrixWorld))),w.copy(r.point))}}c=!0}}function o(e){if(void 0!==u.object&&null!==u.axis&&!1!==c&&(void 0===e.button||0===e.button)){var t=e.changedTouches?e.changedTouches[0]:e,n=a(t,[f[l].activePlane]);!1!==n&&(e.preventDefault(),e.stopPropagation(),E.copy(n.point),"translate"===l?(E.sub(w),E.multiply(B),"local"===u.space&&(E.applyMatrix4(O.getInverse(Y)),-1===u.axis.search("X")&&(E.x=0),-1===u.axis.search("Y")&&(E.y=0),-1===u.axis.search("Z")&&(E.z=0),E.applyMatrix4(U),u.object.position.copy(F),u.object.position.add(E)),"world"!==u.space&&-1===u.axis.search("XYZ")||(-1===u.axis.search("X")&&(E.x=0),-1===u.axis.search("Y")&&(E.y=0),-1===u.axis.search("Z")&&(E.z=0),E.applyMatrix4(O.getInverse(z)),u.object.position.copy(F),u.object.position.add(E)),null!==u.translationSnap&&("local"===u.space&&u.object.position.applyMatrix4(O.getInverse(Y)),-1!==u.axis.search("X")&&(u.object.position.x=Math.round(u.object.position.x/u.translationSnap)*u.translationSnap),-1!==u.axis.search("Y")&&(u.object.position.y=Math.round(u.object.position.y/u.translationSnap)*u.translationSnap),-1!==u.axis.search("Z")&&(u.object.position.z=Math.round(u.object.position.z/u.translationSnap)*u.translationSnap),"local"===u.space&&u.object.position.applyMatrix4(Y))):"scale"===l?(E.sub(w),E.multiply(B),"local"===u.space&&("XYZ"===u.axis?(k=1+E.y/Math.max(H.x,H.y,H.z),u.object.scale.x=H.x*k,u.object.scale.y=H.y*k,u.object.scale.z=H.z*k):(E.applyMatrix4(O.getInverse(Y)),"X"===u.axis&&(u.object.scale.x=H.x*(1+E.x/H.x)),"Y"===u.axis&&(u.object.scale.y=H.y*(1+E.y/H.y)),"Z"===u.axis&&(u.object.scale.z=H.z*(1+E.z/H.z))))):"rotate"===l&&(E.sub(V),E.multiply(B),_.copy(w).sub(V),_.multiply(B),"E"===u.axis?(E.applyMatrix4(O.getInverse(T)),_.applyMatrix4(O.getInverse(T)),x.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),S.set(Math.atan2(_.z,_.y),Math.atan2(_.x,_.z),Math.atan2(_.y,_.x)),A.setFromRotationMatrix(O.getInverse(z)),D.setFromAxisAngle(C,x.z-S.z),P.setFromRotationMatrix(Y),A.multiplyQuaternions(A,D),A.multiplyQuaternions(A,P),u.object.quaternion.copy(A)):"XYZE"===u.axis?(D.setFromEuler(E.clone().cross(_).normalize()),A.setFromRotationMatrix(O.getInverse(z)),N.setFromAxisAngle(D,-E.clone().angleTo(_)),P.setFromRotationMatrix(Y),A.multiplyQuaternions(A,N),A.multiplyQuaternions(A,P),u.object.quaternion.copy(A)):"local"===u.space?(E.applyMatrix4(O.getInverse(Y)),_.applyMatrix4(O.getInverse(Y)),x.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),S.set(Math.atan2(_.z,_.y),Math.atan2(_.x,_.z),Math.atan2(_.y,_.x)),P.setFromRotationMatrix(U),null!==u.rotationSnap?(N.setFromAxisAngle(R,Math.round((x.x-S.x)/u.rotationSnap)*u.rotationSnap),j.setFromAxisAngle(I,Math.round((x.y-S.y)/u.rotationSnap)*u.rotationSnap),L.setFromAxisAngle(M,Math.round((x.z-S.z)/u.rotationSnap)*u.rotationSnap)):(N.setFromAxisAngle(R,x.x-S.x),j.setFromAxisAngle(I,x.y-S.y),L.setFromAxisAngle(M,x.z-S.z)),"X"===u.axis&&P.multiplyQuaternions(P,N),"Y"===u.axis&&P.multiplyQuaternions(P,j),"Z"===u.axis&&P.multiplyQuaternions(P,L),u.object.quaternion.copy(P)):"world"===u.space&&(x.set(Math.atan2(E.z,E.y),Math.atan2(E.x,E.z),Math.atan2(E.y,E.x)),S.set(Math.atan2(_.z,_.y),Math.atan2(_.x,_.z),Math.atan2(_.y,_.x)),A.setFromRotationMatrix(O.getInverse(z)),null!==u.rotationSnap?(N.setFromAxisAngle(R,Math.round((x.x-S.x)/u.rotationSnap)*u.rotationSnap),j.setFromAxisAngle(I,Math.round((x.y-S.y)/u.rotationSnap)*u.rotationSnap),L.setFromAxisAngle(M,Math.round((x.z-S.z)/u.rotationSnap)*u.rotationSnap)):(N.setFromAxisAngle(R,x.x-S.x),j.setFromAxisAngle(I,x.y-S.y),L.setFromAxisAngle(M,x.z-S.z)),P.setFromRotationMatrix(Y),"X"===u.axis&&A.multiplyQuaternions(A,N),"Y"===u.axis&&A.multiplyQuaternions(A,j),"Z"===u.axis&&A.multiplyQuaternions(A,L),A.multiplyQuaternions(A,P),u.object.quaternion.copy(A))),"translate"===l?(u.object.position.x=parseFloat(u.object.position.x.toFixed(5)),u.object.position.y=parseFloat(u.object.position.y.toFixed(5)),u.object.position.z=parseFloat(u.object.position.z.toFixed(5))):"rotate"===l?(u.object.rotation.x=parseFloat(u.object.rotation.x.toFixed(5)),u.object.rotation.y=parseFloat(u.object.rotation.y.toFixed(5)),u.object.rotation.z=parseFloat(u.object.rotation.z.toFixed(5))):(u.object.scale.x=parseFloat(u.object.scale.x.toFixed(5)),u.object.scale.y=parseFloat(u.object.scale.y.toFixed(5)),u.object.scale.z=parseFloat(u.object.scale.z.toFixed(5))),u.update(),u.dispatchEvent(h),g.mode=l,u.dispatchEvent(g))}}function i(e){e.preventDefault(),void 0!==e.button&&0!==e.button||(c&&null!==u.axis&&(v.mode=l,u.dispatchEvent(v)),c=!1,"TouchEvent"in window&&e instanceof TouchEvent?(u.axis=null,u.update(),u.dispatchEvent(h)):n(e))}function a(e,n){var r=t.getBoundingClientRect(),o=(e.clientX-r.left)/r.width,i=(e.clientY-r.top)/r.height;b.set(2*o-1,-2*i+1),y.setFromCamera(b,s);var a=y.intersectObjects(n,!0);return!!a[0]&&a[0]}THREE.Object3D.call(this),t=void 0!==t?t:document,this.object=void 0,this.visible=!1,this.translationSnap=null,this.rotationSnap=null,this.space="world",this.size=1,this.axis=null;var s=e,u=this,l="translate",c=!1,f={translate:new THREE.TransformGizmoTranslate,rotate:new THREE.TransformGizmoRotate,scale:new THREE.TransformGizmoScale};for(var p in f){var d=f[p];d.visible=p===l,this.add(d)}var h={type:"change"},m={type:"mouseDown"},v={type:"mouseUp",mode:l},g={type:"objectChange"},y=new THREE.Raycaster,b=new THREE.Vector2,E=new THREE.Vector3,w=new THREE.Vector3,x=new THREE.Vector3,S=new THREE.Vector3,k=1,T=new THREE.Matrix4,C=new THREE.Vector3,O=new THREE.Matrix4,_=new THREE.Vector3,A=new THREE.Quaternion,R=new THREE.Vector3(1,0,0),I=new THREE.Vector3(0,1,0),M=new THREE.Vector3(0,0,1),P=new THREE.Quaternion,N=new THREE.Quaternion,j=new THREE.Quaternion,L=new THREE.Quaternion,D=new THREE.Quaternion,F=new THREE.Vector3,H=new THREE.Vector3,U=new THREE.Matrix4,z=new THREE.Matrix4,B=new THREE.Vector3,V=new THREE.Vector3,G=new THREE.Euler,Y=new THREE.Matrix4,W=new THREE.Vector3,q=new THREE.Euler;this.setCamera=function(e){s=e},this.activate=function(){t.addEventListener("mousedown",r,!1),t.addEventListener("touchstart",r,!1),t.addEventListener("mousemove",n,!1),t.addEventListener("touchmove",n,!1),t.addEventListener("mousemove",o,!1),t.addEventListener("touchmove",o,!1),t.addEventListener("mouseup",i,!1),t.addEventListener("mouseout",i,!1),t.addEventListener("touchend",i,!1),t.addEventListener("touchcancel",i,!1),t.addEventListener("touchleave",i,!1)},this.activate(),this.dispose=function(){t.removeEventListener("mousedown",r),t.removeEventListener("touchstart",r),t.removeEventListener("mousemove",n),t.removeEventListener("touchmove",n),t.removeEventListener("mousemove",o),t.removeEventListener("touchmove",o),t.removeEventListener("mouseup",i),t.removeEventListener("mouseout",i),t.removeEventListener("touchend",i),t.removeEventListener("touchcancel",i),t.removeEventListener("touchleave",i)},this.attach=function(e){this.object=e,this.visible=!0,this.update(!0)},this.detach=function(){this.object=void 0,this.visible=!1,this.axis=null},this.getMode=function(){return l},this.setMode=function(e){"scale"===(l=e||l)&&(u.space="local");for(var t in f)f[t].visible=t===l;this.update(),u.dispatchEvent(h)},this.setTranslationSnap=function(e){u.translationSnap=e},this.setRotationSnap=function(e){u.rotationSnap=e},this.setSize=function(e){u.size=e,this.update(!0),u.dispatchEvent(h)},this.setSpace=function(e){u.space=e,this.update(),u.dispatchEvent(h)},this.update=function(e){void 0!==u.object&&(u.object.updateMatrixWorld(),V.setFromMatrixPosition(u.object.matrixWorld),G.setFromRotationMatrix(O.extractRotation(u.object.matrixWorld)),s.updateMatrixWorld(),W.setFromMatrixPosition(s.matrixWorld),q.setFromRotationMatrix(O.extractRotation(s.matrixWorld)),k=V.distanceTo(W)/6*u.size,this.position.copy(V),e&&this.scale.set(k,k,k),s instanceof THREE.PerspectiveCamera?C.copy(W).sub(V).normalize():s instanceof THREE.OrthographicCamera&&C.copy(W).normalize(),"local"===u.space?f[l].update(G,C):"world"===u.space&&f[l].update(new THREE.Euler,C),f[l].highlight(u.axis))}},THREE.TransformControls.prototype=Object.create(THREE.Object3D.prototype),THREE.TransformControls.prototype.constructor=THREE.TransformControls}()},function(e,t,n){"use strict";function r(){this.images=[],this.hasLoaded=!1}var o=n(4),i=function(e){return e&&e.__esModule?e:{default:e}}(o),a="https://aframe.io/sample-assets/",s={images:"dist/images.json"};r.prototype={load:function(){var e=this,t=new XMLHttpRequest,n=a+s.images;t.open("GET",n),t.onload=function(){var n=JSON.parse(t.responseText);e.images=n.images,e.images.forEach(function(e){e.fullPath=a+n.basepath.images+e.path,e.fullThumbPath=a+n.basepath.images_thumbnails+e.thumbnail}),i.default.emit("assetsimagesload",e.images)},t.onerror=function(){console.error("Error loading registry file.")},t.send(),this.hasLoaded=!0}},e.exports=r},function(e,t,n){"use strict";function r(e,t,n,r,o){var i=null;switch(e){case"img":i=document.createElement("img"),i.id=t,i.src=n,r&&(i.crossOrigin="anonymous")}i&&(i.onload=function(){o&&o()},document.getElementsByTagName("a-assets")[0].appendChild(i))}e.exports={insertNewAsset:r}},function(e,t,n){"use strict";function r(e){var t=e.sceneEl,n=e.currentCameraEl=t.camera.el;e.currentCameraEl.setAttribute("data-aframe-inspector-original-camera",""),e.currentCameraEl.hasAttribute("data-aframe-default-camera")&&(e.currentCameraEl.removeAttribute("data-aframe-default-camera"),e.currentCameraEl.setAttribute("data-aframe-inspector","default-camera")),e.currentCameraEl.setAttribute("camera","active",!1);var r=e.camera=new THREE.PerspectiveCamera;r.far=1e4,r.near=.01,r.position.set(0,1.6,2),r.lookAt(new THREE.Vector3(0,1.6,-1)),r.updateMatrixWorld(),t.object3D.add(r),t.camera=r;var a=t.canvas.width/t.canvas.height,l=new THREE.OrthographicCamera(-10*a,10*a,10,-10);t.object3D.add(l);var c=e.cameras={perspective:r,original:n,ortho:l};return s.default.on("cameraperspectivetoggle",function(){o(e.camera,u),t.camera=e.camera=c.perspective,s.default.emit("cameratoggle",{camera:e.camera,value:"perspective"})}),s.default.on("cameraorthographictoggle",function(n){o(e.camera,u),t.camera=e.camera=c.ortho,u=n,i(c.ortho,n,a),0===c.ortho.rotation.x&&0===c.ortho.rotation.y&&0===c.ortho.rotation.z&&c.ortho.lookAt(0,0,0),s.default.emit("cameratoggle",{camera:e.camera,value:"ortho"+n})}),e.cameras}function o(e,t){if("OrthographicCamera"===e.type){var n=l[t];n.position.copy(e.position),n.rotation.copy(e.rotation),n.left=e.left,n.right=e.right,n.top=e.top,n.bottom=e.bottom}}function i(e,t,n){var r=l[t];e.left=r.left||-10*n,e.right=r.right||10*n,e.top=r.top||10,e.bottom=r.bottom||-10,e.position.copy(r.position),e.rotation.copy(r.rotation)}Object.defineProperty(t,"__esModule",{value:!0}),t.initCameras=r;var a=n(4),s=function(e){return e&&e.__esModule?e:{default:e}}(a),u="",l={left:{position:new THREE.Vector3(-10,0,0),rotation:new THREE.Euler},right:{position:new THREE.Vector3(10,0,0),rotation:new THREE.Euler},top:{position:new THREE.Vector3(0,10,0),rotation:new THREE.Euler},bottom:{position:new THREE.Vector3(0,-10,0),rotation:new THREE.Euler},back:{position:new THREE.Vector3(0,0,-10),rotation:new THREE.Euler},front:{position:new THREE.Vector3(0,0,10),rotation:new THREE.Euler}}},function(e,t,n){"use strict";var r=n(4),o={};r.on("entityupdate",function(e){var t=e.value,n=e.entity;if(n){o[n.id]=o[n.id]||{};var r=AFRAME.components[e.component];r&&(e.property?(o[n.id][e.component]=o[n.id][e.component]||{},r.schema[e.property]&&(t=r.schema[e.property].stringify(e.value)),o[n.id][e.component][e.property]=t):(t=r.schema.stringify(e.value),o[n.id][e.component]=t))}}),e.exports={updates:o}},function(e,t,n){"use strict";function r(e){function t(){g(c.components.cursor.intersectedEl)&&i.emit("raycastermouseenter",c.components.cursor.intersectedEl)}function n(){g(c.components.cursor.intersectedEl)&&i.emit("raycastermouseleave",c.components.cursor.intersectedEl)}function r(t){h.distanceTo(m)>=.03||g(t.detail.intersectedEl)&&e.selectEntity(t.detail.intersectedEl)}function s(t){if(!(t instanceof CustomEvent)){t.preventDefault();var n=o(e.container,t.clientX,t.clientY);h.fromArray(n)}}function u(t){if(!(t instanceof CustomEvent)){t.preventDefault();var n=o(e.container,t.clientX,t.clientY);m.fromArray(n)}}function l(t){var n=o(e.container,t.clientX,t.clientY);v.fromArray(n);var r=c.components.cursor.intersectedEl;r&&g(r)&&i.emit("objectfocus",r.object3D)}var c=document.createElement("a-entity");c.setAttribute("id","aframeInspectorMouseCursor"),c.setAttribute("cursor","rayOrigin","mouse"),c.setAttribute("data-aframe-inspector","true"),c.setAttribute("raycaster",{interval:100,objects:"a-scene :not([data-aframe-inspector])"});var f=c.components.raycaster,p=f.refreshObjects,d=function(){p.call(f);var e=f.objects;f.objects=e.filter(function(e){for(;e;){if(!e.visible)return!1;e=e.parent}return!0})};f.refreshObjects=d,e.sceneEl.appendChild(c),e.cursor=c,e.sceneEl.addEventListener("child-attached",a(function(){c.components.raycaster.refreshObjects()},250)),c.addEventListener("click",r),c.addEventListener("mouseenter",t),c.addEventListener("mouseleave",n),e.container.addEventListener("mousedown",s),e.container.addEventListener("mouseup",u),e.container.addEventListener("dblclick",l),e.sceneEl.canvas.addEventListener("mouseleave",function(){setTimeout(function(){i.emit("raycastermouseleave",null)})});var h=new THREE.Vector2,m=new THREE.Vector2,v=new THREE.Vector2,g=function(e){return!("floor"===e.id||"sky"===e.id)};return{el:c,enable:function(){c.setAttribute("raycaster","enabled",!0)},disable:function(){c.setAttribute("raycaster","enabled",!1)}}}function o(e,t,n){var r=e.getBoundingClientRect();return[(t-r.left)/r.width,(n-r.top)/r.height]}var i=n(4),a=n(23);e.exports.initRaycaster=r},function(e,t,n){"use strict";function r(e){return!e.metaKey&&(e.target.closest("#cameraToolbar")||"INPUT"!==e.target.tagName&&"TEXTAREA"!==e.target.tagName)}var o=n(16),i=n(17),a=n(4),s={enabled:!1,shortcuts:{default:{},modules:{}},onKeyUp:function(e){if(r(e)&&AFRAME.INSPECTOR.opened){var t=e.keyCode;if(72===t&&a.emit("openhelpmodal"),27===t&&this.inspector.selectedEntity&&this.inspector.selectEntity(null),87===t&&a.emit("transformmodechange","translate"),69===t&&a.emit("transformmodechange","rotate"),82===t&&a.emit("transformmodechange","scale"),79===t&&a.emit("transformspacechange"),71===t&&a.emit("togglegrid"),77===t&&a.emit("togglemotioncapture"),78===t&&a.emit("entitycreate",{element:"a-entity",components:{}}),8!==t&&46!==t||(0,o.removeSelectedEntity)(),68===t&&(0,o.cloneSelectedEntity)(),70===t){var n=AFRAME.INSPECTOR.selectedEntity;void 0!==n&&null!==n&&a.emit("objectfocus",n.object3D)}49===t?a.emit("cameraperspectivetoggle"):50===t?a.emit("cameraorthographictoggle","left"):51===t?a.emit("cameraorthographictoggle","right"):52===t?a.emit("cameraorthographictoggle","top"):53===t?a.emit("cameraorthographictoggle","bottom"):54===t?a.emit("cameraorthographictoggle","back"):55===t&&a.emit("cameraorthographictoggle","front");for(var i in this.shortcuts.modules){var s=this.shortcuts.modules[i];s[t]&&(!s[t].mustBeActive||s[t].mustBeActive&&AFRAME.INSPECTOR.modules[i].active)&&this.shortcuts.modules[i][t].callback()}}},onKeyDown:function(e){r(e)&&AFRAME.INSPECTOR.opened&&((e.ctrlKey&&"windows"===i.os||e.metaKey&&"macos"===i.os)&&(AFRAME.INSPECTOR.selectedEntity&&"INPUT"!==document.activeElement.tagName&&(88===e.keyCode&&(AFRAME.INSPECTOR.entityToCopy=AFRAME.INSPECTOR.selectedEntity,(0,o.removeSelectedEntity)(!0)),67===e.keyCode&&(AFRAME.INSPECTOR.entityToCopy=AFRAME.INSPECTOR.selectedEntity),86===e.keyCode&&(0,o.cloneEntity)(AFRAME.INSPECTOR.entityToCopy)),83===e.keyCode&&(e.preventDefault(),e.stopPropagation(),document.getElementById("filter").focus())),48===e.keyCode&&(a.emit("togglesidebar",{which:"all"}),e.preventDefault(),e.stopPropagation()))},enable:function(){this.enabled&&this.disable(),window.addEventListener("keydown",this.onKeyDown.bind(this),!1),window.addEventListener("keyup",this.onKeyUp.bind(this),!1),this.enabled=!0},disable:function(){window.removeEventListener("keydown",this.onKeyDown),window.removeEventListener("keyup",this.onKeyUp),this.enabled=!1},checkModuleShortcutCollision:function(e,t,n){this.shortcuts.modules[t]&&this.shortcuts.modules[t][e]&&console.warn("Keycode <%s> already registered as shorcut within the same module",e)},registerModuleShortcut:function(e,t,n,r){this.checkModuleShortcutCollision(e,n,r)||(this.shortcuts.modules[n]||(this.shortcuts.modules[n]={}),!1!==r&&(r=!0),this.shortcuts.modules[n][e]={callback:t,mustBeActive:r})},init:function(e){this.inspector=e,this.onKeyDown=this.onKeyDown.bind(this),this.onKeyUp=this.onKeyUp.bind(this)}};e.exports=s},function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{default:e}}function o(e){function t(t){t.traverse(function(t){e.helpers[t.uuid]&&e.helpers[t.uuid].update()})}function n(){o.disable(),h.dispose(),m.enabled=!1}function r(){o.enable(),h.activate(),m.enabled=!0}var o=(0,u.initRaycaster)(e),i=e.sceneEl;if(e.cameras){var a=e.cameras.original;a&&i.addEventListener("camera-set-active",function(t){e.opened&&(a=t.detail.cameraEl)})}var s=e.sceneHelpers,f=new THREE.GridHelper(30,60,11184810,2500134);s.add(f);var p=new THREE.BoxHelper;p.material.depthTest=!1,p.material.transparent=!0,p.material.color.set(2075378),p.visible=!1,s.add(p);var d=e.camera,h=new THREE.TransformControls(d,e.container);h.size=.75,h.addEventListener("objectChange",function(e){var n=h.object;if(void 0!==n){p.setFromObject(n).update(),t(n),c.emit("refreshsidebarobject3d",n);var r=void 0,o=void 0;if("translate"===e.mode)r="position",o=n.position.x+" "+n.position.y+" "+n.position.z;else if("rotate"===e.mode){r="rotation";var i=THREE.Math.radToDeg;o=i(n.rotation.x)+" "+i(n.rotation.y)+" "+i(n.rotation.z)}else"scale"===e.mode&&(r="scale",o=n.scale.x+" "+n.scale.y+" "+n.scale.z);c.emit("entityupdate",{component:r,entity:h.object.el,property:"",value:o}),c.emit("entitytransformed",h.object.el)}}),h.addEventListener("mouseDown",function(){m.enabled=!1}),h.addEventListener("mouseUp",function(){m.enabled=!0}),s.add(h),c.on("entityupdate",function(t){e.selectedEntity.object3DMap.mesh&&p.update(e.selected)});var m=new THREE.EditorControls(d,e.container);m.center.set(0,1.6,0),m.rotationSpeed=.0035,m.zoomSpeed=.05,m.setAspectRatio(i.canvas.width/i.canvas.height),c.on("cameratoggle",function(e){m.setCamera(e.camera),h.setCamera(e.camera)}),r(),c.on("inspectorcleared",function(){m.center.set(0,0,0)}),c.on("transformmodechange",function(e){h.setMode(e)}),c.on("snapchanged",function(e){h.setTranslationSnap(e)}),c.on("transformspacechanged",function(e){h.setSpace(e)}),c.on("objectselect",function(e){!0!==(0,l.sharedHub)().running&&(p.visible=!1,h.detach(),e&&e.el&&(e.el.getObject3D("mesh")&&(p.setFromObject(e).update(),p.visible=!0),h.attach(e)))}),c.on("objectfocus",function(e){if(!e)return p.visible=!1,void(h.visible=!1);p.visible=!0,h.visible=!0,m.focus(e),h.update()}),c.on("geometrychanged",function(e){null!==e&&p.setFromObject(e).update()}),c.on("entityupdate",function(n){if(n.entity){var r=n.entity.object3D;e.selected===r&&r.geometry&&(r.geometry.vertices&&r.geometry.vertices.length>0||r.geometry.attributes&&r.geometry.attributes.position&&r.geometry.attributes.position.array.length)&&p.setFromObject(r).update(),h.update(),r instanceof THREE.PerspectiveCamera&&r.updateProjectionMatrix(),t(r)}}),c.on("windowresize",function(){d&&(d.aspect=e.container.offsetWidth/e.container.offsetHeight,d.updateProjectionMatrix())}),c.on("gridvisibilitychanged",function(e){f.visible=e}),c.on("togglegrid",function(){f.visible=!f.visible}),c.on("inspectortoggle",function(t){t?(r(),AFRAME.scenes[0].camera=e.camera,Array.prototype.slice.call(document.querySelectorAll(".a-enter-vr,.rs-base")).forEach(function(e){e.style.display="none"})):(n(),e.cameras.original.setAttribute("camera","active","true"),AFRAME.scenes[0].camera=e.cameras.original.getObject3D("camera"),Array.prototype.slice.call(document.querySelectorAll(".a-enter-vr,.rs-base")).forEach(function(e){e.style.display="block"}))})}var i=n(23),a=(r(i),n(130)),s=(r(a),n(129)),u=(r(s),n(135)),l=(n(17),n(5)),c=n(4);e.exports=o},function(e,t,n){"use strict";var r={POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123,FLOAT:5126,UNSIGNED_INT:5125,ARRAY_BUFFER:34962,ELEMENT_ARRAY_BUFFER:34963,NEAREST:9728,LINEAR:9729,NEAREST_MIPMAP_NEAREST:9984,LINEAR_MIPMAP_NEAREST:9985,NEAREST_MIPMAP_LINEAR:9986,LINEAR_MIPMAP_LINEAR:9987},o={1003:r.NEAREST,1004:r.NEAREST_MIPMAP_NEAREST,1005:r.NEAREST_MIPMAP_LINEAR,1006:r.LINEAR,1007:r.LINEAR_MIPMAP_NEAREST,1008:r.LINEAR_MIPMAP_LINEAR},i={scale:"scale",position:"translation",quaternion:"rotation",morphTargetInfluences:"weights"};THREE.GLTFExporter=function(){},THREE.GLTFExporter.prototype={constructor:THREE.GLTFExporter,parse:function(e,t,n){function a(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})}function s(e){if(void 0!==window.TextEncoder)return(new TextEncoder).encode(e).buffer;for(var t=new Uint8Array(new ArrayBuffer(e.length)),n=0,r=e.length;n255?32:o}return t.buffer}function u(e,t,n){for(var r={min:new Array(e.itemSize).fill(Number.POSITIVE_INFINITY),max:new Array(e.itemSize).fill(Number.NEGATIVE_INFINITY)},o=t;o5e-4)return!1;return!0}function f(e){if(H.attributes.has(e))return H.attributes.get(e);for(var t=e.clone(),n=new THREE.Vector3,r=0,o=t.count;r0)&&(t.alphaMode=e.opacity<1?"BLEND":"MASK",e.alphaTest>0&&.5!==e.alphaTest&&(t.alphaCutoff=e.alphaTest)),e.side===THREE.DoubleSide&&(t.doubleSided=!0),""!==e.name&&(t.name=e.name),Object.keys(e.userData).length>0&&(t.extras=h(e)),M.materials.push(t);var o=M.materials.length-1;return H.materials.set(e,o),o}function S(e){var t,o=e.geometry;if(e.isLineSegments)t=r.LINES;else if(e.isLineLoop)t=r.LINE_LOOP;else if(e.isLine)t=r.LINE_STRIP;else if(e.isPoints)t=r.POINTS;else{if(!o.isBufferGeometry){var i=new THREE.BufferGeometry;i.fromGeometry(o),o=i}e.drawMode===THREE.TriangleFanDrawMode?(console.warn("GLTFExporter: TriangleFanDrawMode and wireframe incompatible."),t=r.TRIANGLE_FAN):t=e.drawMode===THREE.TriangleStripDrawMode?e.material.wireframe?r.LINE_STRIP:r.TRIANGLE_STRIP:e.material.wireframe?r.LINES:r.TRIANGLES}var a={},s={},u=[],l=[],p={uv:"TEXCOORD_0",uv2:"TEXCOORD_1",color:"COLOR_0",skinWeight:"WEIGHTS_0",skinIndex:"JOINTS_0"},d=o.getAttribute("normal");void 0===d||c(d)||(console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."),o.addAttribute("normal",f(d)));for(var m in o.attributes){var v=o.attributes[m];m=p[m]||m.toUpperCase();var g=v.array;if("JOINTS_0"!==m||g instanceof Uint16Array||g instanceof Uint8Array||(console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'),v=new THREE.BufferAttribute(new Uint16Array(g),v.itemSize,v.normalized)),"MORPH"!==m.substr(0,5)){var b=y(v,o);null!==b&&(s[m]=b)}}if(void 0!==d&&o.addAttribute("normal",d),0===Object.keys(s).length)return null;if(void 0!==e.morphTargetInfluences&&e.morphTargetInfluences.length>0){var E=[],w=[],S={};if(void 0!==e.morphTargetDictionary)for(var k in e.morphTargetDictionary)S[e.morphTargetDictionary[k]]=k;for(var T=0;T0&&(a.extras={},a.extras.targetNames=w)}var P=Object.keys(o.userData).length>0?h(o):void 0,N=n.forceIndices,j=Array.isArray(e.material);if(j&&0===o.groups.length)return null;!N&&null===o.index&&j&&(console.warn("THREE.GLTFExporter: Creating index for non-indexed multi-material mesh."),N=!0);var L=!1;if(null===o.index&&N){for(var D=[],T=0,F=o.attributes.position.count;T0&&(z.targets=l),null!==o.index&&(z.indices=y(o.index,o,U[T].start,U[T].count));var B=x(H[U[T].materialIndex]);null!==B&&(z.material=B),u.push(z)}return L&&o.setIndex(null),a.primitives=u,M.meshes||(M.meshes=[]),M.meshes.push(a),M.meshes.length-1}function k(e){M.cameras||(M.cameras=[]);var t=e.isOrthographicCamera,n={type:t?"orthographic":"perspective"};return t?n.orthographic={xmag:2*e.right,ymag:2*e.top,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near}:n.perspective={aspectRatio:e.aspect,yfov:THREE.Math.degToRad(e.fov)/e.aspect,zfar:e.far<=0?.001:e.far,znear:e.near<0?0:e.near},""!==e.name&&(n.name=e.type),M.cameras.push(n),M.cameras.length-1}function T(e,t){M.animations||(M.animations=[]);for(var n=[],r=[],o=0;o0&&(t.extras=h(e)),e.isMesh||e.isLine||e.isPoints){var s=S(e);null!==s&&(t.mesh=s)}else e.isCamera&&(t.camera=k(e));if(e.isSkinnedMesh&&D.push(e),e.children.length>0){for(var u=[],l=0,c=e.children.length;l0&&(t.children=u)}M.nodes.push(t);var d=M.nodes.length-1;return L.set(e,d),d}function _(e){M.scenes||(M.scenes=[],M.scene=0);var t={nodes:[]};""!==e.name&&(t.name=e.name),M.scenes.push(t);for(var r=[],o=0,i=e.children.length;o0&&(t.nodes=r)}function A(e){var t=new THREE.Scene;t.name="AuxScene";for(var n=0;n0&&(n.trs=!0);var I,M={asset:{version:"2.0",generator:"THREE.GLTFExporter"}},P=0,N=[],j=[],L=new Map,D=[],F={},H={attributes:new Map,materials:new Map,textures:new Map,images:new Map};!function(e){e=e instanceof Array?e:[e];for(var t=[],r=0;r0&&A(t);for(var r=0;r0&&(M.extensionsUsed=r),M.buffers&&M.buffers.length>0){M.buffers[0].byteLength=e.size;var o=new window.FileReader;if(!0===n.binary){o.readAsArrayBuffer(e),o.onloadend=function(){var e=d(o.result),n=new DataView(new ArrayBuffer(8));n.setUint32(0,e.byteLength,!0),n.setUint32(4,5130562,!0);var r=d(s(JSON.stringify(M)),32),i=new DataView(new ArrayBuffer(8));i.setUint32(0,r.byteLength,!0),i.setUint32(4,1313821514,!0);var a=new ArrayBuffer(12),u=new DataView(a);u.setUint32(0,1179937895,!0),u.setUint32(4,2,!0);var l=12+i.byteLength+r.byteLength+n.byteLength+e.byteLength;u.setUint32(8,l,!0);var c=new Blob([a,i,r,n,e],{type:"application/octet-stream"}),f=new window.FileReader;f.readAsArrayBuffer(c),f.onloadend=function(){t(f.result)}}}else o.readAsDataURL(e),o.onloadend=function(){var e=o.result;M.buffers[0].uri=e,t(M)}}else t(M)})}}},function(e,t,n){"use strict";function r(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function o(e){var t=r(e),n=t[0],o=t[1];return 3*(n+o)/4-o}function i(e,t,n){return 3*(t+n)/4-n}function a(e){var t,n,o=r(e),a=o[0],s=o[1],u=new p(i(e,a,s)),l=0,c=s>0?a-4:a;for(n=0;n>16&255,u[l++]=t>>8&255,u[l++]=255&t;return 2===s&&(t=f[e.charCodeAt(n)]<<2|f[e.charCodeAt(n+1)]>>4,u[l++]=255&t),1===s&&(t=f[e.charCodeAt(n)]<<10|f[e.charCodeAt(n+1)]<<4|f[e.charCodeAt(n+2)]>>2,u[l++]=t>>8&255,u[l++]=255&t),u}function s(e){return c[e>>18&63]+c[e>>12&63]+c[e>>6&63]+c[63&e]}function u(e,t,n){for(var r,o=[],i=t;ia?a:i+16383));return 1===r?(t=e[n-1],o.push(c[t>>2]+c[t<<4&63]+"==")):2===r&&(t=(e[n-2]<<8)+e[n-1],o.push(c[t>>10]+c[t>>4&63]+c[t<<2&63]+"=")),o.join("")}t.byteLength=o,t.toByteArray=a,t.fromByteArray=l;for(var c=[],f=[],p="undefined"!=typeof Uint8Array?Uint8Array:Array,d="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",h=0,m=d.length;h=r())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+r().toString(16)+" bytes");return 0|e}function m(e){return+e!=e&&(e=0),i.alloc(+e)}function v(e,t){if(i.isBuffer(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return q(e).length;default:if(r)return G(e).length;t=(""+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if(n>>>=0,t>>>=0,n<=t)return"";for(e||(e="utf8");;)switch(e){case"hex":return M(this,t,n);case"utf8":case"utf-8":return _(this,t,n);case"ascii":return R(this,t,n);case"latin1":case"binary":return I(this,t,n);case"base64":return O(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function y(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function b(e,t,n,r,o){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=o?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(o)return-1;n=e.length-1}else if(n<0){if(!o)return-1;n=0}if("string"==typeof t&&(t=i.from(t,r)),i.isBuffer(t))return 0===t.length?-1:E(e,t,n,r,o);if("number"==typeof t)return t&=255,i.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?o?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):E(e,[t],n,r,o);throw new TypeError("val must be string, number or Buffer")}function E(e,t,n,r,o){function i(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}var a=1,s=e.length,u=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,n/=2}var l;if(o){var c=-1;for(l=n;ls&&(n=s-u),l=n;l>=0;l--){for(var f=!0,p=0;po&&(r=o):r=o;var i=t.length;if(i%2!=0)throw new TypeError("Invalid hex string");r>i/2&&(r=i/2);for(var a=0;a239?4:i>223?3:i>191?2:1;if(o+s<=n){var u,l,c,f;switch(s){case 1:i<128&&(a=i);break;case 2:u=e[o+1],128==(192&u)&&(f=(31&i)<<6|63&u)>127&&(a=f);break;case 3:u=e[o+1],l=e[o+2],128==(192&u)&&128==(192&l)&&(f=(15&i)<<12|(63&u)<<6|63&l)>2047&&(f<55296||f>57343)&&(a=f);break;case 4:u=e[o+1],l=e[o+2],c=e[o+3],128==(192&u)&&128==(192&l)&&128==(192&c)&&(f=(15&i)<<18|(63&u)<<12|(63&l)<<6|63&c)>65535&&f<1114112&&(a=f)}}null===a?(a=65533,s=1):a>65535&&(a-=65536,r.push(a>>>10&1023|55296),a=56320|1023&a),r.push(a),o+=s}return A(r)}function A(e){var t=e.length;if(t<=J)return String.fromCharCode.apply(String,e);for(var n="",r=0;rr)&&(n=r);for(var o="",i=t;in)throw new RangeError("Trying to access beyond buffer length")}function j(e,t,n,r,o,a){if(!i.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>o||te.length)throw new RangeError("Index out of range")}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var o=0,i=Math.min(e.length-n,2);o>>8*(r?o:1-o)}function D(e,t,n,r){t<0&&(t=4294967295+t+1);for(var o=0,i=Math.min(e.length-n,4);o>>8*(r?o:3-o)&255}function F(e,t,n,r,o,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function H(e,t,n,r,o){return o||F(e,t,n,4,3.4028234663852886e38,-3.4028234663852886e38),Z.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,o){return o||F(e,t,n,8,1.7976931348623157e308,-1.7976931348623157e308),Z.write(e,t,n,r,52,8),n+8}function z(e){if(e=B(e).replace(ee,""),e.length<2)return"";for(;e.length%4!=0;)e+="=";return e}function B(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}function V(e){return e<16?"0"+e.toString(16):e.toString(16)}function G(e,t){t=t||1/0;for(var n,r=e.length,o=null,i=[],a=0;a55295&&n<57344){if(!o){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&i.push(239,191,189);continue}o=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),o=n;continue}n=65536+(o-55296<<10|n-56320)}else o&&(t-=3)>-1&&i.push(239,191,189);if(o=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function Y(e){for(var t=[],n=0;n>8,o=n%256,i.push(o),i.push(r);return i}function q(e){return Q.toByteArray(z(e))}function $(e,t,n,r){for(var o=0;o=t.length||o>=e.length);++o)t[o+n]=e[o];return o}function X(e){return e!==e}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var Q=n(139),Z=n(155),K=n(156);t.Buffer=i,t.SlowBuffer=m,t.INSPECT_MAX_BYTES=50,i.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=r(),i.poolSize=8192,i._augment=function(e){return e.__proto__=i.prototype,e},i.from=function(e,t,n){return a(null,e,t,n)},i.TYPED_ARRAY_SUPPORT&&(i.prototype.__proto__=Uint8Array.prototype,i.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&i[Symbol.species]===i&&Object.defineProperty(i,Symbol.species,{value:null,configurable:!0})),i.alloc=function(e,t,n){return u(null,e,t,n)},i.allocUnsafe=function(e){return l(null,e)},i.allocUnsafeSlow=function(e){return l(null,e)},i.isBuffer=function(e){return!(null==e||!e._isBuffer)},i.compare=function(e,t){if(!i.isBuffer(e)||!i.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var n=e.length,r=t.length,o=0,a=Math.min(n,r);o0&&(e=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(e+=" ... ")),""},i.prototype.compare=function(e,t,n,r,o){if(!i.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===o&&(o=this.length),t<0||n>e.length||r<0||o>this.length)throw new RangeError("out of range index");if(r>=o&&t>=n)return 0;if(r>=o)return-1;if(t>=n)return 1;if(t>>>=0,n>>>=0,r>>>=0,o>>>=0,this===e)return 0;for(var a=o-r,s=n-t,u=Math.min(a,s),l=this.slice(r,o),c=e.slice(t,n),f=0;fo)&&(n=o),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var i=!1;;)switch(r){case"hex":return w(this,e,t,n);case"utf8":case"utf-8":return x(this,e,t,n);case"ascii":return S(this,e,t,n);case"latin1":case"binary":return k(this,e,t,n);case"base64":return T(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},i.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var J=4096;i.prototype.slice=function(e,t){var n=this.length;e=~~e,t=void 0===t?n:~~t,e<0?(e+=n)<0&&(e=0):e>n&&(e=n),t<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(o*=256);)r+=this[e+--t]*o;return r},i.prototype.readUInt8=function(e,t){return t||N(e,1,this.length),this[e]},i.prototype.readUInt16LE=function(e,t){return t||N(e,2,this.length),this[e]|this[e+1]<<8},i.prototype.readUInt16BE=function(e,t){return t||N(e,2,this.length),this[e]<<8|this[e+1]},i.prototype.readUInt32LE=function(e,t){return t||N(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},i.prototype.readUInt32BE=function(e,t){return t||N(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},i.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=this[e],o=1,i=0;++i=o&&(r-=Math.pow(2,8*t)),r},i.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||N(e,t,this.length);for(var r=t,o=1,i=this[e+--r];r>0&&(o*=256);)i+=this[e+--r]*o;return o*=128,i>=o&&(i-=Math.pow(2,8*t)),i},i.prototype.readInt8=function(e,t){return t||N(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},i.prototype.readInt16LE=function(e,t){t||N(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt16BE=function(e,t){t||N(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},i.prototype.readInt32LE=function(e,t){return t||N(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},i.prototype.readInt32BE=function(e,t){return t||N(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},i.prototype.readFloatLE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!0,23,4)},i.prototype.readFloatBE=function(e,t){return t||N(e,4,this.length),Z.read(this,e,!1,23,4)},i.prototype.readDoubleLE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!0,52,8)},i.prototype.readDoubleBE=function(e,t){return t||N(e,8,this.length),Z.read(this,e,!1,52,8)},i.prototype.writeUIntLE=function(e,t,n,r){if(e=+e,t|=0,n|=0,!r){j(this,e,t,n,Math.pow(2,8*n)-1,0)}var o=1,i=0;for(this[t]=255&e;++i=0&&(i*=256);)this[t+o]=e/i&255;return t+n},i.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,255,0),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},i.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},i.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,65535,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},i.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):D(this,e,t,!0),t+4},i.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,4294967295,0),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},i.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=0,a=1,s=0;for(this[t]=255&e;++i>0)-s&255;return t+n},i.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var o=Math.pow(2,8*n-1);j(this,e,t,n,o-1,-o)}var i=n-1,a=1,s=0;for(this[t+i]=255&e;--i>=0&&(a*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/a>>0)-s&255;return t+n},i.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,1,127,-128),i.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},i.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},i.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,2,32767,-32768),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},i.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),i.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):D(this,e,t,!0),t+4},i.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||j(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),i.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):D(this,e,t,!1),t+4},i.prototype.writeFloatLE=function(e,t,n){return H(this,e,t,!0,n)},i.prototype.writeFloatBE=function(e,t,n){return H(this,e,t,!1,n)},i.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},i.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},i.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r=this.length)throw new RangeError("sourceStart out of bounds");if(r<0)throw new RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t=0;--o)e[o+t]=this[o+n];else if(a<1e3||!i.TYPED_ARRAY_SUPPORT)for(o=0;o>>=0,n=void 0===n?this.length:n>>>0,e||(e=0);var a;if("number"==typeof e)for(a=t;a0&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.container=e.container,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=this.container.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,this.container.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(this.container.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(this.container.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var e=void 0;try{e=document.execCommand(this.action)}catch(t){e=!1}this.handleResult(e)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.trigger&&this.trigger.focus(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":o(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),e}();e.exports=a})},function(e,t,n){"use strict";function r(e){if(e.sheet)return e.sheet;for(var t=0;t1?i-1:0),s=1;s .Select-control .Select-value {\n line-height: 19px;\n}\n#aframeInspector .propertyRow .Select-input {\n height: 22px;\n}\n#aframeInspector .propertyRow input[type=text],\n#aframeInspector .propertyRow input[type=number],\n#aframeInspector .propertyRow input.string,\n#aframeInspector .propertyRow input.number {\n background: #1d1d1d;\n color: #1faaf2;\n min-height: 26px;\n padding-left: 5px;\n padding-right: 5px;\n}\n#aframeInspector .propertyRow input[type=text]:last-child,\n#aframeInspector .propertyRow input[type=number]:last-child,\n#aframeInspector .propertyRow input.string:last-child,\n#aframeInspector .propertyRow input.number:last-child {\n padding-right: 0;\n}\n#aframeInspector .propertyRow input.string {\n padding-left: 8px;\n box-sizing: border-box;\n width: 165px;\n}\n#aframeInspector .propertyRow .color_value {\n margin: 0 0 0 5px;\n width: 68px;\n letter-spacing: 1px;\n}\n#aframeInspector .propertyRowDefined .text {\n color: #fafafa;\n font-weight: 500;\n}\n#aframeInspector .components * {\n vertical-align: middle;\n}\n#aframeInspector span.subcomponent {\n color: #999;\n float: none !important;\n margin-left: 10px;\n vertical-align: top !important;\n}\n#aframeInspector a.help-link {\n opacity: 0.4;\n}\n#aframeInspector a.help-linkhover {\n opacity: 1;\n}\n#aframeInspector #addComponentContainer {\n align-items: center;\n display: flex;\n flex-direction: column;\n justify-content: center;\n padding: 20px 10px;\n background: #1d1d1d;\n}\n#aframeInspector #addComponentContainer #addComponent {\n text-align: left;\n width: 200px;\n}\n#aframeInspector #addComponentContainer #addComponent .select__control {\n background: #161616;\n height: 35px;\n color: #1faaf2;\n}\n#aframeInspector #addComponentContainer #addComponent .option {\n display: flex;\n justify-content: space-between;\n}\n#aframeInspector #addComponentContainer #addComponent .option span {\n color: #1faaf2;\n}\n#aframeInspector #addComponentContainer #addComponentHeader {\n font-size: 15px;\n margin: 5px 0 10px 0;\n}\n#aframeInspector .Select-menu-outer .is-focused span {\n color: #fff;\n}\n#aframeInspector .component-title {\n align-items: center;\n display: flex;\n}\n#aframeInspector #componentEntityHeader .collapsible-header {\n bottom: 4px;\n position: relative;\n}\n#aframeInspector #componentEntityHeader .collapse-button {\n display: none;\n}\n#aframeInspector #componentEntityHeader .static {\n height: 13px;\n}\n#aframeInspector #componentEntityHeader .entityPrint {\n font-size: 15px;\n padding-left: 5px;\n}\n#aframeInspector #componentEntityHeader .entityName {\n max-width: 160px;\n top: 0;\n}\n#aframeInspector #componentEntityHeader .entityIcons {\n color: #fafafa;\n}\n#aframeInspector #mixinSelect {\n width: 160px;\n}\n#aframeInspector .propertyRow .texture {\n display: flex;\n}\n#aframeInspector .propertyRow .texture input {\n margin-left: 0;\n width: 120px;\n}\n#aframeInspector #componentEntityHeader .gltfIcon img {\n top: 0;\n}\n#aframeInspector .fa {\n color: #c3c3c3;\n}\n#aframeInspector .fa:hover {\n color: #1faaf2;\n}\n#aframeInspector .entityPrint {\n font-family: system-ui, BlinkMacSystemFont, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;\n}\n#aframeInspector .entityName {\n display: inline-block;\n overflow: hidden;\n position: relative;\n text-overflow: ellipsis;\n top: 3px;\n white-space: nowrap;\n}\n#aframeInspector [data-entity-name-type="id"] {\n color: #92374d;\n}\n#aframeInspector [data-entity-name-type="class"] {\n color: #514b23;\n}\n#aframeInspector [data-entity-name-type="mixin"] {\n color: #d66853;\n}\n#aframeInspector .help-lists {\n display: flex;\n justify-content: space-around;\n}\n#aframeInspector .help-list {\n list-style: none;\n margin: 0;\n padding: 0 0 10px;\n width: 350px;\n}\n#aframeInspector .help-list li {\n margin-right: 40px;\n}\n#aframeInspector .help-key-unit {\n line-height: 1.8;\n margin-right: 2em;\n padding: 5px 0;\n}\n#aframeInspector .help-key {\n bottom: 2px;\n margin-right: 4px;\n min-width: 60px;\n position: relative;\n}\n#aframeInspector .help-key span {\n background-color: #2e2e2e;\n background-repeat: repeat-x;\n border: 1px solid #666;\n border-radius: 3px;\n box-shadow: 0 0 5px #000;\n color: #999;\n display: inline-block;\n font-size: 12px;\n padding: 0 8px;\n text-align: center;\n}\n#aframeInspector .help-key-def {\n color: #bbb;\n display: inline-block;\n margin-left: 1em;\n}\n#aframeInspector .select__control {\n border: 0;\n border-radius: 0;\n cursor: pointer;\n min-height: 26px;\n font-family: system-ui, BlinkMacSystemFont, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;\n font-size: 13px;\n}\n#aframeInspector .select__indicator {\n height: 26px;\n}\n#aframeInspector .select__indicator-separator {\n display: none;\n}\n#aframeInspector .select__control,\n#aframeInspector .select__menu {\n background: #1d1d1d;\n}\n#aframeInspector .select__option {\n padding: 5px 10px;\n}\n#aframeInspector .select__placeholder,\n#aframeInspector .select__menu {\n color: #c3c3c3;\n}\n#aframeInspector .select__single-value {\n color: #1faaf2;\n}\n#aframeInspector .select__control--is-focused {\n box-shadow: none !important;\n}\n#aframeInspector .select__option {\n cursor: pointer;\n}\n#aframeInspector .select__clear-indicator {\n display: none;\n}\n#aframeInspector .select__label {\n font-size: 11px;\n}\n#aframeInspector .select__option--is-focused {\n background: #155373;\n}\n#aframeInspector .select__value-container {\n height: 26px;\n position: static;\n}\n#aframeInspector .select__value-container.select__value-container--is-multi {\n height: auto;\n padding: 6px;\n}\n#aframeInspector .select__dropdown-indicator {\n padding: 3px 8px;\n}\n#aframeInspector .select__multi-value {\n background: #242424;\n color: #1faaf2;\n}\n#aframeInspector .select__multi-value__label {\n color: #1faaf2;\n}\n#aframeInspector .select__value-container--is-multi > :last-child {\n display: none;\n}\n#aframeInspector .select__multi-value__remove:hover {\n color: #fff;\n background: #242424;\n}\n#aframeInspector .modal {\n animation: animateopacity 0.2s ease-out;\n background-color: #000;\n background-color: rgba(0,0,0,0.6);\n display: flex;\n height: 100%;\n left: 0;\n overflow: auto;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 9999999999;\n}\n#aframeInspector .modal h3 {\n font-size: 18px;\n font-weight: 100;\n margin: 0.6em 0;\n}\n#aframeInspector #textureModal .modal-content {\n height: calc(100% - 50px);\n width: calc(100% - 50px);\n}\n#aframeInspector .modal-content {\n animation: animatetop 0.2s ease-out;\n animation-duration: 0.2s;\n animation-name: animatetop;\n background-color: #232323;\n box-shadow: 0 4px 8px 0 rgba(0,0,0,0.5), 0 6px 20px 0 rgba(0,0,0,0.5);\n margin: auto;\n overflow: hidden;\n padding: 0;\n}\n#aframeInspector .close {\n color: #fff;\n float: right;\n font-size: 28px;\n font-weight: bold;\n}\n#aframeInspector .closehover,\n#aframeInspector .closefocus {\n color: #08f;\n cursor: pointer;\n text-decoration: none;\n}\n#aframeInspector .modal-header {\n color: #fff;\n padding: 2px 16px;\n}\n#aframeInspector .modal-body {\n overflow: auto;\n padding: 16px;\n}\n#aframeInspector .modal-footer {\n color: #fff;\n padding: 2px 16px;\n}\n#aframeInspector .gallery {\n background: #232323;\n display: flex;\n flex-wrap: wrap;\n margin: 15px auto 0;\n overflow: auto;\n padding: 15px 3px 3px;\n}\n#aframeInspector .newimage .gallery {\n padding: 16px;\n}\n#aframeInspector .gallery li {\n border-radius: 2px;\n box-shadow: 0 0 6px rgba(0,0,0,0.6);\n cursor: pointer;\n margin: 8px;\n overflow: hidden;\n width: 155px;\n}\n#aframeInspector .gallery li.selected,\n#aframeInspector .gallery li:hover {\n box-shadow: 0 0 0 2px #1eaaf1;\n}\n#aframeInspector .gallery li .detail {\n background-color: #323232;\n margin: 0;\n min-height: 60px;\n padding: 3px 10px;\n}\n#aframeInspector .gallery li .button.fa-external-link {\n margin-left: 136px;\n margin-top: 5px;\n position: fixed;\n}\n#aframeInspector .preview {\n padding: 10px;\n width: 150px;\n}\n#aframeInspector .preview input {\n display: block;\n margin: 8px 0;\n width: 144px;\n}\n#aframeInspector .preview button {\n width: 155px;\n}\n#aframeInspector .preview .detail .title {\n color: #fff;\n display: inline-block;\n max-width: 155px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n#aframeInspector .gallery li.selected .detail,\n#aframeInspector .gallery li:hover .detail {\n background-color: #444;\n}\n#aframeInspector .gallery li .detail span {\n color: #777;\n display: block;\n margin-top: 4px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n width: 140px;\n}\n#aframeInspector .gallery li.selected .detail span,\n#aframeInspector .gallery li:hover .detail span {\n color: #888;\n}\n#aframeInspector .gallery li .detail span.title {\n color: #fff !important;\n}\n#aframeInspector .modal button {\n appearance: none;\n border-radius: 0;\n box-shadow: none;\n cursor: pointer;\n display: inline-block;\n font-size: 12px;\n line-height: 1.8;\n margin: 0 10px 0 0;\n padding: 5px 10px;\n}\n#aframeInspector .modal buttonfocus {\n outline: none;\n}\n#aframeInspector .modal button {\n background-color: #1eaaf1;\n border: none;\n color: #fff;\n}\n#aframeInspector .modal buttonhover,\n#aframeInspector .modal button.hover {\n background-color: #346392;\n text-shadow: -1px 1px #27496d;\n}\n#aframeInspector .modal buttonactive,\n#aframeInspector .modal button.active {\n background-color: #27496d;\n text-shadow: -1px 1px #193047;\n}\n#aframeInspector .modal buttondisabled {\n background-color: #888;\n cursor: none;\n}\n#aframeInspector .newimage {\n background-color: #323232;\n color: #bcbcbc;\n display: flex;\n font-size: 13px;\n justify-content: space-between;\n margin-top: 10px;\n overflow: auto;\n padding: 10px;\n}\n#aframeInspector .newimage input {\n color: #1eaaf1;\n padding: 3px 5px;\n}\n#aframeInspector .texture canvas + input {\n margin-left: 5px;\n}\n#aframeInspector .texture .fa {\n padding-right: 5px;\n}\n#aframeInspector .texture .fa-external-link {\n font-size: 14px;\n padding-top: 2px;\n}\n#aframeInspector .uploader-normal-button .hidden {\n display: none;\n}\n#aframeInspector .gallery a.fa.texture-link {\n box-shadow: 0 0 14px -1px rgba(0,0,0,0.75);\n position: fixed;\n}\n#aframeInspector .assets.search {\n margin-top: 10px;\n width: 200px;\n}\n#aframeInspector .assets.search .fa-search {\n top: 7px;\n}\n#aframeInspector .new_asset_options {\n margin: 10px;\n}\n#aframeInspector .new_asset_options > ul {\n margin-left: 10px;\n padding: 5px;\n}\n#aframeInspector .new_asset_options > ul > li {\n padding: 10px 0;\n}\n#aframeInspector .new_asset_options .imageUrl {\n margin-left: 5px;\n width: 350px;\n}\n#aframeInspector .texture canvas {\n border: 1px solid #333;\n cursor: pointer;\n}\n#aframeInspector #viewportBar {\n align-items: center;\n background-color: #242424;\n color: #c3c3c3;\n display: flex;\n flex-grow: 2;\n height: 32px;\n font-size: 14px;\n justify-content: space-between;\n left: 0;\n margin: 0 auto;\n right: 0;\n top: 0;\n}\n#aframeInspector .toolbarButtons {\n position: relative;\n}\n#aframeInspector .toolbarButtons * {\n margin-left: 0;\n padding: 8px;\n vertical-align: middle;\n}\n#aframeInspector .toolbarButtons a.button {\n margin: 0 6px 0 0;\n}\n#aframeInspector .toolbarButtons a.button:not(.active):hover {\n background-color: #444;\n}\n#aframeInspector .toolbarButtons .active {\n background-color: #1faaf2;\n color: #fff;\n}\n#aframeInspector .toolbarButtons .active:hover {\n color: #fff !important;\n}\n#aframeInspector .local-transform {\n padding-left: 10px;\n}\n#aframeInspector .local-transform label {\n color: #aaa;\n padding-left: 5px;\n}\n#aframeInspector .local-transform a.button {\n padding-top: 0;\n}\n#aframeInspector #cameraSelect {\n cursor: pointer;\n width: 110px;\n}\n#aframeInspector #cameraSelect .select__dropdown-indicator {\n padding-left: 3px;\n padding-right: 3px;\n}\n#aframeInspector #cameraToolbar {\n margin-left: 5px;\n align-items: center;\n display: flex;\n}\n#aframeInspector #cameraToolbar a {\n margin-right: 10px;\n}\n#aframeInspector #cameraToolbar .select__control {\n background: none;\n}\n#aframeInspector #cameraToolbar .select__single-value {\n color: #c3c3c3;\n}\n#aframeInspector #cameraToolbar .select__single-value:hover {\n color: #1faaf2;\n}\n#aframeInspector #viewportHud {\n display: none;\n}\n@media (min-width: 1024px) {\n #aframeInspector #viewportHud {\n display: block;\n }\n}\n#aframeInspector .Select-control {\n background-color: #222 !important;\n border: none;\n border-radius: 0;\n color: #1faaf2;\n font-family: $monosapce;\n}\n#aframeInspector .Select-menu-outer {\n border: none;\n}\n#aframeInspector .Select-menu-outer .is-focused {\n background-color: #1faaf2 !important;\n color: #c3c3c3;\n}\n#aframeInspector .Select-option {\n background-color: #222 !important;\n}\n#aframeInspector .select-widget {\n display: inline-block;\n width: 157px;\n}\n#aframeInspector .Select-placeholder,\n#aframeInspector .Select--single > .Select-control .Select-value {\n color: #1faaf2 !important;\n}\n#aframeInspector .Select-value-label {\n color: #1faaf2 !important;\n}\n#aframeInspector .dropbtn {\n border: none;\n color: #c3c3c3;\n cursor: pointer;\n}\n#aframeInspector .dropdown {\n display: inline-block;\n position: relative;\n}\n#aframeInspector .dropdown-content {\n background-color: #f9f9f9;\n box-shadow: 0 8px 16px 0 rgba(0,0,0,0.2);\n display: none;\n left: 8px;\n min-width: 38px;\n position: absolute;\n z-index: 999;\n}\n#aframeInspector .dropdown-content a {\n background-color: #232323;\n color: #7d7d7d;\n display: block;\n padding: 10px 14px;\n text-decoration: none;\n}\n#aframeInspector .dropdown-content a:hover {\n background-color: #4ecbff;\n color: #c3c3c3;\n}\n#aframeInspector .dropdownhover .dropdown-content {\n display: block;\n}\n#aframeInspector .dropdownhover .dropbtn {\n color: #1faaf2;\n}\n#aframeInspector .Select,\n#aframeInspector code,\n#aframeInspector pre,\n#aframeInspector input,\n#aframeInspector textarea,\n#aframeInspector select {\n font-family: system-ui, BlinkMacSystemFont, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;\n font-size: 13px;\n}\n#aframeInspector .wf-robotomono-n4-active .Select,\n#aframeInspector .wf-robotomono-n4-active code,\n#aframeInspector .wf-robotomono-n4-active pre,\n#aframeInspector .wf-robotomono-n4-active input,\n#aframeInspector .wf-robotomono-n4-active textarea,\n#aframeInspector .wf-robotomono-n4-active select {\n font-family: Roboto Mono, Consolas, Andale Mono, Monaco, Courier New, monospace;\n}\n#aframeInspector hr {\n border: 0;\n border-top: 1px solid #ccc;\n}\n#aframeInspector a {\n cursor: pointer;\n}\n#aframeInspector button {\n position: relative;\n}\n#aframeInspector code {\n font-family: Consolas, Andale Mono, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace;\n}\n#aframeInspector textarea {\n tab-size: 4;\n white-space: pre;\n word-wrap: normal;\n}\n#aframeInspector textarea.success {\n border-color: #8b8 !important;\n}\n#aframeInspector textarea.fail {\n background-color: rgba(255,0,0,0.05);\n border-color: #f00 !important;\n}\n#aframeInspector textarea,\n#aframeInspector input {\n outline: none /* osx */;\n}\n#aframeInspector .gltfIcon img {\n height: 20px;\n left: 5px;\n padding: 0 5px;\n position: relative;\n top: 4px;\n width: 20px;\n}\n#aframeInspector #scenegraph,\n#aframeInspector #rightPanel {\n z-index: 0;\n}\n#aframeInspector #sidebar,\n#aframeInspector #scenegraph,\n#aframeInspector .panel {\n cursor: default;\n user-select: none;\n}\n#aframeInspector .toggle-edit {\n background-color: #92374d;\n color: #fafafa;\n font-size: 13px;\n left: 3px;\n margin: 0;\n padding: 6px 10px;\n position: fixed;\n text-align: center;\n text-decoration: none;\n top: 3px;\n width: 204px;\n z-index: 999999999;\n}\n#aframeInspector .toggle-edithover {\n background-color: #e42b5a;\n}\n#aframeInspector input {\n background-color: transparent;\n border: 1px solid #555;\n color: #fff;\n}\n#aframeInspector input,\n#aframeInspector .texture canvas {\n transition: 0.1s background-color ease-in-out, 0.1s border-color ease-in-out, 0.1s color ease-in-out;\n}\n#aframeInspector input[type=text],\n#aframeInspector input[type=number],\n#aframeInspector input.string,\n#aframeInspector input.number {\n min-height: 14px;\n outline: none;\n}\n#aframeInspector input[type="checkbox"] {\n cursor: pointer;\n margin: 0;\n height: 18px;\n width: 18px;\n}\n#aframeInspector input.number {\n background-color: transparent !important;\n border: 0;\n color: #2cb7ff !important;\n cursor: col-resize;\n font-size: 13px;\n padding: 2px;\n}\n#aframeInspector input.stringfocus,\n#aframeInspector input.numberfocus {\n border: 1px solid #20b1fb;\n color: #fff;\n cursor: auto;\n}\n#aframeInspector input.error {\n border: 1px solid #a00;\n}\n#aframeInspector #sidebar {\n background: #242424;\n width: 331px;\n}\n#aframeInspector #sidebar * {\n vertical-align: middle;\n}\n#aframeInspector input,\n#aframeInspector textarea,\n#aframeInspector select {\n background: #222;\n border: 1px solid transparent;\n color: #888;\n}\n#aframeInspector select {\n background: #393939;\n}\n#aframeInspector input[type=color] {\n background-color: #333;\n border: 1px solid #111;\n height: 28px;\n cursor: pointer;\n}\n#aframeInspector input[type=color] {\n cursor: pointer;\n height: 25px;\n padding: 0;\n width: 50px;\n}\n#aframeInspector input[type=color]-webkit-color-swatch {\n border: 0 /* To remove the gray border. */;\n}\n#aframeInspector input[type=color]-webkit-color-swatch-wrapper {\n padding: 0 /* To remove the inner padding. */;\n}\n#aframeInspector input[type=color]-moz-color-swatch {\n border: 0;\n}\n#aframeInspector input[type=color]-moz-focus-inner {\n border: 0 /* To remove the inner border (specific to Firefox). */;\n padding: 0;\n}\n#aframeInspector .hidden {\n visibility: hidden;\n}\n#aframeInspector a.button {\n color: #bcbcbc;\n font-size: 16px;\n margin-left: 10px;\n text-decoration: none;\n}\n#aframeInspector a.buttonhover {\n color: #1faaf2;\n}\n#aframeInspector .hide {\n display: none;\n}\n#aframeInspector .a-canvas.state-dragging {\n cursor: grabbing;\n}\n#aframeInspector #inspectorContainer {\n display: flex;\n justify-content: space-between;\n left: 0;\n height: calc(100% - 300px);\n pointer-events: none;\n position: fixed;\n top: 0;\n width: 100%;\n z-index: 999999;\n}\n#aframeInspector #scenegraph,\n#aframeInspector #viewportBar,\n#aframeInspector #rightPanel {\n pointer-events: all;\n}\n#aframeInspector .aframe-inspector-opened a-scene .a-canvas {\n background-color: #191919;\n z-index: 9998;\n}\n#aframeInspector .toggle-sidebar {\n align-items: center;\n display: flex;\n height: 100%;\n position: absolute;\n z-index: 9998;\n}\n#aframeInspector .toggle-sidebar .left {\n left: 0;\n}\n#aframeInspector .toggle-sidebar .right {\n right: 0;\n}\n#aframeInspector .toggle-sidebar a {\n background-color: #262626;\n color: #bcbcbc;\n padding: 5px;\n z-index: 9998;\n}\n#aframeInspector .toggle-sidebar a.hover {\n background-color: #1faaf2;\n color: #fff;\n}\n@-moz-keyframes animateopacity {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-webkit-keyframes animateopacity {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@-o-keyframes animateopacity {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n@keyframes animateopacity {\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n}\n',""])},function(e,t){e.exports=function(){var e=[];return e.toString=function(){for(var e=[],t=0;t0&&l.length>s&&!l.warned){l.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+l.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=l.length,r(c)}return e}function u(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function l(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},o=u.bind(r);return o.listener=n,r.wrapFn=o,o}function c(e,t,n){var r=e._events;if(void 0===r)return[];var o=r[t];return void 0===o?[]:"function"==typeof o?n?[o.listener||o]:[o]:n?h(o):p(o,o.length)}function f(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function p(e,t){for(var n=new Array(t),r=0;r0&&(i=t[0]),i instanceof Error)throw i;var a=new Error("Unhandled error."+(i?" ("+i.message+")":""));throw a.context=i,a}var s=o[e];if(void 0===s)return!1;if("function"==typeof s)E(s,this,t);else for(var u=s.length,l=p(s,u),n=0;n=0;a--)if(n[a]===t||n[a].listener===t){s=n[a].listener,o=a;break}if(o<0)return this;0===o?n.shift():d(n,o),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var o,i=Object.keys(n);for(r=0;r=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return c(this,e,!0)},o.prototype.rawListeners=function(e){return c(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):f.call(e,t)},o.prototype.listenerCount=f,o.prototype.eventNames=function(){return this._eventsCount>0?y(this._events):[]}},function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},function(e,t,n){function r(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!s.string(t))throw new TypeError("Second argument must be a String");if(!s.fn(n))throw new TypeError("Third argument must be a Function");if(s.node(e))return o(e,t,n);if(s.nodeList(e))return i(e,t,n);if(s.string(e))return a(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}function o(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}function i(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}function a(e,t,n){return u(document.body,e,t,n)}var s=n(152),u=n(146);e.exports=r},function(e,t,n){"use strict";function r(e){return i.isMemo(e)?l:c[e.$$typeof]||a}function o(e,t,n){if("string"!=typeof t){if(v){var i=m(t);i&&i!==v&&o(e,i,n)}var a=p(t);d&&(a=a.concat(d(t)));for(var u=r(e),l=r(t),c=0;c */ t.read=function(e,t,n,r,o){var i,a,s=8*o-r-1,u=(1<>1,c=-7,f=n?o-1:0,p=n?-1:1,d=e[t+f];for(f+=p,i=d&(1<<-c)-1,d>>=-c,c+=s;c>0;i=256*i+e[t+f],f+=p,c-=8);for(a=i&(1<<-c)-1,i>>=-c,c+=r;c>0;a=256*a+e[t+f],f+=p,c-=8);if(0===i)i=1-l;else{if(i===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,r),i-=l}return(d?-1:1)*a*Math.pow(2,i-r)},t.write=function(e,t,n,r,o,i){var a,s,u,l=8*i-o-1,c=(1<>1,p=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=c):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),t+=a+f>=1?p/u:p*Math.pow(2,1-f),t*u>=2&&(a++,u/=2),a+f>=c?(s=0,a=c):a+f>=1?(s=(t*u-1)*Math.pow(2,o),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,o),a=0));o>=8;e[n+d]=255&s,d+=h,s/=256,o-=8);for(a=a<0;e[n+d]=255&a,d+=h,a/=256,l-=8);e[n+d-h]|=128*m}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==n.call(e)}},function(e,t,n){"use strict";function r(e,t){return e===t||!(!a(e)||!a(t))}function o(e,t){if(e.length!==t.length)return!1;for(var n=0;n=0&&(d.minimumUpdatePeriod=1e3*l),t&&(d.locations=t),"dynamic"===s&&(d.suggestedPresentationDelay=u);var h=0===d.playlists.length;return f.length&&(d.mediaGroups.AUDIO.audio=R(f,n,h)),p.length&&(d.mediaGroups.SUBTITLES.subs=I(p,n)),d},D=function(e,t,n){var r=e.NOW,o=e.clientOffset,i=e.availabilityStartTime,a=e.timescale,s=void 0===a?1:a,u=e.start,l=void 0===u?0:u,c=e.minimumUpdatePeriod,f=void 0===c?0:c,p=(r+o)/1e3,d=i+l,h=p+f,m=h-d;return Math.ceil((m*s-t)/n)},F=function(e,t){for(var n=e.type,r=void 0===n?"static":n,o=e.minimumUpdatePeriod,i=void 0===o?0:o,a=e.media,s=void 0===a?"":a,u=e.sourceDuration,l=e.timescale,c=void 0===l?1:l,f=e.startNumber,p=void 0===f?1:f,d=e.periodIndex,h=[],m=-1,v=0;vm&&(m=E);var w=void 0;if(b<0){var x=v+1;w=x===t.length?"dynamic"===r&&i>0&&s.indexOf("$Number$")>0?D(e,m,y):(u*c-m)/y:(t[x].t-m)/y}else w=b+1;for(var S=p+h.length+w,k=p+h.length;k=o?i:""+new Array(o-i.length+1).join("0")+i)}},z=function(e,t){return e.replace(H,U(t))},B=function(e,t){return e.duration||t?e.duration?w(e):F(e,t):[{number:e.startNumber||1,duration:e.sourceDuration,time:0,timeline:e.periodIndex}]},V=function(e,t){var o={RepresentationID:e.id,Bandwidth:e.bandwidth||0},i=e.initialization,a=void 0===i?{sourceURL:"",range:""}:i,s=v({baseUrl:e.baseUrl,source:z(a.sourceURL,o),range:a.range});return B(e,t).map(function(t){o.Number=t.number,o.Time=t.time;var i=z(e.media||"",o),a={uri:i,timeline:t.timeline,duration:t.duration,resolvedUri:n.i(r.a)(e.baseUrl||"",i),map:s,number:t.number};return e.presentationTimeOffset&&(a.presentationTimeOffset=e.presentationTimeOffset),a})},G=function(e,t){var n=e.baseUrl,r=e.initialization,o=void 0===r?{}:r,i=v({baseUrl:n,source:o.sourceURL,range:o.range}),a=v({baseUrl:n,source:t.media,range:t.mediaRange});return a.map=i,a},Y=function(e,t){var n=e.duration,r=e.segmentUrls,o=void 0===r?[]:r;if(!n&&!t||n&&t)throw new Error(m.SEGMENT_TIME_UNSPECIFIED);var i,a=o.map(function(t){return G(e,t)});return n&&(i=w(e)),t&&(i=F(e,t)),i.map(function(e,t){if(a[t]){var n=a[t];return n.timeline=e.timeline,n.duration=e.duration,n.number=e.number,n}}).filter(function(e){return e})},W=function(e){var t,n,r=e.attributes,o=e.segmentInfo;o.template?(n=V,t=l(r,o.template),o.template.presentationTimeOffset&&(t.presentationTimeOffset=o.template.presentationTimeOffset/o.template.timescale)):o.base?(n=x,t=l(r,o.base)):o.list&&(n=Y,t=l(r,o.list));var i={attributes:r};if(!n)return i;var a=n(t,o.timeline);if(t.duration){var s=t,u=s.duration,c=s.timescale,f=void 0===c?1:c;t.duration=u/f}else a.length?t.duration=a.reduce(function(e,t){return Math.max(e,Math.ceil(t.duration))},0):t.duration=0;return i.attributes=t,i.segments=a,o.base&&t.indexRange&&(i.sidx=a[0],i.segments=[]),i},q=function(e){return e.map(W)},$=function(e,t){return d(e.childNodes).filter(function(e){return e.tagName===t})},X=function(e){return e.textContent.trim()},Q=function(e){var t=/P(?:(\d*)Y)?(?:(\d*)M)?(?:(\d*)D)?(?:T(?:(\d*)H)?(?:(\d*)M)?(?:([\d.]*)S)?)?/,n=t.exec(e);if(!n)return 0;var r=n.slice(1),o=r[0],i=r[1],a=r[2],s=r[3],u=r[4],l=r[5];return 31536e3*parseFloat(o||0)+2592e3*parseFloat(i||0)+86400*parseFloat(a||0)+3600*parseFloat(s||0)+60*parseFloat(u||0)+parseFloat(l||0)},Z=function(e){return/^\d+-\d+-\d+T\d+:\d+:\d+(\.\d+)?$/.test(e)&&(e+="Z"),Date.parse(e)},K={mediaPresentationDuration:function(e){return Q(e)},availabilityStartTime:function(e){return Z(e)/1e3},minimumUpdatePeriod:function(e){return Q(e)},suggestedPresentationDelay:function(e){return Q(e)},type:function(e){return e},timeShiftBufferDepth:function(e){return Q(e)},start:function(e){return Q(e)},width:function(e){return parseInt(e,10)},height:function(e){return parseInt(e,10)},bandwidth:function(e){return parseInt(e,10)},startNumber:function(e){return parseInt(e,10)},timescale:function(e){return parseInt(e,10)},presentationTimeOffset:function(e){return parseInt(e,10)},duration:function(e){var t=parseInt(e,10);return isNaN(t)?Q(e):t},d:function(e){return parseInt(e,10)},t:function(e){return parseInt(e,10)},r:function(e){return parseInt(e,10)},DEFAULT:function(e){return e}},J=function(e){return e&&e.attributes?d(e.attributes).reduce(function(e,t){var n=K[t.name]||K.DEFAULT;return e[t.name]=n(t.value),e},{}):{}},ee={"urn:uuid:1077efec-c0b2-4d02-ace3-3c1e52e2fb4b":"org.w3.clearkey","urn:uuid:edef8ba9-79d6-4ace-a3c8-27dcd51d21ed":"com.widevine.alpha","urn:uuid:9a04f079-9840-4286-ab92-e65be0885f95":"com.microsoft.playready","urn:uuid:f239e769-efa3-4850-9c16-a903c6932efb":"com.adobe.primetime"},te=function(e,t){return t.length?p(e.map(function(e){return t.map(function(t){return n.i(r.a)(e,X(t))})})):e},ne=function(e){var t=$(e,"SegmentTemplate")[0],n=$(e,"SegmentList")[0],r=n&&$(n,"SegmentURL").map(function(e){return l({tag:"SegmentURL"},J(e))}),o=$(e,"SegmentBase")[0],i=n||t,a=i&&$(i,"SegmentTimeline")[0],s=n||o||t,u=s&&$(s,"Initialization")[0],c=t&&J(t);c&&u?c.initialization=u&&J(u):c&&c.initialization&&(c.initialization={sourceURL:c.initialization});var f={template:c,timeline:a&&$(a,"S").map(function(e){return J(e)}),list:n&&l(J(n),{segmentUrls:r,initialization:J(u)}),base:o&&l(J(o),{initialization:J(u)})};return Object.keys(f).forEach(function(e){f[e]||delete f[e]}),f},re=function(e,t,n){return function(r){var o=$(r,"BaseURL"),i=te(t,o),a=l(e,J(r)),s=ne(r);return i.map(function(e){return{segmentInfo:l(n,s),attributes:l(a,{baseUrl:e})}})}},oe=function(e){return e.reduce(function(e,t){var r=J(t),o=ee[r.schemeIdUri];if(o){e[o]={attributes:r};var i=$(t,"cenc:pssh")[0];if(i){var s=X(i),u=s&&n.i(a.a)(s);e[o].pssh=u}}return e},{})},ie=function(e,t,n){return function(r){var o=J(r),i=te(t,$(r,"BaseURL")),a=$(r,"Role")[0],s={role:J(a)},u=l(e,o,s),c=$(r,"Label")[0];if(c&&c.childNodes.length){var f=c.childNodes[0].nodeValue.trim();u=l(u,{label:f})}var d=oe($(r,"ContentProtection"));Object.keys(d).length&&(u=l(u,{contentProtection:d}));var h=ne(r),m=$(r,"Representation"),v=l(n,h);return p(m.map(re(u,i,v)))}},ae=function(e,t){return function(n,r){var o=te(t,$(n,"BaseURL")),a=J(n),s=parseInt(a.id,10),u=i.a.isNaN(s)?r:s,c=l(e,{periodIndex:u}),f=$(n,"AdaptationSet"),d=ne(n);return p(f.map(ie(c,o,d)))}},se=function(e,t){void 0===t&&(t={});var n=t,r=n.manifestUri,o=void 0===r?"":r,i=n.NOW,a=void 0===i?Date.now():i,s=n.clientOffset,u=void 0===s?0:s,l=$(e,"Period");if(!l.length)throw new Error(m.INVALID_NUMBER_OF_PERIOD);var c=$(e,"Location"),f=J(e),d=te([o],$(e,"BaseURL"));return f.sourceDuration=f.mediaPresentationDuration||0,f.NOW=a,f.clientOffset=u,c.length&&(f.locations=c.map(X)),{locations:f.locations,representationInfo:p(l.map(ae(f,d)))}},ue=function(e){if(""===e)throw new Error(m.DASH_EMPTY_MANIFEST);var t,n,r=new s.DOMParser;try{t=r.parseFromString(e,"application/xml"),n=t&&"MPD"===t.documentElement.tagName?t.documentElement:null}catch(e){}if(!n||n&&n.getElementsByTagName("parsererror").length>0)throw new Error(m.DASH_INVALID_XML);return n},le=function(e){var t=$(e,"UTCTiming")[0];if(!t)return null;var n=J(t);switch(n.schemeIdUri){case"urn:mpeg:dash:utc:http-head:2014":case"urn:mpeg:dash:utc:http-head:2012":n.method="HEAD";break;case"urn:mpeg:dash:utc:http-xsdate:2014":case"urn:mpeg:dash:utc:http-iso:2014":case"urn:mpeg:dash:utc:http-xsdate:2012":case"urn:mpeg:dash:utc:http-iso:2012":n.method="GET";break;case"urn:mpeg:dash:utc:direct:2014":case"urn:mpeg:dash:utc:direct:2012":n.method="DIRECT",n.value=Date.parse(n.value);break;case"urn:mpeg:dash:utc:http-ntp:2014":case"urn:mpeg:dash:utc:ntp:2014":case"urn:mpeg:dash:utc:sntp:2014":default:throw new Error(m.UNSUPPORTED_UTC_TIMING_SCHEME)}return n},ce="0.16.0",fe=function(e,t){void 0===t&&(t={});var n=se(ue(e),t),r=q(n.representationInfo);return L(r,n.locations,t.sidxMapping)},pe=function(e){return le(ue(e))}},function(e,t,n){(function(t){(function(){var n,r,o,i,a,s;"undefined"!=typeof performance&&null!==performance&&performance.now?e.exports=function(){return performance.now()}:void 0!==t&&null!==t&&t.hrtime?(e.exports=function(){return(n()-a)/1e6},r=t.hrtime,n=function(){var e;return e=r(),1e9*e[0]+e[1]},i=n(),s=1e9*t.uptime(),a=i-s):Date.now?(e.exports=function(){return Date.now()-o},o=Date.now()):(e.exports=function(){return(new Date).getTime()-o},o=(new Date).getTime())}).call(this)}).call(t,n(67))},function(e,t,n){"use strict";function r(){}function o(){}var i=n(161);o.resetWarningCache=r,e.exports=function(){function e(e,t,n,r,o,a){if(a!==i){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},function(e,t,n){"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},function(e,t,n){(function(t){for(var r=n(159),o="undefined"==typeof window?t:window,i=["moz","webkit"],a="AnimationFrame",s=o["request"+a],u=o["cancel"+a]||o["cancelRequest"+a],l=0;!s&&lt}return!1}function l(e,t,n,r,o,i,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=o,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=a}function c(e){return e[1].toUpperCase()}function f(e,t,n,r){var o=ti.hasOwnProperty(t)?ti[t]:null;(null!==o?0===o.type:!r&&(2--s||o[a]!==i[s])return"\n"+o[a].replace(" at new "," at ")}while(1<=a&&0<=s);break}}}finally{Ti=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?d(e):""}function m(e){switch(e.tag){case 5:return d(e.type);case 16:return d("Lazy");case 13:return d("Suspense");case 19:return d("SuspenseList");case 0:case 2:case 15:return e=h(e.type,!1);case 11:return e=h(e.type.render,!1);case 22:return e=h(e.type._render,!1);case 1:return e=h(e.type,!0);default:return""}}function v(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case ai:return"Fragment";case ii:return"Portal";case ui:return"Profiler";case si:return"StrictMode";case pi:return"Suspense";case di:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case ci:return(e.displayName||"Context")+".Consumer";case li:return(e._context.displayName||"Context")+".Provider";case fi:var t=e.render;return t=t.displayName||t.name||"",e.displayName||(""!==t?"ForwardRef("+t+")":"ForwardRef");case hi:return v(e.type);case vi:return v(e._render);case mi:t=e._payload,e=e._init;try{return v(e(t))}catch(e){}}return null}function g(e){switch(typeof e){case"boolean":case"number":case"object":case"string":case"undefined":return e;default:return""}}function y(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function b(e){var t=y(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var o=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(e){r=""+e,i.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function E(e){e._valueTracker||(e._valueTracker=b(e))}function w(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=y(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function x(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function S(e,t){var n=t.checked;return Wo({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function k(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=g(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function T(e,t){null!=(t=t.checked)&&f(e,"checked",t,!1)}function C(e,t){T(e,t);var n=g(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?_(e,t.type,n):t.hasOwnProperty("defaultValue")&&_(e,t.type,g(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function O(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,""!==n&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function _(e,t,n){"number"===t&&x(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}function A(e){var t="";return Yo.Children.forEach(e,function(e){null!=e&&(t+=e)}),t}function R(e,t){return e=Wo({children:void 0},t),(t=A(t.children))&&(e.children=t),e}function I(e,t,n,r){if(e=e.options,t){t={};for(var o=0;o=n.length))throw Error(r(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:g(n)}}function N(e,t){var n=g(t.value),r=g(t.defaultValue);null!=n&&(n=""+n,n!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function j(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function L(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function D(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?L(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}function F(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}function H(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||_i.hasOwnProperty(e)&&_i[e]?(""+t).trim():t+"px"}function U(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),o=H(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,o):e[n]=o}}function z(e,t){if(t){if(Ri[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(r(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(r(60));if(!("object"==typeof t.dangerouslySetInnerHTML&&"__html"in t.dangerouslySetInnerHTML))throw Error(r(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(r(62))}}function B(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}function V(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}function G(e){if(e=Rt(e)){if("function"!=typeof Ii)throw Error(r(280));var t=e.stateNode;t&&(t=Mt(t),Ii(e.stateNode,e.type,t))}}function Y(e){Mi?Pi?Pi.push(e):Pi=[e]:Mi=e}function W(){if(Mi){var e=Mi,t=Pi;if(Pi=Mi=null,G(e),t)for(e=0;er?0:1<n;n++)t.push(e);return t}function Ae(e,t,n){e.pendingLanes|=t;var r=t-1;e.suspendedLanes&=r,e.pingedLanes&=r,e=e.eventTimes,t=31-ga(t),e[t]=n}function Re(e){return 0===e?32:31-(ya(e)/ba|0)|0}function Ie(e,t,n,r){ji||X();var o=Pe,i=ji;ji=!0;try{$(o,e,t,n,r)}finally{(ji=i)||Q()}}function Me(e,t,n,r){wa(Ea,Pe.bind(null,e,t,n,r))}function Pe(e,t,n,r){if(xa){var o;if((o=0==(4&t))&&0=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=it(n)}}function st(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?st(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function ut(){for(var e=window,t=x();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;e=t.contentWindow,t=x(e.document)}return t}function lt(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function ct(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xs||null==bs||bs!==x(r)||(r=bs,"selectionStart"in r&<(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),ws&&ot(ws,r)||(ws=r,r=bt(Es,"onSelect"),0Vs||(e.current=Bs[Vs],Bs[Vs]=null,Vs--)}function Lt(e,t){Vs++,Bs[Vs]=e.current,e.current=t}function Dt(e,t){var n=e.type.contextTypes;if(!n)return Gs;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var o,i={};for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ft(e){return null!==(e=e.childContextTypes)&&void 0!==e}function Ht(){jt(Ws),jt(Ys)}function Ut(e,t,n){if(Ys.current!==Gs)throw Error(r(168));Lt(Ys,t),Lt(Ws,n)}function zt(e,t,n){var o=e.stateNode;if(e=t.childContextTypes,"function"!=typeof o.getChildContext)return n;o=o.getChildContext();for(var i in o)if(!(i in e))throw Error(r(108,v(t)||"Unknown",i));return Wo({},n,o)}function Bt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Gs,qs=Ys.current,Lt(Ys,e),Lt(Ws,Ws.current),!0}function Vt(e,t,n){var o=e.stateNode;if(!o)throw Error(r(169));n?(e=zt(e,t,qs),o.__reactInternalMemoizedMergedChildContext=e,jt(Ws),jt(Ys),Lt(Ys,e)):jt(Ws),Lt(Ws,n)}function Gt(){switch(nu()){case ru:return 99;case ou:return 98;case iu:return 97;case au:return 96;case su:return 95;default:throw Error(r(332))}}function Yt(e){switch(e){case 99:return ru;case 98:return ou;case 97:return iu;case 96:return au;case 95:return su;default:throw Error(r(332))}}function Wt(e,t){return e=Yt(e),Qs(e,t)}function qt(e,t,n){return e=Yt(e),Zs(e,t,n)}function $t(){if(null!==fu){var e=fu;fu=null,Ks(e)}Xt()}function Xt(){if(!pu&&null!==cu){pu=!0;var e=0;try{var t=cu;Wt(99,function(){for(;ep?(v=f,f=null):v=f.sibling;var g=h(r,f,s[p],u);if(null===g){null===f&&(f=v);break}e&&f&&null===g.alternate&&t(r,f),i=a(g,i,p),null===c?l=g:c.sibling=g,c=g,f=v}if(p===s.length)return n(r,f),l;if(null===f){for(;pg?(y=v,v=null):y=v.sibling;var E=h(i,v,b.value,l);if(null===E){null===v&&(v=y);break}e&&v&&null===E.alternate&&t(i,v),s=a(E,s,g),null===f?c=E:f.sibling=E,f=E,v=y}if(b.done)return n(i,v),c;if(null===v){for(;!b.done;g++,b=u.next())null!==(b=d(i,b.value,l))&&(s=a(b,s,g),null===f?c=b:f.sibling=b,f=b);return c}for(v=o(i,v);!b.done;g++,b=u.next())null!==(b=m(v,i,g,b.value,l))&&(e&&null!==b.alternate&&v.delete(null===b.key?g:b.key),s=a(b,s,g),null===f?c=b:f.sibling=b,f=b);return e&&v.forEach(function(e){return t(i,e)}),c}return function(e,o,a,u){var l="object"==typeof a&&null!==a&&a.type===ai&&null===a.key;l&&(a=a.props.children);var c="object"==typeof a&&null!==a;if(c)switch(a.$$typeof){case oi:e:{for(c=a.key,l=o;null!==l;){if(l.key===c){switch(l.tag){case 7:if(a.type===ai){n(e,l.sibling),o=i(l,a.props.children),o.return=e,e=o;break e}break;default:if(l.elementType===a.type){n(e,l.sibling),o=i(l,a.props),o.ref=mn(e,l,a),o.return=e,e=o;break e}}n(e,l);break}t(e,l),l=l.sibling}a.type===ai?(o=Ao(a.props.children,e.mode,u,a.key),o.return=e,e=o):(u=_o(a.type,a.key,a.props,null,e.mode,u),u.ref=mn(e,o,a),u.return=e,e=u)}return s(e);case ii:e:{for(l=a.key;null!==o;){if(o.key===l){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(e,o.sibling),o=i(o,a.children||[]),o.return=e,e=o;break e}n(e,o);break}t(e,o),o=o.sibling}o=Mo(a,e.mode,u),o.return=e,e=o}return s(e)}if("string"==typeof a||"number"==typeof a)return a=""+a,null!==o&&6===o.tag?(n(e,o.sibling),o=i(o,a),o.return=e,e=o):(n(e,o),o=Io(a,e.mode,u),o.return=e,e=o),s(e);if(Su(a))return g(e,o,a,u);if(p(a))return y(e,o,a,u);if(c&&vn(e,a),void 0===a&&!l)switch(e.tag){case 1:case 22:case 0:case 11:case 15:throw Error(r(152,v(e.type)||"Component"))}return n(e,o)}}function yn(e){if(e===Cu)throw Error(r(174));return e}function bn(e,t){switch(Lt(Au,t),Lt(_u,e),Lt(Ou,Cu),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:D(null,"");break;default:e=8===e?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=D(t,e)}jt(Ou),Lt(Ou,t)}function En(){jt(Ou),jt(_u),jt(Au)}function wn(e){yn(Au.current);var t=yn(Ou.current),n=D(t,e.type);t!==n&&(Lt(_u,e),Lt(Ou,n))}function xn(e){_u.current===e&&(jt(Ou),jt(_u))}function Sn(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(64&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function kn(e,t){var n=ko(5,null,null,0);n.elementType="DELETED",n.type="DELETED",n.stateNode=t,n.return=e,n.flags=8,null!==e.lastEffect?(e.lastEffect.nextEffect=n,e.lastEffect=n):e.firstEffect=e.lastEffect=n}function Tn(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,!0);case 13:default:return!1}}function Cn(e){if(Pu){var t=Mu;if(t){var n=t;if(!Tn(e,t)){if(!(t=Ct(n.nextSibling))||!Tn(e,t))return e.flags=-1025&e.flags|2,Pu=!1,void(Iu=e);kn(Iu,n)}Iu=e,Mu=Ct(t.firstChild)}else e.flags=-1025&e.flags|2,Pu=!1,Iu=e}}function On(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Iu=e}function _n(e){if(e!==Iu)return!1;if(!Pu)return On(e),Pu=!0,!1;var t=e.type;if(5!==e.tag||"head"!==t&&"body"!==t&&!kt(t,e.memoizedProps))for(t=Mu;t;)kn(e,t),t=Ct(t.nextSibling);if(On(e),13===e.tag){if(e=e.memoizedState,!(e=null!==e?e.dehydrated:null))throw Error(r(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Mu=Ct(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Mu=null}}else Mu=Iu?Ct(e.stateNode.nextSibling):null;return!0}function An(){Mu=Iu=null,Pu=!1}function Rn(){for(var e=0;ea))throw Error(r(301));a+=1,Uu=Hu=null,t.updateQueue=null,ju.current=Wu,e=n(o,i)}while(Bu)}if(ju.current=Vu,t=null!==Hu&&null!==Hu.next,Du=0,Uu=Hu=Fu=null,zu=!1,t)throw Error(r(300));return e}function Nn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Uu?Fu.memoizedState=Uu=e:Uu=Uu.next=e,Uu}function jn(){if(null===Hu){var e=Fu.alternate;e=null!==e?e.memoizedState:null}else e=Hu.next;var t=null===Uu?Fu.memoizedState:Uu.next;if(null!==t)Uu=t,Hu=e;else{if(null===e)throw Error(r(310));Hu=e,e={memoizedState:Hu.memoizedState,baseState:Hu.baseState,baseQueue:Hu.baseQueue,queue:Hu.queue,next:null},null===Uu?Fu.memoizedState=Uu=e:Uu=Uu.next=e}return Uu}function Ln(e,t){return"function"==typeof t?t(e):t}function Dn(e){var t=jn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=Hu,i=o.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}o.baseQueue=i=a,n.pending=null}if(null!==i){i=i.next,o=o.baseState;var u=s=a=null,l=i;do{var c=l.lane;if((Du&c)===c)null!==u&&(u=u.next={lane:0,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null}),o=l.eagerReducer===e?l.eagerState:e(o,l.action);else{var f={lane:c,action:l.action,eagerReducer:l.eagerReducer,eagerState:l.eagerState,next:null};null===u?(s=u=f,a=o):u=u.next=f,Fu.lanes|=c,fl|=c}l=l.next}while(null!==l&&l!==i);null===u?a=o:u.next=s,vs(o,t.memoizedState)||($u=!0),t.memoizedState=o,t.baseState=a,t.baseQueue=u,n.lastRenderedState=o}return[t.memoizedState,n.dispatch]}function Fn(e){var t=jn(),n=t.queue;if(null===n)throw Error(r(311));n.lastRenderedReducer=e;var o=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);vs(a,t.memoizedState)||($u=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,o]}function Hn(e,t,n){var o=t._getVersion;o=o(t._source);var i=t._workInProgressVersionPrimary;if(null!==i?e=i===o:(e=e.mutableReadLanes,(e=(Du&e)===e)&&(t._workInProgressVersionPrimary=o,Nu.push(t))),e)return n(t._source);throw Nu.push(t),Error(r(350))}function Un(e,t,n,o){var i=rl;if(null===i)throw Error(r(349));var a=t._getVersion,s=a(t._source),u=ju.current,l=u.useState(function(){return Hn(i,t,n)}),c=l[1],f=l[0];l=Uu;var p=e.memoizedState,d=p.refs,h=d.getSnapshot,m=p.source;p=p.subscribe;var v=Fu;return e.memoizedState={refs:d,source:t,subscribe:o},u.useEffect(function(){d.getSnapshot=n,d.setSnapshot=c;var e=a(t._source);if(!vs(s,e)){e=n(t._source),vs(f,e)||(c(e),e=Yr(v),i.mutableReadLanes|=e&i.pendingLanes),e=i.mutableReadLanes,i.entangledLanes|=e;for(var r=i.entanglements,o=e;0n?98:n,function(){e(!0)}),Wt(97<\/script>",e=e.removeChild(e.firstChild)):"string"==typeof o.is?e=s.createElement(n,{is:o.is}):(e=s.createElement(n),"select"===n&&(s=e,o.multiple?s.multiple=!0:o.size&&(s.size=o.size))):e=s.createElementNS(e,n),e[Fs]=t,e[Hs]=o,Ts(e,t,!1,!1),t.stateNode=e,s=B(n,o),n){case"dialog":dt("cancel",e),dt("close",e),i=o;break;case"iframe":case"object":case"embed":dt("load",e),i=o;break;case"video":case"audio":for(i=0;ivl&&(t.flags|=64,a=!0,xr(o,!1),t.lanes=33554432)}else{if(!a)if(null!==(e=Sn(s))){if(t.flags|=64,a=!0,n=e.updateQueue,null!==n&&(t.updateQueue=n,t.flags|=4),xr(o,!0),null===o.tail&&"hidden"===o.tailMode&&!s.alternate&&!Pu)return t=t.lastEffect=o.lastEffect,null!==t&&(t.nextEffect=null),null}else 2*hu()-o.renderingStartTime>vl&&1073741824!==n&&(t.flags|=64,a=!0,xr(o,!1),t.lanes=33554432);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,null!==n?n.sibling=s:t.child=s,o.last=s)}return null!==o.tail?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.lastEffect=t.lastEffect,o.renderingStartTime=hu(),n.sibling=null,t=Ru.current,Lt(Ru,a?1&t|2:1&t),n):null;case 23:case 24:return no(),null!==e&&null!==e.memoizedState!=(null!==t.memoizedState)&&"unstable-defer-without-hiding"!==o.mode&&(t.flags|=4),null}throw Error(r(156,t.tag))}function kr(e){switch(e.tag){case 1:Ft(e.type)&&Ht();var t=e.flags;return 4096&t?(e.flags=-4097&t|64,e):null;case 3:if(En(),jt(Ws),jt(Ys),Rn(),0!=(64&(t=e.flags)))throw Error(r(285));return e.flags=-4097&t|64,e;case 5:return xn(e),null;case 13:return jt(Ru),t=e.flags,4096&t?(e.flags=-4097&t|64,e):null;case 19:return jt(Ru),null;case 4:return En(),null;case 10:return Kt(e),null;case 23:case 24:return no(),null;default:return null}}function Tr(e,t){try{var n="",r=t;do{n+=m(r),r=r.return}while(r);var o=n}catch(e){o="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:o}}function Cr(e,t){try{console.error(t.value)}catch(e){setTimeout(function(){throw e})}}function Or(e,t,n){n=on(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){yl||(yl=!0,bl=r),Cr(e,t)},n}function _r(e,t,n){n=on(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var o=t.value;n.payload=function(){return Cr(e,t),r(o)}}var i=e.stateNode;return null!==i&&"function"==typeof i.componentDidCatch&&(n.callback=function(){"function"!=typeof r&&(null===El?El=new Set([this]):El.add(this),Cr(e,t));var n=t.stack;this.componentDidCatch(t.value,{componentStack:null!==n?n:""})}),n}function Ar(e){var t=e.ref;if(null!==t)if("function"==typeof t)try{t(null)}catch(t){Eo(e,t)}else t.current=null}function Rr(e,t){switch(t.tag){case 0:case 11:case 15:case 22:return;case 1:if(256&t.flags&&null!==e){var n=e.memoizedProps,o=e.memoizedState;e=t.stateNode,t=e.getSnapshotBeforeUpdate(t.elementType===t.type?n:Qt(t.type,n),o),e.__reactInternalSnapshotBeforeUpdate=t}return;case 3:return void(256&t.flags&&Tt(t.stateNode.containerInfo));case 5:case 6:case 4:case 17:return}throw Error(r(163))}function Ir(e,t,n){switch(n.tag){case 0:case 11:case 15:case 22:if(t=n.updateQueue,null!==(t=null!==t?t.lastEffect:null)){e=t=t.next;do{if(3==(3&e.tag)){var o=e.create;e.destroy=o()}e=e.next}while(e!==t)}if(t=n.updateQueue,null!==(t=null!==t?t.lastEffect:null)){e=t=t.next;do{var i=e;o=i.next,i=i.tag,0!=(4&i)&&0!=(1&i)&&(go(n,e),vo(n,e)),e=o}while(e!==t)}return;case 1:return e=n.stateNode,4&n.flags&&(null===t?e.componentDidMount():(o=n.elementType===n.type?t.memoizedProps:Qt(n.type,t.memoizedProps),e.componentDidUpdate(o,t.memoizedState,e.__reactInternalSnapshotBeforeUpdate))),void(null!==(t=n.updateQueue)&&ln(n,t,e));case 3:if(null!==(t=n.updateQueue)){if(e=null,null!==n.child)switch(n.child.tag){case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}ln(n,t,e)}return;case 5:return e=n.stateNode,void(null===t&&4&n.flags&&St(n.type,n.memoizedProps)&&e.focus());case 6:case 4:case 12:return;case 13:return void(null===n.memoizedState&&null!==(n=n.alternate)&&null!==(n=n.memoizedState)&&null!==(n=n.dehydrated)&&ge(n));case 19:case 17:case 20:case 21:case 23:case 24:return}throw Error(r(163))}function Mr(e,t){for(var n=e;;){if(5===n.tag){var r=n.stateNode;if(t)r=r.style,"function"==typeof r.setProperty?r.setProperty("display","none","important"):r.display="none";else{r=n.stateNode;var o=n.memoizedProps.style;o=void 0!==o&&null!==o&&o.hasOwnProperty("display")?o.display:null,r.style.display=H("display",o)}}else if(6===n.tag)n.stateNode.nodeValue=t?"":n.memoizedProps;else if((23!==n.tag&&24!==n.tag||null===n.memoizedState||n===e)&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===e)break;for(;null===n.sibling;){if(null===n.return||n.return===e)return;n=n.return}n.sibling.return=n.return,n=n.sibling}}function Pr(e,t){if(Xs&&"function"==typeof Xs.onCommitFiberUnmount)try{Xs.onCommitFiberUnmount($s,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:case 22:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var n=e=e.next;do{var r=n,o=r.destroy;if(r=r.tag,void 0!==o)if(0!=(4&r))go(t,n);else{r=t;try{o()}catch(e){Eo(r,e)}}n=n.next}while(n!==e)}break;case 1:if(Ar(t),e=t.stateNode,"function"==typeof e.componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Eo(t,e)}break;case 5:Ar(t);break;case 4:Hr(e,t)}}function Nr(e){e.alternate=null,e.child=null,e.dependencies=null,e.firstEffect=null,e.lastEffect=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.return=null,e.updateQueue=null}function jr(e){return 5===e.tag||3===e.tag||4===e.tag}function Lr(e){e:{for(var t=e.return;null!==t;){if(jr(t))break e;t=t.return}throw Error(r(160))}var n=t;switch(t=n.stateNode,n.tag){case 5:var o=!1;break;case 3:case 4:t=t.containerInfo,o=!0;break;default:throw Error(r(161))}16&n.flags&&(F(t,""),n.flags&=-17);e:t:for(n=e;;){for(;null===n.sibling;){if(null===n.return||jr(n.return)){n=null;break e}n=n.return}for(n.sibling.return=n.return,n=n.sibling;5!==n.tag&&6!==n.tag&&18!==n.tag;){if(2&n.flags)continue t;if(null===n.child||4===n.tag)continue t;n.child.return=n,n=n.child}if(!(2&n.flags)){n=n.stateNode;break e}}o?Dr(e,n,t):Fr(e,n,t)}function Dr(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),null!==(n=n._reactRootContainer)&&void 0!==n||null!==t.onclick||(t.onclick=xt));else if(4!==r&&null!==(e=e.child))for(Dr(e,t,n),e=e.sibling;null!==e;)Dr(e,t,n),e=e.sibling}function Fr(e,t,n){var r=e.tag,o=5===r||6===r;if(o)e=o?e.stateNode:e.stateNode.instance,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(Fr(e,t,n),e=e.sibling;null!==e;)Fr(e,t,n),e=e.sibling}function Hr(e,t){for(var n,o,i=t,a=!1;;){if(!a){a=i.return;e:for(;;){if(null===a)throw Error(r(160));switch(n=a.stateNode,a.tag){case 5:o=!1;break e;case 3:case 4:n=n.containerInfo,o=!0;break e}a=a.return}a=!0}if(5===i.tag||6===i.tag){e:for(var s=e,u=i,l=u;;)if(Pr(s,l),null!==l.child&&4!==l.tag)l.child.return=l,l=l.child;else{if(l===u)break e;for(;null===l.sibling;){if(null===l.return||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}o?(s=n,u=i.stateNode,8===s.nodeType?s.parentNode.removeChild(u):s.removeChild(u)):n.removeChild(i.stateNode)}else if(4===i.tag){if(null!==i.child){n=i.stateNode.containerInfo,o=!0,i.child.return=i,i=i.child;continue}}else if(Pr(e,i),null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return,4===i.tag&&(a=!1)}i.sibling.return=i.return,i=i.sibling}}function Ur(e,t){switch(t.tag){case 0:case 11:case 14:case 15:case 22:var n=t.updateQueue;if(null!==(n=null!==n?n.lastEffect:null)){var o=n=n.next;do{3==(3&o.tag)&&(e=o.destroy,o.destroy=void 0,void 0!==e&&e()),o=o.next}while(o!==n)}return;case 1:return;case 5:if(null!=(n=t.stateNode)){o=t.memoizedProps;var i=null!==e?e.memoizedProps:o;e=t.type;var a=t.updateQueue;if(t.updateQueue=null,null!==a){for(n[Hs]=o,"input"===e&&"radio"===o.type&&null!=o.name&&T(n,o),B(e,i),t=B(e,o),i=0;ii&&(i=s),n&=~a}if(n=i,n=hu()-n,10<(n=(120>n?120:480>n?480:1080>n?1080:1920>n?1920:3e3>n?3e3:4320>n?4320:1960*Ju(n/1960))-n)){e.timeoutHandle=Ns(fo.bind(null,e),n);break}fo(e);break;case 5:fo(e);break;default:throw Error(r(329))}}return $r(e,hu()),e.callbackNode===t?Xr.bind(null,e):null}function Qr(e,t){for(t&=~dl,t&=~pl,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0 component higher in the tree to provide a loading indicator or placeholder to display.")}5!==ul&&(ul=2),u=Tr(u,s),p=a;do{switch(p.tag){case 3:i=u,p.flags|=4096,t&=-t,p.lanes|=t;sn(p,Or(p,i,t));break e;case 1:i=u;var x=p.type,S=p.stateNode;if(0==(64&p.flags)&&("function"==typeof x.getDerivedStateFromError||null!==S&&"function"==typeof S.componentDidCatch&&(null===El||!El.has(S)))){p.flags|=4096,t&=-t,p.lanes|=t;sn(p,_r(p,i,t));break e}}p=p.return}while(null!==p)}co(n)}catch(e){t=e,ol===n&&null!==n&&(ol=n=n.return);continue}break}}function io(){var e=el.current;return el.current=Vu,null===e?Vu:e}function ao(e,t){var n=nl;nl|=16;var o=io();for(rl===e&&il===t||ro(e,t);;)try{so();break}catch(t){oo(e,t)}if(Zt(),nl=n,el.current=o,null!==ol)throw Error(r(261));return rl=null,il=0,ul}function so(){for(;null!==ol;)lo(ol)}function uo(){for(;null!==ol&&!Js();)lo(ol)}function lo(e){var t=Qu(e.alternate,e,al);e.memoizedProps=e.pendingProps,null===t?co(e):ol=t,tl.current=null}function co(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(2048&t.flags)){if(null!==(n=Sr(n,t,al)))return void(ol=n);if(n=t,24!==n.tag&&23!==n.tag||null===n.memoizedState||0!=(1073741824&al)||0==(4&n.mode)){for(var r=0,o=n.child;null!==o;)r|=o.lanes|o.childLanes,o=o.sibling;n.childLanes=r}null!==e&&0==(2048&e.flags)&&(null===e.firstEffect&&(e.firstEffect=t.firstEffect),null!==t.lastEffect&&(null!==e.lastEffect&&(e.lastEffect.nextEffect=t.firstEffect),e.lastEffect=t.lastEffect),1s&&(u=s,s=x,x=u),u=at(b,x),a=at(b,s),u&&a&&(1!==w.rangeCount||w.anchorNode!==u.node||w.anchorOffset!==u.offset||w.focusNode!==a.node||w.focusOffset!==a.offset)&&(E=E.createRange(),E.setStart(u.node,u.offset),w.removeAllRanges(),x>s?(w.addRange(E),w.extend(a.node,a.offset)):(E.setEnd(a.node,a.offset),w.addRange(E)))))),E=[];for(w=b;w=w.parentNode;)1===w.nodeType&&E.push({element:w,left:w.scrollLeft,top:w.scrollTop});for("function"==typeof b.focus&&b.focus(),b=0;bhu()-ml?ro(e,0):dl|=n),$r(e,t)}function xo(e,t){var n=e.stateNode;null!==n&&n.delete(t),t=0,0===t&&(t=e.mode,0==(2&t)?t=1:0==(4&t)?t=99===Gt()?1:2:(0===Rl&&(Rl=cl),0===(t=Oe(62914560&~Rl))&&(t=4194304))),n=Gr(),null!==(e=qr(e,t))&&(Ae(e,t,n),$r(e,n))}function So(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.flags=0,this.lastEffect=this.firstEffect=this.nextEffect=null,this.childLanes=this.lanes=0,this.alternate=null}function ko(e,t,n,r){return new So(e,t,n,r)}function To(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Co(e){if("function"==typeof e)return To(e)?1:0;if(void 0!==e&&null!==e){if((e=e.$$typeof)===fi)return 11;if(e===hi)return 14}return 2}function Oo(e,t){var n=e.alternate;return null===n?(n=ko(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.nextEffect=null,n.firstEffect=null,n.lastEffect=null),n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function _o(e,t,n,o,i,a){var s=2;if(o=e,"function"==typeof e)To(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case ai:return Ao(n.children,i,a,t);case yi:s=8,i|=16;break;case si:s=8,i|=1;break;case ui:return e=ko(12,n,t,8|i),e.elementType=ui,e.type=ui,e.lanes=a,e;case pi:return e=ko(13,n,t,i),e.type=pi,e.elementType=pi,e.lanes=a,e;case di:return e=ko(19,n,t,i),e.elementType=di,e.lanes=a,e;case bi:return Ro(n,i,a,t);case Ei:return e=ko(24,n,t,i),e.elementType=Ei,e.lanes=a,e;default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case li:s=10;break e;case ci:s=9;break e;case fi:s=11;break e;case hi:s=14;break e;case mi:s=16,o=null;break e;case vi:s=22;break e}throw Error(r(130,null==e?e:typeof e,""))}return t=ko(s,n,t,i),t.elementType=e,t.type=o,t.lanes=a,t}function Ao(e,t,n,r){return e=ko(7,e,r,t),e.lanes=n,e}function Ro(e,t,n,r){return e=ko(23,e,r,t),e.elementType=bi,e.lanes=n,e}function Io(e,t,n){return e=ko(6,e,null,t),e.lanes=n,e}function Mo(e,t,n){return t=ko(4,null!==e.children?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Po(e,t,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.pendingContext=this.context=null,this.hydrate=n,this.callbackNode=null,this.callbackPriority=0,this.eventTimes=_e(0),this.expirationTimes=_e(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=_e(0),this.mutableSourceEagerHydrationData=null}function No(e,t,n){var r=3