@ndmspc/ndmvr 0.20230227.0 → 0.20230323.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +55 -0
- package/dist/ndmvr.es.js +2598 -2471
- package/dist/ndmvr.umd.js +107 -107
- package/package.json +6 -5
package/dist/ndmvr.umd.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
var
|
|
2
|
-
`+ie+
|
|
3
|
-
`),
|
|
4
|
-
`),
|
|
5
|
-
`+
|
|
1
|
+
var Gs=Object.defineProperty;var qs=(K,v,we)=>v in K?Gs(K,v,{enumerable:!0,configurable:!0,writable:!0,value:we}):K[v]=we;var He=(K,v,we)=>(qs(K,typeof v!="symbol"?v+"":v,we),we),ur=(K,v,we)=>{if(!v.has(K))throw TypeError("Cannot "+we)};var n=(K,v,we)=>(ur(K,v,"read from private field"),we?we.call(K):v.get(K)),j=(K,v,we)=>{if(v.has(K))throw TypeError("Cannot add the same private member more than once");v instanceof WeakSet?v.add(K):v.set(K,we)},M=(K,v,we,At)=>(ur(K,v,"write to private field"),At?At.call(K,we):v.set(K,we),we);var Hi=(K,v,we)=>(ur(K,v,"access private method"),we);(function(K,v){typeof exports=="object"&&typeof module<"u"?v(exports,require("react"),require("aframe"),require("jsroot"),require("three")):typeof define=="function"&&define.amd?define(["exports","react","aframe","jsroot","three"],v):(K=typeof globalThis<"u"?globalThis:K||self,v(K["React Library Vite"]={},K.React,K.AFRAME$2,K.jsroot,K.THREE$1))})(this,function(K,v,we,At,mn){var gt,at,Le,Ci,qe,Ti,_t,zt,Ot,Ee,Ue,Ce,ai,N,Ke,V,te,le,Y,Ne,Xe,Je,ct,bt,ci,pe,Fe,Qe,et,vt,tt,kt,It,W,xt,lt,Bt,Ge,_i,Oi,ki,Mt,jt,Yt,Nt,Ft,Lt,Di,Ai,Pi,$i,St,Xt,Vt,Ri,Wt;"use strict";function yn(i){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(i){for(const t in i)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(i,t);Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>i[t]})}}return e.default=i,Object.freeze(e)}const wt=yn(mn);var li={exports:{}},Kt={};var fr;function gn(){if(fr)return Kt;fr=1;var i=v,e=Symbol.for("react.element"),t=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function a(u,h,d){var l,p={},y=null,_=null;d!==void 0&&(y=""+d),h.key!==void 0&&(y=""+h.key),h.ref!==void 0&&(_=h.ref);for(l in h)r.call(h,l)&&!s.hasOwnProperty(l)&&(p[l]=h[l]);if(u&&u.defaultProps)for(l in h=u.defaultProps,h)p[l]===void 0&&(p[l]=h[l]);return{$$typeof:e,type:u,key:y,ref:_,props:p,_owner:o.current}}return Kt.Fragment=t,Kt.jsx=a,Kt.jsxs=a,Kt}var Jt={};var hr;function bn(){return hr||(hr=1,process.env.NODE_ENV!=="production"&&function(){var i=v,e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),T=Symbol.iterator,x="@@iterator";function c(f){if(f===null||typeof f!="object")return null;var E=T&&f[T]||f[x];return typeof E=="function"?E:null}var k=i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function A(f){{for(var E=arguments.length,$=new Array(E>1?E-1:0),U=1;U<E;U++)$[U-1]=arguments[U];B("error",f,$)}}function B(f,E,$){{var U=k.ReactDebugCurrentFrame,me=U.getStackAddendum();me!==""&&(E+="%s",$=$.concat([me]));var Oe=$.map(function(fe){return String(fe)});Oe.unshift("Warning: "+E),Function.prototype.apply.call(console[f],console,Oe)}}var H=!1,g=!1,re=!1,J=!1,C=!1,oe;oe=Symbol.for("react.module.reference");function ue(f){return!!(typeof f=="string"||typeof f=="function"||f===r||f===s||C||f===o||f===d||f===l||J||f===_||H||g||re||typeof f=="object"&&f!==null&&(f.$$typeof===y||f.$$typeof===p||f.$$typeof===a||f.$$typeof===u||f.$$typeof===h||f.$$typeof===oe||f.getModuleId!==void 0))}function xe(f,E,$){var U=f.displayName;if(U)return U;var me=E.displayName||E.name||"";return me!==""?$+"("+me+")":$}function w(f){return f.displayName||"Context"}function I(f){if(f==null)return null;if(typeof f.tag=="number"&&A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof f=="function")return f.displayName||f.name||null;if(typeof f=="string")return f;switch(f){case r:return"Fragment";case t:return"Portal";case s:return"Profiler";case o:return"StrictMode";case d:return"Suspense";case l:return"SuspenseList"}if(typeof f=="object")switch(f.$$typeof){case u:var E=f;return w(E)+".Consumer";case a:var $=f;return w($._context)+".Provider";case h:return xe(f,f.render,"ForwardRef");case p:var U=f.displayName||null;return U!==null?U:I(f.type)||"Memo";case y:{var me=f,Oe=me._payload,fe=me._init;try{return I(fe(Oe))}catch{return null}}}return null}var q=Object.assign,F=0,L,he,de,Te,ce,je,D;function P(){}P.__reactDisabledLog=!0;function z(){{if(F===0){L=console.log,he=console.info,de=console.warn,Te=console.error,ce=console.group,je=console.groupCollapsed,D=console.groupEnd;var f={configurable:!0,enumerable:!0,value:P,writable:!0};Object.defineProperties(console,{info:f,log:f,warn:f,error:f,group:f,groupCollapsed:f,groupEnd:f})}F++}}function X(){{if(F--,F===0){var f={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:q({},f,{value:L}),info:q({},f,{value:he}),warn:q({},f,{value:de}),error:q({},f,{value:Te}),group:q({},f,{value:ce}),groupCollapsed:q({},f,{value:je}),groupEnd:q({},f,{value:D})})}F<0&&A("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var m=k.ReactCurrentDispatcher,ie;function O(f,E,$){{if(ie===void 0)try{throw Error()}catch(me){var U=me.stack.trim().match(/\n( *(at )?)/);ie=U&&U[1]||""}return`
|
|
2
|
+
`+ie+f}}var Se=!1,Q;{var ne=typeof WeakMap=="function"?WeakMap:Map;Q=new ne}function S(f,E){if(!f||Se)return"";{var $=Q.get(f);if($!==void 0)return $}var U;Se=!0;var me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var Oe;Oe=m.current,m.current=null,z();try{if(E){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(ht){U=ht}Reflect.construct(f,[],fe)}else{try{fe.call()}catch(ht){U=ht}f.call(fe.prototype)}}else{try{throw Error()}catch(ht){U=ht}f()}}catch(ht){if(ht&&U&&typeof ht.stack=="string"){for(var ae=ht.stack.split(`
|
|
3
|
+
`),Ye=U.stack.split(`
|
|
4
|
+
`),De=ae.length-1,Ie=Ye.length-1;De>=1&&Ie>=0&&ae[De]!==Ye[Ie];)Ie--;for(;De>=1&&Ie>=0;De--,Ie--)if(ae[De]!==Ye[Ie]){if(De!==1||Ie!==1)do if(De--,Ie--,Ie<0||ae[De]!==Ye[Ie]){var We=`
|
|
5
|
+
`+ae[De].replace(" at new "," at ");return f.displayName&&We.includes("<anonymous>")&&(We=We.replace("<anonymous>",f.displayName)),typeof f=="function"&&Q.set(f,We),We}while(De>=1&&Ie>=0);break}}}finally{Se=!1,m.current=Oe,X(),Error.prepareStackTrace=me}var qt=f?f.displayName||f.name:"",pn=qt?O(qt):"";return typeof f=="function"&&Q.set(f,pn),pn}function Pe(f,E,$){return S(f,!1)}function R(f){var E=f.prototype;return!!(E&&E.isReactComponent)}function G(f,E,$){if(f==null)return"";if(typeof f=="function")return S(f,R(f));if(typeof f=="string")return O(f);switch(f){case d:return O("Suspense");case l:return O("SuspenseList")}if(typeof f=="object")switch(f.$$typeof){case h:return Pe(f.render);case p:return G(f.type,E,$);case y:{var U=f,me=U._payload,Oe=U._init;try{return G(Oe(me),E,$)}catch{}}}return""}var ke=Object.prototype.hasOwnProperty,se={},ze=k.ReactDebugCurrentFrame;function it(f){if(f){var E=f._owner,$=G(f.type,f._source,E?E.type:null);ze.setExtraStackFrame($)}else ze.setExtraStackFrame(null)}function Be(f,E,$,U,me){{var Oe=Function.call.bind(ke);for(var fe in f)if(Oe(f,fe)){var ae=void 0;try{if(typeof f[fe]!="function"){var Ye=Error((U||"React class")+": "+$+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof f[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Ye.name="Invariant Violation",Ye}ae=f[fe](E,fe,U,$,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(De){ae=De}ae&&!(ae instanceof Error)&&(it(me),A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",U||"React class",$,fe,typeof ae),it(null)),ae instanceof Error&&!(ae.message in se)&&(se[ae.message]=!0,it(me),A("Failed %s type: %s",$,ae.message),it(null))}}}var Zt=Array.isArray;function ut(f){return Zt(f)}function Ve(f){{var E=typeof Symbol=="function"&&Symbol.toStringTag,$=E&&f[Symbol.toStringTag]||f.constructor.name||"Object";return $}}function Z(f){try{return $e(f),!1}catch{return!0}}function $e(f){return""+f}function Ut(f){if(Z(f))return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ve(f)),$e(f)}var ft=k.ReactCurrentOwner,rt={key:!0,ref:!0,__self:!0,__source:!0},sn,an,sr;sr={};function Ds(f){if(ke.call(f,"ref")){var E=Object.getOwnPropertyDescriptor(f,"ref").get;if(E&&E.isReactWarning)return!1}return f.ref!==void 0}function zs(f){if(ke.call(f,"key")){var E=Object.getOwnPropertyDescriptor(f,"key").get;if(E&&E.isReactWarning)return!1}return f.key!==void 0}function Is(f,E){if(typeof f.ref=="string"&&ft.current&&E&&ft.current.stateNode!==E){var $=I(ft.current.type);sr[$]||(A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',I(ft.current.type),f.ref),sr[$]=!0)}}function Bs(f,E){{var $=function(){sn||(sn=!0,A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E))};$.isReactWarning=!0,Object.defineProperty(f,"key",{get:$,configurable:!0})}}function Ms(f,E){{var $=function(){an||(an=!0,A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",E))};$.isReactWarning=!0,Object.defineProperty(f,"ref",{get:$,configurable:!0})}}var js=function(f,E,$,U,me,Oe,fe){var ae={$$typeof:e,type:f,key:E,ref:$,props:fe,_owner:Oe};return ae._store={},Object.defineProperty(ae._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ae,"_self",{configurable:!1,enumerable:!1,writable:!1,value:U}),Object.defineProperty(ae,"_source",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.freeze&&(Object.freeze(ae.props),Object.freeze(ae)),ae};function Ys(f,E,$,U,me){{var Oe,fe={},ae=null,Ye=null;$!==void 0&&(Ut($),ae=""+$),zs(E)&&(Ut(E.key),ae=""+E.key),Ds(E)&&(Ye=E.ref,Is(E,me));for(Oe in E)ke.call(E,Oe)&&!rt.hasOwnProperty(Oe)&&(fe[Oe]=E[Oe]);if(f&&f.defaultProps){var De=f.defaultProps;for(Oe in De)fe[Oe]===void 0&&(fe[Oe]=De[Oe])}if(ae||Ye){var Ie=typeof f=="function"?f.displayName||f.name||"Unknown":f;ae&&Bs(fe,Ie),Ye&&Ms(fe,Ie)}return js(f,ae,Ye,me,U,ft.current,fe)}}var ar=k.ReactCurrentOwner,cn=k.ReactDebugCurrentFrame;function Gt(f){if(f){var E=f._owner,$=G(f.type,f._source,E?E.type:null);cn.setExtraStackFrame($)}else cn.setExtraStackFrame(null)}var cr;cr=!1;function lr(f){return typeof f=="object"&&f!==null&&f.$$typeof===e}function ln(){{if(ar.current){var f=I(ar.current.type);if(f)return`
|
|
6
6
|
|
|
7
|
-
Check the render method of \``+
|
|
7
|
+
Check the render method of \``+f+"`."}return""}}function Ns(f){{if(f!==void 0){var E=f.fileName.replace(/^.*[\\\/]/,""),$=f.lineNumber;return`
|
|
8
8
|
|
|
9
|
-
Check your code at `+
|
|
9
|
+
Check your code at `+E+":"+$+"."}return""}}var un={};function Fs(f){{var E=ln();if(!E){var $=typeof f=="string"?f:f.displayName||f.name;$&&(E=`
|
|
10
10
|
|
|
11
|
-
Check the top-level render call using <`+$+">.")}return
|
|
12
|
-
`+e.map(function(t,
|
|
13
|
-
`):"",this.name="UnsubscriptionError",this.errors=e,this}return i.prototype=Object.create(Error.prototype),i}(),ui=En,Qt=function(){function i(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return i.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,n=t._parentOrParents,o=t._ctorUnsubscribe,s=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof i)n.remove(this);else if(n!==null)for(var f=0;f<n.length;++f){var h=n[f];h.remove(this)}if(Bi(s)){o&&(this._unsubscribe=void 0);try{s.call(this)}catch(d){e=d instanceof ui?pr(d.errors):[d]}}if(Sn(a))for(var f=-1,p=a.length;++f<p;){var c=a[f];if(wn(c))try{c.unsubscribe()}catch(E){e=e||[],E instanceof ui?e=e.concat(pr(E.errors)):e.push(E)}}if(e)throw new ui(e)}},i.prototype.add=function(e){var t=e;if(!e)return i.EMPTY;switch(typeof e){case"function":t=new i(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof i)){var n=t;t=new i,t._subscriptions=[n]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=t._parentOrParents;if(o===null)t._parentOrParents=this;else if(o instanceof i){if(o===this)return t;t._parentOrParents=[o,this]}else if(o.indexOf(this)===-1)o.push(this);else return t;var s=this._subscriptions;return s===null?this._subscriptions=[t]:s.push(t),t},i.prototype.remove=function(e){var t=this._subscriptions;if(t){var n=t.indexOf(e);n!==-1&&t.splice(n,1)}},i.EMPTY=function(e){return e.closed=!0,e}(new i),i}();function pr(i){return i.reduce(function(e,t){return e.concat(t instanceof ui?t.errors:t)},[])}var fi=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),At=function(i){Pt(e,i);function e(t,n,o){var s=i.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=li;break;case 1:if(!t){s.destination=li;break}if(typeof t=="object"){t instanceof e?(s.syncErrorThrowable=t.syncErrorThrowable,s.destination=t,t.add(s)):(s.syncErrorThrowable=!0,s.destination=new mr(s,t));break}default:s.syncErrorThrowable=!0,s.destination=new mr(s,t,n,o);break}return s}return e.prototype[fi]=function(){return this},e.create=function(t,n,o){var s=new e(t,n,o);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(Qt),mr=function(i){Pt(e,i);function e(t,n,o,s){var a=i.call(this)||this;a._parentSubscriber=t;var f,h=a;return Bi(n)?f=n:n&&(f=n.next,o=n.error,s=n.complete,n!==li&&(h=Object.create(n),Bi(h.unsubscribe)&&a.add(h.unsubscribe.bind(h)),h.unsubscribe=a.unsubscribe.bind(a))),a._context=h,a._next=f,a._error=o,a._complete=s,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var n=this._parentSubscriber;!Ze.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(n,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var n=this._parentSubscriber,o=Ze.useDeprecatedSynchronousErrorHandling;if(this._error)!o||!n.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(n,this._error,t),this.unsubscribe());else if(n.syncErrorThrowable)o?(n.syncErrorValue=t,n.syncErrorThrown=!0):Jt(t),this.unsubscribe();else{if(this.unsubscribe(),o)throw t;Jt(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var n=this._parentSubscriber;if(this._complete){var o=function(){return t._complete.call(t._context)};!Ze.useDeprecatedSynchronousErrorHandling||!n.syncErrorThrowable?(this.__tryOrUnsub(o),this.unsubscribe()):(this.__tryOrSetError(n,o),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,n){try{t.call(this._context,n)}catch(o){if(this.unsubscribe(),Ze.useDeprecatedSynchronousErrorHandling)throw o;Jt(o)}},e.prototype.__tryOrSetError=function(t,n,o){if(!Ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{n.call(this._context,o)}catch(s){return Ze.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(Jt(s),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(At);function Cn(i){for(;i;){var e=i,t=e.closed,n=e.destination,o=e.isStopped;if(t||o)return!1;n&&n instanceof At?i=n:i=null}return!0}function Tn(i,e,t){if(i){if(i instanceof At)return i;if(i[fi])return i[fi]()}return!i&&!e&&!t?new At(li):new At(i,e,t)}var _n=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function On(i){return i}function kn(i){return i.length===0?On:i.length===1?i[0]:function(t){return i.reduce(function(n,o){return o(n)},t)}}var yr=function(){function i(e){this._isScalar=!1,e&&(this._subscribe=e)}return i.prototype.lift=function(e){var t=new i;return t.source=this,t.operator=e,t},i.prototype.subscribe=function(e,t,n){var o=this.operator,s=Tn(e,t,n);if(o?s.add(o.call(s,this.source)):s.add(this.source||Ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},i.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Ze.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),Cn(e)?e.error(t):console.warn(t)}},i.prototype.forEach=function(e,t){var n=this;return t=gr(t),new t(function(o,s){var a;a=n.subscribe(function(f){try{e(f)}catch(h){s(h),a&&a.unsubscribe()}},s,o)})},i.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},i.prototype[_n]=function(){return this},i.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:kn(e)(this)},i.prototype.toPromise=function(e){var t=this;return e=gr(e),new e(function(n,o){var s;t.subscribe(function(a){return s=a},function(a){return o(a)},function(){return n(s)})})},i.create=function(e){return new i(e)},i}();function gr(i){if(i||(i=Ze.Promise||Promise),!i)throw new Error("no Promise impl found");return i}var Pn=function(){function i(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return i.prototype=Object.create(Error.prototype),i}(),ei=Pn,An=function(i){Pt(e,i);function e(t,n){var o=i.call(this)||this;return o.subject=t,o.subscriber=n,o.closed=!1,o}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,n=t.observers;if(this.subject=null,!(!n||n.length===0||t.isStopped||t.closed)){var o=n.indexOf(this.subscriber);o!==-1&&n.splice(o,1)}}},e}(Qt),$n=function(i){Pt(e,i);function e(t){var n=i.call(this,t)||this;return n.destination=t,n}return e}(At),dt=function(i){Pt(e,i);function e(){var t=i.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[fi]=function(){return new $n(this)},e.prototype.lift=function(t){var n=new br(this,this);return n.operator=t,n},e.prototype.next=function(t){if(this.closed)throw new ei;if(!this.isStopped)for(var n=this.observers,o=n.length,s=n.slice(),a=0;a<o;a++)s[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new ei;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var n=this.observers,o=n.length,s=n.slice(),a=0;a<o;a++)s[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ei;this.isStopped=!0;for(var t=this.observers,n=t.length,o=t.slice(),s=0;s<n;s++)o[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ei;return i.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ei;return this.hasError?(t.error(this.thrownError),Qt.EMPTY):this.isStopped?(t.complete(),Qt.EMPTY):(this.observers.push(t),new An(this,t))},e.prototype.asObservable=function(){var t=new yr;return t.source=this,t},e.create=function(t,n){return new br(t,n)},e}(yr),br=function(i){Pt(e,i);function e(t,n){var o=i.call(this)||this;return o.destination=t,o.source=n,o}return e.prototype.next=function(t){var n=this.destination;n&&n.next&&n.next(t)},e.prototype.error=function(t){var n=this.destination;n&&n.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var n=this.source;return n?this.source.subscribe(t):Qt.EMPTY},e}(dt);class Rn{constructor(){I(this,bt,void 0);B(this,bt,new dt)}setVisibilityOfBanners(e){r(this,bt).next({device:e})}shiftBanners(){r(this,bt).next("shift")}setUserState(){r(this,bt).next("show")}getCameraSubject(){return r(this,bt).asObservable()}}bt=new WeakMap;const pt=new Rn,Et=g.createContext();class Ii{constructor(){I(this,at,void 0);B(this,at,new dt)}changeHistogramSectionByOffset(e,t,n,o){r(this,at).next({name:t,axis:e,increment:n,defaultRange:o})}changeHistogramFunction(e,t){r(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){r(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){r(this,at).next({name:t,minValue:e})}getChangedSection(){return r(this,at).asObservable()}}at=new WeakMap;const nt=new Ii,Ee=new Ii,Ae=new Ii;var hi={exports:{}},pe={};var vr;function Hn(){if(vr)return pe;vr=1;var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),f=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function v(u){if(typeof u=="object"&&u!==null){var P=u.$$typeof;switch(P){case i:switch(u=u.type,u){case t:case o:case n:case p:case c:return u;default:switch(u=u&&u.$$typeof,u){case f:case a:case h:case E:case d:case s:return u;default:return P}}case e:return P}}}return pe.ContextConsumer=a,pe.ContextProvider=s,pe.Element=i,pe.ForwardRef=h,pe.Fragment=t,pe.Lazy=E,pe.Memo=d,pe.Portal=e,pe.Profiler=o,pe.StrictMode=n,pe.Suspense=p,pe.SuspenseList=c,pe.isAsyncMode=function(){return!1},pe.isConcurrentMode=function(){return!1},pe.isContextConsumer=function(u){return v(u)===a},pe.isContextProvider=function(u){return v(u)===s},pe.isElement=function(u){return typeof u=="object"&&u!==null&&u.$$typeof===i},pe.isForwardRef=function(u){return v(u)===h},pe.isFragment=function(u){return v(u)===t},pe.isLazy=function(u){return v(u)===E},pe.isMemo=function(u){return v(u)===d},pe.isPortal=function(u){return v(u)===e},pe.isProfiler=function(u){return v(u)===o},pe.isStrictMode=function(u){return v(u)===n},pe.isSuspense=function(u){return v(u)===p},pe.isSuspenseList=function(u){return v(u)===c},pe.isValidElementType=function(u){return typeof u=="string"||typeof u=="function"||u===t||u===o||u===n||u===p||u===c||u===k||typeof u=="object"&&u!==null&&(u.$$typeof===E||u.$$typeof===d||u.$$typeof===s||u.$$typeof===a||u.$$typeof===h||u.$$typeof===T||u.getModuleId!==void 0)},pe.typeOf=v,pe}var me={};var xr;function zn(){return xr||(xr=1,process.env.NODE_ENV!=="production"&&function(){var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),f=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),c=Symbol.for("react.suspense_list"),d=Symbol.for("react.memo"),E=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),T=!1,v=!1,u=!1,P=!1,O=!1,D;D=Symbol.for("react.module.reference");function b(R){return!!(typeof R=="string"||typeof R=="function"||R===t||R===o||O||R===n||R===p||R===c||P||R===k||T||v||u||typeof R=="object"&&R!==null&&(R.$$typeof===E||R.$$typeof===d||R.$$typeof===s||R.$$typeof===a||R.$$typeof===h||R.$$typeof===D||R.getModuleId!==void 0))}function m(R){if(typeof R=="object"&&R!==null){var U=R.$$typeof;switch(U){case i:var _e=R.type;switch(_e){case t:case o:case n:case p:case c:return _e;default:var oe=_e&&_e.$$typeof;switch(oe){case f:case a:case h:case E:case d:case s:return oe;default:return U}}case e:return U}}}var te=a,q=s,w=i,re=h,ce=t,be=E,Z=d,G=e,K=o,L=n,X=p,ve=c,he=!1,Te=!1;function Oe(R){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function Ne(R){return Te||(Te=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function H(R){return m(R)===a}function A(R){return m(R)===s}function z(R){return typeof R=="object"&&R!==null&&R.$$typeof===i}function j(R){return m(R)===h}function y(R){return m(R)===t}function ie(R){return m(R)===E}function _(R){return m(R)===d}function xe(R){return m(R)===e}function J(R){return m(R)===o}function ne(R){return m(R)===n}function x(R){return m(R)===p}function ke(R){return m(R)===c}me.ContextConsumer=te,me.ContextProvider=q,me.Element=w,me.ForwardRef=re,me.Fragment=ce,me.Lazy=be,me.Memo=Z,me.Portal=G,me.Profiler=K,me.StrictMode=L,me.Suspense=X,me.SuspenseList=ve,me.isAsyncMode=Oe,me.isConcurrentMode=Ne,me.isContextConsumer=H,me.isContextProvider=A,me.isElement=z,me.isForwardRef=j,me.isFragment=y,me.isLazy=ie,me.isMemo=_,me.isPortal=xe,me.isProfiler=J,me.isStrictMode=ne,me.isSuspense=x,me.isSuspenseList=ke,me.isValidElementType=b,me.typeOf=m}()),me}(function(i){process.env.NODE_ENV==="production"?i.exports=Hn():i.exports=zn()})(hi);function Dn(i){function e(H,A,z,j,y){for(var ie=0,_=0,xe=0,J=0,ne,x,ke=0,R=0,U,_e=U=ne=0,oe=0,De=0,it=0,Ie=0,Wt=z.length,ut=Wt-1,Ve,V="",Pe="",Zt="",ft="",rt;oe<Wt;){if(x=z.charCodeAt(oe),oe===ut&&_+J+xe+ie!==0&&(_!==0&&(x=_===47?10:47),J=xe=ie=0,Wt++,ut++),_+J+xe+ie===0){if(oe===ut&&(0<De&&(V=V.replace(E,"")),0<V.trim().length)){switch(x){case 32:case 9:case 59:case 13:case 10:break;default:V+=z.charAt(oe)}x=59}switch(x){case 123:for(V=V.trim(),ne=V.charCodeAt(0),U=1,Ie=++oe;oe<Wt;){switch(x=z.charCodeAt(oe)){case 123:U++;break;case 125:U--;break;case 47:switch(x=z.charCodeAt(oe+1)){case 42:case 47:e:{for(_e=oe+1;_e<ut;++_e)switch(z.charCodeAt(_e)){case 47:if(x===42&&z.charCodeAt(_e-1)===42&&oe+2!==_e){oe=_e+1;break e}break;case 10:if(x===47){oe=_e+1;break e}}oe=_e}}break;case 91:x++;case 40:x++;case 34:case 39:for(;oe++<ut&&z.charCodeAt(oe)!==x;);}if(U===0)break;oe++}switch(U=z.substring(Ie,oe),ne===0&&(ne=(V=V.replace(d,"").trim()).charCodeAt(0)),ne){case 64:switch(0<De&&(V=V.replace(E,"")),x=V.charCodeAt(1),x){case 100:case 109:case 115:case 45:De=A;break;default:De=X}if(U=e(A,De,U,x,y+1),Ie=U.length,0<he&&(De=t(X,V,it),rt=f(3,U,De,A,G,Z,Ie,x,y,j),V=De.join(""),rt!==void 0&&(Ie=(U=rt.trim()).length)===0&&(x=0,U="")),0<Ie)switch(x){case 115:V=V.replace(te,a);case 100:case 109:case 45:U=V+"{"+U+"}";break;case 107:V=V.replace(O,"$1 $2"),U=V+"{"+U+"}",U=L===1||L===2&&s("@"+U,3)?"@-webkit-"+U+"@"+U:"@"+U;break;default:U=V+U,j===112&&(U=(Pe+=U,""))}else U="";break;default:U=e(A,t(A,V,it),U,j,y+1)}Zt+=U,U=it=De=_e=ne=0,V="",x=z.charCodeAt(++oe);break;case 125:case 59:if(V=(0<De?V.replace(E,""):V).trim(),1<(Ie=V.length))switch(_e===0&&(ne=V.charCodeAt(0),ne===45||96<ne&&123>ne)&&(Ie=(V=V.replace(" ",":")).length),0<he&&(rt=f(1,V,A,H,G,Z,Pe.length,j,y,j))!==void 0&&(Ie=(V=rt.trim()).length)===0&&(V="\0\0"),ne=V.charCodeAt(0),x=V.charCodeAt(1),ne){case 0:break;case 64:if(x===105||x===99){ft+=V+z.charAt(oe);break}default:V.charCodeAt(Ie-1)!==58&&(Pe+=o(V,ne,x,V.charCodeAt(2)))}it=De=_e=ne=0,V="",x=z.charCodeAt(++oe)}}switch(x){case 13:case 10:_===47?_=0:1+ne===0&&j!==107&&0<V.length&&(De=1,V+="\0"),0<he*Oe&&f(0,V,A,H,G,Z,Pe.length,j,y,j),Z=1,G++;break;case 59:case 125:if(_+J+xe+ie===0){Z++;break}default:switch(Z++,Ve=z.charAt(oe),x){case 9:case 32:if(J+ie+_===0)switch(ke){case 44:case 58:case 9:case 32:Ve="";break;default:x!==32&&(Ve=" ")}break;case 0:Ve="\\0";break;case 12:Ve="\\f";break;case 11:Ve="\\v";break;case 38:J+_+ie===0&&(De=it=1,Ve="\f"+Ve);break;case 108:if(J+_+ie+K===0&&0<_e)switch(oe-_e){case 2:ke===112&&z.charCodeAt(oe-3)===58&&(K=ke);case 8:R===111&&(K=R)}break;case 58:J+_+ie===0&&(_e=oe);break;case 44:_+xe+J+ie===0&&(De=1,Ve+="\r");break;case 34:case 39:_===0&&(J=J===x?0:J===0?x:J);break;case 91:J+_+xe===0&&ie++;break;case 93:J+_+xe===0&&ie--;break;case 41:J+_+ie===0&&xe--;break;case 40:if(J+_+ie===0){if(ne===0)switch(2*ke+3*R){case 533:break;default:ne=1}xe++}break;case 64:_+xe+J+ie+_e+U===0&&(U=1);break;case 42:case 47:if(!(0<J+ie+xe))switch(_){case 0:switch(2*x+3*z.charCodeAt(oe+1)){case 235:_=47;break;case 220:Ie=oe,_=42}break;case 42:x===47&&ke===42&&Ie+2!==oe&&(z.charCodeAt(Ie+2)===33&&(Pe+=z.substring(Ie,oe+1)),Ve="",_=0)}}_===0&&(V+=Ve)}R=ke,ke=x,oe++}if(Ie=Pe.length,0<Ie){if(De=A,0<he&&(rt=f(2,Pe,De,H,G,Z,Ie,j,y,j),rt!==void 0&&(Pe=rt).length===0))return ft+Pe+Zt;if(Pe=De.join(",")+"{"+Pe+"}",L*K!==0){switch(L!==2||s(Pe,2)||(K=0),K){case 111:Pe=Pe.replace(b,":-moz-$1")+Pe;break;case 112:Pe=Pe.replace(D,"::-webkit-input-$1")+Pe.replace(D,"::-moz-$1")+Pe.replace(D,":-ms-input-$1")+Pe}K=0}}return ft+Pe+Zt}function t(H,A,z){var j=A.trim().split(u);A=j;var y=j.length,ie=H.length;switch(ie){case 0:case 1:var _=0;for(H=ie===0?"":H[0]+" ";_<y;++_)A[_]=n(H,A[_],z).trim();break;default:var xe=_=0;for(A=[];_<y;++_)for(var J=0;J<ie;++J)A[xe++]=n(H[J]+" ",j[_],z).trim()}return A}function n(H,A,z){var j=A.charCodeAt(0);switch(33>j&&(j=(A=A.trim()).charCodeAt(0)),j){case 38:return A.replace(P,"$1"+H.trim());case 58:return H.trim()+A.replace(P,"$1"+H.trim());default:if(0<1*z&&0<A.indexOf("\f"))return A.replace(P,(H.charCodeAt(0)===58?"":"$1")+H.trim())}return H+A}function o(H,A,z,j){var y=H+";",ie=2*A+3*z+4*j;if(ie===944){H=y.indexOf(":",9)+1;var _=y.substring(H,y.length-1).trim();return _=y.substring(0,H).trim()+_+";",L===1||L===2&&s(_,1)?"-webkit-"+_+_:_}if(L===0||L===2&&!s(y,1))return y;switch(ie){case 1015:return y.charCodeAt(10)===97?"-webkit-"+y+y:y;case 951:return y.charCodeAt(3)===116?"-webkit-"+y+y:y;case 963:return y.charCodeAt(5)===110?"-webkit-"+y+y:y;case 1009:if(y.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+y+y;case 978:return"-webkit-"+y+"-moz-"+y+y;case 1019:case 983:return"-webkit-"+y+"-moz-"+y+"-ms-"+y+y;case 883:if(y.charCodeAt(8)===45)return"-webkit-"+y+y;if(0<y.indexOf("image-set(",11))return y.replace(be,"$1-webkit-$2")+y;break;case 932:if(y.charCodeAt(4)===45)switch(y.charCodeAt(5)){case 103:return"-webkit-box-"+y.replace("-grow","")+"-webkit-"+y+"-ms-"+y.replace("grow","positive")+y;case 115:return"-webkit-"+y+"-ms-"+y.replace("shrink","negative")+y;case 98:return"-webkit-"+y+"-ms-"+y.replace("basis","preferred-size")+y}return"-webkit-"+y+"-ms-"+y+y;case 964:return"-webkit-"+y+"-ms-flex-"+y+y;case 1023:if(y.charCodeAt(8)!==99)break;return _=y.substring(y.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+_+"-webkit-"+y+"-ms-flex-pack"+_+y;case 1005:return T.test(y)?y.replace(k,":-webkit-")+y.replace(k,":-moz-")+y:y;case 1e3:switch(_=y.substring(13).trim(),A=_.indexOf("-")+1,_.charCodeAt(0)+_.charCodeAt(A)){case 226:_=y.replace(m,"tb");break;case 232:_=y.replace(m,"tb-rl");break;case 220:_=y.replace(m,"lr");break;default:return y}return"-webkit-"+y+"-ms-"+_+y;case 1017:if(y.indexOf("sticky",9)===-1)break;case 975:switch(A=(y=H).length-10,_=(y.charCodeAt(A)===33?y.substring(0,A):y).substring(H.indexOf(":",7)+1).trim(),ie=_.charCodeAt(0)+(_.charCodeAt(7)|0)){case 203:if(111>_.charCodeAt(8))break;case 115:y=y.replace(_,"-webkit-"+_)+";"+y;break;case 207:case 102:y=y.replace(_,"-webkit-"+(102<ie?"inline-":"")+"box")+";"+y.replace(_,"-webkit-"+_)+";"+y.replace(_,"-ms-"+_+"box")+";"+y}return y+";";case 938:if(y.charCodeAt(5)===45)switch(y.charCodeAt(6)){case 105:return _=y.replace("-items",""),"-webkit-"+y+"-webkit-box-"+_+"-ms-flex-"+_+y;case 115:return"-webkit-"+y+"-ms-flex-item-"+y.replace(w,"")+y;default:return"-webkit-"+y+"-ms-flex-line-pack"+y.replace("align-content","").replace(w,"")+y}break;case 973:case 989:if(y.charCodeAt(3)!==45||y.charCodeAt(4)===122)break;case 931:case 953:if(ce.test(H)===!0)return(_=H.substring(H.indexOf(":")+1)).charCodeAt(0)===115?o(H.replace("stretch","fill-available"),A,z,j).replace(":fill-available",":stretch"):y.replace(_,"-webkit-"+_)+y.replace(_,"-moz-"+_.replace("fill-",""))+y;break;case 962:if(y="-webkit-"+y+(y.charCodeAt(5)===102?"-ms-"+y:"")+y,z+j===211&&y.charCodeAt(13)===105&&0<y.indexOf("transform",10))return y.substring(0,y.indexOf(";",27)+1).replace(v,"$1-webkit-$2")+y}return y}function s(H,A){var z=H.indexOf(A===1?":":"{"),j=H.substring(0,A!==3?z:10);return z=H.substring(z+1,H.length-1),Te(A!==2?j:j.replace(re,"$1"),z,A)}function a(H,A){var z=o(A,A.charCodeAt(0),A.charCodeAt(1),A.charCodeAt(2));return z!==A+";"?z.replace(q," or ($1)").substring(4):"("+A+")"}function f(H,A,z,j,y,ie,_,xe,J,ne){for(var x=0,ke=A,R;x<he;++x)switch(R=ve[x].call(c,H,ke,z,j,y,ie,_,xe,J,ne)){case void 0:case!1:case!0:case null:break;default:ke=R}if(ke!==A)return ke}function h(H){switch(H){case void 0:case null:he=ve.length=0;break;default:if(typeof H=="function")ve[he++]=H;else if(typeof H=="object")for(var A=0,z=H.length;A<z;++A)h(H[A]);else Oe=!!H|0}return h}function p(H){return H=H.prefix,H!==void 0&&(Te=null,H?typeof H!="function"?L=1:(L=2,Te=H):L=0),p}function c(H,A){var z=H;if(33>z.charCodeAt(0)&&(z=z.trim()),Ne=z,z=[Ne],0<he){var j=f(-1,A,z,z,G,Z,0,0,0,0);j!==void 0&&typeof j=="string"&&(A=j)}var y=e(X,z,A,0,0);return 0<he&&(j=f(-2,y,z,z,G,Z,y.length,0,0,0),j!==void 0&&(y=j)),Ne="",K=0,Z=G=1,y}var d=/^\0+/g,E=/[\0\r\f]/g,k=/: */g,T=/zoo|gra/,v=/([,: ])(transform)/g,u=/,\r+?/g,P=/([\t\r\n ])*\f?&/g,O=/@(k\w+)\s*(\S*)\s*/,D=/::(place)/g,b=/:(read-only)/g,m=/[svh]\w+-[tblr]{2}/,te=/\(\s*(.*)\s*\)/g,q=/([\s\S]*?);/g,w=/-self|flex-/g,re=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ce=/stretch|:\s*\w+\-(?:conte|avail)/,be=/([^-])(image-set\()/,Z=1,G=1,K=0,L=1,X=[],ve=[],he=0,Te=null,Oe=0,Ne="";return c.use=h,c.set=p,i!==void 0&&p(i),c}var Bn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function In(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var Mn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|enterKeyHint|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|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|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)-.*))$/,Sr=In(function(i){return Mn.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),wr={exports:{}},ye={};var Er;function Nn(){if(Er)return ye;Er=1;var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,n=i?Symbol.for("react.fragment"):60107,o=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,p=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,E=i?Symbol.for("react.suspense_list"):60120,k=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,v=i?Symbol.for("react.block"):60121,u=i?Symbol.for("react.fundamental"):60117,P=i?Symbol.for("react.responder"):60118,O=i?Symbol.for("react.scope"):60119;function D(m){if(typeof m=="object"&&m!==null){var te=m.$$typeof;switch(te){case e:switch(m=m.type,m){case h:case p:case n:case s:case o:case d:return m;default:switch(m=m&&m.$$typeof,m){case f:case c:case T:case k:case a:return m;default:return te}}case t:return te}}}function b(m){return D(m)===p}return ye.AsyncMode=h,ye.ConcurrentMode=p,ye.ContextConsumer=f,ye.ContextProvider=a,ye.Element=e,ye.ForwardRef=c,ye.Fragment=n,ye.Lazy=T,ye.Memo=k,ye.Portal=t,ye.Profiler=s,ye.StrictMode=o,ye.Suspense=d,ye.isAsyncMode=function(m){return b(m)||D(m)===h},ye.isConcurrentMode=b,ye.isContextConsumer=function(m){return D(m)===f},ye.isContextProvider=function(m){return D(m)===a},ye.isElement=function(m){return typeof m=="object"&&m!==null&&m.$$typeof===e},ye.isForwardRef=function(m){return D(m)===c},ye.isFragment=function(m){return D(m)===n},ye.isLazy=function(m){return D(m)===T},ye.isMemo=function(m){return D(m)===k},ye.isPortal=function(m){return D(m)===t},ye.isProfiler=function(m){return D(m)===s},ye.isStrictMode=function(m){return D(m)===o},ye.isSuspense=function(m){return D(m)===d},ye.isValidElementType=function(m){return typeof m=="string"||typeof m=="function"||m===n||m===p||m===s||m===o||m===d||m===E||typeof m=="object"&&m!==null&&(m.$$typeof===T||m.$$typeof===k||m.$$typeof===a||m.$$typeof===f||m.$$typeof===c||m.$$typeof===u||m.$$typeof===P||m.$$typeof===O||m.$$typeof===v)},ye.typeOf=D,ye}var ge={};var Cr;function jn(){return Cr||(Cr=1,process.env.NODE_ENV!=="production"&&function(){var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,n=i?Symbol.for("react.fragment"):60107,o=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,f=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,p=i?Symbol.for("react.concurrent_mode"):60111,c=i?Symbol.for("react.forward_ref"):60112,d=i?Symbol.for("react.suspense"):60113,E=i?Symbol.for("react.suspense_list"):60120,k=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,v=i?Symbol.for("react.block"):60121,u=i?Symbol.for("react.fundamental"):60117,P=i?Symbol.for("react.responder"):60118,O=i?Symbol.for("react.scope"):60119;function D(x){return typeof x=="string"||typeof x=="function"||x===n||x===p||x===s||x===o||x===d||x===E||typeof x=="object"&&x!==null&&(x.$$typeof===T||x.$$typeof===k||x.$$typeof===a||x.$$typeof===f||x.$$typeof===c||x.$$typeof===u||x.$$typeof===P||x.$$typeof===O||x.$$typeof===v)}function b(x){if(typeof x=="object"&&x!==null){var ke=x.$$typeof;switch(ke){case e:var R=x.type;switch(R){case h:case p:case n:case s:case o:case d:return R;default:var U=R&&R.$$typeof;switch(U){case f:case c:case T:case k:case a:return U;default:return ke}}case t:return ke}}}var m=h,te=p,q=f,w=a,re=e,ce=c,be=n,Z=T,G=k,K=t,L=s,X=o,ve=d,he=!1;function Te(x){return he||(he=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),Oe(x)||b(x)===h}function Oe(x){return b(x)===p}function Ne(x){return b(x)===f}function H(x){return b(x)===a}function A(x){return typeof x=="object"&&x!==null&&x.$$typeof===e}function z(x){return b(x)===c}function j(x){return b(x)===n}function y(x){return b(x)===T}function ie(x){return b(x)===k}function _(x){return b(x)===t}function xe(x){return b(x)===s}function J(x){return b(x)===o}function ne(x){return b(x)===d}ge.AsyncMode=m,ge.ConcurrentMode=te,ge.ContextConsumer=q,ge.ContextProvider=w,ge.Element=re,ge.ForwardRef=ce,ge.Fragment=be,ge.Lazy=Z,ge.Memo=G,ge.Portal=K,ge.Profiler=L,ge.StrictMode=X,ge.Suspense=ve,ge.isAsyncMode=Te,ge.isConcurrentMode=Oe,ge.isContextConsumer=Ne,ge.isContextProvider=H,ge.isElement=A,ge.isForwardRef=z,ge.isFragment=j,ge.isLazy=y,ge.isMemo=ie,ge.isPortal=_,ge.isProfiler=xe,ge.isStrictMode=J,ge.isSuspense=ne,ge.isValidElementType=D,ge.typeOf=b}()),ge}(function(i){process.env.NODE_ENV==="production"?i.exports=Nn():i.exports=jn()})(wr);var Mi=wr.exports,Yn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Fn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Ln={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Tr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ni={};Ni[Mi.ForwardRef]=Ln,Ni[Mi.Memo]=Tr;function _r(i){return Mi.isMemo(i)?Tr:Ni[i.$$typeof]||Yn}var Xn=Object.defineProperty,Vn=Object.getOwnPropertyNames,Or=Object.getOwnPropertySymbols,Wn=Object.getOwnPropertyDescriptor,Zn=Object.getPrototypeOf,kr=Object.prototype;function Pr(i,e,t){if(typeof e!="string"){if(kr){var n=Zn(e);n&&n!==kr&&Pr(i,n,t)}var o=Vn(e);Or&&(o=o.concat(Or(e)));for(var s=_r(i),a=_r(e),f=0;f<o.length;++f){var h=o[f];if(!Fn[h]&&!(t&&t[h])&&!(a&&a[h])&&!(s&&s[h])){var p=Wn(e,h);try{Xn(i,h,p)}catch{}}}}return i}var Un=Pr;function ot(){return(ot=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n])}return i}).apply(this,arguments)}var Ar=function(i,e){for(var t=[i[0]],n=0,o=e.length;n<o;n+=1)t.push(e[n],i[n+1]);return t},ji=function(i){return i!==null&&typeof i=="object"&&(i.toString?i.toString():Object.prototype.toString.call(i))==="[object Object]"&&!hi.exports.typeOf(i)},di=Object.freeze([]),mt=Object.freeze({});function ti(i){return typeof i=="function"}function Yi(i){return process.env.NODE_ENV!=="production"&&typeof i=="string"&&i||i.displayName||i.name||"Component"}function Fi(i){return i&&typeof i.styledComponentId=="string"}var $t=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Li=typeof window<"u"&&"HTMLElement"in window,Gn=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),qn=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
11
|
+
Check the top-level render call using <`+$+">.")}return E}}function fn(f,E){{if(!f._store||f._store.validated||f.key!=null)return;f._store.validated=!0;var $=Fs(E);if(un[$])return;un[$]=!0;var U="";f&&f._owner&&f._owner!==ar.current&&(U=" It was passed a child from "+I(f._owner.type)+"."),Gt(f),A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',$,U),Gt(null)}}function hn(f,E){{if(typeof f!="object")return;if(ut(f))for(var $=0;$<f.length;$++){var U=f[$];lr(U)&&fn(U,E)}else if(lr(f))f._store&&(f._store.validated=!0);else if(f){var me=c(f);if(typeof me=="function"&&me!==f.entries)for(var Oe=me.call(f),fe;!(fe=Oe.next()).done;)lr(fe.value)&&fn(fe.value,E)}}}function Ls(f){{var E=f.type;if(E==null||typeof E=="string")return;var $;if(typeof E=="function")$=E.propTypes;else if(typeof E=="object"&&(E.$$typeof===h||E.$$typeof===p))$=E.propTypes;else return;if($){var U=I(E);Be($,f.props,"prop",U,f)}else if(E.PropTypes!==void 0&&!cr){cr=!0;var me=I(E);A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",me||"Unknown")}typeof E.getDefaultProps=="function"&&!E.getDefaultProps.isReactClassApproved&&A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Xs(f){{for(var E=Object.keys(f.props),$=0;$<E.length;$++){var U=E[$];if(U!=="children"&&U!=="key"){Gt(f),A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",U),Gt(null);break}}f.ref!==null&&(Gt(f),A("Invalid attribute `ref` supplied to `React.Fragment`."),Gt(null))}}function dn(f,E,$,U,me,Oe){{var fe=ue(f);if(!fe){var ae="";(f===void 0||typeof f=="object"&&f!==null&&Object.keys(f).length===0)&&(ae+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Ye=Ns(me);Ye?ae+=Ye:ae+=ln();var De;f===null?De="null":ut(f)?De="array":f!==void 0&&f.$$typeof===e?(De="<"+(I(f.type)||"Unknown")+" />",ae=" Did you accidentally export a JSX literal instead of a component?"):De=typeof f,A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",De,ae)}var Ie=Ys(f,E,$,me,Oe);if(Ie==null)return Ie;if(fe){var We=E.children;if(We!==void 0)if(U)if(ut(We)){for(var qt=0;qt<We.length;qt++)hn(We[qt],f);Object.freeze&&Object.freeze(We)}else A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else hn(We,f)}return f===r?Xs(Ie):Ls(Ie),Ie}}function Vs(f,E,$){return dn(f,E,$,!0)}function Ws(f,E,$){return dn(f,E,$,!1)}var Zs=Ws,Us=Vs;Jt.Fragment=r,Jt.jsx=Zs,Jt.jsxs=Us}()),Jt}(function(i){process.env.NODE_ENV==="production"?i.exports=gn():i.exports=bn()})(li);const vn=li.exports.Fragment,b=li.exports.jsx,ee=li.exports.jsxs;var zi=function(i,e){return zi=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var o in r)r.hasOwnProperty(o)&&(t[o]=r[o])},zi(i,e)};function Pt(i,e){zi(i,e);function t(){this.constructor=i}i.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function Ii(i){return typeof i=="function"}var dr=!1,Ze={Promise:void 0,set useDeprecatedSynchronousErrorHandling(i){if(i){var e=new Error;""+e.stack}dr=i},get useDeprecatedSynchronousErrorHandling(){return dr}};function Qt(i){setTimeout(function(){throw i},0)}var ui={closed:!0,next:function(i){},error:function(i){if(Ze.useDeprecatedSynchronousErrorHandling)throw i;Qt(i)},complete:function(){}},xn=function(){return Array.isArray||function(i){return i&&typeof i.length=="number"}}();function Sn(i){return i!==null&&typeof i=="object"}var wn=function(){function i(e){return Error.call(this),this.message=e?e.length+` errors occurred during unsubscription:
|
|
12
|
+
`+e.map(function(t,r){return r+1+") "+t.toString()}).join(`
|
|
13
|
+
`):"",this.name="UnsubscriptionError",this.errors=e,this}return i.prototype=Object.create(Error.prototype),i}(),fi=wn,ei=function(){function i(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return i.prototype.unsubscribe=function(){var e;if(!this.closed){var t=this,r=t._parentOrParents,o=t._ctorUnsubscribe,s=t._unsubscribe,a=t._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,r instanceof i)r.remove(this);else if(r!==null)for(var u=0;u<r.length;++u){var h=r[u];h.remove(this)}if(Ii(s)){o&&(this._unsubscribe=void 0);try{s.call(this)}catch(p){e=p instanceof fi?pr(p.errors):[p]}}if(xn(a))for(var u=-1,d=a.length;++u<d;){var l=a[u];if(Sn(l))try{l.unsubscribe()}catch(y){e=e||[],y instanceof fi?e=e.concat(pr(y.errors)):e.push(y)}}if(e)throw new fi(e)}},i.prototype.add=function(e){var t=e;if(!e)return i.EMPTY;switch(typeof e){case"function":t=new i(e);case"object":if(t===this||t.closed||typeof t.unsubscribe!="function")return t;if(this.closed)return t.unsubscribe(),t;if(!(t instanceof i)){var r=t;t=new i,t._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}var o=t._parentOrParents;if(o===null)t._parentOrParents=this;else if(o instanceof i){if(o===this)return t;t._parentOrParents=[o,this]}else if(o.indexOf(this)===-1)o.push(this);else return t;var s=this._subscriptions;return s===null?this._subscriptions=[t]:s.push(t),t},i.prototype.remove=function(e){var t=this._subscriptions;if(t){var r=t.indexOf(e);r!==-1&&t.splice(r,1)}},i.EMPTY=function(e){return e.closed=!0,e}(new i),i}();function pr(i){return i.reduce(function(e,t){return e.concat(t instanceof fi?t.errors:t)},[])}var hi=function(){return typeof Symbol=="function"?Symbol("rxSubscriber"):"@@rxSubscriber_"+Math.random()}(),$t=function(i){Pt(e,i);function e(t,r,o){var s=i.call(this)||this;switch(s.syncErrorValue=null,s.syncErrorThrown=!1,s.syncErrorThrowable=!1,s.isStopped=!1,arguments.length){case 0:s.destination=ui;break;case 1:if(!t){s.destination=ui;break}if(typeof t=="object"){t instanceof e?(s.syncErrorThrowable=t.syncErrorThrowable,s.destination=t,t.add(s)):(s.syncErrorThrowable=!0,s.destination=new mr(s,t));break}default:s.syncErrorThrowable=!0,s.destination=new mr(s,t,r,o);break}return s}return e.prototype[hi]=function(){return this},e.create=function(t,r,o){var s=new e(t,r,o);return s.syncErrorThrowable=!1,s},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,i.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parentOrParents;return this._parentOrParents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parentOrParents=t,this},e}(ei),mr=function(i){Pt(e,i);function e(t,r,o,s){var a=i.call(this)||this;a._parentSubscriber=t;var u,h=a;return Ii(r)?u=r:r&&(u=r.next,o=r.error,s=r.complete,r!==ui&&(h=Object.create(r),Ii(h.unsubscribe)&&a.add(h.unsubscribe.bind(h)),h.unsubscribe=a.unsubscribe.bind(a))),a._context=h,a._next=u,a._error=o,a._complete=s,a}return e.prototype.next=function(t){if(!this.isStopped&&this._next){var r=this._parentSubscriber;!Ze.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?this.__tryOrUnsub(this._next,t):this.__tryOrSetError(r,this._next,t)&&this.unsubscribe()}},e.prototype.error=function(t){if(!this.isStopped){var r=this._parentSubscriber,o=Ze.useDeprecatedSynchronousErrorHandling;if(this._error)!o||!r.syncErrorThrowable?(this.__tryOrUnsub(this._error,t),this.unsubscribe()):(this.__tryOrSetError(r,this._error,t),this.unsubscribe());else if(r.syncErrorThrowable)o?(r.syncErrorValue=t,r.syncErrorThrown=!0):Qt(t),this.unsubscribe();else{if(this.unsubscribe(),o)throw t;Qt(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var r=this._parentSubscriber;if(this._complete){var o=function(){return t._complete.call(t._context)};!Ze.useDeprecatedSynchronousErrorHandling||!r.syncErrorThrowable?(this.__tryOrUnsub(o),this.unsubscribe()):(this.__tryOrSetError(r,o),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,r){try{t.call(this._context,r)}catch(o){if(this.unsubscribe(),Ze.useDeprecatedSynchronousErrorHandling)throw o;Qt(o)}},e.prototype.__tryOrSetError=function(t,r,o){if(!Ze.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{r.call(this._context,o)}catch(s){return Ze.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=s,t.syncErrorThrown=!0,!0):(Qt(s),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}($t);function En(i){for(;i;){var e=i,t=e.closed,r=e.destination,o=e.isStopped;if(t||o)return!1;r&&r instanceof $t?i=r:i=null}return!0}function Cn(i,e,t){if(i){if(i instanceof $t)return i;if(i[hi])return i[hi]()}return!i&&!e&&!t?new $t(ui):new $t(i,e,t)}var Tn=function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"}();function _n(i){return i}function On(i){return i.length===0?_n:i.length===1?i[0]:function(t){return i.reduce(function(r,o){return o(r)},t)}}var yr=function(){function i(e){this._isScalar=!1,e&&(this._subscribe=e)}return i.prototype.lift=function(e){var t=new i;return t.source=this,t.operator=e,t},i.prototype.subscribe=function(e,t,r){var o=this.operator,s=Cn(e,t,r);if(o?s.add(o.call(s,this.source)):s.add(this.source||Ze.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),Ze.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},i.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){Ze.useDeprecatedSynchronousErrorHandling&&(e.syncErrorThrown=!0,e.syncErrorValue=t),En(e)?e.error(t):console.warn(t)}},i.prototype.forEach=function(e,t){var r=this;return t=gr(t),new t(function(o,s){var a;a=r.subscribe(function(u){try{e(u)}catch(h){s(h),a&&a.unsubscribe()}},s,o)})},i.prototype._subscribe=function(e){var t=this.source;return t&&t.subscribe(e)},i.prototype[Tn]=function(){return this},i.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length===0?this:On(e)(this)},i.prototype.toPromise=function(e){var t=this;return e=gr(e),new e(function(r,o){var s;t.subscribe(function(a){return s=a},function(a){return o(a)},function(){return r(s)})})},i.create=function(e){return new i(e)},i}();function gr(i){if(i||(i=Ze.Promise||Promise),!i)throw new Error("no Promise impl found");return i}var kn=function(){function i(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return i.prototype=Object.create(Error.prototype),i}(),ti=kn,An=function(i){Pt(e,i);function e(t,r){var o=i.call(this)||this;return o.subject=t,o.subscriber=r,o.closed=!1,o}return e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,r=t.observers;if(this.subject=null,!(!r||r.length===0||t.isStopped||t.closed)){var o=r.indexOf(this.subscriber);o!==-1&&r.splice(o,1)}}},e}(ei),Pn=function(i){Pt(e,i);function e(t){var r=i.call(this,t)||this;return r.destination=t,r}return e}($t),dt=function(i){Pt(e,i);function e(){var t=i.call(this)||this;return t.observers=[],t.closed=!1,t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return e.prototype[hi]=function(){return new Pn(this)},e.prototype.lift=function(t){var r=new br(this,this);return r.operator=t,r},e.prototype.next=function(t){if(this.closed)throw new ti;if(!this.isStopped)for(var r=this.observers,o=r.length,s=r.slice(),a=0;a<o;a++)s[a].next(t)},e.prototype.error=function(t){if(this.closed)throw new ti;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var r=this.observers,o=r.length,s=r.slice(),a=0;a<o;a++)s[a].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new ti;this.isStopped=!0;for(var t=this.observers,r=t.length,o=t.slice(),s=0;s<r;s++)o[s].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(t){if(this.closed)throw new ti;return i.prototype._trySubscribe.call(this,t)},e.prototype._subscribe=function(t){if(this.closed)throw new ti;return this.hasError?(t.error(this.thrownError),ei.EMPTY):this.isStopped?(t.complete(),ei.EMPTY):(this.observers.push(t),new An(this,t))},e.prototype.asObservable=function(){var t=new yr;return t.source=this,t},e.create=function(t,r){return new br(t,r)},e}(yr),br=function(i){Pt(e,i);function e(t,r){var o=i.call(this)||this;return o.destination=t,o.source=r,o}return e.prototype.next=function(t){var r=this.destination;r&&r.next&&r.next(t)},e.prototype.error=function(t){var r=this.destination;r&&r.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){var r=this.source;return r?this.source.subscribe(t):ei.EMPTY},e}(dt);class $n{constructor(){j(this,gt,void 0);M(this,gt,new dt)}setVisibilityOfBanners(e){n(this,gt).next({device:e})}shiftBanners(){n(this,gt).next("shift")}setUserState(){n(this,gt).next("show")}getCameraSubject(){return n(this,gt).asObservable()}}gt=new WeakMap;const Et=new $n,ii=v.createContext();class Bi{constructor(){j(this,at,void 0);M(this,at,new dt)}changeHistogramSectionByOffset(e,t,r,o){n(this,at).next({name:t,axis:e,increment:r,defaultRange:o})}changeHistogramFunction(e,t){n(this,at).next({name:t,fFunction:e})}changeHistogramScale(e,t){n(this,at).next({name:t,scale:e})}changeMinRequestedBinValue(e,t){n(this,at).next({name:t,minValue:e})}getChangedSection(){return n(this,at).asObservable()}}at=new WeakMap;const nt=new Bi,_e=new Bi,Re=new Bi;var di={exports:{}},ye={};var vr;function Rn(){if(vr)return ye;vr=1;var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),T;T=Symbol.for("react.module.reference");function x(c){if(typeof c=="object"&&c!==null){var k=c.$$typeof;switch(k){case i:switch(c=c.type,c){case t:case o:case r:case d:case l:return c;default:switch(c=c&&c.$$typeof,c){case u:case a:case h:case y:case p:case s:return c;default:return k}}case e:return k}}}return ye.ContextConsumer=a,ye.ContextProvider=s,ye.Element=i,ye.ForwardRef=h,ye.Fragment=t,ye.Lazy=y,ye.Memo=p,ye.Portal=e,ye.Profiler=o,ye.StrictMode=r,ye.Suspense=d,ye.SuspenseList=l,ye.isAsyncMode=function(){return!1},ye.isConcurrentMode=function(){return!1},ye.isContextConsumer=function(c){return x(c)===a},ye.isContextProvider=function(c){return x(c)===s},ye.isElement=function(c){return typeof c=="object"&&c!==null&&c.$$typeof===i},ye.isForwardRef=function(c){return x(c)===h},ye.isFragment=function(c){return x(c)===t},ye.isLazy=function(c){return x(c)===y},ye.isMemo=function(c){return x(c)===p},ye.isPortal=function(c){return x(c)===e},ye.isProfiler=function(c){return x(c)===o},ye.isStrictMode=function(c){return x(c)===r},ye.isSuspense=function(c){return x(c)===d},ye.isSuspenseList=function(c){return x(c)===l},ye.isValidElementType=function(c){return typeof c=="string"||typeof c=="function"||c===t||c===o||c===r||c===d||c===l||c===_||typeof c=="object"&&c!==null&&(c.$$typeof===y||c.$$typeof===p||c.$$typeof===s||c.$$typeof===a||c.$$typeof===h||c.$$typeof===T||c.getModuleId!==void 0)},ye.typeOf=x,ye}var ge={};var xr;function Hn(){return xr||(xr=1,process.env.NODE_ENV!=="production"&&function(){var i=Symbol.for("react.element"),e=Symbol.for("react.portal"),t=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),u=Symbol.for("react.server_context"),h=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),p=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),_=Symbol.for("react.offscreen"),T=!1,x=!1,c=!1,k=!1,A=!1,B;B=Symbol.for("react.module.reference");function H(R){return!!(typeof R=="string"||typeof R=="function"||R===t||R===o||A||R===r||R===d||R===l||k||R===_||T||x||c||typeof R=="object"&&R!==null&&(R.$$typeof===y||R.$$typeof===p||R.$$typeof===s||R.$$typeof===a||R.$$typeof===h||R.$$typeof===B||R.getModuleId!==void 0))}function g(R){if(typeof R=="object"&&R!==null){var G=R.$$typeof;switch(G){case i:var ke=R.type;switch(ke){case t:case o:case r:case d:case l:return ke;default:var se=ke&&ke.$$typeof;switch(se){case u:case a:case h:case y:case p:case s:return se;default:return G}}case e:return G}}}var re=a,J=s,C=i,oe=h,ue=t,xe=y,w=p,I=e,q=o,F=r,L=d,he=l,de=!1,Te=!1;function ce(R){return de||(de=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 18+.")),!1}function je(R){return Te||(Te=!0,console.warn("The ReactIs.isConcurrentMode() alias has been deprecated, and will be removed in React 18+.")),!1}function D(R){return g(R)===a}function P(R){return g(R)===s}function z(R){return typeof R=="object"&&R!==null&&R.$$typeof===i}function X(R){return g(R)===h}function m(R){return g(R)===t}function ie(R){return g(R)===y}function O(R){return g(R)===p}function Se(R){return g(R)===e}function Q(R){return g(R)===o}function ne(R){return g(R)===r}function S(R){return g(R)===d}function Pe(R){return g(R)===l}ge.ContextConsumer=re,ge.ContextProvider=J,ge.Element=C,ge.ForwardRef=oe,ge.Fragment=ue,ge.Lazy=xe,ge.Memo=w,ge.Portal=I,ge.Profiler=q,ge.StrictMode=F,ge.Suspense=L,ge.SuspenseList=he,ge.isAsyncMode=ce,ge.isConcurrentMode=je,ge.isContextConsumer=D,ge.isContextProvider=P,ge.isElement=z,ge.isForwardRef=X,ge.isFragment=m,ge.isLazy=ie,ge.isMemo=O,ge.isPortal=Se,ge.isProfiler=Q,ge.isStrictMode=ne,ge.isSuspense=S,ge.isSuspenseList=Pe,ge.isValidElementType=H,ge.typeOf=g}()),ge}(function(i){process.env.NODE_ENV==="production"?i.exports=Rn():i.exports=Hn()})(di);function Dn(i){function e(D,P,z,X,m){for(var ie=0,O=0,Se=0,Q=0,ne,S,Pe=0,R=0,G,ke=G=ne=0,se=0,ze=0,it=0,Be=0,Zt=z.length,ut=Zt-1,Ve,Z="",$e="",Ut="",ft="",rt;se<Zt;){if(S=z.charCodeAt(se),se===ut&&O+Q+Se+ie!==0&&(O!==0&&(S=O===47?10:47),Q=Se=ie=0,Zt++,ut++),O+Q+Se+ie===0){if(se===ut&&(0<ze&&(Z=Z.replace(y,"")),0<Z.trim().length)){switch(S){case 32:case 9:case 59:case 13:case 10:break;default:Z+=z.charAt(se)}S=59}switch(S){case 123:for(Z=Z.trim(),ne=Z.charCodeAt(0),G=1,Be=++se;se<Zt;){switch(S=z.charCodeAt(se)){case 123:G++;break;case 125:G--;break;case 47:switch(S=z.charCodeAt(se+1)){case 42:case 47:e:{for(ke=se+1;ke<ut;++ke)switch(z.charCodeAt(ke)){case 47:if(S===42&&z.charCodeAt(ke-1)===42&&se+2!==ke){se=ke+1;break e}break;case 10:if(S===47){se=ke+1;break e}}se=ke}}break;case 91:S++;case 40:S++;case 34:case 39:for(;se++<ut&&z.charCodeAt(se)!==S;);}if(G===0)break;se++}switch(G=z.substring(Be,se),ne===0&&(ne=(Z=Z.replace(p,"").trim()).charCodeAt(0)),ne){case 64:switch(0<ze&&(Z=Z.replace(y,"")),S=Z.charCodeAt(1),S){case 100:case 109:case 115:case 45:ze=P;break;default:ze=L}if(G=e(P,ze,G,S,m+1),Be=G.length,0<de&&(ze=t(L,Z,it),rt=u(3,G,ze,P,I,w,Be,S,m,X),Z=ze.join(""),rt!==void 0&&(Be=(G=rt.trim()).length)===0&&(S=0,G="")),0<Be)switch(S){case 115:Z=Z.replace(re,a);case 100:case 109:case 45:G=Z+"{"+G+"}";break;case 107:Z=Z.replace(A,"$1 $2"),G=Z+"{"+G+"}",G=F===1||F===2&&s("@"+G,3)?"@-webkit-"+G+"@"+G:"@"+G;break;default:G=Z+G,X===112&&(G=($e+=G,""))}else G="";break;default:G=e(P,t(P,Z,it),G,X,m+1)}Ut+=G,G=it=ze=ke=ne=0,Z="",S=z.charCodeAt(++se);break;case 125:case 59:if(Z=(0<ze?Z.replace(y,""):Z).trim(),1<(Be=Z.length))switch(ke===0&&(ne=Z.charCodeAt(0),ne===45||96<ne&&123>ne)&&(Be=(Z=Z.replace(" ",":")).length),0<de&&(rt=u(1,Z,P,D,I,w,$e.length,X,m,X))!==void 0&&(Be=(Z=rt.trim()).length)===0&&(Z="\0\0"),ne=Z.charCodeAt(0),S=Z.charCodeAt(1),ne){case 0:break;case 64:if(S===105||S===99){ft+=Z+z.charAt(se);break}default:Z.charCodeAt(Be-1)!==58&&($e+=o(Z,ne,S,Z.charCodeAt(2)))}it=ze=ke=ne=0,Z="",S=z.charCodeAt(++se)}}switch(S){case 13:case 10:O===47?O=0:1+ne===0&&X!==107&&0<Z.length&&(ze=1,Z+="\0"),0<de*ce&&u(0,Z,P,D,I,w,$e.length,X,m,X),w=1,I++;break;case 59:case 125:if(O+Q+Se+ie===0){w++;break}default:switch(w++,Ve=z.charAt(se),S){case 9:case 32:if(Q+ie+O===0)switch(Pe){case 44:case 58:case 9:case 32:Ve="";break;default:S!==32&&(Ve=" ")}break;case 0:Ve="\\0";break;case 12:Ve="\\f";break;case 11:Ve="\\v";break;case 38:Q+O+ie===0&&(ze=it=1,Ve="\f"+Ve);break;case 108:if(Q+O+ie+q===0&&0<ke)switch(se-ke){case 2:Pe===112&&z.charCodeAt(se-3)===58&&(q=Pe);case 8:R===111&&(q=R)}break;case 58:Q+O+ie===0&&(ke=se);break;case 44:O+Se+Q+ie===0&&(ze=1,Ve+="\r");break;case 34:case 39:O===0&&(Q=Q===S?0:Q===0?S:Q);break;case 91:Q+O+Se===0&&ie++;break;case 93:Q+O+Se===0&&ie--;break;case 41:Q+O+ie===0&&Se--;break;case 40:if(Q+O+ie===0){if(ne===0)switch(2*Pe+3*R){case 533:break;default:ne=1}Se++}break;case 64:O+Se+Q+ie+ke+G===0&&(G=1);break;case 42:case 47:if(!(0<Q+ie+Se))switch(O){case 0:switch(2*S+3*z.charCodeAt(se+1)){case 235:O=47;break;case 220:Be=se,O=42}break;case 42:S===47&&Pe===42&&Be+2!==se&&(z.charCodeAt(Be+2)===33&&($e+=z.substring(Be,se+1)),Ve="",O=0)}}O===0&&(Z+=Ve)}R=Pe,Pe=S,se++}if(Be=$e.length,0<Be){if(ze=P,0<de&&(rt=u(2,$e,ze,D,I,w,Be,X,m,X),rt!==void 0&&($e=rt).length===0))return ft+$e+Ut;if($e=ze.join(",")+"{"+$e+"}",F*q!==0){switch(F!==2||s($e,2)||(q=0),q){case 111:$e=$e.replace(H,":-moz-$1")+$e;break;case 112:$e=$e.replace(B,"::-webkit-input-$1")+$e.replace(B,"::-moz-$1")+$e.replace(B,":-ms-input-$1")+$e}q=0}}return ft+$e+Ut}function t(D,P,z){var X=P.trim().split(c);P=X;var m=X.length,ie=D.length;switch(ie){case 0:case 1:var O=0;for(D=ie===0?"":D[0]+" ";O<m;++O)P[O]=r(D,P[O],z).trim();break;default:var Se=O=0;for(P=[];O<m;++O)for(var Q=0;Q<ie;++Q)P[Se++]=r(D[Q]+" ",X[O],z).trim()}return P}function r(D,P,z){var X=P.charCodeAt(0);switch(33>X&&(X=(P=P.trim()).charCodeAt(0)),X){case 38:return P.replace(k,"$1"+D.trim());case 58:return D.trim()+P.replace(k,"$1"+D.trim());default:if(0<1*z&&0<P.indexOf("\f"))return P.replace(k,(D.charCodeAt(0)===58?"":"$1")+D.trim())}return D+P}function o(D,P,z,X){var m=D+";",ie=2*P+3*z+4*X;if(ie===944){D=m.indexOf(":",9)+1;var O=m.substring(D,m.length-1).trim();return O=m.substring(0,D).trim()+O+";",F===1||F===2&&s(O,1)?"-webkit-"+O+O:O}if(F===0||F===2&&!s(m,1))return m;switch(ie){case 1015:return m.charCodeAt(10)===97?"-webkit-"+m+m:m;case 951:return m.charCodeAt(3)===116?"-webkit-"+m+m:m;case 963:return m.charCodeAt(5)===110?"-webkit-"+m+m:m;case 1009:if(m.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+m+m;case 978:return"-webkit-"+m+"-moz-"+m+m;case 1019:case 983:return"-webkit-"+m+"-moz-"+m+"-ms-"+m+m;case 883:if(m.charCodeAt(8)===45)return"-webkit-"+m+m;if(0<m.indexOf("image-set(",11))return m.replace(xe,"$1-webkit-$2")+m;break;case 932:if(m.charCodeAt(4)===45)switch(m.charCodeAt(5)){case 103:return"-webkit-box-"+m.replace("-grow","")+"-webkit-"+m+"-ms-"+m.replace("grow","positive")+m;case 115:return"-webkit-"+m+"-ms-"+m.replace("shrink","negative")+m;case 98:return"-webkit-"+m+"-ms-"+m.replace("basis","preferred-size")+m}return"-webkit-"+m+"-ms-"+m+m;case 964:return"-webkit-"+m+"-ms-flex-"+m+m;case 1023:if(m.charCodeAt(8)!==99)break;return O=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+O+"-webkit-"+m+"-ms-flex-pack"+O+m;case 1005:return T.test(m)?m.replace(_,":-webkit-")+m.replace(_,":-moz-")+m:m;case 1e3:switch(O=m.substring(13).trim(),P=O.indexOf("-")+1,O.charCodeAt(0)+O.charCodeAt(P)){case 226:O=m.replace(g,"tb");break;case 232:O=m.replace(g,"tb-rl");break;case 220:O=m.replace(g,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+O+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(P=(m=D).length-10,O=(m.charCodeAt(P)===33?m.substring(0,P):m).substring(D.indexOf(":",7)+1).trim(),ie=O.charCodeAt(0)+(O.charCodeAt(7)|0)){case 203:if(111>O.charCodeAt(8))break;case 115:m=m.replace(O,"-webkit-"+O)+";"+m;break;case 207:case 102:m=m.replace(O,"-webkit-"+(102<ie?"inline-":"")+"box")+";"+m.replace(O,"-webkit-"+O)+";"+m.replace(O,"-ms-"+O+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return O=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+O+"-ms-flex-"+O+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(C,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(C,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(ue.test(D)===!0)return(O=D.substring(D.indexOf(":")+1)).charCodeAt(0)===115?o(D.replace("stretch","fill-available"),P,z,X).replace(":fill-available",":stretch"):m.replace(O,"-webkit-"+O)+m.replace(O,"-moz-"+O.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,z+X===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(x,"$1-webkit-$2")+m}return m}function s(D,P){var z=D.indexOf(P===1?":":"{"),X=D.substring(0,P!==3?z:10);return z=D.substring(z+1,D.length-1),Te(P!==2?X:X.replace(oe,"$1"),z,P)}function a(D,P){var z=o(P,P.charCodeAt(0),P.charCodeAt(1),P.charCodeAt(2));return z!==P+";"?z.replace(J," or ($1)").substring(4):"("+P+")"}function u(D,P,z,X,m,ie,O,Se,Q,ne){for(var S=0,Pe=P,R;S<de;++S)switch(R=he[S].call(l,D,Pe,z,X,m,ie,O,Se,Q,ne)){case void 0:case!1:case!0:case null:break;default:Pe=R}if(Pe!==P)return Pe}function h(D){switch(D){case void 0:case null:de=he.length=0;break;default:if(typeof D=="function")he[de++]=D;else if(typeof D=="object")for(var P=0,z=D.length;P<z;++P)h(D[P]);else ce=!!D|0}return h}function d(D){return D=D.prefix,D!==void 0&&(Te=null,D?typeof D!="function"?F=1:(F=2,Te=D):F=0),d}function l(D,P){var z=D;if(33>z.charCodeAt(0)&&(z=z.trim()),je=z,z=[je],0<de){var X=u(-1,P,z,z,I,w,0,0,0,0);X!==void 0&&typeof X=="string"&&(P=X)}var m=e(L,z,P,0,0);return 0<de&&(X=u(-2,m,z,z,I,w,m.length,0,0,0),X!==void 0&&(m=X)),je="",q=0,w=I=1,m}var p=/^\0+/g,y=/[\0\r\f]/g,_=/: */g,T=/zoo|gra/,x=/([,: ])(transform)/g,c=/,\r+?/g,k=/([\t\r\n ])*\f?&/g,A=/@(k\w+)\s*(\S*)\s*/,B=/::(place)/g,H=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,re=/\(\s*(.*)\s*\)/g,J=/([\s\S]*?);/g,C=/-self|flex-/g,oe=/[^]*?(:[rp][el]a[\w-]+)[^]*/,ue=/stretch|:\s*\w+\-(?:conte|avail)/,xe=/([^-])(image-set\()/,w=1,I=1,q=0,F=1,L=[],he=[],de=0,Te=null,ce=0,je="";return l.use=h,l.set=d,i!==void 0&&d(i),l}var zn={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function In(i){var e=Object.create(null);return function(t){return e[t]===void 0&&(e[t]=i(t)),e[t]}}var Bn=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|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|enterKeyHint|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|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|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)-.*))$/,Sr=In(function(i){return Bn.test(i)||i.charCodeAt(0)===111&&i.charCodeAt(1)===110&&i.charCodeAt(2)<91}),wr={exports:{}},be={};var Er;function Mn(){if(Er)return be;Er=1;var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,o=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,u=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,l=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,y=i?Symbol.for("react.suspense_list"):60120,_=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,x=i?Symbol.for("react.block"):60121,c=i?Symbol.for("react.fundamental"):60117,k=i?Symbol.for("react.responder"):60118,A=i?Symbol.for("react.scope"):60119;function B(g){if(typeof g=="object"&&g!==null){var re=g.$$typeof;switch(re){case e:switch(g=g.type,g){case h:case d:case r:case s:case o:case p:return g;default:switch(g=g&&g.$$typeof,g){case u:case l:case T:case _:case a:return g;default:return re}}case t:return re}}}function H(g){return B(g)===d}return be.AsyncMode=h,be.ConcurrentMode=d,be.ContextConsumer=u,be.ContextProvider=a,be.Element=e,be.ForwardRef=l,be.Fragment=r,be.Lazy=T,be.Memo=_,be.Portal=t,be.Profiler=s,be.StrictMode=o,be.Suspense=p,be.isAsyncMode=function(g){return H(g)||B(g)===h},be.isConcurrentMode=H,be.isContextConsumer=function(g){return B(g)===u},be.isContextProvider=function(g){return B(g)===a},be.isElement=function(g){return typeof g=="object"&&g!==null&&g.$$typeof===e},be.isForwardRef=function(g){return B(g)===l},be.isFragment=function(g){return B(g)===r},be.isLazy=function(g){return B(g)===T},be.isMemo=function(g){return B(g)===_},be.isPortal=function(g){return B(g)===t},be.isProfiler=function(g){return B(g)===s},be.isStrictMode=function(g){return B(g)===o},be.isSuspense=function(g){return B(g)===p},be.isValidElementType=function(g){return typeof g=="string"||typeof g=="function"||g===r||g===d||g===s||g===o||g===p||g===y||typeof g=="object"&&g!==null&&(g.$$typeof===T||g.$$typeof===_||g.$$typeof===a||g.$$typeof===u||g.$$typeof===l||g.$$typeof===c||g.$$typeof===k||g.$$typeof===A||g.$$typeof===x)},be.typeOf=B,be}var ve={};var Cr;function jn(){return Cr||(Cr=1,process.env.NODE_ENV!=="production"&&function(){var i=typeof Symbol=="function"&&Symbol.for,e=i?Symbol.for("react.element"):60103,t=i?Symbol.for("react.portal"):60106,r=i?Symbol.for("react.fragment"):60107,o=i?Symbol.for("react.strict_mode"):60108,s=i?Symbol.for("react.profiler"):60114,a=i?Symbol.for("react.provider"):60109,u=i?Symbol.for("react.context"):60110,h=i?Symbol.for("react.async_mode"):60111,d=i?Symbol.for("react.concurrent_mode"):60111,l=i?Symbol.for("react.forward_ref"):60112,p=i?Symbol.for("react.suspense"):60113,y=i?Symbol.for("react.suspense_list"):60120,_=i?Symbol.for("react.memo"):60115,T=i?Symbol.for("react.lazy"):60116,x=i?Symbol.for("react.block"):60121,c=i?Symbol.for("react.fundamental"):60117,k=i?Symbol.for("react.responder"):60118,A=i?Symbol.for("react.scope"):60119;function B(S){return typeof S=="string"||typeof S=="function"||S===r||S===d||S===s||S===o||S===p||S===y||typeof S=="object"&&S!==null&&(S.$$typeof===T||S.$$typeof===_||S.$$typeof===a||S.$$typeof===u||S.$$typeof===l||S.$$typeof===c||S.$$typeof===k||S.$$typeof===A||S.$$typeof===x)}function H(S){if(typeof S=="object"&&S!==null){var Pe=S.$$typeof;switch(Pe){case e:var R=S.type;switch(R){case h:case d:case r:case s:case o:case p:return R;default:var G=R&&R.$$typeof;switch(G){case u:case l:case T:case _:case a:return G;default:return Pe}}case t:return Pe}}}var g=h,re=d,J=u,C=a,oe=e,ue=l,xe=r,w=T,I=_,q=t,F=s,L=o,he=p,de=!1;function Te(S){return de||(de=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")),ce(S)||H(S)===h}function ce(S){return H(S)===d}function je(S){return H(S)===u}function D(S){return H(S)===a}function P(S){return typeof S=="object"&&S!==null&&S.$$typeof===e}function z(S){return H(S)===l}function X(S){return H(S)===r}function m(S){return H(S)===T}function ie(S){return H(S)===_}function O(S){return H(S)===t}function Se(S){return H(S)===s}function Q(S){return H(S)===o}function ne(S){return H(S)===p}ve.AsyncMode=g,ve.ConcurrentMode=re,ve.ContextConsumer=J,ve.ContextProvider=C,ve.Element=oe,ve.ForwardRef=ue,ve.Fragment=xe,ve.Lazy=w,ve.Memo=I,ve.Portal=q,ve.Profiler=F,ve.StrictMode=L,ve.Suspense=he,ve.isAsyncMode=Te,ve.isConcurrentMode=ce,ve.isContextConsumer=je,ve.isContextProvider=D,ve.isElement=P,ve.isForwardRef=z,ve.isFragment=X,ve.isLazy=m,ve.isMemo=ie,ve.isPortal=O,ve.isProfiler=Se,ve.isStrictMode=Q,ve.isSuspense=ne,ve.isValidElementType=B,ve.typeOf=H}()),ve}(function(i){process.env.NODE_ENV==="production"?i.exports=Mn():i.exports=jn()})(wr);var Mi=wr.exports,Yn={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},Nn={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Fn={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Tr={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},ji={};ji[Mi.ForwardRef]=Fn,ji[Mi.Memo]=Tr;function _r(i){return Mi.isMemo(i)?Tr:ji[i.$$typeof]||Yn}var Ln=Object.defineProperty,Xn=Object.getOwnPropertyNames,Or=Object.getOwnPropertySymbols,Vn=Object.getOwnPropertyDescriptor,Wn=Object.getPrototypeOf,kr=Object.prototype;function Ar(i,e,t){if(typeof e!="string"){if(kr){var r=Wn(e);r&&r!==kr&&Ar(i,r,t)}var o=Xn(e);Or&&(o=o.concat(Or(e)));for(var s=_r(i),a=_r(e),u=0;u<o.length;++u){var h=o[u];if(!Nn[h]&&!(t&&t[h])&&!(a&&a[h])&&!(s&&s[h])){var d=Vn(e,h);try{Ln(i,h,d)}catch{}}}}return i}var Zn=Ar;function ot(){return(ot=Object.assign||function(i){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(i[r]=t[r])}return i}).apply(this,arguments)}var Pr=function(i,e){for(var t=[i[0]],r=0,o=e.length;r<o;r+=1)t.push(e[r],i[r+1]);return t},Yi=function(i){return i!==null&&typeof i=="object"&&(i.toString?i.toString():Object.prototype.toString.call(i))==="[object Object]"&&!di.exports.typeOf(i)},pi=Object.freeze([]),pt=Object.freeze({});function ri(i){return typeof i=="function"}function Ni(i){return process.env.NODE_ENV!=="production"&&typeof i=="string"&&i||i.displayName||i.name||"Component"}function Fi(i){return i&&typeof i.styledComponentId=="string"}var Rt=typeof process<"u"&&(process.env.REACT_APP_SC_ATTR||process.env.SC_ATTR)||"data-styled",Li=typeof window<"u"&&"HTMLElement"in window,Un=Boolean(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&process.env.REACT_APP_SC_DISABLE_SPEEDY!==""?process.env.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&process.env.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&process.env.SC_DISABLE_SPEEDY!==void 0&&process.env.SC_DISABLE_SPEEDY!==""?process.env.SC_DISABLE_SPEEDY!=="false"&&process.env.SC_DISABLE_SPEEDY:process.env.NODE_ENV!=="production"),Gn=process.env.NODE_ENV!=="production"?{1:`Cannot create styled-component for component: %s.
|
|
14
14
|
|
|
15
15
|
`,2:`Can't collect styles once you've consumed a \`ServerStyleSheet\`'s styles! \`ServerStyleSheet\` is a one off instance for each server-side render cycle.
|
|
16
16
|
|
|
@@ -51,12 +51,12 @@ as for instance in your render method then you may be running into this limitati
|
|
|
51
51
|
|
|
52
52
|
`,17:`CSSStyleSheet could not be found on HTMLStyleElement.
|
|
53
53
|
Has styled-components' style tag been unmounted or altered by another script?
|
|
54
|
-
`}:{};function
|
|
55
|
-
`;return
|
|
56
|
-
`),
|
|
57
|
-
`}}}return s}(this)},i}(),
|
|
54
|
+
`}:{};function qn(){for(var i=arguments.length<=0?void 0:arguments[0],e=[],t=1,r=arguments.length;t<r;t+=1)e.push(t<0||arguments.length<=t?void 0:arguments[t]);return e.forEach(function(o){i=i.replace(/%[a-z]/,o)}),i}function Ht(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];throw process.env.NODE_ENV==="production"?new Error("An error occurred. See https://git.io/JUIaE#"+i+" for more information."+(t.length>0?" Args: "+t.join(", "):"")):new Error(qn.apply(void 0,[Gn[i]].concat(t)).trim())}var Kn=function(){function i(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}var e=i.prototype;return e.indexOfGroup=function(t){for(var r=0,o=0;o<t;o++)r+=this.groupSizes[o];return r},e.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var o=this.groupSizes,s=o.length,a=s;t>=a;)(a<<=1)<0&&Ht(16,""+t);this.groupSizes=new Uint32Array(a),this.groupSizes.set(o),this.length=a;for(var u=s;u<a;u++)this.groupSizes[u]=0}for(var h=this.indexOfGroup(t+1),d=0,l=r.length;d<l;d++)this.tag.insertRule(h,r[d])&&(this.groupSizes[t]++,h++)},e.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],o=this.indexOfGroup(t),s=o+r;this.groupSizes[t]=0;for(var a=o;a<s;a++)this.tag.deleteRule(o)}},e.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var o=this.groupSizes[t],s=this.indexOfGroup(t),a=s+o,u=s;u<a;u++)r+=this.tag.getRule(u)+`/*!sc*/
|
|
55
|
+
`;return r},i}(),mi=new Map,yi=new Map,ni=1,gi=function(i){if(mi.has(i))return mi.get(i);for(;yi.has(ni);)ni++;var e=ni++;return process.env.NODE_ENV!=="production"&&((0|e)<0||e>1<<30)&&Ht(16,""+e),mi.set(i,e),yi.set(e,i),e},Jn=function(i){return yi.get(i)},Qn=function(i,e){e>=ni&&(ni=e+1),mi.set(i,e),yi.set(e,i)},eo="style["+Rt+'][data-styled-version="5.3.6"]',to=new RegExp("^"+Rt+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),io=function(i,e,t){for(var r,o=t.split(","),s=0,a=o.length;s<a;s++)(r=o[s])&&i.registerName(e,r)},ro=function(i,e){for(var t=(e.textContent||"").split(`/*!sc*/
|
|
56
|
+
`),r=[],o=0,s=t.length;o<s;o++){var a=t[o].trim();if(a){var u=a.match(to);if(u){var h=0|parseInt(u[1],10),d=u[2];h!==0&&(Qn(d,h),io(i,d,u[3]),i.getTag().insertRules(h,r)),r.length=0}else r.push(a)}}},no=function(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null},$r=function(i){var e=document.head,t=i||e,r=document.createElement("style"),o=function(u){for(var h=u.childNodes,d=h.length;d>=0;d--){var l=h[d];if(l&&l.nodeType===1&&l.hasAttribute(Rt))return l}}(t),s=o!==void 0?o.nextSibling:null;r.setAttribute(Rt,"active"),r.setAttribute("data-styled-version","5.3.6");var a=no();return a&&r.setAttribute("nonce",a),t.insertBefore(r,s),r},oo=function(){function i(t){var r=this.element=$r(t);r.appendChild(document.createTextNode("")),this.sheet=function(o){if(o.sheet)return o.sheet;for(var s=document.styleSheets,a=0,u=s.length;a<u;a++){var h=s[a];if(h.ownerNode===o)return h}Ht(17)}(r),this.length=0}var e=i.prototype;return e.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.getRule=function(t){var r=this.sheet.cssRules[t];return r!==void 0&&typeof r.cssText=="string"?r.cssText:""},i}(),so=function(){function i(t){var r=this.element=$r(t);this.nodes=r.childNodes,this.length=0}var e=i.prototype;return e.insertRule=function(t,r){if(t<=this.length&&t>=0){var o=document.createTextNode(r),s=this.nodes[t];return this.element.insertBefore(o,s||null),this.length++,!0}return!1},e.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},i}(),ao=function(){function i(t){this.rules=[],this.length=0}var e=i.prototype;return e.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.getRule=function(t){return t<this.length?this.rules[t]:""},i}(),Rr=Li,co={isServer:!Li,useCSSOMInjection:!Un},Hr=function(){function i(t,r,o){t===void 0&&(t=pt),r===void 0&&(r={}),this.options=ot({},co,{},t),this.gs=r,this.names=new Map(o),this.server=!!t.isServer,!this.server&&Li&&Rr&&(Rr=!1,function(s){for(var a=document.querySelectorAll(eo),u=0,h=a.length;u<h;u++){var d=a[u];d&&d.getAttribute(Rt)!=="active"&&(ro(s,d),d.parentNode&&d.parentNode.removeChild(d))}}(this))}i.registerId=function(t){return gi(t)};var e=i.prototype;return e.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new i(ot({},this.options,{},t),this.gs,r&&this.names||void 0)},e.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.getTag=function(){return this.tag||(this.tag=(o=(r=this.options).isServer,s=r.useCSSOMInjection,a=r.target,t=o?new ao(a):s?new oo(a):new so(a),new Kn(t)));var t,r,o,s,a},e.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.registerName=function(t,r){if(gi(t),this.names.has(t))this.names.get(t).add(r);else{var o=new Set;o.add(r),this.names.set(t,o)}},e.insertRules=function(t,r,o){this.registerName(t,r),this.getTag().insertRules(gi(t),o)},e.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.clearRules=function(t){this.getTag().clearGroup(gi(t)),this.clearNames(t)},e.clearTag=function(){this.tag=void 0},e.toString=function(){return function(t){for(var r=t.getTag(),o=r.length,s="",a=0;a<o;a++){var u=Jn(a);if(u!==void 0){var h=t.names.get(u),d=r.getGroup(a);if(h&&d&&h.size){var l=Rt+".g"+a+'[id="'+u+'"]',p="";h!==void 0&&h.forEach(function(y){y.length>0&&(p+=y+",")}),s+=""+d+l+'{content:"'+p+`"}/*!sc*/
|
|
57
|
+
`}}}return s}(this)},i}(),lo=/(a)(d)/gi,Dr=function(i){return String.fromCharCode(i+(i>25?39:97))};function Xi(i){var e,t="";for(e=Math.abs(i);e>52;e=e/52|0)t=Dr(e%52)+t;return(Dr(e%52)+t).replace(lo,"$1-$2")}var Ct=function(i,e){for(var t=e.length;t;)i=33*i^e.charCodeAt(--t);return i},zr=function(i){return Ct(5381,i)};function uo(i){for(var e=0;e<i.length;e+=1){var t=i[e];if(ri(t)&&!Fi(t))return!1}return!0}var fo=zr("5.3.6"),ho=function(){function i(e,t,r){this.rules=e,this.staticRulesId="",this.isStatic=process.env.NODE_ENV==="production"&&(r===void 0||r.isStatic)&&uo(e),this.componentId=t,this.baseHash=Ct(fo,t),this.baseStyle=r,Hr.registerId(t)}return i.prototype.generateAndInjectStyles=function(e,t,r){var o=this.componentId,s=[];if(this.baseStyle&&s.push(this.baseStyle.generateAndInjectStyles(e,t,r)),this.isStatic&&!r.hash)if(this.staticRulesId&&t.hasNameForId(o,this.staticRulesId))s.push(this.staticRulesId);else{var a=Dt(this.rules,e,t,r).join(""),u=Xi(Ct(this.baseHash,a)>>>0);if(!t.hasNameForId(o,u)){var h=r(a,"."+u,void 0,o);t.insertRules(o,u,h)}s.push(u),this.staticRulesId=u}else{for(var d=this.rules.length,l=Ct(this.baseHash,r.hash),p="",y=0;y<d;y++){var _=this.rules[y];if(typeof _=="string")p+=_,process.env.NODE_ENV!=="production"&&(l=Ct(l,_+y));else if(_){var T=Dt(_,e,t,r),x=Array.isArray(T)?T.join(""):T;l=Ct(l,x+y),p+=x}}if(p){var c=Xi(l>>>0);if(!t.hasNameForId(o,c)){var k=r(p,"."+c,void 0,o);t.insertRules(o,c,k)}s.push(c)}}return s.join(" ")},i}(),po=/^\s*\/\/.*$/gm,mo=[":","[",".","#"];function yo(i){var e,t,r,o,s=i===void 0?pt:i,a=s.options,u=a===void 0?pt:a,h=s.plugins,d=h===void 0?pi:h,l=new Dn(u),p=[],y=function(x){function c(k){if(k)try{x(k+"}")}catch{}}return function(k,A,B,H,g,re,J,C,oe,ue){switch(k){case 1:if(oe===0&&A.charCodeAt(0)===64)return x(A+";"),"";break;case 2:if(C===0)return A+"/*|*/";break;case 3:switch(C){case 102:case 112:return x(B[0]+A),"";default:return A+(ue===0?"/*|*/":"")}case-2:A.split("/*|*/}").forEach(c)}}}(function(x){p.push(x)}),_=function(x,c,k){return c===0&&mo.indexOf(k[t.length])!==-1||k.match(o)?x:"."+e};function T(x,c,k,A){A===void 0&&(A="&");var B=x.replace(po,""),H=c&&k?k+" "+c+" { "+B+" }":B;return e=A,t=c,r=new RegExp("\\"+t+"\\b","g"),o=new RegExp("(\\"+t+"\\b){2,}"),l(k||!c?"":c,H)}return l.use([].concat(d,[function(x,c,k){x===2&&k.length&&k[0].lastIndexOf(t)>0&&(k[0]=k[0].replace(r,_))},y,function(x){if(x===-2){var c=p;return p=[],c}}])),T.hash=d.length?d.reduce(function(x,c){return c.name||Ht(15),Ct(x,c.name)},5381).toString():"",T}var Ir=v.createContext();Ir.Consumer;var Br=v.createContext(),go=(Br.Consumer,new Hr),Vi=yo();function bo(){return v.useContext(Ir)||go}function vo(){return v.useContext(Br)||Vi}var xo=function(){function i(e,t){var r=this;this.inject=function(o,s){s===void 0&&(s=Vi);var a=r.name+s.hash;o.hasNameForId(r.id,a)||o.insertRules(r.id,a,s(r.rules,a,"@keyframes"))},this.toString=function(){return Ht(12,String(r.name))},this.name=e,this.id="sc-keyframes-"+e,this.rules=t}return i.prototype.getName=function(e){return e===void 0&&(e=Vi),this.name+e.hash},i}(),So=/([A-Z])/,wo=/([A-Z])/g,Eo=/^ms-/,Co=function(i){return"-"+i.toLowerCase()};function Mr(i){return So.test(i)?i.replace(wo,Co).replace(Eo,"-ms-"):i}var jr=function(i){return i==null||i===!1||i===""};function Dt(i,e,t,r){if(Array.isArray(i)){for(var o,s=[],a=0,u=i.length;a<u;a+=1)(o=Dt(i[a],e,t,r))!==""&&(Array.isArray(o)?s.push.apply(s,o):s.push(o));return s}if(jr(i))return"";if(Fi(i))return"."+i.styledComponentId;if(ri(i)){if(typeof(d=i)!="function"||d.prototype&&d.prototype.isReactComponent||!e)return i;var h=i(e);return process.env.NODE_ENV!=="production"&&di.exports.isElement(h)&&console.warn(Ni(i)+" is not a styled component and cannot be referred to via component selector. See https://www.styled-components.com/docs/advanced#referring-to-other-components for more details."),Dt(h,e,t,r)}var d;return i instanceof xo?t?(i.inject(t,r),i.getName(r)):i:Yi(i)?function l(p,y){var _,T,x=[];for(var c in p)p.hasOwnProperty(c)&&!jr(p[c])&&(Array.isArray(p[c])&&p[c].isCss||ri(p[c])?x.push(Mr(c)+":",p[c],";"):Yi(p[c])?x.push.apply(x,l(p[c],c)):x.push(Mr(c)+": "+(_=c,(T=p[c])==null||typeof T=="boolean"||T===""?"":typeof T!="number"||T===0||_ in zn?String(T).trim():T+"px")+";"));return y?[y+" {"].concat(x,["}"]):x}(i):i.toString()}var Yr=function(i){return Array.isArray(i)&&(i.isCss=!0),i};function To(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];return ri(i)||Yi(i)?Yr(Dt(Pr(pi,[i].concat(t)))):t.length===0&&i.length===1&&typeof i[0]=="string"?i:Yr(Dt(Pr(i,t)))}var Nr=/invalid hook call/i,bi=new Set,_o=function(i,e){if(process.env.NODE_ENV!=="production"){var t="The component "+i+(e?' with the id of "'+e+'"':"")+` has been created dynamically.
|
|
58
58
|
You may see this warning because you've called styled inside another component.
|
|
59
|
-
To resolve this only create new StyledComponents outside of any render method and function component.`,
|
|
59
|
+
To resolve this only create new StyledComponents outside of any render method and function component.`,r=console.error;try{var o=!0;console.error=function(s){if(Nr.test(s))o=!1,bi.delete(t);else{for(var a=arguments.length,u=new Array(a>1?a-1:0),h=1;h<a;h++)u[h-1]=arguments[h];r.apply(void 0,[s].concat(u))}},v.useRef(),o&&!bi.has(t)&&(console.warn(t),bi.add(t))}catch(s){Nr.test(s.message)&&bi.delete(t)}finally{console.error=r}}},Oo=function(i,e,t){return t===void 0&&(t=pt),i.theme!==t.theme&&i.theme||e||t.theme},ko=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,Ao=/(^-|-$)/g;function Wi(i){return i.replace(ko,"-").replace(Ao,"")}var Po=function(i){return Xi(zr(i)>>>0)};function vi(i){return typeof i=="string"&&(process.env.NODE_ENV==="production"||i.charAt(0)===i.charAt(0).toLowerCase())}var Zi=function(i){return typeof i=="function"||typeof i=="object"&&i!==null&&!Array.isArray(i)},$o=function(i){return i!=="__proto__"&&i!=="constructor"&&i!=="prototype"};function Ro(i,e,t){var r=i[t];Zi(e)&&Zi(r)?Fr(r,e):i[t]=e}function Fr(i){for(var e=arguments.length,t=new Array(e>1?e-1:0),r=1;r<e;r++)t[r-1]=arguments[r];for(var o=0,s=t;o<s.length;o++){var a=s[o];if(Zi(a))for(var u in a)$o(u)&&Ro(i,a[u],u)}return i}var Lr=v.createContext();Lr.Consumer;var Ui={};function Xr(i,e,t){var r=Fi(i),o=!vi(i),s=e.attrs,a=s===void 0?pi:s,u=e.componentId,h=u===void 0?function(A,B){var H=typeof A!="string"?"sc":Wi(A);Ui[H]=(Ui[H]||0)+1;var g=H+"-"+Po("5.3.6"+H+Ui[H]);return B?B+"-"+g:g}(e.displayName,e.parentComponentId):u,d=e.displayName,l=d===void 0?function(A){return vi(A)?"styled."+A:"Styled("+Ni(A)+")"}(i):d,p=e.displayName&&e.componentId?Wi(e.displayName)+"-"+e.componentId:e.componentId||h,y=r&&i.attrs?Array.prototype.concat(i.attrs,a).filter(Boolean):a,_=e.shouldForwardProp;r&&i.shouldForwardProp&&(_=e.shouldForwardProp?function(A,B,H){return i.shouldForwardProp(A,B,H)&&e.shouldForwardProp(A,B,H)}:i.shouldForwardProp);var T,x=new ho(t,p,r?i.componentStyle:void 0),c=x.isStatic&&a.length===0,k=function(A,B){return function(H,g,re,J){var C=H.attrs,oe=H.componentStyle,ue=H.defaultProps,xe=H.foldedComponentIds,w=H.shouldForwardProp,I=H.styledComponentId,q=H.target;process.env.NODE_ENV!=="production"&&v.useDebugValue(I);var F=function(X,m,ie){X===void 0&&(X=pt);var O=ot({},m,{theme:X}),Se={};return ie.forEach(function(Q){var ne,S,Pe,R=Q;for(ne in ri(R)&&(R=R(O)),R)O[ne]=Se[ne]=ne==="className"?(S=Se[ne],Pe=R[ne],S&&Pe?S+" "+Pe:S||Pe):R[ne]}),[O,Se]}(Oo(g,v.useContext(Lr),ue)||pt,g,C),L=F[0],he=F[1],de=function(X,m,ie,O){var Se=bo(),Q=vo(),ne=m?X.generateAndInjectStyles(pt,Se,Q):X.generateAndInjectStyles(ie,Se,Q);return process.env.NODE_ENV!=="production"&&v.useDebugValue(ne),process.env.NODE_ENV!=="production"&&!m&&O&&O(ne),ne}(oe,J,L,process.env.NODE_ENV!=="production"?H.warnTooManyClasses:void 0),Te=re,ce=he.$as||g.$as||he.as||g.as||q,je=vi(ce),D=he!==g?ot({},g,{},he):g,P={};for(var z in D)z[0]!=="$"&&z!=="as"&&(z==="forwardedAs"?P.as=D[z]:(w?w(z,Sr,ce):!je||Sr(z))&&(P[z]=D[z]));return g.style&&he.style!==g.style&&(P.style=ot({},g.style,{},he.style)),P.className=Array.prototype.concat(xe,I,de!==I?de:null,g.className,he.className).filter(Boolean).join(" "),P.ref=Te,v.createElement(ce,P)}(T,A,B,c)};return k.displayName=l,(T=v.forwardRef(k)).attrs=y,T.componentStyle=x,T.displayName=l,T.shouldForwardProp=_,T.foldedComponentIds=r?Array.prototype.concat(i.foldedComponentIds,i.styledComponentId):pi,T.styledComponentId=p,T.target=r?i.target:i,T.withComponent=function(A){var B=e.componentId,H=function(re,J){if(re==null)return{};var C,oe,ue={},xe=Object.keys(re);for(oe=0;oe<xe.length;oe++)C=xe[oe],J.indexOf(C)>=0||(ue[C]=re[C]);return ue}(e,["componentId"]),g=B&&B+"-"+(vi(A)?A:Wi(Ni(A)));return Xr(A,ot({},H,{attrs:y,componentId:g}),t)},Object.defineProperty(T,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(A){this._foldedDefaultProps=r?Fr({},i.defaultProps,A):A}}),process.env.NODE_ENV!=="production"&&(_o(l,p),T.warnTooManyClasses=function(A,B){var H={},g=!1;return function(re){if(!g&&(H[re]=!0,Object.keys(H).length>=200)){var J=B?' with the id of "'+B+'"':"";console.warn("Over 200 classes were generated for component "+A+J+`.
|
|
60
60
|
Consider using the attrs method, together with a style object for frequently changed styles.
|
|
61
61
|
Example:
|
|
62
62
|
const Component = styled.div.attrs(props => ({
|
|
@@ -65,11 +65,11 @@ Example:
|
|
|
65
65
|
},
|
|
66
66
|
}))\`width: 100%;\`
|
|
67
67
|
|
|
68
|
-
<Component />`),
|
|
68
|
+
<Component />`),g=!0,H={}}}}(l,p)),T.toString=function(){return"."+T.styledComponentId},o&&Zn(T,i,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0,withComponent:!0}),T}var Gi=function(i){return function e(t,r,o){if(o===void 0&&(o=pt),!di.exports.isValidElementType(r))return Ht(1,String(r));var s=function(){return t(r,o,To.apply(void 0,arguments))};return s.withConfig=function(a){return e(t,r,ot({},o,{},a))},s.attrs=function(a){return e(t,r,ot({},o,{attrs:Array.prototype.concat(o.attrs,a).filter(Boolean)}))},s}(Xr,i)};["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(i){Gi[i]=Gi(i)}),process.env.NODE_ENV!=="production"&&typeof navigator<"u"&&navigator.product==="ReactNative"&&console.warn(`It looks like you've imported 'styled-components' on React Native.
|
|
69
69
|
Perhaps you're looking to import 'styled-components/native'?
|
|
70
70
|
Read more about this at https://www.styled-components.com/docs/basics#react-native`),process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="test"&&typeof window<"u"&&(window["__styled-components-init__"]=window["__styled-components-init__"]||0,window["__styled-components-init__"]===1&&console.warn(`It looks like there are several instances of 'styled-components' initialized in this application. This may cause dynamic styles to not render properly, errors during the rehydration process, a missing theme prop, and makes your application bigger without good reason.
|
|
71
71
|
|
|
72
|
-
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const
|
|
72
|
+
See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]+=1);const mt=Gi,Ho=mt.div`
|
|
73
73
|
font-family: 'IBM Plex Mono', 'Roboto', sans-serif;
|
|
74
74
|
background-color: #fafafa;
|
|
75
75
|
color: #262729;
|
|
@@ -89,7 +89,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
89
89
|
& h1 span {
|
|
90
90
|
font-size: 0.5em;
|
|
91
91
|
}
|
|
92
|
-
`,Do=
|
|
92
|
+
`,Do=mt.div`
|
|
93
93
|
display: flex;
|
|
94
94
|
height: 100%;
|
|
95
95
|
width: 170px;
|
|
@@ -122,7 +122,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
122
122
|
& span {
|
|
123
123
|
cursor: pointer;
|
|
124
124
|
}
|
|
125
|
-
`,
|
|
125
|
+
`,zo=mt.div`
|
|
126
126
|
width: 100%;
|
|
127
127
|
cursor: grab;
|
|
128
128
|
background-color: #eee;
|
|
@@ -137,7 +137,7 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
137
137
|
font-size: 1.5em;
|
|
138
138
|
font-weight: 600;
|
|
139
139
|
}
|
|
140
|
-
`,Io=
|
|
140
|
+
`,Io=mt.div`
|
|
141
141
|
cursor: pointer;
|
|
142
142
|
transform: rotate(90deg);
|
|
143
143
|
color: gray;
|
|
@@ -148,24 +148,24 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
148
148
|
&:hover {
|
|
149
149
|
text-decoration: underline;
|
|
150
150
|
}
|
|
151
|
-
`,
|
|
151
|
+
`,Bo=mt.span`
|
|
152
152
|
font-weight: 700;
|
|
153
153
|
cursor: default !important;
|
|
154
154
|
margin: 5px 15px 5px 0px;
|
|
155
|
-
`,
|
|
155
|
+
`,Mo=mt.span`
|
|
156
156
|
margin: 5px 15px 5px 0px;
|
|
157
157
|
|
|
158
158
|
&:hover {
|
|
159
159
|
text-decoration: underline;
|
|
160
160
|
}
|
|
161
|
-
`,jo=
|
|
161
|
+
`,jo=mt.div`
|
|
162
162
|
display: flex;
|
|
163
163
|
flex-direction: column;
|
|
164
164
|
overflow-y: scroll;
|
|
165
165
|
overflow-x: hidden;
|
|
166
166
|
padding-bottom: 50px;
|
|
167
167
|
font-size: 0.8em;
|
|
168
|
-
`,Vr=
|
|
168
|
+
`,Vr=mt.div`
|
|
169
169
|
font-size: 3em;
|
|
170
170
|
color: #0f52ba;
|
|
171
171
|
font-weight: bold;
|
|
@@ -176,130 +176,130 @@ See https://s-c.sh/2BAXzed for more info.`),window["__styled-components-init__"]
|
|
|
176
176
|
-moz-user-select: none;
|
|
177
177
|
-ms-user-select: none;
|
|
178
178
|
user-select: none;
|
|
179
|
-
`,Yo=
|
|
179
|
+
`,Yo=v.forwardRef(({activeToolLocal:i,tools:e,changeActiveToolLocalHandler:t},r)=>{v.useImperativeHandle(r,()=>({changeTabletDisplayHandler(a){s(a==="switch"?u=>u==="none"?"flex":"none":a)}}));const[o,s]=v.useState("none");return b(v.Fragment,{children:ee(Ho,{display:o,id:"desktop--tablet--container",children:[ee(Do,{children:[ee("h1",{children:["NDMVR",b("span",{children:b("i",{children:"tablet"})})]}),b("p",{children:"Tools"}),b(jo,{children:e.map((a,u)=>u===i?ee(Bo,{children:[b("span",{style:{fontWeight:700,color:"#0f52ba"},children:u<10?(u+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},u):ee(Mo,{onClick:()=>t(u),children:[b("span",{style:{fontWeight:700,color:"#0f52ba"},children:u<10?(u+1)%10:">"})," ",a.name.length>15?a.name.slice(0,12)+"...":a.name]},u))})]}),ee("div",{style:{width:100+"%",overflow:"scroll"},children:[ee(zo,{id:"desktop--tablet--container--header",children:[b("h1",{children:e[i].name}),b(Io,{id:"close--button",onClick:()=>s("none"),style:{cursor:"pointer",maxWidth:30+"px"},children:b("i",{children:"Hide"})})]}),b("div",{style:{display:"flex",flexDirection:"row",height:"83%",padding:"10px",alignItems:"center",justifyContent:"center"},children:e[i].fun})]})]})})}),No=window.AFRAME,Ae=new dt;let qi,Wr;function Zr(){const i=v.useRef(),[e,t]=v.useState(0),[r,o]=v.useState(null),[s,a]=v.useState(null);qi=e;const[u,h]=v.useState({xPos:0,yPos:0,zPos:0,absoluteContent:0}),[d,l]=v.useState(1),[p]=v.useState(No.utils.device.checkHeadsetConnected()?"oculus":"desktop"),y=v.useContext(ii),{source:_,theme:T}=y.stores,[x,c]=v.useState([]),[k,A]=v.useState([]);v.useEffect(()=>{console.log(y);const w=_!=null&&_.getOptions().length?_==null?void 0:_.getOptions():[];console.log(w),c(w)},[y]),v.useEffect(()=>{console.log(y);const w=T!=null&&T.getOptions().length?T==null?void 0:T.getOptions():[];console.log(w),A(w)},[y]),v.useEffect(()=>(Wr=Ae.subscribe(B),()=>Wr.unsubscribe()),[x,k]),v.useEffect(()=>{},[e]),v.useEffect(()=>{_&&r&&_.executeFunction(0,r)},[r]),v.useEffect(()=>{T&&s&&T.executeFunction(0,s)},[s]);const B=w=>{typeof w=="number"?w+1<=g.length&&(t(w),qi=e):w.changeTabletState?i.current.changeTabletDisplayHandler("switch"):w.binData?u!==w.binData&&h(w.binData):w.tool?(w.tool==="next"&&t(I=>I===g.length-1?0:I+1),w.tool==="prev"&&t(I=>I===0?g.length-1:I-1)):w.source?(w.source==="next"&&o(I=>x.indexOf(I)===x.length-1?x[0]:x[x.indexOf(I)+1]),w.source==="prev"&&o(I=>x.indexOf(I)===0?x[x.length-1]:x[x.indexOf(I)-1])):w.scale?l(I=>I+=w.scale):w.theme&&(w.theme==="next"&&a(I=>k.indexOf(I)===k.length-1?k[0]:k[k.indexOf(I)+1]),w.theme==="prev"&&a(I=>k.indexOf(I)===0?k[k.length-1]:k[k.indexOf(I)-1]))},H=()=>{switch(e){case 0:return b(v.Fragment,{children:b("a-text",{value:`Selected bin:
|
|
180
180
|
|
|
181
|
-
Value: `+
|
|
182
|
-
X: `+
|
|
183
|
-
Y: `+
|
|
184
|
-
Z: `+
|
|
181
|
+
Value: `+u.absoluteContent+`
|
|
182
|
+
X: `+u.xPos+`
|
|
183
|
+
Y: `+u.yPos+`
|
|
184
|
+
Z: `+u.zPos,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})});case 2:return b(v.Fragment,{children:b("a-text",{value:`Bin height changer:
|
|
185
185
|
|
|
186
186
|
For changing
|
|
187
187
|
the visual height of bins,
|
|
188
188
|
use grip + joystick on
|
|
189
|
-
the left controller.`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return
|
|
190
|
-
an interface for Oculus Tablet`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})}},
|
|
189
|
+
the left controller.`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})});case 1:return b("a-box",{id:"tablet",color:"white",depth:"0.001",height:"0.3",lenght:"0.01",width:"0.4",rotation:"-30 0 0",position:"0.25 0 0"});case 3:return b("a-entity",{rotation:"-30 0 0",children:x.map(w=>b("a-text",{value:w,color:w===r?"white":"lightgray",rotation:"0 0 0",position:"0.1 "+-.025*x.indexOf(w)+" 0","wrap-count":w===r?"360":"400"},w))});case 4:return b("a-entity",{rotation:"-30 0 0",children:k.map(w=>b("a-text",{value:w,color:w===s?"white":"lightgray",rotation:"0 0 0",position:"0.1 "+-.025*k.indexOf(w)+" 0","wrap-count":w===s?"360":"400"},w))});default:return b("a-text",{value:`This tool does not have
|
|
190
|
+
an interface for Oculus Tablet`,rotation:"-30 0 0",position:"0.1 0 0","wrap-count":"400"})}},g=[{fun:re(),name:"Bin Info"},{fun:J(),name:"Scale Z axis"},{fun:C(),name:"Change Data Source"},{fun:oe(),name:"Change Data Theme"},{fun:null,name:"Tool with a longer name"}];function re(){if(p==="desktop")return b(v.Fragment,{children:b("table",{style:{width:"100%"},children:ee("tbody",{children:[ee("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ee("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[b("i",{children:"value:"})," "]}),b("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:u.absoluteContent})]}),ee("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ee("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[b("i",{children:"x:"})," "]}),b("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:u.xPos})]}),ee("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ee("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[b("i",{children:"y:"})," "]}),b("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:u.yPos})]}),ee("tr",{style:{display:"flex",alignItems:"flex-end"},children:[ee("td",{style:{width:"50%",fontSize:"1em",textAlign:"right",marginBottom:"0.5em"},children:[b("i",{children:"z:"})," "]}),b("td",{style:{width:"50%",fontSize:"2em",fontWeight:600},children:u.zPos})]})]})})})}function J(){return b(v.Fragment,{children:ee("div",{style:{display:"flex",flexDirection:"column",alignItems:"center"},children:[b(Vr,{onClick:()=>{l(d+.1),_e.changeHistogramScale(.1,"TH2"),nt.changeHistogramScale(.1,"TH1")},children:"+"}),b("h1",{style:{fontSize:"5em",fontWeight:"bold"},children:d.toFixed(1)}),b(Vr,{onClick:()=>{l(d-.1),_e.changeHistogramScale(-.1,"TH2"),nt.changeHistogramScale(-.1,"TH1")},children:"-"})]})})}function C(){return b("div",{style:{display:"flex",flexDirection:"column"},children:x.map(w=>w===r?b("a",{style:{textTransform:"uppercase"},onClick:()=>o(w),children:w},w):b("a",{onClick:()=>o(w),children:w},w))})}function oe(){return b("div",{style:{display:"flex",flexDirection:"column"},children:k.map(w=>w===s?b("a",{style:{textTransform:"uppercase"},onClick:()=>a(w),children:w},w):b("a",{onClick:()=>a(w),children:w},w))})}document.getElementById("desktop--tablet--container")&&ue(document.getElementById("desktop--tablet--container"));function ue(w){let I=0,q=0,F=0,L=0;document.getElementById(w.id+"--header")?document.getElementById(w.id+"--header").onmousedown=he:w.onmousedown=he;function he(ce){ce.preventDefault(),F=ce.clientX,L=ce.clientY,document.onmouseup=Te,document.onmousemove=de}function de(ce){ce.preventDefault(),I=F-ce.clientX,q=L-ce.clientY,F=ce.clientX,L=ce.clientY,w.style.top=w.offsetTop-q+"px",w.style.left=w.offsetLeft-I+"px"}function Te(){document.onmouseup=null,document.onmousemove=null}}const xe=w=>{t(w)};return p==="desktop"?b(Yo,{tools:g,activeToolLocal:e,ref:i,changeActiveToolLocalHandler:xe}):b(v.Fragment,{children:H()})}const Tt=()=>qi,Ur=window.AFRAME,Fo=()=>{let i;const{projPanelIds:t}=v.useContext(ii).data,[r,o]=v.useState(0),[s,a]=v.useState(null),[u,h]=v.useState(Ur.utils.device.checkHeadsetConnected()?"oculus":"keyboard"),[d,l]=v.useState(!1),[p,y]=v.useState(!1),[_,T]=v.useState(!0),x=C=>{C.device?(u!==C.device&&h(C.device),l(!d)):C==="shift"?k():C==="show"&&y(!p)},c=C=>{C.changeTabletState&&T(!1)},k=()=>{let C=r+90;C>=360&&(C=0),o(C)},A=C=>t[C]?t[C]:`panel_${C}`,B=()=>ee("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ee("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color:white;",children:[b("a-text",{color:"black",width:50,value:u==="keyboard"?"Press C to show help panels":"Press Button X to show help panels",position:"-20 2.8 1"}),b("a-text",{color:"black",width:50,value:u==="keyboard"?"Press V to switch to histogram view":"Press Button Y to switch to histogram view",position:"-20 0 1"}),b("a-text",{color:"black",width:50,value:u==="keyboard"?"Press X to shift panels":"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),b("a-box",{id:A(1),scale:"80 50 2",animation__position:"property: position; from: 0 0 -60; to: 0 -1 -42; delay: 0; dur: 800; easing: linear;",material:"transparent:true"}),b("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 -60; to: 0 0 -42.5; delay: 0; dur: 800; easing: linear;",material:"color: white;"}),b("a-box",{id:A(2),scale:"80 50 2",animation__position:"property: position; from: 60 0 0; to: 42 -1 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),b("a-box",{scale:"80 52 2",animation__position:"property: position; from: 60 0 0; to: 42.5 0 0; delay: 200; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"}),b("a-box",{id:A(3),scale:"80 50 2",animation__position:"property: position; from: 0 0 60; to: 0 -1 42; delay: 400; dur: 800; easing: linear;",material:"transparent:true"}),b("a-box",{scale:"80 52 2",animation__position:"property: position; from: 0 0 60; to: 0 0 42.5; delay: 400; dur: 800; easing: linear;",material:"color: white;"}),b("a-box",{id:A(4),scale:"80 50 2",animation__position:"property: position; from: -60 0 0; to: -42 -1 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"transparent:true"}),b("a-box",{scale:"80 52 2",animation__position:"property: position; from: -60 0 0; to: -42.5 0 0; delay: 600; dur: 800; easing: linear;",rotation:"0 90 0",material:"color: white;"})]}),H=()=>u==="keyboard"?ee("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,material:"color: white",children:[ee("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[b("a-text",{color:"black",width:"50",value:p?"Press C to show help panels":"Press C to show projection panels",position:"-20 2.8 1"}),b("a-text",{color:"black",width:"50",value:"Press V to switch to histogram view",position:"-20 0 1"}),b("a-text",{color:"black",width:"50",value:"Press X to shift panels",position:"-20 -2.8 1"})]}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 60; to: -30 0 30; delay: 0; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: -30 0 -60; to: -30 0 -30; delay: 200; dur: 800; easing: linear;",rotation:"0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard1.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 -60; to: 30 0 -30; delay: 400; dur: 800; easing: linear;",rotation:"0 -45 0",src:"./assets/ndmvr/keyboardControls/keyboard2.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: 30 0 60; to: 30 0 30; delay: 600; dur: 800; easing: linear;",rotation:" 0 45 0",src:"./assets/ndmvr/keyboardControls/keyboard3.png"})]}):ee("a-entity",{position:s===null?`0 ${30} 0`:`${s.x} ${30} ${s.z}`,animation__rotation:`property: rotation; to: 0 ${r} 0; dur: 1000; easing: linear;`,children:[ee("a-entity",{geometry:"primitive: box; width: 50; height: 10; depth: 0.1;",position:"-30 28 0",rotation:"45 90 0",material:"color: white",children:[b("a-text",{color:"black",width:"50",value:p?"Press Button X to show help panels":"Press Button X to show projection panels",position:"-20 2.8 1"}),b("a-text",{color:"black",width:"50",value:"Press Button Y to switch to histogram view",position:"-20 0 1"}),b("a-text",{color:"black",width:"50",value:"Press right Trigger to shift panels",position:"-20 -2.8 1"})]}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 60; to: -32 0 32; delay: 0; dur: 800; easing: linear;",rotation:"-10 -45 0",src:"./assets/ndmvr/oculusControls/oculus.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: -35 0 -60; to: -32 0 -32; delay: 200; dur: 800; easing: linear;",rotation:"10 45 0",src:"./assets/ndmvr/oculusControls/oculus2.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 -60; to: 32 0 -32; delay: 400; dur: 800; easing: linear;",rotation:"10 -45 0",src:"./assets/ndmvr/oculusControls/oculus1.png"}),b("a-box",{scale:"80 50 2",animation__position:"property: position; from: 35 0 60; to: 32 0 32; delay: 600; dur: 800; easing: linear;",rotation:"-10 45 0",src:"./assets/ndmvr/oculusControls/oculus3.png"})]}),g=()=>{const C=document.getElementById(A(0));C&&C.setAttribute("material","opacity",0)},re=()=>{const C=document.getElementById(A(0));C&&C.setAttribute("material","opacity",1)};v.useEffect(()=>(i=Ae.subscribe(c),()=>i.unsubscribe()),[]),v.useEffect(()=>(i=Et.getCameraSubject().subscribe(x),()=>i.unsubscribe()),[d,p,r]),v.useEffect(()=>{const C=document.getElementById("camera");d?(a({x:C.object3D.position.x,y:C.object3D.position.y,z:C.object3D.position.z}),C.object3D.position.y=C.object3D.position.y+30,g()):(C.object3D.position.y=1.6,s!==null&&(C.object3D.position.x=s.x,C.object3D.position.z=s.z,C.object3D.position.y=s.y),re())},[d,u]);const J=()=>ee(v.Fragment,{children:[b("a-entity",{"laser-controls":"hand: right",raycaster:`objects: .clickable;
|
|
191
191
|
lineOpacity: 0.5;
|
|
192
|
-
far: 20;`}),
|
|
192
|
+
far: 20;`}),b("a-entity",{"oculus-touch-controls":"hand: left","left-controller-logging":!0,"oculus-thumbstick-movement-controller":"",children:b(Zr,{})}),b("a-entity",{"oculus-touch-controls":"hand: right","right-controller-logging":!0})]});return ee("a-entity",{id:"cameraWrapper",rotation:"0 -135 0",position:"-7 2 -7",children:[d&&!p&&H(),d&&p&&B(),ee("a-camera",{id:"camera","look-control":!0,"wasd-controls-enabled":"acceleration:=50",children:[_&&u==="keyboard"&&b("a-entity",{text:"value: Press E to open NDMVR Tablet;color:black;",position:"0.2 0.8 -1"}),!Ur.utils.device.checkHeadsetConnected()&&b("a-entity",{cursor:"fuse: false; fuseTimeout: 2000;",raycaster:"objects: .clickable; showLine: false; far: 100;",animation__click:"property: scale; startEvents: click; from: 0.1 0.1 0.1; to: 1.4 1.4 1.4; dur: 150",animation__mouseenter:"property: scale; startEvents: mouseenter; from: 1 1 1; to: 1.4 1.4 1.4; dur: 180",animation__mouseleave:"property: scale; startEvents: mouseleave; from: 1.4 1.4 1.4; to: 1 1 1; dur: 180",line:"color: orange; opacity: 0.5",far:"100",position:"0 0 -1",geometry:"primitive: ring; radiusInner: 0.02; radiusOuter: 0.03",material:"color: white; shader: flat"})]}),u==="oculus"&&J()]})};class Ki{constructor(){j(this,Le,void 0);j(this,Ci,void 0);j(this,qe,[]);j(this,Ti,e=>n(this,qe).filter(t=>t.id!==e.id));He(this,"containThisBin",e=>n(this,qe).filter(r=>r.id===e.id).length!==0);He(this,"storeBinToLocalStorage",e=>{this.containThisBin(e)||(n(this,qe).push(e),n(this,Le).setItem("selectedBins",JSON.stringify(n(this,qe))))});He(this,"deleteBinFromLocalStorage",e=>{this.containThisBin(e)&&(M(this,qe,n(this,Ti).call(this,e)),n(this,Le).setItem("selectedBins",JSON.stringify(n(this,qe))))});He(this,"getBinsFromLocalStorage",()=>{const e=JSON.parse(n(this,Le).getItem("selectedBins"));return e===null?[]:e});M(this,Le,window.localStorage),M(this,Ci,document.getElementById("cameraWrapper")),M(this,qe,this.getBinsFromLocalStorage())}storeCurrentBinToLocalStorage(e){n(this,Le).setItem("currentBin",JSON.stringify(e))}getCurrentBinFromLocalStorage(){const e=JSON.parse(n(this,Le).getItem("currentBin"));return e===void 0||e===""?null:e}loadProperty(e){return JSON.parse(n(this,Le).getItem(e))}storeProperty(e,t){n(this,Le).setItem(e,JSON.stringify(t))}initHistogramData(e){e._typename.includes("TH3")?this.storeTH3HistogramLimits(e):e._typename.includes("TH2")&&this.storeTH2HistogramLimits(e)}storeTH2Offsets(e,t,r){let o=this.loadProperty("TH2"),s;o===null?(o={},s={name:"TH2",xOffset:1,yOffset:1,range:8}):s={name:"TH2",xOffset:e,yOffset:t,range:r},o.section=s,this.storeProperty("TH2",o)}storeTH3Offsets(e,t,r,o){let s=this.loadProperty("TH3"),a;s===null?(s={},a={name:"TH3",xOffset:1,yOffset:1,zOffset:1,range:4}):a={name:"TH3",xOffset:e,yOffset:t,zOffset:r,range:o},s.section=a,this.storeProperty("TH3",s)}storeOffsets(e){e.name.includes("TH3")||e.name.includes("th3")?this.storeTH3Offsets(e.xOffset,e.yOffset,e.zOffset,e.range):(e.name.includes("TH2")||e.name.includes("th2"))&&this.storeTH2Offsets(e.xOffset,e.yOffset,e.range)}storeFilePath(e){n(this,Le).setItem("rootFile",e)}loadFilePath(){const e=n(this,Le).getItem("rootFile");return e??"defaultHistogram"}loadTH2Offsets(){const e=this.loadProperty("TH2");return e!==null?e.section:null}loadTH3Offsets(){const e=this.loadProperty("TH3");return e!==null?e.section:null}loadOffsets(e){if(e.includes("TH3")||e.includes("th3"))return this.loadTH3Offsets();if(e.includes("TH2")||e.includes("th2"))return this.loadTH2Offsets()}}Le=new WeakMap,Ci=new WeakMap,qe=new WeakMap,Ti=new WeakMap;const Gr=new Ki;class Lo{constructor(){j(this,_t,void 0);M(this,_t,new dt)}saveSelectedBinToLocalStorage(){n(this,_t).next(!0)}deleteBinFromLocalStorage(){n(this,_t).next(!1)}getKeyboardEvent(){return n(this,_t).asObservable()}}_t=new WeakMap;const xi=new Lo;class Xo{constructor(){j(this,zt,void 0);M(this,zt,new dt)}showBinProjection(e){n(this,zt).next(e)}getServiceEvent(){return n(this,zt).asObservable()}}zt=new WeakMap;const qr=new Xo;class Vo{constructor(){j(this,Ot,void 0);M(this,Ot,new dt)}sendDataOfTheSelectedBin(e){n(this,Ot).next(e)}emmitCommand(e){n(this,Ot).next({command:e})}getBinDistributor(){return n(this,Ot).asObservable()}}Ot=new WeakMap;const oi=new Vo;function Ji(i,e,t){i.face.normal.x!==0?(e.setAttribute("material","color",e.userData.axisZ),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Z",id:e.userData.histogramName})):i.face.normal.y!==0?(e.setAttribute("material","color",e.userData.axisY),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"Y",id:e.userData.histogramName})):(e.setAttribute("material","color",e.userData.axisX),oi.sendDataOfTheSelectedBin({event:t,data:e.userData,intersect:"X",id:e.userData.histogramName})),e.setAttribute("material","opacity","0.75")}we.registerComponent("mouseevent",{init:function(){let i;const e=this.el;let t=0;e.addEventListener("mouseenter",function(o){const s=o.detail.intersection;i=xi.getKeyboardEvent().subscribe(a=>{a?(this.userData.markedColor=this.userData.selectColor,this.setAttribute("material","opacity","0.70"),qr.showBinProjection(this.userData)):(Gr.deleteBinFromLocalStorage(this.userData),this.userData.markedColor=this.userData.color,this.setAttribute("material","opacity","0.50"))}),Ji(s,this,"HOVER")}),e.addEventListener("mouseleave",function(){i.unsubscribe(),this.setAttribute("material","color",this.userData.markedColor),this.setAttribute("material","opacity","0.50"),t=0}),e.addEventListener("click",function(o){if(t=t+1,setTimeout(()=>{t=0},600),t===2){t=0,this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1");const a=o.detail.intersection;a&&Ji(a,this,"DB_CLICK")}else if(t===1){this.setAttribute("material","color","#99ff00"),this.setAttribute("material","opacity","1"),qr.showBinProjection(this.userData),Ae.next({binData:this.userData});const a=o.detail.intersection;a&&Ji(a,this,"CLICK")}let s=document.getElementById("th2-banner");if(s===null&&(s=document.getElementById("th3-banner")),s!==null){const a=s.childNodes;if(this.userData.typeName==="TH3"&&a.length===5){const u=`[${this.userData.zTitle}] [${this.userData.zMin},${this.userData.zMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
193
193
|
`:`
|
|
194
194
|
`}`,h=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
195
195
|
`:`
|
|
196
|
-
`}`,
|
|
196
|
+
`}`,d=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
197
197
|
`:`
|
|
198
|
-
`}`,
|
|
199
|
-
`;a[0].setAttribute("text",`value: ${
|
|
198
|
+
`}`,l=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
|
|
199
|
+
`;a[0].setAttribute("text",`value: ${l}; color: ${this.userData.color}; align: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${h}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${d}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`),a[3].setAttribute("text",`value: ${u}; color: ${this.userData.axisZ}; align: center; width: 30; height: auto;`)}else{const u=`Content: ${this.userData.absoluteContent} [${this.userData.content}]
|
|
200
200
|
`,h=`[${this.userData.xTitle}] [${this.userData.xMin},${this.userData.xMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
201
201
|
`:`
|
|
202
|
-
`}`,
|
|
202
|
+
`}`,d=`[${this.userData.yTitle}] [${this.userData.yMin},${this.userData.yMax}] ${this.userData.binName!==""?this.userData.binName+`
|
|
203
203
|
`:`
|
|
204
|
-
`}`;a[0].setAttribute("text",`value: ${f}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${h}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${p}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const i=this.el;i.setAttribute("material","color",i.userData.markedColor),i.setAttribute("material","opacity","0.75")}}),we.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class ni{constructor(){I(this,Re,void 0);He(this,"verticalMoveCamera",(e,t)=>{r(this,Re)===null&&B(this,Re,document.getElementById("cameraWrapper")),r(this,Re)!==null&&(e?r(this,Re).object3D.position.y+=t:r(this,Re).object3D.position.y>0&&(r(this,Re).object3D.position.y-=t))});He(this,"horizontalMoveCamera",(e,t,n)=>{r(this,Re)===null&&B(this,Re,document.getElementById("cameraWrapper")),r(this,Re)!==null&&(t?r(this,Re).object3D.position[e]+=n:r(this,Re).object3D.position[e]-=n)});I(this,Ue,(e,t,n)=>{if(r(this,Re)!==null&&e!==null){const o=e.object3D.position.x+1*e.object3D.position.x,s=e.object3D.position.z+1*e.object3D.position.z,a=t;r(this,Re).setAttribute("animation",`property: position; to: ${o+1} ${a} ${s+1}; dur: 100;`),r(this,Re).setAttribute("animation__1",`property: rotation; to: ${r(this,Re).object3D.rotation.x} ${n} ${r(this,Re).object3D.rotation.z}; dur: 100;`)}});He(this,"setCameraPosition",e=>{if(r(this,Re)!==null){let t=r(this,Re).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const n=e.xOffset+e.xOffset,o=e.yOffset+e.yOffset;setTimeout(()=>{r(this,Re).setAttribute("animation",`property: position; to: ${n-3} ${t} ${o-3}; dur: 40;`)},1800)}});He(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&r(this,Ue).call(this,e,0,180)});He(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&r(this,Ue).call(this,e,0,0)});He(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&r(this,Ue).call(this,e,0,90)});He(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&r(this,Ue).call(this,e,0,270)});He(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&r(this,Ue).call(this,e,10,180)});He(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&r(this,Ue).call(this,e,10,0)});He(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&r(this,Ue).call(this,e,10,90)});He(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&r(this,Ue).call(this,e,10,270)});B(this,Re,document.getElementById("cameraWrapper"))}}Re=new WeakMap,Ue=new WeakMap;const st={};let er=new ni,tr,gt,xi=!1;$e.next({changeTabletState:xi});const ir=(i,e)=>{let t=.2;i.name==="scale"?t=.01:i.name==="rotation"&&(t=2),e.key==="ArrowDown"?i.xValue=i.xValue+t:e.key==="ArrowUp"?i.xValue=i.xValue-t:e.key==="="?i.yValue=i.yValue+t:e.key==="-"?i.yValue=i.yValue-t:e.key==="ArrowRight"?i.zValue=i.zValue+t:e.key==="ArrowLeft"&&(i.zValue=i.zValue-t),tr.setAttribute(i.name,`${i.xValue} ${i.yValue} ${i.zValue}`)},Zo=i=>{i.key==="k"||i.key==="K"?(Ee.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Ae.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):i.key==="i"||i.key==="I"?(Ee.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Ae.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):i.key==="u"||i.key==="U"?Ae.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):i.key==="o"||i.key==="O"?Ae.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):i.key==="l"||i.key==="L"?(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Ee.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Ae.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(i.key==="j"||i.key==="J")&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Ee.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Ae.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},Uo=i=>{i.key==="k"||i.key==="K"?(Ee.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Ae.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):i.key==="i"||i.key==="I"?(Ee.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Ae.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):i.key==="u"||i.key==="U"?Ae.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):i.key==="o"||i.key==="O"?Ae.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):i.key==="l"||i.key==="L"?(Ee.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Ae.changeHistogramSectionByOffset("xOffset","TH3",!1,!1)):(i.key==="j"||i.key==="J")&&(Ee.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Ae.changeHistogramSectionByOffset("xOffset","TH3",!0,!1))},rr=i=>{st[i.key]=!0,(st.Z||st.z)&&ir(gt[0],i),(st.X||st.x)&&ir(gt[1],i),(st.C||st.c)&&ir(gt[2],i),st.Shift&&Uo(i),Zo(i),i.key===" "&&er.verticalMoveCamera(!0,.3),i.shiftKey&&er.verticalMoveCamera(!1,.3),i.key==="1"&&$e.next(0),i.key==="2"&&$e.next(1),i.key==="3"&&$e.next(2),i.key==="4"&&$e.next(3),i.key==="5"&&$e.next(4),i.key==="6"&&$e.next(5),i.key==="7"&&$e.next(6),i.key==="8"&&$e.next(7),i.key==="9"&&$e.next(8),i.key==="0"&&$e.next(9),i.key==="Enter"&&ri.emmitCommand("REFRESH"),(i.key==="e"||i.key==="E")&&(xi=!xi,xi?$e.next({changeTabletState:"flex"}):$e.next({changeTabletState:"none"})),(i.key==="t"||i.key==="T")&&Ee.changeHistogramScale(.1,"TH2"),i.key==="r"||i.key,(i.key==="m"||i.key==="M")&&Ee.changeHistogramFunction("feet","TH2"),(i.key==="n"||i.key==="N")&&Ee.changeHistogramFunction("default","TH2"),(i.key==="c"||i.key==="C")&&pt.setUserState(),(i.key==="v"||i.key==="V")&&pt.setVisibilityOfBanners("keyboard"),(i.key==="x"||i.key==="X")&&pt.shiftBanners(),(i.key==="x"||i.key==="X")&&pt.shiftBanners()},nr=i=>{delete st[i.key]},Kr=(i,e)=>{tr=e,gt=[i.position,i.scale,i.rotation];for(let t=0;t<3;t++)tr.setAttribute(gt[t].name,`${gt[t].xValue} ${gt[t].yValue} ${gt[t].zValue}`)},Jr=()=>{er=new ni};we.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:0,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Kr(this.schema,i),document.addEventListener("keydown",rr),document.addEventListener("keyup",nr)},update:function(){Jr()}}),we.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const i=this.el;this.value=this.data.value,i.setAttribute("text","value",this.data.value)},update:function(){const i=this.el;this.value!==this.data.value&&(setTimeout(()=>{i.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Me={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class Qr{constructor(e){Me[e]?(this.xAxis=Me[e].axis.x,this.yAxis=Me[e].axis.y,this.zAxis=Me[e].axis.z,this.palette=Me[e].colorPalette,this.primaryAccent=Me[e].accent.primary,this.secondaryAccent=Me[e].accent.secondary,this.primaryFont=Me[e].font.primary,this.secondaryFont=Me[e].font.secondary):(this.xAxis=Me.def.axis.x,this.yAxis=Me.def.axis.y,this.zAxis=Me.def.axis.z,this.palette=Me.def.colorPalette,this.primaryAccent=Me.def.accent.primary,this.secondaryAccent=Me.def.accent.secondary,this.primaryFont=Me.def.font.primary,this.secondaryFont=Me.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let n=this.palette[0];if(e>=1)return this.palette[9];const o=.12;let s=o;for(let a=0;a<=9;a++){if(e<=s){n=this.palette[a];break}s+=o}return n}}class Go{constructor(e,t,n,o,s,a,f,h){I(this,Ft);I(this,Se,"");I(this,ai,[]);I(this,N,null);I(this,Ke,"");I(this,Y,null);I(this,ee,1);I(this,ae,1);I(this,M,1);I(this,Ye,0);I(this,Xe,0);I(this,Je,0);I(this,ct,1);I(this,vt,1);I(this,ci,1);I(this,fe,8);I(this,Fe,{xInitial:0,yInitial:0,zInitial:0});I(this,Qe,void 0);I(this,et,void 0);I(this,xt,1);I(this,tt,1);I(this,Ot,0);I(this,Dt,2);I(this,F,{xOffset:0,yOffset:0,zOffset:0});I(this,St,[]);He(this,"getXOffset",()=>r(this,ee));He(this,"getYOffset",()=>r(this,ae));He(this,"getZOffset",()=>r(this,M));He(this,"getContentScale",()=>r(this,tt));He(this,"getRange",()=>r(this,fe));I(this,lt,(e,t)=>{let n=e>t-r(this,fe)?t-r(this,fe):e;return n<1&&(n=1),n});I(this,Bt,e=>r(this,ai).filter(n=>n.id===e).length!==0);I(this,Ge,(e,t,n,o,s,a,f,h,p,c,d,E)=>({key:e+r(this,Se),geometry:{primitive:"plane",width:h,height:p},text:{color:E,width:4,height:"auto"},labelHandler:{value:c,delay:500},rotation:{x:s,y:a,z:f},material:{color:d},animation:{fromX:t+r(this,F).xOffset,fromY:n+r(this,F).zOffset,fromZ:o+r(this,F).yOffset,toX:t,toY:n,toZ:o}}));I(this,Ci,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,n,o,s,a,f,h,p,c,d,E,k;const T="";let v,u=0;const P=r(this,ee)+r(this,fe)>r(this,Ye)?r(this,Ye):r(this,ee)+r(this,fe),O=r(this,ae)+r(this,fe)>r(this,Xe)?r(this,Xe):r(this,ae)+r(this,fe),D=r(this,M)+r(this,fe)>r(this,Je)?r(this,Je):r(this,M)+r(this,fe),b=r(this,N).fXaxis.fTitle,m=r(this,N).fYaxis.fTitle,te=r(this,N).fZaxis.fTitle,q=r(this,N).fXaxis.fLabels?r(this,N).fXaxis.fLabels.arr:[],w=r(this,N).fYaxis.fLabels?r(this,N).fYaxis.fLabels.arr:[],re=r(this,N).fZaxis.fLabels?r(this,N).fZaxis.fLabels.arr:[],ce=[];for(let G=r(this,M);G<=D;G++)for(let K=r(this,ae);K<=O;K++)for(let L=r(this,ee);L<=P;L++){t=r(this,N).fXaxis.GetBinCenter(L),n=r(this,N).fXaxis.GetBinLowEdge(L),o=t+(t-n),s=o-n,a=r(this,N).fYaxis.GetBinCenter(K),f=r(this,N).fYaxis.GetBinLowEdge(K),h=a+(a-f),p=h-f,c=r(this,N).fZaxis.GetBinCenter(G),d=r(this,N).fZaxis.GetBinLowEdge(G),E=c+(c-d),k=E-d;const X=r(this,It).call(this,r(this,N).getBinContent(L,K,G));if(X<=r(this,Ot))continue;v=r(this,et)?r(this,Xt).call(this,r(this,et).call(this,{histogram:r(this,N),histogramId:r(this,Se),x:L,y:K,z:G})):X;let ve=v;v<.15&&(ve=.15);let he=r(this,Qe)?r(this,Qe).call(this,{histogram:r(this,N),histogramId:r(this,Se),x:L,y:K,z:G,content:v}):null;he=he||r(this,Y).getBinColor(v);const Te=r(this,Se)+n+"th3"+o+"th3"+d+"th3"+E+"th3"+f+"th3"+h;let Oe;r(this,Bt).call(this,Te)?Oe=r(this,Y).getSecondaryAccentColor():Oe=he;const Ne=`id: ${Te};
|
|
205
|
-
histogramName: ${
|
|
204
|
+
`}`;a[0].setAttribute("text",`value: ${u}; color: ${this.userData.color}; align: center; baseline: center; width: 30; height: auto;`),a[1].setAttribute("text",`value: ${h}; color: ${this.userData.axisX}; align: center; width: 30; height: auto;`),a[2].setAttribute("text",`value: ${d}; color: ${this.userData.axisY}; align: center; width: 30; height: auto;`)}}})},update:function(){const i=this.el;i.setAttribute("material","color",i.userData.markedColor),i.setAttribute("material","opacity","0.75")}}),we.registerComponent("binth",{schema:{id:{type:"string"},histogramName:{type:"string"},typeName:{type:"string"},content:{default:0},absoluteContent:{default:0},binName:{default:""},xTitle:{type:"string"},yTitle:{type:"string"},zTitle:{type:"string"},xMin:{type:"number"},yMin:{type:"number"},zMin:{type:"number"},xMax:{type:"number"},yMax:{type:"number"},zMax:{type:"number"},xPos:{type:"number"},yPos:{type:"number"},zPos:{type:"number"},xCenter:{type:"number"},yCenter:{type:"number"},zCenter:{type:"number"},xWidth:{type:"number"},yWidth:{type:"number"},zWidth:{type:"number"},color:{type:"string"},axisX:{type:"string"},axisY:{type:"string"},axisZ:{type:"string"},selectColor:{type:"string"},markedColor:{type:"string"}},init:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}},update:function(){const i=this.el;i.userData={typeName:this.data.typeName,id:this.data.id,histogramName:this.data.histogramName,content:this.data.content,absoluteContent:this.data.absoluteContent,binName:this.data.binName,xTitle:this.data.xTitle,yTitle:this.data.yTitle,zTitle:this.data.zTitle,xMin:this.data.xMin,yMin:this.data.yMin,zMin:this.data.zMin,xMax:this.data.xMax,yMax:this.data.yMax,zMax:this.data.zMax,xPos:this.data.xPos,yPos:this.data.yPos,zPos:this.data.zPos,xCenter:this.data.xCenter,yCenter:this.data.yCenter,zCenter:this.data.zCenter,xWidth:this.data.xWidth,yWidth:this.data.yWidth,zWidth:this.data.zWidth,color:this.data.color,axisX:this.data.axisX,axisY:this.data.axisY,axisZ:this.data.axisZ,selectColor:this.data.selectColor,markedColor:this.data.markedColor}}});class si{constructor(){j(this,Ee,void 0);He(this,"verticalMoveCamera",(e,t)=>{n(this,Ee)===null&&M(this,Ee,document.getElementById("cameraWrapper")),n(this,Ee)!==null&&(e?n(this,Ee).object3D.position.y+=t:n(this,Ee).object3D.position.y>0&&(n(this,Ee).object3D.position.y-=t))});He(this,"horizontalMoveCamera",(e,t,r)=>{n(this,Ee)===null&&M(this,Ee,document.getElementById("cameraWrapper")),n(this,Ee)!==null&&(t?n(this,Ee).object3D.position[e]+=r:n(this,Ee).object3D.position[e]-=r)});He(this,"horizontalDiagonalMoveCamera",(e,t,r,o)=>{if(n(this,Ee)===null&&M(this,Ee,document.getElementById("cameraWrapper")),n(this,Ee)!==null){const s=new THREE.Vector3;s[e]=Math.cos(Math.PI/4),s[t]=Math.sin(Math.PI/4),s.normalize(),r?n(this,Ee).object3D.position.addScaledVector(s,o):n(this,Ee).object3D.position.addScaledVector(s,-o)}});j(this,Ue,(e,t,r)=>{if(n(this,Ee)!==null&&e!==null){const o=e.object3D.position.x+1*e.object3D.position.x,s=e.object3D.position.z+1*e.object3D.position.z,a=t;n(this,Ee).setAttribute("animation",`property: position; to: ${o+1} ${a} ${s+1}; dur: 100;`),n(this,Ee).setAttribute("animation__1",`property: rotation; to: ${n(this,Ee).object3D.rotation.x} ${r} ${n(this,Ee).object3D.rotation.z}; dur: 100;`)}});He(this,"setCameraPosition",e=>{if(n(this,Ee)!==null){let t=n(this,Ee).object3D.position.y;e.zOffset!==void 0&&(t=e.zOffset*2);const r=e.xOffset+e.xOffset,o=e.yOffset+e.yOffset;setTimeout(()=>{n(this,Ee).setAttribute("animation",`property: position; to: ${r-3} ${t} ${o-3}; dur: 40;`)},1800)}});He(this,"setPredefinedDownPosition",()=>{const e=document.getElementById("downLabel");e!==void 0&&n(this,Ue).call(this,e,0,180)});He(this,"setPredefinedUpPosition",()=>{const e=document.getElementById("upLabel");e!==void 0&&n(this,Ue).call(this,e,0,0)});He(this,"setPredefinedRightPosition",()=>{const e=document.getElementById("rightLabel");e!==void 0&&n(this,Ue).call(this,e,0,90)});He(this,"setPredefinedLeftPosition",()=>{const e=document.getElementById("leftLabel");e!==void 0&&n(this,Ue).call(this,e,0,270)});He(this,"setPredefinedDownPositionWithOffset",()=>{const e=document.getElementById("downLabel");e!==void 0&&n(this,Ue).call(this,e,10,180)});He(this,"setPredefinedUpPositionWithOffset",()=>{const e=document.getElementById("upLabel");e!==void 0&&n(this,Ue).call(this,e,10,0)});He(this,"setPredefinedRightPositionWithOffset",()=>{const e=document.getElementById("rightLabel");e!==void 0&&n(this,Ue).call(this,e,10,90)});He(this,"setPredefinedLeftPositionWithOffset",()=>{const e=document.getElementById("leftLabel");e!==void 0&&n(this,Ue).call(this,e,10,270)});M(this,Ee,document.getElementById("cameraWrapper"))}}Ee=new WeakMap,Ue=new WeakMap;const st={};let Qi=new si,er,yt,Si=!1;Ae.next({changeTabletState:Si});const tr=(i,e)=>{let t=.2;i.name==="scale"?t=.01:i.name==="rotation"&&(t=2),e.key==="ArrowDown"?i.xValue=i.xValue+t:e.key==="ArrowUp"?i.xValue=i.xValue-t:e.key==="="?i.yValue=i.yValue+t:e.key==="-"?i.yValue=i.yValue-t:e.key==="ArrowRight"?i.zValue=i.zValue+t:e.key==="ArrowLeft"&&(i.zValue=i.zValue-t),er.setAttribute(i.name,`${i.xValue} ${i.yValue} ${i.zValue}`)},Wo=i=>{i.key==="k"||i.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)):i.key==="i"||i.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!0):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!0):i.key==="l"||i.key==="L"?(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0)):(i.key==="j"||i.key==="J")&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0))},Zo=i=>{i.key==="k"||i.key==="K"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)):i.key==="i"||i.key==="I"?(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)):i.key==="u"||i.key==="U"?Re.changeHistogramSectionByOffset("zOffset","TH3",!0,!1):i.key==="o"||i.key==="O"?Re.changeHistogramSectionByOffset("zOffset","TH3",!1,!1):i.key==="l"||i.key==="L"?(_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!1)):(i.key==="j"||i.key==="J")&&(_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1))},ir=i=>{st[i.key]=!0,(st.Z||st.z)&&tr(yt[0],i),(st.X||st.x)&&tr(yt[1],i),(st.C||st.c)&&tr(yt[2],i),st.Shift&&Zo(i),Wo(i),i.key===" "&&Qi.verticalMoveCamera(!0,.3),i.shiftKey&&Qi.verticalMoveCamera(!1,.3),i.key==="1"&&Ae.next(0),i.key==="2"&&Ae.next(1),i.key==="3"&&Ae.next(2),i.key==="4"&&Ae.next(3),i.key==="5"&&Ae.next(4),i.key==="6"&&Ae.next(5),i.key==="7"&&Ae.next(6),i.key==="8"&&Ae.next(7),i.key==="9"&&Ae.next(8),i.key==="0"&&Ae.next(9),i.key==="Enter"&&oi.emmitCommand("REFRESH"),(i.key==="e"||i.key==="E")&&(Si=!Si,Si?Ae.next({changeTabletState:"flex"}):Ae.next({changeTabletState:"none"})),(i.key==="t"||i.key==="T")&&_e.changeHistogramScale(.1,"TH2"),i.key==="r"||i.key,(i.key==="m"||i.key==="M")&&_e.changeHistogramFunction("feet","TH2"),(i.key==="n"||i.key==="N")&&_e.changeHistogramFunction("default","TH2"),(i.key==="c"||i.key==="C")&&Et.setUserState(),(i.key==="v"||i.key==="V")&&Et.setVisibilityOfBanners("keyboard"),(i.key==="x"||i.key==="X")&&Et.shiftBanners()},rr=i=>{delete st[i.key]},Kr=(i,e)=>{er=e,yt=[i.position,i.scale,i.rotation];for(let t=0;t<3;t++)er.setAttribute(yt[t].name,`${yt[t].xValue} ${yt[t].yValue} ${yt[t].zValue}`)},Jr=()=>{Qi=new si};we.registerComponent("histogram-control",{schema:{position:{name:"position",xValue:0,yValue:0,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Kr(this.schema,i),document.addEventListener("keydown",ir),document.addEventListener("keyup",rr)},update:function(){Jr()}}),we.registerComponent("label-handler",{schema:{value:{type:"string"},delay:{type:"number"}},init:function(){const i=this.el;this.value=this.data.value,i.setAttribute("text","value",this.data.value)},update:function(){const i=this.el;this.value!==this.data.value&&(setTimeout(()=>{i.setAttribute("text","value",this.data.value)},this.data.delay),this.value=this.data.value)}});const Me={def:{colorPalette:["#4b0066","#8300b3","#bb00ff","#cf4dff","#e499ff","#ffffcc","#ffff99","#ffff66","#ffff33","#fcba03"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4b0066",secondary:"#FF3700"},font:{primary:"black",secondary:"black"}},fire:{colorPalette:["#5b0000","#7b2100","#a23b00","#c84900","#df5900","#f18800","#f1a000","#ffae00","#ffcd19","#ffe159"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#5b0000",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},nebula:{colorPalette:["#13004b","#320065","#4e0085","#6100a5","#7000b8","#9800c6","#ab00c6","#b900d2","#d700da","#ff6efc"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#13004b",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},rainforest:{colorPalette:["#005b01","#007b23","#00a23d","#00c84c","#00df5c","#00f18b","#00ffb1","#19ffd0","#a6fffe","#56fffe"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#005b01",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},nature:{colorPalette:["#4a691a","#5e8425","#79a834","#91c640","#9ed64b","#a8dc59","#b0e166","#bfeb7c","#d7fba2","#deffad"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#4a691a",secondary:"#b000d4"},font:{primary:"black",secondary:"black"}},water:{colorPalette:["#00545a","#00717a","#0097a2","#00bac8","#00cede","#00dff0","#00edff","#45f2ff","#7ef6ff","#bdfaff"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#00545a",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},sunflower:{colorPalette:["#1e3600","#2e4d00","#507001","#91a004","#b4bb06","#d2d309","#eeed0f","#ffff28","#ffff85","#ffffc2"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#1e3600",secondary:"#ff3700"},font:{primary:"black",secondary:"black"}},blood:{colorPalette:["#470101","#6e0101","#800b0b","#940c0c","#a30000","#bd0909","#e01f1f","#d43b3b","#db5e5e","#f78888"],axis:{x:"#ad0c00",y:"#0206de",z:"#007d1d"},accent:{primary:"#470101",secondary:"#f6ff00"},font:{primary:"black",secondary:"black"}},magma:{colorPalette:["#dbff1d","#d5e814","#d5d007","#cc9b00","#b87600","#9c4a00","#812f00","#661900","#661420","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#2b0000",secondary:"#ae2000"},font:{primary:"black",secondary:"black"}},jupiter:{colorPalette:["#00340f","#00344f","#006e3a","#00976a","#26efd0","#9c4a00","#9c4a00","#812f00","#661900","#2b0000"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#00340f",secondary:"#e3ff5b"},font:{primary:"black",secondary:"black"}},magic:{colorPalette:["#342000","#6e5e00","#888500","#919700","#8dbe00","#caef26","#cf6e85","#b300b8","#6b0090","#3b0066"],axis:{x:"#8a0000",y:"#03017a",z:"#015e03"},accent:{primary:"#342000",secondary:"#c85bff"},font:{primary:"black",secondary:"black"}}};class Qr{constructor(e){Me[e]?(this.xAxis=Me[e].axis.x,this.yAxis=Me[e].axis.y,this.zAxis=Me[e].axis.z,this.palette=Me[e].colorPalette,this.primaryAccent=Me[e].accent.primary,this.secondaryAccent=Me[e].accent.secondary,this.primaryFont=Me[e].font.primary,this.secondaryFont=Me[e].font.secondary):(this.xAxis=Me.def.axis.x,this.yAxis=Me.def.axis.y,this.zAxis=Me.def.axis.z,this.palette=Me.def.colorPalette,this.primaryAccent=Me.def.accent.primary,this.secondaryAccent=Me.def.accent.secondary,this.primaryFont=Me.def.font.primary,this.secondaryFont=Me.def.font.secondary)}getAxisColor(e){return e==="x"||e==="X"?this.xAxis:e==="y"||e==="Y"?this.yAxis:e==="z"||e==="Z"?this.zAxis:null}getPrimaryAccentColor(){return this.primaryAccent}getSecondaryAccentColor(){return this.secondaryAccent}getPrimaryFontColor(){return this.primaryFont}getSecondaryFontColor(){return this.secondaryFont}getBinColor(e){let r=this.palette[0];if(e>=1)return this.palette[9];const o=.12;let s=o;for(let a=0;a<=9;a++){if(e<=s){r=this.palette[a];break}s+=o}return r}}class Uo{constructor(e,t,r,o,s,a,u,h){j(this,Lt);j(this,Ce,"");j(this,ai,[]);j(this,N,null);j(this,Ke,"");j(this,V,null);j(this,te,1);j(this,le,1);j(this,Y,1);j(this,Ne,0);j(this,Xe,0);j(this,Je,0);j(this,ct,1);j(this,bt,1);j(this,ci,1);j(this,pe,8);j(this,Fe,{xInitial:0,yInitial:0,zInitial:0});j(this,Qe,void 0);j(this,et,void 0);j(this,vt,1);j(this,tt,1);j(this,kt,0);j(this,It,2);j(this,W,{xOffset:0,yOffset:0,zOffset:0});j(this,xt,[]);He(this,"getXOffset",()=>n(this,te));He(this,"getYOffset",()=>n(this,le));He(this,"getZOffset",()=>n(this,Y));He(this,"getContentScale",()=>n(this,tt));He(this,"getRange",()=>n(this,pe));j(this,lt,(e,t)=>{let r=e>t-n(this,pe)?t-n(this,pe):e;return r<1&&(r=1),r});j(this,Bt,e=>n(this,ai).filter(r=>r.id===e).length!==0);j(this,Ge,(e,t,r,o,s,a,u,h,d,l,p,y)=>({key:e+n(this,Ce),geometry:{primitive:"plane",width:h,height:d},text:{color:y,width:4,height:"auto"},labelHandler:{value:l,delay:500},rotation:{x:s,y:a,z:u},material:{color:p},animation:{fromX:t+n(this,W).xOffset,fromY:r+n(this,W).zOffset,fromZ:o+n(this,W).yOffset,toX:t,toY:r,toZ:o}}));j(this,_i,()=>{const e={type:"TH3",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,o,s,a,u,h,d,l,p,y,_;const T="";let x,c=0;const k=n(this,te)+n(this,pe)>n(this,Ne)?n(this,Ne):n(this,te)+n(this,pe),A=n(this,le)+n(this,pe)>n(this,Xe)?n(this,Xe):n(this,le)+n(this,pe),B=n(this,Y)+n(this,pe)>n(this,Je)?n(this,Je):n(this,Y)+n(this,pe),H=n(this,N).fXaxis.fTitle,g=n(this,N).fYaxis.fTitle,re=n(this,N).fZaxis.fTitle,J=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],C=n(this,N).fYaxis.fLabels?n(this,N).fYaxis.fLabels.arr:[],oe=n(this,N).fZaxis.fLabels?n(this,N).fZaxis.fLabels.arr:[],ue=[];for(let I=n(this,Y);I<=B;I++)for(let q=n(this,le);q<=A;q++)for(let F=n(this,te);F<=k;F++){t=n(this,N).fXaxis.GetBinCenter(F),r=n(this,N).fXaxis.GetBinLowEdge(F),o=t+(t-r),s=o-r,a=n(this,N).fYaxis.GetBinCenter(q),u=n(this,N).fYaxis.GetBinLowEdge(q),h=a+(a-u),d=h-u,l=n(this,N).fZaxis.GetBinCenter(I),p=n(this,N).fZaxis.GetBinLowEdge(I),y=l+(l-p),_=y-p;const L=n(this,Mt).call(this,n(this,N).getBinContent(F,q,I));if(L<=n(this,kt))continue;x=n(this,et)?n(this,Vt).call(this,n(this,et).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:F,y:q,z:I})):L;let he=x;x<.15&&(he=.15);let de=n(this,Qe)?n(this,Qe).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:F,y:q,z:I,content:x}):null;de=de||n(this,V).getBinColor(x);const Te=n(this,Ce)+r+"th3"+o+"th3"+p+"th3"+y+"th3"+u+"th3"+h;let ce;n(this,Bt).call(this,Te)?ce=n(this,V).getSecondaryAccentColor():ce=de;const je=`id: ${Te};
|
|
205
|
+
histogramName: ${n(this,Ce)};
|
|
206
206
|
typeName: 'TH3';
|
|
207
|
-
content: ${
|
|
208
|
-
color: ${
|
|
209
|
-
yTitle: ${
|
|
210
|
-
xTitle: ${
|
|
211
|
-
zTitle: ${
|
|
212
|
-
absoluteContent: ${
|
|
207
|
+
content: ${x};
|
|
208
|
+
color: ${de};
|
|
209
|
+
yTitle: ${g};
|
|
210
|
+
xTitle: ${H};
|
|
211
|
+
zTitle: ${re};
|
|
212
|
+
absoluteContent: ${L};
|
|
213
213
|
binName: ${T};
|
|
214
|
-
xMin: ${
|
|
215
|
-
yMin: ${
|
|
216
|
-
zMin: ${
|
|
214
|
+
xMin: ${r};
|
|
215
|
+
yMin: ${u};
|
|
216
|
+
zMin: ${p};
|
|
217
217
|
xMax: ${o};
|
|
218
218
|
yMax: ${h};
|
|
219
|
-
zMax: ${
|
|
220
|
-
xPos: ${
|
|
221
|
-
yPos: ${
|
|
222
|
-
zPos: ${
|
|
219
|
+
zMax: ${y};
|
|
220
|
+
xPos: ${F};
|
|
221
|
+
yPos: ${q};
|
|
222
|
+
zPos: ${I};
|
|
223
223
|
xCenter: ${t};
|
|
224
224
|
yCenter: ${a};
|
|
225
|
-
zCenter: ${
|
|
225
|
+
zCenter: ${l};
|
|
226
226
|
xWidth: ${s};
|
|
227
|
-
yWidth: ${
|
|
228
|
-
zWidth: ${
|
|
229
|
-
markedColor: ${
|
|
230
|
-
selectColor: ${
|
|
231
|
-
axisX: ${
|
|
232
|
-
axisY: ${
|
|
233
|
-
axisZ: ${
|
|
234
|
-
histogramName: ${
|
|
227
|
+
yWidth: ${d};
|
|
228
|
+
zWidth: ${_};
|
|
229
|
+
markedColor: ${ce};
|
|
230
|
+
selectColor: ${n(this,V).getSecondaryAccentColor()};
|
|
231
|
+
axisX: ${n(this,V).getAxisColor("x")};
|
|
232
|
+
axisY: ${n(this,V).getAxisColor("y")};
|
|
233
|
+
axisZ: ${n(this,V).getAxisColor("z")}`,D=he*.8,P=F-1,z=I-1,X=q-1;e.bins[c]={id:Te,color:de,binData:je,content:L,animation:{fromWidth:n(this,St).call(this,Te),fromHeight:n(this,St).call(this,Te),fromDepth:n(this,St).call(this,Te),toWidth:D,toHeight:D,toDepth:D},animation2:{fromX:P+n(this,W).xOffset,fromY:z+n(this,W).zOffset,fromZ:X+n(this,W).yOffset,toX:P,toY:z,toZ:X},animation3:{fromColor:n(this,Xt).call(this,Te),toColor:ce}},ue[c]={key:Te,scale:D,color:ce},c++}M(this,xt,ue);const xe=[],w=[];return c=n(this,Nt).call(this,e,xe,w,A,k,C,g,0),c=n(this,Ft).call(this,e,xe,w,k,A,J,H,c),c=n(this,Yt).call(this,e,xe,w,k,A,B,oe,re,c),Hi(this,Lt,Di).call(this,e,xe,w,k,A,c),e.labels=[...xe,...w],e});j(this,Oi,()=>{const e={type:"TH2",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,o,s,a,u,h,d,l,p;const y="";let _=0;const T=n(this,te)+n(this,pe)>n(this,N).fXaxis.fNbins?n(this,N).fXaxis.fNbins:n(this,te)+n(this,pe),x=n(this,le)+n(this,pe)>n(this,N).fYaxis.fNbins?n(this,N).fYaxis.fNbins:n(this,le)+n(this,pe),c=n(this,N).fXaxis.fTitle!==""?n(this,N).fXaxis.fTitle:"x",k=n(this,N).fYaxis.fTitle!==""?n(this,N).fYaxis.fTitle:"y",A=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],B=n(this,N).fYaxis.fLabels?n(this,N).fYaxis.fLabels.arr:[],H=[];for(let J=n(this,le);J<=x;J++)for(let C=n(this,te);C<=T;C++){r=n(this,N).fXaxis.GetBinCenter(C),o=n(this,N).fXaxis.GetBinLowEdge(C),s=r+(r-o),a=s-o,u=n(this,N).fYaxis.GetBinCenter(J),h=n(this,N).fYaxis.GetBinLowEdge(J),d=u+(u-h),l=d-h;const oe=n(this,Mt).call(this,n(this,N).getBinContent(C,J));if(oe<=n(this,kt))continue;p=n(this,et)?n(this,Vt).call(this,n(this,et).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:C,y:J})):oe,t=p*n(this,pe)*n(this,tt)/16;let ue=n(this,Qe)?n(this,Qe).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:C,y:J,content:p}):null;ue=ue||n(this,V).getBinColor(p);const xe=n(this,Ce)+o+"th2"+s+"th2"+h+"th2"+d;let w;n(this,Bt).call(this,xe)?w=n(this,V).getSecondaryAccentColor():w=ue;const I=`id: ${xe};
|
|
234
|
+
histogramName: ${n(this,Ce)};
|
|
235
235
|
typeName: 'TH2';
|
|
236
|
-
content: ${
|
|
237
|
-
color: ${
|
|
238
|
-
yTitle: ${
|
|
239
|
-
xTitle: ${
|
|
236
|
+
content: ${p};
|
|
237
|
+
color: ${ue};
|
|
238
|
+
yTitle: ${k};
|
|
239
|
+
xTitle: ${c};
|
|
240
240
|
zTitle: 'none';
|
|
241
|
-
absoluteContent: ${
|
|
242
|
-
binName: ${
|
|
241
|
+
absoluteContent: ${oe};
|
|
242
|
+
binName: ${y};
|
|
243
243
|
xMin: ${o};
|
|
244
244
|
yMin: ${h};
|
|
245
245
|
zMin: ${0};
|
|
246
246
|
xMax: ${s};
|
|
247
|
-
yMax: ${
|
|
247
|
+
yMax: ${d};
|
|
248
248
|
zMax: ${0};
|
|
249
|
-
xPos: ${
|
|
250
|
-
yPos: ${
|
|
249
|
+
xPos: ${C};
|
|
250
|
+
yPos: ${J};
|
|
251
251
|
zPos: ${0};
|
|
252
|
-
xCenter: ${
|
|
253
|
-
yCenter: ${
|
|
252
|
+
xCenter: ${r};
|
|
253
|
+
yCenter: ${u};
|
|
254
254
|
yCenter: ${0};
|
|
255
255
|
xWidth: ${a};
|
|
256
|
-
yWidth: ${
|
|
256
|
+
yWidth: ${l};
|
|
257
257
|
zWidth: ${0};
|
|
258
|
-
markedColor: ${
|
|
259
|
-
selectColor: ${
|
|
260
|
-
axisX: ${
|
|
261
|
-
axisY: ${
|
|
262
|
-
axisZ: ${
|
|
263
|
-
histogramName: ${
|
|
258
|
+
markedColor: ${w};
|
|
259
|
+
selectColor: ${n(this,V).getSecondaryAccentColor()};
|
|
260
|
+
axisX: ${n(this,V).getAxisColor("x")};
|
|
261
|
+
axisY: ${n(this,V).getAxisColor("y")};
|
|
262
|
+
axisZ: ${n(this,V).getAxisColor("z")}`,q=a/n(this,ct)/n(this,It),F=l/n(this,bt)/n(this,It),L=C-1,he=J-1;e.bins[_]={id:xe,color:ue,binData:I,content:oe,animation:{fromWidth:q,fromHeight:n(this,St).call(this,xe),fromDepth:F,toWidth:q,toHeight:p*n(this,pe)*n(this,tt)/8,toDepth:F},animation2:{fromX:L+n(this,W).xOffset,fromY:t,fromZ:he+n(this,W).yOffset,toX:L,toY:t,toZ:he},animation3:{fromColor:n(this,Xt).call(this,xe),toColor:w}},H[_]={key:xe,scale:p,color:w},_++}M(this,xt,H);const g=[],re=[];return _=n(this,Nt).call(this,e,g,re,x,T,B,k,0),_=n(this,Ft).call(this,e,g,re,T,x,A,c,_),_=n(this,Yt).call(this,e,g,re,T,x,void 0,void 0,void 0,_),Hi(this,Lt,Di).call(this,e,g,re,T,x,_),e.labels=[...g,...re],e});j(this,ki,()=>{const e={type:"TH1",bins:[],labels:[],banners:[],ground:{},titles:[],axisLabels:[]};let t,r,o,s,a,u;const h="";let d=0;const l=n(this,te)+n(this,pe)>n(this,N).fXaxis.fNbins?n(this,N).fXaxis.fNbins:n(this,te)+n(this,pe),p=1,y=n(this,N).fXaxis.fTitle!==""?n(this,N).fXaxis.fTitle:"x",_=n(this,N).fXaxis.fLabels?n(this,N).fXaxis.fLabels.arr:[],T=[];for(let k=n(this,te);k<=l;k++){r=n(this,N).fXaxis.GetBinCenter(k),o=n(this,N).fXaxis.GetBinLowEdge(k),s=r+(r-o),a=s-o;const A=n(this,Mt).call(this,n(this,N).getBinContent(k));if(A<=n(this,kt))continue;u=n(this,et)?n(this,Vt).call(this,n(this,et).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:k})):A,t=u*n(this,pe)*n(this,tt)/16;let B=n(this,Qe)?n(this,Qe).call(this,{histogram:n(this,N),histogramId:n(this,Ce),x:k,content:u}):null;B=B||n(this,V).getBinColor(u);const H=n(this,Ce)+o+"th1"+s;let g;n(this,Bt).call(this,H)?g=n(this,V).getSecondaryAccentColor():g=B;const re=`id: ${H};
|
|
263
|
+
histogramName: ${n(this,Ce)};
|
|
264
264
|
typeName: 'TH1';
|
|
265
|
-
content: ${
|
|
266
|
-
xTitle: ${
|
|
265
|
+
content: ${u};
|
|
266
|
+
xTitle: ${y};
|
|
267
267
|
zTitle: 'none';
|
|
268
|
-
absoluteContent: ${
|
|
268
|
+
absoluteContent: ${A};
|
|
269
269
|
binName: ${h};
|
|
270
270
|
xMin: ${o};
|
|
271
271
|
zMin: ${0};
|
|
272
272
|
xMax: ${s};
|
|
273
273
|
zMax: ${0};
|
|
274
|
-
xPos: ${
|
|
274
|
+
xPos: ${k};
|
|
275
275
|
zPos: ${0};
|
|
276
|
-
xCenter: ${
|
|
276
|
+
xCenter: ${r};
|
|
277
277
|
yCenter: ${0};
|
|
278
278
|
xWidth: ${a};
|
|
279
279
|
zWidth: ${0};
|
|
280
|
-
markedColor: ${
|
|
281
|
-
selectColor: ${
|
|
282
|
-
axisX: ${
|
|
283
|
-
axisY: ${
|
|
284
|
-
axisZ: ${r(this,Y).getAxisColor("z")}`,q=a/r(this,ct)/r(this,Dt),w=P-1,re=0;e.bins[p]={id:b,color:D,binData:te,content:O,animation:{fromWidth:q,fromHeight:r(this,wt).call(this,b),fromDepth:q,toWidth:q,toHeight:f*r(this,fe)*r(this,tt)/8,toDepth:q},animation2:{fromX:w+r(this,F).xOffset,fromY:t,fromZ:re,toX:w,toY:t,toZ:re},animation3:{fromColor:r(this,Lt).call(this,b),toColor:m}},T[p]={key:b,scale:f,color:m},p++}B(this,St,T);const v=[],u=[];return p=r(this,jt).call(this,e,v,u,d,c,void 0,void 0,0),p=r(this,Yt).call(this,e,v,u,c,d,k,E,p),p=r(this,Nt).call(this,e,v,u,c,d,void 0,void 0,void 0,p),$i(this,Ft,Ri).call(this,e,v,u,c,d,p),e.labels=[...v,...u],e});I(this,It,e=>e<=0?0:(r(this,xt)>1&&(e=Math.round((e/r(this,xt)+Number.EPSILON)*100)/100),e));I(this,Mt,(e,t,n,o,s)=>{if(B(this,F,{xOffset:0,yOffset:0,zOffset:0}),n){if(s?(t[o]+=1,r(this,F)[o]=-1):(t[o]+=t.range,r(this,F)[o]=-t.range),e[o]<=t.range)return t[o]=1,r(this,F)[o]=0,t;if(t[o]>e[o]-t.range)return t[o]=e[o]-t.range,r(this,F)[o]=0,t}else if(s?(t[o]-=1,r(this,F)[o]=1):(t[o]-=t.range,r(this,F)[o]=t.range),t[o]<1)return t[o]=1,r(this,F)[o]=0,t;return t});I(this,Nt,(e,t,n,o,s,a,f,h,p)=>(t[p]=r(this,Ge).call(this,9e4+p,o+.5,r(this,M)-1,s+.5,270,360,0,2,2,`${f?f[r(this,M)-1]?f[r(this,M)-1].fString:Math.round((r(this,Fe).zInitial+r(this,M)-1+Number.EPSILON)*100)/100:"0"}`,r(this,Y).getAxisColor("y"),r(this,Y).getSecondaryFontColor()),n[p]=r(this,Ge).call(this,91e3+p,o+.5,r(this,M)-1,r(this,ae)-2.5,270,90,0,2,2,`${f?f[r(this,M)-1]?f[r(this,M)-1].fString:Math.round((r(this,Fe).zInitial+r(this,M)-1+Number.EPSILON)*100)/100:"0"}`,r(this,Y).getAxisColor("y"),r(this,Y).getSecondaryFontColor()),p++,t[p]=r(this,Ge).call(this,92e3+p,r(this,ee)-2.5,r(this,M)-1,s+.5,270,270,0,2,2,`${f?f[r(this,M)-1]?f[r(this,M)-1].fString:Math.round((r(this,Fe).zInitial+r(this,M)-1+Number.EPSILON)*100)/100:"0"}`,r(this,Y).getAxisColor("y"),r(this,Y).getSecondaryFontColor()),n[p]=r(this,Ge).call(this,93e3+p,r(this,ee)-2.5,r(this,M)-1,r(this,ae)-2.5,270,180,0,2,2,`${f?f[r(this,M)-1]?f[r(this,M)-1].fString:Math.round((r(this,Fe).zInitial+r(this,M)-1+Number.EPSILON)*100)/100:"0"}`,r(this,Y).getAxisColor("y"),r(this,Y).getSecondaryFontColor()),p++,h&&(e.axisLabels[4]={id:"upLabel1",key:95004+r(this,Se),text:{value:h,color:r(this,Y).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:r(this,ee)-1.5+r(this,F).xOffset,fromY:a-1+r(this,F).zOffset,fromZ:r(this,ae)-2+r(this,F).yOffset,toX:r(this,ee)-1.5,toY:a-1,toZ:r(this,ae)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+r(this,Se),text:{value:h,color:r(this,Y).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:o-.5+r(this,F).xOffset,fromY:a-1+r(this,F).zOffset,fromZ:s+r(this,F).yOffset,toX:o-.5,toY:a-1,toZ:s}},e.axisLabels[6]={id:"upLabel3",key:105006+r(this,Se),text:{value:h,color:r(this,Y).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:r(this,ee)-2+r(this,F).xOffset,fromY:a-1+r(this,F).zOffset,fromZ:s-.5+r(this,F).yOffset,toX:r(this,ee)-2,toY:a-1,toZ:s-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+r(this,Se),text:{value:h,color:r(this,Y).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:o-.5+r(this,F).xOffset,fromY:a-1+r(this,F).zOffset,fromZ:r(this,ae)-1.5+r(this,F).yOffset,toX:o-.5,toY:a-1,toZ:r(this,ae)-1.5}}),p));I(this,jt,(e,t,n,o,s,a,f,h)=>{for(let p=r(this,ae);p<=o;p++)t[h]=r(this,Ge).call(this,1500+h,r(this,ee)-2.5,r(this,M)?r(this,M)-1:0,p-1,270,180,0,2,1,`${a?a[p-1]?a[p-1].fString:Math.round((r(this,Fe).yInitial+(p-1)*r(this,vt)+Number.EPSILON)*100)/100:""}`,r(this,Y).getAxisColor("z"),r(this,Y).getSecondaryFontColor()),n[h]=r(this,Ge).call(this,3e3+h,s+.5,r(this,M)?r(this,M)-1:0,p-1,270,360,0,2,1,`${a?a[p-1]?a[p-1].fString:Math.round((r(this,Fe).yInitial+(p-1)*r(this,vt)+Number.EPSILON)*100)/100:""}`,r(this,Y).getAxisColor("z"),r(this,Y).getSecondaryFontColor()),h++;return e.axisLabels[0]={id:"leftLabel",key:4500+r(this,Se),text:{value:f||"",color:r(this,Y).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:r(this,ee)-4+r(this,F).xOffset,fromY:(r(this,M)?r(this,M)-1:0)+r(this,F).zOffset,fromZ:r(this,ae)+.5+r(this,F).yOffset,toX:r(this,ee)-4,toY:r(this,M)?r(this,M)-1:0,toZ:r(this,ae)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+r(this,Se),text:{value:f||"",color:r(this,Y).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:s+2+r(this,F).xOffset,fromY:(r(this,M)?r(this,M)-1:0)+r(this,F).zOffset,fromZ:o-2.5+r(this,F).yOffset,toX:s+2,toY:r(this,M)?r(this,M)-1:0,toZ:o-2.5}},h});I(this,Yt,(e,t,n,o,s,a,f,h)=>{for(let p=r(this,ee);p<=o;p++)t[h]=r(this,Ge).call(this,7500+h,p-1,r(this,M)?r(this,M)-1:0,r(this,ae)-2.5,270,270,0,2,1,`${a[p-1]?a[p-1].fString:Math.round((r(this,Fe).xInitial+(p-1)*r(this,ct)+Number.EPSILON)*100)/100}`,r(this,Y).getAxisColor("x"),r(this,Y).getSecondaryFontColor()),n[h]=r(this,Ge).call(this,9e3+h,p-1,r(this,M)?r(this,M)-1:0,s+.5,270,90,0,2,1,`${a[p-1]?a[p-1].fString:Math.round((r(this,Fe).xInitial+(p-1)*r(this,ct)+Number.EPSILON)*100)/100}`,r(this,Y).getAxisColor("x"),r(this,Y).getSecondaryFontColor()),h++;return e.axisLabels[2]={id:"downLabel",key:10502+r(this,Se),text:{value:f,color:r(this,Y).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:r(this,ee)+r(this,F).xOffset,fromY:(r(this,M)?r(this,M)-1:0)+r(this,F).zOffset,fromZ:r(this,ae)-4+r(this,F).yOffset,toX:r(this,ee),toY:r(this,M)?r(this,M)-1:0,toZ:r(this,ae)-4}},e.axisLabels[3]={id:"upLabel",key:12003+r(this,Se),text:{value:f,color:r(this,Y).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:o-2.5+r(this,F).xOffset,fromY:(r(this,M)?r(this,M)-1:0)+r(this,F).zOffset,fromZ:s+2+r(this,F).yOffset,toX:o-2.5,toY:r(this,M)?r(this,M)-1:0,toZ:s+2}},h});I(this,Oi,(e,t,n)=>{const o={xOffset:r(this,Ye),yOffset:r(this,Xe),zOffset:r(this,Je)},s={name:"TH3",xOffset:r(this,ee),yOffset:r(this,ae),zOffset:r(this,M),range:r(this,fe)},a=r(this,Mt).call(this,o,s,t,e,n);return B(this,ee,a.xOffset),B(this,ae,a.yOffset),B(this,M,a.zOffset),a});I(this,ki,(e,t,n)=>{const o={xOffset:r(this,Ye),yOffset:r(this,Xe)},s={name:"TH2",xOffset:r(this,ee),yOffset:r(this,ae),range:r(this,fe)},a=r(this,Mt).call(this,o,s,t,e,n);return B(this,ee,a.xOffset),B(this,ae,a.yOffset),a});I(this,Pi,(e,t,n)=>{const o={xOffset:r(this,Ye)},s={name:"TH1",xOffset:r(this,ee),range:r(this,fe)},a=r(this,Mt).call(this,o,s,t,e,n);return B(this,ee,a.xOffset),a});I(this,wt,e=>{const t=r(this,St).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].scale:0});I(this,Lt,e=>{const t=r(this,St).filter(n=>n.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});I(this,Xt,e=>e>r(this,xt)?r(this,xt):e<0?0:e);this.initializeFactory(e,t,n,o,s,a,f,h)}initializeFactory(e,t,n,o,s,a,f,h){this.setUniqueName(e),this.setTheme(s),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(n),this.setRange(o),this.setSelectedBin(a),this.setViewFunction(f),this.setProgressFunction(h)}setUniqueName(e){B(this,Se,e)}updateContentScale(e){r(this,tt)+e>=0&&B(this,tt,r(this,tt)+e)}updateMinDisplayedContent(e){e>=0&&B(this,Ot,e)}setHistogramContentMaximum(e){B(this,xt,e>0?e:1)}setSelectedBin(e){B(this,ai,e||[])}setViewFunction(e){B(this,Qe,e)}setProgressFunction(e){B(this,et,e)}setSection(e){e&&(e.xOffset&&B(this,ee,r(this,lt).call(this,e==null?void 0:e.xOffset,r(this,Ye))),e.yOffset&&!histogram._typename.includes("TH1")&&B(this,ae,r(this,lt).call(this,e==null?void 0:e.yOffset,r(this,Xe))),e.zOffset&&histogram._typename.includes("TH3")&&B(this,M,r(this,lt).call(this,e==null?void 0:e.zOffset,r(this,Je))))}setHistogram(e){var t,n,o,s,a,f,h,p,c,d,E,k,T,v,u,P;B(this,N,e),B(this,Ke,e==null?void 0:e._typename),B(this,ee,1),B(this,ae,1),B(this,M,1),B(this,Ye,0),B(this,Xe,0),B(this,Je,0),B(this,ct,1),B(this,vt,1),B(this,ci,1),B(this,Ye,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),B(this,ct,(((n=e==null?void 0:e.fXaxis)==null?void 0:n.fXmax)-((o=e==null?void 0:e.fXaxis)==null?void 0:o.fXmin))/((s=e==null?void 0:e.fXaxis)==null?void 0:s.fNbins)),r(this,Fe).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,B(this,ee,r(this,lt).call(this,r(this,ee),r(this,Ye))),(f=e==null?void 0:e._typename)!=null&&f.includes("TH1")||(B(this,Xe,(h=e==null?void 0:e.fYaxis)==null?void 0:h.fNbins),B(this,vt,(((p=e==null?void 0:e.fYaxis)==null?void 0:p.fXmax)-((c=e==null?void 0:e.fYaxis)==null?void 0:c.fXmin))/((d=e==null?void 0:e.fYaxis)==null?void 0:d.fNbins)),r(this,Fe).yInitial=(E=e==null?void 0:e.fYaxis)==null?void 0:E.fXmin,B(this,ae,r(this,lt).call(this,r(this,ae),r(this,Xe)))),(k=e==null?void 0:e._typename)!=null&&k.includes("TH3")&&(B(this,Je,(T=e==null?void 0:e.fZaxis)==null?void 0:T.fNbins),B(this,ci,((v=e==null?void 0:e.fZaxis)==null?void 0:v.fXmax)/((u=e==null?void 0:e.fZaxis)==null?void 0:u.fNbins)),r(this,Fe).zInitial=(P=e==null?void 0:e.fZaxis)==null?void 0:P.fXmin,B(this,M,r(this,lt).call(this,r(this,M),r(this,Je)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&B(this,fe,4),B(this,fe,e))}setTheme(e){B(this,Y,new Qr(e))}getElements(){let e={};return r(this,Ke).includes("TH2")?e=r(this,Ti).call(this):r(this,Ke).includes("TH3")?e=r(this,Ci).call(this):r(this,Ke).includes("TH1")&&(e=r(this,_i).call(this)),e}updateSection(e,t,n){if(r(this,Ke).includes("TH3"))return r(this,Oi).call(this,e,t,n);if(r(this,Ke).includes("TH2"))return r(this,ki).call(this,e,t,n);if(r(this,Ke).includes("TH1"))return r(this,Pi).call(this,e,t,n)}}Se=new WeakMap,ai=new WeakMap,N=new WeakMap,Ke=new WeakMap,Y=new WeakMap,ee=new WeakMap,ae=new WeakMap,M=new WeakMap,Ye=new WeakMap,Xe=new WeakMap,Je=new WeakMap,ct=new WeakMap,vt=new WeakMap,ci=new WeakMap,fe=new WeakMap,Fe=new WeakMap,Qe=new WeakMap,et=new WeakMap,xt=new WeakMap,tt=new WeakMap,Ot=new WeakMap,Dt=new WeakMap,F=new WeakMap,St=new WeakMap,lt=new WeakMap,Bt=new WeakMap,Ge=new WeakMap,Ci=new WeakMap,Ti=new WeakMap,_i=new WeakMap,It=new WeakMap,Mt=new WeakMap,Nt=new WeakMap,jt=new WeakMap,Yt=new WeakMap,Ft=new WeakSet,Ri=function(e,t,n,o,s,a,f,h){h++,e.titles[0]={key:195e3+r(this,Se),text:{value:r(this,N).fTitle,color:r(this,Y).getPrimaryFontColor()},rotation:{x:0,y:123,z:0},position:{x:r(this,ee)-90,y:16.5,z:r(this,ae)+90},innerText:{value:"Press V to show projections or controls",color:r(this,Y).getPrimaryFontColor()}},h++;const p=r(this,fe)>r(this,Ye)?r(this,Ye)+1:r(this,fe),c=r(this,fe)>r(this,Xe)?r(this,Xe)+1:r(this,fe);e.ground={key:22500+h+r(this,Se),scale:{width:p+8,height:.2,depth:c+8},animation:{fromX:r(this,ee)+p*.5-1+r(this,F).xOffset,fromY:-.5,fromZ:r(this,ae)+c*.5-.5+r(this,F).yOffset,toX:r(this,ee)+p*.5-1,toY:-.5,toZ:r(this,ae)+c*.5-.5}},h++,e.banners[1]={key:24e4+h+r(this,Se),geometry:{width:.1,height:15,depth:22},position:{x:o+8,y:(r(this,M)?r(this,M)+7:7)+r(this,F).zOffset,z:r(this,ae)+r(this,fe)/2+2.5},material:{color:"#ffffff",transparent:!0}}},Oi=new WeakMap,ki=new WeakMap,Pi=new WeakMap,wt=new WeakMap,Lt=new WeakMap,Xt=new WeakMap;const qo=()=>{let i;const{selectedView:e,onViewChange:t,onProgress:n,section:o,range:s,theme:a,selectedBins:f}=g.useContext(Et).states,{id:h,histogram:p,projPanelIds:c}=g.useContext(Et).data,[d]=g.useState(new Go(h,p,o||null,s,a||"def",f,t,n)),[E,k]=g.useState(d.getElements()),[T]=g.useState(1),v=u=>{p._typename.includes(u.name)&&(u.axis?(d.updateSection(u.axis,u.increment,u.defaultRange),k(d.getElements())):u.scale?(d.updateContentScale(u.scale),k(d.getElements())):u.minValue&&(d.updateMinDisplayedContent(u.minValue),k(d.getElements())))};return g.useEffect(()=>{d.setUniqueName(h),k(d.getElements())},[h]),g.useEffect(()=>{d.setHistogram(p),k(d.getElements())},[p]),g.useEffect(()=>{d.setSection(o),k(d.getElements())},[o]),g.useEffect(()=>{d.setRange(s),k(d.getElements())},[s]),g.useEffect(()=>{d.setTheme(a),k(d.getElements())},[a]),g.useEffect(()=>{d.setSelectedBin(f),k(d.getElements())},[f]),g.useEffect(()=>{d.setViewFunction(t),k(d.getElements())},[t]),g.useEffect(()=>{d.setViewFunction(t),k(d.getElements())},[e]),g.useEffect(()=>{d.setProgressFunction(n),k(d.getElements())},[n]),g.useEffect(()=>{if(p._typename.includes("TH2")?i=Ee.getChangedSection().subscribe(v):p._typename.includes("TH3")?i=Ae.getChangedSection().subscribe(v):p._typename.includes("TH1")&&(i=nt.getChangedSection().subscribe(v)),i)return()=>i.unsubscribe()},[E]),E!=null&&E.bins?ue("a-entity",{"histogram-control":!0,children:[E.bins.map(u=>S("a-box",{class:"clickable",material:`color: ${u.color}; transparent: true`,binth:u.binData,mouseevent:!0,geometry:`width:${u.animation.toWidth}; height:${u.animation.toHeight}; depth:${u.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${u.animation2.fromX} ${u.animation2.fromY} ${u.animation2.fromZ}; to: ${u.animation2.toX} ${u.animation2.toY} ${u.animation2.toZ}; dur: 800;`,animation__3:`property: material.color; from: ${u.animation3.fromColor}; to: ${u.animation3.toColor}; dur: 200;`,children:S("a-text",{value:u.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${u.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0","wrap-count":"50",position:`0 ${.001+(T===1?-1:1)*u.animation.toHeight/2} 0`})},u.id)),E.labels.map(u=>S("a-entity",{geometry:`primitive: ${u.geometry.primitive}; width:${u.geometry.width}; height:${u.geometry.height};`,text:`color: ${u.text.color}; width: ${u.text.width}; height: ${u.text.height}; align:center;`,"label-handler":`value: ${u.labelHandler.value}; delay:${u.labelHandler.delay}`,rotation:`${u.rotation.x} ${u.rotation.y} ${u.rotation.z}`,material:`color: ${u.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${u.animation.fromX} ${u.animation.fromY} ${u.animation.fromZ}; to: ${u.animation.toX} ${u.animation.toY} ${u.animation.toZ}; dur: 1005;`},u.key)),E.titles.map(u=>ue("a-entity",{text:`value: ${u.text.value}; color: ${u.text.color}; width: 230; height:auto; align:center;`,rotation:`${u.rotation.x} ${u.rotation.y} ${u.rotation.z}`,position:`${u.position.x} ${u.position.y} ${u.position.z}`,material:"transparent: true",children:[S("a-text",{value:u.innerText.value,position:"0 10 0",width:"150",height:"auto",align:"center",color:u.innerText.color}),S("a-entity",{geometry:"primitive: plane; width:170; height:30;",position:"0 0 -1",material:"opacity: 0.9; color: white; transparent: true"})]},u.key)),E.axisLabels.map(u=>S("a-entity",{id:u.id,text:`value: ${u.text.value}; color: ${u.text.color}; width: 10; height:auto; align:center;`,rotation:`${u.rotation.x} ${u.rotation.y} ${u.rotation.z}`,animation:`property: position; from: ${u.animation.fromX} ${u.animation.fromY} ${u.animation.fromZ}; to: ${u.animation.toX} ${u.animation.toY} ${u.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},u.key)),E.ground&&S("a-box",{width:E.ground.scale.width,material:"color: #fafafa",height:E.ground.scale.height,depth:E.ground.scale.depth,animation:`property: position; from: ${E.ground.animation.fromX} ${E.ground.animation.fromY} ${E.ground.animation.fromZ};
|
|
280
|
+
markedColor: ${g};
|
|
281
|
+
selectColor: ${n(this,V).getSecondaryAccentColor()};
|
|
282
|
+
axisX: ${n(this,V).getAxisColor("x")};
|
|
283
|
+
axisY: ${n(this,V).getAxisColor("y")};
|
|
284
|
+
axisZ: ${n(this,V).getAxisColor("z")}`,J=a/n(this,ct)/n(this,It),C=k-1,oe=0;e.bins[d]={id:H,color:B,binData:re,content:A,animation:{fromWidth:J,fromHeight:n(this,St).call(this,H),fromDepth:J,toWidth:J,toHeight:u*n(this,pe)*n(this,tt)/8,toDepth:J},animation2:{fromX:C+n(this,W).xOffset,fromY:t,fromZ:oe,toX:C,toY:t,toZ:oe},animation3:{fromColor:n(this,Xt).call(this,H),toColor:g}},T[d]={key:H,scale:u,color:g},d++}M(this,xt,T);const x=[],c=[];return d=n(this,Nt).call(this,e,x,c,p,l,void 0,void 0,0),d=n(this,Ft).call(this,e,x,c,l,p,_,y,d),d=n(this,Yt).call(this,e,x,c,l,p,void 0,void 0,void 0,d),Hi(this,Lt,Di).call(this,e,x,c,l,p,d),e.labels=[...x,...c],e});j(this,Mt,e=>e<=0?0:(n(this,vt)>1&&(e=Math.round((e/n(this,vt)+Number.EPSILON)*100)/100),e));j(this,jt,(e,t,r,o,s)=>{if(M(this,W,{xOffset:0,yOffset:0,zOffset:0}),r){if(s?(t[o]+=1,n(this,W)[o]=-1):(t[o]+=t.range,n(this,W)[o]=-t.range),e[o]<=t.range)return t[o]=1,n(this,W)[o]=0,t;if(t[o]>e[o]-t.range)return t[o]=e[o]-t.range,n(this,W)[o]=0,t}else if(s?(t[o]-=1,n(this,W)[o]=1):(t[o]-=t.range,n(this,W)[o]=t.range),t[o]<1)return t[o]=1,n(this,W)[o]=0,t;return t});j(this,Yt,(e,t,r,o,s,a,u,h,d)=>(t[d]=n(this,Ge).call(this,9e4+d,o+.5,n(this,Y)-1,s+.5,270,360,0,2,2,`${u?u[n(this,Y)-1]?u[n(this,Y)-1].fString:Math.round((n(this,Fe).zInitial+n(this,Y)-1+Number.EPSILON)*100)/100:"0"}`,n(this,V).getAxisColor("y"),n(this,V).getSecondaryFontColor()),r[d]=n(this,Ge).call(this,91e3+d,o+.5,n(this,Y)-1,n(this,le)-2.5,270,90,0,2,2,`${u?u[n(this,Y)-1]?u[n(this,Y)-1].fString:Math.round((n(this,Fe).zInitial+n(this,Y)-1+Number.EPSILON)*100)/100:"0"}`,n(this,V).getAxisColor("y"),n(this,V).getSecondaryFontColor()),d++,t[d]=n(this,Ge).call(this,92e3+d,n(this,te)-2.5,n(this,Y)-1,s+.5,270,270,0,2,2,`${u?u[n(this,Y)-1]?u[n(this,Y)-1].fString:Math.round((n(this,Fe).zInitial+n(this,Y)-1+Number.EPSILON)*100)/100:"0"}`,n(this,V).getAxisColor("y"),n(this,V).getSecondaryFontColor()),r[d]=n(this,Ge).call(this,93e3+d,n(this,te)-2.5,n(this,Y)-1,n(this,le)-2.5,270,180,0,2,2,`${u?u[n(this,Y)-1]?u[n(this,Y)-1].fString:Math.round((n(this,Fe).zInitial+n(this,Y)-1+Number.EPSILON)*100)/100:"0"}`,n(this,V).getAxisColor("y"),n(this,V).getSecondaryFontColor()),d++,h&&(e.axisLabels[4]={id:"upLabel1",key:95004+n(this,Ce),text:{value:h,color:n(this,V).getAxisColor("y")},rotation:{x:0,y:270,z:90},animation:{fromX:n(this,te)-1.5+n(this,W).xOffset,fromY:a-1+n(this,W).zOffset,fromZ:n(this,le)-2+n(this,W).yOffset,toX:n(this,te)-1.5,toY:a-1,toZ:n(this,le)-2}},e.axisLabels[5]={id:"upLabel2",key:100005+n(this,Ce),text:{value:h,color:n(this,V).getAxisColor("y")},rotation:{x:0,y:90,z:90},animation:{fromX:o-.5+n(this,W).xOffset,fromY:a-1+n(this,W).zOffset,fromZ:s+n(this,W).yOffset,toX:o-.5,toY:a-1,toZ:s}},e.axisLabels[6]={id:"upLabel3",key:105006+n(this,Ce),text:{value:h,color:n(this,V).getAxisColor("y")},rotation:{x:0,y:360,z:90},animation:{fromX:n(this,te)-2+n(this,W).xOffset,fromY:a-1+n(this,W).zOffset,fromZ:s-.5+n(this,W).yOffset,toX:n(this,te)-2,toY:a-1,toZ:s-.5}},e.axisLabels[7]={id:"upLabel4",key:105007+n(this,Ce),text:{value:h,color:n(this,V).getAxisColor("y")},rotation:{x:0,y:180,z:90},animation:{fromX:o-.5+n(this,W).xOffset,fromY:a-1+n(this,W).zOffset,fromZ:n(this,le)-1.5+n(this,W).yOffset,toX:o-.5,toY:a-1,toZ:n(this,le)-1.5}}),d));j(this,Nt,(e,t,r,o,s,a,u,h)=>{for(let d=n(this,le);d<=o;d++)t[h]=n(this,Ge).call(this,1500+h,n(this,te)-2.5,n(this,Y)?n(this,Y)-1:0,d-1,270,180,0,2,1,`${a?a[d-1]?a[d-1].fString:Math.round((n(this,Fe).yInitial+(d-1)*n(this,bt)+Number.EPSILON)*100)/100:""}`,n(this,V).getAxisColor("z"),n(this,V).getSecondaryFontColor()),r[h]=n(this,Ge).call(this,3e3+h,s+.5,n(this,Y)?n(this,Y)-1:0,d-1,270,360,0,2,1,`${a?a[d-1]?a[d-1].fString:Math.round((n(this,Fe).yInitial+(d-1)*n(this,bt)+Number.EPSILON)*100)/100:""}`,n(this,V).getAxisColor("z"),n(this,V).getSecondaryFontColor()),h++;return e.axisLabels[0]={id:"leftLabel",key:4500+n(this,Ce),text:{value:u||"",color:n(this,V).getAxisColor("z")},rotation:{x:270,y:270,z:0},animation:{fromX:n(this,te)-4+n(this,W).xOffset,fromY:(n(this,Y)?n(this,Y)-1:0)+n(this,W).zOffset,fromZ:n(this,le)+.5+n(this,W).yOffset,toX:n(this,te)-4,toY:n(this,Y)?n(this,Y)-1:0,toZ:n(this,le)+.5}},e.axisLabels[1]={id:"rightLabel",key:6001+n(this,Ce),text:{value:u||"",color:n(this,V).getAxisColor("z")},rotation:{x:270,y:90,z:0},animation:{fromX:s+2+n(this,W).xOffset,fromY:(n(this,Y)?n(this,Y)-1:0)+n(this,W).zOffset,fromZ:o-2.5+n(this,W).yOffset,toX:s+2,toY:n(this,Y)?n(this,Y)-1:0,toZ:o-2.5}},h});j(this,Ft,(e,t,r,o,s,a,u,h)=>{for(let d=n(this,te);d<=o;d++)t[h]=n(this,Ge).call(this,7500+h,d-1,n(this,Y)?n(this,Y)-1:0,n(this,le)-2.5,270,270,0,2,1,`${a[d-1]?a[d-1].fString:Math.round((n(this,Fe).xInitial+(d-1)*n(this,ct)+Number.EPSILON)*100)/100}`,n(this,V).getAxisColor("x"),n(this,V).getSecondaryFontColor()),r[h]=n(this,Ge).call(this,9e3+h,d-1,n(this,Y)?n(this,Y)-1:0,s+.5,270,90,0,2,1,`${a[d-1]?a[d-1].fString:Math.round((n(this,Fe).xInitial+(d-1)*n(this,ct)+Number.EPSILON)*100)/100}`,n(this,V).getAxisColor("x"),n(this,V).getSecondaryFontColor()),h++;return e.axisLabels[2]={id:"downLabel",key:10502+n(this,Ce),text:{value:u,color:n(this,V).getAxisColor("x")},rotation:{x:270,y:180,z:0},animation:{fromX:n(this,te)+n(this,W).xOffset,fromY:(n(this,Y)?n(this,Y)-1:0)+n(this,W).zOffset,fromZ:n(this,le)-4+n(this,W).yOffset,toX:n(this,te),toY:n(this,Y)?n(this,Y)-1:0,toZ:n(this,le)-4}},e.axisLabels[3]={id:"upLabel",key:12003+n(this,Ce),text:{value:u,color:n(this,V).getAxisColor("x")},rotation:{x:270,y:0,z:0},animation:{fromX:o-2.5+n(this,W).xOffset,fromY:(n(this,Y)?n(this,Y)-1:0)+n(this,W).zOffset,fromZ:s+2+n(this,W).yOffset,toX:o-2.5,toY:n(this,Y)?n(this,Y)-1:0,toZ:s+2}},h});j(this,Ai,(e,t,r)=>{const o={xOffset:n(this,Ne),yOffset:n(this,Xe),zOffset:n(this,Je)},s={name:"TH3",xOffset:n(this,te),yOffset:n(this,le),zOffset:n(this,Y),range:n(this,pe)},a=n(this,jt).call(this,o,s,t,e,r);return M(this,te,a.xOffset),M(this,le,a.yOffset),M(this,Y,a.zOffset),a});j(this,Pi,(e,t,r)=>{const o={xOffset:n(this,Ne),yOffset:n(this,Xe)},s={name:"TH2",xOffset:n(this,te),yOffset:n(this,le),range:n(this,pe)},a=n(this,jt).call(this,o,s,t,e,r);return M(this,te,a.xOffset),M(this,le,a.yOffset),a});j(this,$i,(e,t,r)=>{const o={xOffset:n(this,Ne)},s={name:"TH1",xOffset:n(this,te),range:n(this,pe)},a=n(this,jt).call(this,o,s,t,e,r);return M(this,te,a.xOffset),a});j(this,St,e=>{const t=n(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].scale:0});j(this,Xt,e=>{const t=n(this,xt).filter(r=>r.key===e);return t[0]&&t[0].scale?t[0].color:"#ffffff"});j(this,Vt,e=>e>n(this,vt)?n(this,vt):e<0?0:e);this.initializeFactory(e,t,r,o,s,a,u,h)}initializeFactory(e,t,r,o,s,a,u,h){this.setUniqueName(e),this.setTheme(s),this.setHistogram(t),this.setHistogramContentMaximum(t.fMaximum),this.setSection(r),this.setRange(o),this.setSelectedBin(a),this.setViewFunction(u),this.setProgressFunction(h)}setUniqueName(e){M(this,Ce,e)}updateContentScale(e){n(this,tt)+e>=0&&M(this,tt,n(this,tt)+e)}updateMinDisplayedContent(e){e>=0&&M(this,kt,e)}setHistogramContentMaximum(e){M(this,vt,e>0?e:1)}setSelectedBin(e){M(this,ai,e||[])}setViewFunction(e){M(this,Qe,e)}setProgressFunction(e){M(this,et,e)}setSection(e){e&&(e.xOffset&&M(this,te,n(this,lt).call(this,e==null?void 0:e.xOffset,n(this,Ne))),e.yOffset&&!histogram._typename.includes("TH1")&&M(this,le,n(this,lt).call(this,e==null?void 0:e.yOffset,n(this,Xe))),e.zOffset&&histogram._typename.includes("TH3")&&M(this,Y,n(this,lt).call(this,e==null?void 0:e.zOffset,n(this,Je))))}setHistogram(e){var t,r,o,s,a,u,h,d,l,p,y,_,T,x,c,k;M(this,N,e),M(this,Ke,e==null?void 0:e._typename),M(this,te,1),M(this,le,1),M(this,Y,1),M(this,Ne,0),M(this,Xe,0),M(this,Je,0),M(this,ct,1),M(this,bt,1),M(this,ci,1),M(this,Ne,(t=e==null?void 0:e.fXaxis)==null?void 0:t.fNbins),M(this,ct,(((r=e==null?void 0:e.fXaxis)==null?void 0:r.fXmax)-((o=e==null?void 0:e.fXaxis)==null?void 0:o.fXmin))/((s=e==null?void 0:e.fXaxis)==null?void 0:s.fNbins)),n(this,Fe).xInitial=(a=e==null?void 0:e.fXaxis)==null?void 0:a.fXmin,M(this,te,n(this,lt).call(this,n(this,te),n(this,Ne))),(u=e==null?void 0:e._typename)!=null&&u.includes("TH1")||(M(this,Xe,(h=e==null?void 0:e.fYaxis)==null?void 0:h.fNbins),M(this,bt,(((d=e==null?void 0:e.fYaxis)==null?void 0:d.fXmax)-((l=e==null?void 0:e.fYaxis)==null?void 0:l.fXmin))/((p=e==null?void 0:e.fYaxis)==null?void 0:p.fNbins)),n(this,Fe).yInitial=(y=e==null?void 0:e.fYaxis)==null?void 0:y.fXmin,M(this,le,n(this,lt).call(this,n(this,le),n(this,Xe)))),(_=e==null?void 0:e._typename)!=null&&_.includes("TH3")&&(M(this,Je,(T=e==null?void 0:e.fZaxis)==null?void 0:T.fNbins),M(this,ci,((x=e==null?void 0:e.fZaxis)==null?void 0:x.fXmax)/((c=e==null?void 0:e.fZaxis)==null?void 0:c.fNbins)),n(this,Fe).zInitial=(k=e==null?void 0:e.fZaxis)==null?void 0:k.fXmin,M(this,Y,n(this,lt).call(this,n(this,Y),n(this,Je)))),this.setHistogramContentMaximum(e==null?void 0:e.fMaximum)}setRange(e){e&&(e<4&&M(this,pe,4),M(this,pe,e))}setTheme(e){M(this,V,new Qr(e))}getElements(){let e={};return n(this,Ke).includes("TH2")?e=n(this,Oi).call(this):n(this,Ke).includes("TH3")?e=n(this,_i).call(this):n(this,Ke).includes("TH1")&&(e=n(this,ki).call(this)),e}updateSection(e,t,r){if(n(this,Ke).includes("TH3"))return n(this,Ai).call(this,e,t,r);if(n(this,Ke).includes("TH2"))return n(this,Pi).call(this,e,t,r);if(n(this,Ke).includes("TH1"))return n(this,$i).call(this,e,t,r)}}Ce=new WeakMap,ai=new WeakMap,N=new WeakMap,Ke=new WeakMap,V=new WeakMap,te=new WeakMap,le=new WeakMap,Y=new WeakMap,Ne=new WeakMap,Xe=new WeakMap,Je=new WeakMap,ct=new WeakMap,bt=new WeakMap,ci=new WeakMap,pe=new WeakMap,Fe=new WeakMap,Qe=new WeakMap,et=new WeakMap,vt=new WeakMap,tt=new WeakMap,kt=new WeakMap,It=new WeakMap,W=new WeakMap,xt=new WeakMap,lt=new WeakMap,Bt=new WeakMap,Ge=new WeakMap,_i=new WeakMap,Oi=new WeakMap,ki=new WeakMap,Mt=new WeakMap,jt=new WeakMap,Yt=new WeakMap,Nt=new WeakMap,Ft=new WeakMap,Lt=new WeakSet,Di=function(e,t,r,o,s,a,u,h){h++,e.titles[0]={key:195e3+n(this,Ce),text:{value:n(this,N).fTitle,color:n(this,V).getPrimaryFontColor()},rotation:{x:0,y:123,z:0},position:{x:n(this,te)-90,y:16.5,z:n(this,le)+90},innerText:{value:"Press V to show projections or controls",color:n(this,V).getPrimaryFontColor()}},h++;const d=n(this,pe)>n(this,Ne)?n(this,Ne)+1:n(this,pe),l=n(this,pe)>n(this,Xe)?n(this,Xe)+1:n(this,pe);e.ground={key:22500+h+n(this,Ce),scale:{width:d+8,height:.2,depth:l+8},animation:{fromX:n(this,te)+d*.5-1+n(this,W).xOffset,fromY:-.5,fromZ:n(this,le)+l*.5-.5+n(this,W).yOffset,toX:n(this,te)+d*.5-1,toY:-.5,toZ:n(this,le)+l*.5-.5}},h++,e.banners[1]={key:24e4+h+n(this,Ce),geometry:{width:.1,height:15,depth:22},position:{x:o+8,y:(n(this,Y)?n(this,Y)+7:7)+n(this,W).zOffset,z:n(this,le)+n(this,pe)/2+2.5},material:{color:"#ffffff",transparent:!0}}},Ai=new WeakMap,Pi=new WeakMap,$i=new WeakMap,St=new WeakMap,Xt=new WeakMap,Vt=new WeakMap;const Go=()=>{let i;const{selectedView:e,onViewChange:t,onProgress:r,section:o,range:s,theme:a,selectedBins:u}=v.useContext(ii).states,{id:h,histogram:d,projPanelIds:l}=v.useContext(ii).data,[p]=v.useState(new Uo(h,d,o||null,s,a||"def",u,t,r)),[y,_]=v.useState(p.getElements()),[T]=v.useState(1),x=c=>{d._typename.includes(c.name)&&(c.axis?(p.updateSection(c.axis,c.increment,c.defaultRange),_(p.getElements())):c.scale?(p.updateContentScale(c.scale),_(p.getElements())):c.minValue&&(p.updateMinDisplayedContent(c.minValue),_(p.getElements())))};return v.useEffect(()=>{p.setUniqueName(h),_(p.getElements())},[h]),v.useEffect(()=>{p.setHistogram(d),_(p.getElements())},[d]),v.useEffect(()=>{p.setSection(o),_(p.getElements())},[o]),v.useEffect(()=>{p.setRange(s),_(p.getElements())},[s]),v.useEffect(()=>{p.setTheme(a),_(p.getElements())},[a]),v.useEffect(()=>{p.setSelectedBin(u),_(p.getElements())},[u]),v.useEffect(()=>{p.setViewFunction(t),_(p.getElements())},[t]),v.useEffect(()=>{p.setViewFunction(t),_(p.getElements())},[e]),v.useEffect(()=>{p.setProgressFunction(r),_(p.getElements())},[r]),v.useEffect(()=>{if(d._typename.includes("TH2")?i=_e.getChangedSection().subscribe(x):d._typename.includes("TH3")?i=Re.getChangedSection().subscribe(x):d._typename.includes("TH1")&&(i=nt.getChangedSection().subscribe(x)),i)return()=>i.unsubscribe()},[y]),y!=null&&y.bins?ee("a-entity",{"histogram-control":!0,children:[y.bins.map(c=>b("a-box",{class:"clickable",material:`color: ${c.color}; transparent: true`,binth:c.binData,mouseevent:!0,geometry:`width:${c.animation.toWidth}; height:${c.animation.toHeight}; depth:${c.animation.toDepth};`,animation__1:"property: material.opacity; from: 0; to: 0.75; dur: 2000;",animation__2:`property: position; from: ${c.animation2.fromX} ${c.animation2.fromY} ${c.animation2.fromZ}; to: ${c.animation2.toX} ${c.animation2.toY} ${c.animation2.toZ}; dur: 800;`,animation__3:`property: material.color; from: ${c.animation3.fromColor}; to: ${c.animation3.toColor}; dur: 200;`,children:b("a-text",{value:c.content,align:"center",width:"10",color:"black",geometry:"primitive:plane; width: 0.5; height: 0.5",material:`color: ${c.color}; opacity: 0.50; transparent: true`,rotation:"270 180 0","wrap-count":"50",position:`0 ${.001+(T===1?-1:1)*c.animation.toHeight/2} 0`})},c.id)),y.labels.map(c=>b("a-entity",{geometry:`primitive: ${c.geometry.primitive}; width:${c.geometry.width}; height:${c.geometry.height};`,text:`color: ${c.text.color}; width: ${c.text.width}; height: ${c.text.height}; align:center;`,"label-handler":`value: ${c.labelHandler.value}; delay:${c.labelHandler.delay}`,rotation:`${c.rotation.x} ${c.rotation.y} ${c.rotation.z}`,material:`color: ${c.material.color}; transparent: true`,animation:"property: text.width; from: 0; to: 4; dur: 1000;",animation__1:"property: material.opacity; from: 0; to: 0.8; dur: 1500;",animation__2:`property: position; from: ${c.animation.fromX} ${c.animation.fromY} ${c.animation.fromZ}; to: ${c.animation.toX} ${c.animation.toY} ${c.animation.toZ}; dur: 1005;`},c.key)),y.titles.map(c=>ee("a-entity",{text:`value: ${c.text.value}; color: ${c.text.color}; width: 230; height:auto; align:center;`,rotation:`${c.rotation.x} ${c.rotation.y} ${c.rotation.z}`,position:`${c.position.x} ${c.position.y} ${c.position.z}`,material:"transparent: true",children:[b("a-text",{value:c.innerText.value,position:"0 10 0",width:"150",height:"auto",align:"center",color:c.innerText.color}),b("a-entity",{geometry:"primitive: plane; width:170; height:30;",position:"0 0 -1",material:"opacity: 0.9; color: white; transparent: true"})]},c.key)),y.axisLabels.map(c=>b("a-entity",{id:c.id,text:`value: ${c.text.value}; color: ${c.text.color}; width: 10; height:auto; align:center;`,rotation:`${c.rotation.x} ${c.rotation.y} ${c.rotation.z}`,animation:`property: position; from: ${c.animation.fromX} ${c.animation.fromY} ${c.animation.fromZ}; to: ${c.animation.toX} ${c.animation.toY} ${c.animation.toZ}; dur: 1000;`,material:"opacity: 0; transparent: true"},c.key)),y.ground&&b("a-box",{width:y.ground.scale.width,material:"color: #fafafa",height:y.ground.scale.height,depth:y.ground.scale.depth,animation:`property: position; from: ${y.ground.animation.fromX} ${y.ground.animation.fromY} ${y.ground.animation.fromZ};
|
|
285
285
|
to:
|
|
286
|
-
${E.ground.animation.toX} ${E.ground.animation.toY} ${E.ground.animation.toZ}; dur: 1000;`},E.ground.key),E.banners.map(u=>S("a-box",{id:c[0]?c[0]:"panel_0",geometry:`width:${u.geometry.width}; height:${u.geometry.height}; depth:${u.geometry.depth};`,position:`${u.position.x} ${u.position.y} ${u.position.z}`,material:`color: ${u.material.color}, transparent: ${u.material.transparent}`},c[0]?c[0]:"panel_0"))]}):S("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};function Ko(){return ue(g.Fragment,{children:[S("a-sky",{color:"#dbf0fe"}),S("a-plane",{rotation:"-90 0 0",position:"0 -0.5 0",width:"1000",height:"1000",color:"#aaa",material:"shader:flat;"})]})}var Jo=Object.defineProperty,Qo=(i,e,t)=>e in i?Jo(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Si=(i,e,t)=>(Qo(i,typeof e!="symbol"?e+"":e,t),t);const oi=i=>{const[e,t]=g.useState(i.initialState);return g.useLayoutEffect(()=>{const n=i.subscribe(t);return()=>n.unsubscribe()},[]),e},en=g.createContext(null);class es{constructor(){Si(this,"state"),Si(this,"distributors",new Map),Si(this,"handlerFunc",new Map),Si(this,"subscriptions",new Map)}addDistributor(e){this.distributors.set(e.getId(),e)}addHandlerFunc(e,t=null,n=null,o=null){this.handlerFunc.set(e,{callbackInputFunc:t,callbackOutputFunc:n,callbackCustomFunc:o})}getDistributorById(e){return this.distributors.get(e)}addSubscription(e){this.subscriptions.get(e)&&(this.clearSubscription(e),console.log("unsubscribe"));const t=this.createSubscription(e);this.subscriptions.set(e,t)}createExternalSubscription(e,t=null,n=null,o=null){return this.distributors.get(e).getObservableInstance().subscribe(s=>{s.flag==="IN"?t&&t(s.data):s.flag==="OUT"?n&&n(s.data):o&&o(s.data)})}createSubscription(e){const t=this.handlerFunc.get(e);return this.distributors.get(e).getObservableInstance().subscribe(n=>{n.flag==="IN"?t!=null&&t.callbackInputFunc&&t.callbackInputFunc(n.data):n.flag==="OUT"?t!=null&&t.callbackOutputFunc&&t.callbackOutputFunc(n.data):t!=null&&t.callbackCustomFunc&&t.callbackCustomFunc(n.data)})}addAllSubscriptions(){this.distributors.forEach((e,t)=>{this.addSubscription(t)})}clearSubscription(e){var t;(t=this.subscriptions.get(e))==null||t.unsubscribe()}clearAllSubscriptions(){this.distributors.forEach((e,t)=>this.clearSubscription(t))}}new es;const ts=()=>{const[i,e]=g.useState(0),t=g.useContext(en);return g.useEffect(()=>{const n=document.getElementById("camera"),o=new Hi.Vector3,s=new Hi.Quaternion;n.object3D.getWorldPosition(o);const a=setInterval(()=>{n.object3D.getWorldPosition(o),n.object3D.getWorldQuaternion(s),t.send(JSON.stringify({type:"move",payload:{position:o.toArray(),rotation:s.toArray()}})),e(f=>f+1)},100);return()=>clearInterval(a)},[i]),S("a-entity",{})},is=({position:i,rotation:e,id:t,color:n})=>(g.useEffect(()=>{},[i]),g.useEffect(()=>{const o=new Hi.Quaternion().fromArray(e);document.getElementById(t).object3D.setRotationFromQuaternion(o)},[e]),ue("a-entity",{position:i,id:t,children:[S("a-sphere",{radius:"0.1",color:n}),S("a-sphere",{position:"0.05 0.03 -0.08",radius:"0.02","segments-width":"8","segments-height":"8",color:"#000000"}),S("a-sphere",{position:"-0.05 0.03 -0.08",radius:"0.02","segments-width":"8","segments-height":"8",color:"#000000"}),S("a-sphere",{position:"0 -0.07 -0.1",scale:"1 1 0.5","segments-width":"4","segments-height":"4",radius:"0.02",color:"#11fd3e"}),S("a-cone",{position:"0.03 -0.07 -0.1",rotation:"0 0 90",scale:"1 1 0.5","segments-radial":"8","segments-height":"1",height:"0.03","radius-bottom":"0.03",color:"#1cff3c"}),S("a-cone",{position:"-0.03 -0.07 -0.1",rotation:"0 0 -90",scale:"1 1 0.5","segments-radial":"8","segments-height":"1",height:"0.03","radius-bottom":"0.03",color:"#1cff3c"})]})),rs=13,ns=77,os=73,ss=74,as=75,cs=76,tn=new Map([[ss,"LEFT"],[os,"UP"],[as,"DOWN"],[cs,"RIGHT"]]),ls=()=>{const i=g.useContext(en),e=o=>{switch(o.keyCode){case ns:i.send(JSON.stringify({type:"assign_master",payload:{}}))}},t=o=>{switch(o.keyCode){case rs:i.send(JSON.stringify({type:"selected_bins",payload:{selectedBins:JSON.parse(localStorage.getItem("selectedBins")).map(s=>s.id)}}));break}},n=o=>{if(!tn.has(o.keyCode))return;let s=tn.get(o.keyCode);i.send(JSON.stringify({type:"axis_scaling",payload:{axis:s}}))};return g.useEffect(()=>(window.addEventListener("keypress",t),window.addEventListener("keypress",e),window.addEventListener("keypress",n),()=>{window.removeEventListener("keypress",t),window.removeEventListener("keypress",e),window.removeEventListener("keypress",n)}),[]),S("div",{})},us=({store:i})=>{const e=i.move?oi(i.move):{},t=i.ws?oi(i.ws):{},n=i.master?oi(i.master):{},o=i.selectedBins?oi(i.selectedBins):[],s=i.axisScaling?oi(i.axisScaling):new Map,[a,f]=g.useState([]),[h,p]=g.useState(""),[c,d]=g.useState(""),[E,k]=g.useState([]);return g.useEffect(()=>{e.clients!==void 0&&(e.clients.length>0?f(e.clients):f([]))},[e]),g.useEffect(()=>{p(t.id),d(t.color)},[t]),g.useEffect(()=>{},[n]),g.useEffect(()=>{o&&k(o.selectedBins)},[o]),g.useEffect(()=>{console.log(s.axisMap)},[s.axisMap]),ue("a-entity",{children:[S(ls,{}),S(ts,{}),a.filter(T=>T.id!==h).map(T=>{const v=T.position,u=T.rotation,P=v.join(" ");return S(is,{id:T.id,position:P,rotation:u,color:c},"key"+T.id)})]})},fs=({data:i,states:e=null,stores:t=null,selectedBins:n=[],onClick:o=c=>{console.log("click isn't defined!")},onDbClick:s=c=>{console.log("DbClick isn't be defined!")},onHover:a=c=>{console.log("Hover isn't be defined!")},onView:f=null,onProgress:h=null,onExeCommand:p=c=>{console.log("exeCommand isn't be defined!")}})=>{let c;return g.useEffect(()=>{if(c=ri.getBinDistributor().subscribe(d=>{var E,k,T;if((d==null?void 0:d.id)===i.id){const v={intersectionAxis:d.intersect,obj:i.histogram,id:d.id};switch((E=d.data)!=null&&E.zPos?(v.binz=d.data.zPos,v.biny=d.data.yPos,v.binx=d.data.xPos,v.bin=i.histogram.getBin(d.data.xPos,d.data.yPos,d.data.zPos),v.con=i.histogram.getBinContent(d.data.xPos,d.data.yPos,d.data.zPos)):(k=d.data)!=null&&k.yPos?(v.biny=d.data.yPos,v.binx=d.data.xPos,v.bin=i.histogram.getBin(d.data.xPos,d.data.yPos),v.con=i.histogram.getBinContent(d.data.xPos,d.data.yPos)):(T=d.data)!=null&&T.xPos&&(v.binx=d.data.xPos,v.bin=i.histogram.getBin(d.data.xPos),v.con=i.histogram.getBinContent(d.data.xPos)),d.event){case"CLICK":o(v);break;case"HOVER":a(v);break;case"DB_CLICK":s(v);break}}else p(d.command)}),c)return()=>c.unsubscribe()},[i,e,o,s,a,p]),S(g.Fragment,{children:ue(Et.Provider,{value:{data:{id:i.id,histogram:i.histogram,projectionNames:i==null?void 0:i.projectionsNames,projPanelIds:i==null?void 0:i.projPanelIds},stores:{source:t==null?void 0:t.sourceStore,theme:t==null?void 0:t.themeStore,range:t==null?void 0:t.rangeStore,views:t==null?void 0:t.viewStore},states:{theme:e==null?void 0:e.theme,range:e==null?void 0:e.range,section:e==null?void 0:e.section,onViewChange:f,onProgress:h,selectedBins:n,selectedView:e==null?void 0:e.selectedView}},children:[ue("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:"calc(90vh)"},children:[S(Ko,{}),(t==null?void 0:t.sharedStore)&&S(us,{store:t.sharedStore}),S(Lo,{}),S(qo,{})]}),!window.AFRAME.utils.device.checkHeadsetConnected()&&S(Zr,{})]})})};class hs{constructor(e){He(this,"model",null);this.model=e}updateElement(e,t,n,o){if(this.model[n].elements[e])n==="titles"?this.createTitle(this.model[n].elements[e],this.model[n].attributes[e]):this.createElement(this.model[n].elements[e],this.model[n].attributes[e],o);else{let s;n==="titles"?s=this.createTitle(void 0,this.model[n].attributes[e]):s=this.createElement(void 0,this.model[n].attributes[e],o),this.model[n].elements[e]=s,t.appendChild(s)}}deleteUnnecessaryElements(e,t){const n=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=n,this.model[t[0]].attributes.length=n}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=n,this.model[t[0]].attributes.length=n,this.model[t[1]].elements.length=n,this.model[t[1]].attributes.length=n}}createElement(e,t,n){let o=e;if(o==null){const s=this.checkEntityType(n);o=document.createElement(s)}for(const s in t)o.setAttribute(s,t[s]);return o}createBannerElement(e,t,n){let o=e;return o==null&&(o=document.createElement("a-entity"),this.createBannerLines(t,n).map(a=>o.append(a))),o.setAttribute("position",n.position),o.setAttribute("id",n.id),o}createBannerLines(e,t){const n=[];for(let s=e-1;s>-1;s--){t.line.position.y=2*s;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),n.push(a)}const o=document.createElement("a-entity");return o.setAttribute("geometry",t.background.geometry),o.setAttribute("position",t.background.position),o.setAttribute("material",t.background.material),n.push(o),n}createTitle(e,t){let n=e;if(n==null){n=document.createElement("a-entity");const o=this.createElement(void 0,t.background);n.appendChild(o)}return delete t.background,this.createElement(n,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class ds{bannerTemplate(e,t,n){const o={x:e.positionX,y:e.positionY,z:e.positionZ},s=e.id,a=this.bannerBackgroundTemplate(n),f=this.lineTemplate(t);return{position:o,id:s,background:a,line:f}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.scaleX,y:e.scaleY,z:e.scaleZ},o={color:e.color,opacity:.75},s=e.class,a=e.data,f=e.id;return{position:t,scale:n,material:o,id:f,class:s,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={primitive:"plane",width:4,height:1},s={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},f=e.id;return{position:t,rotation:n,geometry:o,text:s,material:a,id:f}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={primitive:"plane",width:e.width,height:e.height},s={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:n,geometry:o,text:s,material:a}}titleTemplate(e,t){const n={x:e.positionX,y:e.positionY,z:e.positionZ},o={x:e.rotationX,y:e.rotationY,z:e.rotationZ},s={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},f=this.titleTextTemplate(t);return{position:n,rotation:o,material:s,text:a,background:f}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},n={x:e.positionX,y:e.positionY,z:e.positionZ},o={color:e.color,opacity:.6};return{position:n,geometry:t,material:o}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:n,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},n={primitive:"box",width:e.width,height:e.height,depth:e.depth},o={color:e.color};return{position:t,geometry:n,material:o}}}let rn=[];function ps(i){return rn.filter(t=>t.id===i).length!==0}function or(i,e,t,n,o,s,a){rn=Gr.getBinsFromLocalStorage();const f=new ds,h=new hs(e),p=new Qr(a),c={},d=i;let E,k,T,v,u,P,O,D,b,m;const te="";let q,w=0;const re=n+s>t.fXaxis.fXmax?t.fXaxis.fXmax:n+s,ce=o+s>t.fYaxis.fXmax?t.fYaxis.fXmax:o+s,be=t.fXaxis.fTitle,Z=t.fYaxis.fTitle,G=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],K=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let X=o;X<=ce;X++)for(let ve=n;ve<=re;ve++)if(k=t.fXaxis.GetBinCenter(ve),T=t.fXaxis.GetBinLowEdge(ve),v=k+(k-T),u=v-T,P=t.fYaxis.GetBinCenter(X),O=t.fYaxis.GetBinLowEdge(X),D=P+(P-O),b=D-O,q=t.getBinContent(ve,X),m=ms(q,t.fMaximum),E=m/2,m>0){const he=p.getBinColor(m),Te=T+"th2"+v+"th2"+O+"th2"+D;let Oe;ps(Te)?Oe=p.getSecondaryAccentColor():Oe=he;const Ne=`id: ${Te};
|
|
287
|
-
content: ${
|
|
288
|
-
color: ${
|
|
289
|
-
yTitle: ${
|
|
290
|
-
xTitle: ${
|
|
291
|
-
absoluteContent: ${
|
|
292
|
-
binName: ${
|
|
286
|
+
${y.ground.animation.toX} ${y.ground.animation.toY} ${y.ground.animation.toZ}; dur: 1000;`},y.ground.key),y.banners.map(c=>b("a-box",{id:l[0]?l[0]:"panel_0",geometry:`width:${c.geometry.width}; height:${c.geometry.height}; depth:${c.geometry.depth};`,position:`${c.position.x} ${c.position.y} ${c.position.z}`,material:`color: ${c.material.color}, transparent: ${c.material.transparent}`},l[0]?l[0]:"panel_0"))]}):b("a-box",{animation__1:"property: rotation; to: 0 180 360; dur: 10000; easing: linear; loop: true",animation__2:"property: scale; from: 1 1 1; to: 10 10 10; dur: 15000; timeout: 15000; loop: true; easing: linear; dir: alternate",animation__color:"property: material.color; from: #003682; to: #7d0002; dur: 80000: easing: linear: loop: true; dir: alternate",position:"0 1.5 -2"})};function qo(){return ee(v.Fragment,{children:[b("a-sky",{color:"#dbf0fe"}),b("a-plane",{rotation:"-90 0 0",position:"0 -0.5 0",width:"1000",height:"1000",color:"#aaa",material:"shader:flat;"})]})}var Ko=Object.defineProperty,Jo=(i,e,t)=>e in i?Ko(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,wi=(i,e,t)=>(Jo(i,typeof e!="symbol"?e+"":e,t),t);const Ei=v.createContext(null),nr=(i="",e="zmq2ws")=>{const[t,r]=v.useState({}),o=v.useContext(Ei)[e];return v.useLayoutEffect(()=>{if(o===null)return;const s=o.subscribeIn(r,i);return()=>s.unsubscribe()},[o]),t};class Qo{constructor(){wi(this,"state"),wi(this,"distributors",new Map),wi(this,"handlerFunc",new Map),wi(this,"subscriptions",new Map)}addDistributor(e){this.distributors.set(e.getId(),e)}addHandlerFunc(e,t=null,r=null,o=null){this.handlerFunc.set(e,{callbackInputFunc:t,callbackOutputFunc:r,callbackCustomFunc:o})}getDistributorById(e){return this.distributors.get(e)}addSubscription(e){this.subscriptions.get(e)&&(this.clearSubscription(e),console.log("unsubscribe"));const t=this.createSubscription(e);this.subscriptions.set(e,t)}createExternalSubscription(e,t=null,r=null,o=null){return this.distributors.get(e).getObservableInstance().subscribe(s=>{s.flag==="IN"?t&&t(s.data):s.flag==="OUT"?r&&r(s.data):o&&o(s.data)})}createSubscription(e){const t=this.handlerFunc.get(e);return this.distributors.get(e).getObservableInstance().subscribe(r=>{r.flag==="IN"?t!=null&&t.callbackInputFunc&&t.callbackInputFunc(r.data):r.flag==="OUT"?t!=null&&t.callbackOutputFunc&&t.callbackOutputFunc(r.data):t!=null&&t.callbackCustomFunc&&t.callbackCustomFunc(r.data)})}addAllSubscriptions(){this.distributors.forEach((e,t)=>{this.addSubscription(t)})}clearSubscription(e){var t;(t=this.subscriptions.get(e))==null||t.unsubscribe()}clearAllSubscriptions(){this.distributors.forEach((e,t)=>this.clearSubscription(t))}}new Qo;const es=({position:i,rotation:e,id:t,color:r,masterId:o})=>(v.useEffect(()=>{const a=document.getElementById(t),u=new wt.Quaternion().fromArray(e),h=new wt.Euler().setFromQuaternion(u,"YXZ"),d={x:wt.MathUtils.radToDeg(h.x),y:wt.MathUtils.radToDeg(h.y),z:-wt.MathUtils.radToDeg(h.z)};a.setAttribute("rotation",d)},[e]),ee("a-entity",{position:i,id:t,children:[b("a-sphere",{radius:"0.5",color:"#F8DF87",children:o===t?(()=>ee("a-entity",{position:"0 0.25 0",children:[b("a-cone",{color:"gold","radius-bottom":"0.5","radius-top":"0.1",height:"0.8",position:"0 0.4 0"}),b("a-sphere",{color:r,radius:"0.05",position:"0 0.4 -0.3"}),b("a-sphere",{color:r,radius:"0.05",position:"0 0.6 -0.2"})]}))():b(vn,{})}),b("a-entity",{position:"0.2 0.15 -0.45",children:b("a-sphere",{radius:"0.1",color:"#FFFFFF",children:b("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),b("a-entity",{position:"-0.2 0.15 -0.45",children:b("a-sphere",{radius:"0.1",color:"#FFFFFF",children:b("a-sphere",{radius:"0.05",color:"#000000",position:"0 0 -0.07"})})}),b("a-cylinder",{height:"0.05",radius:"0.05",color:"#FF6B6B",position:"0 -0.25 -0.4",rotation:"0 90 90"}),b("a-sphere",{radius:"0.1",color:"#FF6B6B",position:"0 -0.1 -0.5"}),b("a-cylinder",{height:"0.8",radius:"0.3",color:r,position:"0 -0.6 0"}),ee("a-entity",{position:"-0.4 -0.4 0",children:[b("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),b("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),ee("a-entity",{position:"0.4 -0.4 0",children:[b("a-cylinder",{height:"0.6",radius:"0.1",color:"#F8DF87",position:"0 -0.3 0"}),b("a-sphere",{radius:"0.15",color:"#F8DF87",position:"0 -0.6 0"})]}),ee("a-entity",{position:"-0.15 -1 0",children:[b("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),b("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]}),ee("a-entity",{position:"0.15 -1 0",children:[b("a-cylinder",{height:"0.8",radius:"0.2",color:r,position:"0 -0.4 0"}),b("a-sphere",{radius:"0.25",color:"#F8DF87",position:"0 -0.8 0"})]})]})),ts=109,is=({wssb:i="shared"})=>{const e=v.useContext(Ei)[i],t=r=>{switch(r.keyCode){case ts:e.send({type:"assign_master",payload:{}})}};return v.useEffect(()=>(window.addEventListener("keypress",t),()=>{window.removeEventListener("keypress",t)}),[]),b("div",{})},rs=({wssb:i="shared"})=>{const[e,t]=v.useState(0),r=v.useContext(Ei)[i];return v.useEffect(()=>{const o=document.getElementById("camera"),s=new wt.Vector3,a=new wt.Quaternion;o.object3D.getWorldPosition(s);const u=setInterval(()=>{o.object3D.getWorldPosition(s),o.object3D.getWorldQuaternion(a),r.send({type:"move",payload:{position:s.toArray(),rotation:a.toArray()}}),t(h=>h+1)},100);return()=>clearInterval(u)},[e]),b("a-entity",{children:b(is,{})})},ns=({wssb:i="shared"})=>{v.useContext(Ei)[i];const e=nr("move",i),t=nr("ws",i),r=nr("master",i),[o,s]=v.useState([]),[a,u]=v.useState(null),[h,d]=v.useState(""),[l,p]=v.useState("");return v.useEffect(()=>{e.payload!==void 0&&(e.payload.clients.length>0?s(e.payload.clients):s([]))},[e.payload]),v.useEffect(()=>{t.payload!==void 0&&(d(t.payload.id),p(t.payload.color))},[t.payload]),v.useEffect(()=>{r.payload!==void 0&&u(r.payload.master)},[r.payload]),ee("a-entity",{children:[b(rs,{}),o.filter(y=>y.id!==h).map((y,_)=>{const T=y.position,x=y.rotation,c=T.join(" ");return b(es,{id:y.id,position:c,rotation:x,masterId:a,color:l},_+y.id)})]})},os=({data:i,states:e=null,stores:t=null,selectedBins:r=[],onClick:o=p=>{console.log("click isn't defined!")},onDbClick:s=p=>{console.log("DbClick isn't be defined!")},onHover:a=p=>{console.log("Hover isn't be defined!")},onView:u=null,onProgress:h=null,onExeCommand:d=p=>{console.log("exeCommand isn't be defined!")},minHeight:l="calc(90vh)"})=>{let p;return v.useEffect(()=>{if(p=oi.getBinDistributor().subscribe(y=>{var _,T,x;if((y==null?void 0:y.id)===i.id){const c={intersectionAxis:y.intersect,obj:i.histogram,id:y.id};switch((_=y.data)!=null&&_.zPos?(c.binz=y.data.zPos,c.biny=y.data.yPos,c.binx=y.data.xPos,c.bin=i.histogram.getBin(y.data.xPos,y.data.yPos,y.data.zPos),c.con=i.histogram.getBinContent(y.data.xPos,y.data.yPos,y.data.zPos)):(T=y.data)!=null&&T.yPos?(c.biny=y.data.yPos,c.binx=y.data.xPos,c.bin=i.histogram.getBin(y.data.xPos,y.data.yPos),c.con=i.histogram.getBinContent(y.data.xPos,y.data.yPos)):(x=y.data)!=null&&x.xPos&&(c.binx=y.data.xPos,c.bin=i.histogram.getBin(y.data.xPos),c.con=i.histogram.getBinContent(y.data.xPos)),y.event){case"CLICK":o(c);break;case"HOVER":a(c);break;case"DB_CLICK":s(c);break}}else d(y.command)}),p)return()=>p.unsubscribe()},[i,e,o,s,a,d]),b(v.Fragment,{children:ee(ii.Provider,{value:{data:{id:i.id,histogram:i.histogram,projectionNames:i==null?void 0:i.projectionsNames,projPanelIds:i==null?void 0:i.projPanelIds},stores:{source:t==null?void 0:t.sourceStore,theme:t==null?void 0:t.themeStore,range:t==null?void 0:t.rangeStore,views:t==null?void 0:t.viewStore},states:{theme:e==null?void 0:e.theme,range:e==null?void 0:e.range,section:e==null?void 0:e.section,onViewChange:u,onProgress:h,selectedBins:r,selectedView:e==null?void 0:e.selectedView}},children:[ee("a-scene",{embedded:!0,style:{zIndex:"1",width:"100%",minHeight:l},children:[b(qo,{}),b(ns,{}),b(Fo,{}),b(Go,{})]}),!window.AFRAME.utils.device.checkHeadsetConnected()&&b(Zr,{})]})})};class ss{constructor(e){He(this,"model",null);this.model=e}updateElement(e,t,r,o){if(this.model[r].elements[e])r==="titles"?this.createTitle(this.model[r].elements[e],this.model[r].attributes[e]):this.createElement(this.model[r].elements[e],this.model[r].attributes[e],o);else{let s;r==="titles"?s=this.createTitle(void 0,this.model[r].attributes[e]):s=this.createElement(void 0,this.model[r].attributes[e],o),this.model[r].elements[e]=s,t.appendChild(s)}}deleteUnnecessaryElements(e,t){const r=e;if(t.length===1){for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r}else{for(;this.model[t[0]].elements[e];)this.model[t[0]].elements[e].remove(),this.model[t[1]].elements[e].remove(),e++;this.model[t[0]].elements.length=r,this.model[t[0]].attributes.length=r,this.model[t[1]].elements.length=r,this.model[t[1]].attributes.length=r}}createElement(e,t,r){let o=e;if(o==null){const s=this.checkEntityType(r);o=document.createElement(s)}for(const s in t)o.setAttribute(s,t[s]);return o}createBannerElement(e,t,r){let o=e;return o==null&&(o=document.createElement("a-entity"),this.createBannerLines(t,r).map(a=>o.append(a))),o.setAttribute("position",r.position),o.setAttribute("id",r.id),o}createBannerLines(e,t){const r=[];for(let s=e-1;s>-1;s--){t.line.position.y=2*s;const a=document.createElement("a-entity");a.setAttribute("rotation",t.line.rotation),a.setAttribute("position",t.line.position),a.setAttribute("text",t.line.text),r.push(a)}const o=document.createElement("a-entity");return o.setAttribute("geometry",t.background.geometry),o.setAttribute("position",t.background.position),o.setAttribute("material",t.background.material),r.push(o),r}createTitle(e,t){let r=e;if(r==null){r=document.createElement("a-entity");const o=this.createElement(void 0,t.background);r.appendChild(o)}return delete t.background,this.createElement(r,t)}checkEntityType(e){return e==="a-box"||e==="a-sphere"||e==="a-text"||e==="a-circle"||e==="a-text"?e:"a-entity"}}class as{bannerTemplate(e,t,r){const o={x:e.positionX,y:e.positionY,z:e.positionZ},s=e.id,a=this.bannerBackgroundTemplate(r),u=this.lineTemplate(t);return{position:o,id:s,background:a,line:u}}binTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.scaleX,y:e.scaleY,z:e.scaleZ},o={color:e.color,opacity:.75},s=e.class,a=e.data,u=e.id;return{position:t,scale:r,material:o,id:u,class:s,binth2:a,mouseevent:""}}labelTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={primitive:"plane",width:4,height:1},s={value:e.value,color:e.color,width:10,height:"auto",align:"center"},a={opacity:0},u=e.id;return{position:t,rotation:r,geometry:o,text:s,material:a,id:u}}axisTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ},o={primitive:"plane",width:e.width,height:e.height},s={value:e.value,color:"black",width:4,height:"auto",align:"center"},a={color:e.color,opacity:.8};return{position:t,rotation:r,geometry:o,text:s,material:a}}titleTemplate(e,t){const r={x:e.positionX,y:e.positionY,z:e.positionZ},o={x:e.rotationX,y:e.rotationY,z:e.rotationZ},s={opacity:0},a={value:e.title,color:e.color,width:230,height:"auto",align:"center"},u=this.titleTextTemplate(t);return{position:r,rotation:o,material:s,text:a,background:u}}titleTextTemplate(e){const t={primitive:"plane",width:e.width,height:e.height},r={x:e.positionX,y:e.positionY,z:e.positionZ},o={color:e.color,opacity:.6};return{position:r,geometry:t,material:o}}lineTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={x:e.rotationX,y:e.rotationY,z:e.rotationZ};return{position:t,rotation:r,text:{value:"",width:14,height:"auto",align:"center"}}}bannerBackgroundTemplate(e){const t={x:e.positionX,y:e.positionY,z:e.positionZ},r={primitive:"box",width:e.width,height:e.height,depth:e.depth},o={color:e.color};return{position:t,geometry:r,material:o}}}let en=[];function cs(i){return en.filter(t=>t.id===i).length!==0}function or(i,e,t,r,o,s,a){en=Gr.getBinsFromLocalStorage();const u=new as,h=new ss(e),d=new Qr(a),l={},p=i;let y,_,T,x,c,k,A,B,H,g;const re="";let J,C=0;const oe=r+s>t.fXaxis.fXmax?t.fXaxis.fXmax:r+s,ue=o+s>t.fYaxis.fXmax?t.fYaxis.fXmax:o+s,xe=t.fXaxis.fTitle,w=t.fYaxis.fTitle,I=t.fXaxis.fLabels?t.fXaxis.fLabels.arr:[],q=t.fYaxis.fLabels?t.fYaxis.fLabels.arr:[];for(let L=o;L<=ue;L++)for(let he=r;he<=oe;he++)if(_=t.fXaxis.GetBinCenter(he),T=t.fXaxis.GetBinLowEdge(he),x=_+(_-T),c=x-T,k=t.fYaxis.GetBinCenter(L),A=t.fYaxis.GetBinLowEdge(L),B=k+(k-A),H=B-A,J=t.getBinContent(he,L),g=ls(J,t.fMaximum),y=g/2,g>0){const de=d.getBinColor(g),Te=T+"th2"+x+"th2"+A+"th2"+B;let ce;cs(Te)?ce=d.getSecondaryAccentColor():ce=de;const je=`id: ${Te};
|
|
287
|
+
content: ${g};
|
|
288
|
+
color: ${de};
|
|
289
|
+
yTitle: ${w};
|
|
290
|
+
xTitle: ${xe};
|
|
291
|
+
absoluteContent: ${J};
|
|
292
|
+
binName: ${re};
|
|
293
293
|
xMin: ${T};
|
|
294
|
-
yMin: ${
|
|
295
|
-
xMax: ${
|
|
296
|
-
yMax: ${
|
|
297
|
-
xCenter: ${
|
|
298
|
-
yCenter: ${
|
|
299
|
-
xWidth: ${
|
|
300
|
-
yWidth: ${
|
|
301
|
-
markedColor: ${
|
|
302
|
-
selectColor: ${
|
|
303
|
-
axisX: ${
|
|
304
|
-
axisY: ${
|
|
305
|
-
axisZ: ${p.getAxisColor("z")}`;c.id=Te,c.positionX=T,c.positionY=E,c.positionZ=O,c.scaleX=u/2,c.scaleY=m,c.scaleZ=b/2,c.color=Oe,c.class="clickable",c.data=Ne,e.bins.attributes[w]=f.binTemplate(c),h.updateElement(w,d,"bins","a-box"),w++}h.deleteUnnecessaryElements(w,["bins"]),c.id=1500+w,c.positionX=re+.5,c.positionY=0,c.positionZ=ce+.5,c.rotationX=270,c.rotationY=360,c.rotationZ=0,c.width=2,c.height=2,c.value="0",c.color=p.getAxisColor("y"),e.normalXAxis.attributes[0]=f.axisTemplate(c),h.updateElement(0,d,"normalXAxis","a-entity"),c.positionZ=o-2.5,c.rotationX=270,c.rotationY=180,e.reversedYAxis.attributes[0]=f.axisTemplate(c),h.updateElement(0,d,"reversedYAxis","a-entity"),c.positionX=n-2.5,c.positionZ=ce+.5,e.normalYAxis.attributes[0]=f.axisTemplate(c),h.updateElement(0,d,"normalYAxis","a-entity"),c.positionZ=o-2.5,c.rotationY=180,e.reversedXAxis.attributes[0]=f.axisTemplate(c),h.updateElement(0,d,"reversedXAxis","a-entity"),w=1;for(let X=o;X<=ce;X++)c.id=1500+w,c.positionX=n-2.5,c.positionY=0,c.positionZ=X-1,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=2,c.height=1,c.value=`${K[X-1]?K[X-1].fString:X-1}`,c.color=p.getAxisColor("z"),e.normalYAxis.attributes[w]=f.axisTemplate(c),h.updateElement(w,d,"normalYAxis","a-entity"),c.id=4500+w,c.positionX=re+.5,c.rotationY=360,c.value=`${K[X-1]?K[X-1].fString:X-1}`,e.reversedYAxis.attributes[w]=f.axisTemplate(c),h.updateElement(w,d,"reversedYAxis","a-entity"),w++;h.deleteUnnecessaryElements(w,["normalYAxis","reversedYAxis"]),w=1;for(let X=n;X<=re;X++)c.id=1500+w,c.positionX=X-1,c.positionY=0,c.positionZ=o-2.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=2,c.height=1,c.value=`${G[X-1]?G[X-1].fString:X-1}`,c.color=p.getAxisColor("x"),e.normalXAxis.attributes[w]=f.axisTemplate(c),h.updateElement(w,d,"normalXAxis","a-entity"),c.id=4500+w,c.positionZ=ce+.5,c.rotationX=270,c.rotationY=90,c.value=`${G[X-1]?G[X-1].fString:X-1}`,e.reversedXAxis.attributes[w]=f.axisTemplate(c),h.updateElement(w,d,"reversedXAxis","a-entity"),w++;h.deleteUnnecessaryElements(w,["normalXAxis","reversedXAxis"]),c.positionX=n,c.positionY=0,c.positionZ=o-4,c.rotationX=270,c.rotationY=180,c.rotationZ=0,c.width=4,c.height=1,c.value=be,c.id="downLabel",e.labels.attributes[0]=f.labelTemplate(c),h.updateElement(0,d,"labels","a-entity"),c.positionX=re-2.5,c.positionZ=ce+2,c.rotationY=0,c.id="upLabel",e.labels.attributes[1]=f.labelTemplate(c),h.updateElement(1,d,"labels","a-entity"),c.positionX=n-4,c.positionY=0,c.positionZ=o+.5,c.rotationX=270,c.rotationY=270,c.rotationZ=0,c.width=4,c.height=1,c.value=Z,c.color=p.getAxisColor("z"),c.id="leftLabel",e.labels.attributes[2]=f.labelTemplate(c),h.updateElement(2,d,"labels","a-entity"),c.positionX=re+2,c.positionZ=ce-2.5,c.rotationX=270,c.rotationY=90,c.id="rightLabel",e.labels.attributes[3]=f.labelTemplate(c),h.updateElement(3,d,"labels","a-entity"),c.positionX=n-90,c.positionY=-6.5,c.positionZ=o+90,c.rotationX=0,c.rotationY=123,c.rotationZ=0,c.title=t.fTitle,c.color=p.getPrimaryFontColor();const L={};L.positionX=0,L.positionY=0,L.positionZ=-1,L.width=170,L.height=30,L.color="white",e.titles.attributes[0]=f.titleTemplate(c,L),h.updateElement(0,d,"titles","a-entity"),c.positionX=n+120,c.positionZ=o-70,c.rotationY=330,c.title=t.fName,e.titles.attributes[1]=f.titleTemplate(c,L),h.updateElement(1,d,"titles","a-entity")}const ms=(i,e)=>i<=0?0:(e>1&&(i=Math.round((i/e+Number.EPSILON)*100)/100),i);class ys{constructor(e){I(this,Ai,void 0);B(this,Ai,e)}createTH2DemoHistogram(e,t,n,o){const s=kt.createHistogram("TH2I",e,t);let a=n;for(let f=1;f<=20;f++)for(let h=1;h<=20;h++){const p=s.getBin(h,f);let c=0;c=a,s.setBinContent(p,c),a+=o}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH2 histogram demo",s.fMaximum=a,s}createTH3DemoHistogram(e,t,n,o,s){const a=kt.createHistogram("TH3I",e,t,n);let f=o;for(let h=1;h<=20;h++)for(let p=1;p<=20;p++)for(let c=1;c<=20;c++){const d=a.getBin(c,p,h);let E=0;E=f,a.setBinContent(d,E),f+=s}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=f,a}}Ai=new WeakMap;const gs=we.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:0,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Kr(this.schema,i),document.addEventListener("keydown",rr),document.addEventListener("keyup",nr),this.demoHistogramService=new ys,this.localStorageService=new Ji,this.cameraService=new ni,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=n=>{console.log(n),this.section.xOffset=n.xOffset,this.section.yOffset=n.yOffset,this.range=n.range,this.cameraService.setCameraPosition(n),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=n=>{this.localStorageService.storeTH2Offsets(n.xOffset,n.yOffset,n.range),e(n)};this.subscription=Ee.getChangedSection().subscribe(t)},update:function(){Jr(),this.section=JSON.parse(this.data.section),kt.openFile(this.data.filename).then(i=>i.readObject("hUsersVsProjects")).then(i=>{this.localStorageService.initHistogramData(i),this.histogram=i,or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(i=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(i)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",rr),document.removeEventListener("keyup",nr)}}),bs=we.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});let si=new ni;const vs=i=>{i.detail.y>.95&&(Ee.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Ae.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),i.detail.y<-.95&&(Ee.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Ae.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),i.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),Ee.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Ae.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),i.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),Ee.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Ae.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},xs=i=>{i.detail.y>.95&&(Ee.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Ae.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),i.detail.y<-.95&&(Ee.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Ae.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),i.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),Ee.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Ae.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),i.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),Ee.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Ae.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},Ss=(i,e)=>{i.detail.y>.95&&si.horizontalMoveCamera("z",!1,e),i.detail.y<-.95&&si.horizontalMoveCamera("z",!0,e),i.detail.x<-.95&&si.horizontalMoveCamera("x",!0,e),i.detail.x>.95&&si.horizontalMoveCamera("x",!1,e)},ws=i=>{i.detail.y>.95&&(Ee.changeHistogramScale(-.1,"TH2"),$e.next({scale:-.1})),i.detail.y<-.95&&(Ee.changeHistogramScale(.1,"TH2"),$e.next({scale:.1}))},Es=i=>{i.detail.y>.95?$e.next({source:"next"}):i.detail.y<-.95&&$e.next({source:"prev"})},nn=i=>{i==="Y"?$e.next({tool:"next"}):$e.next({tool:"prev"})},on=i=>{Ae.changeHistogramSectionByOffset("zOffset","TH3",!0,i)},sn=i=>{Ae.changeHistogramSectionByOffset("zOffset","TH3",!1,i)},an=()=>{si=new ni},Cs=i=>{vs(i)},Ts=i=>{xs(i)},_s=(i,e)=>{Ss(i,e)},Os=()=>{vi.saveSelectedBinToLocalStorage(),Ki()===0&&$e.next({binData:vi})},ks=()=>{vi.deleteBinFromLocalStorage()},Ps=()=>{Ee.changeHistogramFunction("feet","TH2")},As=()=>{Ee.changeHistogramFunction("default","TH2")},$s=()=>{pt.setVisibilityOfBanners("oculus")},Rs=()=>{pt.setUserState()},Hs=()=>{pt.shiftBanners()},zs=i=>{i.forEach(e=>{})},Ds=we.registerComponent("left-controller-logging",{init:function(){let i=!1,e=!0,t=1,n=!1;const o=this.el;o.addEventListener("gripdown",()=>{i=!0}),o.addEventListener("gripup",()=>{i=!1}),o.addEventListener("thumbstickdown",()=>{i?(t++,t>20&&(t=20)):(t--,t<1&&(t=1))}),o.addEventListener("thumbstickmoved",s=>{if(i&&Ki()===2)ws(s);else if(i&&Ki()===3){if(e){e=!1,Es(s);const a=setTimeout(()=>{e=!0},100);return()=>clearTimeout(a)}}else _s(s,t)}),o.addEventListener("ybuttondown",()=>{i?n||(n=!0,nn("Y")):$s()}),o.addEventListener("xbuttondown",()=>{i?n||(n=!0,nn("X")):Rs()}),o.addEventListener("ybuttonup",()=>{n=!1}),o.addEventListener("xbuttonup",()=>{n=!1})},update:function(){an()}}),Bs=we.registerComponent("right-controller-logging",{init:function(){let i=!1;const e=this.el;e.addEventListener("gripdown",()=>{i=!0}),e.addEventListener("gripup",()=>{i=!1}),e.addEventListener("thumbstickmoved",t=>{i?Cs(t):Ts(t)}),e.addEventListener("bbuttondown",()=>{on(!i)}),e.addEventListener("abuttondown",()=>{sn(!i)}),e.addEventListener("thumbstickdown",()=>{i?Ps():As()}),e.addEventListener("triggerdown",()=>{i?(Os(),zs()):(ks(),Hs())})},update:function(){an()}});class Is{constructor(){I(this,Vt,void 0);B(this,Vt,new dt)}sendSourceSubject(e){r(this,Vt).next(e)}getSourceSettingSubject(){return r(this,Vt).asObservable()}}Vt=new WeakMap;const Ms=new Is,Ns=new Ji;Q.Banner=bs,Q.HistogramTH2=gs,Q.LeftController=Ds,Q.NdmVrScene=fs,Q.RightController=Bs,Q.ndmVrStorage=Ns,Q.sourceSettingSubject=Ms,Object.defineProperty(Q,Symbol.toStringTag,{value:"Module"})});
|
|
294
|
+
yMin: ${A};
|
|
295
|
+
xMax: ${x};
|
|
296
|
+
yMax: ${B};
|
|
297
|
+
xCenter: ${_};
|
|
298
|
+
yCenter: ${k};
|
|
299
|
+
xWidth: ${c};
|
|
300
|
+
yWidth: ${H};
|
|
301
|
+
markedColor: ${ce};
|
|
302
|
+
selectColor: ${d.getSecondaryAccentColor()};
|
|
303
|
+
axisX: ${d.getAxisColor("x")};
|
|
304
|
+
axisY: ${d.getAxisColor("y")};
|
|
305
|
+
axisZ: ${d.getAxisColor("z")}`;l.id=Te,l.positionX=T,l.positionY=y,l.positionZ=A,l.scaleX=c/2,l.scaleY=g,l.scaleZ=H/2,l.color=ce,l.class="clickable",l.data=je,e.bins.attributes[C]=u.binTemplate(l),h.updateElement(C,p,"bins","a-box"),C++}h.deleteUnnecessaryElements(C,["bins"]),l.id=1500+C,l.positionX=oe+.5,l.positionY=0,l.positionZ=ue+.5,l.rotationX=270,l.rotationY=360,l.rotationZ=0,l.width=2,l.height=2,l.value="0",l.color=d.getAxisColor("y"),e.normalXAxis.attributes[0]=u.axisTemplate(l),h.updateElement(0,p,"normalXAxis","a-entity"),l.positionZ=o-2.5,l.rotationX=270,l.rotationY=180,e.reversedYAxis.attributes[0]=u.axisTemplate(l),h.updateElement(0,p,"reversedYAxis","a-entity"),l.positionX=r-2.5,l.positionZ=ue+.5,e.normalYAxis.attributes[0]=u.axisTemplate(l),h.updateElement(0,p,"normalYAxis","a-entity"),l.positionZ=o-2.5,l.rotationY=180,e.reversedXAxis.attributes[0]=u.axisTemplate(l),h.updateElement(0,p,"reversedXAxis","a-entity"),C=1;for(let L=o;L<=ue;L++)l.id=1500+C,l.positionX=r-2.5,l.positionY=0,l.positionZ=L-1,l.rotationX=270,l.rotationY=180,l.rotationZ=0,l.width=2,l.height=1,l.value=`${q[L-1]?q[L-1].fString:L-1}`,l.color=d.getAxisColor("z"),e.normalYAxis.attributes[C]=u.axisTemplate(l),h.updateElement(C,p,"normalYAxis","a-entity"),l.id=4500+C,l.positionX=oe+.5,l.rotationY=360,l.value=`${q[L-1]?q[L-1].fString:L-1}`,e.reversedYAxis.attributes[C]=u.axisTemplate(l),h.updateElement(C,p,"reversedYAxis","a-entity"),C++;h.deleteUnnecessaryElements(C,["normalYAxis","reversedYAxis"]),C=1;for(let L=r;L<=oe;L++)l.id=1500+C,l.positionX=L-1,l.positionY=0,l.positionZ=o-2.5,l.rotationX=270,l.rotationY=270,l.rotationZ=0,l.width=2,l.height=1,l.value=`${I[L-1]?I[L-1].fString:L-1}`,l.color=d.getAxisColor("x"),e.normalXAxis.attributes[C]=u.axisTemplate(l),h.updateElement(C,p,"normalXAxis","a-entity"),l.id=4500+C,l.positionZ=ue+.5,l.rotationX=270,l.rotationY=90,l.value=`${I[L-1]?I[L-1].fString:L-1}`,e.reversedXAxis.attributes[C]=u.axisTemplate(l),h.updateElement(C,p,"reversedXAxis","a-entity"),C++;h.deleteUnnecessaryElements(C,["normalXAxis","reversedXAxis"]),l.positionX=r,l.positionY=0,l.positionZ=o-4,l.rotationX=270,l.rotationY=180,l.rotationZ=0,l.width=4,l.height=1,l.value=xe,l.id="downLabel",e.labels.attributes[0]=u.labelTemplate(l),h.updateElement(0,p,"labels","a-entity"),l.positionX=oe-2.5,l.positionZ=ue+2,l.rotationY=0,l.id="upLabel",e.labels.attributes[1]=u.labelTemplate(l),h.updateElement(1,p,"labels","a-entity"),l.positionX=r-4,l.positionY=0,l.positionZ=o+.5,l.rotationX=270,l.rotationY=270,l.rotationZ=0,l.width=4,l.height=1,l.value=w,l.color=d.getAxisColor("z"),l.id="leftLabel",e.labels.attributes[2]=u.labelTemplate(l),h.updateElement(2,p,"labels","a-entity"),l.positionX=oe+2,l.positionZ=ue-2.5,l.rotationX=270,l.rotationY=90,l.id="rightLabel",e.labels.attributes[3]=u.labelTemplate(l),h.updateElement(3,p,"labels","a-entity"),l.positionX=r-90,l.positionY=-6.5,l.positionZ=o+90,l.rotationX=0,l.rotationY=123,l.rotationZ=0,l.title=t.fTitle,l.color=d.getPrimaryFontColor();const F={};F.positionX=0,F.positionY=0,F.positionZ=-1,F.width=170,F.height=30,F.color="white",e.titles.attributes[0]=u.titleTemplate(l,F),h.updateElement(0,p,"titles","a-entity"),l.positionX=r+120,l.positionZ=o-70,l.rotationY=330,l.title=t.fName,e.titles.attributes[1]=u.titleTemplate(l,F),h.updateElement(1,p,"titles","a-entity")}const ls=(i,e)=>i<=0?0:(e>1&&(i=Math.round((i/e+Number.EPSILON)*100)/100),i);class us{constructor(e){j(this,Ri,void 0);M(this,Ri,e)}createTH2DemoHistogram(e,t,r,o){const s=At.createHistogram("TH2I",e,t);let a=r;for(let u=1;u<=20;u++)for(let h=1;h<=20;h++){const d=s.getBin(h,u);let l=0;l=a,s.setBinContent(d,l),a+=o}return s.fXaxis.fTitle="x Axis",s.fYaxis.fTitle="y Axis",s.fName="You don't have a valid file path",s.fTitle="This is a TH2 histogram demo",s.fMaximum=a,s}createTH3DemoHistogram(e,t,r,o,s){const a=At.createHistogram("TH3I",e,t,r);let u=o;for(let h=1;h<=20;h++)for(let d=1;d<=20;d++)for(let l=1;l<=20;l++){const p=a.getBin(l,d,h);let y=0;y=u,a.setBinContent(p,y),u+=s}return a.fXaxis.fTitle="x Axis",a.fYaxis.fTitle="y Axis",a.fZaxis.fTitle="z Axis",a.fName="You don't have a valid file path",a.fTitle="This is a TH3 histogram demo",a.fMaximum=u,a}}Ri=new WeakMap;const fs=we.registerComponent("th2-histogram",{schema:{section:{type:"string"},filename:{type:"string"},theme:{type:"string",default:"def"},position:{name:"position",xValue:0,yValue:0,zValue:0},scale:{name:"scale",xValue:2,yValue:2,zValue:2},rotation:{name:"rotation",xValue:0,yValue:0,zValue:0}},init:function(){const i=this.el;Kr(this.schema,i),document.addEventListener("keydown",ir),document.addEventListener("keyup",rr),this.demoHistogramService=new us,this.localStorageService=new Ki,this.cameraService=new si,this.render=!1,this.histogram=null,this.model={bins:{elements:[],attributes:[]},labels:{elements:[],attributes:[]},titles:{elements:[],attributes:[]},banners:{elements:[],attributes:[]},normalXAxis:{elements:[],attributes:[]},reversedXAxis:{elements:[],attributes:[]},normalYAxis:{elements:[],attributes:[]},reversedYAxis:{elements:[],attributes:[]}},this.section=null;const e=r=>{console.log(r),this.section.xOffset=r.xOffset,this.section.yOffset=r.yOffset,this.range=r.range,this.cameraService.setCameraPosition(r),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0},t=r=>{this.localStorageService.storeTH2Offsets(r.xOffset,r.yOffset,r.range),e(r)};this.subscription=_e.getChangedSection().subscribe(t)},update:function(){Jr(),this.section=JSON.parse(this.data.section),At.openFile(this.data.filename).then(i=>i.readObject("hUsersVsProjects")).then(i=>{this.localStorageService.initHistogramData(i),this.histogram=i,or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0}).then(()=>console.log("drawing completed")).catch(i=>{this.histogram=this.demoHistogramService.createTH2DemoHistogram(20,20,0,.1),this.localStorageService.initHistogramData(this.histogram),or(this.el,this.model,this.histogram,this.section.xOffset,this.section.yOffset,this.section.range,this.data.theme),this.render=!0,console.log(i)})},tick:function(){this.render&&(this.render=!1)},remove:function(){this.subscription.unsubscribe(),document.removeEventListener("keydown",ir),document.removeEventListener("keyup",rr)}}),hs=we.registerComponent("banner-control",{schema:{position:{name:"position",xValue:-1.28,yValue:.3,zValue:-1},scale:{name:"scale",xValue:.5,yValue:.7,zValue:.1},rotation:{name:"rotation",xValue:0,yValue:20,zValue:0}},init:function(){}});new si;const ds=i=>{i.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!1)),i.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!1)),i.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!1)),i.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!1),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!1),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!1))},ps=i=>{i.detail.y>.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!1,!0)),i.detail.y<-.95&&(_e.changeHistogramSectionByOffset("yOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("yOffset","TH3",!0,!0)),i.detail.x<-.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!0,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!0,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!0,!0)),i.detail.x>.95&&(nt.changeHistogramSectionByOffset("xOffset","TH1",!1,!0),_e.changeHistogramSectionByOffset("xOffset","TH2",!1,!0),Re.changeHistogramSectionByOffset("xOffset","TH3",!1,!0))},ms=i=>{i.detail.y>0&&(_e.changeHistogramScale(-.1,"TH2"),Ae.next({scale:-.1})),i.detail.y<0&&(_e.changeHistogramScale(.1,"TH2"),Ae.next({scale:.1}))},ys=i=>{i.detail.y>0?Ae.next({source:"next"}):i.detail.y<0&&Ae.next({source:"prev"})},gs=i=>{i.detail.y>0?Ae.next({theme:"next"}):i.detail.y<0&&Ae.next({theme:"prev"})},tn=i=>{i==="Y"?Ae.next({tool:"next"}):Ae.next({tool:"prev"})},rn=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!0,i)},nn=i=>{Re.changeHistogramSectionByOffset("zOffset","TH3",!1,i)},on=()=>{new si},bs=i=>{ds(i)},vs=i=>{ps(i)},xs=()=>{xi.saveSelectedBinToLocalStorage(),Tt()===0&&Ae.next({binData:xi})},Ss=()=>{xi.deleteBinFromLocalStorage()},ws=()=>{_e.changeHistogramFunction("feet","TH2")},Es=()=>{_e.changeHistogramFunction("default","TH2")},Cs=()=>{Et.setVisibilityOfBanners("oculus")},Ts=()=>{Et.setUserState()},_s=()=>{Et.shiftBanners()},Os=i=>{i.forEach(e=>{})},ks=we.registerComponent("left-controller-logging",{init:function(){let i=!1,e=!0,t=!1;const r=this.el;r.addEventListener("gripdown",()=>{i=!0}),r.addEventListener("gripup",()=>{i=!1}),r.addEventListener("thumbstickdown",()=>{}),r.addEventListener("thumbstickmoved",o=>{if(i&&Tt()===2)ms(o);else if(i&&Tt()===3){if(e){e=!1,ys(o);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}else if(i&&Tt()===4&&e){e=!1,gs(o);const s=setTimeout(()=>{e=!0},200);return()=>clearTimeout(s)}}),r.addEventListener("ybuttondown",()=>{i?t||(t=!0,tn("Y")):Cs()}),r.addEventListener("xbuttondown",()=>{i?t||(t=!0,tn("X")):Ts()}),r.addEventListener("ybuttonup",()=>{t=!1}),r.addEventListener("xbuttonup",()=>{t=!1})},update:function(){on()}}),As=we.registerComponent("right-controller-logging",{init:function(){let i=!1;const e=this.el;e.addEventListener("gripdown",()=>{i=!0}),e.addEventListener("gripup",()=>{i=!1}),e.addEventListener("thumbstickmoved",t=>{i?bs(t):vs(t)}),e.addEventListener("bbuttondown",()=>{rn(!i)}),e.addEventListener("abuttondown",()=>{nn(!i)}),e.addEventListener("thumbstickdown",()=>{i?ws():Es()}),e.addEventListener("triggerdown",()=>{i?(xs(),Os()):(Ss(),_s())})},update:function(){on()}});class Ps{constructor(){j(this,Wt,void 0);M(this,Wt,new dt)}sendSourceSubject(e){n(this,Wt).next(e)}getSourceSettingSubject(){return n(this,Wt).asObservable()}}Wt=new WeakMap;const $s=new Ps,Rs=we.registerComponent("oculus-thumbstick-movement-controller",{schema:{acceleration:{type:"number",default:-40},fly:{type:"boolean",default:!1},horizontalAxis:{type:"string",enum:["x","y","z"],default:"x"},verticalAxis:{type:"string",enum:["x","y","z"],default:"z"},enabled:{type:"boolean",default:!0},adEnabled:{type:"boolean",default:!0},adInverted:{type:"boolean",default:!1},wsEnabled:{type:"boolean",default:!0},wsInverted:{type:"boolean",default:!1}},required:["acceleration","fly","horizontalAxis","verticalAxis","enabled","adEnabled","adInverted","wsEnabled","wsInverted"],init:function(){this.velocity=new THREE.Vector3(0,0,0),this.tsData=new THREE.Vector2(0,0),this.moveEasing=1.1,this.thumbstickMoved=this.thumbstickMoved.bind(this);const i=this.el;let e=!1;i.addEventListener("gripdown",()=>{e=!0}),i.addEventListener("gripup",()=>{e=!1}),i.addEventListener("thumbstickmoved",t=>{e&&(Tt()===2||Tt()===3||Tt()===4)||this.thumbstickMoved(t,e)})},update:function(){this.sceneElement=document.getElementById("cameraWrapper")},tick:function(i,e){var t=this.data,r=this.velocity;!r[t.horizontalAxis]&&!r[t.verticalAxis]&&!this.tsData.length()||(e=e/1e3,this.updateVelocity(e),!(!r[t.horizontalAxis]&&!r[t.verticalAxis])&&this.sceneElement.object3D.position.add(this.getMovementVector(e)))},updateVelocity:function(i){var e,t,r,o=this.data,s=this.velocity,a,u;const h=1e-5;if(t=o.horizontalAxis,r=o.verticalAxis,i>.2){s[t]=0,s[r]=0;return}var d=Math.pow(1/this.moveEasing,i*60);s[t]!==0&&(s[t]=s[t]*d),s[r]!==0&&(s[r]=s[r]*d),Math.abs(s[t])<h&&(s[t]=0),Math.abs(s[r])<h&&(s[r]=0),o.enabled&&(e=o.acceleration,o.adEnabled&&this.tsData.x&&(u=o.adInverted?-1:1,s[t]+=u*e*this.tsData.x*i),o.wsEnabled&&(a=o.wsInverted?-1:1,s[r]+=a*e*this.tsData.y*i))},getMovementVector:function(){var i=new THREE.Vector3(0,0,0),e=new THREE.Euler(0,0,0,"YXZ");return function(t){var r=this.el.sceneEl.camera.el.object3D.rotation,o=this.velocity,s;return i.copy(o),i.multiplyScalar(t),r&&(s=this.data.fly?r.x:0,e.set(s,r.y,0),i.applyEuler(e)),i}}(),thumbstickMoved:function(i){this.tsData.set(i.detail.x,i.detail.y)},remove:function(){this.el.removeEventListener("thumbstickmoved",this.thumbstickMoved)}}),Hs=new Ki;K.Banner=hs,K.HistogramTH2=fs,K.LeftController=ks,K.NdmVrScene=os,K.RightController=As,K.ThumbsticController=Rs,K.ndmVrStorage=Hs,K.sourceSettingSubject=$s,Object.defineProperty(K,Symbol.toStringTag,{value:"Module"})});
|