relly-ui 1.0.0 → 1.0.1
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/dist/relly-ui.es.js +36 -34
- package/dist/relly-ui.es.js.map +1 -1
- package/dist/relly-ui.iife.js +5 -5
- package/dist/relly-ui.iife.js.map +1 -1
- package/dist/relly-ui.umd.js +5 -5
- package/dist/relly-ui.umd.js.map +1 -1
- package/package.json +2 -1
package/dist/relly-ui.umd.js
CHANGED
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
<span class="relly-graph-badge relly-graph-badge--min">min: ${this.formatter(t)}</span>
|
|
11
11
|
<span class="relly-graph-badge relly-graph-badge--max">max: ${this.formatter(n)}</span>
|
|
12
12
|
<span class="relly-graph-val">${this.formatter(e)}</span>
|
|
13
|
-
`}update(){const e=this.getValue();if(typeof e=="number"?this.push(e):typeof e=="object"&&e!==null&&this.push(e),this.targetObject)for(const t of this.seriesList)t.id!=="default"&&typeof this.targetObject[t.id]=="number"&&this.pushSeries(t.id,this.targetObject[t.id]);return this}draw(){if(!this.ctx)return;const e=this.ctx,t=this.cssWidth,n=this.cssHeight;e.clearRect(0,0,t,n),e.save(),e.setLineDash([2,4]),e.strokeStyle="rgba(255, 255, 255, 0.08)",e.lineWidth=1;for(let d of[.25,.5,.75]){const
|
|
13
|
+
`}update(){const e=this.getValue();if(typeof e=="number"?this.push(e):typeof e=="object"&&e!==null&&this.push(e),this.targetObject)for(const t of this.seriesList)t.id!=="default"&&typeof this.targetObject[t.id]=="number"&&this.pushSeries(t.id,this.targetObject[t.id]);return this}draw(){if(!this.ctx)return;const e=this.ctx,t=this.cssWidth,n=this.cssHeight;e.clearRect(0,0,t,n),e.save(),e.setLineDash([2,4]),e.strokeStyle="rgba(255, 255, 255, 0.08)",e.lineWidth=1;for(let d of[.25,.5,.75]){const f=Math.round(n*d);e.beginPath(),e.moveTo(0,f),e.lineTo(t,f),e.stroke()}e.restore();let s=[];for(const d of this.seriesList)s=s.concat(d.buffer);if(s.length===0)return;const r=Math.min(...s),a=Math.max(...s);let o=this.autoRange?r:this.min,h=this.autoRange?a:this.max;a>h&&(h=a),r<o&&(o=r),o===h&&(o-=1,h+=1);const c=(h-o)*.16||1;o-=c,h+=c;const u=h-o||1,p=t/Math.max(1,this.bufferSize-1);for(const d of this.seriesList){if(d.buffer.length===0)continue;const f=d.buffer.length===1?[d.buffer[0],d.buffer[0]]:d.buffer,b=this.bufferSize-f.length,m=[];for(let g=0;g<f.length;g++){const v=(b+g)*p,M=Math.max(0,Math.min(1,(f[g]-o)/u)),T=Math.max(4,Math.min(n-4,n-6-M*(n-12)));m.push({x:v,y:T})}if(e.beginPath(),e.moveTo(m[0].x,n),e.lineTo(m[0].x,m[0].y),this.smoothCurves&&m.length>2)for(let g=0;g<m.length-1;g++){const v=m[g],M=m[g+1],T=(v.x+M.x)/2;e.bezierCurveTo(T,v.y,T,M.y,M.x,M.y)}else for(let g=1;g<m.length;g++)e.lineTo(m[g].x,m[g].y);e.lineTo(m[m.length-1].x,n),e.closePath();const w=e.createLinearGradient(0,0,0,n);if(w.addColorStop(0,d.fillColor||`${d.color}40`),w.addColorStop(1,"rgba(0, 0, 0, 0)"),e.fillStyle=w,e.fill(),e.beginPath(),e.moveTo(m[0].x,m[0].y),this.smoothCurves&&m.length>2)for(let g=0;g<m.length-1;g++){const v=m[g],M=m[g+1],T=(v.x+M.x)/2;e.bezierCurveTo(T,v.y,T,M.y,M.x,M.y)}else for(let g=1;g<m.length;g++)e.lineTo(m[g].x,m[g].y);e.save(),e.strokeStyle=d.color,e.lineWidth=2,e.shadowColor=d.color,e.shadowBlur=5,e.stroke(),e.restore();const C=m[m.length-1];C&&(e.beginPath(),e.arc(C.x,C.y,4,0,Math.PI*2),e.fillStyle=d.color,e.globalAlpha=.35,e.fill(),e.globalAlpha=1,e.beginPath(),e.arc(C.x,C.y,2,0,Math.PI*2),e.fillStyle="#ffffff",e.fill())}if(this.hoverIndex!==null){const d=Math.round(this.hoverIndex*p);e.save(),e.setLineDash([3,3]),e.strokeStyle="rgba(255, 255, 255, 0.45)",e.lineWidth=1,e.beginPath(),e.moveTo(d,0),e.lineTo(d,n),e.stroke(),e.restore();for(const f of this.seriesList){const b=this.bufferSize-f.buffer.length,m=this.hoverIndex-b;if(m>=0&&m<f.buffer.length){const w=f.buffer[m],C=Math.max(0,Math.min(1,(w-o)/u)),g=Math.max(4,Math.min(n-4,n-6-C*(n-12)));e.beginPath(),e.arc(d,g,4.5,0,Math.PI*2),e.fillStyle=f.color,e.fill(),e.beginPath(),e.arc(d,g,2,0,Math.PI*2),e.fillStyle="#ffffff",e.fill()}}}}destroy(){this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),this.mediaQueryList&&(this.mediaQueryList.removeEventListener("change",this.onResolutionChange),this.mediaQueryList=null),this.canvas.removeEventListener("mousemove",this.onMouseMove),this.canvas.removeEventListener("mouseleave",this.onMouseLeave),this.canvas.removeEventListener("click",this.onCanvasClick),super.destroy()}}class N extends x{constructor(e,t,n,s,r,a){super(e,t,n,s,r);l(this,"wrapperEl");l(this,"previewEl");l(this,"hexTextEl");l(this,"nativeColorInput");l(this,"eyeDropperBtn");l(this,"swatchesContainer");l(this,"swatches",[]);l(this,"swatchButtons",new Map);l(this,"soundEngine");this.soundEngine=a,this.wrapperEl=document.createElement("div"),this.wrapperEl.className="relly-color-wrapper",this.previewEl=document.createElement("div"),this.previewEl.className="relly-color-preview",this.previewEl.title="Click to open color palette",this.hexTextEl=document.createElement("span"),this.hexTextEl.className="relly-color-text",this.nativeColorInput=document.createElement("input"),this.nativeColorInput.type="color",this.nativeColorInput.className="relly-color-native",this.wrapperEl.appendChild(this.previewEl),this.wrapperEl.appendChild(this.hexTextEl),this.wrapperEl.appendChild(this.nativeColorInput),typeof window<"u"&&"EyeDropper"in window&&(this.eyeDropperBtn=document.createElement("button"),this.eyeDropperBtn.type="button",this.eyeDropperBtn.className="relly-eyedropper-btn",this.eyeDropperBtn.title="Pick color from screen",this.eyeDropperBtn.innerHTML=`
|
|
14
14
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
15
15
|
<path d="m14 7 3 3m-1-5a2.83 2.83 0 0 1 4 4L7 22H3v-4L16 5Z"></path>
|
|
16
16
|
</svg>
|
|
17
|
-
`,this.eyeDropperBtn.addEventListener("click",async()=>{try{const h=await new window.EyeDropper().open();h&&h.sRGBHex&&this.setValue(h.sRGBHex)}catch{}}),this.wrapperEl.appendChild(this.eyeDropperBtn)),this.controlEl.appendChild(this.wrapperEl),this.previewEl.addEventListener("click",()=>{this.nativeColorInput.click()}),this.nativeColorInput.addEventListener("input",()=>{const o=this.nativeColorInput.value;this.setValue(o)}),this.update()}setSoundEngine(e){return this.soundEngine=e,this}setSwatches(e){this.swatches=e,this.swatchesContainer||(this.swatchesContainer=document.createElement("div"),this.swatchesContainer.className="relly-color-swatches",this.wrapperEl.insertBefore(this.swatchesContainer,this.previewEl)),this.swatchesContainer.innerHTML="",this.swatchButtons.clear();for(const t of this.swatches){const n=document.createElement("button");n.type="button",n.className="relly-color-swatch",n.style.backgroundColor=t,n.title=t.toUpperCase(),n.addEventListener("click",()=>{var s;this.setValue(t),(s=this.soundEngine)==null||s.playClick()}),this.swatchesContainer.appendChild(n),this.swatchButtons.set(t.toLowerCase(),n)}return this.update(),this}getSwatches(){return[...this.swatches]}update(){if(!this.previewEl||!this.hexTextEl)return this;const e=String(this.getValue()||"#000000");this.previewEl.style.backgroundColor=e,this.hexTextEl.textContent=e.toUpperCase(),e.startsWith("#")&&(e.length===7||e.length===4)&&(this.nativeColorInput.value=e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e);const t=e.toLowerCase();for(const[n,s]of this.swatchButtons.entries())n===t?s.classList.add("relly-swatch-active"):s.classList.remove("relly-swatch-active");return this}}class R extends x{constructor(e,t,n,s,r){super(e,t,n,s,r);l(this,"containerEl");l(this,"xInput");l(this,"yInput");l(this,"min");l(this,"max");l(this,"step",.1);this.containerEl=document.createElement("div"),this.containerEl.className="relly-point2d-container";const a=document.createElement("div");a.className="relly-point2d-item";const o=document.createElement("span");o.className="relly-point2d-tag",o.textContent="X",this.xInput=document.createElement("input"),this.xInput.type="number",this.xInput.className="relly-point2d-input",this.xInput.step=String(this.step),a.appendChild(o),a.appendChild(this.xInput);const h=document.createElement("div");h.className="relly-point2d-item";const c=document.createElement("span");c.className="relly-point2d-tag",c.textContent="Y",this.yInput=document.createElement("input"),this.yInput.type="number",this.yInput.className="relly-point2d-input",this.yInput.step=String(this.step),h.appendChild(c),h.appendChild(this.yInput),this.containerEl.appendChild(a),this.containerEl.appendChild(h),this.controlEl.appendChild(this.containerEl),this.xInput.addEventListener("change",()=>this.handleInputChange()),this.yInput.addEventListener("change",()=>this.handleInputChange()),this.setupInputScrubbing(this.xInput,"x"),this.setupInputScrubbing(this.yInput,"y"),this.update()}setupInputScrubbing(e,t){let n=!1,s=0,r=0;const a=h=>{const c=h.clientX-s;if(!n&&Math.abs(c)>3&&(n=!0,typeof document<"u"&&document.body.classList.add("relly-jog-scrubbing")),n){const u=h.shiftKey?10:h.altKey?.1:1,p=this.step*u;let d=r+c*p;this.min!==void 0&&(d=Math.max(this.min,d)),this.max!==void 0&&(d=Math.min(this.max,d));const g=(this.step.toString().split(".")[1]||"").length;d=parseFloat(d.toFixed(Math.max(g,2)));const b=this.getValue();if(Array.isArray(b)){const m=[b[0],b[1]];m[t==="x"?0:1]=d,this.setValue(m)}else this.setValue({...b,[t]:d});h.preventDefault()}},o=()=>{n&&typeof document<"u"&&document.body.classList.remove("relly-jog-scrubbing"),typeof window<"u"&&(window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o))};e.addEventListener("mousedown",h=>{s=h.clientX,r=parseFloat(e.value)||0,n=!1,typeof window<"u"&&(window.addEventListener("mousemove",a),window.addEventListener("mouseup",o))})}setMin(e){return this.min=e,this.xInput.min=String(e),this.yInput.min=String(e),this}setMax(e){return this.max=e,this.xInput.max=String(e),this.yInput.max=String(e),this}setStep(e){return this.step=e,this.xInput.step=String(e),this.yInput.step=String(e),this}getValue(){return this.targetObject&&this.property&&this.targetObject[this.property]!==void 0?this.targetObject[this.property]:this.targetObject&&"x"in this.targetObject&&"y"in this.targetObject?this.targetObject:this.prevValue||{x:0,y:0}}setValue(e){const t=this.getValue(),n=Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t;return this.targetObject&&this.property&&this.targetObject[this.property]!==void 0?this.targetObject[this.property]=e:this.targetObject&&"x"in this.targetObject&&"y"in this.targetObject&&typeof e=="object"&&!Array.isArray(e)&&(this.targetObject.x=e.x,this.targetObject.y=e.y),this.prevValue=e,this.update(),this.triggerChange(e,n),this}handleInputChange(){let e=parseFloat(this.xInput.value)||0,t=parseFloat(this.yInput.value)||0;this.min!==void 0&&(e=Math.max(this.min,e),t=Math.max(this.min,t)),this.max!==void 0&&(e=Math.min(this.max,e),t=Math.min(this.max,t));const n=this.getValue();Array.isArray(n)?this.setValue([e,t]):this.setValue({...n,x:e,y:t})}update(){if(!this.xInput||!this.yInput)return this;const e=this.getValue();let t=0,n=0;return Array.isArray(e)?(t=e[0]||0,n=e[1]||0):typeof e=="object"&&e!==null&&(t=e.x||0,n=e.y||0),this.xInput.value=String(t),this.yInput.value=String(n),this}}class P extends x{constructor(e,t,n,s,r){super(e,t,n,s,r);l(this,"containerEl");l(this,"xInput");l(this,"yInput");l(this,"zInput");l(this,"min");l(this,"max");l(this,"step",.1);this.containerEl=document.createElement("div"),this.containerEl.className="relly-point3d-container";const a=document.createElement("div");a.className="relly-point3d-item";const o=document.createElement("span");o.className="relly-point3d-tag relly-point3d-tag--x",o.textContent="X",this.xInput=document.createElement("input"),this.xInput.type="number",this.xInput.className="relly-point3d-input",this.xInput.step=String(this.step),a.appendChild(o),a.appendChild(this.xInput);const h=document.createElement("div");h.className="relly-point3d-item";const c=document.createElement("span");c.className="relly-point3d-tag relly-point3d-tag--y",c.textContent="Y",this.yInput=document.createElement("input"),this.yInput.type="number",this.yInput.className="relly-point3d-input",this.yInput.step=String(this.step),h.appendChild(c),h.appendChild(this.yInput);const u=document.createElement("div");u.className="relly-point3d-item";const p=document.createElement("span");p.className="relly-point3d-tag relly-point3d-tag--z",p.textContent="Z",this.zInput=document.createElement("input"),this.zInput.type="number",this.zInput.className="relly-point3d-input",this.zInput.step=String(this.step),u.appendChild(p),u.appendChild(this.zInput),this.containerEl.appendChild(a),this.containerEl.appendChild(h),this.containerEl.appendChild(u),this.controlEl.appendChild(this.containerEl),this.xInput.addEventListener("change",()=>this.handleInputChange()),this.yInput.addEventListener("change",()=>this.handleInputChange()),this.zInput.addEventListener("change",()=>this.handleInputChange()),this.setupInputScrubbing(this.xInput,"x"),this.setupInputScrubbing(this.yInput,"y"),this.setupInputScrubbing(this.zInput,"z"),this.update()}setupInputScrubbing(e,t){let n=!1,s=0,r=0;const a=h=>{const c=h.clientX-s;if(!n&&Math.abs(c)>3&&(n=!0,typeof document<"u"&&document.body.classList.add("relly-jog-scrubbing")),n){const u=h.shiftKey?10:h.altKey?.1:1,p=this.step*u;let d=r+c*p;this.min!==void 0&&(d=Math.max(this.min,d)),this.max!==void 0&&(d=Math.min(this.max,d));const g=(this.step.toString().split(".")[1]||"").length;d=parseFloat(d.toFixed(Math.max(g,2)));const b=this.getValue();if(Array.isArray(b)){const m=[b[0]??0,b[1]??0,b[2]??0],w=t==="x"?0:t==="y"?1:2;m[w]=d,this.setValue(m)}else this.setValue({...b,[t]:d});h.preventDefault()}},o=()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o),n&&(n=!1,typeof document<"u"&&document.body.classList.remove("relly-jog-scrubbing"))};e.addEventListener("mousedown",h=>{h.button===0&&(s=h.clientX,r=parseFloat(e.value)||0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",o))})}handleInputChange(){const e=parseFloat(this.xInput.value)||0,t=parseFloat(this.yInput.value)||0,n=parseFloat(this.zInput.value)||0,s=this.getValue();Array.isArray(s)?this.setValue([e,t,n]):this.setValue({...typeof s=="object"&&s!==null?s:{},x:e,y:t,z:n})}setMin(e){return this.min=e,e!==void 0?(this.xInput.min=e.toString(),this.yInput.min=e.toString(),this.zInput.min=e.toString()):(this.xInput.removeAttribute("min"),this.yInput.removeAttribute("min"),this.zInput.removeAttribute("min")),this}setMax(e){return this.max=e,e!==void 0?(this.xInput.max=e.toString(),this.yInput.max=e.toString(),this.zInput.max=e.toString()):(this.xInput.removeAttribute("max"),this.yInput.removeAttribute("max"),this.zInput.removeAttribute("max")),this}setStep(e){return this.step=e,this.xInput.step=e.toString(),this.yInput.step=e.toString(),this.zInput.step=e.toString(),this}update(){if(!this.xInput||!this.yInput||!this.zInput)return this;const e=this.getValue();let t=0,n=0,s=0;return Array.isArray(e)?(t=e[0]||0,n=e[1]||0,s=e[2]||0):typeof e=="object"&&e!==null&&(t=e.x||0,n=e.y||0,s=e.z||0),this.xInput.value=String(t),this.yInput.value=String(n),this.zInput.value=String(s),this}}class D extends x{constructor(e,t,n,s,r,a){super(e,t,n,s,r);l(this,"wrapperEl");l(this,"trackEl");l(this,"barEl");l(this,"thumbMin");l(this,"thumbMax");l(this,"inputMin");l(this,"inputMax");l(this,"min",0);l(this,"max",100);l(this,"step",1);l(this,"soundEngine");l(this,"formatter",(e,t)=>`[${e.toFixed(1)}, ${t.toFixed(1)}]`);this.soundEngine=a,this.wrapperEl=document.createElement("div"),this.wrapperEl.className="relly-range-wrapper",this.inputMin=document.createElement("input"),this.inputMin.type="number",this.inputMin.className="relly-range-input relly-range-input--min",this.trackEl=document.createElement("div"),this.trackEl.className="relly-range-track",this.barEl=document.createElement("div"),this.barEl.className="relly-range-bar",this.thumbMin=document.createElement("div"),this.thumbMin.className="relly-range-thumb relly-range-thumb--min",this.thumbMin.title="Drag min",this.thumbMax=document.createElement("div"),this.thumbMax.className="relly-range-thumb relly-range-thumb--max",this.thumbMax.title="Drag max",this.trackEl.appendChild(this.barEl),this.trackEl.appendChild(this.thumbMin),this.trackEl.appendChild(this.thumbMax),this.inputMax=document.createElement("input"),this.inputMax.type="number",this.inputMax.className="relly-range-input relly-range-input--max",this.wrapperEl.appendChild(this.inputMin),this.wrapperEl.appendChild(this.trackEl),this.wrapperEl.appendChild(this.inputMax),this.controlEl.appendChild(this.wrapperEl),this.setupListeners(),this.update()}setupListeners(){this.inputMin.addEventListener("change",()=>{const e=parseFloat(this.inputMin.value)||this.min,[t,n]=this.getCurrentRange();this.setRangeValue(Math.min(e,n),n)}),this.inputMax.addEventListener("change",()=>{const e=parseFloat(this.inputMax.value)||this.max,[t,n]=this.getCurrentRange();this.setRangeValue(t,Math.max(e,t))}),this.setupThumbDrag(this.thumbMin,"min"),this.setupThumbDrag(this.thumbMax,"max"),this.setupBarDrag()}setupThumbDrag(e,t){let n=!1;const s=a=>{var g,b;if(!n)return;const o=this.trackEl.getBoundingClientRect(),h=Math.max(0,Math.min(1,(a.clientX-o.left)/o.width)),c=this.min+h*(this.max-this.min),u=this.applyStep(c),[p,d]=this.getCurrentRange();if(t==="min"){const m=Math.min(u,d);m!==p&&((g=this.soundEngine)==null||g.playTick(),this.setRangeValue(m,d))}else{const m=Math.max(u,p);m!==d&&((b=this.soundEngine)==null||b.playTick(),this.setRangeValue(p,m))}},r=()=>{n&&(n=!1,window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",r))};e.addEventListener("mousedown",a=>{a.button===0&&(a.preventDefault(),a.stopPropagation(),n=!0,window.addEventListener("mousemove",s),window.addEventListener("mouseup",r))})}setupBarDrag(){let e=!1,t=0,n=0,s=0;const r=o=>{var w;if(!e)return;const h=this.trackEl.getBoundingClientRect(),u=(o.clientX-t)/h.width*(this.max-this.min),p=s-n;let d=Math.max(this.min,Math.min(this.max-p,n+u));d=this.applyStep(d);const g=this.applyStep(d+p),[b,m]=this.getCurrentRange();(d!==b||g!==m)&&((w=this.soundEngine)==null||w.playTick(),this.setRangeValue(d,g))},a=()=>{e&&(e=!1,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a))};this.barEl.addEventListener("mousedown",o=>{if(o.button!==0)return;o.preventDefault(),o.stopPropagation(),e=!0,t=o.clientX;const[h,c]=this.getCurrentRange();n=h,s=c,window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)})}applyStep(e){const t=Math.round(e/this.step)*this.step,n=(this.step.toString().split(".")[1]||"").length;return parseFloat(t.toFixed(n))}getCurrentRange(){const e=this.getValue();return Array.isArray(e)?[e[0]??this.min,e[1]??this.max]:typeof e=="object"&&e!==null?[e.min??this.min,e.max??this.max]:[this.min,this.max]}setRangeValue(e,t){const n=Math.max(this.min,Math.min(e,this.max)),s=Math.max(this.min,Math.min(t,this.max)),r=this.getValue();Array.isArray(r)?this.setValue([n,s]):this.setValue({...typeof r=="object"&&r!==null?r:{},min:n,max:s})}setMin(e){return this.min=e,this.update(),this}setMax(e){return this.max=e,this.update(),this}setStep(e){return this.step=e,this.inputMin.step=e.toString(),this.inputMax.step=e.toString(),this}setFormat(e){return this.formatter=e,this.update(),this}setSoundEngine(e){return this.soundEngine=e,this}update(){if(!this.trackEl||!this.thumbMin||!this.thumbMax)return this;const[e,t]=this.getCurrentRange(),n=this.max-this.min||1,s=Math.max(0,Math.min(100,(e-this.min)/n*100)),r=Math.max(0,Math.min(100,(t-this.min)/n*100));return this.thumbMin.style.left=`${s}%`,this.thumbMax.style.left=`${r}%`,this.barEl.style.left=`${s}%`,this.barEl.style.width=`${Math.max(0,r-s)}%`,this.barEl.title=this.formatter(e,t),this.inputMin.value=String(e),this.inputMax.value=String(t),this}}class H extends x{constructor(e,t,n,s=[],r,a,o){super(e,t,n,r,a);l(this,"containerEl");l(this,"gliderEl");l(this,"buttons",new Map);l(this,"optionsMap",new Map);l(this,"soundEngine");this.soundEngine=o,this.containerEl=document.createElement("div"),this.containerEl.className="relly-segmented-container",this.gliderEl=document.createElement("div"),this.gliderEl.className="relly-segmented-glider",this.containerEl.appendChild(this.gliderEl),this.controlEl.appendChild(this.containerEl),this.setOptions(s)}setOptions(e){if(this.optionsMap.clear(),this.buttons.clear(),this.containerEl.innerHTML="",this.containerEl.appendChild(this.gliderEl),Array.isArray(e))for(const t of e){const n=String(t);this.optionsMap.set(n,t),this.createButton(n,n,t)}else if(typeof e=="object"&&e!==null)for(const[t,n]of Object.entries(e))this.optionsMap.set(t,n),this.createButton(t,t,n);return this.update(),this}createButton(e,t,n){const s=document.createElement("button");s.type="button",s.className="relly-segmented-btn",s.textContent=t,s.addEventListener("click",()=>{var r;(r=this.soundEngine)==null||r.playClick(),this.setValue(n)}),this.containerEl.appendChild(s),this.buttons.set(e,s)}setSoundEngine(e){return this.soundEngine=e,this}update(){if(!this.containerEl||this.buttons.size===0)return this;const e=this.getValue();let t=null;for(const[n,s]of this.optionsMap.entries()){const r=this.buttons.get(n);r&&(s===e||String(s)===String(e)?(r.classList.add("relly-segmented-btn--active"),t=r):r.classList.remove("relly-segmented-btn--active"))}if(t){const n=t.offsetLeft,s=t.offsetWidth;this.gliderEl.style.transform=`translateX(${n}px)`,this.gliderEl.style.width=`${s}px`,this.gliderEl.style.opacity="1"}else this.gliderEl.style.opacity="0";return this}}class j extends x{constructor(e,t,n,s){super(e,t,n,s);l(this,"wrapperEl");l(this,"ledEl");l(this,"badgeEl");l(this,"detailEl");l(this,"currentStatus","online");l(this,"customBadge");l(this,"customDetail");this.wrapperEl=document.createElement("div"),this.wrapperEl.className="relly-status-wrapper",this.ledEl=document.createElement("div"),this.ledEl.className="relly-status-led relly-status-led--online",this.ledEl.innerHTML=`
|
|
17
|
+
`,this.eyeDropperBtn.addEventListener("click",async()=>{try{const h=await new window.EyeDropper().open();h&&h.sRGBHex&&this.setValue(h.sRGBHex)}catch{}}),this.wrapperEl.appendChild(this.eyeDropperBtn)),this.controlEl.appendChild(this.wrapperEl),this.previewEl.addEventListener("click",()=>{this.nativeColorInput.click()}),this.nativeColorInput.addEventListener("input",()=>{const o=this.nativeColorInput.value;this.setValue(o)}),this.update()}setSoundEngine(e){return this.soundEngine=e,this}setSwatches(e){this.swatches=e,this.swatchesContainer||(this.swatchesContainer=document.createElement("div"),this.swatchesContainer.className="relly-color-swatches",this.wrapperEl.insertBefore(this.swatchesContainer,this.previewEl)),this.swatchesContainer.innerHTML="",this.swatchButtons.clear();for(const t of this.swatches){const n=document.createElement("button");n.type="button",n.className="relly-color-swatch",n.style.backgroundColor=t,n.title=t.toUpperCase(),n.addEventListener("click",()=>{var s;this.setValue(t),(s=this.soundEngine)==null||s.playClick()}),this.swatchesContainer.appendChild(n),this.swatchButtons.set(t.toLowerCase(),n)}return this.update(),this}getSwatches(){return[...this.swatches]}update(){if(!this.previewEl||!this.hexTextEl)return this;const e=String(this.getValue()||"#000000");this.previewEl.style.backgroundColor=e,this.hexTextEl.textContent=e.toUpperCase(),e.startsWith("#")&&(e.length===7||e.length===4)&&(this.nativeColorInput.value=e.length===4?`#${e[1]}${e[1]}${e[2]}${e[2]}${e[3]}${e[3]}`:e);const t=e.toLowerCase();for(const[n,s]of this.swatchButtons.entries())n===t?s.classList.add("relly-swatch-active"):s.classList.remove("relly-swatch-active");return this}}class R extends x{constructor(e,t,n,s,r){super(e,t,n,s,r);l(this,"containerEl");l(this,"xInput");l(this,"yInput");l(this,"min");l(this,"max");l(this,"step",.1);this.containerEl=document.createElement("div"),this.containerEl.className="relly-point2d-container";const a=document.createElement("div");a.className="relly-point2d-item";const o=document.createElement("span");o.className="relly-point2d-tag",o.textContent="X",this.xInput=document.createElement("input"),this.xInput.type="number",this.xInput.className="relly-point2d-input",this.xInput.step=String(this.step),a.appendChild(o),a.appendChild(this.xInput);const h=document.createElement("div");h.className="relly-point2d-item";const c=document.createElement("span");c.className="relly-point2d-tag",c.textContent="Y",this.yInput=document.createElement("input"),this.yInput.type="number",this.yInput.className="relly-point2d-input",this.yInput.step=String(this.step),h.appendChild(c),h.appendChild(this.yInput),this.containerEl.appendChild(a),this.containerEl.appendChild(h),this.controlEl.appendChild(this.containerEl),this.xInput.addEventListener("change",()=>this.handleInputChange()),this.yInput.addEventListener("change",()=>this.handleInputChange()),this.setupInputScrubbing(this.xInput,"x"),this.setupInputScrubbing(this.yInput,"y"),this.update()}setupInputScrubbing(e,t){let n=!1,s=0,r=0;const a=h=>{const c=h.clientX-s;if(!n&&Math.abs(c)>3&&(n=!0,typeof document<"u"&&document.body.classList.add("relly-jog-scrubbing")),n){const u=h.shiftKey?10:h.altKey?.1:1,p=this.step*u;let d=r+c*p;this.min!==void 0&&(d=Math.max(this.min,d)),this.max!==void 0&&(d=Math.min(this.max,d));const f=(this.step.toString().split(".")[1]||"").length;d=parseFloat(d.toFixed(Math.max(f,2)));const b=this.getValue();if(Array.isArray(b)){const m=[b[0],b[1]];m[t==="x"?0:1]=d,this.setValue(m)}else this.setValue({...b,[t]:d});h.preventDefault()}},o=()=>{n&&typeof document<"u"&&document.body.classList.remove("relly-jog-scrubbing"),typeof window<"u"&&(window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o))};e.addEventListener("mousedown",h=>{s=h.clientX,r=parseFloat(e.value)||0,n=!1,typeof window<"u"&&(window.addEventListener("mousemove",a),window.addEventListener("mouseup",o))})}setMin(e){return this.min=e,this.xInput.min=String(e),this.yInput.min=String(e),this}setMax(e){return this.max=e,this.xInput.max=String(e),this.yInput.max=String(e),this}setStep(e){return this.step=e,this.xInput.step=String(e),this.yInput.step=String(e),this}getValue(){return this.targetObject&&this.property&&this.targetObject[this.property]!==void 0?this.targetObject[this.property]:this.targetObject&&"x"in this.targetObject&&"y"in this.targetObject?this.targetObject:this.prevValue||{x:0,y:0}}setValue(e){const t=this.getValue(),n=Array.isArray(t)?[...t]:typeof t=="object"&&t!==null?{...t}:t;return this.targetObject&&this.property&&this.targetObject[this.property]!==void 0?this.targetObject[this.property]=e:this.targetObject&&"x"in this.targetObject&&"y"in this.targetObject&&typeof e=="object"&&!Array.isArray(e)&&(this.targetObject.x=e.x,this.targetObject.y=e.y),this.prevValue=e,this.update(),this.triggerChange(e,n),this}handleInputChange(){let e=parseFloat(this.xInput.value)||0,t=parseFloat(this.yInput.value)||0;this.min!==void 0&&(e=Math.max(this.min,e),t=Math.max(this.min,t)),this.max!==void 0&&(e=Math.min(this.max,e),t=Math.min(this.max,t));const n=this.getValue();Array.isArray(n)?this.setValue([e,t]):this.setValue({...n,x:e,y:t})}update(){if(!this.xInput||!this.yInput)return this;const e=this.getValue();let t=0,n=0;return Array.isArray(e)?(t=e[0]||0,n=e[1]||0):typeof e=="object"&&e!==null&&(t=e.x||0,n=e.y||0),this.xInput.value=String(t),this.yInput.value=String(n),this}}class P extends x{constructor(e,t,n,s,r){super(e,t,n,s,r);l(this,"containerEl");l(this,"xInput");l(this,"yInput");l(this,"zInput");l(this,"min");l(this,"max");l(this,"step",.1);this.containerEl=document.createElement("div"),this.containerEl.className="relly-point3d-container";const a=document.createElement("div");a.className="relly-point3d-item";const o=document.createElement("span");o.className="relly-point3d-tag relly-point3d-tag--x",o.textContent="X",this.xInput=document.createElement("input"),this.xInput.type="number",this.xInput.className="relly-point3d-input",this.xInput.step=String(this.step),a.appendChild(o),a.appendChild(this.xInput);const h=document.createElement("div");h.className="relly-point3d-item";const c=document.createElement("span");c.className="relly-point3d-tag relly-point3d-tag--y",c.textContent="Y",this.yInput=document.createElement("input"),this.yInput.type="number",this.yInput.className="relly-point3d-input",this.yInput.step=String(this.step),h.appendChild(c),h.appendChild(this.yInput);const u=document.createElement("div");u.className="relly-point3d-item";const p=document.createElement("span");p.className="relly-point3d-tag relly-point3d-tag--z",p.textContent="Z",this.zInput=document.createElement("input"),this.zInput.type="number",this.zInput.className="relly-point3d-input",this.zInput.step=String(this.step),u.appendChild(p),u.appendChild(this.zInput),this.containerEl.appendChild(a),this.containerEl.appendChild(h),this.containerEl.appendChild(u),this.controlEl.appendChild(this.containerEl),this.xInput.addEventListener("change",()=>this.handleInputChange()),this.yInput.addEventListener("change",()=>this.handleInputChange()),this.zInput.addEventListener("change",()=>this.handleInputChange()),this.setupInputScrubbing(this.xInput,"x"),this.setupInputScrubbing(this.yInput,"y"),this.setupInputScrubbing(this.zInput,"z"),this.update()}setupInputScrubbing(e,t){let n=!1,s=0,r=0;const a=h=>{const c=h.clientX-s;if(!n&&Math.abs(c)>3&&(n=!0,typeof document<"u"&&document.body.classList.add("relly-jog-scrubbing")),n){const u=h.shiftKey?10:h.altKey?.1:1,p=this.step*u;let d=r+c*p;this.min!==void 0&&(d=Math.max(this.min,d)),this.max!==void 0&&(d=Math.min(this.max,d));const f=(this.step.toString().split(".")[1]||"").length;d=parseFloat(d.toFixed(Math.max(f,2)));const b=this.getValue();if(Array.isArray(b)){const m=[b[0]??0,b[1]??0,b[2]??0],w=t==="x"?0:t==="y"?1:2;m[w]=d,this.setValue(m)}else this.setValue({...b,[t]:d});h.preventDefault()}},o=()=>{window.removeEventListener("mousemove",a),window.removeEventListener("mouseup",o),n&&(n=!1,typeof document<"u"&&document.body.classList.remove("relly-jog-scrubbing"))};e.addEventListener("mousedown",h=>{h.button===0&&(s=h.clientX,r=parseFloat(e.value)||0,window.addEventListener("mousemove",a),window.addEventListener("mouseup",o))})}handleInputChange(){const e=parseFloat(this.xInput.value)||0,t=parseFloat(this.yInput.value)||0,n=parseFloat(this.zInput.value)||0,s=this.getValue();Array.isArray(s)?this.setValue([e,t,n]):this.setValue({...typeof s=="object"&&s!==null?s:{},x:e,y:t,z:n})}setMin(e){return this.min=e,e!==void 0?(this.xInput.min=e.toString(),this.yInput.min=e.toString(),this.zInput.min=e.toString()):(this.xInput.removeAttribute("min"),this.yInput.removeAttribute("min"),this.zInput.removeAttribute("min")),this}setMax(e){return this.max=e,e!==void 0?(this.xInput.max=e.toString(),this.yInput.max=e.toString(),this.zInput.max=e.toString()):(this.xInput.removeAttribute("max"),this.yInput.removeAttribute("max"),this.zInput.removeAttribute("max")),this}setStep(e){return this.step=e,this.xInput.step=e.toString(),this.yInput.step=e.toString(),this.zInput.step=e.toString(),this}update(){if(!this.xInput||!this.yInput||!this.zInput)return this;const e=this.getValue();let t=0,n=0,s=0;return Array.isArray(e)?(t=e[0]||0,n=e[1]||0,s=e[2]||0):typeof e=="object"&&e!==null&&(t=e.x||0,n=e.y||0,s=e.z||0),this.xInput.value=String(t),this.yInput.value=String(n),this.zInput.value=String(s),this}}class D extends x{constructor(e,t,n,s,r,a){super(e,t,n,s,r);l(this,"wrapperEl");l(this,"trackEl");l(this,"barEl");l(this,"thumbMin");l(this,"thumbMax");l(this,"inputMin");l(this,"inputMax");l(this,"min",0);l(this,"max",100);l(this,"step",1);l(this,"soundEngine");l(this,"formatter",(e,t)=>`[${e.toFixed(1)}, ${t.toFixed(1)}]`);this.soundEngine=a,this.wrapperEl=document.createElement("div"),this.wrapperEl.className="relly-range-wrapper",this.inputMin=document.createElement("input"),this.inputMin.type="number",this.inputMin.className="relly-range-input relly-range-input--min",this.trackEl=document.createElement("div"),this.trackEl.className="relly-range-track",this.barEl=document.createElement("div"),this.barEl.className="relly-range-bar",this.thumbMin=document.createElement("div"),this.thumbMin.className="relly-range-thumb relly-range-thumb--min",this.thumbMin.title="Drag min",this.thumbMax=document.createElement("div"),this.thumbMax.className="relly-range-thumb relly-range-thumb--max",this.thumbMax.title="Drag max",this.trackEl.appendChild(this.barEl),this.trackEl.appendChild(this.thumbMin),this.trackEl.appendChild(this.thumbMax),this.inputMax=document.createElement("input"),this.inputMax.type="number",this.inputMax.className="relly-range-input relly-range-input--max",this.wrapperEl.appendChild(this.inputMin),this.wrapperEl.appendChild(this.trackEl),this.wrapperEl.appendChild(this.inputMax),this.controlEl.appendChild(this.wrapperEl),this.setupListeners(),this.update()}setupListeners(){this.inputMin.addEventListener("change",()=>{const e=parseFloat(this.inputMin.value)||this.min,[t,n]=this.getCurrentRange();this.setRangeValue(Math.min(e,n),n)}),this.inputMax.addEventListener("change",()=>{const e=parseFloat(this.inputMax.value)||this.max,[t,n]=this.getCurrentRange();this.setRangeValue(t,Math.max(e,t))}),this.setupThumbDrag(this.thumbMin,"min"),this.setupThumbDrag(this.thumbMax,"max"),this.setupBarDrag()}setupThumbDrag(e,t){let n=!1;const s=a=>{var f,b;if(!n)return;const o=this.trackEl.getBoundingClientRect(),h=Math.max(0,Math.min(1,(a.clientX-o.left)/o.width)),c=this.min+h*(this.max-this.min),u=this.applyStep(c),[p,d]=this.getCurrentRange();if(t==="min"){const m=Math.min(u,d);m!==p&&((f=this.soundEngine)==null||f.playTick(),this.setRangeValue(m,d))}else{const m=Math.max(u,p);m!==d&&((b=this.soundEngine)==null||b.playTick(),this.setRangeValue(p,m))}},r=()=>{n&&(n=!1,window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",r))};e.addEventListener("mousedown",a=>{a.button===0&&(a.preventDefault(),a.stopPropagation(),n=!0,window.addEventListener("mousemove",s),window.addEventListener("mouseup",r))})}setupBarDrag(){let e=!1,t=0,n=0,s=0;const r=o=>{var w;if(!e)return;const h=this.trackEl.getBoundingClientRect(),u=(o.clientX-t)/h.width*(this.max-this.min),p=s-n;let d=Math.max(this.min,Math.min(this.max-p,n+u));d=this.applyStep(d);const f=this.applyStep(d+p),[b,m]=this.getCurrentRange();(d!==b||f!==m)&&((w=this.soundEngine)==null||w.playTick(),this.setRangeValue(d,f))},a=()=>{e&&(e=!1,window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a))};this.barEl.addEventListener("mousedown",o=>{if(o.button!==0)return;o.preventDefault(),o.stopPropagation(),e=!0,t=o.clientX;const[h,c]=this.getCurrentRange();n=h,s=c,window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)})}applyStep(e){const t=Math.round(e/this.step)*this.step,n=(this.step.toString().split(".")[1]||"").length;return parseFloat(t.toFixed(n))}getCurrentRange(){const e=this.getValue();return Array.isArray(e)?[e[0]??this.min,e[1]??this.max]:typeof e=="object"&&e!==null?[e.min??this.min,e.max??this.max]:[this.min,this.max]}setRangeValue(e,t){const n=Math.max(this.min,Math.min(e,this.max)),s=Math.max(this.min,Math.min(t,this.max)),r=this.getValue();Array.isArray(r)?this.setValue([n,s]):this.setValue({...typeof r=="object"&&r!==null?r:{},min:n,max:s})}setMin(e){return this.min=e,this.update(),this}setMax(e){return this.max=e,this.update(),this}setStep(e){return this.step=e,this.inputMin.step=e.toString(),this.inputMax.step=e.toString(),this}setFormat(e){return this.formatter=e,this.update(),this}setSoundEngine(e){return this.soundEngine=e,this}update(){if(!this.trackEl||!this.thumbMin||!this.thumbMax)return this;const[e,t]=this.getCurrentRange(),n=this.max-this.min||1,s=Math.max(0,Math.min(100,(e-this.min)/n*100)),r=Math.max(0,Math.min(100,(t-this.min)/n*100));return this.thumbMin.style.left=`${s}%`,this.thumbMax.style.left=`${r}%`,this.barEl.style.left=`${s}%`,this.barEl.style.width=`${Math.max(0,r-s)}%`,this.barEl.title=this.formatter(e,t),this.inputMin.value=String(e),this.inputMax.value=String(t),this}}class H extends x{constructor(e,t,n,s=[],r,a,o){super(e,t,n,r,a);l(this,"containerEl");l(this,"gliderEl");l(this,"buttons",new Map);l(this,"optionsMap",new Map);l(this,"soundEngine");this.soundEngine=o,this.containerEl=document.createElement("div"),this.containerEl.className="relly-segmented-container",this.gliderEl=document.createElement("div"),this.gliderEl.className="relly-segmented-glider",this.containerEl.appendChild(this.gliderEl),this.controlEl.appendChild(this.containerEl),this.setOptions(s)}setOptions(e){if(this.optionsMap.clear(),this.buttons.clear(),this.containerEl.innerHTML="",this.containerEl.appendChild(this.gliderEl),Array.isArray(e))for(const t of e){const n=String(t);this.optionsMap.set(n,t),this.createButton(n,n,t)}else if(typeof e=="object"&&e!==null)for(const[t,n]of Object.entries(e))this.optionsMap.set(t,n),this.createButton(t,t,n);return this.update(),this}createButton(e,t,n){const s=document.createElement("button");s.type="button",s.className="relly-segmented-btn",s.textContent=t,s.addEventListener("click",()=>{var r;(r=this.soundEngine)==null||r.playClick(),this.setValue(n)}),this.containerEl.appendChild(s),this.buttons.set(e,s)}setSoundEngine(e){return this.soundEngine=e,this}update(){if(!this.containerEl||this.buttons.size===0)return this;const e=this.getValue();let t=null;for(const[n,s]of this.optionsMap.entries()){const r=this.buttons.get(n);r&&(s===e||String(s)===String(e)?(r.classList.add("relly-segmented-btn--active"),t=r):r.classList.remove("relly-segmented-btn--active"))}if(t){const n=t.offsetLeft,s=t.offsetWidth;this.gliderEl.style.transform=`translateX(${n}px)`,this.gliderEl.style.width=`${s}px`,this.gliderEl.style.opacity="1"}else this.gliderEl.style.opacity="0";return this}}class j extends x{constructor(e,t,n,s){super(e,t,n,s);l(this,"wrapperEl");l(this,"ledEl");l(this,"badgeEl");l(this,"detailEl");l(this,"currentStatus","online");l(this,"customBadge");l(this,"customDetail");this.wrapperEl=document.createElement("div"),this.wrapperEl.className="relly-status-wrapper",this.ledEl=document.createElement("div"),this.ledEl.className="relly-status-led relly-status-led--online",this.ledEl.innerHTML=`
|
|
18
18
|
<span class="relly-status-pulse-ring"></span>
|
|
19
19
|
<span class="relly-status-led-core"></span>
|
|
20
20
|
`,this.badgeEl=document.createElement("span"),this.badgeEl.className="relly-status-badge relly-status-badge--online",this.badgeEl.textContent="ONLINE",this.detailEl=document.createElement("span"),this.detailEl.className="relly-status-detail",this.wrapperEl.appendChild(this.ledEl),this.wrapperEl.appendChild(this.badgeEl),this.wrapperEl.appendChild(this.detailEl),this.controlEl.appendChild(this.wrapperEl),this.update()}setStatus(e,t,n){return this.currentStatus=e,t!==void 0&&(this.customBadge=t),n!==void 0&&(this.customDetail=n),this.targetObject&&this.property&&(this.targetObject[this.property]=e),this.update(),this}setBadge(e){return this.customBadge=e,this.update(),this}setDetail(e){return this.customDetail=e,this.update(),this}update(){if(!this.wrapperEl||!this.ledEl)return this;const e=this.getValue();let t=this.currentStatus;if(typeof e=="string"&&e){const n=e.toLowerCase();["online","busy","offline","info","ready"].includes(n)&&(t=n)}return this.ledEl.className=`relly-status-led relly-status-led--${t}`,this.badgeEl.className=`relly-status-badge relly-status-badge--${t}`,this.badgeEl.textContent=this.customBadge||t.toUpperCase(),this.customDetail?(this.detailEl.textContent=this.customDetail,this.detailEl.style.display="inline-block"):this.detailEl.style.display="none",this}}class S{constructor(i,e,t,n){l(this,"children",[]);l(this,"accordion",!1);this.contentEl=i,this.bindingEngine=e,this.presetManager=t,this.soundEngine=n}setAccordion(i){return this.accordion=i,this}isAccordion(){return this.accordion}onSectionExpanded(i){if(this.accordion)for(const e of this.children)e instanceof F&&e!==i&&e.setCollapsed(!0)}addCheckbox(i,e){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const s=i,r=s.label||s.property.charAt(0).toUpperCase()+s.property.slice(1),a=new E(r,s.object,s.property,this.bindingEngine,this.presetManager,this.soundEngine);return s.tooltip&&a.setTooltip(s.tooltip),(s.onChange||s.onToggle)&&a.onChange(s.onChange||s.onToggle),s.listen&&a.listen(),s.showIf&&a.showIf(s.showIf),this.contentEl.appendChild(a.element),this.children.push(a),a}const t=e?e.charAt(0).toUpperCase()+e.slice(1):"",n=new E(t,i,e,this.bindingEngine,this.presetManager,this.soundEngine);return this.contentEl.appendChild(n.element),this.children.push(n),n}createCheckbox(i,e){return this.addCheckbox(i,e)}addSlider(i,e){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const s=i,r=s.label||s.property.charAt(0).toUpperCase()+s.property.slice(1),a=new k(r,s.object,s.property,this.bindingEngine,this.presetManager,this.soundEngine);return s.min!==void 0&&a.setMin(s.min),s.max!==void 0&&a.setMax(s.max),s.step!==void 0&&a.setStep(s.step),s.tooltip&&a.setTooltip(s.tooltip),s.onChange&&a.onChange(s.onChange),s.listen&&a.listen(),s.showIf&&a.showIf(s.showIf),this.contentEl.appendChild(a.element),this.children.push(a),a}const t=e?e.charAt(0).toUpperCase()+e.slice(1):"",n=new k(t,i,e,this.bindingEngine,this.presetManager,this.soundEngine);return this.contentEl.appendChild(n.element),this.children.push(n),n}createSlider(i,e){return this.addSlider(i,e)}addButton(i,e){if(typeof i=="object"&&i!==null){const n=i,s=n.label||"Button",r=new V(s,n.onClick||e,this.soundEngine);return n.tooltip&&r.setTooltip(n.tooltip),n.showIf&&r.showIf(n.showIf),this.contentEl.appendChild(r.element),this.children.push(r),r}const t=new V(i,e,this.soundEngine);return this.contentEl.appendChild(t.element),this.children.push(t),t}createButton(i,e){return this.addButton(i,e)}addSelect(i,e,t){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const r=i,a=r.label||r.property.charAt(0).toUpperCase()+r.property.slice(1),o=new A(a,r.object,r.property,r.options,this.bindingEngine,this.presetManager);return r.tooltip&&o.setTooltip(r.tooltip),r.onChange&&o.onChange(r.onChange),r.listen&&o.listen(),r.showIf&&o.showIf(r.showIf),this.contentEl.appendChild(o.element),this.children.push(o),o}const n=e?e.charAt(0).toUpperCase()+e.slice(1):"",s=new A(n,i,e,t,this.bindingEngine,this.presetManager);return this.contentEl.appendChild(s.element),this.children.push(s),s}createSelect(i,e,t){return this.addSelect(i,e,t)}addDynamicLabel(i,e){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const s=i,r=s.label||s.property.charAt(0).toUpperCase()+s.property.slice(1),a=new z(r,s.object,s.property,this.bindingEngine);return s.format&&a.setFormat(s.format),s.tooltip&&a.setTooltip(s.tooltip),s.showIf&&a.showIf(s.showIf),this.contentEl.appendChild(a.element),this.children.push(a),a}const t=e?e.charAt(0).toUpperCase()+e.slice(1):"",n=new z(t,i,e,this.bindingEngine);return this.contentEl.appendChild(n.element),this.children.push(n),n}createDynamicLabel(i,e){return this.addDynamicLabel(i,e)}addGraph(i,e){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const s=i,r=s.label||s.property.charAt(0).toUpperCase()+s.property.slice(1),a=new B(r,s.object,s.property,this.bindingEngine,this.soundEngine);return s.range&&a.setRange(s.range[0],s.range[1]),s.color&&a.setColor(s.color,s.fillColor),s.bufferSize&&a.setBufferSize(s.bufferSize),s.smooth!==void 0&&a.setSmooth(s.smooth),s.height&&a.setHeight(s.height),s.format&&a.setFormat(s.format),s.tooltip&&a.setTooltip(s.tooltip),s.showIf&&a.showIf(s.showIf),this.contentEl.appendChild(a.element),this.children.push(a),a}const t=e?e.charAt(0).toUpperCase()+e.slice(1):"",n=new B(t,i,e,this.bindingEngine,this.soundEngine);return this.contentEl.appendChild(n.element),this.children.push(n),n}createGraph(i,e){return this.addGraph(i,e)}addFPSGraph(i="FPS"){const e={fps:60};let t=0,n=typeof performance<"u"?performance.now():Date.now(),s;const r=h=>{t++,h>=n+1e3&&(e.fps=Math.round(t*1e3/(h-n)),t=0,n=h),s=requestAnimationFrame(r)};typeof requestAnimationFrame<"u"&&(s=requestAnimationFrame(r));const a=this.addGraph(e,"fps").setLabel(i).setRange(0,120).setColor("#22c55e","rgba(34, 197, 94, 0.25)").setFormat(h=>`${Math.round(h)} FPS`),o=a.destroy.bind(a);return a.destroy=()=>{typeof cancelAnimationFrame<"u"&&s&&cancelAnimationFrame(s),o()},a}createFPSGraph(i="FPS"){return this.addFPSGraph(i)}addMemoryGraph(i="Memory"){const e={mem:0};let t;const n=()=>{if(typeof performance<"u"&&performance.memory){const a=performance.memory.usedJSHeapSize/1048576;e.mem=Number(a.toFixed(1))}else e.mem=Number((Math.sin(Date.now()/2500)*8+48).toFixed(1))};n(),typeof setInterval<"u"&&(t=setInterval(n,1e3));const s=this.addGraph(e,"mem").setLabel(i).setAutoRange(!0).setColor("#a855f7","rgba(168, 85, 247, 0.25)").setFormat(a=>`${a.toFixed(1)} MB`),r=s.destroy.bind(s);return s.destroy=()=>{t&&clearInterval(t),r()},s}createMemoryGraph(i="Memory"){return this.addMemoryGraph(i)}addColor(i,e){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const s=i,r=s.label||s.property.charAt(0).toUpperCase()+s.property.slice(1),a=new N(r,s.object,s.property,this.bindingEngine,this.presetManager,this.soundEngine);return s.tooltip&&a.setTooltip(s.tooltip),s.swatches&&a.setSwatches(s.swatches),s.onChange&&a.onChange(s.onChange),s.listen&&a.listen(),s.showIf&&a.showIf(s.showIf),this.contentEl.appendChild(a.element),this.children.push(a),a}const t=e?e.charAt(0).toUpperCase()+e.slice(1):"",n=new N(t,i,e,this.bindingEngine,this.presetManager,this.soundEngine);return this.contentEl.appendChild(n.element),this.children.push(n),n}createColor(i,e){return this.addColor(i,e)}addPoint2D(i,e,t){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const r=i,a=r.label||r.property.charAt(0).toUpperCase()+r.property.slice(1),o=new R(a,r.object,r.property,this.bindingEngine,this.presetManager);return r.min!==void 0&&o.setMin(r.min),r.max!==void 0&&o.setMax(r.max),r.step!==void 0&&o.setStep(r.step),r.tooltip&&o.setTooltip(r.tooltip),r.onChange&&o.onChange(r.onChange),r.listen&&o.listen(),r.showIf&&o.showIf(r.showIf),this.contentEl.appendChild(o.element),this.children.push(o),o}const n=e?e.charAt(0).toUpperCase()+e.slice(1):"",s=new R(n,i,e,this.bindingEngine,this.presetManager);return(t==null?void 0:t.min)!==void 0&&s.setMin(t.min),(t==null?void 0:t.max)!==void 0&&s.setMax(t.max),(t==null?void 0:t.step)!==void 0&&s.setStep(t.step),this.contentEl.appendChild(s.element),this.children.push(s),s}createPoint2D(i,e,t){return this.addPoint2D(i,e,t)}addPoint3D(i,e,t){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const r=i,a=r.label||r.property.charAt(0).toUpperCase()+r.property.slice(1),o=new P(a,r.object,r.property,this.bindingEngine,this.presetManager);return r.min!==void 0&&o.setMin(r.min),r.max!==void 0&&o.setMax(r.max),r.step!==void 0&&o.setStep(r.step),r.tooltip&&o.setTooltip(r.tooltip),r.contextMenu&&o.setContextMenu(r.contextMenu),r.onChange&&o.onChange(r.onChange),r.listen&&o.listen(),r.showIf&&o.showIf(r.showIf),this.contentEl.appendChild(o.element),this.children.push(o),o}const n=e?e.charAt(0).toUpperCase()+e.slice(1):"",s=new P(n,i,e,this.bindingEngine,this.presetManager);return(t==null?void 0:t.min)!==void 0&&s.setMin(t.min),(t==null?void 0:t.max)!==void 0&&s.setMax(t.max),(t==null?void 0:t.step)!==void 0&&s.setStep(t.step),this.contentEl.appendChild(s.element),this.children.push(s),s}createPoint3D(i,e,t){return this.addPoint3D(i,e,t)}addVector3(i,e,t){return this.addPoint3D(i,e,t)}createVector3(i,e,t){return this.addPoint3D(i,e,t)}addRange(i,e,t){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const r=i,a=r.label||r.property.charAt(0).toUpperCase()+r.property.slice(1),o=new D(a,r.object,r.property,this.bindingEngine,this.presetManager,this.soundEngine);return r.min!==void 0&&o.setMin(r.min),r.max!==void 0&&o.setMax(r.max),r.step!==void 0&&o.setStep(r.step),r.tooltip&&o.setTooltip(r.tooltip),r.contextMenu&&o.setContextMenu(r.contextMenu),r.onChange&&o.onChange(r.onChange),r.listen&&o.listen(),r.showIf&&o.showIf(r.showIf),this.contentEl.appendChild(o.element),this.children.push(o),o}const n=e?e.charAt(0).toUpperCase()+e.slice(1):"",s=new D(n,i,e,this.bindingEngine,this.presetManager,this.soundEngine);return(t==null?void 0:t.min)!==void 0&&s.setMin(t.min),(t==null?void 0:t.max)!==void 0&&s.setMax(t.max),(t==null?void 0:t.step)!==void 0&&s.setStep(t.step),this.contentEl.appendChild(s.element),this.children.push(s),s}createRange(i,e,t){return this.addRange(i,e,t)}addSegmented(i,e,t){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const r=i,a=r.label||r.property.charAt(0).toUpperCase()+r.property.slice(1),o=new H(a,r.object,r.property,r.options||[],this.bindingEngine,this.presetManager,this.soundEngine);return r.tooltip&&o.setTooltip(r.tooltip),r.contextMenu&&o.setContextMenu(r.contextMenu),r.onChange&&o.onChange(r.onChange),r.listen&&o.listen(),r.showIf&&o.showIf(r.showIf),this.contentEl.appendChild(o.element),this.children.push(o),o}const n=e?e.charAt(0).toUpperCase()+e.slice(1):"",s=new H(n,i,e,t||[],this.bindingEngine,this.presetManager,this.soundEngine);return this.contentEl.appendChild(s.element),this.children.push(s),s}createSegmented(i,e,t){return this.addSegmented(i,e,t)}addStatus(i,e,t="online",n,s){if(typeof i=="object"&&i!==null&&e===void 0&&"object"in i&&"property"in i){const c=i,u=c.label||c.property.charAt(0).toUpperCase()+c.property.slice(1),p=new j(u,c.object,c.property,this.bindingEngine);return c.status&&p.setStatus(c.status,c.badge,c.detail),c.badge&&p.setBadge(c.badge),c.detail&&p.setDetail(c.detail),c.tooltip&&p.setTooltip(c.tooltip),c.contextMenu&&p.setContextMenu(c.contextMenu),c.listen&&p.listen(),c.showIf&&p.showIf(c.showIf),this.contentEl.appendChild(p.element),this.children.push(p),p}const r=e?e.charAt(0).toUpperCase()+e.slice(1):typeof i=="string"?i:"Status",a=typeof i=="string"?void 0:i,o=typeof i=="string"?void 0:e,h=new j(r,a,o,this.bindingEngine);return h.setStatus(t,n,s),this.contentEl.appendChild(h.element),this.children.push(h),h}createStatus(i,e,t="online",n,s){return this.addStatus(i,e,t,n,s)}addRow(){const i=new $(this.bindingEngine,this.presetManager,this.soundEngine);return this.contentEl.appendChild(i.element),this.children.push(i),i}createRow(){return this.addRow()}addSection(i="Section",e=!1){let t="",n=e;typeof i=="object"&&i!==null?(t=i.label||i.title||"Section",i.collapsed!==void 0&&(n=i.collapsed)):t=i||"Section";const s=new F(t,this.bindingEngine,this.presetManager,n,this.soundEngine);return s.setParentContainer(this),this.contentEl.appendChild(s.element),this.children.push(s),s}addFolder(i="Folder",e=!1){return this.addSection(i,e)}createSection(i="Section",e=!1){return this.addSection(i,e)}createFolder(i="Folder",e=!1){return this.addSection(i,e)}createComponent(i){let e;const t=i.label||(i.property?i.property:i.type);switch(i.type){case"checkbox":e=this.addCheckbox(i.object,i.property);break;case"slider":{const n=this.addSlider(i.object,i.property);i.min!==void 0&&n.setMin(i.min),i.max!==void 0&&n.setMax(i.max),i.step!==void 0&&n.setStep(i.step),e=n;break}case"button":e=this.addButton(t,i.onClick);break;case"select":e=this.addSelect(i.object,i.property,i.options);break;case"dynamicLabel":{const n=this.addDynamicLabel(i.object,i.property);i.format&&n.setFormat(i.format),e=n;break}case"graph":{const n=this.addGraph(i.object,i.property);i.range&&n.setRange(i.range[0],i.range[1]),i.color&&n.setColor(i.color,i.fillColor),i.bufferSize&&n.setBufferSize(i.bufferSize),e=n;break}case"color":{const n=this.addColor(i.object,i.property);i.swatches&&n.setSwatches(i.swatches),e=n;break}case"point2d":{const n=this.addPoint2D(i.object,i.property);i.min!==void 0&&n.setMin(i.min),i.max!==void 0&&n.setMax(i.max),i.step!==void 0&&n.setStep(i.step),e=n;break}case"point3d":case"vector3":{const n=this.addPoint3D(i.object,i.property);i.min!==void 0&&n.setMin(i.min),i.max!==void 0&&n.setMax(i.max),i.step!==void 0&&n.setStep(i.step),e=n;break}case"range":{const n=this.addRange(i.object,i.property);i.min!==void 0&&n.setMin(i.min),i.max!==void 0&&n.setMax(i.max),i.step!==void 0&&n.setStep(i.step),e=n;break}case"segmented":{e=this.addSegmented(i.object,i.property,i.options);break}case"status":{e=this.addStatus(i.object,i.property,i.status,i.badge,i.detail);break}case"section":case"folder":{e=this.addSection(t,i.collapsed||!1);break}default:throw new Error(`[RellyUI] Unknown component type: ${i.type}`)}return t&&e.setLabel&&e.setLabel(t),i.tooltip&&e.setTooltip&&e.setTooltip(i.tooltip),i.contextMenu&&e.setContextMenu&&e.setContextMenu(i.contextMenu),(i.onChange||i.onToggle)&&e.onChange&&e.onChange(i.onChange||i.onToggle),i.listen&&e.listen&&e.listen(),i.showIf&&e.showIf&&e.showIf(i.showIf),i.disabled&&e.setDisabled&&e.setDisabled(!0),e}destroyChildren(){for(const i of this.children)i.destroy();this.children=[]}}class $ extends S{constructor(e,t,n){const s=document.createElement("div");s.className="relly-multi-row";super(s,e,t,n);l(this,"element");l(this,"disabled",!1);this.element=s}setDisabled(e){return this.disabled=e,this.disabled?this.element.classList.add("relly-disabled"):this.element.classList.remove("relly-disabled"),this}isDisabled(){return this.disabled}destroy(){this.destroyChildren(),this.element.remove()}}class F extends S{constructor(e,t,n,s=!1,r){const a=document.createElement("div");a.className="relly-section-content";super(a,t,n,r);l(this,"element");l(this,"headerEl");l(this,"titleEl");l(this,"arrowEl");l(this,"isCollapsed",!1);l(this,"conditionPredicate");l(this,"parentContainer");l(this,"disabled",!1);this.label=e,this.element=document.createElement("div"),this.element.className="relly-section",this.headerEl=document.createElement("div"),this.headerEl.className="relly-section-header";const o=document.createElement("div");o.className="relly-section-title-wrap",this.arrowEl=document.createElement("span"),this.arrowEl.innerHTML=`
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
<line x1="12" y1="3" x2="12" y2="15"></line>
|
|
35
35
|
</svg>
|
|
36
36
|
<span>Drag & drop a <strong>.json</strong> file here, or click to browse</span>
|
|
37
|
-
`,this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=".json,application/json",this.fileInput.style.display="none",this.dropzoneEl.addEventListener("click",()=>this.fileInput.click()),this.fileInput.addEventListener("change",c=>this.handleFileSelect(c)),this.dropzoneEl.addEventListener("dragover",c=>{c.preventDefault(),this.dropzoneEl.classList.add("relly-dropzone-drag")}),this.dropzoneEl.addEventListener("dragleave",()=>{this.dropzoneEl.classList.remove("relly-dropzone-drag")}),this.dropzoneEl.addEventListener("drop",c=>{c.preventDefault(),this.dropzoneEl.classList.remove("relly-dropzone-drag"),c.dataTransfer&&c.dataTransfer.files.length>0&&this.readFile(c.dataTransfer.files[0])}),t.appendChild(this.dropzoneEl),t.appendChild(this.fileInput),this.textareaEl=document.createElement("textarea"),this.textareaEl.className="relly-import-textarea",this.textareaEl.placeholder="Paste JSON configuration here...",t.appendChild(this.textareaEl),this.errorEl=document.createElement("div"),this.errorEl.className="relly-import-error",t.appendChild(this.errorEl);const a=document.createElement("div");a.className="relly-modal-actions";const o=document.createElement("button");o.className="relly-btn",o.textContent="Cancel",o.style.flex="1",o.addEventListener("click",()=>this.hide());const h=document.createElement("button");h.className="relly-btn relly-btn-primary",h.textContent="Apply & Load",h.style.flex="2",h.addEventListener("click",()=>this.apply()),a.appendChild(o),a.appendChild(h),t.appendChild(a),this.element.appendChild(t),this.element.addEventListener("click",c=>{c.target===this.element&&this.hide()}),this.parentEl.appendChild(this.element)}handleFileSelect(i){const e=i.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}readFile(i){const e=new FileReader;e.onload=()=>{typeof e.result=="string"&&(this.textareaEl.value=e.result,this.errorEl.textContent="")},e.readAsText(i)}show(){this.errorEl.textContent="",this.element.classList.add("relly-modal-show"),this.textareaEl.focus()}hide(){this.element.classList.remove("relly-modal-show")}apply(){const i=this.textareaEl.value.trim();if(!i){this.errorEl.textContent="Please paste JSON or drop a file.";return}try{const e=JSON.parse(i);if(typeof e!="object"||e===null)throw new Error("JSON root must be an object.");this.onApply(e),this.hide(),this.textareaEl.value="",this.errorEl.textContent=""}catch(e){this.errorEl.textContent=`Invalid JSON: ${e.message||"Syntax error"}`}}destroy(){this.element.remove()}}class le{static load(i,e){const t=e.target,n=(s,r)=>{for(const a of r){const o=a.children||a.controls;if(a.type==="section"){const h=s.addSection(a.label||"Section",a.collapsed);a.showIf&&h.showIf&&h.showIf(a.showIf),o&&Array.isArray(o)&&n(h,o)}else if(a.type==="row"){const h=s.addRow();o&&Array.isArray(o)&&n(h,o)}else{const h={...a,object:a.object!==void 0?a.object:t};s.createComponent(h)}}};e.controls&&Array.isArray(e.controls)&&n(i,e.controls)}}class ae{constructor(i,e){l(this,"containerEl");this.parentEl=i,this.soundEngine=e,this.containerEl=document.createElement("div"),this.containerEl.className="relly-toast-container",this.parentEl.appendChild(this.containerEl)}notify(i,e="info",t=2600){var h;(h=this.soundEngine)==null||h.playNotify();const n=document.createElement("div");n.className=`relly-toast relly-toast--${e}`;const s=document.createElement("span");s.className="relly-toast-icon",s.innerHTML=this.getIconSvg(e);const r=document.createElement("span");r.className="relly-toast-msg",r.textContent=i;const a=document.createElement("button");a.className="relly-toast-close",a.innerHTML="✕",a.title="Dismiss",n.appendChild(s),n.appendChild(r),n.appendChild(a);const o=()=>{n.classList.contains("relly-toast-leave")||(n.classList.add("relly-toast-leave"),setTimeout(()=>{n.parentElement&&n.parentElement.removeChild(n)},200))};return a.addEventListener("click",c=>{c.stopPropagation(),o()}),n.addEventListener("click",o),this.containerEl.appendChild(n),requestAnimationFrame(()=>{n.classList.add("relly-toast-enter")}),t>0&&setTimeout(o,t),n}getIconSvg(i){switch(i){case"success":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"></polyline></svg>';case"warning":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>';case"error":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>';case"info":default:return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}}destroy(){this.containerEl.parentElement&&this.containerEl.parentElement.removeChild(this.containerEl)}}class oe{constructor(i,e){l(this,"menuEl");l(this,"currentComponent");l(this,"onDocClickBound");l(this,"onKeyDownBound");l(this,"onContextMenu",i=>{let e=i.target,t=e==null?void 0:e.closest(".relly-row, .relly-graph-row");if(!t)return;const n=t.__rellyComponent,s=n==null?void 0:n.getContextMenu();!s||s.length===0||(i.preventDefault(),i.stopPropagation(),this.currentComponent=n,this.show(s,i.clientX,i.clientY))});this.panelEl=i,this.soundEngine=e,this.menuEl=document.createElement("div"),this.menuEl.className="relly-context-menu",this.menuEl.style.display="none",this.panelEl.appendChild(this.menuEl),this.onDocClickBound=t=>{this.menuEl.contains(t.target)||this.hide()},this.onKeyDownBound=t=>{t.key==="Escape"&&this.hide()},typeof window<"u"&&(window.addEventListener("click",this.onDocClickBound),window.addEventListener("keydown",this.onKeyDownBound)),this.panelEl.addEventListener("contextmenu",this.onContextMenu)}show(i,e,t){this.menuEl.innerHTML="";for(const h of i){if(h.separator){const p=document.createElement("div");p.className="relly-context-separator",this.menuEl.appendChild(p);continue}const c=document.createElement("button");c.type="button",c.className="relly-context-item",h.danger&&c.classList.add("relly-context-item--danger"),h.disabled&&(c.disabled=!0);let u="";h.icon&&(u=`<span class="relly-context-icon">${h.icon}</span>`),c.innerHTML=`${u}<span class="relly-context-label">${h.label}</span>`,c.addEventListener("click",p=>{var d;p.stopPropagation(),(d=this.soundEngine)==null||d.playClick(),this.hide(),h.action(this.currentComponent)}),this.menuEl.appendChild(c)}this.menuEl.style.display="flex";const n=this.panelEl.getBoundingClientRect();let s=e-n.left,r=t-n.top;const a=160,o=this.menuEl.offsetHeight||120;s+a>n.width&&(s=Math.max(4,n.width-a-4)),r+o>n.height&&(r=Math.max(4,n.height-o-4)),this.menuEl.style.left=`${s}px`,this.menuEl.style.top=`${r}px`}hide(){this.menuEl.style.display="none",this.currentComponent=void 0}destroy(){typeof window<"u"&&(window.removeEventListener("click",this.onDocClickBound),window.removeEventListener("keydown",this.onKeyDownBound)),this.panelEl.removeEventListener("contextmenu",this.onContextMenu),this.menuEl.parentElement&&this.menuEl.parentElement.removeChild(this.menuEl)}}class he extends S{constructor(e,t,n,s){const r=document.createElement("div");r.className="relly-tab-content";super(r,t,n,s);l(this,"contentEl");l(this,"buttonEl");this.label=e,this.contentEl=r,this.buttonEl=document.createElement("button"),this.buttonEl.className="relly-tab-btn",this.buttonEl.textContent=e}getLabel(){return this.label}setActive(e){e?(this.buttonEl.classList.add("relly-tab-active"),this.contentEl.classList.add("relly-tab-content--active")):(this.buttonEl.classList.remove("relly-tab-active"),this.contentEl.classList.remove("relly-tab-content--active"))}destroy(){this.destroyChildren(),this.buttonEl.remove(),this.contentEl.remove()}}class ce{constructor(i,e,t,n,s){l(this,"barEl");l(this,"bodyEl");l(this,"tabs",[]);l(this,"activeTab",null);this.bindingEngine=t,this.presetManager=n,this.soundEngine=s,this.barEl=document.createElement("div"),this.barEl.className="relly-tabs-bar",this.barEl.style.display="none",this.bodyEl=e,i.insertAdjacentElement("afterend",this.barEl)}addTab(i){this.barEl.style.display="flex";const e=new he(i,this.bindingEngine,this.presetManager,this.soundEngine);return this.tabs.push(e),this.barEl.appendChild(e.buttonEl),this.bodyEl.appendChild(e.contentEl),e.buttonEl.addEventListener("click",()=>{this.switchTab(e)}),this.tabs.length===1&&this.switchTab(e,!1),e}switchTab(i,e=!0){var t;this.activeTab!==i&&e&&((t=this.soundEngine)==null||t.playTab()),this.activeTab=i;for(const n of this.tabs)n.setActive(n===i)}getActiveTab(){return this.activeTab}destroy(){for(const i of this.tabs)i.destroy();this.tabs=[],this.barEl.remove()}}const pe=':root{--relly-bg: #1c1d22;--relly-fg: #d1d5db;--relly-header-bg: #141518;--relly-header-fg: #f3f4f6;--relly-accent: #6366f1;--relly-accent-hover: #4f46e5;--relly-border: rgba(255, 255, 255, .08);--relly-input-bg: #26272e;--relly-input-hover: #2f3039;--relly-radius: 6px;--relly-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--relly-font-size: 11px;--relly-row-height: 26px;--relly-ease: cubic-bezier(.16, 1, .3, 1);--relly-transition: all .2s var(--relly-ease)}.relly-host{position:fixed;z-index:999999;pointer-events:none}.relly-panel{position:fixed;z-index:999999;background-color:var(--relly-bg);color:var(--relly-fg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 10px 25px -5px #00000080,0 8px 10px -6px #0006;font-family:var(--relly-font);font-size:var(--relly-font-size);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden!important;overflow-x:hidden!important;display:flex;flex-direction:column;pointer-events:auto;opacity:1;transform:scale(1) translateY(0);transition:opacity .22s var(--relly-ease),transform .22s var(--relly-ease);min-width:240px;min-height:120px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.relly-panel.relly-mini-hud{width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;border-radius:9999px!important;box-shadow:0 4px 20px #0006,0 0 0 1px var(--relly-accent)}.relly-panel.relly-mini-hud .relly-header{border-bottom:none;padding:5px 12px;border-radius:9999px;background-color:var(--relly-bg)}.relly-panel.relly-mini-hud .relly-body,.relly-panel.relly-mini-hud .relly-search-bar,.relly-panel.relly-mini-hud .relly-tabs-bar,.relly-panel.relly-mini-hud .relly-resize-handle,.relly-panel.relly-mini-hud .relly-header-btn:not(.relly-minihud-btn){display:none!important}.relly-panel.relly-mini-hud .relly-header-title:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background-color:var(--relly-accent);box-shadow:0 0 6px var(--relly-accent);margin-right:6px;animation:relly-pulse 2s infinite ease-in-out}@keyframes relly-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.relly-panel *{box-sizing:border-box}.relly-panel,.relly-panel *,.relly-body,.relly-tabs-bar,.relly-search-bar{scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-panel *::-webkit-scrollbar,.relly-panel::-webkit-scrollbar,.relly-body::-webkit-scrollbar,.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-hidden{opacity:0!important;transform:scale(.95) translateY(-6px)!important;pointer-events:none!important}.relly-header{display:flex;align-items:center;justify-content:space-between;background-color:var(--relly-header-bg);color:var(--relly-header-fg);padding:6px 10px;font-weight:600;border-bottom:1px solid var(--relly-border);cursor:grab;transition:background-color .2s var(--relly-ease);flex-shrink:0}.relly-header:active{cursor:grabbing}.relly-header-title{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.relly-header-title svg{width:14px;height:14px;color:var(--relly-accent);transition:transform .2s var(--relly-ease)}.relly-header-title:hover svg{transform:rotate(15deg)}.relly-header-actions{display:flex;align-items:center;gap:4px}.relly-header-btn{background:transparent;border:none;color:var(--relly-fg);opacity:.7;padding:2px 6px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center;transition:opacity .15s,background-color .15s,transform .1s var(--relly-ease)}.relly-header-btn:hover{opacity:1;background-color:#ffffff1a;transform:scale(1.08)}.relly-header-btn:active{transform:scale(.92)}.relly-resize-handle{position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:se-resize;display:flex;align-items:center;justify-content:center;opacity:.4;transition:opacity .15s var(--relly-ease);z-index:100}.relly-resize-handle svg{width:9px;height:9px;stroke:var(--relly-fg);stroke-width:1.5}.relly-resize-handle:hover{opacity:1}.relly-search-bar{display:flex;align-items:center;padding:4px 8px;background-color:#0003;border-bottom:1px solid var(--relly-border);gap:6px;flex-shrink:0}.relly-search-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-search-input:focus{border-color:var(--relly-accent);background-color:var(--relly-input-hover)}.relly-search-clear{background:none;border:none;color:var(--relly-fg);cursor:pointer;opacity:.5;font-size:10px;padding:0 4px;transition:opacity .15s}.relly-search-clear:hover{opacity:1}.relly-tabs-bar{display:flex;background-color:var(--relly-header-bg);border-bottom:1px solid var(--relly-border);overflow-x:auto;overflow-y:hidden;flex-shrink:0;scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-tab-btn{flex:1;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--relly-fg);opacity:.6;padding:5px 8px;font-family:inherit;font-size:11px;cursor:pointer;white-space:nowrap;transition:all .2s var(--relly-ease)}.relly-tab-btn:hover{opacity:.9;background-color:#ffffff08}.relly-tab-btn.relly-tab-active{opacity:1;color:var(--relly-accent);border-bottom-color:var(--relly-accent)}.relly-tab-content{display:none}.relly-tab-content.relly-tab-content--active{display:flex;flex-direction:column}.relly-body{display:flex;flex-direction:column;overflow-y:auto!important;overflow-x:hidden!important;max-height:80vh;flex:1;transition:max-height .25s var(--relly-ease);scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-body::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-collapsed .relly-body{display:none}.relly-copy-toast{position:absolute;top:36px;right:10px;background:var(--relly-accent);color:#fff;padding:3px 8px;border-radius:4px;font-size:10px;font-weight:600;box-shadow:0 4px 12px #0000004d;pointer-events:none;opacity:0;transform:translateY(-6px);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);z-index:9999999}.relly-copy-toast.relly-toast-show{opacity:1;transform:translateY(0)}.relly-modal-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;display:flex;align-items:center;justify-content:center;padding:12px;opacity:0;pointer-events:none;transition:opacity .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show{opacity:1;pointer-events:auto}.relly-modal{width:100%;max-width:320px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 12px 30px #0009;padding:12px;display:flex;flex-direction:column;gap:8px;transform:scale(.95);transition:transform .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show .relly-modal{transform:scale(1)}.relly-modal-header{display:flex;justify-content:space-between;align-items:center;font-weight:600;color:var(--relly-header-fg);font-size:12px}.relly-dropzone{border:1.5px dashed var(--relly-border);border-radius:4px;padding:12px;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--relly-fg);opacity:.8;font-size:11px;background:#00000026;transition:all .2s var(--relly-ease)}.relly-dropzone:hover,.relly-dropzone.relly-dropzone-drag{border-color:var(--relly-accent);opacity:1;background:#6366f114}.relly-import-textarea{width:100%;height:90px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:monospace;font-size:10px;padding:6px;outline:none;resize:vertical}.relly-import-textarea:focus{border-color:var(--relly-accent)}.relly-import-error{color:#ef4444;font-size:10px;min-height:12px}.relly-modal-actions{display:flex;gap:6px}.relly-btn-primary{background:var(--relly-accent)!important;color:#fff!important;border-color:var(--relly-accent)!important}.relly-btn-primary:hover{background:var(--relly-accent-hover)!important}.relly-toast-container{position:absolute;top:36px;right:8px;display:flex;flex-direction:column;gap:6px;z-index:9999999;pointer-events:none;max-width:240px}.relly-toast{display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-size:11px;box-shadow:0 4px 16px #00000073;pointer-events:auto;opacity:0;transform:translateY(-8px) scale(.96);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);cursor:pointer}.relly-toast.relly-toast-enter{opacity:1;transform:translateY(0) scale(1)}.relly-toast.relly-toast-leave{opacity:0;transform:translateY(-6px) scale(.95)}.relly-toast-icon svg{width:14px;height:14px;display:block}.relly-toast--success{border-left:3px solid #22c55e}.relly-toast--success .relly-toast-icon{color:#22c55e}.relly-toast--warning{border-left:3px solid #f59e0b}.relly-toast--warning .relly-toast-icon{color:#f59e0b}.relly-toast--error{border-left:3px solid #ef4444}.relly-toast--error .relly-toast-icon{color:#ef4444}.relly-toast--info{border-left:3px solid var(--relly-accent)}.relly-toast--info .relly-toast-icon{color:var(--relly-accent)}.relly-toast-msg{flex:1;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.relly-toast-close{background:transparent;border:none;color:var(--relly-fg);opacity:.5;cursor:pointer;padding:0 2px;font-size:11px}.relly-toast-close:hover{opacity:1}.relly-context-menu{position:absolute;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 8px 24px #0000008c;padding:4px;display:flex;flex-direction:column;min-width:140px;z-index:99999999;animation:relly-menu-in .15s var(--relly-ease)}@keyframes relly-menu-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.relly-context-item{display:flex;align-items:center;gap:6px;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:5px 8px;border-radius:3px;cursor:pointer;text-align:left;transition:background-color .12s var(--relly-ease),color .12s}.relly-context-item:hover:not(:disabled){background-color:var(--relly-accent);color:#fff}.relly-context-item:disabled{opacity:.4;cursor:not-allowed}.relly-context-item--danger:hover:not(:disabled){background-color:#ef4444!important;color:#fff!important}.relly-context-separator{height:1px;background-color:var(--relly-border);margin:3px 0}.relly-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--relly-row-height);padding:3px 10px;border-bottom:1px solid var(--relly-border);position:relative;transition:background-color .15s var(--relly-ease),opacity .2s var(--relly-ease)}.relly-row:hover{background-color:#ffffff08}.relly-row.relly-search-hidden{display:none!important}.relly-row-label{flex:0 0 40%;max-width:40%;color:var(--relly-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--relly-font-size);cursor:default;position:relative}.relly-row-control{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}.relly-multi-row{display:flex;align-items:stretch;width:100%;border-bottom:1px solid var(--relly-border)}.relly-multi-row .relly-row{flex:1;border-bottom:none;border-right:1px solid var(--relly-border);padding:3px 6px}.relly-multi-row .relly-row:last-child{border-right:none}.relly-multi-row .relly-row-label{flex:0 0 auto;max-width:none;margin-right:4px}.relly-tooltip{position:absolute;bottom:calc(100% + 4px);left:10px;background-color:#111216;color:#f3f4f6;padding:4px 8px;border-radius:4px;font-size:10px;line-height:1.3;white-space:nowrap;box-shadow:0 4px 12px #00000080;border:1px solid var(--relly-border);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .18s var(--relly-ease),transform .18s var(--relly-ease);z-index:99999999}.relly-row:hover .relly-tooltip{opacity:1;transform:translateY(0)}.relly-checkbox-wrapper{display:flex;align-items:center;cursor:pointer;gap:6px}.relly-checkbox-box{width:16px;height:16px;border-radius:4px;background-color:var(--relly-input-bg);border:1px solid var(--relly-border);display:flex;align-items:center;justify-content:center;transition:background-color .18s var(--relly-ease),border-color .18s var(--relly-ease),transform .15s var(--relly-ease)}.relly-checkbox-wrapper:hover .relly-checkbox-box{border-color:var(--relly-accent);transform:scale(1.05)}.relly-checkbox-wrapper:active .relly-checkbox-box{transform:scale(.95)}.relly-checkbox-wrapper.relly-checked .relly-checkbox-box{background-color:var(--relly-accent);border-color:var(--relly-accent);animation:relly-pop .25s var(--relly-ease)}@keyframes relly-pop{0%{transform:scale(.85)}60%{transform:scale(1.15)}to{transform:scale(1)}}.relly-checkbox-icon{display:none;width:10px;height:10px;stroke:#fff;stroke-width:2.5;fill:none}.relly-checkbox-wrapper.relly-checked .relly-checkbox-icon{display:block}.relly-slider-container{display:flex;align-items:center;gap:8px;width:100%}.relly-slider-range{flex:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:2px;background:var(--relly-input-bg);outline:none;cursor:pointer;transition:background-color .15s var(--relly-ease)}.relly-slider-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:12px;height:12px;border-radius:50%;background:var(--relly-accent);cursor:pointer;box-shadow:0 1px 3px #0000004d;transition:transform .15s var(--relly-ease),background-color .15s}.relly-slider-range::-webkit-slider-thumb:hover{transform:scale(1.25);background:var(--relly-accent-hover)}.relly-slider-range::-webkit-slider-thumb:active{transform:scale(1.35)}.relly-slider-number{width:50px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-slider-number:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-btn{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;font-weight:500;padding:4px 10px;cursor:pointer;transition:background-color .15s var(--relly-ease),border-color .15s,color .15s,transform .1s var(--relly-ease);text-align:center}.relly-btn:hover{background-color:var(--relly-input-hover);border-color:var(--relly-accent);color:#fff;transform:translateY(-1px)}.relly-btn:active{transform:translateY(1px) scale(.98)}.relly-select-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;cursor:pointer;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-select-input:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-dynamic-value{color:var(--relly-accent);font-weight:500;font-family:monospace;font-size:11px;background:#6366f11a;padding:2px 6px;border-radius:4px;border:1px solid rgba(99,102,241,.2);transition:all .2s var(--relly-ease)}.relly-color-wrapper{display:flex;align-items:center;gap:6px;width:100%;justify-content:flex-end}.relly-color-preview{width:20px;height:20px;border-radius:4px;border:1px solid var(--relly-border);cursor:pointer;box-shadow:inset 0 0 2px #0006;transition:transform .15s var(--relly-ease),border-color .15s}.relly-color-preview:hover{transform:scale(1.15);border-color:#fff}.relly-eyedropper-btn{background:transparent;border:none;color:var(--relly-fg);cursor:pointer;opacity:.7;padding:2px 4px;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:opacity .15s var(--relly-ease),transform .1s var(--relly-ease)}.relly-eyedropper-btn svg{width:13px;height:13px}.relly-eyedropper-btn:hover{opacity:1;color:var(--relly-accent);transform:scale(1.15)}.relly-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.relly-color-text{font-family:monospace;font-size:11px;color:var(--relly-fg)}.relly-color-swatches{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin-right:4px}.relly-color-swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(255,255,255,.2);cursor:pointer;padding:0;box-sizing:border-box;transition:transform .12s var(--relly-ease),border-color .12s;box-shadow:inset 0 0 2px #00000059}.relly-color-swatch:hover{transform:scale(1.25);border-color:#fff;z-index:2}.relly-color-swatch.relly-swatch-active{border:1.5px solid #fff;box-shadow:0 0 4px var(--relly-accent)}.relly-point2d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point2d-item{display:flex;align-items:center;gap:2px;flex:1}.relly-point2d-tag{font-size:10px;font-weight:600;color:var(--relly-accent);font-family:monospace}.relly-point2d-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease)}.relly-point2d-input:focus{border-color:var(--relly-accent)}.relly-graph-row{display:flex;flex-direction:column;padding:6px 10px;border-bottom:1px solid var(--relly-border);gap:5px;transition:opacity .2s var(--relly-ease)}.relly-graph-row.relly-search-hidden{display:none!important}.relly-graph-header{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--relly-fg)}.relly-graph-label{font-weight:500;opacity:.85}.relly-graph-stats{display:flex;align-items:center;gap:5px;font-family:monospace;font-size:10px}.relly-graph-badge{opacity:.55;font-size:9px}.relly-graph-badge--paused{opacity:1!important;color:#f59e0b;background:#f59e0b2e;font-weight:700;border-radius:3px;padding:1px 4px;border:1px solid rgba(245,158,11,.4);letter-spacing:.5px}.relly-graph-val{color:var(--relly-accent);font-weight:600;background:#6366f11f;padding:1px 4px;border-radius:3px;border:1px solid rgba(99,102,241,.2)}.relly-graph-legend{display:none;align-items:center;gap:8px;font-size:9px;font-family:monospace;opacity:.75;margin-top:-2px}.relly-graph-legend-item{display:flex;align-items:center;gap:4px}.relly-graph-legend-dot{width:6px;height:6px;border-radius:50%;display:inline-block}.relly-graph-canvas-container{width:100%;height:90px;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);overflow:hidden;position:relative;box-shadow:inset 0 2px 6px #00000040;cursor:crosshair;transition:border-color .2s ease,box-shadow .2s ease}.relly-graph-canvas-container.relly-graph-paused{border-color:#f59e0b;box-shadow:inset 0 2px 6px #00000040,0 0 10px #f59e0b40}.relly-graph-canvas{width:100%;height:100%;display:block}.relly-graph-tooltip{position:absolute;pointer-events:none;background:#0f172aeb;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:1px solid var(--relly-border);border-radius:4px;padding:3px 6px;font-size:9px;font-family:monospace;color:#fff;white-space:nowrap;z-index:10;transform:translate(-50%);opacity:0;transition:opacity .12s ease;box-shadow:0 4px 12px #00000080}.relly-graph-tooltip.relly-tooltip-show{opacity:1}.relly-section{display:flex;flex-direction:column;border-bottom:1px solid var(--relly-border);transition:opacity .2s var(--relly-ease)}.relly-section.relly-search-hidden{display:none!important}.relly-section-header{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;background-color:#ffffff05;cursor:pointer;font-weight:600;color:var(--relly-header-fg);transition:background-color .15s var(--relly-ease)}.relly-section-header:hover{background-color:#ffffff0d}.relly-section-title-wrap{display:flex;align-items:center;gap:6px}.relly-section-arrow{width:12px;height:12px;transition:transform .22s var(--relly-ease);fill:currentColor}.relly-section.relly-section--collapsed .relly-section-arrow{transform:rotate(-90deg)}.relly-section-content{display:flex;flex-direction:column;padding-left:6px;border-left:2px solid var(--relly-accent);transition:opacity .2s var(--relly-ease)}.relly-section.relly-section--collapsed .relly-section-content{display:none}.relly-disabled,.relly-component-row.relly-disabled,.relly-section.relly-disabled{opacity:.42!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important;filter:grayscale(.5)}.relly-jog-scrubbing,.relly-jog-scrubbing *{cursor:ew-resize!important;-webkit-user-select:none!important;user-select:none!important}.relly-mini-sparkline{width:48px;height:16px;display:inline-block;vertical-align:middle;margin-left:6px;border-radius:3px;background:#00000040}.relly-point3d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point3d-item{display:flex;align-items:center;gap:2px;flex:1;min-width:0}.relly-point3d-tag{font-size:9px;font-weight:700;line-height:1;padding:2px 4px;border-radius:3px;text-transform:uppercase}.relly-point3d-tag--x{background-color:#ef444433;color:#ef4444;border:1px solid rgba(239,68,68,.4)}.relly-point3d-tag--y{background-color:#22c55e33;color:#22c55e;border:1px solid rgba(34,197,94,.4)}.relly-point3d-tag--z{background-color:#3b82f633;color:#3b82f6;border:1px solid rgba(59,130,246,.4)}.relly-point3d-input{width:100%;min-width:24px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;cursor:ew-resize}.relly-range-wrapper{display:flex;align-items:center;gap:6px;width:100%}.relly-range-track{flex:1;height:6px;background:var(--relly-input-bg);border-radius:9999px;position:relative;cursor:pointer;box-shadow:inset 0 1px 2px #0000004d}.relly-range-bar{position:absolute;top:0;bottom:0;background:var(--relly-accent);border-radius:9999px;cursor:grab;transition:background-color .15s}.relly-range-bar:active{cursor:grabbing;background:var(--relly-accent-hover)}.relly-range-thumb{position:absolute;top:50%;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid var(--relly-accent);transform:translate(-50%,-50%);cursor:grab;z-index:2;transition:transform .1s var(--relly-ease),box-shadow .15s;box-shadow:0 1px 4px #0006}.relly-range-thumb:hover{transform:translate(-50%,-50%) scale(1.2);box-shadow:0 0 6px var(--relly-accent)}.relly-range-thumb:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.25)}.relly-range-input{width:38px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right}.relly-segmented-container{display:flex;position:relative;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);padding:2px;width:100%;overflow:hidden}.relly-segmented-glider{position:absolute;top:2px;bottom:2px;background:var(--relly-accent);border-radius:3px;box-shadow:0 1px 4px #00000059;transition:transform .2s var(--relly-ease),width .2s var(--relly-ease),opacity .15s;pointer-events:none;z-index:1}.relly-segmented-btn{flex:1;position:relative;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;cursor:pointer;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2;transition:color .15s var(--relly-ease)}.relly-segmented-btn:hover{color:#fff}.relly-segmented-btn.relly-segmented-btn--active{color:#fff;font-weight:600}.relly-status-wrapper{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-end}.relly-status-led{position:relative;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.relly-status-led-core{width:7px;height:7px;border-radius:50%;background-color:#22c55e;position:relative;z-index:2}.relly-status-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;background-color:inherit;opacity:.75;animation:relly-status-pulse 2s cubic-bezier(.24,0,.38,1) infinite;z-index:1}@keyframes relly-status-pulse{0%{transform:scale(.95);opacity:.8}70%{transform:scale(2.4);opacity:0}to{transform:scale(2.4);opacity:0}}.relly-status-led--online .relly-status-led-core,.relly-status-led--online .relly-status-pulse-ring{background-color:#22c55e}.relly-status-led--busy .relly-status-led-core,.relly-status-led--busy .relly-status-pulse-ring{background-color:#f59e0b}.relly-status-led--offline .relly-status-led-core,.relly-status-led--offline .relly-status-pulse-ring{background-color:#ef4444}.relly-status-led--info .relly-status-led-core,.relly-status-led--info .relly-status-pulse-ring{background-color:#3b82f6}.relly-status-led--ready .relly-status-led-core,.relly-status-led--ready .relly-status-pulse-ring{background-color:#a855f7}.relly-status-badge{font-size:10px;font-weight:700;padding:1px 6px;border-radius:9999px;text-transform:uppercase;letter-spacing:.04em;background:#ffffff14}.relly-status-badge--online{color:#22c55e;background:#22c55e26}.relly-status-badge--busy{color:#f59e0b;background:#f59e0b26}.relly-status-badge--offline{color:#ef4444;background:#ef444426}.relly-status-badge--info{color:#3b82f6;background:#3b82f626}.relly-status-badge--ready{color:#a855f7;background:#a855f726}.relly-status-detail{font-size:10px;color:var(--relly-fg);opacity:.7;font-family:monospace}',U="relly-ui-stylesheet";function de(y){const i=y||(typeof document<"u"?document:null);if(!i||"getElementById"in i&&i.getElementById(U)||"querySelector"in i&&i.querySelector(`#${U}`))return;const e=document.createElement("style");e.id=U,e.textContent=pe,"head"in i&&i.head?i.head.appendChild(e):i.appendChild(e)}const L=class L extends S{constructor(e={}){const t=e.shadowDOM!==!1,n=new K,s=new G,r=new se(e.sound!==!1,e.soundPack||"synth"),a=document.createElement("div");a.className="relly-panel";const o=e.width??280;if(a.style.width=typeof o=="number"?`${o}px`:o,e.height){const v=e.height;a.style.height=typeof v=="number"?`${v}px`:v}const h=document.createElement("div");h.className="relly-header";const c=document.createElement("div");c.className="relly-header-title",c.innerHTML=`
|
|
37
|
+
`,this.fileInput=document.createElement("input"),this.fileInput.type="file",this.fileInput.accept=".json,application/json",this.fileInput.style.display="none",this.dropzoneEl.addEventListener("click",()=>this.fileInput.click()),this.fileInput.addEventListener("change",c=>this.handleFileSelect(c)),this.dropzoneEl.addEventListener("dragover",c=>{c.preventDefault(),this.dropzoneEl.classList.add("relly-dropzone-drag")}),this.dropzoneEl.addEventListener("dragleave",()=>{this.dropzoneEl.classList.remove("relly-dropzone-drag")}),this.dropzoneEl.addEventListener("drop",c=>{c.preventDefault(),this.dropzoneEl.classList.remove("relly-dropzone-drag"),c.dataTransfer&&c.dataTransfer.files.length>0&&this.readFile(c.dataTransfer.files[0])}),t.appendChild(this.dropzoneEl),t.appendChild(this.fileInput),this.textareaEl=document.createElement("textarea"),this.textareaEl.className="relly-import-textarea",this.textareaEl.placeholder="Paste JSON configuration here...",t.appendChild(this.textareaEl),this.errorEl=document.createElement("div"),this.errorEl.className="relly-import-error",t.appendChild(this.errorEl);const a=document.createElement("div");a.className="relly-modal-actions";const o=document.createElement("button");o.className="relly-btn",o.textContent="Cancel",o.style.flex="1",o.addEventListener("click",()=>this.hide());const h=document.createElement("button");h.className="relly-btn relly-btn-primary",h.textContent="Apply & Load",h.style.flex="2",h.addEventListener("click",()=>this.apply()),a.appendChild(o),a.appendChild(h),t.appendChild(a),this.element.appendChild(t),this.element.addEventListener("click",c=>{c.target===this.element&&this.hide()}),this.parentEl.appendChild(this.element)}handleFileSelect(i){const e=i.target;e.files&&e.files.length>0&&this.readFile(e.files[0])}readFile(i){const e=new FileReader;e.onload=()=>{typeof e.result=="string"&&(this.textareaEl.value=e.result,this.errorEl.textContent="")},e.readAsText(i)}show(){this.errorEl.textContent="",this.element.classList.add("relly-modal-show"),this.textareaEl.focus()}hide(){this.element.classList.remove("relly-modal-show")}apply(){const i=this.textareaEl.value.trim();if(!i){this.errorEl.textContent="Please paste JSON or drop a file.";return}try{const e=JSON.parse(i);if(typeof e!="object"||e===null)throw new Error("JSON root must be an object.");this.onApply(e),this.hide(),this.textareaEl.value="",this.errorEl.textContent=""}catch(e){this.errorEl.textContent=`Invalid JSON: ${e.message||"Syntax error"}`}}destroy(){this.element.remove()}}class le{static load(i,e){const t=e.target,n=(s,r)=>{for(const a of r){const o=a.children||a.controls;if(a.type==="section"){const h=s.addSection(a.label||"Section",a.collapsed);a.showIf&&h.showIf&&h.showIf(a.showIf),o&&Array.isArray(o)&&n(h,o)}else if(a.type==="row"){const h=s.addRow();o&&Array.isArray(o)&&n(h,o)}else{const h={...a,object:a.object!==void 0?a.object:t};s.createComponent(h)}}};e.controls&&Array.isArray(e.controls)&&n(i,e.controls)}}class ae{constructor(i,e){l(this,"containerEl");this.parentEl=i,this.soundEngine=e,this.containerEl=document.createElement("div"),this.containerEl.className="relly-toast-container",this.parentEl.appendChild(this.containerEl)}notify(i,e="info",t=2600){var h;(h=this.soundEngine)==null||h.playNotify();const n=document.createElement("div");n.className=`relly-toast relly-toast--${e}`;const s=document.createElement("span");s.className="relly-toast-icon",s.innerHTML=this.getIconSvg(e);const r=document.createElement("span");r.className="relly-toast-msg",r.textContent=i;const a=document.createElement("button");a.className="relly-toast-close",a.innerHTML="✕",a.title="Dismiss",n.appendChild(s),n.appendChild(r),n.appendChild(a);const o=()=>{n.classList.contains("relly-toast-leave")||(n.classList.add("relly-toast-leave"),setTimeout(()=>{n.parentElement&&n.parentElement.removeChild(n)},200))};return a.addEventListener("click",c=>{c.stopPropagation(),o()}),n.addEventListener("click",o),this.containerEl.appendChild(n),requestAnimationFrame(()=>{n.classList.add("relly-toast-enter")}),t>0&&setTimeout(o,t),n}getIconSvg(i){switch(i){case"success":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><polyline points="20 6 9 17 4 12"></polyline></svg>';case"warning":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"></path><line x1="12" y1="9" x2="12" y2="13"></line><line x1="12" y1="17" x2="12.01" y2="17"></line></svg>';case"error":return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>';case"info":default:return'<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line></svg>'}}destroy(){this.containerEl.parentElement&&this.containerEl.parentElement.removeChild(this.containerEl)}}class oe{constructor(i,e){l(this,"menuEl");l(this,"currentComponent");l(this,"onDocClickBound");l(this,"onKeyDownBound");l(this,"onContextMenu",i=>{let e=i.target,t=e==null?void 0:e.closest(".relly-row, .relly-graph-row");if(!t)return;const n=t.__rellyComponent,s=n==null?void 0:n.getContextMenu();!s||s.length===0||(i.preventDefault(),i.stopPropagation(),this.currentComponent=n,this.show(s,i.clientX,i.clientY))});this.panelEl=i,this.soundEngine=e,this.menuEl=document.createElement("div"),this.menuEl.className="relly-context-menu",this.menuEl.style.display="none",this.panelEl.appendChild(this.menuEl),this.onDocClickBound=t=>{this.menuEl.contains(t.target)||this.hide()},this.onKeyDownBound=t=>{t.key==="Escape"&&this.hide()},typeof window<"u"&&(window.addEventListener("click",this.onDocClickBound),window.addEventListener("keydown",this.onKeyDownBound)),this.panelEl.addEventListener("contextmenu",this.onContextMenu)}show(i,e,t){this.menuEl.innerHTML="";for(const h of i){if(h.separator){const p=document.createElement("div");p.className="relly-context-separator",this.menuEl.appendChild(p);continue}const c=document.createElement("button");c.type="button",c.className="relly-context-item",h.danger&&c.classList.add("relly-context-item--danger"),h.disabled&&(c.disabled=!0);let u="";h.icon&&(u=`<span class="relly-context-icon">${h.icon}</span>`),c.innerHTML=`${u}<span class="relly-context-label">${h.label}</span>`,c.addEventListener("click",p=>{var f;p.stopPropagation(),(f=this.soundEngine)==null||f.playClick();const d=this.currentComponent;this.hide(),h.action(d)}),this.menuEl.appendChild(c)}this.menuEl.style.display="flex";const n=this.panelEl.getBoundingClientRect();let s=e-n.left,r=t-n.top;const a=160,o=this.menuEl.offsetHeight||120;s+a>n.width&&(s=Math.max(4,n.width-a-4)),r+o>n.height&&(r=Math.max(4,n.height-o-4)),this.menuEl.style.left=`${s}px`,this.menuEl.style.top=`${r}px`}hide(){this.menuEl.style.display="none",this.currentComponent=void 0}destroy(){typeof window<"u"&&(window.removeEventListener("click",this.onDocClickBound),window.removeEventListener("keydown",this.onKeyDownBound)),this.panelEl.removeEventListener("contextmenu",this.onContextMenu),this.menuEl.parentElement&&this.menuEl.parentElement.removeChild(this.menuEl)}}class he extends S{constructor(e,t,n,s){const r=document.createElement("div");r.className="relly-tab-content";super(r,t,n,s);l(this,"contentEl");l(this,"buttonEl");this.label=e,this.contentEl=r,this.buttonEl=document.createElement("button"),this.buttonEl.className="relly-tab-btn",this.buttonEl.textContent=e}getLabel(){return this.label}setActive(e){e?(this.buttonEl.classList.add("relly-tab-active"),this.contentEl.classList.add("relly-tab-content--active")):(this.buttonEl.classList.remove("relly-tab-active"),this.contentEl.classList.remove("relly-tab-content--active"))}destroy(){this.destroyChildren(),this.buttonEl.remove(),this.contentEl.remove()}}class ce{constructor(i,e,t,n,s){l(this,"barEl");l(this,"bodyEl");l(this,"tabs",[]);l(this,"activeTab",null);this.bindingEngine=t,this.presetManager=n,this.soundEngine=s,this.barEl=document.createElement("div"),this.barEl.className="relly-tabs-bar",this.barEl.style.display="none",this.bodyEl=e,i.insertAdjacentElement("afterend",this.barEl)}addTab(i){this.barEl.style.display="flex";const e=new he(i,this.bindingEngine,this.presetManager,this.soundEngine);return this.tabs.push(e),this.barEl.appendChild(e.buttonEl),this.bodyEl.appendChild(e.contentEl),e.buttonEl.addEventListener("click",()=>{this.switchTab(e)}),this.tabs.length===1&&this.switchTab(e,!1),e}switchTab(i,e=!0){var t;this.activeTab!==i&&e&&((t=this.soundEngine)==null||t.playTab()),this.activeTab=i;for(const n of this.tabs)n.setActive(n===i)}getActiveTab(){return this.activeTab}destroy(){for(const i of this.tabs)i.destroy();this.tabs=[],this.barEl.remove()}}const pe=':root{--relly-bg: #1c1d22;--relly-fg: #d1d5db;--relly-header-bg: #141518;--relly-header-fg: #f3f4f6;--relly-accent: #6366f1;--relly-accent-hover: #4f46e5;--relly-border: rgba(255, 255, 255, .08);--relly-input-bg: #26272e;--relly-input-hover: #2f3039;--relly-radius: 6px;--relly-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;--relly-font-size: 11px;--relly-row-height: 26px;--relly-ease: cubic-bezier(.16, 1, .3, 1);--relly-transition: all .2s var(--relly-ease)}.relly-host{position:fixed;z-index:999999;pointer-events:none}.relly-panel{position:fixed;z-index:999999;background-color:var(--relly-bg);color:var(--relly-fg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 10px 25px -5px #00000080,0 8px 10px -6px #0006;font-family:var(--relly-font);font-size:var(--relly-font-size);-webkit-user-select:none;user-select:none;box-sizing:border-box;overflow:hidden!important;overflow-x:hidden!important;display:flex;flex-direction:column;pointer-events:auto;opacity:1;transform:scale(1) translateY(0);transition:opacity .22s var(--relly-ease),transform .22s var(--relly-ease);min-width:240px;min-height:120px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility}.relly-panel.relly-mini-hud{width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;border-radius:9999px!important;box-shadow:0 4px 20px #0006,0 0 0 1px var(--relly-accent)}.relly-panel.relly-mini-hud .relly-header{border-bottom:none;padding:5px 12px;border-radius:9999px;background-color:var(--relly-bg)}.relly-panel.relly-mini-hud .relly-body,.relly-panel.relly-mini-hud .relly-search-bar,.relly-panel.relly-mini-hud .relly-tabs-bar,.relly-panel.relly-mini-hud .relly-resize-handle,.relly-panel.relly-mini-hud .relly-header-btn:not(.relly-minihud-btn){display:none!important}.relly-panel.relly-mini-hud .relly-header-title:before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background-color:var(--relly-accent);box-shadow:0 0 6px var(--relly-accent);margin-right:6px;animation:relly-pulse 2s infinite ease-in-out}@keyframes relly-pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.relly-panel *{box-sizing:border-box}.relly-panel,.relly-panel *,.relly-body,.relly-tabs-bar,.relly-search-bar{scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-panel *::-webkit-scrollbar,.relly-panel::-webkit-scrollbar,.relly-body::-webkit-scrollbar,.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-hidden{opacity:0!important;transform:scale(.95) translateY(-6px)!important;pointer-events:none!important}.relly-header{display:flex;align-items:center;justify-content:space-between;background-color:var(--relly-header-bg);color:var(--relly-header-fg);padding:6px 10px;font-weight:600;border-bottom:1px solid var(--relly-border);cursor:grab;transition:background-color .2s var(--relly-ease);flex-shrink:0}.relly-header:active{cursor:grabbing}.relly-header-title{display:flex;align-items:center;gap:6px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.relly-header-title svg{width:14px;height:14px;color:var(--relly-accent);transition:transform .2s var(--relly-ease)}.relly-header-title:hover svg{transform:rotate(15deg)}.relly-header-actions{display:flex;align-items:center;gap:4px}.relly-header-btn{background:transparent;border:none;color:var(--relly-fg);opacity:.7;padding:2px 6px;border-radius:4px;cursor:pointer;font-family:inherit;font-size:11px;line-height:1;display:flex;align-items:center;justify-content:center;transition:opacity .15s,background-color .15s,transform .1s var(--relly-ease)}.relly-header-btn:hover{opacity:1;background-color:#ffffff1a;transform:scale(1.08)}.relly-header-btn:active{transform:scale(.92)}.relly-resize-handle{position:absolute;bottom:0;right:0;width:14px;height:14px;cursor:se-resize;display:flex;align-items:center;justify-content:center;opacity:.4;transition:opacity .15s var(--relly-ease);z-index:100}.relly-resize-handle svg{width:9px;height:9px;stroke:var(--relly-fg);stroke-width:1.5}.relly-resize-handle:hover{opacity:1}.relly-search-bar{display:flex;align-items:center;padding:4px 8px;background-color:#0003;border-bottom:1px solid var(--relly-border);gap:6px;flex-shrink:0}.relly-search-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-search-input:focus{border-color:var(--relly-accent);background-color:var(--relly-input-hover)}.relly-search-clear{background:none;border:none;color:var(--relly-fg);cursor:pointer;opacity:.5;font-size:10px;padding:0 4px;transition:opacity .15s}.relly-search-clear:hover{opacity:1}.relly-tabs-bar{display:flex;background-color:var(--relly-header-bg);border-bottom:1px solid var(--relly-border);overflow-x:auto;overflow-y:hidden;flex-shrink:0;scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-tabs-bar::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-tab-btn{flex:1;background:transparent;border:none;border-bottom:2px solid transparent;color:var(--relly-fg);opacity:.6;padding:5px 8px;font-family:inherit;font-size:11px;cursor:pointer;white-space:nowrap;transition:all .2s var(--relly-ease)}.relly-tab-btn:hover{opacity:.9;background-color:#ffffff08}.relly-tab-btn.relly-tab-active{opacity:1;color:var(--relly-accent);border-bottom-color:var(--relly-accent)}.relly-tab-content{display:none}.relly-tab-content.relly-tab-content--active{display:flex;flex-direction:column}.relly-body{display:flex;flex-direction:column;overflow-y:auto!important;overflow-x:hidden!important;max-height:80vh;flex:1;transition:max-height .25s var(--relly-ease);scrollbar-width:none!important;-ms-overflow-style:none!important}.relly-body::-webkit-scrollbar{display:none!important;width:0!important;height:0!important}.relly-panel.relly-collapsed .relly-body{display:none}.relly-copy-toast{position:absolute;top:36px;right:10px;background:var(--relly-accent);color:#fff;padding:3px 8px;border-radius:4px;font-size:10px;font-weight:600;box-shadow:0 4px 12px #0000004d;pointer-events:none;opacity:0;transform:translateY(-6px);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);z-index:9999999}.relly-copy-toast.relly-toast-show{opacity:1;transform:translateY(0)}.relly-modal-backdrop{position:absolute;top:0;left:0;width:100%;height:100%;background:#000000b3;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);z-index:999999;display:flex;align-items:center;justify-content:center;padding:12px;opacity:0;pointer-events:none;transition:opacity .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show{opacity:1;pointer-events:auto}.relly-modal{width:100%;max-width:320px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 12px 30px #0009;padding:12px;display:flex;flex-direction:column;gap:8px;transform:scale(.95);transition:transform .2s var(--relly-ease)}.relly-modal-backdrop.relly-modal-show .relly-modal{transform:scale(1)}.relly-modal-header{display:flex;justify-content:space-between;align-items:center;font-weight:600;color:var(--relly-header-fg);font-size:12px}.relly-dropzone{border:1.5px dashed var(--relly-border);border-radius:4px;padding:12px;text-align:center;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:6px;color:var(--relly-fg);opacity:.8;font-size:11px;background:#00000026;transition:all .2s var(--relly-ease)}.relly-dropzone:hover,.relly-dropzone.relly-dropzone-drag{border-color:var(--relly-accent);opacity:1;background:#6366f114}.relly-import-textarea{width:100%;height:90px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:monospace;font-size:10px;padding:6px;outline:none;resize:vertical}.relly-import-textarea:focus{border-color:var(--relly-accent)}.relly-import-error{color:#ef4444;font-size:10px;min-height:12px}.relly-modal-actions{display:flex;gap:6px}.relly-btn-primary{background:var(--relly-accent)!important;color:#fff!important;border-color:var(--relly-accent)!important}.relly-btn-primary:hover{background:var(--relly-accent-hover)!important}.relly-toast-container{position:absolute;top:36px;right:8px;display:flex;flex-direction:column;gap:6px;z-index:9999999;pointer-events:none;max-width:240px}.relly-toast{display:flex;align-items:center;gap:6px;padding:6px 8px;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-size:11px;box-shadow:0 4px 16px #00000073;pointer-events:auto;opacity:0;transform:translateY(-8px) scale(.96);transition:opacity .2s var(--relly-ease),transform .2s var(--relly-ease);cursor:pointer}.relly-toast.relly-toast-enter{opacity:1;transform:translateY(0) scale(1)}.relly-toast.relly-toast-leave{opacity:0;transform:translateY(-6px) scale(.95)}.relly-toast-icon svg{width:14px;height:14px;display:block}.relly-toast--success{border-left:3px solid #22c55e}.relly-toast--success .relly-toast-icon{color:#22c55e}.relly-toast--warning{border-left:3px solid #f59e0b}.relly-toast--warning .relly-toast-icon{color:#f59e0b}.relly-toast--error{border-left:3px solid #ef4444}.relly-toast--error .relly-toast-icon{color:#ef4444}.relly-toast--info{border-left:3px solid var(--relly-accent)}.relly-toast--info .relly-toast-icon{color:var(--relly-accent)}.relly-toast-msg{flex:1;line-height:1.3;overflow:hidden;text-overflow:ellipsis}.relly-toast-close{background:transparent;border:none;color:var(--relly-fg);opacity:.5;cursor:pointer;padding:0 2px;font-size:11px}.relly-toast-close:hover{opacity:1}.relly-context-menu{position:absolute;background:var(--relly-bg);border:1px solid var(--relly-border);border-radius:var(--relly-radius);box-shadow:0 8px 24px #0000008c;padding:4px;display:flex;flex-direction:column;min-width:140px;z-index:99999999;animation:relly-menu-in .15s var(--relly-ease)}@keyframes relly-menu-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.relly-context-item{display:flex;align-items:center;gap:6px;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:5px 8px;border-radius:3px;cursor:pointer;text-align:left;transition:background-color .12s var(--relly-ease),color .12s}.relly-context-item:hover:not(:disabled){background-color:var(--relly-accent);color:#fff}.relly-context-item:disabled{opacity:.4;cursor:not-allowed}.relly-context-item--danger:hover:not(:disabled){background-color:#ef4444!important;color:#fff!important}.relly-context-separator{height:1px;background-color:var(--relly-border);margin:3px 0}.relly-row{display:flex;align-items:center;justify-content:space-between;min-height:var(--relly-row-height);padding:3px 10px;border-bottom:1px solid var(--relly-border);position:relative;transition:background-color .15s var(--relly-ease),opacity .2s var(--relly-ease)}.relly-row:hover{background-color:#ffffff08}.relly-row.relly-search-hidden{display:none!important}.relly-row-label{flex:0 0 40%;max-width:40%;color:var(--relly-fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--relly-font-size);cursor:default;position:relative}.relly-row-control{flex:1;display:flex;align-items:center;justify-content:flex-end;gap:6px;min-width:0}.relly-multi-row{display:flex;align-items:stretch;width:100%;border-bottom:1px solid var(--relly-border)}.relly-multi-row .relly-row{flex:1;border-bottom:none;border-right:1px solid var(--relly-border);padding:3px 6px}.relly-multi-row .relly-row:last-child{border-right:none}.relly-multi-row .relly-row-label{flex:0 0 auto;max-width:none;margin-right:4px}.relly-tooltip{position:absolute;bottom:calc(100% + 4px);left:10px;background-color:#111216;color:#f3f4f6;padding:4px 8px;border-radius:4px;font-size:10px;line-height:1.3;white-space:nowrap;box-shadow:0 4px 12px #00000080;border:1px solid var(--relly-border);pointer-events:none;opacity:0;transform:translateY(4px);transition:opacity .18s var(--relly-ease),transform .18s var(--relly-ease);z-index:99999999}.relly-row:hover .relly-tooltip{opacity:1;transform:translateY(0)}.relly-checkbox-wrapper{display:flex;align-items:center;cursor:pointer;gap:6px}.relly-checkbox-box{width:16px;height:16px;border-radius:4px;background-color:var(--relly-input-bg);border:1px solid var(--relly-border);display:flex;align-items:center;justify-content:center;transition:background-color .18s var(--relly-ease),border-color .18s var(--relly-ease),transform .15s var(--relly-ease)}.relly-checkbox-wrapper:hover .relly-checkbox-box{border-color:var(--relly-accent);transform:scale(1.05)}.relly-checkbox-wrapper:active .relly-checkbox-box{transform:scale(.95)}.relly-checkbox-wrapper.relly-checked .relly-checkbox-box{background-color:var(--relly-accent);border-color:var(--relly-accent);animation:relly-pop .25s var(--relly-ease)}@keyframes relly-pop{0%{transform:scale(.85)}60%{transform:scale(1.15)}to{transform:scale(1)}}.relly-checkbox-icon{display:none;width:10px;height:10px;stroke:#fff;stroke-width:2.5;fill:none}.relly-checkbox-wrapper.relly-checked .relly-checkbox-icon{display:block}.relly-slider-container{display:flex;align-items:center;gap:8px;width:100%}.relly-slider-range{flex:1;-webkit-appearance:none;-moz-appearance:none;appearance:none;height:4px;border-radius:2px;background:var(--relly-input-bg);outline:none;cursor:pointer;transition:background-color .15s var(--relly-ease)}.relly-slider-range::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:12px;height:12px;border-radius:50%;background:var(--relly-accent);cursor:pointer;box-shadow:0 1px 3px #0000004d;transition:transform .15s var(--relly-ease),background-color .15s}.relly-slider-range::-webkit-slider-thumb:hover{transform:scale(1.25);background:var(--relly-accent-hover)}.relly-slider-range::-webkit-slider-thumb:active{transform:scale(1.35)}.relly-slider-number{width:50px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-slider-number:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-btn{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;font-weight:500;padding:4px 10px;cursor:pointer;transition:background-color .15s var(--relly-ease),border-color .15s,color .15s,transform .1s var(--relly-ease);text-align:center}.relly-btn:hover{background-color:var(--relly-input-hover);border-color:var(--relly-accent);color:#fff;transform:translateY(-1px)}.relly-btn:active{transform:translateY(1px) scale(.98)}.relly-select-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;outline:none;cursor:pointer;transition:border-color .15s var(--relly-ease),background-color .15s}.relly-select-input:focus{border-color:var(--relly-accent);background:var(--relly-input-hover)}.relly-dynamic-value{color:var(--relly-accent);font-weight:500;font-family:monospace;font-size:11px;background:#6366f11a;padding:2px 6px;border-radius:4px;border:1px solid rgba(99,102,241,.2);transition:all .2s var(--relly-ease)}.relly-color-wrapper{display:flex;align-items:center;gap:6px;width:100%;justify-content:flex-end}.relly-color-preview{width:20px;height:20px;border-radius:4px;border:1px solid var(--relly-border);cursor:pointer;box-shadow:inset 0 0 2px #0006;transition:transform .15s var(--relly-ease),border-color .15s}.relly-color-preview:hover{transform:scale(1.15);border-color:#fff}.relly-eyedropper-btn{background:transparent;border:none;color:var(--relly-fg);cursor:pointer;opacity:.7;padding:2px 4px;border-radius:4px;display:flex;align-items:center;justify-content:center;transition:opacity .15s var(--relly-ease),transform .1s var(--relly-ease)}.relly-eyedropper-btn svg{width:13px;height:13px}.relly-eyedropper-btn:hover{opacity:1;color:var(--relly-accent);transform:scale(1.15)}.relly-color-native{position:absolute;opacity:0;width:0;height:0;pointer-events:none}.relly-color-text{font-family:monospace;font-size:11px;color:var(--relly-fg)}.relly-color-swatches{display:flex;align-items:center;gap:3px;flex-wrap:wrap;margin-right:4px}.relly-color-swatch{width:14px;height:14px;border-radius:3px;border:1px solid rgba(255,255,255,.2);cursor:pointer;padding:0;box-sizing:border-box;transition:transform .12s var(--relly-ease),border-color .12s;box-shadow:inset 0 0 2px #00000059}.relly-color-swatch:hover{transform:scale(1.25);border-color:#fff;z-index:2}.relly-color-swatch.relly-swatch-active{border:1.5px solid #fff;box-shadow:0 0 4px var(--relly-accent)}.relly-point2d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point2d-item{display:flex;align-items:center;gap:2px;flex:1}.relly-point2d-tag{font-size:10px;font-weight:600;color:var(--relly-accent);font-family:monospace}.relly-point2d-input{width:100%;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:4px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;outline:none;transition:border-color .15s var(--relly-ease)}.relly-point2d-input:focus{border-color:var(--relly-accent)}.relly-graph-row{display:flex;flex-direction:column;padding:6px 10px;border-bottom:1px solid var(--relly-border);gap:5px;transition:opacity .2s var(--relly-ease)}.relly-graph-row.relly-search-hidden{display:none!important}.relly-graph-header{display:flex;align-items:center;justify-content:space-between;font-size:11px;color:var(--relly-fg)}.relly-graph-label{font-weight:500;opacity:.85}.relly-graph-stats{display:flex;align-items:center;gap:5px;font-family:monospace;font-size:10px}.relly-graph-badge{opacity:.55;font-size:9px}.relly-graph-badge--paused{opacity:1!important;color:#f59e0b;background:#f59e0b2e;font-weight:700;border-radius:3px;padding:1px 4px;border:1px solid rgba(245,158,11,.4);letter-spacing:.5px}.relly-graph-val{color:var(--relly-accent);font-weight:600;background:#6366f11f;padding:1px 4px;border-radius:3px;border:1px solid rgba(99,102,241,.2)}.relly-graph-legend{display:none;align-items:center;gap:8px;font-size:9px;font-family:monospace;opacity:.75;margin-top:-2px}.relly-graph-legend-item{display:flex;align-items:center;gap:4px}.relly-graph-legend-dot{width:6px;height:6px;border-radius:50%;display:inline-block}.relly-graph-canvas-container{width:100%;height:90px;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);overflow:hidden;position:relative;box-shadow:inset 0 2px 6px #00000040;cursor:crosshair;transition:border-color .2s ease,box-shadow .2s ease}.relly-graph-canvas-container.relly-graph-paused{border-color:#f59e0b;box-shadow:inset 0 2px 6px #00000040,0 0 10px #f59e0b40}.relly-graph-canvas{width:100%;height:100%;display:block}.relly-graph-tooltip{position:absolute;pointer-events:none;background:#0f172aeb;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);border:1px solid var(--relly-border);border-radius:4px;padding:3px 6px;font-size:9px;font-family:monospace;color:#fff;white-space:nowrap;z-index:10;transform:translate(-50%);opacity:0;transition:opacity .12s ease;box-shadow:0 4px 12px #00000080}.relly-graph-tooltip.relly-tooltip-show{opacity:1}.relly-section{display:flex;flex-direction:column;border-bottom:1px solid var(--relly-border);transition:opacity .2s var(--relly-ease)}.relly-section.relly-search-hidden{display:none!important}.relly-section-header{display:flex;align-items:center;justify-content:space-between;padding:5px 10px;background-color:#ffffff05;cursor:pointer;font-weight:600;color:var(--relly-header-fg);transition:background-color .15s var(--relly-ease)}.relly-section-header:hover{background-color:#ffffff0d}.relly-section-title-wrap{display:flex;align-items:center;gap:6px}.relly-section-arrow{width:12px;height:12px;transition:transform .22s var(--relly-ease);fill:currentColor}.relly-section.relly-section--collapsed .relly-section-arrow{transform:rotate(-90deg)}.relly-section-content{display:flex;flex-direction:column;padding-left:6px;border-left:2px solid var(--relly-accent);transition:opacity .2s var(--relly-ease)}.relly-section.relly-section--collapsed .relly-section-content{display:none}.relly-disabled,.relly-component-row.relly-disabled,.relly-section.relly-disabled{opacity:.42!important;pointer-events:none!important;-webkit-user-select:none!important;user-select:none!important;filter:grayscale(.5)}.relly-jog-scrubbing,.relly-jog-scrubbing *{cursor:ew-resize!important;-webkit-user-select:none!important;user-select:none!important}.relly-mini-sparkline{width:48px;height:16px;display:inline-block;vertical-align:middle;margin-left:6px;border-radius:3px;background:#00000040}.relly-point3d-container{display:flex;align-items:center;gap:4px;width:100%}.relly-point3d-item{display:flex;align-items:center;gap:2px;flex:1;min-width:0}.relly-point3d-tag{font-size:9px;font-weight:700;line-height:1;padding:2px 4px;border-radius:3px;text-transform:uppercase}.relly-point3d-tag--x{background-color:#ef444433;color:#ef4444;border:1px solid rgba(239,68,68,.4)}.relly-point3d-tag--y{background-color:#22c55e33;color:#22c55e;border:1px solid rgba(34,197,94,.4)}.relly-point3d-tag--z{background-color:#3b82f633;color:#3b82f6;border:1px solid rgba(59,130,246,.4)}.relly-point3d-input{width:100%;min-width:24px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right;cursor:ew-resize}.relly-range-wrapper{display:flex;align-items:center;gap:6px;width:100%}.relly-range-track{flex:1;height:6px;background:var(--relly-input-bg);border-radius:9999px;position:relative;cursor:pointer;box-shadow:inset 0 1px 2px #0000004d}.relly-range-bar{position:absolute;top:0;bottom:0;background:var(--relly-accent);border-radius:9999px;cursor:grab;transition:background-color .15s}.relly-range-bar:active{cursor:grabbing;background:var(--relly-accent-hover)}.relly-range-thumb{position:absolute;top:50%;width:12px;height:12px;border-radius:50%;background:#fff;border:2px solid var(--relly-accent);transform:translate(-50%,-50%);cursor:grab;z-index:2;transition:transform .1s var(--relly-ease),box-shadow .15s;box-shadow:0 1px 4px #0006}.relly-range-thumb:hover{transform:translate(-50%,-50%) scale(1.2);box-shadow:0 0 6px var(--relly-accent)}.relly-range-thumb:active{cursor:grabbing;transform:translate(-50%,-50%) scale(1.25)}.relly-range-input{width:38px;background:var(--relly-input-bg);border:1px solid var(--relly-border);border-radius:3px;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:2px 4px;text-align:right}.relly-segmented-container{display:flex;position:relative;background:var(--relly-input-bg);border-radius:4px;border:1px solid var(--relly-border);padding:2px;width:100%;overflow:hidden}.relly-segmented-glider{position:absolute;top:2px;bottom:2px;background:var(--relly-accent);border-radius:3px;box-shadow:0 1px 4px #00000059;transition:transform .2s var(--relly-ease),width .2s var(--relly-ease),opacity .15s;pointer-events:none;z-index:1}.relly-segmented-btn{flex:1;position:relative;background:transparent;border:none;color:var(--relly-fg);font-family:inherit;font-size:11px;padding:3px 6px;cursor:pointer;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;z-index:2;transition:color .15s var(--relly-ease)}.relly-segmented-btn:hover{color:#fff}.relly-segmented-btn.relly-segmented-btn--active{color:#fff;font-weight:600}.relly-status-wrapper{display:flex;align-items:center;gap:8px;width:100%;justify-content:flex-end}.relly-status-led{position:relative;width:8px;height:8px;display:flex;align-items:center;justify-content:center}.relly-status-led-core{width:7px;height:7px;border-radius:50%;background-color:#22c55e;position:relative;z-index:2}.relly-status-pulse-ring{position:absolute;width:100%;height:100%;border-radius:50%;background-color:inherit;opacity:.75;animation:relly-status-pulse 2s cubic-bezier(.24,0,.38,1) infinite;z-index:1}@keyframes relly-status-pulse{0%{transform:scale(.95);opacity:.8}70%{transform:scale(2.4);opacity:0}to{transform:scale(2.4);opacity:0}}.relly-status-led--online .relly-status-led-core,.relly-status-led--online .relly-status-pulse-ring{background-color:#22c55e}.relly-status-led--busy .relly-status-led-core,.relly-status-led--busy .relly-status-pulse-ring{background-color:#f59e0b}.relly-status-led--offline .relly-status-led-core,.relly-status-led--offline .relly-status-pulse-ring{background-color:#ef4444}.relly-status-led--info .relly-status-led-core,.relly-status-led--info .relly-status-pulse-ring{background-color:#3b82f6}.relly-status-led--ready .relly-status-led-core,.relly-status-led--ready .relly-status-pulse-ring{background-color:#a855f7}.relly-status-badge{font-size:10px;font-weight:700;padding:1px 6px;border-radius:9999px;text-transform:uppercase;letter-spacing:.04em;background:#ffffff14}.relly-status-badge--online{color:#22c55e;background:#22c55e26}.relly-status-badge--busy{color:#f59e0b;background:#f59e0b26}.relly-status-badge--offline{color:#ef4444;background:#ef444426}.relly-status-badge--info{color:#3b82f6;background:#3b82f626}.relly-status-badge--ready{color:#a855f7;background:#a855f726}.relly-status-detail{font-size:10px;color:var(--relly-fg);opacity:.7;font-family:monospace}',U="relly-ui-stylesheet";function de(y){const i=y||(typeof document<"u"?document:null);if(!i||"getElementById"in i&&i.getElementById(U)||"querySelector"in i&&i.querySelector(`#${U}`))return;const e=document.createElement("style");e.id=U,e.textContent=pe,"head"in i&&i.head?i.head.appendChild(e):i.appendChild(e)}const L=class L extends S{constructor(e={}){const t=e.shadowDOM!==!1,n=new K,s=new G,r=new se(e.sound!==!1,e.soundPack||"synth"),a=document.createElement("div");a.className="relly-panel";const o=e.width??280;if(a.style.width=typeof o=="number"?`${o}px`:o,e.height){const v=e.height;a.style.height=typeof v=="number"?`${v}px`:v}const h=document.createElement("div");h.className="relly-header";const c=document.createElement("div");c.className="relly-header-title",c.innerHTML=`
|
|
38
38
|
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
39
39
|
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
|
|
40
40
|
<line x1="3" y1="9" x2="21" y2="9"></line>
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
|
46
46
|
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
|
47
47
|
</svg>
|
|
48
|
-
`,p.appendChild(d);const
|
|
48
|
+
`,p.appendChild(d);const f=document.createElement("button");f.className="relly-header-btn",f.title="Import settings from JSON",f.innerHTML=`
|
|
49
49
|
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
50
50
|
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
|
51
51
|
<polyline points="7 10 12 15 17 10"></polyline>
|
|
52
52
|
<line x1="12" y1="15" x2="12" y2="3"></line>
|
|
53
53
|
</svg>
|
|
54
|
-
`,p.appendChild(g);const b=document.createElement("button");b.className="relly-header-btn relly-minihud-btn",b.title="Toggle Mini-HUD pill (or double-click header)",b.textContent="⤢",p.appendChild(b);const m=document.createElement("button");m.className="relly-header-btn",m.title="Collapse/Expand",m.textContent="_",p.appendChild(m),h.appendChild(c),h.appendChild(p),a.appendChild(h);const w=document.createElement("div");w.className="relly-copy-toast",w.textContent="JSON Copied!",a.appendChild(w);const C=document.createElement("div");C.className="relly-body",e.height&&(C.style.maxHeight="none",C.style.flex="1"),a.appendChild(C);super(C,n,s,r);l(this,"hostEl");l(this,"shadowRoot",null);l(this,"panelEl");l(this,"headerEl");l(this,"titleEl");l(this,"collapseBtn");l(this,"copyToastEl");l(this,"themeManager");l(this,"soundEngine");l(this,"draggableInstance");l(this,"resizableInstance");l(this,"hotkeyInstance");l(this,"searchBarInstance");l(this,"tabsManagerInstance");l(this,"importModalInstance");l(this,"toastManager");l(this,"contextMenuManager");l(this,"isPanelCollapsed",!1);l(this,"isPanelHidden",!1);l(this,"isMiniHud",!1);l(this,"ghostOnIdle",!1);l(this,"idleOpacity",.38);l(this,"onResizeBound");l(this,"autoSave",!1);l(this,"autoSaveKey","relly-ui-session");l(this,"autoSaveTimeout",null);l(this,"sparklineCtx");l(this,"sparklineData",[12,14,15,18,16,20,22,21,24,25,28,30]);l(this,"sparklineAnimId");this.panelEl=a,this.headerEl=h,this.titleEl=u,this.collapseBtn=m,this.copyToastEl=w,this.soundEngine=r,this.onResizeBound=()=>this.clampToViewport(),e.searchBar&&(this.searchBarInstance=new ne(C,e.searchOptions),h.insertAdjacentElement("afterend",this.searchBarInstance.element)),this.themeManager=new O(this.panelEl,e.theme),this.mount(e,t),e.autoInjectStyles!==!1&&(this.shadowRoot?de(this.shadowRoot):de()),e.draggable!==!1&&(this.draggableInstance=new ee(this.headerEl,this.panelEl,this.soundEngine)),e.resizable!==!1&&(this.resizableInstance=new te(this.panelEl)),this.toastManager=new ae(this.panelEl,this.soundEngine),this.contextMenuManager=new oe(this.panelEl,this.soundEngine),this.importModalInstance=new re(this.panelEl,v=>{this.importJSON(v)});const f=e.hotkey===void 0?"KeyH":e.hotkey;f&&(this.hotkeyInstance=new ie(f,()=>{this.toggle()})),b.addEventListener("click",v=>{v.stopPropagation(),this.toggleMiniHud()}),this.headerEl.addEventListener("dblclick",v=>{v.target.closest(".relly-header-btn")||this.toggleMiniHud()}),this.collapseBtn.addEventListener("click",v=>{v.stopPropagation(),this.soundEngine.playClick(),this.toggleCollapse()}),d.addEventListener("click",v=>{v.stopPropagation(),this.soundEngine.playClick(),this.copyJSON()}),g.addEventListener("click",v=>{var M;v.stopPropagation(),this.soundEngine.playClick(),(M=this.importModalInstance)==null||M.show()}),e.soundVolume!==void 0&&this.soundEngine.setVolume(e.soundVolume),e.accordion&&this.setAccordion(!0),e.ghostOnIdle&&this.setGhostMode(!0,e.idleOpacity),this.initSparkline(c),this.panelEl.addEventListener("mouseenter",()=>{this.ghostOnIdle&&(this.panelEl.style.opacity="1")}),this.panelEl.addEventListener("mouseleave",()=>{this.ghostOnIdle&&(this.panelEl.style.opacity=`${this.idleOpacity}`)}),e.collapsed&&this.setCollapsed(!0),this.autoSave=e.autoSave??!1,this.autoSaveKey=e.autoSaveKey??"relly-ui-session",this.presetManager.setOnChange(()=>{this.autoSave&&this.queueAutoSave()}),this.panelEl.addEventListener("mouseup",()=>{this.autoSave&&this.queueAutoSave()}),this.autoSave&&this.loadSession()}mount(e,t){if(typeof document>"u")return;const n=e.position||{};this.panelEl.style.top=n.top!==void 0?`${n.top}px`:"20px",n.left!==void 0?this.panelEl.style.left=`${n.left}px`:this.panelEl.style.right=n.right!==void 0?`${n.right}px`:"20px",n.bottom!==void 0&&(this.panelEl.style.bottom=`${n.bottom}px`);const s=e.container?typeof e.container=="string"?document.querySelector(e.container):e.container:document.body;if(s){if(t&&typeof s.attachShadow=="function"){const r=document.createElement("div");r.className="relly-host",this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.shadowRoot.appendChild(this.panelEl),s.appendChild(r)}else s.appendChild(this.panelEl),e.container&&(this.panelEl.style.position="relative");typeof window<"u"&&(window.addEventListener("resize",this.onResizeBound),setTimeout(()=>{this.clampToViewport()},0))}}addTab(e){return this.tabsManagerInstance||(this.tabsManagerInstance=new ce(this.headerEl,this.contentEl,this.bindingEngine,this.presetManager,this.soundEngine)),this.tabsManagerInstance.addTab(e)}createTab(e){return this.addTab(e)}copyJSON(){const e=this.export(),t=JSON.stringify(e,null,2);return typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(t).catch(()=>{}),this.copyToastEl.textContent="JSON Copied!",this.copyToastEl.classList.add("relly-toast-show"),this.soundEngine.playNotify(),setTimeout(()=>{this.copyToastEl.classList.remove("relly-toast-show")},1500),t}notify(e,t="info",n=2600){return this.toastManager.notify(e,t,n)}getToastManager(){return this.toastManager}getContextMenuManager(){return this.contextMenuManager}importJSON(e){try{const t=typeof e=="string"?JSON.parse(e):e;this.import(t),this.copyToastEl.textContent="JSON Loaded!",this.copyToastEl.classList.add("relly-toast-show"),this.soundEngine.playNotify(),setTimeout(()=>{this.copyToastEl.classList.remove("relly-toast-show")},1500)}catch(t){console.warn("[RellyUI] Failed to import JSON",t)}return this}loadSchema(e){return e.title&&this.setTitle(e.title),le.load(this,e),this}setTitle(e){return this.titleEl.textContent=e,this}setTheme(e){return this.themeManager.applyTheme(e),this.autoSave&&this.queueAutoSave(),this}setSoundPack(e){return this.soundEngine.setSoundPack(e),this}getSoundPack(){return this.soundEngine.getSoundPack()}getSoundEngine(){return this.soundEngine}toggleMiniHud(){return this.setMiniHud(!this.isMiniHud)}setMiniHud(e){return this.isMiniHud=e,this.isMiniHud?(this.panelEl.classList.add("relly-mini-hud"),this.soundEngine.playMiniHud(!0)):(this.panelEl.classList.remove("relly-mini-hud"),this.soundEngine.playMiniHud(!1),this.clampToViewport()),this.autoSave&&this.queueAutoSave(),this}isMiniHudMode(){return this.isMiniHud}setGhostMode(e,t=.38){return this.ghostOnIdle=e,this.idleOpacity=Math.max(.05,Math.min(1,t)),this.panelEl.style.opacity=e?`${this.idleOpacity}`:"1",this}isGhostMode(){return this.ghostOnIdle}setSoundVolume(e){return this.soundEngine.setVolume(e),this}getSoundVolume(){return this.soundEngine.getVolume()}initSparkline(e){const t=document.createElement("canvas");t.className="relly-mini-sparkline",t.width=48,t.height=16,e.appendChild(t),this.sparklineCtx=t.getContext("2d");const n=()=>{this.isMiniHud&&this.sparklineCtx&&this.drawSparkline(),typeof requestAnimationFrame<"u"&&(this.sparklineAnimId=requestAnimationFrame(n))};typeof requestAnimationFrame<"u"&&(this.sparklineAnimId=requestAnimationFrame(n))}drawSparkline(){const e=this.sparklineCtx;if(!e)return;const t=48,n=16;e.clearRect(0,0,t,n);const s=this.sparklineData[this.sparklineData.length-1],r=Math.max(8,Math.min(26,s+(Math.random()-.48)*3));this.sparklineData.push(r),this.sparklineData.length>14&&this.sparklineData.shift();const a=Math.min(...this.sparklineData)-1,h=Math.max(...this.sparklineData)+1-a||1,c=t/(this.sparklineData.length-1);e.beginPath(),e.moveTo(0,n);for(let u=0;u<this.sparklineData.length;u++){const p=u*c,d=n-(this.sparklineData[u]-a)/h*(n-2)-1;e.lineTo(p,d)}e.lineTo(t,n),e.closePath(),e.fillStyle="rgba(56, 189, 248, 0.25)",e.fill(),e.beginPath();for(let u=0;u<this.sparklineData.length;u++){const p=u*c,d=n-(this.sparklineData[u]-a)/h*(n-2)-1;u===0?e.moveTo(p,d):e.lineTo(p,d)}e.strokeStyle="#38bdf8",e.lineWidth=1.4,e.stroke()}clampToViewport(){var e,t;return(e=this.draggableInstance)==null||e.clampToViewport(),(t=this.resizableInstance)==null||t.clampToViewport(),this}toggleCollapse(){return this.setCollapsed(!this.isPanelCollapsed)}setCollapsed(e){return this.isPanelCollapsed=e,this.isPanelCollapsed?(this.panelEl.classList.add("relly-collapsed"),this.collapseBtn.textContent="+",this.bindingEngine.pause()):(this.panelEl.classList.remove("relly-collapsed"),this.collapseBtn.textContent="_",this.bindingEngine.resume()),this.autoSave&&this.queueAutoSave(),this}queueAutoSave(){this.autoSave&&(this.autoSaveTimeout&&clearTimeout(this.autoSaveTimeout),this.autoSaveTimeout=setTimeout(()=>{this.saveSession()},250))}saveSession(e){if(typeof window>"u"||!window.localStorage)return;const t=e||this.autoSaveKey;try{const n={left:this.panelEl.style.left?parseFloat(this.panelEl.style.left):void 0,top:this.panelEl.style.top?parseFloat(this.panelEl.style.top):void 0,right:this.panelEl.style.right?parseFloat(this.panelEl.style.right):void 0,bottom:this.panelEl.style.bottom?parseFloat(this.panelEl.style.bottom):void 0},s={version:L.version,timestamp:Date.now(),isCollapsed:this.isPanelCollapsed,isMiniHud:this.isMiniHud,theme:this.themeManager.getCurrentThemeName(),position:n,width:this.panelEl.style.width,height:this.panelEl.style.height,components:this.presetManager.export()};window.localStorage.setItem(t,JSON.stringify(s))}catch(n){console.warn("[RellyUI] Failed to save session",n)}}loadSession(e){if(typeof window>"u"||!window.localStorage)return!1;const t=e||this.autoSaveKey;try{const n=window.localStorage.getItem(t);if(!n)return!1;const s=JSON.parse(n);return!s||typeof s!="object"?!1:(s.position&&(s.position.left!==void 0?(this.panelEl.style.left=`${s.position.left}px`,this.panelEl.style.right=""):s.position.right!==void 0&&(this.panelEl.style.right=`${s.position.right}px`,this.panelEl.style.left=""),s.position.top!==void 0?(this.panelEl.style.top=`${s.position.top}px`,this.panelEl.style.bottom=""):s.position.bottom!==void 0&&(this.panelEl.style.bottom=`${s.position.bottom}px`,this.panelEl.style.top="")),s.width&&(this.panelEl.style.width=s.width),s.height&&(this.panelEl.style.height=s.height),s.theme&&s.theme!=="custom"&&this.setTheme(s.theme),s.isCollapsed!==void 0&&s.isCollapsed!==this.isPanelCollapsed&&this.setCollapsed(s.isCollapsed),s.isMiniHud!==void 0&&s.isMiniHud!==this.isMiniHud&&this.setMiniHud(s.isMiniHud),s.components&&this.presetManager.import(s.components),!0)}catch(n){return console.warn("[RellyUI] Failed to load session",n),!1}}clearSession(e){if(typeof window>"u"||!window.localStorage)return;const t=e||this.autoSaveKey;try{window.localStorage.removeItem(t)}catch{}}setAutoSave(e,t){return this.autoSave=e,t&&(this.autoSaveKey=t),this.autoSave&&this.loadSession(),this}toggle(){return this.isPanelHidden?this.show():this.hide()}show(){return this.isPanelHidden=!1,this.panelEl.classList.remove("relly-hidden"),this.isPanelCollapsed||this.bindingEngine.resume(),this}hide(){return this.isPanelHidden=!0,this.panelEl.classList.add("relly-hidden"),this.bindingEngine.pause(),this}save(e){return this.presetManager.save(e),this}load(e){return this.presetManager.load(e),this}export(){return this.presetManager.export()}import(e){return this.presetManager.import(e),this}getElement(){return this.panelEl}getShadowRoot(){return this.shadowRoot}getHost(){return this.hostEl||null}destroy(){typeof window<"u"&&(window.removeEventListener("resize",this.onResizeBound),this.sparklineAnimId&&cancelAnimationFrame(this.sparklineAnimId)),this.draggableInstance&&this.draggableInstance.destroy(),this.resizableInstance&&this.resizableInstance.destroy(),this.hotkeyInstance&&this.hotkeyInstance.destroy(),this.searchBarInstance&&this.searchBarInstance.destroy(),this.tabsManagerInstance&&this.tabsManagerInstance.destroy(),this.importModalInstance&&this.importModalInstance.destroy(),this.toastManager.destroy(),this.contextMenuManager.destroy(),this.bindingEngine.destroy(),this.destroyChildren(),this.hostEl?this.hostEl.remove():this.panelEl.remove()}};l(L,"version","1.0.0");let I=L;return Object.assign(I,{Checkbox:E,Slider:k,Button:V,Select:A,DynamicLabel:z,Graph:B,ColorPicker:N,Point2D:R,Point3D:P,RangeSlider:D,Segmented:H,StatusIndicator:j,Section:F,Row:$,Tab:he,TabsManager:ce,BaseComponent:x,BindingEngine:K,PresetManager:G,ThemeManager:O,DARK_THEME:q,LIGHT_THEME:W,CYBERPUNK_THEME:X,NORD_THEME:J,DRACULA_THEME:Y,TOKYO_NIGHT_THEME:_,MATRIX_THEME:Q,SYNTHWAVE_THEME:Z,Draggable:ee,Resizable:te,HotkeyManager:ie,SearchBar:ne,SoundEngine:se,ImportModal:re,ToastManager:ae,ContextMenuManager:oe,SchemaLoader:le,ContainerHelper:S,RellyUI:I}),I}));
|
|
54
|
+
`,p.appendChild(f);const b=document.createElement("button");b.className="relly-header-btn relly-minihud-btn",b.title="Toggle Mini-HUD pill (or double-click header)",b.textContent="⤢",p.appendChild(b);const m=document.createElement("button");m.className="relly-header-btn",m.title="Collapse/Expand",m.textContent="_",p.appendChild(m),h.appendChild(c),h.appendChild(p),a.appendChild(h);const w=document.createElement("div");w.className="relly-copy-toast",w.textContent="JSON Copied!",a.appendChild(w);const C=document.createElement("div");C.className="relly-body",e.height&&(C.style.maxHeight="none",C.style.flex="1"),a.appendChild(C);super(C,n,s,r);l(this,"hostEl");l(this,"shadowRoot",null);l(this,"panelEl");l(this,"headerEl");l(this,"titleEl");l(this,"collapseBtn");l(this,"copyToastEl");l(this,"themeManager");l(this,"soundEngine");l(this,"draggableInstance");l(this,"resizableInstance");l(this,"hotkeyInstance");l(this,"searchBarInstance");l(this,"tabsManagerInstance");l(this,"importModalInstance");l(this,"toastManager");l(this,"contextMenuManager");l(this,"isPanelCollapsed",!1);l(this,"isPanelHidden",!1);l(this,"isMiniHud",!1);l(this,"ghostOnIdle",!1);l(this,"idleOpacity",.38);l(this,"onResizeBound");l(this,"autoSave",!1);l(this,"autoSaveKey","relly-ui-session");l(this,"autoSaveTimeout",null);l(this,"sparklineCtx");l(this,"sparklineData",[12,14,15,18,16,20,22,21,24,25,28,30]);l(this,"sparklineAnimId");this.panelEl=a,this.headerEl=h,this.titleEl=u,this.collapseBtn=m,this.copyToastEl=w,this.soundEngine=r,this.onResizeBound=()=>this.clampToViewport(),e.searchBar&&(this.searchBarInstance=new ne(C,e.searchOptions),h.insertAdjacentElement("afterend",this.searchBarInstance.element)),this.themeManager=new O(this.panelEl,e.theme),this.mount(e,t),e.autoInjectStyles!==!1&&(this.shadowRoot?de(this.shadowRoot):de()),e.draggable!==!1&&(this.draggableInstance=new ee(this.headerEl,this.panelEl,this.soundEngine)),e.resizable!==!1&&(this.resizableInstance=new te(this.panelEl)),this.toastManager=new ae(this.panelEl,this.soundEngine),this.contextMenuManager=new oe(this.panelEl,this.soundEngine),this.importModalInstance=new re(this.panelEl,v=>{this.importJSON(v)});const g=e.hotkey===void 0?"KeyH":e.hotkey;g&&(this.hotkeyInstance=new ie(g,()=>{this.toggle()})),b.addEventListener("click",v=>{v.stopPropagation(),this.toggleMiniHud()}),this.headerEl.addEventListener("dblclick",v=>{v.target.closest(".relly-header-btn")||this.toggleMiniHud()}),this.collapseBtn.addEventListener("click",v=>{v.stopPropagation(),this.soundEngine.playClick(),this.toggleCollapse()}),d.addEventListener("click",v=>{v.stopPropagation(),this.soundEngine.playClick(),this.copyJSON()}),f.addEventListener("click",v=>{var M;v.stopPropagation(),this.soundEngine.playClick(),(M=this.importModalInstance)==null||M.show()}),e.soundVolume!==void 0&&this.soundEngine.setVolume(e.soundVolume),e.accordion&&this.setAccordion(!0),e.ghostOnIdle&&this.setGhostMode(!0,e.idleOpacity),this.initSparkline(c),this.panelEl.addEventListener("mouseenter",()=>{this.ghostOnIdle&&(this.panelEl.style.opacity="1")}),this.panelEl.addEventListener("mouseleave",()=>{this.ghostOnIdle&&(this.panelEl.style.opacity=`${this.idleOpacity}`)}),e.collapsed&&this.setCollapsed(!0),this.autoSave=e.autoSave??!1,this.autoSaveKey=e.autoSaveKey??"relly-ui-session",this.presetManager.setOnChange(()=>{this.autoSave&&this.queueAutoSave()}),this.panelEl.addEventListener("mouseup",()=>{this.autoSave&&this.queueAutoSave()}),this.autoSave&&this.loadSession()}mount(e,t){if(typeof document>"u")return;const n=e.position||{};this.panelEl.style.top=n.top!==void 0?`${n.top}px`:"20px",n.left!==void 0?this.panelEl.style.left=`${n.left}px`:this.panelEl.style.right=n.right!==void 0?`${n.right}px`:"20px",n.bottom!==void 0&&(this.panelEl.style.bottom=`${n.bottom}px`);const s=e.container?typeof e.container=="string"?document.querySelector(e.container):e.container:document.body;if(s){if(t&&typeof s.attachShadow=="function"){const r=document.createElement("div");r.className="relly-host",this.hostEl=r,this.shadowRoot=r.attachShadow({mode:"open"}),this.shadowRoot.appendChild(this.panelEl),s.appendChild(r)}else s.appendChild(this.panelEl),e.container&&(this.panelEl.style.position="relative");typeof window<"u"&&(window.addEventListener("resize",this.onResizeBound),setTimeout(()=>{this.clampToViewport()},0))}}addTab(e){return this.tabsManagerInstance||(this.tabsManagerInstance=new ce(this.headerEl,this.contentEl,this.bindingEngine,this.presetManager,this.soundEngine)),this.tabsManagerInstance.addTab(e)}createTab(e){return this.addTab(e)}copyJSON(){const e=this.export(),t=JSON.stringify(e,null,2);return typeof navigator<"u"&&navigator.clipboard&&navigator.clipboard.writeText(t).catch(()=>{}),this.copyToastEl.textContent="JSON Copied!",this.copyToastEl.classList.add("relly-toast-show"),this.soundEngine.playNotify(),setTimeout(()=>{this.copyToastEl.classList.remove("relly-toast-show")},1500),t}notify(e,t="info",n=2600){return this.toastManager.notify(e,t,n)}getToastManager(){return this.toastManager}getContextMenuManager(){return this.contextMenuManager}importJSON(e){try{const t=typeof e=="string"?JSON.parse(e):e;this.import(t),this.copyToastEl.textContent="JSON Loaded!",this.copyToastEl.classList.add("relly-toast-show"),this.soundEngine.playNotify(),setTimeout(()=>{this.copyToastEl.classList.remove("relly-toast-show")},1500)}catch(t){console.warn("[RellyUI] Failed to import JSON",t)}return this}loadSchema(e){return e.title&&this.setTitle(e.title),le.load(this,e),this}setTitle(e){return this.titleEl.textContent=e,this}setTheme(e){return this.themeManager.applyTheme(e),this.autoSave&&this.queueAutoSave(),this}setSoundPack(e){return this.soundEngine.setSoundPack(e),this}getSoundPack(){return this.soundEngine.getSoundPack()}getSoundEngine(){return this.soundEngine}toggleMiniHud(){return this.setMiniHud(!this.isMiniHud)}setMiniHud(e){return this.isMiniHud=e,this.isMiniHud?(this.panelEl.classList.add("relly-mini-hud"),this.soundEngine.playMiniHud(!0)):(this.panelEl.classList.remove("relly-mini-hud"),this.soundEngine.playMiniHud(!1),this.clampToViewport()),this.autoSave&&this.queueAutoSave(),this}isMiniHudMode(){return this.isMiniHud}setGhostMode(e,t=.38){return this.ghostOnIdle=e,this.idleOpacity=Math.max(.05,Math.min(1,t)),this.panelEl.style.opacity=e?`${this.idleOpacity}`:"1",this}isGhostMode(){return this.ghostOnIdle}setSoundVolume(e){return this.soundEngine.setVolume(e),this}getSoundVolume(){return this.soundEngine.getVolume()}initSparkline(e){const t=document.createElement("canvas");t.className="relly-mini-sparkline",t.width=48,t.height=16,e.appendChild(t),this.sparklineCtx=t.getContext("2d");const n=()=>{this.isMiniHud&&this.sparklineCtx&&this.drawSparkline(),typeof requestAnimationFrame<"u"&&(this.sparklineAnimId=requestAnimationFrame(n))};typeof requestAnimationFrame<"u"&&(this.sparklineAnimId=requestAnimationFrame(n))}drawSparkline(){const e=this.sparklineCtx;if(!e)return;const t=48,n=16;e.clearRect(0,0,t,n);const s=this.sparklineData[this.sparklineData.length-1],r=Math.max(8,Math.min(26,s+(Math.random()-.48)*3));this.sparklineData.push(r),this.sparklineData.length>14&&this.sparklineData.shift();const a=Math.min(...this.sparklineData)-1,h=Math.max(...this.sparklineData)+1-a||1,c=t/(this.sparklineData.length-1);e.beginPath(),e.moveTo(0,n);for(let u=0;u<this.sparklineData.length;u++){const p=u*c,d=n-(this.sparklineData[u]-a)/h*(n-2)-1;e.lineTo(p,d)}e.lineTo(t,n),e.closePath(),e.fillStyle="rgba(56, 189, 248, 0.25)",e.fill(),e.beginPath();for(let u=0;u<this.sparklineData.length;u++){const p=u*c,d=n-(this.sparklineData[u]-a)/h*(n-2)-1;u===0?e.moveTo(p,d):e.lineTo(p,d)}e.strokeStyle="#38bdf8",e.lineWidth=1.4,e.stroke()}clampToViewport(){var e,t;return(e=this.draggableInstance)==null||e.clampToViewport(),(t=this.resizableInstance)==null||t.clampToViewport(),this}toggleCollapse(){return this.setCollapsed(!this.isPanelCollapsed)}setCollapsed(e){return this.isPanelCollapsed=e,this.isPanelCollapsed?(this.panelEl.classList.add("relly-collapsed"),this.collapseBtn.textContent="+",this.bindingEngine.pause()):(this.panelEl.classList.remove("relly-collapsed"),this.collapseBtn.textContent="_",this.bindingEngine.resume()),this.autoSave&&this.queueAutoSave(),this}queueAutoSave(){this.autoSave&&(this.autoSaveTimeout&&clearTimeout(this.autoSaveTimeout),this.autoSaveTimeout=setTimeout(()=>{this.saveSession()},250))}saveSession(e){if(typeof window>"u"||!window.localStorage)return;const t=e||this.autoSaveKey;try{const n={left:this.panelEl.style.left?parseFloat(this.panelEl.style.left):void 0,top:this.panelEl.style.top?parseFloat(this.panelEl.style.top):void 0,right:this.panelEl.style.right?parseFloat(this.panelEl.style.right):void 0,bottom:this.panelEl.style.bottom?parseFloat(this.panelEl.style.bottom):void 0},s={version:L.version,timestamp:Date.now(),isCollapsed:this.isPanelCollapsed,isMiniHud:this.isMiniHud,theme:this.themeManager.getCurrentThemeName(),position:n,width:this.panelEl.style.width,height:this.panelEl.style.height,components:this.presetManager.export()};window.localStorage.setItem(t,JSON.stringify(s))}catch(n){console.warn("[RellyUI] Failed to save session",n)}}loadSession(e){if(typeof window>"u"||!window.localStorage)return!1;const t=e||this.autoSaveKey;try{const n=window.localStorage.getItem(t);if(!n)return!1;const s=JSON.parse(n);return!s||typeof s!="object"?!1:(s.position&&(s.position.left!==void 0?(this.panelEl.style.left=`${s.position.left}px`,this.panelEl.style.right=""):s.position.right!==void 0&&(this.panelEl.style.right=`${s.position.right}px`,this.panelEl.style.left=""),s.position.top!==void 0?(this.panelEl.style.top=`${s.position.top}px`,this.panelEl.style.bottom=""):s.position.bottom!==void 0&&(this.panelEl.style.bottom=`${s.position.bottom}px`,this.panelEl.style.top="")),s.width&&(this.panelEl.style.width=s.width),s.height&&(this.panelEl.style.height=s.height),s.theme&&s.theme!=="custom"&&this.setTheme(s.theme),s.isCollapsed!==void 0&&s.isCollapsed!==this.isPanelCollapsed&&this.setCollapsed(s.isCollapsed),s.isMiniHud!==void 0&&s.isMiniHud!==this.isMiniHud&&this.setMiniHud(s.isMiniHud),s.components&&this.presetManager.import(s.components),!0)}catch(n){return console.warn("[RellyUI] Failed to load session",n),!1}}clearSession(e){if(typeof window>"u"||!window.localStorage)return;const t=e||this.autoSaveKey;try{window.localStorage.removeItem(t)}catch{}}setAutoSave(e,t){return this.autoSave=e,t&&(this.autoSaveKey=t),this.autoSave&&this.loadSession(),this}toggle(){return this.isPanelHidden?this.show():this.hide()}show(){return this.isPanelHidden=!1,this.panelEl.classList.remove("relly-hidden"),this.isPanelCollapsed||this.bindingEngine.resume(),this}hide(){return this.isPanelHidden=!0,this.panelEl.classList.add("relly-hidden"),this.bindingEngine.pause(),this}save(e){return this.presetManager.save(e),this}load(e){return this.presetManager.load(e),this}export(){return this.presetManager.export()}import(e){return this.presetManager.import(e),this}getElement(){return this.panelEl}getShadowRoot(){return this.shadowRoot}getHost(){return this.hostEl||null}destroy(){typeof window<"u"&&(window.removeEventListener("resize",this.onResizeBound),this.sparklineAnimId&&cancelAnimationFrame(this.sparklineAnimId)),this.draggableInstance&&this.draggableInstance.destroy(),this.resizableInstance&&this.resizableInstance.destroy(),this.hotkeyInstance&&this.hotkeyInstance.destroy(),this.searchBarInstance&&this.searchBarInstance.destroy(),this.tabsManagerInstance&&this.tabsManagerInstance.destroy(),this.importModalInstance&&this.importModalInstance.destroy(),this.toastManager.destroy(),this.contextMenuManager.destroy(),this.bindingEngine.destroy(),this.destroyChildren(),this.hostEl?this.hostEl.remove():this.panelEl.remove()}};l(L,"version","1.0.0");let I=L;return Object.assign(I,{Checkbox:E,Slider:k,Button:V,Select:A,DynamicLabel:z,Graph:B,ColorPicker:N,Point2D:R,Point3D:P,RangeSlider:D,Segmented:H,StatusIndicator:j,Section:F,Row:$,Tab:he,TabsManager:ce,BaseComponent:x,BindingEngine:K,PresetManager:G,ThemeManager:O,DARK_THEME:q,LIGHT_THEME:W,CYBERPUNK_THEME:X,NORD_THEME:J,DRACULA_THEME:Y,TOKYO_NIGHT_THEME:_,MATRIX_THEME:Q,SYNTHWAVE_THEME:Z,Draggable:ee,Resizable:te,HotkeyManager:ie,SearchBar:ne,SoundEngine:se,ImportModal:re,ToastManager:ae,ContextMenuManager:oe,SchemaLoader:le,ContainerHelper:S,RellyUI:I}),I}));
|
|
55
55
|
//# sourceMappingURL=relly-ui.umd.js.map
|