lexgui 0.7.12 → 0.7.14
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/build/extensions/codeeditor.js +465 -233
- package/build/lexgui.css +2 -1
- package/build/lexgui.js +80 -19
- package/build/lexgui.min.css +1 -1
- package/build/lexgui.min.js +1 -1
- package/build/lexgui.module.js +104 -43
- package/build/lexgui.module.min.js +1 -1
- package/changelog.md +30 -1
- package/examples/editor.html +31 -4
- package/package.json +1 -1
package/build/lexgui.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";console.warn("Script _build/lexgui.js_ is depracated and will be removed soon. Please use ES Modules or alternatives: https://jxarco.github.io/lexgui.js/docs/"),function(){const e={version:"0.7.12",ready:!1,extensions:[],signals:{},extraCommandbarEntries:[],activeDraggable:null,MOUSE_LEFT_CLICK:0,MOUSE_MIDDLE_CLICK:1,MOUSE_RIGHT_CLICK:2,MOUSE_DOUBLE_CLICK:2,MOUSE_TRIPLE_CLICK:3,CURVE_MOVEOUT_CLAMP:0,CURVE_MOVEOUT_DELETE:1,DRAGGABLE_Z_INDEX:101};class t{constructor(e,t){this.x=e??0,this.y=t??e??0}get xy(){return[this.x,this.y]}get yx(){return[this.y,this.x]}set(e,t){this.x=e,this.y=t}add(e,s=new t){return s.set(this.x+e.x,this.y+e.y),s}sub(e,s=new t){return s.set(this.x-e.x,this.y-e.y),s}mul(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x*e.x,this.y*e.y),s}div(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x/e.x,this.y/e.y),s}abs(e=new t){return e.set(Math.abs(this.x),Math.abs(this.y)),e}dot(e){return this.x*e.x+this.y*e.y}len2(){return this.dot(this)}len(){return Math.sqrt(this.len2())}nrm(e=new t){return e.set(this.x,this.y),e.mul(1/this.len(),e)}dst(e){return e.sub(this).len()}clp(s,n,o=new t){return o.set(e.clamp(this.x,s,n),e.clamp(this.y,s,n)),o}fromArray(e){this.x=e[0],this.y=e[1]}toArray(){return this.xy}}e.vec2=t;class s{constructor(e){Object.defineProperty(s.prototype,"rgb",{get:function(){return this._rgb},set:function(e){this._fromRGB(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hex",{get:function(){return this._hex},set:function(e){this._fromHex(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hsv",{get:function(){return this._hsv},set:function(e){this._fromHSV(e)},enumerable:!0,configurable:!0}),this.set(e)}set(e){if("string"==typeof e&&e.startsWith("#"))this._fromHex(e);else if("r"in e&&"g"in e&&"b"in e)e.a=e.a??1,this._fromRGB(e);else{if(!("h"in e&&"s"in e&&"v"in e))throw e;e.a=e.a??1,this._fromHSV(e)}}setHSV(e){this._fromHSV(e)}setRGB(e){this._fromRGB(e)}setHex(e){this._fromHex(e)}_fromHex(t){this._fromRGB(e.hexToRgb(t))}_fromRGB(t){this._rgb=t,this._hsv=e.rgbToHsv(t),this._hex=e.rgbToHex(t),this.css=e.rgbToCss(this._rgb)}_fromHSV(t){this._hsv=t,this._rgb=e.hsvToRgb(t),this._hex=e.rgbToHex(this._rgb),this.css=e.rgbToCss(this._rgb)}}e.Color=s,e.init=async function(t={}){if(this.ready)return this.main_area;await e.loadScriptSync("https://unpkg.com/lucide@latest"),console.log(`LexGUI v${this.version}`);var s=document.createElement("div");s.id="lexroot",s.className="lexcontainer",s.tabIndex=-1,t.rootClass&&(s.className+=` ${t.rootClass}`),this.modal=document.createElement("div"),this.modal.id="modal",this.modal.classList.add("hidden-opacity"),this.modal.toggle=function(e){this.classList.toggle("hidden-opacity",e)},this.root=s,this.container=document.body,t.container&&(this.container=t.container.constructor===String?document.getElementById(t.container):t.container),this.layoutMode=t.layoutMode??"app",document.documentElement.setAttribute("data-layout",this.layoutMode),"document"==this.layoutMode&&document.addEventListener("scroll",(e=>{document.body.querySelectorAll(".lexdropdownmenu").forEach((e=>{e._updatePosition()}))})),this.spacingMode=t.spacingMode??"default",document.documentElement.setAttribute("data-spacing",this.spacingMode),this.container.appendChild(this.modal),t.skipRoot?this.root=document.body:this.container.appendChild(s);{const e=document.createElement("section");e.className="notifications",this.notifications=document.createElement("ol"),this.notifications.className="",this.notifications.iWidth=0,e.appendChild(this.notifications),document.body.appendChild(e),this.notifications.addEventListener("mouseenter",(()=>{this.notifications.classList.add("list")})),this.notifications.addEventListener("mouseleave",(()=>{this.notifications.classList.remove("list")}))}s.addEventListener("dragover",(function(e){e.preventDefault()}),!1),document.addEventListener("contextmenu",(function(e){e.preventDefault()}),!1),this.DEFAULT_NAME_WIDTH="30%",this.DEFAULT_SPLITBAR_SIZE=4,this.OPEN_CONTEXTMENU_ENTRY="click",this.componentResizeObserver=new ResizeObserver((e=>{for(const t of e){const e=t.target?.jsInstance;e&&e.onResize&&e.onResize(t.contentRect)}})),this.ready=!0,this.menubars=[],this.sidebars=[],this.commandbar=function(t){let s=document.createElement("dialog");s.className="commandbar",s.tabIndex=-1,t.appendChild(s);let n=[],o=null;s.addEventListener("keydown",(function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),o=o??-1,"Escape"==e.key)this.close(),d(!0);else if("Enter"==e.key){const e=n[o];e&&(null!=e.item.checked&&(e.item.checked=!e.item.checked),this.close(),e.callback.call(window,e.item.name,e.item.checked))}else if("ArrowDown"==e.key&&o<n.length-1){o++,s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),n[o].classList.add("hovered");let e=n[o].offsetHeight*(o+1)-r.offsetHeight;e>0&&r.scrollTo({top:e,behavior:"smooth"})}else"ArrowUp"==e.key&&o>0&&(o--,s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),n[o].classList.add("hovered"))})),s.addEventListener("focusout",(function(e){e.relatedTarget!=e.currentTarget&&(e.stopPropagation(),e.stopImmediatePropagation(),this.close(),d(!0))})),t.addEventListener("keydown",(t=>{if(" "==t.key&&t.ctrlKey)t.stopImmediatePropagation(),t.stopPropagation(),e.setCommandbarState(!0);else for(let s of e.extensions){if(!e[s]||!e[s].prototype.onKeyPressed)continue;const n=e.CodeEditor.getInstances();for(let e of n)e.onKeyPressed(t)}}));const i=e.makeContainer(["100%","auto"],"flex flex-row"),l=new e.TextInput(null,"",(e=>{s._addElements(e.toLowerCase())}),{width:"100%",icon:"Search",trigger:"input",placeholder:"Search..."});i.appendChild(l.root);const a=new e.Area({width:"100%",skipAppend:!0,className:"cb-tabs"});{const e=(e,t)=>{};a.addTabs({parentClass:"p-2"}).add("All",document.createElement("div"),{selected:!0,onSelect:e})}const r=document.createElement("div");r.className="searchitembox";let c=null;const d=e=>{r.innerHTML="",n.length=0,o=null,e&&l.set("",!0)},h=(t,i,l,a)=>{if(!t.length)return;c&&c.classList.remove("last");let h=document.createElement("div");if(h.className="searchitem last",void 0!==a?.checked){const s=a.checked?e.makeIcon("Check").innerHTML:"";h.innerHTML=s+(l+t)}else h.innerHTML=l+t;h.callback=i,h.item=a,h.addEventListener("click",(s=>{null!=a.checked&&(a.checked=!a.checked),i.call(window,t,a.checked),e.setCommandbarState(!1),d(!0)})),h.addEventListener("mouseenter",(function(e){s.querySelectorAll(".hovered").forEach((e=>e.classList.remove("hovered"))),this.classList.add("hovered"),o=n.indexOf(this)})),h.addEventListener("mouseleave",(function(e){this.classList.remove("hovered")})),n.push(h),r.appendChild(h),c=h},u=(t,s,n,o)=>{if(!t||t.constructor!=Object)return;let i=t.name;i.toLowerCase().includes(s)&&t.callback&&h(i,t.callback,n,t);const l=t.submenu??t[i];if(l){n+=i+e.makeIcon("ChevronRight",{svgClass:"sm fg-secondary separator"}).innerHTML;for(let e of l)u(e,s,n)}};return s._addElements=t=>{d();for(let s of e.menubars)for(let e of s.items)u(e,t,"");for(let s of e.sidebars)for(let e of s.items)u(e,t,"");for(let s of e.extraCommandbarEntries){const e=s.name;e.toLowerCase().includes(t)&&h(e,s.callback,"",{})}if(e.has("CodeEditor")){const s=e.CodeEditor.getInstances();if(!s.length||!s[0].area.root.offsetHeight)return;const n=e.CodeEditor.languages;for(let o of Object.keys(n)){const i="Language: "+o,l=s[0]._getFileIcon(null,n[o].ext).split(" ");let a=e.makeIcon(l[0],{svgClass:`${l.slice(0).join(" ")}`}).innerHTML;a+=i+" <span class='lang-ext'>("+n[o].ext+")</span>",i.toLowerCase().includes(t)&&h(a,(()=>{for(let e of s)e._changeLanguage(o)}),"",{})}}},s.appendChild(i),s.appendChild(a.root),s.appendChild(r),s}(this.container),t.skipRoot||t.skipDefaultArea||(this.main_area=new e.Area({id:t.id??"mainarea"})),this._onChangeSystemTheme=function(t){localStorage.getItem("lxColorScheme")||e.setTheme(t.matches?"dark":"light",!1)},this._mqlPrefersDarkScheme=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const n=localStorage.getItem("lxColorScheme");return n?e.setTheme(n):this._mqlPrefersDarkScheme&&(t.autoTheme??1)&&(window.matchMedia("(prefers-color-scheme: light)").matches&&e.setTheme("light",!1),this._mqlPrefersDarkScheme.addEventListener("change",this._onChangeSystemTheme)),this.main_area},e.setLayoutMode=function(e){this.layoutMode=e,document.documentElement.setAttribute("data-layout",this.layoutMode)},e.setSpacingMode=function(e){this.spacingMode=e,document.documentElement.setAttribute("data-spacing",this.spacingMode)},e.setCommandbarState=function(e,t=!0){const s=this.commandbar;e?(s.show(),s.querySelector("input").focus(),t&&s._addElements(void 0)):s.close()};e.IEvent=class{constructor(e,t,s){this.name=e,this.value=t,this.domEvent=s}};class n{static NONE=0;static NODE_SELECTED=1;static NODE_DELETED=2;static NODE_DBLCLICKED=3;static NODE_CONTEXTMENU=4;static NODE_DRAGGED=5;static NODE_RENAMED=6;static NODE_VISIBILITY=7;static NODE_CARETCHANGED=8;constructor(e,t,s,o){this.type=e||n.NONE,this.node=t,this.value=s,this.event=o,this.multiple=!1,this.panel=null}string(){switch(this.type){case n.NONE:return"tree_event_none";case n.NODE_SELECTED:return"tree_event_selected";case n.NODE_DELETED:return"tree_event_deleted";case n.NODE_DBLCLICKED:return"tree_event_dblclick";case n.NODE_CONTEXTMENU:return"tree_event_contextmenu";case n.NODE_DRAGGED:return"tree_event_dragged";case n.NODE_RENAMED:return"tree_event_renamed";case n.NODE_VISIBILITY:return"tree_event_visibility";case n.NODE_CARETCHANGED:return"tree_event_caretchanged"}}}e.TreeEvent=n,e.emit=function(t,s,n={}){const o=e.signals[t];if(!o)return;const i=n.target;if(i)i[t]&&i[t].call(i,s);else for(let i of o)if(i instanceof e.BaseComponent)i.set(s,n.skipCallback??!0);else if(i.constructor===Function){i(null,s)}else{const e=i[t];console.assert(e,`No callback registered with _${t}_ signal`),e.bind(i)(s)}},e.addSignal=function(t,s,n){s[t]=n,e.signals[t]||(e.signals[t]=[]),e.signals[t].indexOf(s)>-1||e.signals[t].push(s)};class o{static activeElement=!1;constructor(t,s,n={}){if(o.activeElement)return void o.activeElement.destroy();this._trigger=t,t&&(t.classList.add("triggered"),t.active=this),this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.sideOffset=n.sideOffset??0,this.alignOffset=n.alignOffset??0,this.avoidCollisions=n.avoidCollisions??!0,this.reference=n.reference,this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexpopover";const i=(t??this.reference).closest("dialog");i&&"true"==i.dataset.modal?this._parent=i:this._parent=e.root,this._parent.appendChild(this.root),this.root.addEventListener("keydown",(e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())})),s&&(s=[].concat(s)).forEach((e=>{const t=e.root??e;this.root.appendChild(t),e.onPopover&&e.onPopover()})),o.activeElement=this,e.doAsync((()=>{this._adjustPosition(),this._trigger&&(this.root.focus(),this._onClick=e=>{e.target&&(this.root.contains(e.target)||e.target==this._trigger)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0))}),10)}destroy(){this._trigger&&(this._trigger.classList.remove("triggered"),delete this._trigger.active,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0)),this.root.remove(),o.activeElement=null}_adjustPosition(){const t=[0,0];{const e=this.reference??this._trigger;console.assert(e,"Popover needs a trigger or reference element!");const s=e.getBoundingClientRect();let n=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth-this.sideOffset,n=!1;break;case"right":t[0]+=s.x+s.width+this.sideOffset,n=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight-this.sideOffset,n=!0;break;case"bottom":t[1]+=s.y+s.height+this.sideOffset,n=!0}switch(this.align){case"start":n?t[0]+=s.x:t[1]+=s.y;break;case"center":n?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":n?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}n?t[0]+=this.alignOffset:t[1]+=this.alignOffset}if(this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();t[0]-=e.x,t[1]-=e.y}this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`}}e.Popover=o;e.PopConfirm=class{constructor(t,s={}){const n=s.confirmText??"Yes",o=s.cancelText??"No",i=s.title??"Confirm",l=s.content??"Are you sure you want to proceed?",a=s.onConfirm,r=s.onCancel,c=e.makeContainer(["auto","auto"],"tour-step-container");{const t=e.makeContainer(["100%","auto"],"flex flex-row","",c);e.makeContainer(["100%","auto"],"p-1 font-medium text-md",i,t)}e.makeContainer(["100%","auto"],"p-1 text-md",l,c,{maxWidth:"400px"});const d=e.makeContainer(["100%","auto"],"flex flex-row text-md","",c),h=e.makeContainer(["100%","auto"],"text-md","",d),u=new e.Panel;h.appendChild(u.root),u.sameLine(2,"justify-end"),u.addButton(null,o,(()=>{r&&r(),this._popover?.destroy()}),{xbuttonClass:"contrast"}),u.addButton(null,n,(()=>{a&&a(),this._popover?.destroy()}),{buttonClass:"accent"}),this._popover?.destroy(),this._popover=new e.Popover(null,[c],{reference:t,side:s.side??"top",align:s.align,sideOffset:s.sideOffset,alignOffset:s.alignOffset})}};e.Sheet=class{constructor(t,s,n={}){this.side=n.side??"left",this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.role="dialog",this.root.className="lexsheet fixed z-1000 bg-primary",document.body.appendChild(this.root),this.root.addEventListener("keydown",(e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())})),s&&(s=[].concat(s)).forEach((e=>{const t=e.root??e;this.root.appendChild(t),e.onSheet&&e.onSheet()})),e.doAsync((()=>{switch(e.modal.toggle(!1),this.side){case"left":this.root.style.left=0,this.root.style.width=t,this.root.style.height="100%";break;case"right":this.root.style.right=0,this.root.style.width=t,this.root.style.height="100%";break;case"top":this.root.style.left=0,this.root.style.top=0,this.root.style.width="100%",this.root.style.height=t;break;case"bottom":this.root.style.left=0,this.root.style.bottom=0,this.root.style.width="100%",this.root.style.height=t}document.documentElement.setAttribute("data-scale",`sheet-${this.side}`),this.root.focus(),this._onClick=e=>{e.target&&this.root.contains(e.target)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)}),10)}destroy(){document.documentElement.setAttribute("data-scale",""),document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),e.modal.toggle(!0)}};class i{static currentMenu=!1;constructor(t,s,n={}){if(console.assert(t,"DropdownMenu needs a DOM element as trigger!"),i.currentMenu||!s?.length)return i.currentMenu.destroy(),void(this.invalid=!0);this._trigger=t,t.classList.add("triggered"),t.ddm=this,this._items=s,this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.sideOffset=n.sideOffset??0,this.alignOffset=n.alignOffset??0,this.avoidCollisions=n.avoidCollisions??!0,this.onBlur=n.onBlur,this.event=n.event,this.inPlace=!1,this.root=document.createElement("div"),this.root.id="root",this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexdropdownmenu";const o=t.closest("dialog");o&&"true"==o.dataset.modal?this._parent=o:this._parent=e.root,this._parent.appendChild(this.root),this._create(this._items),i.currentMenu=this,e.doAsync((()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{(!e.target||null==e.target.closest(".lexdropdownmenu")&&e.target!=this._trigger)&&this.destroy(!0)},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)}),10)}destroy(e){this._trigger.classList.remove("triggered"),delete this._trigger.ddm,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this._parent.querySelectorAll(".lexdropdownmenu").forEach((e=>{e.remove()})),i.currentMenu=null,e&&this.onBlur&&this.onBlur()}_create(t,s){if(s){const t=s.getBoundingClientRect();let n=document.createElement("div");n.tabIndex="1",n.className="lexdropdownmenu",n.dataset.id=s.dataset.id,n.dataset.side="right",this._parent.appendChild(n),n.currentParent=s,s=n,e.doAsync((()=>{const s=[t.x+t.width,t.y];if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();s[0]-=e.x,s[1]-=e.y}this.avoidCollisions&&(s[0]=e.clamp(s[0],0,window.innerWidth-n.offsetWidth-this._windowPadding),s[1]=e.clamp(s[1],0,window.innerHeight-n.offsetHeight-this._windowPadding)),n.style.left=`${s[0]}px`,n.style.top=`${s[1]}px`}),10)}else s=this.root;let n=t.filter((e=>null!=e?.icon||null!=e?.checked)).length>0;for(let e of t)this._createItem(e,s,n)}_createItem(t,s,n){if(!t)return void this._addSeparator(s);const o=t.name??t,i=e.getSupportedDOMName(o);if(s.querySelector("#"+i))return;const l=document.createElement("div");if(l.className="lexdropdownmenuitem"+(t.name||t.options?"":" label")+(t.disabled?" disabled":"")+` ${t.className??""}`,l.dataset.id=i,l.innerHTML=`<span>${o}</span>`,l.tabIndex="1",s.appendChild(l),t.constructor===String)return;if(t.submenu){const t=e.makeIcon("Right",{svgClass:"sm"});l.appendChild(t)}else if(t.kbd){t.kbd=[].concat(t.kbd);const s=e.makeKbd(t.kbd);l.appendChild(s),document.addEventListener("keydown",(e=>{if(!this._trigger.ddm)return;e.preventDefault();let s=t.kbd.join("");s=1==s.length?s.toLowerCase():s,s==e.key&&l.click()}))}const a=t.disabled??!1;if(void 0!==this._radioGroup){if(t.name===this._radioGroup.selected){const t=e.makeIcon("Circle",{svgClass:"xxs fill-current"});l.prepend(t)}l.setAttribute("data-radioname",this._radioGroup.name)}else if(t.icon){const s=e.makeIcon(t.icon,{svgClass:a?"fg-tertiary":t.svgClass??t.className});l.prepend(s)}else null==t.checked&&n&&l.classList.add("pl-8");if(!a){if(null!=t.checked){const s=new e.Checkbox(i+"_entryChecked",t.checked,(e=>{const s=t.callback;t.checked=e,s&&s.call(this,o,e,l)}),{className:"accent"}),n=s.root.querySelector("input");n.classList.add("ml-auto"),l.appendChild(n),l.addEventListener("click",(e=>{"checkbox"!=e.target.type&&(n.checked=!n.checked,s.set(n.checked))}))}else l.addEventListener("click",(()=>{const e=l.getAttribute("data-radioname");e&&(this._trigger[e]=o);const s=t.callback;s&&s.call(this,o,l,e),!t.options&&(t.closeOnClick??1)&&this.destroy(!0)}));if(l.addEventListener("mouseover",(e=>{let n=l.dataset.id,o=s;for(;o;)n+="/"+o.dataset.id,o=o.currentParent?.parentElement;if(this._parent.querySelectorAll(".lexdropdownmenu").forEach((e=>{n.includes(e.dataset.id)||(e.currentParent.built=!1,e.remove())})),t.submenu&&this.inPlace){if(l.built)return;l.built=!0,this._create(t.submenu,l)}e.stopPropagation()})),t.options){console.assert(this._trigger[t.name]&&"An item of the radio group must be selected!"),this._radioGroup={name:t.name,selected:this._trigger[t.name]};for(let e of t.options)this._createItem(e,s,n);delete this._radioGroup,this._addSeparator()}}}_adjustPosition(){const t=[0,0],s=this._trigger.getBoundingClientRect();if(this.event)t[0]=this.event.x,t[1]=this.event.y;else{let e=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth-this.sideOffset,e=!1;break;case"right":t[0]+=s.x+s.width+this.sideOffset,e=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight-this.sideOffset,e=!0;break;case"bottom":t[1]+=s.y+s.height+this.sideOffset,e=!0}switch(this.align){case"start":e?t[0]+=s.x:t[1]+=s.y;break;case"center":e?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":e?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}e?t[0]+=this.alignOffset:t[1]+=this.alignOffset}if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();t[0]-=e.x,t[1]-=e.y}this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`,this.inPlace=!0}_addSeparator(e){const t=document.createElement("div");t.className="separator",(e=e??this.root).appendChild(t)}}e.DropdownMenu=i,e.addDropdownMenu=function(e,t,s){const n=new i(e,t,s);return n.invalid?null:n};e.ColorPicker=class{static currentPicker=!1;constructor(t,n={}){this.colorModel=n.colorModel??"Hex",this.useAlpha=n.useAlpha??!1,this.callback=n.onChange,this.callback||console.warn("Define a callback in _options.onChange_ to allow getting new Color values!"),this.root=document.createElement("div"),this.root.className="lexcolorpicker",this.markerHalfSize=8,this.markerSize=2*this.markerHalfSize,this.currentColor=new s(t);const o=new s({h:this.currentColor.hsv.h,s:1,v:1});this.colorPickerBackground=document.createElement("div"),this.colorPickerBackground.className="lexcolorpickerbg",this.colorPickerBackground.style.backgroundColor=`rgb(${o.css.r}, ${o.css.g}, ${o.css.b})`,this.root.appendChild(this.colorPickerBackground),this.intSatMarker=document.createElement("div"),this.intSatMarker.className="lexcolormarker",this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.colorPickerBackground.appendChild(this.intSatMarker);let i=null,l=t=>{const s=t.movementX,n=t.movementY,o=t.x-i.x,l=t.y-i.y;0!=s&&(o>=0||s<0)&&(o<this.colorPickerBackground.offsetWidth||s>0)&&(this.intSatMarker.style.left=e.clamp(parseInt(this.intSatMarker.style.left)+s,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)+"px"),0!=n&&(l>=0||n<0)&&(l<this.colorPickerBackground.offsetHeight||n>0)&&(this.intSatMarker.style.top=e.clamp(parseInt(this.intSatMarker.style.top)+n,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)+"px"),this._positionToSv(parseInt(this.intSatMarker.style.left),parseInt(this.intSatMarker.style.top)),this._updateColorValue(),t.stopPropagation(),t.preventDefault()},a=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",l),t.removeEventListener("mouseup",a),document.body.classList.remove("noevents")};this.colorPickerBackground.addEventListener("mousedown",(e=>{var t=this.root.ownerDocument;t.addEventListener("mousemove",l),t.addEventListener("mouseup",a),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation();const s=e.offsetX-this.markerHalfSize;this.intSatMarker.style.left=s+"px";const n=e.offsetY-this.markerHalfSize;this.intSatMarker.style.top=n+"px",this._positionToSv(s,n),this._updateColorValue(),i=this.colorPickerBackground.getBoundingClientRect()}));const r=e.makeContainer(["100%","auto"],"flex flex-row gap-1 items-center","",this.root);window.EyeDropper&&r.appendChild(new e.Button(null,"eyedrop",(async()=>{const e=new EyeDropper;try{const t=await e.open();this.fromHexColor(t.sRGBHex)}catch(e){}}),{icon:"Pipette",buttonClass:"bg-none",title:"Sample Color"}).root);const c=e.makeContainer(["100%","100%"],"flex flex-col gap-2","",r);this.colorPickerTracker=document.createElement("div"),this.colorPickerTracker.className="lexhuetracker",c.appendChild(this.colorPickerTracker),this.hueMarker=document.createElement("div"),this.hueMarker.className="lexcolormarker",this.hueMarker.style.backgroundColor=`rgb(${o.css.r}, ${o.css.g}, ${o.css.b})`,this.colorPickerTracker.appendChild(this.hueMarker);const d=t=>{this.hueMarker.style.left=t+"px",this.currentColor.hsv.h=e.remapRange(t,0,this.colorPickerTracker.offsetWidth-this.markerSize,0,360);const n=new s({h:this.currentColor.hsv.h,s:1,v:1});this.hueMarker.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this.colorPickerBackground.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this._updateColorValue()};let h=null,u=t=>{const s=t.movementX,n=t.x-h.x;if(0!=s&&(n>=this.markerHalfSize||s<0)&&(n<this.colorPickerTracker.offsetWidth-this.markerHalfSize||s>0)){const t=e.clamp(parseInt(this.hueMarker.style.left)+s,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(t)}t.stopPropagation(),t.preventDefault()},p=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",u),t.removeEventListener("mouseup",p),document.body.classList.remove("noevents")};if(this.colorPickerTracker.addEventListener("mousedown",(t=>{const s=this.root.ownerDocument;s.addEventListener("mousemove",u),s.addEventListener("mouseup",p),document.body.classList.add("noevents"),t.stopImmediatePropagation(),t.stopPropagation();const n=e.clamp(t.offsetX-this.markerHalfSize,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(n),h=this.colorPickerTracker.getBoundingClientRect()})),this.useAlpha){this.alphaTracker=document.createElement("div"),this.alphaTracker.className="lexalphatracker",this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`,c.appendChild(this.alphaTracker),this.alphaMarker=document.createElement("div"),this.alphaMarker.className="lexcolormarker",this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`,this.alphaTracker.appendChild(this.alphaMarker);const t=t=>{this.alphaMarker.style.left=t+"px",this.currentColor.hsv.a=e.remapRange(t,0,this.alphaTracker.offsetWidth-this.markerSize,0,1),this._updateColorValue(),this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`};let s=null,n=n=>{const l=this.root.ownerDocument;l.addEventListener("mousemove",o),l.addEventListener("mouseup",i),document.body.classList.add("noevents"),n.stopImmediatePropagation(),n.stopPropagation();const a=e.clamp(n.offsetX-this.markerHalfSize,0,this.alphaTracker.offsetWidth-this.markerSize);t(a),s=this.alphaTracker.getBoundingClientRect()},o=n=>{const o=n.movementX,i=n.x-s.x;if(0!=o&&(i>=this.markerHalfSize||o<0)&&(i<this.alphaTracker.offsetWidth-this.markerHalfSize||o>0)){const s=e.clamp(parseInt(this.alphaMarker.style.left)+o,0,this.alphaTracker.offsetWidth-this.markerSize);t(s)}n.stopPropagation(),n.preventDefault()},i=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",o),t.removeEventListener("mouseup",i),document.body.classList.remove("noevents")};this.alphaTracker.addEventListener("mousedown",n)}const m=e.makeContainer(["100%","auto"],"flex flex-row gap-1","",this.root);m.appendChild(new e.Select(null,["CSS","Hex","HSV","RGB"],this.colorModel,(e=>{this.colorModel=e,this._updateColorValue(null,!0)})).root),this.labelComponent=new e.TextInput(null,"",null,{inputClass:"bg-none",fit:!0,disabled:!0}),m.appendChild(this.labelComponent.root);{const t=new e.Button(null,"copy",(async()=>{navigator.clipboard.writeText(this.labelComponent.value()),t.root.querySelector("input[type='checkbox']").style.pointerEvents="none",e.doAsync((()=>{t.swap(!0),t.root.querySelector("input[type='checkbox']").style.pointerEvents="auto"}),3e3)}),{swap:"Check",icon:"Copy",buttonClass:"bg-none",className:"ml-auto",title:"Copy"});t.root.querySelector(".swap-on svg").addClass("fg-success"),m.appendChild(t.root)}this._updateColorValue(t,!0),e.doAsync(this._placeMarkers.bind(this)),this.onPopover=this._placeMarkers.bind(this)}_placeMarkers(){this._svToPosition(this.currentColor.hsv.s,this.currentColor.hsv.v);const t=e.remapRange(this.currentColor.hsv.h,0,360,0,this.colorPickerTracker.offsetWidth-this.markerSize);if(this.hueMarker.style.left=t+"px",this.useAlpha){const t=e.remapRange(this.currentColor.hsv.a,0,1,0,this.alphaTracker.offsetWidth-this.markerSize);this.alphaMarker.style.left=t+"px"}}_svToPosition(t,s){this.intSatMarker.style.left=`${e.remapRange(t,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)}px`,this.intSatMarker.style.top=`${e.remapRange(1-s,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)}px`}_positionToSv(t,s){this.currentColor.hsv.s=e.remapRange(t,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize,0,1),this.currentColor.hsv.v=1-e.remapRange(s,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize,0,1)}_updateColorValue(e,t=!1){this.currentColor.set(e??this.currentColor.hsv),this.callback&&!t&&this.callback(this.currentColor),this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.useAlpha&&(this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`);const s=(e,t=2)=>e.toFixed(t).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1");if("CSS"==this.colorModel){const{r:e,g:t,b:n,a:o}=this.currentColor.css;this.labelComponent.set(`rgb${this.useAlpha?"a":""}(${e},${t},${n}${this.useAlpha?","+s(o):""})`)}else if("Hex"==this.colorModel)this.labelComponent.set((this.useAlpha?this.currentColor.hex:this.currentColor.hex.substr(0,7)).toUpperCase());else if("HSV"==this.colorModel){const{h:e,s:t,v:n,a:o}=this.currentColor.hsv,i=[Math.floor(e)+"º",Math.floor(100*t)+"%",Math.floor(100*n)+"%"];this.useAlpha&&i.push(s(o)),this.labelComponent.set(i.join(" "))}else{const{r:e,g:t,b:n,a:o}=this.currentColor.rgb,i=[s(e),s(t),s(n)];this.useAlpha&&i.push(s(o)),this.labelComponent.set(i.join(" "))}}fromHexColor(t){this.currentColor.setHex(t);const{h:n,s:o,v:i}=this.currentColor.hsv;this._svToPosition(o,i);const l=new s({h:n,s:1,v:1});this.hueMarker.style.backgroundColor=this.colorPickerBackground.style.backgroundColor=`rgb(${l.css.r}, ${l.css.g}, ${l.css.b})`,this.hueMarker.style.left=e.remapRange(n,0,360,-this.markerHalfSize,this.colorPickerTracker.offsetWidth-this.markerHalfSize)+"px",this._updateColorValue(t)}};e.Calendar=class{constructor(t,s={}){if(this.root=e.makeContainer(["256px","auto"],"p-1 text-md"),this.onChange=s.onChange,this.onPreviousMonth=s.onPreviousMonth,this.onNextMonth=s.onNextMonth,this.untilToday=s.untilToday,this.fromToday=s.fromToday,this.range=s.range,this.skipPrevMonth=s.skipPrevMonth,this.skipNextMonth=s.skipNextMonth,t)this.fromDateString(t);else{const e=new Date;this.month=e.getMonth()+1,this.year=e.getFullYear(),this.fromMonthYear(this.month,this.year)}}_getCurrentDate(){return{day:this.day,month:this.month,year:this.year,fullDate:this.getFullDate()}}_previousMonth(e){this.month=Math.max(0,this.month-1),0==this.month&&(this.month=12,this.year--),this.fromMonthYear(this.month,this.year),!e&&this.onPreviousMonth&&this.onPreviousMonth(this.currentDate)}_nextMonth(e){this.month=Math.min(this.month+1,12),12==this.month&&(this.month=0,this.year++),this.fromMonthYear(this.month,this.year),!e&&this.onNextMonth&&this.onNextMonth(this.currentDate)}refresh(){this.root.innerHTML="";{const t=e.makeContainer(["100%","auto"],"flex flex-row p-1","",this.root);if(!this.skipPrevMonth){const s=e.makeIcon("Left",{title:"Previous Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(s),s.addEventListener("click",(()=>{this._previousMonth()}))}if(e.makeContainer(["100%","auto"],"text-center font-medium select-none",`${this.monthName} ${this.year}`,t),!this.skipNextMonth){const s=e.makeIcon("Right",{title:"Next Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(s),s.addEventListener("click",(()=>{this._nextMonth()}))}}{const t=document.createElement("table");t.className="w-full",this.root.appendChild(t);{const e=document.createElement("thead");t.appendChild(e);const s=document.createElement("tr");for(const e of["Mo","Tu","We","Th","Fr","Sa","Su"]){const t=document.createElement("th");t.className="fg-tertiary text-sm font-normal select-none",t.innerHTML=`<span>${e}</span>`,s.appendChild(t)}e.appendChild(s)}{const s=document.createElement("tbody");t.appendChild(s);let n=this.range?e.dateFromDateString(this.range[0]):null,o=this.range?e.dateFromDateString(this.range[1]):null;for(let e=0;e<6;e++){const t=document.createElement("tr"),i=this.calendarDays.slice(7*e,7*e+7);for(const e of i){const s=document.createElement("th");s.className="leading-loose font-normal rounded select-none cursor-pointer";const i=new Date(`${this.month}/${e.day}/${this.year}`),l=new Date,a=!this.untilToday||i.getTime()<l.getTime(),r=!this.fromToday||(i.getFullYear()>l.getFullYear()||i.getFullYear()===l.getFullYear()&&i.getMonth()>l.getMonth()||i.getFullYear()===l.getFullYear()&&i.getMonth()===l.getMonth()&&i.getDate()>=l.getDate()),c=e.currentMonth&&a&&r,d=this.currentDate&&e.day==this.currentDate.day&&this.month==this.currentDate.month&&this.year==this.currentDate.year&&e.currentMonth,h=c&&n&&e.day==n.getDate()&&this.month==n.getMonth()+1&&this.year==n.getFullYear(),u=c&&o&&e.day==o.getDate()&&this.month==o.getMonth()+1&&this.year==o.getFullYear();!this.range&&d||this.range&&(h||u)?s.className+=" bg-contrast fg-contrast":this.range&&c&&i>n&&i<o?s.className+=" bg-accent fg-contrast":s.className+=` ${c?"fg-primary":"fg-tertiary"} hover:bg-secondary`,s.innerHTML=`<span>${e.day}</span>`,t.appendChild(s),c?s.addEventListener("click",(()=>{this.day=e.day,this.currentDate=this._getCurrentDate(),this.onChange&&this.onChange(this.currentDate)})):void 0!==this.range||e.currentMonth||s.addEventListener("click",(()=>{e?.prevMonth?this._previousMonth():this._nextMonth()}))}s.appendChild(t)}}}}fromDateString(e){const t=e.split("/");this.day=parseInt(t[0]),this.month=parseInt(t[1]),this.monthName=this.getMonthName(this.month-1),this.year=parseInt(t[2]),this.currentDate=this._getCurrentDate(),this.fromMonthYear(this.month,this.year)}fromMonthYear(e,t){e--,t=t??(new Date).getFullYear();const s=new Date(t,e,1).getDay(),n=0===s?6:s-1,o=new Date(t,e+1,0).getDate(),i=new Date(0===e?t-1:t,(0===e?11:e-1)+1,0).getDate(),l=[];for(let e=n-1;e>=0;e--)l.push({day:i-e,currentMonth:!1,prevMonth:!0});for(let e=1;e<=o;e++)l.push({day:e,currentMonth:!0});const a=42-l.length;for(let e=1;e<=a;e++)l.push({day:e,currentMonth:!1,nextMonth:!0});this.monthName=this.getMonthName(e),this.firstDay=n,this.daysInMonth=o,this.calendarDays=l,this.refresh()}getMonthName(e,t="en-US"){return new Intl.DateTimeFormat(t,{month:"long"}).format(new Date(2e3,e,1))}getFullDate(e,t,s){return`${e??this.monthName} ${t??this.day}${this._getOrdinalSuffix(t??this.day)}, ${s??this.year}`}setRange(e){console.assert(e.constructor===Array,"Date Range must be in Array format"),this.range=e,this.refresh()}setMonth(e){this.month=e,this.fromMonthYear(this.month,this.year)}_getOrdinalSuffix(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}};e.CalendarRange=class{constructor(t,s={}){this.root=e.makeContainer(["auto","auto"],"flex flex-row"),console.assert(t&&t.constructor===Array,"Range cannot be empty and has to be an Array!");let n=null,o=!1;{const s=e.dateFromDateString(t[0]),i=e.dateFromDateString(t[1]);if(s>i){const e=t[0];t[0]=t[1],t[1]=e,o=!0}n=(o?i.getMonth():s.getMonth())+2}this.from=t[0],this.to=t[1],this._selectingRange=!1;const i=e=>{const t=`${e.day}/${e.month}/${e.year}`;this._selectingRange?(this.to=t,this._selectingRange=!1):(this.from=this.to=t,this._selectingRange=!0);const n=[this.from,this.to];this.fromCalendar.setRange(n),this.toCalendar.setRange(n),s.onChange&&s.onChange(n)};this.fromCalendar=new e.Calendar(this.from,{skipNextMonth:!0,onChange:i,onPreviousMonth:()=>{this.toCalendar._previousMonth()},range:t}),this.toCalendar=new e.Calendar(this.to,{skipPrevMonth:!0,onChange:i,onNextMonth:()=>{this.fromCalendar._nextMonth()},range:t}),console.assert(n&&"New Month must be valid"),this.toCalendar.setMonth(n),this.root.appendChild(this.fromCalendar.root),this.root.appendChild(this.toCalendar.root)}getFullDate(){const t=e.dateFromDateString(this.from),s=this.fromCalendar.getMonthName(t.getMonth()),n=e.dateFromDateString(this.to),o=this.toCalendar.getMonthName(n.getMonth());return`${this.fromCalendar.getFullDate(s,t.getDate(),t.getFullYear())} to ${this.toCalendar.getFullDate(o,n.getDate(),n.getFullYear())}`}};class l{static TAB_ID=0;constructor(t,s={}){this.onclose=s.onclose;let n=document.createElement("div");n.className="lexareatabs "+(s.fit?"fit":"row");const o=s.folding??!1;o&&n.classList.add("folding");let i=this;n.addEventListener("dragenter",(function(e){e.preventDefault(),this.classList.add("dockingtab")})),n.addEventListener("dragleave",(function(e){e.preventDefault(),this.contains(e.relatedTarget)||this.classList.remove("dockingtab")})),n.addEventListener("drop",(function(e){e.preventDefault();const t=e.dataTransfer.getData("source"),s=document.getElementById(t);if(!s)return;const n=s.parentElement,o=e.target,l=o.getBoundingClientRect();e.offsetX<.5*l.width?this.insertBefore(s,o):o.nextElementSibling?this.insertBefore(s,o.nextElementSibling):this.appendChild(s);{n.childNodes.forEach(((e,t)=>e.childIndex=t-1));const t=/true/.test(e.dataTransfer.getData("fit"));if(n.childElementCount==(t?2:1))n.lastChild.click();else{(n.querySelector(".selected")??n.childNodes[t?1:0]).click()}}this.childNodes.forEach(((e,t)=>e.childIndex=t-1));const a=document.getElementById(t+"_content");i.area.attach(a),this.classList.remove("dockingtab"),s.instance=i,s.click(),i.tabs[s.dataset.name]=a})),t.root.classList.add("lexareatabscontainer");const[l,a]=t.split({type:"vertical",sizes:s.sizes??"auto",resize:!1,top:2});if(l.attach(n),s.parentClass&&(n.parentElement.className+=` ${s.parentClass}`),this.area=a,this.area.root.className+=" lexareatabscontent",s.contentClass&&(this.area.root.className+=` ${s.contentClass}`),this.selected=null,this.root=n,this.tabs={},this.tabDOMs={},s.fit){let t=document.createElement("span");t.className="lexareatab thumb",this.thumb=t,this.root.appendChild(t);new ResizeObserver((t=>{const s=this.thumb.item;if(s){var n=this.thumb.style.transition;this.thumb.style.transition="none",this.thumb.style.transform="translate( "+s.childIndex*s.offsetWidth+"px )",this.thumb.style.width=s.offsetWidth+"px",e.flushCss(this.thumb),this.thumb.style.transition=n}})).observe(this.area.root)}if(o){this.folded=!0,this.folding=o,"up"==o&&t.root.insertChildAtIndex(t.sections[1].root,0);new ResizeObserver((e=>{for(const s of e){const e=s.contentRect;t.parentArea.sections[0].root.style.height="calc(100% - "+(42+e.height)+"px )"}})).observe(this.area.root),this.area.root.classList.add("folded")}}add(t,s,n={}){let o=n.selected??!1;if(o){this.root.querySelectorAll("span").forEach((e=>e.classList.remove("selected")));(this.area.root.querySelector(":scope > .pseudoparent-tabs")??this.area.root).querySelectorAll(":scope > .lextabcontent").forEach((e=>e.style.display="none"))}o=!Object.keys(this.tabs).length&&!this.folding||o;let i=s.root?s.root:s;if(i.originalDisplay=i.style.display,i.style.display=o?i.originalDisplay:"none",i.classList.add("lextabcontent"),n.icon)if(n.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";n.icon="<img src='"+(e+n.icon)+"'>"}else{const t=n.icon.split(" ");n.icon=e.makeIcon(t[0],{svgClass:"sm "+t.slice(0).join(" ")}).innerHTML}let a=document.createElement("span");if(a.dataset.name=t,a.className="lexareatab flex flex-row gap-1"+(o?" selected":""),a.innerHTML=(n.icon??"")+t,a.id=t.replace(/\s/g,"")+l.TAB_ID++,a.title=n.title??"",a.selected=o??!1,a.fixed=n.fixed,a.instance=this,i.id=a.id+"_content",n.badge){const t={};(n.badge.asChild??!1)&&(t.parent=a),a.innerHTML+=e.badge(n.badge.content??"",n.badge.className,t)}a.selected&&(this.selected=t),a.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation();const t=a.instance;if(!a.fixed){const e=a.selected;a.parentElement.querySelectorAll("span").forEach((e=>e.selected=!1)),a.selected=!e,a.parentElement.querySelectorAll("span").forEach((e=>e.classList.remove("selected"))),a.classList.toggle("selected",t.folding&&a.selected);(t.area.root.querySelector(":scope > .pseudoparent-tabs")??t.area.root).querySelectorAll(":scope > .lextabcontent").forEach((e=>e.style.display="none")),i.style.display=i.originalDisplay,t.selected=a.dataset.name}t.folding&&(t.folded=a.selected,t.area.root.classList.toggle("folded",!t.folded)),n.onSelect&&n.onSelect(e,a.dataset.name),t.thumb&&(t.thumb.style.transform="translate( "+a.childIndex*a.offsetWidth+"px )",t.thumb.style.width=a.offsetWidth+"px",t.thumb.item=a)})),a.addEventListener("contextmenu",(e=>{e.preventDefault(),e.stopPropagation(),n.onContextMenu&&n.onContextMenu(e,a.dataset.name)})),n.allowDelete&&(a.addEventListener("mousedown",(t=>{t.button==e.MOUSE_MIDDLE_CLICK&&t.preventDefault()})),a.addEventListener("mouseup",(t=>{t.preventDefault(),t.stopPropagation(),t.button==e.MOUSE_MIDDLE_CLICK&&this.delete(a.dataset.name)}))),a.setAttribute("draggable",!0),a.addEventListener("dragstart",(e=>{const t=!!this.thumb;a.parentElement.childNodes.length!=(t?2:1)?(e.dataTransfer.setData("source",e.target.id),e.dataTransfer.setData("fit",t)):e.preventDefault()}));const r=n.indexOffset??-1;a.childIndex=this.root.childElementCount+r,this.root.insertChildAtIndex(a,a.childIndex+1),this.area.attach(i),this.tabDOMs[t]=a,this.tabs[t]=s,setTimeout((()=>{n.onCreate&&n.onCreate.call(this,this.area.root.getBoundingClientRect()),o&&this.thumb&&(this.thumb.classList.add("no-transition"),this.thumb.style.transform="translate( "+a.childIndex*a.offsetWidth+"px )",this.thumb.style.width=a.offsetWidth+"px",this.thumb.item=a,this.thumb.classList.remove("no-transition"))}),10)}select(e){this.tabDOMs[e]&&this.tabDOMs[e].click()}delete(e){this.selected==e&&(this.selected=null);const t=this.tabDOMs[e];if(!t||t.fixed)return;this.onclose&&this.onclose(e),this.tabDOMs[e].remove(),delete this.tabDOMs[e],this.tabs[e].remove(),delete this.tabs[e];const s=this.root.lastChild;s&&!s.fixed&&this.root.lastChild.click()}}e.Tabs=l;e.Footer=class{constructor(t={}){const s=document.createElement("footer");s.className=`lexfooter ${t.className??""}`;const n=document.createElement("div");if(n.style.minHeight="48px",n.className="w-full",s.appendChild(n),t.columns&&t.columns.constructor==Array){const e=document.createElement("div");e.className="columns",e.style.gridTemplateColumns="1fr ".repeat(t.columns.length),n.appendChild(e);for(let s of t.columns){const t=document.createElement("div");t.className="col",e.appendChild(t);const n=document.createElement("h2");if(n.innerHTML=s.title,t.appendChild(n),!s.items||!s.items.length)continue;const o=document.createElement("ul");t.appendChild(o);for(let e of s.items){const t=document.createElement("li");t.innerHTML=`<a class="" href="${e.link}">${e.title}</a>`,o.appendChild(t)}}}if(t.credits||t.socials){const s=document.createElement("div");if(s.className="credits-and-socials",n.appendChild(s),t.credits){const e=document.createElement("p");e.innerHTML=t.credits,s.appendChild(e)}if(t.socials){const n=document.createElement("div");n.className="socials flex flex-row gap-1 my-2 justify-end";for(let s of t.socials){const t=e.makeIcon(s.icon,{title:s.title,svgClass:"xl"});t.href=s.link,t.target="_blank",n.appendChild(t)}s.appendChild(n)}}(t.parent??document.body).appendChild(s),s.previousElementSibling.style.flexGrow="1",this.root=s}};class a{static _last_id=0;constructor(t,s,n={}){s||console.warn("Content is empty, add some components using 'callback' parameter!"),this._oncreate=s,this.id=e.guidGenerator();const o=n.size??[],i=n.position??[],l=n.draggable??!0,r=n.dockable??!1,c=n.modal??!1;let d=document.createElement("dialog");d.className="lexdialog "+(n.className??""),d.id=n.id??"dialog"+a._last_id++,d.dataset.modal=c,e.root.appendChild(d),e.doAsync((()=>{c?d.showModal():d.show()}),10);let h=this;const u=document.createElement("div");if(t&&(u.className="lexdialogtitle",u.innerHTML=t,u.setAttribute("draggable",!1),d.appendChild(u)),n.closable??1){this.close=()=>{n.onBeforeClose&&n.onBeforeClose(this),n.onclose?n.onclose(this.root):(d.close(),e.doAsync((()=>{h.panel.clear(),d.remove()}),150))};const s=e.makeIcon("X",{title:"Close",iconClass:"lexdialogcloser"});s.addEventListener("click",this.close);const o=e.makeIcon("Minus",{title:"Dock",iconClass:"ml-auto mr-2"});o.addEventListener("click",(()=>{const e=this.branchData,t=e.panel,s=t.root.childElementCount,n=t.branch(e.name,{closed:e.closed});n.components=e.components;for(let e of n.components)n.content.appendChild(e.root);e.childIndex<s&&t.root.insertChildAtIndex(n.root,e.childIndex),this.close()})),t?(r&&u.appendChild(o),u.appendChild(s)):(s.classList.add("notitle"),d.appendChild(s))}const p=new e.Panel;p.root.classList.add("lexdialogcontent"),t||p.root.classList.add("notitle"),s&&s.call(this,p),d.appendChild(p.root),p.root.querySelectorAll(".lexbranch").forEach((e=>e.classList.add("dialog"))),this.panel=p,this.root=d,this.title=u,l&&e.makeDraggable(d,Object.assign({targetClass:"lexdialogtitle"},n)),o.length&&"string"!=typeof o[0]&&(o[0]+="px"),o.length&&"string"!=typeof o[1]&&(o[1]+="px"),d.style.width=o[0]?o[0]:"25%",d.style.height=o[1]?o[1]:"auto",d.style.translate=n.position?"unset":"-50% -50%",n.size&&(this.size=o),d.style.left=i[0]??"50%",d.style.top=i[1]??"50%",p.root.style.height=t?"calc( 100% - "+(u.offsetHeight+30)+"px )":"calc( 100% - 51px )"}destroy(){this.root.remove()}refresh(){this.panel.root.innerHTML="",this._oncreate.call(this,this.panel)}setPosition(e,t){this.root.style.left=e+"px",this.root.style.top=t+"px"}setTitle(e){const t=this.root.querySelector(".lexdialogtitle");t&&(t.innerText=e)}}e.Dialog=a;class r extends a{static TOP=0;static BOTTOM=1;constructor(t,s,n={}){n.draggable=n.draggable??!1,n.closable=n.closable??!1;super(t,s,n);let o=this;if(e.addSignal("@on_branch_closed",this.panel,(e=>{this.dock_pos==r.BOTTOM&&(this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)")})),this.root.classList.add("pocket"),this.root.style.translate="none",this.root.style.top="0",this.root.style.left="unset",n.position||(this.root.style.right="3px",this.root.style.top="3px"),this.panel.root.style.width="100%",this.panel.root.style.height="100%",this.dock_pos=r.TOP,this.minimized=!1,this.title.tabIndex=-1,this.title.addEventListener("click",(e=>{this.title.eventCatched?this.title.eventCatched=!1:(this.size&&(this.minimized?this.root.style.height=this.size[1]:this.root.style.height="auto"),this.root.classList.toggle("minimized"),this.minimized=!this.minimized,this.dock_pos==r.BOTTOM&&(o.root.style.top=this.root.classList.contains("minimized")?"calc(100% - "+(o.title.offsetHeight+6)+"px)":"calc(100% - "+(o.root.offsetHeight+3)+"px)"))})),!n.draggable){const e=n.float;if(e)for(let t=0;t<e.length;t++){switch(e[t]){case"b":this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)";break;case"l":this.root.style.right="unset",this.root.style.left=n.position?n.position[1]:"3px"}}this.root.classList.add("dockable"),this.title.addEventListener("keydown",(function(e){e.ctrlKey&&(o.root.style.right="unset","ArrowLeft"==e.key?o.root.style.left="0px":"ArrowRight"==e.key?o.root.style.left="calc(100% - "+(o.root.offsetWidth+3)+"px)":"ArrowUp"==e.key?(o.root.style.top="0px",o.dock_pos=r.TOP):"ArrowDown"==e.key&&(o.root.style.top="calc(100% - "+(o.root.offsetHeight+3)+"px)",o.dock_pos=r.BOTTOM))}))}}}e.PocketDialog=r;class c{constructor(t,s,n={}){if(document.body.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove())),this.root=document.createElement("div"),this.root.className="lexcontextmenu",this.root.addEventListener("mouseleave",(function(){this.remove()})),this.items=[],this.colors={},s){const e={};e[s]=[],e.className="cmtitle",e.icon=n.icon,this.items.push(e)}const o=t.target.closest("dialog");o&&"true"==o.dataset.modal?this._parent=o:this._parent=e.root,this._parent.appendChild(this.root);const i=[t.x-48,t.y-8];if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();i[0]-=e.x,i[1]-=e.y}this.root.style.left=`${i[0]}px`,this.root.style.top=`${i[1]}px`}_adjustPosition(e,t,s=!1){let n=e.getBoundingClientRect(),o=parseInt(e.style.left),i=parseInt(e.style.top);if(s){let s=window.innerWidth-n.right;s<0&&(o=e.offsetLeft+(s-t)),s=window.innerHeight-(n.top+n.height),s<0&&(i=e.offsetTop+(s-t+20))}else{let s=n.width;n.left<0?o=t:window.innerWidth-n.right<0&&(o=window.innerWidth-s-t),n.top<0?i=t:n.top+n.height>window.innerHeight&&(e.style.marginTop="",i=window.innerHeight-n.height-t)}e.style.left=`${o}px`,e.style.top=`${i}px`}_createSubmenu(e,t,s,n){this.root.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove()));let o=document.createElement("div");o.className="lexcontextmenu",s.appendChild(o);for(let s=0;s<e[t].length;++s){const i=e[t][s],l=Object.keys(i)[0];this._createEntry(i,l,o,n)}const i=s.getBoundingClientRect();o.style.left=i.x+i.width+"px",o.style.marginTop="-31px",this._adjustPosition(o,6)}_createEntry(t,s,n,o){const i=t[s].length;let l=document.createElement("div");l.className="lexmenuboxentry"+(t.className?" "+t.className:""),l.id=t.id??"eId"+e.getSupportedDOMName(s),l.innerHTML="";const a=t.icon;a&&l.appendChild(e.makeIcon(a,{svgClass:"sm"}));const r=t.disabled;if(l.innerHTML+="<div class='lexentryname"+(r?" disabled":"")+"'>"+s+"</div>",n.appendChild(l),this.colors[s]&&(l.style.borderColor=this.colors[s]),""==s)return void(l.className+=" cmseparator");if(l.addEventListener("click",(n=>{if(n.stopPropagation(),n.stopImmediatePropagation(),r)return;const a=t.callback;a&&(a.call(this,s,l),this.root.remove()),i&&"click"==e.OPEN_CONTEXTMENU_ENTRY&&this._createSubmenu(t,s,l,++o)})),!i)return;const c=e.makeIcon("Menu",{svgClass:"sm"});l.appendChild(c),"mouseover"==e.OPEN_CONTEXTMENU_ENTRY&&l.addEventListener("mouseover",(e=>{l.built||(l.built=!0,this._createSubmenu(t,s,l,++o),e.stopPropagation())})),l.addEventListener("mouseleave",(()=>{o=-1,n.querySelectorAll(".lexcontextmenu").forEach((e=>e.remove()))}))}onCreate(){e.doAsync((()=>this._adjustPosition(this.root,6)))}add(t,s={}){s.constructor==Function&&(s={callback:s});const n=(t+="").split("/"),o=n[n.length-1];this.colors[o]=s.color;let i=0;const l=(e,t)=>{if(null==e)return;let o=null;if(t.forEach((t=>{const s=Object.keys(t).find((t=>t==e));s&&(o=t[s])})),o)l(n[i++],o);else{let o={};o[e]=[];const a=n[i++];a||(o.id=s.id,o.icon=s.icon,o.callback=s.callback,o.disabled=s.disabled??!1),t.push(o),l(a,o[e])}};l(n[i++],this.items);const a=e=>{let t=Object.keys(e)[0],s=e[t];if(s.length){if(null==s.find((e=>Object.keys(e)[0]==t))){const s={};s[t]=[],s.className="cmtitle",e[t].unshift(s)}for(let s of e[t]){let e=Object.keys(s)[0];for(let t=0;t<s[e].length;++t)a(s)}}};for(let e of this.items)a(e);for(let t of this.items){let s=Object.keys(t)[0],n="eId"+e.getSupportedDOMName(s);const o="#"+(t.id??n);this.root.querySelector(o)||this._createEntry(t,s,this.root,-1)}}setColor(t,s){"#"!==s[0]&&(s=e.rgbToHex(s)),this.colors[t]=s}}e.ContextMenu=c,e.addContextMenu=function(e,t,s,n){const o=new c(t,e,n);return s&&s(o),o.onCreate(),o};e.CanvasCurve=class{constructor(t,s={}){let n=document.createElement("div");n.className="curve "+(s.className?s.className:""),n.style.minHeight="50px",n.style.width=s.width||"100%",n.style.minWidth="50px",n.style.minHeight="20px",n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),n.linecolor=s.lineColor||"#555",n.value=t||[],n.xrange=s.xrange||[0,1],n.yrange=s.yrange||[0,1],n.defaulty=null!=s.defaulty?s.defaulty:0,n.no_overlap=s.noOverlap||!1,n.show_samples=s.showSamples||0,n.allow_add_values=s.allowAddValues??!0,n.draggable_x=s.draggableX??!0,n.draggable_y=s.draggableY??!0,n.smooth=(s.smooth&&"number"==typeof s.smooth?s.smooth:.3)||!1,n.move_out=s.moveOutAction??e.CURVE_MOVEOUT_DELETE,e.addSignal("@on_new_color_scheme",((t,o)=>{n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),this.redraw()})),this.element=n;let o=document.createElement("canvas");function i(e){return[o.width*(e[0]-n.xrange[0])/n.xrange[1],o.height*(e[1]-n.yrange[0])/n.yrange[1]]}function l(e){return[e[0]*n.xrange[1]/o.width+n.xrange[0],e[1]*n.yrange[1]/o.height+n.yrange[0]]}o.width=s.width||200,o.height=s.height||50,n.appendChild(o),this.canvas=o,n.addEventListener("mousedown",(function(t){document.addEventListener("mousemove",c),document.addEventListener("mouseup",d);var s=o.getBoundingClientRect(),h=t.clientX-s.left,m=t.clientY-s.top;if(a=function(e,t){for(var s=1e5,o=-1,l=0;l<n.value.length;l++){var a=u([e,t],i(n.value[l]));a<s&&a<8&&(s=a,o=l)}return o}(h,o.height-m),t.button==e.MOUSE_LEFT_CLICK&&-1==a&&n.allow_add_values){var f=l([h,o.height-m]);n.value.push(f),p(),a=n.value.indexOf(f)}r=[h,m],n.redraw(),t.preventDefault(),t.stopPropagation()})),n.getValueAt=function(e){if(e<n.xrange[0]||e>n.xrange[1])return n.defaulty;let t=[n.xrange[0],n.defaulty],s=0;for(let o=0;o<n.value.length;o+=1){let i=n.value[o];if(e==i[0])return i[1];if(e<i[0])return s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s;t=i}return v=[n.xrange[1],n.defaulty],s=(e-t[0])/(v[0]-t[0]),t[1]*(1-s)+v[1]*s},n.resample=function(e){let t=[],s=(n.xrange[1]-n.xrange[0])/e;for(let e=n.xrange[0];e<=n.xrange[1];e+=s)t.push(n.getValueAt(e));return t},n.addValue=function(e){for(let t=0;t<n.value;t++){if(!(n.value[t][0]<e[0]))return n.value.splice(t,0,e),void redraw()}n.value.push(e),redraw()};let a=-1;n.redraw=function(t={}){t.value&&(n.value=t.value),t.xrange&&(n.xrange=t.xrange),t.yrange&&(n.yrange=t.yrange),t.smooth&&(n.smooth=t.smooth);var s=o.getContext("2d");s.setTransform(1,0,0,1,0,0),s.translate(0,o.height),s.scale(1,-1),s.fillStyle=n.bgcolor,s.fillRect(0,0,o.width,o.height),s.strokeStyle=n.linecolor,s.beginPath();var l=i([n.xrange[0],n.defaulty]);s.moveTo(l[0],l[1]);let r=[l[0],l[1]];for(var c in n.value){l=i(n.value[c]),r.push(l[0]),r.push(l[1]),n.smooth||s.lineTo(l[0],l[1])}l=i([n.xrange[1],n.defaulty]),r.push(l[0]),r.push(l[1]),n.smooth?e.drawSpline(s,r,n.smooth):(s.lineTo(l[0],l[1]),s.stroke());for(c=0;c<n.value.length;c+=1){l=i(n.value[c]),s.fillStyle=a==c?n.activepointscolor:n.pointscolor,s.beginPath(),s.arc(l[0],l[1],a==c?4:3,0,2*Math.PI),s.fill()}if(n.show_samples){var d=n.resample(n.show_samples);s.fillStyle="#888";for(c=0;c<d.length;c+=1){l=i([c*((n.xrange[1]-n.xrange[0])/n.show_samples)+n.xrange[0],d[c]]),s.beginPath(),s.arc(l[0],l[1],2,0,2*Math.PI),s.fill()}}};var r=[0,0];function c(t){var s=o.getBoundingClientRect(),i=t.clientX-s.left,c=t.clientY-s.top;i<0?i=0:i>o.width&&(i=o.width),c<0?c=0:c>o.height&&(c=o.height);const m=[t.clientX-s.left,t.clientY-s.top];if(-1!=a&&u(m,[i,c])>.5*o.height){if(n.move_out==e.CURVE_MOVEOUT_DELETE)n.value.splice(a,1);else{const e=[m[0]-i,m[1]-c];let t=n.value[a];t[0]=0==e[0]?t[0]:e[0]<0?n.xrange[0]:n.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?n.yrange[1]:n.yrange[0]}d(t)}else{var f=l([-(n.draggable_x?r[0]-i:0),n.draggable_y?r[1]-c:0]);if(-1!=a){var g=n.xrange[0],v=n.xrange[1];n.no_overlap&&(a>0&&(g=n.value[a-1][0]),a<n.value.length-1&&(v=n.value[a+1][0]));var C=n.value[a];C[0]+=f[0],C[1]+=f[1],C[0]<g?C[0]=g:C[0]>v&&(C[0]=v),C[1]<n.yrange[0]?C[1]=n.yrange[0]:C[1]>n.yrange[1]&&(C[1]=n.yrange[1])}p(),n.redraw(),r[0]=i,r[1]=c,h(t),t.preventDefault(),t.stopPropagation()}}function d(e){a=-1,n.redraw(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),h(e),e.preventDefault(),e.stopPropagation()}function h(e){s.callback&&s.callback.call(n,n.value,e)}function u(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function p(){var e=null;-1!=a&&(e=n.value[a]),n.value.sort((function(e,t){return e[0]-t[0]})),e&&(a=n.value.indexOf(e))}return n.redraw(),this}redraw(e={}){this.element.redraw(e)}};e.CanvasDial=class{constructor(t,s,n={}){let o=document.createElement("div");o.className="dial "+(n.className?n.className:""),o.style.width=o.style.height=n.size||"100%",o.style.minWidth=o.style.minHeight="50px",o.bgcolor=n.bgColor||e.getThemeColor("global-dark-background"),o.pointscolor=n.pointsColor||e.getThemeColor("global-color-accent-light"),o.linecolor=n.lineColor||"#555",o.value=s||[],o.xrange=n.xrange||[0,1],o.yrange=n.yrange||[0,1],o.defaulty=null!=n.defaulty?n.defaulty:0,o.no_overlap=n.noOverlap||!1,o.show_samples=n.showSamples||0,o.allow_add_values=n.allowAddValues??!0,o.draggable_x=n.draggableX??!0,o.draggable_y=n.draggableY??!0,o.smooth=(n.smooth&&"number"==typeof n.smooth?n.smooth:.3)||!1,o.move_out=n.moveOutAction??e.CURVE_MOVEOUT_DELETE,this.element=o;let i=document.createElement("canvas");function l(e,t){return Math.pow(e[0],2),[i.width*(e[0]-o.xrange[0])/o.xrange[1],i.height*(e[1]-o.yrange[0])/o.yrange[1]]}function a(e){return[e[0]*o.xrange[1]/i.width+o.xrange[0],e[1]*o.yrange[1]/i.height+o.yrange[0]]}i.width=i.height=n.size||200,o.appendChild(i),this.canvas=i,o.addEventListener("mousedown",(function(t){document.addEventListener("mousemove",d),document.addEventListener("mouseup",h);var s=i.getBoundingClientRect(),n=t.clientX-s.left,u=t.clientY-s.top;if(r=function(e,t){for(var s=1e5,n=-1,i=0;i<o.value.length;i++){var a=p([e,t],l(o.value[i]));a<s&&a<8&&(s=a,n=i)}return n}(n,i.height-u),t.button==e.MOUSE_LEFT_CLICK&&-1==r&&o.allow_add_values){var f=a([n,i.height-u]);o.value.push(f),m(),r=o.value.indexOf(f)}c=[n,u],o.redraw(),t.preventDefault(),t.stopPropagation()})),o.getValueAt=function(e){if(e<o.xrange[0]||e>o.xrange[1])return o.defaulty;for(var t=[o.xrange[0],o.defaulty],s=0,n=0;n<o.value.length;n+=1){var i=o.value[n];if(e==i[0])return i[1];if(e<i[0])return s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s;t=i}return i=[o.xrange[1],o.defaulty],s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s},o.resample=function(e){for(var t=[],s=(o.xrange[1]-o.xrange[0])/e,n=o.xrange[0];n<=o.xrange[1];n+=s)t.push(o.getValueAt(n));return t},o.addValue=function(e){for(var t=0;t<o.value;t++){if(!(o.value[t][0]<e[0]))return o.value.splice(t,0,e),void redraw()}o.value.push(e),redraw()};var r=-1;o.redraw=function(e={}){e.value&&(o.value=e.value),e.xrange&&(o.xrange=e.xrange),e.yrange&&(o.yrange=e.yrange),e.smooth&&(o.smooth=e.smooth);var t=i.getContext("2d");t.setTransform(1,0,0,1,0,0),t.translate(0,i.height),t.scale(1,-1),t.fillStyle=o.bgcolor,t.fillRect(0,0,i.width,i.height),t.strokeStyle=o.linecolor,t.beginPath();var s=l([o.xrange[0],o.defaulty]);t.moveTo(s[0],s[1]);let n=[s[0],s[1]];for(var a in o.value){s=l(o.value[a]),n.push(s[0]),n.push(s[1])}s=l([o.xrange[1],o.defaulty]),n.push(s[0]),n.push(s[1]);s=l([0,0]),t.fillStyle="gray",t.beginPath(),t.arc(s[0],s[1],3,0,2*Math.PI),t.fill();for(a=0;a<o.value.length;a+=1){s=l(o.value[a]),t.fillStyle=r==a?"white":o.pointscolor,t.beginPath(),t.arc(s[0],s[1],r==a?4:3,0,2*Math.PI),t.fill()}if(o.show_samples){var c=o.resample(o.show_samples);t.fillStyle="#888";for(a=0;a<c.length;a+=1){s=l([a*((o.xrange[1]-o.xrange[0])/o.show_samples)+o.xrange[0],c[a]]),t.beginPath(),t.arc(s[0],s[1],2,0,2*Math.PI),t.fill()}}};var c=[0,0];function d(t){var s=i.getBoundingClientRect(),n=t.clientX-s.left,l=t.clientY-s.top;n<0?n=0:n>i.width&&(n=i.width),l<0?l=0:l>i.height&&(l=i.height);const d=[t.clientX-s.left,t.clientY-s.top];if(-1!=r&&p(d,[n,l])>.5*i.height){if(o.move_out==e.CURVE_MOVEOUT_DELETE)o.value.splice(r,1);else{const e=[d[0]-n,d[1]-l];let t=o.value[r];t[0]=0==e[0]?t[0]:e[0]<0?o.xrange[0]:o.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?o.yrange[1]:o.yrange[0]}h(t)}else{var f=a([-(o.draggable_x?c[0]-n:0),o.draggable_y?c[1]-l:0]);if(-1!=r){var g=o.xrange[0],v=o.xrange[1];o.no_overlap&&(r>0&&(g=o.value[r-1][0]),r<o.value.length-1&&(v=o.value[r+1][0]));var C=o.value[r];C[0]+=f[0],C[1]+=f[1],C[0]<g?C[0]=g:C[0]>v&&(C[0]=v),C[1]<o.yrange[0]?C[1]=o.yrange[0]:C[1]>o.yrange[1]&&(C[1]=o.yrange[1])}m(),o.redraw(),c[0]=n,c[1]=l,u(t),t.preventDefault(),t.stopPropagation()}}function h(e){r=-1,o.redraw(),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),u(e),e.preventDefault(),e.stopPropagation()}function u(e){n.callback&&n.callback.call(o,o.value,e)}function p(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function m(){var e=null;-1!=r&&(e=o.value[r]),o.value.sort((function(e,t){return e[0]-t[0]})),e&&(r=o.value.indexOf(e))}return o.redraw(),this}redraw(e={}){this.element.redraw(e)}};class d{static COLORS=[[255,0,0],[0,255,0],[0,0,255],[0,128,128],[128,0,128],[128,128,0],[255,128,0],[255,0,128],[0,128,255],[128,0,255]];static GRID_SIZE=64;constructor(t,s,n={}){this.circular=n.circular??!1,this.showNames=n.showNames??!0,this.size=n.size??[200,200],this.points=t??[],this.callback=s,this.weights=[],this.weightsObj={},this.currentPosition=new e.vec2(0,0),this.circleCenter=[0,0],this.circleRadius=1,this.margin=8,this.dragging=!1,this._valuesChanged=!0,this._selectedPoint=null,this.root=e.makeContainer(["auto","auto"]),this.root.tabIndex="1",this.root.addEventListener("mousedown",(function(e){var t=o.root.ownerDocument;return t.addEventListener("mouseup",l),t.addEventListener("mousemove",i),e.stopPropagation(),e.preventDefault(),o.dragging=!0,!0}));const o=this;function i(t){if(!o.dragging)return;const s=o.margin,n=o.root.getBoundingClientRect();let i=new e.vec2;i.set(t.x-n.x-.5*o.size[0],t.y-n.y-.5*o.size[1]);var l=o.currentPosition;if(l.set(e.clamp(i.x/(.5*o.size[0]-s),-1,1),e.clamp(i.y/(.5*o.size[1]-s),-1,1)),o.circular){const t=new e.vec2(0,0);l.dst(t)>1&&(l=l.nrm())}return o.renderToCanvas(o.canvas.getContext("2d",{willReadFrequently:!0}),o.canvas),o.computeWeights(l),o.callback&&o.callback(o.weightsObj,o.weights,l),!0}function l(e){o.dragging=!1;var t=o.root.ownerDocument;t.removeEventListener("mouseup",l),t.removeEventListener("mousemove",i)}this.canvas=document.createElement("canvas"),this.canvas.width=this.size[0],this.canvas.height=this.size[1],this.root.appendChild(this.canvas);const a=this.canvas.getContext("2d",{willReadFrequently:!0});this.renderToCanvas(a,this.canvas)}computeWeights(t){if(!this.points.length)return;let s=this._precomputedWeights;s&&!this._valuesChanged||(s=this.precomputeWeights());let n=this.weights;n.length=this.points.length;for(var o=0;o<n.length;++o)n[o]=0;const i=d.GRID_SIZE;let l=0,a=new e.vec2;for(var r=0;r<i;++r)for(var c=0;c<i;++c){a.set(c/i*2-1,r/i*2-1);var h=2*c+r*i*2,u=s[h];t.dst(a)<s[h+1]+.001&&(n[u]+=1,l++)}for(o=0;o<n.length;++o)n[o]/=l,this.weightsObj[this.points[o].name]=n[o];return n}precomputeWeights(){this._valuesChanged=!1;const t=this.points.length,s=d.GRID_SIZE,n=2*s*s;let o=new e.vec2;this._precomputedWeights&&this._precomputedWeights.length==n||(this._precomputedWeights=new Float32Array(n));let i=this._precomputedWeights;this._precomputedWeightsGridSize=s;for(let n=0;n<s;++n)for(let l=0;l<s;++l){let a=-1,r=1e5;for(let i=0;i<t;++i){o.set(l/s*2-1,n/s*2-1);let t=new e.vec2;t.fromArray(this.points[i].pos);let c=o.dst(t);c>r||(a=i,r=c)}i[2*l+2*n*s]=a,i[2*l+2*n*s+1]=r}return i}precomputeWeightsToImage(t){if(!this.points.length)return null;const s=d.GRID_SIZE;var n=this._precomputedWeights;n&&!this._valuesChanged&&this._precomputedWeightsGridSize==s||(n=this.precomputeWeights());var o=this.imageCanvas;o||(o=this.imageCanvas=document.createElement("canvas")),o.width=o.height=s;var i=o.getContext("2d",{willReadFrequently:!0}),l=this.weights;l.length=this.points.length;for(var a=0;a<l.length;++a)l[a]=0;let r=0,c=i.getImageData(0,0,s,s),h=new e.vec2;for(var u=0;u<s;++u)for(var p=0;p<s;++p){h.set(p/s*2-1,u/s*2-1);const e=4*p+u*s*4,o=2*p+u*s*2,i=n[o],a=d.COLORS[i%d.COLORS.length];var m=t.dst(h)<n[o+1]+.001;m&&(l[i]+=1,r++),c.data[e]=a[0]+(m?128:0),c.data[e+1]=a[1]+(m?128:0),c.data[e+2]=a[2]+(m?128:0),c.data[e+3]=255}for(let e=0;e<l.length;++e)l[e]/=r;return i.putImageData(c,0,0),o}addPoint(t,s){if(this.findPoint(t))return void console.warn("CanvasMap2D.addPoint: There is already a point with that name");s||(s=[this.currentPosition[0],this.currentPosition[1]]),s[0]=e.clamp(s[0],-1,1),s[1]=e.clamp(s[1],-1,1);const n={name:t,pos:s};return this.points.push(n),this._valuesChanged=!0,n}removePoint(e){const t=this.points.findIndex((t=>t.name==e));t>-1&&(this.points.splice(t,1),this._valuesChanged=!0)}findPoint(e){return this.points.find((t=>t.name==e))}clear(){this.points.length=0,this._precomputedWeights=null,this._canvas=null,this._selectedPoint=null}renderToCanvas(t,s){const n=this.margin,o=this.size[0],i=this.size[1];t.fillStyle="black",t.strokeStyle="#BBB",t.clearRect(0,0,o,i),this.circular?(this.circleCenter[0]=.5*o,this.circleCenter[1]=.5*i,this.circleRadius=.5*i-n,t.lineWidth=1,t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.fill(),t.stroke(),t.beginPath(),t.moveTo(this.circleCenter[0]+.5,this.circleCenter[1]-this.circleRadius),t.lineTo(this.circleCenter[0]+.5,this.circleCenter[1]+this.circleRadius),t.moveTo(this.circleCenter[0]-this.circleRadius,this.circleCenter[1]),t.lineTo(this.circleCenter[0]+this.circleRadius,this.circleCenter[1]),t.stroke()):(t.fillRect(n,n,o-2*n,i-2*n),t.strokeRect(n,n,o-2*n,i-2*n));var l=this.precomputeWeightsToImage(this.currentPosition);l&&(t.globalAlpha=.5,t.imageSmoothingEnabled=!1,this.circular?(t.save(),t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.clip(),t.drawImage(l,this.circleCenter[0]-this.circleRadius,this.circleCenter[1]-this.circleRadius,2*this.circleRadius,2*this.circleRadius),t.restore()):t.drawImage(l,n,n,o-2*n,i-2*n),t.imageSmoothingEnabled=!0,t.globalAlpha=1);for(let s=0;s<this.points.length;++s){const l=this.points[s];let a=.5*l.pos[0]+.5,r=.5*l.pos[1]+.5;a=a*(o-2*n)+n,r=r*(i-2*n)+n,a=e.clamp(a,n,o-n),r=e.clamp(r,n,i-n),t.fillStyle=l==this._selectedPoint?"#CDF":"#BCD",t.beginPath(),t.arc(a,r,3,0,2*Math.PI),t.fill(),this.showNames&&t.fillText(l.name,a+5,r+5)}t.fillStyle="white",t.beginPath();var a=.5*this.currentPosition.x+.5,r=.5*this.currentPosition.y+.5;a=a*(o-2*n)+n,r=r*(i-2*n)+n,a=e.clamp(a,n,o-n),r=e.clamp(r,n,i-n),t.arc(a,r,4,0,2*Math.PI),t.fill()}}e.CanvasMap2D=d;e.Skeleton=class{constructor(t){if(this.root=e.makeContainer(["auto","auto"],"flex flex-row lexskeleton"),t.constructor===String)this.root.innerHTML=t;else{t=[].concat(t);for(let e of t)this.root.appendChild(e)}}destroy(){this.root.dataset.closed=!0,e.doAsync((()=>{this.root.remove(),this.root=null}),200)}},Object.defineProperty(String.prototype,"lastChar",{get:function(){return this[this.length-1]},enumerable:!0,configurable:!0}),Element.prototype.insertChildAtIndex=function(e,t=1/0){t>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[t])},Element.prototype.hasClass=function(e){return!!(e=[].concat(e)).filter((e=>this.classList.contains(e))).length},Element.prototype.addClass=function(e){e&&this.classList.add(e)},Element.prototype.getComputedSize=function(){return{width:this.offsetWidth,height:this.offsetHeight}},Element.prototype.getParentArea=function(){let e=this.parentElement;for(;e;){if(e.classList.contains("lexarea"))return e;e=e.parentElement}},Element.prototype.listen=function(e,t,s){this[s=s??"_on"+e]=t,this.addEventListener(e,t)},Element.prototype.ignore=function(e,t){const s=this[t=t??"_on"+e];this.removeEventListener(e,s)};const h={Abc:[24,24,[],"regular","M17 15q-.425 0-.712-.288T16 14v-4q0-.425.288-.712T17 9h3q.425 0 .713.288T21 10v1h-1.5v-.5h-2v3h2V13H21v1q0 .425-.288.713T20 15zm-7.5 0V9h4q.425 0 .713.288T14.5 10v1q0 .425-.288.713T13.5 12q.425 0 .713.288T14.5 13v1q0 .425-.288.713T13.5 15zm1.5-3.75h2v-.75h-2zm0 2.25h2v-.75h-2zM3 15v-5q0-.425.288-.712T4 9h3q.425 0 .713.288T8 10v5H6.5v-1.5h-2V15zm1.5-3h2v-1.5h-2z"],Clone:[512,512,[],"regular","M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"],IdBadge:[384,512,[],"regular","M256 48l0 16c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-16L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16l-64 0zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM160 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"],Paste:[512,512,[],"regular","M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z"],Trash3:[448,512,[],"regular","M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z"],FilePdf:[512,512,[],"regular","M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"],FileWord:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"],FilePowerpoint:[384,512,[],"regular","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z"],FileExcel:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"],Settings3:[640,512,[],"solid","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"],MessagesCircle:[640,512,[],"regular","M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"],LinkOff:[640,512,["ChainBroken","ChainOff","Unlink"],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"],StreetView:[512,512,[],"solid","M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"],ClosedCaptioning:[576,512,["CC"],"regular","M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"],ChildReaching:[384,512,[],"solid","M256 64A64 64 0 1 0 128 64a64 64 0 1 0 128 0zM152.9 169.3c-23.7-8.4-44.5-24.3-58.8-45.8L74.6 94.2C64.8 79.5 45 75.6 30.2 85.4s-18.7 29.7-8.9 44.4L40.9 159c18.1 27.1 42.8 48.4 71.1 62.4L112 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-258.4c29.1-14.2 54.4-36.2 72.7-64.2l18.2-27.9c9.6-14.8 5.4-34.6-9.4-44.3s-34.6-5.5-44.3 9.4L291 122.4c-21.8 33.4-58.9 53.6-98.8 53.6c-12.6 0-24.9-2-36.6-5.8c-.9-.3-1.8-.7-2.7-.9z"],HourglassHalf:[384,512,[],"regular","M0 24C0 10.7 10.7 0 24 0L360 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 19c0 40.3-16 79-44.5 107.5L225.9 256l81.5 81.5C336 366 352 404.7 352 445l0 19 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-19c0-40.3 16-79 44.5-107.5L158.1 256 76.5 174.5C48 146 32 107.3 32 67l0-19-8 0C10.7 48 0 37.3 0 24zM110.5 371.5c-3.9 3.9-7.5 8.1-10.7 12.5l184.4 0c-3.2-4.4-6.8-8.6-10.7-12.5L192 289.9l-81.5 81.5zM284.2 128C297 110.4 304 89 304 67l0-19L80 48l0 19c0 22.1 7 43.4 19.8 61l184.4 0z"],PaperPlane:[512,512,[],"regular","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],Axis3DArrows:[24,24,[],"solid","m12 2l4 4h-3v7.85l6.53 3.76L21 15.03l1.5 5.47l-5.5 1.46l1.53-2.61L12 15.58l-6.53 3.77L7 21.96L1.5 20.5L3 15.03l1.47 2.58L11 13.85V6H8z"],PersonWalkingDashedLineArrowRight:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80zM392 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm24 152c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16zM392 320c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-13.3-10.7-24-24-24zm24 120c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48z"],PersonWalkingArrowLoopLeft:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zm347.7 119c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L461.3 384l18.7 0c88.4 0 160-71.6 160-160s-71.6-160-160-160L352 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c53 0 96 43 96 96s-43 96-96 96l-18.7 0 25.4-25.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3l80 80z"],PersonWalkingArrowRight:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80z"],ClapperboardClosed:[512,512,[],"solid","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"],UserOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L381.9 274c48.5-23.2 82.1-72.7 82.1-130C464 64.5 399.5 0 320 0C250.4 0 192.4 49.3 178.9 114.9L38.8 5.1zM545.5 512L528 512 284.3 320l-59 0C136.2 320 64 392.2 64 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0 .3 0z"],PhotoFilm:[640,512,["Media"],"solid","M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"],Chart:[448,512,[],"solid","M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z"],HandsAslInterpreting:[640,512,["ASL"],"solid","M156.6 46.3c7.9-15.8 1.5-35-14.3-42.9s-35-1.5-42.9 14.3L13.5 189.4C4.6 207.2 0 226.8 0 246.7L0 256c0 70.7 57.3 128 128 128l72 0 8 0 0-.3c35.2-2.7 65.4-22.8 82.1-51.7c8.8-15.3 3.6-34.9-11.7-43.7s-34.9-3.6-43.7 11.7c-7 12-19.9 20-34.7 20c-22.1 0-40-17.9-40-40s17.9-40 40-40c14.8 0 27.7 8 34.7 20c8.8 15.3 28.4 20.5 43.7 11.7s20.5-28.4 11.7-43.7c-12.8-22.1-33.6-39.1-58.4-47.1l80.8-22c17-4.6 27.1-22.2 22.5-39.3s-22.2-27.1-39.3-22.5L194.9 124.6l81.6-68c13.6-11.3 15.4-31.5 4.1-45.1S249.1-3.9 235.5 7.4L133.6 92.3l23-46zM483.4 465.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l85.9-171.7c8.9-17.8 13.5-37.4 13.5-57.2l0-9.3c0-70.7-57.3-128-128-128l-72 0-8 0 0 .3c-35.2 2.7-65.4 22.8-82.1 51.7c-8.9 15.3-3.6 34.9 11.7 43.7s34.9 3.6 43.7-11.7c7-12 19.9-20 34.7-20c22.1 0 40 17.9 40 40s-17.9 40-40 40c-14.8 0-27.7-8-34.7-20c-8.9-15.3-28.4-20.5-43.7-11.7s-20.5 28.4-11.7 43.7c12.8 22.1 33.6 39.1 58.4 47.1l-80.8 22c-17.1 4.7-27.1 22.2-22.5 39.3s22.2 27.1 39.3 22.5l100.7-27.5-81.6 68c-13.6 11.3-15.4 31.5-4.1 45.1s31.5 15.4 45.1 4.1l101.9-84.9-23 46z"],HandPointRight:[512,512,[],"regular","M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z"],HandPointUp:[384,512,[],"regular","M64 64l0 177.6c5.2-1 10.5-1.6 16-1.6l16 0 0-32L96 64c0-8.8-7.2-16-16-16s-16 7.2-16 16zM80 288c-17.7 0-32 14.3-32 32c0 0 0 0 0 0l0 24c0 66.3 53.7 120 120 120l48 0c52.5 0 97.1-33.7 113.4-80.7c-3.1 .5-6.2 .7-9.4 .7c-20 0-37.9-9.2-49.7-23.6c-9 4.9-19.4 7.6-30.3 7.6c-15.1 0-29-5.3-40-14c-11 8.8-24.9 14-40 14l-40 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-40 0zM0 320s0 0 0 0c0-18 6-34.6 16-48L16 64C16 28.7 44.7 0 80 0s64 28.7 64 64l0 82c5.1-1.3 10.5-2 16-2c25.3 0 47.2 14.7 57.6 36c7-2.6 14.5-4 22.4-4c20 0 37.9 9.2 49.7 23.6c9-4.9 19.4-7.6 30.3-7.6c35.3 0 64 28.7 64 64l0 64 0 24c0 92.8-75.2 168-168 168l-48 0C75.2 512 0 436.8 0 344l0-24zm336-64c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48 0 16c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM160 240c5.5 0 10.9 .7 16 2l0-2 0-32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32 16 0zm64 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 0-16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 24z"],HandPointDown:[384,512,[],"regular","M64 448l0-177.6c5.2 1 10.5 1.6 16 1.6l16 0 0 32 0 144c0 8.8-7.2 16-16 16s-16-7.2-16-16zM80 224c-17.7 0-32-14.3-32-32c0 0 0 0 0 0l0-24c0-66.3 53.7-120 120-120l48 0c52.5 0 97.1 33.7 113.4 80.7c-3.1-.5-6.2-.7-9.4-.7c-20 0-37.9 9.2-49.7 23.6c-9-4.9-19.4-7.6-30.3-7.6c-15.1 0-29 5.3-40 14c-11-8.8-24.9-14-40-14l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0-40 0zM0 192s0 0 0 0c0 18 6 34.6 16 48l0 208c0 35.3 28.7 64 64 64s64-28.7 64-64l0-82c5.1 1.3 10.5 2 16 2c25.3 0 47.2-14.7 57.6-36c7 2.6 14.5 4 22.4 4c20 0 37.9-9.2 49.7-23.6c9 4.9 19.4 7.6 30.3 7.6c35.3 0 64-28.7 64-64l0-64 0-24C384 75.2 308.8 0 216 0L168 0C75.2 0 0 75.2 0 168l0 24zm336 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64zM160 272c5.5 0 10.9-.7 16-2l0 2 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 16 0zm64-24l0-40c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-24z"],HandPointLeft:[512,512,[],"regular","M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z"],HandScissors:[512,512,[],"regular","M.2 276.3c-1.2-35.3 26.4-65 61.7-66.2l3.3-.1L57 208.1C22.5 200.5 .7 166.3 8.3 131.8S50.2 75.5 84.7 83.2l173 38.3c2.3-2.9 4.7-5.7 7.1-8.5l18.4-20.3C299.9 74.5 323.5 64 348.3 64l10.2 0c54.1 0 104.1 28.7 131.3 75.4l1.5 2.6c13.6 23.2 20.7 49.7 20.7 76.6L512 344c0 66.3-53.7 120-120 120l-8 0-96 0c-35.3 0-64-28.7-64-64c0-2.8 .2-5.6 .5-8.3c-19.4-11-32.5-31.8-32.5-55.7c0-.8 0-1.6 0-2.4L66.4 338c-35.3 1.2-65-26.4-66.2-61.7zm63.4-18.2c-8.8 .3-15.7 7.7-15.4 16.5s7.7 15.7 16.5 15.4l161.5-5.6c9.8-.3 18.7 5.3 22.7 14.2s2.2 19.3-4.5 26.4c-2.8 2.9-4.4 6.7-4.4 11c0 8.8 7.2 16 16 16c9.1 0 17.4 5.1 21.5 13.3s3.2 17.9-2.3 25.1c-2 2.7-3.2 6-3.2 9.6c0 8.8 7.2 16 16 16l96 0 8 0c39.8 0 72-32.2 72-72l0-125.4c0-18.4-4.9-36.5-14.2-52.4l-1.5-2.6c-18.6-32-52.8-51.6-89.8-51.6l-10.2 0c-11.3 0-22 4.8-29.6 13.1l-17.5-15.9 17.5 15.9-18.4 20.3c-.6 .6-1.1 1.3-1.7 1.9l57 13.2c8.6 2 14 10.6 12 19.2s-10.6 14-19.2 12l-85.6-19.7L74.3 130c-8.6-1.9-17.2 3.5-19.1 12.2s3.5 17.2 12.2 19.1l187.5 41.6c10.2 2.3 17.8 10.9 18.7 21.4l.1 1c.6 6.6-1.5 13.1-5.8 18.1s-10.6 7.9-17.2 8.2L63.6 258.1z"],HandSpock:[576,512,[],"regular","M170.2 80.8C161 47 180.8 12 214.6 2.4c34-9.6 69.4 10.2 79 44.2l30.3 107.1L337.1 84c6.6-34.7 40.1-57.5 74.8-50.9c31.4 6 53 33.9 52 64.9c10-2.6 20.8-2.8 31.5-.1c34.3 8.6 55.1 43.3 46.6 77.6L486.7 397.2C469.8 464.7 409.2 512 339.6 512l-33.7 0c-56.9 0-112.2-19-157.2-53.9l-92-71.6c-27.9-21.7-32.9-61.9-11.2-89.8s61.9-32.9 89.8-11.2l17 13.2L100.5 167.5c-13-32.9 3.2-70.1 36-83c11.1-4.4 22.7-5.4 33.7-3.7zm77.1-21.2c-2.4-8.5-11.2-13.4-19.7-11s-13.4 11.2-11 19.7l54.8 182.4c3.5 12.3-3.3 25.2-15.4 29.3s-25.3-2-30-13.9L174.9 138.1c-3.2-8.2-12.5-12.3-20.8-9s-12.3 12.5-9 20.8l73.3 185.6c12 30.3-23.7 57-49.4 37l-63.1-49.1c-7-5.4-17-4.2-22.5 2.8s-4.2 17 2.8 22.5l92 71.6c36.5 28.4 81.4 43.8 127.7 43.8l33.7 0c47.5 0 89-32.4 100.5-78.5l55.4-221.6c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-26 104C435.6 271.8 425 280 413 280c-16.5 0-28.9-15-25.8-31.2L415.7 99c1.7-8.7-4-17.1-12.7-18.7s-17.1 4-18.7 12.7L352.5 260c-2.2 11.6-12.4 20-24.2 20c-11 0-20.7-7.3-23.7-17.9L247.4 59.6z"],HandBackFist:[448,512,["HandRock"],"regular","M144 64c0-8.8 7.2-16 16-16s16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16l0 104c0 31.3-20 58-48 67.9c-9.6 3.4-16 12.5-16 22.6L304 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-117.8c38-20.1 64-60.1 64-106.2l0-104c0-35.3-28.7-64-64-64c-2.8 0-5.6 .2-8.3 .5C332.8 77.1 311.9 64 288 64c-2.8 0-5.6 .2-8.3 .5C268.8 45.1 247.9 32 224 32c-2.8 0-5.6 .2-8.3 .5C204.8 13.1 183.9 0 160 0C124.7 0 96 28.7 96 64l0 64.3c-11.7 7.4-22.5 16.4-32 26.9l17.8 16.1L64 155.2l-9.4 10.5C40 181.8 32 202.8 32 224.6l0 12.8c0 49.6 24.2 96.1 64.8 124.5l13.8-19.7L96.8 361.9l8.9 6.2c6.9 4.8 14.4 8.6 22.3 11.3L128 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-128.1c0-12.6-9.8-23.1-22.4-23.9c-7.3-.5-14.3-2.9-20.3-7.1l-13.1 18.7 13.1-18.7-8.9-6.2C96.6 303.1 80 271.3 80 237.4l0-12.8c0-9.9 3.7-19.4 10.3-26.8l9.4-10.5c3.8-4.2 7.9-8.1 12.3-11.6l0 32.3c0 8.8 7.2 16 16 16s16-7.2 16-16l0-65.7 0-14.3 0-64z"],HandLizard:[512,512,[],"regular","M72 112c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-104 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l152 0c4.5 0 8.9 1.3 12.7 3.6l64 40c7 4.4 11.3 12.1 11.3 20.4l0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-10.7L281.1 384 136 384c-39.8 0-72-32.2-72-72s32.2-72 72-72l104 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L72 208c-39.8 0-72-32.2-72-72S32.2 64 72 64l209.6 0c46.7 0 90.9 21.5 119.7 58.3l78.4 100.1c20.9 26.7 32.3 59.7 32.3 93.7L512 424c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-107.9c0-23.2-7.8-45.8-22.1-64.1L363.5 151.9c-19.7-25.2-49.9-39.9-81.9-39.9L72 112z"],HandPeace:[512,512,[],"regular","M250.8 1.4c-35.2-3.7-66.6 21.8-70.3 57L174 119 156.7 69.6C145 36.3 108.4 18.8 75.1 30.5S24.2 78.8 35.9 112.1L88.7 262.2C73.5 276.7 64 297.3 64 320c0 0 0 0 0 0l0 24c0 92.8 75.2 168 168 168l48 0c92.8 0 168-75.2 168-168l0-72 0-16 0-32c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4c-10.4-21.3-32.3-36-57.6-36c-.7 0-1.5 0-2.2 0l5.9-56.3c3.7-35.2-21.8-66.6-57-70.3zm-.2 155.4C243.9 166.9 240 179 240 192l0 48c0 .7 0 1.4 0 2c-5.1-1.3-10.5-2-16-2l-7.4 0-5.4-15.3 17-161.3c.9-8.8 8.8-15.2 17.6-14.2s15.2 8.8 14.2 17.6l-9.5 90.1zM111.4 85.6L165.7 240 144 240c-4 0-8 .3-11.9 .9L81.2 96.2c-2.9-8.3 1.5-17.5 9.8-20.4s17.5 1.5 20.4 9.8zM288 192c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48zm38.4 108c10.4 21.3 32.3 36 57.6 36c5.5 0 10.9-.7 16-2l0 10c0 66.3-53.7 120-120 120l-48 0c-66.3 0-120-53.7-120-120l0-24s0 0 0 0c0-17.7 14.3-32 32-32l80 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c35.3 0 64-28.7 64-64c0-.7 0-1.4 0-2c5.1 1.3 10.5 2 16 2c7.9 0 15.4-1.4 22.4-4zM400 272c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16z"],CircleNodes:[512,512,[],"solid","M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"],CircleRight:[512,512,[],"regular","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"],CircleUp:[512,512,[],"regular","M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z"],CircleLeft:[512,512,[],"regular","M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"],CircleDown:[512,512,[],"regular","M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"],WindowRestore:[512,512,[],"solid","M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z"],WindowMaximize:[512,512,[],"solid","M.3 89.5C.1 91.6 0 93.8 0 96L0 224 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-192 0-128c0-35.3-28.7-64-64-64L64 32c-2.2 0-4.4 .1-6.5 .3c-9.2 .9-17.8 3.8-25.5 8.2C21.8 46.5 13.4 55.1 7.7 65.5c-3.9 7.3-6.5 15.4-7.4 24zM48 224l416 0 0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192z"],WindowMinimize:[512,512,[],"solid","M24 432c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 432z"],VrCardboard:[640,512,["VR"],"solid","M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"],C:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.479z",{svgClass:"stroke-none"}],CPlusPlus:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213c.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.477zm9.479-8.952h-1.052v1.052H23.37v-1.052h-1.052v-1.053h1.052v-1.052h1.057v1.052h1.052zm3.948 0h-1.052v1.052h-1.052v-1.052h-1.052v-1.053h1.052v-1.052h1.052v1.052h1.052z",{svgClass:"stroke-none"}],Discord:[640,512,[],"solid","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"],Google:[488,512,[],"solid","M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"],Js:[32,32,[],"solid","M18.774 19.7a3.73 3.73 0 0 0 3.376 2.078c1.418 0 2.324-.709 2.324-1.688c0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156c0-2.567 1.956-4.52 5.012-4.52A5.06 5.06 0 0 1 26.9 10.52l-2.665 1.711a2.33 2.33 0 0 0-2.2-1.467a1.49 1.49 0 0 0-1.638 1.467c0 1.027.636 1.442 2.1 2.078l.856.366c2.908 1.247 4.549 2.518 4.549 5.376c0 3.081-2.42 4.769-5.671 4.769a6.58 6.58 0 0 1-6.236-3.5ZM6.686 20c.538.954 1.027 1.76 2.2 1.76c1.124 0 1.834-.44 1.834-2.15V7.975h3.422v11.683c0 3.543-2.078 5.156-5.11 5.156A5.31 5.31 0 0 1 3.9 21.688Z"],Ts:[32,32,[],"solid","M23.827 8.243a4.4 4.4 0 0 1 2.223 1.281a6 6 0 0 1 .852 1.143c.011.045-1.534 1.083-2.471 1.662c-.034.023-.169-.124-.322-.35a2.01 2.01 0 0 0-1.67-1c-1.077-.074-1.771.49-1.766 1.433a1.3 1.3 0 0 0 .153.666c.237.49.677.784 2.059 1.383c2.544 1.095 3.636 1.817 4.31 2.843a5.16 5.16 0 0 1 .416 4.333a4.76 4.76 0 0 1-3.932 2.815a11 11 0 0 1-2.708-.028a6.53 6.53 0 0 1-3.616-1.884a6.3 6.3 0 0 1-.926-1.371a3 3 0 0 1 .327-.208c.158-.09.756-.434 1.32-.761l1.024-.6l.214.312a4.8 4.8 0 0 0 1.35 1.292a3.3 3.3 0 0 0 3.458-.175a1.545 1.545 0 0 0 .2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8 8.8 0 0 1-3.349-2.055a4.7 4.7 0 0 1-.976-1.777a7.1 7.1 0 0 1-.062-2.268a4.33 4.33 0 0 1 3.644-3.374a9 9 0 0 1 2.691.084m-8.343 1.483l.011 1.454h-4.63v13.148H7.6V11.183H2.97V9.755a14 14 0 0 1 .04-1.466c.017-.023 2.832-.034 6.245-.028l6.211.017Z"],Linux:[448,512,[],"regular","M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"],SquareJs:[448,512,[],"solid","M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM180.9 444.9c-33.7 0-53.2-17.4-63.2-38.5L152 385.7c6.6 11.7 12.6 21.6 27.1 21.6c13.8 0 22.6-5.4 22.6-26.5V237.7h42.1V381.4c0 43.6-25.6 63.5-62.9 63.5zm85.8-43L301 382.1c9 14.7 20.8 25.6 41.5 25.6c17.4 0 28.6-8.7 28.6-20.8c0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5c0-31.6 24.1-55.6 61.6-55.6c26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18c-12.3 0-20.1 7.8-20.1 18c0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2c0 37.8-29.8 58.6-69.7 58.6c-39.1 0-64.4-18.6-76.7-43z"],Safari:[512,512,[],"solid","M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"],Python:[448,512,[],"solid","M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"],Markdown:[640,512,[],"solid","M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"],Microsoft:[448,512,[],"solid","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"],Npm:[576,512,[],"solid","M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"],Reddit:[512,512,[],"solid","M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"],Rust:[512,512,[],"solid","M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.08,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z"],Ubuntu:[576,512,[],"solid","M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z"],Windows:[448,512,[],"solid","M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"],Whatsapp:[448,512,[],"regular","M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],"X-Twitter":[512,512,[],"regular","M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"],Php:[512,512,[],"solid","M170.322 349.808c-2.4-15.66-9-28.38-25.02-34.531c-6.27-2.4-11.7-6.78-17.88-9.54c-7.02-3.15-14.16-6.15-21.57-8.1c-5.61-1.5-10.83 1.02-14.16 5.94c-3.15 4.62-.87 8.97 1.77 12.84c2.97 4.35 6.27 8.49 9.6 12.57c5.52 6.78 11.37 13.29 16.74 20.161c5.13 6.57 9.51 13.86 8.76 22.56c-1.65 19.08-10.29 34.891-24.21 47.76c-1.53 1.38-4.23 2.37-6.21 2.19c-8.88-.96-16.95-4.32-23.46-10.53c-7.47-7.11-6.33-15.48 2.61-20.67c2.13-1.23 4.35-2.37 6.3-3.87c5.46-4.11 7.29-11.13 4.32-17.22c-1.41-2.94-3-6.12-5.34-8.25c-11.43-10.41-22.651-21.151-34.891-30.63C18.01 307.447 2.771 276.968.43 240.067c-2.64-40.981 6.87-79.231 28.5-114.242c8.19-13.29 17.73-25.951 32.37-32.52c9.96-4.47 20.88-6.99 31.531-9.78c29.311-7.71 58.89-13.5 89.401-8.34c26.28 4.41 45.511 17.94 54.331 43.77c5.79 16.89 7.17 34.35 5.37 52.231c-3.54 35.131-29.49 66.541-63.331 75.841c-14.67 4.02-22.68 1.77-31.5-10.44c-6.33-8.79-11.58-18.36-17.25-27.631c-.84-1.38-1.44-2.97-2.16-4.44c-.69-1.47-1.44-2.88-2.16-4.35c2.13 15.24 5.67 29.911 13.98 42.99c4.5 7.11 10.5 12.36 19.29 13.14c32.34 2.91 59.641-7.71 79.021-33.721c21.69-29.101 26.461-62.581 20.19-97.831c-1.23-6.96-3.3-13.77-4.77-20.7c-.99-4.47.78-7.77 5.19-9.33c2.04-.69 4.14-1.26 6.18-1.68c26.461-5.7 53.221-7.59 80.191-4.86c30.601 3.06 59.551 11.46 85.441 28.471c40.531 26.67 65.641 64.621 79.291 110.522c1.98 6.66 2.28 13.95 2.46 20.971c.12 4.68-2.88 5.91-6.45 2.97c-3.93-3.21-7.53-6.87-10.92-10.65c-3.15-3.57-5.67-7.65-8.73-11.4c-2.37-2.94-4.44-2.49-5.58 1.17c-.72 2.22-1.35 4.41-1.98 6.63c-7.08 25.26-18.24 48.3-36.33 67.711c-2.52 2.73-4.77 6.78-5.07 10.38c-.78 9.96-1.35 20.13-.39 30.06c1.98 21.331 5.07 42.57 7.47 63.871c1.35 12.03-2.52 19.11-13.83 23.281c-7.95 2.91-16.47 5.04-24.87 5.64c-13.38.93-26.88.27-40.32.27c-.36-15 .93-29.731-13.17-37.771c2.73-11.13 5.88-21.69 7.77-32.49c1.56-8.97.24-17.79-6.06-25.14c-5.91-6.93-13.32-8.82-20.101-4.86c-20.43 11.91-41.671 11.97-63.301 4.17c-9.93-3.6-16.86-1.56-22.351 7.5c-5.91 9.75-8.4 20.7-7.74 31.771c.84 13.95 3.27 27.75 5.13 41.64c1.02 7.77.15 9.78-7.56 11.76c-17.13 4.35-34.56 4.83-52.081 3.42c-.93-.09-1.86-.48-2.46-.63c-.87-14.55.66-29.671-16.68-37.411c7.68-16.29 6.63-33.18 3.99-50.07l-.06-.15zm-103.561-57.09c2.55-2.4 4.59-6.15 5.31-9.6c1.8-8.64-4.68-20.22-12.18-23.43c-3.99-1.74-7.47-1.11-10.29 2.07c-6.87 7.77-13.65 15.63-20.401 23.521c-1.14 1.35-2.16 2.94-2.97 4.53c-2.7 5.19-1.11 8.97 4.65 10.38c3.48.87 7.08 1.05 10.65 1.56c9.3-.9 18.3-2.46 25.23-9zm.78-86.371c-.03-6.18-5.19-11.34-11.28-11.37c-6.27-.03-11.67 5.58-11.46 11.76c.27 6.21 5.43 11.19 11.61 11.07c6.24-.09 11.22-5.19 11.16-11.43z"],Keyboard:[576,512,[],"regular","M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z"],IdCard:[576,512,[],"regular","M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],BookUser:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM208 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM376 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],Copy:[448,512,[],"regular","M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"],Eye:[576,512,[],"regular","M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"],EyeOff:[640,512,[],"regular","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"],StickyNote:[448,512,[],"regular","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l224 0 0-80c0-17.7 14.3-32 32-32l80 0 0-224c0-8.8-7.2-16-16-16L64 80zM288 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 224 0 5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7l-5.5 0z"],CreditCard:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"],Hourglass:[384,512,[],"regular","M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 19c0 40.3 16 79 44.5 107.5L158.1 256 76.5 337.5C48 366 32 404.7 32 445l0 19-8 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-19c0-40.3-16-79-44.5-107.5L225.9 256l81.5-81.5C336 146 352 107.3 352 67l0-19 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM192 289.9l81.5 81.5C293 391 304 417.4 304 445l0 19L80 464l0-19c0-27.6 11-54 30.5-73.5L192 289.9zm0-67.9l-81.5-81.5C91 121 80 94.6 80 67l0-19 224 0 0 19c0 27.6-11 54-30.5 73.5L192 222.1z"],Bell:[448,512,[],"solid","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],BellOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-90.2-70.7c.2-.4 .4-.9 .6-1.3c5.2-11.5 3.1-25-5.3-34.4l-7.4-8.3C497.3 319.2 480 273.9 480 226.8l0-18.8c0-77.4-55-142-128-156.8L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 19.2c-42.6 8.6-79 34.2-102 69.3L38.8 5.1zM406.2 416L160 222.1l0 4.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S115.4 416 128 416l278.2 0zm-40.9 77.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],Compass:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],File:[384,512,[],"solid","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"],MessageCircle:[512,512,[],"solid","M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"],Inbox:[512,512,[],"solid","M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-92.1c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32L121 32zm0 64l270 0 48 192-51.2 0c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7l-120.4 0c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7L73 288 121 96z"],Mail:[512,512,[],"solid","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"],MailOpen:[512,512,[],"solid","M64 208.1L256 65.9 448 208.1l0 47.4L289.5 373c-9.7 7.2-21.4 11-33.5 11s-23.8-3.9-33.5-11L64 255.5l0-47.4zM256 0c-12.1 0-23.8 3.9-33.5 11L25.9 156.7C9.6 168.8 0 187.8 0 208.1L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-239.9c0-20.3-9.6-39.4-25.9-51.4L289.5 11C279.8 3.9 268.1 0 256 0z"],Mic:[384,512,[],"solid","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"],MicOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 21.2-5.1 41.1-14.2 58.7L416 300.8 416 96c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zM344 430.4c20.4-2.8 39.7-9.1 57.3-18.2l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6z"],Link:[640,512,["Chain"],"solid","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"],House:[576,512,[],"solid","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"],Gamepad:[640,512,[],"solid","M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z"],Camera:[512,512,[],"solid","M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],Printer:[512,512,[],"solid","M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],Server:[512,512,[],"solid","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"],Calendar:[448,512,[],"solid","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"],Pipette:[512,512,[],"solid","M341.6 29.2L240.1 130.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L482.8 170.4c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4L5.4 462.2c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4L89.7 480l42.4 0c21.2 0 41.6-8.4 56.6-23.4L309.4 335.9l-45.3-45.3L143.4 411.3c-3 3-7.1 4.7-11.3 4.7L96 416l0-36.1c0-4.2 1.7-8.3 4.7-11.3L221.4 247.9l-45.3-45.3L55.4 323.3z"],Scroll:[576,512,[],"solid","M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z"],Smartphone:[384,512,[],"solid","M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM144 448c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zM304 64L80 64l0 320 224 0 0-320z"],Settings:[512,512,[],"solid","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"],Map:[576,512,[],"solid","M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z"],Folder:[512,512,[],"solid","M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"],FolderOpen:[576,512,[],"solid","M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z"],FolderClosed:[512,512,[],"solid","M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z"],Function:[384,512,[],"solid","M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],Stop:[384,512,[],"solid","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],Image:[512,512,[],"solid","M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"],Images:[576,512,[],"solid","M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],Info:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"],Bone:[576,512,[],"solid","M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z"],Puzzle:[512,512,[],"solid","M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z"],Lock:[448,512,[],"solid","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"],LockOpen:[576,512,[],"solid","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"],Shuffle:[512,512,[],"solid","M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"],Play:[384,512,[],"solid","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],Pause:[320,512,[],"solid","M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"],LogIn:[512,512,[],"solid","M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"],LogOut:[512,512,[],"solid","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"],MousePointer:[320,512,[],"solid","M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z"],User:[512,512,[],"solid","M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z"],HardDriveDownload:[512,512,[],"solid","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],HardDriveUpload:[512,512,[],"solid","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"],CircleCheck:[512,512,["CheckCircle2"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"],CirclePlay:[512,512,[],"solid","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"],CirclePause:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM224 192l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32z"],CirclePlus:[512,512,["PlusCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"],CircleMinus:[512,512,["MinusCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"],CircleStop:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"],CircleDot:[512,512,[],"solid","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],CircleHelp:[512,512,["HelpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],CircleArrowUp:[512,512,["ArrowUpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 215c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71L280 392c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-214.1-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 103c9.4-9.4 24.6-9.4 33.9 0L385 215z"],CircleArrowDown:[512,512,["ArrowDownCircle"],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 297c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 214.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 409c-9.4 9.4-24.6 9.4-33.9 0L127 297z"],CircleArrowLeft:[512,512,["ArrowLeftCircle"],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM215 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L392 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-214.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L103 273c-9.4-9.4-9.4-24.6 0-33.9L215 127z"],CircleArrowRight:[512,512,["ArrowRightCircle"],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"],CircleAlert:[512,512,["AlertCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],CircleUser:[512,512,["UserCircle"],"solid","M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"],CircleChevronRight:[512,512,["ChevronRightCircle"],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"],CircleChevronDown:[512,512,["ChevronDownCircle"],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"],CircleChevronUp:[512,512,["ChevronUpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"],CircleChevronLeft:[512,512,["ChevronLeftCircle"],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"],CircleX:[512,512,["XCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"],Apple:[384,512,[],"solid","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"],Chrome:[512,512,[],"solid","M0 256C0 209.4 12.47 165.6 34.27 127.1L144.1 318.3C166 357.5 207.9 384 256 384C270.3 384 283.1 381.7 296.8 377.4L220.5 509.6C95.9 492.3 0 385.3 0 256zM365.1 321.6C377.4 302.4 384 279.1 384 256C384 217.8 367.2 183.5 340.7 160H493.4C505.4 189.6 512 222.1 512 256C512 397.4 397.4 511.1 256 512L365.1 321.6zM477.8 128H256C193.1 128 142.3 172.1 130.5 230.7L54.19 98.47C101 38.53 174 0 256 0C350.8 0 433.5 51.48 477.8 128V128zM168 256C168 207.4 207.4 168 256 168C304.6 168 344 207.4 344 256C344 304.6 304.6 344 256 344C207.4 344 168 304.6 168 256z"],Facebook:[512,512,[],"solid","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"],Github:[496,512,[],"solid","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"],Youtube:[576,512,[],"solid","M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"],"CircleRight@solid":[512,512,[],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm395.3 11.3l-112 112c-4.6 4.6-11.5 5.9-17.4 3.5s-9.9-8.3-9.9-14.8l0-64-96 0c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l96 0 0-64c0-6.5 3.9-12.3 9.9-14.8s12.9-1.1 17.4 3.5l112 112c6.2 6.2 6.2 16.4 0 22.6z"],"CircleUp@solid":[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm11.3-395.3l112 112c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-64 0 0 96c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-96-64 0c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l112-112c6.2-6.2 16.4-6.2 22.6 0z"],"CircleLeft@solid":[512,512,[],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM116.7 244.7l112-112c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8l0 64 96 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32l-96 0 0 64c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-112-112c-6.2-6.2-6.2-16.4 0-22.6z"],"CircleDown@solid":[512,512,[],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM244.7 395.3l-112-112c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l64 0 0-96c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96 64 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-112 112c-6.2 6.2-16.4 6.2-22.6 0z"],"PaperPlane@solid":[512,512,[],"solid","M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"]};function u(t,s=!0){t="light"==t?"light":"dark",document.documentElement.setAttribute("data-theme",t),s&&localStorage.setItem("lxColorScheme",t),e.emit("@on_new_color_scheme",t)}function p(){return document.documentElement.getAttribute("data-theme")??"dark"}function m(e){if(!/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e))throw`Invalid Hex Color: ${e}`;3!==(e=e.replace(/^#/,"")).length&&4!==e.length||(e=e.split("").map((e=>e+e)).join(""));const t=parseInt(e,16);return{r:(t>>(8===e.length?24:16)&255)/255,g:(t>>(8===e.length?16:8)&255)/255,b:(t>>(8===e.length?8:0)&255)/255,a:(8===e.length?255&t:4===e.length?parseInt(e.slice(-2),16):255)/255}}function f(e){let{r:t,g:s,b:n,a:o}=e;o=o??1;const i=Math.max(t,s,n),l=i-Math.min(t,s,n);let a=0;0!==l&&(a=i===t?(s-n)/l%6:i===s?(n-t)/l+2:(t-s)/l+4,a*=60,a<0&&(a+=360));return{h:a,s:0===i?0:l/i,v:i,a:o}}e.ICONS=(()=>{const e={};for(let t in h){h[t][2].forEach((s=>e[s]=t))}return{...h,...e}})(),e.LucideIconAlias={Stop:"Square",Refresh:"RefreshCw",Left:"ChevronLeft",Right:"ChevronRight",Up:"ChevronUp",Down:"ChevronDown",MenuArrows:"ChevronsUpDown",RotateForward:"RotateCw",RotateRight:"RotateCw",RotateBack:"RotateCcw",RotateLeft:"RotateCcw"},e.clamp=function(e,t,s){return Math.min(Math.max(e,t),s)},e.round=function(e,t){return 0==t?Math.floor(e):+e.toFixed(t??2).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")},e.remapRange=function(e,t,s,n,o){return(e-t)*(o-n)/(s-t)+n},"undefined"!=typeof performance?e.getTime=performance.now.bind(performance):"undefined"!=typeof Date&&Date.now?e.getTime=Date.now.bind(Date):"undefined"!=typeof process?e.getTime=function(){const e=process.hrtime();return.001*e[0]+1e-6*e[1]}:e.getTime=function(){return(new Date).getTime()},e.doAsync=function(e,t){setTimeout(e,t??0)},e.flushCss=function(e){e.offsetHeight},e.deleteElement=function(e){e&&e.remove()},e.toCamelCase=function(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,((e,t)=>t.toUpperCase()))},e.toTitleCase=function(e){return e.replace(/-/g," ").toLowerCase().replace(/\b\w/g,(e=>e.toUpperCase()))},e.toKebabCase=function(e){return e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()))},e.getSupportedDOMName=function(e){console.assert("string"==typeof e,"getSupportedDOMName: Text is not a string!");let t=e.trim();return t=t.replace(/@/g,"_at_").replace(/\+/g,"_plus_").replace(/\./g,"_dot_"),t=t.replace(/[^a-zA-Z0-9_-]/g,"_"),/^[0-9]/.test(t)&&(t="_"+t),t},e.has=function(t){return e.extensions.indexOf(t)>-1},e.getExtension=function(e){return e.includes(".")?e.split(".").pop():null},e.stripHTML=function(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""},e.parsePixelSize=function e(t,s){if(t.constructor===Number)return t;if(t.constructor===String){const n=parseFloat(t);if(t.endsWith("px"))return n;if(t.endsWith("%"))return n/100*s;if(t.endsWith("rem")||t.endsWith("em")){return n*16}if(t.endsWith("vw"))return n/100*window.innerWidth;if(t.endsWith("vh"))return n/100*window.innerHeight;if(t.startsWith("calc(")){const n=t.slice(5,-1).split(/([+\-])/);let o=0,i="+";for(let t of n)if(t=t.trim(),"+"===t||"-"===t)i=t;else{let n=e(t,s);o="+"===i?o+n:o-n}return o}}throw"Bad size format!"},e.deepCopy=function(e){return JSON.parse(JSON.stringify(e))},e.setTheme=u,e.getTheme=p,e.switchTheme=function(){u("dark"==p()?"light":"dark")},e.setSystemTheme=function(){u(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),localStorage.removeItem("lxColorScheme"),this._mqlPrefersDarkScheme&&(this._mqlPrefersDarkScheme.removeEventListener("change",this._onChangeSystemTheme),this._mqlPrefersDarkScheme.addEventListener("change",this._onChangeSystemTheme))},e.setThemeColor=function(e,t){document.querySelector(":root").style.setProperty("--"+e,t)},e.getThemeColor=function(e){const t=getComputedStyle(document.querySelector(":root")),s=t.getPropertyValue("--"+e);if(s.includes("light-dark")){return"light"==t.getPropertyValue("color-scheme")?s.substring(s.indexOf("(")+1,s.indexOf(",")).replace(/\s/g,""):s.substring(s.indexOf(",")+1,s.indexOf(")")).replace(/\s/g,"")}return s},e.switchSpacing=function(){const t=document.documentElement.getAttribute("data-spacing")??"default";document.documentElement.setAttribute("data-spacing","default"==t?"compact":"default"),e.emit("@on_new_spacing_layout",t)},e.getBase64Image=function(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t.toDataURL("image/png")},e.hexToRgb=m,e.hexToHsv=function(e){return f(m(e))},e.rgbToHex=function(e,t=255){const s=[e.r,e.g,e.b];return null!=e.a&&s.push(e.a),"#"+s.map((e=>{const s=(e=Math.floor(e*t)).toString(16);return 1===s.length?"0"+s:s})).join("")},e.rgbToCss=function(e){return{r:Math.floor(255*e.r),g:Math.floor(255*e.g),b:Math.floor(255*e.b),a:e.a}},e.rgbToHsv=f,e.hsvToRgb=function(e){const{h:t,s:s,v:n,a:o}=e,i=n*s,l=i*(1-Math.abs(t/60%2-1)),a=n-i;let r=0,c=0,d=0;return t<60?(r=i,c=l,d=0):t<120?(r=l,c=i,d=0):t<180?(r=0,c=i,d=l):t<240?(r=0,c=l,d=i):t<300?(r=l,c=0,d=i):(r=i,c=0,d=l),{r:r+a,g:c+a,b:d+a,a:o}},e.dateFromDateString=function(e){const t=e.split("/"),s=parseInt(t[0]),n=parseInt(t[1]),o=parseInt(t[2]);return new Date(`${n}/${s}/${o}`)},e.measureRealWidth=function(t,s=8){var n=document.createElement("span");n.className="lexinputmeasure",n.innerHTML=t,document.body.appendChild(n);var o=n.getBoundingClientRect();return e.deleteElement(n),o.width+s},e.guidGenerator=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+"-"+e()+"-"+e()},e.buildTextPattern=function(e={}){let t=[];e.lowercase&&t.push("(?=.*[a-z])"),e.uppercase&&t.push("(?=.*[A-Z])"),e.digit&&t.push("(?=.*\\d)"),e.specialChar&&t.push("(?=.*[@#$%^&+=!])"),e.noSpaces&&t.push("(?!.*\\s)");let s=e.minLength||0,n=e.maxLength||"",o=`^${t.join("")}.{${s},${n}}$`;return e.asRegExp?new RegExp(o):o},e.makeDraggable=function(t,s={}){let n=0,o=0,i=null,l=s.targetClass,a=s.dragMargin??3,r=(s,i,l)=>{const r=t.parentElement?t.parentElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},c="fixed"==t.style.position?new e.vec2(r.x,r.y):new e.vec2;l=l??s.clientX-n-r.x,i=i??s.clientY-o-r.y,t.style.left=e.clamp(l,a+c.x,c.x+r.width-t.offsetWidth-a)+"px",t.style.top=e.clamp(i,a+c.y,c.y+r.height-t.offsetHeight-a)+"px",t.style.translate="none"};s.autoAdjust&&r(null,parseInt(t.style.left),parseInt(t.style.top));let c=e.guidGenerator();t["draggable-id"]=c;let d=s.onMove?e=>{i&&s.onMove&&s.onMove(i)}:e=>{i&&r(e)},h=s.onDragStart;t.setAttribute("draggable",!0),t.addEventListener("mousedown",(function(e){i=e.target.classList.contains(l)||!l?e.target:null})),t.addEventListener("dragstart",(function(l){if(l.preventDefault(),l.stopPropagation(),l.stopImmediatePropagation(),!i)return;var a=new Image;a.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",l.dataTransfer.setDragImage(a,0,0),l.dataTransfer.effectAllowed="move";const r=l.target.getBoundingClientRect(),c=i.parentElement.getBoundingClientRect(),u="fixed"==i.style.position?new e.vec2(c.x,c.y):new e.vec2;n=l.clientX-r.x-u.x,o=l.clientY-r.y-u.y,document.addEventListener("mousemove",d),i.eventCatched=!0,(s.updateLayers??1)&&(e.activeDraggable&&(e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX),e.activeDraggable=t,e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX+1),h&&h(i,l)}),!1),document.addEventListener("mouseup",(e=>{i&&(i=null,document.removeEventListener("mousemove",d))}))},e.makeCollapsible=function(t,s,n,o={}){t.classList.add("collapsible");const i=o.collapsed??!0,l=e.makeIcon("Right");l.classList.add("collapser"),l.dataset.collapsed=i,l.style.marginLeft="auto",l.style.marginRight="0.2rem",l.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),this.dataset.collapsed?(delete this.dataset.collapsed,s.style.display="block"):(this.dataset.collapsed=!0,s.style.display="none")})),t.appendChild(l),(n=n??t.parentElement).appendChild(s)},e.makeCodeSnippet=function(t,s,n={}){if(!e.has("CodeEditor"))return void console.error("Import the CodeEditor component to create snippets!");const o=document.createElement("div");o.className="lexcodesnippet "+(n.className??""),o.style.width=s?s[0]:"auto",o.style.height=s?s[1]:"auto";const i=new e.Area({noAppend:!0});let l=new e.CodeEditor(i,{skipInfo:!0,disableEdition:!0,allowAddScripts:!1,name:n.tabName,callback:()=>{if(n.linesAdded){const e=l.root.querySelector(".code");for(let t of n.linesAdded)if(t.constructor==Number)e.childNodes[t-1].classList.add("added");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("added")}if(n.linesRemoved){const e=l.root.querySelector(".code");for(let t of n.linesRemoved)if(t.constructor==Number)e.childNodes[t-1].classList.add("removed");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("removed")}}});if(l.setText(t,n.language??"Plain Text"),n.windowMode){const e=document.createElement("div");e.className="lexwindowbuttons";const t=document.createElement("span");t.style.background="#ee4f50";const s=document.createElement("span");s.style.background="#f5b720";const n=document.createElement("span");n.style.background="#53ca29",e.appendChild(t),e.appendChild(s),e.appendChild(n);l.root.querySelector(".lexareatabs").prepend(e)}return(n.lineNumbers??1)||l.root.classList.add("no-gutter"),o.appendChild(i.root),o},e.makeKbd=function(t,s=!0,n=""){const o={Ctrl:"⌃",Enter:"↩",Shift:"⇧",CapsLock:"⇪",Meta:"⌘",Option:"⌥",Alt:"⌥",Tab:"⇥",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Space:"␣"},i=e.makeContainer(["auto","auto"],"flex flex-row ml-auto");for(const l of t)e.makeContainer(["auto","auto"],"self-center text-xs fg-secondary select-none "+n,s?o[l]??l:l,i);return i},e.makeBreadcrumb=function(t,s={}){const n=e.makeContainer(["auto","auto"],"flex flex-row gap-1"),o=s.separatorIcon??"ChevronRight",i=s.maxItems??4,l=t.length-i;if(l>0){const e={title:"...",ellipsis:t.splice(1,l+1).map((e=>e.title)).join("/")};t.splice(1,0,e)}for(let s=0;s<t.length;++s){const i=t[s];if(console.assert(i.title,"Breadcrumb item must have a title!"),0!=s){const t=e.makeIcon(o,{svgClass:"sm fg-secondary separator"});n.appendChild(t)}const l=s==t.length-1,a=e.makeContainer(["auto","auto"],"p-1 flex flex-row gap-1 items-center "+(l?"":"fg-secondary"));n.appendChild(a);let r=e.makeElement("p","",i.title);if(i.icon&&a.appendChild(e.makeIcon(i.icon,{svgClass:"sm"})),void 0!==i.items){const t=e.makeContainer(["auto","auto"],""+(l?"":"fg-secondary"));t.listen("click",(t=>{new e.DropdownMenu(t.target,i.items,{side:"bottom",align:"start"})})),t.append(r),a.appendChild(t)}else if(void 0!==i.url){let t=e.makeElement("a","decoration-none fg-"+(l?"primary":"secondary"),"",a);t.href=i.url,t.appendChild(r)}else a.appendChild(r);i.ellipsis&&e.asTooltip(a,i.ellipsis,{side:"bottom",offset:4})}return n},e.makeIcon=function(t,s={}){let n=null;const o=e=>{s.svgClass&&s.svgClass.length&&s.svgClass.split(" ").forEach((t=>e.classList.add(t)));const n=document.createElement("a");return n.title=s.title??"",n.className="lexicon "+(s.iconClass??""),n.appendChild(e),e.dataset.name=t,n};if(t.includes("@")){const e=t.split("@");t=e[0],s.variant=e[1]}let i=e.ICONS[t];const l=lucide[t]??lucide[e.LucideIconAlias[t]];if(i){i.constructor==String&&(i=e.ICONS[i]);const a=s.variant??"regular";i=("solid"==a?e.ICONS[`${t}@solid`]:i)??i;const r=i[3];if(a==r||!l||"regular"==r){if(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.setAttribute("viewBox",`0 0 ${i[0]} ${i[1]}`),i[5]){const e=i[5].svgClass;e?.split(" ").forEach((e=>{n.classList.add(e)}));const t=i[5].svgAttributes;t?.split(" ").forEach((e=>{const t=e.split("=");n.setAttribute(t[0],t[1])}))}const e=document.createElement("path");if(e.setAttribute("fill","currentColor"),e.setAttribute("d",i[4]),n.appendChild(e),i[5]){const t=i[5].pathClass;t?.split(" ").forEach((t=>{e.classList.add(t)}));const s=i[5].pathAttributes;s?.split(" ").forEach((t=>{const s=t.split("=");e.setAttribute(s[0],s[1])}))}const t="\x3c!-- This icon might belong to a collection from Iconify - https://iconify.design/ - or !Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --\x3e";return n.innerHTML+=t,o(n)}}return console.assert(l,`No existing icon named _${t}_`),n=lucide.createElement(l,s),o(n)},e.registerIcon=function(t,s,n="none",o=[]){const i=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement,l=i.querySelector("path"),a=i.getAttribute("viewBox").split(" "),r=l.getAttribute("d");let c=[],d=[];for(const e of i.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":c.push(`${e.name}=${e.value}`)}for(const e of l.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":d.push(`${e.name}=${e.value}`)}const h=[parseInt(a[2]),parseInt(a[3]),o,n,r,{svgAttributes:c.length?c.join(" "):null,pathAttributes:d.length?d.join(" "):null}];e.ICONS[t]&&console.warn(`${t} will be added/replaced in LX.ICONS`),e.ICONS[t]=h},e.registerCommandbarEntry=function(t,s){e.extraCommandbarEntries.push({name:t,callback:s})},e.message=function(t,s,n={}){if(!t)throw"No message to show";return n.modal=!0,new e.Dialog(s,(e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})}),n)},e.popup=function(t,s,n={}){if(!t)throw"No message to show";n.size=n.size??["max-content","auto"],n.class="lexpopup";const o=n.timeout||3e3,i=new e.Dialog(s,(e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})}),n);return setTimeout((()=>{i.close()}),Math.max(o,150)),i},e.prompt=function t(s,n,o,i={}){i.modal=!0,i.className="prompt";let l="";const a=new e.Dialog(n,(e=>{e.addTextArea(null,s,null,{disabled:!0,fitHeight:!0}),(i.input??1)&&e.addText(null,i.input||l,(e=>l=e),{placeholder:"..."}),e.sameLine(2),e.addButton(null,"Cancel",(()=>{i.on_cancel&&i.on_cancel(),a.close()})),e.addButton(null,i.accept||"Continue",(()=>{i.required&&""===l?(s+=s.includes("You must fill the input text.")?"":"\nYou must fill the input text.",a.close(),t(s,n,o,i)):(o&&o.call(this,l),a.close())}),{buttonClass:"primary"})}),i);return(i.input??1)&&a.root.querySelector("input").focus(),a},e.toast=function(t,s,n={}){if(!t)throw"The toast needs at least a title!";console.assert(this.notifications);const o=document.createElement("li");o.className="lextoast",this.notifications.prepend(o);const[i,l]=n.position?n.position.split("-"):["bottom","right"];switch(this.notifications.style.right="unset",this.notifications.style.left="unset",this.notifications.style.top="unset",this.notifications.style.bottom="unset",this.notifications.style.placeSelf="unset",i){case"top":o.style.translate="0 -30px",this.notifications.style.top="1rem",this.notifications.style.flexDirection="column";break;case"bottom":o.style.translate="0 calc(100% + 30px)",this.notifications.style.top="auto",this.notifications.style.bottom="1rem",this.notifications.style.flexDirection="column-reverse"}switch(l){case"left":this.notifications.style.left="1rem";break;case"center":this.notifications.style.placeSelf="center";break;case"right":this.notifications.style.right="1rem"}o.classList.add(i),o.classList.add(l),e.doAsync((()=>{this.notifications.offsetWidth>this.notifications.iWidth&&(this.notifications.iWidth=Math.min(this.notifications.offsetWidth,480),this.notifications.style.width=this.notifications.iWidth+"px"),o.dataset.open=!0}),10);const a=document.createElement("div");a.className="lextoastcontent",o.appendChild(a);const r=document.createElement("div");if(r.className="title",r.innerHTML=t,a.appendChild(r),s){const e=document.createElement("div");e.className="desc",e.innerHTML=s,a.appendChild(e)}if(n.action){const t=new e.Panel;t.addButton(null,n.action.name??"Accept",n.action.callback.bind(this,o),{width:"auto",maxWidth:"150px",className:"right",buttonClass:"border"}),o.appendChild(t.root.childNodes[0])}const c=this;if(o.close=function(){this.dataset.open=!1,e.doAsync((()=>{this.remove(),c.notifications.childElementCount||(c.notifications.style.width="unset",c.notifications.iWidth=0)}),500)},n.closable??1){const t=e.makeIcon("X",{iconClass:"closer"});t.addEventListener("click",(()=>{o.close()})),o.appendChild(t)}const d=n.timeout??3e3;-1!=d&&e.doAsync((()=>{o.close()}),d)},e.badge=function(t,s,n={}){const o=document.createElement("div");if(o.innerHTML=t,o.className="lexbadge "+(s??""),n.chip&&o.classList.add("chip"),Object.assign(o.style,n.style??{}),n.callback){const t=e.makeIcon("ArrowUpRight",{svgClass:"xs fg-contrast"});t.querySelector("svg").style.marginLeft="-0.25rem",o.innerHTML+=t.innerHTML,o.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),n.callback()}))}return n.parent&&(n.parent.classList.add("lexbadge-parent"),n.parent.appendChild(o)),n.asElement?o:o.outerHTML},e.makeElement=function(e,t,s,n,o={}){const i=document.createElement(e);return i.className=t??"",i.innerHTML=s??"",Object.assign(i.style,o),n&&(n.attach?n.attach(i):n.appendChild(i)),i},e.makeContainer=function(t,s,n,o,i={}){const l=e.makeElement("div","lexcontainer "+(s??""),n,o,i);return l.style.width=t&&t[0]?t[0]:"100%",l.style.height=t&&t[1]?t[1]:"100%",l},e.asTooltip=function(t,s,n={}){console.assert(t,"You need a trigger to generate a tooltip!"),t.dataset.disableTooltip=!(n.active??1);let o=null;const i=n.offset,l=n.offsetX??i??0,a=n.offsetY??i??6;t.addEventListener("mouseenter",(function(i){if("true"==t.dataset.disableTooltip)return;o=document.createElement("div"),o.className="lextooltip",o.innerHTML=t.dataset.tooltipContent??s;const r=t.closest("dialog"),c=r??e.root;e.root.querySelectorAll(".lextooltip").forEach((e=>e.remove())),c.appendChild(o),e.doAsync((()=>{const s=[0,0],i=parseFloat(t.dataset.tooltipOffsetX??l),d=parseFloat(t.dataset.tooltipOffsetY??a),h=this.getBoundingClientRect();let u=!0;switch(n.side??"top"){case"left":s[0]+=h.x-o.offsetWidth-i,u=!1;break;case"right":s[0]+=h.x+h.width+i,u=!1;break;case"top":s[1]+=h.y-o.offsetHeight-d,u=!0;break;case"bottom":s[1]+=h.y+h.height+d,u=!0}if(u?s[0]+=h.x+.5*h.width-.5*o.offsetWidth+i:s[1]+=h.y+.5*h.height-.5*o.offsetHeight+d,s[0]=e.clamp(s[0],0,window.innerWidth-o.offsetWidth-4),s[1]=e.clamp(s[1],0,window.innerHeight-o.offsetHeight-4),r){let e=c.getBoundingClientRect();s[0]-=e.x,s[1]-=e.y}o.style.left=`${s[0]}px`,o.style.top=`${s[1]}px`,n.callback&&n.callback(o,t)}))})),t.addEventListener("mouseleave",(function(e){o&&o.remove()}))},Object.assign(e,{request(e){var t=e.dataType||"text";"json"==t||"xml"==t?t="text":"binary"==t&&(t="arraybuffer",e.mimeType="application/octet-stream");var s=new XMLHttpRequest;s.open(e.data?"POST":"GET",e.url,!0),t&&(s.responseType=t),e.mimeType&&s.overrideMimeType(e.mimeType),e.nocache&&s.setRequestHeader("Cache-Control","no-cache"),s.onload=function(t){var s=this.response;if(200==this.status){if("json"==e.dataType)try{s=JSON.parse(s)}catch(n){if(!e.error)throw n;e.error(n)}else if("xml"==e.dataType)try{s=(new DOMParser).parseFromString(s,"text/xml")}catch(n){if(!e.error)throw n;e.error(n)}e.success&&e.success.call(this,s,this)}else{var n="Error "+this.status;e.error&&e.error(n)}},s.onerror=function(t){e.error&&e.error(t)};var n=new FormData;if(e.data)for(var o in e.data)n.append(o,e.data[o]);return s.send(n),s},requestText(e,t,s){return this.request({url:e,dataType:"text",success:t,error:s})},requestJSON(e,t,s){return this.request({url:e,dataType:"json",success:t,error:s})},requestBinary(e,t,s){return this.request({url:e,dataType:"binary",success:t,error:s})},requireScript(e,t,s,n,o){if(!e)throw"invalid URL";e.constructor===String&&(e=[e]);var i=e.length,l=[];for(var a in e){var r=document.createElement("script");r.num=a,r.type="text/javascript",r.src=e[a]+(o?"?version="+o:""),r.original_src=e[a],r.async=!1,r.onload=function(e){i--,l.push(this),i?n&&n(this.original_src,this.num):t&&t(l)},s&&(r.onerror=function(e){s(e,this.original_src,this.num)}),document.getElementsByTagName("head")[0].appendChild(r)}},loadScriptSync:e=>new Promise(((t,s)=>{const n=document.createElement("script");n.src=e,n.async=!1,n.onload=()=>t(),n.onerror=()=>s(new Error(`Failed to load ${e}`)),document.head.appendChild(n)})),downloadURL(t,s){const n=new FileReader,o=function(e){var t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)};t.includes("http")?e.request({url:t,dataType:"blob",success:e=>{n.readAsDataURL(e),n.onload=e=>{o(e.currentTarget.result)}}}):o(t)},downloadFile:function(e,t,s){if(t){s||(s=t.constructor===String?"text/plain":"application/octet-stream");var n=null;n=t.constructor!==File&&t.constructor!==Blob?new Blob([t],{type:s}):t;var o=URL.createObjectURL(n),i=document.createElement("a");i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout((function(){URL.revokeObjectURL(o)}),6e4)}else console.warn("No file provided to download")}}),e.formatBytes=function(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+["B","KB","MB","GB","TB"][t]},e.compareThreshold=function(e,t,s,n){return Math.abs(e-t)>=n||Math.abs(e-s)>=n},e.compareThresholdRange=function(e,t,s,n){return e>=s&&e<=n||t>=s&&t<=n||e<=s&&t>=n},e.getControlPoints=function(e,t,s,n,o,i,l){var a=Math.sqrt(Math.pow(s-e,2)+Math.pow(n-t,2)),r=l*a/(a+Math.sqrt(Math.pow(o-s,2)+Math.pow(i-n,2))),c=l-r;return[s+r*(e-o),n+r*(t-i),s-c*(e-o),n-c*(t-i)]},e.drawSpline=function(t,s,n){t.save();for(var o=[],i=s.length,l=0;l<i-4;l+=2)o=o.concat(e.getControlPoints(s[l],s[l+1],s[l+2],s[l+3],s[l+4],s[l+5],n));for(l=2;l<s.length-5;l+=2)t.beginPath(),t.moveTo(s[l],s[l+1]),t.bezierCurveTo(o[2*l-2],o[2*l-1],o[2*l],o[2*l+1],s[l+2],s[l+3]),t.stroke(),t.closePath();t.beginPath(),t.moveTo(s[0],s[1]),t.quadraticCurveTo(o[0],o[1],s[2],s[3]),t.stroke(),t.closePath(),t.beginPath(),t.moveTo(s[i-2],s[i-1]),t.quadraticCurveTo(o[2*i-10],o[2*i-9],s[i-4],s[i-3]),t.stroke(),t.closePath(),t.restore()};class g{constructor(e,t,s={}){this.area=e,this.options=s,this.buttons={},this._buildButtons(t,s)}_buildButtons(e,t){t.className="lexoverlaybuttons";let s=this.area.addPanel(t),n=null;const o=document.createElement("div");o.className="lexoverlaybuttonscontainer",o.appendChild(s.root),this.area.attach(o);const i=t.float;let l="";if(i){for(let e=0;e<i.length;e++){switch(i[e]){case"h":case"t":case"l":break;case"v":l+=" vertical";break;case"m":l+=" middle";break;case"b":l+=" bottom";break;case"c":l+=" center";break;case"r":l+=" right"}}o.className+=` ${l}`}const a=(e,t,o)=>{const i={width:"auto",selectable:e.selectable,selected:e.selected,icon:e.icon,img:e.img,className:e.class??"",title:e.name,overflowContainerX:s.root,swap:e.swap};t&&(n||(n=document.createElement("div"),n.className="lexoverlaygroup",s.queuedContainer=n),i.parent=n);let l=e.callback,a=null;a=e.options?s.addSelect(null,e.options,e.value??e.name,l,i):s.addButton(null,e.name,(function(t,s){if(e.selectable)if(e.group){let t=e.selected;e.group.forEach((e=>e.selected=!1)),e.selected=!t}else e.selected=!e.selected;l&&l(t,s,a.root)}),i),this.buttons[e.name]=a,n&&o&&(s.root.appendChild(n),n=null,s.clearQueue())};!function(){s.clear();for(let t of e)if(null!==t)if(t.constructor===Array)for(let e=0;e<t.length;++e){let s=t[e];s.group=t,a(s,!0,e==t.length-1)}else a(t);else{const e=document.createElement("div");e.className="lexoverlayseparator"+l,s.root.appendChild(e)}if(i){var t=0;s.root.childNodes.forEach((e=>{t+=e.offsetHeight})),o.className.includes("middle")&&(o.style.top="-moz-calc( 50% - "+.5*t+"px )",o.style.top="-webkit-calc( 50% - "+.5*t+"px )",o.style.top="calc( 50% - "+.5*t+"px )")}}()}}class C{constructor(t={}){var s=document.createElement("div");s.className="lexarea",t.id&&(s.id=t.id),t.className&&(s.className+=" "+t.className);var n=t.width||"100%",o=t.height||"100%";this.setLimitBox(t.minWidth,t.minHeight,t.maxWidth,t.maxHeight),n.constructor==Number&&(n+="px"),o.constructor==Number&&(o+="px"),s.style.width=n,s.style.height=o,this.offset=0,this.root=s,this.size=[this.root.offsetWidth,this.root.offsetHeight],this.sections=[],this.panels=[];let i=document.getElementById("lexroot");i&&!t.skipAppend&&i.appendChild(this.root),t.layout&&this.setLayout(t.layout);let l=t.overlay;if(l){this.root.classList.add("overlay-"+l),t.left?this.root.style.left=t.left:t.right?this.root.style.right=t.right:t.top?this.root.style.top=t.top:t.bottom&&(this.root.style.bottom=t.bottom);if((t.draggable??!0)&&e.makeDraggable(s,t),t.resizeable&&s.classList.add("resizeable"),t.resize){this.splitBar=document.createElement("div");let a="left"==l||"right"==l?"horizontal":"vertical";if(this.type=l,this.splitBar.className="lexsplitbar "+a,"right"==l)this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=-e.DEFAULT_SPLITBAR_SIZE/2+"px";else if("left"==l){let p=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,this.root.clientWidth);this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=p+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else if("top"==l){let m=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,this.root.clientHeight);this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=m+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else"bottom"==l&&(this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=-e.DEFAULT_SPLITBAR_SIZE/2+"px");this.splitBar.addEventListener("mousedown",d),this.root.appendChild(this.splitBar);const r=this;let c=[0,0];function d(e){const t=r.root.ownerDocument;t.addEventListener("mousemove",h),t.addEventListener("mouseup",u),c[0]=e.x,c[1]=e.y,e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),r.splitBar.classList.add("nocursor")}function h(t){switch(r.type){case"right":var s=c[0]-t.x,n=r.root.offsetWidth+s;r.root.style.width=n+"px";break;case"left":s=c[0]-t.x,n=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetWidth-s);r.root.style.width=n+"px",r.splitBar.style.left=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"top":s=c[1]-t.y,n=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetHeight-s);r.root.style.height=n+"px",r.splitBar.style.top=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"bottom":s=c[1]-t.y,n=r.root.offsetHeight+s;r.root.style.height=n+"px"}c[0]=t.x,c[1]=t.y,t.stopPropagation(),t.preventDefault(),r.onresize&&r.onresize(r.root.getBoundingClientRect())}function u(e){const t=r.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("nocursor"),r.splitBar.classList.remove("nocursor")}}}}attach(e){if(this.sections.length)return void this.sections[1].attach(e);if(!e)throw"no content to attach";e.parent=this;let t=e.root?e.root:e;this.root.appendChild(t)}setLayout(t){if(this.layout=e.deepCopy(t),!t.splits)return void console.warn("Area layout has no splits!");const s=(e,t)=>{if(t.className&&(e.root.className+=` ${t.className}`),!t.splits)return;const n=t.type??"horizontal",o=t.resize??!0,i=t.minimizable??!1,[l,a]=e.split({type:n,resize:o,minimizable:i,sizes:[t.splits[0].size,t.splits[1].size]});s(l,t.splits[0]),s(a,t.splits[1])};s(this,t)}split(t={}){this.sections.length&&(this.offset=this.root.childNodes[0].offsetHeight,this._root=this.sections[0].root,this.root=this.sections[1].root);const s=t.type??"horizontal",n=t.sizes||["50%","50%"],o="auto"===t.sizes||t.sizes&&"auto"==t.sizes[0]&&"auto"==t.sizes[1],i=this.root.getBoundingClientRect();if(!n[1]||"auto"!=n[0]&&"auto"==n[1]){let e=n[0],s=t.top?t.top:0;e.constructor==Number&&(e+=s,e+="px"),n[1]="calc( 100% - "+e+" )"}let l=t.minimizable??!1,a=(t.resize??!0)||l,r=t.fixedSize??!a,c=0,d=[],h=[];if(this.offset=0,a&&(this.resize=a,this.splitBar=document.createElement("div"),this.splitBar.className="lexsplitbar "+s,"horizontal"==s?this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px":this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.addEventListener("mousedown",(function(e){const t=m.root.ownerDocument;t.addEventListener("mousemove",f),t.addEventListener("mouseup",g),e.stopPropagation(),e.preventDefault()})),c=e.DEFAULT_SPLITBAR_SIZE/2),"horizontal"==s){if(this.root.style.display="flex",r)d[0]=`calc(${n[0]} - ${c}px)`,h[0]=`calc(${n[1]} - ${c}px)`;else{const t=i.width,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${o}% - ${c}px)`}d[1]="100%",h[1]="100%"}else{if(o)d[1]="auto",h[1]="auto";else if(r)d[1]="auto"==n[0]?"auto":`calc(${n[0]} - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${n[1]} - ${c}px)`;else{const t=i.height,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${o}% - ${c}px)`}d[0]="100%",h[0]="100%"}let u=new C({width:d[0],height:d[1],skipAppend:!0,className:"split"+(t.menubar||t.sidebar?"":" origin")}),p=new C({width:h[0],height:h[1],skipAppend:!0,className:"split"});if(!(r||i.width&&i.height)){const t=new ResizeObserver((i=>{console.assert(1==i.length,"AreaResizeObserver: more than one entry");const l=i[0].contentRect;if(l.width&&l.height){if(this._update([l.width,l.height],!1),!o){if("horizontal"==s){const t=l.width,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${o}% - ${c}px)`}else{const t=l.height,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${o}% - ${c}px)`}u.root.style.width=d[0],u.root.style.height=d[1],p.root.style.width=h[0],p.root.style.height=h[1]}u._update(),p._update(),t.disconnect()}}));e.doAsync((()=>{t.observe(this.root)}),100)}if(o&&"vertical"==s&&(this._autoVerticalResizeObserver=new ResizeObserver((e=>{for(const t of e){const e=t.target.getComputedSize();p.root.style.height="calc(100% - "+e.height+"px )"}})),this._autoVerticalResizeObserver.observe(u.root)),a&&l&&(this.splitExtended=!1,p.root.addEventListener("animationend",(t=>{const n=getComputedStyle(p.root).opacity;p.root.classList.remove(t.animationName+"-"+s),p.root.style.opacity=n,e.flushCss(p.root)})),this.splitBar.addEventListener("contextmenu",(t=>{t.preventDefault(),e.addContextMenu(null,t,(e=>{e.add("Extend",{disabled:this.splitExtended,callback:()=>{this.extend()}}),e.add("Reduce",{disabled:!this.splitExtended,callback:()=>{this.reduce()}})}))}))),u.parentArea=this,p.parentArea=this,this.root.appendChild(u.root),a&&this.root.appendChild(this.splitBar),this.root.appendChild(p.root),this.sections=[u,p],this.type=s,this._update(i.width||i.height?[i.width,i.height]:void 0),!a)return this.sections;const m=this;function f(e){const t=m.root.getBoundingClientRect();e.x<t.x||e.x>t.x+t.width||e.y<t.y||e.y>t.y+t.height||("horizontal"==m.type?m._moveSplit(-e.movementX):m._moveSplit(-e.movementY),e.stopPropagation(),e.preventDefault())}function g(e){const t=m.root.ownerDocument;t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",g)}return this.sections}setLimitBox(e=0,t=0,s=1/0,n=1/0){this.minWidth=e,this.minHeight=t,this.maxWidth=s,this.maxHeight=n,0!=e&&(this.root.style.minWidth=`${e}px`),0!=t&&(this.root.style.minHeight=`${t}px`),s!=1/0&&(this.root.style.maxWidth=`${s}px`),n!=1/0&&(this.root.style.maxHeight=`${n}px`)}setSize(t){let[s,n]=t;null!=s&&s.constructor==Number&&(s+="px"),null!=n&&n.constructor==Number&&(n+="px"),s&&(this.root.style.width=s),n&&(this.root.style.height=n),this.onresize&&this.onresize(this.root.getBoundingClientRect()),e.doAsync((()=>{this.size=[this.root.clientWidth,this.root.clientHeight],this.propagateEvent("onresize")}),150)}extend(){if(this.splitExtended)return;let[t,s]=this.sections;this.splitExtended=!0,t.root.classList.add(`maximize-${this.type}`),s.root.classList.add(`minimize-${this.type}`),s.root.classList.add(`fadeout-${this.type}`),s.root.classList.remove(`fadein-${this.type}`),"vertical"==this.type?(this.offset=s.root.offsetHeight,this._moveSplit(-1/0,!0)):(this.offset=s.root.offsetWidth-8,this._moveSplit(-1/0,!0,8)),e.doAsync((()=>{this.propagateEvent("onresize")}),100)}reduce(){if(!this.splitExtended)return;this.splitExtended=!1;let[t,s]=this.sections;t.root.classList.add(`minimize-${this.type}`),s.root.classList.add(`maximize-${this.type}`),s.root.classList.add(`fadein-${this.type}`),s.root.classList.remove(`fadeout-${this.type}`),this._moveSplit(this.offset),e.doAsync((()=>{this.propagateEvent("onresize")}),100)}hide(){this.root.classList.add("hidden")}show(){this.root.classList.remove("hidden")}toggle(e){this.root.classList.toggle("hidden",e)}propagateEvent(e){for(let t=0;t<this.sections.length;t++){const s=this.sections[t];s[e]&&s[e].call(this,s.root.getBoundingClientRect()),s.propagateEvent(e)}}addPanel(t){let s=new e.Panel(t);return this.attach(s),this.panels.push(s),s}addMenubar(t,s={}){let n=new e.Menubar(t,s);e.menubars.push(n);const[o,i]=this.split({type:"vertical",sizes:["48px",null],resize:!1,menubar:!0});return n.siblingArea=i,o.attach(n),o.isMenubar=!0,(s.sticky??1)&&(o.root.className+=" sticky top-0"),s.parentClass&&(o.root.className+=` ${s.parentClass}`),n}addSidebar(t,s={}){let n=new e.Sidebar({callback:t,...s});t&&t(n),n.update(),e.sidebars.push(n);const o=s.side??"left";console.assert("left"==o||"right"==o,"Invalid sidebar side: "+o);const i="left"==o,l=s.width??"16rem",a=i?[l,null]:[null,l],[r,c]=this.split({type:"horizontal",sizes:a,resize:!1,sidebar:!0});n.siblingArea=i?c:r;let d=i?r:c;return d.attach(n),d.isSidebar=!0,s.parentClass&&(d.root.className+=` ${s.parentClass}`),n}addOverlayButtons(e,t={}){return this.sections.length?this.sections[1].addOverlayButtons(e,t):(console.assert(e.constructor==Array&&e.length),this.root.style.position="relative",this.overlayButtons=new g(this,e,t),this.overlayButtons)}addTabs(t={}){const s=new e.Tabs(this,t);return t.folding&&(this.parentArea._disableSplitResize(),this.root.style.paddingTop="4px"),s}_moveSplit(t,s=!1,n=0){if(!this.type)throw"No split area";if(void 0===t)return;this._autoVerticalResizeObserver&&this._autoVerticalResizeObserver.disconnect();const o=this.sections[0];var i=o.root;i.classList.contains("origin")||(i=i.parentElement);const l=this.sections[1],a=l.root,r="- "+e.DEFAULT_SPLITBAR_SIZE+"px";let c=null;if(s||(c=i.style.transition,i.style.transition=a.style.transition="none"),"horizontal"==this.type){var d=Math.max(a.offsetWidth+t,parseInt(l.minWidth));n&&(d=n);const e=d/this.size[0]*100,s=Math.max(0,100-e);i.style.width=`-moz-calc(${s}% ${r})`,i.style.width=`-webkit-calc( ${s}% ${r})`,i.style.width=`calc( ${s}% ${r})`,a.style.width=`${e}%`,a.style.width=`${e}%`,a.style.width=`${e}%`,o.maxWidth!=1/0&&(a.style.minWidth=`calc( 100% - ${parseInt(o.maxWidth)}px )`)}else{const s=this.size[1];d=Math.max(a.offsetHeight+t+l.offset,parseInt(l.minHeight));d=Math.min(s-e.DEFAULT_SPLITBAR_SIZE,d),n&&(d=n);const c=d/s*100,h=Math.max(0,100-c);i.style.height=`-moz-calc(${h}% ${r})`,i.style.height=`-webkit-calc( ${h}% ${r})`,i.style.height=`calc( ${h}% ${r})`,a.style.height=`${c}%`,a.style.height=`${c}%`,a.style.height=`${c}%`,o.maxHeight!=1/0&&(a.style.minHeight=`calc( 100% - ${parseInt(o.maxHeight)}px )`)}s||(i.style.transition=a.style.transition=c),e.doAsync((()=>{this._update(),this.propagateEvent("onresize")}),10)}_disableSplitResize(){this.resize=!1,this.splitBar.remove(),delete this.splitBar}_update(e,t=!0){if(e)this.size=e;else{const e=this.root.getBoundingClientRect();this.size=[e.width,e.height]}if(t)for(var s=0;s<this.sections.length;s++)this.sections[s]._update()}}e.Area=C;class y{static NONE=0;static TEXT=1;static TEXTAREA=2;static BUTTON=3;static SELECT=4;static CHECKBOX=5;static TOGGLE=6;static RADIO=7;static BUTTONS=8;static COLOR=9;static RANGE=10;static NUMBER=11;static TITLE=12;static VECTOR=13;static TREE=14;static PROGRESS=15;static FILE=16;static LAYERS=17;static ARRAY=18;static LIST=19;static TAGS=20;static CURVE=21;static CARD=22;static IMAGE=23;static CONTENT=24;static CUSTOM=25;static SEPARATOR=26;static KNOB=27;static SIZE=28;static OTP=29;static PAD=30;static FORM=31;static DIAL=32;static COUNTER=33;static TABLE=34;static TABS=35;static DATE=36;static MAP2D=37;static LABEL=39;static BLANK=40;static RATE=41;static NO_CONTEXT_TYPES=[y.BUTTON,y.LIST,y.FILE,y.PROGRESS];constructor(t,s,n,o={}){this.type=t,this.name=s,this.options=o,this._initialValue=n;const i=document.createElement("div");if(i.className="lexcomponent",o.id&&(i.id=o.id),o.title&&(i.title=o.title),o.className&&(i.className+=" "+o.className),t!=y.TITLE&&(o.width&&(i.style.width=i.style.minWidth=o.width),o.maxWidth&&(i.style.maxWidth=o.maxWidth),o.minWidth&&(i.style.minWidth=o.minWidth),o.height&&(i.style.height=i.style.minHeight=o.height),e.componentResizeObserver.observe(i)),null!=s){if(!o.hideName){let t=document.createElement("div");t.className="lexcomponentname",o.justifyName&&t.classList.add("float-"+o.justifyName),t.innerHTML=s,t.title=o.title??t.innerHTML,t.style.width=o.nameWidth||e.DEFAULT_NAME_WIDTH,t.style.minWidth=t.style.width,i.appendChild(t),i.domName=t;const l=this;t.addEventListener("contextmenu",(function(e){e.preventDefault(),l.oncontextmenu(e)})),o.skipReset||null==n||this._addResetProperty(t,(function(e){l.set(l._initialValue,!1,e),this.style.display="none"}))}}else o.hideName=!0;o.signal&&e.addSignal(o.signal,this),this.root=i,this.root.jsInstance=this,this.options=o}static _dispatchEvent(e,t,s,n,o){let i=new CustomEvent(t,{detail:s,bubbles:n,cancelable:o});e.dispatchEvent(i)}_addResetProperty(t,s){const n=e.makeIcon("Undo2",{iconClass:"ml-0 mr-1 px-1",title:"Reset"});return n.style.display="none",n.addEventListener("click",s),t.appendChild(n),n}_canPaste(){let e=this.type===y.CUSTOM?void 0!==navigator.clipboard.customIdx&&this.customIdx==navigator.clipboard.customIdx:navigator.clipboard.type===this.type;return e&=!0!==this.disabled,this.onAllowPaste&&(e=this.onAllowPaste(e)),e}_trigger(e,t,s=this){t&&t.call(s,e.value,e.domEvent,e.name)}value(){if(this.onGetValue)return this.onGetValue();console.warn("Can't get value of "+this.typeName())}set(e,t,s){if(this.onSetValue){let n=this.root.querySelector(".lexcomponentname .lexicon");if(n){n.style.display=e!=this.value()?"block":"none";const t=e.constructor===Array?function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0}(e,this._initialValue):e==this._initialValue;n.style.display=t?"none":"block"}return this.onSetValue(e,t??!1,s)}console.warn(`Can't set value of ${this.typeName()}`)}oncontextmenu(t){y.NO_CONTEXT_TYPES.includes(this.type)||e.addContextMenu(this.typeName(),t,(e=>{e.add("Copy",(()=>{this.copy()})),e.add("Paste",{disabled:!this._canPaste(),callback:()=>{this.paste()}})}))}copy(){navigator.clipboard.type=this.type,navigator.clipboard.customIdx=this.customIdx,navigator.clipboard.data=this.value(),navigator.clipboard.writeText(navigator.clipboard.data)}paste(){this._canPaste()&&this.set(navigator.clipboard.data)}typeName(){switch(this.type){case y.TEXT:return"Text";case y.TEXTAREA:return"TextArea";case y.BUTTON:return"Button";case y.SELECT:return"Select";case y.CHECKBOX:return"Checkbox";case y.TOGGLE:return"Toggle";case y.RADIO:return"Radio";case y.COLOR:return"Color";case y.RANGE:return"Range";case y.NUMBER:return"Number";case y.VECTOR:return"Vector";case y.TREE:return"Tree";case y.PROGRESS:return"Progress";case y.FILE:return"File";case y.LAYERS:return"Layers";case y.ARRAY:return"Array";case y.LIST:return"List";case y.TAGS:return"Tags";case y.CURVE:return"Curve";case y.KNOB:return"Knob";case y.SIZE:return"Size";case y.PAD:return"Pad";case y.FORM:return"Form";case y.DIAL:return"Dial";case y.COUNTER:return"Counter";case y.TABLE:return"Table";case y.TABS:return"Tabs";case y.DATE:return"Date";case y.MAP2D:return"Map2D";case y.RATE:return"Rate";case y.LABEL:return"Label";case y.BLANK:return"Blank";case y.CUSTOM:return this.customName}console.error(`Unknown Component type: ${this.type}`)}refresh(){}}e.BaseComponent=y,e.ADD_CUSTOM_COMPONENT=function(t,s={}){let n=e.guidGenerator();e.Panel.prototype["add"+t]=function(o,i,l){const a=Array.from(arguments).slice(3);let r=new y(y.CUSTOM,o,null,s);this._attachComponent(r),r.customName=t,r.customIdx=n,r.onGetValue=()=>i,r.onSetValue=(t,s,n)=>{i=t,p(),c.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),s||r._trigger(new e.IEvent(o,i,n),l)},r.onResize=e=>{const t=r.root.domName?.style.width??"0px";d.style.width=`calc( 100% - ${t})`};const c=r.root;let d,h,u=s.default??{};const p=()=>{d&&d.remove(),h&&h.remove(),d=document.createElement("div"),d.className="lexcustomcontainer w-full",c.appendChild(d),c.dataset.opened=!1;const n=e.makeIcon(s.icon??"Box"),m=e.makeIcon("Menu");let f=t+(i?"":" [empty]"),g=this.addButton(null,f,((s,n)=>{i?(c.querySelector(".lexcustomitems").toggleAttribute("hidden"),c.dataset.opened=!c.querySelector(".lexcustomitems").hasAttribute("hidden")):e.addContextMenu(null,n,(e=>{e.add("New "+t,(()=>{i={},p(),c.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),c.dataset.opened=!c.querySelector(".lexcustomitems").hasAttribute("hidden")}))}))}),{buttonClass:"custom"});const v=g.root.querySelector("span");if(v.prepend(n),v.appendChild(m),d.appendChild(g.root),i&&m.addEventListener("click",(t=>{t.stopImmediatePropagation(),t.stopPropagation(),e.addContextMenu(null,t,(e=>{e.add("Clear",(()=>{i=null,p()}))}))})),h=document.createElement("div"),h.className="lexcustomitems",h.toggleAttribute("hidden",!0),c.appendChild(h),i){this.queue(h);const t=(t,n,a)=>{const c=s[`_set_${t}`];c?c.call(i,n):i[t]=n,r._trigger(new e.IEvent(o,i,a),l)};for(let e in u){let n=null;const o=s[`_get_${e}`];if(n=o?i[e]?o.call(i):o.call(u):i[e]??u[e],n)switch(n.constructor){case String:"#"===n[0]?this.addColor(e,n,t.bind(this,e)):this.addText(e,n,t.bind(this,e));break;case Number:this.addNumber(e,n,t.bind(this,e));break;case Boolean:this.addCheckbox(e,n,t.bind(this,e));break;case Array:n.length>4?this.addArray(e,n,t.bind(this,e)):this._addVector(n.length,e,n,t.bind(this,e));break;default:console.warn(`Unsupported property type: ${n.constructor.name}`)}}s.onCreate&&s.onCreate.call(this,this,...a),this.clearQueue()}};p()}};class b{constructor(e,t,s){if(this.domEl=e,this.data=t,this.onevent=s.onevent,this.options=s,this.selected=[],this._forceClose=!1,t.constructor===Object)this._createItem(null,t);else for(let e of t)this._createItem(null,e)}_createItem(t,s,n=0,o){const i=this,l=this.domEl.querySelector(".lexnodetreefilter");if(s.children=s.children??[],l&&""!=l.value&&!s.id.includes(l.value)){for(var a=0;a<s.children.length;++a)this._createItem(s,s.children[a],n+1,o);return}const r=this.domEl.querySelector("ul");s.visible=s.visible??!0,s.parent=t;let c=s.children.length>0,d=this.selected.indexOf(s)>-1||s.selected;if(this.options.onlyFolders){let e=!1;s.children.forEach((t=>e|="folder"==t.type)),c=!!e}let h=document.createElement("li");h.className="lextreeitem datalevel"+n+(c?" parent":"")+(d?" selected":""),h.id=e.getSupportedDOMName(s.id),h.tabIndex="0",h.treeData=s;let u=this.options.skipDefaultIcon??1?null:"Dot";if(c&&(u=s.closed?"Right":"Down"),u&&h.appendChild(e.makeIcon(u,{iconClass:"hierarchy",svgClass:"xs"})),u=s.icon,u)if(s.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";h.innerHTML+="<img src='"+(e+s.icon)+"'>"}else{const t=s.icon.split(" "),n=e.makeIcon(t[0],{iconClass:"tree-item-icon mr-2",svgClass:"md"+(t.length>1?` ${t.slice(0).join(" ")}`:"")});h.appendChild(n)}h.innerHTML+=s.rename?"":s.id,h.setAttribute("draggable",!0),h.style.paddingLeft=3+15*(n+1)+"px",r.appendChild(h),h.addEventListener("click",(t=>{if(m)return void(m=!1);t.shiftKey||(r.querySelectorAll("li").forEach((e=>{e.classList.remove("selected")})),this.selected.length=0);const n=this.selected.indexOf(s);if(n>-1?(h.classList.remove("selected"),this.selected.splice(n,1)):(h.classList.add("selected"),this.selected.push(s)),c&&s.id.length>1){if(s.closed=!1,i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed,t);i.onevent(n)}i.frefresh(s.id)}if(i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_SELECTED,s,this.selected,t);n.multiple=t.shiftKey,i.onevent(n)}})),h.addEventListener("dblclick",(function(t){if((i.options.rename??1)&&(s.rename=!0,i.refresh()),i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_DBLCLICKED,s,null,t);i.onevent(n)}})),h.addEventListener("contextmenu",(t=>{if(t.preventDefault(),!i.onevent)return;const n=new e.TreeEvent(e.TreeEvent.NODE_CONTEXTMENU,s,this.selected,t);n.multiple=this.selected.length>1,e.addContextMenu(n.multiple?"Selected Nodes":n.node.id,n.event,(e=>{n.panel=e})),i.onevent(n),this.options.addDefault&&(n.panel.items&&n.panel.add(""),n.panel.add("Select Children",(()=>{const e=t=>{if(!t.closed)for(let s of t.children??[]){if(!s)continue;this.domEl.querySelector("#"+s.id).classList.add("selected"),this.selected.push(s),e(s)}};this.domEl.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),this.selected.length=0,e(s)})),n.panel.add("Delete",{callback:()=>{if(i.deleteNode(s)&&i.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_DELETED,s,[s],null);i.onevent(t)}this.refresh()}}))})),h.addEventListener("keydown",(t=>{if(!s.rename)if(t.preventDefault(),"Delete"==t.key){const n=[];for(let e of this.selected)i.deleteNode(e)&&n.push(e);if(n.length&&i.onevent){const o=new e.TreeEvent(e.TreeEvent.NODE_DELETED,s,n,t);o.multiple=n.length>1,i.onevent(o)}this.selected.length=0,this.refresh()}else if("ArrowUp"==t.key||"ArrowDown"==t.key){var n=this.selected.length>1?"ArrowUp"==t.key?this.selected.shift():this.selected.pop():this.selected[0],o=this.domEl.querySelector("#"+e.getSupportedDOMName(n.id)),l="ArrowUp"==t.key?o.previousSibling:o.nextSibling;l&&l.click()}}));const p=document.createElement("input");p.toggleAttribute("hidden",!s.rename),p.className="bg-none",p.value=s.id,h.appendChild(p),s.rename&&(h.classList.add("selected"),p.focus()),p.addEventListener("keyup",(function(t){if("Enter"==t.key){if(this.value=this.value.replace(/\s/g,"_"),i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_RENAMED,s,this.value,t);i.onevent(n)}s.id=e.getSupportedDOMName(this.value),delete s.rename,i.frefresh(s.id),r.querySelector("#"+s.id).classList.add("selected")}else"Escape"==t.key&&(delete s.rename,i.frefresh(s.id))})),p.addEventListener("blur",(function(e){delete s.rename,i.refresh()})),(this.options.draggable??1)&&(t&&h.addEventListener("dragstart",(e=>{window.__tree_node_dragged=s})),h.addEventListener("dragover",(e=>{e.preventDefault()}),!1),h.addEventListener("dragenter",(e=>{e.target.classList.add("draggingover")})),h.addEventListener("dragleave",(e=>{e.target.classList.remove("draggingover")})),h.addEventListener("drop",(t=>{t.preventDefault();let n=window.__tree_node_dragged;if(!n)return;let o=s;if(n.id==o.id)return void console.warn("Cannot parent node to itself!");const l=function(e,t){var s=!1;for(var n of t.children){if(n.id==e.id)return!0;s|=l(e,n)}return s};if(l(o,n))return void console.warn("Cannot parent node to a current child!");if(i.onevent){const s=new e.TreeEvent(e.TreeEvent.NODE_DRAGGED,n,o,t);i.onevent(s)}const a=n.parent.children.findIndex((e=>e.id==n.id)),r=n.parent.children.splice(a,1);o.children.push(r[0]),i.refresh(),delete window.__tree_node_dragged})));let m=!1;c&&h.querySelector("a.hierarchy").addEventListener("click",(function(t){if(m=!0,t.stopImmediatePropagation(),t.stopPropagation(),t.altKey){const e=function(t){for(var s of(t.closed=!t.closed,t.children))e(s)};e(s)}else s.closed=!s.closed;if(i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed,t);i.onevent(n)}i.frefresh(s.id)}));const f=document.createElement("div");if(h.appendChild(f),s.actions)for(let t=0;t<s.actions.length;++t){const n=s.actions[t],o=new e.Button(null,"",((e,t)=>{t.stopPropagation(),n.callback&&n.callback(s,e,t)}),{icon:n.icon,swap:n.swap,title:n.name,hideName:!0,className:"p-0 m-0",buttonClass:"p-0 m-0 bg-none"});o.root.style.minWidth="fit-content",o.root.style.margin="0",o.root.style.padding="0";const i=o.root.querySelector("button");i.style.minWidth="fit-content",i.style.margin="0",i.style.padding="0",f.appendChild(o.root)}if(!s.skipVisibility){const t=new e.Button(null,"",((t,n)=>{if(n.stopPropagation(),s.visible=void 0!==s.visible&&!s.visible,i.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_VISIBILITY,s,s.visible,n);i.onevent(t)}}),{icon:s.visible?"Eye":"EyeOff",swap:s.visible?"EyeOff":"Eye",title:"Toggle visible",className:"p-0 m-0",buttonClass:"bg-none"});f.appendChild(t.root)}const g=function(e,t){if(e.id==t)return!0;let s=!1;for(var n of e?.children??[])s|=g(n,t);return s},v=g(s,o);if(!s.closed||v)for(a=0;a<s.children.length;++a){let e=s.children[a];this.options.onlyFolders&&"folder"!=e.type||this._createItem(s,e,n+1,o)}}refresh(e,t){if(this.data=e??this.data,this.domEl.querySelector("ul").innerHTML="",this.data.constructor===Object)this._createItem(null,this.data,0,t);else for(let e of this.data)this._createItem(null,e,0,t)}frefresh(e){this.refresh();var t=this.domEl.querySelector(`#${e}`);t&&t.focus()}select(e){const t=this.domEl.querySelector(".lexnodetreefilter");if(t&&(t.value=""),this.refresh(null,e),this.domEl.querySelectorAll(".selected").forEach((e=>e.classList.remove("selected"))),!e)return void(this.selected.length=0);const s=this.domEl.querySelector("#"+e);console.assert(s,"NodeTree: Can't select node "+e),s.classList.add("selected"),this.selected=[s.treeData],s.focus()}deleteNode(e){const t=this.data.constructor===Array;if(e.parent){let t=e.parent.children;const s=t.indexOf(e);t.splice(s,1)}else{if(!t)return console.warn("NodeTree: Can't delete root node from object data!"),!1;{const t=this.data.indexOf(e);console.assert(t>-1,"NodeTree: Can't delete root node "+e.id+" from data array!"),this.data.splice(t,1)}}return!0}}e.NodeTree=b;e.Blank=class extends y{constructor(e,t){super(y.BLANK),this.root.style.width=e??"auto",this.root.style.height=t??"8px"}};e.Title=class extends y{constructor(t,s={}){if(console.assert(t,"Can't create Title Component without text!"),super(y.TITLE,null,null,s),this.root.className=`lextitle ${this.root.className}`,s.icon){let t=e.makeIcon(s.icon,{iconClass:"mr-2"});t.querySelector("svg").style.color=s.iconColor||"",this.root.appendChild(t)}let n=document.createElement("span");if(n.innerText=t,this.root.appendChild(n),Object.assign(this.root.style,s.style??{}),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",e.className="lextitle link",Object.assign(e.style,s.style??{}),this.root.replaceWith(e)}}};e.TextInput=class extends y{constructor(t,s,n,o={}){super(y.TEXT,t,String(s),o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{this.valid(o)&&this._lastValueTriggered!=o&&(this._lastValueTriggered=s=o,l.value=o,i||this._trigger(new e.IEvent(t,o,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`},this.valid=e=>{if(e=e??this.value(),""==(l.pattern??""))return!0;return new RegExp(l.pattern).test(e)};let i=document.createElement("div");i.className=o.warning?" lexwarning":"",i.style.display="flex",i.style.position="relative",this.root.appendChild(i),this.disabled=(o.disabled||o.warning)??!!o.url;let l=null;if(this.disabled)o.url?(l=document.createElement("a"),l.href=o.url,l.target="_blank",l.innerHTML=s??"",l.style.textAlign=o.float??"",l.className="lextext ellipsis-overflow"):(l=document.createElement("input"),l.disabled=!0,l.value=s,l.style.textAlign=o.float??"",l.className="lextext ellipsis-overflow "+(o.inputClass??""));else{l=document.createElement("input"),l.className="lextext "+(o.inputClass??""),l.type=o.type||"",l.value=s||"",l.style.textAlign=o.float??"",l.setAttribute("placeholder",o.placeholder??""),o.required&&l.setAttribute("required",o.required),o.pattern&&l.setAttribute("pattern",o.pattern);const t=o.trigger??"default";if("default"==t?(l.addEventListener("keyup",(e=>{"Enter"==e.key&&l.blur()})),l.addEventListener("focusout",(e=>{this.set(e.target.value,!1,e)}))):"input"==t&&l.addEventListener("input",(e=>{this.set(e.target.value,!1,e)})),l.addEventListener("mousedown",(function(e){e.stopImmediatePropagation(),e.stopPropagation()})),o.icon){l.style.paddingLeft="1.75rem";const t=e.makeIcon(o.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});i.appendChild(t)}}o.fit&&l.classList.add("size-content"),Object.assign(l.style,o.style??{}),i.appendChild(l),e.doAsync(this.onResize.bind(this))}};e.TextArea=class extends y{constructor(t,s,n,o={}){super(y.TEXTAREA,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{l.value=s=o,i||this._trigger(new e.IEvent(t,o,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};let i=document.createElement("div");i.className="lextextarea",i.style.display="flex",this.root.appendChild(i);let l=document.createElement("textarea");l.value=s??"",l.className=o.inputClass??"",l.style.textAlign=o.float??"",Object.assign(l.style,o.style??{}),o.fitHeight&&l.classList.add("size-content"),(o.resize??1)||l.classList.add("resize-none"),i.appendChild(l),o.disabled&&(this.disabled=!0,l.setAttribute("disabled",!0)),o.placeholder&&l.setAttribute("placeholder",o.placeholder);const a=o.trigger??"default";if("default"==a?(l.addEventListener("keyup",(function(e){"Enter"==e.key&&l.blur()})),l.addEventListener("focusout",(e=>{this.set(e.target.value,!1,e)}))):"input"==a&&l.addEventListener("input",(e=>{this.set(e.target.value,!1,e)})),o.icon){const t=e.makeIcon(o.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});i.appendChild(t)}e.doAsync((()=>{i.style.height=o.height??"",this.onResize()}),10)}};e.Button=class extends y{constructor(t,s,n,o={}){super(y.BUTTON,t,null,o),this.onGetValue=()=>{const e=i.querySelector("input");return e?e.checked:s},this.onSetValue=(t,s,n)=>{if(o.swap)this.setState(t,s);else if(i.innerHTML="",o.icon){const t=e.makeIcon(o.icon);i.prepend(t)}else if(o.img){let e=document.createElement("img");e.src=o.img,i.prepend(e)}else i.innerHTML=`<span>${t??""}</span>`},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`},this.setState=function(l,a){const r=i.querySelector("input");r?r.checked=l:o.selectable&&(o.parent&&o.parent.querySelectorAll(".lexbutton.selected").forEach((e=>{e!=i&&e.classList.remove("selected")})),i.classList.toggle("selected",l)),a||this._trigger(new e.IEvent(t,r?r.checked:o.selectable?l:s,null),n)};var i=document.createElement("button");if(i.title=o.tooltip?"":o.title??"",i.className="lexbutton p-1 "+(o.buttonClass??""),this.root.appendChild(i),o.selected&&i.classList.add("selected"),o.img){let e=document.createElement("img");e.src=o.img,i.prepend(e)}else if(o.icon){const t=e.makeIcon(o.icon,{iconClass:o.iconClass,svgClass:o.svgClass}),n=o.iconPosition??"cover";"cover"==n||void 0!==o.swap?i.prepend(t):(i.innerHTML=`<span>${s||""}</span>`,"start"==n?i.querySelector("span").prepend(t):i.querySelector("span").appendChild(t)),i.classList.add("justify-center")}else i.innerHTML=`<span>${s||""}</span>`;if(o.fileInput){const e=document.createElement("input");e.type="file",e.className="file-input",e.style.display="none",i.appendChild(e),e.addEventListener("change",(function(e){const t=e.target.files;if(!t.length)return;const s=new FileReader;"text"===o.fileInputType?s.readAsText(t[0]):"buffer"===o.fileInputType?s.readAsArrayBuffer(t[0]):"bin"===o.fileInputType?s.readAsBinaryString(t[0]):"url"===o.fileInputType&&s.readAsDataURL(t[0]),s.onload=e=>{n.call(this,e.target.result,t[0])}}))}o.disabled&&(this.disabled=!0,i.setAttribute("disabled",!0));let l=i;if(o.swap){i.classList.add("swap"),i.querySelector("a").classList.add("swap-off");const t=document.createElement("input");t.className="p-0 border-0",t.type="checkbox",i.prepend(t);const s=e.makeIcon(o.swap,{iconClass:"swap-on"});i.appendChild(s),this.swap=function(e){const t=i.querySelector("input");t.checked=!t.checked,e||l.click()}}l.addEventListener("click",(l=>{let a;if(o.selectable&&(o.parent&&o.parent.querySelectorAll(".lexbutton.selected").forEach((e=>{e!=i&&e.classList.remove("selected")})),a=i.classList.toggle("selected")),o.fileInput)i.querySelector(".file-input").click();else if(o.mustConfirm)new e.PopConfirm(i,{onConfirm:()=>{this._trigger(new e.IEvent(t,s,l),n)},side:o.confirmSide,align:o.confirmAlign,confirmText:o.confirmText,cancelText:o.confirmCancelText,title:o.confirmTitle,content:o.confirmContent});else{const r=i.querySelector("input");this._trigger(new e.IEvent(t,r?.checked??(o.selectable?a:s),l),n)}})),o.tooltip&&e.asTooltip(i,o.title??t),e.doAsync(this.onResize.bind(this))}};e.ComboButtons=class extends y{constructor(t,s,n={}){const o=!n.noSelection;let i=o&&(n.toggle??!1),l=document.createElement("div");l.className="lexcombobuttons ",n.skipReset=!0,n.float&&(l.className+=n.float);let a=[],r=document.createElement("div");r.className="lexcombobuttonsbox ",l.appendChild(r);for(let t of s){if(!t.value)throw"Set 'value' for each button!";let s=document.createElement("button");if(s.className="lexbutton combo",s.title=t.icon?t.value:"",s.id=t.id??"",s.dataset.value=t.value,n.buttonClass&&s.classList.add(n.buttonClass),o&&(t.selected||n.selected?.includes(t.value))&&(s.classList.add("selected"),a=a.concat([t.value])),t.icon){const n=e.makeIcon(t.icon);s.appendChild(n)}else s.innerHTML=`<span>${t.value}</span>`;t.disabled&&s.setAttribute("disabled",!0),s.addEventListener("click",(e=>{a=[],o&&(i?s.classList.toggle("selected"):(l.querySelectorAll("button").forEach((e=>e.classList.remove("selected"))),s.classList.add("selected"))),l.querySelectorAll("button").forEach((e=>{e.classList.contains("selected")&&a.push(e.dataset.value)})),!i&&a.length>1?console.error("Enable _options.toggle_ to allow selecting multiple options in ComboButtons."):(a=a[0],this.set(t.value,!1,s.classList.contains("selected")))})),r.appendChild(s)}a.length>1?i||(n.toggle=!0,i=o,console.warn(`Multiple options selected in '${t}' ComboButtons. Enabling _toggle_ mode.`)):a=a[0],super(y.BUTTONS,t,null,n),this.onGetValue=()=>a,this.onSetValue=(n,r,c)=>{if(o&&null==c&&(l.querySelectorAll("button").forEach((e=>e.classList.remove("selected"))),l.querySelectorAll("button").forEach((e=>{a&&a.indexOf(e.dataset.value)>-1&&e.classList.add("selected")}))),!r&&n.constructor!=Array){const o=c,l=s.filter((e=>e.value==n))[0]?.callback;this._trigger(new e.IEvent(t,i?[n,o]:n,null),l)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},this.root.appendChild(l),e.doAsync(this.onResize.bind(this))}};e.Card=class extends y{constructor(t,s={}){s.hideName=!0,super(y.CARD,t,null,s);let n=document.createElement("div");if(n.className="lexcard",n.style.width="100%",this.root.appendChild(n),s.img){let e=document.createElement("img");e.src=s.img,n.appendChild(e),null!=s.link&&(e.style.cursor="pointer",e.addEventListener("click",(function(){const e=n.querySelector("a");e&&e.click()})))}let o=document.createElement("span");if(o.innerText=t,n.appendChild(o),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",o.innerText="",o.appendChild(e)}s.callback&&(n.style.cursor="pointer",n.addEventListener("click",(n=>{this._trigger(new e.IEvent(t,null,n),s.callback)})))}};e.Form=class extends y{constructor(t,s,n,o={}){if(s.constructor!=Object)return void console.error("Form data must be an Object");o.hideName=!0,super(y.FORM,t,null,o),this.onGetValue=()=>i.formData,this.onSetValue=(e,t,s)=>{i.formData=e;const n=i.querySelectorAll(".lexcomponent");for(let s=0;s<n.length;++s){if(n[s].jsInstance.type!=y.TEXT)continue;let o=n[s].querySelector(".lexcomponentname").innerText,i=n[s].querySelector(".lextext input");i.value=e[o]??"",y._dispatchEvent(i,"focusout",t)}};let i=document.createElement("div");i.className="lexformdata",i.style.width="100%",i.formData={},this.root.appendChild(i);for(let t in s){let n=s[t];if(n.constructor!=Object){n={value:JSON.parse(JSON.stringify(n))},s[t]=n}if(n.placeholder=n.placeholder??n.label??`Enter ${t}`,n.width="100%",!o.skipLabels){const s=new e.TextInput(null,n.label??t,null,{disabled:!0,inputClass:"formlabel nobg"});i.appendChild(s.root)}n.textComponent=new e.TextInput(null,n.constructor==Object?n.value:n,(e=>{i.formData[t]=e}),n),i.appendChild(n.textComponent.root),i.formData[t]=n.constructor==Object?n.value:n}const l=e.makeContainer(["100%","auto"],"flex flex-row","",i);if(o.secondaryActionName||o.secondaryActionCallback){const t=new e.Button(null,o.secondaryActionName??"Cancel",((e,t)=>{n&&n(i.formData,t)}),{width:"100%",minWidth:"0",buttonClass:o.secondaryButtonClass??"primary"});l.appendChild(t.root)}const a=new e.Button(null,o.primaryActionName??"Submit",((e,t)=>{const o=[];for(let e in s){s[e].textComponent.valid()||o.push({type:"input_not_valid",entry:e})}n&&n(i.formData,o,t)}),{width:"100%",minWidth:"0",buttonClass:o.primaryButtonClass??"contrast"});l.appendChild(a.root)}};class x extends y{constructor(t,s,n,o,i={}){super(y.SELECT,t,n,i),this.onGetValue=()=>n,this.onSetValue=(l,a,r)=>{n=l;let d=null;if(p.childNodes.forEach((e=>{e.classList.remove("selected"),e.getAttribute("value")==l&&(d=e)})),console.assert(d,`Item ${l} does not exist in the Select.`),d.classList.add("selected"),c.refresh(n),u){u.root.querySelector("input").value="";const e=this._filterOptions(s,"");h.refresh(e)}const m=this.root.querySelector(".lexcustomcontainer"),f=i[`on_${n}`];if(m.toggleAttribute("hidden",!f),f){m.innerHTML="";const t=new e.Panel;t.queue(m),f.call(this,t),t.clearQueue()}this.root.dataset.opened=!!f,h.style.height="",a||this._trigger(new e.IEvent(t,n,r),o)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=i.inputWidth??`calc( 100% - ${t})`};let l=document.createElement("div");l.className="lexselect",this.root.appendChild(l);let a=document.createElement("div");a.className="lexselect lexoption",a.name=t,a.iValue=n,void 0!==i.overflowContainer&&(i.overflowContainerX=i.overflowContainerY=i.overflowContainer);const r=(e,t)=>{const s=c.root,n=s.getBoundingClientRect(),o=e.parentElement.closest("dialog")??e.parentElement.closest(".lexcolorpicker");{const l=void 0!==i.overflowContainerY?i.overflowContainerY:e.getParentArea(),a=e.offsetHeight;let r=n.y,c=window.innerHeight;if(l){const e=l.getBoundingClientRect();c=e.y+e.height}if(o){const e=o.getBoundingClientRect();r-=e.y,c-=e.y}e.style.top=r+s.offsetHeight+"px",h.style.height="";const d=t?this._lastPlacement[0]:r-a<0,u=t?this._lastPlacement[1]:r+a>c;u&&!d?(e.style.top=r-a+"px",e.classList.add("place-above")):u&&d&&(h.style.height=c-r-32+"px"),this._lastPlacement=[d,u]}{const t=void 0!==i.overflowContainerX?i.overflowContainerX:e.getParentArea(),s=e.offsetWidth;let l=n.x;if(e.style.minWidth=n.width+"px",o){l-=o.getBoundingClientRect().x}e.style.left=l+"px";let a=window.innerWidth;if(t){const e=t.getBoundingClientRect();a=e.x+e.width}l+s>a&&(e.style.left=l-(s-n.width)+"px")}};let c=new e.Button(null,n,((e,t)=>{if(h.unfocus_event)return void delete h.unfocus_event;d.classList.remove("place-above");d.hasAttribute("open")?d.close():(d.show(),r(d)),u&&u.root.querySelector("input").focus()}),{buttonClass:"array",skipInlineCount:!0,disabled:i.disabled});c.root.style.width="100%",c.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),l.appendChild(c.root),c.refresh=e=>{const t=c.root.querySelector("span");""==t.innerText?t.innerText=e:t.innerHTML=t.innerHTML.replaceAll(t.innerText,e)};const d=document.createElement("dialog");d.className="lexselectoptions";let h=document.createElement("ul");h.tabIndex=-1,h.className="lexoptions",d.appendChild(h),h.addEventListener("focusout",(function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),e.relatedTarget===c.root.querySelector("button"))this.unfocus_event=!0,setTimeout((()=>delete this.unfocus_event),200);else{if(e.relatedTarget&&d.contains(e.relatedTarget))return;if("lexinput-filter"==e.target.className)return}d.close()}));let u=null;if(i.filter){const t=e.deepCopy(i);t.placeholder=t.placeholder??"Search...",t.skipComponent=t.skipComponent??!0,t.trigger="input",t.icon="Search",t.className="lexfilter",t.inputClass="outline",u=new e.TextInput(null,i.filterValue??"",(e=>{const t=this._filterOptions(s,e);h.refresh(t),r(d,!0)}),t),u.root.querySelector(".lextext").style.border="1px solid transparent";u.root.querySelector("input").addEventListener("focusout",(function(e){e.relatedTarget&&"UL"==e.relatedTarget.tagName&&e.relatedTarget.classList.contains("lexoptions")||d.close()})),h.appendChild(u.root)}const p=document.createElement("span");p.className="lexselectinnerlist",h.appendChild(p),h.refresh=t=>{if(p.innerHTML="",!t.length){let t=i.emptyMsg??"No options found.",s=document.createElement("div");s.className="option",s.innerHTML=e.makeIcon("Inbox",{svgClass:"mr-2"}).innerHTML+t;let n=document.createElement("li");return n.className="lexselectitem empty",n.appendChild(s),void p.appendChild(n)}for(let s=0;s<t.length;s++){let o=t[s],i=document.createElement("li"),l=document.createElement("div");l.className="option",i.appendChild(l);const r=e=>{this.set(e.currentTarget.getAttribute("value"),!1,e),d.close()};if(i.addEventListener("click",r),o.constructor!=Object){const t="@"===o[0];t?(l.innerHTML="<span>"+o.substr(1)+"</span>",i.removeEventListener("click",r)):(l.innerHTML=`<span>${o}</span>`,l.appendChild(e.makeIcon("Check")),l.value=o,i.setAttribute("value",o),o==n&&(i.classList.add("selected"),a.innerHTML=o)),i.classList.add(t?"lexselectlabel":"lexselectitem")}else{let e=document.createElement("img");e.src=o.src,i.setAttribute("value",o.value),i.className="lexlistitem",l.innerText=o.value,l.className+=" media",l.prepend(e),l.setAttribute("value",o.value),l.setAttribute("data-index",s),l.setAttribute("data-src",o.src),l.setAttribute("title",o.value),n==o.value&&i.classList.add("selected")}p.appendChild(i)}},h.refresh(s),l.appendChild(d);let m=document.createElement("div");m.className="lexcustomcontainer w-full";const f=i[`on_${n}`];if(m.toggleAttribute("hidden",!f),f){m.innerHTML="";const t=new e.Panel;t.queue(m),f.call(this,t),t.clearQueue()}this.root.appendChild(m),this.root.dataset.opened=!!f,e.doAsync(this.onResize.bind(this))}_filterOptions(e,t){const s=!t.length;let n=[];for(let o=0;o<e.length;o++){let i=e[o];if(!s){let e="string"==typeof i?i:i.value;const s=t.toLowerCase();if(!e.toLowerCase().includes(s))continue}n.push(i)}return n}}e.Select=x;e.Curve=class extends y{constructor(t,s,n,o={}){let i=JSON.parse(JSON.stringify(s));super(y.CURVE,t,i,o),this.onGetValue=()=>JSON.parse(JSON.stringify(a.element.value)),this.onSetValue=(s,o,i)=>{a.element.value=JSON.parse(JSON.stringify(s)),a.redraw(),o||this._trigger(new e.IEvent(t,a.element.value,i),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};var l=document.createElement("div");l.className="lexcurve",this.root.appendChild(l),o.callback=(s,o)=>{this._trigger(new e.IEvent(t,s,o),n)},o.name=t;let a=new e.CanvasCurve(s,o);l.appendChild(a.element),this.curveInstance=a;new ResizeObserver((e=>{for(const t of e)a.canvas.width=t.contentRect.width,a.redraw()})).observe(l),e.doAsync(this.onResize.bind(this))}};e.Dial=class extends y{constructor(t,s,n,o={}){let i=JSON.parse(JSON.stringify(s));super(y.DIAL,t,i,o),this.onGetValue=()=>JSON.parse(JSON.stringify(a.element.value)),this.onSetValue=(s,o,i)=>{a.element.value=JSON.parse(JSON.stringify(s)),a.redraw(),o||this._trigger(new e.IEvent(t,a.element.value,i),n)},this.onResize=t=>{const s=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${s})`,e.flushCss(l),a.element.style.height=a.element.offsetWidth+"px",a.canvas.width=a.element.offsetWidth,l.style.width=a.element.offsetWidth+"px",a.canvas.height=a.canvas.width,a.redraw()};var l=document.createElement("div");l.className="lexcurve",this.root.appendChild(l),o.callback=(s,o)=>{this._trigger(new e.IEvent(t,s,o),n)},o.name=t;let a=new e.CanvasDial(this,s,o);l.appendChild(a.element),this.dialInstance=a,e.doAsync(this.onResize.bind(this))}};e.Layers=class extends y{constructor(t,s,n,o={}){super(y.LAYERS,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,l)=>{s=o,this.setLayers(s),i||this._trigger(new e.IEvent(t,s,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};const i=document.createElement("div");i.className="lexlayers",this.root.appendChild(i);const l=o.maxBits??16;this.setLayers=e=>{i.innerHTML="";let t=e.toString(2),s=t.length;for(let e=0;e<l-s;++e)t="0"+t;for(let s=0;s<l;++s){let n=document.createElement("div");if(n.className="lexlayer",null!=e){const e=t[l-s-1];null!=e&&"1"==e&&n.classList.add("selected")}n.innerText=s+1,n.title="Bit "+s+", value "+(1<<s),i.appendChild(n),n.addEventListener("click",(t=>{t.stopPropagation(),t.stopImmediatePropagation(),t.target.classList.toggle("selected");const n=e^1<<s;this.set(n,!1,t)}))}},this.setLayers(s),e.doAsync(this.onResize.bind(this))}};e.ItemArray=class extends y{constructor(t,s=[],n,o={}){o.nameWidth="100%",super(y.ARRAY,t,null,o),this.onGetValue=()=>s,this.onSetValue=(o,i,l)=>{s=o,this._updateItems(),i||this._trigger(new e.IEvent(t,s,l),n)};let i=document.createElement("div");i.className="lexarray",i.style.width="100%",this.root.appendChild(i),this.root.dataset.opened=!1;let l=`Array (size ${s.length})`;const a=new e.Button(null,l,(()=>{this.root.dataset.opened="true"!=this.root.dataset.opened,this.root.querySelector(".lexarrayitems").toggleAttribute("hidden")}),{buttonClass:"array"});a.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),i.appendChild(a.root);let r=document.createElement("div");r.className="lexarrayitems",r.toggleAttribute("hidden",!0),this.root.appendChild(r),this._updateItems=()=>{let i=this.root.querySelector(".lexbutton.array span");for(let e of i.childNodes)if(e.nodeType===Node.TEXT_NODE){e.textContent=`Array (size ${s.length})`;break}r.innerHTML="";for(let i=0;i<s.length;++i){const l=s[i];let a=o.innerValues?"select":l.constructor,c=null;switch(a){case String:c=new e.TextInput(i+"",l,(function(e,t){s[i]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0});break;case Number:c=new L(i+"",l,(function(e,t){s[i]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0});break;case"select":c=new x(i+"",o.innerValues,l,(function(e,t){s[i]=e,n(s)}),{nameWidth:"12px",className:"p-0",skipReset:!0})}console.assert(c,`Value of type ${a} cannot be modified in ItemArray`),r.appendChild(c.root);const d=new e.Button(null,"",((o,i)=>{s.splice(s.indexOf(l),1),this._updateItems(),this._trigger(new e.IEvent(t,s,i),n)}),{title:"Remove item",icon:"Trash3"});c.root.appendChild(d.root)}const l=new e.Button(null,e.makeIcon("Plus",{svgClass:"sm"}).innerHTML+"Add item",((i,l)=>{s.push(o.innerValues?o.innerValues[0]:""),this._updateItems(),this._trigger(new e.IEvent(t,s,l),n)}),{buttonClass:"array"});r.appendChild(l.root)},this._updateItems()}};e.List=class extends y{constructor(t,s,n,o,i={}){super(y.LIST,t,n,i),this.onGetValue=()=>n,this.onSetValue=(i,a,r)=>{l.querySelectorAll(".lexlistitem").forEach((e=>e.classList.remove("selected")));let c=null;for(let e=0;e<s.length;++e){const t=s[e];if(t==i||t.constructor==Array&&t[0]==i){c=e;break}}c?(l.children[c].classList.toggle("selected"),n=i,a||this._trigger(new e.IEvent(t,i,r),o)):console.error(`Cannot find item ${i} in List.`)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},this._updateValues=i=>{s=i,l.innerHTML="";for(let i=0;i<s.length;++i){let a=null,r=s[i];r.constructor===Array&&(a=r[1],r=r[0]);let c=document.createElement("div");c.className="lexlistitem"+(n==r?" selected":""),a&&c.appendChild(e.makeIcon(a)),c.innerHTML+=`<span>${r}</span>`,c.addEventListener("click",(s=>{l.querySelectorAll(".lexlistitem").forEach((e=>e.classList.remove("selected"))),c.classList.toggle("selected"),n=r,this._trigger(new e.IEvent(t,r,s),o)})),l.appendChild(c)}};let l=document.createElement("div");l.className="lexlist",this.root.appendChild(l),this._updateValues(s),e.doAsync(this.onResize.bind(this))}};e.Tags=class extends y{constructor(t,s,n,o={}){s=s.replace(/\s/g,"").split(",");let i=[].concat(s);super(y.TAGS,t,i,o),this.onGetValue=()=>[].concat(s),this.onSetValue=(o,i,l)=>{s=[].concat(o),this.generateTags(s),i||this._trigger(new e.IEvent(t,s,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};const l=document.createElement("div");l.className="lextags",this.root.appendChild(l),this.generateTags=t=>{l.innerHTML="";for(let s=0;s<t.length;++s){const n=t[s],o=document.createElement("span");o.className="lextag",o.innerHTML=n;const i=e.makeIcon("X",{svgClass:"sm"});o.appendChild(i),i.addEventListener("click",(e=>{o.remove(),t.splice(t.indexOf(n),1),this.set(t,!1,e)})),l.appendChild(o)}let s=document.createElement("input");s.value="",s.placeholder="Add tag...",l.appendChild(s),s.onkeydown=e=>{const n=s.value.replace(/\s/g,"");if(" "==e.key||"Enter"==e.key){if(e.preventDefault(),!n.length||t.indexOf(n)>-1)return;t.push(n),this.set(t,!1,e)}},s.focus()},this.generateTags(s),e.doAsync(this.onResize.bind(this))}};e.Checkbox=class extends y{constructor(t,s,n,o={}){if(!t&&!o.label)throw"Set Component Name or at least a label!";super(y.CHECKBOX,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{o!=s&&(l.checked=s=o,this.root.querySelector(".lexcheckboxsubmenu")?.toggleAttribute("hidden",!o),i||this._trigger(new e.IEvent(t,o,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexcheckboxcont",this.root.appendChild(i);let l=document.createElement("input");l.type="checkbox",l.className="lexcheckbox "+(o.className??"primary"),l.checked=s,l.disabled=o.disabled??!1,i.appendChild(l);let a=document.createElement("span");if(a.className="checkboxtext",a.innerHTML=o.label??"On",i.appendChild(a),l.addEventListener("change",(e=>{this.set(l.checked,!1,e)})),o.suboptions){let t=document.createElement("div");t.className="lexcheckboxsubmenu",t.toggleAttribute("hidden",!l.checked);const s=new e.Panel;s.queue(t),o.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.Toggle=class extends y{constructor(t,s,n,o={}){if(!t&&!o.label)throw"Set Component Name or at least a label!";super(y.TOGGLE,t,s,o),this.onGetValue=()=>l.checked,this.onSetValue=(o,i,a)=>{o!=s&&(l.checked=s=o,this.root.querySelector(".lextogglesubmenu")?.toggleAttribute("hidden",!o),i||this._trigger(new e.IEvent(t,o,a),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lextogglecont",this.root.appendChild(i);let l=document.createElement("input");l.type="checkbox",l.className="lextoggle "+(o.className??""),l.checked=s,l.iValue=s,l.disabled=o.disabled??!1,i.appendChild(l);let a=document.createElement("span");if(a.className="toggletext",a.innerHTML=o.label??"On",i.appendChild(a),l.addEventListener("change",(e=>{this.set(l.checked,!1,e)})),o.suboptions){let t=document.createElement("div");t.className="lextogglesubmenu",t.toggleAttribute("hidden",!l.checked);const s=new e.Panel;s.queue(t),o.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.RadioGroup=class extends y{constructor(t,s,n,o,i={}){super(y.RADIO,t,null,i);let l=null;this.onGetValue=()=>{const e=a.querySelectorAll("button");return l?[l,e[l]]:void 0},this.onSetValue=(t,s,i)=>{t=t[0]??t,console.assert(t.constructor==Number,"RadioGroup _value_ must be an Array index!");const l=a.querySelectorAll("button");l.forEach((e=>{e.checked=!1,e.classList.remove("checked")}));const r=l[t];r.checked=!r.checked,r.classList.toggle("checked"),s||this._trigger(new e.IEvent(null,[t,n[t]],i),o)};var a=document.createElement("div");a.className="lexradiogroup "+(i.className??""),this.root.appendChild(a);let r=document.createElement("span");r.innerHTML=s,a.appendChild(r);for(let e=0;e<n.length;++e){const t=document.createElement("div");t.className="lexradiogroupitem",a.appendChild(t);const s=document.createElement("button");s.className="flex p-0 rounded-lg cursor-pointer",s.disabled=i.disabled??!1,t.appendChild(s),s.addEventListener("click",(t=>{this.set(e,!1,t)}));const o=document.createElement("span");s.appendChild(o);const l=document.createElement("span");l.innerHTML=n[e],t.appendChild(l)}i.selected&&(console.assert(i.selected.constructor==Number,"RadioGroup _selected_ must be an Array index!"),l=i.selected,this.set(l,!0))}};e.ColorInput=class extends y{constructor(t,s,n,o={}){s=s??"#000000";const i=o.useAlpha??(s.constructor===Object&&"a"in s||s.constructor===String&&[5,9].includes(s.length)),l=new e.Color(s);s=i?l.hex:l.hex.substr(0,7),super(y.COLOR,t,s,o),this.onGetValue=()=>{const t=new e.Color(s);return o.useRGB?t.rgb:s},this.onSetValue=(l,a,r)=>{const u=new e.Color(l);if(c.style.color=s=u.hex.substr(0,7),i&&(d.style.color=s=u.hex),this._skipTextUpdate||h.set(s,!0,r),!a){let l=s;o.useRGB&&(l=u.rgb,i||delete l.a),this._trigger(new e.IEvent(t,l,r),n)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};var a=document.createElement("span");a.className="lexcolor",this.root.appendChild(a),this.picker=new e.ColorPicker(s,{colorModel:o.useRGB?"RGB":"Hex",useAlpha:i,onChange:e=>{this.set(e.hex)}});let r=e.makeContainer(["18px","18px"],"flex flex-row bg-contrast rounded overflow-hidden","",a);r.tabIndex="1",r.addEventListener("click",(t=>{o.disabled||(this._popover=new e.Popover(r,[this.picker]))}));let c=document.createElement("div");c.className="lexcolorsample",c.style.color=s,r.appendChild(c);let d=null;i?(d=document.createElement("div"),d.className="lexcolorsample",d.style.color=s,r.appendChild(d)):c.style.width="18px";const h=new e.TextInput(null,s,(e=>{this._skipTextUpdate=!0,this.set(e),delete this._skipTextUpdate,this.picker.fromHexColor(e)}),{width:"calc( 100% - 24px )",disabled:o.disabled});h.root.style.marginLeft="6px",a.appendChild(h.root),e.doAsync(this.onResize.bind(this))}};e.RangeInput=class extends y{constructor(t,s,n,o={}){const i=e.deepCopy(s);super(y.RANGE,t,e.deepCopy(i),o);const l=s.constructor==Array&&2==s.length;l&&(s=i[0],o.fill=!1),this.onGetValue=()=>{let e=s;return l?e=[s,i[1]]:o.left&&(e=+r.max-s+ +r.min),e},this.onSetValue=(c,d,h)=>{let u="";const p=o.max-o.min;if(l){r.value=s=e.clamp(+c[0],+r.min,+r.max),this._maxSlider.value=i[1]=e.clamp(+c[1],+r.min,+r.max);const t=s/p-.5,n=i[1]/p-.5,l=e.remapRange(s,o.min,o.max,0,1),d=e.remapRange(i[1],o.min,o.max,0,1);r.style.setProperty("--range-min-value",100*l+"%"),r.style.setProperty("--range-max-value",100*d+"%"),r.style.setProperty("--range-fix-min-offset",-t+"rem"),r.style.setProperty("--range-fix-max-offset",`${n}rem`),a.dataset.tooltipOffsetX=a.offsetWidth*l+a.offsetWidth*(d-l)*.5-.5*a.offsetWidth,u=`${s} - ${i[1]}`}else{if(isNaN(c))return;r.value=s=e.clamp(+c,+r.min,+r.max);const t=.5*e.remapRange(s,o.min,o.max,0,1);a.dataset.tooltipOffsetX=a.offsetWidth*t-.5*a.offsetWidth,u=`${s}`}if(a.dataset.tooltipContent=u,this._labelTooltip&&(this._labelTooltip.innerHTML=u),!d){let a=s;l?a=[s,i[1]]:o.left&&(a=+r.max-s+ +r.min),this._trigger(new e.IEvent(t,a,h),n)}},this.onResize=t=>{const n=this.root.domName?.style.width??"0px";if(a.style.width=o.inputWidth??`calc( 100% - ${n})`,l){const t=o.max-o.min,n=s/t-.5,l=i[1]/t-.5;r.style.setProperty("--range-min-value",100*e.remapRange(s,o.min,o.max,0,1)+"%"),r.style.setProperty("--range-max-value",100*e.remapRange(i[1],o.min,o.max,0,1)+"%"),r.style.setProperty("--range-fix-min-offset",-n+"rem"),r.style.setProperty("--range-fix-max-offset",`${l}rem`)}};const a=document.createElement("div");a.className="lexrange relative",this.root.appendChild(a);let r=document.createElement("input");if(r.className="lexrangeslider "+(l?"pointer-events-none ":"")+(o.className??""),r.min=o.min??0,r.max=o.max??100,r.step=o.step??1,r.type="range",r.disabled=o.disabled??!1,s.constructor==Number&&(s=e.clamp(s,+r.min,+r.max)),o.left&&(s=+r.max-s+ +r.min,r.classList.add("left")),(o.fill??1)||r.classList.add("no-fill"),r.value=s,a.appendChild(r),r.addEventListener("input",(e=>{this.set(l?[Math.min(e.target.valueAsNumber,i[1]),i[1]]:e.target.valueAsNumber,!1,e)}),{passive:!1}),l||(r.addEventListener("mousedown",(function(e){o.onPress&&o.onPress.bind(r)(e,r)}),!1),r.addEventListener("mouseup",(function(e){o.onRelease&&o.onRelease.bind(r)(e,r)}),!1)),this.setLimits=(e,t,s)=>{r.min=e??r.min,r.max=t??r.max,r.step=s??r.step,y._dispatchEvent(r,"input",!0)},e.doAsync((()=>{this.onResize();let t=0;if(l){const n=e.remapRange(s,o.min,o.max,0,1),l=e.remapRange(i[1],o.min,o.max,0,1);t=a.offsetWidth*n+a.offsetWidth*(l-n)*.5-.5*a.offsetWidth}else{const n=.5*e.remapRange(s,o.min,o.max,0,1);t=a.offsetWidth*n-.5*a.offsetWidth}e.asTooltip(a,`${s}${l?`- ${i[1]}`:""}`,{offsetX:t,callback:e=>{this._labelTooltip=e}})})),i.constructor==Array){let t=document.createElement("input");t.className="lexrangeslider no-fill pointer-events-none overlap absolute top-0 left-0 "+(o.className??""),t.min=o.min??0,t.max=o.max??100,t.step=o.step??1,t.type="range",t.disabled=o.disabled??!1,this._maxSlider=t;let n=i[1];t.value=n=e.clamp(n,+t.min,+t.max),a.appendChild(t),t.addEventListener("input",(e=>{i[1]=Math.max(s,+e.target.valueAsNumber),this.set([s,i[1]],!1,e)}),{passive:!1})}}};class L extends y{constructor(t,s,n,o={}){super(y.NUMBER,t,s,o),this.onGetValue=()=>s,this.onSetValue=(i,a,c)=>{isNaN(i)||(s=e.clamp(+i,+r.min,+r.max),r.value=s=e.round(s,o.precision),l.querySelector(".lexinputslider")&&(l.querySelector(".lexinputslider").value=s),a||this._trigger(new e.IEvent(t,s,c),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexnumber",this.root.appendChild(i);let l=document.createElement("div");l.className="numberbox",i.appendChild(l);let a=e.makeContainer(["auto","100%"],"relative flex flex-row cursor-text","",l),r=document.createElement("input");r.id="number_"+e.guidGenerator(),r.className="vecinput",r.min=o.min??-1e24,r.max=o.max??1e24,r.step=o.step??"any",r.type="number",s.constructor==Number&&(s=e.clamp(s,+r.min,+r.max),s=e.round(s,o.precision)),r.value=r.iValue=s,a.appendChild(r);const c=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});if(a.appendChild(c),o.units){let t=e.makeContainer(["auto","auto"],"px-2 bg-secondary content-center",o.units,a,{"word-break":"keep-all"});r.unitBox=t}if(o.disabled&&(this.disabled=r.disabled=!0),!o.skipSlider&&void 0!==o.min&&void 0!==o.max){let t=e.makeContainer(["100%","auto"],"z-1 input-box","",l),n=document.createElement("input");n.className="lexinputslider",n.min=o.min,n.max=o.max,n.step=o.step??1,n.type="range",n.value=s,n.disabled=this.disabled,n.addEventListener("input",(e=>{this.set(n.valueAsNumber,!1,e)}),!1),n.addEventListener("mousedown",(function(e){o.onPress&&o.onPress.bind(n)(e,n)}),!1),n.addEventListener("mouseup",(function(e){o.onRelease&&o.onRelease.bind(n)(e,n)}),!1),t.appendChild(n),this.setLimits=(e,t,o)=>{r.min=n.min=e??r.min,r.max=n.max=t??r.max,r.step=o??r.step,n.step=o??n.step,this.set(s,!0)}}r.addEventListener("input",(function(t){s=+this.valueAsNumber,s=e.round(s,o.precision)}),!1),r.addEventListener("wheel",(e=>{if(e.preventDefault(),r!==document.activeElement)return;let t=o.step??1;e.shiftKey?t*=10:e.altKey&&(t*=.1),s=+r.valueAsNumber-t*(e.deltaY>0?1:-1),this.set(s,!1,e)}),{passive:!1}),r.addEventListener("change",(e=>{this.set(r.valueAsNumber,!1,e)}),{passive:!1});var d=this;let h=e=>{let t=-e.movementY;if(0!=t){let n=o.step??1;e.shiftKey?n*=10:e.altKey&&(n*=.1),s=+r.valueAsNumber+n*t,this.set(s,!1,e)}e.stopPropagation(),e.preventDefault()},u=e=>{var t=d.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("noevents"),c.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),o.onRelease&&o.onRelease.bind(r)(e,r)};a.addEventListener("mousedown",(t=>{if(document.activeElement!=r&&t.button==e.MOUSE_LEFT_CLICK){var s=d.root.ownerDocument;s.addEventListener("mousemove",h),s.addEventListener("mouseup",u),document.body.classList.add("noevents"),c.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||a.requestPointerLock(),o.onPress&&o.onPress.bind(r)(t,r)}})),e.doAsync(this.onResize.bind(this))}}e.NumberInput=L;e.Vector=class extends y{constructor(t,s,n,o,i={}){t=e.clamp(t,2,4),n=n??new Array(t).fill(0),super(y.VECTOR,s,[].concat(n),i),this.onGetValue=()=>{let e=this.root.querySelectorAll("input[type='number']"),t=[];for(var s of e)t.push(+s.value);return t},this.onSetValue=(t,a,r)=>{if(l.length==t.length){for(let s=0;s<l.length;++s){let o=t[s];o=e.clamp(o,+l[s].min,+l[s].max),o=e.round(o,i.precision)??0,l[s].value=n[s]=o}a||this._trigger(new e.IEvent(s,n,r),o)}else console.error("Input length does not match vector length.")},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};const l=[];var a=document.createElement("div");a.className="lexvector",this.root.appendChild(a),this.disabled=i.disabled??!1;const r=this;for(let d=0;d<t;++d){let h=document.createElement("div");h.className="vecbox",h.innerHTML="<span class='"+e.Panel.VECTOR_COMPONENTS[d]+"'></span>";let u=document.createElement("input");u.className="vecinput v"+t,u.min=i.min??-1e24,u.max=i.max??1e24,u.step=i.step??"any",u.type="number",u.id="vec"+t+"_"+e.guidGenerator(),u.idx=d,l[d]=u,h.appendChild(u),n[d].constructor==Number&&(n[d]=e.clamp(n[d],+u.min,+u.max),n[d]=e.round(n[d],i.precision)),u.value=u.iValue=n[d];const p=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});function m(t){if(document.activeElement!=u&&t.button==e.MOUSE_LEFT_CLICK){var s=r.root.ownerDocument;s.addEventListener("mousemove",f),s.addEventListener("mouseup",g),document.body.classList.add("noevents"),p.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||h.requestPointerLock(),i.onPress&&i.onPress.bind(u)(t,u)}}function f(t){let s=-t.movementY;if(0!=s){let n=i.step??1;if(t.shiftKey?n=10:t.altKey&&(n=.1),c.locked)for(let t of r.root.querySelectorAll(".vecinput"))t.value=e.round(+t.valueAsNumber+n*s,i.precision),y._dispatchEvent(t,"change");else u.value=e.round(+u.valueAsNumber+n*s,i.precision),y._dispatchEvent(u,"change")}t.stopPropagation(),t.preventDefault()}function g(e){var t=r.root.ownerDocument;t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",g),document.body.classList.remove("noevents"),p.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),i.onRelease&&i.onRelease.bind(u)(e,u)}h.appendChild(p),this.disabled&&(u.disabled=!0),u.addEventListener("wheel",(function(t){if(t.preventDefault(),this!==document.activeElement)return;let s=i.step??1;if(t.shiftKey?s=10:t.altKey&&(s=.1),c.locked)for(let n of r.querySelectorAll(".vecinput"))n.value=e.round(+n.valueAsNumber-s*(t.deltaY>0?1:-1),i.precision),y._dispatchEvent(n,"change");else this.value=e.round(+this.valueAsNumber-s*(t.deltaY>0?1:-1),i.precision),y._dispatchEvent(u,"change")}),{passive:!1}),u.addEventListener("change",(t=>{if(isNaN(t.target.value))return;let s=e.clamp(t.target.value,+u.min,+u.max);if(s=e.round(s,i.precision),c.locked)for(let e of l)e.value=s,n[e.idx]=s;else u.value=s,n[t.target.idx]=s;this.set(n,!1,t)}),!1),h.addEventListener("mousedown",m),a.appendChild(h)}void 0===i.min&&void 0===i.max||(this.setLimits=(e,t,s)=>{for(let n of l)n.min=e??n.min,n.max=t??n.max,n.step=s??n.step;this.set(n,!0)});const c=new e.Button(null,"",(e=>{c.locked=e}),{title:"Lock",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});a.appendChild(c.root),e.doAsync(this.onResize.bind(this))}};e.SizeInput=class extends y{constructor(t,s,n,o={}){super(y.SIZE,t,s,o),this.onGetValue=()=>{const e=[];for(let t=0;t<this.root.dimensions.length;++t)e.push(this.root.dimensions[t].value());return e},this.onSetValue=(e,t,s)=>{for(let s=0;s<this.root.dimensions.length;++s)this.root.dimensions[s].set(e[s],t)},this.root.aspectRatio=2==s.length?s[0]/s[1]:null,this.root.dimensions=[];for(let t=0;t<s.length;++t){const i=new e.Panel;if(this.root.dimensions[t]=i.addNumber(null,s[t],(e=>{const s=this.value();if(this.root.locked){const n=0==t?1/this.root.aspectRatio:this.root.aspectRatio,o=(1+t)%2;s[o]=e*n,this.root.dimensions[o].set(s[o],!0)}n&&n(s)}),{min:0,disabled:o.disabled,precision:o.precision,className:"flex-fill"}),this.root.appendChild(this.root.dimensions[t].root),t+1!=s.length){const t=e.makeIcon("X",{svgClass:"fg-accent font-bold"});this.root.appendChild(t)}}if(o.units){let e=document.createElement("span");e.className="select-none fg-tertiary font-medium",e.innerText=o.units,this.root.appendChild(e)}if(this.root.aspectRatio){const t=new e.Button(null,"",(e=>{if(this.root.locked=e,e){const e=this.value();this.root.aspectRatio=e[0]/e[1]}}),{title:"Lock Aspect Ratio",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});this.root.appendChild(t.root)}}};e.OTPInput=class extends y{constructor(t,s,n,o={}){const i=o.pattern??"xxx-xxx",l=(i.match(/x/g)||[]).length;(s=String(s)).length||(s="x".repeat(l)),super(y.OTP,t,s,o),this.onGetValue=()=>+s,this.onSetValue=(o,i,l)=>{c(s=o),i||this._trigger(new e.IEvent(t,+o,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`},this.disabled=o.disabled??!1;const a=document.createElement("div");a.className="lexotp flex flex-row items-center",this.root.appendChild(a);const r=i.split("-"),c=t=>{a.innerHTML="";let s=0,n=0;for(let o=0;o<r.length;++o){const i=r[o];for(let o=0;o<i.length;++o){let l=t[s++];l="x"==l?"":l;const r=e.makeContainer(["36px","30px"],"lexotpslot border-top border-bottom border-left px-3 cursor-text select-none font-medium outline-none",l,a);r.tabIndex="1",this.disabled&&r.classList.add("disabled");const c=s;0==o?r.className+=" rounded-l":o==i.length-1&&(r.className+=" rounded-r border-right"),r.addEventListener("click",(()=>{if(this.disabled)return;a.querySelectorAll(".lexotpslot").forEach((e=>e.classList.remove("active")));const e=a.querySelectorAll(".lexotpslot")[n];e.classList.add("active"),e.focus()})),r.addEventListener("blur",(()=>{this.disabled||e.doAsync((()=>{a.contains(document.activeElement)||a.querySelectorAll(".lexotpslot").forEach((e=>e.classList.remove("active")))}),10)})),r.addEventListener("keyup",(e=>{if(!this.disabled)if(/[^0-9]+/g.test(e.key))if("ArrowLeft"==e.key||"ArrowRight"==e.key){const t="ArrowLeft"==e.key?-1:1,s=a.querySelectorAll(".lexotpslot")[n+t];s&&(a.querySelectorAll(".lexotpslot")[n].classList.remove("active"),s.classList.add("active"),s.focus(),n+=t)}else"Enter"!=e.key||t.includes("x")||this.set(t);else{const s=e.key;console.assert(NaN!=parseInt(s)),r.innerHTML=s,t=t.substring(0,c-1)+s+t.substring(c);const o=a.querySelectorAll(".lexotpslot")[n+1];o?(a.querySelectorAll(".lexotpslot")[n].classList.remove("active"),o.classList.add("active"),o.focus(),n++):this.set(t)}}))}o<r.length-1&&e.makeContainer(["auto","auto"],"mx-2","-",a)}console.assert(s==t.length,"OTP Value/Pattern Mismatch!")};c(s)}};e.Pad=class extends y{constructor(t,s,n,o={}){super(y.PAD,t,null,o),this.onGetValue=()=>a.value.xy,this.onSetValue=(s,o,i)=>{a.value.set(s[0],s[1]),r(a.value),o||this._trigger(new e.IEvent(t,a.value.xy),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexpad",this.root.appendChild(i);let l=document.createElement("div");l.id="lexpad-"+t,l.className="lexinnerpad",l.style.width=o.padSize??"96px",l.style.height=o.padSize??"96px",i.appendChild(l);let a=document.createElement("div");a.className="lexpadthumb",a.value=new e.vec2(s[0],s[1]),a.min=o.min??0,a.max=o.max??1,l.appendChild(a);let r=t=>{const[s,n]=[l.offsetWidth,l.offsetHeight],o=new e.vec2(e.remapRange(t.x,a.min,a.max,0,1),e.remapRange(t.y,a.min,a.max,0,1));a.style.transform=`translate(calc( ${s*o.x}px - 50% ), calc( ${n*o.y}px - 50%)`};l.addEventListener("mousedown",(function(e){if(document.activeElement==a)return;var t=c.root.ownerDocument;t.addEventListener("mousemove",d),t.addEventListener("mouseup",h),document.body.classList.add("nocursor"),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),a.classList.add("active"),o.onPress&&o.onPress.bind(a)(e,a)}));let c=this;function d(s){const o=l.getBoundingClientRect(),i=new e.vec2(s.x-o.x,s.y-o.y);i.clp(0,l.offsetWidth,i);const[r,d]=[l.offsetWidth,l.offsetHeight],h=i.div(new e.vec2(l.offsetWidth,l.offsetHeight));a.style.transform=`translate(calc( ${r*h.x}px - 50% ), calc( ${d*h.y}px - 50%)`,a.value=new e.vec2(e.remapRange(h.x,0,1,a.min,a.max),e.remapRange(h.y,0,1,a.min,a.max)),c._trigger(new e.IEvent(t,a.value.xy,s),n),s.stopPropagation(),s.preventDefault()}function h(e){var t=c.root.ownerDocument;t.removeEventListener("mousemove",d),t.removeEventListener("mouseup",h),document.body.classList.remove("nocursor"),document.body.classList.remove("noevents"),a.classList.remove("active"),o.onRelease&&o.onRelease.bind(a)(e,a)}e.doAsync((()=>{this.onResize(),r(a.value)}))}};e.Progress=class extends y{constructor(t,s,n={}){super(y.PROGRESS,t,s,n),this.onGetValue=()=>i.value,this.onSetValue=(s,o,a)=>{s=e.clamp(s,i.min,i.max),this.root.querySelector("meter").value=s,l(),this.root.querySelector("span")&&(this.root.querySelector("span").innerText=s),o||this._trigger(new e.IEvent(t,s,a),n.callback)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lexprogress",this.root.appendChild(o);let i=document.createElement("meter");i.id="lexprogressbar-"+t,i.className="lexprogressbar",i.step="any",i.min=n.min??0,i.max=n.max??1,i.low=n.low??i.low,i.high=n.high??i.high,i.optimum=n.optimum??i.optimum,i.value=s,o.appendChild(i);const l=()=>{let t=e.getThemeColor("global-selected");null!=i.low&&i.value<i.low?t=e.getThemeColor("global-color-error"):null!=i.high&&i.value<i.high&&(t=e.getThemeColor("global-color-warning")),i.style.background=`color-mix(in srgb, ${t} 20%, transparent)`};if(n.showValue){document.getElementById("progressvalue-"+t)&&document.getElementById("progressvalue-"+t).remove();let e=document.createElement("span");e.id="progressvalue-"+t,e.style.padding="0px 5px",e.innerText=s,o.appendChild(e)}if(n.editable){i.classList.add("editable");let t=t=>{var o=this.root.ownerDocument;o.addEventListener("mousemove",s),o.addEventListener("mouseup",n),document.body.classList.add("noevents"),i.classList.add("grabbing"),t.stopImmediatePropagation(),t.stopPropagation();const l=i.getBoundingClientRect(),a=e.round(e.remapRange(t.offsetX,0,l.width,i.min,i.max));this.set(a,!1,t)},s=t=>{if(0!=t.movementX){const s=i.getBoundingClientRect(),n=e.round(e.remapRange(t.offsetX-s.x,0,s.width,i.min,i.max));this.set(n,!1,t)}t.stopPropagation(),t.preventDefault()},n=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",n),document.body.classList.remove("noevents"),i.classList.remove("grabbing")};i.addEventListener("mousedown",t)}l(),e.doAsync(this.onResize.bind(this))}};e.FileInput=class extends y{constructor(t,s,n={}){super(y.FILE,t,null,n);let o=n.local??!0,i=n.type??"text",l=n.read??!0;this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};let a=document.createElement("input");if(a.className="lexfileinput",a.type="file",a.disabled=n.disabled??!1,this.root.appendChild(a),n.placeholder&&(a.placeholder=n.placeholder),a.addEventListener("change",(function(e){const t=e.target.files;if(t.length)if(l){n.onBeforeRead&&n.onBeforeRead();const e=new FileReader;"text"===i?e.readAsText(t[0]):"buffer"===i?e.readAsArrayBuffer(t[0]):"bin"===i?e.readAsBinaryString(t[0]):"url"===i&&e.readAsDataURL(t[0]),e.onload=e=>{s.call(this,e.target.result,t[0])}}else s(t[0])})),a.addEventListener("cancel",(function(e){s(null)})),o){let t=null;const s=new e.Button(null,"",(()=>{t||(t=new e.Dialog("Load Settings",(e=>{e.addSelect("Type",["text","buffer","bin","url"],i,(e=>{i=e})),e.addButton(null,"Reload",(e=>{a.dispatchEvent(new Event("change"))}))}),{onclose:e=>{e.remove(),t=null}}))}),{skipInlineCount:!0,title:"Settings",disabled:n.disabled,icon:"Settings"});this.root.appendChild(s.root)}e.doAsync(this.onResize.bind(this))}};e.Tree=class extends y{constructor(t,s,n={}){n.hideName=!0,super(y.TREE,t,null,n);let o=document.createElement("div");if(o.className="lextree",this.root.appendChild(o),t){let e=document.createElement("span");e.innerHTML=t,o.appendChild(e)}let i=document.createElement("div");if(i.className="lextreetools",t||(i.className+=" notitle"),n.icons)for(let t of n.icons){const s=e.makeIcon(t.icon,{title:t.name});s.addEventListener("click",t.callback),i.appendChild(s)}n.filter=n.filter??!0;let l=null;if(n.filter){l=document.createElement("input"),l.className="lexnodetreefilter",l.setAttribute("placeholder","Filter.."),l.style.width="100%",l.addEventListener("input",(()=>{this.innerTree.refresh()}));let t=e.makeIcon("Search");i.appendChild(l),i.appendChild(t)}(n.icons||n.filter)&&o.appendChild(i);let a=document.createElement("ul");a.addEventListener("contextmenu",(function(e){e.preventDefault()})),o.appendChild(a),this.innerTree=new b(o,s,n)}};e.TabSections=class extends y{constructor(t,s,n={}){if(n.hideName=!0,super(y.TABS,t,null,n),s.constructor!=Array)throw"Param @tabs must be an Array!";if(!s.length)throw"Tab list cannot be empty!";const o=n.vertical??!0,i=!o&&(n.showNames??!1);this.tabDOMs={};let l=document.createElement("div");l.className="lextabscontainer",o||(l.className+=" horizontal");let a=document.createElement("div");a.className="tabs",l.appendChild(a),this.root.appendChild(l),s.findIndex((e=>!0===e.selected))<0&&(s[0].selected=!0);for(let t of s){console.assert(t.name);let s=document.createElement("div");s.className="lextab "+(t.selected?"selected":""),s.innerHTML=i?t.name:"",s.appendChild(e.makeIcon(t.icon??"Hash",{title:t.name,iconClass:t.iconClass,svgClass:t.svgClass})),this.tabDOMs[t.name]=s;let n=document.createElement("div");if(n.id=t.name.replace(/\s/g,""),n.className="components",n.toggleAttribute("hidden",!t.selected),l.appendChild(n),s.addEventListener("click",(e=>{a.querySelectorAll(".lextab").forEach((e=>{e.classList.remove("selected")})),s.classList.add("selected"),l.querySelectorAll(".components").forEach((e=>{e.toggleAttribute("hidden",!0)}));l.querySelector("#"+n.id).toggleAttribute("hidden"),t.onSelect&&t.onSelect(this,n)})),a.appendChild(s),t.onCreate){const s=new e.Panel;s.queue(n),t.onCreate.call(this,s,n),s.clearQueue()}}this.tabs=s}select(e){const t=this.tabDOMs[e];t&&t.click()}};e.Counter=class extends y{constructor(t,s,n,o={}){super(y.COUNTER,t,s,o),this.onGetValue=()=>h.count,this.onSetValue=(s,o,a)=>{s=e.clamp(s,i,l),h.count=s,h.innerHTML=s,o||this._trigger(new e.IEvent(t,s,a),n)};const i=o.min??0,l=o.max??100,a=o.step??1,r=document.createElement("div");r.className="lexcounter",this.root.appendChild(r);const c=new e.Button(null,"",((e,t)=>{let s=a??1;t.shiftKey&&(s*=10),this.set(h.count-s,!1,t)}),{skipInlineCount:!0,title:"Minus",icon:"Minus"});r.appendChild(c.root);const d=document.createElement("div");d.className="lexcounterbox",r.appendChild(d);const h=document.createElement("span");if(h.className="lexcountervalue",h.innerHTML=s,h.count=s,d.appendChild(h),o.label){const e=document.createElement("span");e.className="lexcounterlabel",e.innerHTML=o.label,d.appendChild(e)}const u=new e.Button(null,"",((e,t)=>{let s=a??1;t.shiftKey&&(s*=10),this.set(h.count+s,!1,t)}),{skipInlineCount:!0,title:"Plus",icon:"Plus"});r.appendChild(u.root)}};class E extends y{constructor(t,s,n={}){if(!s)throw"Data is needed to create a table!";super(y.TABLE,t,null,n),this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lextable",this.root.appendChild(o),this._centered=n.centered??!1,!0===this._centered&&o.classList.add("centered"),this.activeCustomFilters={},this.filter=n.filter??!1,this.customFilters=n.customFilters??!1,this._toggleColumns=n.toggleColumns??!1,this._sortColumns=n.sortColumns??!0,this._currentFilter=n.filterValue,s.head=s.head??[],s.body=s.body??[],s.checkMap={},s.colVisibilityMap={},s.head.forEach(((e,t)=>{s.colVisibilityMap[t]=!0})),this.data=s;const i=(e,t,s,n)=>s[e]<n[e]?-t:s[e]>n[e]?t:0,l=(e,t)=>{s.body=s.body.sort(i.bind(this,e,t)),this.refresh()};if(this.filter||this.customFilters||this._toggleColumns){const t=e.makeContainer(["100%","auto"],"flex flex-row");if(this.filter){const s=e.deepCopy(n);s.placeholder=`Filter ${this.filter}...`,s.skipComponent=!0,s.trigger="input",s.inputClass="outline";let o=new e.TextInput(null,this._currentFilter??"",(e=>{this._currentFilter=e,this.refresh()}),s);t.appendChild(o.root)}if(this.customFilters){const s=e.makeIcon("CirclePlus",{svgClass:"sm"}),n='<div class="lexcontainer border-right self-center mx-1" style="width: 1px; height: 70%;"></div>';for(let o of this.customFilters)o.component=new e.Button(null,s.innerHTML+o.name,(t=>{const i=o.component.root.querySelector("span");if(o.options){const t=o.options.map(((t,l)=>{const a={name:t,checked:!!this.activeCustomFilters[t],callback:(t,l,a)=>{l?this.activeCustomFilters[t]=o.name:delete this.activeCustomFilters[t];const r=Object.keys(this.activeCustomFilters).filter((e=>this.activeCustomFilters[e]==o.name)),c=r.reduce(((t,s)=>t+e.badge(s,"bg-tertiary fg-secondary text-sm border-0")),"");i.innerHTML=s.innerHTML+o.name+(r.length?n:"")+c,this.refresh()}};return a}));new e.DropdownMenu(o.component.root,t,{side:"bottom",align:"start"})}else if("range"==o.type){console.assert(null!=o.min&&null!=o.max,"Range filter needs min and max values!");const t=e.makeContainer(["240px","auto"],"text-md"),l=new e.Panel;e.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",o.name,t),o.start=o.start??o.min,o.end=o.end??o.max,l.refresh=()=>{l.clear(),l.sameLine(2,"justify-center"),l.addNumber(null,o.start,(t=>{o.start=t;const l=o.start!=o.min||o.end!=o.max;i.innerHTML=s.innerHTML+o.name+(l?n+e.badge(`${o.start} - ${o.end} ${o.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),l&&this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()}),{skipSlider:!0,min:o.min,max:o.max,step:o.step,units:o.units}),l.addNumber(null,o.end,(t=>{o.end=t;const l=o.start!=o.min||o.end!=o.max;i.innerHTML=s.innerHTML+o.name+(l?n+e.badge(`${o.start} - ${o.end} ${o.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),l&&this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()}),{skipSlider:!0,min:o.min,max:o.max,step:o.step,units:o.units}),l.addButton(null,"Reset",(()=>{o.start=o.min,o.end=o.max,i.innerHTML=s.innerHTML+o.name,l.refresh(),this.refresh()}),{buttonClass:"contrast"})},l.refresh(),t.appendChild(l.root),new e.Popover(o.component.root,[t],{side:"bottom"})}else if("date"==o.type){const t=e.makeContainer(["auto","auto"],"text-md"),l=new e.Panel;e.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",o.name,t),l.refresh=()=>{if(l.clear(),!o.default){const e=new Date,t=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`;o.default=[t,t]}const t=new e.CalendarRange(o.value,{onChange:l=>{o.value=l,i.innerHTML=s.innerHTML+o.name+(n+e.badge(`${t.getFullDate()}`,"bg-tertiary fg-secondary text-sm border-0")),this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()}});l.attach(t)},l.refresh(),t.appendChild(l.root),new e.Popover(o.component.root,[t],{side:"bottom"})}}),{buttonClass:"px-2 primary dashed"}),t.appendChild(o.component.root);this._resetCustomFiltersBtn=new e.Button(null,"resetButton",(e=>{this.activeCustomFilters={},this._resetCustomFiltersBtn.root.classList.add("hidden");for(let e of this.customFilters)e.component.root.querySelector("span").innerHTML=s.innerHTML+e.name,"range"==e.type?(e.start=e.min,e.end=e.max):"date"==e.type&&delete e.default;this.refresh()}),{title:"Reset filters",tooltip:!0,icon:"X"}),t.appendChild(this._resetCustomFiltersBtn.root),this._resetCustomFiltersBtn.root.classList.add("hidden")}if(this._toggleColumns){const n=e.makeIcon("Settings2"),o=new e.Button("toggleColumnsBtn",n.innerHTML+"View",((t,n)=>{const o=s.head.map(((e,t)=>{const n={name:e,icon:"Check",callback:()=>{s.colVisibilityMap[t]=!s.colVisibilityMap[t];a.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}};return s.colVisibilityMap[t]||delete n.icon,n}));new e.DropdownMenu(n.target,o,{side:"bottom",align:"end"})}),{hideName:!0});t.appendChild(o.root),o.root.style.marginLeft="auto"}o.appendChild(t)}const a=document.createElement("table");o.appendChild(a),this.refresh=()=>{this._currentFilter=this._currentFilter??"",a.innerHTML="",this.rowOffsetCount=0;{const t=document.createElement("thead");t.className="lextablehead",a.appendChild(t);const o=document.createElement("tr");if(n.sortable){const e=document.createElement("th");e.style.width="0px",o.appendChild(e),this.rowOffsetCount++}if(n.selectable){const e=document.createElement("th");e.style.width="0px";const t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[":root"]??!1,e.appendChild(t),t.addEventListener("change",(function(){s.checkMap[":root"]=this.checked;const e=a.querySelector("tbody");for(const t of e.childNodes){const e=t.getAttribute("rowId");e&&(s.checkMap[e]=this.checked,t.querySelector("input[type='checkbox']").checked=this.checked)}})),this.rowOffsetCount++,o.appendChild(e)}for(const t of s.head){const i=document.createElement("th");i.innerHTML=`<span>${t}</span>`,i.querySelector("span").appendChild(e.makeIcon("MenuArrows",{svgClass:"sm"}));const r=s.head.indexOf(t);this._centered?.indexOf&&this._centered.indexOf(r)>-1&&i.classList.add("centered");const c=[];if(n.columnActions)for(let e of n.columnActions)e.name?c.push({name:e.name,icon:e.icon,className:e.className,callback:()=>{const t=this.data.body.map((e=>[e[r]]));e.callback(t,a)&&this.refresh()}}):console.warn("Invalid column action (missing name):",e);this._sortColumns&&(c.length>0&&c.push(null),c.push({name:"Asc",icon:"ArrowUpAZ",callback:l.bind(this,r,1)},{name:"Desc",icon:"ArrowDownAZ",callback:l.bind(this,r,-1)})),this._toggleColumns&&(c.length>0&&c.push(null),c.push({name:"Hide",icon:"EyeOff",callback:()=>{s.colVisibilityMap[r]=!1;a.querySelectorAll(`tr > *:nth-child(${r+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}})),i.addEventListener("click",(t=>{0!==c.length&&new e.DropdownMenu(t.target,c,{side:"bottom",align:"start"})})),o.appendChild(i)}if(n.rowActions){const e=document.createElement("th");e.className="sm",o.appendChild(e)}t.appendChild(o)}{const t=document.createElement("tbody");t.className="lextablebody",a.appendChild(t);let o=null,i=!1,l=null;document.addEventListener("mouseup",(t=>{if(null===o)return;document.removeEventListener("mousemove",r);const n=a.rows[o];if(n.dY=0,n.classList.remove("dragging"),Array.from(a.rows).forEach((e=>{e.style.transform="",e.style.transition="none"})),e.flushCss(n),l){const t=o-1,n=l[1]-1;e.emit("@on_table_sort",{instance:this,fromIdx:t,targetIdx:n});const i=s.body[t];let a=0;if(t==n)return;if(t>n)for(let e=t;e>n;--e)s.body[e]=s.body[e-1];else{a=1;for(let e=t;e<n;++e)s.body[e]=s.body[e+1]}s.body[n]=i;l[0].parentNode.insertChildAtIndex(l[0],n+a),l=null}o=null,e.doAsync((()=>{Array.from(a.rows).forEach((e=>{e.style.transition="transform 0.2s ease-in"}))}))}));let r=e=>{if(!o)return;const t=a.rows[o];t.dY=t.dY??0,t.dY+=e.movementY,t.style.transform=`translateY(${t.dY}px)`};for(let c=0;c<s.body.length;++c){const d=s.body[c];if(this.filter){const t=s.head.indexOf(this.filter);if(t>-1){if(!e.stripHTML(d[t]).toLowerCase().includes(this._currentFilter.toLowerCase()))continue}}if(Object.keys(this.activeCustomFilters).length){let e={};this._resetCustomFiltersBtn.root.classList.remove("hidden");for(let t in this.activeCustomFilters){const n=this.activeCustomFilters[t];e[n]=e[n]??!1;const o=s.head.indexOf(n);o>-1&&(e[n]|=d[o]===t)}if(!Object.values(e).reduce(((e,t)=>t*e),!0))continue}if(this.customFilters){let t={};for(let n of this.customFilters){const o=n.name;if("range"==n.type){t[o]=t[o]??!1;const e=s.head.indexOf(o);if(e>-1){const s=parseFloat(d[e]),i=n.start??n.min,l=n.end??n.max;t[o]|=s>=i&&s<=l}}else if("date"==n.type){t[o]=t[o]??!1;const i=s.head.indexOf(o);if(i>-1){if(!n.default){const e=new Date,s=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`;n.value=[s,s],t[o]|=!0;continue}n.value=n.value??n.default;const s=d[i],l=e.dateFromDateString(s),a=e.dateFromDateString(n.value[0]),r=e.dateFromDateString(n.value[1]);t[o]|=l>=a&&l<=r}}}if(!Object.values(t).reduce(((e,t)=>t*e),!0))continue}const h=document.createElement("tr"),u=e.getSupportedDOMName(d.join("-")).substr(0,32);if(h.setAttribute("rowId",u),n.sortable){const t=document.createElement("td");t.style.width="0px";const s=e.makeIcon("GripVertical");t.appendChild(s),s.draggable=!0,s.addEventListener("dragstart",(e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),o=h.rowIndex,h.classList.add("dragging"),document.addEventListener("mousemove",r)}),!1),h.addEventListener("mouseenter",(function(t){if(t.preventDefault(),null!=o&&this.rowIndex!=o&&i!=this.rowIndex){i=this.rowIndex;const t=a.rows[o],s=""!=this.style.transform;this.rowIndex>o?(l=[t,s?this.rowIndex-1:this.rowIndex],this.style.transform=s?"":`translateY(-${this.offsetHeight}px)`):(l=[t,s?this.rowIndex+1:this.rowIndex],this.style.transform=s?"":`translateY(${this.offsetHeight}px)`),e.doAsync((()=>{i=!1}))}})),h.appendChild(t)}if(n.selectable){const e=document.createElement("td"),t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[u],e.appendChild(t),t.addEventListener("change",(function(){s.checkMap[u]=this.checked;const e=a.querySelector("thead input[type='checkbox']");if(this.checked){Array.from(a.querySelectorAll("tbody input[type='checkbox']")).filter((e=>!e.checked)).length||(e.checked=s.checkMap[":root"]=!0)}else e.checked=s.checkMap[":root"]=!1})),h.appendChild(e)}for(const e of d){const t=document.createElement("td");t.innerHTML=`${e}`;const s=d.indexOf(e);this._centered?.indexOf&&this._centered.indexOf(s)>-1&&t.classList.add("centered"),h.appendChild(t)}if(n.rowActions){const t=document.createElement("td");t.style.width="0px";const o=document.createElement("div");o.className="lextablebuttons",t.appendChild(o);for(const t of n.rowActions){let i=null;"delete"==t?(i=e.makeIcon("Trash3",{title:"Delete Row"}),i.addEventListener("click",(function(){s.body.splice(c,1),h.remove()}))):"menu"==t?(i=e.makeIcon("EllipsisVertical",{title:"Menu"}),i.addEventListener("click",(function(t){if(!n.onMenuAction)return;const o=n.onMenuAction(c,s);console.assert(o.length,"Add items to the Menu Action Dropdown!"),new e.DropdownMenu(t.target,o,{side:"bottom",align:"end"})}))):(console.assert(t.constructor==Object),i=e.makeIcon(t.icon,{title:t.title}),t.callback&&i.addEventListener("click",(e=>{t.callback(d,a,e)&&this.refresh()}))),console.assert(i),o.appendChild(i)}h.appendChild(t)}t.appendChild(h)}if(0==t.childNodes.length){const e=document.createElement("tr"),n=document.createElement("td");n.setAttribute("colspan",s.head.length+this.rowOffsetCount+1),n.className="empty-row",n.innerHTML="No results.",e.appendChild(n),t.appendChild(e)}}for(const e in s.colVisibilityMap){const t=parseInt(e);if(!s.colVisibilityMap[t]){a.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach((e=>{e.style.display="none"===e.style.display?"":"none"}))}}},this.refresh(),e.doAsync(this.onResize.bind(this))}getSelectedRows(){const t=[];for(const s of this.data.body){const n=e.getSupportedDOMName(s.join("-")).substr(0,32);!0===this.data.checkMap[n]&&t.push(s)}return t}_setCentered(e){if(e.constructor==Boolean){this.root.querySelector(".lextable").classList.toggle("centered",e)}else e=[].concat(e);this._centered=e,this.refresh()}}Object.defineProperty(E.prototype,"centered",{get:function(){return this._centered},set:function(e){this._setCentered(e)},enumerable:!0,configurable:!0}),e.Table=E;e.DatePicker=class extends y{constructor(t,s,n,o={}){super(y.DATE,t,null,o);const i=s?.constructor===Array;if(!i&&o.today){const e=new Date;s=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`}this.onGetValue=()=>s,this.onSetValue=(o,l,r)=>{i||this.calendar.fromDateString(o),s=o,a(this.calendar.getFullDate()),l||this._trigger(new e.IEvent(t,o,r),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};const l=e.makeContainer(["auto","auto"],"lexdate flex flex-row");this.root.appendChild(l),this.calendar=i?new e.CalendarRange(s,{onChange:e=>{this.set(e)},...o}):new e.Calendar(s,{onChange:e=>{const t=`${e.day}/${e.month}/${e.year}`;this.set(t)},...o});const a=t=>{const s=!!t;l.innerHTML="";const n=(t=t??"Pick a date").split(" to "),o=i?n[0]:t,a=e.makeIcon("Calendar"),r=new e.Button(null,o,(()=>{this._popover=new e.Popover(r.root,[this.calendar])}),{buttonClass:`flex flex-row px-3 ${s?"":"fg-tertiary"} justify-between`});if(r.root.querySelector("button").appendChild(a),r.root.style.width="100%",l.appendChild(r.root),i){const t=e.makeIcon("ArrowRight");e.makeContainer(["32px","auto"],"content-center",t.innerHTML,l);const o=n[1],i=e.makeIcon("Calendar"),a=new e.Button(null,o,(()=>{this._popover=new e.Popover(a.root,[this.calendar])}),{buttonClass:`flex flex-row px-3 ${s?"":"fg-tertiary"} justify-between`});a.root.querySelector("button").appendChild(i),a.root.style.width="100%",l.appendChild(a.root)}};s?a(this.calendar.getFullDate()):a(),e.doAsync(this.onResize.bind(this))}};e.Map2D=class extends y{constructor(t,s,n,o={}){super(y.MAP2D,t,null,o),this.onGetValue=()=>this.map2d.weightsObj,this.onSetValue=(e,t,s)=>{},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexmap2d",this.root.appendChild(i),this.map2d=new e.CanvasMap2D(s,n,o);const l=e.makeIcon("SquareMousePointer"),a=new e.Button(null,"Open Map",(()=>{this._popover=new e.Popover(a.root,[this.map2d])}),{buttonClass:"flex flex-row px-3 fg-secondary justify-between"});a.root.querySelector("button").appendChild(l),i.appendChild(a.root),e.doAsync(this.onResize.bind(this))}};e.Rate=class extends y{constructor(t,s,n,o={}){const i=o.allowHalf??!1;i||(s=Math.floor(s)),super(y.RATE,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,l)=>{d(s=o),i||this._trigger(new e.IEvent(t,o,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};const l=document.createElement("div");l.className="lexrate relative",this.root.appendChild(l);const a=e.makeContainer(["fit-content","auto"],"flex flex-row gap-1","",l),r=e.makeContainer(["fit-content","auto"],"absolute top-0 flex flex-row gap-1 pointer-events-none","",l),c=e.makeContainer(["fit-content","auto"],"absolute top-0 flex flex-row gap-1 pointer-events-none","",l);a.addEventListener("mousemove",(e=>{const t=e.target,s=t.dataset.idx;if(void 0!==s){const n=t.getBoundingClientRect(),o=i&&e.offsetX<.5*n.width;d(s-(o?.5:0))}}),!1),a.addEventListener("mouseleave",(e=>{d(s)}),!1);for(let t=0;t<5;++t){const s=e.makeIcon("Star",{svgClass:"lg fill-current fg-secondary"});s.dataset.idx=t+1,a.appendChild(s),s.addEventListener("click",(e=>{const t=e.target.getBoundingClientRect(),s=i&&e.offsetX<.5*t.width;this.set(parseFloat(e.target.dataset.idx)-(s?.5:0))}),!1);const n=e.makeIcon("Star",{svgClass:"lg fill-current metallicyellow"});r.appendChild(n);const o=e.makeIcon("StarHalf",{svgClass:"lg fill-current metallicyellow"});c.appendChild(o)}const d=e=>{for(let t=0;t<5;++t){const s=e>t+.5,n=r.childNodes[t],o=c.childNodes[t];if(s)n.style.opacity=1;else{n.style.opacity=0;const s=i&&e>t;o.style.opacity=s?1:0}}};d(s),e.doAsync(this.onResize.bind(this))}};e.Panel=class{constructor(e={}){var t=document.createElement("div");t.className="lexpanel",e.id&&(t.id=e.id),e.className&&(t.className+=" "+e.className),t.style.width=e.width||"100%",t.style.height=e.height||"100%",Object.assign(t.style,e.style??{}),this.root=t,this.branches=[],this.components={},this._branchOpen=!1,this._currentBranch=null,this._queue=[],this._inlineComponentsLeft=-1,this._inlineQueuedContainer=null}get(e){return this.components[e]}getValue(e){let t=this.components[e];if(!t)throw"No component called "+e;return t.value()}setValue(e,t,s){let n=this.components[e];if(!n)throw"No component called "+e;return n.set(t,s)}attach(e){console.assert(e,"No content to attach!"),e.parent=this,this.root.appendChild(e.root?e.root:e)}clear(){this.branches=[],this._branchOpen=!1,this._currentBranch=null;for(let t in this.components)if(this.components[t].options&&this.components[t].options.signal){const s=this.components[t].options.signal;for(let n=0;n<e.signals[s].length;n++)e.signals[s][n]==this.components[t]&&(e.signals[s]=[...e.signals[s].slice(0,n),...e.signals[s].slice(n+1)])}if(this.signals)for(let t=0;t<this.signals.length;t++){let s=Object.values(this.signals[t])[0],n=s.options.signal;for(let t=0;t<e.signals[n].length;t++)e.signals[n][t]==s&&(e.signals[n]=[...e.signals[n].slice(0,t),...e.signals[n].slice(t+1)])}this.components={},this.root.innerHTML=""}sameLine(e,t){this._inlineQueuedContainer=this.queuedContainer,this._inlineComponentsLeft=e??1/0,this._inlineExtraClass=t??null}endLine(e){if(e=e??this._inlineExtraClass,-1!=this._inlineComponentsLeft){this._inlineComponentsLeft=-1,this._inlineContainer||(this._inlineContainer=document.createElement("div"),this._inlineContainer.className="lexinlinecomponents",e&&(this._inlineContainer.className+=` ${e}`));for(let e of this._inlineComponents){e.constructor==Array?this._inlineQueuedContainer?this._inlineContainer.appendChild(e[0]):e[1].appendChild(e[0]):this._inlineContainer.appendChild(e)}this._inlineQueuedContainer?this._inlineQueuedContainer.appendChild(this._inlineContainer):this._currentBranch?this._currentBranch.content.appendChild(this._inlineContainer):this.root.appendChild(this._inlineContainer),delete this._inlineComponents,delete this._inlineContainer,delete this._inlineExtraClass}else console.warn("No pending components to be inlined!")}branch(t,s={}){this._branchOpen&&this.merge();var n=new e.Branch(t,s);return n.panel=this,this._branchOpen=!0,this._currentBranch=n,this.branches.push(n),this.root.appendChild(n.root),s.filter&&this._addFilter(s.filter,{callback:this._searchComponents.bind(this,n.name)}),n}merge(){this._branchOpen=!1,this._currentBranch=null}_pick(e,t){return void 0===e?t:e}_attachComponent(e,t={}){null!=e.name&&(this.components[e.name]=e),e.options.signal&&!e.name&&(this.signals||(this.signals=[]),this.signals.push({[e.options.signal]:e}));const s=s=>{t.container?t.container.appendChild(s):this.queuedContainer?this.queuedContainer.appendChild(s):this._currentBranch?(t.skipComponent||this._currentBranch.components.push(e),this._currentBranch.content.appendChild(s)):(s.className+=" nobranch w-full",this.root.appendChild(s))},n=e=>{this.queuedContainer?this._inlineComponents.push([e,this.queuedContainer]):this._inlineComponents.push(e)};return this._inlineComponentsLeft>0&&!t.skipInlineCount?(this._inlineComponents||(this._inlineComponents=[]),n(e.root),this._inlineComponentsLeft--,this._inlineComponentsLeft||this.endLine()):s(e.root),e}_addFilter(t,s={}){s.placeholder=t.constructor==String?t:"Filter properties..",s.skipComponent=s.skipComponent??!0,s.skipInlineCount=!0;const n=new e.TextInput(null,null,null,s).root;n.className+=" lexfilter";let o=document.createElement("input");o.className="lexinput-filter",o.setAttribute("placeholder",s.placeholder),o.style.width="100%",o.value=s.filterValue||"";let i=e.makeIcon("Search");return n.appendChild(i),n.appendChild(o),o.addEventListener("input",(e=>{s.callback&&s.callback(o.value,e)})),n}_searchComponents(e,t){for(let s of this.branches){if(s.name!==e)continue;for(let e of s.components)e.domEl.classList.contains("lexfilter")||e.domEl.remove();this.queue(s.content);const n=!t.length;for(let e of s.components){if(!n){if(!e.name)continue;t.toLowerCase();if(!e.name.toLowerCase().includes(t))continue}this.queuedContainer.appendChild(e.domEl)}return void this.clearQueue()}}getBranch(e){return e?this.branches.find((t=>t.name==e)):this._currentBranch}queue(e){!e&&this._currentBranch&&(e=this._currentBranch.root),this.queuedContainer&&this._queue.push(this.queuedContainer),this.queuedContainer=e}clearQueue(){this._queue&&this._queue.length?this.queuedContainer=this._queue.pop():delete this.queuedContainer}addSeparator(){var t=document.createElement("div");t.className="lexseparator";let s=new e.BaseComponent(e.BaseComponent.SEPARATOR);s.root=t,this._currentBranch?(this._currentBranch.content.appendChild(t),this._currentBranch.components.push(s)):this.root.appendChild(t)}addBlank(t,s){const n=new e.Blank(t,s);return this._attachComponent(n)}addTitle(t,s={}){const n=new e.Title(t,s);return this._attachComponent(n)}addText(t,s,n,o={}){const i=new e.TextInput(t,s,n,o);return this._attachComponent(i)}addTextArea(t,s,n,o={}){const i=new e.TextArea(t,s,n,o);return this._attachComponent(i)}addLabel(t,s={}){s.disabled=!0,s.inputClass=(s.inputClass??"")+" nobg";const n=this.addText(null,t,null,s);return n.type=e.BaseComponent.LABEL,n}addButton(t,s,n,o={}){const i=new e.Button(t,s,n,o);return this._attachComponent(i)}addComboButtons(t,s,n={}){const o=new e.ComboButtons(t,s,n);return this._attachComponent(o)}addCard(t,s={}){const n=new e.Card(t,s);return this._attachComponent(n)}addForm(t,s,n,o={}){const i=new e.Form(t,s,n,o);return this._attachComponent(i)}addContent(t,s,n={}){if(console.assert(s,"Empty content!"),s.constructor==String){const e=document.createElement("div");e.innerHTML=s,s=e.childElementCount>1?e:e.firstElementChild}n.hideName=!0;let o=new e.BaseComponent(e.BaseComponent.CONTENT,t,null,n);return o.root.appendChild(s),this._attachComponent(o)}async addImage(t,s,n={}){console.assert(s,"Empty src/url for Image!");let o=document.createElement("div");o.className="leximage",o.style.width="100%";let i=document.createElement("img");i.src=s,Object.assign(i.style,n.style??{}),o.appendChild(i);let l=new e.BaseComponent(e.BaseComponent.IMAGE,t,null,n);return l.root.appendChild(o),i.decode(),this._attachComponent(l)}addSelect(t,s,n,o,i={}){const l=new e.Select(t,s,n,o,i);return this._attachComponent(l)}addCurve(t,s,n,o={}){const i=new e.Curve(t,s,n,o);return this._attachComponent(i)}addDial(t,s,n,o={}){const i=new e.Dial(t,s,n,o);return this._attachComponent(i)}addLayers(t,s,n,o={}){const i=new e.Layers(t,s,n,o);return this._attachComponent(i)}addArray(t,s=[],n,o={}){const i=new e.ItemArray(t,s,n,o);return this._attachComponent(i)}addList(t,s,n,o,i={}){const l=new e.List(t,s,n,o,i);return this._attachComponent(l)}addTags(t,s,n,o={}){const i=new e.Tags(t,s,n,o);return this._attachComponent(i)}addCheckbox(t,s,n,o={}){const i=new e.Checkbox(t,s,n,o);return this._attachComponent(i)}addToggle(t,s,n,o={}){const i=new e.Toggle(t,s,n,o);return this._attachComponent(i)}addRadioGroup(t,s,n,o,i={}){const l=new e.RadioGroup(t,s,n,o,i);return this._attachComponent(l)}addColor(t,s,n,o={}){const i=new e.ColorInput(t,s,n,o);return this._attachComponent(i)}addRange(t,s,n,o={}){const i=new e.RangeInput(t,s,n,o);return this._attachComponent(i)}addNumber(t,s,n,o={}){const i=new e.NumberInput(t,s,n,o);return this._attachComponent(i)}static VECTOR_COMPONENTS={0:"x",1:"y",2:"z",3:"w"};_addVector(t,s,n,o,i={}){const l=new e.Vector(t,s,n,o,i);return this._attachComponent(l)}addVector2(e,t,s,n){return this._addVector(2,e,t,s,n)}addVector3(e,t,s,n){return this._addVector(3,e,t,s,n)}addVector4(e,t,s,n){return this._addVector(4,e,t,s,n)}addSize(t,s,n,o={}){const i=new e.SizeInput(t,s,n,o);return this._attachComponent(i)}addOTP(t,s,n,o={}){const i=new e.OTPInput(t,s,n,o);return this._attachComponent(i)}addPad(t,s,n,o={}){const i=new e.Pad(t,s,n,o);return this._attachComponent(i)}addProgress(t,s,n={}){const o=new e.Progress(t,s,n);return this._attachComponent(o)}addFile(t,s,n={}){const o=new e.FileInput(t,s,n);return this._attachComponent(o)}addTree(t,s,n={}){const o=new e.Tree(t,s,n);return this._attachComponent(o)}addTabSections(t,s,n={}){const o=new e.TabSections(t,s,n);return this._attachComponent(o)}addCounter(t,s,n,o={}){const i=new e.Counter(t,s,n,o);return this._attachComponent(i)}addTable(t,s,n={}){const o=new e.Table(t,s,n);return this._attachComponent(o)}addDate(t,s,n,o={}){const i=new e.DatePicker(t,s,n,o);return this._attachComponent(i)}addMap2D(t,s,n,o={}){const i=new e.Map2D(t,s,n,o);return this._attachComponent(i)}addRate(t,s,n,o={}){const i=new e.Rate(t,s,n,o);return this._attachComponent(i)}};e.Branch=class{constructor(t,s={}){this.name=t;var n=document.createElement("div");n.className="lexbranch",s.id&&(n.id=s.id),s.className&&(n.className+=" "+s.className),n.style.margin="0 auto";var o=this;this.closed=s.closed??!1,this.root=n,this.components=[];var i=document.createElement("div");if(i.className="lexbranchtitle",s.icon){const t=e.makeIcon(s.icon,{iconClass:"mr-2"});i.appendChild(t)}i.innerHTML+=t||"Branch";const l=e.makeIcon("Right",{iconClass:"switch-branch-button",svgClass:"sm"});i.appendChild(l),n.appendChild(i);var a=document.createElement("div");a.id=t.replace(/\s/g,""),a.className="lexbranchcontent",n.appendChild(a),this.content=a,this._addBranchSeparator(),this.closed&&(i.classList.add("closed"),n.classList.add("closed"),this.grabber.setAttribute("hidden",!0),e.doAsync((()=>{this.content.setAttribute("hidden",!0)}),10)),this.onclick=function(t){this.classList.toggle("closed"),this.parentElement.classList.toggle("closed"),o.content.toggleAttribute("hidden"),o.grabber.toggleAttribute("hidden"),e.emit("@on_branch_closed",this.classList.contains("closed"))},this.oncontextmenu=function(t){t.preventDefault(),t.stopPropagation(),this.parentElement.classList.contains("dialog")||e.addContextMenu("Dock",t,(e=>{t.preventDefault(),e.add("Floating",o._onMakeFloating.bind(o))}),{icon:"WindowRestore"})},i.addEventListener("click",this.onclick),i.addEventListener("contextmenu",this.oncontextmenu)}_onMakeFloating(){const t=new e.Dialog(this.name,(e=>{for(let t of this.components)e.root.appendChild(t.root)}),{dockable:!0}),s=Array.from(this.root.parentElement.childNodes).indexOf(this.root);console.assert(s>=0,"Branch not found!"),t.branchData={name:this.name,components:this.components,closed:this.closed,panel:this.panel,childIndex:s},this.root.remove()}_addBranchSeparator(){const t=document.createElement("div");t.className="lexcomponentseparator",t.style.width="100%",t.style.background="none";const s=document.createElement("div");s.innerHTML="▾",t.appendChild(s),e.doAsync((()=>{s.style.marginLeft=parseFloat(e.DEFAULT_NAME_WIDTH)/100*this.content.offsetWidth+"px"}),10);const n=document.createElement("div");n.style.width="1px",n.style.marginLeft="6px",n.style.marginTop="2px",n.style.height="0px",s.appendChild(n),s.addEventListener("mousedown",(function(e){var t=o.root.ownerDocument;t.addEventListener("mouseup",l),t.addEventListener("mousemove",i),e.stopPropagation(),e.preventDefault();const s=o.root.offsetHeight-o.root.children[0].offsetHeight;n.style.height=s-3+"px",document.body.classList.add("nocursor")})),this.grabber=s;let o=this;function i(t){let n=t.movementX;if(0!=n){const t=parseFloat(s.style.marginLeft);s.style.marginLeft=e.clamp(t+n,32,o.content.offsetWidth-32)+"px"}}function l(e){o._updateComponents(),n.style.height="0px";var t=o.root.ownerDocument;t.removeEventListener("mouseup",l),t.removeEventListener("mousemove",i),document.body.classList.remove("nocursor")}this.content.appendChild(t)}_updateComponents(){var t=this.grabber.style.marginLeft;for(let s=0;s<this.components.length;s++){let n=this.components[s];const o=n.root;if(o.children.length<2)continue;let i=o.children[0],l=o.children[1];switch(i.style.width=t,i.style.minWidth=t,n.type){case e.BaseComponent.CUSTOM:case e.BaseComponent.ARRAY:continue}l.style.width="-moz-calc( 100% - "+t+" )",l.style.width="-webkit-calc( 100% - "+t+" )",l.style.width="calc( 100% - "+t+" )"}}};e.Menubar=class{constructor(e,t={}){this.root=document.createElement("div"),this.root.className="lexmenubar",t.float&&(this.root.style.justifyContent=t.float),this.buttons=[],this.icons={},this.shorts={},this.items=e??[],this.createEntries()}_resetMenubar(e){this.root.querySelectorAll(".lexmenuentry").forEach((e=>{e.classList.remove("selected"),delete e.dataset.built})),this._currentDropdown&&(this._currentDropdown.destroy(),this._currentDropdown=null),this.focused=e??!1}createEntries(){for(let t of this.items){let s=t.name,n=e.getSupportedDOMName(s);if(this.root.querySelector("#"+n))continue;let o=document.createElement("div");o.className="lexmenuentry",o.id=n,o.innerHTML="<span>"+s+"</span>",o.tabIndex="1",this.root.appendChild(o);const i=()=>{this._resetMenubar(!0),o.classList.add("selected"),o.dataset.built="true",this._currentDropdown=e.addDropdownMenu(o,t.submenu??[],{side:"bottom",align:"start",onBlur:()=>{this._resetMenubar()}})};o.addEventListener("mousedown",(e=>{e.preventDefault()})),o.addEventListener("mouseup",(e=>{e.preventDefault();const n=t.callback;if(!n)return i(),this.focused=!0,!1;n.call(this,s,o,e)})),o.addEventListener("mouseover",(e=>{this.focused&&!o.dataset.built&&i()}))}}getButton(e){return this.buttons[e]}getSubitem(e,t){for(const s of e)if(s?.name==t[0]){if(1==t.length)return s;if(s.submenu)return t.shift(),this.getSubitem(s.submenu,t)}}getItem(e){const t=e.split("/");return this.getSubitem(this.items,t)}setButtonIcon(t,s,n,o={}){if(!t)throw"Set Button Name!";let i=this.buttons[t];i&&(delete this.buttons[t],e.deleteElement(i.root)),i=new e.Button(t,null,n,{title:t,buttonClass:"lexmenubutton main bg-none",disabled:o.disabled,icon:s,svgClass:"xl",hideName:!0,swap:o.swap}),"right"==o.float&&(i.root.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(i.root):"left"==o.float?this.root.prepend(i.root):this.root.appendChild(i.root),this.buttons[t]=i}setButtonImage(e,t,s,n={}){if(!e)throw"Set Button Name!";let o=this.buttons[e];if(o)return void(o.querySelector("img").src=t);o=document.createElement("div");const i=n.disabled??!1;o.className="lexmenubutton main"+(i?" disabled":""),o.title=e,o.innerHTML="<a><image src='"+t+"' class='lexicon' style='height:32px;'></a>","right"==n.float&&(o.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(o):"left"==n.float?this.root.prepend(o):this.root.appendChild(o);const l=o.querySelector("a");l.addEventListener("mousedown",(e=>{e.preventDefault()})),l.addEventListener("mouseup",(e=>{s&&!i&&s.call(this,l,e)})),this.buttons[e]=o}addButtons(t,s={}){if(!t)throw"No buttons to add!";this.buttonContainer||(this.buttonContainer=document.createElement("div"),this.buttonContainer.className="lexmenubuttons",this.buttonContainer.classList.add(s.float??"center"),"right"==s.float&&(this.buttonContainer.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(this.buttonContainer):this.root.appendChild(this.buttonContainer));for(const s of t){const t=s.title,n=new e.Button(t,s.label,s.callback,{title:t,buttonClass:"bg-none",disabled:s.disabled,icon:s.icon,hideName:!0,swap:s.swap,iconPosition:"start"});this.buttonContainer.appendChild(n.root),t&&(this.buttons[t]=n)}}};class w{constructor(t={}){this.root=document.createElement("div"),this.root.className="lexsidebar "+(t.className??""),this.callback=t.callback??null,this._displaySelected=t.displaySelected??!1,Object.defineProperty(w.prototype,"displaySelected",{get:function(){return this._displaySelected},set:function(e){this._displaySelected=e,this._displaySelected||this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected")))},enumerable:!0,configurable:!0});const s=navigator&&/Android|iPhone/i.test(navigator.userAgent);if(this.side=t.side??"left",this.collapsable=t.collapsable??!0,this._collapseWidth=t.collapseToIcons??1?"58px":"0px",this.collapsed=t.collapsed??s,this.filterString="",e.doAsync((()=>{if(this.root.parentElement.ogWidth=this.root.parentElement.style.width,this.root.parentElement.style.transition=this.collapsed?"":"width 0.25s ease-out",this.resizeObserver=new ResizeObserver((e=>{for(const t of e)this.siblingArea.setSize(["calc(100% - "+t.contentRect.width+"px )",null])})),this.collapsed){if(this.root.classList.toggle("collapsed",this.collapsed),this.root.parentElement.style.width=this._collapseWidth,!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),e.doAsync((()=>{this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach((e=>e.dataset.disableTooltip=!this.collapsed))}),10)}}),10),!t.skipHeader&&(this.header=t.header??this._generateDefaultHeader(t),console.assert(this.header.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom header"),this.header.className="lexsidebarheader",this.root.appendChild(this.header),this.collapsable)){const n=e.makeIcon("left"==this.side?"PanelLeft":"PanelRight",{title:"Toggle Sidebar",iconClass:"toggler"});if(this.header.appendChild(n),s){const s=new e.Area({skipAppend:!0}),o=e.deepCopy(t);o.collapsed=!1,o.collapsable=!1,s.addSidebar(this.callback,o),n.addEventListener("click",(t=>{t.preventDefault(),t.stopPropagation(),new e.Sheet("256px",[s],{side:this.side})}))}else n.addEventListener("click",(e=>{e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()}))}if(t.filter){const t=new e.TextInput(null,"",((e,t)=>{this.filterString=e,this.update()}),{inputClass:"outline",placeholder:"Search...",icon:"Search",className:"lexsidebarfilter"});this.filter=t.root,this.root.appendChild(this.filter)}this.content=document.createElement("div"),this.content.className="lexsidebarcontent",this.root.appendChild(this.content),t.skipFooter||(this.footer=t.footer??this._generateDefaultFooter(t),console.assert(this.footer.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom footer"),this.footer.className="lexsidebarfooter",this.root.appendChild(this.footer));new ResizeObserver((e=>{const t=(this.header?.offsetHeight??0)+(this.filter?.offsetHeight??0)+(this.footer?.offsetHeight??0);this.content.style.height=`calc(100% - ${t}px)`})).observe(this.root),this.items=[],this.icons={},this.groups={}}_generateDefaultHeader(t){const s=document.createElement("div");s.addEventListener("click",(e=>{this.collapsed?(e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()):t.onHeaderPressed&&t.onHeaderPressed(e)}));const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.headerImage){const e=document.createElement("img");e.src=t.headerImage,n.appendChild(e)}else if(t.headerIcon){const s=e.makeIcon(t.headerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.headerTitle??"",e.appendChild(n);const o=document.createElement("span");o.innerHTML=t.headerSubtitle??"",e.appendChild(o)}if(t.onHeaderPressed&&!this.collapsable){const t=e.makeIcon("MenuArrows");s.appendChild(t)}return s}_generateDefaultFooter(t){const s=document.createElement("div");s.addEventListener("click",(e=>{t.onFooterPressed&&t.onFooterPressed(e,s)}));const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.footerImage){const e=document.createElement("img");e.src=t.footerImage,n.appendChild(e)}else if(t.footerIcon){const s=e.makeIcon(t.footerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.footerTitle??"",e.appendChild(n);const o=document.createElement("span");o.innerHTML=t.footerSubtitle??"",e.appendChild(o)}if(t.onFooterPressed){const t=e.makeIcon("MenuArrows");s.appendChild(t)}return s}toggleCollapsed(t){if(this.collapsable){if(this.collapsed=t??!this.collapsed,this.collapsed?(this.root.classList.add("collapsing"),this.root.parentElement.style.width=this._collapseWidth):(this.root.classList.remove("collapsing"),this.root.classList.remove("collapsed"),this.root.parentElement.style.width=this.root.parentElement.ogWidth),!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),e.doAsync((()=>{this.root.classList.toggle("collapsed",this.collapsed),this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach((e=>e.dataset.disableTooltip=!this.collapsed))}),250)}}separator(){this.currentGroup=null,this.add("")}group(e,t){this.currentGroup=e,this.groups[e]=t}add(e,t={}){t.constructor==Function&&(t={callback:t});const s=e.split("/"),n=s[s.length-1];this.icons[n]=t.icon;let o=0;const i=(e,n)=>{if(null==e)return;let l=null;if(n.forEach((t=>{const s=Object.keys(t).find((t=>t==e));s&&(l=t[s])})),l)i(s[o++],l);else{let l={};l[e]=[];const a=s[o++];a||(l.callback=t.callback,l.group=this.currentGroup,l.options=t),n.push(l),i(a,l[e])}};i(s[o++],this.items)}select(t){let s=e.getSupportedDOMName(t);const n=this.items.find((e=>e.name===s));n&&n.dom.click()}update(){this.content.innerHTML="";for(let e of this.items)delete e.dom;for(let t of this.items){const s=t.options??{};if(t.dom)continue;let n=t.name=Object.keys(t)[0];if(this.filterString.length&&!n.toLowerCase().includes(this.filterString.toLowerCase()))continue;let o=e.getSupportedDOMName(n),i=null,l=document.createElement("div");if(l.id=o,l.className="lexsidebarentry "+(s.className??""),this.displaySelected&&s.selected&&l.classList.add("selected"),t.group){const s=t.group.replace(/\s/g,"").replaceAll(".","");if(i=this.content.querySelector("#"+s),i){if(!i.classList.contains("lexsidebargroup"))throw"Bad id: "+t.group}else{i=document.createElement("div"),i.id=s,i.className="lexsidebargroup",this.content.appendChild(i);let n=document.createElement("div");n.className="lexsidebargrouptitle",i.appendChild(n);let o=document.createElement("div");if(o.innerHTML=t.group,n.appendChild(o),null!=this.groups[t.group]){const s=e.makeIcon(this.groups[t.group].icon,{svgClass:"sm"});n.appendChild(s),s.addEventListener("click",(e=>{this.groups[t.group].callback&&this.groups[t.group].callback(t.group,e)}))}}}if(""==o){let e=document.createElement("div");e.className="lexsidebarseparator",this.content.appendChild(e);continue}this.collapseContainer?(this.collapseContainer.appendChild(l),this.collapseQueue--,this.collapseQueue||delete this.collapseContainer):i?i.appendChild(l):this.content.appendChild(l);let a=document.createElement("div");if(a.className="lexsidebarentrycontent",l.appendChild(a),t.dom=l,"checkbox"==s.type){t.value=s.value??!1;const o=new e.Panel;t.checkbox=o.addCheckbox(null,t.value,((e,o)=>{o.preventDefault(),o.stopPropagation();const i=s.callback;t.value=e,i&&i.call(this,n,e,o)}),{className:"accent",label:n,signal:"@checkbox_"+n}),a.appendChild(o.root.childNodes[0])}else{if(s.icon){const t=e.makeIcon(s.icon,{iconClass:"lexsidebarentryicon"});a.appendChild(t),e.asTooltip(a,n,{side:"right",offset:16,active:!1})}if(e.makeElement("a","grid-column-start-2",n,a),s.swap){a.classList.add("swap","inline-grid"),a.querySelector("a").classList.add("swap-off");const t=document.createElement("input");t.className="p-0 border-0",t.type="checkbox",a.prepend(t);const n=e.makeIcon(s.swap,{iconClass:"lexsidebarentryicon swap-on"});a.appendChild(n)}s.content&&a.appendChild(s.content)}const r=null!=s.collapsable?s.collapsable:s.collapsable||t[n].length;if(l.addEventListener("click",(e=>{if(e.target&&e.target.classList.contains("lexcheckbox"))return;let o;if(r)a.querySelector(".collapser").click();else if(t.checkbox)t.value=!t.value,t.checkbox.set(t.value,!0),o=t.value;else if(s.swap&&!(e.target instanceof HTMLInputElement)){const e=a.querySelector("input");e.checked=!e.checked,o=e.checked}const i=s.callback;i&&i.call(this,n,o??l,e),this.displaySelected&&!s.skipSelection&&(this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected"))),l.classList.add("selected"))})),s.action){const t=e.makeIcon(s.action.icon??"Ellipsis",{title:s.action.name});a.appendChild(t),t.addEventListener("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=s.action.callback;t&&t.call(this,n,e)}))}else if(r){const t=document.createElement("div");t.className="collapsablecontainer",Object.assign(t.style,{width:"100%",display:"none"}),e.makeCollapsible(a,t,i??this.content),this.collapseQueue=s.collapsable,this.collapseContainer=t}if(!t[n].length)continue;let c=document.createElement("div");c.className="lexsidebarsubentrycontainer",r?(this.collapseContainer.appendChild(c),delete this.collapseContainer):i?(c.classList.add("collapsablecontainer"),i.appendChild(c)):this.content.appendChild(c);for(let s=0;s<t[n].length;++s){const o=t[n][s],i=o.options??{},l=o.name=Object.keys(o)[0];if(this.filterString.length&&!l.toLowerCase().includes(this.filterString.toLowerCase()))continue;let a=document.createElement("div");if(a.innerHTML=`<span>${l}</span>`,i.action){const t=e.makeIcon(i.action.icon??"Ellipsis",{title:i.action.name});a.appendChild(t),t.addEventListener("click",(e=>{e.preventDefault(),e.stopImmediatePropagation();const t=i.action.callback;t&&t.call(this,l,e)}))}if(a.className="lexsidebarentry",a.id=l,i.content){const t=e.makeElement("div");t.appendChild(i.content),a.appendChild(t)}c.appendChild(a),a.addEventListener("click",(e=>{const t=i.callback;t&&t.call(this,l,a,e),this.displaySelected&&!i.skipSelection&&(this.root.querySelectorAll(".lexsidebarentry").forEach((e=>e.classList.remove("selected"))),a.classList.add("selected"))}))}}}}e.Sidebar=w;class k{static NONE=0;static ASSET_SELECTED=1;static ASSET_DELETED=2;static ASSET_RENAMED=3;static ASSET_CLONED=4;static ASSET_DBLCLICKED=5;static ASSET_CHECKED=6;static ENTER_FOLDER=7;constructor(t,s,n){this.type=t||e.TreeEvent.NONE,this.item=s,this.value=n,this.multiple=!1}string(){switch(this.type){case k.NONE:return"assetview_event_none";case k.ASSET_SELECTED:return"assetview_event_selected";case k.ASSET_DELETED:return"assetview_event_deleted";case k.ASSET_RENAMED:return"assetview_event_renamed";case k.ASSET_CLONED:return"assetview_event_cloned";case k.ASSET_DBLCLICKED:return"assetview_event_dblclicked";case k.ASSET_CHECKED:return"assetview_event_checked";case k.ENTER_FOLDER:return"assetview_event_enter_folder"}}}e.AssetViewEvent=k;class _{static LAYOUT_GRID=0;static LAYOUT_COMPACT=1;static LAYOUT_LIST=2;static CONTENT_SORT_ASC=0;static CONTENT_SORT_DESC=1;static MAX_PAGE_ELEMENTS=50;constructor(t={}){this.rootPath="https://raw.githubusercontent.com/jxarco/lexgui.js/master/",this.layout=t.layout??_.LAYOUT_GRID,this.sortMode=t.sortMode??_.CONTENT_SORT_ASC,this.contentPage=1,t.rootPath&&(t.rootPath.constructor!==String?console.warn(`Asset Root Path must be a String (now is a ${path.constructor.name})`):this.rootPath=t.rootPath);let s=document.createElement("div");s.className="lexassetbrowser",this.root=s;let n=new e.Area({width:"100%",height:"100%"});s.appendChild(n.root);let o,i,l=n;this.skipBrowser=t.skipBrowser??!1,this.skipPreview=t.skipPreview??!1,this.useNativeTitle=t.useNativeTitle??!1,this.onlyFolders=t.onlyFolders??!0,this.allowMultipleSelection=t.allowMultipleSelection??!1,this.previewActions=t.previewActions??[],this.contextMenu=t.contextMenu??[],this.onRefreshContent=t.onRefreshContent,document.body.appendChild(this.root),this.skipBrowser||([o,i]=n.split({type:"horizontal",sizes:["15%","85%"]}),l=i,o.setLimitBox(210,0),i.setLimitBox(512,0)),this.skipPreview||([l,i]=l.split({type:"horizontal",sizes:["80%","20%"]})),this.allowedTypes=t.allowedTypes||["None","Image","Mesh","Script","JSON","Clip"],this.prevData=[],this.nextData=[],this.data=[],this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(o),this._createContentPanel(l),this.skipPreview||(this.previewPanel=i.addPanel({className:"lexassetcontentpanel",style:{overflow:"scroll"}})),document.body.removeChild(this.root)}load(e,t){this.prevData.length=0,this.nextData.length=0,this.data=e,this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(this.area),this._refreshContent(),this.onevent=t}clear(){this.previewPanel&&this.previewPanel.clear(),this.leftPanel&&this.leftPanel.clear(),this.toolsPanel&&this.toolsPanel.clear()}_processData(e,t){e.constructor!==Array&&(e.folder=t,e.children=e.children??[]);let s=e.constructor===Array?e:e.children;for(var n=0;n<s.length;++n)this._processData(s[n],e)}_updatePath(t){this.path.length=0;const s=e=>{if(!e)return;let t=(e.children?e.children:e)[0];t&&t.folder&&(this.path.push(t.folder.id??"@"),s(t.folder.folder))};s(t),e.emit("@on_folder_change",this.path.reverse().join("/"))}_createTreePanel(t){this.leftPanel?this.leftPanel.clear():this.leftPanel=t.addPanel({className:"lexassetbrowserpanel"});let s={id:"/",children:this.data};const n=this.leftPanel.addTree("Content Browser",s,{filter:!1,onlyFolders:this.onlyFolders,onevent:t=>{let s=t.node,n=t.value;switch(t.type){case e.TreeEvent.NODE_SELECTED:t.multiple||this._enterFolder(s),s.parent||(this.prevData.push(this.currentData),this.currentData=this.data,this._refreshContent(),this.path=["@"],e.emit("@on_folder_change",this.path.join("/")));break;case e.TreeEvent.NODE_DRAGGED:s.folder=n,this._refreshContent()}}});this.tree=n.innerTree}_setContentLayout(e){this.layout=e,this.toolsPanel.refresh(),this._refreshContent()}_createContentPanel(t){this.toolsPanel?this.contentPanel.clear():(t.root.classList.add("flex","flex-col"),this.toolsPanel=t.addPanel({className:"flex flex-col overflow-hidden",height:"auto"}),this.toolsPanel.root.style.flex="none",this.contentPanel=t.addPanel({className:"lexassetcontentpanel flex flex-col overflow-hidden"}));const s=(t,s)=>{new e.DropdownMenu(s.target,[{name:"Name",icon:"ALargeSmall",callback:()=>this._sortData("id")},{name:"Type",icon:"Type",callback:()=>this._sortData("type")},null,{name:"Ascending",icon:"SortAsc",callback:()=>this._sortData(null,_.CONTENT_SORT_ASC)},{name:"Descending",icon:"SortDesc",callback:()=>this._sortData(null,_.CONTENT_SORT_DESC)}],{side:"right",align:"start"})},n=(t,s)=>{new e.DropdownMenu(s.target,[{name:"Grid",icon:"LayoutGrid",callback:()=>this._setContentLayout(_.LAYOUT_GRID)},{name:"Compact",icon:"LayoutList",callback:()=>this._setContentLayout(_.LAYOUT_COMPACT)},{name:"List",icon:"List",callback:()=>this._setContentLayout(_.LAYOUT_LIST)}],{side:"right",align:"start"})},o=(e,t)=>{if(!this.allowNextPage)return;const s=this.contentPage;this.contentPage+=e,this.contentPage=Math.min(this.contentPage,1+((this.currentData.length-1)/_.MAX_PAGE_ELEMENTS|0)),this.contentPage=Math.max(this.contentPage,1),s!=this.contentPage&&this._refreshContent()};this.toolsPanel.refresh=()=>{this.toolsPanel.clear(),this.toolsPanel.sameLine(),this.toolsPanel.addSelect("Filter",this.allowedTypes,this.filter??this.allowedTypes[0],(e=>{this._refreshContent(null,e)}),{width:"30%",minWidth:"128px",overflowContainer:null}),this.toolsPanel.addText(null,this.searchValue??"",(e=>this._refreshContent.call(this,e,null)),{placeholder:"Search assets.."}),this.toolsPanel.addButton(null,"",s.bind(this),{title:"Sort",tooltip:!0,icon:this.sortMode===_.CONTENT_SORT_ASC?"SortAsc":"SortDesc"}),this.toolsPanel.addButton(null,"",n.bind(this),{title:"View",tooltip:!0,icon:this.layout===_.LAYOUT_GRID?"LayoutGrid":"LayoutList"}),this.toolsPanel.addButton(null,"",o.bind(this,-1),{title:"Previous Page",icon:"ChevronsLeft",className:"ml-auto"}),this.toolsPanel.addButton(null,"",o.bind(this,1),{title:"Next Page",icon:"ChevronsRight"});const e="Page "+this.contentPage+" / "+(1+((this.currentData.length-1)/_.MAX_PAGE_ELEMENTS|0));this.toolsPanel.addText(null,e,null,{inputClass:"nobg",disabled:!0,signal:"@on_page_change",maxWidth:"16ch"}),this.toolsPanel.endLine(),this.skipBrowser||(this.toolsPanel.sameLine(),this.toolsPanel.addComboButtons(null,[{value:"Left",icon:"ArrowLeft",callback:e=>{this.prevData.length&&(this.nextData.push(this.currentData),this.currentData=this.prevData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Right",icon:"ArrowRight",callback:e=>{this.nextData.length&&(this.prevData.push(this.currentData),this.currentData=this.nextData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Refresh",icon:"Refresh",callback:e=>{this._refreshContent()}}],{noSelection:!0}),this.toolsPanel.addText(null,this.path.join("/"),null,{inputClass:"nobg",disabled:!0,signal:"@on_folder_change",style:{fontWeight:"600",fontSize:"15px"}}),this.toolsPanel.endLine())},this.toolsPanel.refresh(),this.content=document.createElement("ul"),this.content.className="lexassetscontent",this.contentPanel.attach(this.content),this.content.addEventListener("dragenter",(function(e){e.preventDefault(),this.classList.add("dragging")})),this.content.addEventListener("dragleave",(function(e){e.preventDefault(),this.classList.remove("dragging")})),this.content.addEventListener("drop",(e=>{e.preventDefault(),this._processDrop(e)})),this.content.addEventListener("click",(function(){this.querySelectorAll(".lexassetitem").forEach((e=>e.classList.remove("selected")))})),this._refreshContent()}_refreshContent(t,s){const n=this.layout==_.LAYOUT_GRID,o=this.layout==_.LAYOUT_COMPACT,i=this.layout==_.LAYOUT_LIST;this.filter=s??this.filter??"None",this.searchValue=t??this.searchValue??"",this.content.innerHTML="",this.content.className="lexassetscontent"+(o?" compact":i?" list":"");let l=this;const a=function(t){const s=t.type.charAt(0).toUpperCase()+t.type.slice(1),o=e.getExtension(t.id),a="Folder"===s;let r=document.createElement("li");if(r.className="lexassetitem "+t.type.toLowerCase(),r.tabIndex=-1,l.content.appendChild(r),t.lastModified&&!t.lastModifiedDate&&(t.lastModifiedDate=l._lastModifiedToStringDate(t.lastModified)),l.useNativeTitle)r.title=s+": "+t.id;else{let e=document.createElement("span");e.className="lexitemdesc",e.id=`floatingTitle_${t.id}`,e.innerHTML=`File: ${t.id}<br>Type: ${s}`,l.content.appendChild(e),r.addEventListener("mousemove",(t=>{if(!n)return;const s=r.closest("dialog"),o=r.getBoundingClientRect(),i=t.target.getBoundingClientRect();let l=o.x+t.offsetX,a=o.y+t.offsetY;if(s){const e=s.getBoundingClientRect();l-=e.x,a-=e.y}t.target.classList.contains("lexassettitle")&&(a+=i.y-o.y),e.style.left=l+"px",e.style.top=a-36+"px"}))}if(l.allowMultipleSelection){let e=document.createElement("input");e.type="checkbox",e.className="lexcheckbox",e.checked=t.selected,e.addEventListener("change",((e,s)=>{if(t.selected=!t.selected,l.onevent){const s=new k(k.ASSET_CHECKED,e.shiftKey?[t]:t);s.multiple=!!e.shiftKey,l.onevent(s)}e.stopPropagation(),e.stopImmediatePropagation()})),r.appendChild(e)}let c=document.createElement("span");if(c.className="lexassettitle",c.innerText=t.id,r.appendChild(c),!l.skipPreview){if("video"===t.type){const s=e.makeElement("video","absolute left-0 top-0 w-full border-none pointer-events-none","",r);s.setAttribute("disablePictureInPicture",!1),s.setAttribute("disableRemotePlayback",!1),s.setAttribute("loop",!0),s.setAttribute("async",!0),s.style.transition="opacity 0.2s ease-out",s.style.opacity=t.preview?"0":"1",s.src=t.src,s.volume=t.videoVolume??.4}let s=null;const i=t.preview??t.src;if(i&&((()=>{const t=e.getExtension(i.split("?")[0].split("#")[0]);return!!t&&["png","jpg","jpeg","gif","bmp","avif"].includes(t.toLowerCase())})()||i.startsWith("data:image/"))||a||!n){const e=`${l.rootPath}images/file.png`,o=`${l.rootPath}images/folder.png`;s=document.createElement("img");let c=t.unknownExtension?e:a?o:i;s.src=n||a?c:e,r.appendChild(s)}else{s=document.createElement("svg"),s.className="asset-file-preview",r.appendChild(s);let e=document.createElement("text");e.innerText=o&&o!=t.id?`.${o.toUpperCase()}`:t.type.toUpperCase(),s.appendChild(e);var d=2.5/e.innerText.length;if(d<1){var h=64*d;e.style.fontSize=h+"px",s.style.paddingTop=`calc(50% - ${.5*e.offsetHeight+10}px)`}}}let u=s;return i&&(t.bytesize&&(u+=` | ${e.formatBytes(t.bytesize)}`),t.lastModifiedDate&&(u+=` | ${t.lastModifiedDate}`)),e.makeContainer(["auto","auto"],"lexassetinfo",u,r),r.addEventListener("click",(function(s){s.stopImmediatePropagation(),s.stopPropagation();const n=s.detail==e.MOUSE_DOUBLE_CLICK;if(n){if(a)return void l._enterFolder(t)}else s.shiftKey||l.content.querySelectorAll(".lexassetitem").forEach((e=>e.classList.remove("selected"))),this.classList.add("selected"),l.selectedItem=t,l.skipPreview||l._previewAsset(t);if(l.onevent){const e=new k(n?k.ASSET_DBLCLICKED:k.ASSET_SELECTED,s.shiftKey?[t]:t);e.multiple=!!s.shiftKey,l.onevent(e)}})),l.contextMenu&&r.addEventListener("contextmenu",(function(s){s.preventDefault();const n=l.content.querySelectorAll(".selected").length;e.addContextMenu(n>1?n+" selected":a?t.id:t.type,s,(e=>{n<=1&&e.add("Rename"),a||e.add("Clone",l._cloneItem.bind(l,t)),n<=1&&e.add("Properties"),e.add(""),e.add("Delete",l._deleteItem.bind(l,t))}))})),r.addEventListener("dragstart",(function(e){e.preventDefault()}),!1),r.addEventListener("mouseenter",(e=>{if(!l.useNativeTitle&&n){const e=l.content.querySelector(`#floatingTitle_${t.id}`);e&&(e.style.display="unset")}if("video"!==t.type)return;e.preventDefault();const s=r.querySelector("video");s.style.opacity="1",s.play()})),r.addEventListener("mouseleave",(e=>{if(!l.useNativeTitle&&n&&setTimeout((()=>{const e=l.content.querySelector(`#floatingTitle_${t.id}`);e&&(e.style.display="none")}),100),"video"!==t.type)return;e.preventDefault();const s=r.querySelector("video");s.pause(),s.currentTime=0,t.preview&&(s.style.opacity="0")})),r},r=new FileReader,c=this.currentData.filter((e=>("None"==this.filter||e.type.toLowerCase()==this.filter.toLowerCase())&&e.id.toLowerCase().includes(this.searchValue.toLowerCase())));(s||t)&&(this.contentPage=1);const d=(this.contentPage-1)*_.MAX_PAGE_ELEMENTS,h=Math.min(d+_.MAX_PAGE_ELEMENTS,c.length);for(let n=d;n<h;++n){let o=c[n];o.path?e.request({url:o.path,dataType:"blob",success:e=>{o.bytesize=e.size,r.readAsDataURL(e),r.onload=e=>{o.src=e.currentTarget.result,o._path=o.path,delete o.path,this._refreshContent(t,s)}}}):o.domEl=a(o)}this.allowNextPage=c.length-1>_.MAX_PAGE_ELEMENTS;const u="Page "+this.contentPage+" / "+(1+((c.length-1)/_.MAX_PAGE_ELEMENTS|0));e.emit("@on_page_change",u),this.onRefreshContent&&this.onRefreshContent(t,s)}_previewAsset(t){const s=t.src&&t.src.includes("data:image/");if(this.previewPanel.clear(),this.previewPanel.branch("Asset"),"image"==t.type||t.src){(["png","jpg"].indexOf(e.getExtension(t.src))>-1||s)&&this.previewPanel.addImage(null,t.src,{style:{width:"100%"}})}const n={disabled:!0};this.previewPanel.addText("Filename",t.id,null,n),t.lastModifiedDate&&this.previewPanel.addText("Last Modified",t.lastModifiedDate,null,n),(t._path||t.src)&&this.previewPanel.addText("URL",t._path?t._path:t.src,null,n),this.previewPanel.addText("Path",this.path.join("/"),null,n),this.previewPanel.addText("Type",t.type,null,n),t.bytesize&&this.previewPanel.addText("Size",e.formatBytes(t.bytesize),null,n),"folder"==t.type&&this.previewPanel.addText("Files",t.children?t.children.length.toString():"0",null,n),this.previewPanel.addSeparator();const o=[...this.previewActions];o.length||"folder"===t.type||o.push({name:"Download",callback:()=>e.downloadURL(t.src,t.id)});for(let e of o)e.type&&e.type!==t.type||e.path&&e.path!==this.path.join("/")||this.previewPanel.addButton(null,e.name,e.callback.bind(this,t));this.previewPanel.merge()}_processDrop(e){const t=new FileReader,s=e.dataTransfer.files.length;for(let n=0;n<e.dataTransfer.files.length;++n){const o=e.dataTransfer.files[n],i=this.currentData.find((e=>e.id===o.name));i||(t.readAsDataURL(o),t.onload=e=>{let t=o.name.substr(o.name.lastIndexOf(".")+1).toLowerCase(),i={id:o.name,src:e.currentTarget.result,extension:t,lastModified:o.lastModified,lastModifiedDate:this._lastModifiedToStringDate(o.lastModified)};switch(t){case"png":case"jpg":i.type="image";break;case"js":case"css":i.type="script";break;case"json":i.type="json";break;case"obj":i.type="mesh";break;default:i.type=t,i.unknownExtension=!0}this.currentData.push(i),n==s-1&&(this._refreshContent(),this.skipBrowser||this.tree.refresh())})}}_sortData(e,t){e=e??this._lastSortBy??"id";const s=(t=t??this.sortMode)===_.CONTENT_SORT_DESC;this.currentData=this.currentData.sort(((t,n)=>{var o=s?n[e].localeCompare(t[e]):t[e].localeCompare(n[e]);return 0==o&&(o=s?n.id.localeCompare(t.id):t.id.localeCompare(n.id)),o})),this._lastSortBy=e,this.sortMode=t,this.toolsPanel.refresh(),this._refreshContent()}_enterFolder(e){if(this.prevData.push(this.currentData),this.currentData=e.children,this.contentPage=1,this._refreshContent(),this._updatePath(this.currentData),this.onevent){const t=new k(k.ENTER_FOLDER,e);this.onevent(t)}}_deleteItem(e){const t=this.currentData.indexOf(e);if(t<0)console.error("[AssetView Error] Cannot delete. Item not found.");else{if(this.currentData.splice(t,1),this._refreshContent(this.searchValue,this.filter),this.onevent){const t=new k(k.ASSET_DELETED,e);this.onevent(t)}this.tree.refresh(),this._processData(this.data)}}_cloneItem(t){const s=this.currentData.indexOf(t);if(s<0)return;delete t.domEl,delete t.folder;const n=e.deepCopy(t);if(this.currentData.splice(s,0,n),this._refreshContent(this.searchValue,this.filter),this.onevent){const e=new k(k.ASSET_CLONED,t);this.onevent(e)}this._processData(this.data)}_lastModifiedToStringDate(e){const t=new Date(e).toLocaleString();return t.substring(0,t.indexOf(","))}}e.AssetView=_;class M{static ACTIVE_TOURS=[];constructor(t,s={}){this.steps=t||[],this.currentStep=0,this.useModal=s.useModal??!0,this.offset=s.offset??8,this.horizontalOffset=s.horizontalOffset,this.verticalOffset=s.verticalOffset,this.radius=s.radius??12,this.tourContainer=document.querySelector(".tour-container"),this.tourContainer||(this.tourContainer=e.makeContainer(["100%","100%"],"tour-container"),this.tourContainer.style.display="none",document.body.appendChild(this.tourContainer),window.addEventListener("resize",(()=>{for(const e of M.ACTIVE_TOURS)e._showStep(0)})))}begin(){this.currentStep=0,this.tourContainer.style.display="block",M.ACTIVE_TOURS.push(this),this._showStep(0)}stop(){this.useModal&&(this.tourMask.remove(),this.tourMask=void 0),this._popover?.destroy();const e=M.ACTIVE_TOURS.indexOf(this);-1!==e&&M.ACTIVE_TOURS.splice(e,1),this.tourContainer.innerHTML="",this.tourContainer.style.display="none"}_showStep(e=1){this.currentStep+=e;const t=this.steps[this.currentStep];if(!t)return void this.stop();const s=this.steps[this.currentStep-1],n=this.steps[this.currentStep+1];this.useModal&&this._generateMask(t.reference),this._createHighlight(t,s,n)}_generateMask(t){this.tourContainer.innerHTML="",this.tourMask=e.makeContainer(["100%","100%"],"tour-mask"),this.tourContainer.appendChild(this.tourMask);const s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.style.width="100%",s.style.height="100%",this.tourMask.appendChild(s);const n=document.createElementNS("http://www.w3.org/2000/svg","clipPath");function o(e,t){const s=Math.ceil(e);return[s,t-(s-e)]}n.setAttribute("id","svgTourClipPath"),s.appendChild(n);const i=t.getBoundingClientRect(),[l,a]=o(i.x,i.width),[r,c]=o(i.y,i.height),d=this.verticalOffset??this.offset,h=this.horizontalOffset??this.offset;{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,l-h)),e.setAttribute("height",window.innerHeight),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",l-h),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,a+2*h)),e.setAttribute("height",Math.max(0,r-d)),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",l-h),e.setAttribute("y",r+c+d),e.setAttribute("width",Math.max(0,a+2*h)),e.setAttribute("height",Math.max(0,window.innerHeight-r-c-d)),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",l+a+h),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,window.innerWidth-l-a)),e.setAttribute("height",Math.max(0,window.innerHeight)),e.setAttribute("stroke","none"),n.appendChild(e)}const u=e.makeContainer(["0","0"],"tour-ref-mask");u.style.left=l-h-1+"px",u.style.top=r-d-1+"px",u.style.width=`${a+2*h+2}px`,u.style.height=`${c+2*d+2}px`,this.tourContainer.appendChild(u);const p=document.createElementNS("http://www.w3.org/2000/svg","mask");p.setAttribute("id","svgTourReferenceMask"),s.appendChild(p);{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("width",a+2*h+2),e.setAttribute("height",c+2*d+2),e.setAttribute("stroke","none"),e.setAttribute("fill","white"),p.appendChild(e);const t=document.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("rx",this.radius),t.setAttribute("width",a+2*h+2),t.setAttribute("height",c+2*d+2),t.setAttribute("stroke","none"),t.setAttribute("fill","black"),p.appendChild(t)}}_createHighlight(t,s,n){const o=e.makeContainer(["auto","auto"],"tour-step-container");{const s=e.makeContainer(["100%","auto"],"flex flex-row","",o);e.makeContainer(["70%","auto"],"p-2 font-medium",t.title,s);const n=e.makeContainer(["30%","auto"],"flex flex-row p-2 justify-end","",s),i=e.makeIcon("X");n.appendChild(i),i.listen("click",(()=>{this.stop()}))}e.makeContainer(["100%","auto"],"p-2 text-md",t.content,o,{maxWidth:"400px"});const i=e.makeContainer(["100%","auto"],"flex flex-row text-md","",o);{const t=e.makeContainer(["50%","auto"],"p-2 gap-1 self-center flex flex-row text-md","",i);for(let e=0;e<this.steps.length;e++){const s=document.createElement("span");s.className="tour-step-indicator",e===this.currentStep&&s.classList.add("active"),t.appendChild(s)}}const l=e.makeContainer(["50%","auto"],"text-md","",i),a=new e.Panel;let r=1;s&&r++,r>1&&a.sameLine(2,"justify-end"),s&&a.addButton(null,"Previous",(()=>{this._showStep(-1)}),{buttonClass:"contrast"}),n?a.addButton(null,"Next",(()=>{this._showStep(1)}),{buttonClass:"accent"}):a.addButton(null,"Finish",(()=>{this.stop()})),l.appendChild(a.root);const c=("left"===t.side||"right"===t.side?this.horizontalOffset:this.verticalOffset)??this.offset,d="start"===t.align||"end"===t.align?c:0;this._popover?.destroy(),this._popover=new e.Popover(null,[o],{reference:t.reference,side:t.side,align:t.align,sideOffset:c,alignOffset:"start"===t.align?-d:d})}}e.Tour=M}();
|
|
1
|
+
"use strict";console.warn("Script _build/lexgui.js_ is depracated and will be removed soon. Please use ES Modules or alternatives: https://jxarco.github.io/lexgui.js/docs/"),function(){const e={version:"0.7.14",ready:!1,extensions:[],signals:{},extraCommandbarEntries:[],activeDraggable:null,MOUSE_LEFT_CLICK:0,MOUSE_MIDDLE_CLICK:1,MOUSE_RIGHT_CLICK:2,MOUSE_DOUBLE_CLICK:2,MOUSE_TRIPLE_CLICK:3,CURVE_MOVEOUT_CLAMP:0,CURVE_MOVEOUT_DELETE:1,DRAGGABLE_Z_INDEX:101};class t{constructor(e,t){this.x=e??0,this.y=t??e??0}get xy(){return[this.x,this.y]}get yx(){return[this.y,this.x]}set(e,t){this.x=e,this.y=t}add(e,s=new t){return s.set(this.x+e.x,this.y+e.y),s}sub(e,s=new t){return s.set(this.x-e.x,this.y-e.y),s}mul(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x*e.x,this.y*e.y),s}div(e,s=new t){return e.constructor==Number&&(e=new t(e)),s.set(this.x/e.x,this.y/e.y),s}abs(e=new t){return e.set(Math.abs(this.x),Math.abs(this.y)),e}dot(e){return this.x*e.x+this.y*e.y}len2(){return this.dot(this)}len(){return Math.sqrt(this.len2())}nrm(e=new t){return e.set(this.x,this.y),e.mul(1/this.len(),e)}dst(e){return e.sub(this).len()}clp(s,n,o=new t){return o.set(e.clamp(this.x,s,n),e.clamp(this.y,s,n)),o}fromArray(e){this.x=e[0],this.y=e[1]}toArray(){return this.xy}}e.vec2=t;class s{constructor(e){Object.defineProperty(s.prototype,"rgb",{get:function(){return this._rgb},set:function(e){this._fromRGB(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hex",{get:function(){return this._hex},set:function(e){this._fromHex(e)},enumerable:!0,configurable:!0}),Object.defineProperty(s.prototype,"hsv",{get:function(){return this._hsv},set:function(e){this._fromHSV(e)},enumerable:!0,configurable:!0}),this.set(e)}set(e){if("string"==typeof e&&e.startsWith("#"))this._fromHex(e);else if("r"in e&&"g"in e&&"b"in e)e.a=e.a??1,this._fromRGB(e);else{if(!("h"in e&&"s"in e&&"v"in e))throw e;e.a=e.a??1,this._fromHSV(e)}}setHSV(e){this._fromHSV(e)}setRGB(e){this._fromRGB(e)}setHex(e){this._fromHex(e)}_fromHex(t){this._fromRGB(e.hexToRgb(t))}_fromRGB(t){this._rgb=t,this._hsv=e.rgbToHsv(t),this._hex=e.rgbToHex(t),this.css=e.rgbToCss(this._rgb)}_fromHSV(t){this._hsv=t,this._rgb=e.hsvToRgb(t),this._hex=e.rgbToHex(this._rgb),this.css=e.rgbToCss(this._rgb)}}e.Color=s,e.init=async function(t={}){if(this.ready)return this.main_area;await e.loadScriptSync("https://unpkg.com/lucide@latest"),console.log(`LexGUI v${this.version}`);var s=document.createElement("div");s.id="lexroot",s.className="lexcontainer",s.tabIndex=-1,t.rootClass&&(s.className+=` ${t.rootClass}`),this.modal=document.createElement("div"),this.modal.id="modal",this.modal.classList.add("hidden-opacity"),this.modal.toggle=function(e){this.classList.toggle("hidden-opacity",e)},this.root=s,this.container=document.body,t.container&&(this.container=t.container.constructor===String?document.getElementById(t.container):t.container),this.layoutMode=t.layoutMode??"app",document.documentElement.setAttribute("data-layout",this.layoutMode),"document"==this.layoutMode&&document.addEventListener("scroll",e=>{document.body.querySelectorAll(".lexdropdownmenu").forEach(e=>{e._updatePosition()})}),this.spacingMode=t.spacingMode??"default",document.documentElement.setAttribute("data-spacing",this.spacingMode),this.container.appendChild(this.modal),t.skipRoot?this.root=document.body:this.container.appendChild(s);{const e=document.createElement("section");e.className="notifications",this.notifications=document.createElement("ol"),this.notifications.className="",this.notifications.iWidth=0,e.appendChild(this.notifications),document.body.appendChild(e),this.notifications.addEventListener("mouseenter",()=>{this.notifications.classList.add("list")}),this.notifications.addEventListener("mouseleave",()=>{this.notifications.classList.remove("list")})}s.addEventListener("dragover",function(e){e.preventDefault()},!1),document.addEventListener("contextmenu",function(e){e.preventDefault()},!1),this.DEFAULT_NAME_WIDTH="30%",this.DEFAULT_SPLITBAR_SIZE=4,this.OPEN_CONTEXTMENU_ENTRY="click",this.componentResizeObserver=new ResizeObserver(e=>{for(const t of e){const e=t.target?.jsInstance;e&&e.onResize&&e.onResize(t.contentRect)}}),this.ready=!0,this.menubars=[],this.sidebars=[],this.commandbar=function(t){let s=document.createElement("dialog");s.className="commandbar",s.tabIndex=-1,t.appendChild(s);let n=[],o=null;s.addEventListener("keydown",function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),o=o??-1,"Escape"==e.key)this.close(),d(!0);else if("Enter"==e.key){const e=n[o];e&&(null!=e.item.checked&&(e.item.checked=!e.item.checked),this.close(),e.callback.call(window,e.item.name,e.item.checked))}else if("ArrowDown"==e.key&&o<n.length-1){o++,s.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),n[o].classList.add("hovered");let e=n[o].offsetHeight*(o+1)-r.offsetHeight;e>0&&r.scrollTo({top:e,behavior:"smooth"})}else"ArrowUp"==e.key&&o>0&&(o--,s.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),n[o].classList.add("hovered"))}),s.addEventListener("focusout",function(e){e.relatedTarget!=e.currentTarget&&(e.stopPropagation(),e.stopImmediatePropagation(),this.close(),d(!0))}),t.addEventListener("keydown",t=>{if(" "==t.key&&t.ctrlKey)t.stopImmediatePropagation(),t.stopPropagation(),e.setCommandbarState(!0);else for(let s of e.extensions){if(!e[s]||!e[s].prototype.onKeyPressed)continue;const n=e.CodeEditor.getInstances();for(let e of n)e.onKeyPressed(t)}});const i=e.makeContainer(["100%","auto"],"flex flex-row"),a=new e.TextInput(null,"",e=>{s._addElements(e.toLowerCase())},{width:"100%",icon:"Search",trigger:"input",placeholder:"Search..."});i.appendChild(a.root);const l=new e.Area({width:"100%",skipAppend:!0,className:"cb-tabs"});{const e=(e,t)=>{};l.addTabs({parentClass:"p-2"}).add("All",document.createElement("div"),{selected:!0,onSelect:e})}const r=document.createElement("div");r.className="searchitembox";let c=null;const d=e=>{r.innerHTML="",n.length=0,o=null,e&&a.set("",!0)},h=(t,i,a,l)=>{if(!t.length)return;c&&c.classList.remove("last");let h=document.createElement("div");if(h.className="searchitem last",void 0!==l?.checked){const s=l.checked?e.makeIcon("Check").innerHTML:"";h.innerHTML=s+(a+t)}else h.innerHTML=a+t;h.callback=i,h.item=l,h.addEventListener("click",s=>{null!=l.checked&&(l.checked=!l.checked),i.call(window,t,l.checked),e.setCommandbarState(!1),d(!0)}),h.addEventListener("mouseenter",function(e){s.querySelectorAll(".hovered").forEach(e=>e.classList.remove("hovered")),this.classList.add("hovered"),o=n.indexOf(this)}),h.addEventListener("mouseleave",function(e){this.classList.remove("hovered")}),n.push(h),r.appendChild(h),c=h},u=(t,s,n,o)=>{if(!t||t.constructor!=Object)return;let i=t.name;i.toLowerCase().includes(s)&&t.callback&&h(i,t.callback,n,t);const a=t.submenu??t[i];if(a){n+=i+e.makeIcon("ChevronRight",{svgClass:"sm fg-secondary separator"}).innerHTML;for(let e of a)u(e,s,n)}};return s._addElements=t=>{d();for(let s of e.menubars)for(let e of s.items)u(e,t,"");for(let s of e.sidebars)for(let e of s.items)u(e,t,"");for(let s of e.extraCommandbarEntries){const e=s.name;e.toLowerCase().includes(t)&&h(e,s.callback,"",{})}if(e.has("CodeEditor")){const s=e.CodeEditor.getInstances();if(!s.length||!s[0].area.root.offsetHeight)return;const n=e.CodeEditor.languages;for(let o of Object.keys(n)){const i="Language: "+o,a=s[0]._getFileIcon(null,n[o].ext).split(" ");let l=e.makeIcon(a[0],{svgClass:`${a.slice(0).join(" ")}`}).innerHTML;l+=i+" <span class='lang-ext'>("+n[o].ext+")</span>",i.toLowerCase().includes(t)&&h(l,()=>{for(let e of s)e._changeLanguage(o)},"",{})}}},s.appendChild(i),s.appendChild(l.root),s.appendChild(r),s}(this.container),t.skipRoot||t.skipDefaultArea||(this.main_area=new e.Area({id:t.id??"mainarea"})),this._onChangeSystemTheme=function(t){localStorage.getItem("lxColorScheme")||e.setTheme(t.matches?"dark":"light",!1)},this._mqlPrefersDarkScheme=window.matchMedia?window.matchMedia("(prefers-color-scheme: dark)"):null;const n=localStorage.getItem("lxColorScheme");return n?e.setTheme(n):this._mqlPrefersDarkScheme&&(t.autoTheme??1)&&(window.matchMedia("(prefers-color-scheme: light)").matches&&e.setTheme("light",!1),this._mqlPrefersDarkScheme.addEventListener("change",this._onChangeSystemTheme)),this.main_area},e.setLayoutMode=function(e){this.layoutMode=e,document.documentElement.setAttribute("data-layout",this.layoutMode)},e.setSpacingMode=function(e){this.spacingMode=e,document.documentElement.setAttribute("data-spacing",this.spacingMode)},e.setCommandbarState=function(e,t=!0){const s=this.commandbar;e?(s.show(),s.querySelector("input").focus(),t&&s._addElements(void 0)):s.close()};e.IEvent=class{constructor(e,t,s){this.name=e,this.value=t,this.domEvent=s}};class n{static NONE=0;static NODE_SELECTED=1;static NODE_DELETED=2;static NODE_DBLCLICKED=3;static NODE_CONTEXTMENU=4;static NODE_DRAGGED=5;static NODE_RENAMED=6;static NODE_VISIBILITY=7;static NODE_CARETCHANGED=8;constructor(e,t,s,o){this.type=e||n.NONE,this.node=t,this.value=s,this.event=o,this.multiple=!1,this.panel=null}string(){switch(this.type){case n.NONE:return"tree_event_none";case n.NODE_SELECTED:return"tree_event_selected";case n.NODE_DELETED:return"tree_event_deleted";case n.NODE_DBLCLICKED:return"tree_event_dblclick";case n.NODE_CONTEXTMENU:return"tree_event_contextmenu";case n.NODE_DRAGGED:return"tree_event_dragged";case n.NODE_RENAMED:return"tree_event_renamed";case n.NODE_VISIBILITY:return"tree_event_visibility";case n.NODE_CARETCHANGED:return"tree_event_caretchanged"}}}e.TreeEvent=n,e.emit=function(t,s,n={}){const o=e.signals[t];if(!o)return;const i=n.target;if(i)i[t]&&i[t].call(i,s);else for(let i of o)if(i instanceof e.BaseComponent)i.set(s,n.skipCallback??!0);else if(i.constructor===Function){i(null,s)}else{const e=i[t];console.assert(e,`No callback registered with _${t}_ signal`),e.bind(i)(s)}},e.addSignal=function(t,s,n){s[t]=n,e.signals[t]||(e.signals[t]=[]),e.signals[t].indexOf(s)>-1||e.signals[t].push(s)};class o{static activeElement=!1;constructor(t,s,n={}){if(o.activeElement)return void o.activeElement.destroy();this._trigger=t,t&&(t.classList.add("triggered"),t.active=this),this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.sideOffset=n.sideOffset??0,this.alignOffset=n.alignOffset??0,this.avoidCollisions=n.avoidCollisions??!0,this.reference=n.reference,this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexpopover";const i=(t??this.reference).closest("dialog");i&&"true"==i.dataset.modal?this._parent=i:this._parent=e.root,this._parent.appendChild(this.root),this.root.addEventListener("keydown",e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())}),s&&(s=[].concat(s)).forEach(e=>{const t=e.root??e;this.root.appendChild(t),e.onPopover&&e.onPopover()}),o.activeElement=this,e.doAsync(()=>{this._adjustPosition(),this._trigger&&(this.root.focus(),this._onClick=e=>{e.target&&(this.root.contains(e.target)||e.target==this._trigger)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0))},10)}destroy(){this._trigger&&(this._trigger.classList.remove("triggered"),delete this._trigger.active,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0)),this.root.remove(),o.activeElement=null}_adjustPosition(){const t=[0,0];{const e=this.reference??this._trigger;console.assert(e,"Popover needs a trigger or reference element!");const s=e.getBoundingClientRect();let n=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth-this.sideOffset,n=!1;break;case"right":t[0]+=s.x+s.width+this.sideOffset,n=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight-this.sideOffset,n=!0;break;case"bottom":t[1]+=s.y+s.height+this.sideOffset,n=!0}switch(this.align){case"start":n?t[0]+=s.x:t[1]+=s.y;break;case"center":n?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":n?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}n?t[0]+=this.alignOffset:t[1]+=this.alignOffset}if(this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();t[0]-=e.x,t[1]-=e.y}this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`}}e.Popover=o;e.PopConfirm=class{constructor(t,s={}){const n=s.confirmText??"Yes",o=s.cancelText??"No",i=s.title??"Confirm",a=s.content??"Are you sure you want to proceed?",l=s.onConfirm,r=s.onCancel,c=e.makeContainer(["auto","auto"],"tour-step-container");{const t=e.makeContainer(["100%","auto"],"flex flex-row","",c);e.makeContainer(["100%","auto"],"p-1 font-medium text-md",i,t)}e.makeContainer(["100%","auto"],"p-1 text-md",a,c,{maxWidth:"400px"});const d=e.makeContainer(["100%","auto"],"flex flex-row text-md","",c),h=e.makeContainer(["100%","auto"],"text-md","",d),u=new e.Panel;h.appendChild(u.root),u.sameLine(2,"justify-end"),u.addButton(null,o,()=>{r&&r(),this._popover?.destroy()},{xbuttonClass:"contrast"}),u.addButton(null,n,()=>{l&&l(),this._popover?.destroy()},{buttonClass:"accent"}),this._popover?.destroy(),this._popover=new e.Popover(null,[c],{reference:t,side:s.side??"top",align:s.align,sideOffset:s.sideOffset,alignOffset:s.alignOffset})}};e.Sheet=class{constructor(t,s,n={}){this.side=n.side??"left",this.root=document.createElement("div"),this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.role="dialog",this.root.className="lexsheet fixed z-1000 bg-primary",document.body.appendChild(this.root),this.root.addEventListener("keydown",e=>{"Escape"==e.key&&(e.preventDefault(),e.stopPropagation(),this.destroy())}),s&&(s=[].concat(s)).forEach(e=>{const t=e.root??e;this.root.appendChild(t),e.onSheet&&e.onSheet()}),e.doAsync(()=>{switch(e.modal.toggle(!1),this.side){case"left":this.root.style.left=0,this.root.style.width=t,this.root.style.height="100%";break;case"right":this.root.style.right=0,this.root.style.width=t,this.root.style.height="100%";break;case"top":this.root.style.left=0,this.root.style.top=0,this.root.style.width="100%",this.root.style.height=t;break;case"bottom":this.root.style.left=0,this.root.style.bottom=0,this.root.style.width="100%",this.root.style.height=t}document.documentElement.setAttribute("data-scale",`sheet-${this.side}`),this.root.focus(),this._onClick=e=>{e.target&&this.root.contains(e.target)||this.destroy()},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)},10)}destroy(){document.documentElement.setAttribute("data-scale",""),document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this.root.remove(),e.modal.toggle(!0)}};class i{static currentMenu=!1;constructor(t,s,n={}){if(console.assert(t,"DropdownMenu needs a DOM element as trigger!"),i.currentMenu||!s?.length)return i.currentMenu.destroy(),void(this.invalid=!0);this._trigger=t,t.classList.add("triggered"),t.ddm=this,this._items=s,this._windowPadding=4,this.side=n.side??"bottom",this.align=n.align??"center",this.sideOffset=n.sideOffset??0,this.alignOffset=n.alignOffset??0,this.avoidCollisions=n.avoidCollisions??!0,this.onBlur=n.onBlur,this.event=n.event,this.inPlace=!1,this.root=document.createElement("div"),this.root.id="root",this.root.dataset.side=this.side,this.root.tabIndex="1",this.root.className="lexdropdownmenu";const o=t.closest("dialog");o&&"true"==o.dataset.modal?this._parent=o:this._parent=e.root,this._parent.appendChild(this.root),this._create(this._items),i.currentMenu=this,e.doAsync(()=>{this._adjustPosition(),this.root.focus(),this._onClick=e=>{(!e.target||null==e.target.closest(".lexdropdownmenu")&&e.target!=this._trigger)&&this.destroy(!0)},document.body.addEventListener("mousedown",this._onClick,!0),document.body.addEventListener("focusin",this._onClick,!0)},10)}destroy(e){this._trigger.classList.remove("triggered"),delete this._trigger.ddm,document.body.removeEventListener("mousedown",this._onClick,!0),document.body.removeEventListener("focusin",this._onClick,!0),this._parent.querySelectorAll(".lexdropdownmenu").forEach(e=>{e.remove()}),i.currentMenu=null,e&&this.onBlur&&this.onBlur()}_create(t,s){if(s){const t=s.getBoundingClientRect();let n=document.createElement("div");n.tabIndex="1",n.className="lexdropdownmenu",n.dataset.id=s.dataset.id,n.dataset.side="right",this._parent.appendChild(n),n.currentParent=s,s=n,e.doAsync(()=>{const s=[t.x+t.width,t.y];if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();s[0]-=e.x,s[1]-=e.y}this.avoidCollisions&&(s[0]=e.clamp(s[0],0,window.innerWidth-n.offsetWidth-this._windowPadding),s[1]=e.clamp(s[1],0,window.innerHeight-n.offsetHeight-this._windowPadding)),n.style.left=`${s[0]}px`,n.style.top=`${s[1]}px`},10)}else s=this.root;let n=t.filter(e=>null!=e?.icon||null!=e?.checked).length>0;for(let e of t)this._createItem(e,s,n)}_createItem(t,s,n){if(!t)return void this._addSeparator(s);const o=t.name??t,i=e.getSupportedDOMName(o);if(s.querySelector("#"+i))return;const a=document.createElement("div");if(a.className="lexdropdownmenuitem"+(t.name||t.options?"":" label")+(t.disabled?" disabled":"")+` ${t.className??""}`,a.dataset.id=i,a.innerHTML=`<span>${o}</span>`,a.tabIndex="1",s.appendChild(a),t.constructor===String)return;if(t.submenu){const t=e.makeIcon("Right",{svgClass:"sm"});a.appendChild(t)}else if(t.kbd){t.kbd=[].concat(t.kbd);const s=e.makeKbd(t.kbd);a.appendChild(s),document.addEventListener("keydown",e=>{if(!this._trigger.ddm)return;e.preventDefault();let s=t.kbd.join("");s=1==s.length?s.toLowerCase():s,s==e.key&&a.click()})}const l=t.disabled??!1;if(void 0!==this._radioGroup){if(t.name===this._radioGroup.selected){const t=e.makeIcon("Circle",{svgClass:"xxs fill-current"});a.prepend(t)}a.setAttribute("data-radioname",this._radioGroup.name)}else if(t.icon){const s=e.makeIcon(t.icon,{svgClass:l?"fg-tertiary":t.svgClass??t.className});a.prepend(s)}else null==t.checked&&n&&a.classList.add("pl-8");if(!l){if(null!=t.checked){const s=new e.Checkbox(i+"_entryChecked",t.checked,e=>{const s=t.callback;t.checked=e,s&&s.call(this,o,e,a)},{className:"accent"}),n=s.root.querySelector("input");n.classList.add("ml-auto"),a.appendChild(n),a.addEventListener("click",e=>{"checkbox"!=e.target.type&&(n.checked=!n.checked,s.set(n.checked))})}else a.addEventListener("click",()=>{const e=a.getAttribute("data-radioname");e&&(this._trigger[e]=o);const s=t.callback;s&&s.call(this,o,a,e),!t.options&&(t.closeOnClick??1)&&this.destroy(!0)});if(a.addEventListener("mouseover",e=>{let n=a.dataset.id,o=s;for(;o;)n+="/"+o.dataset.id,o=o.currentParent?.parentElement;if(this._parent.querySelectorAll(".lexdropdownmenu").forEach(e=>{n.includes(e.dataset.id)||(e.currentParent.built=!1,e.remove())}),t.submenu&&this.inPlace){if(a.built)return;a.built=!0,this._create(t.submenu,a)}e.stopPropagation()}),t.options){console.assert(this._trigger[t.name]&&"An item of the radio group must be selected!"),this._radioGroup={name:t.name,selected:this._trigger[t.name]};for(let e of t.options)this._createItem(e,s,n);delete this._radioGroup,this._addSeparator()}}}_adjustPosition(){const t=[0,0],s=this._trigger.getBoundingClientRect();if(this.event)t[0]=this.event.x,t[1]=this.event.y;else{let e=!0;switch(this.side){case"left":t[0]+=s.x-this.root.offsetWidth-this.sideOffset,e=!1;break;case"right":t[0]+=s.x+s.width+this.sideOffset,e=!1;break;case"top":t[1]+=s.y-this.root.offsetHeight-this.sideOffset,e=!0;break;case"bottom":t[1]+=s.y+s.height+this.sideOffset,e=!0}switch(this.align){case"start":e?t[0]+=s.x:t[1]+=s.y;break;case"center":e?t[0]+=s.x+.5*s.width-.5*this.root.offsetWidth:t[1]+=s.y+.5*s.height-.5*this.root.offsetHeight;break;case"end":e?t[0]+=s.x-this.root.offsetWidth+s.width:t[1]+=s.y-this.root.offsetHeight+s.height}e?t[0]+=this.alignOffset:t[1]+=this.alignOffset}if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();t[0]-=e.x,t[1]-=e.y}this.avoidCollisions&&(t[0]=e.clamp(t[0],0,window.innerWidth-this.root.offsetWidth-this._windowPadding),t[1]=e.clamp(t[1],0,window.innerHeight-this.root.offsetHeight-this._windowPadding)),this.root.style.left=`${t[0]}px`,this.root.style.top=`${t[1]}px`,this.inPlace=!0}_addSeparator(e){const t=document.createElement("div");t.className="separator",(e=e??this.root).appendChild(t)}}e.DropdownMenu=i,e.addDropdownMenu=function(e,t,s){const n=new i(e,t,s);return n.invalid?null:n};e.ColorPicker=class{static currentPicker=!1;constructor(t,n={}){this.colorModel=n.colorModel??"Hex",this.useAlpha=n.useAlpha??!1,this.callback=n.onChange,this.callback||console.warn("Define a callback in _options.onChange_ to allow getting new Color values!"),this.root=document.createElement("div"),this.root.className="lexcolorpicker",this.markerHalfSize=8,this.markerSize=2*this.markerHalfSize,this.currentColor=new s(t);const o=new s({h:this.currentColor.hsv.h,s:1,v:1});this.colorPickerBackground=document.createElement("div"),this.colorPickerBackground.className="lexcolorpickerbg",this.colorPickerBackground.style.backgroundColor=`rgb(${o.css.r}, ${o.css.g}, ${o.css.b})`,this.root.appendChild(this.colorPickerBackground),this.intSatMarker=document.createElement("div"),this.intSatMarker.className="lexcolormarker",this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.colorPickerBackground.appendChild(this.intSatMarker);let i=null,a=t=>{const s=t.movementX,n=t.movementY,o=t.x-i.x,a=t.y-i.y;0!=s&&(o>=0||s<0)&&(o<this.colorPickerBackground.offsetWidth||s>0)&&(this.intSatMarker.style.left=e.clamp(parseInt(this.intSatMarker.style.left)+s,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)+"px"),0!=n&&(a>=0||n<0)&&(a<this.colorPickerBackground.offsetHeight||n>0)&&(this.intSatMarker.style.top=e.clamp(parseInt(this.intSatMarker.style.top)+n,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)+"px"),this._positionToSv(parseInt(this.intSatMarker.style.left),parseInt(this.intSatMarker.style.top)),this._updateColorValue(),t.stopPropagation(),t.preventDefault()},l=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",a),t.removeEventListener("mouseup",l),document.body.classList.remove("noevents")};this.colorPickerBackground.addEventListener("mousedown",e=>{var t=this.root.ownerDocument;t.addEventListener("mousemove",a),t.addEventListener("mouseup",l),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation();const s=e.offsetX-this.markerHalfSize;this.intSatMarker.style.left=s+"px";const n=e.offsetY-this.markerHalfSize;this.intSatMarker.style.top=n+"px",this._positionToSv(s,n),this._updateColorValue(),i=this.colorPickerBackground.getBoundingClientRect()});const r=e.makeContainer(["100%","auto"],"flex flex-row gap-1 items-center","",this.root);window.EyeDropper&&r.appendChild(new e.Button(null,"eyedrop",async()=>{const e=new EyeDropper;try{const t=await e.open();this.fromHexColor(t.sRGBHex)}catch(e){}},{icon:"Pipette",buttonClass:"bg-none",title:"Sample Color"}).root);const c=e.makeContainer(["100%","100%"],"flex flex-col gap-2","",r);this.colorPickerTracker=document.createElement("div"),this.colorPickerTracker.className="lexhuetracker",c.appendChild(this.colorPickerTracker),this.hueMarker=document.createElement("div"),this.hueMarker.className="lexcolormarker",this.hueMarker.style.backgroundColor=`rgb(${o.css.r}, ${o.css.g}, ${o.css.b})`,this.colorPickerTracker.appendChild(this.hueMarker);const d=t=>{this.hueMarker.style.left=t+"px",this.currentColor.hsv.h=e.remapRange(t,0,this.colorPickerTracker.offsetWidth-this.markerSize,0,360);const n=new s({h:this.currentColor.hsv.h,s:1,v:1});this.hueMarker.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this.colorPickerBackground.style.backgroundColor=`rgb(${n.css.r}, ${n.css.g}, ${n.css.b})`,this._updateColorValue()};let h=null,u=t=>{const s=t.movementX,n=t.x-h.x;if(0!=s&&(n>=this.markerHalfSize||s<0)&&(n<this.colorPickerTracker.offsetWidth-this.markerHalfSize||s>0)){const t=e.clamp(parseInt(this.hueMarker.style.left)+s,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(t)}t.stopPropagation(),t.preventDefault()},p=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",u),t.removeEventListener("mouseup",p),document.body.classList.remove("noevents")};if(this.colorPickerTracker.addEventListener("mousedown",t=>{const s=this.root.ownerDocument;s.addEventListener("mousemove",u),s.addEventListener("mouseup",p),document.body.classList.add("noevents"),t.stopImmediatePropagation(),t.stopPropagation();const n=e.clamp(t.offsetX-this.markerHalfSize,0,this.colorPickerTracker.offsetWidth-this.markerSize);d(n),h=this.colorPickerTracker.getBoundingClientRect()}),this.useAlpha){this.alphaTracker=document.createElement("div"),this.alphaTracker.className="lexalphatracker",this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`,c.appendChild(this.alphaTracker),this.alphaMarker=document.createElement("div"),this.alphaMarker.className="lexcolormarker",this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`,this.alphaTracker.appendChild(this.alphaMarker);const t=t=>{this.alphaMarker.style.left=t+"px",this.currentColor.hsv.a=e.remapRange(t,0,this.alphaTracker.offsetWidth-this.markerSize,0,1),this._updateColorValue(),this.alphaMarker.style.backgroundColor=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b},${this.currentColor.css.a})`};let s=null,n=n=>{const a=this.root.ownerDocument;a.addEventListener("mousemove",o),a.addEventListener("mouseup",i),document.body.classList.add("noevents"),n.stopImmediatePropagation(),n.stopPropagation();const l=e.clamp(n.offsetX-this.markerHalfSize,0,this.alphaTracker.offsetWidth-this.markerSize);t(l),s=this.alphaTracker.getBoundingClientRect()},o=n=>{const o=n.movementX,i=n.x-s.x;if(0!=o&&(i>=this.markerHalfSize||o<0)&&(i<this.alphaTracker.offsetWidth-this.markerHalfSize||o>0)){const s=e.clamp(parseInt(this.alphaMarker.style.left)+o,0,this.alphaTracker.offsetWidth-this.markerSize);t(s)}n.stopPropagation(),n.preventDefault()},i=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",o),t.removeEventListener("mouseup",i),document.body.classList.remove("noevents")};this.alphaTracker.addEventListener("mousedown",n)}const m=e.makeContainer(["100%","auto"],"flex flex-row gap-1","",this.root);m.appendChild(new e.Select(null,["CSS","Hex","HSV","RGB"],this.colorModel,e=>{this.colorModel=e,this._updateColorValue(null,!0)}).root),this.labelComponent=new e.TextInput(null,"",null,{inputClass:"bg-none",fit:!0,disabled:!0}),m.appendChild(this.labelComponent.root);{const t=new e.Button(null,"copy",async()=>{navigator.clipboard.writeText(this.labelComponent.value()),t.root.querySelector("input[type='checkbox']").style.pointerEvents="none",e.doAsync(()=>{t.swap(!0),t.root.querySelector("input[type='checkbox']").style.pointerEvents="auto"},3e3)},{swap:"Check",icon:"Copy",buttonClass:"bg-none",className:"ml-auto",title:"Copy"});t.root.querySelector(".swap-on svg").addClass("fg-success"),m.appendChild(t.root)}this._updateColorValue(t,!0),e.doAsync(this._placeMarkers.bind(this)),this.onPopover=this._placeMarkers.bind(this)}_placeMarkers(){this._svToPosition(this.currentColor.hsv.s,this.currentColor.hsv.v);const t=e.remapRange(this.currentColor.hsv.h,0,360,0,this.colorPickerTracker.offsetWidth-this.markerSize);if(this.hueMarker.style.left=t+"px",this.useAlpha){const t=e.remapRange(this.currentColor.hsv.a,0,1,0,this.alphaTracker.offsetWidth-this.markerSize);this.alphaMarker.style.left=t+"px"}}_svToPosition(t,s){this.intSatMarker.style.left=`${e.remapRange(t,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize)}px`,this.intSatMarker.style.top=`${e.remapRange(1-s,0,1,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize)}px`}_positionToSv(t,s){this.currentColor.hsv.s=e.remapRange(t,-this.markerHalfSize,this.colorPickerBackground.offsetWidth-this.markerHalfSize,0,1),this.currentColor.hsv.v=1-e.remapRange(s,-this.markerHalfSize,this.colorPickerBackground.offsetHeight-this.markerHalfSize,0,1)}_updateColorValue(e,t=!1){this.currentColor.set(e??this.currentColor.hsv),this.callback&&!t&&this.callback(this.currentColor),this.intSatMarker.style.backgroundColor=this.currentColor.hex,this.useAlpha&&(this.alphaTracker.style.color=`rgb(${this.currentColor.css.r}, ${this.currentColor.css.g}, ${this.currentColor.css.b})`);const s=(e,t=2)=>e.toFixed(t).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1");if("CSS"==this.colorModel){const{r:e,g:t,b:n,a:o}=this.currentColor.css;this.labelComponent.set(`rgb${this.useAlpha?"a":""}(${e},${t},${n}${this.useAlpha?","+s(o):""})`)}else if("Hex"==this.colorModel)this.labelComponent.set((this.useAlpha?this.currentColor.hex:this.currentColor.hex.substr(0,7)).toUpperCase());else if("HSV"==this.colorModel){const{h:e,s:t,v:n,a:o}=this.currentColor.hsv,i=[Math.floor(e)+"º",Math.floor(100*t)+"%",Math.floor(100*n)+"%"];this.useAlpha&&i.push(s(o)),this.labelComponent.set(i.join(" "))}else{const{r:e,g:t,b:n,a:o}=this.currentColor.rgb,i=[s(e),s(t),s(n)];this.useAlpha&&i.push(s(o)),this.labelComponent.set(i.join(" "))}}fromHexColor(t){this.currentColor.setHex(t);const{h:n,s:o,v:i}=this.currentColor.hsv;this._svToPosition(o,i);const a=new s({h:n,s:1,v:1});this.hueMarker.style.backgroundColor=this.colorPickerBackground.style.backgroundColor=`rgb(${a.css.r}, ${a.css.g}, ${a.css.b})`,this.hueMarker.style.left=e.remapRange(n,0,360,-this.markerHalfSize,this.colorPickerTracker.offsetWidth-this.markerHalfSize)+"px",this._updateColorValue(t)}};e.Calendar=class{constructor(t,s={}){if(this.root=e.makeContainer(["256px","auto"],"p-1 text-md"),this.onChange=s.onChange,this.onPreviousMonth=s.onPreviousMonth,this.onNextMonth=s.onNextMonth,this.untilToday=s.untilToday,this.fromToday=s.fromToday,this.range=s.range,this.skipPrevMonth=s.skipPrevMonth,this.skipNextMonth=s.skipNextMonth,t)this.fromDateString(t);else{const e=new Date;this.month=e.getMonth()+1,this.year=e.getFullYear(),this.fromMonthYear(this.month,this.year)}}_getCurrentDate(){return{day:this.day,month:this.month,year:this.year,fullDate:this.getFullDate()}}_previousMonth(e){this.month=Math.max(0,this.month-1),0==this.month&&(this.month=12,this.year--),this.fromMonthYear(this.month,this.year),!e&&this.onPreviousMonth&&this.onPreviousMonth(this.currentDate)}_nextMonth(e){this.month=Math.min(this.month+1,12),12==this.month&&(this.month=0,this.year++),this.fromMonthYear(this.month,this.year),!e&&this.onNextMonth&&this.onNextMonth(this.currentDate)}refresh(){this.root.innerHTML="";{const t=e.makeContainer(["100%","auto"],"flex flex-row p-1","",this.root);if(!this.skipPrevMonth){const s=e.makeIcon("Left",{title:"Previous Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(s),s.addEventListener("click",()=>{this._previousMonth()})}if(e.makeContainer(["100%","auto"],"text-center font-medium select-none",`${this.monthName} ${this.year}`,t),!this.skipNextMonth){const s=e.makeIcon("Right",{title:"Next Month",iconClass:"border p-1 rounded hover:bg-secondary",svgClass:"sm"});t.appendChild(s),s.addEventListener("click",()=>{this._nextMonth()})}}{const t=document.createElement("table");t.className="w-full",this.root.appendChild(t);{const e=document.createElement("thead");t.appendChild(e);const s=document.createElement("tr");for(const e of["Mo","Tu","We","Th","Fr","Sa","Su"]){const t=document.createElement("th");t.className="fg-tertiary text-sm font-normal select-none",t.innerHTML=`<span>${e}</span>`,s.appendChild(t)}e.appendChild(s)}{const s=document.createElement("tbody");t.appendChild(s);let n=this.range?e.dateFromDateString(this.range[0]):null,o=this.range?e.dateFromDateString(this.range[1]):null;for(let e=0;e<6;e++){const t=document.createElement("tr"),i=this.calendarDays.slice(7*e,7*e+7);for(const e of i){const s=document.createElement("th");s.className="leading-loose font-normal rounded select-none cursor-pointer";const i=new Date(`${this.month}/${e.day}/${this.year}`),a=new Date,l=!this.untilToday||i.getTime()<a.getTime(),r=!this.fromToday||(i.getFullYear()>a.getFullYear()||i.getFullYear()===a.getFullYear()&&i.getMonth()>a.getMonth()||i.getFullYear()===a.getFullYear()&&i.getMonth()===a.getMonth()&&i.getDate()>=a.getDate()),c=e.currentMonth&&l&&r,d=this.currentDate&&e.day==this.currentDate.day&&this.month==this.currentDate.month&&this.year==this.currentDate.year&&e.currentMonth,h=c&&n&&e.day==n.getDate()&&this.month==n.getMonth()+1&&this.year==n.getFullYear(),u=c&&o&&e.day==o.getDate()&&this.month==o.getMonth()+1&&this.year==o.getFullYear();!this.range&&d||this.range&&(h||u)?s.className+=" bg-contrast fg-contrast":this.range&&c&&i>n&&i<o?s.className+=" bg-accent fg-contrast":s.className+=` ${c?"fg-primary":"fg-tertiary"} hover:bg-secondary`,s.innerHTML=`<span>${e.day}</span>`,t.appendChild(s),c?s.addEventListener("click",()=>{this.day=e.day,this.currentDate=this._getCurrentDate(),this.onChange&&this.onChange(this.currentDate)}):void 0!==this.range||e.currentMonth||s.addEventListener("click",()=>{e?.prevMonth?this._previousMonth():this._nextMonth()})}s.appendChild(t)}}}}fromDateString(e){const t=e.split("/");this.day=parseInt(t[0]),this.month=parseInt(t[1]),this.monthName=this.getMonthName(this.month-1),this.year=parseInt(t[2]),this.currentDate=this._getCurrentDate(),this.fromMonthYear(this.month,this.year)}fromMonthYear(e,t){e--,t=t??(new Date).getFullYear();const s=new Date(t,e,1).getDay(),n=0===s?6:s-1,o=new Date(t,e+1,0).getDate(),i=new Date(0===e?t-1:t,(0===e?11:e-1)+1,0).getDate(),a=[];for(let e=n-1;e>=0;e--)a.push({day:i-e,currentMonth:!1,prevMonth:!0});for(let e=1;e<=o;e++)a.push({day:e,currentMonth:!0});const l=42-a.length;for(let e=1;e<=l;e++)a.push({day:e,currentMonth:!1,nextMonth:!0});this.monthName=this.getMonthName(e),this.firstDay=n,this.daysInMonth=o,this.calendarDays=a,this.refresh()}getMonthName(e,t="en-US"){return new Intl.DateTimeFormat(t,{month:"long"}).format(new Date(2e3,e,1))}getFullDate(e,t,s){return`${e??this.monthName} ${t??this.day}${this._getOrdinalSuffix(t??this.day)}, ${s??this.year}`}setRange(e){console.assert(e.constructor===Array,"Date Range must be in Array format"),this.range=e,this.refresh()}setMonth(e){this.month=e,this.fromMonthYear(this.month,this.year)}_getOrdinalSuffix(e){if(e>3&&e<21)return"th";switch(e%10){case 1:return"st";case 2:return"nd";case 3:return"rd";default:return"th"}}};e.CalendarRange=class{constructor(t,s={}){this.root=e.makeContainer(["auto","auto"],"flex flex-row"),console.assert(t&&t.constructor===Array,"Range cannot be empty and has to be an Array!");let n=null,o=!1;{const s=e.dateFromDateString(t[0]),i=e.dateFromDateString(t[1]);if(s>i){const e=t[0];t[0]=t[1],t[1]=e,o=!0}n=(o?i.getMonth():s.getMonth())+2}this.from=t[0],this.to=t[1],this._selectingRange=!1;const i=e=>{const t=`${e.day}/${e.month}/${e.year}`;this._selectingRange?(this.to=t,this._selectingRange=!1):(this.from=this.to=t,this._selectingRange=!0);const n=[this.from,this.to];this.fromCalendar.setRange(n),this.toCalendar.setRange(n),s.onChange&&s.onChange(n)};this.fromCalendar=new e.Calendar(this.from,{skipNextMonth:!0,onChange:i,onPreviousMonth:()=>{this.toCalendar._previousMonth()},range:t}),this.toCalendar=new e.Calendar(this.to,{skipPrevMonth:!0,onChange:i,onNextMonth:()=>{this.fromCalendar._nextMonth()},range:t}),console.assert(n&&"New Month must be valid"),this.toCalendar.setMonth(n),this.root.appendChild(this.fromCalendar.root),this.root.appendChild(this.toCalendar.root)}getFullDate(){const t=e.dateFromDateString(this.from),s=this.fromCalendar.getMonthName(t.getMonth()),n=e.dateFromDateString(this.to),o=this.toCalendar.getMonthName(n.getMonth());return`${this.fromCalendar.getFullDate(s,t.getDate(),t.getFullYear())} to ${this.toCalendar.getFullDate(o,n.getDate(),n.getFullYear())}`}};class a{static TAB_ID=0;constructor(t,s={}){this.onclose=s.onclose;let n=document.createElement("div");n.className="lexareatabs "+(s.fit?"fit":"row");const o=s.folding??!1;o&&n.classList.add("folding");let i=this;n.addEventListener("dragenter",function(e){e.preventDefault(),this.classList.add("dockingtab")}),n.addEventListener("dragleave",function(e){e.preventDefault(),this.contains(e.relatedTarget)||this.classList.remove("dockingtab")}),n.addEventListener("drop",function(e){e.preventDefault();const t=e.dataTransfer.getData("source"),s=document.getElementById(t);if(!s)return;const n=s.parentElement,o=e.target,a=o.getBoundingClientRect();e.offsetX<.5*a.width?this.insertBefore(s,o):o.nextElementSibling?this.insertBefore(s,o.nextElementSibling):this.appendChild(s);{n.childNodes.forEach((e,t)=>e.childIndex=t-1);const t=/true/.test(e.dataTransfer.getData("fit"));if(n.childElementCount==(t?2:1))n.lastChild.click();else{(n.querySelector(".selected")??n.childNodes[t?1:0]).click()}}this.childNodes.forEach((e,t)=>e.childIndex=t-1);const l=document.getElementById(t+"_content");i.area.attach(l),this.classList.remove("dockingtab"),s.instance=i,s.click(),i.tabs[s.dataset.name]=l}),t.root.classList.add("lexareatabscontainer");const[a,l]=t.split({type:"vertical",sizes:s.sizes??"auto",resize:!1,top:2});if(a.attach(n),s.parentClass&&(n.parentElement.className+=` ${s.parentClass}`),this.area=l,this.area.root.className+=" lexareatabscontent",s.contentClass&&(this.area.root.className+=` ${s.contentClass}`),this.selected=null,this.root=n,this.tabs={},this.tabDOMs={},s.fit){let t=document.createElement("span");t.className="lexareatab thumb",this.thumb=t,this.root.appendChild(t);new ResizeObserver(t=>{const s=this.thumb.item;if(s){var n=this.thumb.style.transition;this.thumb.style.transition="none",this.thumb.style.transform="translate( "+s.childIndex*s.offsetWidth+"px )",this.thumb.style.width=s.offsetWidth+"px",e.flushCss(this.thumb),this.thumb.style.transition=n}}).observe(this.area.root)}if(o){this.folded=!0,this.folding=o,"up"==o&&t.root.insertChildAtIndex(t.sections[1].root,0);new ResizeObserver(e=>{for(const s of e){const e=s.contentRect;t.parentArea.sections[0].root.style.height="calc(100% - "+(42+e.height)+"px )"}}).observe(this.area.root),this.area.root.classList.add("folded")}}add(t,s,n={}){let o=n.selected??!1;if(o){this.root.querySelectorAll("span").forEach(e=>e.classList.remove("selected"));(this.area.root.querySelector(":scope > .pseudoparent-tabs")??this.area.root).querySelectorAll(":scope > .lextabcontent").forEach(e=>e.style.display="none")}o=!Object.keys(this.tabs).length&&!this.folding||o;let i=s.root?s.root:s;if(i.originalDisplay=i.style.display,i.style.display=o?i.originalDisplay:"none",i.classList.add("lextabcontent"),n.icon)if(n.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";n.icon="<img src='"+(e+n.icon)+"'>"}else{const t=n.icon.split(" ");n.icon=e.makeIcon(t[0],{svgClass:"sm "+t.slice(0).join(" ")}).innerHTML}let l=document.createElement("span");if(l.dataset.name=t,l.className="lexareatab flex flex-row gap-1"+(o?" selected":""),l.innerHTML=(n.icon??"")+t,l.id=t.replace(/\s/g,"")+a.TAB_ID++,l.title=n.title??"",l.selected=o??!1,l.fixed=n.fixed,l.instance=this,i.id=l.id+"_content",n.badge){const t={};(n.badge.asChild??!1)&&(t.parent=l),l.innerHTML+=e.badge(n.badge.content??"",n.badge.className,t)}l.selected&&(this.selected=t),l.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation();const t=l.instance;if(!l.fixed){const e=l.selected;l.parentElement.querySelectorAll("span").forEach(e=>e.selected=!1),l.selected=!e,l.parentElement.querySelectorAll("span").forEach(e=>e.classList.remove("selected")),l.classList.toggle("selected",t.folding&&l.selected);(t.area.root.querySelector(":scope > .pseudoparent-tabs")??t.area.root).querySelectorAll(":scope > .lextabcontent").forEach(e=>e.style.display="none"),i.style.display=i.originalDisplay,t.selected=l.dataset.name}t.folding&&(t.folded=l.selected,t.area.root.classList.toggle("folded",!t.folded)),n.onSelect&&n.onSelect(e,l.dataset.name),t.thumb&&(t.thumb.style.transform="translate( "+l.childIndex*l.offsetWidth+"px )",t.thumb.style.width=l.offsetWidth+"px",t.thumb.item=l)}),l.addEventListener("contextmenu",e=>{e.preventDefault(),e.stopPropagation(),n.onContextMenu&&n.onContextMenu(e,l.dataset.name)}),n.allowDelete&&(l.addEventListener("mousedown",t=>{t.button==e.MOUSE_MIDDLE_CLICK&&t.preventDefault()}),l.addEventListener("mouseup",t=>{t.preventDefault(),t.stopPropagation(),t.button==e.MOUSE_MIDDLE_CLICK&&this.delete(l.dataset.name)})),l.setAttribute("draggable",!0),l.addEventListener("dragstart",e=>{const t=!!this.thumb;l.parentElement.childNodes.length!=(t?2:1)?(e.dataTransfer.setData("source",e.target.id),e.dataTransfer.setData("fit",t)):e.preventDefault()});const r=n.indexOffset??-1;l.childIndex=this.root.childElementCount+r,this.root.insertChildAtIndex(l,l.childIndex+1),this.area.attach(i),this.tabDOMs[t]=l,this.tabs[t]=s,setTimeout(()=>{n.onCreate&&n.onCreate.call(this,this.area.root.getBoundingClientRect()),o&&this.thumb&&(this.thumb.classList.add("no-transition"),this.thumb.style.transform="translate( "+l.childIndex*l.offsetWidth+"px )",this.thumb.style.width=l.offsetWidth+"px",this.thumb.item=l,this.thumb.classList.remove("no-transition"))},10)}select(e){this.tabDOMs[e]&&this.tabDOMs[e].click()}delete(e){this.selected==e&&(this.selected=null);const t=this.tabDOMs[e];if(!t||t.fixed)return;this.onclose&&this.onclose(e),this.tabDOMs[e].remove(),delete this.tabDOMs[e],this.tabs[e].remove(),delete this.tabs[e];const s=this.root.lastChild;s&&!s.fixed&&this.root.lastChild.click()}}e.Tabs=a;e.Footer=class{constructor(t={}){const s=document.createElement("footer");s.className=`lexfooter ${t.className??""}`;const n=document.createElement("div");if(n.style.minHeight="48px",n.className="w-full",s.appendChild(n),t.columns&&t.columns.constructor==Array){const e=document.createElement("div");e.className="columns",e.style.gridTemplateColumns="1fr ".repeat(t.columns.length),n.appendChild(e);for(let s of t.columns){const t=document.createElement("div");t.className="col",e.appendChild(t);const n=document.createElement("h2");if(n.innerHTML=s.title,t.appendChild(n),!s.items||!s.items.length)continue;const o=document.createElement("ul");t.appendChild(o);for(let e of s.items){const t=document.createElement("li");t.innerHTML=`<a class="" href="${e.link}">${e.title}</a>`,o.appendChild(t)}}}if(t.credits||t.socials){const s=document.createElement("div");if(s.className="credits-and-socials",n.appendChild(s),t.credits){const e=document.createElement("p");e.innerHTML=t.credits,s.appendChild(e)}if(t.socials){const n=document.createElement("div");n.className="socials flex flex-row gap-1 my-2 justify-end";for(let s of t.socials){const t=e.makeIcon(s.icon,{title:s.title,svgClass:"xl"});t.href=s.link,t.target="_blank",n.appendChild(t)}s.appendChild(n)}}(t.parent??document.body).appendChild(s),s.previousElementSibling.style.flexGrow="1",this.root=s}};class l{static _last_id=0;constructor(t,s,n={}){s||console.warn("Content is empty, add some components using 'callback' parameter!"),this._oncreate=s,this.id=e.guidGenerator();const o=n.size??[],i=n.position??[],a=n.draggable??!0,r=n.dockable??!1,c=n.modal??!1;let d=document.createElement("dialog");d.className="lexdialog "+(n.className??""),d.id=n.id??"dialog"+l._last_id++,d.dataset.modal=c,e.root.appendChild(d),e.doAsync(()=>{c?d.showModal():d.show()},10);let h=this;const u=document.createElement("div");if(t&&(u.className="lexdialogtitle",u.innerHTML=t,u.setAttribute("draggable",!1),d.appendChild(u)),n.closable??1){this.close=()=>{n.onBeforeClose&&n.onBeforeClose(this),n.onclose?n.onclose(this.root):(d.close(),e.doAsync(()=>{h.panel.clear(),d.remove()},150))};const s=e.makeIcon("X",{title:"Close",iconClass:"lexdialogcloser"});s.addEventListener("click",this.close);const o=e.makeIcon("Minus",{title:"Dock",iconClass:"ml-auto mr-2"});o.addEventListener("click",()=>{const e=this.branchData,t=e.panel,s=t.root.childElementCount,n=t.branch(e.name,{closed:e.closed});n.components=e.components;for(let e of n.components)n.content.appendChild(e.root);e.childIndex<s&&t.root.insertChildAtIndex(n.root,e.childIndex),this.close()}),t?(r&&u.appendChild(o),u.appendChild(s)):(s.classList.add("notitle"),d.appendChild(s))}const p=new e.Panel;p.root.classList.add("lexdialogcontent"),t||p.root.classList.add("notitle"),s&&s.call(this,p),d.appendChild(p.root),p.root.querySelectorAll(".lexbranch").forEach(e=>e.classList.add("dialog")),this.panel=p,this.root=d,this.title=u,a&&e.makeDraggable(d,Object.assign({targetClass:"lexdialogtitle"},n)),o.length&&"string"!=typeof o[0]&&(o[0]+="px"),o.length&&"string"!=typeof o[1]&&(o[1]+="px"),d.style.width=o[0]?o[0]:"25%",d.style.height=o[1]?o[1]:"auto",d.style.translate=n.position?"unset":"-50% -50%",n.size&&(this.size=o),d.style.left=i[0]??"50%",d.style.top=i[1]??"50%",p.root.style.height=t?"calc( 100% - "+(u.offsetHeight+30)+"px )":"calc( 100% - 51px )"}destroy(){this.root.remove()}refresh(){this.panel.root.innerHTML="",this._oncreate.call(this,this.panel)}setPosition(e,t){this.root.style.left=e+"px",this.root.style.top=t+"px"}setTitle(e){const t=this.root.querySelector(".lexdialogtitle");t&&(t.innerText=e)}}e.Dialog=l;class r extends l{static TOP=0;static BOTTOM=1;constructor(t,s,n={}){n.draggable=n.draggable??!1,n.closable=n.closable??!1;super(t,s,n);let o=this;if(e.addSignal("@on_branch_closed",this.panel,e=>{this.dock_pos==r.BOTTOM&&(this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)")}),this.root.classList.add("pocket"),this.root.style.translate="none",this.root.style.top="0",this.root.style.left="unset",n.position||(this.root.style.right="3px",this.root.style.top="3px"),this.panel.root.style.width="100%",this.panel.root.style.height="100%",this.dock_pos=r.TOP,this.minimized=!1,this.title.tabIndex=-1,this.title.addEventListener("click",e=>{this.title.eventCatched?this.title.eventCatched=!1:(this.size&&(this.minimized?this.root.style.height=this.size[1]:this.root.style.height="auto"),this.root.classList.toggle("minimized"),this.minimized=!this.minimized,this.dock_pos==r.BOTTOM&&(o.root.style.top=this.root.classList.contains("minimized")?"calc(100% - "+(o.title.offsetHeight+6)+"px)":"calc(100% - "+(o.root.offsetHeight+3)+"px)"))}),!n.draggable){const e=n.float;if(e)for(let t=0;t<e.length;t++){switch(e[t]){case"b":this.root.style.top="calc(100% - "+(this.root.offsetHeight+3)+"px)";break;case"l":this.root.style.right="unset",this.root.style.left=n.position?n.position[1]:"3px"}}this.root.classList.add("dockable"),this.title.addEventListener("keydown",function(e){e.ctrlKey&&(o.root.style.right="unset","ArrowLeft"==e.key?o.root.style.left="0px":"ArrowRight"==e.key?o.root.style.left="calc(100% - "+(o.root.offsetWidth+3)+"px)":"ArrowUp"==e.key?(o.root.style.top="0px",o.dock_pos=r.TOP):"ArrowDown"==e.key&&(o.root.style.top="calc(100% - "+(o.root.offsetHeight+3)+"px)",o.dock_pos=r.BOTTOM))})}}}e.PocketDialog=r;class c{constructor(t,s,n={}){if(document.body.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove()),this.root=document.createElement("div"),this.root.className="lexcontextmenu",this.root.addEventListener("mouseleave",function(){this.remove()}),this.items=[],this.colors={},s){const e={};e[s]=[],e.className="cmtitle",e.icon=n.icon,this.items.push(e)}const o=t.target.closest("dialog");o&&"true"==o.dataset.modal?this._parent=o:this._parent=e.root,this._parent.appendChild(this.root);const i=[t.x-48,t.y-8];if(this._parent instanceof HTMLDialogElement){let e=this._parent.getBoundingClientRect();i[0]-=e.x,i[1]-=e.y}this.root.style.left=`${i[0]}px`,this.root.style.top=`${i[1]}px`}_adjustPosition(e,t,s=!1){let n=e.getBoundingClientRect(),o=parseInt(e.style.left),i=parseInt(e.style.top);if(s){let s=window.innerWidth-n.right;s<0&&(o=e.offsetLeft+(s-t)),s=window.innerHeight-(n.top+n.height),s<0&&(i=e.offsetTop+(s-t+20))}else{let s=n.width;n.left<0?o=t:window.innerWidth-n.right<0&&(o=window.innerWidth-s-t),n.top<0?i=t:n.top+n.height>window.innerHeight&&(e.style.marginTop="",i=window.innerHeight-n.height-t)}e.style.left=`${o}px`,e.style.top=`${i}px`}_createSubmenu(e,t,s,n){this.root.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove());let o=document.createElement("div");o.className="lexcontextmenu",s.appendChild(o);for(let s=0;s<e[t].length;++s){const i=e[t][s],a=Object.keys(i)[0];this._createEntry(i,a,o,n)}const i=s.getBoundingClientRect();o.style.left=i.x+i.width+"px",o.style.marginTop="-31px",this._adjustPosition(o,6)}_createEntry(t,s,n,o){const i=t[s].length;let a=document.createElement("div");a.className="lexmenuboxentry"+(t.className?" "+t.className:""),a.id=t.id??"eId"+e.getSupportedDOMName(s),a.innerHTML="";const l=t.icon;l&&a.appendChild(e.makeIcon(l,{svgClass:"sm"}));const r=t.disabled;if(a.innerHTML+="<div class='lexentryname"+(r?" disabled":"")+"'>"+s+"</div>",n.appendChild(a),this.colors[s]&&(a.style.borderColor=this.colors[s]),""==s)return void(a.className+=" cmseparator");if(a.addEventListener("click",n=>{if(n.stopPropagation(),n.stopImmediatePropagation(),r)return;const l=t.callback;l&&(l.call(this,s,a),this.root.remove()),i&&"click"==e.OPEN_CONTEXTMENU_ENTRY&&this._createSubmenu(t,s,a,++o)}),!i)return;const c=e.makeIcon("Menu",{svgClass:"sm"});a.appendChild(c),"mouseover"==e.OPEN_CONTEXTMENU_ENTRY&&a.addEventListener("mouseover",e=>{a.built||(a.built=!0,this._createSubmenu(t,s,a,++o),e.stopPropagation())}),a.addEventListener("mouseleave",()=>{o=-1,n.querySelectorAll(".lexcontextmenu").forEach(e=>e.remove())})}onCreate(){e.doAsync(()=>this._adjustPosition(this.root,6))}add(t,s={}){s.constructor==Function&&(s={callback:s});const n=(t+="").split("/"),o=n[n.length-1];this.colors[o]=s.color;let i=0;const a=(e,t)=>{if(null==e)return;let o=null;if(t.forEach(t=>{const s=Object.keys(t).find(t=>t==e);s&&(o=t[s])}),o)a(n[i++],o);else{let o={};o[e]=[];const l=n[i++];l||(o.id=s.id,o.icon=s.icon,o.callback=s.callback,o.disabled=s.disabled??!1),t.push(o),a(l,o[e])}};a(n[i++],this.items);const l=e=>{let t=Object.keys(e)[0],s=e[t];if(s.length){if(null==s.find(e=>Object.keys(e)[0]==t)){const s={};s[t]=[],s.className="cmtitle",e[t].unshift(s)}for(let s of e[t]){let e=Object.keys(s)[0];for(let t=0;t<s[e].length;++t)l(s)}}};for(let e of this.items)l(e);for(let t of this.items){let s=Object.keys(t)[0],n="eId"+e.getSupportedDOMName(s);const o="#"+(t.id??n);this.root.querySelector(o)||this._createEntry(t,s,this.root,-1)}}setColor(t,s){"#"!==s[0]&&(s=e.rgbToHex(s)),this.colors[t]=s}}e.ContextMenu=c,e.addContextMenu=function(e,t,s,n){const o=new c(t,e,n);return s&&s(o),o.onCreate(),o};e.CanvasCurve=class{constructor(t,s={}){let n=document.createElement("div");n.className="curve "+(s.className?s.className:""),n.style.minHeight="50px",n.style.width=s.width||"100%",n.style.minWidth="50px",n.style.minHeight="20px",n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),n.linecolor=s.lineColor||"#555",n.value=t||[],n.xrange=s.xrange||[0,1],n.yrange=s.yrange||[0,1],n.defaulty=null!=s.defaulty?s.defaulty:0,n.no_overlap=s.noOverlap||!1,n.show_samples=s.showSamples||0,n.allow_add_values=s.allowAddValues??!0,n.draggable_x=s.draggableX??!0,n.draggable_y=s.draggableY??!0,n.smooth=(s.smooth&&"number"==typeof s.smooth?s.smooth:.3)||!1,n.move_out=s.moveOutAction??e.CURVE_MOVEOUT_DELETE,e.addSignal("@on_new_color_scheme",(t,o)=>{n.bgcolor=s.bgColor||e.getThemeColor("global-intense-background"),n.pointscolor=s.pointsColor||e.getThemeColor("global-color-accent"),n.activepointscolor=s.activePointsColor||e.getThemeColor("global-color-accent-light"),this.redraw()}),this.element=n;let o=document.createElement("canvas");function i(e){return[o.width*(e[0]-n.xrange[0])/n.xrange[1],o.height*(e[1]-n.yrange[0])/n.yrange[1]]}function a(e){return[e[0]*n.xrange[1]/o.width+n.xrange[0],e[1]*n.yrange[1]/o.height+n.yrange[0]]}o.width=s.width||200,o.height=s.height||50,n.appendChild(o),this.canvas=o,n.addEventListener("mousedown",function(t){document.addEventListener("mousemove",c),document.addEventListener("mouseup",d);var s=o.getBoundingClientRect(),h=t.clientX-s.left,m=t.clientY-s.top;if(l=function(e,t){for(var s=1e5,o=-1,a=0;a<n.value.length;a++){var l=u([e,t],i(n.value[a]));l<s&&l<8&&(s=l,o=a)}return o}(h,o.height-m),t.button==e.MOUSE_LEFT_CLICK&&-1==l&&n.allow_add_values){var f=a([h,o.height-m]);n.value.push(f),p(),l=n.value.indexOf(f)}r=[h,m],n.redraw(),t.preventDefault(),t.stopPropagation()}),n.getValueAt=function(e){if(e<n.xrange[0]||e>n.xrange[1])return n.defaulty;let t=[n.xrange[0],n.defaulty],s=0;for(let o=0;o<n.value.length;o+=1){let i=n.value[o];if(e==i[0])return i[1];if(e<i[0])return s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s;t=i}return v=[n.xrange[1],n.defaulty],s=(e-t[0])/(v[0]-t[0]),t[1]*(1-s)+v[1]*s},n.resample=function(e){let t=[],s=(n.xrange[1]-n.xrange[0])/e;for(let e=n.xrange[0];e<=n.xrange[1];e+=s)t.push(n.getValueAt(e));return t},n.addValue=function(e){for(let t=0;t<n.value;t++){if(!(n.value[t][0]<e[0]))return n.value.splice(t,0,e),void redraw()}n.value.push(e),redraw()};let l=-1;n.redraw=function(t={}){t.value&&(n.value=t.value),t.xrange&&(n.xrange=t.xrange),t.yrange&&(n.yrange=t.yrange),t.smooth&&(n.smooth=t.smooth);var s=o.getContext("2d");s.setTransform(1,0,0,1,0,0),s.translate(0,o.height),s.scale(1,-1),s.fillStyle=n.bgcolor,s.fillRect(0,0,o.width,o.height),s.strokeStyle=n.linecolor,s.beginPath();var a=i([n.xrange[0],n.defaulty]);s.moveTo(a[0],a[1]);let r=[a[0],a[1]];for(var c in n.value){a=i(n.value[c]),r.push(a[0]),r.push(a[1]),n.smooth||s.lineTo(a[0],a[1])}a=i([n.xrange[1],n.defaulty]),r.push(a[0]),r.push(a[1]),n.smooth?e.drawSpline(s,r,n.smooth):(s.lineTo(a[0],a[1]),s.stroke());for(c=0;c<n.value.length;c+=1){a=i(n.value[c]),s.fillStyle=l==c?n.activepointscolor:n.pointscolor,s.beginPath(),s.arc(a[0],a[1],l==c?4:3,0,2*Math.PI),s.fill()}if(n.show_samples){var d=n.resample(n.show_samples);s.fillStyle="#888";for(c=0;c<d.length;c+=1){a=i([c*((n.xrange[1]-n.xrange[0])/n.show_samples)+n.xrange[0],d[c]]),s.beginPath(),s.arc(a[0],a[1],2,0,2*Math.PI),s.fill()}}};var r=[0,0];function c(t){var s=o.getBoundingClientRect(),i=t.clientX-s.left,c=t.clientY-s.top;i<0?i=0:i>o.width&&(i=o.width),c<0?c=0:c>o.height&&(c=o.height);const m=[t.clientX-s.left,t.clientY-s.top];if(-1!=l&&u(m,[i,c])>.5*o.height){if(n.move_out==e.CURVE_MOVEOUT_DELETE)n.value.splice(l,1);else{const e=[m[0]-i,m[1]-c];let t=n.value[l];t[0]=0==e[0]?t[0]:e[0]<0?n.xrange[0]:n.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?n.yrange[1]:n.yrange[0]}d(t)}else{var f=a([-(n.draggable_x?r[0]-i:0),n.draggable_y?r[1]-c:0]);if(-1!=l){var g=n.xrange[0],v=n.xrange[1];n.no_overlap&&(l>0&&(g=n.value[l-1][0]),l<n.value.length-1&&(v=n.value[l+1][0]));var C=n.value[l];C[0]+=f[0],C[1]+=f[1],C[0]<g?C[0]=g:C[0]>v&&(C[0]=v),C[1]<n.yrange[0]?C[1]=n.yrange[0]:C[1]>n.yrange[1]&&(C[1]=n.yrange[1])}p(),n.redraw(),r[0]=i,r[1]=c,h(t),t.preventDefault(),t.stopPropagation()}}function d(e){l=-1,n.redraw(),document.removeEventListener("mousemove",c),document.removeEventListener("mouseup",d),h(e),e.preventDefault(),e.stopPropagation()}function h(e){s.callback&&s.callback.call(n,n.value,e)}function u(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function p(){var e=null;-1!=l&&(e=n.value[l]),n.value.sort(function(e,t){return e[0]-t[0]}),e&&(l=n.value.indexOf(e))}return n.redraw(),this}redraw(e={}){this.element.redraw(e)}};e.CanvasDial=class{constructor(t,s,n={}){let o=document.createElement("div");o.className="dial "+(n.className?n.className:""),o.style.width=o.style.height=n.size||"100%",o.style.minWidth=o.style.minHeight="50px",o.bgcolor=n.bgColor||e.getThemeColor("global-dark-background"),o.pointscolor=n.pointsColor||e.getThemeColor("global-color-accent-light"),o.linecolor=n.lineColor||"#555",o.value=s||[],o.xrange=n.xrange||[0,1],o.yrange=n.yrange||[0,1],o.defaulty=null!=n.defaulty?n.defaulty:0,o.no_overlap=n.noOverlap||!1,o.show_samples=n.showSamples||0,o.allow_add_values=n.allowAddValues??!0,o.draggable_x=n.draggableX??!0,o.draggable_y=n.draggableY??!0,o.smooth=(n.smooth&&"number"==typeof n.smooth?n.smooth:.3)||!1,o.move_out=n.moveOutAction??e.CURVE_MOVEOUT_DELETE,this.element=o;let i=document.createElement("canvas");function a(e,t){return Math.pow(e[0],2),[i.width*(e[0]-o.xrange[0])/o.xrange[1],i.height*(e[1]-o.yrange[0])/o.yrange[1]]}function l(e){return[e[0]*o.xrange[1]/i.width+o.xrange[0],e[1]*o.yrange[1]/i.height+o.yrange[0]]}i.width=i.height=n.size||200,o.appendChild(i),this.canvas=i,o.addEventListener("mousedown",function(t){document.addEventListener("mousemove",d),document.addEventListener("mouseup",h);var s=i.getBoundingClientRect(),n=t.clientX-s.left,u=t.clientY-s.top;if(r=function(e,t){for(var s=1e5,n=-1,i=0;i<o.value.length;i++){var l=p([e,t],a(o.value[i]));l<s&&l<8&&(s=l,n=i)}return n}(n,i.height-u),t.button==e.MOUSE_LEFT_CLICK&&-1==r&&o.allow_add_values){var f=l([n,i.height-u]);o.value.push(f),m(),r=o.value.indexOf(f)}c=[n,u],o.redraw(),t.preventDefault(),t.stopPropagation()}),o.getValueAt=function(e){if(e<o.xrange[0]||e>o.xrange[1])return o.defaulty;for(var t=[o.xrange[0],o.defaulty],s=0,n=0;n<o.value.length;n+=1){var i=o.value[n];if(e==i[0])return i[1];if(e<i[0])return s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s;t=i}return i=[o.xrange[1],o.defaulty],s=(e-t[0])/(i[0]-t[0]),t[1]*(1-s)+i[1]*s},o.resample=function(e){for(var t=[],s=(o.xrange[1]-o.xrange[0])/e,n=o.xrange[0];n<=o.xrange[1];n+=s)t.push(o.getValueAt(n));return t},o.addValue=function(e){for(var t=0;t<o.value;t++){if(!(o.value[t][0]<e[0]))return o.value.splice(t,0,e),void redraw()}o.value.push(e),redraw()};var r=-1;o.redraw=function(e={}){e.value&&(o.value=e.value),e.xrange&&(o.xrange=e.xrange),e.yrange&&(o.yrange=e.yrange),e.smooth&&(o.smooth=e.smooth);var t=i.getContext("2d");t.setTransform(1,0,0,1,0,0),t.translate(0,i.height),t.scale(1,-1),t.fillStyle=o.bgcolor,t.fillRect(0,0,i.width,i.height),t.strokeStyle=o.linecolor,t.beginPath();var s=a([o.xrange[0],o.defaulty]);t.moveTo(s[0],s[1]);let n=[s[0],s[1]];for(var l in o.value){s=a(o.value[l]),n.push(s[0]),n.push(s[1])}s=a([o.xrange[1],o.defaulty]),n.push(s[0]),n.push(s[1]);s=a([0,0]),t.fillStyle="gray",t.beginPath(),t.arc(s[0],s[1],3,0,2*Math.PI),t.fill();for(l=0;l<o.value.length;l+=1){s=a(o.value[l]),t.fillStyle=r==l?"white":o.pointscolor,t.beginPath(),t.arc(s[0],s[1],r==l?4:3,0,2*Math.PI),t.fill()}if(o.show_samples){var c=o.resample(o.show_samples);t.fillStyle="#888";for(l=0;l<c.length;l+=1){s=a([l*((o.xrange[1]-o.xrange[0])/o.show_samples)+o.xrange[0],c[l]]),t.beginPath(),t.arc(s[0],s[1],2,0,2*Math.PI),t.fill()}}};var c=[0,0];function d(t){var s=i.getBoundingClientRect(),n=t.clientX-s.left,a=t.clientY-s.top;n<0?n=0:n>i.width&&(n=i.width),a<0?a=0:a>i.height&&(a=i.height);const d=[t.clientX-s.left,t.clientY-s.top];if(-1!=r&&p(d,[n,a])>.5*i.height){if(o.move_out==e.CURVE_MOVEOUT_DELETE)o.value.splice(r,1);else{const e=[d[0]-n,d[1]-a];let t=o.value[r];t[0]=0==e[0]?t[0]:e[0]<0?o.xrange[0]:o.xrange[1],t[1]=0==e[1]?t[1]:e[1]<0?o.yrange[1]:o.yrange[0]}h(t)}else{var f=l([-(o.draggable_x?c[0]-n:0),o.draggable_y?c[1]-a:0]);if(-1!=r){var g=o.xrange[0],v=o.xrange[1];o.no_overlap&&(r>0&&(g=o.value[r-1][0]),r<o.value.length-1&&(v=o.value[r+1][0]));var C=o.value[r];C[0]+=f[0],C[1]+=f[1],C[0]<g?C[0]=g:C[0]>v&&(C[0]=v),C[1]<o.yrange[0]?C[1]=o.yrange[0]:C[1]>o.yrange[1]&&(C[1]=o.yrange[1])}m(),o.redraw(),c[0]=n,c[1]=a,u(t),t.preventDefault(),t.stopPropagation()}}function h(e){r=-1,o.redraw(),document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",h),u(e),e.preventDefault(),e.stopPropagation()}function u(e){n.callback&&n.callback.call(o,o.value,e)}function p(e,t){return Math.sqrt(Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2))}function m(){var e=null;-1!=r&&(e=o.value[r]),o.value.sort(function(e,t){return e[0]-t[0]}),e&&(r=o.value.indexOf(e))}return o.redraw(),this}redraw(e={}){this.element.redraw(e)}};class d{static COLORS=[[255,0,0],[0,255,0],[0,0,255],[0,128,128],[128,0,128],[128,128,0],[255,128,0],[255,0,128],[0,128,255],[128,0,255]];static GRID_SIZE=64;constructor(t,s,n={}){this.circular=n.circular??!1,this.showNames=n.showNames??!0,this.size=n.size??[200,200],this.points=t??[],this.callback=s,this.weights=[],this.weightsObj={},this.currentPosition=new e.vec2(0,0),this.circleCenter=[0,0],this.circleRadius=1,this.margin=8,this.dragging=!1,this._valuesChanged=!0,this._selectedPoint=null,this.root=e.makeContainer(["auto","auto"]),this.root.tabIndex="1",this.root.addEventListener("mousedown",function(e){var t=o.root.ownerDocument;return t.addEventListener("mouseup",a),t.addEventListener("mousemove",i),e.stopPropagation(),e.preventDefault(),o.dragging=!0,!0});const o=this;function i(t){if(!o.dragging)return;const s=o.margin,n=o.root.getBoundingClientRect();let i=new e.vec2;i.set(t.x-n.x-.5*o.size[0],t.y-n.y-.5*o.size[1]);var a=o.currentPosition;if(a.set(e.clamp(i.x/(.5*o.size[0]-s),-1,1),e.clamp(i.y/(.5*o.size[1]-s),-1,1)),o.circular){const t=new e.vec2(0,0);a.dst(t)>1&&(a=a.nrm())}return o.renderToCanvas(o.canvas.getContext("2d",{willReadFrequently:!0}),o.canvas),o.computeWeights(a),o.callback&&o.callback(o.weightsObj,o.weights,a),!0}function a(e){o.dragging=!1;var t=o.root.ownerDocument;t.removeEventListener("mouseup",a),t.removeEventListener("mousemove",i)}this.canvas=document.createElement("canvas"),this.canvas.width=this.size[0],this.canvas.height=this.size[1],this.root.appendChild(this.canvas);const l=this.canvas.getContext("2d",{willReadFrequently:!0});this.renderToCanvas(l,this.canvas)}computeWeights(t){if(!this.points.length)return;let s=this._precomputedWeights;s&&!this._valuesChanged||(s=this.precomputeWeights());let n=this.weights;n.length=this.points.length;for(var o=0;o<n.length;++o)n[o]=0;const i=d.GRID_SIZE;let a=0,l=new e.vec2;for(var r=0;r<i;++r)for(var c=0;c<i;++c){l.set(c/i*2-1,r/i*2-1);var h=2*c+r*i*2,u=s[h];t.dst(l)<s[h+1]+.001&&(n[u]+=1,a++)}for(o=0;o<n.length;++o)n[o]/=a,this.weightsObj[this.points[o].name]=n[o];return n}precomputeWeights(){this._valuesChanged=!1;const t=this.points.length,s=d.GRID_SIZE,n=2*s*s;let o=new e.vec2;this._precomputedWeights&&this._precomputedWeights.length==n||(this._precomputedWeights=new Float32Array(n));let i=this._precomputedWeights;this._precomputedWeightsGridSize=s;for(let n=0;n<s;++n)for(let a=0;a<s;++a){let l=-1,r=1e5;for(let i=0;i<t;++i){o.set(a/s*2-1,n/s*2-1);let t=new e.vec2;t.fromArray(this.points[i].pos);let c=o.dst(t);c>r||(l=i,r=c)}i[2*a+2*n*s]=l,i[2*a+2*n*s+1]=r}return i}precomputeWeightsToImage(t){if(!this.points.length)return null;const s=d.GRID_SIZE;var n=this._precomputedWeights;n&&!this._valuesChanged&&this._precomputedWeightsGridSize==s||(n=this.precomputeWeights());var o=this.imageCanvas;o||(o=this.imageCanvas=document.createElement("canvas")),o.width=o.height=s;var i=o.getContext("2d",{willReadFrequently:!0}),a=this.weights;a.length=this.points.length;for(var l=0;l<a.length;++l)a[l]=0;let r=0,c=i.getImageData(0,0,s,s),h=new e.vec2;for(var u=0;u<s;++u)for(var p=0;p<s;++p){h.set(p/s*2-1,u/s*2-1);const e=4*p+u*s*4,o=2*p+u*s*2,i=n[o],l=d.COLORS[i%d.COLORS.length];var m=t.dst(h)<n[o+1]+.001;m&&(a[i]+=1,r++),c.data[e]=l[0]+(m?128:0),c.data[e+1]=l[1]+(m?128:0),c.data[e+2]=l[2]+(m?128:0),c.data[e+3]=255}for(let e=0;e<a.length;++e)a[e]/=r;return i.putImageData(c,0,0),o}addPoint(t,s){if(this.findPoint(t))return void console.warn("CanvasMap2D.addPoint: There is already a point with that name");s||(s=[this.currentPosition[0],this.currentPosition[1]]),s[0]=e.clamp(s[0],-1,1),s[1]=e.clamp(s[1],-1,1);const n={name:t,pos:s};return this.points.push(n),this._valuesChanged=!0,n}removePoint(e){const t=this.points.findIndex(t=>t.name==e);t>-1&&(this.points.splice(t,1),this._valuesChanged=!0)}findPoint(e){return this.points.find(t=>t.name==e)}clear(){this.points.length=0,this._precomputedWeights=null,this._canvas=null,this._selectedPoint=null}renderToCanvas(t,s){const n=this.margin,o=this.size[0],i=this.size[1];t.fillStyle="black",t.strokeStyle="#BBB",t.clearRect(0,0,o,i),this.circular?(this.circleCenter[0]=.5*o,this.circleCenter[1]=.5*i,this.circleRadius=.5*i-n,t.lineWidth=1,t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.fill(),t.stroke(),t.beginPath(),t.moveTo(this.circleCenter[0]+.5,this.circleCenter[1]-this.circleRadius),t.lineTo(this.circleCenter[0]+.5,this.circleCenter[1]+this.circleRadius),t.moveTo(this.circleCenter[0]-this.circleRadius,this.circleCenter[1]),t.lineTo(this.circleCenter[0]+this.circleRadius,this.circleCenter[1]),t.stroke()):(t.fillRect(n,n,o-2*n,i-2*n),t.strokeRect(n,n,o-2*n,i-2*n));var a=this.precomputeWeightsToImage(this.currentPosition);a&&(t.globalAlpha=.5,t.imageSmoothingEnabled=!1,this.circular?(t.save(),t.beginPath(),t.arc(this.circleCenter[0],this.circleCenter[1],this.circleRadius,0,2*Math.PI),t.clip(),t.drawImage(a,this.circleCenter[0]-this.circleRadius,this.circleCenter[1]-this.circleRadius,2*this.circleRadius,2*this.circleRadius),t.restore()):t.drawImage(a,n,n,o-2*n,i-2*n),t.imageSmoothingEnabled=!0,t.globalAlpha=1);for(let s=0;s<this.points.length;++s){const a=this.points[s];let l=.5*a.pos[0]+.5,r=.5*a.pos[1]+.5;l=l*(o-2*n)+n,r=r*(i-2*n)+n,l=e.clamp(l,n,o-n),r=e.clamp(r,n,i-n),t.fillStyle=a==this._selectedPoint?"#CDF":"#BCD",t.beginPath(),t.arc(l,r,3,0,2*Math.PI),t.fill(),this.showNames&&t.fillText(a.name,l+5,r+5)}t.fillStyle="white",t.beginPath();var l=.5*this.currentPosition.x+.5,r=.5*this.currentPosition.y+.5;l=l*(o-2*n)+n,r=r*(i-2*n)+n,l=e.clamp(l,n,o-n),r=e.clamp(r,n,i-n),t.arc(l,r,4,0,2*Math.PI),t.fill()}}e.CanvasMap2D=d;e.Skeleton=class{constructor(t){if(this.root=e.makeContainer(["auto","auto"],"flex flex-row lexskeleton"),t.constructor===String)this.root.innerHTML=t;else{t=[].concat(t);for(let e of t)this.root.appendChild(e)}}destroy(){this.root.dataset.closed=!0,e.doAsync(()=>{this.root.remove(),this.root=null},200)}},Object.defineProperty(String.prototype,"lastChar",{get:function(){return this[this.length-1]},enumerable:!0,configurable:!0}),Element.prototype.insertChildAtIndex=function(e,t=1/0){t>=this.children.length?this.appendChild(e):this.insertBefore(e,this.children[t])},Element.prototype.hasClass=function(e){return!!(e=[].concat(e)).filter(e=>this.classList.contains(e)).length},Element.prototype.addClass=function(e){e&&this.classList.add(e)},Element.prototype.getComputedSize=function(){return{width:this.offsetWidth,height:this.offsetHeight}},Element.prototype.getParentArea=function(){let e=this.parentElement;for(;e;){if(e.classList.contains("lexarea"))return e;e=e.parentElement}},Element.prototype.listen=function(e,t,s){this[s=s??"_on"+e]=t,this.addEventListener(e,t)},Element.prototype.ignore=function(e,t){const s=this[t=t??"_on"+e];this.removeEventListener(e,s)};const h={Abc:[24,24,[],"regular","M17 15q-.425 0-.712-.288T16 14v-4q0-.425.288-.712T17 9h3q.425 0 .713.288T21 10v1h-1.5v-.5h-2v3h2V13H21v1q0 .425-.288.713T20 15zm-7.5 0V9h4q.425 0 .713.288T14.5 10v1q0 .425-.288.713T13.5 12q.425 0 .713.288T14.5 13v1q0 .425-.288.713T13.5 15zm1.5-3.75h2v-.75h-2zm0 2.25h2v-.75h-2zM3 15v-5q0-.425.288-.712T4 9h3q.425 0 .713.288T8 10v5H6.5v-1.5h-2V15zm1.5-3h2v-1.5h-2z"],Clone:[512,512,[],"regular","M64 464l224 0c8.8 0 16-7.2 16-16l0-64 48 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 224c0-35.3 28.7-64 64-64l64 0 0 48-64 0c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zM224 304l224 0c8.8 0 16-7.2 16-16l0-224c0-8.8-7.2-16-16-16L224 48c-8.8 0-16 7.2-16 16l0 224c0 8.8 7.2 16 16 16zm-64-16l0-224c0-35.3 28.7-64 64-64L448 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-224 0c-35.3 0-64-28.7-64-64z"],IdBadge:[384,512,[],"regular","M256 48l0 16c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32-14.3-32-32l0-16L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-384c0-8.8-7.2-16-16-16l-64 0zM0 64C0 28.7 28.7 0 64 0L320 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zM160 320l64 0c44.2 0 80 35.8 80 80c0 8.8-7.2 16-16 16L96 416c-8.8 0-16-7.2-16-16c0-44.2 35.8-80 80-80zm-32-96a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"],Paste:[512,512,[],"regular","M104.6 48L64 48C28.7 48 0 76.7 0 112L0 384c0 35.3 28.7 64 64 64l96 0 0-48-96 0c-8.8 0-16-7.2-16-16l0-272c0-8.8 7.2-16 16-16l16 0c0 17.7 14.3 32 32 32l72.4 0C202 108.4 227.6 96 256 96l62 0c-7.1-27.6-32.2-48-62-48l-40.6 0C211.6 20.9 188.2 0 160 0s-51.6 20.9-55.4 48zM144 56a16 16 0 1 1 32 0 16 16 0 1 1 -32 0zM448 464l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L464 243.9 464 448c0 8.8-7.2 16-16 16zM256 512l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9l-67.9-67.9c-9-9-21.2-14.1-33.9-14.1L256 128c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64z"],Trash3:[448,512,[],"regular","M170.5 51.6L151.5 80l145 0-19-28.4c-1.5-2.2-4-3.6-6.7-3.6l-93.7 0c-2.7 0-5.2 1.3-6.7 3.6zm147-26.6L354.2 80 368 80l48 0 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 304c0 44.2-35.8 80-80 80l-224 0c-44.2 0-80-35.8-80-80l0-304-8 0c-13.3 0-24-10.7-24-24S10.7 80 24 80l8 0 48 0 13.8 0 36.7-55.1C140.9 9.4 158.4 0 177.1 0l93.7 0c18.7 0 36.2 9.4 46.6 24.9zM80 128l0 304c0 17.7 14.3 32 32 32l224 0c17.7 0 32-14.3 32-32l0-304L80 128zm80 64l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16zm80 0l0 208c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-208c0-8.8 7.2-16 16-16s16 7.2 16 16z"],FilePdf:[512,512,[],"regular","M64 464l48 0 0 48-48 0c-35.3 0-64-28.7-64-64L0 64C0 28.7 28.7 0 64 0L229.5 0c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3L384 304l-48 0 0-144-80 0c-17.7 0-32-14.3-32-32l0-80L64 48c-8.8 0-16 7.2-16 16l0 384c0 8.8 7.2 16 16 16zM176 352l32 0c30.9 0 56 25.1 56 56s-25.1 56-56 56l-16 0 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-80c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24l-16 0 0 48 16 0zm96-80l32 0c26.5 0 48 21.5 48 48l0 64c0 26.5-21.5 48-48 48l-32 0c-8.8 0-16-7.2-16-16l0-128c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16l0-64c0-8.8-7.2-16-16-16l-16 0 0 96 16 0zm80-112c0-8.8 7.2-16 16-16l48 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 32 32 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-32 0 0 48c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-64 0-64z"],FileWord:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm55 241.1c-3.8-12.7-17.2-19.9-29.9-16.1s-19.9 17.2-16.1 29.9l48 160c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l25-83.4 25 83.4c3 10.2 12.4 17.1 23 17.1s19.9-7 23-17.1l48-160c3.8-12.7-3.4-26.1-16.1-29.9s-26.1 3.4-29.9 16.1l-25 83.4-25-83.4c-3-10.2-12.4-17.1-23-17.1s-19.9 7-23 17.1l-25 83.4-25-83.4z"],FilePowerpoint:[384,512,[],"regular","M64 464c-8.8 0-16-7.2-16-16L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm72 208c-13.3 0-24 10.7-24 24l0 104 0 56c0 13.3 10.7 24 24 24s24-10.7 24-24l0-32 44 0c42 0 76-34 76-76s-34-76-76-76l-68 0zm68 104l-44 0 0-56 44 0c15.5 0 28 12.5 28 28s-12.5 28-28 28z"],FileExcel:[384,512,[],"regular","M48 448L48 64c0-8.8 7.2-16 16-16l160 0 0 80c0 17.7 14.3 32 32 32l80 0 0 288c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16zM64 0C28.7 0 0 28.7 0 64L0 448c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-293.5c0-17-6.7-33.3-18.7-45.3L274.7 18.7C262.7 6.7 246.5 0 229.5 0L64 0zm90.9 233.3c-8.1-10.5-23.2-12.3-33.7-4.2s-12.3 23.2-4.2 33.7L161.6 320l-44.5 57.3c-8.1 10.5-6.3 25.5 4.2 33.7s25.5 6.3 33.7-4.2L192 359.1l37.1 47.6c8.1 10.5 23.2 12.3 33.7 4.2s12.3-23.2 4.2-33.7L222.4 320l44.5-57.3c8.1-10.5 6.3-25.5-4.2-33.7s-25.5-6.3-33.7 4.2L192 280.9l-37.1-47.6z"],Settings3:[640,512,[],"solid","M308.5 135.3c7.1-6.3 9.9-16.2 6.2-25c-2.3-5.3-4.8-10.5-7.6-15.5L304 89.4c-3-5-6.3-9.9-9.8-14.6c-5.7-7.6-15.7-10.1-24.7-7.1l-28.2 9.3c-10.7-8.8-23-16-36.2-20.9L199 27.1c-1.9-9.3-9.1-16.7-18.5-17.8C173.9 8.4 167.2 8 160.4 8l-.7 0c-6.8 0-13.5 .4-20.1 1.2c-9.4 1.1-16.6 8.6-18.5 17.8L115 56.1c-13.3 5-25.5 12.1-36.2 20.9L50.5 67.8c-9-3-19-.5-24.7 7.1c-3.5 4.7-6.8 9.6-9.9 14.6l-3 5.3c-2.8 5-5.3 10.2-7.6 15.6c-3.7 8.7-.9 18.6 6.2 25l22.2 19.8C32.6 161.9 32 168.9 32 176s.6 14.1 1.7 20.9L11.5 216.7c-7.1 6.3-9.9 16.2-6.2 25c2.3 5.3 4.8 10.5 7.6 15.6l3 5.2c3 5.1 6.3 9.9 9.9 14.6c5.7 7.6 15.7 10.1 24.7 7.1l28.2-9.3c10.7 8.8 23 16 36.2 20.9l6.1 29.1c1.9 9.3 9.1 16.7 18.5 17.8c6.7 .8 13.5 1.2 20.4 1.2s13.7-.4 20.4-1.2c9.4-1.1 16.6-8.6 18.5-17.8l6.1-29.1c13.3-5 25.5-12.1 36.2-20.9l28.2 9.3c9 3 19 .5 24.7-7.1c3.5-4.7 6.8-9.5 9.8-14.6l3.1-5.4c2.8-5 5.3-10.2 7.6-15.5c3.7-8.7 .9-18.6-6.2-25l-22.2-19.8c1.1-6.8 1.7-13.8 1.7-20.9s-.6-14.1-1.7-20.9l22.2-19.8zM112 176a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zM504.7 500.5c6.3 7.1 16.2 9.9 25 6.2c5.3-2.3 10.5-4.8 15.5-7.6l5.4-3.1c5-3 9.9-6.3 14.6-9.8c7.6-5.7 10.1-15.7 7.1-24.7l-9.3-28.2c8.8-10.7 16-23 20.9-36.2l29.1-6.1c9.3-1.9 16.7-9.1 17.8-18.5c.8-6.7 1.2-13.5 1.2-20.4s-.4-13.7-1.2-20.4c-1.1-9.4-8.6-16.6-17.8-18.5L583.9 307c-5-13.3-12.1-25.5-20.9-36.2l9.3-28.2c3-9 .5-19-7.1-24.7c-4.7-3.5-9.6-6.8-14.6-9.9l-5.3-3c-5-2.8-10.2-5.3-15.6-7.6c-8.7-3.7-18.6-.9-25 6.2l-19.8 22.2c-6.8-1.1-13.8-1.7-20.9-1.7s-14.1 .6-20.9 1.7l-19.8-22.2c-6.3-7.1-16.2-9.9-25-6.2c-5.3 2.3-10.5 4.8-15.6 7.6l-5.2 3c-5.1 3-9.9 6.3-14.6 9.9c-7.6 5.7-10.1 15.7-7.1 24.7l9.3 28.2c-8.8 10.7-16 23-20.9 36.2L315.1 313c-9.3 1.9-16.7 9.1-17.8 18.5c-.8 6.7-1.2 13.5-1.2 20.4s.4 13.7 1.2 20.4c1.1 9.4 8.6 16.6 17.8 18.5l29.1 6.1c5 13.3 12.1 25.5 20.9 36.2l-9.3 28.2c-3 9-.5 19 7.1 24.7c4.7 3.5 9.5 6.8 14.6 9.8l5.4 3.1c5 2.8 10.2 5.3 15.5 7.6c8.7 3.7 18.6 .9 25-6.2l19.8-22.2c6.8 1.1 13.8 1.7 20.9 1.7s14.1-.6 20.9-1.7l19.8 22.2zM464 304a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"],MessagesCircle:[640,512,[],"regular","M88.2 309.1c9.8-18.3 6.8-40.8-7.5-55.8C59.4 230.9 48 204 48 176c0-63.5 63.8-128 160-128s160 64.5 160 128s-63.8 128-160 128c-13.1 0-25.8-1.3-37.8-3.6c-10.4-2-21.2-.6-30.7 4.2c-4.1 2.1-8.3 4.1-12.6 6c-16 7.2-32.9 13.5-49.9 18c2.8-4.6 5.4-9.1 7.9-13.6c1.1-1.9 2.2-3.9 3.2-5.9zM208 352c114.9 0 208-78.8 208-176S322.9 0 208 0S0 78.8 0 176c0 41.8 17.2 80.1 45.9 110.3c-.9 1.7-1.9 3.5-2.8 5.1c-10.3 18.4-22.3 36.5-36.6 52.1c-6.6 7-8.3 17.2-4.6 25.9C5.8 378.3 14.4 384 24 384c43 0 86.5-13.3 122.7-29.7c4.8-2.2 9.6-4.5 14.2-6.8c15.1 3 30.9 4.5 47.1 4.5zM432 480c16.2 0 31.9-1.6 47.1-4.5c4.6 2.3 9.4 4.6 14.2 6.8C529.5 498.7 573 512 616 512c9.6 0 18.2-5.7 22-14.5c3.8-8.8 2-19-4.6-25.9c-14.2-15.6-26.2-33.7-36.6-52.1c-.9-1.7-1.9-3.4-2.8-5.1C622.8 384.1 640 345.8 640 304c0-94.4-87.9-171.5-198.2-175.8c4.1 15.2 6.2 31.2 6.2 47.8l0 .6c87.2 6.7 144 67.5 144 127.4c0 28-11.4 54.9-32.7 77.2c-14.3 15-17.3 37.6-7.5 55.8c1.1 2 2.2 4 3.2 5.9c2.5 4.5 5.2 9 7.9 13.6c-17-4.5-33.9-10.7-49.9-18c-4.3-1.9-8.5-3.9-12.6-6c-9.5-4.8-20.3-6.2-30.7-4.2c-12.1 2.4-24.8 3.6-37.8 3.6c-61.7 0-110-26.5-136.8-62.3c-16 5.4-32.8 9.4-50 11.8C279 439.8 350 480 432 480z"],LinkOff:[640,512,["ChainBroken","ChainOff","Unlink"],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L489.3 358.2l90.5-90.5c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114l-96 96-31.9-25C430.9 239.6 420.1 175.1 377 132c-52.2-52.3-134.5-56.2-191.3-11.7L38.8 5.1zM239 162c30.1-14.9 67.7-9.9 92.8 15.3c20 20 27.5 48.3 21.7 74.5L239 162zM406.6 416.4L220.9 270c-2.1 39.8 12.2 80.1 42.2 110c38.9 38.9 94.4 51 143.6 36.3zm-290-228.5L60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5l61.8-61.8-50.6-39.9z"],StreetView:[512,512,[],"solid","M320 64A64 64 0 1 0 192 64a64 64 0 1 0 128 0zm-96 96c-35.3 0-64 28.7-64 64l0 48c0 17.7 14.3 32 32 32l1.8 0 11.1 99.5c1.8 16.2 15.5 28.5 31.8 28.5l38.7 0c16.3 0 30-12.3 31.8-28.5L318.2 304l1.8 0c17.7 0 32-14.3 32-32l0-48c0-35.3-28.7-64-64-64l-64 0zM132.3 394.2c13-2.4 21.7-14.9 19.3-27.9s-14.9-21.7-27.9-19.3c-32.4 5.9-60.9 14.2-82 24.8c-10.5 5.3-20.3 11.7-27.8 19.6C6.4 399.5 0 410.5 0 424c0 21.4 15.5 36.1 29.1 45c14.7 9.6 34.3 17.3 56.4 23.4C130.2 504.7 190.4 512 256 512s125.8-7.3 170.4-19.6c22.1-6.1 41.8-13.8 56.4-23.4c13.7-8.9 29.1-23.6 29.1-45c0-13.5-6.4-24.5-14-32.6c-7.5-7.9-17.3-14.3-27.8-19.6c-21-10.6-49.5-18.9-82-24.8c-13-2.4-25.5 6.3-27.9 19.3s6.3 25.5 19.3 27.9c30.2 5.5 53.7 12.8 69 20.5c3.2 1.6 5.8 3.1 7.9 4.5c3.6 2.4 3.6 7.2 0 9.6c-8.8 5.7-23.1 11.8-43 17.3C374.3 457 318.5 464 256 464s-118.3-7-157.7-17.9c-19.9-5.5-34.2-11.6-43-17.3c-3.6-2.4-3.6-7.2 0-9.6c2.1-1.4 4.8-2.9 7.9-4.5c15.3-7.7 38.8-14.9 69-20.5z"],ClosedCaptioning:[576,512,["CC"],"regular","M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM200 208c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48s21.5-48 48-48zm144 48c0-26.5 21.5-48 48-48c14.2 0 27 6.1 35.8 16c8.8 9.9 24 10.7 33.9 1.9s10.7-24 1.9-33.9c-17.5-19.6-43.1-32-71.5-32c-53 0-96 43-96 96s43 96 96 96c28.4 0 54-12.4 71.5-32c8.8-9.9 8-25-1.9-33.9s-25-8-33.9 1.9c-8.8 9.9-21.6 16-35.8 16c-26.5 0-48-21.5-48-48z"],ChildReaching:[384,512,[],"solid","M256 64A64 64 0 1 0 128 64a64 64 0 1 0 128 0zM152.9 169.3c-23.7-8.4-44.5-24.3-58.8-45.8L74.6 94.2C64.8 79.5 45 75.6 30.2 85.4s-18.7 29.7-8.9 44.4L40.9 159c18.1 27.1 42.8 48.4 71.1 62.4L112 480c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96 32 0 0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-258.4c29.1-14.2 54.4-36.2 72.7-64.2l18.2-27.9c9.6-14.8 5.4-34.6-9.4-44.3s-34.6-5.5-44.3 9.4L291 122.4c-21.8 33.4-58.9 53.6-98.8 53.6c-12.6 0-24.9-2-36.6-5.8c-.9-.3-1.8-.7-2.7-.9z"],HourglassHalf:[384,512,[],"regular","M0 24C0 10.7 10.7 0 24 0L360 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-8 0 0 19c0 40.3-16 79-44.5 107.5L225.9 256l81.5 81.5C336 366 352 404.7 352 445l0 19 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24L24 512c-13.3 0-24-10.7-24-24s10.7-24 24-24l8 0 0-19c0-40.3 16-79 44.5-107.5L158.1 256 76.5 174.5C48 146 32 107.3 32 67l0-19-8 0C10.7 48 0 37.3 0 24zM110.5 371.5c-3.9 3.9-7.5 8.1-10.7 12.5l184.4 0c-3.2-4.4-6.8-8.6-10.7-12.5L192 289.9l-81.5 81.5zM284.2 128C297 110.4 304 89 304 67l0-19L80 48l0 19c0 22.1 7 43.4 19.8 61l184.4 0z"],PaperPlane:[512,512,[],"regular","M16.1 260.2c-22.6 12.9-20.5 47.3 3.6 57.3L160 376l0 103.3c0 18.1 14.6 32.7 32.7 32.7c9.7 0 18.9-4.3 25.1-11.8l62-74.3 123.9 51.6c18.9 7.9 40.8-4.5 43.9-24.7l64-416c1.9-12.1-3.4-24.3-13.5-31.2s-23.3-7.5-34-1.4l-448 256zm52.1 25.5L409.7 90.6 190.1 336l1.2 1L68.2 285.7zM403.3 425.4L236.7 355.9 450.8 116.6 403.3 425.4z"],Axis3DArrows:[24,24,[],"solid","m12 2l4 4h-3v7.85l6.53 3.76L21 15.03l1.5 5.47l-5.5 1.46l1.53-2.61L12 15.58l-6.53 3.77L7 21.96L1.5 20.5L3 15.03l1.47 2.58L11 13.85V6H8z"],PersonWalkingDashedLineArrowRight:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80zM392 0c-13.3 0-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48c0-13.3-10.7-24-24-24zm24 152c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16zM392 320c-13.3 0-24 10.7-24 24l0 16c0 13.3 10.7 24 24 24s24-10.7 24-24l0-16c0-13.3-10.7-24-24-24zm24 120c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 48c0 13.3 10.7 24 24 24s24-10.7 24-24l0-48z"],PersonWalkingArrowLoopLeft:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zm347.7 119c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L461.3 384l18.7 0c88.4 0 160-71.6 160-160s-71.6-160-160-160L352 64c-17.7 0-32 14.3-32 32s14.3 32 32 32l128 0c53 0 96 43 96 96s-43 96-96 96l-18.7 0 25.4-25.4c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0l-80 80c-12.5 12.5-12.5 32.8 0 45.3l80 80z"],PersonWalkingArrowRight:[640,512,[],"solid","M208 96a48 48 0 1 0 0-96 48 48 0 1 0 0 96zM123.7 200.5c1-.4 1.9-.8 2.9-1.2l-16.9 63.5c-5.6 21.1-.1 43.6 14.7 59.7l70.7 77.1 22 88.1c4.3 17.1 21.7 27.6 38.8 23.3s27.6-21.7 23.3-38.8l-23-92.1c-1.9-7.8-5.8-14.9-11.2-20.8l-49.5-54 19.3-65.5 9.6 23c4.4 10.6 12.5 19.3 22.8 24.5l26.7 13.3c15.8 7.9 35 1.5 42.9-14.3s1.5-35-14.3-42.9L281 232.7l-15.3-36.8C248.5 154.8 208.3 128 163.7 128c-22.8 0-45.3 4.8-66.1 14l-8 3.5c-32.9 14.6-58.1 42.4-69.4 76.5l-2.6 7.8c-5.6 16.8 3.5 34.9 20.2 40.5s34.9-3.5 40.5-20.2l2.6-7.8c5.7-17.1 18.3-30.9 34.7-38.2l8-3.5zm-30 135.1L68.7 398 9.4 457.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0L116.3 441c4.6-4.6 8.2-10.1 10.6-16.1l14.5-36.2-40.7-44.4c-2.5-2.7-4.8-5.6-7-8.6zM550.6 153.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L530.7 224 384 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l146.7 0-25.4 25.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l80-80c12.5-12.5 12.5-32.8 0-45.3l-80-80z"],ClapperboardClosed:[512,512,[],"solid","M448 32l-86.1 0-1 1-127 127 92.1 0 1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128l0-64c0-15.1-5.3-29.1-14-40l-104 104L512 160zM294.1 32l-92.1 0-1 1L73.9 160l92.1 0 1-1 127-127zM64 32C28.7 32 0 60.7 0 96l0 64 6.1 0 1-1 127-127L64 32zM512 192L0 192 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-224z"],UserOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L381.9 274c48.5-23.2 82.1-72.7 82.1-130C464 64.5 399.5 0 320 0C250.4 0 192.4 49.3 178.9 114.9L38.8 5.1zM545.5 512L528 512 284.3 320l-59 0C136.2 320 64 392.2 64 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0 .3 0z"],PhotoFilm:[640,512,["Media"],"solid","M256 0L576 0c35.3 0 64 28.7 64 64l0 224c0 35.3-28.7 64-64 64l-320 0c-35.3 0-64-28.7-64-64l0-224c0-35.3 28.7-64 64-64zM476 106.7C471.5 100 464 96 456 96s-15.5 4-20 10.7l-56 84L362.7 169c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6l80 0 48 0 144 0c8.9 0 17-4.9 21.2-12.7s3.7-17.3-1.2-24.6l-96-144zM336 96a32 32 0 1 0 -64 0 32 32 0 1 0 64 0zM64 128l96 0 0 256 0 32c0 17.7 14.3 32 32 32l128 0c17.7 0 32-14.3 32-32l0-32 160 0 0 64c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64zm8 64c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm0 104c-8.8 0-16 7.2-16 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0zm336 16l0 16c0 8.8 7.2 16 16 16l16 0c8.8 0 16-7.2 16-16l0-16c0-8.8-7.2-16-16-16l-16 0c-8.8 0-16 7.2-16 16z"],Chart:[448,512,[],"solid","M160 80c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 352c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-352zM0 272c0-26.5 21.5-48 48-48l32 0c26.5 0 48 21.5 48 48l0 160c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48L0 272zM368 96l32 0c26.5 0 48 21.5 48 48l0 288c0 26.5-21.5 48-48 48l-32 0c-26.5 0-48-21.5-48-48l0-288c0-26.5 21.5-48 48-48z"],HandsAslInterpreting:[640,512,["ASL"],"solid","M156.6 46.3c7.9-15.8 1.5-35-14.3-42.9s-35-1.5-42.9 14.3L13.5 189.4C4.6 207.2 0 226.8 0 246.7L0 256c0 70.7 57.3 128 128 128l72 0 8 0 0-.3c35.2-2.7 65.4-22.8 82.1-51.7c8.8-15.3 3.6-34.9-11.7-43.7s-34.9-3.6-43.7 11.7c-7 12-19.9 20-34.7 20c-22.1 0-40-17.9-40-40s17.9-40 40-40c14.8 0 27.7 8 34.7 20c8.8 15.3 28.4 20.5 43.7 11.7s20.5-28.4 11.7-43.7c-12.8-22.1-33.6-39.1-58.4-47.1l80.8-22c17-4.6 27.1-22.2 22.5-39.3s-22.2-27.1-39.3-22.5L194.9 124.6l81.6-68c13.6-11.3 15.4-31.5 4.1-45.1S249.1-3.9 235.5 7.4L133.6 92.3l23-46zM483.4 465.7c-7.9 15.8-1.5 35 14.3 42.9s35 1.5 42.9-14.3l85.9-171.7c8.9-17.8 13.5-37.4 13.5-57.2l0-9.3c0-70.7-57.3-128-128-128l-72 0-8 0 0 .3c-35.2 2.7-65.4 22.8-82.1 51.7c-8.9 15.3-3.6 34.9 11.7 43.7s34.9 3.6 43.7-11.7c7-12 19.9-20 34.7-20c22.1 0 40 17.9 40 40s-17.9 40-40 40c-14.8 0-27.7-8-34.7-20c-8.9-15.3-28.4-20.5-43.7-11.7s-20.5 28.4-11.7 43.7c12.8 22.1 33.6 39.1 58.4 47.1l-80.8 22c-17.1 4.7-27.1 22.2-22.5 39.3s22.2 27.1 39.3 22.5l100.7-27.5-81.6 68c-13.6 11.3-15.4 31.5-4.1 45.1s31.5 15.4 45.1 4.1l101.9-84.9-23 46z"],HandPointRight:[512,512,[],"regular","M448 128l-177.6 0c1 5.2 1.6 10.5 1.6 16l0 16 32 0 144 0c8.8 0 16-7.2 16-16s-7.2-16-16-16zM224 144c0-17.7-14.3-32-32-32c0 0 0 0 0 0l-24 0c-66.3 0-120 53.7-120 120l0 48c0 52.5 33.7 97.1 80.7 113.4c-.5-3.1-.7-6.2-.7-9.4c0-20 9.2-37.9 23.6-49.7c-4.9-9-7.6-19.4-7.6-30.3c0-15.1 5.3-29 14-40c-8.8-11-14-24.9-14-40l0-40c0-13.3 10.7-24 24-24s24 10.7 24 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-40 0-40zM192 64s0 0 0 0c18 0 34.6 6 48 16l208 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-82 0c1.3 5.1 2 10.5 2 16c0 25.3-14.7 47.2-36 57.6c2.6 7 4 14.5 4 22.4c0 20-9.2 37.9-23.6 49.7c4.9 9 7.6 19.4 7.6 30.3c0 35.3-28.7 64-64 64l-64 0-24 0C75.2 448 0 372.8 0 280l0-48C0 139.2 75.2 64 168 64l24 0zm64 336c8.8 0 16-7.2 16-16s-7.2-16-16-16l-48 0-16 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l64 0zm16-176c0 5.5-.7 10.9-2 16l2 0 32 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-32 0 0 16zm-24 64l-40 0c-8.8 0-16 7.2-16 16s7.2 16 16 16l48 0 16 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-24 0z"],HandPointUp:[384,512,[],"regular","M64 64l0 177.6c5.2-1 10.5-1.6 16-1.6l16 0 0-32L96 64c0-8.8-7.2-16-16-16s-16 7.2-16 16zM80 288c-17.7 0-32 14.3-32 32c0 0 0 0 0 0l0 24c0 66.3 53.7 120 120 120l48 0c52.5 0 97.1-33.7 113.4-80.7c-3.1 .5-6.2 .7-9.4 .7c-20 0-37.9-9.2-49.7-23.6c-9 4.9-19.4 7.6-30.3 7.6c-15.1 0-29-5.3-40-14c-11 8.8-24.9 14-40 14l-40 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l40 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-40 0-40 0zM0 320s0 0 0 0c0-18 6-34.6 16-48L16 64C16 28.7 44.7 0 80 0s64 28.7 64 64l0 82c5.1-1.3 10.5-2 16-2c25.3 0 47.2 14.7 57.6 36c7-2.6 14.5-4 22.4-4c20 0 37.9 9.2 49.7 23.6c9-4.9 19.4-7.6 30.3-7.6c35.3 0 64 28.7 64 64l0 64 0 24c0 92.8-75.2 168-168 168l-48 0C75.2 512 0 436.8 0 344l0-24zm336-64c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 48 0 16c0 8.8 7.2 16 16 16s16-7.2 16-16l0-64zM160 240c5.5 0 10.9 .7 16 2l0-2 0-32c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 32 16 0zm64 24l0 40c0 8.8 7.2 16 16 16s16-7.2 16-16l0-48 0-16c0-8.8-7.2-16-16-16s-16 7.2-16 16l0 24z"],HandPointDown:[384,512,[],"regular","M64 448l0-177.6c5.2 1 10.5 1.6 16 1.6l16 0 0 32 0 144c0 8.8-7.2 16-16 16s-16-7.2-16-16zM80 224c-17.7 0-32-14.3-32-32c0 0 0 0 0 0l0-24c0-66.3 53.7-120 120-120l48 0c52.5 0 97.1 33.7 113.4 80.7c-3.1-.5-6.2-.7-9.4-.7c-20 0-37.9 9.2-49.7 23.6c-9-4.9-19.4-7.6-30.3-7.6c-15.1 0-29 5.3-40 14c-11-8.8-24.9-14-40-14l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0-40 0zM0 192s0 0 0 0c0 18 6 34.6 16 48l0 208c0 35.3 28.7 64 64 64s64-28.7 64-64l0-82c5.1 1.3 10.5 2 16 2c25.3 0 47.2-14.7 57.6-36c7 2.6 14.5 4 22.4 4c20 0 37.9-9.2 49.7-23.6c9 4.9 19.4 7.6 30.3 7.6c35.3 0 64-28.7 64-64l0-64 0-24C384 75.2 308.8 0 216 0L168 0C75.2 0 0 75.2 0 168l0 24zm336 64c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 64zM160 272c5.5 0 10.9-.7 16-2l0 2 0 32c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 16 0zm64-24l0-40c0-8.8 7.2-16 16-16s16 7.2 16 16l0 48 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-24z"],HandPointLeft:[512,512,[],"regular","M64 128l177.6 0c-1 5.2-1.6 10.5-1.6 16l0 16-32 0L64 160c-8.8 0-16-7.2-16-16s7.2-16 16-16zm224 16c0-17.7 14.3-32 32-32c0 0 0 0 0 0l24 0c66.3 0 120 53.7 120 120l0 48c0 52.5-33.7 97.1-80.7 113.4c.5-3.1 .7-6.2 .7-9.4c0-20-9.2-37.9-23.6-49.7c4.9-9 7.6-19.4 7.6-30.3c0-15.1-5.3-29-14-40c8.8-11 14-24.9 14-40l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-40 0-40zm32-80s0 0 0 0c-18 0-34.6 6-48 16L64 80C28.7 80 0 108.7 0 144s28.7 64 64 64l82 0c-1.3 5.1-2 10.5-2 16c0 25.3 14.7 47.2 36 57.6c-2.6 7-4 14.5-4 22.4c0 20 9.2 37.9 23.6 49.7c-4.9 9-7.6 19.4-7.6 30.3c0 35.3 28.7 64 64 64l64 0 24 0c92.8 0 168-75.2 168-168l0-48c0-92.8-75.2-168-168-168l-24 0zM256 400c-8.8 0-16-7.2-16-16s7.2-16 16-16l48 0 16 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-64 0zM240 224c0 5.5 .7 10.9 2 16l-2 0-32 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l32 0 0 16zm24 64l40 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48 0-16 0c-8.8 0-16-7.2-16-16s7.2-16 16-16l24 0z"],HandScissors:[512,512,[],"regular","M.2 276.3c-1.2-35.3 26.4-65 61.7-66.2l3.3-.1L57 208.1C22.5 200.5 .7 166.3 8.3 131.8S50.2 75.5 84.7 83.2l173 38.3c2.3-2.9 4.7-5.7 7.1-8.5l18.4-20.3C299.9 74.5 323.5 64 348.3 64l10.2 0c54.1 0 104.1 28.7 131.3 75.4l1.5 2.6c13.6 23.2 20.7 49.7 20.7 76.6L512 344c0 66.3-53.7 120-120 120l-8 0-96 0c-35.3 0-64-28.7-64-64c0-2.8 .2-5.6 .5-8.3c-19.4-11-32.5-31.8-32.5-55.7c0-.8 0-1.6 0-2.4L66.4 338c-35.3 1.2-65-26.4-66.2-61.7zm63.4-18.2c-8.8 .3-15.7 7.7-15.4 16.5s7.7 15.7 16.5 15.4l161.5-5.6c9.8-.3 18.7 5.3 22.7 14.2s2.2 19.3-4.5 26.4c-2.8 2.9-4.4 6.7-4.4 11c0 8.8 7.2 16 16 16c9.1 0 17.4 5.1 21.5 13.3s3.2 17.9-2.3 25.1c-2 2.7-3.2 6-3.2 9.6c0 8.8 7.2 16 16 16l96 0 8 0c39.8 0 72-32.2 72-72l0-125.4c0-18.4-4.9-36.5-14.2-52.4l-1.5-2.6c-18.6-32-52.8-51.6-89.8-51.6l-10.2 0c-11.3 0-22 4.8-29.6 13.1l-17.5-15.9 17.5 15.9-18.4 20.3c-.6 .6-1.1 1.3-1.7 1.9l57 13.2c8.6 2 14 10.6 12 19.2s-10.6 14-19.2 12l-85.6-19.7L74.3 130c-8.6-1.9-17.2 3.5-19.1 12.2s3.5 17.2 12.2 19.1l187.5 41.6c10.2 2.3 17.8 10.9 18.7 21.4l.1 1c.6 6.6-1.5 13.1-5.8 18.1s-10.6 7.9-17.2 8.2L63.6 258.1z"],HandSpock:[576,512,[],"regular","M170.2 80.8C161 47 180.8 12 214.6 2.4c34-9.6 69.4 10.2 79 44.2l30.3 107.1L337.1 84c6.6-34.7 40.1-57.5 74.8-50.9c31.4 6 53 33.9 52 64.9c10-2.6 20.8-2.8 31.5-.1c34.3 8.6 55.1 43.3 46.6 77.6L486.7 397.2C469.8 464.7 409.2 512 339.6 512l-33.7 0c-56.9 0-112.2-19-157.2-53.9l-92-71.6c-27.9-21.7-32.9-61.9-11.2-89.8s61.9-32.9 89.8-11.2l17 13.2L100.5 167.5c-13-32.9 3.2-70.1 36-83c11.1-4.4 22.7-5.4 33.7-3.7zm77.1-21.2c-2.4-8.5-11.2-13.4-19.7-11s-13.4 11.2-11 19.7l54.8 182.4c3.5 12.3-3.3 25.2-15.4 29.3s-25.3-2-30-13.9L174.9 138.1c-3.2-8.2-12.5-12.3-20.8-9s-12.3 12.5-9 20.8l73.3 185.6c12 30.3-23.7 57-49.4 37l-63.1-49.1c-7-5.4-17-4.2-22.5 2.8s-4.2 17 2.8 22.5l92 71.6c36.5 28.4 81.4 43.8 127.7 43.8l33.7 0c47.5 0 89-32.4 100.5-78.5l55.4-221.6c2.1-8.6-3.1-17.3-11.6-19.4s-17.3 3.1-19.4 11.6l-26 104C435.6 271.8 425 280 413 280c-16.5 0-28.9-15-25.8-31.2L415.7 99c1.7-8.7-4-17.1-12.7-18.7s-17.1 4-18.7 12.7L352.5 260c-2.2 11.6-12.4 20-24.2 20c-11 0-20.7-7.3-23.7-17.9L247.4 59.6z"],HandBackFist:[448,512,["HandRock"],"regular","M144 64c0-8.8 7.2-16 16-16s16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16c0 9.1 5.1 17.4 13.3 21.5s17.9 3.2 25.1-2.3c2.7-2 6-3.2 9.6-3.2c8.8 0 16 7.2 16 16l0 104c0 31.3-20 58-48 67.9c-9.6 3.4-16 12.5-16 22.6L304 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-117.8c38-20.1 64-60.1 64-106.2l0-104c0-35.3-28.7-64-64-64c-2.8 0-5.6 .2-8.3 .5C332.8 77.1 311.9 64 288 64c-2.8 0-5.6 .2-8.3 .5C268.8 45.1 247.9 32 224 32c-2.8 0-5.6 .2-8.3 .5C204.8 13.1 183.9 0 160 0C124.7 0 96 28.7 96 64l0 64.3c-11.7 7.4-22.5 16.4-32 26.9l17.8 16.1L64 155.2l-9.4 10.5C40 181.8 32 202.8 32 224.6l0 12.8c0 49.6 24.2 96.1 64.8 124.5l13.8-19.7L96.8 361.9l8.9 6.2c6.9 4.8 14.4 8.6 22.3 11.3L128 488c0 13.3 10.7 24 24 24s24-10.7 24-24l0-128.1c0-12.6-9.8-23.1-22.4-23.9c-7.3-.5-14.3-2.9-20.3-7.1l-13.1 18.7 13.1-18.7-8.9-6.2C96.6 303.1 80 271.3 80 237.4l0-12.8c0-9.9 3.7-19.4 10.3-26.8l9.4-10.5c3.8-4.2 7.9-8.1 12.3-11.6l0 32.3c0 8.8 7.2 16 16 16s16-7.2 16-16l0-65.7 0-14.3 0-64z"],HandLizard:[512,512,[],"regular","M72 112c-13.3 0-24 10.7-24 24s10.7 24 24 24l168 0c35.3 0 64 28.7 64 64s-28.7 64-64 64l-104 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l152 0c4.5 0 8.9 1.3 12.7 3.6l64 40c7 4.4 11.3 12.1 11.3 20.4l0 24c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-10.7L281.1 384 136 384c-39.8 0-72-32.2-72-72s32.2-72 72-72l104 0c8.8 0 16-7.2 16-16s-7.2-16-16-16L72 208c-39.8 0-72-32.2-72-72S32.2 64 72 64l209.6 0c46.7 0 90.9 21.5 119.7 58.3l78.4 100.1c20.9 26.7 32.3 59.7 32.3 93.7L512 424c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-107.9c0-23.2-7.8-45.8-22.1-64.1L363.5 151.9c-19.7-25.2-49.9-39.9-81.9-39.9L72 112z"],HandPeace:[512,512,[],"regular","M250.8 1.4c-35.2-3.7-66.6 21.8-70.3 57L174 119 156.7 69.6C145 36.3 108.4 18.8 75.1 30.5S24.2 78.8 35.9 112.1L88.7 262.2C73.5 276.7 64 297.3 64 320c0 0 0 0 0 0l0 24c0 92.8 75.2 168 168 168l48 0c92.8 0 168-75.2 168-168l0-72 0-16 0-32c0-35.3-28.7-64-64-64c-7.9 0-15.4 1.4-22.4 4c-10.4-21.3-32.3-36-57.6-36c-.7 0-1.5 0-2.2 0l5.9-56.3c3.7-35.2-21.8-66.6-57-70.3zm-.2 155.4C243.9 166.9 240 179 240 192l0 48c0 .7 0 1.4 0 2c-5.1-1.3-10.5-2-16-2l-7.4 0-5.4-15.3 17-161.3c.9-8.8 8.8-15.2 17.6-14.2s15.2 8.8 14.2 17.6l-9.5 90.1zM111.4 85.6L165.7 240 144 240c-4 0-8 .3-11.9 .9L81.2 96.2c-2.9-8.3 1.5-17.5 9.8-20.4s17.5 1.5 20.4 9.8zM288 192c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48zm38.4 108c10.4 21.3 32.3 36 57.6 36c5.5 0 10.9-.7 16-2l0 10c0 66.3-53.7 120-120 120l-48 0c-66.3 0-120-53.7-120-120l0-24s0 0 0 0c0-17.7 14.3-32 32-32l80 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-40 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l40 0c35.3 0 64-28.7 64-64c0-.7 0-1.4 0-2c5.1 1.3 10.5 2 16 2c7.9 0 15.4-1.4 22.4-4zM400 272c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-32 0-16c0-8.8 7.2-16 16-16s16 7.2 16 16l0 32 0 16z"],CircleNodes:[512,512,[],"solid","M418.4 157.9c35.3-8.3 61.6-40 61.6-77.9c0-44.2-35.8-80-80-80c-43.4 0-78.7 34.5-80 77.5L136.2 151.1C121.7 136.8 101.9 128 80 128c-44.2 0-80 35.8-80 80s35.8 80 80 80c12.2 0 23.8-2.7 34.1-7.6L259.7 407.8c-2.4 7.6-3.7 15.8-3.7 24.2c0 44.2 35.8 80 80 80s80-35.8 80-80c0-27.7-14-52.1-35.4-66.4l37.8-207.7zM156.3 232.2c2.2-6.9 3.5-14.2 3.7-21.7l183.8-73.5c3.6 3.5 7.4 6.7 11.6 9.5L317.6 354.1c-5.5 1.3-10.8 3.1-15.8 5.5L156.3 232.2z"],CircleRight:[512,512,[],"regular","M464 256A208 208 0 1 1 48 256a208 208 0 1 1 416 0zM0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM294.6 151.2c-4.2-4.6-10.1-7.2-16.4-7.2C266 144 256 154 256 166.3l0 41.7-96 0c-17.7 0-32 14.3-32 32l0 32c0 17.7 14.3 32 32 32l96 0 0 41.7c0 12.3 10 22.3 22.3 22.3c6.2 0 12.1-2.6 16.4-7.2l84-91c3.5-3.8 5.4-8.7 5.4-13.9s-1.9-10.1-5.4-13.9l-84-91z"],CircleUp:[512,512,[],"regular","M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM151.2 217.4c-4.6 4.2-7.2 10.1-7.2 16.4c0 12.3 10 22.3 22.3 22.3l41.7 0 0 96c0 17.7 14.3 32 32 32l32 0c17.7 0 32-14.3 32-32l0-96 41.7 0c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.2-16.4l-91-84c-3.8-3.5-8.7-5.4-13.9-5.4s-10.1 1.9-13.9 5.4l-91 84z"],CircleLeft:[512,512,[],"regular","M48 256a208 208 0 1 1 416 0A208 208 0 1 1 48 256zm464 0A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM217.4 376.9c4.2 4.5 10.1 7.1 16.3 7.1c12.3 0 22.3-10 22.3-22.3l0-57.7 96 0c17.7 0 32-14.3 32-32l0-32c0-17.7-14.3-32-32-32l-96 0 0-57.7c0-12.3-10-22.3-22.3-22.3c-6.2 0-12.1 2.6-16.3 7.1L117.5 242.2c-3.5 3.8-5.5 8.7-5.5 13.8s2 10.1 5.5 13.8l99.9 107.1z"],CircleDown:[512,512,[],"regular","M256 464a208 208 0 1 1 0-416 208 208 0 1 1 0 416zM256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM376.9 294.6c4.5-4.2 7.1-10.1 7.1-16.3c0-12.3-10-22.3-22.3-22.3L304 256l0-96c0-17.7-14.3-32-32-32l-32 0c-17.7 0-32 14.3-32 32l0 96-57.7 0C138 256 128 266 128 278.3c0 6.2 2.6 12.1 7.1 16.3l107.1 99.9c3.8 3.5 8.7 5.5 13.8 5.5s10.1-2 13.8-5.5l107.1-99.9z"],WindowRestore:[512,512,[],"solid","M432 48L208 48c-17.7 0-32 14.3-32 32l0 16-48 0 0-16c0-44.2 35.8-80 80-80L432 0c44.2 0 80 35.8 80 80l0 224c0 44.2-35.8 80-80 80l-16 0 0-48 16 0c17.7 0 32-14.3 32-32l0-224c0-17.7-14.3-32-32-32zM48 448c0 8.8 7.2 16 16 16l256 0c8.8 0 16-7.2 16-16l0-192L48 256l0 192zM64 128l256 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 192c0-35.3 28.7-64 64-64z"],WindowMaximize:[512,512,[],"solid","M.3 89.5C.1 91.6 0 93.8 0 96L0 224 0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-192 0-128c0-35.3-28.7-64-64-64L64 32c-2.2 0-4.4 .1-6.5 .3c-9.2 .9-17.8 3.8-25.5 8.2C21.8 46.5 13.4 55.1 7.7 65.5c-3.9 7.3-6.5 15.4-7.4 24zM48 224l416 0 0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192z"],WindowMinimize:[512,512,[],"solid","M24 432c-13.3 0-24 10.7-24 24s10.7 24 24 24l464 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 432z"],VrCardboard:[640,512,["VR"],"solid","M576 64L64 64C28.7 64 0 92.7 0 128L0 384c0 35.3 28.7 64 64 64l120.4 0c24.2 0 46.4-13.7 57.2-35.4l32-64c8.8-17.5 26.7-28.6 46.3-28.6s37.5 11.1 46.3 28.6l32 64c10.8 21.7 33 35.4 57.2 35.4L576 448c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64zM96 240a64 64 0 1 1 128 0A64 64 0 1 1 96 240zm384-64a64 64 0 1 1 0 128 64 64 0 1 1 0-128z"],C:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.479z",{svgClass:"stroke-none"}],CPlusPlus:[32,32,[],"solid","M29.86 8c-.224-.385-.532-.724-.871-.921L17.234.292c-.677-.391-1.787-.391-2.464 0L3.015 7.079C2.338 7.47 1.78 8.432 1.78 9.214v13.573c0 .391.14.828.364 1.213c.219.385.532.724.871.917l11.749 6.791c.683.391 1.787.391 2.464 0l11.755-6.791c.339-.193.647-.532.871-.917s.359-.823.359-1.213V9.214c.005-.391-.135-.828-.353-1.213zM16 25.479c-5.229 0-9.479-4.249-9.479-9.479S10.77 6.521 16 6.521a9.51 9.51 0 0 1 8.208 4.733l-4.104 2.376A4.76 4.76 0 0 0 16 11.259c-2.615 0-4.74 2.125-4.74 4.74s2.125 4.74 4.74 4.74a4.76 4.76 0 0 0 4.104-2.371l4.104 2.376A9.51 9.51 0 0 1 16 25.477zm9.479-8.952h-1.052v1.052H23.37v-1.052h-1.052v-1.053h1.052v-1.052h1.057v1.052h1.052zm3.948 0h-1.052v1.052h-1.052v-1.052h-1.052v-1.053h1.052v-1.052h1.052v1.052h1.052z",{svgClass:"stroke-none"}],Discord:[640,512,[],"solid","M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"],Google:[488,512,[],"solid","M488 261.8C488 403.3 391.1 504 248 504 110.8 504 0 393.2 0 256S110.8 8 248 8c66.8 0 123 24.5 166.3 64.9l-67.5 64.9C258.5 52.6 94.3 116.6 94.3 256c0 86.5 69.1 156.6 153.7 156.6 98.2 0 135-70.4 140.8-106.9H248v-85.3h236.1c2.3 12.7 3.9 24.9 3.9 41.4z"],Js:[32,32,[],"solid","M18.774 19.7a3.73 3.73 0 0 0 3.376 2.078c1.418 0 2.324-.709 2.324-1.688c0-1.173-.931-1.589-2.491-2.272l-.856-.367c-2.469-1.052-4.11-2.37-4.11-5.156c0-2.567 1.956-4.52 5.012-4.52A5.06 5.06 0 0 1 26.9 10.52l-2.665 1.711a2.33 2.33 0 0 0-2.2-1.467a1.49 1.49 0 0 0-1.638 1.467c0 1.027.636 1.442 2.1 2.078l.856.366c2.908 1.247 4.549 2.518 4.549 5.376c0 3.081-2.42 4.769-5.671 4.769a6.58 6.58 0 0 1-6.236-3.5ZM6.686 20c.538.954 1.027 1.76 2.2 1.76c1.124 0 1.834-.44 1.834-2.15V7.975h3.422v11.683c0 3.543-2.078 5.156-5.11 5.156A5.31 5.31 0 0 1 3.9 21.688Z"],Ts:[32,32,[],"solid","M23.827 8.243a4.4 4.4 0 0 1 2.223 1.281a6 6 0 0 1 .852 1.143c.011.045-1.534 1.083-2.471 1.662c-.034.023-.169-.124-.322-.35a2.01 2.01 0 0 0-1.67-1c-1.077-.074-1.771.49-1.766 1.433a1.3 1.3 0 0 0 .153.666c.237.49.677.784 2.059 1.383c2.544 1.095 3.636 1.817 4.31 2.843a5.16 5.16 0 0 1 .416 4.333a4.76 4.76 0 0 1-3.932 2.815a11 11 0 0 1-2.708-.028a6.53 6.53 0 0 1-3.616-1.884a6.3 6.3 0 0 1-.926-1.371a3 3 0 0 1 .327-.208c.158-.09.756-.434 1.32-.761l1.024-.6l.214.312a4.8 4.8 0 0 0 1.35 1.292a3.3 3.3 0 0 0 3.458-.175a1.545 1.545 0 0 0 .2-1.974c-.276-.395-.84-.727-2.443-1.422a8.8 8.8 0 0 1-3.349-2.055a4.7 4.7 0 0 1-.976-1.777a7.1 7.1 0 0 1-.062-2.268a4.33 4.33 0 0 1 3.644-3.374a9 9 0 0 1 2.691.084m-8.343 1.483l.011 1.454h-4.63v13.148H7.6V11.183H2.97V9.755a14 14 0 0 1 .04-1.466c.017-.023 2.832-.034 6.245-.028l6.211.017Z"],Linux:[448,512,[],"regular","M220.8 123.3c1 .5 1.8 1.7 3 1.7 1.1 0 2.8-.4 2.9-1.5.2-1.4-1.9-2.3-3.2-2.9-1.7-.7-3.9-1-5.5-.1-.4.2-.8.7-.6 1.1.3 1.3 2.3 1.1 3.4 1.7zm-21.9 1.7c1.2 0 2-1.2 3-1.7 1.1-.6 3.1-.4 3.5-1.6.2-.4-.2-.9-.6-1.1-1.6-.9-3.8-.6-5.5.1-1.3.6-3.4 1.5-3.2 2.9.1 1 1.8 1.5 2.8 1.4zM420 403.8c-3.6-4-5.3-11.6-7.2-19.7-1.8-8.1-3.9-16.8-10.5-22.4-1.3-1.1-2.6-2.1-4-2.9-1.3-.8-2.7-1.5-4.1-2 9.2-27.3 5.6-54.5-3.7-79.1-11.4-30.1-31.3-56.4-46.5-74.4-17.1-21.5-33.7-41.9-33.4-72C311.1 85.4 315.7.1 234.8 0 132.4-.2 158 103.4 156.9 135.2c-1.7 23.4-6.4 41.8-22.5 64.7-18.9 22.5-45.5 58.8-58.1 96.7-6 17.9-8.8 36.1-6.2 53.3-6.5 5.8-11.4 14.7-16.6 20.2-4.2 4.3-10.3 5.9-17 8.3s-14 6-18.5 14.5c-2.1 3.9-2.8 8.1-2.8 12.4 0 3.9.6 7.9 1.2 11.8 1.2 8.1 2.5 15.7.8 20.8-5.2 14.4-5.9 24.4-2.2 31.7 3.8 7.3 11.4 10.5 20.1 12.3 17.3 3.6 40.8 2.7 59.3 12.5 19.8 10.4 39.9 14.1 55.9 10.4 11.6-2.6 21.1-9.6 25.9-20.2 12.5-.1 26.3-5.4 48.3-6.6 14.9-1.2 33.6 5.3 55.1 4.1.6 2.3 1.4 4.6 2.5 6.7v.1c8.3 16.7 23.8 24.3 40.3 23 16.6-1.3 34.1-11 48.3-27.9 13.6-16.4 36-23.2 50.9-32.2 7.4-4.5 13.4-10.1 13.9-18.3.4-8.2-4.4-17.3-15.5-29.7zM223.7 87.3c9.8-22.2 34.2-21.8 44-.4 6.5 14.2 3.6 30.9-4.3 40.4-1.6-.8-5.9-2.6-12.6-4.9 1.1-1.2 3.1-2.7 3.9-4.6 4.8-11.8-.2-27-9.1-27.3-7.3-.5-13.9 10.8-11.8 23-4.1-2-9.4-3.5-13-4.4-1-6.9-.3-14.6 2.9-21.8zM183 75.8c10.1 0 20.8 14.2 19.1 33.5-3.5 1-7.1 2.5-10.2 4.6 1.2-8.9-3.3-20.1-9.6-19.6-8.4.7-9.8 21.2-1.8 28.1 1 .8 1.9-.2-5.9 5.5-15.6-14.6-10.5-52.1 8.4-52.1zm-13.6 60.7c6.2-4.6 13.6-10 14.1-10.5 4.7-4.4 13.5-14.2 27.9-14.2 7.1 0 15.6 2.3 25.9 8.9 6.3 4.1 11.3 4.4 22.6 9.3 8.4 3.5 13.7 9.7 10.5 18.2-2.6 7.1-11 14.4-22.7 18.1-11.1 3.6-19.8 16-38.2 14.9-3.9-.2-7-1-9.6-2.1-8-3.5-12.2-10.4-20-15-8.6-4.8-13.2-10.4-14.7-15.3-1.4-4.9 0-9 4.2-12.3zm3.3 334c-2.7 35.1-43.9 34.4-75.3 18-29.9-15.8-68.6-6.5-76.5-21.9-2.4-4.7-2.4-12.7 2.6-26.4v-.2c2.4-7.6.6-16-.6-23.9-1.2-7.8-1.8-15 .9-20 3.5-6.7 8.5-9.1 14.8-11.3 10.3-3.7 11.8-3.4 19.6-9.9 5.5-5.7 9.5-12.9 14.3-18 5.1-5.5 10-8.1 17.7-6.9 8.1 1.2 15.1 6.8 21.9 16l19.6 35.6c9.5 19.9 43.1 48.4 41 68.9zm-1.4-25.9c-4.1-6.6-9.6-13.6-14.4-19.6 7.1 0 14.2-2.2 16.7-8.9 2.3-6.2 0-14.9-7.4-24.9-13.5-18.2-38.3-32.5-38.3-32.5-13.5-8.4-21.1-18.7-24.6-29.9s-3-23.3-.3-35.2c5.2-22.9 18.6-45.2 27.2-59.2 2.3-1.7.8 3.2-8.7 20.8-8.5 16.1-24.4 53.3-2.6 82.4.6-20.7 5.5-41.8 13.8-61.5 12-27.4 37.3-74.9 39.3-112.7 1.1.8 4.6 3.2 6.2 4.1 4.6 2.7 8.1 6.7 12.6 10.3 12.4 10 28.5 9.2 42.4 1.2 6.2-3.5 11.2-7.5 15.9-9 9.9-3.1 17.8-8.6 22.3-15 7.7 30.4 25.7 74.3 37.2 95.7 6.1 11.4 18.3 35.5 23.6 64.6 3.3-.1 7 .4 10.9 1.4 13.8-35.7-11.7-74.2-23.3-84.9-4.7-4.6-4.9-6.6-2.6-6.5 12.6 11.2 29.2 33.7 35.2 59 2.8 11.6 3.3 23.7.4 35.7 16.4 6.8 35.9 17.9 30.7 34.8-2.2-.1-3.2 0-4.2 0 3.2-10.1-3.9-17.6-22.8-26.1-19.6-8.6-36-8.6-38.3 12.5-12.1 4.2-18.3 14.7-21.4 27.3-2.8 11.2-3.6 24.7-4.4 39.9-.5 7.7-3.6 18-6.8 29-32.1 22.9-76.7 32.9-114.3 7.2zm257.4-11.5c-.9 16.8-41.2 19.9-63.2 46.5-13.2 15.7-29.4 24.4-43.6 25.5s-26.5-4.8-33.7-19.3c-4.7-11.1-2.4-23.1 1.1-36.3 3.7-14.2 9.2-28.8 9.9-40.6.8-15.2 1.7-28.5 4.2-38.7 2.6-10.3 6.6-17.2 13.7-21.1.3-.2.7-.3 1-.5.8 13.2 7.3 26.6 18.8 29.5 12.6 3.3 30.7-7.5 38.4-16.3 9-.3 15.7-.9 22.6 5.1 9.9 8.5 7.1 30.3 17.1 41.6 10.6 11.6 14 19.5 13.7 24.6zM173.3 148.7c2 1.9 4.7 4.5 8 7.1 6.6 5.2 15.8 10.6 27.3 10.6 11.6 0 22.5-5.9 31.8-10.8 4.9-2.6 10.9-7 14.8-10.4s5.9-6.3 3.1-6.6-2.6 2.6-6 5.1c-4.4 3.2-9.7 7.4-13.9 9.8-7.4 4.2-19.5 10.2-29.9 10.2s-18.7-4.8-24.9-9.7c-3.1-2.5-5.7-5-7.7-6.9-1.5-1.4-1.9-4.6-4.3-4.9-1.4-.1-1.8 3.7 1.7 6.5z"],SquareJs:[448,512,[],"solid","M448 96c0-35.3-28.7-64-64-64H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96zM180.9 444.9c-33.7 0-53.2-17.4-63.2-38.5L152 385.7c6.6 11.7 12.6 21.6 27.1 21.6c13.8 0 22.6-5.4 22.6-26.5V237.7h42.1V381.4c0 43.6-25.6 63.5-62.9 63.5zm85.8-43L301 382.1c9 14.7 20.8 25.6 41.5 25.6c17.4 0 28.6-8.7 28.6-20.8c0-14.4-11.4-19.5-30.7-28l-10.5-4.5c-30.4-12.9-50.5-29.2-50.5-63.5c0-31.6 24.1-55.6 61.6-55.6c26.8 0 46 9.3 59.8 33.7L368 290c-7.2-12.9-15-18-27.1-18c-12.3 0-20.1 7.8-20.1 18c0 12.6 7.8 17.7 25.9 25.6l10.5 4.5c35.8 15.3 55.9 31 55.9 66.2c0 37.8-29.8 58.6-69.7 58.6c-39.1 0-64.4-18.6-76.7-43z"],Safari:[512,512,[],"solid","M274.69,274.69l-37.38-37.38L166,346ZM256,8C119,8,8,119,8,256S119,504,256,504,504,393,504,256,393,8,256,8ZM411.85,182.79l14.78-6.13A8,8,0,0,1,437.08,181h0a8,8,0,0,1-4.33,10.46L418,197.57a8,8,0,0,1-10.45-4.33h0A8,8,0,0,1,411.85,182.79ZM314.43,94l6.12-14.78A8,8,0,0,1,331,74.92h0a8,8,0,0,1,4.33,10.45l-6.13,14.78a8,8,0,0,1-10.45,4.33h0A8,8,0,0,1,314.43,94ZM256,60h0a8,8,0,0,1,8,8V84a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V68A8,8,0,0,1,256,60ZM181,74.92a8,8,0,0,1,10.46,4.33L197.57,94a8,8,0,1,1-14.78,6.12l-6.13-14.78A8,8,0,0,1,181,74.92Zm-63.58,42.49h0a8,8,0,0,1,11.31,0L140,128.72A8,8,0,0,1,140,140h0a8,8,0,0,1-11.31,0l-11.31-11.31A8,8,0,0,1,117.41,117.41ZM60,256h0a8,8,0,0,1,8-8H84a8,8,0,0,1,8,8h0a8,8,0,0,1-8,8H68A8,8,0,0,1,60,256Zm40.15,73.21-14.78,6.13A8,8,0,0,1,74.92,331h0a8,8,0,0,1,4.33-10.46L94,314.43a8,8,0,0,1,10.45,4.33h0A8,8,0,0,1,100.15,329.21Zm4.33-136h0A8,8,0,0,1,94,197.57l-14.78-6.12A8,8,0,0,1,74.92,181h0a8,8,0,0,1,10.45-4.33l14.78,6.13A8,8,0,0,1,104.48,193.24ZM197.57,418l-6.12,14.78a8,8,0,0,1-14.79-6.12l6.13-14.78A8,8,0,1,1,197.57,418ZM264,444a8,8,0,0,1-8,8h0a8,8,0,0,1-8-8V428a8,8,0,0,1,8-8h0a8,8,0,0,1,8,8Zm67-6.92h0a8,8,0,0,1-10.46-4.33L314.43,418a8,8,0,0,1,4.33-10.45h0a8,8,0,0,1,10.45,4.33l6.13,14.78A8,8,0,0,1,331,437.08Zm63.58-42.49h0a8,8,0,0,1-11.31,0L372,383.28A8,8,0,0,1,372,372h0a8,8,0,0,1,11.31,0l11.31,11.31A8,8,0,0,1,394.59,394.59ZM286.25,286.25,110.34,401.66,225.75,225.75,401.66,110.34ZM437.08,331h0a8,8,0,0,1-10.45,4.33l-14.78-6.13a8,8,0,0,1-4.33-10.45h0A8,8,0,0,1,418,314.43l14.78,6.12A8,8,0,0,1,437.08,331ZM444,264H428a8,8,0,0,1-8-8h0a8,8,0,0,1,8-8h16a8,8,0,0,1,8,8h0A8,8,0,0,1,444,264Z"],Python:[448,512,[],"solid","M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z"],Markdown:[640,512,[],"solid","M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"],Microsoft:[448,512,[],"solid","M0 32h214.6v214.6H0V32zm233.4 0H448v214.6H233.4V32zM0 265.4h214.6V480H0V265.4zm233.4 0H448V480H233.4V265.4z"],Npm:[576,512,[],"solid","M288 288h-32v-64h32v64zm288-128v192H288v32H160v-32H0V160h576zm-416 32H32v128h64v-96h32v96h32V192zm160 0H192v160h64v-32h64V192zm224 0H352v128h64v-96h32v96h32v-96h32v96h32V192z"],Reddit:[512,512,[],"solid","M0 256C0 114.6 114.6 0 256 0S512 114.6 512 256s-114.6 256-256 256L37.1 512c-13.7 0-20.5-16.5-10.9-26.2L75 437C28.7 390.7 0 326.7 0 256zM349.6 153.6c23.6 0 42.7-19.1 42.7-42.7s-19.1-42.7-42.7-42.7c-20.6 0-37.8 14.6-41.8 34c-34.5 3.7-61.4 33-61.4 68.4l0 .2c-37.5 1.6-71.8 12.3-99 29.1c-10.1-7.8-22.8-12.5-36.5-12.5c-33 0-59.8 26.8-59.8 59.8c0 24 14.1 44.6 34.4 54.1c2 69.4 77.6 125.2 170.6 125.2s168.7-55.9 170.6-125.3c20.2-9.6 34.1-30.2 34.1-54c0-33-26.8-59.8-59.8-59.8c-13.7 0-26.3 4.6-36.4 12.4c-27.4-17-62.1-27.7-100-29.1l0-.2c0-25.4 18.9-46.5 43.4-49.9l0 0c4.4 18.8 21.3 32.8 41.5 32.8zM177.1 246.9c16.7 0 29.5 17.6 28.5 39.3s-13.5 29.6-30.3 29.6s-31.4-8.8-30.4-30.5s15.4-38.3 32.1-38.3zm190.1 38.3c1 21.7-13.7 30.5-30.4 30.5s-29.3-7.9-30.3-29.6c-1-21.7 11.8-39.3 28.5-39.3s31.2 16.6 32.1 38.3zm-48.1 56.7c-10.3 24.6-34.6 41.9-63 41.9s-52.7-17.3-63-41.9c-1.2-2.9 .8-6.2 3.9-6.5c18.4-1.9 38.3-2.9 59.1-2.9s40.7 1 59.1 2.9c3.1 .3 5.1 3.6 3.9 6.5z"],Rust:[512,512,[],"solid","M508.52,249.75,486.7,236.24c-.17-2-.34-3.93-.55-5.88l18.72-17.5a7.35,7.35,0,0,0-2.44-12.25l-24-9c-.54-1.88-1.08-3.78-1.67-5.64l15-20.83a7.35,7.35,0,0,0-4.79-11.54l-25.42-4.15c-.9-1.73-1.79-3.45-2.73-5.15l10.68-23.42a7.35,7.35,0,0,0-6.95-10.39l-25.82.91q-1.79-2.22-3.61-4.4L439,81.84A7.36,7.36,0,0,0,430.16,73L405,78.93q-2.17-1.83-4.4-3.61l.91-25.82a7.35,7.35,0,0,0-10.39-7L367.7,53.23c-1.7-.94-3.43-1.84-5.15-2.73L358.4,25.08a7.35,7.35,0,0,0-11.54-4.79L326,35.26c-1.86-.59-3.75-1.13-5.64-1.67l-9-24a7.35,7.35,0,0,0-12.25-2.44l-17.5,18.72c-1.95-.21-3.91-.38-5.88-.55L262.25,3.48a7.35,7.35,0,0,0-12.5,0L236.24,25.3c-2,.17-3.93.34-5.88.55L212.86,7.13a7.35,7.35,0,0,0-12.25,2.44l-9,24c-1.89.55-3.79,1.08-5.66,1.68l-20.82-15a7.35,7.35,0,0,0-11.54,4.79l-4.15,25.41c-1.73.9-3.45,1.79-5.16,2.73L120.88,42.55a7.35,7.35,0,0,0-10.39,7l.92,25.81c-1.49,1.19-3,2.39-4.42,3.61L81.84,73A7.36,7.36,0,0,0,73,81.84L78.93,107c-1.23,1.45-2.43,2.93-3.62,4.41l-25.81-.91a7.42,7.42,0,0,0-6.37,3.26,7.35,7.35,0,0,0-.57,7.13l10.66,23.41c-.94,1.7-1.83,3.43-2.73,5.16L25.08,153.6a7.35,7.35,0,0,0-4.79,11.54l15,20.82c-.59,1.87-1.13,3.77-1.68,5.66l-24,9a7.35,7.35,0,0,0-2.44,12.25l18.72,17.5c-.21,1.95-.38,3.91-.55,5.88L3.48,249.75a7.35,7.35,0,0,0,0,12.5L25.3,275.76c.17,2,.34,3.92.55,5.87L7.13,299.13a7.35,7.35,0,0,0,2.44,12.25l24,9c.55,1.89,1.08,3.78,1.68,5.65l-15,20.83a7.35,7.35,0,0,0,4.79,11.54l25.42,4.15c.9,1.72,1.79,3.45,2.73,5.14L42.56,391.12a7.35,7.35,0,0,0,.57,7.13,7.13,7.13,0,0,0,6.37,3.26l25.83-.91q1.77,2.22,3.6,4.4L73,430.16A7.36,7.36,0,0,0,81.84,439L107,433.07q2.18,1.83,4.41,3.61l-.92,25.82a7.35,7.35,0,0,0,10.39,6.95l23.43-10.68c1.69.94,3.42,1.83,5.14,2.73l4.15,25.42a7.34,7.34,0,0,0,11.54,4.78l20.83-15c1.86.6,3.76,1.13,5.65,1.68l9,24a7.36,7.36,0,0,0,12.25,2.44l17.5-18.72c1.95.21,3.92.38,5.88.55l13.51,21.82a7.35,7.35,0,0,0,12.5,0l13.51-21.82c2-.17,3.93-.34,5.88-.56l17.5,18.73a7.36,7.36,0,0,0,12.25-2.44l9-24c1.89-.55,3.78-1.08,5.65-1.68l20.82,15a7.34,7.34,0,0,0,11.54-4.78l4.15-25.42c1.72-.9,3.45-1.79,5.15-2.73l23.42,10.68a7.35,7.35,0,0,0,10.39-6.95l-.91-25.82q2.22-1.79,4.4-3.61L430.16,439a7.36,7.36,0,0,0,8.84-8.84L433.07,405q1.83-2.17,3.61-4.4l25.82.91a7.23,7.23,0,0,0,6.37-3.26,7.35,7.35,0,0,0,.58-7.13L458.77,367.7c.94-1.7,1.83-3.43,2.73-5.15l25.42-4.15a7.35,7.35,0,0,0,4.79-11.54l-15-20.83c.59-1.87,1.13-3.76,1.67-5.65l24-9a7.35,7.35,0,0,0,2.44-12.25l-18.72-17.5c.21-1.95.38-3.91.55-5.87l21.82-13.51a7.35,7.35,0,0,0,0-12.5Zm-151,129.08A13.91,13.91,0,0,0,341,389.51l-7.64,35.67A187.51,187.51,0,0,1,177,424.44l-7.64-35.66a13.87,13.87,0,0,0-16.46-10.68l-31.51,6.76a187.38,187.38,0,0,1-16.26-19.21H258.3c1.72,0,2.89-.29,2.89-1.91V309.55c0-1.57-1.17-1.91-2.89-1.91H213.47l.05-34.35H262c4.41,0,23.66,1.28,29.79,25.87,1.91,7.55,6.17,32.14,9.06,40,2.89,8.82,14.6,26.46,27.1,26.46H407a187.3,187.3,0,0,1-17.34,20.09Zm25.77,34.49A15.24,15.24,0,1,1,368,398.08h.44A15.23,15.23,0,0,1,383.24,413.32Zm-225.62-.68a15.24,15.24,0,1,1-15.25-15.25h.45A15.25,15.25,0,0,1,157.62,412.64ZM69.57,234.15l32.83-14.6a13.88,13.88,0,0,0,7.06-18.33L102.69,186h26.56V305.73H75.65A187.65,187.65,0,0,1,69.57,234.15ZM58.31,198.09a15.24,15.24,0,0,1,15.23-15.25H74a15.24,15.24,0,1,1-15.67,15.24Zm155.16,24.49.05-35.32h63.26c3.28,0,23.07,3.77,23.07,18.62,0,12.29-15.19,16.7-27.68,16.7ZM399,306.71c-9.8,1.13-20.63-4.12-22-10.09-5.78-32.49-15.39-39.4-30.57-51.4,18.86-11.95,38.46-29.64,38.46-53.26,0-25.52-17.49-41.59-29.4-49.48-16.76-11-35.28-13.23-40.27-13.23H116.32A187.49,187.49,0,0,1,221.21,70.06l23.47,24.6a13.82,13.82,0,0,0,19.6.44l26.26-25a187.51,187.51,0,0,1,128.37,91.43l-18,40.57A14,14,0,0,0,408,220.43l34.59,15.33a187.12,187.12,0,0,1,.4,32.54H423.71c-1.91,0-2.69,1.27-2.69,3.13v8.82C421,301,409.31,305.58,399,306.71ZM240,60.21A15.24,15.24,0,0,1,255.21,45h.45A15.24,15.24,0,1,1,240,60.21ZM436.84,214a15.24,15.24,0,1,1,0-30.48h.44a15.24,15.24,0,0,1-.44,30.48Z"],Ubuntu:[576,512,[],"solid","M469.2 75A75.6 75.6 0 1 0 317.9 75a75.6 75.6 0 1 0 151.2 0zM154.2 240.7A75.6 75.6 0 1 0 3 240.7a75.6 75.6 0 1 0 151.2 0zM57 346C75.6 392.9 108 433 150 461.1s91.5 42.6 142 41.7c-14.7-18.6-22.9-41.5-23.2-65.2c-6.8-.9-13.3-2.1-19.5-3.4c-26.8-5.7-51.9-17.3-73.6-34s-39.3-38.1-51.7-62.5c-20.9 9.9-44.5 12.8-67.1 8.2zm395.1 89.8a75.6 75.6 0 1 0 -151.2 0 75.6 75.6 0 1 0 151.2 0zM444 351.6c18.5 14.8 31.6 35.2 37.2 58.2c33.3-41.3 52.6-92.2 54.8-145.2s-12.5-105.4-42.2-149.4c-8.6 21.5-24 39.6-43.8 51.6c15.4 28.6 22.9 60.8 21.9 93.2s-10.7 64-28 91.6zM101.1 135.4c12.4 2.7 24.3 7.5 35.1 14.3c16.6-24.2 38.9-44.1 64.8-58S255.8 70.4 285.2 70c.2-5.9 .9-11.9 2-17.7c3.6-16.7 11.1-32.3 21.8-45.5c-47.7-3.8-95.4 6-137.6 28.5S94.3 91.7 70.8 133.4c2.7-.2 5.3-.3 8-.3c7.5 0 15 .8 22.4 2.3z"],Windows:[448,512,[],"solid","M0 93.7l183.6-25.3v177.4H0V93.7zm0 324.6l183.6 25.3V268.4H0v149.9zm203.8 28L448 480V268.4H203.8v177.9zm0-380.6v180.1H448V32L203.8 65.7z"],Whatsapp:[448,512,[],"regular","M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"],"X-Twitter":[512,512,[],"regular","M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z"],Php:[512,512,[],"solid","M170.322 349.808c-2.4-15.66-9-28.38-25.02-34.531c-6.27-2.4-11.7-6.78-17.88-9.54c-7.02-3.15-14.16-6.15-21.57-8.1c-5.61-1.5-10.83 1.02-14.16 5.94c-3.15 4.62-.87 8.97 1.77 12.84c2.97 4.35 6.27 8.49 9.6 12.57c5.52 6.78 11.37 13.29 16.74 20.161c5.13 6.57 9.51 13.86 8.76 22.56c-1.65 19.08-10.29 34.891-24.21 47.76c-1.53 1.38-4.23 2.37-6.21 2.19c-8.88-.96-16.95-4.32-23.46-10.53c-7.47-7.11-6.33-15.48 2.61-20.67c2.13-1.23 4.35-2.37 6.3-3.87c5.46-4.11 7.29-11.13 4.32-17.22c-1.41-2.94-3-6.12-5.34-8.25c-11.43-10.41-22.651-21.151-34.891-30.63C18.01 307.447 2.771 276.968.43 240.067c-2.64-40.981 6.87-79.231 28.5-114.242c8.19-13.29 17.73-25.951 32.37-32.52c9.96-4.47 20.88-6.99 31.531-9.78c29.311-7.71 58.89-13.5 89.401-8.34c26.28 4.41 45.511 17.94 54.331 43.77c5.79 16.89 7.17 34.35 5.37 52.231c-3.54 35.131-29.49 66.541-63.331 75.841c-14.67 4.02-22.68 1.77-31.5-10.44c-6.33-8.79-11.58-18.36-17.25-27.631c-.84-1.38-1.44-2.97-2.16-4.44c-.69-1.47-1.44-2.88-2.16-4.35c2.13 15.24 5.67 29.911 13.98 42.99c4.5 7.11 10.5 12.36 19.29 13.14c32.34 2.91 59.641-7.71 79.021-33.721c21.69-29.101 26.461-62.581 20.19-97.831c-1.23-6.96-3.3-13.77-4.77-20.7c-.99-4.47.78-7.77 5.19-9.33c2.04-.69 4.14-1.26 6.18-1.68c26.461-5.7 53.221-7.59 80.191-4.86c30.601 3.06 59.551 11.46 85.441 28.471c40.531 26.67 65.641 64.621 79.291 110.522c1.98 6.66 2.28 13.95 2.46 20.971c.12 4.68-2.88 5.91-6.45 2.97c-3.93-3.21-7.53-6.87-10.92-10.65c-3.15-3.57-5.67-7.65-8.73-11.4c-2.37-2.94-4.44-2.49-5.58 1.17c-.72 2.22-1.35 4.41-1.98 6.63c-7.08 25.26-18.24 48.3-36.33 67.711c-2.52 2.73-4.77 6.78-5.07 10.38c-.78 9.96-1.35 20.13-.39 30.06c1.98 21.331 5.07 42.57 7.47 63.871c1.35 12.03-2.52 19.11-13.83 23.281c-7.95 2.91-16.47 5.04-24.87 5.64c-13.38.93-26.88.27-40.32.27c-.36-15 .93-29.731-13.17-37.771c2.73-11.13 5.88-21.69 7.77-32.49c1.56-8.97.24-17.79-6.06-25.14c-5.91-6.93-13.32-8.82-20.101-4.86c-20.43 11.91-41.671 11.97-63.301 4.17c-9.93-3.6-16.86-1.56-22.351 7.5c-5.91 9.75-8.4 20.7-7.74 31.771c.84 13.95 3.27 27.75 5.13 41.64c1.02 7.77.15 9.78-7.56 11.76c-17.13 4.35-34.56 4.83-52.081 3.42c-.93-.09-1.86-.48-2.46-.63c-.87-14.55.66-29.671-16.68-37.411c7.68-16.29 6.63-33.18 3.99-50.07l-.06-.15zm-103.561-57.09c2.55-2.4 4.59-6.15 5.31-9.6c1.8-8.64-4.68-20.22-12.18-23.43c-3.99-1.74-7.47-1.11-10.29 2.07c-6.87 7.77-13.65 15.63-20.401 23.521c-1.14 1.35-2.16 2.94-2.97 4.53c-2.7 5.19-1.11 8.97 4.65 10.38c3.48.87 7.08 1.05 10.65 1.56c9.3-.9 18.3-2.46 25.23-9zm.78-86.371c-.03-6.18-5.19-11.34-11.28-11.37c-6.27-.03-11.67 5.58-11.46 11.76c.27 6.21 5.43 11.19 11.61 11.07c6.24-.09 11.22-5.19 11.16-11.43z"],Keyboard:[576,512,[],"regular","M64 112c-8.8 0-16 7.2-16 16l0 256c0 8.8 7.2 16 16 16l448 0c8.8 0 16-7.2 16-16l0-256c0-8.8-7.2-16-16-16L64 112zM0 128C0 92.7 28.7 64 64 64l448 0c35.3 0 64 28.7 64 64l0 256c0 35.3-28.7 64-64 64L64 448c-35.3 0-64-28.7-64-64L0 128zM176 320l224 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-224 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm-72-72c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16zm64 96c0-8.8 7.2-16 16-16l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16zm16-96l16 0c8.8 0 16 7.2 16 16l0 16c0 8.8-7.2 16-16 16l-16 0c-8.8 0-16-7.2-16-16l0-16c0-8.8 7.2-16 16-16z"],IdCard:[576,512,[],"regular","M528 160l0 256c0 8.8-7.2 16-16 16l-192 0c0-44.2-35.8-80-80-80l-64 0c-44.2 0-80 35.8-80 80l-32 0c-8.8 0-16-7.2-16-16l0-256 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM272 256a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm104-48c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],BookUser:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 320c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16L48 96c0-8.8 7.2-16 16-16l448 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zM208 256a64 64 0 1 0 0-128 64 64 0 1 0 0 128zm-32 32c-44.2 0-80 35.8-80 80c0 8.8 7.2 16 16 16l192 0c8.8 0 16-7.2 16-16c0-44.2-35.8-80-80-80l-64 0zM376 144c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0zm0 96c-13.3 0-24 10.7-24 24s10.7 24 24 24l80 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-80 0z"],Copy:[448,512,[],"regular","M384 336l-192 0c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l140.1 0L400 115.9 400 320c0 8.8-7.2 16-16 16zM192 384l192 0c35.3 0 64-28.7 64-64l0-204.1c0-12.7-5.1-24.9-14.1-33.9L366.1 14.1c-9-9-21.2-14.1-33.9-14.1L192 0c-35.3 0-64 28.7-64 64l0 256c0 35.3 28.7 64 64 64zM64 128c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l192 0c35.3 0 64-28.7 64-64l0-32-48 0 0 32c0 8.8-7.2 16-16 16L64 464c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l32 0 0-48-32 0z"],Eye:[576,512,[],"regular","M288 80c-65.2 0-118.8 29.6-159.9 67.7C89.6 183.5 63 226 49.4 256c13.6 30 40.2 72.5 78.6 108.3C169.2 402.4 222.8 432 288 432s118.8-29.6 159.9-67.7C486.4 328.5 513 286 526.6 256c-13.6-30-40.2-72.5-78.6-108.3C406.8 109.6 353.2 80 288 80zM95.4 112.6C142.5 68.8 207.2 32 288 32s145.5 36.8 192.6 80.6c46.8 43.5 78.1 95.4 93 131.1c3.3 7.9 3.3 16.7 0 24.6c-14.9 35.7-46.2 87.7-93 131.1C433.5 443.2 368.8 480 288 480s-145.5-36.8-192.6-80.6C48.6 356 17.3 304 2.5 268.3c-3.3-7.9-3.3-16.7 0-24.6C17.3 208 48.6 156 95.4 112.6zM288 336c44.2 0 80-35.8 80-80s-35.8-80-80-80c-.7 0-1.3 0-2 0c1.3 5.1 2 10.5 2 16c0 35.3-28.7 64-64 64c-5.5 0-10.9-.7-16-2c0 .7 0 1.3 0 2c0 44.2 35.8 80 80 80zm0-208a128 128 0 1 1 0 256 128 128 0 1 1 0-256z"],EyeOff:[640,512,[],"regular","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L525.6 386.7c39.6-40.6 66.4-86.1 79.9-118.4c3.3-7.9 3.3-16.7 0-24.6c-14.9-35.7-46.2-87.7-93-131.1C465.5 68.8 400.8 32 320 32c-68.2 0-125 26.3-169.3 60.8L38.8 5.1zm151 118.3C226 97.7 269.5 80 320 80c65.2 0 118.8 29.6 159.9 67.7C518.4 183.5 545 226 558.6 256c-12.6 28-36.6 66.8-70.9 100.9l-53.8-42.2c9.1-17.6 14.2-37.5 14.2-58.7c0-70.7-57.3-128-128-128c-32.2 0-61.7 11.9-84.2 31.5l-46.1-36.1zM394.9 284.2l-81.5-63.9c4.2-8.5 6.6-18.2 6.6-28.3c0-5.5-.7-10.9-2-16c.7 0 1.3 0 2 0c44.2 0 80 35.8 80 80c0 9.9-1.8 19.4-5.1 28.2zm9.4 130.3C378.8 425.4 350.7 432 320 432c-65.2 0-118.8-29.6-159.9-67.7C121.6 328.5 95 286 81.4 256c8.3-18.4 21.5-41.5 39.4-64.8L83.1 161.5C60.3 191.2 44 220.8 34.5 243.7c-3.3 7.9-3.3 16.7 0 24.6c14.9 35.7 46.2 87.7 93 131.1C174.5 443.2 239.2 480 320 480c47.8 0 89.9-12.9 126.2-32.5l-41.9-33zM192 256c0 70.7 57.3 128 128 128c13.3 0 26.1-2 38.2-5.8L302 334c-23.5-5.4-43.1-21.2-53.7-42.3l-56.1-44.2c-.2 2.8-.3 5.6-.3 8.5z"],StickyNote:[448,512,[],"regular","M64 80c-8.8 0-16 7.2-16 16l0 320c0 8.8 7.2 16 16 16l224 0 0-80c0-17.7 14.3-32 32-32l80 0 0-224c0-8.8-7.2-16-16-16L64 80zM288 480L64 480c-35.3 0-64-28.7-64-64L0 96C0 60.7 28.7 32 64 32l320 0c35.3 0 64 28.7 64 64l0 224 0 5.5c0 17-6.7 33.3-18.7 45.3l-90.5 90.5c-12 12-28.3 18.7-45.3 18.7l-5.5 0z"],CreditCard:[576,512,[],"regular","M512 80c8.8 0 16 7.2 16 16l0 32L48 128l0-32c0-8.8 7.2-16 16-16l448 0zm16 144l0 192c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-192 480 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l448 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm56 304c-13.3 0-24 10.7-24 24s10.7 24 24 24l48 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0zm128 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l112 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-112 0z"],Hourglass:[384,512,[],"regular","M24 0C10.7 0 0 10.7 0 24S10.7 48 24 48l8 0 0 19c0 40.3 16 79 44.5 107.5L158.1 256 76.5 337.5C48 366 32 404.7 32 445l0 19-8 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l336 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-8 0 0-19c0-40.3-16-79-44.5-107.5L225.9 256l81.5-81.5C336 146 352 107.3 352 67l0-19 8 0c13.3 0 24-10.7 24-24s-10.7-24-24-24L24 0zM192 289.9l81.5 81.5C293 391 304 417.4 304 445l0 19L80 464l0-19c0-27.6 11-54 30.5-73.5L192 289.9zm0-67.9l-81.5-81.5C91 121 80 94.6 80 67l0-19 224 0 0 19c0 27.6-11 54-30.5 73.5L192 222.1z"],Bell:[448,512,[],"solid","M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 18.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S19.4 416 32 416l384 0c12.6 0 24-7.4 29.2-18.9s3.1-25-5.3-34.4l-7.4-8.3C401.3 319.2 384 273.9 384 226.8l0-18.8c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm45.3 493.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],BellOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7l-90.2-70.7c.2-.4 .4-.9 .6-1.3c5.2-11.5 3.1-25-5.3-34.4l-7.4-8.3C497.3 319.2 480 273.9 480 226.8l0-18.8c0-77.4-55-142-128-156.8L352 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 19.2c-42.6 8.6-79 34.2-102 69.3L38.8 5.1zM406.2 416L160 222.1l0 4.8c0 47-17.3 92.4-48.5 127.6l-7.4 8.3c-8.4 9.4-10.4 22.9-5.3 34.4S115.4 416 128 416l278.2 0zm-40.9 77.3c12-12 18.7-28.3 18.7-45.3l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7z"],Compass:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm50.7-186.9L162.4 380.6c-19.4 7.5-38.5-11.6-31-31l55.5-144.3c3.3-8.5 9.9-15.1 18.4-18.4l144.3-55.5c19.4-7.5 38.5 11.6 31 31L325.1 306.7c-3.2 8.5-9.9 15.1-18.4 18.4zM288 256a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],File:[384,512,[],"solid","M0 64C0 28.7 28.7 0 64 0L224 0l0 128c0 17.7 14.3 32 32 32l128 0 0 288c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 64zm384 64l-128 0L256 0 384 128z"],MessageCircle:[512,512,[],"solid","M512 240c0 114.9-114.6 208-256 208c-37.1 0-72.3-6.4-104.1-17.9c-11.9 8.7-31.3 20.6-54.3 30.6C73.6 471.1 44.7 480 16 480c-6.5 0-12.3-3.9-14.8-9.9c-2.5-6-1.1-12.8 3.4-17.4c0 0 0 0 0 0s0 0 0 0s0 0 0 0c0 0 0 0 0 0l.3-.3c.3-.3 .7-.7 1.3-1.4c1.1-1.2 2.8-3.1 4.9-5.7c4.1-5 9.6-12.4 15.2-21.6c10-16.6 19.5-38.4 21.4-62.9C17.7 326.8 0 285.1 0 240C0 125.1 114.6 32 256 32s256 93.1 256 208z"],Inbox:[512,512,[],"solid","M121 32C91.6 32 66 52 58.9 80.5L1.9 308.4C.6 313.5 0 318.7 0 323.9L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-92.1c0-5.2-.6-10.4-1.9-15.5l-57-227.9C446 52 420.4 32 391 32L121 32zm0 64l270 0 48 192-51.2 0c-12.1 0-23.2 6.8-28.6 17.7l-14.3 28.6c-5.4 10.8-16.5 17.7-28.6 17.7l-120.4 0c-12.1 0-23.2-6.8-28.6-17.7l-14.3-28.6c-5.4-10.8-16.5-17.7-28.6-17.7L73 288 121 96z"],Mail:[512,512,[],"solid","M48 64C21.5 64 0 85.5 0 112c0 15.1 7.1 29.3 19.2 38.4L236.8 313.6c11.4 8.5 27 8.5 38.4 0L492.8 150.4c12.1-9.1 19.2-23.3 19.2-38.4c0-26.5-21.5-48-48-48L48 64zM0 176L0 384c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-208L294.4 339.2c-22.8 17.1-54 17.1-76.8 0L0 176z"],MailOpen:[512,512,[],"solid","M64 208.1L256 65.9 448 208.1l0 47.4L289.5 373c-9.7 7.2-21.4 11-33.5 11s-23.8-3.9-33.5-11L64 255.5l0-47.4zM256 0c-12.1 0-23.8 3.9-33.5 11L25.9 156.7C9.6 168.8 0 187.8 0 208.1L0 448c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-239.9c0-20.3-9.6-39.4-25.9-51.4L289.5 11C279.8 3.9 268.1 0 256 0z"],Mic:[384,512,[],"solid","M192 0C139 0 96 43 96 96l0 160c0 53 43 96 96 96s96-43 96-96l0-160c0-53-43-96-96-96zM64 216c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6c85.8-11.7 152-85.3 152-174.4l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 70.7-57.3 128-128 128s-128-57.3-128-128l0-40z"],MicOff:[640,512,[],"solid","M38.8 5.1C28.4-3.1 13.3-1.2 5.1 9.2S-1.2 34.7 9.2 42.9l592 464c10.4 8.2 25.5 6.3 33.7-4.1s6.3-25.5-4.1-33.7L472.1 344.7c15.2-26 23.9-56.3 23.9-88.7l0-40c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 40c0 21.2-5.1 41.1-14.2 58.7L416 300.8 416 96c0-53-43-96-96-96s-96 43-96 96l0 54.3L38.8 5.1zM344 430.4c20.4-2.8 39.7-9.1 57.3-18.2l-43.1-33.9C346.1 382 333.3 384 320 384c-70.7 0-128-57.3-128-128l0-8.7L144.7 210c-.5 1.9-.7 3.9-.7 6l0 40c0 89.1 66.2 162.7 152 174.4l0 33.6-48 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l72 0 72 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-48 0 0-33.6z"],Link:[640,512,["Chain"],"solid","M579.8 267.7c56.5-56.5 56.5-148 0-204.5c-50-50-128.8-56.5-186.3-15.4l-1.6 1.1c-14.4 10.3-17.7 30.3-7.4 44.6s30.3 17.7 44.6 7.4l1.6-1.1c32.1-22.9 76-19.3 103.8 8.6c31.5 31.5 31.5 82.5 0 114L422.3 334.8c-31.5 31.5-82.5 31.5-114 0c-27.9-27.9-31.5-71.8-8.6-103.8l1.1-1.6c10.3-14.4 6.9-34.4-7.4-44.6s-34.4-6.9-44.6 7.4l-1.1 1.6C206.5 251.2 213 330 263 380c56.5 56.5 148 56.5 204.5 0L579.8 267.7zM60.2 244.3c-56.5 56.5-56.5 148 0 204.5c50 50 128.8 56.5 186.3 15.4l1.6-1.1c14.4-10.3 17.7-30.3 7.4-44.6s-30.3-17.7-44.6-7.4l-1.6 1.1c-32.1 22.9-76 19.3-103.8-8.6C74 372 74 321 105.5 289.5L217.7 177.2c31.5-31.5 82.5-31.5 114 0c27.9 27.9 31.5 71.8 8.6 103.9l-1.1 1.6c-10.3 14.4-6.9 34.4 7.4 44.6s34.4 6.9 44.6-7.4l1.1-1.6C433.5 260.8 427 182 377 132c-56.5-56.5-148-56.5-204.5 0L60.2 244.3z"],House:[576,512,[],"solid","M575.8 255.5c0 18-15 32.1-32 32.1l-32 0 .7 160.2c0 2.7-.2 5.4-.5 8.1l0 16.2c0 22.1-17.9 40-40 40l-16 0c-1.1 0-2.2 0-3.3-.1c-1.4 .1-2.8 .1-4.2 .1L416 512l-24 0c-22.1 0-40-17.9-40-40l0-24 0-64c0-17.7-14.3-32-32-32l-64 0c-17.7 0-32 14.3-32 32l0 64 0 24c0 22.1-17.9 40-40 40l-24 0-31.9 0c-1.5 0-3-.1-4.5-.2c-1.2 .1-2.4 .2-3.6 .2l-16 0c-22.1 0-40-17.9-40-40l0-112c0-.9 0-1.9 .1-2.8l0-69.7-32 0c-18 0-32-14-32-32.1c0-9 3-17 10-24L266.4 8c7-7 15-8 22-8s15 2 21 7L564.8 231.5c8 7 12 15 11 24z"],Gamepad:[640,512,[],"solid","M192 64C86 64 0 150 0 256S86 448 192 448l256 0c106 0 192-86 192-192s-86-192-192-192L192 64zM496 168a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM392 304a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM168 200c0-13.3 10.7-24 24-24s24 10.7 24 24l0 32 32 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-32 0 0 32c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-32-32 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l32 0 0-32z"],Camera:[512,512,[],"solid","M149.1 64.8L138.7 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-74.7 0L362.9 64.8C356.4 45.2 338.1 32 317.4 32L194.6 32c-20.7 0-39 13.2-45.5 32.8zM256 192a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],Printer:[512,512,[],"solid","M128 0C92.7 0 64 28.7 64 64l0 96 64 0 0-96 226.7 0L384 93.3l0 66.7 64 0 0-66.7c0-17-6.7-33.3-18.7-45.3L400 18.7C388 6.7 371.7 0 354.7 0L128 0zM384 352l0 32 0 64-256 0 0-64 0-16 0-16 256 0zm64 32l32 0c17.7 0 32-14.3 32-32l0-96c0-35.3-28.7-64-64-64L64 192c-35.3 0-64 28.7-64 64l0 96c0 17.7 14.3 32 32 32l32 0 0 64c0 35.3 28.7 64 64 64l256 0c35.3 0 64-28.7 64-64l0-64zM432 248a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],Server:[512,512,[],"solid","M64 32C28.7 32 0 60.7 0 96l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 32zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm48 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0zM64 288c-35.3 0-64 28.7-64 64l0 64c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-64c0-35.3-28.7-64-64-64L64 288zm280 72a24 24 0 1 1 0 48 24 24 0 1 1 0-48zm56 24a24 24 0 1 1 48 0 24 24 0 1 1 -48 0z"],Calendar:[448,512,[],"solid","M96 32l0 32L48 64C21.5 64 0 85.5 0 112l0 48 448 0 0-48c0-26.5-21.5-48-48-48l-48 0 0-32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 32L160 64l0-32c0-17.7-14.3-32-32-32S96 14.3 96 32zM448 192L0 192 0 464c0 26.5 21.5 48 48 48l352 0c26.5 0 48-21.5 48-48l0-272z"],Pipette:[512,512,[],"solid","M341.6 29.2L240.1 130.8l-9.4-9.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l160 160c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3l-9.4-9.4L482.8 170.4c39-39 39-102.2 0-141.1s-102.2-39-141.1 0zM55.4 323.3c-15 15-23.4 35.4-23.4 56.6l0 42.4L5.4 462.2c-8.5 12.7-6.8 29.6 4 40.4s27.7 12.5 40.4 4L89.7 480l42.4 0c21.2 0 41.6-8.4 56.6-23.4L309.4 335.9l-45.3-45.3L143.4 411.3c-3 3-7.1 4.7-11.3 4.7L96 416l0-36.1c0-4.2 1.7-8.3 4.7-11.3L221.4 247.9l-45.3-45.3L55.4 323.3z"],Scroll:[576,512,[],"solid","M0 80l0 48c0 17.7 14.3 32 32 32l16 0 48 0 0-80c0-26.5-21.5-48-48-48S0 53.5 0 80zM112 32c10 13.4 16 30 16 48l0 304c0 35.3 28.7 64 64 64s64-28.7 64-64l0-5.3c0-32.4 26.3-58.7 58.7-58.7L480 320l0-192c0-53-43-96-96-96L112 32zM464 480c61.9 0 112-50.1 112-112c0-8.8-7.2-16-16-16l-245.3 0c-14.7 0-26.7 11.9-26.7 26.7l0 5.3c0 53-43 96-96 96l176 0 96 0z"],Smartphone:[384,512,[],"solid","M16 64C16 28.7 44.7 0 80 0L304 0c35.3 0 64 28.7 64 64l0 384c0 35.3-28.7 64-64 64L80 512c-35.3 0-64-28.7-64-64L16 64zM144 448c0 8.8 7.2 16 16 16l64 0c8.8 0 16-7.2 16-16s-7.2-16-16-16l-64 0c-8.8 0-16 7.2-16 16zM304 64L80 64l0 320 224 0 0-320z"],Settings:[512,512,[],"solid","M495.9 166.6c3.2 8.7 .5 18.4-6.4 24.6l-43.3 39.4c1.1 8.3 1.7 16.8 1.7 25.4s-.6 17.1-1.7 25.4l43.3 39.4c6.9 6.2 9.6 15.9 6.4 24.6c-4.4 11.9-9.7 23.3-15.8 34.3l-4.7 8.1c-6.6 11-14 21.4-22.1 31.2c-5.9 7.2-15.7 9.6-24.5 6.8l-55.7-17.7c-13.4 10.3-28.2 18.9-44 25.4l-12.5 57.1c-2 9.1-9 16.3-18.2 17.8c-13.8 2.3-28 3.5-42.5 3.5s-28.7-1.2-42.5-3.5c-9.2-1.5-16.2-8.7-18.2-17.8l-12.5-57.1c-15.8-6.5-30.6-15.1-44-25.4L83.1 425.9c-8.8 2.8-18.6 .3-24.5-6.8c-8.1-9.8-15.5-20.2-22.1-31.2l-4.7-8.1c-6.1-11-11.4-22.4-15.8-34.3c-3.2-8.7-.5-18.4 6.4-24.6l43.3-39.4C64.6 273.1 64 264.6 64 256s.6-17.1 1.7-25.4L22.4 191.2c-6.9-6.2-9.6-15.9-6.4-24.6c4.4-11.9 9.7-23.3 15.8-34.3l4.7-8.1c6.6-11 14-21.4 22.1-31.2c5.9-7.2 15.7-9.6 24.5-6.8l55.7 17.7c13.4-10.3 28.2-18.9 44-25.4l12.5-57.1c2-9.1 9-16.3 18.2-17.8C227.3 1.2 241.5 0 256 0s28.7 1.2 42.5 3.5c9.2 1.5 16.2 8.7 18.2 17.8l12.5 57.1c15.8 6.5 30.6 15.1 44 25.4l55.7-17.7c8.8-2.8 18.6-.3 24.5 6.8c8.1 9.8 15.5 20.2 22.1 31.2l4.7 8.1c6.1 11 11.4 22.4 15.8 34.3zM256 336a80 80 0 1 0 0-160 80 80 0 1 0 0 160z"],Map:[576,512,[],"solid","M384 476.1L192 421.2l0-385.3L384 90.8l0 385.3zm32-1.2l0-386.5L543.1 37.5c15.8-6.3 32.9 5.3 32.9 22.3l0 334.8c0 9.8-6 18.6-15.1 22.3L416 474.8zM15.1 95.1L160 37.2l0 386.5L32.9 474.5C17.1 480.8 0 469.2 0 452.2L0 117.4c0-9.8 6-18.6 15.1-22.3z"],Folder:[512,512,[],"solid","M64 480H448c35.3 0 64-28.7 64-64V160c0-35.3-28.7-64-64-64H288c-10.1 0-19.6-4.7-25.6-12.8L243.2 57.6C231.1 41.5 212.1 32 192 32H64C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64z"],FolderOpen:[576,512,[],"solid","M384 480l48 0c11.4 0 21.9-6 27.6-15.9l112-192c5.8-9.9 5.8-22.1 .1-32.1S555.5 224 544 224l-400 0c-11.4 0-21.9 6-27.6 15.9L48 357.1 48 96c0-8.8 7.2-16 16-16l117.5 0c4.2 0 8.3 1.7 11.3 4.7l26.5 26.5c21 21 49.5 32.8 79.2 32.8L416 144c8.8 0 16 7.2 16 16l0 32 48 0 0-32c0-35.3-28.7-64-64-64L298.5 96c-17 0-33.3-6.7-45.3-18.7L226.7 50.7c-12-12-28.3-18.7-45.3-18.7L64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l23.7 0L384 480z"],FolderClosed:[512,512,[],"solid","M448 480L64 480c-35.3 0-64-28.7-64-64L0 192l512 0 0 224c0 35.3-28.7 64-64 64zm64-320L0 160 0 96C0 60.7 28.7 32 64 32l128 0c20.1 0 39.1 9.5 51.2 25.6l19.2 25.6c6 8.1 15.5 12.8 25.6 12.8l160 0c35.3 0 64 28.7 64 64z"],Function:[384,512,[],"solid","M314.7 32c-38.8 0-73.7 23.3-88.6 59.1L170.7 224 64 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l80 0L98.9 396.3c-5 11.9-16.6 19.7-29.5 19.7L32 416c-17.7 0-32 14.3-32 32s14.3 32 32 32l37.3 0c38.8 0 73.7-23.3 88.6-59.1L213.3 288 320 288c17.7 0 32-14.3 32-32s-14.3-32-32-32l-80 0 45.1-108.3c5-11.9 16.6-19.7 29.5-19.7L352 96c17.7 0 32-14.3 32-32s-14.3-32-32-32l-37.3 0z"],Stop:[384,512,[],"solid","M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128z"],Image:[512,512,[],"solid","M448 80c8.8 0 16 7.2 16 16l0 319.8-5-6.5-136-176c-4.5-5.9-11.6-9.3-19-9.3s-14.4 3.4-19 9.3L202 340.7l-30.5-42.7C167 291.7 159.8 288 152 288s-15 3.7-19.5 10.1l-80 112L48 416.3l0-.3L48 96c0-8.8 7.2-16 16-16l384 0zM64 32C28.7 32 0 60.7 0 96L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-320c0-35.3-28.7-64-64-64L64 32zm80 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"],Images:[576,512,[],"solid","M160 80l352 0c8.8 0 16 7.2 16 16l0 224c0 8.8-7.2 16-16 16l-21.2 0L388.1 178.9c-4.4-6.8-12-10.9-20.1-10.9s-15.7 4.1-20.1 10.9l-52.2 79.8-12.4-16.9c-4.5-6.2-11.7-9.8-19.4-9.8s-14.8 3.6-19.4 9.8L175.6 336 160 336c-8.8 0-16-7.2-16-16l0-224c0-8.8 7.2-16 16-16zM96 96l0 224c0 35.3 28.7 64 64 64l352 0c35.3 0 64-28.7 64-64l0-224c0-35.3-28.7-64-64-64L160 32c-35.3 0-64 28.7-64 64zM48 120c0-13.3-10.7-24-24-24S0 106.7 0 120L0 344c0 75.1 60.9 136 136 136l320 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-320 0c-48.6 0-88-39.4-88-88l0-224zm208 24a32 32 0 1 0 -64 0 32 32 0 1 0 64 0z"],Info:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336l24 0 0-64-24 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l48 0c13.3 0 24 10.7 24 24l0 88 8 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-80 0c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z"],Bone:[576,512,[],"solid","M153.7 144.8c6.9 16.3 20.6 31.2 38.3 31.2l192 0c17.7 0 31.4-14.9 38.3-31.2C434.4 116.1 462.9 96 496 96c44.2 0 80 35.8 80 80c0 30.4-17 56.9-42 70.4c-3.6 1.9-6 5.5-6 9.6s2.4 7.7 6 9.6c25 13.5 42 40 42 70.4c0 44.2-35.8 80-80 80c-33.1 0-61.6-20.1-73.7-48.8C415.4 350.9 401.7 336 384 336l-192 0c-17.7 0-31.4 14.9-38.3 31.2C141.6 395.9 113.1 416 80 416c-44.2 0-80-35.8-80-80c0-30.4 17-56.9 42-70.4c3.6-1.9 6-5.5 6-9.6s-2.4-7.7-6-9.6C17 232.9 0 206.4 0 176c0-44.2 35.8-80 80-80c33.1 0 61.6 20.1 73.7 48.8z"],Puzzle:[512,512,[],"solid","M192 104.8c0-9.2-5.8-17.3-13.2-22.8C167.2 73.3 160 61.3 160 48c0-26.5 28.7-48 64-48s64 21.5 64 48c0 13.3-7.2 25.3-18.8 34c-7.4 5.5-13.2 13.6-13.2 22.8c0 12.8 10.4 23.2 23.2 23.2l56.8 0c26.5 0 48 21.5 48 48l0 56.8c0 12.8 10.4 23.2 23.2 23.2c9.2 0 17.3-5.8 22.8-13.2c8.7-11.6 20.7-18.8 34-18.8c26.5 0 48 28.7 48 64s-21.5 64-48 64c-13.3 0-25.3-7.2-34-18.8c-5.5-7.4-13.6-13.2-22.8-13.2c-12.8 0-23.2 10.4-23.2 23.2L384 464c0 26.5-21.5 48-48 48l-56.8 0c-12.8 0-23.2-10.4-23.2-23.2c0-9.2 5.8-17.3 13.2-22.8c11.6-8.7 18.8-20.7 18.8-34c0-26.5-28.7-48-64-48s-64 21.5-64 48c0 13.3 7.2 25.3 18.8 34c7.4 5.5 13.2 13.6 13.2 22.8c0 12.8-10.4 23.2-23.2 23.2L48 512c-26.5 0-48-21.5-48-48L0 343.2C0 330.4 10.4 320 23.2 320c9.2 0 17.3 5.8 22.8 13.2C54.7 344.8 66.7 352 80 352c26.5 0 48-28.7 48-64s-21.5-64-48-64c-13.3 0-25.3 7.2-34 18.8C40.5 250.2 32.4 256 23.2 256C10.4 256 0 245.6 0 232.8L0 176c0-26.5 21.5-48 48-48l120.8 0c12.8 0 23.2-10.4 23.2-23.2z"],Lock:[448,512,[],"solid","M144 144l0 48 160 0 0-48c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192l0-48C80 64.5 144.5 0 224 0s144 64.5 144 144l0 48 16 0c35.3 0 64 28.7 64 64l0 192c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64L0 256c0-35.3 28.7-64 64-64l16 0z"],LockOpen:[576,512,[],"solid","M352 144c0-44.2 35.8-80 80-80s80 35.8 80 80l0 48c0 17.7 14.3 32 32 32s32-14.3 32-32l0-48C576 64.5 511.5 0 432 0S288 64.5 288 144l0 48L64 192c-35.3 0-64 28.7-64 64L0 448c0 35.3 28.7 64 64 64l320 0c35.3 0 64-28.7 64-64l0-192c0-35.3-28.7-64-64-64l-32 0 0-48z"],Shuffle:[512,512,[],"solid","M403.8 34.4c12-5 25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-10.1 0-19.6 4.7-25.6 12.8L284 229.3 244 176l31.2-41.6C293.3 110.2 321.8 96 352 96l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6zM164 282.7L204 336l-31.2 41.6C154.7 401.8 126.2 416 96 416l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c10.1 0 19.6-4.7 25.6-12.8L164 282.7zm274.6 188c-9.2 9.2-22.9 11.9-34.9 6.9s-19.8-16.6-19.8-29.6l0-32-32 0c-30.2 0-58.7-14.2-76.8-38.4L121.6 172.8c-6-8.1-15.5-12.8-25.6-12.8l-64 0c-17.7 0-32-14.3-32-32s14.3-32 32-32l64 0c30.2 0 58.7 14.2 76.8 38.4L326.4 339.2c6 8.1 15.5 12.8 25.6 12.8l32 0 0-32c0-12.9 7.8-24.6 19.8-29.6s25.7-2.2 34.9 6.9l64 64c6 6 9.4 14.1 9.4 22.6s-3.4 16.6-9.4 22.6l-64 64z"],Play:[384,512,[],"solid","M73 39c-14.8-9.1-33.4-9.4-48.5-.9S0 62.6 0 80L0 432c0 17.4 9.4 33.4 24.5 41.9s33.7 8.1 48.5-.9L361 297c14.3-8.7 23-24.2 23-41s-8.7-32.2-23-41L73 39z"],Pause:[320,512,[],"solid","M48 64C21.5 64 0 85.5 0 112L0 400c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48L48 64zm192 0c-26.5 0-48 21.5-48 48l0 288c0 26.5 21.5 48 48 48l32 0c26.5 0 48-21.5 48-48l0-288c0-26.5-21.5-48-48-48l-32 0z"],LogIn:[512,512,[],"solid","M352 96l64 0c17.7 0 32 14.3 32 32l0 256c0 17.7-14.3 32-32 32l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0c53 0 96-43 96-96l0-256c0-53-43-96-96-96l-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32zm-9.4 182.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L242.7 224 32 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128z"],LogOut:[512,512,[],"solid","M502.6 278.6c12.5-12.5 12.5-32.8 0-45.3l-128-128c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3L402.7 224 192 224c-17.7 0-32 14.3-32 32s14.3 32 32 32l210.7 0-73.4 73.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l128-128zM160 96c17.7 0 32-14.3 32-32s-14.3-32-32-32L96 32C43 32 0 75 0 128L0 384c0 53 43 96 96 96l64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0c-17.7 0-32-14.3-32-32l0-256c0-17.7 14.3-32 32-32l64 0z"],MousePointer:[320,512,[],"solid","M0 55.2L0 426c0 12.2 9.9 22 22 22c6.3 0 12.4-2.7 16.6-7.5L121.2 346l58.1 116.3c7.9 15.8 27.1 22.2 42.9 14.3s22.2-27.1 14.3-42.9L179.8 320l118.1 0c12.2 0 22.1-9.9 22.1-22.1c0-6.3-2.7-12.3-7.4-16.5L38.6 37.9C34.3 34.1 28.9 32 23.2 32C10.4 32 0 42.4 0 55.2z"],User:[512,512,[],"solid","M256 288A144 144 0 1 0 256 0a144 144 0 1 0 0 288zm-94.7 32C72.2 320 0 392.2 0 481.3c0 17 13.8 30.7 30.7 30.7l450.6 0c17 0 30.7-13.8 30.7-30.7C512 392.2 439.8 320 350.7 320l-189.4 0z"],HardDriveDownload:[512,512,[],"solid","M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 242.7-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7 288 32zM64 352c-35.3 0-64 28.7-64 64l0 32c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-32c0-35.3-28.7-64-64-64l-101.5 0-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352 64 352zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"],HardDriveUpload:[512,512,[],"solid","M288 109.3L288 352c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-242.7-73.4 73.4c-12.5 12.5-32.8 12.5-45.3 0s-12.5-32.8 0-45.3l128-128c12.5-12.5 32.8-12.5 45.3 0l128 128c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L288 109.3zM64 352l128 0c0 35.3 28.7 64 64 64s64-28.7 64-64l128 0c35.3 0 64 28.7 64 64l0 32c0 35.3-28.7 64-64 64L64 512c-35.3 0-64-28.7-64-64l0-32c0-35.3 28.7-64 64-64zM432 456a24 24 0 1 0 0-48 24 24 0 1 0 0 48z"],CircleCheck:[512,512,["CheckCircle2"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM369 209L241 337c-9.4 9.4-24.6 9.4-33.9 0l-64-64c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l47 47L335 175c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9z"],CirclePlay:[512,512,[],"solid","M0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zM188.3 147.1c-7.6 4.2-12.3 12.3-12.3 20.9l0 176c0 8.7 4.7 16.7 12.3 20.9s16.8 4.1 24.3-.5l144-88c7.1-4.4 11.5-12.1 11.5-20.5s-4.4-16.1-11.5-20.5l-144-88c-7.4-4.5-16.7-4.7-24.3-.5z"],CirclePause:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM224 192l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32zm128 0l0 128c0 17.7-14.3 32-32 32s-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32s32 14.3 32 32z"],CirclePlus:[512,512,["PlusCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM232 344l0-64-64 0c-13.3 0-24-10.7-24-24s10.7-24 24-24l64 0 0-64c0-13.3 10.7-24 24-24s24 10.7 24 24l0 64 64 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-64 0 0 64c0 13.3-10.7 24-24 24s-24-10.7-24-24z"],CircleMinus:[512,512,["MinusCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM184 232l144 0c13.3 0 24 10.7 24 24s-10.7 24-24 24l-144 0c-13.3 0-24-10.7-24-24s10.7-24 24-24z"],CircleStop:[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM192 160l128 0c17.7 0 32 14.3 32 32l0 128c0 17.7-14.3 32-32 32l-128 0c-17.7 0-32-14.3-32-32l0-128c0-17.7 14.3-32 32-32z"],CircleDot:[512,512,[],"solid","M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256-96a96 96 0 1 1 0 192 96 96 0 1 1 0-192z"],CircleHelp:[512,512,["HelpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM169.8 165.3c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],CircleArrowUp:[512,512,["ArrowUpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM385 215c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-71-71L280 392c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-214.1-71 71c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 103c9.4-9.4 24.6-9.4 33.9 0L385 215z"],CircleArrowDown:[512,512,["ArrowDownCircle"],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM127 297c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l71 71L232 120c0-13.3 10.7-24 24-24s24 10.7 24 24l0 214.1 71-71c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 409c-9.4 9.4-24.6 9.4-33.9 0L127 297z"],CircleArrowLeft:[512,512,["ArrowLeftCircle"],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM215 127c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-71 71L392 232c13.3 0 24 10.7 24 24s-10.7 24-24 24l-214.1 0 71 71c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L103 273c-9.4-9.4-9.4-24.6 0-33.9L215 127z"],CircleArrowRight:[512,512,["ArrowRightCircle"],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM297 385c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l71-71L120 280c-13.3 0-24-10.7-24-24s10.7-24 24-24l214.1 0-71-71c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L409 239c9.4 9.4 9.4 24.6 0 33.9L297 385z"],CircleAlert:[512,512,["AlertCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm0-384c13.3 0 24 10.7 24 24l0 112c0 13.3-10.7 24-24 24s-24-10.7-24-24l0-112c0-13.3 10.7-24 24-24zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"],CircleUser:[512,512,["UserCircle"],"solid","M399 384.2C376.9 345.8 335.4 320 288 320l-64 0c-47.4 0-88.9 25.8-111 64.2c35.2 39.2 86.2 63.8 143 63.8s107.8-24.7 143-63.8zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm256 16a72 72 0 1 0 0-144 72 72 0 1 0 0 144z"],CircleChevronRight:[512,512,["ChevronRightCircle"],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zM241 377c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l87-87-87-87c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0L345 239c9.4 9.4 9.4 24.6 0 33.9L241 377z"],CircleChevronDown:[512,512,["ChevronDownCircle"],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM135 241c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l87 87 87-87c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9L273 345c-9.4 9.4-24.6 9.4-33.9 0L135 241z"],CircleChevronUp:[512,512,["ChevronUpCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM377 271c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-87-87-87 87c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 167c9.4-9.4 24.6-9.4 33.9 0L377 271z"],CircleChevronLeft:[512,512,["ChevronLeftCircle"],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM271 135c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-87 87 87 87c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0L167 273c-9.4-9.4-9.4-24.6 0-33.9L271 135z"],CircleX:[512,512,["XCircle"],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM175 175c9.4-9.4 24.6-9.4 33.9 0l47 47 47-47c9.4-9.4 24.6-9.4 33.9 0s9.4 24.6 0 33.9l-47 47 47 47c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-47-47-47 47c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9l47-47-47-47c-9.4-9.4-9.4-24.6 0-33.9z"],Apple:[384,512,[],"solid","M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"],Chrome:[512,512,[],"solid","M0 256C0 209.4 12.47 165.6 34.27 127.1L144.1 318.3C166 357.5 207.9 384 256 384C270.3 384 283.1 381.7 296.8 377.4L220.5 509.6C95.9 492.3 0 385.3 0 256zM365.1 321.6C377.4 302.4 384 279.1 384 256C384 217.8 367.2 183.5 340.7 160H493.4C505.4 189.6 512 222.1 512 256C512 397.4 397.4 511.1 256 512L365.1 321.6zM477.8 128H256C193.1 128 142.3 172.1 130.5 230.7L54.19 98.47C101 38.53 174 0 256 0C350.8 0 433.5 51.48 477.8 128V128zM168 256C168 207.4 207.4 168 256 168C304.6 168 344 207.4 344 256C344 304.6 304.6 344 256 344C207.4 344 168 304.6 168 256z"],Facebook:[512,512,[],"solid","M512 256C512 114.6 397.4 0 256 0S0 114.6 0 256C0 376 82.7 476.8 194.2 504.5V334.2H141.4V256h52.8V222.3c0-87.1 39.4-127.5 125-127.5c16.2 0 44.2 3.2 55.7 6.4V172c-6-.6-16.5-1-29.6-1c-42 0-58.2 15.9-58.2 57.2V256h83.6l-14.4 78.2H287V510.1C413.8 494.8 512 386.9 512 256h0z"],Github:[496,512,[],"solid","M165.9 397.4c0 2-2.3 3.6-5.2 3.6-3.3.3-5.6-1.3-5.6-3.6 0-2 2.3-3.6 5.2-3.6 3-.3 5.6 1.3 5.6 3.6zm-31.1-4.5c-.7 2 1.3 4.3 4.3 4.9 2.6 1 5.6 0 6.2-2s-1.3-4.3-4.3-5.2c-2.6-.7-5.5.3-6.2 2.3zm44.2-1.7c-2.9.7-4.9 2.6-4.6 4.9.3 2 2.9 3.3 5.9 2.6 2.9-.7 4.9-2.6 4.6-4.6-.3-1.9-3-3.2-5.9-2.9zM244.8 8C106.1 8 0 113.3 0 252c0 110.9 69.8 205.8 169.5 239.2 12.8 2.3 17.3-5.6 17.3-12.1 0-6.2-.3-40.4-.3-61.4 0 0-70 15-84.7-29.8 0 0-11.4-29.1-27.8-36.6 0 0-22.9-15.7 1.6-15.4 0 0 24.9 2 38.6 25.8 21.9 38.6 58.6 27.5 72.9 20.9 2.3-16 8.8-27.1 16-33.7-55.9-6.2-112.3-14.3-112.3-110.5 0-27.5 7.6-41.3 23.6-58.9-2.6-6.5-11.1-33.3 2.6-67.9 20.9-6.5 69 27 69 27 20-5.6 41.5-8.5 62.8-8.5s42.8 2.9 62.8 8.5c0 0 48.1-33.6 69-27 13.7 34.7 5.2 61.4 2.6 67.9 16 17.7 25.8 31.5 25.8 58.9 0 96.5-58.9 104.2-114.8 110.5 9.2 7.9 17 22.9 17 46.4 0 33.7-.3 75.4-.3 83.6 0 6.5 4.6 14.4 17.3 12.1C428.2 457.8 496 362.9 496 252 496 113.3 383.5 8 244.8 8zM97.2 352.9c-1.3 1-1 3.3.7 5.2 1.6 1.6 3.9 2.3 5.2 1 1.3-1 1-3.3-.7-5.2-1.6-1.6-3.9-2.3-5.2-1zm-10.8-8.1c-.7 1.3.3 2.9 2.3 3.9 1.6 1 3.6.7 4.3-.7.7-1.3-.3-2.9-2.3-3.9-2-.6-3.6-.3-4.3.7zm32.4 35.6c-1.6 1.3-1 4.3 1.3 6.2 2.3 2.3 5.2 2.6 6.5 1 1.3-1.3.7-4.3-1.3-6.2-2.2-2.3-5.2-2.6-6.5-1zm-11.4-14.7c-1.6 1-1.6 3.6 0 5.9 1.6 2.3 4.3 3.3 5.6 2.3 1.6-1.3 1.6-3.9 0-6.2-1.4-2.3-4-3.3-5.6-2z"],Youtube:[576,512,[],"solid","M549.655 124.083c-6.281-23.65-24.787-42.276-48.284-48.597C458.781 64 288 64 288 64S117.22 64 74.629 75.486c-23.497 6.322-42.003 24.947-48.284 48.597-11.412 42.867-11.412 132.305-11.412 132.305s0 89.438 11.412 132.305c6.281 23.65 24.787 41.5 48.284 47.821C117.22 448 288 448 288 448s170.78 0 213.371-11.486c23.497-6.321 42.003-24.171 48.284-47.821 11.412-42.867 11.412-132.305 11.412-132.305s0-89.438-11.412-132.305zm-317.51 213.508V175.185l142.739 81.205-142.739 81.201z"],"CircleRight@solid":[512,512,[],"solid","M0 256a256 256 0 1 0 512 0A256 256 0 1 0 0 256zm395.3 11.3l-112 112c-4.6 4.6-11.5 5.9-17.4 3.5s-9.9-8.3-9.9-14.8l0-64-96 0c-17.7 0-32-14.3-32-32l0-32c0-17.7 14.3-32 32-32l96 0 0-64c0-6.5 3.9-12.3 9.9-14.8s12.9-1.1 17.4 3.5l112 112c6.2 6.2 6.2 16.4 0 22.6z"],"CircleUp@solid":[512,512,[],"solid","M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zm11.3-395.3l112 112c4.6 4.6 5.9 11.5 3.5 17.4s-8.3 9.9-14.8 9.9l-64 0 0 96c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-96-64 0c-6.5 0-12.3-3.9-14.8-9.9s-1.1-12.9 3.5-17.4l112-112c6.2-6.2 16.4-6.2 22.6 0z"],"CircleLeft@solid":[512,512,[],"solid","M512 256A256 256 0 1 0 0 256a256 256 0 1 0 512 0zM116.7 244.7l112-112c4.6-4.6 11.5-5.9 17.4-3.5s9.9 8.3 9.9 14.8l0 64 96 0c17.7 0 32 14.3 32 32l0 32c0 17.7-14.3 32-32 32l-96 0 0 64c0 6.5-3.9 12.3-9.9 14.8s-12.9 1.1-17.4-3.5l-112-112c-6.2-6.2-6.2-16.4 0-22.6z"],"CircleDown@solid":[512,512,[],"solid","M256 0a256 256 0 1 0 0 512A256 256 0 1 0 256 0zM244.7 395.3l-112-112c-4.6-4.6-5.9-11.5-3.5-17.4s8.3-9.9 14.8-9.9l64 0 0-96c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 96 64 0c6.5 0 12.3 3.9 14.8 9.9s1.1 12.9-3.5 17.4l-112 112c-6.2 6.2-16.4 6.2-22.6 0z"],"PaperPlane@solid":[512,512,[],"solid","M498.1 5.6c10.1 7 15.4 19.1 13.5 31.2l-64 416c-1.5 9.7-7.4 18.2-16 23s-18.9 5.4-28 1.6L284 427.7l-68.5 74.1c-8.9 9.7-22.9 12.9-35.2 8.1S160 493.2 160 480l0-83.6c0-4 1.5-7.8 4.2-10.8L331.8 202.8c5.8-6.3 5.6-16-.4-22s-15.7-6.4-22-.7L106 360.8 17.7 316.6C7.1 311.3 .3 300.7 0 288.9s5.9-22.8 16.1-28.7l448-256c10.7-6.1 23.9-5.5 34 1.4z"]};function u(t,s=!0){t="light"==t?"light":"dark",document.documentElement.setAttribute("data-theme",t),s&&localStorage.setItem("lxColorScheme",t),e.emit("@on_new_color_scheme",t)}function p(){return document.documentElement.getAttribute("data-theme")??"dark"}function m(e){if(!/^#(?:[A-Fa-f0-9]{3,4}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{8})$/.test(e))throw`Invalid Hex Color: ${e}`;3!==(e=e.replace(/^#/,"")).length&&4!==e.length||(e=e.split("").map(e=>e+e).join(""));const t=parseInt(e,16);return{r:(t>>(8===e.length?24:16)&255)/255,g:(t>>(8===e.length?16:8)&255)/255,b:(t>>(8===e.length?8:0)&255)/255,a:(8===e.length?255&t:4===e.length?parseInt(e.slice(-2),16):255)/255}}function f(e){let{r:t,g:s,b:n,a:o}=e;o=o??1;const i=Math.max(t,s,n),a=i-Math.min(t,s,n);let l=0;0!==a&&(l=i===t?(s-n)/a%6:i===s?(n-t)/a+2:(t-s)/a+4,l*=60,l<0&&(l+=360));return{h:l,s:0===i?0:a/i,v:i,a:o}}e.ICONS=(()=>{const e={};for(let t in h){h[t][2].forEach(s=>e[s]=t)}return{...h,...e}})(),e.LucideIconAlias={Stop:"Square",Refresh:"RefreshCw",Left:"ChevronLeft",Right:"ChevronRight",Up:"ChevronUp",Down:"ChevronDown",MenuArrows:"ChevronsUpDown",RotateForward:"RotateCw",RotateRight:"RotateCw",RotateBack:"RotateCcw",RotateLeft:"RotateCcw"},e.clamp=function(e,t,s){return Math.min(Math.max(e,t),s)},e.round=function(e,t){return 0==t?Math.floor(e):+e.toFixed(t??2).replace(/([0-9]+(\.[0-9]+[1-9])?)(\.?0+$)/,"$1")},e.remapRange=function(e,t,s,n,o){return(e-t)*(o-n)/(s-t)+n},"undefined"!=typeof performance?e.getTime=performance.now.bind(performance):"undefined"!=typeof Date&&Date.now?e.getTime=Date.now.bind(Date):"undefined"!=typeof process?e.getTime=function(){const e=process.hrtime();return.001*e[0]+1e-6*e[1]}:e.getTime=function(){return(new Date).getTime()},e.doAsync=function(e,t){setTimeout(e,t??0)},e.flushCss=function(e){e.offsetHeight},e.deleteElement=function(e){e&&e.remove()},e.toCamelCase=function(e){return e.toLowerCase().replace(/[^a-zA-Z0-9]+(.)/g,(e,t)=>t.toUpperCase())},e.toTitleCase=function(e){return e.replace(/-/g," ").toLowerCase().replace(/\b\w/g,e=>e.toUpperCase())},e.toKebabCase=function(e){return e.replace(/[A-Z]/g,e=>"-"+e.toLowerCase())},e.getSupportedDOMName=function(e){console.assert("string"==typeof e,"getSupportedDOMName: Text is not a string!");let t=e.trim();return t=t.replace(/@/g,"_at_").replace(/\+/g,"_plus_").replace(/\./g,"_dot_"),t=t.replace(/[^a-zA-Z0-9_-]/g,"_"),/^[0-9]/.test(t)&&(t="_"+t),t},e.has=function(t){return e.extensions.indexOf(t)>-1},e.getExtension=function(e){return e.includes(".")?e.split(".").pop():null},e.stripHTML=function(e){const t=document.createElement("div");return t.innerHTML=e,t.textContent||t.innerText||""},e.parsePixelSize=function e(t,s){if(t.constructor===Number)return t;if(t.constructor===String){const n=parseFloat(t);if(t.endsWith("px"))return n;if(t.endsWith("%"))return n/100*s;if(t.endsWith("rem")||t.endsWith("em")){return n*16}if(t.endsWith("vw"))return n/100*window.innerWidth;if(t.endsWith("vh"))return n/100*window.innerHeight;if(t.startsWith("calc(")){const n=t.slice(5,-1).split(/([+\-])/);let o=0,i="+";for(let t of n)if(t=t.trim(),"+"===t||"-"===t)i=t;else{let n=e(t,s);o="+"===i?o+n:o-n}return o}}throw"Bad size format!"},e.deepCopy=function(e){return JSON.parse(JSON.stringify(e))},e.setTheme=u,e.getTheme=p,e.switchTheme=function(){u("dark"==p()?"light":"dark")},e.setSystemTheme=function(){u(window.matchMedia&&window.matchMedia("(prefers-color-scheme: light)").matches?"light":"dark"),localStorage.removeItem("lxColorScheme"),this._mqlPrefersDarkScheme&&(this._mqlPrefersDarkScheme.removeEventListener("change",this._onChangeSystemTheme),this._mqlPrefersDarkScheme.addEventListener("change",this._onChangeSystemTheme))},e.setThemeColor=function(e,t){document.querySelector(":root").style.setProperty("--"+e,t)},e.getThemeColor=function(e){const t=getComputedStyle(document.querySelector(":root")),s=t.getPropertyValue("--"+e);if(s.includes("light-dark")){return"light"==t.getPropertyValue("color-scheme")?s.substring(s.indexOf("(")+1,s.indexOf(",")).replace(/\s/g,""):s.substring(s.indexOf(",")+1,s.indexOf(")")).replace(/\s/g,"")}return s},e.switchSpacing=function(){const t=document.documentElement.getAttribute("data-spacing")??"default";document.documentElement.setAttribute("data-spacing","default"==t?"compact":"default"),e.emit("@on_new_spacing_layout",t)},e.getBase64Image=function(e){const t=document.createElement("canvas");return t.width=e.width,t.height=e.height,t.getContext("2d").drawImage(e,0,0),t.toDataURL("image/png")},e.hexToRgb=m,e.hexToHsv=function(e){return f(m(e))},e.rgbToHex=function(e,t=255){const s=[e.r,e.g,e.b];return null!=e.a&&s.push(e.a),"#"+s.map(e=>{const s=(e=Math.floor(e*t)).toString(16);return 1===s.length?"0"+s:s}).join("")},e.rgbToCss=function(e){return{r:Math.floor(255*e.r),g:Math.floor(255*e.g),b:Math.floor(255*e.b),a:e.a}},e.rgbToHsv=f,e.hsvToRgb=function(e){const{h:t,s:s,v:n,a:o}=e,i=n*s,a=i*(1-Math.abs(t/60%2-1)),l=n-i;let r=0,c=0,d=0;return t<60?(r=i,c=a,d=0):t<120?(r=a,c=i,d=0):t<180?(r=0,c=i,d=a):t<240?(r=0,c=a,d=i):t<300?(r=a,c=0,d=i):(r=i,c=0,d=a),{r:r+l,g:c+l,b:d+l,a:o}},e.dateFromDateString=function(e){const t=e.split("/"),s=parseInt(t[0]),n=parseInt(t[1]),o=parseInt(t[2]);return new Date(`${n}/${s}/${o}`)},e.measureRealWidth=function(t,s=8){var n=document.createElement("span");n.className="lexinputmeasure",n.innerHTML=t,document.body.appendChild(n);var o=n.getBoundingClientRect();return e.deleteElement(n),o.width+s},e.guidGenerator=function(){var e=function(){return(65536*(1+Math.random())|0).toString(16).substring(1)};return e()+"-"+e()+"-"+e()},e.buildTextPattern=function(e={}){let t=[];e.lowercase&&t.push("(?=.*[a-z])"),e.uppercase&&t.push("(?=.*[A-Z])"),e.digit&&t.push("(?=.*\\d)"),e.specialChar&&t.push("(?=.*[@#$%^&+=!])"),e.noSpaces&&t.push("(?!.*\\s)"),e.email&&t.push("(^[^s@]+@[^s@]+.[^s@]+$)");let s=e.minLength||0,n=e.maxLength||"",o=`^${t.join("")}.{${s},${n}}$`;return e.asRegExp?new RegExp(o):o},e.validateValueAtPattern=function(e,t={},...s){const n=[],o=t.minLength||0,i=t.maxLength;return e.length<o?n.push(`Must be at least ${o} characters long.`):void 0!==i&&e.length>i&&n.push(`Must be no more than ${i} characters long.`),t.lowercase&&!/[a-z]/.test(e)&&n.push("Must contain at least one lowercase letter (a-z)."),t.uppercase&&!/[A-Z]/.test(e)&&n.push("Must contain at least one uppercase letter (A-Z)."),t.digit&&!/\d/.test(e)&&n.push("Must contain at least one number (0-9)."),t.noSpaces&&/\s/.test(e)&&n.push("Must NOT contain any spaces."),t.specialChar&&!/[@#$%^&+=!]/.test(e)&&n.push("Must contain at least one special character (e.g., @, #, $, %, ^, &, +, =, !)."),t.email&&!/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)&&n.push("Must have a valid email format."),t.fieldMatchName&&e!==s[0]&&n.push(`Must match ${t.fieldMatchName} field.`),n},e.makeDraggable=function(t,s={}){let n=0,o=0,i=null,a=s.targetClass,l=s.dragMargin??3,r=(s,i,a)=>{const r=t.parentElement?t.parentElement.getBoundingClientRect():{x:0,y:0,width:0,height:0},c="fixed"==t.style.position?new e.vec2(r.x,r.y):new e.vec2;a=a??s.clientX-n-r.x,i=i??s.clientY-o-r.y,t.style.left=e.clamp(a,l+c.x,c.x+r.width-t.offsetWidth-l)+"px",t.style.top=e.clamp(i,l+c.y,c.y+r.height-t.offsetHeight-l)+"px",t.style.translate="none"};s.autoAdjust&&r(null,parseInt(t.style.left),parseInt(t.style.top));let c=e.guidGenerator();t["draggable-id"]=c;let d=s.onMove?e=>{i&&s.onMove&&s.onMove(i)}:e=>{i&&r(e)},h=s.onDragStart;t.setAttribute("draggable",!0),t.addEventListener("mousedown",function(e){i=e.target.classList.contains(a)||!a?e.target:null}),t.addEventListener("dragstart",function(a){if(a.preventDefault(),a.stopPropagation(),a.stopImmediatePropagation(),!i)return;var l=new Image;l.src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs=",a.dataTransfer.setDragImage(l,0,0),a.dataTransfer.effectAllowed="move";const r=a.target.getBoundingClientRect(),c=i.parentElement.getBoundingClientRect(),u="fixed"==i.style.position?new e.vec2(c.x,c.y):new e.vec2;n=a.clientX-r.x-u.x,o=a.clientY-r.y-u.y,document.addEventListener("mousemove",d),i.eventCatched=!0,(s.updateLayers??1)&&(e.activeDraggable&&(e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX),e.activeDraggable=t,e.activeDraggable.style.zIndex=e.DRAGGABLE_Z_INDEX+1),h&&h(i,a)},!1),document.addEventListener("mouseup",e=>{i&&(i=null,document.removeEventListener("mousemove",d))})},e.makeCollapsible=function(t,s,n,o={}){t.classList.add("collapsible");const i=o.collapsed??!0,a=e.makeIcon("Right");a.classList.add("collapser"),a.dataset.collapsed=i,a.style.marginLeft="auto",a.style.marginRight="0.2rem",a.addEventListener("click",function(e){e.preventDefault(),e.stopPropagation(),this.dataset.collapsed?(delete this.dataset.collapsed,s.style.display="block"):(this.dataset.collapsed=!0,s.style.display="none")}),t.appendChild(a),(n=n??t.parentElement).appendChild(s)},e.makeCodeSnippet=function(t,s,n={}){if(!e.has("CodeEditor"))return void console.error("Import the CodeEditor component to create snippets!");const o=document.createElement("div");o.className="lexcodesnippet "+(n.className??""),o.style.width=s?s[0]:"auto",o.style.height=s?s[1]:"auto";const i=new e.Area({noAppend:!0});let a=new e.CodeEditor(i,{skipInfo:!0,disableEdition:!0,allowAddScripts:!1,name:n.tabName,callback:()=>{if(n.linesAdded){const e=a.root.querySelector(".code");for(let t of n.linesAdded)if(t.constructor==Number)e.childNodes[t-1].classList.add("added");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("added")}if(n.linesRemoved){const e=a.root.querySelector(".code");for(let t of n.linesRemoved)if(t.constructor==Number)e.childNodes[t-1].classList.add("removed");else if(t.constructor==Array)for(let s=t[0]-1;s<=t[1]-1;s++)e.childNodes[s].classList.add("removed")}}});if(a.setText(t,n.language??"Plain Text"),n.windowMode){const e=document.createElement("div");e.className="lexwindowbuttons";const t=document.createElement("span");t.style.background="#ee4f50";const s=document.createElement("span");s.style.background="#f5b720";const n=document.createElement("span");n.style.background="#53ca29",e.appendChild(t),e.appendChild(s),e.appendChild(n);a.root.querySelector(".lexareatabs").prepend(e)}return(n.lineNumbers??1)||a.root.classList.add("no-gutter"),o.appendChild(i.root),o},e.makeKbd=function(t,s=!0,n=""){const o={Ctrl:"⌃",Enter:"↩",Shift:"⇧",CapsLock:"⇪",Meta:"⌘",Option:"⌥",Alt:"⌥",Tab:"⇥",ArrowUp:"↑",ArrowDown:"↓",ArrowLeft:"←",ArrowRight:"→",Space:"␣"},i=e.makeContainer(["auto","auto"],"flex flex-row ml-auto");for(const a of t)e.makeContainer(["auto","auto"],"self-center text-xs fg-secondary select-none "+n,s?o[a]??a:a,i);return i},e.makeBreadcrumb=function(t,s={}){const n=e.makeContainer(["auto","auto"],"flex flex-row gap-1"),o=s.separatorIcon??"ChevronRight",i=s.maxItems??4,a=t.length-i;if(a>0){const e={title:"...",ellipsis:t.splice(1,a+1).map(e=>e.title).join("/")};t.splice(1,0,e)}for(let s=0;s<t.length;++s){const i=t[s];if(console.assert(i.title,"Breadcrumb item must have a title!"),0!=s){const t=e.makeIcon(o,{svgClass:"sm fg-secondary separator"});n.appendChild(t)}const a=s==t.length-1,l=e.makeContainer(["auto","auto"],"p-1 flex flex-row gap-1 items-center "+(a?"":"fg-secondary"));n.appendChild(l);let r=e.makeElement("p","",i.title);if(i.icon&&l.appendChild(e.makeIcon(i.icon,{svgClass:"sm"})),void 0!==i.items){const t=e.makeContainer(["auto","auto"],""+(a?"":"fg-secondary"));t.listen("click",t=>{new e.DropdownMenu(t.target,i.items,{side:"bottom",align:"start"})}),t.append(r),l.appendChild(t)}else if(void 0!==i.url){let t=e.makeElement("a","decoration-none fg-"+(a?"primary":"secondary"),"",l);t.href=i.url,t.appendChild(r)}else l.appendChild(r);i.ellipsis&&e.asTooltip(l,i.ellipsis,{side:"bottom",offset:4})}return n},e.makeIcon=function(t,s={}){let n=null;const o=e=>{s.svgClass&&s.svgClass.length&&s.svgClass.split(" ").forEach(t=>e.classList.add(t));const n=document.createElement("a");return n.title=s.title??"",n.className="lexicon "+(s.iconClass??""),n.appendChild(e),e.dataset.name=t,n};if(t.includes("@")){const e=t.split("@");t=e[0],s.variant=e[1]}let i=e.ICONS[t];const a=lucide[t]??lucide[e.LucideIconAlias[t]];if(i){i.constructor==String&&(i=e.ICONS[i]);const l=s.variant??"regular";i=("solid"==l?e.ICONS[`${t}@solid`]:i)??i;const r=i[3];if(l==r||!a||"regular"==r){if(n=document.createElementNS("http://www.w3.org/2000/svg","svg"),n.setAttribute("viewBox",`0 0 ${i[0]} ${i[1]}`),i[5]){const e=i[5].svgClass;e?.split(" ").forEach(e=>{n.classList.add(e)});const t=i[5].svgAttributes;t?.split(" ").forEach(e=>{const t=e.split("=");n.setAttribute(t[0],t[1])})}const e=document.createElement("path");if(e.setAttribute("fill","currentColor"),e.setAttribute("d",i[4]),n.appendChild(e),i[5]){const t=i[5].pathClass;t?.split(" ").forEach(t=>{e.classList.add(t)});const s=i[5].pathAttributes;s?.split(" ").forEach(t=>{const s=t.split("=");e.setAttribute(s[0],s[1])})}const t="\x3c!-- This icon might belong to a collection from Iconify - https://iconify.design/ - or !Font Awesome Free 6.7.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2025 Fonticons, Inc. --\x3e";return n.innerHTML+=t,o(n)}}return console.assert(a,`No existing icon named _${t}_`),n=lucide.createElement(a,s),o(n)},e.registerIcon=function(t,s,n="none",o=[]){const i=(new DOMParser).parseFromString(s,"image/svg+xml").documentElement,a=i.querySelector("path"),l=i.getAttribute("viewBox").split(" "),r=a.getAttribute("d");let c=[],d=[];for(const e of i.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":c.push(`${e.name}=${e.value}`)}for(const e of a.attributes)switch(e.name){case"transform":case"fill":case"stroke-width":case"stroke-linecap":case"stroke-linejoin":d.push(`${e.name}=${e.value}`)}const h=[parseInt(l[2]),parseInt(l[3]),o,n,r,{svgAttributes:c.length?c.join(" "):null,pathAttributes:d.length?d.join(" "):null}];e.ICONS[t]&&console.warn(`${t} will be added/replaced in LX.ICONS`),e.ICONS[t]=h},e.registerCommandbarEntry=function(t,s){e.extraCommandbarEntries.push({name:t,callback:s})},e.message=function(t,s,n={}){if(!t)throw"No message to show";return n.modal=!0,new e.Dialog(s,e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})},n)},e.popup=function(t,s,n={}){if(!t)throw"No message to show";n.size=n.size??["max-content","auto"],n.class="lexpopup";const o=n.timeout||3e3,i=new e.Dialog(s,e=>{e.addTextArea(null,t,null,{disabled:!0,fitHeight:!0})},n);return setTimeout(()=>{i.close()},Math.max(o,150)),i},e.prompt=function t(s,n,o,i={}){i.modal=!0,i.className="prompt";let a="";const l=new e.Dialog(n,e=>{e.addTextArea(null,s,null,{disabled:!0,fitHeight:!0}),(i.input??1)&&e.addText(null,i.input||a,e=>a=e,{placeholder:"..."}),e.sameLine(2),e.addButton(null,"Cancel",()=>{i.on_cancel&&i.on_cancel(),l.close()}),e.addButton(null,i.accept||"Continue",()=>{i.required&&""===a?(s+=s.includes("You must fill the input text.")?"":"\nYou must fill the input text.",l.close(),t(s,n,o,i)):(o&&o.call(this,a),l.close())},{buttonClass:"primary"})},i);return(i.input??1)&&l.root.querySelector("input").focus(),l},e.toast=function(t,s,n={}){if(!t)throw"The toast needs at least a title!";console.assert(this.notifications);const o=document.createElement("li");o.className="lextoast",this.notifications.prepend(o);const[i,a]=n.position?n.position.split("-"):["bottom","right"];switch(this.notifications.style.right="unset",this.notifications.style.left="unset",this.notifications.style.top="unset",this.notifications.style.bottom="unset",this.notifications.style.placeSelf="unset",i){case"top":o.style.translate="0 -30px",this.notifications.style.top="1rem",this.notifications.style.flexDirection="column";break;case"bottom":o.style.translate="0 calc(100% + 30px)",this.notifications.style.top="auto",this.notifications.style.bottom="1rem",this.notifications.style.flexDirection="column-reverse"}switch(a){case"left":this.notifications.style.left="1rem";break;case"center":this.notifications.style.placeSelf="center";break;case"right":this.notifications.style.right="1rem"}o.classList.add(i),o.classList.add(a),e.doAsync(()=>{this.notifications.offsetWidth>this.notifications.iWidth&&(this.notifications.iWidth=Math.min(this.notifications.offsetWidth,480),this.notifications.style.width=this.notifications.iWidth+"px"),o.dataset.open=!0},10);const l=document.createElement("div");l.className="lextoastcontent",o.appendChild(l);const r=document.createElement("div");if(r.className="title",r.innerHTML=t,l.appendChild(r),s){const e=document.createElement("div");e.className="desc",e.innerHTML=s,l.appendChild(e)}if(n.action){const t=new e.Panel;t.addButton(null,n.action.name??"Accept",n.action.callback.bind(this,o),{width:"auto",maxWidth:"150px",className:"right",buttonClass:"border"}),o.appendChild(t.root.childNodes[0])}const c=this;if(o.close=function(){this.dataset.open=!1,e.doAsync(()=>{this.remove(),c.notifications.childElementCount||(c.notifications.style.width="unset",c.notifications.iWidth=0)},500)},n.closable??1){const t=e.makeIcon("X",{iconClass:"closer"});t.addEventListener("click",()=>{o.close()}),o.appendChild(t)}const d=n.timeout??3e3;-1!=d&&e.doAsync(()=>{o.close()},d)},e.badge=function(t,s,n={}){const o=document.createElement("div");if(o.innerHTML=t,o.className="lexbadge "+(s??""),n.chip&&o.classList.add("chip"),Object.assign(o.style,n.style??{}),n.callback){const t=e.makeIcon("ArrowUpRight",{svgClass:"xs fg-contrast"});t.querySelector("svg").style.marginLeft="-0.25rem",o.innerHTML+=t.innerHTML,o.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),n.callback()})}return n.parent&&(n.parent.classList.add("lexbadge-parent"),n.parent.appendChild(o)),n.asElement?o:o.outerHTML},e.makeElement=function(e,t,s,n,o={}){const i=document.createElement(e);return i.className=t??"",i.innerHTML=s??"",Object.assign(i.style,o),n&&(n.attach?n.attach(i):n.appendChild(i)),i},e.makeContainer=function(t,s,n,o,i={}){const a=e.makeElement("div","lexcontainer "+(s??""),n,o,i);return a.style.width=t&&t[0]?t[0]:"100%",a.style.height=t&&t[1]?t[1]:"100%",a},e.asTooltip=function(t,s,n={}){console.assert(t,"You need a trigger to generate a tooltip!"),t.dataset.disableTooltip=!(n.active??1);let o=null;const i=n.offset,a=n.offsetX??i??0,l=n.offsetY??i??6;t.addEventListener("mouseenter",function(i){if("true"==t.dataset.disableTooltip)return;o=document.createElement("div"),o.className="lextooltip",o.innerHTML=t.dataset.tooltipContent??s;const r=t.closest("dialog"),c=r??e.root;e.root.querySelectorAll(".lextooltip").forEach(e=>e.remove()),c.appendChild(o),e.doAsync(()=>{const s=[0,0],i=parseFloat(t.dataset.tooltipOffsetX??a),d=parseFloat(t.dataset.tooltipOffsetY??l),h=this.getBoundingClientRect();let u=!0;switch(n.side??"top"){case"left":s[0]+=h.x-o.offsetWidth-i,u=!1;break;case"right":s[0]+=h.x+h.width+i,u=!1;break;case"top":s[1]+=h.y-o.offsetHeight-d,u=!0;break;case"bottom":s[1]+=h.y+h.height+d,u=!0}if(u?s[0]+=h.x+.5*h.width-.5*o.offsetWidth+i:s[1]+=h.y+.5*h.height-.5*o.offsetHeight+d,s[0]=e.clamp(s[0],0,window.innerWidth-o.offsetWidth-4),s[1]=e.clamp(s[1],0,window.innerHeight-o.offsetHeight-4),r){let e=c.getBoundingClientRect();s[0]-=e.x,s[1]-=e.y}o.style.left=`${s[0]}px`,o.style.top=`${s[1]}px`,n.callback&&n.callback(o,t)})}),t.addEventListener("mouseleave",function(e){o&&o.remove()})},Object.assign(e,{request(e){var t=e.dataType||"text";"json"==t||"xml"==t?t="text":"binary"==t&&(t="arraybuffer",e.mimeType="application/octet-stream");var s=new XMLHttpRequest;s.open(e.data?"POST":"GET",e.url,!0),t&&(s.responseType=t),e.mimeType&&s.overrideMimeType(e.mimeType),e.nocache&&s.setRequestHeader("Cache-Control","no-cache"),s.onload=function(t){var s=this.response;if(200==this.status){if("json"==e.dataType)try{s=JSON.parse(s)}catch(n){if(!e.error)throw n;e.error(n)}else if("xml"==e.dataType)try{s=(new DOMParser).parseFromString(s,"text/xml")}catch(n){if(!e.error)throw n;e.error(n)}e.success&&e.success.call(this,s,this)}else{var n="Error "+this.status;e.error&&e.error(n)}},s.onerror=function(t){e.error&&e.error(t)};var n=new FormData;if(e.data)for(var o in e.data)n.append(o,e.data[o]);return s.send(n),s},requestText(e,t,s){return this.request({url:e,dataType:"text",success:t,error:s})},requestJSON(e,t,s){return this.request({url:e,dataType:"json",success:t,error:s})},requestBinary(e,t,s){return this.request({url:e,dataType:"binary",success:t,error:s})},requireScript(e,t,s,n,o){if(!e)throw"invalid URL";e.constructor===String&&(e=[e]);var i=e.length,a=[];for(var l in e){var r=document.createElement("script");r.num=l,r.type="text/javascript",r.src=e[l]+(o?"?version="+o:""),r.original_src=e[l],r.async=!1,r.onload=function(e){i--,a.push(this),i?n&&n(this.original_src,this.num):t&&t(a)},s&&(r.onerror=function(e){s(e,this.original_src,this.num)}),document.getElementsByTagName("head")[0].appendChild(r)}},loadScriptSync:e=>new Promise((t,s)=>{const n=document.createElement("script");n.src=e,n.async=!1,n.onload=()=>t(),n.onerror=()=>s(new Error(`Failed to load ${e}`)),document.head.appendChild(n)}),downloadURL(t,s){const n=new FileReader,o=function(e){var t=document.createElement("a");t.href=e,t.download=s,document.body.appendChild(t),t.click(),document.body.removeChild(t)};t.includes("http")?e.request({url:t,dataType:"blob",success:e=>{n.readAsDataURL(e),n.onload=e=>{o(e.currentTarget.result)}}}):o(t)},downloadFile:function(e,t,s){if(t){s||(s=t.constructor===String?"text/plain":"application/octet-stream");var n=null;n=t.constructor!==File&&t.constructor!==Blob?new Blob([t],{type:s}):t;var o=URL.createObjectURL(n),i=document.createElement("a");i.setAttribute("href",o),i.setAttribute("download",e),i.style.display="none",document.body.appendChild(i),i.click(),document.body.removeChild(i),setTimeout(function(){URL.revokeObjectURL(o)},6e4)}else console.warn("No file provided to download")}}),e.formatBytes=function(e){if(0===e)return"0 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+["B","KB","MB","GB","TB"][t]},e.compareThreshold=function(e,t,s,n){return Math.abs(e-t)>=n||Math.abs(e-s)>=n},e.compareThresholdRange=function(e,t,s,n){return e>=s&&e<=n||t>=s&&t<=n||e<=s&&t>=n},e.getControlPoints=function(e,t,s,n,o,i,a){var l=Math.sqrt(Math.pow(s-e,2)+Math.pow(n-t,2)),r=a*l/(l+Math.sqrt(Math.pow(o-s,2)+Math.pow(i-n,2))),c=a-r;return[s+r*(e-o),n+r*(t-i),s-c*(e-o),n-c*(t-i)]},e.drawSpline=function(t,s,n){t.save();for(var o=[],i=s.length,a=0;a<i-4;a+=2)o=o.concat(e.getControlPoints(s[a],s[a+1],s[a+2],s[a+3],s[a+4],s[a+5],n));for(a=2;a<s.length-5;a+=2)t.beginPath(),t.moveTo(s[a],s[a+1]),t.bezierCurveTo(o[2*a-2],o[2*a-1],o[2*a],o[2*a+1],s[a+2],s[a+3]),t.stroke(),t.closePath();t.beginPath(),t.moveTo(s[0],s[1]),t.quadraticCurveTo(o[0],o[1],s[2],s[3]),t.stroke(),t.closePath(),t.beginPath(),t.moveTo(s[i-2],s[i-1]),t.quadraticCurveTo(o[2*i-10],o[2*i-9],s[i-4],s[i-3]),t.stroke(),t.closePath(),t.restore()};class g{constructor(e,t,s={}){this.area=e,this.options=s,this.buttons={},this._buildButtons(t,s)}_buildButtons(e,t){t.className="lexoverlaybuttons";let s=this.area.addPanel(t),n=null;const o=document.createElement("div");o.className="lexoverlaybuttonscontainer",o.appendChild(s.root),this.area.attach(o);const i=t.float;let a="";if(i){for(let e=0;e<i.length;e++){switch(i[e]){case"h":case"t":case"l":break;case"v":a+=" vertical";break;case"m":a+=" middle";break;case"b":a+=" bottom";break;case"c":a+=" center";break;case"r":a+=" right"}}o.className+=` ${a}`}const l=(e,t,o)=>{const i={width:"auto",selectable:e.selectable,selected:e.selected,icon:e.icon,img:e.img,className:e.class??"",title:e.name,overflowContainerX:s.root,swap:e.swap};t&&(n||(n=document.createElement("div"),n.className="lexoverlaygroup",s.queuedContainer=n),i.parent=n);let a=e.callback,l=null;l=e.options?s.addSelect(null,e.options,e.value??e.name,a,i):s.addButton(null,e.name,function(t,s){if(e.selectable)if(e.group){let t=e.selected;e.group.forEach(e=>e.selected=!1),e.selected=!t}else e.selected=!e.selected;a&&a(t,s,l.root)},i),this.buttons[e.name]=l,n&&o&&(s.root.appendChild(n),n=null,s.clearQueue())};!function(){s.clear();for(let t of e){if(null===t){const e=document.createElement("div");e.className="lexoverlayseparator"+a,s.root.appendChild(e);continue}if(t.constructor===Array)for(let e=0;e<t.length;++e){let s=t[e];s.group=t,l(s,!0,e==t.length-1)}else l(t)}if(i){var t=0;s.root.childNodes.forEach(e=>{t+=e.offsetHeight}),o.className.includes("middle")&&(o.style.top="-moz-calc( 50% - "+.5*t+"px )",o.style.top="-webkit-calc( 50% - "+.5*t+"px )",o.style.top="calc( 50% - "+.5*t+"px )")}}()}}class C{constructor(t={}){var s=document.createElement("div");s.className="lexarea",t.id&&(s.id=t.id),t.className&&(s.className+=" "+t.className);var n=t.width||"100%",o=t.height||"100%";this.setLimitBox(t.minWidth,t.minHeight,t.maxWidth,t.maxHeight),n.constructor==Number&&(n+="px"),o.constructor==Number&&(o+="px"),s.style.width=n,s.style.height=o,this.offset=0,this.root=s,this.size=[this.root.offsetWidth,this.root.offsetHeight],this.sections=[],this.panels=[];let i=document.getElementById("lexroot");i&&!t.skipAppend&&i.appendChild(this.root),t.layout&&this.setLayout(t.layout);let a=t.overlay;if(a){this.root.classList.add("overlay-"+a),t.left?this.root.style.left=t.left:t.right?this.root.style.right=t.right:t.top?this.root.style.top=t.top:t.bottom&&(this.root.style.bottom=t.bottom);if((t.draggable??!0)&&e.makeDraggable(s,t),t.resizeable&&s.classList.add("resizeable"),t.resize){this.splitBar=document.createElement("div");let l="left"==a||"right"==a?"horizontal":"vertical";if(this.type=a,this.splitBar.className="lexsplitbar "+l,"right"==a)this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=-e.DEFAULT_SPLITBAR_SIZE/2+"px";else if("left"==a){let p=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,this.root.clientWidth);this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.left=p+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else if("top"==a){let m=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,this.root.clientHeight);this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=m+e.DEFAULT_SPLITBAR_SIZE/2+"px"}else"bottom"==a&&(this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.style.top=-e.DEFAULT_SPLITBAR_SIZE/2+"px");this.splitBar.addEventListener("mousedown",d),this.root.appendChild(this.splitBar);const r=this;let c=[0,0];function d(e){const t=r.root.ownerDocument;t.addEventListener("mousemove",h),t.addEventListener("mouseup",u),c[0]=e.x,c[1]=e.y,e.stopPropagation(),e.preventDefault(),document.body.classList.add("nocursor"),r.splitBar.classList.add("nocursor")}function h(t){switch(r.type){case"right":var s=c[0]-t.x,n=r.root.offsetWidth+s;r.root.style.width=n+"px";break;case"left":s=c[0]-t.x,n=Math.min(document.body.clientWidth-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetWidth-s);r.root.style.width=n+"px",r.splitBar.style.left=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"top":s=c[1]-t.y,n=Math.min(document.body.clientHeight-e.DEFAULT_SPLITBAR_SIZE,r.root.offsetHeight-s);r.root.style.height=n+"px",r.splitBar.style.top=n+e.DEFAULT_SPLITBAR_SIZE/2+"px";break;case"bottom":s=c[1]-t.y,n=r.root.offsetHeight+s;r.root.style.height=n+"px"}c[0]=t.x,c[1]=t.y,t.stopPropagation(),t.preventDefault(),r.onresize&&r.onresize(r.root.getBoundingClientRect())}function u(e){const t=r.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("nocursor"),r.splitBar.classList.remove("nocursor")}}}}attach(e){if(this.sections.length)return void this.sections[1].attach(e);if(!e)throw"no content to attach";e.parent=this;let t=e.root?e.root:e;this.root.appendChild(t)}setLayout(t){if(this.layout=e.deepCopy(t),!t.splits)return void console.warn("Area layout has no splits!");const s=(e,t)=>{if(t.className&&(e.root.className+=` ${t.className}`),!t.splits)return;const n=t.type??"horizontal",o=t.resize??!0,i=t.minimizable??!1,[a,l]=e.split({type:n,resize:o,minimizable:i,sizes:[t.splits[0].size,t.splits[1].size]});s(a,t.splits[0]),s(l,t.splits[1])};s(this,t)}split(t={}){this.sections.length&&(this.offset=this.root.childNodes[0].offsetHeight,this._root=this.sections[0].root,this.root=this.sections[1].root);const s=t.type??"horizontal",n=t.sizes||["50%","50%"],o="auto"===t.sizes||t.sizes&&"auto"==t.sizes[0]&&"auto"==t.sizes[1],i=this.root.getBoundingClientRect();if(!n[1]||"auto"!=n[0]&&"auto"==n[1]){let e=n[0],s=t.top?t.top:0;e.constructor==Number&&(e+=s,e+="px"),n[1]="calc( 100% - "+e+" )"}let a=t.minimizable??!1,l=(t.resize??!0)||a,r=t.fixedSize??!l,c=0,d=[],h=[];if(this.offset=0,l&&(this.resize=l,this.splitBar=document.createElement("div"),this.splitBar.className="lexsplitbar "+s,"horizontal"==s?this.splitBar.style.width=e.DEFAULT_SPLITBAR_SIZE+"px":this.splitBar.style.height=e.DEFAULT_SPLITBAR_SIZE+"px",this.splitBar.addEventListener("mousedown",function(e){const t=m.root.ownerDocument;t.addEventListener("mousemove",f),t.addEventListener("mouseup",g),e.stopPropagation(),e.preventDefault()}),c=e.DEFAULT_SPLITBAR_SIZE/2),"horizontal"==s){if(this.root.style.display="flex",r)d[0]=`calc(${n[0]} - ${c}px)`,h[0]=`calc(${n[1]} - ${c}px)`;else{const t=i.width,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${o}% - ${c}px)`}d[1]="100%",h[1]="100%"}else{if(o)d[1]="auto",h[1]="auto";else if(r)d[1]="auto"==n[0]?"auto":`calc(${n[0]} - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${n[1]} - ${c}px)`;else{const t=i.height,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${o}% - ${c}px)`}d[0]="100%",h[0]="100%"}let u=new C({width:d[0],height:d[1],skipAppend:!0,className:"split"+(t.menubar||t.sidebar?"":" origin")}),p=new C({width:h[0],height:h[1],skipAppend:!0,className:"split"});if(!(r||i.width&&i.height)){const t=new ResizeObserver(i=>{console.assert(1==i.length,"AreaResizeObserver: more than one entry");const a=i[0].contentRect;if(a.width&&a.height){if(this._update([a.width,a.height],!1),!o){if("horizontal"==s){const t=a.width,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[0]=`calc(${s}% - ${c}px)`,h[0]=`calc(${o}% - ${c}px)`}else{const t=a.height,s=e.parsePixelSize(n[0],t)/t*100,o=e.parsePixelSize(n[1],t)/t*100;d[1]="auto"==n[0]?"auto":`calc(${s}% - ${c}px)`,h[1]="auto"==n[1]?"auto":`calc(${o}% - ${c}px)`}u.root.style.width=d[0],u.root.style.height=d[1],p.root.style.width=h[0],p.root.style.height=h[1]}u._update(),p._update(),t.disconnect()}});e.doAsync(()=>{t.observe(this.root)},100)}if(o&&"vertical"==s&&(this._autoVerticalResizeObserver=new ResizeObserver(e=>{for(const t of e){const e=t.target.getComputedSize();p.root.style.height="calc(100% - "+e.height+"px )"}}),this._autoVerticalResizeObserver.observe(u.root)),l&&a&&(this.splitExtended=!1,p.root.addEventListener("animationend",t=>{const n=getComputedStyle(p.root).opacity;p.root.classList.remove(t.animationName+"-"+s),p.root.style.opacity=n,e.flushCss(p.root)}),this.splitBar.addEventListener("contextmenu",t=>{t.preventDefault(),e.addContextMenu(null,t,e=>{e.add("Extend",{disabled:this.splitExtended,callback:()=>{this.extend()}}),e.add("Reduce",{disabled:!this.splitExtended,callback:()=>{this.reduce()}})})})),u.parentArea=this,p.parentArea=this,this.root.appendChild(u.root),l&&this.root.appendChild(this.splitBar),this.root.appendChild(p.root),this.sections=[u,p],this.type=s,this._update(i.width||i.height?[i.width,i.height]:void 0),!l)return this.sections;const m=this;function f(e){const t=m.root.getBoundingClientRect();e.x<t.x||e.x>t.x+t.width||e.y<t.y||e.y>t.y+t.height||("horizontal"==m.type?m._moveSplit(-e.movementX):m._moveSplit(-e.movementY),e.stopPropagation(),e.preventDefault())}function g(e){const t=m.root.ownerDocument;t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",g)}return this.sections}setLimitBox(e=0,t=0,s=1/0,n=1/0){this.minWidth=e,this.minHeight=t,this.maxWidth=s,this.maxHeight=n,0!=e&&(this.root.style.minWidth=`${e}px`),0!=t&&(this.root.style.minHeight=`${t}px`),s!=1/0&&(this.root.style.maxWidth=`${s}px`),n!=1/0&&(this.root.style.maxHeight=`${n}px`)}setSize(t){let[s,n]=t;null!=s&&s.constructor==Number&&(s+="px"),null!=n&&n.constructor==Number&&(n+="px"),s&&(this.root.style.width=s),n&&(this.root.style.height=n),this.onresize&&this.onresize(this.root.getBoundingClientRect()),e.doAsync(()=>{this.size=[this.root.clientWidth,this.root.clientHeight],this.propagateEvent("onresize")},150)}extend(){if(this.splitExtended)return;let[t,s]=this.sections;this.splitExtended=!0,t.root.classList.add(`maximize-${this.type}`),s.root.classList.add(`minimize-${this.type}`),s.root.classList.add(`fadeout-${this.type}`),s.root.classList.remove(`fadein-${this.type}`),"vertical"==this.type?(this.offset=s.root.offsetHeight,this._moveSplit(-1/0,!0)):(this.offset=s.root.offsetWidth-8,this._moveSplit(-1/0,!0,8)),e.doAsync(()=>{this.propagateEvent("onresize")},100)}reduce(){if(!this.splitExtended)return;this.splitExtended=!1;let[t,s]=this.sections;t.root.classList.add(`minimize-${this.type}`),s.root.classList.add(`maximize-${this.type}`),s.root.classList.add(`fadein-${this.type}`),s.root.classList.remove(`fadeout-${this.type}`),this._moveSplit(this.offset),e.doAsync(()=>{this.propagateEvent("onresize")},100)}hide(){this.root.classList.add("hidden")}show(){this.root.classList.remove("hidden")}toggle(e){this.root.classList.toggle("hidden",e)}propagateEvent(e){for(let t=0;t<this.sections.length;t++){const s=this.sections[t];s[e]&&s[e].call(this,s.root.getBoundingClientRect()),s.propagateEvent(e)}}addPanel(t){let s=new e.Panel(t);return this.attach(s),this.panels.push(s),s}addMenubar(t,s={}){let n=new e.Menubar(t,s);e.menubars.push(n);const[o,i]=this.split({type:"vertical",sizes:["48px",null],resize:!1,menubar:!0});return n.siblingArea=i,o.attach(n),o.isMenubar=!0,(s.sticky??1)&&(o.root.className+=" sticky top-0"),s.parentClass&&(o.root.className+=` ${s.parentClass}`),n}addSidebar(t,s={}){let n=new e.Sidebar({callback:t,...s});t&&t(n),n.update(),e.sidebars.push(n);const o=s.side??"left";console.assert("left"==o||"right"==o,"Invalid sidebar side: "+o);const i="left"==o,a=s.width??"16rem",l=i?[a,null]:[null,a],[r,c]=this.split({type:"horizontal",sizes:l,resize:!1,sidebar:!0});n.siblingArea=i?c:r;let d=i?r:c;return d.attach(n),d.isSidebar=!0,s.parentClass&&(d.root.className+=` ${s.parentClass}`),n}addOverlayButtons(e,t={}){return this.sections.length?this.sections[1].addOverlayButtons(e,t):(console.assert(e.constructor==Array&&e.length),this.root.style.position="relative",this.overlayButtons=new g(this,e,t),this.overlayButtons)}addTabs(t={}){const s=new e.Tabs(this,t);return t.folding&&(this.parentArea._disableSplitResize(),this.root.style.paddingTop="4px"),s}_moveSplit(t,s=!1,n=0){if(!this.type)throw"No split area";if(void 0===t)return;this._autoVerticalResizeObserver&&this._autoVerticalResizeObserver.disconnect();const o=this.sections[0];var i=o.root;i.classList.contains("origin")||(i=i.parentElement);const a=this.sections[1],l=a.root,r="- "+e.DEFAULT_SPLITBAR_SIZE+"px";let c=null;if(s||(c=i.style.transition,i.style.transition=l.style.transition="none"),"horizontal"==this.type){var d=Math.max(l.offsetWidth+t,parseInt(a.minWidth));n&&(d=n);const e=d/this.size[0]*100,s=Math.max(0,100-e);i.style.width=`-moz-calc(${s}% ${r})`,i.style.width=`-webkit-calc( ${s}% ${r})`,i.style.width=`calc( ${s}% ${r})`,l.style.width=`${e}%`,l.style.width=`${e}%`,l.style.width=`${e}%`,o.maxWidth!=1/0&&(l.style.minWidth=`calc( 100% - ${parseInt(o.maxWidth)}px )`)}else{const s=this.size[1];d=Math.max(l.offsetHeight+t+a.offset,parseInt(a.minHeight));d=Math.min(s-e.DEFAULT_SPLITBAR_SIZE,d),n&&(d=n);const c=d/s*100,h=Math.max(0,100-c);i.style.height=`-moz-calc(${h}% ${r})`,i.style.height=`-webkit-calc( ${h}% ${r})`,i.style.height=`calc( ${h}% ${r})`,l.style.height=`${c}%`,l.style.height=`${c}%`,l.style.height=`${c}%`,o.maxHeight!=1/0&&(l.style.minHeight=`calc( 100% - ${parseInt(o.maxHeight)}px )`)}s||(i.style.transition=l.style.transition=c),e.doAsync(()=>{this._update(),this.propagateEvent("onresize")},10)}_disableSplitResize(){this.resize=!1,this.splitBar.remove(),delete this.splitBar}_update(e,t=!0){if(e)this.size=e;else{const e=this.root.getBoundingClientRect();this.size=[e.width,e.height]}if(t)for(var s=0;s<this.sections.length;s++)this.sections[s]._update()}}e.Area=C;class y{static NONE=0;static TEXT=1;static TEXTAREA=2;static BUTTON=3;static SELECT=4;static CHECKBOX=5;static TOGGLE=6;static RADIO=7;static BUTTONS=8;static COLOR=9;static RANGE=10;static NUMBER=11;static TITLE=12;static VECTOR=13;static TREE=14;static PROGRESS=15;static FILE=16;static LAYERS=17;static ARRAY=18;static LIST=19;static TAGS=20;static CURVE=21;static CARD=22;static IMAGE=23;static CONTENT=24;static CUSTOM=25;static SEPARATOR=26;static KNOB=27;static SIZE=28;static OTP=29;static PAD=30;static FORM=31;static DIAL=32;static COUNTER=33;static TABLE=34;static TABS=35;static DATE=36;static MAP2D=37;static LABEL=39;static BLANK=40;static RATE=41;static NO_CONTEXT_TYPES=[y.BUTTON,y.LIST,y.FILE,y.PROGRESS];constructor(t,s,n,o={}){this.type=t,this.name=s,this.options=o,this._initialValue=n;const i=document.createElement("div");if(i.className="lexcomponent",o.id&&(i.id=o.id),o.title&&(i.title=o.title),o.className&&(i.className+=" "+o.className),t!=y.TITLE&&(o.width&&(i.style.width=i.style.minWidth=o.width),o.maxWidth&&(i.style.maxWidth=o.maxWidth),o.minWidth&&(i.style.minWidth=o.minWidth),o.height&&(i.style.height=i.style.minHeight=o.height),e.componentResizeObserver.observe(i)),null!=s){if(!o.hideName){let t=document.createElement("div");t.className="lexcomponentname",o.justifyName&&t.classList.add("float-"+o.justifyName),t.innerHTML=s,t.title=o.title??t.innerHTML,t.style.width=o.nameWidth||e.DEFAULT_NAME_WIDTH,t.style.minWidth=t.style.width,i.appendChild(t),i.domName=t;const a=this;t.addEventListener("contextmenu",function(e){e.preventDefault(),a.oncontextmenu(e)}),o.skipReset||null==n||this._addResetProperty(t,function(e){a.set(a._initialValue,!1,e),this.style.display="none"})}}else o.hideName=!0;o.signal&&e.addSignal(o.signal,this),this.root=i,this.root.jsInstance=this,this.options=o}static _dispatchEvent(e,t,s,n,o){let i=new CustomEvent(t,{detail:s,bubbles:n,cancelable:o});e.dispatchEvent(i)}_addResetProperty(t,s){const n=e.makeIcon("Undo2",{iconClass:"ml-0 mr-1 px-1",title:"Reset"});return n.style.display="none",n.addEventListener("click",s),t.appendChild(n),n}_canPaste(){let e=this.type===y.CUSTOM?void 0!==navigator.clipboard.customIdx&&this.customIdx==navigator.clipboard.customIdx:navigator.clipboard.type===this.type;return e&=!0!==this.disabled,this.onAllowPaste&&(e=this.onAllowPaste(e)),e}_trigger(e,t,s=this){t&&t.call(s,e.value,e.domEvent,e.name)}value(){if(this.onGetValue)return this.onGetValue();console.warn("Can't get value of "+this.typeName())}set(e,t,s){if(this.onSetValue){let n=this.root.querySelector(".lexcomponentname .lexicon");if(n){n.style.display=e!=this.value()?"block":"none";const t=e.constructor===Array?function(e,t){if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!==t.length)return!1;for(var s=0;s<e.length;++s)if(e[s]!==t[s])return!1;return!0}(e,this._initialValue):e==this._initialValue;n.style.display=t?"none":"block"}return this.onSetValue(e,t??!1,s)}console.warn(`Can't set value of ${this.typeName()}`)}oncontextmenu(t){y.NO_CONTEXT_TYPES.includes(this.type)||e.addContextMenu(this.typeName(),t,e=>{e.add("Copy",()=>{this.copy()}),e.add("Paste",{disabled:!this._canPaste(),callback:()=>{this.paste()}})})}copy(){navigator.clipboard.type=this.type,navigator.clipboard.customIdx=this.customIdx,navigator.clipboard.data=this.value(),navigator.clipboard.writeText(navigator.clipboard.data)}paste(){this._canPaste()&&this.set(navigator.clipboard.data)}typeName(){switch(this.type){case y.TEXT:return"Text";case y.TEXTAREA:return"TextArea";case y.BUTTON:return"Button";case y.SELECT:return"Select";case y.CHECKBOX:return"Checkbox";case y.TOGGLE:return"Toggle";case y.RADIO:return"Radio";case y.COLOR:return"Color";case y.RANGE:return"Range";case y.NUMBER:return"Number";case y.VECTOR:return"Vector";case y.TREE:return"Tree";case y.PROGRESS:return"Progress";case y.FILE:return"File";case y.LAYERS:return"Layers";case y.ARRAY:return"Array";case y.LIST:return"List";case y.TAGS:return"Tags";case y.CURVE:return"Curve";case y.KNOB:return"Knob";case y.SIZE:return"Size";case y.PAD:return"Pad";case y.FORM:return"Form";case y.DIAL:return"Dial";case y.COUNTER:return"Counter";case y.TABLE:return"Table";case y.TABS:return"Tabs";case y.DATE:return"Date";case y.MAP2D:return"Map2D";case y.RATE:return"Rate";case y.LABEL:return"Label";case y.BLANK:return"Blank";case y.CUSTOM:return this.customName}console.error(`Unknown Component type: ${this.type}`)}refresh(){}}e.BaseComponent=y,e.ADD_CUSTOM_COMPONENT=function(t,s={}){let n=e.guidGenerator();e.Panel.prototype["add"+t]=function(o,i,a){const l=Array.from(arguments).slice(3);let r=new y(y.CUSTOM,o,null,s);this._attachComponent(r),r.customName=t,r.customIdx=n,r.onGetValue=()=>i,r.onSetValue=(t,s,n)=>{i=t,p(),c.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),s||r._trigger(new e.IEvent(o,i,n),a)},r.onResize=e=>{const t=r.root.domName?.style.width??"0px";d.style.width=`calc( 100% - ${t})`};const c=r.root;let d,h,u=s.default??{};const p=()=>{d&&d.remove(),h&&h.remove(),d=document.createElement("div"),d.className="lexcustomcontainer w-full",c.appendChild(d),c.dataset.opened=!1;const n=e.makeIcon(s.icon??"Box"),m=e.makeIcon("Menu");let f=t+(i?"":" [empty]"),g=this.addButton(null,f,(s,n)=>{i?(c.querySelector(".lexcustomitems").toggleAttribute("hidden"),c.dataset.opened=!c.querySelector(".lexcustomitems").hasAttribute("hidden")):e.addContextMenu(null,n,e=>{e.add("New "+t,()=>{i={},p(),c.querySelector(".lexcustomitems").toggleAttribute("hidden",!1),c.dataset.opened=!c.querySelector(".lexcustomitems").hasAttribute("hidden")})})},{buttonClass:"custom"});const v=g.root.querySelector("span");if(v.prepend(n),v.appendChild(m),d.appendChild(g.root),i&&m.addEventListener("click",t=>{t.stopImmediatePropagation(),t.stopPropagation(),e.addContextMenu(null,t,e=>{e.add("Clear",()=>{i=null,p()})})}),h=document.createElement("div"),h.className="lexcustomitems",h.toggleAttribute("hidden",!0),c.appendChild(h),i){this.queue(h);const t=(t,n,l)=>{const c=s[`_set_${t}`];c?c.call(i,n):i[t]=n,r._trigger(new e.IEvent(o,i,l),a)};for(let e in u){let n=null;const o=s[`_get_${e}`];if(n=o?i[e]?o.call(i):o.call(u):i[e]??u[e],n)switch(n.constructor){case String:"#"===n[0]?this.addColor(e,n,t.bind(this,e)):this.addText(e,n,t.bind(this,e));break;case Number:this.addNumber(e,n,t.bind(this,e));break;case Boolean:this.addCheckbox(e,n,t.bind(this,e));break;case Array:n.length>4?this.addArray(e,n,t.bind(this,e)):this._addVector(n.length,e,n,t.bind(this,e));break;default:console.warn(`Unsupported property type: ${n.constructor.name}`)}}s.onCreate&&s.onCreate.call(this,this,...l),this.clearQueue()}};p()}};class b{constructor(e,t,s){if(this.domEl=e,this.data=t,this.onevent=s.onevent,this.options=s,this.selected=[],this._forceClose=!1,t.constructor===Object)this._createItem(null,t);else for(let e of t)this._createItem(null,e)}_createItem(t,s,n=0,o){const i=this,a=this.domEl.querySelector(".lexnodetreefilter");if(s.children=s.children??[],a&&""!=a.value&&!s.id.includes(a.value)){for(var l=0;l<s.children.length;++l)this._createItem(s,s.children[l],n+1,o);return}const r=this.domEl.querySelector("ul");s.visible=s.visible??!0,s.parent=t;let c=s.children.length>0,d=this.selected.indexOf(s)>-1||s.selected;if(this.options.onlyFolders){let e=!1;s.children.forEach(t=>e|="folder"==t.type),c=!!e}let h=document.createElement("li");h.className="lextreeitem datalevel"+n+(c?" parent":"")+(d?" selected":""),h.id=e.getSupportedDOMName(s.id),h.tabIndex="0",h.treeData=s;let u=this.options.skipDefaultIcon??1?null:"Dot";if(c&&(u=s.closed?"Right":"Down"),u&&h.appendChild(e.makeIcon(u,{iconClass:"hierarchy",svgClass:"xs"})),u=s.icon,u)if(s.icon.includes(".")){const e="https://raw.githubusercontent.com/jxarco/lexgui.js/master/";h.innerHTML+="<img src='"+(e+s.icon)+"'>"}else{const t=s.icon.split(" "),n=e.makeIcon(t[0],{iconClass:"tree-item-icon mr-2",svgClass:"md"+(t.length>1?` ${t.slice(0).join(" ")}`:"")});h.appendChild(n)}h.innerHTML+=s.rename?"":s.id,h.setAttribute("draggable",!0),h.style.paddingLeft=3+15*(n+1)+"px",r.appendChild(h),h.addEventListener("click",t=>{if(m)return void(m=!1);t.shiftKey||(r.querySelectorAll("li").forEach(e=>{e.classList.remove("selected")}),this.selected.length=0);const n=this.selected.indexOf(s);if(n>-1?(h.classList.remove("selected"),this.selected.splice(n,1)):(h.classList.add("selected"),this.selected.push(s)),c&&s.id.length>1){if(s.closed=!1,i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed,t);i.onevent(n)}i.frefresh(s.id)}if(i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_SELECTED,s,this.selected,t);n.multiple=t.shiftKey,i.onevent(n)}}),h.addEventListener("dblclick",function(t){if((i.options.rename??1)&&(s.rename=!0,i.refresh()),i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_DBLCLICKED,s,null,t);i.onevent(n)}}),h.addEventListener("contextmenu",t=>{if(t.preventDefault(),!i.onevent)return;const n=new e.TreeEvent(e.TreeEvent.NODE_CONTEXTMENU,s,this.selected,t);n.multiple=this.selected.length>1,e.addContextMenu(n.multiple?"Selected Nodes":n.node.id,n.event,e=>{n.panel=e}),i.onevent(n),this.options.addDefault&&(n.panel.items&&n.panel.add(""),n.panel.add("Select Children",()=>{const e=t=>{if(!t.closed)for(let s of t.children??[]){if(!s)continue;this.domEl.querySelector("#"+s.id).classList.add("selected"),this.selected.push(s),e(s)}};this.domEl.querySelectorAll(".selected").forEach(e=>e.classList.remove("selected")),this.selected.length=0,e(s)}),n.panel.add("Delete",{callback:()=>{if(i.deleteNode(s)&&i.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_DELETED,s,[s],null);i.onevent(t)}this.refresh()}}))}),h.addEventListener("keydown",t=>{if(!s.rename)if(t.preventDefault(),"Delete"==t.key){const n=[];for(let e of this.selected)i.deleteNode(e)&&n.push(e);if(n.length&&i.onevent){const o=new e.TreeEvent(e.TreeEvent.NODE_DELETED,s,n,t);o.multiple=n.length>1,i.onevent(o)}this.selected.length=0,this.refresh()}else if("ArrowUp"==t.key||"ArrowDown"==t.key){var n=this.selected.length>1?"ArrowUp"==t.key?this.selected.shift():this.selected.pop():this.selected[0],o=this.domEl.querySelector("#"+e.getSupportedDOMName(n.id)),a="ArrowUp"==t.key?o.previousSibling:o.nextSibling;a&&a.click()}});const p=document.createElement("input");p.toggleAttribute("hidden",!s.rename),p.className="bg-none",p.value=s.id,h.appendChild(p),s.rename&&(h.classList.add("selected"),p.focus()),p.addEventListener("keyup",function(t){if("Enter"==t.key){if(this.value=this.value.replace(/\s/g,"_"),i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_RENAMED,s,this.value,t);i.onevent(n)}s.id=e.getSupportedDOMName(this.value),delete s.rename,i.frefresh(s.id),r.querySelector("#"+s.id).classList.add("selected")}else"Escape"==t.key&&(delete s.rename,i.frefresh(s.id))}),p.addEventListener("blur",function(e){delete s.rename,i.refresh()}),(this.options.draggable??1)&&(t&&h.addEventListener("dragstart",e=>{window.__tree_node_dragged=s}),h.addEventListener("dragover",e=>{e.preventDefault()},!1),h.addEventListener("dragenter",e=>{e.target.classList.add("draggingover")}),h.addEventListener("dragleave",e=>{e.target.classList.remove("draggingover")}),h.addEventListener("drop",t=>{t.preventDefault();let n=window.__tree_node_dragged;if(!n)return;let o=s;if(n.id==o.id)return void console.warn("Cannot parent node to itself!");const a=function(e,t){var s=!1;for(var n of t.children){if(n.id==e.id)return!0;s|=a(e,n)}return s};if(a(o,n))return void console.warn("Cannot parent node to a current child!");if(i.onevent){const s=new e.TreeEvent(e.TreeEvent.NODE_DRAGGED,n,o,t);i.onevent(s)}const l=n.parent.children.findIndex(e=>e.id==n.id),r=n.parent.children.splice(l,1);o.children.push(r[0]),i.refresh(),delete window.__tree_node_dragged}));let m=!1;c&&h.querySelector("a.hierarchy").addEventListener("click",function(t){if(m=!0,t.stopImmediatePropagation(),t.stopPropagation(),t.altKey){const e=function(t){for(var s of(t.closed=!t.closed,t.children))e(s)};e(s)}else s.closed=!s.closed;if(i.onevent){const n=new e.TreeEvent(e.TreeEvent.NODE_CARETCHANGED,s,s.closed,t);i.onevent(n)}i.frefresh(s.id)});const f=document.createElement("div");if(h.appendChild(f),s.actions)for(let t=0;t<s.actions.length;++t){const n=s.actions[t],o=new e.Button(null,"",(e,t)=>{t.stopPropagation(),n.callback&&n.callback(s,e,t)},{icon:n.icon,swap:n.swap,title:n.name,hideName:!0,className:"p-0 m-0",buttonClass:"p-0 m-0 bg-none"});o.root.style.minWidth="fit-content",o.root.style.margin="0",o.root.style.padding="0";const i=o.root.querySelector("button");i.style.minWidth="fit-content",i.style.margin="0",i.style.padding="0",f.appendChild(o.root)}if(!s.skipVisibility){const t=new e.Button(null,"",(t,n)=>{if(n.stopPropagation(),s.visible=void 0!==s.visible&&!s.visible,i.onevent){const t=new e.TreeEvent(e.TreeEvent.NODE_VISIBILITY,s,s.visible,n);i.onevent(t)}},{icon:s.visible?"Eye":"EyeOff",swap:s.visible?"EyeOff":"Eye",title:"Toggle visible",className:"p-0 m-0",buttonClass:"bg-none"});f.appendChild(t.root)}const g=function(e,t){if(e.id==t)return!0;let s=!1;for(var n of e?.children??[])s|=g(n,t);return s},v=g(s,o);if(!s.closed||v)for(l=0;l<s.children.length;++l){let e=s.children[l];this.options.onlyFolders&&"folder"!=e.type||this._createItem(s,e,n+1,o)}}refresh(e,t){if(this.data=e??this.data,this.domEl.querySelector("ul").innerHTML="",this.data.constructor===Object)this._createItem(null,this.data,0,t);else for(let e of this.data)this._createItem(null,e,0,t)}frefresh(e){this.refresh();var t=this.domEl.querySelector(`#${e}`);t&&t.focus()}select(e){const t=this.domEl.querySelector(".lexnodetreefilter");if(t&&(t.value=""),this.refresh(null,e),this.domEl.querySelectorAll(".selected").forEach(e=>e.classList.remove("selected")),!e)return void(this.selected.length=0);const s=this.domEl.querySelector("#"+e);console.assert(s,"NodeTree: Can't select node "+e),s.classList.add("selected"),this.selected=[s.treeData],s.focus()}deleteNode(e){const t=this.data.constructor===Array;if(e.parent){let t=e.parent.children;const s=t.indexOf(e);t.splice(s,1)}else{if(!t)return console.warn("NodeTree: Can't delete root node from object data!"),!1;{const t=this.data.indexOf(e);console.assert(t>-1,"NodeTree: Can't delete root node "+e.id+" from data array!"),this.data.splice(t,1)}}return!0}}e.NodeTree=b;e.Blank=class extends y{constructor(e,t){super(y.BLANK),this.root.style.width=e??"auto",this.root.style.height=t??"8px"}};e.Title=class extends y{constructor(t,s={}){if(console.assert(t,"Can't create Title Component without text!"),super(y.TITLE,null,null,s),this.root.className=`lextitle ${this.root.className}`,s.icon){let t=e.makeIcon(s.icon,{iconClass:"mr-2"});t.querySelector("svg").style.color=s.iconColor||"",this.root.appendChild(t)}let n=document.createElement("span");if(n.innerText=t,this.root.appendChild(n),Object.assign(this.root.style,s.style??{}),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",e.className="lextitle link",Object.assign(e.style,s.style??{}),this.root.replaceWith(e)}}};e.TextInput=class extends y{constructor(t,s,n,o={}){super(y.TEXT,t,String(s),o),this.onGetValue=()=>s,this.onSetValue=(i,l,r)=>{let c=this._lastValueTriggered==i;o.ignoreValidation||(c|=!this.valid(i)),c||(this._lastValueTriggered=s=i,a.value=i,l||this._trigger(new e.IEvent(t,i,r),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`},this.valid=(t,s)=>{if(t=t??this.value(),!o.pattern)return!0;return 0==e.validateValueAtPattern(t,o.pattern,s).length};let i=document.createElement("div");i.className=o.warning?" lexwarning":"",i.style.display="flex",i.style.position="relative",this.root.appendChild(i),this.disabled=(o.disabled||o.warning)??!!o.url;let a=null;if(this.disabled)o.url?(a=document.createElement("a"),a.href=o.url,a.target="_blank",a.innerHTML=s??"",a.style.textAlign=o.float??"",a.className="lextext ellipsis-overflow"):(a=document.createElement("input"),a.disabled=!0,a.value=s,a.style.textAlign=o.float??"",a.className="lextext ellipsis-overflow "+(o.inputClass??""));else{a=document.createElement("input"),a.className="lextext "+(o.inputClass??""),a.type=o.type||"",a.value=s||"",a.style.textAlign=o.float??"",a.setAttribute("placeholder",o.placeholder??""),o.required&&a.setAttribute("required",o.required),o.pattern&&a.setAttribute("pattern",e.buildTextPattern(o.pattern));const t=o.trigger??"default";if("default"==t?(a.addEventListener("keyup",e=>{"Enter"==e.key&&a.blur()}),a.addEventListener("focusout",e=>{this.set(e.target.value,!1,e)})):"input"==t&&a.addEventListener("input",e=>{this.set(e.target.value,!1,e)}),a.addEventListener("mousedown",function(e){e.stopImmediatePropagation(),e.stopPropagation()}),o.icon){a.style.paddingLeft="1.75rem";const t=e.makeIcon(o.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});i.appendChild(t)}}o.fit&&a.classList.add("size-content"),Object.assign(a.style,o.style??{}),i.appendChild(a),e.doAsync(this.onResize.bind(this))}};e.TextArea=class extends y{constructor(t,s,n,o={}){super(y.TEXTAREA,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,l)=>{a.value=s=o,i||this._trigger(new e.IEvent(t,o,l),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};let i=document.createElement("div");i.className="lextextarea",i.style.display="flex",this.root.appendChild(i);let a=document.createElement("textarea");a.value=s??"",a.className=o.inputClass??"",a.style.textAlign=o.float??"",Object.assign(a.style,o.style??{}),o.fitHeight&&a.classList.add("size-content"),(o.resize??1)||a.classList.add("resize-none"),i.appendChild(a),o.disabled&&(this.disabled=!0,a.setAttribute("disabled",!0)),o.placeholder&&a.setAttribute("placeholder",o.placeholder);const l=o.trigger??"default";if("default"==l?(a.addEventListener("keyup",function(e){"Enter"==e.key&&a.blur()}),a.addEventListener("focusout",e=>{this.set(e.target.value,!1,e)})):"input"==l&&a.addEventListener("input",e=>{this.set(e.target.value,!1,e)}),o.icon){const t=e.makeIcon(o.icon,{iconClass:"absolute z-1 ml-2",svgClass:"sm"});i.appendChild(t)}e.doAsync(()=>{i.style.height=o.height??"",this.onResize()},10)}};e.Button=class extends y{constructor(t,s,n,o={}){super(y.BUTTON,t,null,o),this.onGetValue=()=>{const e=i.querySelector("input");return e?e.checked:s},this.onSetValue=(t,s,n)=>{if(o.swap)this.setState(t,s);else if(i.innerHTML="",o.icon){const t=e.makeIcon(o.icon);i.prepend(t)}else if(o.img){let e=document.createElement("img");e.src=o.img,i.prepend(e)}else i.innerHTML=`<span>${t??""}</span>`},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`},this.setState=function(a,l){const r=i.querySelector("input");r?r.checked=a:o.selectable&&(o.parent&&o.parent.querySelectorAll(".lexbutton.selected").forEach(e=>{e!=i&&e.classList.remove("selected")}),i.classList.toggle("selected",a)),l||this._trigger(new e.IEvent(t,r?r.checked:o.selectable?a:s,null),n)};var i=document.createElement("button");if(i.title=o.tooltip?"":o.title??"",i.className="lexbutton p-1 "+(o.buttonClass??""),this.root.appendChild(i),o.selected&&i.classList.add("selected"),o.img){let e=document.createElement("img");e.src=o.img,i.prepend(e)}else if(o.icon){const t=e.makeIcon(o.icon,{iconClass:o.iconClass,svgClass:o.svgClass}),n=o.iconPosition??"cover";"cover"==n||void 0!==o.swap?i.prepend(t):(i.innerHTML=`<span>${s||""}</span>`,"start"==n?i.querySelector("span").prepend(t):i.querySelector("span").appendChild(t)),i.classList.add("justify-center")}else i.innerHTML=`<span>${s||""}</span>`;if(o.fileInput){const e=document.createElement("input");e.type="file",e.className="file-input",e.style.display="none",i.appendChild(e),e.addEventListener("change",function(e){const t=e.target.files;if(!t.length)return;const s=new FileReader;"text"===o.fileInputType?s.readAsText(t[0]):"buffer"===o.fileInputType?s.readAsArrayBuffer(t[0]):"bin"===o.fileInputType?s.readAsBinaryString(t[0]):"url"===o.fileInputType&&s.readAsDataURL(t[0]),s.onload=e=>{n.call(this,e.target.result,t[0])}})}o.disabled&&(this.disabled=!0,i.setAttribute("disabled",!0));let a=i;if(o.swap){i.classList.add("swap"),i.querySelector("a").classList.add("swap-off");const t=document.createElement("input");t.className="p-0 border-0",t.type="checkbox",i.prepend(t);const s=e.makeIcon(o.swap,{iconClass:"swap-on"});i.appendChild(s),this.swap=function(e){const t=i.querySelector("input");t.checked=!t.checked,e||a.click()}}a.addEventListener("click",a=>{let l;if(o.selectable&&(o.parent&&o.parent.querySelectorAll(".lexbutton.selected").forEach(e=>{e!=i&&e.classList.remove("selected")}),l=i.classList.toggle("selected")),o.fileInput)i.querySelector(".file-input").click();else if(o.mustConfirm)new e.PopConfirm(i,{onConfirm:()=>{this._trigger(new e.IEvent(t,s,a),n)},side:o.confirmSide,align:o.confirmAlign,confirmText:o.confirmText,cancelText:o.confirmCancelText,title:o.confirmTitle,content:o.confirmContent});else{const r=i.querySelector("input");this._trigger(new e.IEvent(t,r?.checked??(o.selectable?l:s),a),n)}}),o.tooltip&&e.asTooltip(i,o.title??t),e.doAsync(this.onResize.bind(this))}};e.ComboButtons=class extends y{constructor(t,s,n={}){const o=!n.noSelection;let i=o&&(n.toggle??!1),a=document.createElement("div");a.className="lexcombobuttons ",n.skipReset=!0,n.float&&(a.className+=n.float);let l=[],r=document.createElement("div");r.className="lexcombobuttonsbox ",a.appendChild(r);for(let t of s){if(!t.value)throw"Set 'value' for each button!";let s=document.createElement("button");if(s.className="lexbutton combo",s.title=t.icon?t.value:"",s.id=t.id??"",s.dataset.value=t.value,n.buttonClass&&s.classList.add(n.buttonClass),o&&(t.selected||n.selected?.includes(t.value))&&(s.classList.add("selected"),l=l.concat([t.value])),t.icon){const n=e.makeIcon(t.icon);s.appendChild(n)}else s.innerHTML=`<span>${t.value}</span>`;t.disabled&&s.setAttribute("disabled",!0),s.addEventListener("click",e=>{l=[],o&&(i?s.classList.toggle("selected"):(a.querySelectorAll("button").forEach(e=>e.classList.remove("selected")),s.classList.add("selected"))),a.querySelectorAll("button").forEach(e=>{e.classList.contains("selected")&&l.push(e.dataset.value)}),!i&&l.length>1?console.error("Enable _options.toggle_ to allow selecting multiple options in ComboButtons."):(l=l[0],this.set(t.value,!1,s.classList.contains("selected")))}),r.appendChild(s)}l.length>1?i||(n.toggle=!0,i=o,console.warn(`Multiple options selected in '${t}' ComboButtons. Enabling _toggle_ mode.`)):l=l[0],super(y.BUTTONS,t,null,n),this.onGetValue=()=>l,this.onSetValue=(n,r,c)=>{if(o&&null==c&&(a.querySelectorAll("button").forEach(e=>e.classList.remove("selected")),a.querySelectorAll("button").forEach(e=>{l&&l.indexOf(e.dataset.value)>-1&&e.classList.add("selected")})),!r&&n.constructor!=Array){const o=c,a=s.filter(e=>e.value==n)[0]?.callback;this._trigger(new e.IEvent(t,i?[n,o]:n,null),a)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`},this.root.appendChild(a),e.doAsync(this.onResize.bind(this))}};e.Card=class extends y{constructor(t,s={}){s.hideName=!0,super(y.CARD,t,null,s);let n=document.createElement("div");if(n.className="lexcard",n.style.width="100%",this.root.appendChild(n),s.img){let e=document.createElement("img");e.src=s.img,n.appendChild(e),null!=s.link&&(e.style.cursor="pointer",e.addEventListener("click",function(){const e=n.querySelector("a");e&&e.click()}))}let o=document.createElement("span");if(o.innerText=t,n.appendChild(o),null!=s.link){let e=document.createElement("a");e.innerText=t,e.href=s.link,e.target=s.target??"",o.innerText="",o.appendChild(e)}s.callback&&(n.style.cursor="pointer",n.addEventListener("click",n=>{this._trigger(new e.IEvent(t,null,n),s.callback)}))}};e.Form=class extends y{constructor(t,s,n,o={}){if(s.constructor!=Object)return void console.error("Form data must be an Object");o.hideName=!0,super(y.FORM,t,null,o),this.onGetValue=()=>i.formData,this.onSetValue=(e,t,s)=>{i.formData=e;const n=i.querySelectorAll(".lexcomponent");for(let s=0;s<n.length;++s){if(n[s].jsInstance.type!=y.TEXT)continue;let o=n[s].querySelector(".lexcomponentname").innerText,i=n[s].querySelector(".lextext input");i.value=e[o]??"",y._dispatchEvent(i,"focusout",t)}};let i=document.createElement("div");i.className="lexformdata",i.style.width="100%",i.formData={},this.root.appendChild(i);for(let t in s){let n=s[t];if(n.constructor!=Object){n={value:e.deepCopy(n)},s[t]=n}if(n.width="100%",n.placeholder=n.placeholder??n.label??`Enter ${t}`,n.ignoreValidation=!0,!o.skipLabels){const s=new e.TextInput(null,n.label??t,null,{disabled:!0,inputClass:"formlabel nobg"});i.appendChild(s.root)}n.textComponent=new e.TextInput(null,n.constructor==Object?n.value:n,e=>{i.formData[t]=e},n),i.appendChild(n.textComponent.root),i.formData[t]=n.constructor==Object?n.value:n}const a=e.makeContainer(["100%","auto"],"flex flex-row mt-2","",i);if(o.secondaryActionName||o.secondaryActionCallback){const t=new e.Button(null,o.secondaryActionName??"Cancel",(e,t)=>{o.secondaryActionCallback&&o.secondaryActionCallback(i.formData,t)},{width:"100%",minWidth:"0",buttonClass:o.secondaryButtonClass??"primary"});a.appendChild(t.root)}const l=new e.Button(null,o.primaryActionName??"Submit",(t,o)=>{const a=[];for(let t in s){let n=s[t];const o=n.pattern,l=o?.fieldMatchName?i.formData[o.fieldMatchName]:void 0;if(!n.textComponent.valid(void 0,l)){const s={entry:t,type:"input_not_valid",messages:[]};o&&(s.messages=e.validateValueAtPattern(i.formData[t],o,l)),a.push(s)}}n&&n(i.formData,a,o)},{width:"100%",minWidth:"0",buttonClass:o.primaryButtonClass??"contrast"});a.appendChild(l.root)}};class x extends y{constructor(t,s,n,o,i={}){super(y.SELECT,t,n,i),this.onGetValue=()=>n,this.onSetValue=(a,l,r)=>{n=a;let d=null;if(p.childNodes.forEach(e=>{e.classList.remove("selected"),e.getAttribute("value")==a&&(d=e)}),console.assert(d,`Item ${a} does not exist in the Select.`),d.classList.add("selected"),c.refresh(n),u){u.root.querySelector("input").value="";const e=this._filterOptions(s,"");h.refresh(e)}const m=this.root.querySelector(".lexcustomcontainer"),f=i[`on_${n}`];if(m.toggleAttribute("hidden",!f),f){m.innerHTML="";const t=new e.Panel;t.queue(m),f.call(this,t),t.clearQueue()}this.root.dataset.opened=!!f,h.style.height="",l||this._trigger(new e.IEvent(t,n,r),o)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=i.inputWidth??`calc( 100% - ${t})`};let a=document.createElement("div");a.className="lexselect",this.root.appendChild(a);let l=document.createElement("div");l.className="lexselect lexoption",l.name=t,l.iValue=n,void 0!==i.overflowContainer&&(i.overflowContainerX=i.overflowContainerY=i.overflowContainer);const r=(e,t)=>{const s=c.root,n=s.getBoundingClientRect(),o=e.parentElement.closest("dialog")??e.parentElement.closest(".lexcolorpicker");{const a=void 0!==i.overflowContainerY?i.overflowContainerY:e.getParentArea(),l=e.offsetHeight;let r=n.y,c=window.innerHeight;if(a){const e=a.getBoundingClientRect();c=e.y+e.height}if(o){const e=o.getBoundingClientRect();r-=e.y,c-=e.y}e.style.top=r+s.offsetHeight+"px",h.style.height="";const d=t?this._lastPlacement[0]:r-l<0,u=t?this._lastPlacement[1]:r+l>c;u&&!d?(e.style.top=r-l+"px",e.classList.add("place-above")):u&&d&&(h.style.height=c-r-32+"px"),this._lastPlacement=[d,u]}{const t=void 0!==i.overflowContainerX?i.overflowContainerX:e.getParentArea(),s=e.offsetWidth;let a=n.x;if(e.style.minWidth=n.width+"px",o){a-=o.getBoundingClientRect().x}e.style.left=a+"px";let l=window.innerWidth;if(t){const e=t.getBoundingClientRect();l=e.x+e.width}a+s>l&&(e.style.left=a-(s-n.width)+"px")}};let c=new e.Button(null,n,(e,t)=>{if(h.unfocus_event)return void delete h.unfocus_event;d.classList.remove("place-above");d.hasAttribute("open")?d.close():(d.show(),r(d)),u&&u.root.querySelector("input").focus()},{buttonClass:"array",skipInlineCount:!0,disabled:i.disabled});c.root.style.width="100%",c.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),a.appendChild(c.root),c.refresh=e=>{const t=c.root.querySelector("span");""==t.innerText?t.innerText=e:t.innerHTML=t.innerHTML.replaceAll(t.innerText,e)};const d=document.createElement("dialog");d.className="lexselectoptions";let h=document.createElement("ul");h.tabIndex=-1,h.className="lexoptions",d.appendChild(h),h.addEventListener("focusout",function(e){if(e.stopPropagation(),e.stopImmediatePropagation(),e.relatedTarget===c.root.querySelector("button"))this.unfocus_event=!0,setTimeout(()=>delete this.unfocus_event,200);else{if(e.relatedTarget&&d.contains(e.relatedTarget))return;if("lexinput-filter"==e.target.className)return}d.close()});let u=null;if(i.filter){const t=e.deepCopy(i);t.placeholder=t.placeholder??"Search...",t.skipComponent=t.skipComponent??!0,t.trigger="input",t.icon="Search",t.className="lexfilter",t.inputClass="outline",u=new e.TextInput(null,i.filterValue??"",e=>{const t=this._filterOptions(s,e);h.refresh(t),r(d,!0)},t),u.root.querySelector(".lextext").style.border="1px solid transparent";u.root.querySelector("input").addEventListener("focusout",function(e){e.relatedTarget&&"UL"==e.relatedTarget.tagName&&e.relatedTarget.classList.contains("lexoptions")||d.close()}),h.appendChild(u.root)}const p=document.createElement("span");p.className="lexselectinnerlist",h.appendChild(p),h.refresh=t=>{if(p.innerHTML="",!t.length){let t=i.emptyMsg??"No options found.",s=document.createElement("div");s.className="option",s.innerHTML=e.makeIcon("Inbox",{svgClass:"mr-2"}).innerHTML+t;let n=document.createElement("li");return n.className="lexselectitem empty",n.appendChild(s),void p.appendChild(n)}for(let s=0;s<t.length;s++){let o=t[s],i=document.createElement("li"),a=document.createElement("div");a.className="option",i.appendChild(a);const r=e=>{this.set(e.currentTarget.getAttribute("value"),!1,e),d.close()};if(i.addEventListener("click",r),o.constructor!=Object){const t="@"===o[0];t?(a.innerHTML="<span>"+o.substr(1)+"</span>",i.removeEventListener("click",r)):(a.innerHTML=`<span>${o}</span>`,a.appendChild(e.makeIcon("Check")),a.value=o,i.setAttribute("value",o),o==n&&(i.classList.add("selected"),l.innerHTML=o)),i.classList.add(t?"lexselectlabel":"lexselectitem")}else{let e=document.createElement("img");e.src=o.src,i.setAttribute("value",o.value),i.className="lexlistitem",a.innerText=o.value,a.className+=" media",a.prepend(e),a.setAttribute("value",o.value),a.setAttribute("data-index",s),a.setAttribute("data-src",o.src),a.setAttribute("title",o.value),n==o.value&&i.classList.add("selected")}p.appendChild(i)}},h.refresh(s),a.appendChild(d);let m=document.createElement("div");m.className="lexcustomcontainer w-full";const f=i[`on_${n}`];if(m.toggleAttribute("hidden",!f),f){m.innerHTML="";const t=new e.Panel;t.queue(m),f.call(this,t),t.clearQueue()}this.root.appendChild(m),this.root.dataset.opened=!!f,e.doAsync(this.onResize.bind(this))}_filterOptions(e,t){const s=!t.length;let n=[];for(let o=0;o<e.length;o++){let i=e[o];if(!s){let e="string"==typeof i?i:i.value;const s=t.toLowerCase();if(!e.toLowerCase().includes(s))continue}n.push(i)}return n}}e.Select=x;e.Curve=class extends y{constructor(t,s,n,o={}){let i=JSON.parse(JSON.stringify(s));super(y.CURVE,t,i,o),this.onGetValue=()=>JSON.parse(JSON.stringify(l.element.value)),this.onSetValue=(s,o,i)=>{l.element.value=JSON.parse(JSON.stringify(s)),l.redraw(),o||this._trigger(new e.IEvent(t,l.element.value,i),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};var a=document.createElement("div");a.className="lexcurve",this.root.appendChild(a),o.callback=(s,o)=>{this._trigger(new e.IEvent(t,s,o),n)},o.name=t;let l=new e.CanvasCurve(s,o);a.appendChild(l.element),this.curveInstance=l;new ResizeObserver(e=>{for(const t of e)l.canvas.width=t.contentRect.width,l.redraw()}).observe(a),e.doAsync(this.onResize.bind(this))}};e.Dial=class extends y{constructor(t,s,n,o={}){let i=JSON.parse(JSON.stringify(s));super(y.DIAL,t,i,o),this.onGetValue=()=>JSON.parse(JSON.stringify(l.element.value)),this.onSetValue=(s,o,i)=>{l.element.value=JSON.parse(JSON.stringify(s)),l.redraw(),o||this._trigger(new e.IEvent(t,l.element.value,i),n)},this.onResize=t=>{const s=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${s})`,e.flushCss(a),l.element.style.height=l.element.offsetWidth+"px",l.canvas.width=l.element.offsetWidth,a.style.width=l.element.offsetWidth+"px",l.canvas.height=l.canvas.width,l.redraw()};var a=document.createElement("div");a.className="lexcurve",this.root.appendChild(a),o.callback=(s,o)=>{this._trigger(new e.IEvent(t,s,o),n)},o.name=t;let l=new e.CanvasDial(this,s,o);a.appendChild(l.element),this.dialInstance=l,e.doAsync(this.onResize.bind(this))}};e.Layers=class extends y{constructor(t,s,n,o={}){super(y.LAYERS,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{s=o,this.setLayers(s),i||this._trigger(new e.IEvent(t,s,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};const i=document.createElement("div");i.className="lexlayers",this.root.appendChild(i);const a=o.maxBits??16;this.setLayers=e=>{i.innerHTML="";let t=e.toString(2),s=t.length;for(let e=0;e<a-s;++e)t="0"+t;for(let s=0;s<a;++s){let n=document.createElement("div");if(n.className="lexlayer",null!=e){const e=t[a-s-1];null!=e&&"1"==e&&n.classList.add("selected")}n.innerText=s+1,n.title="Bit "+s+", value "+(1<<s),i.appendChild(n),n.addEventListener("click",t=>{t.stopPropagation(),t.stopImmediatePropagation(),t.target.classList.toggle("selected");const n=e^1<<s;this.set(n,!1,t)})}},this.setLayers(s),e.doAsync(this.onResize.bind(this))}};e.ItemArray=class extends y{constructor(t,s=[],n,o={}){o.nameWidth="100%",super(y.ARRAY,t,null,o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{s=o,this._updateItems(),i||this._trigger(new e.IEvent(t,s,a),n)};let i=document.createElement("div");i.className="lexarray",i.style.width="100%",this.root.appendChild(i),this.root.dataset.opened=!1;let a=`Array (size ${s.length})`;const l=new e.Button(null,a,()=>{this.root.dataset.opened="true"!=this.root.dataset.opened,this.root.querySelector(".lexarrayitems").toggleAttribute("hidden")},{buttonClass:"array"});l.root.querySelector("span").appendChild(e.makeIcon("Down",{svgClass:"sm"})),i.appendChild(l.root);let r=document.createElement("div");r.className="lexarrayitems",r.toggleAttribute("hidden",!0),this.root.appendChild(r),this._updateItems=()=>{let i=this.root.querySelector(".lexbutton.array span");for(let e of i.childNodes)if(e.nodeType===Node.TEXT_NODE){e.textContent=`Array (size ${s.length})`;break}r.innerHTML="";for(let i=0;i<s.length;++i){const a=s[i];let l=o.innerValues?"select":a.constructor,c=null;switch(l){case String:c=new e.TextInput(i+"",a,function(e,t){s[i]=e,n(s)},{nameWidth:"12px",className:"p-0",skipReset:!0});break;case Number:c=new L(i+"",a,function(e,t){s[i]=e,n(s)},{nameWidth:"12px",className:"p-0",skipReset:!0});break;case"select":c=new x(i+"",o.innerValues,a,function(e,t){s[i]=e,n(s)},{nameWidth:"12px",className:"p-0",skipReset:!0})}console.assert(c,`Value of type ${l} cannot be modified in ItemArray`),r.appendChild(c.root);const d=new e.Button(null,"",(o,i)=>{s.splice(s.indexOf(a),1),this._updateItems(),this._trigger(new e.IEvent(t,s,i),n)},{title:"Remove item",icon:"Trash3"});c.root.appendChild(d.root)}const a=new e.Button(null,e.makeIcon("Plus",{svgClass:"sm"}).innerHTML+"Add item",(i,a)=>{s.push(o.innerValues?o.innerValues[0]:""),this._updateItems(),this._trigger(new e.IEvent(t,s,a),n)},{buttonClass:"array"});r.appendChild(a.root)},this._updateItems()}};e.List=class extends y{constructor(t,s,n,o,i={}){super(y.LIST,t,n,i),this.onGetValue=()=>n,this.onSetValue=(i,l,r)=>{a.querySelectorAll(".lexlistitem").forEach(e=>e.classList.remove("selected"));let c=null;for(let e=0;e<s.length;++e){const t=s[e];if(t==i||t.constructor==Array&&t[0]==i){c=e;break}}c?(a.children[c].classList.toggle("selected"),n=i,l||this._trigger(new e.IEvent(t,i,r),o)):console.error(`Cannot find item ${i} in List.`)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`},this._updateValues=i=>{s=i,a.innerHTML="";for(let i=0;i<s.length;++i){let l=null,r=s[i];r.constructor===Array&&(l=r[1],r=r[0]);let c=document.createElement("div");c.className="lexlistitem"+(n==r?" selected":""),l&&c.appendChild(e.makeIcon(l)),c.innerHTML+=`<span>${r}</span>`,c.addEventListener("click",s=>{a.querySelectorAll(".lexlistitem").forEach(e=>e.classList.remove("selected")),c.classList.toggle("selected"),n=r,this._trigger(new e.IEvent(t,r,s),o)}),a.appendChild(c)}};let a=document.createElement("div");a.className="lexlist",this.root.appendChild(a),this._updateValues(s),e.doAsync(this.onResize.bind(this))}};e.Tags=class extends y{constructor(t,s,n,o={}){s=s.replace(/\s/g,"").split(",");let i=[].concat(s);super(y.TAGS,t,i,o),this.onGetValue=()=>[].concat(s),this.onSetValue=(o,i,a)=>{s=[].concat(o),this.generateTags(s),i||this._trigger(new e.IEvent(t,s,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};const a=document.createElement("div");a.className="lextags",this.root.appendChild(a),this.generateTags=t=>{a.innerHTML="";for(let s=0;s<t.length;++s){const n=t[s],o=document.createElement("span");o.className="lextag",o.innerHTML=n;const i=e.makeIcon("X",{svgClass:"sm"});o.appendChild(i),i.addEventListener("click",e=>{o.remove(),t.splice(t.indexOf(n),1),this.set(t,!1,e)}),a.appendChild(o)}let s=document.createElement("input");s.value="",s.placeholder="Add tag...",a.appendChild(s),s.onkeydown=e=>{const n=s.value.replace(/\s/g,"");if(" "==e.key||"Enter"==e.key){if(e.preventDefault(),!n.length||t.indexOf(n)>-1)return;t.push(n),this.set(t,!1,e)}},s.focus()},this.generateTags(s),e.doAsync(this.onResize.bind(this))}};e.Checkbox=class extends y{constructor(t,s,n,o={}){if(!t&&!o.label)throw"Set Component Name or at least a label!";super(y.CHECKBOX,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,l)=>{o!=s&&(a.checked=s=o,this.root.querySelector(".lexcheckboxsubmenu")?.toggleAttribute("hidden",!o),i||this._trigger(new e.IEvent(t,o,l),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexcheckboxcont",this.root.appendChild(i);let a=document.createElement("input");a.type="checkbox",a.className="lexcheckbox "+(o.className??"primary"),a.checked=s,a.disabled=o.disabled??!1,i.appendChild(a);let l=document.createElement("span");if(l.className="checkboxtext",l.innerHTML=o.label??"On",i.appendChild(l),a.addEventListener("change",e=>{this.set(a.checked,!1,e)}),o.suboptions){let t=document.createElement("div");t.className="lexcheckboxsubmenu",t.toggleAttribute("hidden",!a.checked);const s=new e.Panel;s.queue(t),o.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.Toggle=class extends y{constructor(t,s,n,o={}){if(!t&&!o.label)throw"Set Component Name or at least a label!";super(y.TOGGLE,t,s,o),this.onGetValue=()=>a.checked,this.onSetValue=(o,i,l)=>{o!=s&&(a.checked=s=o,this.root.querySelector(".lextogglesubmenu")?.toggleAttribute("hidden",!o),i||this._trigger(new e.IEvent(t,o,l),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lextogglecont",this.root.appendChild(i);let a=document.createElement("input");a.type="checkbox",a.className="lextoggle "+(o.className??""),a.checked=s,a.iValue=s,a.disabled=o.disabled??!1,i.appendChild(a);let l=document.createElement("span");if(l.className="toggletext",l.innerHTML=o.label??"On",i.appendChild(l),a.addEventListener("change",e=>{this.set(a.checked,!1,e)}),o.suboptions){let t=document.createElement("div");t.className="lextogglesubmenu",t.toggleAttribute("hidden",!a.checked);const s=new e.Panel;s.queue(t),o.suboptions.call(this,s),s.clearQueue(),this.root.appendChild(t)}e.doAsync(this.onResize.bind(this))}};e.RadioGroup=class extends y{constructor(t,s,n,o,i={}){super(y.RADIO,t,null,i);let a=null;this.onGetValue=()=>{const e=l.querySelectorAll("button");return a?[a,e[a]]:void 0},this.onSetValue=(t,s,i)=>{t=t[0]??t,console.assert(t.constructor==Number,"RadioGroup _value_ must be an Array index!");const a=l.querySelectorAll("button");a.forEach(e=>{e.checked=!1,e.classList.remove("checked")});const r=a[t];r.checked=!r.checked,r.classList.toggle("checked"),s||this._trigger(new e.IEvent(null,[t,n[t]],i),o)};var l=document.createElement("div");l.className="lexradiogroup "+(i.className??""),this.root.appendChild(l);let r=document.createElement("span");r.innerHTML=s,l.appendChild(r);for(let e=0;e<n.length;++e){const t=document.createElement("div");t.className="lexradiogroupitem",l.appendChild(t);const s=document.createElement("button");s.className="flex p-0 rounded-lg cursor-pointer",s.disabled=i.disabled??!1,t.appendChild(s),s.addEventListener("click",t=>{this.set(e,!1,t)});const o=document.createElement("span");s.appendChild(o);const a=document.createElement("span");a.innerHTML=n[e],t.appendChild(a)}i.selected&&(console.assert(i.selected.constructor==Number,"RadioGroup _selected_ must be an Array index!"),a=i.selected,this.set(a,!0))}};e.ColorInput=class extends y{constructor(t,s,n,o={}){s=s??"#000000";const i=o.useAlpha??(s.constructor===Object&&"a"in s||s.constructor===String&&[5,9].includes(s.length)),a=new e.Color(s);s=i?a.hex:a.hex.substr(0,7),super(y.COLOR,t,s,o),this.onGetValue=()=>{const t=new e.Color(s);return o.useRGB?t.rgb:s},this.onSetValue=(a,l,r)=>{const u=new e.Color(a);if(c.style.color=s=u.hex.substr(0,7),i&&(d.style.color=s=u.hex),this._skipTextUpdate||h.set(s,!0,r),!l){let a=s;o.useRGB&&(a=u.rgb,i||delete a.a),this._trigger(new e.IEvent(t,a,r),n)}},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};var l=document.createElement("span");l.className="lexcolor",this.root.appendChild(l),this.picker=new e.ColorPicker(s,{colorModel:o.useRGB?"RGB":"Hex",useAlpha:i,onChange:e=>{this.set(e.hex)}});let r=e.makeContainer(["18px","18px"],"flex flex-row bg-contrast rounded overflow-hidden","",l);r.tabIndex="1",r.addEventListener("click",t=>{o.disabled||(this._popover=new e.Popover(r,[this.picker]))});let c=document.createElement("div");c.className="lexcolorsample",c.style.color=s,r.appendChild(c);let d=null;i?(d=document.createElement("div"),d.className="lexcolorsample",d.style.color=s,r.appendChild(d)):c.style.width="18px";const h=new e.TextInput(null,s,e=>{this._skipTextUpdate=!0,this.set(e),delete this._skipTextUpdate,this.picker.fromHexColor(e)},{width:"calc( 100% - 24px )",disabled:o.disabled});h.root.style.marginLeft="6px",l.appendChild(h.root),e.doAsync(this.onResize.bind(this))}};e.RangeInput=class extends y{constructor(t,s,n,o={}){const i=e.deepCopy(s);super(y.RANGE,t,e.deepCopy(i),o);const a=s.constructor==Array&&2==s.length;a&&(s=i[0],o.fill=!1),this.onGetValue=()=>{let e=s;return a?e=[s,i[1]]:o.left&&(e=+r.max-s+ +r.min),e},this.onSetValue=(c,d,h)=>{let u="";const p=o.max-o.min;if(a){r.value=s=e.clamp(+c[0],+r.min,+r.max),this._maxSlider.value=i[1]=e.clamp(+c[1],+r.min,+r.max);const t=s/p-.5,n=i[1]/p-.5,a=e.remapRange(s,o.min,o.max,0,1),d=e.remapRange(i[1],o.min,o.max,0,1);r.style.setProperty("--range-min-value",100*a+"%"),r.style.setProperty("--range-max-value",100*d+"%"),r.style.setProperty("--range-fix-min-offset",-t+"rem"),r.style.setProperty("--range-fix-max-offset",`${n}rem`),l.dataset.tooltipOffsetX=l.offsetWidth*a+l.offsetWidth*(d-a)*.5-.5*l.offsetWidth,u=`${s} - ${i[1]}`}else{if(isNaN(c))return;r.value=s=e.clamp(+c,+r.min,+r.max);const t=.5*e.remapRange(s,o.min,o.max,0,1);l.dataset.tooltipOffsetX=l.offsetWidth*t-.5*l.offsetWidth,u=`${s}`}if(l.dataset.tooltipContent=u,this._labelTooltip&&(this._labelTooltip.innerHTML=u),!d){let l=s;a?l=[s,i[1]]:o.left&&(l=+r.max-s+ +r.min),this._trigger(new e.IEvent(t,l,h),n)}},this.onResize=t=>{const n=this.root.domName?.style.width??"0px";if(l.style.width=o.inputWidth??`calc( 100% - ${n})`,a){const t=o.max-o.min,n=s/t-.5,a=i[1]/t-.5;r.style.setProperty("--range-min-value",100*e.remapRange(s,o.min,o.max,0,1)+"%"),r.style.setProperty("--range-max-value",100*e.remapRange(i[1],o.min,o.max,0,1)+"%"),r.style.setProperty("--range-fix-min-offset",-n+"rem"),r.style.setProperty("--range-fix-max-offset",`${a}rem`)}};const l=document.createElement("div");l.className="lexrange relative",this.root.appendChild(l);let r=document.createElement("input");if(r.className="lexrangeslider "+(a?"pointer-events-none ":"")+(o.className??""),r.min=o.min??0,r.max=o.max??100,r.step=o.step??1,r.type="range",r.disabled=o.disabled??!1,s.constructor==Number&&(s=e.clamp(s,+r.min,+r.max)),o.left&&(s=+r.max-s+ +r.min,r.classList.add("left")),(o.fill??1)||r.classList.add("no-fill"),r.value=s,l.appendChild(r),r.addEventListener("input",e=>{this.set(a?[Math.min(e.target.valueAsNumber,i[1]),i[1]]:e.target.valueAsNumber,!1,e)},{passive:!1}),a||(r.addEventListener("mousedown",function(e){o.onPress&&o.onPress.bind(r)(e,r)},!1),r.addEventListener("mouseup",function(e){o.onRelease&&o.onRelease.bind(r)(e,r)},!1)),this.setLimits=(e,t,s)=>{r.min=e??r.min,r.max=t??r.max,r.step=s??r.step,y._dispatchEvent(r,"input",!0)},e.doAsync(()=>{this.onResize();let t=0;if(a){const n=e.remapRange(s,o.min,o.max,0,1),a=e.remapRange(i[1],o.min,o.max,0,1);t=l.offsetWidth*n+l.offsetWidth*(a-n)*.5-.5*l.offsetWidth}else{const n=.5*e.remapRange(s,o.min,o.max,0,1);t=l.offsetWidth*n-.5*l.offsetWidth}e.asTooltip(l,`${s}${a?`- ${i[1]}`:""}`,{offsetX:t,callback:e=>{this._labelTooltip=e}})}),i.constructor==Array){let t=document.createElement("input");t.className="lexrangeslider no-fill pointer-events-none overlap absolute top-0 left-0 "+(o.className??""),t.min=o.min??0,t.max=o.max??100,t.step=o.step??1,t.type="range",t.disabled=o.disabled??!1,this._maxSlider=t;let n=i[1];t.value=n=e.clamp(n,+t.min,+t.max),l.appendChild(t),t.addEventListener("input",e=>{i[1]=Math.max(s,+e.target.valueAsNumber),this.set([s,i[1]],!1,e)},{passive:!1})}}};class L extends y{constructor(t,s,n,o={}){super(y.NUMBER,t,s,o),this.onGetValue=()=>s,this.onSetValue=(i,l,c)=>{isNaN(i)||(s=e.clamp(+i,+r.min,+r.max),r.value=s=e.round(s,o.precision),a.querySelector(".lexinputslider")&&(a.querySelector(".lexinputslider").value=s),l||this._trigger(new e.IEvent(t,s,c),n))},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=o.inputWidth??`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexnumber",this.root.appendChild(i);let a=document.createElement("div");a.className="numberbox",i.appendChild(a);let l=e.makeContainer(["auto","100%"],"relative flex flex-row cursor-text","",a),r=document.createElement("input");r.id="number_"+e.guidGenerator(),r.className="vecinput",r.min=o.min??-1e24,r.max=o.max??1e24,r.step=o.step??"any",r.type="number",s.constructor==Number&&(s=e.clamp(s,+r.min,+r.max),s=e.round(s,o.precision)),r.value=r.iValue=s,l.appendChild(r);const c=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});if(l.appendChild(c),o.units){let t=e.makeContainer(["auto","auto"],"px-2 bg-secondary content-center",o.units,l,{"word-break":"keep-all"});r.unitBox=t}if(o.disabled&&(this.disabled=r.disabled=!0),!o.skipSlider&&void 0!==o.min&&void 0!==o.max){let t=e.makeContainer(["100%","auto"],"z-1 input-box","",a),n=document.createElement("input");n.className="lexinputslider",n.min=o.min,n.max=o.max,n.step=o.step??1,n.type="range",n.value=s,n.disabled=this.disabled,n.addEventListener("input",e=>{this.set(n.valueAsNumber,!1,e)},!1),n.addEventListener("mousedown",function(e){o.onPress&&o.onPress.bind(n)(e,n)},!1),n.addEventListener("mouseup",function(e){o.onRelease&&o.onRelease.bind(n)(e,n)},!1),t.appendChild(n),this.setLimits=(e,t,o)=>{r.min=n.min=e??r.min,r.max=n.max=t??r.max,r.step=o??r.step,n.step=o??n.step,this.set(s,!0)}}r.addEventListener("input",function(t){s=+this.valueAsNumber,s=e.round(s,o.precision)},!1),r.addEventListener("wheel",e=>{if(e.preventDefault(),r!==document.activeElement)return;let t=o.step??1;e.shiftKey?t*=10:e.altKey&&(t*=.1),s=+r.valueAsNumber-t*(e.deltaY>0?1:-1),this.set(s,!1,e)},{passive:!1}),r.addEventListener("change",e=>{this.set(r.valueAsNumber,!1,e)},{passive:!1});var d=this;let h=e=>{let t=-e.movementY;if(0!=t){let n=o.step??1;e.shiftKey?n*=10:e.altKey&&(n*=.1),s=+r.valueAsNumber+n*t,this.set(s,!1,e)}e.stopPropagation(),e.preventDefault()},u=e=>{var t=d.root.ownerDocument;t.removeEventListener("mousemove",h),t.removeEventListener("mouseup",u),document.body.classList.remove("noevents"),c.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),o.onRelease&&o.onRelease.bind(r)(e,r)};l.addEventListener("mousedown",t=>{if(document.activeElement!=r&&t.button==e.MOUSE_LEFT_CLICK){var s=d.root.ownerDocument;s.addEventListener("mousemove",h),s.addEventListener("mouseup",u),document.body.classList.add("noevents"),c.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||l.requestPointerLock(),o.onPress&&o.onPress.bind(r)(t,r)}}),e.doAsync(this.onResize.bind(this))}}e.NumberInput=L;e.Vector=class extends y{constructor(t,s,n,o,i={}){t=e.clamp(t,2,4),n=n??new Array(t).fill(0),super(y.VECTOR,s,[].concat(n),i),this.onGetValue=()=>{let e=this.root.querySelectorAll("input[type='number']"),t=[];for(var s of e)t.push(+s.value);return t},this.onSetValue=(t,l,r)=>{if(a.length==t.length){for(let s=0;s<a.length;++s){let o=t[s];o=e.clamp(o,+a[s].min,+a[s].max),o=e.round(o,i.precision)??0,a[s].value=n[s]=o}l||this._trigger(new e.IEvent(s,n,r),o)}else console.error("Input length does not match vector length.")},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};const a=[];var l=document.createElement("div");l.className="lexvector",this.root.appendChild(l),this.disabled=i.disabled??!1;const r=this;for(let d=0;d<t;++d){let h=document.createElement("div");h.className="vecbox",h.innerHTML="<span class='"+e.Panel.VECTOR_COMPONENTS[d]+"'></span>";let u=document.createElement("input");u.className="vecinput v"+t,u.min=i.min??-1e24,u.max=i.max??1e24,u.step=i.step??"any",u.type="number",u.id="vec"+t+"_"+e.guidGenerator(),u.idx=d,a[d]=u,h.appendChild(u),n[d].constructor==Number&&(n[d]=e.clamp(n[d],+u.min,+u.max),n[d]=e.round(n[d],i.precision)),u.value=u.iValue=n[d];const p=e.makeIcon("MoveVertical",{iconClass:"drag-icon hidden-opacity",svgClass:"sm"});function m(t){if(document.activeElement!=u&&t.button==e.MOUSE_LEFT_CLICK){var s=r.root.ownerDocument;s.addEventListener("mousemove",f),s.addEventListener("mouseup",g),document.body.classList.add("noevents"),p.classList.remove("hidden-opacity"),t.stopImmediatePropagation(),t.stopPropagation(),document.pointerLockElement||h.requestPointerLock(),i.onPress&&i.onPress.bind(u)(t,u)}}function f(t){let s=-t.movementY;if(0!=s){let n=i.step??1;if(t.shiftKey?n=10:t.altKey&&(n=.1),c.locked)for(let t of r.root.querySelectorAll(".vecinput"))t.value=e.round(+t.valueAsNumber+n*s,i.precision),y._dispatchEvent(t,"change");else u.value=e.round(+u.valueAsNumber+n*s,i.precision),y._dispatchEvent(u,"change")}t.stopPropagation(),t.preventDefault()}function g(e){var t=r.root.ownerDocument;t.removeEventListener("mousemove",f),t.removeEventListener("mouseup",g),document.body.classList.remove("noevents"),p.classList.add("hidden-opacity"),document.pointerLockElement&&document.exitPointerLock(),i.onRelease&&i.onRelease.bind(u)(e,u)}h.appendChild(p),this.disabled&&(u.disabled=!0),u.addEventListener("wheel",function(t){if(t.preventDefault(),this!==document.activeElement)return;let s=i.step??1;if(t.shiftKey?s=10:t.altKey&&(s=.1),c.locked)for(let n of r.querySelectorAll(".vecinput"))n.value=e.round(+n.valueAsNumber-s*(t.deltaY>0?1:-1),i.precision),y._dispatchEvent(n,"change");else this.value=e.round(+this.valueAsNumber-s*(t.deltaY>0?1:-1),i.precision),y._dispatchEvent(u,"change")},{passive:!1}),u.addEventListener("change",t=>{if(isNaN(t.target.value))return;let s=e.clamp(t.target.value,+u.min,+u.max);if(s=e.round(s,i.precision),c.locked)for(let e of a)e.value=s,n[e.idx]=s;else u.value=s,n[t.target.idx]=s;this.set(n,!1,t)},!1),h.addEventListener("mousedown",m),l.appendChild(h)}void 0===i.min&&void 0===i.max||(this.setLimits=(e,t,s)=>{for(let n of a)n.min=e??n.min,n.max=t??n.max,n.step=s??n.step;this.set(n,!0)});const c=new e.Button(null,"",e=>{c.locked=e},{title:"Lock",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});l.appendChild(c.root),e.doAsync(this.onResize.bind(this))}};e.SizeInput=class extends y{constructor(t,s,n,o={}){super(y.SIZE,t,s,o),this.onGetValue=()=>{const e=[];for(let t=0;t<this.root.dimensions.length;++t)e.push(this.root.dimensions[t].value());return e},this.onSetValue=(e,t,s)=>{for(let s=0;s<this.root.dimensions.length;++s)this.root.dimensions[s].set(e[s],t)},this.root.aspectRatio=2==s.length?s[0]/s[1]:null,this.root.dimensions=[];for(let t=0;t<s.length;++t){const i=new e.Panel;if(this.root.dimensions[t]=i.addNumber(null,s[t],e=>{const s=this.value();if(this.root.locked){const n=0==t?1/this.root.aspectRatio:this.root.aspectRatio,o=(1+t)%2;s[o]=e*n,this.root.dimensions[o].set(s[o],!0)}n&&n(s)},{min:0,disabled:o.disabled,precision:o.precision,className:"flex-fill"}),this.root.appendChild(this.root.dimensions[t].root),t+1!=s.length){const t=e.makeIcon("X",{svgClass:"fg-accent font-bold"});this.root.appendChild(t)}}if(o.units){let e=document.createElement("span");e.className="select-none fg-tertiary font-medium",e.innerText=o.units,this.root.appendChild(e)}if(this.root.aspectRatio){const t=new e.Button(null,"",e=>{if(this.root.locked=e,e){const e=this.value();this.root.aspectRatio=e[0]/e[1]}},{title:"Lock Aspect Ratio",icon:"LockOpen",swap:"Lock",buttonClass:"bg-none p-0"});this.root.appendChild(t.root)}}};e.OTPInput=class extends y{constructor(t,s,n,o={}){const i=o.pattern??"xxx-xxx",a=(i.match(/x/g)||[]).length;(s=String(s)).length||(s="x".repeat(a)),super(y.OTP,t,s,o),this.onGetValue=()=>+s,this.onSetValue=(o,i,a)=>{c(s=o),i||this._trigger(new e.IEvent(t,+o,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`},this.disabled=o.disabled??!1;const l=document.createElement("div");l.className="lexotp flex flex-row items-center",this.root.appendChild(l);const r=i.split("-"),c=t=>{l.innerHTML="";let s=0,n=0;for(let o=0;o<r.length;++o){const i=r[o];for(let o=0;o<i.length;++o){let a=t[s++];a="x"==a?"":a;const r=e.makeContainer(["36px","30px"],"lexotpslot border-top border-bottom border-left px-3 cursor-text select-none font-medium outline-none",a,l);r.tabIndex="1",this.disabled&&r.classList.add("disabled");const c=s;0==o?r.className+=" rounded-l":o==i.length-1&&(r.className+=" rounded-r border-right"),r.addEventListener("click",()=>{if(this.disabled)return;l.querySelectorAll(".lexotpslot").forEach(e=>e.classList.remove("active"));const e=l.querySelectorAll(".lexotpslot")[n];e.classList.add("active"),e.focus()}),r.addEventListener("blur",()=>{this.disabled||e.doAsync(()=>{l.contains(document.activeElement)||l.querySelectorAll(".lexotpslot").forEach(e=>e.classList.remove("active"))},10)}),r.addEventListener("keyup",e=>{if(!this.disabled)if(/[^0-9]+/g.test(e.key))if("ArrowLeft"==e.key||"ArrowRight"==e.key){const t="ArrowLeft"==e.key?-1:1,s=l.querySelectorAll(".lexotpslot")[n+t];s&&(l.querySelectorAll(".lexotpslot")[n].classList.remove("active"),s.classList.add("active"),s.focus(),n+=t)}else"Enter"!=e.key||t.includes("x")||this.set(t);else{const s=e.key;console.assert(NaN!=parseInt(s)),r.innerHTML=s,t=t.substring(0,c-1)+s+t.substring(c);const o=l.querySelectorAll(".lexotpslot")[n+1];o?(l.querySelectorAll(".lexotpslot")[n].classList.remove("active"),o.classList.add("active"),o.focus(),n++):this.set(t)}})}o<r.length-1&&e.makeContainer(["auto","auto"],"mx-2","-",l)}console.assert(s==t.length,"OTP Value/Pattern Mismatch!")};c(s)}};e.Pad=class extends y{constructor(t,s,n,o={}){super(y.PAD,t,null,o),this.onGetValue=()=>l.value.xy,this.onSetValue=(s,o,i)=>{l.value.set(s[0],s[1]),r(l.value),o||this._trigger(new e.IEvent(t,l.value.xy),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexpad",this.root.appendChild(i);let a=document.createElement("div");a.id="lexpad-"+t,a.className="lexinnerpad",a.style.width=o.padSize??"96px",a.style.height=o.padSize??"96px",i.appendChild(a);let l=document.createElement("div");l.className="lexpadthumb",l.value=new e.vec2(s[0],s[1]),l.min=o.min??0,l.max=o.max??1,a.appendChild(l);let r=t=>{const[s,n]=[a.offsetWidth,a.offsetHeight],o=new e.vec2(e.remapRange(t.x,l.min,l.max,0,1),e.remapRange(t.y,l.min,l.max,0,1));l.style.transform=`translate(calc( ${s*o.x}px - 50% ), calc( ${n*o.y}px - 50%)`};a.addEventListener("mousedown",function(e){if(document.activeElement==l)return;var t=c.root.ownerDocument;t.addEventListener("mousemove",d),t.addEventListener("mouseup",h),document.body.classList.add("nocursor"),document.body.classList.add("noevents"),e.stopImmediatePropagation(),e.stopPropagation(),l.classList.add("active"),o.onPress&&o.onPress.bind(l)(e,l)});let c=this;function d(s){const o=a.getBoundingClientRect(),i=new e.vec2(s.x-o.x,s.y-o.y);i.clp(0,a.offsetWidth,i);const[r,d]=[a.offsetWidth,a.offsetHeight],h=i.div(new e.vec2(a.offsetWidth,a.offsetHeight));l.style.transform=`translate(calc( ${r*h.x}px - 50% ), calc( ${d*h.y}px - 50%)`,l.value=new e.vec2(e.remapRange(h.x,0,1,l.min,l.max),e.remapRange(h.y,0,1,l.min,l.max)),c._trigger(new e.IEvent(t,l.value.xy,s),n),s.stopPropagation(),s.preventDefault()}function h(e){var t=c.root.ownerDocument;t.removeEventListener("mousemove",d),t.removeEventListener("mouseup",h),document.body.classList.remove("nocursor"),document.body.classList.remove("noevents"),l.classList.remove("active"),o.onRelease&&o.onRelease.bind(l)(e,l)}e.doAsync(()=>{this.onResize(),r(l.value)})}};e.Progress=class extends y{constructor(t,s,n={}){super(y.PROGRESS,t,s,n),this.onGetValue=()=>i.value,this.onSetValue=(s,o,l)=>{s=e.clamp(s,i.min,i.max),this.root.querySelector("meter").value=s,a(),this.root.querySelector("span")&&(this.root.querySelector("span").innerText=s),o||this._trigger(new e.IEvent(t,s,l),n.callback)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lexprogress",this.root.appendChild(o);let i=document.createElement("meter");i.id="lexprogressbar-"+t,i.className="lexprogressbar",i.step="any",i.min=n.min??0,i.max=n.max??1,i.low=n.low??i.low,i.high=n.high??i.high,i.optimum=n.optimum??i.optimum,i.value=s,o.appendChild(i);const a=()=>{let t=e.getThemeColor("global-selected");null!=i.low&&i.value<i.low?t=e.getThemeColor("global-color-error"):null!=i.high&&i.value<i.high&&(t=e.getThemeColor("global-color-warning")),i.style.background=`color-mix(in srgb, ${t} 20%, transparent)`};if(n.showValue){document.getElementById("progressvalue-"+t)&&document.getElementById("progressvalue-"+t).remove();let e=document.createElement("span");e.id="progressvalue-"+t,e.style.padding="0px 5px",e.innerText=s,o.appendChild(e)}if(n.editable){i.classList.add("editable");let t=t=>{var o=this.root.ownerDocument;o.addEventListener("mousemove",s),o.addEventListener("mouseup",n),document.body.classList.add("noevents"),i.classList.add("grabbing"),t.stopImmediatePropagation(),t.stopPropagation();const a=i.getBoundingClientRect(),l=e.round(e.remapRange(t.offsetX,0,a.width,i.min,i.max));this.set(l,!1,t)},s=t=>{if(0!=t.movementX){const s=i.getBoundingClientRect(),n=e.round(e.remapRange(t.offsetX-s.x,0,s.width,i.min,i.max));this.set(n,!1,t)}t.stopPropagation(),t.preventDefault()},n=e=>{var t=this.root.ownerDocument;t.removeEventListener("mousemove",s),t.removeEventListener("mouseup",n),document.body.classList.remove("noevents"),i.classList.remove("grabbing")};i.addEventListener("mousedown",t)}a(),e.doAsync(this.onResize.bind(this))}};e.FileInput=class extends y{constructor(t,s,n={}){super(y.FILE,t,null,n);let o=n.local??!0,i=n.type??"text",a=n.read??!0;this.onResize=e=>{const t=this.root.domName?.style.width??"0px";l.style.width=`calc( 100% - ${t})`};let l=document.createElement("input");if(l.className="lexfileinput",l.type="file",l.disabled=n.disabled??!1,this.root.appendChild(l),n.placeholder&&(l.placeholder=n.placeholder),l.addEventListener("change",function(e){const t=e.target.files;if(t.length)if(a){n.onBeforeRead&&n.onBeforeRead();const e=new FileReader;"text"===i?e.readAsText(t[0]):"buffer"===i?e.readAsArrayBuffer(t[0]):"bin"===i?e.readAsBinaryString(t[0]):"url"===i&&e.readAsDataURL(t[0]),e.onload=e=>{s.call(this,e.target.result,t[0])}}else s(t[0])}),l.addEventListener("cancel",function(e){s(null)}),o){let t=null;const s=new e.Button(null,"",()=>{t||(t=new e.Dialog("Load Settings",e=>{e.addSelect("Type",["text","buffer","bin","url"],i,e=>{i=e}),e.addButton(null,"Reload",e=>{l.dispatchEvent(new Event("change"))})},{onclose:e=>{e.remove(),t=null}}))},{skipInlineCount:!0,title:"Settings",disabled:n.disabled,icon:"Settings"});this.root.appendChild(s.root)}e.doAsync(this.onResize.bind(this))}};e.Tree=class extends y{constructor(t,s,n={}){n.hideName=!0,super(y.TREE,t,null,n);let o=document.createElement("div");if(o.className="lextree",this.root.appendChild(o),t){let e=document.createElement("span");e.innerHTML=t,o.appendChild(e)}let i=document.createElement("div");if(i.className="lextreetools",t||(i.className+=" notitle"),n.icons)for(let t of n.icons){const s=e.makeIcon(t.icon,{title:t.name});s.addEventListener("click",t.callback),i.appendChild(s)}n.filter=n.filter??!0;let a=null;if(n.filter){a=document.createElement("input"),a.className="lexnodetreefilter",a.setAttribute("placeholder","Filter.."),a.style.width="100%",a.addEventListener("input",()=>{this.innerTree.refresh()});let t=e.makeIcon("Search");i.appendChild(a),i.appendChild(t)}(n.icons||n.filter)&&o.appendChild(i);let l=document.createElement("ul");l.addEventListener("contextmenu",function(e){e.preventDefault()}),o.appendChild(l),this.innerTree=new b(o,s,n)}};e.TabSections=class extends y{constructor(t,s,n={}){if(n.hideName=!0,super(y.TABS,t,null,n),s.constructor!=Array)throw"Param @tabs must be an Array!";if(!s.length)throw"Tab list cannot be empty!";const o=n.vertical??!0,i=!o&&(n.showNames??!1);this.tabDOMs={};let a=document.createElement("div");a.className="lextabscontainer",o||(a.className+=" horizontal");let l=document.createElement("div");l.className="tabs",a.appendChild(l),this.root.appendChild(a),s.findIndex(e=>!0===e.selected)<0&&(s[0].selected=!0);for(let t of s){console.assert(t.name);let s=document.createElement("div");s.className="lextab "+(t.selected?"selected":""),s.innerHTML=i?t.name:"",s.appendChild(e.makeIcon(t.icon??"Hash",{title:t.name,iconClass:t.iconClass,svgClass:t.svgClass})),this.tabDOMs[t.name]=s;let n=document.createElement("div");if(n.id=t.name.replace(/\s/g,""),n.className="components",n.toggleAttribute("hidden",!t.selected),a.appendChild(n),s.addEventListener("click",e=>{l.querySelectorAll(".lextab").forEach(e=>{e.classList.remove("selected")}),s.classList.add("selected"),a.querySelectorAll(".components").forEach(e=>{e.toggleAttribute("hidden",!0)});a.querySelector("#"+n.id).toggleAttribute("hidden"),t.onSelect&&t.onSelect(this,n)}),l.appendChild(s),t.onCreate){const s=new e.Panel;s.queue(n),t.onCreate.call(this,s,n),s.clearQueue()}}this.tabs=s}select(e){const t=this.tabDOMs[e];t&&t.click()}};e.Counter=class extends y{constructor(t,s,n,o={}){super(y.COUNTER,t,s,o),this.onGetValue=()=>h.count,this.onSetValue=(s,o,l)=>{s=e.clamp(s,i,a),h.count=s,h.innerHTML=s,o||this._trigger(new e.IEvent(t,s,l),n)};const i=o.min??0,a=o.max??100,l=o.step??1,r=document.createElement("div");r.className="lexcounter",this.root.appendChild(r);const c=new e.Button(null,"",(e,t)=>{let s=l??1;t.shiftKey&&(s*=10),this.set(h.count-s,!1,t)},{skipInlineCount:!0,title:"Minus",icon:"Minus"});r.appendChild(c.root);const d=document.createElement("div");d.className="lexcounterbox",r.appendChild(d);const h=document.createElement("span");if(h.className="lexcountervalue",h.innerHTML=s,h.count=s,d.appendChild(h),o.label){const e=document.createElement("span");e.className="lexcounterlabel",e.innerHTML=o.label,d.appendChild(e)}const u=new e.Button(null,"",(e,t)=>{let s=l??1;t.shiftKey&&(s*=10),this.set(h.count+s,!1,t)},{skipInlineCount:!0,title:"Plus",icon:"Plus"});r.appendChild(u.root)}};class E extends y{constructor(t,s,n={}){if(!s)throw"Data is needed to create a table!";super(y.TABLE,t,null,n),this.onResize=e=>{const t=this.root.domName?.style.width??"0px";o.style.width=`calc( 100% - ${t})`};const o=document.createElement("div");o.className="lextable",this.root.appendChild(o),this._centered=n.centered??!1,!0===this._centered&&o.classList.add("centered"),this.activeCustomFilters={},this.filter=n.filter??!1,this.customFilters=n.customFilters??!1,this._toggleColumns=n.toggleColumns??!1,this._sortColumns=n.sortColumns??!0,this._currentFilter=n.filterValue,s.head=s.head??[],s.body=s.body??[],s.checkMap={},s.colVisibilityMap={},s.head.forEach((e,t)=>{s.colVisibilityMap[t]=!0}),this.data=s;const i=(e,t,s,n)=>s[e]<n[e]?-t:s[e]>n[e]?t:0,a=(e,t)=>{s.body=s.body.sort(i.bind(this,e,t)),this.refresh()};if(this.filter||this.customFilters||this._toggleColumns){const t=e.makeContainer(["100%","auto"],"flex flex-row");if(this.filter){const s=e.deepCopy(n);s.placeholder=`Filter ${this.filter}...`,s.skipComponent=!0,s.trigger="input",s.inputClass="outline";let o=new e.TextInput(null,this._currentFilter??"",e=>{this._currentFilter=e,this.refresh()},s);t.appendChild(o.root)}if(this.customFilters){const s=e.makeIcon("CirclePlus",{svgClass:"sm"}),n='<div class="lexcontainer border-right self-center mx-1" style="width: 1px; height: 70%;"></div>';for(let o of this.customFilters)o.component=new e.Button(null,s.innerHTML+o.name,t=>{const i=o.component.root.querySelector("span");if(o.options){const t=o.options.map((t,a)=>{const l={name:t,checked:!!this.activeCustomFilters[t],callback:(t,a,l)=>{a?this.activeCustomFilters[t]=o.name:delete this.activeCustomFilters[t];const r=Object.keys(this.activeCustomFilters).filter(e=>this.activeCustomFilters[e]==o.name),c=r.reduce((t,s)=>t+e.badge(s,"bg-tertiary fg-secondary text-sm border-0"),"");i.innerHTML=s.innerHTML+o.name+(r.length?n:"")+c,this.refresh()}};return l});new e.DropdownMenu(o.component.root,t,{side:"bottom",align:"start"})}else if("range"==o.type){console.assert(null!=o.min&&null!=o.max,"Range filter needs min and max values!");const t=e.makeContainer(["240px","auto"],"text-md"),a=new e.Panel;e.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",o.name,t),o.start=o.start??o.min,o.end=o.end??o.max,a.refresh=()=>{a.clear(),a.sameLine(2,"justify-center"),a.addNumber(null,o.start,t=>{o.start=t;const a=o.start!=o.min||o.end!=o.max;i.innerHTML=s.innerHTML+o.name+(a?n+e.badge(`${o.start} - ${o.end} ${o.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),a&&this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()},{skipSlider:!0,min:o.min,max:o.max,step:o.step,units:o.units}),a.addNumber(null,o.end,t=>{o.end=t;const a=o.start!=o.min||o.end!=o.max;i.innerHTML=s.innerHTML+o.name+(a?n+e.badge(`${o.start} - ${o.end} ${o.units??""}`,"bg-tertiary fg-secondary text-sm border-0"):""),a&&this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()},{skipSlider:!0,min:o.min,max:o.max,step:o.step,units:o.units}),a.addButton(null,"Reset",()=>{o.start=o.min,o.end=o.max,i.innerHTML=s.innerHTML+o.name,a.refresh(),this.refresh()},{buttonClass:"contrast"})},a.refresh(),t.appendChild(a.root),new e.Popover(o.component.root,[t],{side:"bottom"})}else if("date"==o.type){const t=e.makeContainer(["auto","auto"],"text-md"),a=new e.Panel;e.makeContainer(["100%","auto"],"px-3 p-2 pb-0 text-md font-medium",o.name,t),a.refresh=()=>{if(a.clear(),!o.default){const e=new Date,t=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`;o.default=[t,t]}const t=new e.CalendarRange(o.value,{onChange:a=>{o.value=a,i.innerHTML=s.innerHTML+o.name+(n+e.badge(`${t.getFullDate()}`,"bg-tertiary fg-secondary text-sm border-0")),this._resetCustomFiltersBtn.root.classList.remove("hidden"),this.refresh()}});a.attach(t)},a.refresh(),t.appendChild(a.root),new e.Popover(o.component.root,[t],{side:"bottom"})}},{buttonClass:"px-2 primary dashed"}),t.appendChild(o.component.root);this._resetCustomFiltersBtn=new e.Button(null,"resetButton",e=>{this.activeCustomFilters={},this._resetCustomFiltersBtn.root.classList.add("hidden");for(let e of this.customFilters)e.component.root.querySelector("span").innerHTML=s.innerHTML+e.name,"range"==e.type?(e.start=e.min,e.end=e.max):"date"==e.type&&delete e.default;this.refresh()},{title:"Reset filters",tooltip:!0,icon:"X"}),t.appendChild(this._resetCustomFiltersBtn.root),this._resetCustomFiltersBtn.root.classList.add("hidden")}if(this._toggleColumns){const n=e.makeIcon("Settings2"),o=new e.Button("toggleColumnsBtn",n.innerHTML+"View",(t,n)=>{const o=s.head.map((e,t)=>{const n={name:e,icon:"Check",callback:()=>{s.colVisibilityMap[t]=!s.colVisibilityMap[t];l.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}};return s.colVisibilityMap[t]||delete n.icon,n});new e.DropdownMenu(n.target,o,{side:"bottom",align:"end"})},{hideName:!0});t.appendChild(o.root),o.root.style.marginLeft="auto"}o.appendChild(t)}const l=document.createElement("table");o.appendChild(l),this.refresh=()=>{this._currentFilter=this._currentFilter??"",l.innerHTML="",this.rowOffsetCount=0;{const t=document.createElement("thead");t.className="lextablehead",l.appendChild(t);const o=document.createElement("tr");if(n.sortable){const e=document.createElement("th");e.style.width="0px",o.appendChild(e),this.rowOffsetCount++}if(n.selectable){const e=document.createElement("th");e.style.width="0px";const t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[":root"]??!1,e.appendChild(t),t.addEventListener("change",function(){s.checkMap[":root"]=this.checked;const e=l.querySelector("tbody");for(const t of e.childNodes){const e=t.getAttribute("rowId");e&&(s.checkMap[e]=this.checked,t.querySelector("input[type='checkbox']").checked=this.checked)}}),this.rowOffsetCount++,o.appendChild(e)}for(const t of s.head){const i=document.createElement("th");i.innerHTML=`<span>${t}</span>`,i.querySelector("span").appendChild(e.makeIcon("MenuArrows",{svgClass:"sm"}));const r=s.head.indexOf(t);this._centered?.indexOf&&this._centered.indexOf(r)>-1&&i.classList.add("centered");const c=[];if(n.columnActions)for(let e of n.columnActions)e.name?c.push({name:e.name,icon:e.icon,className:e.className,callback:()=>{const t=this.data.body.map(e=>[e[r]]);e.callback(t,l)&&this.refresh()}}):console.warn("Invalid column action (missing name):",e);this._sortColumns&&(c.length>0&&c.push(null),c.push({name:"Asc",icon:"ArrowUpAZ",callback:a.bind(this,r,1)},{name:"Desc",icon:"ArrowDownAZ",callback:a.bind(this,r,-1)})),this._toggleColumns&&(c.length>0&&c.push(null),c.push({name:"Hide",icon:"EyeOff",callback:()=>{s.colVisibilityMap[r]=!1;l.querySelectorAll(`tr > *:nth-child(${r+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}})),i.addEventListener("click",t=>{0!==c.length&&new e.DropdownMenu(t.target,c,{side:"bottom",align:"start"})}),o.appendChild(i)}if(n.rowActions){const e=document.createElement("th");e.className="sm",o.appendChild(e)}t.appendChild(o)}{const t=document.createElement("tbody");t.className="lextablebody",l.appendChild(t);let o=null,i=!1,a=null;document.addEventListener("mouseup",t=>{if(null===o)return;document.removeEventListener("mousemove",r);const n=l.rows[o];if(n.dY=0,n.classList.remove("dragging"),Array.from(l.rows).forEach(e=>{e.style.transform="",e.style.transition="none"}),e.flushCss(n),a){const t=o-1,n=a[1]-1;e.emit("@on_table_sort",{instance:this,fromIdx:t,targetIdx:n});const i=s.body[t];let l=0;if(t==n)return;if(t>n)for(let e=t;e>n;--e)s.body[e]=s.body[e-1];else{l=1;for(let e=t;e<n;++e)s.body[e]=s.body[e+1]}s.body[n]=i;a[0].parentNode.insertChildAtIndex(a[0],n+l),a=null}o=null,e.doAsync(()=>{Array.from(l.rows).forEach(e=>{e.style.transition="transform 0.2s ease-in"})})});let r=e=>{if(!o)return;const t=l.rows[o];t.dY=t.dY??0,t.dY+=e.movementY,t.style.transform=`translateY(${t.dY}px)`};for(let c=0;c<s.body.length;++c){const d=s.body[c];if(this.filter){const t=s.head.indexOf(this.filter);if(t>-1){if(!e.stripHTML(d[t]).toLowerCase().includes(this._currentFilter.toLowerCase()))continue}}if(Object.keys(this.activeCustomFilters).length){let e={};this._resetCustomFiltersBtn.root.classList.remove("hidden");for(let t in this.activeCustomFilters){const n=this.activeCustomFilters[t];e[n]=e[n]??!1;const o=s.head.indexOf(n);o>-1&&(e[n]|=d[o]===t)}if(!Object.values(e).reduce((e,t)=>t*e,!0))continue}if(this.customFilters){let t={};for(let n of this.customFilters){const o=n.name;if("range"==n.type){t[o]=t[o]??!1;const e=s.head.indexOf(o);if(e>-1){const s=parseFloat(d[e]),i=n.start??n.min,a=n.end??n.max;t[o]|=s>=i&&s<=a}}else if("date"==n.type){t[o]=t[o]??!1;const i=s.head.indexOf(o);if(i>-1){if(!n.default){const e=new Date,s=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`;n.value=[s,s],t[o]|=!0;continue}n.value=n.value??n.default;const s=d[i],a=e.dateFromDateString(s),l=e.dateFromDateString(n.value[0]),r=e.dateFromDateString(n.value[1]);t[o]|=a>=l&&a<=r}}}if(!Object.values(t).reduce((e,t)=>t*e,!0))continue}const h=document.createElement("tr"),u=e.getSupportedDOMName(d.join("-")).substr(0,32);if(h.setAttribute("rowId",u),n.sortable){const t=document.createElement("td");t.style.width="0px";const s=e.makeIcon("GripVertical");t.appendChild(s),s.draggable=!0,s.addEventListener("dragstart",e=>{e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),o=h.rowIndex,h.classList.add("dragging"),document.addEventListener("mousemove",r)},!1),h.addEventListener("mouseenter",function(t){if(t.preventDefault(),null!=o&&this.rowIndex!=o&&i!=this.rowIndex){i=this.rowIndex;const t=l.rows[o],s=""!=this.style.transform;this.rowIndex>o?(a=[t,s?this.rowIndex-1:this.rowIndex],this.style.transform=s?"":`translateY(-${this.offsetHeight}px)`):(a=[t,s?this.rowIndex+1:this.rowIndex],this.style.transform=s?"":`translateY(${this.offsetHeight}px)`),e.doAsync(()=>{i=!1})}}),h.appendChild(t)}if(n.selectable){const e=document.createElement("td"),t=document.createElement("input");t.type="checkbox",t.className="lexcheckbox accent",t.checked=s.checkMap[u],e.appendChild(t),t.addEventListener("change",function(){s.checkMap[u]=this.checked;const e=l.querySelector("thead input[type='checkbox']");if(this.checked){Array.from(l.querySelectorAll("tbody input[type='checkbox']")).filter(e=>!e.checked).length||(e.checked=s.checkMap[":root"]=!0)}else e.checked=s.checkMap[":root"]=!1}),h.appendChild(e)}for(const e of d){const t=document.createElement("td");t.innerHTML=`${e}`;const s=d.indexOf(e);this._centered?.indexOf&&this._centered.indexOf(s)>-1&&t.classList.add("centered"),h.appendChild(t)}if(n.rowActions){const t=document.createElement("td");t.style.width="0px";const o=document.createElement("div");o.className="lextablebuttons",t.appendChild(o);for(const t of n.rowActions){let i=null;"delete"==t?(i=e.makeIcon("Trash3",{title:"Delete Row"}),i.addEventListener("click",function(){s.body.splice(c,1),h.remove()})):"menu"==t?(i=e.makeIcon("EllipsisVertical",{title:"Menu"}),i.addEventListener("click",function(t){if(!n.onMenuAction)return;const o=n.onMenuAction(c,s);console.assert(o.length,"Add items to the Menu Action Dropdown!"),new e.DropdownMenu(t.target,o,{side:"bottom",align:"end"})})):(console.assert(t.constructor==Object),i=e.makeIcon(t.icon,{title:t.title}),t.callback&&i.addEventListener("click",e=>{t.callback(d,l,e)&&this.refresh()})),console.assert(i),o.appendChild(i)}h.appendChild(t)}t.appendChild(h)}if(0==t.childNodes.length){const e=document.createElement("tr"),n=document.createElement("td");n.setAttribute("colspan",s.head.length+this.rowOffsetCount+1),n.className="empty-row",n.innerHTML="No results.",e.appendChild(n),t.appendChild(e)}}for(const e in s.colVisibilityMap){const t=parseInt(e);if(!s.colVisibilityMap[t]){l.querySelectorAll(`tr > *:nth-child(${t+this.rowOffsetCount+1})`).forEach(e=>{e.style.display="none"===e.style.display?"":"none"})}}},this.refresh(),e.doAsync(this.onResize.bind(this))}getSelectedRows(){const t=[];for(const s of this.data.body){const n=e.getSupportedDOMName(s.join("-")).substr(0,32);!0===this.data.checkMap[n]&&t.push(s)}return t}_setCentered(e){if(e.constructor==Boolean){this.root.querySelector(".lextable").classList.toggle("centered",e)}else e=[].concat(e);this._centered=e,this.refresh()}}Object.defineProperty(E.prototype,"centered",{get:function(){return this._centered},set:function(e){this._setCentered(e)},enumerable:!0,configurable:!0}),e.Table=E;e.DatePicker=class extends y{constructor(t,s,n,o={}){super(y.DATE,t,null,o);const i=s?.constructor===Array;if(!i&&o.today){const e=new Date;s=`${e.getDate()}/${e.getMonth()+1}/${e.getFullYear()}`}this.onGetValue=()=>s,this.onSetValue=(o,a,r)=>{i||this.calendar.fromDateString(o),s=o,l(this.calendar.getFullDate()),a||this._trigger(new e.IEvent(t,o,r),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};const a=e.makeContainer(["auto","auto"],"lexdate flex flex-row");this.root.appendChild(a),this.calendar=i?new e.CalendarRange(s,{onChange:e=>{this.set(e)},...o}):new e.Calendar(s,{onChange:e=>{const t=`${e.day}/${e.month}/${e.year}`;this.set(t)},...o});const l=t=>{const s=!!t;a.innerHTML="";const n=(t=t??"Pick a date").split(" to "),o=i?n[0]:t,l=e.makeIcon("Calendar"),r=new e.Button(null,o,()=>{this._popover=new e.Popover(r.root,[this.calendar])},{buttonClass:`flex flex-row px-3 ${s?"":"fg-tertiary"} justify-between`});if(r.root.querySelector("button").appendChild(l),r.root.style.width="100%",a.appendChild(r.root),i){const t=e.makeIcon("ArrowRight");e.makeContainer(["32px","auto"],"content-center",t.innerHTML,a);const o=n[1],i=e.makeIcon("Calendar"),l=new e.Button(null,o,()=>{this._popover=new e.Popover(l.root,[this.calendar])},{buttonClass:`flex flex-row px-3 ${s?"":"fg-tertiary"} justify-between`});l.root.querySelector("button").appendChild(i),l.root.style.width="100%",a.appendChild(l.root)}};s?l(this.calendar.getFullDate()):l(),e.doAsync(this.onResize.bind(this))}};e.Map2D=class extends y{constructor(t,s,n,o={}){super(y.MAP2D,t,null,o),this.onGetValue=()=>this.map2d.weightsObj,this.onSetValue=(e,t,s)=>{},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";i.style.width=`calc( 100% - ${t})`};var i=document.createElement("div");i.className="lexmap2d",this.root.appendChild(i),this.map2d=new e.CanvasMap2D(s,n,o);const a=e.makeIcon("SquareMousePointer"),l=new e.Button(null,"Open Map",()=>{this._popover=new e.Popover(l.root,[this.map2d])},{buttonClass:"flex flex-row px-3 fg-secondary justify-between"});l.root.querySelector("button").appendChild(a),i.appendChild(l.root),e.doAsync(this.onResize.bind(this))}};e.Rate=class extends y{constructor(t,s,n,o={}){const i=o.allowHalf??!1;i||(s=Math.floor(s)),super(y.RATE,t,s,o),this.onGetValue=()=>s,this.onSetValue=(o,i,a)=>{d(s=o),i||this._trigger(new e.IEvent(t,o,a),n)},this.onResize=e=>{const t=this.root.domName?.style.width??"0px";a.style.width=`calc( 100% - ${t})`};const a=document.createElement("div");a.className="lexrate relative",this.root.appendChild(a);const l=e.makeContainer(["fit-content","auto"],"flex flex-row gap-1","",a),r=e.makeContainer(["fit-content","auto"],"absolute top-0 flex flex-row gap-1 pointer-events-none","",a),c=e.makeContainer(["fit-content","auto"],"absolute top-0 flex flex-row gap-1 pointer-events-none","",a);l.addEventListener("mousemove",e=>{const t=e.target,s=t.dataset.idx;if(void 0!==s){const n=t.getBoundingClientRect(),o=i&&e.offsetX<.5*n.width;d(s-(o?.5:0))}},!1),l.addEventListener("mouseleave",e=>{d(s)},!1);for(let t=0;t<5;++t){const s=e.makeIcon("Star",{svgClass:"lg fill-current fg-secondary"});s.dataset.idx=t+1,l.appendChild(s),s.addEventListener("click",e=>{const t=e.target.getBoundingClientRect(),s=i&&e.offsetX<.5*t.width;this.set(parseFloat(e.target.dataset.idx)-(s?.5:0))},!1);const n=e.makeIcon("Star",{svgClass:"lg fill-current metallicyellow"});r.appendChild(n);const o=e.makeIcon("StarHalf",{svgClass:"lg fill-current metallicyellow"});c.appendChild(o)}const d=e=>{for(let t=0;t<5;++t){const s=e>t+.5,n=r.childNodes[t],o=c.childNodes[t];if(s)n.style.opacity=1;else{n.style.opacity=0;const s=i&&e>t;o.style.opacity=s?1:0}}};d(s),e.doAsync(this.onResize.bind(this))}};e.Panel=class{constructor(e={}){var t=document.createElement("div");t.className="lexpanel",e.id&&(t.id=e.id),e.className&&(t.className+=" "+e.className),t.style.width=e.width||"100%",t.style.height=e.height||"100%",Object.assign(t.style,e.style??{}),this.root=t,this.branches=[],this.components={},this._branchOpen=!1,this._currentBranch=null,this._queue=[],this._inlineComponentsLeft=-1,this._inlineQueuedContainer=null}get(e){return this.components[e]}getValue(e){let t=this.components[e];if(!t)throw"No component called "+e;return t.value()}setValue(e,t,s){let n=this.components[e];if(!n)throw"No component called "+e;return n.set(t,s)}attach(e){console.assert(e,"No content to attach!"),e.parent=this,this.root.appendChild(e.root?e.root:e)}clear(){this.branches=[],this._branchOpen=!1,this._currentBranch=null;for(let t in this.components)if(this.components[t].options&&this.components[t].options.signal){const s=this.components[t].options.signal;for(let n=0;n<e.signals[s].length;n++)e.signals[s][n]==this.components[t]&&(e.signals[s]=[...e.signals[s].slice(0,n),...e.signals[s].slice(n+1)])}if(this.signals)for(let t=0;t<this.signals.length;t++){let s=Object.values(this.signals[t])[0],n=s.options.signal;for(let t=0;t<e.signals[n].length;t++)e.signals[n][t]==s&&(e.signals[n]=[...e.signals[n].slice(0,t),...e.signals[n].slice(t+1)])}this.components={},this.root.innerHTML=""}sameLine(e,t){this._inlineQueuedContainer=this.queuedContainer,this._inlineComponentsLeft=e??1/0,this._inlineExtraClass=t??null}endLine(e){if(e=e??this._inlineExtraClass,-1!=this._inlineComponentsLeft){this._inlineComponentsLeft=-1,this._inlineContainer||(this._inlineContainer=document.createElement("div"),this._inlineContainer.className="lexinlinecomponents",e&&(this._inlineContainer.className+=` ${e}`));for(let e of this._inlineComponents){e.constructor==Array?this._inlineQueuedContainer?this._inlineContainer.appendChild(e[0]):e[1].appendChild(e[0]):this._inlineContainer.appendChild(e)}this._inlineQueuedContainer?this._inlineQueuedContainer.appendChild(this._inlineContainer):this._currentBranch?this._currentBranch.content.appendChild(this._inlineContainer):this.root.appendChild(this._inlineContainer),delete this._inlineComponents,delete this._inlineContainer,delete this._inlineExtraClass}else console.warn("No pending components to be inlined!")}branch(t,s={}){this._branchOpen&&this.merge();var n=new e.Branch(t,s);return n.panel=this,this._branchOpen=!0,this._currentBranch=n,this.branches.push(n),this.root.appendChild(n.root),s.filter&&this._addFilter(s.filter,{callback:this._searchComponents.bind(this,n.name)}),n}merge(){this._branchOpen=!1,this._currentBranch=null}_pick(e,t){return void 0===e?t:e}_attachComponent(e,t={}){null!=e.name&&(this.components[e.name]=e),e.options.signal&&!e.name&&(this.signals||(this.signals=[]),this.signals.push({[e.options.signal]:e}));const s=s=>{t.container?t.container.appendChild(s):this.queuedContainer?this.queuedContainer.appendChild(s):this._currentBranch?(t.skipComponent||this._currentBranch.components.push(e),this._currentBranch.content.appendChild(s)):(s.className+=" nobranch w-full",this.root.appendChild(s))},n=e=>{this.queuedContainer?this._inlineComponents.push([e,this.queuedContainer]):this._inlineComponents.push(e)};return this._inlineComponentsLeft>0&&!t.skipInlineCount?(this._inlineComponents||(this._inlineComponents=[]),n(e.root),this._inlineComponentsLeft--,this._inlineComponentsLeft||this.endLine()):s(e.root),e}_addFilter(t,s={}){s.placeholder=t.constructor==String?t:"Filter properties..",s.skipComponent=s.skipComponent??!0,s.skipInlineCount=!0;const n=new e.TextInput(null,null,null,s).root;n.className+=" lexfilter";let o=document.createElement("input");o.className="lexinput-filter",o.setAttribute("placeholder",s.placeholder),o.style.width="100%",o.value=s.filterValue||"";let i=e.makeIcon("Search");return n.appendChild(i),n.appendChild(o),o.addEventListener("input",e=>{s.callback&&s.callback(o.value,e)}),n}_searchComponents(e,t){for(let s of this.branches){if(s.name!==e)continue;for(let e of s.components)e.domEl.classList.contains("lexfilter")||e.domEl.remove();this.queue(s.content);const n=!t.length;for(let e of s.components){if(!n){if(!e.name)continue;t.toLowerCase();if(!e.name.toLowerCase().includes(t))continue}this.queuedContainer.appendChild(e.domEl)}return void this.clearQueue()}}getBranch(e){return e?this.branches.find(t=>t.name==e):this._currentBranch}queue(e){!e&&this._currentBranch&&(e=this._currentBranch.root),this.queuedContainer&&this._queue.push(this.queuedContainer),this.queuedContainer=e}clearQueue(){this._queue&&this._queue.length?this.queuedContainer=this._queue.pop():delete this.queuedContainer}addSeparator(){var t=document.createElement("div");t.className="lexseparator";let s=new e.BaseComponent(e.BaseComponent.SEPARATOR);s.root=t,this._currentBranch?(this._currentBranch.content.appendChild(t),this._currentBranch.components.push(s)):this.root.appendChild(t)}addBlank(t,s){const n=new e.Blank(t,s);return this._attachComponent(n)}addTitle(t,s={}){const n=new e.Title(t,s);return this._attachComponent(n)}addText(t,s,n,o={}){const i=new e.TextInput(t,s,n,o);return this._attachComponent(i)}addTextArea(t,s,n,o={}){const i=new e.TextArea(t,s,n,o);return this._attachComponent(i)}addLabel(t,s={}){s.disabled=!0,s.inputClass=(s.inputClass??"")+" nobg";const n=this.addText(null,t,null,s);return n.type=e.BaseComponent.LABEL,n}addButton(t,s,n,o={}){const i=new e.Button(t,s,n,o);return this._attachComponent(i)}addComboButtons(t,s,n={}){const o=new e.ComboButtons(t,s,n);return this._attachComponent(o)}addCard(t,s={}){const n=new e.Card(t,s);return this._attachComponent(n)}addForm(t,s,n,o={}){const i=new e.Form(t,s,n,o);return this._attachComponent(i)}addContent(t,s,n={}){if(console.assert(s,"Empty content!"),s.constructor==String){const e=document.createElement("div");e.innerHTML=s,s=e.childElementCount>1?e:e.firstElementChild}n.hideName=!0;let o=new e.BaseComponent(e.BaseComponent.CONTENT,t,null,n);return o.root.appendChild(s),this._attachComponent(o)}async addImage(t,s,n={}){console.assert(s,"Empty src/url for Image!");let o=document.createElement("div");o.className="leximage",o.style.width="100%";let i=document.createElement("img");i.src=s,Object.assign(i.style,n.style??{}),o.appendChild(i);let a=new e.BaseComponent(e.BaseComponent.IMAGE,t,null,n);return a.root.appendChild(o),i.decode(),this._attachComponent(a)}addSelect(t,s,n,o,i={}){const a=new e.Select(t,s,n,o,i);return this._attachComponent(a)}addCurve(t,s,n,o={}){const i=new e.Curve(t,s,n,o);return this._attachComponent(i)}addDial(t,s,n,o={}){const i=new e.Dial(t,s,n,o);return this._attachComponent(i)}addLayers(t,s,n,o={}){const i=new e.Layers(t,s,n,o);return this._attachComponent(i)}addArray(t,s=[],n,o={}){const i=new e.ItemArray(t,s,n,o);return this._attachComponent(i)}addList(t,s,n,o,i={}){const a=new e.List(t,s,n,o,i);return this._attachComponent(a)}addTags(t,s,n,o={}){const i=new e.Tags(t,s,n,o);return this._attachComponent(i)}addCheckbox(t,s,n,o={}){const i=new e.Checkbox(t,s,n,o);return this._attachComponent(i)}addToggle(t,s,n,o={}){const i=new e.Toggle(t,s,n,o);return this._attachComponent(i)}addRadioGroup(t,s,n,o,i={}){const a=new e.RadioGroup(t,s,n,o,i);return this._attachComponent(a)}addColor(t,s,n,o={}){const i=new e.ColorInput(t,s,n,o);return this._attachComponent(i)}addRange(t,s,n,o={}){const i=new e.RangeInput(t,s,n,o);return this._attachComponent(i)}addNumber(t,s,n,o={}){const i=new e.NumberInput(t,s,n,o);return this._attachComponent(i)}static VECTOR_COMPONENTS={0:"x",1:"y",2:"z",3:"w"};_addVector(t,s,n,o,i={}){const a=new e.Vector(t,s,n,o,i);return this._attachComponent(a)}addVector2(e,t,s,n){return this._addVector(2,e,t,s,n)}addVector3(e,t,s,n){return this._addVector(3,e,t,s,n)}addVector4(e,t,s,n){return this._addVector(4,e,t,s,n)}addSize(t,s,n,o={}){const i=new e.SizeInput(t,s,n,o);return this._attachComponent(i)}addOTP(t,s,n,o={}){const i=new e.OTPInput(t,s,n,o);return this._attachComponent(i)}addPad(t,s,n,o={}){const i=new e.Pad(t,s,n,o);return this._attachComponent(i)}addProgress(t,s,n={}){const o=new e.Progress(t,s,n);return this._attachComponent(o)}addFile(t,s,n={}){const o=new e.FileInput(t,s,n);return this._attachComponent(o)}addTree(t,s,n={}){const o=new e.Tree(t,s,n);return this._attachComponent(o)}addTabSections(t,s,n={}){const o=new e.TabSections(t,s,n);return this._attachComponent(o)}addCounter(t,s,n,o={}){const i=new e.Counter(t,s,n,o);return this._attachComponent(i)}addTable(t,s,n={}){const o=new e.Table(t,s,n);return this._attachComponent(o)}addDate(t,s,n,o={}){const i=new e.DatePicker(t,s,n,o);return this._attachComponent(i)}addMap2D(t,s,n,o={}){const i=new e.Map2D(t,s,n,o);return this._attachComponent(i)}addRate(t,s,n,o={}){const i=new e.Rate(t,s,n,o);return this._attachComponent(i)}};e.Branch=class{constructor(t,s={}){this.name=t;var n=document.createElement("div");n.className="lexbranch",s.id&&(n.id=s.id),s.className&&(n.className+=" "+s.className),n.style.margin="0 auto";var o=this;this.closed=s.closed??!1,this.root=n,this.components=[];var i=document.createElement("div");if(i.className="lexbranchtitle",s.icon){const t=e.makeIcon(s.icon,{iconClass:"mr-2"});i.appendChild(t)}i.innerHTML+=t||"Branch";const a=e.makeIcon("Right",{iconClass:"switch-branch-button",svgClass:"sm"});i.appendChild(a),n.appendChild(i);var l=document.createElement("div");l.id=t.replace(/\s/g,""),l.className="lexbranchcontent",n.appendChild(l),this.content=l,this._addBranchSeparator(),this.closed&&(i.classList.add("closed"),n.classList.add("closed"),this.grabber.setAttribute("hidden",!0),e.doAsync(()=>{this.content.setAttribute("hidden",!0)},10)),this.onclick=function(t){this.classList.toggle("closed"),this.parentElement.classList.toggle("closed"),o.content.toggleAttribute("hidden"),o.grabber.toggleAttribute("hidden"),e.emit("@on_branch_closed",this.classList.contains("closed"))},this.oncontextmenu=function(t){t.preventDefault(),t.stopPropagation(),this.parentElement.classList.contains("dialog")||e.addContextMenu("Dock",t,e=>{t.preventDefault(),e.add("Floating",o._onMakeFloating.bind(o))},{icon:"WindowRestore"})},i.addEventListener("click",this.onclick),i.addEventListener("contextmenu",this.oncontextmenu)}_onMakeFloating(){const t=new e.Dialog(this.name,e=>{for(let t of this.components)e.root.appendChild(t.root)},{dockable:!0}),s=Array.from(this.root.parentElement.childNodes).indexOf(this.root);console.assert(s>=0,"Branch not found!"),t.branchData={name:this.name,components:this.components,closed:this.closed,panel:this.panel,childIndex:s},this.root.remove()}_addBranchSeparator(){const t=document.createElement("div");t.className="lexcomponentseparator",t.style.width="100%",t.style.background="none";const s=document.createElement("div");s.innerHTML="▾",t.appendChild(s),e.doAsync(()=>{s.style.marginLeft=parseFloat(e.DEFAULT_NAME_WIDTH)/100*this.content.offsetWidth+"px"},10);const n=document.createElement("div");n.style.width="1px",n.style.marginLeft="6px",n.style.marginTop="2px",n.style.height="0px",s.appendChild(n),s.addEventListener("mousedown",function(e){var t=o.root.ownerDocument;t.addEventListener("mouseup",a),t.addEventListener("mousemove",i),e.stopPropagation(),e.preventDefault();const s=o.root.offsetHeight-o.root.children[0].offsetHeight;n.style.height=s-3+"px",document.body.classList.add("nocursor")}),this.grabber=s;let o=this;function i(t){let n=t.movementX;if(0!=n){const t=parseFloat(s.style.marginLeft);s.style.marginLeft=e.clamp(t+n,32,o.content.offsetWidth-32)+"px"}}function a(e){o._updateComponents(),n.style.height="0px";var t=o.root.ownerDocument;t.removeEventListener("mouseup",a),t.removeEventListener("mousemove",i),document.body.classList.remove("nocursor")}this.content.appendChild(t)}_updateComponents(){var t=this.grabber.style.marginLeft;for(let s=0;s<this.components.length;s++){let n=this.components[s];const o=n.root;if(o.children.length<2)continue;let i=o.children[0],a=o.children[1];switch(i.style.width=t,i.style.minWidth=t,n.type){case e.BaseComponent.CUSTOM:case e.BaseComponent.ARRAY:continue}a.style.width="-moz-calc( 100% - "+t+" )",a.style.width="-webkit-calc( 100% - "+t+" )",a.style.width="calc( 100% - "+t+" )"}}};e.Menubar=class{constructor(e,t={}){this.root=document.createElement("div"),this.root.className="lexmenubar",t.float&&(this.root.style.justifyContent=t.float),this.buttons=[],this.icons={},this.shorts={},this.items=e??[],this.createEntries()}_resetMenubar(e){this.root.querySelectorAll(".lexmenuentry").forEach(e=>{e.classList.remove("selected"),delete e.dataset.built}),this._currentDropdown&&(this._currentDropdown.destroy(),this._currentDropdown=null),this.focused=e??!1}createEntries(){for(let t of this.items){let s=t.name,n=e.getSupportedDOMName(s);if(this.root.querySelector("#"+n))continue;let o=document.createElement("div");o.className="lexmenuentry",o.id=n,o.innerHTML="<span>"+s+"</span>",o.tabIndex="1",this.root.appendChild(o);const i=()=>{this._resetMenubar(!0),o.classList.add("selected"),o.dataset.built="true",this._currentDropdown=e.addDropdownMenu(o,t.submenu??[],{side:"bottom",align:"start",onBlur:()=>{this._resetMenubar()}})};o.addEventListener("mousedown",e=>{e.preventDefault()}),o.addEventListener("mouseup",e=>{e.preventDefault();const n=t.callback;if(!n)return i(),this.focused=!0,!1;n.call(this,s,o,e)}),o.addEventListener("mouseover",e=>{this.focused&&!o.dataset.built&&i()})}}getButton(e){return this.buttons[e]}getSubitem(e,t){for(const s of e)if(s?.name==t[0]){if(1==t.length)return s;if(s.submenu)return t.shift(),this.getSubitem(s.submenu,t)}}getItem(e){const t=e.split("/");return this.getSubitem(this.items,t)}setButtonIcon(t,s,n,o={}){if(!t)throw"Set Button Name!";let i=this.buttons[t];i&&(delete this.buttons[t],e.deleteElement(i.root)),i=new e.Button(t,null,n,{title:t,buttonClass:"lexmenubutton main bg-none",disabled:o.disabled,icon:s,svgClass:"xl",hideName:!0,swap:o.swap}),"right"==o.float&&(i.root.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(i.root):"left"==o.float?this.root.prepend(i.root):this.root.appendChild(i.root),this.buttons[t]=i}setButtonImage(e,t,s,n={}){if(!e)throw"Set Button Name!";let o=this.buttons[e];if(o)return void(o.querySelector("img").src=t);o=document.createElement("div");const i=n.disabled??!1;o.className="lexmenubutton main"+(i?" disabled":""),o.title=e,o.innerHTML="<a><image src='"+t+"' class='lexicon' style='height:32px;'></a>","right"==n.float&&(o.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(o):"left"==n.float?this.root.prepend(o):this.root.appendChild(o);const a=o.querySelector("a");a.addEventListener("mousedown",e=>{e.preventDefault()}),a.addEventListener("mouseup",e=>{s&&!i&&s.call(this,a,e)}),this.buttons[e]=o}addButtons(t,s={}){if(!t)throw"No buttons to add!";this.buttonContainer||(this.buttonContainer=document.createElement("div"),this.buttonContainer.className="lexmenubuttons",this.buttonContainer.classList.add(s.float??"center"),"right"==s.float&&(this.buttonContainer.right=!0),this.root.lastChild&&this.root.lastChild.right?this.root.lastChild.before(this.buttonContainer):this.root.appendChild(this.buttonContainer));for(const s of t){const t=s.title,n=new e.Button(t,s.label,s.callback,{title:t,buttonClass:"bg-none",disabled:s.disabled,icon:s.icon,hideName:!0,swap:s.swap,iconPosition:"start"});this.buttonContainer.appendChild(n.root),t&&(this.buttons[t]=n)}}};class w{constructor(t={}){this.root=document.createElement("div"),this.root.className="lexsidebar "+(t.className??""),this.callback=t.callback??null,this._displaySelected=t.displaySelected??!1,Object.defineProperty(w.prototype,"displaySelected",{get:function(){return this._displaySelected},set:function(e){this._displaySelected=e,this._displaySelected||this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected"))},enumerable:!0,configurable:!0});const s=navigator&&/Android|iPhone/i.test(navigator.userAgent);if(this.side=t.side??"left",this.collapsable=t.collapsable??!0,this._collapseWidth=t.collapseToIcons??1?"58px":"0px",this.collapsed=t.collapsed??s,this.filterString="",e.doAsync(()=>{if(this.root.parentElement.ogWidth=this.root.parentElement.style.width,this.root.parentElement.style.transition=this.collapsed?"":"width 0.25s ease-out",this.resizeObserver=new ResizeObserver(e=>{for(const t of e)this.siblingArea.setSize(["calc(100% - "+t.contentRect.width+"px )",null])}),this.collapsed){if(this.root.classList.toggle("collapsed",this.collapsed),this.root.parentElement.style.width=this._collapseWidth,!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),e.doAsync(()=>{this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach(e=>e.dataset.disableTooltip=!this.collapsed)},10)}},10),!t.skipHeader&&(this.header=t.header??this._generateDefaultHeader(t),console.assert(this.header.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom header"),this.header.className="lexsidebarheader",this.root.appendChild(this.header),this.collapsable)){const n=e.makeIcon("left"==this.side?"PanelLeft":"PanelRight",{title:"Toggle Sidebar",iconClass:"toggler"});if(this.header.appendChild(n),s){const s=new e.Area({skipAppend:!0}),o=e.deepCopy(t);o.collapsed=!1,o.collapsable=!1,s.addSidebar(this.callback,o),n.addEventListener("click",t=>{t.preventDefault(),t.stopPropagation(),new e.Sheet("256px",[s],{side:this.side})})}else n.addEventListener("click",e=>{e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()})}if(t.filter){const t=new e.TextInput(null,"",(e,t)=>{this.filterString=e,this.update()},{inputClass:"outline",placeholder:"Search...",icon:"Search",className:"lexsidebarfilter"});this.filter=t.root,this.root.appendChild(this.filter)}this.content=document.createElement("div"),this.content.className="lexsidebarcontent",this.root.appendChild(this.content),t.skipFooter||(this.footer=t.footer??this._generateDefaultFooter(t),console.assert(this.footer.constructor===HTMLDivElement,"Use an HTMLDivElement to build your custom footer"),this.footer.className="lexsidebarfooter",this.root.appendChild(this.footer));new ResizeObserver(e=>{const t=(this.header?.offsetHeight??0)+(this.filter?.offsetHeight??0)+(this.footer?.offsetHeight??0);this.content.style.height=`calc(100% - ${t}px)`}).observe(this.root),this.items=[],this.icons={},this.groups={}}_generateDefaultHeader(t){const s=document.createElement("div");s.addEventListener("click",e=>{this.collapsed?(e.preventDefault(),e.stopPropagation(),this.toggleCollapsed()):t.onHeaderPressed&&t.onHeaderPressed(e)});const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.headerImage){const e=document.createElement("img");e.src=t.headerImage,n.appendChild(e)}else if(t.headerIcon){const s=e.makeIcon(t.headerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.headerTitle??"",e.appendChild(n);const o=document.createElement("span");o.innerHTML=t.headerSubtitle??"",e.appendChild(o)}if(t.onHeaderPressed&&!this.collapsable){const t=e.makeIcon("MenuArrows");s.appendChild(t)}return s}_generateDefaultFooter(t){const s=document.createElement("div");s.addEventListener("click",e=>{t.onFooterPressed&&t.onFooterPressed(e,s)});const n=document.createElement("span");if(n.className="lexavatar",s.appendChild(n),t.footerImage){const e=document.createElement("img");e.src=t.footerImage,n.appendChild(e)}else if(t.footerIcon){const s=e.makeIcon(t.footerIcon);n.appendChild(s)}{const e=document.createElement("div");e.className="infodefault",s.appendChild(e);const n=document.createElement("span");n.innerHTML=t.footerTitle??"",e.appendChild(n);const o=document.createElement("span");o.innerHTML=t.footerSubtitle??"",e.appendChild(o)}if(t.onFooterPressed){const t=e.makeIcon("MenuArrows");s.appendChild(t)}return s}toggleCollapsed(t){if(this.collapsable){if(this.collapsed=t??!this.collapsed,this.collapsed?(this.root.classList.add("collapsing"),this.root.parentElement.style.width=this._collapseWidth):(this.root.classList.remove("collapsing"),this.root.classList.remove("collapsed"),this.root.parentElement.style.width=this.root.parentElement.ogWidth),!this.resizeObserver)throw"Wait until ResizeObserver has been created!";this.resizeObserver.observe(this.root.parentElement),e.doAsync(()=>{this.root.classList.toggle("collapsed",this.collapsed),this.resizeObserver.unobserve(this.root.parentElement),this.root.querySelectorAll(".lexsidebarentrycontent").forEach(e=>e.dataset.disableTooltip=!this.collapsed)},250)}}separator(){this.currentGroup=null,this.add("")}group(e,t){this.currentGroup=e,this.groups[e]=t}add(e,t={}){t.constructor==Function&&(t={callback:t});const s=e.split("/"),n=s[s.length-1];this.icons[n]=t.icon;let o=0;const i=(e,n)=>{if(null==e)return;let a=null;if(n.forEach(t=>{const s=Object.keys(t).find(t=>t==e);s&&(a=t[s])}),a)i(s[o++],a);else{let a={};a[e]=[];const l=s[o++];l||(a.callback=t.callback,a.group=this.currentGroup,a.options=t),n.push(a),i(l,a[e])}};i(s[o++],this.items)}select(t){let s=e.getSupportedDOMName(t);const n=this.items.find(e=>e.name===s);n&&n.dom.click()}update(){this.content.innerHTML="";for(let e of this.items)delete e.dom;for(let t of this.items){const s=t.options??{};if(t.dom)continue;let n=t.name=Object.keys(t)[0];if(this.filterString.length&&!n.toLowerCase().includes(this.filterString.toLowerCase()))continue;let o=e.getSupportedDOMName(n),i=null,a=document.createElement("div");if(a.id=o,a.className="lexsidebarentry "+(s.className??""),this.displaySelected&&s.selected&&a.classList.add("selected"),t.group){const s=t.group.replace(/\s/g,"").replaceAll(".","");if(i=this.content.querySelector("#"+s),i){if(!i.classList.contains("lexsidebargroup"))throw"Bad id: "+t.group}else{i=document.createElement("div"),i.id=s,i.className="lexsidebargroup",this.content.appendChild(i);let n=document.createElement("div");n.className="lexsidebargrouptitle",i.appendChild(n);let o=document.createElement("div");if(o.innerHTML=t.group,n.appendChild(o),null!=this.groups[t.group]){const s=e.makeIcon(this.groups[t.group].icon,{svgClass:"sm"});n.appendChild(s),s.addEventListener("click",e=>{this.groups[t.group].callback&&this.groups[t.group].callback(t.group,e)})}}}if(""==o){let e=document.createElement("div");e.className="lexsidebarseparator",this.content.appendChild(e);continue}this.collapseContainer?(this.collapseContainer.appendChild(a),this.collapseQueue--,this.collapseQueue||delete this.collapseContainer):i?i.appendChild(a):this.content.appendChild(a);let l=document.createElement("div");if(l.className="lexsidebarentrycontent",a.appendChild(l),t.dom=a,"checkbox"==s.type){t.value=s.value??!1;const o=new e.Panel;t.checkbox=o.addCheckbox(null,t.value,(e,o)=>{o.preventDefault(),o.stopPropagation();const i=s.callback;t.value=e,i&&i.call(this,n,e,o)},{className:"accent",label:n,signal:"@checkbox_"+n}),l.appendChild(o.root.childNodes[0])}else{if(s.icon){const t=e.makeIcon(s.icon,{iconClass:"lexsidebarentryicon"});l.appendChild(t),e.asTooltip(l,n,{side:"right",offset:16,active:!1})}if(e.makeElement("a","grid-column-start-2",n,l),s.swap){l.classList.add("swap","inline-grid"),l.querySelector("a").classList.add("swap-off");const t=document.createElement("input");t.className="p-0 border-0",t.type="checkbox",l.prepend(t);const n=e.makeIcon(s.swap,{iconClass:"lexsidebarentryicon swap-on"});l.appendChild(n)}s.content&&l.appendChild(s.content)}const r=null!=s.collapsable?s.collapsable:s.collapsable||t[n].length;if(a.addEventListener("click",e=>{if(e.target&&e.target.classList.contains("lexcheckbox"))return;let o;if(r)l.querySelector(".collapser").click();else if(t.checkbox)t.value=!t.value,t.checkbox.set(t.value,!0),o=t.value;else if(s.swap&&!(e.target instanceof HTMLInputElement)){const e=l.querySelector("input");e.checked=!e.checked,o=e.checked}const i=s.callback;i&&i.call(this,n,o??a,e),this.displaySelected&&!s.skipSelection&&(this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected")),a.classList.add("selected"))}),s.action){const t=e.makeIcon(s.action.icon??"Ellipsis",{title:s.action.name});l.appendChild(t),t.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation();const t=s.action.callback;t&&t.call(this,n,e)})}else if(r){const t=document.createElement("div");t.className="collapsablecontainer",Object.assign(t.style,{width:"100%",display:"none"}),e.makeCollapsible(l,t,i??this.content),this.collapseQueue=s.collapsable,this.collapseContainer=t}if(!t[n].length)continue;let c=document.createElement("div");c.className="lexsidebarsubentrycontainer",r?(this.collapseContainer.appendChild(c),delete this.collapseContainer):i?(c.classList.add("collapsablecontainer"),i.appendChild(c)):this.content.appendChild(c);for(let s=0;s<t[n].length;++s){const o=t[n][s],i=o.options??{},a=o.name=Object.keys(o)[0];if(this.filterString.length&&!a.toLowerCase().includes(this.filterString.toLowerCase()))continue;let l=document.createElement("div");if(l.innerHTML=`<span>${a}</span>`,i.action){const t=e.makeIcon(i.action.icon??"Ellipsis",{title:i.action.name});l.appendChild(t),t.addEventListener("click",e=>{e.preventDefault(),e.stopImmediatePropagation();const t=i.action.callback;t&&t.call(this,a,e)})}if(l.className="lexsidebarentry",l.id=a,i.content){const t=e.makeElement("div");t.appendChild(i.content),l.appendChild(t)}c.appendChild(l),l.addEventListener("click",e=>{const t=i.callback;t&&t.call(this,a,l,e),this.displaySelected&&!i.skipSelection&&(this.root.querySelectorAll(".lexsidebarentry").forEach(e=>e.classList.remove("selected")),l.classList.add("selected"))})}}}}e.Sidebar=w;class M{static NONE=0;static ASSET_SELECTED=1;static ASSET_DELETED=2;static ASSET_RENAMED=3;static ASSET_CLONED=4;static ASSET_DBLCLICKED=5;static ASSET_CHECKED=6;static ENTER_FOLDER=7;constructor(t,s,n){this.type=t||e.TreeEvent.NONE,this.item=s,this.value=n,this.multiple=!1}string(){switch(this.type){case M.NONE:return"assetview_event_none";case M.ASSET_SELECTED:return"assetview_event_selected";case M.ASSET_DELETED:return"assetview_event_deleted";case M.ASSET_RENAMED:return"assetview_event_renamed";case M.ASSET_CLONED:return"assetview_event_cloned";case M.ASSET_DBLCLICKED:return"assetview_event_dblclicked";case M.ASSET_CHECKED:return"assetview_event_checked";case M.ENTER_FOLDER:return"assetview_event_enter_folder"}}}e.AssetViewEvent=M;class k{static LAYOUT_GRID=0;static LAYOUT_COMPACT=1;static LAYOUT_LIST=2;static CONTENT_SORT_ASC=0;static CONTENT_SORT_DESC=1;static MAX_PAGE_ELEMENTS=50;constructor(t={}){this.rootPath="https://raw.githubusercontent.com/jxarco/lexgui.js/master/",this.layout=t.layout??k.LAYOUT_GRID,this.sortMode=t.sortMode??k.CONTENT_SORT_ASC,this.contentPage=1,t.rootPath&&(t.rootPath.constructor!==String?console.warn(`Asset Root Path must be a String (now is a ${path.constructor.name})`):this.rootPath=t.rootPath);let s=document.createElement("div");s.className="lexassetbrowser",this.root=s;let n=new e.Area({width:"100%",height:"100%"});s.appendChild(n.root);let o,i,a=n;this.skipBrowser=t.skipBrowser??!1,this.skipPreview=t.skipPreview??!1,this.useNativeTitle=t.useNativeTitle??!1,this.onlyFolders=t.onlyFolders??!0,this.allowMultipleSelection=t.allowMultipleSelection??!1,this.previewActions=t.previewActions??[],this.contextMenu=t.contextMenu??[],this.onRefreshContent=t.onRefreshContent,document.body.appendChild(this.root),this.skipBrowser||([o,i]=n.split({type:"horizontal",sizes:["15%","85%"]}),a=i,o.setLimitBox(210,0),i.setLimitBox(512,0)),this.skipPreview||([a,i]=a.split({type:"horizontal",sizes:["80%","20%"]})),this.allowedTypes=t.allowedTypes||["None","Image","Mesh","Script","JSON","Clip"],this.prevData=[],this.nextData=[],this.data=[],this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(o),this._createContentPanel(a),this.skipPreview||(this.previewPanel=i.addPanel({className:"lexassetcontentpanel",style:{overflow:"scroll"}})),document.body.removeChild(this.root)}load(e,t){this.prevData.length=0,this.nextData.length=0,this.data=e,this._processData(this.data,null),this.currentData=this.data,this.path=["@"],this.skipBrowser||this._createTreePanel(this.area),this._refreshContent(),this.onevent=t}clear(){this.previewPanel&&this.previewPanel.clear(),this.leftPanel&&this.leftPanel.clear(),this.toolsPanel&&this.toolsPanel.clear()}_processData(e,t){e.constructor!==Array&&(e.folder=t,e.children=e.children??[]);let s=e.constructor===Array?e:e.children;for(var n=0;n<s.length;++n)this._processData(s[n],e)}_updatePath(t){this.path.length=0;const s=e=>{if(!e)return;let t=(e.children?e.children:e)[0];t&&t.folder&&(this.path.push(t.folder.id??"@"),s(t.folder.folder))};s(t),e.emit("@on_folder_change",this.path.reverse().join("/"))}_createTreePanel(t){this.leftPanel?this.leftPanel.clear():this.leftPanel=t.addPanel({className:"lexassetbrowserpanel"});let s={id:"/",children:this.data};const n=this.leftPanel.addTree("Content Browser",s,{filter:!1,onlyFolders:this.onlyFolders,onevent:t=>{let s=t.node,n=t.value;switch(t.type){case e.TreeEvent.NODE_SELECTED:t.multiple||this._enterFolder(s),s.parent||(this.prevData.push(this.currentData),this.currentData=this.data,this._refreshContent(),this.path=["@"],e.emit("@on_folder_change",this.path.join("/")));break;case e.TreeEvent.NODE_DRAGGED:s.folder=n,this._refreshContent()}}});this.tree=n.innerTree}_setContentLayout(e){this.layout=e,this.toolsPanel.refresh(),this._refreshContent()}_createContentPanel(t){this.toolsPanel?this.contentPanel.clear():(t.root.classList.add("flex","flex-col"),this.toolsPanel=t.addPanel({className:"flex flex-col overflow-hidden",height:"auto"}),this.toolsPanel.root.style.flex="none",this.contentPanel=t.addPanel({className:"lexassetcontentpanel flex flex-col overflow-hidden"}));const s=(t,s)=>{new e.DropdownMenu(s.target,[{name:"Name",icon:"ALargeSmall",callback:()=>this._sortData("id")},{name:"Type",icon:"Type",callback:()=>this._sortData("type")},null,{name:"Ascending",icon:"SortAsc",callback:()=>this._sortData(null,k.CONTENT_SORT_ASC)},{name:"Descending",icon:"SortDesc",callback:()=>this._sortData(null,k.CONTENT_SORT_DESC)}],{side:"right",align:"start"})},n=(t,s)=>{new e.DropdownMenu(s.target,[{name:"Grid",icon:"LayoutGrid",callback:()=>this._setContentLayout(k.LAYOUT_GRID)},{name:"Compact",icon:"LayoutList",callback:()=>this._setContentLayout(k.LAYOUT_COMPACT)},{name:"List",icon:"List",callback:()=>this._setContentLayout(k.LAYOUT_LIST)}],{side:"right",align:"start"})},o=(e,t)=>{if(!this.allowNextPage)return;const s=this.contentPage;this.contentPage+=e,this.contentPage=Math.min(this.contentPage,1+((this.currentData.length-1)/k.MAX_PAGE_ELEMENTS|0)),this.contentPage=Math.max(this.contentPage,1),s!=this.contentPage&&this._refreshContent()};this.toolsPanel.refresh=()=>{this.toolsPanel.clear(),this.toolsPanel.sameLine(),this.toolsPanel.addSelect("Filter",this.allowedTypes,this.filter??this.allowedTypes[0],e=>{this._refreshContent(null,e)},{width:"30%",minWidth:"128px",overflowContainer:null}),this.toolsPanel.addText(null,this.searchValue??"",e=>this._refreshContent.call(this,e,null),{placeholder:"Search assets.."}),this.toolsPanel.addButton(null,"",s.bind(this),{title:"Sort",tooltip:!0,icon:this.sortMode===k.CONTENT_SORT_ASC?"SortAsc":"SortDesc"}),this.toolsPanel.addButton(null,"",n.bind(this),{title:"View",tooltip:!0,icon:this.layout===k.LAYOUT_GRID?"LayoutGrid":"LayoutList"}),this.toolsPanel.addButton(null,"",o.bind(this,-1),{title:"Previous Page",icon:"ChevronsLeft",className:"ml-auto"}),this.toolsPanel.addButton(null,"",o.bind(this,1),{title:"Next Page",icon:"ChevronsRight"});const e="Page "+this.contentPage+" / "+(1+((this.currentData.length-1)/k.MAX_PAGE_ELEMENTS|0));this.toolsPanel.addText(null,e,null,{inputClass:"nobg",disabled:!0,signal:"@on_page_change",maxWidth:"16ch"}),this.toolsPanel.endLine(),this.skipBrowser||(this.toolsPanel.sameLine(),this.toolsPanel.addComboButtons(null,[{value:"Left",icon:"ArrowLeft",callback:e=>{this.prevData.length&&(this.nextData.push(this.currentData),this.currentData=this.prevData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Right",icon:"ArrowRight",callback:e=>{this.nextData.length&&(this.prevData.push(this.currentData),this.currentData=this.nextData.pop(),this._refreshContent(),this._updatePath(this.currentData))}},{value:"Refresh",icon:"Refresh",callback:e=>{this._refreshContent()}}],{noSelection:!0}),this.toolsPanel.addText(null,this.path.join("/"),null,{inputClass:"nobg",disabled:!0,signal:"@on_folder_change",style:{fontWeight:"600",fontSize:"15px"}}),this.toolsPanel.endLine())},this.toolsPanel.refresh(),this.content=document.createElement("ul"),this.content.className="lexassetscontent",this.contentPanel.attach(this.content),this.content.addEventListener("dragenter",function(e){e.preventDefault(),this.classList.add("dragging")}),this.content.addEventListener("dragleave",function(e){e.preventDefault(),this.classList.remove("dragging")}),this.content.addEventListener("drop",e=>{e.preventDefault(),this._processDrop(e)}),this.content.addEventListener("click",function(){this.querySelectorAll(".lexassetitem").forEach(e=>e.classList.remove("selected"))}),this._refreshContent()}_refreshContent(t,s){const n=this.layout==k.LAYOUT_GRID,o=this.layout==k.LAYOUT_COMPACT,i=this.layout==k.LAYOUT_LIST;this.filter=s??this.filter??"None",this.searchValue=t??this.searchValue??"",this.content.innerHTML="",this.content.className="lexassetscontent"+(o?" compact":i?" list":"");let a=this;const l=function(t){const s=t.type.charAt(0).toUpperCase()+t.type.slice(1),o=e.getExtension(t.id),l="Folder"===s;let r=document.createElement("li");if(r.className="lexassetitem "+t.type.toLowerCase(),r.tabIndex=-1,a.content.appendChild(r),t.lastModified&&!t.lastModifiedDate&&(t.lastModifiedDate=a._lastModifiedToStringDate(t.lastModified)),a.useNativeTitle)r.title=s+": "+t.id;else{let e=document.createElement("span");e.className="lexitemdesc",e.id=`floatingTitle_${t.id}`,e.innerHTML=`File: ${t.id}<br>Type: ${s}`,a.content.appendChild(e),r.addEventListener("mousemove",t=>{if(!n)return;const s=r.closest("dialog"),o=r.getBoundingClientRect(),i=t.target.getBoundingClientRect();let a=o.x+t.offsetX,l=o.y+t.offsetY;if(s){const e=s.getBoundingClientRect();a-=e.x,l-=e.y}t.target.classList.contains("lexassettitle")&&(l+=i.y-o.y),e.style.left=a+"px",e.style.top=l-36+"px"})}if(a.allowMultipleSelection){let e=document.createElement("input");e.type="checkbox",e.className="lexcheckbox",e.checked=t.selected,e.addEventListener("change",(e,s)=>{if(t.selected=!t.selected,a.onevent){const s=new M(M.ASSET_CHECKED,e.shiftKey?[t]:t);s.multiple=!!e.shiftKey,a.onevent(s)}e.stopPropagation(),e.stopImmediatePropagation()}),r.appendChild(e)}let c=document.createElement("span");if(c.className="lexassettitle",c.innerText=t.id,r.appendChild(c),!a.skipPreview){if("video"===t.type){const s=e.makeElement("video","absolute left-0 top-0 w-full border-none pointer-events-none","",r);s.setAttribute("disablePictureInPicture",!1),s.setAttribute("disableRemotePlayback",!1),s.setAttribute("loop",!0),s.setAttribute("async",!0),s.style.transition="opacity 0.2s ease-out",s.style.opacity=t.preview?"0":"1",s.src=t.src,s.volume=t.videoVolume??.4}let s=null;const i=t.preview??t.src;if(i&&((()=>{const t=e.getExtension(i.split("?")[0].split("#")[0]);return!!t&&["png","jpg","jpeg","gif","bmp","avif"].includes(t.toLowerCase())})()||i.startsWith("data:image/"))||l||!n){const e=`${a.rootPath}images/file.png`,o=`${a.rootPath}images/folder.png`;s=document.createElement("img");let c=t.unknownExtension?e:l?o:i;s.src=n||l?c:e,r.appendChild(s)}else{s=document.createElement("svg"),s.className="asset-file-preview",r.appendChild(s);let e=document.createElement("text");e.innerText=o&&o!=t.id?`.${o.toUpperCase()}`:t.type.toUpperCase(),s.appendChild(e);var d=2.5/e.innerText.length;if(d<1){var h=64*d;e.style.fontSize=h+"px",s.style.paddingTop=`calc(50% - ${.5*e.offsetHeight+10}px)`}}}let u=s;return i&&(t.bytesize&&(u+=` | ${e.formatBytes(t.bytesize)}`),t.lastModifiedDate&&(u+=` | ${t.lastModifiedDate}`)),e.makeContainer(["auto","auto"],"lexassetinfo",u,r),r.addEventListener("click",function(s){s.stopImmediatePropagation(),s.stopPropagation();const n=s.detail==e.MOUSE_DOUBLE_CLICK;if(n){if(l)return void a._enterFolder(t)}else s.shiftKey||a.content.querySelectorAll(".lexassetitem").forEach(e=>e.classList.remove("selected")),this.classList.add("selected"),a.selectedItem=t,a.skipPreview||a._previewAsset(t);if(a.onevent){const e=new M(n?M.ASSET_DBLCLICKED:M.ASSET_SELECTED,s.shiftKey?[t]:t);e.multiple=!!s.shiftKey,a.onevent(e)}}),a.contextMenu&&r.addEventListener("contextmenu",function(s){s.preventDefault();const n=a.content.querySelectorAll(".selected").length;e.addContextMenu(n>1?n+" selected":l?t.id:t.type,s,e=>{n<=1&&e.add("Rename"),l||e.add("Clone",a._cloneItem.bind(a,t)),n<=1&&e.add("Properties"),e.add(""),e.add("Delete",a._deleteItem.bind(a,t))})}),r.addEventListener("dragstart",function(e){e.preventDefault()},!1),r.addEventListener("mouseenter",e=>{if(!a.useNativeTitle&&n){const e=a.content.querySelector(`#floatingTitle_${t.id}`);e&&(e.style.display="unset")}if("video"!==t.type)return;e.preventDefault();const s=r.querySelector("video");s.style.opacity="1",s.play()}),r.addEventListener("mouseleave",e=>{if(!a.useNativeTitle&&n&&setTimeout(()=>{const e=a.content.querySelector(`#floatingTitle_${t.id}`);e&&(e.style.display="none")},100),"video"!==t.type)return;e.preventDefault();const s=r.querySelector("video");s.pause(),s.currentTime=0,t.preview&&(s.style.opacity="0")}),r},r=new FileReader,c=this.currentData.filter(e=>("None"==this.filter||e.type.toLowerCase()==this.filter.toLowerCase())&&e.id.toLowerCase().includes(this.searchValue.toLowerCase()));(s||t)&&(this.contentPage=1);const d=(this.contentPage-1)*k.MAX_PAGE_ELEMENTS,h=Math.min(d+k.MAX_PAGE_ELEMENTS,c.length);for(let n=d;n<h;++n){let o=c[n];o.path?e.request({url:o.path,dataType:"blob",success:e=>{o.bytesize=e.size,r.readAsDataURL(e),r.onload=e=>{o.src=e.currentTarget.result,o._path=o.path,delete o.path,this._refreshContent(t,s)}}}):o.domEl=l(o)}this.allowNextPage=c.length-1>k.MAX_PAGE_ELEMENTS;const u="Page "+this.contentPage+" / "+(1+((c.length-1)/k.MAX_PAGE_ELEMENTS|0));e.emit("@on_page_change",u),this.onRefreshContent&&this.onRefreshContent(t,s)}_previewAsset(t){const s=t.src&&t.src.includes("data:image/");if(this.previewPanel.clear(),this.previewPanel.branch("Asset"),"image"==t.type||t.src){(["png","jpg"].indexOf(e.getExtension(t.src))>-1||s)&&this.previewPanel.addImage(null,t.src,{style:{width:"100%"}})}const n={disabled:!0};this.previewPanel.addText("Filename",t.id,null,n),t.lastModifiedDate&&this.previewPanel.addText("Last Modified",t.lastModifiedDate,null,n),(t._path||t.src)&&this.previewPanel.addText("URL",t._path?t._path:t.src,null,n),this.previewPanel.addText("Path",this.path.join("/"),null,n),this.previewPanel.addText("Type",t.type,null,n),t.bytesize&&this.previewPanel.addText("Size",e.formatBytes(t.bytesize),null,n),"folder"==t.type&&this.previewPanel.addText("Files",t.children?t.children.length.toString():"0",null,n),this.previewPanel.addSeparator();const o=[...this.previewActions];o.length||"folder"===t.type||o.push({name:"Download",callback:()=>e.downloadURL(t.src,t.id)});for(let e of o)e.type&&e.type!==t.type||e.path&&e.path!==this.path.join("/")||this.previewPanel.addButton(null,e.name,e.callback.bind(this,t));this.previewPanel.merge()}_processDrop(e){const t=new FileReader,s=e.dataTransfer.files.length;for(let n=0;n<e.dataTransfer.files.length;++n){const o=e.dataTransfer.files[n],i=this.currentData.find(e=>e.id===o.name);i||(t.readAsDataURL(o),t.onload=e=>{let t=o.name.substr(o.name.lastIndexOf(".")+1).toLowerCase(),i={id:o.name,src:e.currentTarget.result,extension:t,lastModified:o.lastModified,lastModifiedDate:this._lastModifiedToStringDate(o.lastModified)};switch(t){case"png":case"jpg":i.type="image";break;case"js":case"css":i.type="script";break;case"json":i.type="json";break;case"obj":i.type="mesh";break;default:i.type=t,i.unknownExtension=!0}this.currentData.push(i),n==s-1&&(this._refreshContent(),this.skipBrowser||this.tree.refresh())})}}_sortData(e,t){e=e??this._lastSortBy??"id";const s=(t=t??this.sortMode)===k.CONTENT_SORT_DESC;this.currentData=this.currentData.sort((t,n)=>{var o=s?n[e].localeCompare(t[e]):t[e].localeCompare(n[e]);return 0==o&&(o=s?n.id.localeCompare(t.id):t.id.localeCompare(n.id)),o}),this._lastSortBy=e,this.sortMode=t,this.toolsPanel.refresh(),this._refreshContent()}_enterFolder(e){if(this.prevData.push(this.currentData),this.currentData=e.children,this.contentPage=1,this._refreshContent(),this._updatePath(this.currentData),this.onevent){const t=new M(M.ENTER_FOLDER,e);this.onevent(t)}}_deleteItem(e){const t=this.currentData.indexOf(e);if(t<0)console.error("[AssetView Error] Cannot delete. Item not found.");else{if(this.currentData.splice(t,1),this._refreshContent(this.searchValue,this.filter),this.onevent){const t=new M(M.ASSET_DELETED,e);this.onevent(t)}this.tree.refresh(),this._processData(this.data)}}_cloneItem(t){const s=this.currentData.indexOf(t);if(s<0)return;delete t.domEl,delete t.folder;const n=e.deepCopy(t);if(this.currentData.splice(s,0,n),this._refreshContent(this.searchValue,this.filter),this.onevent){const e=new M(M.ASSET_CLONED,t);this.onevent(e)}this._processData(this.data)}_lastModifiedToStringDate(e){const t=new Date(e).toLocaleString();return t.substring(0,t.indexOf(","))}}e.AssetView=k;class _{static ACTIVE_TOURS=[];constructor(t,s={}){this.steps=t||[],this.currentStep=0,this.useModal=s.useModal??!0,this.offset=s.offset??8,this.horizontalOffset=s.horizontalOffset,this.verticalOffset=s.verticalOffset,this.radius=s.radius??12,this.tourContainer=document.querySelector(".tour-container"),this.tourContainer||(this.tourContainer=e.makeContainer(["100%","100%"],"tour-container"),this.tourContainer.style.display="none",document.body.appendChild(this.tourContainer),window.addEventListener("resize",()=>{for(const e of _.ACTIVE_TOURS)e._showStep(0)}))}begin(){this.currentStep=0,this.tourContainer.style.display="block",_.ACTIVE_TOURS.push(this),this._showStep(0)}stop(){this.useModal&&(this.tourMask.remove(),this.tourMask=void 0),this._popover?.destroy();const e=_.ACTIVE_TOURS.indexOf(this);-1!==e&&_.ACTIVE_TOURS.splice(e,1),this.tourContainer.innerHTML="",this.tourContainer.style.display="none"}_showStep(e=1){this.currentStep+=e;const t=this.steps[this.currentStep];if(!t)return void this.stop();const s=this.steps[this.currentStep-1],n=this.steps[this.currentStep+1];this.useModal&&this._generateMask(t.reference),this._createHighlight(t,s,n)}_generateMask(t){this.tourContainer.innerHTML="",this.tourMask=e.makeContainer(["100%","100%"],"tour-mask"),this.tourContainer.appendChild(this.tourMask);const s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.style.width="100%",s.style.height="100%",this.tourMask.appendChild(s);const n=document.createElementNS("http://www.w3.org/2000/svg","clipPath");function o(e,t){const s=Math.ceil(e);return[s,t-(s-e)]}n.setAttribute("id","svgTourClipPath"),s.appendChild(n);const i=t.getBoundingClientRect(),[a,l]=o(i.x,i.width),[r,c]=o(i.y,i.height),d=this.verticalOffset??this.offset,h=this.horizontalOffset??this.offset;{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",0),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,a-h)),e.setAttribute("height",window.innerHeight),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",a-h),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,l+2*h)),e.setAttribute("height",Math.max(0,r-d)),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",a-h),e.setAttribute("y",r+c+d),e.setAttribute("width",Math.max(0,l+2*h)),e.setAttribute("height",Math.max(0,window.innerHeight-r-c-d)),e.setAttribute("stroke","none"),n.appendChild(e)}{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("x",a+l+h),e.setAttribute("y",0),e.setAttribute("width",Math.max(0,window.innerWidth-a-l)),e.setAttribute("height",Math.max(0,window.innerHeight)),e.setAttribute("stroke","none"),n.appendChild(e)}const u=e.makeContainer(["0","0"],"tour-ref-mask");u.style.left=a-h-1+"px",u.style.top=r-d-1+"px",u.style.width=`${l+2*h+2}px`,u.style.height=`${c+2*d+2}px`,this.tourContainer.appendChild(u);const p=document.createElementNS("http://www.w3.org/2000/svg","mask");p.setAttribute("id","svgTourReferenceMask"),s.appendChild(p);{const e=document.createElementNS("http://www.w3.org/2000/svg","rect");e.setAttribute("width",l+2*h+2),e.setAttribute("height",c+2*d+2),e.setAttribute("stroke","none"),e.setAttribute("fill","white"),p.appendChild(e);const t=document.createElementNS("http://www.w3.org/2000/svg","rect");t.setAttribute("rx",this.radius),t.setAttribute("width",l+2*h+2),t.setAttribute("height",c+2*d+2),t.setAttribute("stroke","none"),t.setAttribute("fill","black"),p.appendChild(t)}}_createHighlight(t,s,n){const o=e.makeContainer(["auto","auto"],"tour-step-container");{const s=e.makeContainer(["100%","auto"],"flex flex-row","",o);e.makeContainer(["70%","auto"],"p-2 font-medium",t.title,s);const n=e.makeContainer(["30%","auto"],"flex flex-row p-2 justify-end","",s),i=e.makeIcon("X");n.appendChild(i),i.listen("click",()=>{this.stop()})}e.makeContainer(["100%","auto"],"p-2 text-md",t.content,o,{maxWidth:"400px"});const i=e.makeContainer(["100%","auto"],"flex flex-row text-md","",o);{const t=e.makeContainer(["50%","auto"],"p-2 gap-1 self-center flex flex-row text-md","",i);for(let e=0;e<this.steps.length;e++){const s=document.createElement("span");s.className="tour-step-indicator",e===this.currentStep&&s.classList.add("active"),t.appendChild(s)}}const a=e.makeContainer(["50%","auto"],"text-md","",i),l=new e.Panel;let r=1;s&&r++,r>1&&l.sameLine(2,"justify-end"),s&&l.addButton(null,"Previous",()=>{this._showStep(-1)},{buttonClass:"contrast"}),n?l.addButton(null,"Next",()=>{this._showStep(1)},{buttonClass:"accent"}):l.addButton(null,"Finish",()=>{this.stop()}),a.appendChild(l.root);const c=("left"===t.side||"right"===t.side?this.horizontalOffset:this.verticalOffset)??this.offset,d="start"===t.align||"end"===t.align?c:0;this._popover?.destroy(),this._popover=new e.Popover(null,[o],{reference:t.reference,side:t.side,align:t.align,sideOffset:c,alignOffset:"start"===t.align?-d:d})}}e.Tour=_}();
|